diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index 63e5785f5..000000000 --- a/.codecov.yml +++ /dev/null @@ -1,14 +0,0 @@ -coverage: - precision: 2 - round: down - range: "70...100" - status: - patch: - default: - if_no_uploads: error - changes: true - project: - default: - target: auto - if_no_uploads: error -comment: false \ No newline at end of file diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index f91da6abe..000000000 --- a/.editorconfig +++ /dev/null @@ -1,22 +0,0 @@ -# EditorConfig is awesome: http://EditorConfig.org - -# top-most EditorConfig file -root = true - -# Unix-style newlines with a newline ending every file -[*] -end_of_line = lf -charset = utf-8 -insert_final_newline = true -indent_style = space - -[*.{java,groovy,kt}] -indent_size = 4 -continuation_indent_size = 4 -wildcard_import_limit = 9999 - -[*.gradle] -indent_size = 2 - -[Makefile] -indent_style = tab \ No newline at end of file diff --git a/.fernignore b/.fernignore deleted file mode 100644 index 232270085..000000000 --- a/.fernignore +++ /dev/null @@ -1,89 +0,0 @@ -# Specify files that shouldn't be modified by Fern - -# README should not be overwritten as it combines both SDKs -README.md - -# Examples and Migration Guide from auth0-real -EXAMPLES.md -v3_MIGRATION_GUIDE.md -MIGRATION_GUIDE.md -LICENSE -CHANGELOG.md - -# Legacy management API from auth0-real -src/main/java/com/auth0/client/legacy/ - -# Authentication API (manually maintained from auth0-real) -src/main/java/com/auth0/client/auth/ -src/test/java/com/auth0/client/auth/ - -# Supporting packages from auth0-real -src/main/java/com/auth0/net/ -src/main/java/com/auth0/exception/ -src/main/java/com/auth0/utils/ -src/main/java/com/auth0/json/auth/ -src/main/java/com/auth0/json/mgmt/ -src/main/java/com/auth0/json/ObjectMapperProvider.java - -# Client options from auth0-real -src/main/java/com/auth0/client/ProxyOptions.java -src/main/java/com/auth0/client/LoggingOptions.java - -# TokenProvider interface (shared between Fern-generated Management API and auth0-provided Authentication API) -src/main/java/com/auth0/client/mgmt/TokenProvider.java - -# Test infrastructure from auth0-real -src/test/java/com/auth0/net/ -src/test/java/com/auth0/exception/ -src/test/java/com/auth0/utils/ -src/test/java/com/auth0/json/ -src/test/resources/ -src/test/resources/auth/ -src/test/resources/keys/ -src/test/resources/mgmt/ -src/test/resources/mockito-extensions/ -src/test/java/com/auth0/client/legacy/ - -# Custom client builder and examples -src/main/java/com/auth0/client/Auth0ClientBuilder.java -src/main/java/com/auth0/client/ClientCredentialsTokenProvider.java -src/main/java/com/auth0/client/ManagementApiWithTokenProvider.java -src/main/java/com/auth0/client/TokenProvider.java -src/main/java/com/auth0/client/interceptors/ - -# Custom OAuth client credentials support -src/main/java/com/auth0/client/mgmt/core/RequestOptions.java -src/main/java/com/auth0/client/mgmt/core/ClientOptions.java -src/main/java/com/auth0/client/mgmt/core/OAuthTokenSupplier.java -src/main/java/com/auth0/client/mgmt/core/OAuthTokenException.java - -# Custom builder with domain-based initialization -src/main/java/com/auth0/client/mgmt/ManagementApiBuilder.java - -# Custom tests -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/ManagementApiBuilderTest.java - -# Configuration files from auth0-real -.codecov.yml -.editorconfig -.semgrepignore -.shiprc -.snyk -.version -opslevel.yml -.fern/ - -# GitHub workflows -.github/ - -# Build files and configs -gradle/ -gradlew -gradlew.bat -gradle.properties -settings.gradle -build.gradle -sample-app/ - diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 7958e8bdd..000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @auth0/project-dx-sdks-engineer-codeowner diff --git a/.github/ISSUE_TEMPLATE/Bug Report.yml b/.github/ISSUE_TEMPLATE/Bug Report.yml deleted file mode 100644 index 18383e60e..000000000 --- a/.github/ISSUE_TEMPLATE/Bug Report.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: 🐞 Report a bug -description: Have you found a bug or issue? Create a bug report for this library -labels: ["bug"] - -body: - - type: markdown - attributes: - value: | - **Please do not report security vulnerabilities here**. The [Responsible Disclosure Program](https://auth0.com/responsible-disclosure-policy) details the procedure for disclosing security issues. - - - type: checkboxes - id: checklist - attributes: - label: Checklist - options: - - label: I have looked into the [Readme](https://github.com/auth0/auth0-java#readme) and [Examples](https://github.com/auth0/auth0-java/blob/master/EXAMPLES.md), and have not found a suitable solution or answer. - required: true - - label: I have looked into the [API documentation](https://javadoc.io/doc/com.auth0/auth0/latest/index.html) and have not found a suitable solution or answer. - required: true - - label: I have searched the [issues](https://github.com/auth0/auth0-java/issues) and have not found a suitable solution or answer. - required: true - - label: I have searched the [Auth0 Community](https://community.auth0.com) forums and have not found a suitable solution or answer. - required: true - - label: I agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md). - required: true - - - type: textarea - id: description - attributes: - label: Description - description: Provide a clear and concise description of the issue, including what you expected to happen. - validations: - required: true - - - type: textarea - id: reproduction - attributes: - label: Reproduction - description: Detail the steps taken to reproduce this error, and whether this issue can be reproduced consistently or if it is intermittent. - placeholder: | - 1. Step 1... - 2. Step 2... - 3. ... - validations: - required: true - - - type: textarea - id: additional-context - attributes: - label: Additional context - description: Other libraries that might be involved, or any other relevant information you think would be useful. - validations: - required: false - - - type: input - id: environment-version - attributes: - label: auth0-java version - validations: - required: true - - - type: input - id: environment-java-version - attributes: - label: Java version - validations: - required: true diff --git a/.github/ISSUE_TEMPLATE/Feature Request.yml b/.github/ISSUE_TEMPLATE/Feature Request.yml deleted file mode 100644 index d8679879c..000000000 --- a/.github/ISSUE_TEMPLATE/Feature Request.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: 🧩 Feature request -description: Suggest an idea or a feature for this library -labels: ["feature request"] - -body: - - type: checkboxes - id: checklist - attributes: - label: Checklist - options: - - label: I have looked into the [Readme](https://github.com/auth0/auth0-java#readme) and [Examples](https://github.com/auth0/auth0-java/blob/master/EXAMPLES.md), and have not found a suitable solution or answer. - required: true - - label: I have looked into the [API documentation](https://javadoc.io/doc/com.auth0/auth0/latest/index.html) and have not found a suitable solution or answer. - required: true - - label: I have searched the [issues](https://github.com/auth0/auth0-java/issues) and have not found a suitable solution or answer. - required: true - - label: I have searched the [Auth0 Community](https://community.auth0.com) forums and have not found a suitable solution or answer. - required: true - - label: I agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md). - required: true - - - type: textarea - id: description - attributes: - label: Describe the problem you'd like to have solved - description: A clear and concise description of what the problem is. - placeholder: I'm always frustrated when... - validations: - required: true - - - type: textarea - id: ideal-solution - attributes: - label: Describe the ideal solution - description: A clear and concise description of what you want to happen. - validations: - required: true - - - type: textarea - id: alternatives-and-workarounds - attributes: - label: Alternatives and current workarounds - description: A clear and concise description of any alternatives you've considered or any workarounds that are currently in place. - validations: - required: false - - - type: textarea - id: additional-context - attributes: - label: Additional context - description: Add any other context or screenshots about the feature request here. - validations: - required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 65c99a9ce..000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Auth0 Community - url: https://community.auth0.com - about: Discuss this SDK in the Auth0 Community forums diff --git a/.github/actions/get-prerelease/action.yml b/.github/actions/get-prerelease/action.yml deleted file mode 100644 index ce7acdc3b..000000000 --- a/.github/actions/get-prerelease/action.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Return a boolean indicating if the version contains prerelease identifiers - -# -# Returns a simple true/false boolean indicating whether the version indicates it's a prerelease or not. -# -# TODO: Remove once the common repo is public. -# - -inputs: - version: - required: true - -outputs: - prerelease: - value: ${{ steps.get_prerelease.outputs.PRERELEASE }} - -runs: - using: composite - - steps: - - id: get_prerelease - shell: bash - run: | - if [[ "${VERSION}" == *"beta"* || "${VERSION}" == *"alpha"* ]]; then - echo "PRERELEASE=true" >> $GITHUB_OUTPUT - else - echo "PRERELEASE=false" >> $GITHUB_OUTPUT - fi - env: - VERSION: ${{ inputs.version }} diff --git a/.github/actions/get-release-notes/action.yml b/.github/actions/get-release-notes/action.yml deleted file mode 100644 index 287d2066c..000000000 --- a/.github/actions/get-release-notes/action.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Return the release notes extracted from the body of the PR associated with the release. - -# -# Returns the release notes from the content of a pull request linked to a release branch. It expects the branch name to be in the format release/vX.Y.Z, release/X.Y.Z, release/vX.Y.Z-beta.N. etc. -# -# TODO: Remove once the common repo is public. -# -inputs: - version: - required: true - repo_name: - required: false - repo_owner: - required: true - token: - required: true - -outputs: - release-notes: - value: ${{ steps.get_release_notes.outputs.RELEASE_NOTES }} - -runs: - using: composite - - steps: - - uses: actions/github-script@v7 - id: get_release_notes - with: - result-encoding: string - script: | - const { data: pulls } = await github.rest.pulls.list({ - owner: process.env.REPO_OWNER, - repo: process.env.REPO_NAME, - state: 'all', - head: `${process.env.REPO_OWNER}:release/${process.env.VERSION}`, - }); - core.setOutput('RELEASE_NOTES', pulls[0].body); - env: - GITHUB_TOKEN: ${{ inputs.token }} - REPO_OWNER: ${{ inputs.repo_owner }} - REPO_NAME: ${{ inputs.repo_name }} - VERSION: ${{ inputs.version }} diff --git a/.github/actions/get-version/action.yml b/.github/actions/get-version/action.yml deleted file mode 100644 index 9440ec920..000000000 --- a/.github/actions/get-version/action.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Return the version extracted from the branch name - -# -# Returns the version from the .version file. -# -# TODO: Remove once the common repo is public. -# - -outputs: - version: - value: ${{ steps.get_version.outputs.VERSION }} - -runs: - using: composite - - steps: - - id: get_version - shell: bash - run: | - VERSION=$(head -1 .version) - echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT diff --git a/.github/actions/maven-publish/action.yml b/.github/actions/maven-publish/action.yml deleted file mode 100644 index b99ed108a..000000000 --- a/.github/actions/maven-publish/action.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Publish release to Java - -inputs: - java-version: - required: true - ossr-username: - required: true - ossr-token: - required: true - signing-key: - required: true - signing-password: - required: true - - -runs: - using: composite - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Java - shell: bash - 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 }} - export JAVA_HOME=${SDKMAN_DIR}/candidates/java/current - echo "JAVA_HOME is set to $JAVA_HOME" - - - uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 # pin@1.1.0 - env: - JAVA_HOME: ${{ env.JAVA_HOME }} - - - name: Publish Android/Java Packages to Maven - shell: bash - run: ./gradlew publishToSonatype closeSonatypeStagingRepository -PisSnapshot=false --stacktrace - env: - JAVA_HOME: ${{ env.JAVA_HOME }} - MAVEN_USERNAME: ${{ inputs.ossr-username }} - MAVEN_PASSWORD: ${{ inputs.ossr-token }} - SIGNING_KEY: ${{ inputs.signing-key}} - SIGNING_PASSWORD: ${{ inputs.signing-password}} diff --git a/.github/actions/release-create/action.yml b/.github/actions/release-create/action.yml deleted file mode 100644 index 6a2bf804c..000000000 --- a/.github/actions/release-create/action.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Create a GitHub release - -# -# Creates a GitHub release with the given version. -# -# TODO: Remove once the common repo is public. -# - -inputs: - token: - required: true - files: - required: false - name: - required: true - body: - required: true - tag: - required: true - commit: - required: true - draft: - default: false - required: false - prerelease: - default: false - required: false - fail_on_unmatched_files: - default: true - required: false - -runs: - using: composite - - steps: - - uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 - with: - body: ${{ inputs.body }} - name: ${{ inputs.name }} - tag_name: ${{ inputs.tag }} - target_commitish: ${{ inputs.commit }} - draft: ${{ inputs.draft }} - prerelease: ${{ inputs.prerelease }} - fail_on_unmatched_files: ${{ inputs.fail_on_unmatched_files }} - files: ${{ inputs.files }} - env: - GITHUB_TOKEN: ${{ inputs.token }} diff --git a/.github/actions/rl-scanner/action.yml b/.github/actions/rl-scanner/action.yml deleted file mode 100644 index 03c378a0c..000000000 --- a/.github/actions/rl-scanner/action.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: "Reversing Labs Scanner" -description: "Runs the Reversing Labs scanner on a specified artifact." -inputs: - artifact-path: - description: "Path to the artifact to be scanned." - required: true - version: - description: "Version of the artifact." - required: true - -runs: - using: "composite" - steps: - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Install Python dependencies - shell: bash - run: | - pip install boto3 requests - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - role-to-assume: ${{ env.PRODSEC_TOOLS_ARN }} - aws-region: us-east-1 - mask-aws-account-id: true - - - name: Install RL Wrapper - shell: bash - run: | - pip install rl-wrapper>=1.0.0 --index-url "https://${{ env.PRODSEC_TOOLS_USER }}:${{ env.PRODSEC_TOOLS_TOKEN }}@a0us.jfrog.io/artifactory/api/pypi/python-local/simple" - - - name: Run RL Scanner - shell: bash - env: - RLSECURE_LICENSE: ${{ env.RLSECURE_LICENSE }} - RLSECURE_SITE_KEY: ${{ env.RLSECURE_SITE_KEY }} - SIGNAL_HANDLER_TOKEN: ${{ env.SIGNAL_HANDLER_TOKEN }} - PYTHONUNBUFFERED: 1 - run: | - if [ ! -f "${{ inputs.artifact-path }}" ]; then - echo "Artifact not found: ${{ inputs.artifact-path }}" - exit 1 - fi - - rl-wrapper \ - --artifact "${{ inputs.artifact-path }}" \ - --name "${{ github.event.repository.name }}" \ - --version "${{ inputs.version }}" \ - --repository "${{ github.repository }}" \ - --commit "${{ github.sha }}" \ - --build-env "github_actions" \ - --suppress_output - - # Check the outcome of the scanner - if [ $? -ne 0 ]; then - echo "RL Scanner failed." - echo "scan-status=failed" >> $GITHUB_ENV - exit 1 - else - echo "RL Scanner passed." - echo "scan-status=success" >> $GITHUB_ENV - fi - -outputs: - scan-status: - description: "The outcome of the scan process." - value: ${{ env.scan-status }} diff --git a/.github/actions/tag-exists/action.yml b/.github/actions/tag-exists/action.yml deleted file mode 100644 index b5fbdb730..000000000 --- a/.github/actions/tag-exists/action.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Return a boolean indicating if a tag already exists for the repository - -# -# Returns a simple true/false boolean indicating whether the tag exists or not. -# -# TODO: Remove once the common repo is public. -# - -inputs: - token: - required: true - tag: - required: true - -outputs: - exists: - description: 'Whether the tag exists or not' - value: ${{ steps.tag-exists.outputs.EXISTS }} - -runs: - using: composite - - steps: - - id: tag-exists - shell: bash - run: | - GET_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/git/ref/tags/${TAG_NAME}" - http_status_code=$(curl -LI $GET_API_URL -o /dev/null -w '%{http_code}\n' -s -H "Authorization: token ${GITHUB_TOKEN}") - if [ "$http_status_code" -ne "404" ] ; then - echo "EXISTS=true" >> $GITHUB_OUTPUT - else - echo "EXISTS=false" >> $GITHUB_OUTPUT - fi - env: - TAG_NAME: ${{ inputs.tag }} - GITHUB_TOKEN: ${{ inputs.token }} diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 8cc9d6684..000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,14 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - - - package-ecosystem: "gradle" - directory: "lib" - schedule: - interval: "daily" - ignore: - - dependency-name: "*" - update-types: ["version-update:semver-major"] diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 447c190c0..000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,31 +0,0 @@ -### Changes - -Please describe both what is changing and why this is important. Include: - -- Endpoints added, deleted, deprecated, or changed -- Classes and methods added, deleted, deprecated, or changed -- Screenshots of new or changed UI, if applicable -- A summary of usage if this is a new feature or change to a public API (this should also be added to relevant documentation once released) -- Any alternative designs or approaches considered - -### References - -Please include relevant links supporting this change such as a: - -- support ticket -- community post -- StackOverflow post -- support forum thread - -### Testing - -Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors. - -- [ ] This change adds test coverage -- [ ] This change has been tested on the latest version of the platform/language or why not - -### Checklist - -- [ ] I have read the [Auth0 general contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md) -- [ ] I have read the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md) -- [ ] All existing and new tests complete without errors diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index b2e13fc71..000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,20 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 90 - -# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. -daysUntilClose: 7 - -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -exemptLabels: [] - -# Set to true to ignore issues with an assignee (defaults to false) -exemptAssignees: true - -# Label to use when marking as stale -staleLabel: closed:stale - -# Comment to post when marking as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇‍♂️ \ No newline at end of file diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml deleted file mode 100644 index 05ffc76b8..000000000 --- a/.github/workflows/build-and-test.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: auth0/auth0-java/build-and-test - -on: - pull_request: - merge_group: - push: - branches: ["master", "main", "v3"] - -jobs: - gradle: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - uses: actions/setup-java@v5 - with: - distribution: temurin - java-version: 8 - - - name: Set up Gradle - uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 - - - name: Test and Assemble with Gradle - run: ./gradlew assemble check --continue --console=plain - - - uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 - with: - flags: unittests - - uses: actions/upload-artifact@v5 - with: - name: Reports - path: build/reports diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml deleted file mode 100644 index 95ca681e3..000000000 --- a/.github/workflows/claude-code-review.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Claude Code PR Review - -on: - issue_comment: - types: [ created ] - pull_request_review_comment: - types: [ created ] - -jobs: - claude-review: - uses: auth0/auth0-ai-pr-analyzer-gh-action/.github/workflows/claude-code-review.yml@main diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml deleted file mode 100644 index 096fd3dfc..000000000 --- a/.github/workflows/gradle-wrapper-validation.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: "Validate Gradle Wrapper" -on: [push, pull_request] - -jobs: - validation: - name: "validation/gradlew" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - uses: gradle/actions/wrapper-validation@v5 diff --git a/.github/workflows/java-release.yml b/.github/workflows/java-release.yml deleted file mode 100644 index 89e7b9c09..000000000 --- a/.github/workflows/java-release.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: Create Java and GitHub Release - -on: - workflow_call: - inputs: - java-version: - required: true - type: string - - secrets: - ossr-username: - required: true - ossr-token: - required: true - signing-key: - required: true - signing-password: - required: true - github-token: - required: true - -### TODO: Replace instances of './.github/actions/' w/ `auth0/dx-sdk-actions/` and append `@latest` after the common `dx-sdk-actions` repo is made public. -### TODO: Also remove `get-prerelease`, `get-version`, `release-create`, `tag-create` and `tag-exists` actions from this repo's .github/actions folder once the repo is public. - -jobs: - release: - if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/')) - runs-on: ubuntu-latest - environment: release - - steps: - # Checkout the code - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - # Get the version from the branch name - - id: get_version - uses: ./.github/actions/get-version - - # Get the prerelease flag from the branch name - - id: get_prerelease - uses: ./.github/actions/get-prerelease - with: - version: ${{ steps.get_version.outputs.version }} - - # Get the release notes - - id: get_release_notes - uses: ./.github/actions/get-release-notes - with: - token: ${{ secrets.github-token }} - version: ${{ steps.get_version.outputs.version }} - repo_owner: ${{ github.repository_owner }} - repo_name: ${{ github.event.repository.name }} - - # Check if the tag already exists - - id: tag_exists - uses: ./.github/actions/tag-exists - with: - tag: ${{ steps.get_version.outputs.version }} - token: ${{ secrets.github-token }} - - # If the tag already exists, exit with an error - - if: steps.tag_exists.outputs.exists == 'true' - run: exit 1 - - # Set JAVA_HOME here and pass it to subsequent steps - - name: Set JAVA_HOME for Gradle - run: echo "JAVA_HOME=/home/runner/.sdkman/candidates/java/current" >> $GITHUB_ENV # This ensures JAVA_HOME is set globally - env: - SDKMAN_DIR: /home/runner/.sdkman - - # Publish the release to Maven - - uses: ./.github/actions/maven-publish - with: - java-version: ${{ inputs.java-version }} - ossr-username: ${{ secrets.ossr-username }} - ossr-token: ${{ secrets.ossr-token }} - signing-key: ${{ secrets.signing-key }} - signing-password: ${{ secrets.signing-password }} - env: - JAVA_HOME: ${{ env.JAVA_HOME }} - - # Create a release for the tag - - uses: ./.github/actions/release-create - with: - token: ${{ secrets.github-token }} - name: ${{ steps.get_version.outputs.version }} - body: ${{ steps.get_release_notes.outputs.release-notes }} - tag: ${{ steps.get_version.outputs.version }} - commit: ${{ github.sha }} - prerelease: ${{ steps.get_prerelease.outputs.prerelease }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 5bab2bc72..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Create GitHub Release - -on: - pull_request: - types: - - closed - workflow_dispatch: - -permissions: - contents: write - id-token: write # This is required for requesting the JWT - -### TODO: Replace instances of './.github/workflows/' w/ `auth0/dx-sdk-actions/workflows/` and append `@latest` after the common `dx-sdk-actions` repo is made public. -### TODO: Also remove `get-prerelease`, `get-release-notes`, `get-version`, `maven-publish`, `release-create`, and `tag-exists` actions from this repo's .github/actions folder once the repo is public. -### TODO: Also remove `java-release` workflow from this repo's .github/workflows folder once the repo is public. - -jobs: - rl-scanner: - uses: ./.github/workflows/rl-scanner.yml - with: - java-version: 8 - artifact-name: "auth0-java.tgz" - secrets: - RLSECURE_LICENSE: ${{ secrets.RLSECURE_LICENSE }} - RLSECURE_SITE_KEY: ${{ secrets.RLSECURE_SITE_KEY }} - SIGNAL_HANDLER_TOKEN: ${{ secrets.SIGNAL_HANDLER_TOKEN }} - PRODSEC_TOOLS_USER: ${{ secrets.PRODSEC_TOOLS_USER }} - PRODSEC_TOOLS_TOKEN: ${{ secrets.PRODSEC_TOOLS_TOKEN }} - PRODSEC_TOOLS_ARN: ${{ secrets.PRODSEC_TOOLS_ARN }} - release: - uses: ./.github/workflows/java-release.yml - needs: rl-scanner - with: - java-version: 8.0.382-tem - secrets: - ossr-username: ${{ secrets.OSSR_USERNAME }} - ossr-token: ${{ secrets.OSSR_TOKEN }} - signing-key: ${{ secrets.SIGNING_KEY }} - signing-password: ${{ secrets.SIGNING_PASSWORD }} - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/rl-scanner.yml b/.github/workflows/rl-scanner.yml deleted file mode 100644 index 810c5277c..000000000 --- a/.github/workflows/rl-scanner.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: RL-Secure Workflow - -on: - workflow_call: - inputs: - java-version: - required: true - type: string - artifact-name: - required: true - type: string - secrets: - RLSECURE_LICENSE: - required: true - RLSECURE_SITE_KEY: - required: true - SIGNAL_HANDLER_TOKEN: - required: true - PRODSEC_TOOLS_USER: - required: true - PRODSEC_TOOLS_TOKEN: - required: true - PRODSEC_TOOLS_ARN: - required: true -jobs: - checkout-build-scan-only: - if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/')) - runs-on: ubuntu-latest - outputs: - scan-status: ${{ steps.rl-scan-conclusion.outcome }} - - steps: - - name: Checkout code - uses: actions/checkout@v6 - - - name: Set up Java - uses: actions/setup-java@v5 - with: - distribution: temurin - java-version: ${{ inputs.java-version }} - - - name: Set up Gradle - uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 - - - name: Test and Assemble with Gradle - run: ./gradlew assemble check --continue --console=plain - - - id: get_version - uses: ./.github/actions/get-version - - - name: Create tgz build artifact - run: | - tar -czvf ${{ inputs.artifact-name }} * - - - name: Run RL Scanner - id: rl-scan-conclusion - uses: ./.github/actions/rl-scanner - with: - artifact-path: "$(pwd)/${{ inputs.artifact-name }}" - version: "${{ steps.get_version.outputs.version }}" - env: - RLSECURE_LICENSE: ${{ secrets.RLSECURE_LICENSE }} - RLSECURE_SITE_KEY: ${{ secrets.RLSECURE_SITE_KEY }} - SIGNAL_HANDLER_TOKEN: ${{ secrets.SIGNAL_HANDLER_TOKEN }} - PRODSEC_TOOLS_USER: ${{ secrets.PRODSEC_TOOLS_USER }} - PRODSEC_TOOLS_TOKEN: ${{ secrets.PRODSEC_TOOLS_TOKEN }} - PRODSEC_TOOLS_ARN: ${{ secrets.PRODSEC_TOOLS_ARN }} - - - name: Output scan result - run: echo "scan-status=${{ steps.rl-scan-conclusion.outcome }}" >> $GITHUB_ENV diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml deleted file mode 100644 index 90a7c5213..000000000 --- a/.github/workflows/snyk.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Snyk - -on: - merge_group: - workflow_dispatch: - pull_request: - types: - - opened - - synchronize - push: - branches: - - master - schedule: - - cron: '30 0 1,15 * *' - -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} - -jobs: - - check: - name: Check for Vulnerabilities - runs-on: ubuntu-latest - - steps: - - 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@v6 - with: - ref: ${{ github.event.pull_request.head.sha || github.ref }} - - - uses: snyk/actions/gradle-jdk11@9adf32b1121593767fc3c057af55b55db032dc04 # pin@1.0.0 - env: - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} diff --git a/.gitignore b/.gitignore index d4199abc2..a8a3133c9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,24 +1,33 @@ *.class -.project -.gradle -? -.classpath -.checkstyle -.settings -.node -build - -# IntelliJ + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# IntelliJ IDEA / Android Studio +.idea *.iml -*.ipr -*.iws -.idea/ -out/ - -# Eclipse/IntelliJ APT -generated_src/ -generated_testSrc/ -generated/ - -bin -build \ No newline at end of file +local.properties + +# Gradle files +.gradle/ +build/ +/*/build/ + +# Generated files +bin/ +gen/ + +# Log Files +*.log + +# MacOS +.DS_Store +/.nb-gradle/ \ No newline at end of file diff --git a/.semgrepignore b/.semgrepignore deleted file mode 100644 index 2ebacf0c1..000000000 --- a/.semgrepignore +++ /dev/null @@ -1 +0,0 @@ -src/test/ diff --git a/.shiprc b/.shiprc deleted file mode 100644 index f81a9f797..000000000 --- a/.shiprc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "files": { - "README.md": [], - ".version": [], - "build.gradle": ["version = \"{MAJOR}.{MINOR}.{PATCH}\""] - }, - "prefixVersion": false -} diff --git a/.snyk b/.snyk deleted file mode 100644 index cf6ee0132..000000000 --- a/.snyk +++ /dev/null @@ -1,25 +0,0 @@ -# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. -version: v1.25.0 -# ignores vulnerabilities until expiry date; change duration by modifying expiry date -ignore: - SNYK-JAVA-ORGJETBRAINSKOTLIN-2393744: - - '*': - reason: 'unaffected, only affects createTempFile and createTempDir kotlin function, which are not used' - expires: 2024-12-31T00:00:00.000Z - SNYK-JAVA-ORGBOUNCYCASTLE-5771339: - - '*': - reason: 'test-only dependency, no update available' - expires: 2024-12-31T00:00:00.000Z - SNYK-JAVA-ORGBOUNCYCASTLE-6084022: - - '*': - reason: 'test-only dependency, no update available' - expires: 2024-12-31T00:00:00.000Z - SNYK-JAVA-ORGBOUNCYCASTLE-6277380: - - '*': - reason: 'test-only dependency, no update available' - expires: 2024-12-31T00:00:00.000Z - SNYK-JAVA-ORGBOUNCYCASTLE-6613080: - - '*': - reason: 'test-only dependency, no update available' - expires: 2024-12-31T00:00:00.000Z -patch: {} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..cda8249e1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: java +jdk: +- oraclejdk7 +- openjdk7 +before_install: +- chmod +x gradlew +script: +- "./gradlew clean check --continue" +branches: + only: + - master +notifications: + slack: + secure: kwwYDhmQFZ0wJFkPQurni7litDbloU3LqFlQ+0ZqvM8ZFuh1vBVE2E0T2it58RjugitH0RpI8HeRki8rBbt38Pz33MPDp8HOQM5GU7jhxImALQ3dDVT7ji2GfIZdoZR5sXL/XkawwGkols/fQk5WjGAIKjTtSn99GOU5MiZLQ11ajOr9bNUg6o1fBEa30edo5cXmYv39ELrNq+o3GaCPoq5ggBQoRS1/DfyHNh1kHbrtTRNMdEF77ANkZ7V0BevWmVMapRwWnZ3kCKJCKLcWdUl7EDcBDHI4mWANJGwj0kGf9e7HuNuO3UjLFmmPjCuIyB5j7bEjKBDfifQynzX0SmJYx5XBIO66NGLePzoqX2me8/CG8S23rkQcrgwHcCvtu2UavIiOT6iYNFy3CcJYXsaMkOcRP9l6I0FHYoUGunkHGBkpvhlDUnF4nQ9d/Ti6mb/SCe6/2X9+zvHJBN33+GaLCeNLe8ttoEOaFj0exupdzqKvjnZ552wmKb+7gjjdiXixq6hmPnkLOtYevVlk8arnjE6p7ZQF1efIavSPga6ypydScKRprT+Qexy7mFO12XxISew/k8jHAHr1cjK+L1C4buiI9vPtN2k1xKqs8EX9iaDHVNl94bVJLv9H/AN7vysDcadlczyxSyWQ5ZuyUPYBKC9CC4F8NBRGNaYkjIs= diff --git a/.version b/.version deleted file mode 100644 index 944880fa1..000000000 --- a/.version +++ /dev/null @@ -1 +0,0 @@ -3.2.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index e008d76e2..aff621062 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,945 +1,45 @@ # Change Log -## [3.2.0](https://github.com/auth0/auth0-java/tree/3.2.0) (2026-02-11) -[Full Changelog](https://github.com/auth0/auth0-java/compare/3.1.0...3.2.0) +## [0.2.1](https://github.com/auth0/auth0-java/tree/0.2.1) (2016-04-25) +[Full Changelog](https://github.com/auth0/auth0-java/compare/0.2.0...0.2.1) -**Added** -- Feat: Update shields field to enum in Patch Request payload and enabled_locales to enum in Update TenantSetting payload and Add pagination for Action Module Versions [\#825](https://github.com/auth0/auth0-java/pull/825) ([fern-api[bot]](https://github.com/apps/fern-api)) +**Merged pull requests:** -## [3.1.0](https://github.com/auth0/auth0-java/tree/3.1.0) (2026-01-30) -[Full Changelog](https://github.com/auth0/auth0-java/compare/3.0.0...3.1.0) +- Customise Telemetry info [\#21](https://github.com/auth0/auth0-java/pull/21) ([lbalmaceda](https://github.com/lbalmaceda)) -**Added** -- Feat: Added Support for App Access Permission and Inbound User Directory GA [\#813](https://github.com/auth0/auth0-java/pull/813) ([fern-api[bot]](https://github.com/apps/fern-api)) -- Feat: Added Self Service Organization Domain Java Support [\#808](https://github.com/auth0/auth0-java/pull/808) ([fern-api[bot]](https://github.com/apps/fern-api)) -- Updated Readme [\#809](https://github.com/auth0/auth0-java/pull/809) ([tanya732](https://github.com/tanya732)) +## [0.2.0](https://github.com/auth0/auth0-java/tree/0.2.0) (2016-04-18) +[Full Changelog](https://github.com/auth0/auth0-java/compare/0.1.2...0.2.0) -## [3.0.0](https://github.com/auth0/auth0-java/tree/3.0.0) (2026-01-09) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.27.0...3.0.0) +**Merged pull requests:** +- add method to call /oauth/token to the AuthenticationAPIClient [\#20](https://github.com/auth0/auth0-java/pull/20) ([lbalmaceda](https://github.com/lbalmaceda)) -### Added Features +## [0.1.2](https://github.com/auth0/auth0-java/tree/0.1.2) (2016-04-05) +[Full Changelog](https://github.com/auth0/auth0-java/compare/0.1.1...0.1.2) -- **New OpenAPI-generated Management API SDK**: Complete rewrite of the Management API client using Fern code generation. -- **Improved type safety**: using enums -- **Automatic pagination:** `SyncPagingIterable` for automatic pagination -- **Nullability annotations** on generated POJOs -- **error handling**: unified `ManagementApiException` class -- Support for **explicit null values** in **PATCH** operations -- **HTTP client** upgraded to **OkHttp 5.2.1** +**Merged pull requests:** -### ⚠️ Breaking Changes — Major Rewrite -- The Management API client has been fully rewritten using Fern OpenAPI code generation. Applications migrating from v2.x must update their code. -- **Key Breaking Changes**: - - Hierarchical sub-clients replace flat entity APIs. - - Manual pagination removed in favor of `SyncPagingIterable`. - - Unified exception handling via `ManagementApiException`. - - Client initialization updated to `ManagementApi.builder()`. - - Request and response models now use generated, immutable `*RequestContent`, `*ResponseContent`, and `*RequestParameters` types. - - Package structure updated across all Management API resources. +- Update telemetry classes [\#19](https://github.com/auth0/auth0-java/pull/19) ([hzalaz](https://github.com/hzalaz)) -### Deprecated APIs have been removed: -- Removed deprecated AuthAPI constructors. -- Removed legacy authentication and signup helpers. -- Deprecated networking helpers removed: -- Removed deprecated method from MultipartRequest. -- Removed internal EmptyBodyVoidRequest -- Removed HttpOptions -- Removed EXAMPLES.md, refer [reference.md](https://github.com/auth0/auth0-java/blob/master/reference.md) +## [0.1.1](https://github.com/auth0/auth0-java/tree/0.1.1) (2016-03-18) +[Full Changelog](https://github.com/auth0/auth0-java/compare/0.1.0...0.1.1) +**Merged pull requests:** -### Migration Example +- Make SignUpRequest an AuthenticationRequest [\#17](https://github.com/auth0/auth0-java/pull/17) ([hzalaz](https://github.com/hzalaz)) -#### Management API Client Initialization +## [0.1.0](https://github.com/auth0/auth0-java/tree/0.1.0) (2016-03-18) +**Merged pull requests:** -**Before (v2):** -```java -import com.auth0.client.mgmt.ManagementAPI; +- Provide access to the ParameterBuilder inside every request [\#15](https://github.com/auth0/auth0-java/pull/15) ([lbalmaceda](https://github.com/lbalmaceda)) +- let UserProfile implement Serializable [\#13](https://github.com/auth0/auth0-java/pull/13) ([lbalmaceda](https://github.com/lbalmaceda)) +- Change package structure and introduced new way to include metrics [\#7](https://github.com/auth0/auth0-java/pull/7) ([hzalaz](https://github.com/hzalaz)) +- Remove everything related to Application [\#6](https://github.com/auth0/auth0-java/pull/6) ([nikolaseu](https://github.com/nikolaseu)) +- Avoid using magic string [\#5](https://github.com/auth0/auth0-java/pull/5) ([hzalaz](https://github.com/hzalaz)) +- Travis CI integration [\#4](https://github.com/auth0/auth0-java/pull/4) ([lbalmaceda](https://github.com/lbalmaceda)) +- Add sync \(blocking\) mode to all requests [\#3](https://github.com/auth0/auth0-java/pull/3) ([nikolaseu](https://github.com/nikolaseu)) +- Authentication api [\#1](https://github.com/auth0/auth0-java/pull/1) ([nikolaseu](https://github.com/nikolaseu)) -// 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(); -``` -**After (v3 – 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(); -``` - -**Note**: The Authentication API remains supported, with deprecated APIs removed. -A complete migration guide is available at [MIGRATION_GUIDE](MIGRATION_GUIDE.md). - -## [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) - -> **Warning** This SDK is in beta and is subject to breaking changes. It is not recommended for production use, but your feedback and help in testing is appreciated! - -**Added** -- Complete rewrite of the **Management API client** using Fern code generation -- Update OkHttp to 5.2.1 -- API attributes can set null for patch operations -- Nullability annotations to POJO classes -- Fully compatible **Authentication API client** — no breaking changes - -- [Migration guide](MIGRATION_GUIDE) available for upgrading from v2.x - - -## [2.27.0](https://github.com/auth0/auth0-java/tree/2.27.0) (2025-12-18) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.26.0...2.27.0) - -**Added** -- Feat: Add Google WorkSpace Provisioning Config Support [\#795](https://github.com/auth0/auth0-java/pull/795) ([tanya732](https://github.com/tanya732)) - -**Fixed** -- Fix: updated token_lifetime to Integer [\#797](https://github.com/auth0/auth0-java/pull/797) ([tanya732](https://github.com/tanya732)) - -## [2.26.0](https://github.com/auth0/auth0-java/tree/2.26.0) (2025-10-24) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.25.0...2.26.0) - -**Added** -- Adenix/client is token endpoint id header trusted [\#782](https://github.com/auth0/auth0-java/pull/782) ([tanya732](https://github.com/tanya732)) -- Feat: add constructor to set clientId on Client creation [\#781](https://github.com/auth0/auth0-java/pull/781) ([tanya732](https://github.com/tanya732)) - -## [2.25.0](https://github.com/auth0/auth0-java/tree/2.25.0) (2025-09-30) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.24.0...2.25.0) - -**Added** -- Added UserAttributeProfilePage and Deserializer [\#768](https://github.com/auth0/auth0-java/pull/768) ([tanya732](https://github.com/tanya732)) -- Added checkpoint pagination support for Connection Endpoint [\#767](https://github.com/auth0/auth0-java/pull/767) ([tanya732](https://github.com/tanya732)) -- Sdk 6843 self service provisioning java support [\#765](https://github.com/auth0/auth0-java/pull/765) ([tanya732](https://github.com/tanya732)) -- Support for patch clients credentials [\#760](https://github.com/auth0/auth0-java/pull/760) ([tanya732](https://github.com/tanya732)) - -**Fixed** -- Fix: URL Encodings [\#766](https://github.com/auth0/auth0-java/pull/766) ([tanya732](https://github.com/tanya732)) -- Fix: Updated to requested_expiry params [\#757](https://github.com/auth0/auth0-java/pull/757) ([tanya732](https://github.com/tanya732)) - -## [2.24.0](https://github.com/auth0/auth0-java/tree/2.24.0) (2025-08-22) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.23.0...2.24.0) - -**Added** -- Update Readme and Examples [\#752](https://github.com/auth0/auth0-java/pull/752) ([tanya732](https://github.com/tanya732)) -- Customize management api token provider [\#748](https://github.com/auth0/auth0-java/pull/748) ([tanya732](https://github.com/tanya732)) -- Joaosoumoreira/add method to enroll email mfa [\#744](https://github.com/auth0/auth0-java/pull/744) ([tanya732](https://github.com/tanya732)) - -## [2.23.0](https://github.com/auth0/auth0-java/tree/2.23.0) (2025-08-05) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.22.0...2.23.0) - -**Added** -- Added support for Tenant ACL [\#723](https://github.com/auth0/auth0-java/pull/723) ([tanya732](https://github.com/tanya732)) -- Added organization support for Change Password [\#726](https://github.com/auth0/auth0-java/pull/726) ([tanya732](https://github.com/tanya732)) -- Fix: Resource Server Scopes [\#725](https://github.com/auth0/auth0-java/pull/725) ([tanya732](https://github.com/tanya732)) - -## [2.22.0](https://github.com/auth0/auth0-java/tree/2.22.0) (2025-06-20) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.21.0...2.22.0) - -**Added** -- Added support for connectionKeys Endpoint [\#721](https://github.com/auth0/auth0-java/pull/721) ([tanya732](https://github.com/tanya732)) - -## [2.21.0](https://github.com/auth0/auth0-java/tree/2.21.0) (2025-05-30) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.20.0...2.21.0) - -**Added** -- SDK Limit M2M Java Support [\#708](https://github.com/auth0/auth0-java/pull/708) ([tanya732](https://github.com/tanya732)) -- Added support for GET/PATCH Connection Endpoints [\#718](https://github.com/auth0/auth0-java/pull/718) ([tanya732](https://github.com/tanya732)) -- Added support for EmailTemplate [\#720](https://github.com/auth0/auth0-java/pull/720) ([tanya732](https://github.com/tanya732)) - -**Fixed** -- Updated EnabledConnection [\#719](https://github.com/auth0/auth0-java/pull/719) ([tanya732](https://github.com/tanya732)) - -## [2.20.0](https://github.com/auth0/auth0-java/tree/2.20.0) (2025-05-06) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.19.0...2.20.0) - -**Fixed** -- Fixed POST/PATCH connection endpoints [\#710](https://github.com/auth0/auth0-java/pull/710) ([tanya732](https://github.com/tanya732)) -- Fix log event [\#711](https://github.com/auth0/auth0-java/pull/711) ([tanya732](https://github.com/tanya732)) - -## [2.19.0](https://github.com/auth0/auth0-java/tree/2.19.0) (2025-03-28) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.18.0...2.19.0) - -**Added** -- Added support for SSO-FF [\#702](https://github.com/auth0/auth0-java/pull/702) ([tanya732](https://github.com/tanya732)) -- Check point pagination support for get connection [\#704](https://github.com/auth0/auth0-java/pull/704) ([tanya732](https://github.com/tanya732)) - -## [2.18.0](https://github.com/auth0/auth0-java/tree/2.18.0) (2025-02-19) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.17.0...2.18.0) - -**Added** -- Added missing fields in LogEventClass [\#698](https://github.com/auth0/auth0-java/pull/698) ([tanya732](https://github.com/tanya732)) -- Added support for revoke session endpoint [\#699](https://github.com/auth0/auth0-java/pull/699) ([tanya732](https://github.com/tanya732)) -- Added Connection's SCIM Server Support [\#696](https://github.com/auth0/auth0-java/pull/696) ([tanya732](https://github.com/tanya732)) - -## [2.17.0](https://github.com/auth0/auth0-java/tree/2.17.0) (2025-01-10) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.16.0...2.17.0) - -**Added** -- Update EXAMPLES.md to fix variable usage [\#690](https://github.com/auth0/auth0-java/pull/690) ([tanya732](https://github.com/tanya732)) -- Added Support for Self-Service-Profile [\#683](https://github.com/auth0/auth0-java/pull/683) ([tanya732](https://github.com/tanya732)) -- Added support for Back Channel Login [\#682](https://github.com/auth0/auth0-java/pull/682) ([tanya732](https://github.com/tanya732)) - -## [2.17.0](https://github.com/auth0/auth0-java/tree/2.17.0) (2025-01-08) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.16.0...2.17.0) - -**Added** -- Update EXAMPLES.md to fix variable usage [\#690](https://github.com/auth0/auth0-java/pull/690) ([tanya732](https://github.com/tanya732)) -- Added Support for Self-Service-Profile [\#683](https://github.com/auth0/auth0-java/pull/683) ([tanya732](https://github.com/tanya732)) -- Added support for Back Channel Login [\#682](https://github.com/auth0/auth0-java/pull/682) ([tanya732](https://github.com/tanya732)) - -## [2.16.0](https://github.com/auth0/auth0-java/tree/2.16.0) (2024-12-03) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.15.0...2.16.0) - -**Added** -- Added support for custom prompts [\#680](https://github.com/auth0/auth0-java/pull/680) ([tanya732](https://github.com/tanya732)) -- Added phone number identifier in signup Auth API [\#679](https://github.com/auth0/auth0-java/pull/679) ([tanya732](https://github.com/tanya732)) -- Added is_signup_enabled field to OrganizationConnection [\#677](https://github.com/auth0/auth0-java/pull/677) ([tanya732](https://github.com/tanya732)) - -## [2.15.0](https://github.com/auth0/auth0-java/tree/2.15.0) (2024-10-31) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.14.0...2.15.0) - -**Added** -- Added support for byok [\#673](https://github.com/auth0/auth0-java/pull/673) ([tanya732](https://github.com/tanya732)) - -## [2.14.0](https://github.com/auth0/auth0-java/tree/2.14.0) (2024-10-16) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.13.0...2.14.0) - -**Added** -- SDKs support for Control Your Own Key [\#671](https://github.com/auth0/auth0-java/pull/671) ([tanya732](https://github.com/tanya732)) -- Added client credentials changes [\#670](https://github.com/auth0/auth0-java/pull/670) ([tanya732](https://github.com/tanya732)) -- Added support for HRI phase 2 changes [\#668](https://github.com/auth0/auth0-java/pull/668) ([tanya732](https://github.com/tanya732)) - -## [2.13.0](https://github.com/auth0/auth0-java/tree/2.13.0) (2024-09-11) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.12.0...2.13.0) - -**Added** -- Add sessions and refresh tokens to Users Management API [\#661](https://github.com/auth0/auth0-java/pull/661) ([tanya732](https://github.com/tanya732)) - -## [2.12.0](https://github.com/auth0/auth0-java/tree/2.12.0) (2024-05-29) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.11.0...2.12.0) - -**Added** -- Support delete all authentication methods endpoint [\#645](https://github.com/auth0/auth0-java/pull/645) ([jimmyjames](https://github.com/jimmyjames)) - -## [2.11.0](https://github.com/auth0/auth0-java/tree/2.11.0) (2024-04-29) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.10.1...2.11.0) - -**Added** -- [SDK-4763] - RIch Authorization Request (RAR) [\#637](https://github.com/auth0/auth0-java/pull/637) ([jimmyjames](https://github.com/jimmyjames)) -- [SDK-4763] - Add support for HRI Management API changes [\#635](https://github.com/auth0/auth0-java/pull/635) ([jimmyjames](https://github.com/jimmyjames)) -- [SDK-4763] - add support for JAR and PAR with JAR to Authentication API [\#636](https://github.com/auth0/auth0-java/pull/636) ([jimmyjames](https://github.com/jimmyjames)) -- [SDK-4769] - add show_as_button to Organization Enabled Connections [\#631](https://github.com/auth0/auth0-java/pull/631) ([jimmyjames](https://github.com/jimmyjames)) - -## [2.10.1](https://github.com/auth0/auth0-java/tree/2.10.1) (2024-01-29) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.10.0...2.10.1) - -**Deprecated** -- Organizations API no longer returns enabled_connections [\#604](https://github.com/auth0/auth0-java/pull/604) ([jimmyjames](https://github.com/jimmyjames)) - -# [2.10.0](https://github.com/auth0/auth0-java/tree/2.10.0) (2023-12-15) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.9.0...2.10.0) - -**Added** -- support backchannel logout property on Client [\#587](https://github.com/auth0/auth0-java/pull/587) ([jimmyjames](https://github.com/jimmyjames)) - -# [2.9.0](https://github.com/auth0/auth0-java/tree/2.9.0) (2023-11-21) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.8.0...2.9.0) - -**Added** -- Support organization in client credentials [\#582](https://github.com/auth0/auth0-java/pull/582) ([jimmyjames](https://github.com/jimmyjames)) - -# [2.8.0](https://github.com/auth0/auth0-java/tree/2.8.0) (2023-11-07) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.7.0...2.8.0) - -**Fixed** -- Propagate error messages on rate limit exceptions [\#579](https://github.com/auth0/auth0-java/pull/579) ([jimmyjames](https://github.com/jimmyjames)) - -## [2.7.0](https://github.com/auth0/auth0-java/tree/2.7.0) (2023-10-31) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.6.1...2.7.0) - -**Added** -- Support organization get member roles [\#574](https://github.com/auth0/auth0-java/pull/574) ([jimmyjames](https://github.com/jimmyjames)) -- Add passkey properties to authentication method response [\#575](https://github.com/auth0/auth0-java/pull/575) ([jimmyjames](https://github.com/jimmyjames)) - -## [2.6.1](https://github.com/auth0/auth0-java/tree/2.6.1) (2023-09-22) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.6.0...2.6.1) - -**Security** -- Update Okio to resolve CVE-2023-3635 [\#560](https://github.com/auth0/auth0-java/pull/560) ([evansims](https://github.com/evansims)) - -## [2.6.0](https://github.com/auth0/auth0-java/tree/2.6.0) (2023-09-07) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.5.0...2.6.0) - -**Security** -- Update OkHttp to 4.11.0 [\#558](https://github.com/auth0/auth0-java/pull/558) ([evansims](https://github.com/evansims)) - -**Fixed** -- Align json property 'cross_origin_authentication' with api docs [\#555](https://github.com/auth0/auth0-java/pull/555) ([Jojo134](https://github.com/Jojo134)) - -## [2.5.0](https://github.com/auth0/auth0-java/tree/2.5.0) (2023-07-18) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.4.0...2.5.0) - -**Added** -- Support Organization Name on Authorize URL [\#550](https://github.com/auth0/auth0-java/pull/550) ([vasantteja](https://github.com/vasantteja)) - -**Fixed** -- Fix deleteAuthenticationMethodById [\#552](https://github.com/auth0/auth0-java/pull/552) ([jimmyjames](https://github.com/jimmyjames)) - -## [2.4.0](https://github.com/auth0/auth0-java/tree/2.4.0) (2023-06-15) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.3.0...2.4.0) - -**Added** -- Support delete authenticator endpoint [\#541](https://github.com/auth0/auth0-java/pull/541) ([vasantteja](https://github.com/vasantteja)) -- Support invalidate remembered browsers endpoint [\#543](https://github.com/auth0/auth0-java/pull/543) ([jimmyjames](https://github.com/jimmyjames)) - -**Fixed** -- Export users does not require connection_id [\#537](https://github.com/auth0/auth0-java/pull/537) ([jimmyjames](https://github.com/jimmyjames)) - -## [2.3.0](https://github.com/auth0/auth0-java/tree/2.3.0) (2023-05-11) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.2.0...2.3.0) - -**Added** -- Support Pushed Authorization Requests [\#534](https://github.com/auth0/auth0-java/pull/534) ([jimmyjames](https://github.com/jimmyjames)) - -## [2.2.0](https://github.com/auth0/auth0-java/tree/2.2.0) (2023-05-02) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.1.0...2.2.0) - -**Added** -- Add support for client credential management [\#525](https://github.com/auth0/auth0-java/pull/525) ([jimmyjames](https://github.com/jimmyjames)) - -**Fixed** -- Fix headers to lowercase [\#528](https://github.com/auth0/auth0-java/pull/528) ([alexz75](https://github.com/alexz75)) - - -## [2.1.0](https://github.com/auth0/auth0-java/tree/2.1.0) (2023-03-31) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.0.0...2.1.0) - -**Added** -- Add missing LogEvent fields [\#521](https://github.com/auth0/auth0-java/pull/521) ([jimmyjames](https://github.com/jimmyjames)) - -**Changed** -- authentication_methods is an object, not a string [\#520](https://github.com/auth0/auth0-java/pull/520) ([jimmyjames](https://github.com/jimmyjames)) -- Bump jackson dependency to 2.14.2 [\#522](https://github.com/auth0/auth0-java/pull/522) ([jimmyjames](https://github.com/jimmyjames)) -- Update java-jwt dependency to 4.4.0 [\#523](https://github.com/auth0/auth0-java/pull/523) ([jimmyjames](https://github.com/jimmyjames)) - -## [2.0.0](https://github.com/auth0/auth0-java/tree/2.0.0) (2023-02-23) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.44.2...2.0.0) - -2.0.0 introduces several enhances, including: -- HTTP response information returned from requests -- Additional HTTP client configurability -- Ability to configure requests such as add additional parameters and headers -- Support for Authentication API MFA-related APIs -- Authentication API improvements to not require a client secret -- ... and more! - -As a major version release, 2.0.0 does include breaking changes. - -## [2.0.0 Beta 2](https://github.com/auth0/auth0-java/tree/2.0.0-beta.2) (2023-02-13) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.0.0-beta.1...2.0.0-beta.2) - -**Changed** -- Update to latest java-jwt version [\#512](https://github.com/auth0/auth0-java/pull/512) ([jimmyjames](https://github.com/jimmyjames)) - -## [2.0.0 Beta 1](https://github.com/auth0/auth0-java/tree/2.0.0-beta.1) (2023-01-26) -[Full Changelog](https://github.com/auth0/auth0-java/compare/2.0.0-beta.0...2.0.0-beta.1) - -**Added** -- Add support for MFA APIs [\#505](https://github.com/auth0/auth0-java/pull/505) ([poovamraj](https://github.com/poovamraj)) -- Add support MFA Methods API [\#506](https://github.com/auth0/auth0-java/pull/506) ([poovamraj](https://github.com/poovamraj)) -- Support JWT Client Authentication [\#507](https://github.com/auth0/auth0-java/pull/507) ([jimmyjames](https://github.com/jimmyjames)) - -## [2.0.0 Beta 0](https://github.com/auth0/auth0-java/tree/2.0.0-beta.0) (2023-01-12) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.44.2...2.0.0-beta.0) - -> **Warning** This SDK is in beta and is subject to breaking changes. It is not recommended for production use, but your feedback and help in testing is appreciated! - -This release introduces several enhancement, including: -- HTTP response information returned from requests -- Additional HTTP client configurability -- Authentication API improvements to not require a client secret -- ... and more! - -## [1.44.2](https://github.com/auth0/auth0-java/tree/1.44.2) (2023-01-11) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.44.1...1.44.2) - -This patch release does not contain any functional changes, but is being released using an updated signing key for verification as part of our commitment to best security practices. -Please review [the README note for additional details.](https://github.com/auth0/auth0-java/blob/master/README.md) - -**Security** -- Bump java-jwt dependency to 3.19.4 [\#498](https://github.com/auth0/auth0-java/pull/498) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.44.1](https://github.com/auth0/auth0-java/tree/1.44.1) (2022-10-25) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.44.0...1.44.1) - -**Security** -- Bump `java-jwt` to 3.19.3 [\#465](https://github.com/auth0/auth0-java/pull/465) ([jimmyjames](https://github.com/jimmyjames)) -- Bump `com.fasterxml.jackson.core:jackson-databind` to 2.13.4.2 [\#464](https://github.com/auth0/auth0-java/pull/464) ([evansims](https://github.com/evansims)) - -## [1.44.0](https://github.com/auth0/auth0-java/tree/1.44.0) (2022-10-20) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.43.0...1.44.0) - -**Added** -- Integrate ship orb [\#458](https://github.com/auth0/auth0-java/pull/458) ([jimmyjames](https://github.com/jimmyjames)) -- [SDK-2558] Add support for tenant session cookie [\#457](https://github.com/auth0/auth0-java/pull/457) ([jimmyjames](https://github.com/jimmyjames)) -- Support stage property on Breached Password Detection [\#456](https://github.com/auth0/auth0-java/pull/456) ([ewanharris](https://github.com/ewanharris)) - -**Changed** -- Update to Gradle 6.9.2 [\#455](https://github.com/auth0/auth0-java/pull/455) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.43.0](https://github.com/auth0/auth0-java/tree/1.43.0) (2022-09-19) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.42.0...1.43.0) - -**Added** -- Add support for deleting all user's authenticators [\#451](https://github.com/auth0/auth0-java/pull/451) ([jimmyjames](https://github.com/jimmyjames)) -- Add session idle lifetime and make session lifetime doubles [\#423](https://github.com/auth0/auth0-java/pull/423) ([pelletier197](https://github.com/pelletier197)) -- #448 Adding field filter option to get client by ID API [\#449](https://github.com/auth0/auth0-java/pull/449) ([bhatmadhavi](https://github.com/bhatmadhavi)) -- Add missing fields in Client model [\#444](https://github.com/auth0/auth0-java/pull/444) ([poovamraj](https://github.com/poovamraj)) -- Add Ship CLI configuration [\#433](https://github.com/auth0/auth0-java/pull/433) ([frederikprijck](https://github.com/frederikprijck)) - -**Changed** -- Update to OSS plugin version 0.17.2 [\#450](https://github.com/auth0/auth0-java/pull/450) ([jimmyjames](https://github.com/jimmyjames)) -- Bump oss-library and auth0/ship [\#441](https://github.com/auth0/auth0-java/pull/441) ([frederikprijck](https://github.com/frederikprijck)) -- Ensure version is defined before plugins are applied [\#439](https://github.com/auth0/auth0-java/pull/439) ([frederikprijck](https://github.com/frederikprijck)) - -**Security** -- Replace Codecov uploader w/ CircleCI Orb [\#446](https://github.com/auth0/auth0-java/pull/446) ([evansims](https://github.com/evansims)) -- Security: Update OkHttp to 4.10.0 [\#438](https://github.com/auth0/auth0-java/pull/438) ([evansims](https://github.com/evansims)) - -## [1.42.0](https://github.com/auth0/auth0-java/tree/1.42.0) (2022-05-20) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.41.0...1.42.0) - -**Added** -- Added support for Key management API [\#431](https://github.com/auth0/auth0-java/pull/431) ([poovamraj](https://github.com/poovamraj)) -- Support for custom scheme URL [\#429](https://github.com/auth0/auth0-java/pull/429) ([poovamraj](https://github.com/poovamraj)) -- Add enabled connections on organization [\#426](https://github.com/auth0/auth0-java/pull/426) ([charliearaya](https://github.com/charliearaya)) - -## [1.41.0](https://github.com/auth0/auth0-java/tree/1.41.0) (2022-04-19) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.40.2...1.41.0) - -**Fixed** -- Do not cast error values to String [\#421](https://github.com/auth0/auth0-java/pull/421) ([jimmyjames](https://github.com/jimmyjames)) -- Fix double-encoding of log event filter query param [\#420](https://github.com/auth0/auth0-java/pull/420) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.40.2](https://github.com/auth0/auth0-java/tree/1.40.2) (2022-04-07) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.40.1...1.40.2) - -**Security** -- Update OkHttp to address CVE-2021-0341 [\#417](https://github.com/auth0/auth0-java/pull/417) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.40.1](https://github.com/auth0/auth0-java/tree/1.40.1) (2022-03-30) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.40.0...1.40.1) - -**Security** -- Bump java-jwt to 3.19.1 [\#415](https://github.com/auth0/auth0-java/pull/415) ([poovamraj](https://github.com/poovamraj)) -- Security: Bump `jackson-databind` to 2.13.2.2 [\#414](https://github.com/auth0/auth0-java/pull/414) ([evansims](https://github.com/evansims)) - -## [1.40.0](https://github.com/auth0/auth0-java/tree/1.40.0) (2022-03-14) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.39.0...1.40.0) - -**Changed** -- Update java-jwt dependency [\#413](https://github.com/auth0/auth0-java/pull/413) ([jimmyjames](https://github.com/jimmyjames)) - -**Security** -- Bump `jackson-databind` dependency to 2.13.2 [\#411](https://github.com/auth0/auth0-java/pull/411) ([evansims](https://github.com/evansims)) - -## [1.39.0](https://github.com/auth0/auth0-java/tree/1.39.0) (2022-02-18) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.38.0...1.39.0) - -**Added** -- [SDK-3116] Add support for Attack Protection APIs [\#405](https://github.com/auth0/auth0-java/pull/405) ([jimmyjames](https://github.com/jimmyjames)) -- Feature/add branding [\#399](https://github.com/auth0/auth0-java/pull/399) ([pelletier197](https://github.com/pelletier197)) - -**Changed** -- Feature/reduce duplication [\#381](https://github.com/auth0/auth0-java/pull/381) ([pelletier197](https://github.com/pelletier197)) - -## [1.38.0](https://github.com/auth0/auth0-java/tree/1.38.0) (2022-02-01) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.37.0...1.38.0) - -**Added** -- Support maxRequests and maxRequestsPerHost client confiugrations [\#402](https://github.com/auth0/auth0-java/pull/402) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.37.0](https://github.com/auth0/auth0-java/tree/1.37.0) (2022-01-20) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.36.1...1.37.0) - -**Added** -- Add support for Connection realms [\#397](https://github.com/auth0/auth0-java/pull/397) ([jimmyjames](https://github.com/jimmyjames)) -- Improve logging [\#392](https://github.com/auth0/auth0-java/pull/392) ([jimmyjames](https://github.com/jimmyjames)) - -**Deprecated** -- Deprecate setLoggingEnabled on API clients [\#396](https://github.com/auth0/auth0-java/pull/396) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.36.1](https://github.com/auth0/auth0-java/tree/1.36.1) (2022-01-14) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.36.0...1.36.1) - -**Security** -- Update jackson dependency [\#394](https://github.com/auth0/auth0-java/pull/394) ([poovamraj](https://github.com/poovamraj)) - -## [1.36.0](https://github.com/auth0/auth0-java/tree/1.36.0) (2022-01-10) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.35.0...1.36.0) - -**Fixed** -- [SDK-2975] Fix withOrganization method visibility on token verifier [\#388](https://github.com/auth0/auth0-java/pull/388) ([jimmyjames](https://github.com/jimmyjames)) -- remove warning for untyped requests [\#385](https://github.com/auth0/auth0-java/pull/385) ([pelletier197](https://github.com/pelletier197)) - -## [1.35.0](https://github.com/auth0/auth0-java/tree/1.35.0) (2021-10-20) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.34.1...1.35.0) - -**Added** -- Added get job error details method to JobEntity [\#383](https://github.com/auth0/auth0-java/pull/383) ([jasonfagerberg-toast](https://github.com/jasonfagerberg-toast)) -- Add MFA Authentication policies to GuardianEntity [\#379](https://github.com/auth0/auth0-java/pull/379) ([pelletier197](https://github.com/pelletier197)) - -**Fixed** -- Fix de/serialization of Invitation roles [\#380](https://github.com/auth0/auth0-java/pull/380) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.34.1](https://github.com/auth0/auth0-java/tree/1.34.1) (2021-09-21) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.34.0...1.34.1) - -**Fixed** -- Add user_name field to LogEvent [\#375](https://github.com/auth0/auth0-java/pull/375) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.34.0](https://github.com/auth0/auth0-java/tree/1.34.0) (2021-08-27) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.33.0...1.34.0) - -**Added** -- Include log_id in the LogEvent entity [\#372](https://github.com/auth0/auth0-java/pull/372) ([jimmyjames](https://github.com/jimmyjames)) -- [SDK-2716] Add support for Actions Management APIs [\#369](https://github.com/auth0/auth0-java/pull/369) ([jimmyjames](https://github.com/jimmyjames)) -- [SDK-2686] Add retry on rate limit errors for management API [\#368](https://github.com/auth0/auth0-java/pull/368) ([jimmyjames](https://github.com/jimmyjames)) - -**Fixed** -- Fix to rollback action version endpoint [\#370](https://github.com/auth0/auth0-java/pull/370) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.33.0](https://github.com/auth0/auth0-java/tree/1.33.0) (2021-07-26) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.32.0...1.33.0) - -**Added** -- [SDK-2664] Add support for checkpoint pagination [\#362](https://github.com/auth0/auth0-java/pull/362) ([jimmyjames](https://github.com/jimmyjames)) - -**Deprecated** -- Deprecate unused constructors in Page implementations [\#363](https://github.com/auth0/auth0-java/pull/363) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.32.0](https://github.com/auth0/auth0-java/tree/1.32.0) (2021-07-05) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.31.0...1.32.0) - -**Added** -- [SDK-2622] Add expiresAt to token response [\#357](https://github.com/auth0/auth0-java/pull/357) ([jimmyjames](https://github.com/jimmyjames)) - -**Changed** -- Update OSS release plugin version [\#358](https://github.com/auth0/auth0-java/pull/358) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.31.0](https://github.com/auth0/auth0-java/tree/1.31.0) (2021-05-10) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.30.0...1.31.0) - -**Added** -- [SDK-2550] Add networking client timeout configuration [\#354](https://github.com/auth0/auth0-java/pull/354) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.30.0](https://github.com/auth0/auth0-java/tree/1.30.0) (2021-04-28) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.29.0...1.30.0) - -**Added** -- [SDK-2537] Add missing parameters to Ticket entities [\#352](https://github.com/auth0/auth0-java/pull/352) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.29.0](https://github.com/auth0/auth0-java/tree/1.29.0) (2021-04-09) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.28.1...1.29.0) - -**Added** -- Adds method to get an organization's enabled connection and update JavaDocs [\#344](https://github.com/auth0/auth0-java/pull/344) ([jimmyjames](https://github.com/jimmyjames)) -- Add Organizations Management API Support [SDK-2437] [\#341](https://github.com/auth0/auth0-java/pull/341) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.28.1](https://github.com/auth0/auth0-java/tree/1.28.1) (2021-04-05) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.28.0...1.28.1) - -**Fixed** -- Fix `NoSuchMethodError` when projects have OkHttp 3 dependency [\#342](https://github.com/auth0/auth0-java/pull/342) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.28.0](https://github.com/auth0/auth0-java/tree/1.28.0) (2021-03-25) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.27.0...1.28.0) - -**Added** -- Add support for organizations feature [\#338](https://github.com/auth0/auth0-java/pull/338) ([jimmyjames](https://github.com/jimmyjames)) - -**Changed** -- Update Gradle OSS Plugin [\#339](https://github.com/auth0/auth0-java/pull/339) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.27.0](https://github.com/auth0/auth0-java/tree/1.27.0) (2021-02-05) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.26.0...1.27.0) - -**Added** -- Add support for async requests [\#328](https://github.com/auth0/auth0-java/pull/328) ([jimmyjames](https://github.com/jimmyjames)) - -**Changed** -- Update dependency versions [\#329](https://github.com/auth0/auth0-java/pull/329) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.26.0](https://github.com/auth0/auth0-java/tree/1.26.0) (2020-12-02) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.25.0...1.26.0) - -**Added** -- Add refresh token configuration object to client [\#321](https://github.com/auth0/auth0-java/pull/321) ([JakeUskoski](https://github.com/JakeUskoski)) - -**Fixed** -- Fix OkHttp dependency version [\#325](https://github.com/auth0/auth0-java/pull/325) ([jimmyjames](https://github.com/jimmyjames)) -- Tidy up code [\#317](https://github.com/auth0/auth0-java/pull/317) ([jsalinaspolo](https://github.com/jsalinaspolo)) - -## [1.25.0](https://github.com/auth0/auth0-java/tree/1.25.0) (2020-11-16) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.24.0...1.25.0) - -**Changed** -- Update to OkHttp 4 [\#319](https://github.com/auth0/auth0-java/pull/319) ([jimmyjames](https://github.com/jimmyjames)) -- Use java8 [\#316](https://github.com/auth0/auth0-java/pull/316) ([jsalinaspolo](https://github.com/jsalinaspolo)) - -## [1.24.0](https://github.com/auth0/auth0-java/tree/1.24.0) (2020-11-02) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.23.0...1.24.0) - -**Added** -- Add methods to determine cause of APIException [\#310](https://github.com/auth0/auth0-java/pull/310) ([jimmyjames](https://github.com/jimmyjames)) - -**Breaking Changes** -- Return TokenRequest instead of AuthRequest [\#309](https://github.com/auth0/auth0-java/pull/309) ([jimmyjames](https://github.com/jimmyjames)) - -> Note: We aim to not introduce breaking changes within a release stream. We have taken steps, including running API compatibility checks, to prevent introducing breaking changes in the future. - -**Fixed** -- Add unchecked warnings failures for src [\#311](https://github.com/auth0/auth0-java/pull/311) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.23.0](https://github.com/auth0/auth0-java/tree/1.23.0) (2020-10-22) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.22.1...1.23.0) - -**Added** -- Add support for MFA OTP exchange [\#303](https://github.com/auth0/auth0-java/pull/303) ([jimmyjames](https://github.com/jimmyjames)) -- Passwordless support [\#300](https://github.com/auth0/auth0-java/pull/300) ([jimmyjames](https://github.com/jimmyjames)) -- Add scope to TokenHolder [\#297](https://github.com/auth0/auth0-java/pull/297) ([jimmyjames](https://github.com/jimmyjames)) -- Add inicludeEmailInRedirect field for create email verification ticket endpoint [\#296](https://github.com/auth0/auth0-java/pull/296) ([jimmyjames](https://github.com/jimmyjames)) - -**Changed** -- Update dependencies [\#299](https://github.com/auth0/auth0-java/pull/299) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.22.1](https://github.com/auth0/auth0-java/tree/1.22.1) (2020-10-13) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.22.0...1.22.1) - -**Fixed** -- Use Standard Jackson Date serialization [\#295](https://github.com/auth0/auth0-java/pull/295) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.22.0](https://github.com/auth0/auth0-java/tree/1.22.0) (2020-09-28) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.21.0...1.22.0) - -**Added** -- Add support for identity field for email verification jobs and tickets [\#293](https://github.com/auth0/auth0-java/pull/293) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.21.0](https://github.com/auth0/auth0-java/tree/1.21.0) (2020-08-27) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.20.0...1.21.0) - -**Added** -- Add support for Log Streams [\#284](https://github.com/auth0/auth0-java/pull/284) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.20.0](https://github.com/auth0/auth0-java/tree/1.20.0) (2020-07-27) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.19.0...1.20.0) - -**Added** -- Add missing Linking User Accounts endpoint [\#270](https://github.com/auth0/auth0-java/pull/270) ([cschwalm](https://github.com/cschwalm)) - -**Fixed** -- Fix and document thread-safety [\#272](https://github.com/auth0/auth0-java/pull/272) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.19.0](https://github.com/auth0/auth0-java/tree/1.19.0) (2020-06-05) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.18.0...1.19.0) - -**Added** -- Add display_name property to Connection [\#267](https://github.com/auth0/auth0-java/pull/267) ([lbalmaceda](https://github.com/lbalmaceda)) -- Add support for java Proxy with basic auth [\#266](https://github.com/auth0/auth0-java/pull/266) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.18.0](https://github.com/auth0/auth0-java/tree/1.18.0) (2020-05-29) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.17.0...1.18.0) - -**Added** -- Add ID Token verifier API [\#260](https://github.com/auth0/auth0-java/pull/260) ([jimmyjames](https://github.com/jimmyjames)) -- Add signature verification classes [\#258](https://github.com/auth0/auth0-java/pull/258) ([jimmyjames](https://github.com/jimmyjames)) - -**Changed** -- Update to OkHttp 3.14.9 [\#262](https://github.com/auth0/auth0-java/pull/262) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.17.0](https://github.com/auth0/auth0-java/tree/1.17.0) (2020-05-22) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.16.0...1.17.0) - -**Added** -- Add missing property last_password_reset [\#256](https://github.com/auth0/auth0-java/pull/256) ([mario-moura-silva](https://github.com/mario-moura-silva)) -- Add missing "sources" property to the Permission [\#254](https://github.com/auth0/auth0-java/pull/254) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.16.0](https://github.com/auth0/auth0-java/tree/1.16.0) (2020-04-24) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.15.0...1.16.0) - -**Added** -- Add Job "POST User Imports" endpoint [\#249](https://github.com/auth0/auth0-java/pull/249) ([lbalmaceda](https://github.com/lbalmaceda)) -- Add a new class to handle Multipart requests [\#248](https://github.com/auth0/auth0-java/pull/248) ([lbalmaceda](https://github.com/lbalmaceda)) -- Add Job "GET Status" endpoint [\#247](https://github.com/auth0/auth0-java/pull/247) ([lbalmaceda](https://github.com/lbalmaceda)) -- Add missing "initiate_login_uri" property to Client [\#244](https://github.com/auth0/auth0-java/pull/244) ([lbalmaceda](https://github.com/lbalmaceda)) -- Use char array for passwords [\#242](https://github.com/auth0/auth0-java/pull/242) ([jimmyjames](https://github.com/jimmyjames)) -- Add Job "POST User Exports" endpoint [\#241](https://github.com/auth0/auth0-java/pull/241) ([lbalmaceda](https://github.com/lbalmaceda)) -- Add Rules Configs entity [\#240](https://github.com/auth0/auth0-java/pull/240) ([lbalmaceda](https://github.com/lbalmaceda)) - -**Deprecated** -- deprecated string password APIs [\#243](https://github.com/auth0/auth0-java/pull/243) ([jimmyjames](https://github.com/jimmyjames)) - -**Fixed** -- Make CreatedUser take the id from different properties [\#245](https://github.com/auth0/auth0-java/pull/245) ([lbalmaceda](https://github.com/lbalmaceda)) - -**Security** -- Use char array for passwords [\#242](https://github.com/auth0/auth0-java/pull/242) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.15.0](https://github.com/auth0/auth0-java/tree/1.15.0) (2019-11-12) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.14.3...1.15.0) - -**Changed** -- Allow to set the client is_first_party property [\#230](https://github.com/auth0/auth0-java/pull/230) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.14.3](https://github.com/auth0/auth0-java/tree/1.14.3) (2019-09-25) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.14.2...1.14.3) - -**Security** -- Update jackson-databind to address CVE [\#225](https://github.com/auth0/auth0-java/pull/225) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.14.2](https://github.com/auth0/auth0-java/tree/1.14.2) (2019-08-15) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.14.1...1.14.2) - -**Fixed** -- Find the right JDK version for Telemetry [\#220](https://github.com/auth0/auth0-java/pull/220) ([lbalmaceda](https://github.com/lbalmaceda)) - -**Security** -- Update dependencies [\#222](https://github.com/auth0/auth0-java/pull/222) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.14.1](https://github.com/auth0/auth0-java/tree/1.14.1) (2019-07-03) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.14.0...1.14.1) - -**Security** -- Update jackson-databind dependency to fix security vulnerability [\#217](https://github.com/auth0/auth0-java/pull/217) ([jimmyjames](https://github.com/jimmyjames)) - -## [1.14.0](https://github.com/auth0/auth0-java/tree/1.14.0) (2019-07-02) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.13.3...1.14.0) - -**Added** -- Add getter for DeviceCredentials client_id [\#215](https://github.com/auth0/auth0-java/pull/215) ([lbalmaceda](https://github.com/lbalmaceda)) -- Add missing ResourceServer properties [\#214](https://github.com/auth0/auth0-java/pull/214) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.13.3](https://github.com/auth0/auth0-java/tree/1.13.3) (2019-05-22) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.13.2...1.13.3) - -**Fixed** -- Add missing metadata field to Connection object [\#206](https://github.com/auth0/auth0-java/pull/206) ([AlisonT1230](https://github.com/AlisonT1230)) - -**Security** -- Bump dependencies and solve security issues [\#209](https://github.com/auth0/auth0-java/pull/209) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.13.2](https://github.com/auth0/auth0-java/tree/1.13.2) (2019-05-01) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.13.1...1.13.2) - -**Fixed** -- Dynamically obtain the project version for telemetry [\#201](https://github.com/auth0/auth0-java/pull/201) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.13.1](https://github.com/auth0/auth0-java/tree/1.13.1) (2019-04-25) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.13.0...1.13.1) - -**Fixed** -- Fix for issue #198: Core Authorization fails when adding Roles to User [\#199](https://github.com/auth0/auth0-java/pull/199) ([jakbutler](https://github.com/jakbutler)) - -## [1.13.0](https://github.com/auth0/auth0-java/tree/1.13.0) (2019-04-23) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.12.0...1.13.0) - -**Added** -- Add support for Core Authorization's User Roles and Permissions [\#193](https://github.com/auth0/auth0-java/pull/193) ([jakbutler](https://github.com/jakbutler)) - -## [1.12.0](https://github.com/auth0/auth0-java/tree/1.12.0) (2019-04-17) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.11.0...1.12.0) - -**Added** -- Update Telemetry format and allow to customize it [\#195](https://github.com/auth0/auth0-java/pull/195) ([lbalmaceda](https://github.com/lbalmaceda)) - -**Changed** -- Remove default version for search_engine [\#194](https://github.com/auth0/auth0-java/pull/194) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.11.0](https://github.com/auth0/auth0-java/tree/1.11.0) (2019-03-14) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.10.0...1.11.0) - -**Added** -- Add "mark_email_as_verified" property to PasswordChangeTicket [\#189](https://github.com/auth0/auth0-java/pull/189) ([akvamalin](https://github.com/akvamalin)) - -## [1.10.0](https://github.com/auth0/auth0-java/tree/1.10.0) (2019-01-03) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.9.1...1.10.0) - -**Added** -- Add Serializable to the user data. [\#178](https://github.com/auth0/auth0-java/pull/178) ([dfredell](https://github.com/dfredell)) -- Include grant_types in Client [\#166](https://github.com/auth0/auth0-java/pull/166) ([osule](https://github.com/osule)) - -**Fixed** -- Closing response body on RateLimitException [\#175](https://github.com/auth0/auth0-java/pull/175) ([j-m-x](https://github.com/j-m-x)) - -**Security** -- Bump jackson-databind to patch security issues. [\#181](https://github.com/auth0/auth0-java/pull/181) ([gkwang](https://github.com/gkwang)) - -## [1.9.1](https://github.com/auth0/auth0-java/tree/1.9.1) (2018-10-23) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.9.0...1.9.1) - -**Security** -- Use jackson-databind 2.9.7 [\#168](https://github.com/auth0/auth0-java/pull/168) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.9.0](https://github.com/auth0/auth0-java/tree/1.9.0) (2018-09-25) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.8.0...1.9.0) - -**Added** -- Allow to retrieve Rate Limit headers [\#153](https://github.com/auth0/auth0-java/pull/153) ([rvillablanca](https://github.com/rvillablanca)) -- Add web_origins attribute to the Client class [\#148](https://github.com/auth0/auth0-java/pull/148) ([lbalmaceda](https://github.com/lbalmaceda)) -- Application (aka Client) description field support [\#147](https://github.com/auth0/auth0-java/pull/147) ([rrybalkin](https://github.com/rrybalkin)) - -## [1.8.0](https://github.com/auth0/auth0-java/tree/1.8.0) (2018-07-13) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.7.0...1.8.0) - -**Added** -- Allow to update the Management API token [\#141](https://github.com/auth0/auth0-java/pull/141) ([lbalmaceda](https://github.com/lbalmaceda)) -- Allow to set search_engine version for Users API [\#140](https://github.com/auth0/auth0-java/pull/140) ([lbalmaceda](https://github.com/lbalmaceda)) -- Make Connections accept include_totals parameter [\#135](https://github.com/auth0/auth0-java/pull/135) ([lbalmaceda](https://github.com/lbalmaceda)) -- Add pagination support to Client Grants, Grants, Resource Servers and Rules [\#132](https://github.com/auth0/auth0-java/pull/132) ([lbalmaceda](https://github.com/lbalmaceda)) - -**Deprecated** -- Deprecate old list methods that do not support pagination [\#136](https://github.com/auth0/auth0-java/pull/136) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.7.0](https://github.com/auth0/auth0-java/tree/1.7.0) (2018-06-11) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.6.0...1.7.0) - -**Added** -- Support pagination on the Clients entity [\#124](https://github.com/auth0/auth0-java/pull/124) ([lbalmaceda](https://github.com/lbalmaceda)) -- Add Resend verification email functionality [\#120](https://github.com/auth0/auth0-java/pull/120) ([minhlongdo](https://github.com/minhlongdo)) - -**Deprecated** -- Deprecate ClientsEntity#list() method [\#128](https://github.com/auth0/auth0-java/pull/128) ([lbalmaceda](https://github.com/lbalmaceda)) - -**Security** -- Security fix and dependencies update [\#129](https://github.com/auth0/auth0-java/pull/129) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.6.0](https://github.com/auth0/auth0-java/tree/1.6.0) (2018-06-04) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.5.1...1.6.0) - -**Added** -- Expose additional error response properties in the Exception [\#123](https://github.com/auth0/auth0-java/pull/123) ([lbalmaceda](https://github.com/lbalmaceda)) -- Add email-templates endpoints [\#117](https://github.com/auth0/auth0-java/pull/117) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.5.1](https://github.com/auth0/auth0-java/tree/1.5.1) (2018-03-01) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.5.0...1.5.1) - -**Fixed** -- Support password policy error response [\#108](https://github.com/auth0/auth0-java/pull/108) ([lbalmaceda](https://github.com/lbalmaceda)) -- Close ResponseBody buffer after read [\#101](https://github.com/auth0/auth0-java/pull/101) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.5.0](https://github.com/auth0/auth0-java/tree/1.5.0) (2017-12-07) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.4.0...1.5.0) - -**Added** -- Resource server [\#77](https://github.com/auth0/auth0-java/pull/77) ([mfarsikov](https://github.com/mfarsikov)) - -## [1.4.0](https://github.com/auth0/auth0-java/tree/1.4.0) (2017-11-30) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.3.1...1.4.0) - -**Added** -- Add user_id setter [\#93](https://github.com/auth0/auth0-java/pull/93) ([lbalmaceda](https://github.com/lbalmaceda)) -- Add /v2/users-by-email endpoint [\#87](https://github.com/auth0/auth0-java/pull/87) ([lbalmaceda](https://github.com/lbalmaceda)) - -**Breaking changes** -- Include a proper SignUp response [\#92](https://github.com/auth0/auth0-java/pull/92) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.3.1](https://github.com/auth0/auth0-java/tree/1.3.1) (2017-11-01) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.3.0...1.3.1) -**Closed issues** -- NullPointerException, StdDeserializer [\#78](https://github.com/auth0/auth0-java/issues/78) - -**Fixed** -- Upgrade Jackson-databind dependency [\#82](https://github.com/auth0/auth0-java/pull/82) ([LuisSaybe](https://github.com/LuisSaybe)) - -## [1.3.0](https://github.com/auth0/auth0-java/tree/1.3.0) (2017-09-08) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.2.0...1.3.0) - -**Added** -- implemented /api/v2/grants endpoint of auth0 management api [\#74](https://github.com/auth0/auth0-java/pull/74) ([neshanjo](https://github.com/neshanjo)) - -**Changed** -- removed unmotivated throwing of UnsupportedEncodingException [\#75](https://github.com/auth0/auth0-java/pull/75) ([neshanjo](https://github.com/neshanjo)) - -## [1.2.0](https://github.com/auth0/auth0-java/tree/1.2.0) (2017-08-07) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.1.0...1.2.0) -**Closed issues** -- Get AD connection's provisioning_ticket_url property [\#66](https://github.com/auth0/auth0-java/issues/66) - -**Added** -- Add support for provisioning_ticket_url property to Connection POJO [\#67](https://github.com/auth0/auth0-java/pull/67) ([unnamed38](https://github.com/unnamed38)) -- Add public User constructor without parameters [\#59](https://github.com/auth0/auth0-java/pull/59) ([lbalmaceda](https://github.com/lbalmaceda)) - -**Removed** -- Remove invalid Logout URL parameter [\#65](https://github.com/auth0/auth0-java/pull/65) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.1.0](https://github.com/auth0/auth0-java/tree/1.1.0) (2017-05-23) -[Full Changelog](https://github.com/auth0/auth0-java/compare/1.0.0...1.1.0) - -**Added** -- Add getter for User and ProfileData extra properties [\#56](https://github.com/auth0/auth0-java/pull/56) ([lbalmaceda](https://github.com/lbalmaceda)) -- Add renew authentication endpoint [\#51](https://github.com/auth0/auth0-java/pull/51) ([lbalmaceda](https://github.com/lbalmaceda)) -- Add revoke token endpoint [\#50](https://github.com/auth0/auth0-java/pull/50) ([lbalmaceda](https://github.com/lbalmaceda)) -- Add getter for Identity extra properties [\#45](https://github.com/auth0/auth0-java/pull/45) ([lbalmaceda](https://github.com/lbalmaceda)) -- Add response_type and custom parameter setter for AuthorizeUrlBuilder [\#40](https://github.com/auth0/auth0-java/pull/40) ([lbalmaceda](https://github.com/lbalmaceda)) - -**Changed** -- Improve Guardian section [\#39](https://github.com/auth0/auth0-java/pull/39) ([nikolaseu](https://github.com/nikolaseu)) -- Simplify/reduce amount of code [\#36](https://github.com/auth0/auth0-java/pull/36) ([nikolaseu](https://github.com/nikolaseu)) - -**Fixed** -- Fix "q" query parameter encoding [\#55](https://github.com/auth0/auth0-java/pull/55) ([lbalmaceda](https://github.com/lbalmaceda)) -- Close the ResponseBody after its parsed [\#38](https://github.com/auth0/auth0-java/pull/38) ([lbalmaceda](https://github.com/lbalmaceda)) - -## [1.0.0](https://github.com/auth0/auth0-java/tree/1.0.0) (2017-01-30) - -Reworked Auth0 SDK for java by providing better support for non-Android application (for Android please use [Auth0.Android](https://github.com/auth0/Auth0.Android)). - -The changes from v0 includes: - -- OAuth 2.0 endpoints in Authentication API -- Sync calls by default -- Added Management API endpoints -- Better error handling for Auth and Management API erros - -### Auth API - -The implementation is based on the [Authentication API Docs](https://auth0.com/docs/api/authentication). - -Create a new `AuthAPI` instance by providing the client data from the [dashboard](https://manage.auth0.com/#/clients). - -```java -AuthAPI auth = new AuthAPI("{YOUR_DOMAIN}", "{YOUR_CLIENT_ID}", "{YOUR_CLIENT_SECRET}"); -``` - -### Management API - -The implementation is based on the [Management API Docs](https://auth0.com/docs/api/management/v2). - -Create a new `ManagementAPI` instance by providing the domain from the [client dashboard](https://manage.auth0.com/#/clients) and the API Token. Click [here](https://auth0.com/docs/api/management/v2#!/Introduction/Getting_an_API_token) for more information on how to obtain a valid API Token. - -```java -ManagementAPI mgmt = new ManagementAPI("{YOUR_DOMAIN}", "{YOUR_API_TOKEN}"); -``` - -The Management API is divided into different entities. Each of them have the list, create, update, delete and update methods plus a few more if corresponds. The calls are authenticated using the API Token given in the `ManagementAPI` instance creation and must contain the `scope` required by each entity. See the javadoc for details on which `scope` is expected for each call. - -* **Client Grants:** See [Docs](https://auth0.com/docs/api/management/v2#!/Client_Grants/get_client_grants). Access the methods by calling `mgmt.clientGrants()`. -* **Clients:** See [Docs](https://auth0.com/docs/api/management/v2#!/Clients/get_clients). Access the methods by calling `mgmt.clients()`. -* **Connections:** See [Docs](https://auth0.com/docs/api/management/v2#!/Connections/get_connections). Access the methods by calling `mgmt.connections()`. -* **Device Credentials:** See [Docs](https://auth0.com/docs/api/management/v2#!/Device_Credentials/get_device_credentials). Access the methods by calling `mgmt.deviceCredentials()`. -* **Logs:** See [Docs](https://auth0.com/docs/api/management/v2#!/Logs/get_logs). Access the methods by calling `mgmt.logEvents()`. -* **Rules:** See [Docs](https://auth0.com/docs/api/management/v2#!/Rules/get_rules). Access the methods by calling `mgmt.rules()`. -* **User Blocks:** See [Docs](https://auth0.com/docs/api/management/v2#!/User_Blocks/get_user_blocks). Access the methods by calling `mgmt.userBlocks()`. -* **Users:** See [Docs](https://auth0.com/docs/api/management/v2#!/Users/get_users). Access the methods by calling `mgmt.users()`. -* **Blacklists:** See [Docs](https://auth0.com/docs/api/management/v2#!/Blacklists/get_tokens). Access the methods by calling `mgmt.blacklists()`. -* **Emails:** See [Docs](https://auth0.com/docs/api/management/v2#!/Emails/get_provider). Access the methods by calling `mgmt.emailProvider()`. -* **Guardian:** See [Docs](https://auth0.com/docs/api/management/v2#!/Guardian/get_factors). Access the methods by calling `mgmt.guardian()`. -* **Stats:** See [Docs](https://auth0.com/docs/api/management/v2#!/Stats/get_active_users). Access the methods by calling `mgmt.stats()`. -* **Tenants:** See [Docs](https://auth0.com/docs/api/management/v2#!/Tenants/get_settings). Access the methods by calling `mgmt.tenants()`. -* **Tickets:** See [Docs](https://auth0.com/docs/api/management/v2#!/Tickets/post_email_verification). Access the methods by calling `mgmt.tickets()`. +\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff --git a/LICENSE b/LICENSE index 5e57a4f8a..5836564e0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Auth0, Inc. (http://auth0.com) +Copyright (c) 2016 Auth0, Inc. (http://auth0.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md deleted file mode 100644 index d6c7e9ac0..000000000 --- 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() - .email("test@example.com") - .connection("Username-Password-Authentication") - .password("secure-password") - .build(); -``` diff --git a/README.md b/README.md index 595814536..aeec30a68 100644 --- a/README.md +++ b/README.md @@ -1,133 +1,134 @@ -> **Note** -> As part of our ongoing commitment to best security practices, we have rotated the signing keys used to sign previous releases of this SDK. As a result, new patch builds have been released using the new signing key. Please upgrade at your earliest convenience. -> -> 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. +# Auth0 Java -![A Java client library for the Auth0 Authentication and Management APIs.](https://cdn.auth0.com/website/sdks/banners/auth0-java-banner.png) +[![Build][travis-ci-badge]][travis-ci-url] +[![MIT][mit-badge]][mit-url] +[![Maven][maven-badge]][maven-url] +[![JCenter][jcenter-badge]][jcenter-url] -![Build Status](https://img.shields.io/github/checks-status/auth0/auth0-java/master) -[![Coverage Status](https://codecov.io/gh/auth0/auth0-java/branch/master/graph/badge.svg?style=flat-square)](https://codecov.io/github/auth0/auth0-java) -[![License](http://img.shields.io/:license-mit-blue.svg?style=flat)](https://doge.mit-license.org/) -[![Maven Central](https://img.shields.io/maven-central/v/com.auth0/auth0.svg?style=flat-square)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.auth0%22%20AND%20a%3A%22auth0%22) -[![javadoc](https://javadoc.io/badge2/com.auth0/auth0/javadoc.svg)](https://javadoc.io/doc/com.auth0/auth0) -[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/auth0/auth0-java) +Java client library for the [Auth0](https://auth0.com) platform. -:books: [Documentation](#documentation) - :rocket: [Getting Started](#getting-started) - :computer: [API Reference](#api-reference) :speech_balloon: [Feedback](#feedback) +## Download -## Documentation -- [Examples](./EXAMPLES.md) - code samples for common auth0-java scenarios. -- [Migration Guide](./MIGRATION_GUIDE) - guidance for updating your application to use version 3 of auth0-java. -- [Docs site](https://www.auth0.com/docs) - explore our docs site and learn more about Auth0. - -## Getting Started - -### Requirements - -Java 8 or above. - -> `auth0-java` is intended for server-side JVM applications. Android applications should use the [Auth0.Android SDK](https://github.com/auth0/auth0.android). - -### Installation - -Add the dependency via Maven: +Get Auth0 Java via Maven: ```xml com.auth0 auth0 - 3.2.0 + 0.1.1 ``` or Gradle: ```gradle -implementation 'com.auth0:auth0:3.2.0' +compile 'com.auth0:auth0:0.1.1' ``` -### Configure the SDK +## Usage -#### Authentication API Client +First with your Auth0 account information -The Authentication API client is based on the [Auth0 Authentication API](https://auth0.com/docs/api/authentication). +```java +Auth0 auth0 = new Auth0("{YOUR_CLIENT_ID}", "{YOUR_DOMAIN}"); +``` -Create an `AuthAPI` instance by providing the Application details from the [dashboard](https://manage.auth0.com/#/applications). +and then ask `Auth0` object for the Authentication API Client ```java -AuthAPI auth = AuthAPI.newBuilder("{YOUR_DOMAIN}", "{YOUR_CLIENT_ID}", "{YOUR_CLIENT_SECRET}").build(); +AuthenticationAPIClient client = auth0.newAuthenticationAPIClient(); ``` -#### Management API Client +> Currently we only have a Authentication API Client, in future version we'll start adding Management API Client and methods. -The Management API client is based on the [Management API Docs](https://auth0.com/docs/api/management/v2). +### Android -Create a `ManagementAPI` instance by providing the domain from the [Application dashboard](https://manage.auth0.com/#/applications) and a valid API Token. +You need to add the following to your `build.gradle` file: -```java -ManagementAPI mgmt = ManagementAPI.newBuilder("{YOUR_DOMAIN}", "{YOUR_API_TOKEN}").build(); +``` gradle +android { + + // Other config of your application + + packagingOptions { + exclude 'META-INF/LICENSE' + exclude 'META-INF/NOTICE' + } +} ``` -OR +### Authentication API + +#### Making a request -Create a `ManagementAPI` instance by providing the domain from the [Application dashboard](https://manage.auth0.com/#/applications) and Token Provider. +Asynchronously ```java -TokenProvider tokenProvider = SimpleTokenProvider.create("{YOUR_API_TOKEN}"); -ManagementAPI mgmt = ManagementAPI.newBuilder("{YOUR_DOMAIN}", TokenProvider).build(); +Auth0 auth0 = new Auth0("{YOUR_CLIENT_ID}", "{YOUR_DOMAIN}"); +AuthenticationAPIClient client = auth0.newAuthenticationAPIClient(); + +client.login("{username or email}", "{password}") + .setConnection("{database connection name}") + .start(new BaseCallback() { + Override + public void onSuccess(Credentials payload) { } + + Override + public void onFailure(Auth0Exception error) { } + }); ``` -The Management API is organized by entities represented by the Auth0 Management API objects. +Synchronously ```java -User user = mgmt.users().get("auth0|user-id", new UserFilter()).execute().getBody(); -Role role = mgmt.roles().get("role-id").execute().getBody(); +Auth0 auth0 = new Auth0("{YOUR_CLIENT_ID}", "{YOUR_DOMAIN}"); +AuthenticationAPIClient client = auth0.newAuthenticationAPIClient(); + +Credentials credentials = client.login("{username or email}", "{password}") + .setConnection("{database connection name}") + .execute(); ``` -You can use the Authentication API to obtain a token for a previously authorized Application: +## Documentation -```java -AuthAPI authAPI = AuthAPI.newBuilder("{YOUR_DOMAIN}", "{YOUR_CLIENT_ID}", "{YOUR_CLIENT_SECRET}").build(); -TokenRequest tokenRequest = authAPI.requestToken("https://{YOUR_DOMAIN}/api/v2/"); -TokenHolder holder = tokenRequest.execute().getBody(); -String accessToken = holder.getAccessToken(); -ManagementAPI mgmt = ManagementAPI.newBuilder("{YOUR_DOMAIN}", accessToken).build(); -``` +For more information about [auth0](http://auth0.com) check our [documentation page](http://docs.auth0.com/). + +## What is Auth0? + +Auth0 helps you to: -An expired token for an existing `ManagementAPI` instance can be replaced by calling the `setApiToken` method with the new token. +* Add authentication with [multiple authentication sources](https://docs.auth0.com/identityproviders), either social like **Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce, amont others**, or enterprise identity systems like **Windows Azure AD, Google Apps, Active Directory, ADFS or any SAML Identity Provider**. +* Add authentication through more traditional **[username/password databases](https://docs.auth0.com/mysql-connection-tutorial)**. +* Add support for **[linking different user accounts](https://docs.auth0.com/link-accounts)** with the same user. +* Support for generating signed [Json Web Tokens](https://docs.auth0.com/jwt) to call your APIs and **flow the user identity** securely. +* Analytics of how, when and where users are logging in. +* Pull data from other sources and add it to the user profile, through [JavaScript rules](https://docs.auth0.com/rules). -See the [Auth0 Management API documentation](https://auth0.com/docs/api/management/v2/tokens) for more information on how to obtain API Tokens. +## Create a free Auth0 Account -## API Reference +1. Go to [Auth0](https://auth0.com) and click Sign Up. +2. Use Google, GitHub or Microsoft Account to login. -- [AuthAPI](https://javadoc.io/doc/com.auth0/auth0/latest/com/auth0/client/auth/AuthAPI.html) -- [ManagementAPI](https://javadoc.io/doc/com.auth0/auth0/latest/com/auth0/client/mgmt/ManagementAPI.html) +## Issue Reporting -## Feedback +If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues. -### Contributing +## Author -We appreciate feedback and contribution to this repo! Before you get started, please see the following: +[Auth0](auth0.com) -- [Auth0's general contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md) -- [Auth0's code of conduct guidelines](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md) +## License -### Raise an issue -To provide feedback or report a bug, [please raise an issue on our issue tracker](https://github.com/auth0/auth0-java/issues). +This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info. -### Vulnerability Reporting -Please do not report security vulnerabilities on the public Github issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues. ---- + -

- - - - Auth0 Logo - -

-

Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Auth0?

-

-This project is licensed under the MIT license. See the LICENSE file for more info.

+[travis-ci-badge]: https://travis-ci.org/auth0/auth0-java.svg?branch=master +[travis-ci-url]: https://travis-ci.org/auth0/auth0-java +[mit-badge]: http://img.shields.io/:license-mit-blue.svg?style=flat +[mit-url]: https://raw.githubusercontent.com/auth0/auth0-java/master/LICENSE +[maven-badge]: https://img.shields.io/maven-central/v/com.auth0/auth0.svg +[maven-url]: http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.auth0%22%20AND%20a%3A%22auth0%22 +[jcenter-badge]: https://api.bintray.com/packages/auth0/lock-android/auth0/images/download.svg +[jcenter-url]: https://bintray.com/auth0/lock-android/auth0/_latestVersion diff --git a/auth0/build.gradle b/auth0/build.gradle new file mode 100644 index 000000000..343b70816 --- /dev/null +++ b/auth0/build.gradle @@ -0,0 +1,87 @@ +apply plugin: 'java' + +compileJava { + sourceCompatibility "1.8" +} + +dependencies { + compile 'com.squareup.okhttp:okhttp:2.5.0' + compile 'com.fasterxml.jackson.core:jackson-databind:2.6.3' + compile 'com.fasterxml.jackson.core:jackson-core:2.6.3' + compile 'com.fasterxml.jackson.core:jackson-annotations:2.6.3' + + testCompile 'junit:junit:4.12' + testCompile 'org.hamcrest:hamcrest-integration:1.3' + testCompile 'org.hamcrest:hamcrest-core:1.3' + testCompile 'org.hamcrest:hamcrest-library:1.3' + testCompile 'org.mockito:mockito-core:1.10.19' + testCompile 'com.squareup.okhttp:mockwebserver:2.5.0' + testCompile 'com.jayway.awaitility:awaitility:1.6.4' +} + +def semver = defineVersion() +version = semver.stringVersion + +logger.lifecycle("Using version ${version} for ${name}") + + +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource +} + +//task javadocJar(type: Jar, dependsOn: javadoc) { +// classifier = 'javadoc' +// from javadoc.destinationDir +//} + +artifacts { + archives sourcesJar + //archives javadocJar +} + +apply from: '../maven.gradle' +apply from: '../bintray.gradle' + +def defineVersion() { + def current = describeGit(false) + def snapshot = current == null + if (snapshot) { + current = describeGit(snapshot, "0.0.1") + } + return new Semver(snapshot: snapshot, version: current) +} + +def describeGit(boolean snapshot, String defaultValue = null) { + def arguments = ['describe', '--tags'] + arguments.add(snapshot ? '--abbrev=0' : '--exact-match') + def stdout = new ByteArrayOutputStream() + def string = defaultValue + try { + def result = project.exec { + executable = 'git' + args = arguments + standardOutput = stdout + } + + result.assertNormalExitValue() + + if (stdout.toByteArray().length > 0) { + string = stdout.toString().replace("\n", "") + } + } catch(Exception e) { + logger.debug("Failed git describe command", e) + } finally { + stdout.close() + } + return string +} + +class Semver { + def version + def snapshot + + def getStringVersion() { + return snapshot ? version + "-SNAPSHOT" : version + } +} \ No newline at end of file diff --git a/auth0/src/main/java/com/auth0/APIException.java b/auth0/src/main/java/com/auth0/APIException.java new file mode 100644 index 000000000..da54242fb --- /dev/null +++ b/auth0/src/main/java/com/auth0/APIException.java @@ -0,0 +1,90 @@ +/* + * APIClientException.java + * + * Copyright (c) 2014 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0; + +import java.util.HashMap; +import java.util.Map; + +/** + * Internal exception raised when a request to the API fails + */ +public class APIException extends Auth0Exception { + + private int statusCode; + + private Map responseError; + + /** + * Creates a new instance of the exception + * @param detailMessage error message + * @param throwable the cause of the exception + */ + public APIException(String detailMessage, Throwable throwable) { + super(detailMessage, throwable); + this.statusCode = -1; + this.responseError = new HashMap<>(); + } + + /** + * Creates a new instance of the exception + * @param detailMessage error message + * @param statusCode status code returned by the server + * @param responseError payload of the error returned by the server + */ + public APIException(String detailMessage, int statusCode, Map responseError) { + super(detailMessage); + this.statusCode = statusCode; + this.responseError = responseError != null ? responseError : new HashMap(); + } + + /** + * Creates a new instance of the exception + * @param detailMessage error message + * @param throwable the cause of the exception + * @param statusCode status code returned by the server + * @param responseError payload of the error returned by the server + */ + public APIException(String detailMessage, Throwable throwable, int statusCode, Map responseError) { + super(detailMessage, throwable); + this.statusCode = statusCode; + this.responseError = responseError != null ? responseError : new HashMap(); + } + + /** + * Returns the server error response payload + * @return payload of the error response or null. + */ + public Map getResponseError() { + return responseError; + } + + /** + * Returns the status code returned by the server + * @return HTTP status code + */ + public int getStatusCode() { + return statusCode; + } +} diff --git a/auth0/src/main/java/com/auth0/Auth0.java b/auth0/src/main/java/com/auth0/Auth0.java new file mode 100644 index 000000000..67d89a5b3 --- /dev/null +++ b/auth0/src/main/java/com/auth0/Auth0.java @@ -0,0 +1,183 @@ +/* + * Auth0.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0; + +import com.auth0.authentication.AuthenticationAPIClient; +import com.auth0.util.Telemetry; +import com.squareup.okhttp.HttpUrl; + +/** + * Represents your Auth0 account information (clientId & domain), + * and it's used to obtain clients for Auth0's APIs. + *
{@code
+ * Auth0 auth0 = new Auth0("YOUR_CLIENT_ID", "YOUR_DOMAIN");
+ * }
+ */ +public class Auth0 { + + private static final String AUTH0_US_CDN_URL = "https://cdn.auth0.com"; + private static final String DOT_AUTH0_DOT_COM = ".auth0.com"; + + private final String clientId; + private final String clientSecret; + private final String domainUrl; + private final String configurationUrl; + private Telemetry telemetry; + + /** + * Creates a new object using clientId & domain + * + * @param clientId of your Auth0 application + * @param domain of your Auth0 account + */ + public Auth0(String clientId, String domain) { + this(clientId, null, domain, null); + } + + /** + * Creates a new object using clientId & domain + * + * @param clientId of your Auth0 application + * @param domain of your Auth0 account + */ + public Auth0(String clientId, String clientSecret, String domain) { + this(clientId, clientSecret, domain, null); + } + + /** + * Creates a new object using clientId, domain and configuration domain. + * Useful when using a on-premise auth0 server that is not in the public cloud, + * otherwise we recommend using the constructor {@link #Auth0(String, String)} + * + * @param clientId of your Auth0 application + * @param clientSecret of your Auth0 application. It can be null, specially if used for an Android application + * @param domain of your Auth0 account + * @param configurationDomain where Auth0's configuration will be fetched. By default is Auth0 public cloud + */ + public Auth0(String clientId, String clientSecret, String domain, String configurationDomain) { + this.clientId = clientId; + this.clientSecret = clientSecret; + this.domainUrl = ensureUrlString(domain); + this.configurationUrl = resolveConfiguration(configurationDomain, this.domainUrl); + this.telemetry = new Telemetry(BuildConfig.NAME, BuildConfig.VERSION); + } + + /** + * @return your Auth0 application client identifier + */ + public String getClientId() { + return clientId; + } + + /** + * @return your Auth0 account domain url + */ + public String getDomainUrl() { + return domainUrl; + } + + /** + * @return your Auth0 account client secret or null + */ + public String getClientSecret() { + return clientSecret; + } + + /** + * @return your account configuration url + */ + public String getConfigurationUrl() { + return configurationUrl; + } + + /** + * @return a new Authentication API client using your account credentials + */ + public AuthenticationAPIClient newAuthenticationAPIClient() { + return new AuthenticationAPIClient(this); + } + + /** + * @return Url to perform the web flow of OAuth + */ + public String getAuthorizeUrl() { + return HttpUrl.parse(domainUrl).newBuilder() + .addEncodedPathSegment("authorize") + .build() + .toString(); + } + + /** + * @return Auth0 telemetry info sent in every request + */ + public Telemetry getTelemetry() { + return telemetry; + } + + + /** + * Setter for the Telemetry to send in every request to Auth0. + * + * @param telemetry to send in every request to Auth0 + */ + public void setTelemetry(Telemetry telemetry) { + this.telemetry = telemetry; + } + + /** + * Avoid sending telemetry in every request to Auth0 + */ + public void doNotSendTelemetry() { + this.telemetry = null; + } + + private String resolveConfiguration(String configurationDomain, String domainUrl) { + String url = ensureUrlString(configurationDomain); + if (configurationDomain == null && domainUrl != null) { + final HttpUrl domainUri = HttpUrl.parse(domainUrl); + final String host = domainUri.host(); + if (host.endsWith(DOT_AUTH0_DOT_COM)) { + String[] parts = host.split("\\."); + if (parts.length > 3) { + url = "https://cdn." + parts[parts.length - 3] + DOT_AUTH0_DOT_COM; + } else { + url = AUTH0_US_CDN_URL; + } + } else { + url = domainUrl; + } + } + return url; + } + + private String ensureUrlString(String url) { + String safeUrl = null; + if (url != null) { + safeUrl = url.startsWith("http") ? url : "https://" + url; + } + return safeUrl; + } + +} diff --git a/auth0/src/main/java/com/auth0/Auth0Exception.java b/auth0/src/main/java/com/auth0/Auth0Exception.java new file mode 100644 index 000000000..61b2836f2 --- /dev/null +++ b/auth0/src/main/java/com/auth0/Auth0Exception.java @@ -0,0 +1,39 @@ +/* + * Auth0Exception.java + * + * Copyright (c) 2016 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0; + +/** + * Base Exception for any error found during a request to Auth0's API + */ +public class Auth0Exception extends RuntimeException { + + public Auth0Exception(String message, Throwable cause) { + super(message, cause); + } + + public Auth0Exception(String message) { + super(message); + } +} diff --git a/auth0/src/main/java/com/auth0/BuildConfig.java b/auth0/src/main/java/com/auth0/BuildConfig.java new file mode 100644 index 000000000..96b72ed2d --- /dev/null +++ b/auth0/src/main/java/com/auth0/BuildConfig.java @@ -0,0 +1,14 @@ +package com.auth0; + +public abstract class BuildConfig { + + /** + * Version of auth0-java + */ + public static final String VERSION = "0.3.0-SNAPSHOT"; + /** + * Name of the library auth0-java + */ + public static final String NAME = "auth0-java"; + +} diff --git a/auth0/src/main/java/com/auth0/RequestBodyBuildException.java b/auth0/src/main/java/com/auth0/RequestBodyBuildException.java new file mode 100644 index 000000000..2a8528b6d --- /dev/null +++ b/auth0/src/main/java/com/auth0/RequestBodyBuildException.java @@ -0,0 +1,38 @@ +/* + * RequestBodyBuildException.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0; + +import com.auth0.Auth0Exception; + +/** + * Exception that wraps errors when creating a body for a request + */ +public class RequestBodyBuildException extends Auth0Exception { + + public RequestBodyBuildException(String message, Throwable cause) { + super(message, cause); + } + +} diff --git a/auth0/src/main/java/com/auth0/authentication/AuthenticationAPIClient.java b/auth0/src/main/java/com/auth0/authentication/AuthenticationAPIClient.java new file mode 100644 index 000000000..00a95e349 --- /dev/null +++ b/auth0/src/main/java/com/auth0/authentication/AuthenticationAPIClient.java @@ -0,0 +1,711 @@ +/* + * AuthenticationAPIClient.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.authentication; + +import com.auth0.Auth0; +import com.auth0.authentication.result.Credentials; +import com.auth0.authentication.result.DatabaseUser; +import com.auth0.authentication.result.Delegation; +import com.auth0.authentication.result.UserProfile; +import com.auth0.request.AuthenticationRequest; +import com.auth0.request.ParameterizableRequest; +import com.auth0.request.Request; +import com.auth0.request.internal.RequestFactory; +import com.auth0.util.Telemetry; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.squareup.okhttp.HttpUrl; +import com.squareup.okhttp.OkHttpClient; + +import java.util.Map; + +import static com.auth0.authentication.ParameterBuilder.GRANT_TYPE_AUTHORIZATION_CODE; +import static com.auth0.authentication.ParameterBuilder.GRANT_TYPE_PASSWORD; + +/** + * API client for Auth0 Authentication API. + * + * @see Auth API docs + */ +public class AuthenticationAPIClient { + + private static final String DEFAULT_DB_CONNECTION = "Username-Password-Authentication"; + private static final String SMS_CONNECTION = "sms"; + private static final String EMAIL_CONNECTION = "email"; + private static final String USERNAME_KEY = "username"; + private static final String PASSWORD_KEY = "password"; + private static final String EMAIL_KEY = "email"; + private static final String PHONE_NUMBER_KEY = "phone_number"; + private static final String USER_ID_KEY = "user_id"; + private static final String CLIENT_ID_KEY = "clientID"; + private static final String DELEGATION_PATH = "delegation"; + private static final String ACCESS_TOKEN_PATH = "access_token"; + private static final String SIGN_UP_PATH = "signup"; + private static final String DB_CONNECTIONS_PATH = "dbconnections"; + private static final String CHANGE_PASSWORD_PATH = "change_password"; + private static final String UNLINK_PATH = "unlink"; + private static final String PASSWORDLESS_PATH = "passwordless"; + private static final String START_PATH = "start"; + private static final String OAUTH_PATH = "oauth"; + private static final String TOKEN_PATH = "token"; + private static final String RESOURCE_OWNER_PATH = "ro"; + private static final String TOKEN_INFO_PATH = "tokeninfo"; + private static final String OAUTH_CODE_KEY = "code"; + private static final String OAUTH_CODE_VERIFIER_KEY = "code_verifier"; + private static final String REDIRECT_URI_KEY = "redirect_uri"; + + private final Auth0 auth0; + private final OkHttpClient client; + private final ObjectMapper mapper; + private final RequestFactory factory; + + private String defaultDatabaseConnection = DEFAULT_DB_CONNECTION; + + /** + * Creates a new API client instance providing Auth0 account info. + * + * @param auth0 account information + */ + public AuthenticationAPIClient(Auth0 auth0) { + this(auth0, new OkHttpClient(), new ObjectMapper()); + } + + private AuthenticationAPIClient(Auth0 auth0, OkHttpClient client, ObjectMapper mapper) { + this.auth0 = auth0; + this.client = client; + this.mapper = mapper; + this.factory = new RequestFactory(); + final Telemetry telemetry = auth0.getTelemetry(); + if (telemetry != null) { + factory.setClientInfo(telemetry.getValue()); + } + } + + public String getClientId() { + return auth0.getClientId(); + } + + public String getBaseURL() { + return auth0.getDomainUrl(); + } + + /** + * Set the value of 'User-Agent' header for every request to Auth0 Authentication API + * + * @param userAgent value to send in every request to Auth0 + */ + public void setUserAgent(String userAgent) { + factory.setUserAgent(userAgent); + } + + /** + * Set the default Auth0 database connection name used. By default is 'Username-Password-Authentication' + * + * @param defaultDatabaseConnection name to use on every login with DB connection + */ + public void setDefaultDatabaseConnection(String defaultDatabaseConnection) { + this.defaultDatabaseConnection = defaultDatabaseConnection; + } + + /** + * Log in a user with email/username and password using a DB connection. + * Example usage: + *

+     * client.login("{username or email}", "{password}")
+     *      .setConnection("{database connection name}")
+     *      .start(new BaseCallback() {
+     *          {@literal}Override
+     *          public void onSuccess(Credentials payload) { }
+     *
+     *          {@literal}Override
+     *          public void onFailure(Auth0Exception error) { }
+     *      });
+     * 
+ * + * @param usernameOrEmail of the user depending of the type of DB connection + * @param password of the user + * @return a request to configure and start that will yield {@link Credentials} + */ + public AuthenticationRequest login(String usernameOrEmail, String password) { + Map requestParameters = ParameterBuilder.newAuthenticationBuilder() + .set(USERNAME_KEY, usernameOrEmail) + .set(PASSWORD_KEY, password) + .setGrantType(GRANT_TYPE_PASSWORD) + .asDictionary(); + return loginWithResourceOwner(requestParameters); + } + + /** + * Log in a user with a OAuth 'access_token' of a Identity Provider like Facebook or Twitter using '\oauth\access_token' endpoint + * Example usage: + *

+     * client.loginWithOAuthAccessToken("{token}", "{connection name}")
+     *      .setConnection("second-database")
+     *      .start(new BaseCallback() {
+     *          {@literal}Override
+     *          public void onSuccess(Credentials payload) { }
+     *
+     *          {@literal}Override
+     *          public void onFailure(Auth0Exception error) { }
+     *      });
+     * 
+ * + * @param token obtained from the IdP + * @param connection that will be used to authenticate the user, e.g. 'facebook' + * @return a request to configure and start that will yield {@link Credentials} + */ + public AuthenticationRequest loginWithOAuthAccessToken(String token, String connection) { + HttpUrl url = HttpUrl.parse(auth0.getDomainUrl()).newBuilder() + .addPathSegment(OAUTH_PATH) + .addPathSegment(ACCESS_TOKEN_PATH) + .build(); + + Map parameters = ParameterBuilder.newAuthenticationBuilder() + .setClientId(getClientId()) + .setConnection(connection) + .setAccessToken(token) + .asDictionary(); + + return factory.authenticationPOST(url, client, mapper) + .addAuthenticationParameters(parameters); + } + + /** + * Log in a user using a phone number and a verification code received via SMS (Part of passwordless login flow) + * Example usage: + *

+     * client.loginWithPhoneNumber("{phone number}", "{code}")
+     *      .start(new BaseCallback() {
+     *          {@literal}Override
+     *          public void onSuccess(Credentials payload) { }
+     *
+     *          {@literal}@Override
+     *          public void onFailure(Auth0Exception error) { }
+     *      });
+     * 
+ * + * @param phoneNumber where the user received the verification code + * @param verificationCode sent by Auth0 via SMS + * @return a request to configure and start that will yield {@link Credentials} + */ + public AuthenticationRequest loginWithPhoneNumber(String phoneNumber, String verificationCode) { + Map parameters = ParameterBuilder.newAuthenticationBuilder() + .set(USERNAME_KEY, phoneNumber) + .set(PASSWORD_KEY, verificationCode) + .setGrantType(GRANT_TYPE_PASSWORD) + .setClientId(getClientId()) + .setConnection(SMS_CONNECTION) + .asDictionary(); + return loginWithResourceOwner(parameters); + } + + /** + * Log in a user using an email and a verification code received via Email (Part of passwordless login flow) + * Example usage: + *

+     * client.loginWithEmail("{email}", "{code}")
+     *      .start(new BaseCallback() {
+     *          {@literal}Override
+     *          public void onSuccess(Credentials payload) { }
+     *
+     *          {@literal}@Override
+     *          public void onFailure(Auth0Exception error) { }
+     *      });
+     * 
+ * + * @param email where the user received the verification code + * @param verificationCode sent by Auth0 via Email + * @return a request to configure and start that will yield {@link Credentials} + */ + public AuthenticationRequest loginWithEmail(String email, String verificationCode) { + Map parameters = ParameterBuilder.newAuthenticationBuilder() + .set(USERNAME_KEY, email) + .set(PASSWORD_KEY, verificationCode) + .setGrantType(GRANT_TYPE_PASSWORD) + .setClientId(getClientId()) + .setConnection(EMAIL_CONNECTION) + .asDictionary(); + return loginWithResourceOwner(parameters); + } + + /** + * Fetch the token information from Auth0 + * Example usage: + *

+     * client.tokenInfo("{id_token}")
+     *      .start(new BaseCallback() {
+     *          {@literal}Override
+     *          public void onSuccess(UserProfile payload) { }
+     *
+     *          {@literal}@Override
+     *          public void onFailure(Auth0Exception error) { }
+     *      });
+     * 
+ * + * @param idToken used to fetch it's information + * @return a request to start + */ + public Request tokenInfo(String idToken) { + return profileRequest() + .addParameter(ParameterBuilder.ID_TOKEN_KEY, idToken); + } + + /** + * Creates a user in a DB connection using '/dbconnections/signup' endpoint + * Example usage: + *

+     * client.createUser("{email}", "{password}", "{username}")
+     *      .setConnection("{connection name}")
+     *      .start(new BaseCallback() {
+     *          {@literal}Override
+     *          public void onSuccess(DatabaseUser payload) { }
+     *
+     *          {@literal}@Override
+     *          public void onFailure(Auth0Exception error) { }
+     *      });
+     * 
+ * + * @param email of the user and must be non null + * @param password of the user and must be non null + * @param username of the user and must be non null + * @return a request to start + */ + public DatabaseConnectionRequest createUser(String email, String password, String username) { + HttpUrl url = HttpUrl.parse(auth0.getDomainUrl()).newBuilder() + .addPathSegment(DB_CONNECTIONS_PATH) + .addPathSegment(SIGN_UP_PATH) + .build(); + + Map parameters = ParameterBuilder.newBuilder() + .set(USERNAME_KEY, username) + .set(EMAIL_KEY, email) + .set(PASSWORD_KEY, password) + .setConnection(defaultDatabaseConnection) + .setClientId(getClientId()) + .asDictionary(); + final ParameterizableRequest request = factory.POST(url, client, mapper, DatabaseUser.class) + .addParameters(parameters); + return new DatabaseConnectionRequest<>(request); + } + + /** + * Creates a user in a DB connection using '/dbconnections/signup' endpoint + * Example usage: + *

+     * client.createUser("{email}", "{password}")
+     *      .setConnection("{connection name}")
+     *      .start(new BaseCallback() {
+     *          {@literal}Override
+     *          public void onSuccess(DatabaseUser payload) { }
+     *
+     *          {@literal}@Override
+     *          public void onFailure(Auth0Exception error) { }
+     *      });
+     * 
+ * + * @param email of the user and must be non null + * @param password of the user and must be non null + * @return a request to start + */ + public DatabaseConnectionRequest createUser(String email, String password) { + return createUser(email, password, null); + } + + /** + * Creates a user in a DB connection using '/dbconnections/signup' endpoint + * and then logs in + * Example usage: + *

+     * client.signUp("{email}", "{password}", "{username}")
+     *      .setConnection("{connection name}")
+     *      .start(new BaseCallback() {
+     *          {@literal}Override
+     *          public void onSuccess(Credentials payload) {}
+     *
+     *          {@literal}Override
+     *          public void onFailure(Auth0Exception error) {}
+     *      });
+     * 
+ * + * @param email of the user and must be non null + * @param password of the user and must be non null + * @param username of the user and must be non null + * @return a request to configure and start that will yield {@link Credentials} + */ + public SignUpRequest signUp(String email, String password, String username) { + final DatabaseConnectionRequest createUserRequest = createUser(email, password, username); + final AuthenticationRequest authenticationRequest = login(email, password); + return new SignUpRequest(createUserRequest, authenticationRequest); + } + + /** + * Creates a user in a DB connection using '/dbconnections/signup' endpoint + * and then logs in + * Example usage: + *

+     * client.signUp("{email}", "{password}")
+     *      .setConnection("{connection name}")
+     *      .start(new BaseCallback() {
+     *          {@literal}Override
+     *          public void onSuccess(Credentials payload) {}
+     *
+     *          {@literal}Override
+     *          public void onFailure(Auth0Exception error) {}
+     *      });
+     * 
+ * + * @param email of the user and must be non null + * @param password of the user and must be non null + * @return a request to configure and start that will yield {@link Credentials} + */ + public SignUpRequest signUp(String email, String password) { + DatabaseConnectionRequest createUserRequest = createUser(email, password); + final AuthenticationRequest authenticationRequest = login(email, password); + return new SignUpRequest(createUserRequest, authenticationRequest); + } + + /** + * Request a change password using '/dbconnections/change_password' + * Example usage: + *

+     * client.requestChangePassword("{email}")
+     *      .start(new BaseCallback() {
+     *          {@literal}Override
+     *          public void onSuccess(Void payload) {}
+     *
+     *          {@literal}Override
+     *          public void onFailure(Auth0Exception error) {}
+     *      });
+     * 
+ * + * @param email of the user that changes the password. It's also where the email will be sent with the link to perform the change password. + * @return a request to configure and start + */ + public DatabaseConnectionRequest requestChangePassword(String email) { + HttpUrl url = HttpUrl.parse(auth0.getDomainUrl()).newBuilder() + .addPathSegment(DB_CONNECTIONS_PATH) + .addPathSegment(CHANGE_PASSWORD_PATH) + .build(); + + final Map parameters = ParameterBuilder.newBuilder() + .set(EMAIL_KEY, email) + .setClientId(getClientId()) + .setConnection(defaultDatabaseConnection) + .asDictionary(); + final ParameterizableRequest request = factory.POST(url, client, mapper) + .addParameters(parameters); + return new DatabaseConnectionRequest<>(request); + } + + /** + * Performs a delegation request that will yield a new Auth0 'id_token' + * Example usage: + *

+     * client.delegationWithIdToken("{id token}")
+     *      .start(new BaseCallback() {
+     *          {@literal}Override
+     *          public void onSuccess(Delegation payload) {}
+     *
+     *          {@literal}Override
+     *          public void onFailure(Auth0Exception error) {}
+     *      });
+     * 
+ * + * @param idToken issued by Auth0 for the user. The token must not be expired. + * @return a request to configure and start + */ + public DelegationRequest delegationWithIdToken(String idToken) { + ParameterizableRequest request = delegation(Delegation.class) + .addParameter(ParameterBuilder.ID_TOKEN_KEY, idToken); + + return new DelegationRequest<>(request) + .setApiType(DelegationRequest.DEFAULT_API_TYPE); + } + + /** + * Performs a delegation request that will yield a new Auth0 'id_token'. + * Check our refresh token docs for more information + * Example usage: + *

+     * client.delegationWithRefreshToken("{refresh token}")
+     *      .start(new BaseCallback() {
+     *          {@literal}Override
+     *          public void onSuccess(Delegation payload) {}
+     *
+     *          {@literal}Override
+     *          public void onFailure(Auth0Exception error) {}
+     *      });
+     * 
+ * + * @param refreshToken issued by Auth0 for the user when using the 'offline_access' scope when logging in. + * @return a request to configure and start + */ + public DelegationRequest delegationWithRefreshToken(String refreshToken) { + ParameterizableRequest request = delegation(Delegation.class) + .addParameter(ParameterBuilder.REFRESH_TOKEN_KEY, refreshToken); + + return new DelegationRequest<>(request) + .setApiType(DelegationRequest.DEFAULT_API_TYPE); + } + + /** + * Performs a delegation request that will yield a delegation token. + * Example usage: + *

+     * client.delegationWithIdToken("{id token}", "{app type, e.g. firebase}")
+     *      .start(new BaseCallback>() {
+     *          {@literal}Override
+     *          public void onSuccess(Map payload) {}
+     *
+     *          {@literal}Override
+     *          public void onFailure(Auth0Exception error) {}
+     *      });
+     * 
+ * + * @param idToken issued by Auth0 for the user. The token must not be expired. + * @param apiType the delegation 'api_type' parameter + * @return a request to configure and start + */ + public DelegationRequest> delegationWithIdToken(String idToken, String apiType) { + ParameterizableRequest> request = delegation() + .addParameter(ParameterBuilder.ID_TOKEN_KEY, idToken); + + return new DelegationRequest<>(request) + .setApiType(apiType); + } + + /** + * Unlink a user identity calling '/unlink' endpoint + * Example usage: + *

+     * client.unlink("{auth0 user id}", "{user access token}")
+     *      .start(new BaseCallback() {
+     *          {@literal}Override
+     *          public void onSuccess(Void payload) {}
+     *
+     *          {@literal}Override
+     *          public void onFailure(Auth0Exception error) {}
+     *      });
+     * 
+ * + * @param userId of the identity to unlink + * @param accessToken of the main identity obtained after login + * @return a request to start + */ + public Request unlink(String userId, String accessToken) { + HttpUrl url = HttpUrl.parse(auth0.getDomainUrl()).newBuilder() + .addPathSegment(UNLINK_PATH) + .build(); + + final Map parameters = ParameterBuilder.newBuilder() + .setAccessToken(accessToken) + .set(CLIENT_ID_KEY, getClientId()) + .set(USER_ID_KEY, userId) + .asDictionary(); + + return factory.POST(url, client, mapper) + .addParameters(parameters); + } + + /** + * Start a passwordless flow with Email + * Example usage: + *

+     * client.passwordlessWithEmail("{email}", PasswordlessType.CODE)
+     *      .start(new BaseCallback() {
+     *          {@literal}Override
+     *          public void onSuccess(Void payload) {}
+     *
+     *          {@literal}Override
+     *          public void onFailure(Auth0Exception error) {}
+     *      });
+     * 
+ * + * @param email that will receive a verification code to use for login + * @param passwordlessType indicate whether the email should contain a code, link or magic link (android & iOS) + * @return a request to configure and start + */ + public ParameterizableRequest passwordlessWithEmail(String email, PasswordlessType passwordlessType) { + final Map parameters = ParameterBuilder.newBuilder() + .set(EMAIL_KEY, email) + .setSend(passwordlessType) + .setConnection(EMAIL_CONNECTION) + .asDictionary(); + + return passwordless() + .addParameters(parameters); + } + + /** + * Start a passwordless flow with SMS + * Example usage: + *

+     * client.passwordlessWithSms("{phone number}", PasswordlessType.CODE)
+     *      .start(new BaseCallback() {
+     *          {@literal}Override
+     *          public void onSuccess(Void payload) {}
+     *
+     *          {@literal}Override
+     *          public void onFailure(Auth0Exception error) {}
+     *      });
+     * 
+ * + * @param phoneNumber where an SMS with a verification code will be sent + * @param passwordlessType indicate whether the SMS should contain a code, link or magic link (android & iOS) + * @return a request to configure and start + */ + public ParameterizableRequest passwordlessWithSMS(String phoneNumber, PasswordlessType passwordlessType) { + final Map parameters = ParameterBuilder.newBuilder() + .set(PHONE_NUMBER_KEY, phoneNumber) + .setSend(passwordlessType) + .setConnection(SMS_CONNECTION) + .asDictionary(); + return passwordless() + .addParameters(parameters); + } + + /** + * Performs a custom delegation request that will + * yield a delegation token. + * Example usage: + *

+     * client.delegation()
+     *      .addParameter("api_type", "firebase")
+     *      .start(new BaseCallback>() {
+     *          {@literal}Override
+     *          public void onSuccess(Map payload) {}
+     *
+     *          {@literal}Override
+     *          public void onFailure(Auth0Exception error) {}
+     *      });
+     * 
+ * + * @return a request to configure and start + */ + public ParameterizableRequest> delegation() { + HttpUrl url = HttpUrl.parse(auth0.getDomainUrl()).newBuilder() + .addPathSegment(DELEGATION_PATH) + .build(); + + final Map parameters = ParameterBuilder.newBuilder() + .setClientId(getClientId()) + .setGrantType(ParameterBuilder.GRANT_TYPE_JWT) + .asDictionary(); + return factory.rawPOST(url, client, mapper) + .addParameters(parameters); + } + + protected ParameterizableRequest delegation(Class clazz) { + HttpUrl url = HttpUrl.parse(auth0.getDomainUrl()).newBuilder() + .addPathSegment(DELEGATION_PATH) + .build(); + + final Map parameters = ParameterBuilder.newBuilder() + .setClientId(getClientId()) + .setGrantType(ParameterBuilder.GRANT_TYPE_JWT) + .asDictionary(); + + return factory.POST(url, client, mapper, clazz) + .addParameters(parameters); + } + + /** + * Start a custom passwordless flow + * + * @return a request to configure and start + */ + public ParameterizableRequest passwordless() { + HttpUrl url = HttpUrl.parse(auth0.getDomainUrl()).newBuilder() + .addPathSegment(PASSWORDLESS_PATH) + .addPathSegment(START_PATH) + .build(); + + final Map parameters = ParameterBuilder.newBuilder() + .setClientId(getClientId()) + .asDictionary(); + return factory.POST(url, client, mapper) + .addParameters(parameters); + } + + /** + * Fetch the user's profile after it's authenticated by a login request. + * If the login request fails, the returned request will fail + * + * @param authenticationRequest that will authenticate a user with Auth0 and return a {@link Credentials} + * @return a {@link ProfileRequest} that first logins and the fetches the profile + */ + public ProfileRequest getProfileAfter(AuthenticationRequest authenticationRequest) { + final ParameterizableRequest profileRequest = profileRequest(); + return new ProfileRequest(authenticationRequest, profileRequest); + } + + private AuthenticationRequest loginWithResourceOwner(Map parameters) { + HttpUrl url = HttpUrl.parse(auth0.getDomainUrl()).newBuilder() + .addPathSegment(OAUTH_PATH) + .addPathSegment(RESOURCE_OWNER_PATH) + .build(); + + final Map requestParameters = ParameterBuilder.newBuilder() + .setClientId(getClientId()) + .setConnection(defaultDatabaseConnection) + .addAll(parameters) + .asDictionary(); + return factory.authenticationPOST(url, client, mapper) + .addAuthenticationParameters(requestParameters); + } + + private ParameterizableRequest profileRequest() { + HttpUrl url = HttpUrl.parse(auth0.getDomainUrl()).newBuilder() + .addPathSegment(TOKEN_INFO_PATH) + .build(); + + return factory.POST(url, client, mapper, UserProfile.class); + } + + /** + * Fetch the token information from Auth0, using the authorization_code grant type + * + * @param authorizationCode the authorization code received from the /authorize call. + * @param codeVerifier the code verifier used when requesting a code to /authorize. + * @param redirectUri the uri to redirect after a successful request. + * @return a request to configure and start + */ + public AuthenticationRequest token(String authorizationCode, String codeVerifier, String redirectUri) { + Map parameters = ParameterBuilder.newBuilder() + .setClientId(getClientId()) + .setGrantType(GRANT_TYPE_AUTHORIZATION_CODE) + .set(OAUTH_CODE_KEY, authorizationCode) + .set(OAUTH_CODE_VERIFIER_KEY, codeVerifier) + .set(REDIRECT_URI_KEY, redirectUri) + .asDictionary(); + + HttpUrl url = HttpUrl.parse(auth0.getDomainUrl()).newBuilder() + .addPathSegment(OAUTH_PATH) + .addPathSegment(TOKEN_PATH) + .build(); + + return factory.authenticationPOST(url, client, mapper) + .addAuthenticationParameters(parameters); + } +} diff --git a/auth0/src/main/java/com/auth0/authentication/DatabaseConnectionRequest.java b/auth0/src/main/java/com/auth0/authentication/DatabaseConnectionRequest.java new file mode 100644 index 000000000..79d8257d0 --- /dev/null +++ b/auth0/src/main/java/com/auth0/authentication/DatabaseConnectionRequest.java @@ -0,0 +1,79 @@ +package com.auth0.authentication; + +import com.auth0.Auth0Exception; +import com.auth0.callback.BaseCallback; +import com.auth0.request.ParameterizableRequest; + +import java.util.Map; + +/** + * Request to perform a non-authentication related action + * like creating a user or requesting a change password + */ +public class DatabaseConnectionRequest { + + private final ParameterizableRequest request; + + public DatabaseConnectionRequest(ParameterizableRequest request) { + this.request = request; + } + + /** + * Add the given parameters to the request + * @param parameters to be sent with the request + * @return itself + */ + public DatabaseConnectionRequest addParameters(Map parameters) { + request.addParameters(parameters); + return this; + } + + /** + * Add a parameter by name to the request + * @param name of the parameter + * @param value of the parameter + * @return itself + */ + public DatabaseConnectionRequest addParameter(String name, Object value) { + request.addParameter(name, value); + return this; + } + + /** + * Add a header for the request, e.g. "Authorization" + * @param name of the header + * @param value of the header + * @return itself + */ + public DatabaseConnectionRequest addHeader(String name, String value) { + request.addHeader(name, value); + return this; + } + + /** + * Set the Auth0 Database Connection used for this request using its name. + * @param connection name + * @return itself + */ + public DatabaseConnectionRequest setConnection(String connection) { + request.addParameter(ParameterBuilder.CONNECTION_KEY, connection); + return this; + } + + /** + * Executes the request async and returns its results via callback + * @param callback called on success or failure of the request + */ + public void start(BaseCallback callback) { + request.start(callback); + } + + /** + * Executes the request synchronously + * @return the request result + * @throws Auth0Exception if the request failed + */ + public T execute() throws Auth0Exception { + return request.execute(); + } +} diff --git a/auth0/src/main/java/com/auth0/authentication/DelegationRequest.java b/auth0/src/main/java/com/auth0/authentication/DelegationRequest.java new file mode 100644 index 000000000..0154ab6af --- /dev/null +++ b/auth0/src/main/java/com/auth0/authentication/DelegationRequest.java @@ -0,0 +1,120 @@ +/* + * DelegationRequest.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.authentication; + +import com.auth0.Auth0Exception; +import com.auth0.authentication.result.Delegation; +import com.auth0.callback.BaseCallback; +import com.auth0.request.ParameterizableRequest; +import com.auth0.request.Request; + +import java.util.Map; + +/** + * Represents a delegation request for Auth0 tokens that will yield a new delegation token. + * The delegation response depends on the 'api_type' parameter. + * + * @param type of object that will hold the delegation response. When requesting Auth0’s 'id_token' you can + * use {@link Delegation}, otherwise you’ll need to provide an object that can be created from the JSON + * payload or just use {@code Map} + */ +public class DelegationRequest implements Request { + + private static final String API_TYPE_KEY = "api_type"; + public static final String DEFAULT_API_TYPE = "app"; + + private static final String TARGET_KEY = "target"; + + private final ParameterizableRequest request; + + DelegationRequest(ParameterizableRequest request) { + this.request = request; + } + + /** + * Add additional parameters to be sent in the request + * + * @param parameters as a non-null dictionary + * @return itself + */ + public DelegationRequest addParameters(Map parameters) { + request.addParameters(parameters); + return this; + } + + /** + * Set the 'api_type' parameter to be sent in the request + * + * @param apiType the delegation api type + * @return itself + */ + public DelegationRequest setApiType(String apiType) { + request.addParameter(API_TYPE_KEY, apiType); + return this; + } + + /** + * Set the 'scope' used to make the delegation + * + * @param scope value + * @return itself + */ + public DelegationRequest setScope(String scope) { + request.addParameter(ParameterBuilder.SCOPE_KEY, scope); + return this; + } + + /** + * Set the 'target' parameter to be sent in the request + * + * @param target the delegation target + * @return itself + */ + public DelegationRequest setTarget(String target) { + request.addParameter(TARGET_KEY, target); + return this; + } + + /** + * Starts the delegation request against Auth0 API + * + * @param callback called either on success or failure + */ + @Override + public void start(final BaseCallback callback) { + request.start(callback); + } + + /** + * Executes the delegation request against Auth0 API + * + * @return the delegation response on success + * @throws Auth0Exception when the delegation request fails + */ + @Override + public T execute() throws Auth0Exception { + return request.execute(); + } +} diff --git a/auth0/src/main/java/com/auth0/authentication/ParameterBuilder.java b/auth0/src/main/java/com/auth0/authentication/ParameterBuilder.java new file mode 100644 index 000000000..8204cb048 --- /dev/null +++ b/auth0/src/main/java/com/auth0/authentication/ParameterBuilder.java @@ -0,0 +1,218 @@ +/* + * ParameterBuilder.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.authentication; + +import com.auth0.util.CheckHelper; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +/** + * Builder for Auth0 Authentication API parameters + *

+ * You can build your parameters like this + *


+ *     Map parameters = ParameterBuilder.newBuilder()
+ *                                                      .setClientId("{CLIENT_ID}")
+ *                                                      .setConnection("{CONNECTION}")
+ *                                                      .set("{PARAMETER_NAME}", "{PARAMETER_VALUE}")
+ *                                                      .asDictionary();
+ * 
+ * + * @see ParameterBuilder#newBuilder() + * @see ParameterBuilder#newAuthenticationBuilder() + */ +public class ParameterBuilder { + + public static final String GRANT_TYPE_PASSWORD = "password"; + public static final String GRANT_TYPE_JWT = "urn:ietf:params:oauth:grant-type:jwt-bearer"; + public static final String GRANT_TYPE_AUTHORIZATION_CODE = "authorization_code"; + + public static final String SCOPE_OPENID = "openid"; + public static final String SCOPE_OFFLINE_ACCESS = "openid offline_access"; + + public static final String ID_TOKEN_KEY = "id_token"; + public static final String SCOPE_KEY = "scope"; + public static final String REFRESH_TOKEN_KEY = "refresh_token"; + public static final String CONNECTION_KEY = "connection"; + public static final String ACCESS_TOKEN_KEY = "access_token"; + public static final String SEND_KEY = "send"; + public static final String CLIENT_ID_KEY = "client_id"; + public static final String GRANT_TYPE_KEY = "grant_type"; + public static final String DEVICE_KEY = "device"; + + private Map parameters; + + private ParameterBuilder(Map parameters) { + CheckHelper.checkArgument(parameters != null, "Must provide non-null parameters"); + this.parameters = new HashMap<>(parameters); + } + + /** + * Sets the 'client_id' parameter + * + * @param clientId clientID + * @return itself + */ + public ParameterBuilder setClientId(String clientId) { + return set(CLIENT_ID_KEY, clientId); + } + + /** + * Sets the 'grant_type' parameter + * + * @param grantType grant type + * @return itself + */ + public ParameterBuilder setGrantType(String grantType) { + return set(GRANT_TYPE_KEY, grantType); + } + + /** + * Sets the 'connection' parameter + * + * @param connection name of the connection + * @return itself + */ + public ParameterBuilder setConnection(String connection) { + return set(CONNECTION_KEY, connection); + } + + /** + * Sets the 'scope' parameter. + * + * @param scope a scope value + * @return itself + */ + public ParameterBuilder setScope(String scope) { + return set(SCOPE_KEY, scope); + } + + /** + * Sets the 'device' parameter + * + * @param device a device name + * @return itself + */ + public ParameterBuilder setDevice(String device) { + return set(DEVICE_KEY, device); + } + + /** + * Sets the 'access_token' parameter + * + * @param accessToken a access token + * @return itself + */ + public ParameterBuilder setAccessToken(String accessToken) { + return set(ACCESS_TOKEN_KEY, accessToken); + } + + /** + * Sets the 'send' parameter + * + * @param passwordlessType the type of passwordless login + * @return itself + */ + public ParameterBuilder setSend(PasswordlessType passwordlessType) { + return set(SEND_KEY, passwordlessType.getValue()); + } + + /** + * Sets a parameter + * + * @param key parameter name + * @param value parameter value + * @return itself + */ + public ParameterBuilder set(String key, Object value) { + this.parameters.put(key, value); + return this; + } + + /** + * Adds all parameter from a map + * + * @param parameters map with parameters to add + * @return itself + */ + public ParameterBuilder addAll(Map parameters) { + if (parameters != null) { + this.parameters.putAll(parameters); + } + return this; + } + + /** + * Clears all existing parameters + * + * @return itself + */ + public ParameterBuilder clearAll() { + parameters.clear(); + return this; + } + + /** + * Create a {@link Map} with all the parameters + * + * @return all parameters added previously as a {@link Map} + */ + public Map asDictionary() { + return Collections.unmodifiableMap(new HashMap<>(this.parameters)); + } + + /** + * Creates a new instance of the builder using default values for login request, e.g. 'openid' for scope. + * + * @return a new builder + */ + public static ParameterBuilder newAuthenticationBuilder() { + return newBuilder() + .setScope(SCOPE_OPENID); + } + + /** + * Creates a new instance of the builder. + * This builder wont have any default values + * + * @return a new builder + */ + public static ParameterBuilder newBuilder() { + return newBuilder(new HashMap()); + } + + /** + * Creates a new instance of the builder from some initial parameters. + * + * @param parameters initial parameters + * @return a new builder + */ + public static ParameterBuilder newBuilder(Map parameters) { + return new ParameterBuilder(parameters); + } + +} diff --git a/auth0/src/main/java/com/auth0/authentication/PasswordlessType.java b/auth0/src/main/java/com/auth0/authentication/PasswordlessType.java new file mode 100644 index 000000000..eaf57560f --- /dev/null +++ b/auth0/src/main/java/com/auth0/authentication/PasswordlessType.java @@ -0,0 +1,52 @@ +/* + * PasswordlessType.java + * + * Copyright (c) 2016 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.authentication; + +/** + * Valid types of passwordless flows in Auth0 + */ +public enum PasswordlessType { + /** + * Sends a link used to login + */ + LINK_WEB, + LINK_ANDROID, + LINK_IOS, + CODE; + + public String getValue() { + switch (this) { + default: + case CODE: + return "code"; + case LINK_WEB: + return "link"; + case LINK_ANDROID: + return "link_android"; + case LINK_IOS: + return "link_ios"; + } + } +} diff --git a/auth0/src/main/java/com/auth0/authentication/ProfileRequest.java b/auth0/src/main/java/com/auth0/authentication/ProfileRequest.java new file mode 100644 index 000000000..e3a6c3c67 --- /dev/null +++ b/auth0/src/main/java/com/auth0/authentication/ProfileRequest.java @@ -0,0 +1,132 @@ +/* + * AuthenticationRequest.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.authentication; + +import com.auth0.Auth0Exception; +import com.auth0.authentication.result.Authentication; +import com.auth0.authentication.result.Credentials; +import com.auth0.authentication.result.UserProfile; +import com.auth0.callback.BaseCallback; +import com.auth0.request.AuthenticationRequest; +import com.auth0.request.ParameterizableRequest; +import com.auth0.request.Request; + +import java.util.Map; + +/** + * Request to fetch a profile after a successful authentication with Auth0 Authentication API + */ +public class ProfileRequest implements Request { + + private static final String ID_TOKEN_KEY = "id_token"; + + private final AuthenticationRequest credentialsRequest; + private final ParameterizableRequest tokenInfoRequest; + + ProfileRequest(AuthenticationRequest credentialsRequest, ParameterizableRequest tokenInfoRequest) { + this.credentialsRequest = credentialsRequest; + this.tokenInfoRequest = tokenInfoRequest; + } + + /** + * Adds additional parameters for the login request + * + * @param parameters as a non-null dictionary + * @return itself + */ + public ProfileRequest addParameters(Map parameters) { + credentialsRequest.addAuthenticationParameters(parameters); + return this; + } + + /** + * Set the scope used to authenticate the user + * + * @param scope value + * @return itself + */ + public ProfileRequest setScope(String scope) { + credentialsRequest.setScope(scope); + return this; + } + + /** + * Set the connection used to authenticate + * + * @param connection name + * @return itself + */ + public ProfileRequest setConnection(String connection) { + credentialsRequest.setConnection(connection); + return this; + } + + /** + * Starts the log in request and then fetches the user's profile + * + * @param callback called on either success or failure + */ + @Override + public void start(final BaseCallback callback) { + credentialsRequest.start(new BaseCallback() { + @Override + public void onSuccess(final Credentials credentials) { + tokenInfoRequest + .addParameter(ID_TOKEN_KEY, credentials.getIdToken()) + .start(new BaseCallback() { + @Override + public void onSuccess(UserProfile profile) { + callback.onSuccess(new Authentication(profile, credentials)); + } + + @Override + public void onFailure(Auth0Exception error) { + callback.onFailure(error); + } + }); + } + + @Override + public void onFailure(Auth0Exception error) { + callback.onFailure(error); + } + }); + } + + /** + * Logs in the user with Auth0 and fetches it's profile. + * + * @return authentication object containing the user's tokens and profile + * @throws Auth0Exception when either authentication or profile fetch fails + */ + @Override + public Authentication execute() throws Auth0Exception { + Credentials credentials = credentialsRequest.execute(); + UserProfile profile = tokenInfoRequest + .addParameter(ID_TOKEN_KEY, credentials.getIdToken()) + .execute(); + return new Authentication(profile, credentials); + } +} diff --git a/auth0/src/main/java/com/auth0/authentication/SignUpRequest.java b/auth0/src/main/java/com/auth0/authentication/SignUpRequest.java new file mode 100644 index 000000000..6ada3864b --- /dev/null +++ b/auth0/src/main/java/com/auth0/authentication/SignUpRequest.java @@ -0,0 +1,138 @@ +/* + * SignUpRequest.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.authentication; + +import com.auth0.Auth0Exception; +import com.auth0.authentication.result.Credentials; +import com.auth0.authentication.result.DatabaseUser; +import com.auth0.callback.BaseCallback; +import com.auth0.request.AuthenticationRequest; +import com.auth0.request.Request; + +import java.util.Map; + +/** + * Represent a request that creates a user in a Auth0 Database connection and then logs in. + */ +public class SignUpRequest implements Request, AuthenticationRequest { + + private final DatabaseConnectionRequest signUpRequest; + private final AuthenticationRequest authenticationRequest; + + SignUpRequest(DatabaseConnectionRequest signUpRequest, AuthenticationRequest authenticationRequest) { + this.signUpRequest = signUpRequest; + this.authenticationRequest = authenticationRequest; + } + + /** + * Add additional parameters sent when creating a using. + * @param parameters sent with the request and must be non-null + * @return itself + */ + public SignUpRequest addSignUpParameters(Map parameters) { + signUpRequest.addParameters(parameters); + return this; + } + + /** + * Add additional parameters sent when logging the user in + * @param parameters sent with the request and must be non-null + * @return itself + * @see ParameterBuilder + */ + public SignUpRequest addAuthenticationParameters(Map parameters) { + authenticationRequest.addAuthenticationParameters(parameters); + return this; + } + + /** + * Set the scope used to login the user + * @param scope value + * @return itself + */ + public SignUpRequest setScope(String scope) { + authenticationRequest.setScope(scope); + return this; + } + + @Override + public AuthenticationRequest setDevice(String device) { + authenticationRequest.setDevice(device); + return this; + } + + @Override + public AuthenticationRequest setAccessToken(String accessToken) { + authenticationRequest.setAccessToken(accessToken); + return this; + } + + @Override + public AuthenticationRequest setGrantType(String grantType) { + authenticationRequest.setGrantType(grantType); + return this; + } + + /** + * Set the connection used to authenticate + * @param connection name + * @return itself + */ + public SignUpRequest setConnection(String connection) { + signUpRequest.setConnection(connection); + authenticationRequest.setConnection(connection); + return this; + } + + /** + * Starts to execute create user request and then logs the user in. + * @param callback called on either success or failure. + */ + @Override + public void start(final BaseCallback callback) { + signUpRequest.start(new BaseCallback() { + @Override + public void onSuccess(final DatabaseUser user) { + authenticationRequest.start(callback); + } + + @Override + public void onFailure(Auth0Exception error) { + callback.onFailure(error); + } + }); + } + + /** + * Execute the create user request and then logs the user in. + * @return authentication object on success + * @throws Auth0Exception on failure + */ + @Override + public Credentials execute() throws Auth0Exception { + signUpRequest.execute(); + return authenticationRequest.execute(); + } +} diff --git a/auth0/src/main/java/com/auth0/authentication/result/Authentication.java b/auth0/src/main/java/com/auth0/authentication/result/Authentication.java new file mode 100644 index 000000000..ee54a5363 --- /dev/null +++ b/auth0/src/main/java/com/auth0/authentication/result/Authentication.java @@ -0,0 +1,56 @@ +/* + * Authentication.java + * + * Copyright (c) 2016 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.authentication.result; + + +import com.auth0.request.AuthenticationRequest; + +import static com.auth0.util.CheckHelper.checkArgument; + +/** + * The result of a successful authentication against Auth0 + * Contains the logged in user's {@link Credentials} and {@link UserProfile}. + * @see com.auth0.authentication.AuthenticationAPIClient#getProfileAfter(AuthenticationRequest) + */ +public class Authentication { + + private final UserProfile profile; + private final Credentials credentials; + + public Authentication(UserProfile profile, Credentials credentials) { + checkArgument(profile != null, "profile must be non-null"); + checkArgument(credentials != null, "credentials must be non-null"); + this.profile = profile; + this.credentials = credentials; + } + + public UserProfile getProfile() { + return profile; + } + + public Credentials getCredentials() { + return credentials; + } +} diff --git a/auth0/src/main/java/com/auth0/authentication/result/Credentials.java b/auth0/src/main/java/com/auth0/authentication/result/Credentials.java new file mode 100644 index 000000000..b3584e53a --- /dev/null +++ b/auth0/src/main/java/com/auth0/authentication/result/Credentials.java @@ -0,0 +1,80 @@ +/* + * Token.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.authentication.result; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Holds the user's credentials returned by Auth0. + *
    + *
  • idToken: Identity Token with user information
  • + *
  • accessToken: Access Token for Auth0 API
  • + *
  • refreshToken: Refresh Token that can be used to request new tokens without signing in again
  • + *
+ */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class Credentials { + + protected String idToken; + protected String accessToken; + protected String type; + protected String refreshToken; + + protected Credentials(Credentials credentials) { + idToken = credentials.idToken; + accessToken = credentials.accessToken; + type = credentials.type; + refreshToken = credentials.refreshToken; + } + + protected Credentials() { } + + public Credentials(@JsonProperty(value = "id_token", required = true) String idToken, + @JsonProperty(value = "access_token") String accessToken, + @JsonProperty(value = "token_type") String type, + @JsonProperty(value = "refresh_token") String refreshToken) { + this.idToken = idToken; + this.accessToken = accessToken; + this.type = type; + this.refreshToken = refreshToken; + } + + public String getIdToken() { + return idToken; + } + + public String getAccessToken() { + return accessToken; + } + + public String getType() { + return type; + } + + public String getRefreshToken() { + return refreshToken; + } +} diff --git a/auth0/src/main/java/com/auth0/authentication/result/DatabaseUser.java b/auth0/src/main/java/com/auth0/authentication/result/DatabaseUser.java new file mode 100644 index 000000000..ad1fe1bcf --- /dev/null +++ b/auth0/src/main/java/com/auth0/authentication/result/DatabaseUser.java @@ -0,0 +1,62 @@ +/* + * DatabaseUser.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.authentication.result; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Auth0 user created in a Database connection. + * + * @see com.auth0.authentication.AuthenticationAPIClient#signUp(String, String) + * @see com.auth0.authentication.AuthenticationAPIClient#signUp(String, String, String) + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class DatabaseUser { + + private final String email; + private final String username; + private final boolean emailVerified; + + public DatabaseUser(@JsonProperty(value = "email", required = true) String email, + @JsonProperty("username") String username, + @JsonProperty("email_verified") boolean emailVerified) { + this.email = email; + this.username = username; + this.emailVerified = emailVerified; + } + + public String getEmail() { + return email; + } + + public String getUsername() { + return username; + } + + public boolean isEmailVerified() { + return emailVerified; + } +} diff --git a/auth0/src/main/java/com/auth0/authentication/result/Delegation.java b/auth0/src/main/java/com/auth0/authentication/result/Delegation.java new file mode 100644 index 000000000..feb06bdf8 --- /dev/null +++ b/auth0/src/main/java/com/auth0/authentication/result/Delegation.java @@ -0,0 +1,78 @@ +/* + * Delegation.java + * + * Copyright (c) 2016 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.authentication.result; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +import static com.auth0.util.CheckHelper.checkArgument; + +/** + * The result of a successful delegation to an Auth0 application that contains a new Auth0 'id_token' + * See delegation docs + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class Delegation { + private final String idToken; + private final String type; + private final Long expiresIn; + + @JsonCreator + public Delegation(@JsonProperty(value = "id_token") String idToken, + @JsonProperty(value = "token_type") String type, + @JsonProperty(value = "expires_in") Long expiresIn) { + checkArgument(idToken != null, "id_token must be non-null"); + checkArgument(type != null, "token_type must be non-null"); + checkArgument(expiresIn != null, "expires_in must be non-null"); + this.idToken = idToken; + this.type = type; + this.expiresIn = expiresIn; + } + + /** + * Identity Token + * @return the 'id_token' value + */ + public String getIdToken() { + return idToken; + } + + /** + * Token type + * @return the 'token_type' value + */ + public String getType() { + return type; + } + + /** + * Token expire time in milliseconds since January 1, 1970, 00:00:00 GMT + * @return the 'expires_in' value + */ + public Long getExpiresIn() { + return expiresIn; + } +} diff --git a/auth0/src/main/java/com/auth0/authentication/result/UserIdentity.java b/auth0/src/main/java/com/auth0/authentication/result/UserIdentity.java new file mode 100644 index 000000000..1a2a1c172 --- /dev/null +++ b/auth0/src/main/java/com/auth0/authentication/result/UserIdentity.java @@ -0,0 +1,120 @@ +/* + * UserIdentity.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.authentication.result; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.Map; + +/** + * Class that holds the information from a Identity Provider like Facebook or Twitter. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class UserIdentity { + + private static final String USER_ID_KEY = "user_id"; + private static final String CONNECTION_KEY = "connection"; + private static final String PROVIDER_KEY = "provider"; + private static final String IS_SOCIAL_KEY = "isSocial"; + private static final String ACCESS_TOKEN_KEY = "access_token"; + private static final String ACCESS_TOKEN_SECRET_KEY = "access_token_secret"; + private static final String PROFILE_DATA_KEY = "profileData"; + protected String id; + protected String connection; + protected String provider; + protected boolean social; + protected String accessToken; + protected String accessTokenSecret; + protected Map profileInfo; + + protected UserIdentity() { + + } + + @SuppressWarnings("unchecked") + public UserIdentity(Map values) { + final Object idValue = values.get(USER_ID_KEY); + if (idValue != null) { + this.id = idValue.toString(); + } + this.connection = (String) values.get(CONNECTION_KEY); + this.provider = (String) values.get(PROVIDER_KEY); + this.social = (boolean) values.get(IS_SOCIAL_KEY); + this.accessToken = (String) values.get(ACCESS_TOKEN_KEY); + this.accessTokenSecret = (String) values.get(ACCESS_TOKEN_SECRET_KEY); + this.profileInfo = (Map) values.get(PROFILE_DATA_KEY); + } + + @JsonCreator + public UserIdentity(@JsonProperty(value = USER_ID_KEY) String id, + @JsonProperty(value = CONNECTION_KEY) String connection, + @JsonProperty(value = PROVIDER_KEY) String provider, + @JsonProperty(value = IS_SOCIAL_KEY) boolean social, + @JsonProperty(value = ACCESS_TOKEN_KEY) String accessToken, + @JsonProperty(value = ACCESS_TOKEN_SECRET_KEY) String accessTokenSecret, + @JsonProperty(value = PROFILE_DATA_KEY) Map profileInfo) { + this.id = id; + this.connection = connection; + this.provider = provider; + this.social = social; + this.accessToken = accessToken; + this.accessTokenSecret = accessTokenSecret; + this.profileInfo = profileInfo; + } + + public String getId() { + return id; + } + + public String getConnection() { + return connection; + } + + public String getProvider() { + return provider; + } + + public boolean isSocial() { + return social; + } + + public String getAccessToken() { + return accessToken; + } + + public String getAccessTokenSecret() { + return accessTokenSecret; + } + + public Map getProfileInfo() { + return profileInfo; + } + + public String getUserIdentityId() { + return String.format("%s|%s", this.provider, this.id); + } +} diff --git a/auth0/src/main/java/com/auth0/authentication/result/UserProfile.java b/auth0/src/main/java/com/auth0/authentication/result/UserProfile.java new file mode 100644 index 000000000..e12484408 --- /dev/null +++ b/auth0/src/main/java/com/auth0/authentication/result/UserProfile.java @@ -0,0 +1,145 @@ +/* + * UserProfile.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.authentication.result; + +import com.auth0.util.CheckHelper; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import java.io.Serializable; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.TimeZone; + +/** + * Class that holds the information of a user's profile in Auth0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class UserProfile implements Serializable { + protected String id; + protected String name; + protected String nickname; + protected String email; + protected String pictureURL; + protected Date createdAt; + protected Map extraInfo; + protected List identities; + + protected UserProfile(UserProfile userProfile) { + id = userProfile.id; + name = userProfile.name; + nickname = userProfile.nickname; + email = userProfile.email; + pictureURL = userProfile.pictureURL; + createdAt = userProfile.createdAt; + extraInfo = userProfile.extraInfo; + identities = userProfile.identities; + } + + protected UserProfile() { } + + @JsonCreator + @SuppressWarnings("unchecked") + public UserProfile(Map values) { + CheckHelper.checkArgument(values != null, "must supply non-null values"); + HashMap info = new HashMap(values); + String id = (String) info.remove("user_id"); + CheckHelper.checkArgument(id != null, "profile must have a user id"); + this.id = id; + this.name = (String) info.remove("name"); + this.nickname = (String) info.remove("nickname"); + this.email = (String) info.remove("email"); + this.pictureURL = (String) info.remove("picture"); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); + sdf.setTimeZone(TimeZone.getTimeZone("UTC")); + try { + String created_at = (String) info.remove("created_at"); + this.createdAt = created_at != null ? sdf.parse(created_at) : null; + } catch (ParseException e) { + throw new IllegalArgumentException("Invalid created_at value", e); + } + this.identities = buildIdentities((List>) info.remove("identities")); + this.extraInfo = info; + } + + public String getId() { + return id; + } + + public String getName() { + return name; + } + + public String getNickname() { + return nickname; + } + + public String getEmail() { + return email; + } + + public String getPictureURL() { + return pictureURL; + } + + public Date getCreatedAt() { + return createdAt; + } + + /** + * Returns extra information of the profile that is not part of the normalized profile + * + * @return a map with user's extra information found in the profile + */ + public Map getExtraInfo() { + return new HashMap<>(extraInfo); + } + + /** + * List of the identities from a Identity Provider associated to the user. + * + * @return a list of identity provider information. + */ + public List getIdentities() { + return identities; + } + + private List buildIdentities(List> values) { + if (values == null) { + return Collections.emptyList(); + } + List identities = new ArrayList<>(values.size()); + for (Map value : values) { + identities.add(new UserIdentity(value)); + } + return identities; + } +} diff --git a/auth0/src/main/java/com/auth0/callback/BaseCallback.java b/auth0/src/main/java/com/auth0/callback/BaseCallback.java new file mode 100644 index 000000000..f40851275 --- /dev/null +++ b/auth0/src/main/java/com/auth0/callback/BaseCallback.java @@ -0,0 +1,38 @@ +/* + * BaseCallback.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.callback; + +/** + * Callback that receives a single value on success. + */ +public interface BaseCallback extends Callback { + + /** + * Method called on success with the payload or null. + * @param payload Request payload or null + */ + void onSuccess(T payload); + +} diff --git a/auth0/src/main/java/com/auth0/callback/Callback.java b/auth0/src/main/java/com/auth0/callback/Callback.java new file mode 100644 index 000000000..ad7992edc --- /dev/null +++ b/auth0/src/main/java/com/auth0/callback/Callback.java @@ -0,0 +1,40 @@ +/* + * Callback.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.callback; + +import com.auth0.Auth0Exception; + +/** + * Interface for all callbacks used with Auth0 API clients + */ +public interface Callback { + + /** + * Method called on Auth0 API request failure + * @param error Auth0Exception with the reason of the failure + */ + void onFailure(Auth0Exception error); + +} diff --git a/auth0/src/main/java/com/auth0/request/AuthenticationRequest.java b/auth0/src/main/java/com/auth0/request/AuthenticationRequest.java new file mode 100644 index 000000000..8bab1f4a3 --- /dev/null +++ b/auth0/src/main/java/com/auth0/request/AuthenticationRequest.java @@ -0,0 +1,59 @@ +package com.auth0.request; + +import com.auth0.authentication.result.Credentials; + +import java.util.Map; + +/** + * Request to authenticate a user with Auth0 Authentication API + */ +public interface AuthenticationRequest extends Request { + + /** + * Sets the 'grant_type' parameter + * + * @param grantType grant type + * @return itself + */ + AuthenticationRequest setGrantType(String grantType); + + /** + * Sets the 'connection' parameter + * + * @param connection name of the connection + * @return itself + */ + AuthenticationRequest setConnection(String connection); + + /** + * Sets the 'scope' parameter. + * + * @param scope a scope value + * @return itself + */ + AuthenticationRequest setScope(String scope); + + /** + * Sets the 'device' parameter + * + * @param device a device name + * @return itself + */ + AuthenticationRequest setDevice(String device); + + /** + * Sets the 'access_token' parameter + * + * @param accessToken a access token + * @return itself + */ + AuthenticationRequest setAccessToken(String accessToken); + + /** + * All all entries of the map as parameters of this request + * @param parameters to be added to the request + * @return itself + */ + AuthenticationRequest addAuthenticationParameters(Map parameters); + +} diff --git a/auth0/src/main/java/com/auth0/request/AuthorizableRequest.java b/auth0/src/main/java/com/auth0/request/AuthorizableRequest.java new file mode 100644 index 000000000..5e07da622 --- /dev/null +++ b/auth0/src/main/java/com/auth0/request/AuthorizableRequest.java @@ -0,0 +1,40 @@ +/* + * AuthorizableRequest.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.request; + +/** + * Interface for a Auth0 request that need Authorization using a JWT + * @param + */ +public interface AuthorizableRequest extends ParameterizableRequest { + + /** + * Set the JWT used in 'Authorization' header value + * @param jwt token to send to the API + * @return itself + */ + AuthorizableRequest setBearer(String jwt); + +} diff --git a/auth0/src/main/java/com/auth0/request/ParameterizableRequest.java b/auth0/src/main/java/com/auth0/request/ParameterizableRequest.java new file mode 100644 index 000000000..8aa3dab4a --- /dev/null +++ b/auth0/src/main/java/com/auth0/request/ParameterizableRequest.java @@ -0,0 +1,60 @@ +/* + * ParameterizableRequest.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.request; + +import java.util.Map; + +/** + * Defines a request that can be configured (payload and headers) + * + * @param + */ +public interface ParameterizableRequest extends Request { + + /** + * Add parameters to the request as a Map of Object with the keys as String + * @param parameters to send with the request + * @return itself + */ + ParameterizableRequest addParameters(Map parameters); + + /** + * Add parameter to the request with a given name + * @param name of the parameter + * @param value of the parameter + * @return itself + */ + ParameterizableRequest addParameter(String name, Object value); + + /** + * Adds an additional header for the request + * + * @param name of the header + * @param value of the header + * @return itself + */ + ParameterizableRequest addHeader(String name, String value); + +} diff --git a/auth0/src/main/java/com/auth0/request/Request.java b/auth0/src/main/java/com/auth0/request/Request.java new file mode 100644 index 000000000..d1f2fcdea --- /dev/null +++ b/auth0/src/main/java/com/auth0/request/Request.java @@ -0,0 +1,48 @@ +/* + * Request.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.request; + +import com.auth0.Auth0Exception; +import com.auth0.callback.BaseCallback; + +/** + * Defines a request that can be started + * @param + */ +public interface Request { + + /** + * Performs an async HTTP request against Auth0 API + * @param callback called either on success or failure + */ + void start(BaseCallback callback); + + /** + * Executes the HTTP request against Auth0 API (blocking the current thread) + * @return the response on success + * @throws Auth0Exception on failure + */ + T execute() throws Auth0Exception; +} diff --git a/auth0/src/main/java/com/auth0/request/internal/BaseAuthenticationRequest.java b/auth0/src/main/java/com/auth0/request/internal/BaseAuthenticationRequest.java new file mode 100644 index 000000000..34e9501dd --- /dev/null +++ b/auth0/src/main/java/com/auth0/request/internal/BaseAuthenticationRequest.java @@ -0,0 +1,85 @@ +package com.auth0.request.internal; + +import com.auth0.authentication.result.Credentials; +import com.auth0.request.AuthenticationRequest; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.squareup.okhttp.HttpUrl; +import com.squareup.okhttp.OkHttpClient; + +import java.util.Map; + +import static com.auth0.authentication.ParameterBuilder.ACCESS_TOKEN_KEY; +import static com.auth0.authentication.ParameterBuilder.CONNECTION_KEY; +import static com.auth0.authentication.ParameterBuilder.DEVICE_KEY; +import static com.auth0.authentication.ParameterBuilder.GRANT_TYPE_KEY; +import static com.auth0.authentication.ParameterBuilder.SCOPE_KEY; + +class BaseAuthenticationRequest extends SimpleRequest implements AuthenticationRequest { + + public BaseAuthenticationRequest(HttpUrl url, OkHttpClient client, ObjectMapper mapper, String httpMethod, Class clazz) { + super(url, client, mapper, httpMethod, clazz); + } + + /** + * Sets the 'grant_type' parameter + * + * @param grantType grant type + * @return itself + */ + @Override + public AuthenticationRequest setGrantType(String grantType) { + addParameter(GRANT_TYPE_KEY, grantType); + return this; + } + + /** + * Sets the 'connection' parameter + * + * @param connection name of the connection + * @return itself + */ + @Override + public AuthenticationRequest setConnection(String connection) { + addParameter(CONNECTION_KEY, connection); + return this; + } + + /** + * Sets the 'scope' parameter. + * + * @param scope a scope value + * @return itself + */ + public AuthenticationRequest setScope(String scope) { + addParameter(SCOPE_KEY, scope); + return this; + } + + /** + * Sets the 'device' parameter + * + * @param device a device name + * @return itself + */ + public AuthenticationRequest setDevice(String device) { + addParameter(DEVICE_KEY, device); + return this; + } + + /** + * Sets the 'access_token' parameter + * + * @param accessToken a access token + * @return itself + */ + public AuthenticationRequest setAccessToken(String accessToken) { + addParameter(ACCESS_TOKEN_KEY, accessToken); + return this; + } + + @Override + public AuthenticationRequest addAuthenticationParameters(Map parameters) { + addParameters(parameters); + return this; + } +} diff --git a/auth0/src/main/java/com/auth0/request/internal/BaseRequest.java b/auth0/src/main/java/com/auth0/request/internal/BaseRequest.java new file mode 100644 index 000000000..5cfe181ea --- /dev/null +++ b/auth0/src/main/java/com/auth0/request/internal/BaseRequest.java @@ -0,0 +1,155 @@ +/* + * BaseRequest.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.request.internal; + +import com.auth0.APIException; +import com.auth0.Auth0Exception; +import com.auth0.RequestBodyBuildException; +import com.auth0.authentication.ParameterBuilder; +import com.auth0.callback.BaseCallback; +import com.auth0.request.AuthorizableRequest; +import com.auth0.request.ParameterizableRequest; +import com.fasterxml.jackson.databind.ObjectReader; +import com.fasterxml.jackson.databind.ObjectWriter; +import com.squareup.okhttp.Callback; +import com.squareup.okhttp.HttpUrl; +import com.squareup.okhttp.OkHttpClient; +import com.squareup.okhttp.Request; +import com.squareup.okhttp.RequestBody; +import com.squareup.okhttp.Response; + +import java.io.IOException; +import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; + +abstract class BaseRequest implements ParameterizableRequest, AuthorizableRequest, Callback { + + private final Map headers; + protected final HttpUrl url; + protected final OkHttpClient client; + private final ObjectReader reader; + private final ObjectReader errorReader; + private final ObjectWriter writer; + private final ParameterBuilder builder; + + private BaseCallback callback; + + protected BaseRequest(HttpUrl url, OkHttpClient client, ObjectReader reader, ObjectReader errorReader, ObjectWriter writer) { + this(url, client, reader, errorReader, writer, null); + } + + public BaseRequest(HttpUrl url, OkHttpClient client, ObjectReader reader, ObjectReader errorReader, ObjectWriter writer, BaseCallback callback) { + this.url = url; + this.client = client; + this.reader = reader; + this.errorReader = errorReader; + this.writer = writer; + this.callback = callback; + this.headers = new HashMap<>(); + this.builder = ParameterBuilder.newBuilder(); + } + + protected void setCallback(BaseCallback callback) { + this.callback = callback; + } + + protected void postOnSuccess(final T payload) { + this.callback.onSuccess(payload); + } + + protected final void postOnFailure(final Auth0Exception error) { + this.callback.onFailure(error); + } + + protected Request.Builder newBuilder() { + final Request.Builder builder = new Request.Builder() + .url(url); + for (Map.Entry entry : headers.entrySet()) { + builder.addHeader(entry.getKey(), entry.getValue()); + } + return builder; + } + + protected ObjectReader getReader() { + return reader; + } + + protected RequestBody buildBody() throws RequestBodyBuildException { + return JsonRequestBodyBuilder.createBody(builder.asDictionary(), writer); + } + + protected APIException parseUnsuccessfulResponse(Response response) { + try { + final InputStream byteStream = response.body().byteStream(); + Map payload = errorReader.readValue(byteStream); + return new APIException("Request to " + url + " failed with response " + payload, response.code(), payload); + } catch (Exception e) { + return new APIException("Request to " + url + " failed", response.code(), null); + } + } + + @Override + public void onFailure(Request request, IOException e) { + postOnFailure(new Auth0Exception("Failed to execute request to " + url.toString(), e)); + } + + @Override + public ParameterizableRequest addHeader(String name, String value) { + headers.put(name, value); + return this; + } + + @Override + public AuthorizableRequest setBearer(String jwt) { + addHeader("Authorization", "Bearer " + jwt); + return this; + } + + @Override + public ParameterizableRequest addParameters(Map parameters) { + builder.addAll(parameters); + return this; + } + + @Override + public ParameterizableRequest addParameter(String name, Object value) { + builder.set(name, value); + return this; + } + + @Override + public void start(BaseCallback callback) { + setCallback(callback); + try { + Request request = doBuildRequest(newBuilder()); + client.newCall(request).enqueue(this); + } catch (RequestBodyBuildException e) { + callback.onFailure(e); + } + } + + protected abstract Request doBuildRequest(Request.Builder builder) throws RequestBodyBuildException; +} diff --git a/auth0/src/main/java/com/auth0/request/internal/JsonRequestBodyBuilder.java b/auth0/src/main/java/com/auth0/request/internal/JsonRequestBodyBuilder.java new file mode 100644 index 000000000..9a9a96088 --- /dev/null +++ b/auth0/src/main/java/com/auth0/request/internal/JsonRequestBodyBuilder.java @@ -0,0 +1,47 @@ +/* + * JsonRequestBodyBuilder.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.request.internal; + +import com.auth0.RequestBodyBuildException; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectWriter; +import com.squareup.okhttp.MediaType; +import com.squareup.okhttp.RequestBody; + +/** + * Converts a POJO to JSON stored in a {@link RequestBody} + */ +abstract class JsonRequestBodyBuilder { + + private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8"); + + public static RequestBody createBody(Object pojo, ObjectWriter writer) throws RequestBodyBuildException { + try { + return RequestBody.create(JSON, writer.writeValueAsBytes(pojo)); + } catch (JsonProcessingException e) { + throw new RequestBodyBuildException("Failed to convert " + pojo.getClass().getName() + " to JSON", e); + } + } +} diff --git a/auth0/src/main/java/com/auth0/request/internal/RequestFactory.java b/auth0/src/main/java/com/auth0/request/internal/RequestFactory.java new file mode 100644 index 000000000..291a409d9 --- /dev/null +++ b/auth0/src/main/java/com/auth0/request/internal/RequestFactory.java @@ -0,0 +1,114 @@ +/* + * RequestFactory.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.request.internal; + +import com.auth0.authentication.result.Credentials; +import com.auth0.request.AuthenticationRequest; +import com.auth0.request.AuthorizableRequest; +import com.auth0.request.ParameterizableRequest; +import com.auth0.util.Telemetry; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.squareup.okhttp.HttpUrl; +import com.squareup.okhttp.OkHttpClient; + +import java.util.Map; + +public class RequestFactory { + + private String clientInfo; + private String userAgent; + + public void setClientInfo(String clientInfo) { + this.clientInfo = clientInfo; + } + + public void setUserAgent(String userAgent) { + this.userAgent = userAgent; + } + + public ParameterizableRequest GET(HttpUrl url, OkHttpClient client, ObjectMapper mapper, Class clazz) { + final SimpleRequest request = new SimpleRequest<>(url, client, mapper, "GET", clazz); + addMetrics(request); + return request; + } + + public AuthenticationRequest authenticationPOST(HttpUrl url, OkHttpClient client, ObjectMapper mapper) { + final BaseAuthenticationRequest request = new BaseAuthenticationRequest(url, client, mapper, "POST", Credentials.class); + addMetrics(request); + return request; + } + + public ParameterizableRequest POST(HttpUrl url, OkHttpClient client, ObjectMapper mapper, Class clazz) { + final SimpleRequest request = new SimpleRequest<>(url, client, mapper, "POST", clazz); + addMetrics(request); + return request; + } + + public ParameterizableRequest> rawPOST(HttpUrl url, OkHttpClient client, ObjectMapper mapper) { + final SimpleRequest> request = new SimpleRequest<>(url, client, mapper, "POST"); + addMetrics(request); + return request; + } + + public ParameterizableRequest POST(HttpUrl url, OkHttpClient client, ObjectMapper mapper) { + final VoidRequest request = new VoidRequest(url, client, mapper, "POST"); + addMetrics(request); + return request; + } + + public ParameterizableRequest POST(HttpUrl url, OkHttpClient client, ObjectMapper mapper, String jwt) { + final AuthorizableRequest request = new VoidRequest(url, client, mapper, "POST") + .setBearer(jwt); + addMetrics(request); + return request; + } + + public ParameterizableRequest PUT(HttpUrl url, OkHttpClient client, ObjectMapper mapper, Class clazz) { + final SimpleRequest request = new SimpleRequest<>(url, client, mapper, "PUT", clazz); + addMetrics(request); + return request; + } + + public ParameterizableRequest PATCH(HttpUrl url, OkHttpClient client, ObjectMapper mapper, Class clazz) { + final SimpleRequest request = new SimpleRequest<>(url, client, mapper, "GET", clazz); + addMetrics(request); + return request; + } + + public ParameterizableRequest DELETE(HttpUrl url, OkHttpClient client, ObjectMapper mapper, Class clazz) { + final SimpleRequest request = new SimpleRequest<>(url, client, mapper, "DELETE", clazz); + addMetrics(request); + return request; + } + + private void addMetrics(ParameterizableRequest request) { + if (this.clientInfo != null) { + request.addHeader(Telemetry.HEADER_NAME, this.clientInfo); + } + if (this.userAgent!= null) { + request.addHeader("User-Agent", this.userAgent); + } + } +} diff --git a/auth0/src/main/java/com/auth0/request/internal/SimpleRequest.java b/auth0/src/main/java/com/auth0/request/internal/SimpleRequest.java new file mode 100644 index 000000000..0f432eae5 --- /dev/null +++ b/auth0/src/main/java/com/auth0/request/internal/SimpleRequest.java @@ -0,0 +1,105 @@ +/* + * SimpleRequest.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.request.internal; + +import com.auth0.Auth0Exception; +import com.auth0.APIException; +import com.auth0.request.ParameterizableRequest; +import com.auth0.RequestBodyBuildException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.squareup.okhttp.Callback; +import com.squareup.okhttp.HttpUrl; +import com.squareup.okhttp.OkHttpClient; +import com.squareup.okhttp.Request; +import com.squareup.okhttp.RequestBody; +import com.squareup.okhttp.Response; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Map; + +class SimpleRequest extends BaseRequest implements ParameterizableRequest, Callback { + + private final String method; + + public SimpleRequest(HttpUrl url, OkHttpClient client, ObjectMapper mapper, String httpMethod, Class clazz) { + super(url, client, mapper.reader(clazz), mapper.reader(new TypeReference>() {}), mapper.writer()); + this.method = httpMethod; + } + + public SimpleRequest(HttpUrl url, OkHttpClient client, ObjectMapper mapper, String httpMethod) { + super(url, client, mapper.reader(new TypeReference>() {}), mapper.reader(new TypeReference>() {}), mapper.writer()); + this.method = httpMethod; + } + + @Override + public void onResponse(Response response) throws IOException { + if (!response.isSuccessful()) { + APIException exception = parseUnsuccessfulResponse(response); + postOnFailure(exception); + return; + } + + try { + final InputStream byteStream = response.body().byteStream(); + T payload = getReader().readValue(byteStream); + postOnSuccess(payload); + } catch (IOException e) { + postOnFailure(new Auth0Exception("Failed to parse response to request to " + url, e)); + } + } + + @Override + protected Request doBuildRequest(Request.Builder builder) throws RequestBodyBuildException { + RequestBody body = buildBody(); + return newBuilder() + .method(method, body) + .build(); + } + + @Override + public T execute() throws Auth0Exception { + Request request = doBuildRequest(newBuilder()); + + Response response; + try { + response = client.newCall(request).execute(); + } catch (IOException e) { + throw new Auth0Exception("Failed to execute request to " + url, e); + } + + if (!response.isSuccessful()) { + throw parseUnsuccessfulResponse(response); + } + + try { + final InputStream byteStream = response.body().byteStream(); + return getReader().readValue(byteStream); + } catch (IOException e) { + throw new Auth0Exception("Failed to parse response to request to " + url, e); + } + } +} diff --git a/auth0/src/main/java/com/auth0/request/internal/VoidRequest.java b/auth0/src/main/java/com/auth0/request/internal/VoidRequest.java new file mode 100644 index 000000000..a23d88b03 --- /dev/null +++ b/auth0/src/main/java/com/auth0/request/internal/VoidRequest.java @@ -0,0 +1,85 @@ +/* + * VoidRequest.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.request.internal; + +import com.auth0.Auth0Exception; +import com.auth0.APIException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.squareup.okhttp.Callback; +import com.squareup.okhttp.HttpUrl; +import com.squareup.okhttp.OkHttpClient; +import com.squareup.okhttp.Request; +import com.squareup.okhttp.RequestBody; +import com.squareup.okhttp.Response; + +import java.io.IOException; +import java.util.Map; + +class VoidRequest extends BaseRequest implements Callback { + + private final String httpMethod; + + public VoidRequest(HttpUrl url, OkHttpClient client, ObjectMapper mapper, String httpMethod) { + super(url, client, null, mapper.reader(new TypeReference>() {}), mapper.writer()); + this.httpMethod = httpMethod; + } + + @Override + public void onResponse(Response response) throws IOException { + if (!response.isSuccessful()) { + APIException exception = parseUnsuccessfulResponse(response); + postOnFailure(exception); + return; + } + + postOnSuccess(null); + } + + @Override + protected Request doBuildRequest(Request.Builder builder) { + RequestBody body = buildBody(); + return newBuilder() + .method(httpMethod, body) + .build(); + } + + @Override + public Void execute() throws Auth0Exception { + Request request = doBuildRequest(newBuilder()); + + Response response; + try { + response = client.newCall(request).execute(); + } catch (IOException e) { + throw new Auth0Exception("Failed to execute request to " + url.toString(), e); + } + + if (!response.isSuccessful()) { + throw parseUnsuccessfulResponse(response); + } + return null; + } +} diff --git a/auth0/src/main/java/com/auth0/util/Base64.java b/auth0/src/main/java/com/auth0/util/Base64.java new file mode 100644 index 000000000..89435a508 --- /dev/null +++ b/auth0/src/main/java/com/auth0/util/Base64.java @@ -0,0 +1,47 @@ +package com.auth0.util; + +import java.io.UnsupportedEncodingException; +import java.nio.charset.Charset; + +public class Base64 { + + private static final byte[] ENCODE_MAP = new byte[] { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', + 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', + '5', '6', '7', '8', '9', '-', '_' + }; + + public static String encodeUrlSafe(String string) { + byte[] in = string.getBytes(Charset.defaultCharset()); + int length = (in.length + 2) * 4 / 3; + byte[] out = new byte[length]; + int index = 0, end = in.length - in.length % 3; + for (int i = 0; i < end; i += 3) { + out[index++] = ENCODE_MAP[(in[i] & 0xff) >> 2]; + out[index++] = ENCODE_MAP[((in[i] & 0x03) << 4) | ((in[i + 1] & 0xff) >> 4)]; + out[index++] = ENCODE_MAP[((in[i + 1] & 0x0f) << 2) | ((in[i + 2] & 0xff) >> 6)]; + out[index++] = ENCODE_MAP[(in[i + 2] & 0x3f)]; + } + switch (in.length % 3) { + case 1: + out[index++] = ENCODE_MAP[(in[end] & 0xff) >> 2]; + out[index++] = ENCODE_MAP[(in[end] & 0x03) << 4]; + out[index++] = '='; + out[index++] = '='; + break; + case 2: + out[index++] = ENCODE_MAP[(in[end] & 0xff) >> 2]; + out[index++] = ENCODE_MAP[((in[end] & 0x03) << 4) | ((in[end + 1] & 0xff) >> 4)]; + out[index++] = ENCODE_MAP[((in[end + 1] & 0x0f) << 2)]; + out[index++] = '='; + break; + } + try { + return new String(out, 0, index, "US-ASCII"); + } catch (UnsupportedEncodingException e) { + return null; + } + } + +} diff --git a/auth0/src/main/java/com/auth0/util/CheckHelper.java b/auth0/src/main/java/com/auth0/util/CheckHelper.java new file mode 100644 index 000000000..75eef7fcf --- /dev/null +++ b/auth0/src/main/java/com/auth0/util/CheckHelper.java @@ -0,0 +1,37 @@ +/* + * CheckHelper.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.util; + +/** + * A helper to check constructor arguments. + */ +public class CheckHelper { + + public static void checkArgument(boolean expression, String message) throws RuntimeException { + if (!expression) { + throw new IllegalArgumentException(message); + } + } +} diff --git a/auth0/src/main/java/com/auth0/util/Telemetry.java b/auth0/src/main/java/com/auth0/util/Telemetry.java new file mode 100644 index 000000000..d4a408479 --- /dev/null +++ b/auth0/src/main/java/com/auth0/util/Telemetry.java @@ -0,0 +1,51 @@ +package com.auth0.util; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.util.HashMap; +import java.util.Map; + +public class Telemetry { + public static final String HEADER_NAME = "Auth0-Client"; + + private static final String NAME_KEY = "name"; + private static final String VERSION_KEY = "version"; + private static final String LIB_VERSION_KEY = "lib_version"; + + private final String name; + private final String version; + private final String libraryVersion; + + public Telemetry(String name, String version) { + this(name, version, null); + } + + public Telemetry(String name, String version, String libraryVersion) { + this.name = name; + this.version = version; + this.libraryVersion = libraryVersion; + } + + public String getValue() { + Map values = new HashMap<>(); + if (name != null) { + values.put(NAME_KEY, name); + } + if (version != null) { + values.put(VERSION_KEY, version); + } + if (libraryVersion != null) { + values.put(LIB_VERSION_KEY, libraryVersion); + } + if (values.isEmpty()) { + return null; + } + try { + String json = new ObjectMapper().writeValueAsString(values); + return Base64.encodeUrlSafe(json); + } catch (JsonProcessingException e) { + return null; + } + } +} diff --git a/auth0/src/test/java/com/auth0/Auth0Test.java b/auth0/src/test/java/com/auth0/Auth0Test.java new file mode 100644 index 000000000..9139e9d84 --- /dev/null +++ b/auth0/src/test/java/com/auth0/Auth0Test.java @@ -0,0 +1,126 @@ +/* + * Auth0Test.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0; + +import com.auth0.authentication.AuthenticationAPIClient; +import com.auth0.util.Telemetry; + +import org.junit.Test; + +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.notNullValue; +import static org.hamcrest.Matchers.nullValue; +import static org.junit.Assert.assertThat; + +public class Auth0Test { + + private static final String CLIENT_ID = "CLIENT_ID"; + private static final String CLIENT_SECRET = "CLIENT_SECRET"; + private static final String CONFIGURATION_DOMAIN = "CONFIGURATION_DOMAIN"; + private static final String DOMAIN = "samples.auth0.com"; + private static final String CONFIG_DOMAIN_CUSTOM = "config.mydomain.com"; + private static final String EU_DOMAIN = "samples.eu.auth0.com"; + private static final String AU_DOMAIN = "samples.au.auth0.com"; + private static final String OTHER_DOMAIN = "samples-test.other-subdomain.other.auth0.com"; + + @Test + public void shouldBuildWithClientIdAndDomain() throws Exception { + Auth0 auth0 = new Auth0(CLIENT_ID, DOMAIN); + assertThat(auth0.getClientId(), equalTo(CLIENT_ID)); + assertThat(auth0.getDomainUrl(), equalTo("https://samples.auth0.com")); + assertThat(auth0.getConfigurationUrl(), equalTo("https://cdn.auth0.com")); + } + + @Test + public void shouldBuildWithConfigurationDomainToo() throws Exception { + Auth0 auth0 = new Auth0(CLIENT_ID, null, DOMAIN, CONFIG_DOMAIN_CUSTOM); + assertThat(auth0.getClientId(), equalTo(CLIENT_ID)); + assertThat(auth0.getDomainUrl(), equalTo("https://samples.auth0.com")); + assertThat(auth0.getConfigurationUrl(), equalTo("https://config.mydomain.com")); + } + + @Test + public void shouldHandleEUInstance() throws Exception { + Auth0 auth0 = new Auth0(CLIENT_ID, EU_DOMAIN); + assertThat(auth0.getClientId(), equalTo(CLIENT_ID)); + assertThat(auth0.getDomainUrl(), equalTo("https://samples.eu.auth0.com")); + assertThat(auth0.getConfigurationUrl(), equalTo("https://cdn.eu.auth0.com")); + } + + @Test + public void shouldHandleAUInstance() throws Exception { + Auth0 auth0 = new Auth0(CLIENT_ID, AU_DOMAIN); + assertThat(auth0.getClientId(), equalTo(CLIENT_ID)); + assertThat(auth0.getDomainUrl(), equalTo("https://samples.au.auth0.com")); + assertThat(auth0.getConfigurationUrl(), equalTo("https://cdn.au.auth0.com")); + } + + @Test + public void shouldHandleOtherInstance() throws Exception { + Auth0 auth0 = new Auth0(CLIENT_ID, OTHER_DOMAIN); + assertThat(auth0.getClientId(), equalTo(CLIENT_ID)); + assertThat(auth0.getDomainUrl(), equalTo("https://samples-test.other-subdomain.other.auth0.com")); + assertThat(auth0.getConfigurationUrl(), equalTo("https://cdn.other.auth0.com")); + } + + @Test + public void shouldHandleNonAuth0Domain() throws Exception { + Auth0 auth0 = new Auth0(CLIENT_ID, "mydomain.com"); + assertThat(auth0.getClientId(), equalTo(CLIENT_ID)); + assertThat(auth0.getDomainUrl(), equalTo("https://mydomain.com")); + assertThat(auth0.getConfigurationUrl(), equalTo("https://mydomain.com")); + } + + @Test + public void shouldBuildNewClient() throws Exception { + Auth0 auth0 = new Auth0(CLIENT_ID, DOMAIN); + AuthenticationAPIClient client = auth0.newAuthenticationAPIClient(); + assertThat(client, is(notNullValue())); + assertThat(client.getBaseURL(), equalTo("https://samples.auth0.com")); + assertThat(client.getClientId(), equalTo(CLIENT_ID)); + } + + @Test + public void shouldReturnAuthorizeUrl() throws Exception { + Auth0 auth0 = new Auth0(CLIENT_ID, DOMAIN); + assertThat(auth0.getAuthorizeUrl(), equalTo("https://samples.auth0.com/authorize")); + } + + @Test + public void shouldNotReturnTelemetryWhenExplicitlyDisabledThem() throws Exception { + Auth0 auth0 = new Auth0(CLIENT_ID, DOMAIN); + auth0.doNotSendTelemetry(); + assertThat(auth0.getTelemetry(), is(nullValue())); + } + + @Test + public void shouldSetCustomTelemetry() throws Exception { + Telemetry customTelemetry = new Telemetry("custom", "9.9.9", "1.1.1"); + Auth0 auth0 = new Auth0(CLIENT_ID, DOMAIN); + auth0.setTelemetry(customTelemetry); + assertThat(auth0.getTelemetry(), is(equalTo(customTelemetry))); + } +} \ No newline at end of file diff --git a/auth0/src/test/java/com/auth0/UserProfileTest.java b/auth0/src/test/java/com/auth0/UserProfileTest.java new file mode 100644 index 000000000..9d9609071 --- /dev/null +++ b/auth0/src/test/java/com/auth0/UserProfileTest.java @@ -0,0 +1,148 @@ +/* + * UserProfileTest.java + * + * Copyright (c) 2016 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0; + + +import com.auth0.authentication.result.UserIdentity; +import com.auth0.authentication.result.UserProfile; + +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.hasEntry; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.isA; +import static org.hamcrest.Matchers.notNullValue; +import static org.junit.Assert.assertThat; + + +public class UserProfileTest { + + public static final String USER_ID = "IOU a user id"; + public static final String NAME = "Somebody Someone"; + public static final String NICKNAME = "somebody"; + public static final String EMAIL = "somebody@somwhere.com"; + public static final String CREATED_AT = "2014-07-06T18:33:49.005Z"; + public static final String PICTURE_URL = "http://somewhere.com/pic.jpg"; + public static final Object EXTRA_VALUE = "extra_value"; + public static final long CREATED_AT_TIMESTAMP = 1404671629005l; + public static final String FACEBOOK = "facebook"; + public static final String TOKEN = "token"; + public static final String SECRET = "secret"; + + @Rule + public ExpectedException expectedException = ExpectedException.none(); + + @Test + public void shouldRaiseExceptionWithNullValuesWhenCreatingInstance() throws Exception { + expectedException.expect(IllegalArgumentException.class); + expectedException.expectMessage(equalTo("must supply non-null values")); + new UserProfile((HashMap)null); + } + + @Test + public void shouldRaiseExceptionWithNoUserIdWhenCreatingInstance() throws Exception { + expectedException.expect(IllegalArgumentException.class); + expectedException.expectMessage(equalTo("profile must have a user id")); + new UserProfile(new HashMap()); + } + + @Test + public void shouldInstantiateProfileWithId() throws Exception { + Map values = new HashMap(); + values.put("user_id", USER_ID); + UserProfile profile = new UserProfile(values); + assertValidProfile(profile); + } + + @Test + public void shouldInstantiateWithBasicProfileInfo() throws Exception { + Map values = new HashMap(); + values.put("user_id", USER_ID); + values.put("name", NAME); + values.put("nickname", NICKNAME); + values.put("email", EMAIL); + values.put("picture", PICTURE_URL); + values.put("created_at", CREATED_AT); + UserProfile profile = new UserProfile(values); + assertValidProfile(profile); + assertThat(profile.getName(), equalTo(NAME)); + assertThat(profile.getNickname(), equalTo(NICKNAME)); + assertThat(profile.getEmail(), equalTo(EMAIL)); + assertThat(profile.getPictureURL(), equalTo(PICTURE_URL)); + assertThat(profile.getCreatedAt().getTime(), equalTo(CREATED_AT_TIMESTAMP)); + assertThat(profile.getExtraInfo().size(), equalTo(0)); + } + + @Test + public void shouldHandleExtraProfileInfo() throws Exception { + Map values = new HashMap(); + values.put("user_id", USER_ID); + values.put("extra_key", EXTRA_VALUE); + UserProfile profile = new UserProfile(values); + assertValidProfile(profile); + assertThat(profile.getExtraInfo(), hasEntry("extra_key", EXTRA_VALUE)); + } + + @Test + public void shouldHandleIdentities() throws Exception { + Map values = new HashMap(); + Map identityValue = new HashMap<>(); + Map profileData = new HashMap<>(); + identityValue.put("user_id", USER_ID); + identityValue.put("connection", FACEBOOK); + identityValue.put("provider", FACEBOOK); + identityValue.put("isSocial", true); + identityValue.put("access_token", TOKEN); + identityValue.put("access_token_secret", SECRET); + identityValue.put("profileData", profileData); + profileData.put("name", "John Doe"); + + values.put("user_id", USER_ID); + values.put("identities", Collections.singletonList(identityValue)); + UserProfile profile = new UserProfile(values); + assertValidProfile(profile); + assertThat(profile.getIdentities(), hasSize(1)); + UserIdentity identity = profile.getIdentities().get(0); + assertThat(identity, isA(UserIdentity.class)); + assertThat(identity.getId(), equalTo(USER_ID)); + assertThat(identity.getProvider(), equalTo(FACEBOOK)); + assertThat(identity.getConnection(), equalTo(FACEBOOK)); + assertThat(identity.getAccessToken(), equalTo(TOKEN)); + assertThat(identity.getAccessTokenSecret(), equalTo(SECRET)); + } + + private void assertValidProfile(UserProfile profile) { + assertThat(profile, is(notNullValue())); + assertThat(profile.getId(), equalTo(USER_ID)); + } +} diff --git a/auth0/src/test/java/com/auth0/authentication/AuthenticationAPIClientTest.java b/auth0/src/test/java/com/auth0/authentication/AuthenticationAPIClientTest.java new file mode 100644 index 000000000..ab94127b1 --- /dev/null +++ b/auth0/src/test/java/com/auth0/authentication/AuthenticationAPIClientTest.java @@ -0,0 +1,1202 @@ +/* + * AuthenticationAPIClientTest.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.authentication; + + +import com.auth0.Auth0; +import com.auth0.authentication.result.Authentication; +import com.auth0.authentication.result.Credentials; +import com.auth0.authentication.result.DatabaseUser; +import com.auth0.authentication.result.Delegation; +import com.auth0.authentication.result.UserProfile; +import com.auth0.util.AuthenticationAPI; +import com.auth0.util.MockBaseCallback; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.squareup.okhttp.mockwebserver.RecordedRequest; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.util.HashMap; +import java.util.Map; + +import static com.auth0.util.AuthenticationAPI.GENERIC_TOKEN; +import static com.auth0.util.AuthenticationAPI.ID_TOKEN; +import static com.auth0.util.AuthenticationAPI.REFRESH_TOKEN; +import static com.auth0.util.CallbackMatcher.hasNoError; +import static com.auth0.util.CallbackMatcher.hasPayload; +import static com.auth0.util.CallbackMatcher.hasPayloadOfType; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.hasEntry; +import static org.hamcrest.Matchers.hasKey; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.notNullValue; +import static org.junit.Assert.assertThat; + +public class AuthenticationAPIClientTest { + + private static final String CLIENT_ID = "CLIENTID"; + private static final String DOMAIN = "samples.auth0.com"; + private static final String USERNAME_PASSWORD_AUTHENTICATION = "Username-Password-Authentication"; + private static final String PASSWORD = "123123123"; + private static final String SUPPORT_AUTH0_COM = "support@auth0.com"; + private static final String SUPPORT = "support"; + private static final String MY_CONNECTION = "MyConnection"; + private static final String FIRST_NAME = "John"; + private static final String LAST_NAME = "Doe"; + private static final String COMPANY = "Auth0"; + private static final String OPENID = "openid"; + + private AuthenticationAPIClient client; + + private AuthenticationAPI mockAPI; + + @Before + public void setUp() throws Exception { + mockAPI = new AuthenticationAPI(); + final String domain = mockAPI.getDomain(); + Auth0 auth0 = new Auth0(CLIENT_ID, domain, domain); + client = new AuthenticationAPIClient(auth0); + } + + @After + public void tearDown() throws Exception { + mockAPI.shutdown(); + } + + @Test + public void shouldCreateClientWithAccountInfo() throws Exception { + AuthenticationAPIClient client = new AuthenticationAPIClient(new Auth0(CLIENT_ID, DOMAIN)); + assertThat(client, is(notNullValue())); + assertThat(client.getClientId(), equalTo(CLIENT_ID)); + assertThat(client.getBaseURL(), equalTo("https://samples.auth0.com")); + } + + @Test + public void shouldLoginWithUserAndPassword() throws Exception { + mockAPI + .willReturnSuccessfulLogin(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + + client + .login(SUPPORT_AUTH0_COM, "voidpassword") + .start(callback); + + assertThat(callback, hasPayloadOfType(Credentials.class)); + } + + @Test + public void shouldLoginWithUserAndPasswordSync() throws Exception { + mockAPI + .willReturnSuccessfulLogin(); + + final Credentials credentials = client + .login(SUPPORT_AUTH0_COM, "voidpassword") + .execute(); + + assertThat(credentials, is(notNullValue())); + } + + @Test + public void shouldFetchTokenInfo() throws Exception { + mockAPI.willReturnTokenInfo(); + final MockBaseCallback callback = new MockBaseCallback<>(); + + client.tokenInfo("ID_TOKEN") + .start(callback); + + assertThat(callback, hasPayloadOfType(UserProfile.class)); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/tokeninfo")); + } + + @Test + public void shouldFetchTokenInfoSync() throws Exception { + mockAPI.willReturnTokenInfo(); + + final UserProfile profile = client + .tokenInfo("ID_TOKEN") + .execute(); + + assertThat(profile, is(notNullValue())); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/tokeninfo")); + } + + @Test + public void shouldLoginWithOAuthAccessToken() throws Exception { + mockAPI + .willReturnSuccessfulLogin(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.loginWithOAuthAccessToken("fbtoken", "facebook") + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/oauth/access_token")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("connection", "facebook")); + assertThat(body, hasEntry("access_token", "fbtoken")); + assertThat(body, hasEntry("scope", OPENID)); + + assertThat(callback, hasPayloadOfType(Credentials.class)); + } + + @Test + public void shouldLoginWithOAuthAccessTokenSync() throws Exception { + mockAPI.willReturnSuccessfulLogin(); + + final Credentials credentials = client + .loginWithOAuthAccessToken("fbtoken", "facebook") + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/oauth/access_token")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("connection", "facebook")); + assertThat(body, hasEntry("access_token", "fbtoken")); + assertThat(body, hasEntry("scope", OPENID)); + + assertThat(credentials, is(notNullValue())); + } + + @Test + public void shouldLoginWithPhoneNumber() throws Exception { + mockAPI.willReturnSuccessfulLogin(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.loginWithPhoneNumber("+10101010101", "1234") + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/oauth/ro")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("connection", "sms")); + assertThat(body, hasEntry("username", "+10101010101")); + assertThat(body, hasEntry("password", "1234")); + assertThat(body, hasEntry("scope", OPENID)); + + assertThat(callback, hasPayloadOfType(Credentials.class)); + } + + @Test + public void shouldLoginWithPhoneNumberSync() throws Exception { + mockAPI.willReturnSuccessfulLogin(); + + final Credentials credentials = client + .loginWithPhoneNumber("+10101010101", "1234") + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/oauth/ro")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("connection", "sms")); + assertThat(body, hasEntry("username", "+10101010101")); + assertThat(body, hasEntry("password", "1234")); + assertThat(body, hasEntry("scope", OPENID)); + + assertThat(credentials, is(notNullValue())); + } + + @Test + public void shouldLoginWithEmailOnly() throws Exception { + mockAPI.willReturnSuccessfulLogin(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.loginWithEmail(SUPPORT_AUTH0_COM, "1234") + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/oauth/ro")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("connection", "email")); + assertThat(body, hasEntry("username", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("password", "1234")); + assertThat(body, hasEntry("scope", OPENID)); + + assertThat(callback, hasPayloadOfType(Credentials.class)); + } + + @Test + public void shouldLoginWithEmailOnlySync() throws Exception { + mockAPI + .willReturnSuccessfulLogin() + .willReturnTokenInfo(); + + final Credentials credentials = client + .loginWithEmail(SUPPORT_AUTH0_COM, "1234") + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/oauth/ro")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("connection", "email")); + assertThat(body, hasEntry("username", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("password", "1234")); + assertThat(body, hasEntry("scope", OPENID)); + + assertThat(credentials, is(notNullValue())); + } + + @Test + public void shouldCreateUser() throws Exception { + mockAPI.willReturnSuccessfulSignUp(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.createUser(SUPPORT_AUTH0_COM, PASSWORD, SUPPORT) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/dbconnections/signup")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("username", SUPPORT)); + assertThat(body, hasEntry("password", PASSWORD)); + + assertThat(callback, hasPayloadOfType(DatabaseUser.class)); + } + + @Test + public void shouldCreateUserSync() throws Exception { + mockAPI.willReturnSuccessfulSignUp(); + + final DatabaseUser user = client + .createUser(SUPPORT_AUTH0_COM, PASSWORD, SUPPORT) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/dbconnections/signup")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("username", SUPPORT)); + assertThat(body, hasEntry("password", PASSWORD)); + + assertThat(user, is(notNullValue())); + } + + @Test + public void shouldCreateUserWithoutUsername() throws Exception { + mockAPI.willReturnSuccessfulSignUp(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.createUser(SUPPORT_AUTH0_COM, PASSWORD) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/dbconnections/signup")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, not(hasEntry("username", SUPPORT))); + assertThat(body, hasEntry("password", PASSWORD)); + + assertThat(callback, hasPayloadOfType(DatabaseUser.class)); + } + + @Test + public void shouldCreateUserWithoutUsernameSync() throws Exception { + mockAPI.willReturnSuccessfulSignUp(); + + final DatabaseUser user = client + .createUser(SUPPORT_AUTH0_COM, PASSWORD) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/dbconnections/signup")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("username", null)); + assertThat(body, hasEntry("password", PASSWORD)); + + assertThat(user, is(notNullValue())); + } + + @Test + public void shouldSignUpUser() throws Exception { + mockAPI.willReturnSuccessfulSignUp() + .willReturnSuccessfulLogin(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.signUp(SUPPORT_AUTH0_COM, PASSWORD, SUPPORT) + .start(callback); + + final RecordedRequest createRequest = mockAPI.takeRequest(); + assertThat(createRequest.getPath(), equalTo("/dbconnections/signup")); + + Map body = bodyFromRequest(createRequest); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("username", SUPPORT)); + assertThat(body, hasEntry("password", PASSWORD)); + assertThat(body, hasEntry("connection", USERNAME_PASSWORD_AUTHENTICATION)); + + assertThat(callback, hasPayloadOfType(Credentials.class)); + + final RecordedRequest loginRequest = mockAPI.takeRequest(); + assertThat(loginRequest.getPath(), equalTo("/oauth/ro")); + + Map loginBody = bodyFromRequest(loginRequest); + assertThat(loginBody, hasEntry("username", SUPPORT_AUTH0_COM)); + assertThat(loginBody, hasEntry("password", PASSWORD)); + assertThat(loginBody, hasEntry("connection", USERNAME_PASSWORD_AUTHENTICATION)); + assertThat(loginBody, hasEntry("scope", OPENID)); + } + + @Test + public void shouldSignUpUserWithCustomFields() throws Exception { + mockAPI.willReturnSuccessfulSignUp() + .willReturnSuccessfulLogin(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + final Map custom = ParameterBuilder.newBuilder() + .set("first_name", FIRST_NAME) + .set("last_name", LAST_NAME) + .set("company", COMPANY) + .asDictionary(); + + client.signUp(SUPPORT_AUTH0_COM, PASSWORD, SUPPORT) + .addSignUpParameters(custom) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/dbconnections/signup")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("username", SUPPORT)); + assertThat(body, hasEntry("password", PASSWORD)); + assertThat(body, hasEntry("connection", USERNAME_PASSWORD_AUTHENTICATION)); + assertThat(body, hasEntry("first_name", FIRST_NAME)); + assertThat(body, hasEntry("last_name", LAST_NAME)); + assertThat(body, hasEntry("company", COMPANY)); + + assertThat(callback, hasPayloadOfType(Credentials.class)); + } + + @Test + public void shouldSignUpUserWithConnectionName() throws Exception { + mockAPI.willReturnSuccessfulSignUp() + .willReturnSuccessfulLogin() + .willReturnTokenInfo(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.signUp(SUPPORT_AUTH0_COM, PASSWORD) + .setConnection(MY_CONNECTION) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/dbconnections/signup")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("password", PASSWORD)); + assertThat(body, hasEntry("connection", MY_CONNECTION)); + + assertThat(callback, hasPayloadOfType(Credentials.class)); + + final RecordedRequest loginRequest = mockAPI.takeRequest(); + assertThat(loginRequest.getPath(), equalTo("/oauth/ro")); + + Map loginBody = bodyFromRequest(loginRequest); + assertThat(loginBody, hasEntry("username", SUPPORT_AUTH0_COM)); + assertThat(loginBody, hasEntry("password", PASSWORD)); + assertThat(loginBody, hasEntry("connection", MY_CONNECTION)); + assertThat(loginBody, hasEntry("scope", OPENID)); + + } + + @Test + public void shouldSignUpUserSync() throws Exception { + mockAPI.willReturnSuccessfulSignUp() + .willReturnSuccessfulLogin() + .willReturnTokenInfo(); + + final Credentials credentials = client + .signUp(SUPPORT_AUTH0_COM, PASSWORD, SUPPORT) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/dbconnections/signup")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("username", SUPPORT)); + assertThat(body, hasEntry("password", PASSWORD)); + assertThat(body, hasEntry("connection", USERNAME_PASSWORD_AUTHENTICATION)); + + assertThat(credentials, is(notNullValue())); + + final RecordedRequest loginRequest = mockAPI.takeRequest(); + assertThat(loginRequest.getPath(), equalTo("/oauth/ro")); + + Map loginBody = bodyFromRequest(loginRequest); + assertThat(loginBody, hasEntry("username", SUPPORT_AUTH0_COM)); + assertThat(loginBody, hasEntry("password", PASSWORD)); + assertThat(loginBody, hasEntry("connection", USERNAME_PASSWORD_AUTHENTICATION)); + assertThat(loginBody, hasEntry("scope", OPENID)); + } + + @Test + public void shouldSignUpUserWithoutUsername() throws Exception { + mockAPI.willReturnSuccessfulSignUp() + .willReturnSuccessfulLogin() + .willReturnTokenInfo(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.signUp(SUPPORT_AUTH0_COM, PASSWORD) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/dbconnections/signup")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, not(hasEntry("username", SUPPORT))); + assertThat(body, hasEntry("password", PASSWORD)); + assertThat(body, hasEntry("connection", USERNAME_PASSWORD_AUTHENTICATION)); + + assertThat(callback, hasPayloadOfType(Credentials.class)); + } + + @Test + public void shouldSignUpUserWithoutUsernameSync() throws Exception { + mockAPI.willReturnSuccessfulSignUp() + .willReturnSuccessfulLogin() + .willReturnTokenInfo(); + + final Credentials credentials = client + .signUp(SUPPORT_AUTH0_COM, PASSWORD) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/dbconnections/signup")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("username", null)); + assertThat(body, hasEntry("password", PASSWORD)); + assertThat(body, hasEntry("connection", USERNAME_PASSWORD_AUTHENTICATION)); + + assertThat(credentials, is(notNullValue())); + } + + @Test + public void shouldChangePassword() throws Exception { + mockAPI.willReturnSuccessfulChangePassword(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.requestChangePassword(SUPPORT_AUTH0_COM) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/dbconnections/change_password")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, not(hasKey("username"))); + + assertThat(callback, hasNoError()); + } + + @Test + public void shouldChangePasswordSync() throws Exception { + mockAPI.willReturnSuccessfulChangePassword(); + + client.requestChangePassword(SUPPORT_AUTH0_COM) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/dbconnections/change_password")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, not(hasKey("username"))); + } + + @Test + public void shouldRequestChangePassword() throws Exception { + mockAPI.willReturnSuccessfulChangePassword(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.requestChangePassword(SUPPORT_AUTH0_COM) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/dbconnections/change_password")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, not(hasKey("username"))); + assertThat(body, not(hasKey("password"))); + + assertThat(callback, hasNoError()); + } + + @Test + public void shouldRequestChangePasswordForAConnection() throws Exception { + mockAPI.willReturnSuccessfulChangePassword(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.requestChangePassword(SUPPORT_AUTH0_COM) + .setConnection(MY_CONNECTION) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/dbconnections/change_password")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("connection", MY_CONNECTION)); + + assertThat(callback, hasNoError()); + } + + @Test + public void shouldRequestChangePasswordSync() throws Exception { + mockAPI.willReturnSuccessfulChangePassword(); + + client.requestChangePassword(SUPPORT_AUTH0_COM) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/dbconnections/change_password")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, not(hasKey("username"))); + assertThat(body, not(hasKey("password"))); + } + + @Test + public void shouldCallDelegation() throws Exception { + mockAPI.willReturnGenericDelegationToken(); + + final MockBaseCallback> callback = new MockBaseCallback<>(); + client.delegation() + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/delegation")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("grant_type", ParameterBuilder.GRANT_TYPE_JWT)); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + + Map payload = new HashMap<>(); + payload.put("token", GENERIC_TOKEN); + assertThat(callback, hasPayload(payload)); + } + + @Test + public void shouldCallDelegationSync() throws Exception { + mockAPI.willReturnGenericDelegationToken(); + + final Map response = client + .delegation() + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/delegation")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("grant_type", ParameterBuilder.GRANT_TYPE_JWT)); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + + Map payload = new HashMap<>(); + payload.put("token", GENERIC_TOKEN); + assertThat(response, is(equalTo(payload))); + } + + @Test + public void shouldGetNewIdTokenWithIdToken() throws Exception { + mockAPI.willReturnNewIdToken(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.delegationWithIdToken(ID_TOKEN) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/delegation")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("grant_type", ParameterBuilder.GRANT_TYPE_JWT)); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("api_type", "app")); + assertThat(body, hasEntry("id_token", ID_TOKEN)); + + assertThat(callback, hasPayloadOfType(Delegation.class)); + } + + @Test + public void shouldGetNewIdTokenWithIdTokenSync() throws Exception { + mockAPI.willReturnNewIdToken(); + + final Delegation delegation = client + .delegationWithIdToken(ID_TOKEN) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/delegation")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("grant_type", ParameterBuilder.GRANT_TYPE_JWT)); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("api_type", "app")); + assertThat(body, hasEntry("id_token", ID_TOKEN)); + + assertThat(delegation, is(notNullValue())); + } + + @Test + public void shouldGetCustomizedDelegationRequestWithIdToken() throws Exception { + mockAPI.willReturnNewIdToken(); + + final MockBaseCallback> callback = new MockBaseCallback<>(); + client.delegationWithIdToken(ID_TOKEN, "custom_api_type") + .setScope("custom_scope") + .setTarget("custom_target") + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/delegation")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("grant_type", ParameterBuilder.GRANT_TYPE_JWT)); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("api_type", "custom_api_type")); + assertThat(body, hasEntry("scope", "custom_scope")); + assertThat(body, hasEntry("target", "custom_target")); + assertThat(body, hasEntry("id_token", ID_TOKEN)); + } + + @Test + public void shouldGetCustomizedDelegationRequestWithIdTokenSync() throws Exception { + mockAPI.willReturnNewIdToken(); + + client + .delegationWithIdToken(ID_TOKEN, "custom_api_type") + .setScope("custom_scope") + .setTarget("custom_target") + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/delegation")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("grant_type", ParameterBuilder.GRANT_TYPE_JWT)); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("api_type", "custom_api_type")); + assertThat(body, hasEntry("scope", "custom_scope")); + assertThat(body, hasEntry("target", "custom_target")); + assertThat(body, hasEntry("id_token", ID_TOKEN)); + } + + @Test + public void shouldGetNewIdTokenWithRefreshToken() throws Exception { + mockAPI.willReturnNewIdToken(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.delegationWithRefreshToken(REFRESH_TOKEN) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/delegation")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("grant_type", ParameterBuilder.GRANT_TYPE_JWT)); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("api_type", "app")); + assertThat(body, hasEntry("refresh_token", REFRESH_TOKEN)); + + assertThat(callback, hasPayloadOfType(Delegation.class)); + } + + @Test + public void shouldGetNewIdTokenWithRefreshTokenSync() throws Exception { + mockAPI.willReturnNewIdToken(); + + final Delegation delegation = client + .delegationWithRefreshToken(REFRESH_TOKEN) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/delegation")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("grant_type", ParameterBuilder.GRANT_TYPE_JWT)); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("api_type", "app")); + assertThat(body, hasEntry("refresh_token", REFRESH_TOKEN)); + + assertThat(delegation, is(notNullValue())); + } + + @Test + public void shouldUnlinkAccount() throws Exception { + mockAPI.willReturnSuccessfulUnlinkAccount(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.unlink("user id", "access token") + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/unlink")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("clientID", CLIENT_ID)); + assertThat(body, hasEntry("user_id", "user id")); + assertThat(body, hasEntry("access_token", "access token")); + + assertThat(callback, hasNoError()); + } + + @Test + public void shouldUnlinkAccountSync() throws Exception { + mockAPI.willReturnSuccessfulUnlinkAccount(); + + client.unlink("user id", "access token") + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/unlink")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("clientID", CLIENT_ID)); + assertThat(body, hasEntry("user_id", "user id")); + assertThat(body, hasEntry("access_token", "access token")); + } + + @Test + public void shouldStartPasswordless() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + final Map parameters = ParameterBuilder.newBuilder() + .setConnection("email") + .set("send", "code") + .set("email", SUPPORT_AUTH0_COM) + .asDictionary(); + + client.passwordless() + .addParameters(parameters) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("send", "code")); + assertThat(body, hasEntry("connection", "email")); + + assertThat(callback, hasNoError()); + } + + @Test + public void shouldStartPasswordlessSync() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + final Map parameters = ParameterBuilder.newBuilder() + .setConnection("email") + .set("send", "code") + .set("email", SUPPORT_AUTH0_COM) + .asDictionary(); + + client.passwordless() + .addParameters(parameters) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("send", "code")); + assertThat(body, hasEntry("connection", "email")); + } + + @Test + public void shouldSendEmailCode() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.passwordlessWithEmail(SUPPORT_AUTH0_COM, PasswordlessType.CODE) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("send", "code")); + assertThat(body, hasEntry("connection", "email")); + + assertThat(callback, hasNoError()); + } + + @Test + public void shouldSendEmailCodeSync() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + client.passwordlessWithEmail(SUPPORT_AUTH0_COM, PasswordlessType.CODE) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("send", "code")); + assertThat(body, hasEntry("connection", "email")); + } + + @Test + public void shouldSendEmailLink() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.passwordlessWithEmail(SUPPORT_AUTH0_COM, PasswordlessType.LINK_WEB) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("send", "link")); + assertThat(body, hasEntry("connection", "email")); + + assertThat(callback, hasNoError()); + } + + @Test + public void shouldSendEmailLinkSync() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + client.passwordlessWithEmail(SUPPORT_AUTH0_COM, PasswordlessType.LINK_WEB) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("send", "link")); + assertThat(body, hasEntry("connection", "email")); + } + + @Test + public void shouldSendEmailLinkAndroid() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.passwordlessWithEmail(SUPPORT_AUTH0_COM, PasswordlessType.LINK_ANDROID) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("send", "link_android")); + assertThat(body, hasEntry("connection", "email")); + + assertThat(callback, hasNoError()); + } + + @Test + public void shouldSendEmailLinkAndroidSync() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + client.passwordlessWithEmail(SUPPORT_AUTH0_COM, PasswordlessType.LINK_ANDROID) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("send", "link_android")); + assertThat(body, hasEntry("connection", "email")); + } + + @Test + public void shouldSendEmailLinkIOS() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.passwordlessWithEmail(SUPPORT_AUTH0_COM, PasswordlessType.LINK_IOS) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("send", "link_ios")); + assertThat(body, hasEntry("connection", "email")); + + assertThat(callback, hasNoError()); + } + + @Test + public void shouldSendEmailLinkIOSSync() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + client.passwordlessWithEmail(SUPPORT_AUTH0_COM, PasswordlessType.LINK_IOS) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("email", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("send", "link_ios")); + assertThat(body, hasEntry("connection", "email")); + } + + @Test + public void shouldSendSMSCode() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.passwordlessWithSMS("+1123123123", PasswordlessType.CODE) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("phone_number", "+1123123123")); + assertThat(body, hasEntry("send", "code")); + assertThat(body, hasEntry("connection", "sms")); + + assertThat(callback, hasNoError()); + } + + @Test + public void shouldSendSMSCodeSync() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + client.passwordlessWithSMS("+1123123123", PasswordlessType.CODE) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("phone_number", "+1123123123")); + assertThat(body, hasEntry("send", "code")); + assertThat(body, hasEntry("connection", "sms")); + } + + @Test + public void shouldSendSMSLink() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.passwordlessWithSMS("+1123123123", PasswordlessType.LINK_WEB) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("phone_number", "+1123123123")); + assertThat(body, hasEntry("send", "link")); + assertThat(body, hasEntry("connection", "sms")); + + assertThat(callback, hasNoError()); + } + + @Test + public void shouldSendSMSLinkSync() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + client.passwordlessWithSMS("+1123123123", PasswordlessType.LINK_WEB) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("phone_number", "+1123123123")); + assertThat(body, hasEntry("send", "link")); + assertThat(body, hasEntry("connection", "sms")); + } + + @Test + public void shouldSendSMSLinkAndroid() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.passwordlessWithSMS("+1123123123", PasswordlessType.LINK_ANDROID) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("phone_number", "+1123123123")); + assertThat(body, hasEntry("send", "link_android")); + assertThat(body, hasEntry("connection", "sms")); + + assertThat(callback, hasNoError()); + } + + @Test + public void shouldSendSMSLinkAndroidSync() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + client.passwordlessWithSMS("+1123123123", PasswordlessType.LINK_ANDROID) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("phone_number", "+1123123123")); + assertThat(body, hasEntry("send", "link_android")); + assertThat(body, hasEntry("connection", "sms")); + } + + @Test + public void shouldSendSMSLinkIOS() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.passwordlessWithSMS("+1123123123", PasswordlessType.LINK_IOS) + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("phone_number", "+1123123123")); + assertThat(body, hasEntry("send", "link_ios")); + assertThat(body, hasEntry("connection", "sms")); + + assertThat(callback, hasNoError()); + } + + @Test + public void shouldSendSMSLinkIOSSync() throws Exception { + mockAPI.willReturnSuccessfulPasswordlessStart(); + + client.passwordlessWithSMS("+1123123123", PasswordlessType.LINK_IOS) + .execute(); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/passwordless/start")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("phone_number", "+1123123123")); + assertThat(body, hasEntry("send", "link_ios")); + assertThat(body, hasEntry("connection", "sms")); + } + + @Test + public void shouldFetchProfileAfterLoginRequest() throws Exception { + mockAPI + .willReturnSuccessfulLogin() + .willReturnTokenInfo(); + + MockBaseCallback callback = new MockBaseCallback<>(); + client.getProfileAfter(client.login(SUPPORT_AUTH0_COM, "voidpassword")) + .start(callback); + + final RecordedRequest firstRequest = mockAPI.takeRequest(); + assertThat(firstRequest.getPath(), equalTo("/oauth/ro")); + + Map body = bodyFromRequest(firstRequest); + assertThat(body, hasEntry("username", SUPPORT_AUTH0_COM)); + assertThat(body, hasEntry("password", "voidpassword")); + + final RecordedRequest secondRequest = mockAPI.takeRequest(); + assertThat(secondRequest.getPath(), equalTo("/tokeninfo")); + + assertThat(callback, hasPayloadOfType(Authentication.class)); + } + + @Test + public void shouldGetOAuthTokens() throws Exception { + mockAPI + .willReturnTokens() + .willReturnTokenInfo(); + + final MockBaseCallback callback = new MockBaseCallback<>(); + client.token("code", "codeVerifier", "http://redirect.uri") + .start(callback); + + final RecordedRequest request = mockAPI.takeRequest(); + assertThat(request.getPath(), equalTo("/oauth/token")); + + Map body = bodyFromRequest(request); + assertThat(body, hasEntry("grant_type", ParameterBuilder.GRANT_TYPE_AUTHORIZATION_CODE)); + assertThat(body, hasEntry("client_id", CLIENT_ID)); + assertThat(body, hasEntry("code", "code")); + assertThat(body, hasEntry("code_verifier", "codeVerifier")); + assertThat(body, hasEntry("redirect_uri", "http://redirect.uri")); + + assertThat(callback, hasPayloadOfType(Credentials.class)); + } + + private Map bodyFromRequest(RecordedRequest request) throws java.io.IOException { + return new ObjectMapper().readValue(request.getBody().inputStream(), new TypeReference>() { + }); + } +} \ No newline at end of file diff --git a/auth0/src/test/java/com/auth0/authentication/ParameterBuilderTest.java b/auth0/src/test/java/com/auth0/authentication/ParameterBuilderTest.java new file mode 100644 index 000000000..d4bbf6922 --- /dev/null +++ b/auth0/src/test/java/com/auth0/authentication/ParameterBuilderTest.java @@ -0,0 +1,153 @@ +/* + * ParameterBuilderTest.java + * + * Copyright (c) 2016 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.authentication; + + +import org.hamcrest.Matcher; +import org.hamcrest.Matchers; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; + +import java.util.HashMap; +import java.util.Map; + +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.equalToIgnoringCase; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.notNullValue; +import static org.junit.Assert.assertThat; + +public class ParameterBuilderTest { + + public static final String CLIENT_ID = "CLIENT ID"; + public static final String GRANT_TYPE = "password"; + public static final String CONNECTION = "AD"; + public static final String DEVICE = "ANDROID TEST DEVICE"; + + @Rule + public ExpectedException expectedException = ExpectedException.none(); + private ParameterBuilder builder; + + @Before + public void setUp() throws Exception { + this.builder = ParameterBuilder.newAuthenticationBuilder(); + } + + @Test + public void shouldInstantiateWithNoArguments() throws Exception { + assertThat(ParameterBuilder.newAuthenticationBuilder(), is(notNullValue())); + } + + @Test + public void shouldInstantiateWithDefaultScope() throws Exception { + assertThat(ParameterBuilder.newAuthenticationBuilder().asDictionary(), hasEntry("scope", ParameterBuilder.SCOPE_OPENID)); + } + + @Test + public void shouldInstantiateWithArguments() throws Exception { + assertThat(ParameterBuilder.newBuilder(new HashMap()), is(notNullValue())); + } + + @Test + public void shouldFailToInstantiateWithNullParametersInFactoryMethod() throws Exception { + expectedException.expect(IllegalArgumentException.class); + expectedException.expectMessage(equalToIgnoringCase("Must provide non-null parameters")); + ParameterBuilder.newBuilder(null); + } + + @Test + public void shouldSetClientID() throws Exception { + assertThat(builder.setClientId(CLIENT_ID).asDictionary(), hasEntry("client_id", CLIENT_ID)); + } + + @Test + public void shouldSetScope() throws Exception { + Map parameters = builder.setScope(ParameterBuilder.SCOPE_OFFLINE_ACCESS).asDictionary(); + assertThat(parameters, hasEntry("scope", ParameterBuilder.SCOPE_OFFLINE_ACCESS)); + } + + @Test + public void shouldSetDevice() throws Exception { + Map parameters = builder.setDevice(DEVICE).asDictionary(); + assertThat(parameters, hasEntry("device", DEVICE)); + } + + @Test + public void shouldSetScopeWithOfflineAccess() throws Exception { + Map parameters = builder.setScope(ParameterBuilder.SCOPE_OFFLINE_ACCESS).asDictionary(); + assertThat(parameters, hasEntry("scope", ParameterBuilder.SCOPE_OFFLINE_ACCESS)); + } + + @Test + public void shouldSetGrantType() throws Exception { + assertThat(builder.setGrantType(GRANT_TYPE).asDictionary(), hasEntry("grant_type", GRANT_TYPE)); + } + + @Test + public void shouldSetConnection() throws Exception { + assertThat(builder.setConnection(CONNECTION).asDictionary(), hasEntry("connection", CONNECTION)); + } + + @Test + public void shouldAddArbitraryEntry() throws Exception { + assertThat(builder.set("key", "value").asDictionary(), hasEntry("key", "value")); + } + + @Test + public void shouldAddAllFromDictionary() throws Exception { + Map parameters = new HashMap<>(); + parameters.put("key", "value"); + assertThat(builder.addAll(parameters).asDictionary(), hasEntry("key", "value")); + } + + @Test + public void shouldDoNothingWhenAddingNullParameters() throws Exception { + assertThat(builder.addAll(null).asDictionary(), hasEntry("scope", ParameterBuilder.SCOPE_OPENID)); + } + + @Test + public void shouldProvideADictionaryCopy() throws Exception { + Map parameters = builder.setClientId(CLIENT_ID).asDictionary(); + builder.set("key", "value"); + assertThat(parameters, not(hasEntry("key", "value"))); + } + + @Test + public void shouldProvideAnImmutableDictionary() throws Exception { + Map parameters = builder.setClientId(CLIENT_ID).asDictionary(); + try { + parameters.put("key", "value"); + } catch (Exception e) { + assertThat(e.getClass().getName(), is(equalTo(UnsupportedOperationException.class.getName()))); + } + } + + private static Matcher> hasEntry(String key, Object value) { + return Matchers.hasEntry(key, value); + } +} diff --git a/auth0/src/test/java/com/auth0/request/internal/BaseRequestTest.java b/auth0/src/test/java/com/auth0/request/internal/BaseRequestTest.java new file mode 100644 index 000000000..8ee2683cd --- /dev/null +++ b/auth0/src/test/java/com/auth0/request/internal/BaseRequestTest.java @@ -0,0 +1,105 @@ +/* + * BaseRequestTest.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.request.internal; + + +import com.auth0.Auth0Exception; +import com.auth0.RequestBodyBuildException; +import com.auth0.callback.BaseCallback; +import com.fasterxml.jackson.databind.ObjectReader; +import com.fasterxml.jackson.databind.ObjectWriter; +import com.squareup.okhttp.HttpUrl; +import com.squareup.okhttp.OkHttpClient; +import com.squareup.okhttp.Request; +import com.squareup.okhttp.Response; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Captor; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +import java.io.IOException; + +import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; + +public class BaseRequestTest { + + private BaseRequest baseRequest; + + @Mock + private BaseCallback callback; + @Mock + private Auth0Exception throwable; + @Mock + private OkHttpClient client; + @Mock + private ObjectReader reader; + @Mock + private ObjectReader errorReader; + @Mock + private ObjectWriter writer; + @Captor + private ArgumentCaptor captor; + + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + HttpUrl url = HttpUrl.parse("https://auth0.com"); + baseRequest = new BaseRequest(url, client, reader, errorReader, writer, callback) { + @Override + public String execute() throws Auth0Exception { + return null; + } + + @Override + public void onResponse(Response response) throws IOException { + + } + + @Override + protected Request doBuildRequest(Request.Builder builder) throws RequestBodyBuildException { + return null; + } + }; + } + + @Test + public void shouldPostOnSuccess() throws Exception { + baseRequest.postOnSuccess("OK"); + verify(callback).onSuccess(eq("OK")); + verifyNoMoreInteractions(callback); + } + + @Test + public void shouldPostOnFailure() throws Exception { + baseRequest.postOnFailure(throwable); + verify(callback).onFailure(eq(throwable)); + verifyNoMoreInteractions(callback); + } +} \ No newline at end of file diff --git a/auth0/src/test/java/com/auth0/util/AuthenticationAPI.java b/auth0/src/test/java/com/auth0/util/AuthenticationAPI.java new file mode 100644 index 000000000..429722bb2 --- /dev/null +++ b/auth0/src/test/java/com/auth0/util/AuthenticationAPI.java @@ -0,0 +1,185 @@ +/* + * AuthenticationAPI.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.util; + +import com.squareup.okhttp.mockwebserver.MockResponse; +import com.squareup.okhttp.mockwebserver.MockWebServer; +import com.squareup.okhttp.mockwebserver.RecordedRequest; + +import java.io.IOException; + +public class AuthenticationAPI { + + public static final String REFRESH_TOKEN = "REFRESH_TOKEN"; + public static final String ID_TOKEN = "ID_TOKEN"; + public static final String ACCESS_TOKEN = "ACCESS_TOKEN"; + public static final String BEARER = "BEARER"; + public static final String GENERIC_TOKEN = "GENERIC_TOKEN"; + public static final String NEW_ID_TOKEN = "NEW_ID_TOKEN"; + public static final String TOKEN_TYPE = "TOKEN_TYPE"; + public static final int EXPIRES_IN = 1234567890; + + private MockWebServer server; + + public AuthenticationAPI() throws IOException { + this.server = new MockWebServer(); + this.server.start(); + } + + public String getDomain() { + return server.url("/").toString(); + } + + public void shutdown() throws IOException { + this.server.shutdown(); + } + + public RecordedRequest takeRequest() throws InterruptedException { + return server.takeRequest(); + } + + public AuthenticationAPI willReturnValidApplicationResponse() { + return willReturnApplicationResponseWithBody("Auth0.setClient({\"id\":\"CLIENTID\",\"tenant\":\"overmind\",\"subscription\":\"free\",\"authorize\":\"https://samples.auth0.com/authorize\",\"callback\":\"http://localhost:3000/\",\"hasAllowedOrigins\":true,\"strategies\":[{\"name\":\"twitter\",\"connections\":[{\"name\":\"twitter\"}]}]});", 200); + } + + public AuthenticationAPI willReturnSuccessfulChangePassword() { + server.enqueue(responseWithJSON("NOT REALLY A JSON", 200)); + return this; + } + + public AuthenticationAPI willReturnSuccessfulUnlinkAccount() { + server.enqueue(responseWithJSON("NOT REALLY A JSON", 200)); + return this; + } + + public AuthenticationAPI willReturnGenericDelegationToken() { + String json = "{\n" + + " \"token\": \"" + GENERIC_TOKEN + "\"\n" + + "}"; + server.enqueue(responseWithJSON(json, 200)); + return this; + } + + public AuthenticationAPI willReturnSuccessfulPasswordlessStart() { + String json = "{\n" + + " \"phone+number\": \"+1098098098\"\n" + + "}"; + server.enqueue(responseWithJSON(json, 200)); + return this; + } + + public AuthenticationAPI willReturnNewIdToken() { + String json = "{\n" + + " \"id_token\": \"" + NEW_ID_TOKEN + "\",\n" + + " \"expires_in\": " + EXPIRES_IN + ",\n" + + " \"token_type\": \"" + TOKEN_TYPE + "\"\n" + + "}"; + server.enqueue(responseWithJSON(json, 200)); + return this; + } + + public AuthenticationAPI willReturnSuccessfulSignUp() { + String json = "{\n" + + " \"_id\": \"gjsmgdkjs72jljsf2dsdhh\", \n" + + " \"email\": \"support@auth0.com\", \n" + + " \"email_verified\": false, \n" + + " \"username\": \"support\"\n" + + "}"; + server.enqueue(responseWithJSON(json, 200)); + return this; + } + + public AuthenticationAPI willReturnSuccessfulLogin() { + String json = "{\n" + + " \"refresh_token\": \"" + REFRESH_TOKEN + "\",\n" + + " \"id_token\": \"" + ID_TOKEN + "\",\n" + + " \"access_token\": \"" + ACCESS_TOKEN + "\",\n" + + " \"token_type\": \"" + BEARER + "\"\n" + + "}"; + server.enqueue(responseWithJSON(json, 200)); + return this; + } + + public AuthenticationAPI willReturnFailedLogin() { + String json = "{\n" + + " \"error\": \"invalid_request\",\n" + + " \"error_description\": \"a random error\"\n" + + "}"; + server.enqueue(responseWithJSON(json, 400)); + return this; + } + + public AuthenticationAPI willReturnTokenInfo() { + String json = "{\n" + + " \"email\": \"p@p.xom\",\n" + + " \"email_verified\": false,\n" + + " \"picture\": \"https://secure.gravatar.com/avatar/cfacbe113a96fdfc85134534771d88b4?s=480&r=pg&d=https%3A%2F%2Fssl.gstatic.com%2Fs2%2Fprofiles%2Fimages%2Fsilhouette80.png\",\n" + + " \"user_id\": \"auth0|53b995f8bce68d9fc900099c\",\n" + + " \"name\": \"p@p.xom\",\n" + + " \"nickname\": \"p\",\n" + + " \"identities\": [\n" + + " {\n" + + " \"user_id\": \"53b995f8bce68d9fc900099c\",\n" + + " \"provider\": \"auth0\",\n" + + " \"connection\": \"Username-Password-Authentication\",\n" + + " \"isSocial\": false\n" + + " }\n" + + " ],\n" + + " \"created_at\": \"2014-07-06T18:33:49.005Z\",\n" + + " \"username\": \"p\",\n" + + " \"updated_at\": \"2015-09-30T19:43:48.499Z\"\n" + + "}"; + server.enqueue(responseWithJSON(json, 200)); + return this; + } + + public AuthenticationAPI willReturnTokens() { + String json = "{\"" + + "access_token\": \"" + ACCESS_TOKEN + "\"," + + "\"refresh_token\": \"" + REFRESH_TOKEN + "\"," + + "\"id_token\":\"" + ID_TOKEN + "\"," + + "\"token_type\":\"Bearer\"" + + "}"; + server.enqueue(responseWithJSON(json, 200)); + return this; + } + + public AuthenticationAPI willReturnApplicationResponseWithBody(String body, int statusCode) { + MockResponse response = new MockResponse() + .setResponseCode(statusCode) + .addHeader("Content-Type", "application/x-javascript") + .setBody(body); + server.enqueue(response); + return this; + } + + private MockResponse responseWithJSON(String json, int statusCode) { + return new MockResponse() + .setResponseCode(statusCode) + .addHeader("Content-Type", "application/json") + .setBody(json); + } + +} diff --git a/auth0/src/test/java/com/auth0/util/CallbackMatcher.java b/auth0/src/test/java/com/auth0/util/CallbackMatcher.java new file mode 100644 index 000000000..59e2fb4ad --- /dev/null +++ b/auth0/src/test/java/com/auth0/util/CallbackMatcher.java @@ -0,0 +1,87 @@ +/* + * CallbackMatcher.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.util; + +import com.jayway.awaitility.core.ConditionTimeoutException; + +import org.hamcrest.BaseMatcher; +import org.hamcrest.Description; +import org.hamcrest.Matcher; + +import static com.jayway.awaitility.Awaitility.await; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.isA; +import static org.hamcrest.Matchers.notNullValue; +import static org.hamcrest.Matchers.nullValue; + +public class CallbackMatcher extends BaseMatcher> { + private final Matcher payloadMatcher; + private final Matcher errorMatcher; + + public CallbackMatcher( Matcher payloadMatcher, Matcher errorMatcher) { + this.payloadMatcher = payloadMatcher; + this.errorMatcher = errorMatcher; + } + + @Override + @SuppressWarnings("unchecked") + public boolean matches(Object item) { + MockBaseCallback callback = (MockBaseCallback) item; + try { + await().until(callback.payload(), payloadMatcher); + await().until(callback.error(), errorMatcher); + return true; + } catch (ConditionTimeoutException e) { + return false; + } + } + + @Override + public void describeTo(Description description) { + description + .appendText("successful method be called"); + } + + public static Matcher> hasPayloadOfType(Class clazz) { + return new CallbackMatcher<>(isA(clazz), is(nullValue(Throwable.class))); + } + + public static Matcher> hasPayload(T payload) { + return new CallbackMatcher<>(equalTo(payload), is(nullValue(Throwable.class))); + } + + public static Matcher> hasNoPayloadOfType(Class clazz) { + return new CallbackMatcher<>(is(nullValue(clazz)), is(notNullValue(Throwable.class))); + } + + public static Matcher> hasNoError() { + return new CallbackMatcher<>(is(nullValue(Void.class)), is(nullValue(Throwable.class))); + } + + public static Matcher> hasError() { + return new CallbackMatcher<>(is(nullValue(Void.class)), is(notNullValue(Throwable.class))); + } +} diff --git a/auth0/src/test/java/com/auth0/util/MockBaseCallback.java b/auth0/src/test/java/com/auth0/util/MockBaseCallback.java new file mode 100644 index 000000000..ab521780b --- /dev/null +++ b/auth0/src/test/java/com/auth0/util/MockBaseCallback.java @@ -0,0 +1,64 @@ +/* + * MockBaseCallback.java + * + * Copyright (c) 2015 Auth0 (http://auth0.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package com.auth0.util; + +import com.auth0.Auth0Exception; +import com.auth0.callback.BaseCallback; + +import java.util.concurrent.Callable; + +public class MockBaseCallback implements BaseCallback { + + private T payload; + private Auth0Exception error; + + @Override + public void onSuccess(T payload) { + this.payload = payload; + } + + @Override + public void onFailure(Auth0Exception error) { + this.error = error; + } + + public Callable payload() { + return new Callable() { + @Override + public T call() throws Exception { + return payload; + } + }; + } + + public Callable error() { + return new Callable() { + @Override + public Auth0Exception call() throws Exception { + return error; + } + }; + } +} diff --git a/auth0/src/test/java/com/auth0/util/TelemetryTest.java b/auth0/src/test/java/com/auth0/util/TelemetryTest.java new file mode 100644 index 000000000..015c9dbce --- /dev/null +++ b/auth0/src/test/java/com/auth0/util/TelemetryTest.java @@ -0,0 +1,30 @@ +package com.auth0.util; + +import org.junit.Before; +import org.junit.Test; + +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.notNullValue; +import static org.hamcrest.Matchers.nullValue; +import static org.junit.Assert.assertThat; + +public class TelemetryTest { + + private Telemetry telemetry; + + @Before + public void setUp() throws Exception { + telemetry = new Telemetry("auth0-java", "1.0.0"); + } + + @Test + public void shouldReturnBase64() throws Exception { + assertThat(telemetry.getValue(), is(notNullValue())); + } + + @Test + public void shouldReturnNullWhenNoInfoIsProvided() throws Exception { + telemetry = new Telemetry(null, null); + assertThat(telemetry.getValue(), is(nullValue())); + } +} \ No newline at end of file diff --git a/bintray.gradle b/bintray.gradle new file mode 100644 index 000000000..c1519981e --- /dev/null +++ b/bintray.gradle @@ -0,0 +1,32 @@ +if (hasProperty('bintray.user') && hasProperty('bintray.key') && hasProperty('bintray.gpg.password')) { + def bintrayUser = getProperty('bintray.user') + def bintrayApiKey = getProperty('bintray.key') + def bintrayPassphrase = getProperty('bintray.gpg.password') + apply plugin: 'com.jfrog.bintray' + bintray { + user = bintrayUser + key = bintrayApiKey + configurations = ['archives'] + dryRun = project.version.endsWith("-SNAPSHOT") + publish = false + pkg { + repo = 'lock-android' + name = project.name + desc = 'Java client library for the Auth0 platform' + websiteUrl = 'https://github.com/auth0/auth0-api-java' + vcsUrl = 'scm:git@github.com:auth0/auth0-api-java.git' + licenses = ["MIT"] + userOrg = 'auth0' + publish = false + version { + gpg { + sign = true + passphrase = bintrayPassphrase + } + vcsTag = project.version + name = project.version + released = new Date() + } + } + } +} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 92aeb6f7e..763870fb8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,72 +1,19 @@ -plugins { - id 'java-library' - id 'maven-publish' - id 'com.diffplug.spotless' version '6.11.0' - id 'io.github.gradle-nexus.publish-plugin' version '2.0.0' -} - -repositories { - mavenCentral() - maven { - url 'https://s01.oss.sonatype.org/content/repositories/releases/' - } -} - -apply from: rootProject.file('gradle/versioning.gradle') - -version = getVersionFromFile() -group = GROUP - -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.18.2' - api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2' - api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2' - - // 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 'net.jodah:failsafe:2.4.4' - - // Test dependencies - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' - testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2' - testImplementation 'org.mockito:mockito-core:4.11.0' - testImplementation 'com.squareup.okhttp3:mockwebserver:5.2.1' - testImplementation 'org.hamcrest:hamcrest:2.2' -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(8) - } -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -tasks.withType(Javadoc) { - failOnError false - options.addStringOption('Xdoclint:none', '-quiet') -} +allprojects { + group = 'com.auth0' -spotless { - java { - palantirJavaFormat() - } + repositories { + jcenter() + } } +buildscript { + repositories { + jcenter() + } -test { - useJUnitPlatform() - testLogging { - showStandardStreams = true - } + dependencies { + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6' + } } -apply from: rootProject.file('gradle/maven-publish.gradle') diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index cb426bef4..000000000 --- a/gradle.properties +++ /dev/null @@ -1,21 +0,0 @@ -GROUP=com.auth0 -POM_ARTIFACT_ID=auth0 -VERSION_NAME=3.0.0 - -POM_NAME=auth0-java -POM_DESCRIPTION=Java client library for the Auth0 platform -POM_PACKAGING=jar - -POM_URL=https://github.com/auth0/auth0-java -POM_SCM_URL=https://github.com/auth0/auth0-java - -POM_SCM_CONNECTION=scm:git:https://github.com/auth0/auth0-java.git -POM_SCM_DEV_CONNECTION=scm:git:https://github.com/auth0/auth0-java.git - -POM_LICENCE_NAME=The MIT License (MIT) -POM_LICENCE_URL=https://raw.githubusercontent.com/auth0/auth0-java/master/LICENSE -POM_LICENCE_DIST=repo - -POM_DEVELOPER_ID=auth0 -POM_DEVELOPER_NAME=Auth0 -POM_DEVELOPER_EMAIL=oss@auth0.com diff --git a/gradle/maven-publish.gradle b/gradle/maven-publish.gradle deleted file mode 100644 index 0b16478d5..000000000 --- a/gradle/maven-publish.gradle +++ /dev/null @@ -1,101 +0,0 @@ -apply plugin: 'maven-publish' -apply plugin: 'signing' - -task('sourcesJar', type: Jar, dependsOn: classes) { - archiveClassifier = 'sources' - from sourceSets.main.allSource -} - -task('javadocJar', type: Jar, dependsOn: javadoc) { - archiveClassifier = 'javadoc' - from javadoc.getDestinationDir() -} -tasks.withType(Javadoc).configureEach { - javadocTool = javaToolchains.javadocToolFor { - // Use latest JDK for javadoc generation - languageVersion = JavaLanguageVersion.of(17) - } -} - -javadoc { - // Specify the Java version that the project will use - options.addStringOption('-release', "8") -} -artifacts { - archives sourcesJar, javadocJar -} - -publishing { - publications { - mavenJava(MavenPublication) { - from components.java - - artifact sourcesJar - artifact javadocJar - - groupId = GROUP - artifactId = POM_ARTIFACT_ID - version = project.version - - pom { - name = POM_NAME - packaging = POM_PACKAGING - description = POM_DESCRIPTION - url = POM_URL - - licenses { - license { - name = POM_LICENCE_NAME - url = POM_LICENCE_URL - distribution = POM_LICENCE_DIST - } - } - - developers { - developer { - id = POM_DEVELOPER_ID - name = POM_DEVELOPER_NAME - email = POM_DEVELOPER_EMAIL - } - } - - scm { - url = POM_SCM_URL - connection = POM_SCM_CONNECTION - developerConnection = POM_SCM_DEV_CONNECTION - } - } - } - } -} - -nexusPublishing { - repositories { - sonatype { - nexusUrl.set(uri('https://ossrh-staging-api.central.sonatype.com/service/local/')) - snapshotRepositoryUrl.set(uri('https://central.sonatype.com/repository/maven-snapshots/')) - username.set(System.getenv("MAVEN_USERNAME")) - password.set(System.getenv("MAVEN_PASSWORD")) - } - } -} - -signing { - def signingKey = System.getenv("SIGNING_KEY") - def signingPassword = System.getenv("SIGNING_PASSWORD") - useInMemoryPgpKeys(signingKey, signingPassword) - - sign publishing.publications.mavenJava -} - -javadoc { - if(JavaVersion.current().isJava9Compatible()) { - options.addBooleanOption('html5', true) - } -} - -tasks.named('publish').configure { - dependsOn tasks.named('assemble') -} - - diff --git a/gradle/versioning.gradle b/gradle/versioning.gradle deleted file mode 100644 index 9a8dae58d..000000000 --- a/gradle/versioning.gradle +++ /dev/null @@ -1,17 +0,0 @@ -def getVersionFromFile() { - def versionFile = rootProject.file('.version') - return versionFile.text.readLines().first().trim() -} - -def isSnapshot() { - return hasProperty('isSnapshot') ? isSnapshot.toBoolean() : true -} - -def getVersionName() { - return isSnapshot() ? project.version+"-SNAPSHOT" : project.version -} - -ext { - getVersionName = this.&getVersionName - getVersionFromFile = this.&getVersionFromFile -} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 1b33c55ba..30d399d8d 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ff23a68d7..d8447f52b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,6 @@ +#Thu Jan 07 16:57:31 ART 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip -networkTimeout=10000 -validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-all.zip diff --git a/gradlew b/gradlew index 23d15a936..91a7e269e 100755 --- a/gradlew +++ b/gradlew @@ -1,129 +1,79 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# +#!/usr/bin/env bash ############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# +## +## Gradle start up script for UN*X +## ############################################################################## -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum +MAX_FD="maximum" -warn () { +warn ( ) { echo "$*" -} >&2 +} -die () { +die ( ) { echo echo "$*" echo exit 1 -} >&2 +} # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; esac -CLASSPATH="\\\"\\\"" +# For Cygwin, ensure paths are in UNIX format before anything is touched. +if $cygwin ; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +fi +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java + JAVACMD="$JAVA_HOME/jre/sh/java" else - JAVACMD=$JAVA_HOME/bin/java + JAVACMD="$JAVA_HOME/bin/java" fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -132,120 +82,83 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." - fi fi # Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi fi -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg + i=$((i+1)) done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac fi +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, -# and any embedded shellness will be escaped. -# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be -# treated as '${Hostname}' itself on the command line. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradlew.bat b/gradlew.bat index 5eed7ee84..8a0b282aa 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,94 +1,90 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH= - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/maven.gradle b/maven.gradle new file mode 100644 index 000000000..2cd60b22e --- /dev/null +++ b/maven.gradle @@ -0,0 +1,37 @@ +apply plugin: 'maven' + +install { + repositories.mavenInstaller { + pom { + project { + packaging 'jar' + artifactId 'auth0' + + name 'Auth0' + description 'Java client library for the Auth0 platform' + url 'https://github.com/auth0/auth0-api-java' + + licenses { + license { + name 'The MIT License (MIT)' + url 'https://raw.githubusercontent.com/auth0/auth0-api-java/master/LICENSE' + distribution 'repo' + } + } + developers { + developer { + id 'hzalaz' + name 'Hernan Zalazar' + email 'hernan@auth0.com' + } + } + scm { + connection 'scm:git@github.com:auth0/auth0-api-java.git' + developerConnection 'scm:git@github.com:auth0/auth0-api-java.git' + url 'https://github.com/auth0/auth0-api-java' + + } + } + } + } +} \ No newline at end of file diff --git a/opslevel.yml b/opslevel.yml deleted file mode 100644 index 009a5ec0b..000000000 --- a/opslevel.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -version: 1 -repository: - owner: dx_sdks - tier: - tags: diff --git a/reference.md b/reference.md deleted file mode 100644 index 34677d5d9..000000000 --- a/reference.md +++ /dev/null @@ -1,30058 +0,0 @@ -# Reference -## Actions -
client.actions.list() -> SyncPagingIterable&lt;Action&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve all actions. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().list( - ListActionsRequestParameters - .builder() - .triggerId( - OptionalNullable.of("triggerId") - ) - .actionName( - OptionalNullable.of("actionName") - ) - .deployed( - OptionalNullable.of(true) - ) - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .installed( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**triggerId:** `Optional` — An actions extensibility point. - -
-
- -
-
- -**actionName:** `Optional` — The name of the action to retrieve. - -
-
- -
-
- -**deployed:** `Optional` — Optional filter to only retrieve actions that are deployed. - -
-
- -
-
- -**page:** `Optional` — Use this field to request a specific page of the list results. - -
-
- -
-
- -**perPage:** `Optional` — The maximum number of results to be returned by the server in single response. 20 by default - -
-
- -
-
- -**installed:** `Optional` — Optional. When true, return only installed actions. When false, return only custom actions. Returns all actions by default. - -
-
-
-
- - -
-
-
- -
client.actions.create(request) -> CreateActionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create an action. Once an action is created, it must be deployed, and then bound to a trigger before it will be executed as part of a flow. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().create( - CreateActionRequestContent - .builder() - .name("name") - .supportedTriggers( - Arrays.asList( - ActionTrigger - .builder() - .id("id") - .build() - ) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `String` — The name of an action. - -
-
- -
-
- -**supportedTriggers:** `List` — The list of triggers that this action supports. At this time, an action can only target a single trigger at a time. - -
-
- -
-
- -**code:** `Optional` — The source code of the action. - -
-
- -
-
- -**dependencies:** `Optional>` — The list of third party npm modules, and their versions, that this action depends on. - -
-
- -
-
- -**runtime:** `Optional` — The Node runtime. For example: `node22`, defaults to `node22` - -
-
- -
-
- -**secrets:** `Optional>` — The list of secrets that are included in an action or a version of an action. - -
-
- -
-
- -**modules:** `Optional>` — The list of action modules and their versions used by this action. - -
-
- -
-
- -**deploy:** `Optional` — True if the action should be deployed after creation. - -
-
-
-
- - -
-
-
- -
client.actions.get(id) -> GetActionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve an action by its ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the action to retrieve. - -
-
-
-
- - -
-
-
- -
client.actions.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().delete( - "id", - DeleteActionRequestParameters - .builder() - .force( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the action to delete. - -
-
- -
-
- -**force:** `Optional` — Force action deletion detaching bindings - -
-
-
-
- - -
-
-
- -
client.actions.update(id, request) -> UpdateActionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update an existing action. If this action is currently bound to a trigger, updating it will not affect any user flows until the action is deployed. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().update( - "id", - UpdateActionRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the action to update. - -
-
- -
-
- -**name:** `Optional` — The name of an action. - -
-
- -
-
- -**supportedTriggers:** `Optional>` — The list of triggers that this action supports. At this time, an action can only target a single trigger at a time. - -
-
- -
-
- -**code:** `Optional` — The source code of the action. - -
-
- -
-
- -**dependencies:** `Optional>` — The list of third party npm modules, and their versions, that this action depends on. - -
-
- -
-
- -**runtime:** `Optional` — The Node runtime. For example: `node22`, defaults to `node22` - -
-
- -
-
- -**secrets:** `Optional>` — The list of secrets that are included in an action or a version of an action. - -
-
- -
-
- -**modules:** `Optional>` — The list of action modules and their versions used by this action. - -
-
-
-
- - -
-
-
- -
client.actions.deploy(id) -> DeployActionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Deploy an action. Deploying an action will create a new immutable version of the action. If the action is currently bound to a trigger, then the system will begin executing the newly deployed version of the action immediately. Otherwise, the action will only be executed as a part of a flow once it is bound to that flow. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().deploy("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of an action. - -
-
-
-
- - -
-
-
- -
client.actions.test(id, request) -> TestActionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Test an action. After updating an action, it can be tested prior to being deployed to ensure it behaves as expected. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().test( - "id", - TestActionRequestContent - .builder() - .payload( - new HashMap() {{ - put("key", "value"); - }} - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the action to test. - -
-
- -
-
- -**payload:** `Map` - -
-
-
-
- - -
-
-
- -## Branding -
client.branding.get() -> GetBrandingResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve branding settings. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().get(); -``` -
-
-
-
- - -
-
-
- -
client.branding.update(request) -> UpdateBrandingResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update branding settings. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().update( - UpdateBrandingRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**colors:** `Optional` - -
-
- -
-
- -**faviconUrl:** `Optional` — URL for the favicon. Must use HTTPS. - -
-
- -
-
- -**logoUrl:** `Optional` — URL for the logo. Must use HTTPS. - -
-
- -
-
- -**font:** `Optional` - -
-
-
-
- - -
-
-
- -## ClientGrants -
client.clientGrants.list() -> SyncPagingIterable&lt;ClientGrantResponseContent&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a list of client grants, including the scopes associated with the application/API pair. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -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) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
- -
-
- -**audience:** `Optional` — Optional filter on audience. - -
-
- -
-
- -**clientId:** `Optional` — Optional filter on client_id. - -
-
- -
-
- -**allowAnyOrganization:** `Optional` — Optional filter on allow_any_organization. - -
-
- -
-
- -**subjectType:** `Optional` — The type of application access the client grant allows. - -
-
-
-
- - -
-
-
- -
client.clientGrants.create(request) -> CreateClientGrantResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a client grant for a machine-to-machine login flow. To learn more, read Client Credential Flow. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.clientGrants().create( - CreateClientGrantRequestContent - .builder() - .clientId("client_id") - .audience("audience") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**clientId:** `String` — ID of the client. - -
-
- -
-
- -**audience:** `String` — The audience (API identifier) of this client grant - -
-
- -
-
- -**organizationUsage:** `Optional` - -
-
- -
-
- -**allowAnyOrganization:** `Optional` — If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations. - -
-
- -
-
- -**scope:** `Optional>` — Scopes allowed for this client grant. - -
-
- -
-
- -**subjectType:** `Optional` - -
-
- -
-
- -**authorizationDetailsTypes:** `Optional>` — Types of authorization_details allowed for this client grant. - -
-
- -
-
- -**allowAllScopes:** `Optional` — If enabled, all scopes configured on the resource server are allowed for this grant. - -
-
-
-
- - -
-
-
- -
client.clientGrants.get(id) -> GetClientGrantResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a single client grant, including the -scopes associated with the application/API pair. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.clientGrants().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the client grant to retrieve. - -
-
-
-
- - -
-
-
- -
client.clientGrants.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete the Client Credential Flow from your machine-to-machine application. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.clientGrants().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the client grant to delete. - -
-
-
-
- - -
-
-
- -
client.clientGrants.update(id, request) -> UpdateClientGrantResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update a client grant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.clientGrants().update( - "id", - UpdateClientGrantRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the client grant to update. - -
-
- -
-
- -**scope:** `Optional>` — Scopes allowed for this client grant. - -
-
- -
-
- -**organizationUsage:** `Optional` - -
-
- -
-
- -**allowAnyOrganization:** `Optional` — Controls allowing any organization to be used with this grant - -
-
- -
-
- -**authorizationDetailsTypes:** `Optional>` — Types of authorization_details allowed for this client grant. - -
-
- -
-
- -**allowAllScopes:** `Optional` — If enabled, all scopes configured on the resource server are allowed for this grant. - -
-
-
-
- - -
-
-
- -## Clients -
client.clients.list() -> SyncPagingIterable&lt;Client&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified. -For more information, read Applications in Auth0 and Single Sign-On. - -
    -
  • - The following can be retrieved with any scope: - client_id, app_type, name, and description. -
  • -
  • - The following properties can only be retrieved with the read:clients or - read:client_keys scope: - callbacks, oidc_logout, allowed_origins, - web_origins, tenant, global, config_route, - callback_url_template, jwt_configuration, - 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_codeview, resource_servers, client_metadata, - mobile, mobile.android, mobile.ios, allowed_logout_urls, - token_endpoint_auth_method, is_first_party, oidc_conformant, - is_token_endpoint_ip_header_trusted, initiate_login_uri, grant_types, - refresh_token, refresh_token.rotation_type, refresh_token.expiration_type, - refresh_token.leeway, refresh_token.token_lifetime, refresh_token.policies, organization_usage, - organization_require_behavior. -
  • -
  • - The following properties can only be retrieved with the - read:client_keys or read:client_credentials scope: - encryption_key, encryption_key.pub, encryption_key.cert, - client_secret, client_authentication_methods and signing_key. -
  • -
-
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -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") - ) - .q( - OptionalNullable.of("q") - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**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. - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. Default value is 50, maximum value is 100 - -
-
- -
-
- -**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). - -
-
- -
-
- -**isGlobal:** `Optional` — Optional filter on the global client parameter. - -
-
- -
-
- -**isFirstParty:** `Optional` — Optional filter on whether or not a client is a first-party client. - -
-
- -
-
- -**appType:** `Optional` — Optional filter by a comma-separated list of application types. - -
-
- -
-
- -**q:** `Optional` — Advanced Query in Lucene syntax.
Permitted Queries:
  • client_grant.organization_id:{organization_id}
  • client_grant.allow_any_organization:true
Additional Restrictions:
  • Cannot be used in combination with other filters
  • Requires use of the from and take paging parameters (checkpoint paginatinon)
  • Reduced rate limits apply. See Rate Limit Configurations
Note: Recent updates may not be immediately reflected in query results - -
-
-
-
- - -
-
-
- -
client.clients.create(request) -> CreateClientResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a new client (application or SSO integration). For more information, read Create Applications -API Endpoints for Single Sign-On. - -Notes: -- We recommend leaving the `client_secret` parameter unspecified to allow the generation of a safe secret. -- The client_authentication_methods and token_endpoint_auth_method properties are mutually exclusive. Use -client_authentication_methods to configure the client with Private Key JWT authentication method. Otherwise, use token_endpoint_auth_method -to configure the client with client secret (basic or post) or with no authentication method (none). -- When using client_authentication_methods to configure the client with Private Key JWT authentication method, specify fully defined credentials. -These credentials will be automatically enabled for Private Key JWT authentication on the client. -- To configure client_authentication_methods, the create:client_credentials scope is required. -- To configure client_authentication_methods, the property jwt_configuration.alg must be set to RS256. - -
SSO Integrations created via this endpoint will accept login requests and share user profile information.
-
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.clients().create( - CreateClientRequestContent - .builder() - .name("name") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `String` — Name of this client (min length: 1 character, does not allow `<` or `>`). - -
-
- -
-
- -**description:** `Optional` — Free text description of this client (max length: 140 characters). - -
-
- -
-
- -**logoUri:** `Optional` — URL of the logo to display for this client. Recommended size is 150x150 pixels. - -
-
- -
-
- -**callbacks:** `Optional>` — Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication. - -
-
- -
-
- -**oidcLogout:** `Optional` - -
-
- -
-
- -**oidcBackchannelLogout:** `Optional` - -
-
- -
-
- -**sessionTransfer:** `Optional` - -
-
- -
-
- -**allowedOrigins:** `Optional>` — 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. - -
-
- -
-
- -**webOrigins:** `Optional>` — Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode. - -
-
- -
-
- -**clientAliases:** `Optional>` — List of audiences/realms for SAML protocol. Used by the wsfed addon. - -
-
- -
-
- -**allowedClients:** `Optional>` — List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed. - -
-
- -
-
- -**allowedLogoutUrls:** `Optional>` — Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains. - -
-
- -
-
- -**grantTypes:** `Optional>` — 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`. - -
-
- -
-
- -**tokenEndpointAuthMethod:** `Optional` - -
-
- -
-
- -**isTokenEndpointIpHeaderTrusted:** `Optional` — 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. - -
-
- -
-
- -**appType:** `Optional` - -
-
- -
-
- -**isFirstParty:** `Optional` — Whether this client a first party client or not - -
-
- -
-
- -**oidcConformant:** `Optional` — Whether this client conforms to strict OIDC specifications (true) or uses legacy features (false). - -
-
- -
-
- -**jwtConfiguration:** `Optional` - -
-
- -
-
- -**encryptionKey:** `Optional` - -
-
- -
-
- -**sso:** `Optional` — Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false). - -
-
- -
-
- -**crossOriginAuthentication:** `Optional` — Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false). - -
-
- -
-
- -**crossOriginLoc:** `Optional` — 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. - -
-
- -
-
- -**ssoDisabled:** `Optional` — true to disable Single Sign On, false otherwise (default: false) - -
-
- -
-
- -**customLoginPageOn:** `Optional` — true if the custom login page is to be used, false otherwise. Defaults to true - -
-
- -
-
- -**customLoginPage:** `Optional` — The content (HTML, CSS, JS) of the custom login page. - -
-
- -
-
- -**customLoginPagePreview:** `Optional` — The content (HTML, CSS, JS) of the custom login page. (Used on Previews) - -
-
- -
-
- -**formTemplate:** `Optional` — HTML form template to be used for WS-Federation. - -
-
- -
-
- -**addons:** `Optional` - -
-
- -
-
- -**clientMetadata:** `Optional>` - -
-
- -
-
- -**mobile:** `Optional` - -
-
- -
-
- -**initiateLoginUri:** `Optional` — Initiate login uri, must be https - -
-
- -
-
- -**nativeSocialLogin:** `Optional` - -
-
- -
-
- -**refreshToken:** `Optional` - -
-
- -
-
- -**defaultOrganization:** `Optional` - -
-
- -
-
- -**organizationUsage:** `Optional` - -
-
- -
-
- -**organizationRequireBehavior:** `Optional` - -
-
- -
-
- -**organizationDiscoveryMethods:** `Optional>` — Defines the available methods for organization discovery during the `pre_login_prompt`. Users can discover their organization either by `email`, `organization_name` or both. - -
-
- -
-
- -**clientAuthenticationMethods:** `Optional` - -
-
- -
-
- -**requirePushedAuthorizationRequests:** `Optional` — Makes the use of Pushed Authorization Requests mandatory for this client - -
-
- -
-
- -**requireProofOfPossession:** `Optional` — Makes the use of Proof-of-Possession mandatory for this client - -
-
- -
-
- -**signedRequestObject:** `Optional` - -
-
- -
-
- -**complianceLevel:** `Optional` - -
-
- -
-
- -**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`). -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. - -
-
- -
-
- -**tokenExchange:** `Optional` - -
-
- -
-
- -**parRequestExpiry:** `Optional` — Specifies how long, in seconds, a Pushed Authorization Request URI remains valid - -
-
- -
-
- -**tokenQuota:** `Optional` - -
-
- -
-
- -**resourceServerIdentifier:** `Optional` — The identifier of the resource server that this client is linked to. - -
-
- -
-
- -**expressConfiguration:** `Optional` - -
-
- -
-
- -**asyncApprovalNotificationChannels:** `Optional>` - -
-
-
-
- - -
-
-
- -
client.clients.get(id) -> GetClientResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -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. -
    -
  • - The following properties can be retrieved with any of the scopes: - client_id, app_type, name, and description. -
  • -
  • - The following properties can only be retrieved with the read:clients or - read:client_keys scopes: - callbacks, oidc_logout, allowed_origins, - web_origins, tenant, global, config_route, - callback_url_template, jwt_configuration, - 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_codeview, resource_servers, client_metadata, - mobile, mobile.android, mobile.ios, allowed_logout_urls, - token_endpoint_auth_method, is_first_party, oidc_conformant, - is_token_endpoint_ip_header_trusted, initiate_login_uri, grant_types, - refresh_token, refresh_token.rotation_type, refresh_token.expiration_type, - refresh_token.leeway, refresh_token.token_lifetime, refresh_token.policies, organization_usage, - organization_require_behavior. -
  • -
  • - The following properties can only be retrieved with the read:client_keys or read:client_credentials scopes: - encryption_key, encryption_key.pub, encryption_key.cert, - client_secret, client_authentication_methods and signing_key. -
  • -
-
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.clients().get( - "id", - GetClientRequestParameters - .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the client to retrieve. - -
-
- -
-
- -**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. - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). - -
-
-
-
- - -
-
-
- -
client.clients.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a client and related configuration (rules, connections, etc). -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.clients().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the client to delete. - -
-
-
-
- - -
-
-
- -
client.clients.update(id, request) -> UpdateClientResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Updates a client's settings. For more information, read Applications in Auth0 and Single Sign-On. - -Notes: -- The `client_secret` and `signing_key` attributes can only be updated with the `update:client_keys` scope. -- The client_authentication_methods and token_endpoint_auth_method properties are mutually exclusive. Use client_authentication_methods to configure the client with Private Key JWT authentication method. Otherwise, use token_endpoint_auth_method to configure the client with client secret (basic or post) or with no authentication method (none). -- When using client_authentication_methods to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client. -- To configure client_authentication_methods, the update:client_credentials scope is required. -- To configure client_authentication_methods, the property jwt_configuration.alg must be set to RS256. -- To change a client's is_first_party property to false, the organization_usage and organization_require_behavior properties must be unset. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.clients().update( - "id", - UpdateClientRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the client to update. - -
-
- -
-
- -**name:** `Optional` — The name of the client. Must contain at least one character. Does not allow '<' or '>'. - -
-
- -
-
- -**description:** `Optional` — Free text description of the purpose of the Client. (Max character length: 140) - -
-
- -
-
- -**clientSecret:** `Optional` — The secret used to sign tokens for the client - -
-
- -
-
- -**logoUri:** `Optional` — The URL of the client logo (recommended size: 150x150) - -
-
- -
-
- -**callbacks:** `Optional>` — A set of URLs that are valid to call back from Auth0 when authenticating users - -
-
- -
-
- -**oidcLogout:** `Optional` - -
-
- -
-
- -**oidcBackchannelLogout:** `Optional` - -
-
- -
-
- -**sessionTransfer:** `Optional` - -
-
- -
-
- -**allowedOrigins:** `Optional>` — A set of URLs that represents valid origins for CORS - -
-
- -
-
- -**webOrigins:** `Optional>` — A set of URLs that represents valid web origins for use with web message response mode - -
-
- -
-
- -**grantTypes:** `Optional>` — A set of grant types that the client is authorized to use. 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`. - -
-
- -
-
- -**clientAliases:** `Optional>` — List of audiences for SAML protocol - -
-
- -
-
- -**allowedClients:** `Optional>` — Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients - -
-
- -
-
- -**allowedLogoutUrls:** `Optional>` — URLs that are valid to redirect to after logout from Auth0. - -
-
- -
-
- -**jwtConfiguration:** `Optional` - -
-
- -
-
- -**encryptionKey:** `Optional` - -
-
- -
-
- -**sso:** `Optional` — true to use Auth0 instead of the IdP to do Single Sign On, false otherwise (default: false) - -
-
- -
-
- -**crossOriginAuthentication:** `Optional` — true if this client can be used to make cross-origin authentication requests, false otherwise if cross origin is disabled - -
-
- -
-
- -**crossOriginLoc:** `Optional` — URL for 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. - -
-
- -
-
- -**ssoDisabled:** `Optional` — true to disable Single Sign On, false otherwise (default: false) - -
-
- -
-
- -**customLoginPageOn:** `Optional` — true if the custom login page is to be used, false otherwise. - -
-
- -
-
- -**tokenEndpointAuthMethod:** `Optional` - -
-
- -
-
- -**isTokenEndpointIpHeaderTrusted:** `Optional` — 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. - -
-
- -
-
- -**appType:** `Optional` - -
-
- -
-
- -**isFirstParty:** `Optional` — Whether this client a first party client or not - -
-
- -
-
- -**oidcConformant:** `Optional` — Whether this client will conform to strict OIDC specifications - -
-
- -
-
- -**customLoginPage:** `Optional` — The content (HTML, CSS, JS) of the custom login page - -
-
- -
-
- -**customLoginPagePreview:** `Optional` - -
-
- -
-
- -**tokenQuota:** `Optional` - -
-
- -
-
- -**formTemplate:** `Optional` — Form template for WS-Federation protocol - -
-
- -
-
- -**addons:** `Optional` - -
-
- -
-
- -**clientMetadata:** `Optional>` - -
-
- -
-
- -**mobile:** `Optional` - -
-
- -
-
- -**initiateLoginUri:** `Optional` — Initiate login uri, must be https - -
-
- -
-
- -**nativeSocialLogin:** `Optional` - -
-
- -
-
- -**refreshToken:** `Optional` - -
-
- -
-
- -**defaultOrganization:** `Optional` - -
-
- -
-
- -**organizationUsage:** `Optional` - -
-
- -
-
- -**organizationRequireBehavior:** `Optional` - -
-
- -
-
- -**organizationDiscoveryMethods:** `Optional>` — Defines the available methods for organization discovery during the `pre_login_prompt`. Users can discover their organization either by `email`, `organization_name` or both. - -
-
- -
-
- -**clientAuthenticationMethods:** `Optional` - -
-
- -
-
- -**requirePushedAuthorizationRequests:** `Optional` — Makes the use of Pushed Authorization Requests mandatory for this client - -
-
- -
-
- -**requireProofOfPossession:** `Optional` — Makes the use of Proof-of-Possession mandatory for this client - -
-
- -
-
- -**signedRequestObject:** `Optional` - -
-
- -
-
- -**complianceLevel:** `Optional` - -
-
- -
-
- -**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`). -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. - -
-
- -
-
- -**tokenExchange:** `Optional` - -
-
- -
-
- -**parRequestExpiry:** `Optional` — Specifies how long, in seconds, a Pushed Authorization Request URI remains valid - -
-
- -
-
- -**expressConfiguration:** `Optional` - -
-
- -
-
- -**asyncApprovalNotificationChannels:** `Optional>` - -
-
-
-
- - -
-
-
- -
client.clients.rotateSecret(id) -> RotateClientSecretResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Rotate a client secret. - -This endpoint cannot be used with clients configured with Private Key JWT authentication method (client_authentication_methods configured with private_key_jwt). The generated secret is NOT base64 encoded. - -For more information, read Rotate Client Secrets. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.clients().rotateSecret("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the client that will rotate secrets. - -
-
-
-
- - -
-
-
- -## ConnectionProfiles -
client.connectionProfiles.list() -> SyncPagingIterable&lt;ConnectionProfile&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a list of Connection Profiles. This endpoint supports Checkpoint pagination. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.connectionProfiles().list( - ListConnectionProfileRequestParameters - .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 5. - -
-
-
-
- - -
-
-
- -
client.connectionProfiles.create(request) -> CreateConnectionProfileResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a Connection Profile. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.connectionProfiles().create( - CreateConnectionProfileRequestContent - .builder() - .name("name") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `String` - -
-
- -
-
- -**organization:** `Optional` - -
-
- -
-
- -**connectionNamePrefixTemplate:** `Optional` - -
-
- -
-
- -**enabledFeatures:** `Optional>` - -
-
- -
-
- -**connectionConfig:** `Optional` - -
-
- -
-
- -**strategyOverrides:** `Optional` - -
-
-
-
- - -
-
-
- -
client.connectionProfiles.listTemplates() -> ListConnectionProfileTemplateResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a list of Connection Profile Templates. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.connectionProfiles().listTemplates(); -``` -
-
-
-
- - -
-
-
- -
client.connectionProfiles.getTemplate(id) -> GetConnectionProfileTemplateResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a Connection Profile Template. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.connectionProfiles().getTemplate("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the connection-profile-template to retrieve. - -
-
-
-
- - -
-
-
- -
client.connectionProfiles.get(id) -> GetConnectionProfileResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details about a single Connection Profile specified by ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.connectionProfiles().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the connection-profile to retrieve. - -
-
-
-
- - -
-
-
- -
client.connectionProfiles.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a single Connection Profile specified by ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.connectionProfiles().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the connection-profile to delete. - -
-
-
-
- - -
-
-
- -
client.connectionProfiles.update(id, request) -> UpdateConnectionProfileResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update the details of a specific Connection Profile. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.connectionProfiles().update( - "id", - UpdateConnectionProfileRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the connection profile to update. - -
-
- -
-
- -**name:** `Optional` - -
-
- -
-
- -**organization:** `Optional` - -
-
- -
-
- -**connectionNamePrefixTemplate:** `Optional` - -
-
- -
-
- -**enabledFeatures:** `Optional>` - -
-
- -
-
- -**connectionConfig:** `Optional` - -
-
- -
-
- -**strategyOverrides:** `Optional` - -
-
-
-
- - -
-
-
- -## Connections -
client.connections.list() -> SyncPagingIterable&lt;ConnectionForList&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves detailed list of all connections that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. - -This endpoint supports two types of pagination: -
    -
  • Offset pagination
  • -
  • Checkpoint pagination
  • -
- -Checkpoint pagination must be used if you need to retrieve more than 1000 connections. - -

Checkpoint Pagination

- -To search by checkpoint, use the following parameters: -
    -
  • from: Optional id from which to start selection.
  • -
  • take: The total amount 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. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -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) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
- -
-
- -**strategy:** `Optional` — Provide strategies to only retrieve connections with such strategies - -
-
- -
-
- -**name:** `Optional` — Provide the name of the connection to retrieve - -
-
- -
-
- -**fields:** `Optional` — A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields - -
-
- -
-
- -**includeFields:** `Optional` — true if the fields specified are to be included in the result, false otherwise (defaults to true) - -
-
-
-
- - -
-
-
- -
client.connections.create(request) -> CreateConnectionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a new connection according to the JSON object received in body. - -Note: If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.connections().create( - CreateConnectionRequestContent - .builder() - .name("name") - .strategy(ConnectionIdentityProviderEnum.AD) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `String` — The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 - -
-
- -
-
- -**displayName:** `Optional` — Connection name used in the new universal login experience - -
-
- -
-
- -**strategy:** `ConnectionIdentityProviderEnum` - -
-
- -
-
- -**options:** `Optional` - -
-
- -
-
- -**enabledClients:** `Optional>` — DEPRECATED property. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. - -
-
- -
-
- -**isDomainConnection:** `Optional` — 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.) - -
-
- -
-
- -**showAsButton:** `Optional` — 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.) - -
-
- -
-
- -**realms:** `Optional>` — 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. - -
-
- -
-
- -**metadata:** `Optional>>` - -
-
- -
-
- -**authentication:** `Optional` - -
-
- -
-
- -**connectedAccounts:** `Optional` - -
-
-
-
- - -
-
-
- -
client.connections.get(id) -> GetConnectionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details for a specified connection along with options that can be used for identity provider configuration. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.connections().get( - "id", - GetConnectionRequestParameters - .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the connection to retrieve - -
-
- -
-
- -**fields:** `Optional` — A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields - -
-
- -
-
- -**includeFields:** `Optional` — true if the fields specified are to be included in the result, false otherwise (defaults to true) - -
-
-
-
- - -
-
-
- -
client.connections.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Removes a specific connection from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. - -Note: If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent create connection requests, if they use an identical connection name. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.connections().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the connection to delete - -
-
-
-
- - -
-
-
- -
client.connections.update(id, request) -> UpdateConnectionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -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 overriden. To avoid partial data or other issues, ensure all parameters are present when using this option. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.connections().update( - "id", - UpdateConnectionRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the connection to update - -
-
- -
-
- -**displayName:** `Optional` — The connection name used in the new universal login experience. If display_name is not included in the request, the field will be overwritten with the name value. - -
-
- -
-
- -**options:** `Optional` - -
-
- -
-
- -**enabledClients:** `Optional>` — DEPRECATED property. Use the PATCH /v2/connections/{id}/clients endpoint to enable or disable the connection for any clients. - -
-
- -
-
- -**isDomainConnection:** `Optional` — 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.) - -
-
- -
-
- -**showAsButton:** `Optional` — 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.) - -
-
- -
-
- -**realms:** `Optional>` — 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. - -
-
- -
-
- -**metadata:** `Optional>>` - -
-
- -
-
- -**authentication:** `Optional` - -
-
- -
-
- -**connectedAccounts:** `Optional` - -
-
-
-
- - -
-
-
- -
client.connections.checkStatus(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves the status of an ad/ldap connection referenced by its ID. 200 OK http status code response is returned when the connection is online, otherwise a 404 status code is returned along with an error message -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.connections().checkStatus("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the connection to check - -
-
-
-
- - -
-
-
- -## CustomDomains -
client.customDomains.list() -> List&lt;CustomDomain&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details on custom domains. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.customDomains().list( - ListCustomDomainsRequestParameters - .builder() - .q( - OptionalNullable.of("q") - ) - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .sort( - OptionalNullable.of("sort") - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**q:** `Optional` — Query in Lucene query string syntax. - -
-
- -
-
- -**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. - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). - -
-
- -
-
- -**sort:** `Optional` — Field to sort by. Only domain:1 (ascending order by domain) is supported at this time. - -
-
-
-
- - -
-
-
- -
client.customDomains.create(request) -> CreateCustomDomainResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a new custom domain. - -Note: The custom domain will need to be verified before it will accept -requests. - -Optional attributes that can be updated: - -- custom_client_ip_header -- tls_policy - - -TLS Policies: - -- recommended - for modern usage this includes TLS 1.2 only -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.customDomains().create( - CreateCustomDomainRequestContent - .builder() - .domain("domain") - .type(CustomDomainProvisioningTypeEnum.AUTH0MANAGED_CERTS) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**domain:** `String` — Domain name. - -
-
- -
-
- -**type:** `CustomDomainProvisioningTypeEnum` - -
-
- -
-
- -**verificationMethod:** `Optional` - -
-
- -
-
- -**tlsPolicy:** `Optional` - -
-
- -
-
- -**customClientIpHeader:** `Optional` - -
-
- -
-
- -**domainMetadata:** `Optional>>` - -
-
- -
-
- -**relyingPartyIdentifier:** `Optional` — Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not provided, the full domain will be used. - -
-
-
-
- - -
-
-
- -
client.customDomains.get(id) -> GetCustomDomainResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a custom domain configuration and status. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.customDomains().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the custom domain to retrieve. - -
-
-
-
- - -
-
-
- -
client.customDomains.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a custom domain and stop serving requests for it. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.customDomains().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the custom domain to delete. - -
-
-
-
- - -
-
-
- -
client.customDomains.update(id, request) -> UpdateCustomDomainResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update a custom domain. - -These are the attributes that can be updated: - -- custom_client_ip_header -- tls_policy - -
Updating CUSTOM_CLIENT_IP_HEADER for a custom domain
To update the custom_client_ip_header for a domain, the body to -send should be: -
{ "custom_client_ip_header": "cf-connecting-ip" }
- -
Updating TLS_POLICY for a custom domain
To update the tls_policy for a domain, the body to send should be: -
{ "tls_policy": "recommended" }
- - -TLS Policies: - -- recommended - for modern usage this includes TLS 1.2 only - - -Some considerations: - -- The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally. -- The compatible TLS policy is no longer supported. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.customDomains().update( - "id", - UpdateCustomDomainRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the custom domain to update - -
-
- -
-
- -**tlsPolicy:** `Optional` - -
-
- -
-
- -**customClientIpHeader:** `Optional` - -
-
- -
-
- -**domainMetadata:** `Optional>>` - -
-
- -
-
- -**relyingPartyIdentifier:** `Optional` — 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. - -
-
-
-
- - -
-
-
- -
client.customDomains.test(id) -> TestCustomDomainResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Run the test process on a custom domain. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.customDomains().test("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the custom domain to test. - -
-
-
-
- - -
-
-
- -
client.customDomains.verify(id) -> VerifyCustomDomainResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Run the verification process on a custom domain. - -Note: Check the status field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests. - -For self_managed_certs, when the custom domain is verified for the first time, the response will also include the cname_api_key which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests. - -Learn more about verifying custom domains that use Auth0 Managed certificates. -Learn more about verifying custom domains that use Self Managed certificates. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.customDomains().verify("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the custom domain to verify. - -
-
-
-
- - -
-
-
- -## DeviceCredentials -
client.deviceCredentials.list() -> SyncPagingIterable&lt;DeviceCredential&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve device credential information (public_key, refresh_token, or rotating_refresh_token) associated with a specific user. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -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) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. There is a maximum of 1000 results allowed from this endpoint. - -
-
- -
-
- -**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). - -
-
- -
-
- -**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. - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). - -
-
- -
-
- -**userId:** `Optional` — user_id of the devices to retrieve. - -
-
- -
-
- -**clientId:** `Optional` — client_id of the devices to retrieve. - -
-
- -
-
- -**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 - -
-
-
-
- - -
-
-
- -
client.deviceCredentials.createPublicKey(request) -> CreatePublicKeyDeviceCredentialResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a device credential public key to manage refresh token rotation for a given user_id. Device Credentials APIs are designed for ad-hoc administrative use only and paging is by default enabled for GET requests. - -When refresh token rotation is enabled, the endpoint becomes consistent. For more information, read Signing Keys. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.deviceCredentials().createPublicKey( - CreatePublicKeyDeviceCredentialRequestContent - .builder() - .deviceName("device_name") - .type(DeviceCredentialPublicKeyTypeEnum.PUBLIC_KEY) - .value("value") - .deviceId("device_id") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**deviceName:** `String` — Name for this device easily recognized by owner. - -
-
- -
-
- -**type:** `DeviceCredentialPublicKeyTypeEnum` - -
-
- -
-
- -**value:** `String` — Base64 encoded string containing the credential. - -
-
- -
-
- -**deviceId:** `String` — Unique identifier for the device. Recommend using Android_ID on Android and identifierForVendor. - -
-
- -
-
- -**clientId:** `Optional` — client_id of the client (application) this credential is for. - -
-
-
-
- - -
-
-
- -
client.deviceCredentials.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Permanently delete a device credential (such as a refresh token or public key) with the given ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.deviceCredentials().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the credential to delete. - -
-
-
-
- - -
-
-
- -## EmailTemplates -
client.emailTemplates.create(request) -> CreateEmailTemplateResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create an email template. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.emailTemplates().create( - CreateEmailTemplateRequestContent - .builder() - .template(EmailTemplateNameEnum.VERIFY_EMAIL) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**template:** `EmailTemplateNameEnum` - -
-
- -
-
- -**body:** `Optional` — Body of the email template. - -
-
- -
-
- -**from:** `Optional` — Senders `from` email address. - -
-
- -
-
- -**resultUrl:** `Optional` — URL to redirect the user to after a successful action. - -
-
- -
-
- -**subject:** `Optional` — Subject line of the email. - -
-
- -
-
- -**syntax:** `Optional` — Syntax of the template body. - -
-
- -
-
- -**urlLifetimeInSeconds:** `Optional` — Lifetime in seconds that the link within the email will be valid for. - -
-
- -
-
- -**includeEmailInRedirect:** `Optional` — Whether the `reset_email` and `verify_email` templates should include the user's email address as the `email` parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. - -
-
- -
-
- -**enabled:** `Optional` — Whether the template is enabled (true) or disabled (false). - -
-
-
-
- - -
-
-
- -
client.emailTemplates.get(templateName) -> GetEmailTemplateResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve an email template by pre-defined name. These names are `verify_email`, `verify_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, and `async_approval`. The names `change_password`, and `password_reset` are also supported for legacy scenarios. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.emailTemplates().get(EmailTemplateNameEnum.VERIFY_EMAIL); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**templateName:** `EmailTemplateNameEnum` — Template name. Can be `verify_email`, `verify_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy). - -
-
-
-
- - -
-
-
- -
client.emailTemplates.set(templateName, request) -> SetEmailTemplateResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update an email template. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.emailTemplates().set( - EmailTemplateNameEnum.VERIFY_EMAIL, - SetEmailTemplateRequestContent - .builder() - .template(EmailTemplateNameEnum.VERIFY_EMAIL) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**templateName:** `EmailTemplateNameEnum` — Template name. Can be `verify_email`, `verify_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy). - -
-
- -
-
- -**template:** `EmailTemplateNameEnum` - -
-
- -
-
- -**body:** `Optional` — Body of the email template. - -
-
- -
-
- -**from:** `Optional` — Senders `from` email address. - -
-
- -
-
- -**resultUrl:** `Optional` — URL to redirect the user to after a successful action. - -
-
- -
-
- -**subject:** `Optional` — Subject line of the email. - -
-
- -
-
- -**syntax:** `Optional` — Syntax of the template body. - -
-
- -
-
- -**urlLifetimeInSeconds:** `Optional` — Lifetime in seconds that the link within the email will be valid for. - -
-
- -
-
- -**includeEmailInRedirect:** `Optional` — Whether the `reset_email` and `verify_email` templates should include the user's email address as the `email` parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. - -
-
- -
-
- -**enabled:** `Optional` — Whether the template is enabled (true) or disabled (false). - -
-
-
-
- - -
-
-
- -
client.emailTemplates.update(templateName, request) -> UpdateEmailTemplateResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Modify an email template. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.emailTemplates().update( - EmailTemplateNameEnum.VERIFY_EMAIL, - UpdateEmailTemplateRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**templateName:** `EmailTemplateNameEnum` — Template name. Can be `verify_email`, `verify_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy). - -
-
- -
-
- -**template:** `Optional` - -
-
- -
-
- -**body:** `Optional` — Body of the email template. - -
-
- -
-
- -**from:** `Optional` — Senders `from` email address. - -
-
- -
-
- -**resultUrl:** `Optional` — URL to redirect the user to after a successful action. - -
-
- -
-
- -**subject:** `Optional` — Subject line of the email. - -
-
- -
-
- -**syntax:** `Optional` — Syntax of the template body. - -
-
- -
-
- -**urlLifetimeInSeconds:** `Optional` — Lifetime in seconds that the link within the email will be valid for. - -
-
- -
-
- -**includeEmailInRedirect:** `Optional` — Whether the `reset_email` and `verify_email` templates should include the user's email address as the `email` parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. - -
-
- -
-
- -**enabled:** `Optional` — Whether the template is enabled (true) or disabled (false). - -
-
-
-
- - -
-
-
- -## EventStreams -
client.eventStreams.list() -> SyncPagingIterable&lt;EventStreamResponseContent&gt; -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.eventStreams().list( - ListEventStreamsRequestParameters - .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
-
-
- - -
-
-
- -
client.eventStreams.create(request) -> CreateEventStreamResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.eventStreams().create( - EventStreamsCreateRequest.of( - CreateEventStreamWebHookRequestContent - .builder() - .destination( - EventStreamWebhookDestination - .builder() - .type(EventStreamWebhookDestinationTypeEnum.WEBHOOK) - .configuration( - EventStreamWebhookConfiguration - .builder() - .webhookEndpoint("webhook_endpoint") - .webhookAuthorization( - EventStreamWebhookAuthorizationResponse.of( - EventStreamWebhookBasicAuth - .builder() - .method(EventStreamWebhookBasicAuthMethodEnum.BASIC) - .username("username") - .build() - ) - ) - .build() - ) - .build() - ) - .build() - ) -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `EventStreamsCreateRequest` - -
-
-
-
- - -
-
-
- -
client.eventStreams.get(id) -> GetEventStreamResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.eventStreams().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Unique identifier for the event stream. - -
-
-
-
- - -
-
-
- -
client.eventStreams.delete(id) -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.eventStreams().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Unique identifier for the event stream. - -
-
-
-
- - -
-
-
- -
client.eventStreams.update(id, request) -> UpdateEventStreamResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.eventStreams().update( - "id", - UpdateEventStreamRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Unique identifier for the event stream. - -
-
- -
-
- -**name:** `Optional` — Name of the event stream. - -
-
- -
-
- -**subscriptions:** `Optional>` — List of event types subscribed to in this stream. - -
-
- -
-
- -**destination:** `Optional` - -
-
- -
-
- -**status:** `Optional` - -
-
-
-
- - -
-
-
- -
client.eventStreams.test(id, request) -> CreateEventStreamTestEventResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.eventStreams().test( - "id", - CreateEventStreamTestEventRequestContent - .builder() - .eventType(EventStreamTestEventTypeEnum.USER_CREATED) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Unique identifier for the event stream. - -
-
- -
-
- -**eventType:** `EventStreamTestEventTypeEnum` - -
-
- -
-
- -**data:** `Optional>` - -
-
-
-
- - -
-
-
- -## Flows -
client.flows.list() -> SyncPagingIterable&lt;FlowSummary&gt; -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.flows().list( - ListFlowsRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .synchronous( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**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). - -
-
- -
-
- -**hydrate:** `Optional` — hydration param - -
-
- -
-
- -**synchronous:** `Optional` — flag to filter by sync/async flows - -
-
-
-
- - -
-
-
- -
client.flows.create(request) -> CreateFlowResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.flows().create( - CreateFlowRequestContent - .builder() - .name("name") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `String` - -
-
- -
-
- -**actions:** `Optional>` - -
-
-
-
- - -
-
-
- -
client.flows.get(id) -> GetFlowResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.flows().get( - "id", - GetFlowRequestParameters - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Flow identifier - -
-
- -
-
- -**hydrate:** `Optional` — hydration param - -
-
-
-
- - -
-
-
- -
client.flows.delete(id) -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.flows().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Flow id - -
-
-
-
- - -
-
-
- -
client.flows.update(id, request) -> UpdateFlowResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.flows().update( - "id", - UpdateFlowRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Flow identifier - -
-
- -
-
- -**name:** `Optional` - -
-
- -
-
- -**actions:** `Optional>` - -
-
-
-
- - -
-
-
- -## Forms -
client.forms.list() -> SyncPagingIterable&lt;FormSummary&gt; -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.forms().list( - ListFormsRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**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). - -
-
- -
-
- -**hydrate:** `Optional` — Query parameter to hydrate the response with additional data - -
-
-
-
- - -
-
-
- -
client.forms.create(request) -> CreateFormResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.forms().create( - CreateFormRequestContent - .builder() - .name("name") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `String` - -
-
- -
-
- -**messages:** `Optional` - -
-
- -
-
- -**languages:** `Optional` - -
-
- -
-
- -**translations:** `Optional>>` - -
-
- -
-
- -**nodes:** `Optional>` - -
-
- -
-
- -**start:** `Optional` - -
-
- -
-
- -**ending:** `Optional` - -
-
- -
-
- -**style:** `Optional` - -
-
-
-
- - -
-
-
- -
client.forms.get(id) -> GetFormResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.forms().get( - "id", - GetFormRequestParameters - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the form to retrieve. - -
-
- -
-
- -**hydrate:** `Optional` — Query parameter to hydrate the response with additional data - -
-
-
-
- - -
-
-
- -
client.forms.delete(id) -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.forms().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the form to delete. - -
-
-
-
- - -
-
-
- -
client.forms.update(id, request) -> UpdateFormResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.forms().update( - "id", - UpdateFormRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the form to update. - -
-
- -
-
- -**name:** `Optional` - -
-
- -
-
- -**messages:** `Optional` - -
-
- -
-
- -**languages:** `Optional` - -
-
- -
-
- -**translations:** `Optional>>` - -
-
- -
-
- -**nodes:** `Optional>` - -
-
- -
-
- -**start:** `Optional` - -
-
- -
-
- -**ending:** `Optional` - -
-
- -
-
- -**style:** `Optional` - -
-
-
-
- - -
-
-
- -## UserGrants -
client.userGrants.list() -> SyncPagingIterable&lt;UserGrant&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve the grants associated with your account. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -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") - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). - -
-
- -
-
- -**userId:** `Optional` — user_id of the grants to retrieve. - -
-
- -
-
- -**clientId:** `Optional` — client_id of the grants to retrieve. - -
-
- -
-
- -**audience:** `Optional` — audience of the grants to retrieve. - -
-
-
-
- - -
-
-
- -
client.userGrants.deleteByUserId() -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a grant associated with your account. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.userGrants().deleteByUserId( - DeleteUserGrantByUserIdRequestParameters - .builder() - .userId("user_id") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**userId:** `String` — user_id of the grant to delete. - -
-
-
-
- - -
-
-
- -
client.userGrants.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a grant associated with your account. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.userGrants().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the grant to delete. - -
-
-
-
- - -
-
-
- -## Groups -
client.groups.list() -> SyncPagingIterable&lt;Group&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -List all groups in your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.groups().list( - ListGroupsRequestParameters - .builder() - .connectionId( - OptionalNullable.of("connection_id") - ) - .name( - OptionalNullable.of("name") - ) - .externalId( - OptionalNullable.of("external_id") - ) - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**connectionId:** `Optional` — Filter groups by connection ID. - -
-
- -
-
- -**name:** `Optional` — Filter groups by name. - -
-
- -
-
- -**externalId:** `Optional` — Filter groups by external ID. - -
-
- -
-
- -**fields:** `Optional` — A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
-
-
- - -
-
-
- -
client.groups.get(id) -> GetGroupResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a group by its ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.groups().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Unique identifier for the group (service-generated). - -
-
-
-
- - -
-
-
- -## Hooks -
client.hooks.list() -> SyncPagingIterable&lt;Hook&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve all hooks. Accepts a list of fields to include or exclude in the result. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -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) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. - -
-
- -
-
- -**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). - -
-
- -
-
- -**enabled:** `Optional` — Optional filter on whether a hook is enabled (true) or disabled (false). - -
-
- -
-
- -**fields:** `Optional` — Comma-separated list of fields to include in the result. Leave empty to retrieve all fields. - -
-
- -
-
- -**triggerId:** `Optional` — Retrieves hooks that match the trigger - -
-
-
-
- - -
-
-
- -
client.hooks.create(request) -> CreateHookResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a new hook. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.hooks().create( - CreateHookRequestContent - .builder() - .name("name") - .script("script") - .triggerId(HookTriggerIdEnum.CREDENTIALS_EXCHANGE) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `String` — Name of this hook. - -
-
- -
-
- -**script:** `String` — Code to be executed when this hook runs. - -
-
- -
-
- -**enabled:** `Optional` — Whether this hook will be executed (true) or ignored (false). - -
-
- -
-
- -**dependencies:** `Optional>` - -
-
- -
-
- -**triggerId:** `HookTriggerIdEnum` - -
-
-
-
- - -
-
-
- -
client.hooks.get(id) -> GetHookResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a hook by its ID. Accepts a list of fields to include in the result. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.hooks().get( - "id", - GetHookRequestParameters - .builder() - .fields( - OptionalNullable.of("fields") - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the hook to retrieve. - -
-
- -
-
- -**fields:** `Optional` — Comma-separated list of fields to include in the result. Leave empty to retrieve all fields. - -
-
-
-
- - -
-
-
- -
client.hooks.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a hook. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.hooks().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the hook to delete. - -
-
-
-
- - -
-
-
- -
client.hooks.update(id, request) -> UpdateHookResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update an existing hook. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.hooks().update( - "id", - UpdateHookRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the hook to update. - -
-
- -
-
- -**name:** `Optional` — Name of this hook. - -
-
- -
-
- -**script:** `Optional` — Code to be executed when this hook runs. - -
-
- -
-
- -**enabled:** `Optional` — Whether this hook will be executed (true) or ignored (false). - -
-
- -
-
- -**dependencies:** `Optional>` - -
-
-
-
- - -
-
-
- -## Jobs -
client.jobs.get(id) -> GetJobResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a job. Useful to check its status. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.jobs().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the job. - -
-
-
-
- - -
-
-
- -## LogStreams -
client.logStreams.list() -> List&lt;LogStreamResponseSchema&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details on log streams. -
Sample Response
[{
-	"id": "string",
-	"name": "string",
-	"type": "eventbridge",
-	"status": "active|paused|suspended",
-	"sink": {
-		"awsAccountId": "string",
-		"awsRegion": "string",
-		"awsPartnerEventSource": "string"
-	}
-}, {
-	"id": "string",
-	"name": "string",
-	"type": "http",
-	"status": "active|paused|suspended",
-	"sink": {
-		"httpContentFormat": "JSONLINES|JSONARRAY",
-		"httpContentType": "string",
-		"httpEndpoint": "string",
-		"httpAuthorization": "string"
-	}
-},
-{
-	"id": "string",
-	"name": "string",
-	"type": "eventgrid",
-	"status": "active|paused|suspended",
-	"sink": {
-		"azureSubscriptionId": "string",
-		"azureResourceGroup": "string",
-		"azureRegion": "string",
-		"azurePartnerTopic": "string"
-	}
-},
-{
-	"id": "string",
-	"name": "string",
-	"type": "splunk",
-	"status": "active|paused|suspended",
-	"sink": {
-		"splunkDomain": "string",
-		"splunkToken": "string",
-		"splunkPort": "string",
-		"splunkSecure": "boolean"
-	}
-},
-{
-	"id": "string",
-	"name": "string",
-	"type": "sumo",
-	"status": "active|paused|suspended",
-	"sink": {
-		"sumoSourceAddress": "string",
-	}
-},
-{
-	"id": "string",
-	"name": "string",
-	"type": "datadog",
-	"status": "active|paused|suspended",
-	"sink": {
-		"datadogRegion": "string",
-		"datadogApiKey": "string"
-	}
-}]
-
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.logStreams().list(); -``` -
-
-
-
- - -
-
-
- -
client.logStreams.create(request) -> CreateLogStreamResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a log stream. -
Log Stream Types
The type of log stream being created determines the properties required in the sink payload. -
HTTP Stream
For an http Stream, the sink properties are listed in the payload below -Request:
{
-	"name": "string",
-	"type": "http",
-	"sink": {
-		"httpEndpoint": "string",
-		"httpContentType": "string",
-		"httpContentFormat": "JSONLINES|JSONARRAY",
-		"httpAuthorization": "string"
-	}
-}
-Response:
{
-	"id": "string",
-	"name": "string",
-	"type": "http",
-	"status": "active",
-	"sink": {
-		"httpEndpoint": "string",
-		"httpContentType": "string",
-		"httpContentFormat": "JSONLINES|JSONARRAY",
-		"httpAuthorization": "string"
-	}
-}
-
Amazon EventBridge Stream
For an eventbridge Stream, the sink properties are listed in the payload below -Request:
{
-	"name": "string",
-	"type": "eventbridge",
-	"sink": {
-		"awsRegion": "string",
-		"awsAccountId": "string"
-	}
-}
-The response will include an additional field awsPartnerEventSource in the sink:
{
-	"id": "string",
-	"name": "string",
-	"type": "eventbridge",
-	"status": "active",
-	"sink": {
-		"awsAccountId": "string",
-		"awsRegion": "string",
-		"awsPartnerEventSource": "string"
-	}
-}
-
Azure Event Grid Stream
For an Azure Event Grid Stream, the sink properties are listed in the payload below -Request:
{
-	"name": "string",
-	"type": "eventgrid",
-	"sink": {
-		"azureSubscriptionId": "string",
-		"azureResourceGroup": "string",
-		"azureRegion": "string"
-	}
-}
-Response:
{
-	"id": "string",
-	"name": "string",
-	"type": "http",
-	"status": "active",
-	"sink": {
-		"azureSubscriptionId": "string",
-		"azureResourceGroup": "string",
-		"azureRegion": "string",
-		"azurePartnerTopic": "string"
-	}
-}
-
Datadog Stream
For a Datadog Stream, the sink properties are listed in the payload below -Request:
{
-	"name": "string",
-	"type": "datadog",
-	"sink": {
-		"datadogRegion": "string",
-		"datadogApiKey": "string"
-	}
-}
-Response:
{
-	"id": "string",
-	"name": "string",
-	"type": "datadog",
-	"status": "active",
-	"sink": {
-		"datadogRegion": "string",
-		"datadogApiKey": "string"
-	}
-}
-
Splunk Stream
For a Splunk Stream, the sink properties are listed in the payload below -Request:
{
-	"name": "string",
-	"type": "splunk",
-	"sink": {
-		"splunkDomain": "string",
-		"splunkToken": "string",
-		"splunkPort": "string",
-		"splunkSecure": "boolean"
-	}
-}
-Response:
{
-	"id": "string",
-	"name": "string",
-	"type": "splunk",
-	"status": "active",
-	"sink": {
-		"splunkDomain": "string",
-		"splunkToken": "string",
-		"splunkPort": "string",
-		"splunkSecure": "boolean"
-	}
-}
-
Sumo Logic Stream
For a Sumo Logic Stream, the sink properties are listed in the payload below -Request:
{
-	"name": "string",
-	"type": "sumo",
-	"sink": {
-		"sumoSourceAddress": "string",
-	}
-}
-Response:
{
-	"id": "string",
-	"name": "string",
-	"type": "sumo",
-	"status": "active",
-	"sink": {
-		"sumoSourceAddress": "string",
-	}
-}
-
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.logStreams().create( - CreateLogStreamRequestContent.of( - CreateLogStreamHttpRequestBody - .builder() - .type(LogStreamHttpEnum.HTTP) - .sink( - LogStreamHttpSink - .builder() - .httpEndpoint("httpEndpoint") - .build() - ) - .build() - ) -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `CreateLogStreamRequestContent` - -
-
-
-
- - -
-
-
- -
client.logStreams.get(id) -> GetLogStreamResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a log stream configuration and status. -
Sample responses
Amazon EventBridge Log Stream
{
-	"id": "string",
-	"name": "string",
-	"type": "eventbridge",
-	"status": "active|paused|suspended",
-	"sink": {
-		"awsAccountId": "string",
-		"awsRegion": "string",
-		"awsPartnerEventSource": "string"
-	}
-}
HTTP Log Stream
{
-	"id": "string",
-	"name": "string",
-	"type": "http",
-	"status": "active|paused|suspended",
-	"sink": {
-		"httpContentFormat": "JSONLINES|JSONARRAY",
-		"httpContentType": "string",
-		"httpEndpoint": "string",
-		"httpAuthorization": "string"
-	}
-}
Datadog Log Stream
{
-	"id": "string",
-	"name": "string",
-	"type": "datadog",
-	"status": "active|paused|suspended",
-	"sink": {
-		"datadogRegion": "string",
-		"datadogApiKey": "string"
-	}
-
-}
Mixpanel
- - Request:
{
-	  "name": "string",
-	  "type": "mixpanel",
-	  "sink": {
-		"mixpanelRegion": "string", // "us" | "eu",
-		"mixpanelProjectId": "string",
-		"mixpanelServiceAccountUsername": "string",
-		"mixpanelServiceAccountPassword": "string"
-	  }
-	} 
- - - Response:
{
-		"id": "string",
-		"name": "string",
-		"type": "mixpanel",
-		"status": "active",
-		"sink": {
-		  "mixpanelRegion": "string", // "us" | "eu",
-		  "mixpanelProjectId": "string",
-		  "mixpanelServiceAccountUsername": "string",
-		  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-		}
-	  } 
- -
Segment
- - Request:
 {
-	  "name": "string",
-	  "type": "segment",
-	  "sink": {
-		"segmentWriteKey": "string"
-	  }
-	}
- - Response:
{
-	  "id": "string",
-	  "name": "string",
-	  "type": "segment",
-	  "status": "active",
-	  "sink": {
-		"segmentWriteKey": "string"
-	  }
-	} 
- -
Splunk Log Stream
{
-	"id": "string",
-	"name": "string",
-	"type": "splunk",
-	"status": "active|paused|suspended",
-	"sink": {
-		"splunkDomain": "string",
-		"splunkToken": "string",
-		"splunkPort": "string",
-		"splunkSecure": "boolean"
-	}
-}
Sumo Logic Log Stream
{
-	"id": "string",
-	"name": "string",
-	"type": "sumo",
-	"status": "active|paused|suspended",
-	"sink": {
-		"sumoSourceAddress": "string",
-	}
-}
Status
The status of a log stream maybe any of the following: -1. active - Stream is currently enabled. -2. paused - Stream is currently user disabled and will not attempt log delivery. -3. suspended - Stream is currently disabled because of errors and will not attempt log delivery. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.logStreams().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the log stream to get - -
-
-
-
- - -
-
-
- -
client.logStreams.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a log stream. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.logStreams().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the log stream to delete - -
-
-
-
- - -
-
-
- -
client.logStreams.update(id, request) -> UpdateLogStreamResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update a log stream. -

Examples of how to use the PATCH endpoint.

The following fields may be updated in a PATCH operation:
  • name
  • status
  • sink
Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted. -
Update the status of a log stream
{
-	"status": "active|paused"
-}
-
Update the name of a log stream
{
-	"name": "string"
-}
-
Update the sink properties of a stream of type http
{
-  "sink": {
-    "httpEndpoint": "string",
-    "httpContentType": "string",
-    "httpContentFormat": "JSONARRAY|JSONLINES",
-    "httpAuthorization": "string"
-  }
-}
-
Update the sink properties of a stream of type datadog
{
-  "sink": {
-		"datadogRegion": "string",
-		"datadogApiKey": "string"
-  }
-}
-
Update the sink properties of a stream of type splunk
{
-  "sink": {
-    "splunkDomain": "string",
-    "splunkToken": "string",
-    "splunkPort": "string",
-    "splunkSecure": "boolean"
-  }
-}
-
Update the sink properties of a stream of type sumo
{
-  "sink": {
-    "sumoSourceAddress": "string"
-  }
-}
-
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.logStreams().update( - "id", - UpdateLogStreamRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the log stream to get - -
-
- -
-
- -**name:** `Optional` — log stream name - -
-
- -
-
- -**status:** `Optional` - -
-
- -
-
- -**isPriority:** `Optional` — True for priority log streams, false for non-priority - -
-
- -
-
- -**filters:** `Optional>` — Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - -
-
- -
-
- -**piiConfig:** `Optional` - -
-
- -
-
- -**sink:** `Optional` - -
-
-
-
- - -
-
-
- -## Logs -
client.logs.list() -> SyncPagingIterable&lt;Log&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve log entries that match the specified search criteria (or all log entries if no criteria specified). - -Set custom search criteria using the q parameter, or search from a specific log ID ("search from checkpoint"). - -For more information on all possible event types, their respective acronyms, and descriptions, see Log Event Type Codes. - -
To set custom search criteria, use the following parameters:
- -
    -
  • q: Search Criteria using Query String Syntax
  • -
  • page: Page index of the results to return. First page is 0.
  • -
  • per_page: Number of results per page.
  • -
  • sort: Field to use for sorting appended with `:1` for ascending and `:-1` for descending. e.g. `date:-1`
  • -
  • fields: Comma-separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields.
  • -
  • include_fields: Whether specified fields are to be included (true) or excluded (false).
  • -
  • include_totals: Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). Deprecated: this field is deprecated and should be removed from use. See Search Engine V3 Breaking Changes
  • -
- -For more information on the list of fields that can be used in fields and sort, see Searchable Fields. - -Auth0 limits the number of logs you can return by search criteria to 100 logs per request. Furthermore, you may paginate only through 1,000 search results. If you exceed this threshold, please redefine your search or use the get logs by checkpoint method. - -
To search from a checkpoint log ID, use the following parameters:
-
    -
  • from: Log Event ID from which to start retrieving logs. You can limit the number of logs returned using the take parameter. If you use from at the same time as q, from takes precedence and q is ignored.
  • -
  • take: Number of entries to retrieve when using the from parameter.
  • -
- -Important: When fetching logs from a checkpoint log ID, any parameter other than from and take will be ignored, and date ordering is not guaranteed. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -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") - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. Paging is disabled if parameter not sent. Default: 50. Max value: 100 - -
-
- -
-
- -**sort:** `Optional` — Field to use for sorting appended with :1 for ascending and :-1 for descending. e.g. date:-1 - -
-
- -
-
- -**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. - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false) - -
-
- -
-
- -**includeTotals:** `Optional` — Return results as an array when false (default). Return results inside an object that also contains a total result count when true. - -
-
- -
-
- -**search:** `Optional` - -Retrieves logs that match the specified search criteria. This parameter can be combined with all the others in the /api/logs endpoint but is specified separately for clarity. -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. - -
-
-
-
- - -
-
-
- -
client.logs.get(id) -> GetLogResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve an individual log event. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.logs().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — log_id of the log to retrieve. - -
-
-
-
- - -
-
-
- -## NetworkAcls -
client.networkAcls.list() -> SyncPagingIterable&lt;NetworkAclsResponseContent&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Get all access control list entries for your client. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.networkAcls().list( - ListNetworkAclsRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**page:** `Optional` — Use this field to request a specific page of the list results. - -
-
- -
-
- -**perPage:** `Optional` — The amount of results per page. - -
-
- -
-
- -**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). - -
-
-
-
- - -
-
-
- -
client.networkAcls.create(request) -
-
- -#### 📝 Description - -
-
- -
-
- -Create a new access control list for your client. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.networkAcls().create( - CreateNetworkAclRequestContent - .builder() - .description("description") - .active(true) - .priority(1.1) - .rule( - NetworkAclRule - .builder() - .action( - NetworkAclAction - .builder() - .build() - ) - .scope(NetworkAclRuleScopeEnum.MANAGEMENT) - .build() - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**description:** `String` - -
-
- -
-
- -**active:** `Boolean` — Indicates whether or not this access control list is actively being used - -
-
- -
-
- -**priority:** `Double` — Indicates the order in which the ACL will be evaluated relative to other ACL rules. - -
-
- -
-
- -**rule:** `NetworkAclRule` - -
-
-
-
- - -
-
-
- -
client.networkAcls.get(id) -> GetNetworkAclsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Get a specific access control list entry for your client. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.networkAcls().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the access control list to retrieve. - -
-
-
-
- - -
-
-
- -
client.networkAcls.set(id, request) -> SetNetworkAclsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update existing access control list for your client. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.networkAcls().set( - "id", - SetNetworkAclRequestContent - .builder() - .description("description") - .active(true) - .priority(1.1) - .rule( - NetworkAclRule - .builder() - .action( - NetworkAclAction - .builder() - .build() - ) - .scope(NetworkAclRuleScopeEnum.MANAGEMENT) - .build() - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the ACL to update. - -
-
- -
-
- -**description:** `String` - -
-
- -
-
- -**active:** `Boolean` — Indicates whether or not this access control list is actively being used - -
-
- -
-
- -**priority:** `Double` — Indicates the order in which the ACL will be evaluated relative to other ACL rules. - -
-
- -
-
- -**rule:** `NetworkAclRule` - -
-
-
-
- - -
-
-
- -
client.networkAcls.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete existing access control list for your client. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.networkAcls().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the ACL to delete - -
-
-
-
- - -
-
-
- -
client.networkAcls.update(id, request) -> UpdateNetworkAclResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update existing access control list for your client. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.networkAcls().update( - "id", - UpdateNetworkAclRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the ACL to update. - -
-
- -
-
- -**description:** `Optional` - -
-
- -
-
- -**active:** `Optional` — Indicates whether or not this access control list is actively being used - -
-
- -
-
- -**priority:** `Optional` — Indicates the order in which the ACL will be evaluated relative to other ACL rules. - -
-
- -
-
- -**rule:** `Optional` - -
-
-
-
- - -
-
-
- -## Organizations -
client.organizations.list() -> SyncPagingIterable&lt;Organization&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve detailed list of all Organizations available in your tenant. For more information, see 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. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().list( - ListOrganizationsRequestParameters - .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .sort( - OptionalNullable.of("sort") - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
- -
-
- -**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. - -
-
-
-
- - -
-
-
- -
client.organizations.create(request) -> CreateOrganizationResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a new Organization within your tenant. To learn more about Organization settings, behavior, and configuration options, review Create Your First Organization. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().create( - CreateOrganizationRequestContent - .builder() - .name("name") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `String` — The name of this organization. - -
-
- -
-
- -**displayName:** `Optional` — Friendly name of this organization. - -
-
- -
-
- -**branding:** `Optional` - -
-
- -
-
- -**metadata:** `Optional>>` - -
-
- -
-
- -**enabledConnections:** `Optional>` — Connections that will be enabled for this organization. See POST enabled_connections endpoint for the object format. (Max of 10 connections allowed) - -
-
- -
-
- -**tokenQuota:** `Optional` - -
-
-
-
- - -
-
-
- -
client.organizations.getByName(name) -> GetOrganizationByNameResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details about a single Organization specified by name. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().getByName("name"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `String` — name of the organization to retrieve. - -
-
-
-
- - -
-
-
- -
client.organizations.get(id) -> GetOrganizationResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details about a single Organization specified by ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the organization to retrieve. - -
-
-
-
- - -
-
-
- -
client.organizations.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Remove an Organization from your tenant. This action cannot be undone. - -Note: Members are automatically disassociated from an Organization when it is deleted. However, this action does not delete these users from your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Organization identifier. - -
-
-
-
- - -
-
-
- -
client.organizations.update(id, request) -> UpdateOrganizationResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update the details of a specific Organization, such as name and display name, branding options, and metadata. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().update( - "id", - UpdateOrganizationRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the organization to update. - -
-
- -
-
- -**displayName:** `Optional` — Friendly name of this organization. - -
-
- -
-
- -**name:** `Optional` — The name of this organization. - -
-
- -
-
- -**branding:** `Optional` - -
-
- -
-
- -**metadata:** `Optional>>` - -
-
- -
-
- -**tokenQuota:** `Optional` - -
-
-
-
- - -
-
-
- -## Prompts -
client.prompts.getSettings() -> GetSettingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details of the Universal Login configuration of your tenant. This includes the Identifier First Authentication and WebAuthn with Device Biometrics for MFA features. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.prompts().getSettings(); -``` -
-
-
-
- - -
-
-
- -
client.prompts.updateSettings(request) -> UpdateSettingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update the Universal Login configuration of your tenant. This includes the Identifier First Authentication and WebAuthn with Device Biometrics for MFA features. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.prompts().updateSettings( - UpdateSettingsRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**universalLoginExperience:** `Optional` - -
-
- -
-
- -**identifierFirst:** `Optional` — Whether identifier first is enabled or not - -
-
- -
-
- -**webauthnPlatformFirstFactor:** `Optional` — Use WebAuthn with Device Biometrics as the first authentication factor - -
-
-
-
- - -
-
-
- -## RefreshTokens -
client.refreshTokens.get(id) -> GetRefreshTokenResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve refresh token information. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.refreshTokens().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID refresh token to retrieve - -
-
-
-
- - -
-
-
- -
client.refreshTokens.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a refresh token by its ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.refreshTokens().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the refresh token to delete. - -
-
-
-
- - -
-
-
- -
client.refreshTokens.update(id, request) -> UpdateRefreshTokenResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update a refresh token by its ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.refreshTokens().update( - "id", - UpdateRefreshTokenRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the refresh token to update. - -
-
- -
-
- -**refreshTokenMetadata:** `Optional>` - -
-
-
-
- - -
-
-
- -## ResourceServers -
client.resourceServers.list() -> SyncPagingIterable&lt;ResourceServer&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details of all APIs associated with your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.resourceServers().list( - ListResourceServerRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .includeFields( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**identifiers:** `Optional` — An optional filter on the resource server identifier. Must be URL encoded and may be specified multiple times (max 10).
e.g. ../resource-servers?identifiers=id1&identifiers=id2 - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. - -
-
- -
-
- -**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). - -
-
-
-
- - -
-
-
- -
client.resourceServers.create(request) -> CreateResourceServerResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a new API associated with your tenant. Note that all new APIs must be registered with Auth0. For more information, read APIs. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.resourceServers().create( - CreateResourceServerRequestContent - .builder() - .identifier("identifier") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `Optional` — Friendly name for this resource server. Can not contain `<` or `>` characters. - -
-
- -
-
- -**identifier:** `String` — Unique identifier for the API used as the audience parameter on authorization calls. Can not be changed once set. - -
-
- -
-
- -**scopes:** `Optional>` — List of permissions (scopes) that this API uses. - -
-
- -
-
- -**signingAlg:** `Optional` - -
-
- -
-
- -**signingSecret:** `Optional` — Secret used to sign tokens when using symmetric algorithms (HS256). - -
-
- -
-
- -**allowOfflineAccess:** `Optional` — Whether refresh tokens can be issued for this API (true) or not (false). - -
-
- -
-
- -**tokenLifetime:** `Optional` — Expiration value (in seconds) for access tokens issued for this API from the token endpoint. - -
-
- -
-
- -**tokenDialect:** `Optional` - -
-
- -
-
- -**skipConsentForVerifiableFirstPartyClients:** `Optional` — Whether to skip user consent for applications flagged as first party (true) or not (false). - -
-
- -
-
- -**enforcePolicies:** `Optional` — Whether to enforce authorization policies (true) or to ignore them (false). - -
-
- -
-
- -**tokenEncryption:** `Optional` - -
-
- -
-
- -**consentPolicy:** `Optional` - -
-
- -
-
- -**authorizationDetails:** `Optional>` - -
-
- -
-
- -**proofOfPossession:** `Optional` - -
-
- -
-
- -**subjectTypeAuthorization:** `Optional` - -
-
-
-
- - -
-
-
- -
client.resourceServers.get(id) -> GetResourceServerResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve API details with the given ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.resourceServers().get( - "id", - GetResourceServerRequestParameters - .builder() - .includeFields( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID or audience of the resource server to retrieve. - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). - -
-
-
-
- - -
-
-
- -
client.resourceServers.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete an existing API by ID. For more information, read API Settings. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.resourceServers().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID or the audience of the resource server to delete. - -
-
-
-
- - -
-
-
- -
client.resourceServers.update(id, request) -> UpdateResourceServerResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Change an existing API setting by resource server ID. For more information, read API Settings. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.resourceServers().update( - "id", - UpdateResourceServerRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID or audience of the resource server to update. - -
-
- -
-
- -**name:** `Optional` — Friendly name for this resource server. Can not contain `<` or `>` characters. - -
-
- -
-
- -**scopes:** `Optional>` — List of permissions (scopes) that this API uses. - -
-
- -
-
- -**signingAlg:** `Optional` - -
-
- -
-
- -**signingSecret:** `Optional` — Secret used to sign tokens when using symmetric algorithms (HS256). - -
-
- -
-
- -**skipConsentForVerifiableFirstPartyClients:** `Optional` — Whether to skip user consent for applications flagged as first party (true) or not (false). - -
-
- -
-
- -**allowOfflineAccess:** `Optional` — Whether refresh tokens can be issued for this API (true) or not (false). - -
-
- -
-
- -**tokenLifetime:** `Optional` — Expiration value (in seconds) for access tokens issued for this API from the token endpoint. - -
-
- -
-
- -**tokenDialect:** `Optional` - -
-
- -
-
- -**enforcePolicies:** `Optional` — Whether authorization policies are enforced (true) or not enforced (false). - -
-
- -
-
- -**tokenEncryption:** `Optional` - -
-
- -
-
- -**consentPolicy:** `Optional` - -
-
- -
-
- -**authorizationDetails:** `Optional>` - -
-
- -
-
- -**proofOfPossession:** `Optional` - -
-
- -
-
- -**subjectTypeAuthorization:** `Optional` - -
-
-
-
- - -
-
-
- -## Roles -
client.roles.list() -> SyncPagingIterable&lt;Role&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve detailed list of user roles created in your tenant. - -Note: The returned list does not include standard roles available for tenant members, such as Admin or Support Access. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.roles().list( - ListRolesRequestParameters - .builder() - .perPage( - OptionalNullable.of(1) - ) - .page( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .nameFilter( - OptionalNullable.of("name_filter") - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. Defaults to 50. - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). - -
-
- -
-
- -**nameFilter:** `Optional` — Optional filter on name (case-insensitive). - -
-
-
-
- - -
-
-
- -
client.roles.create(request) -> CreateRoleResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a user role for Role-Based Access Control. - -Note: New roles are not associated with any permissions by default. To assign existing permissions to your role, review Associate Permissions with a Role. To create new permissions, review Add API Permissions. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.roles().create( - CreateRoleRequestContent - .builder() - .name("name") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `String` — Name of the role. - -
-
- -
-
- -**description:** `Optional` — Description of the role. - -
-
-
-
- - -
-
-
- -
client.roles.get(id) -> GetRoleResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details about a specific user role specified by ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.roles().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the role to retrieve. - -
-
-
-
- - -
-
-
- -
client.roles.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a specific user role from your tenant. Once deleted, it is removed from any user who was previously assigned that role. This action cannot be undone. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.roles().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the role to delete. - -
-
-
-
- - -
-
-
- -
client.roles.update(id, request) -> UpdateRoleResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Modify the details of a specific user role specified by ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.roles().update( - "id", - UpdateRoleRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the role to update. - -
-
- -
-
- -**name:** `Optional` — Name of this role. - -
-
- -
-
- -**description:** `Optional` — Description of this role. - -
-
-
-
- - -
-
-
- -## Rules -
client.rules.list() -> SyncPagingIterable&lt;Rule&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a filtered list of rules. Accepts a list of fields to include or exclude. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -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) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. - -
-
- -
-
- -**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). - -
-
- -
-
- -**enabled:** `Optional` — Optional filter on whether a rule is enabled (true) or disabled (false). - -
-
- -
-
- -**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. - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). - -
-
-
-
- - -
-
-
- -
client.rules.create(request) -> CreateRuleResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a new rule. - -Note: Changing a rule's stage of execution from the default login_success can change the rule's function signature to have user omitted. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.rules().create( - CreateRuleRequestContent - .builder() - .name("name") - .script("script") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `String` — Name of this rule. - -
-
- -
-
- -**script:** `String` — Code to be executed when this rule runs. - -
-
- -
-
- -**order:** `Optional` — Order that this rule should execute in relative to other rules. Lower-valued rules execute first. - -
-
- -
-
- -**enabled:** `Optional` — Whether the rule is enabled (true), or disabled (false). - -
-
-
-
- - -
-
-
- -
client.rules.get(id) -> GetRuleResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve rule details. Accepts a list of fields to include or exclude in the result. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.rules().get( - "id", - GetRuleRequestParameters - .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the rule to retrieve. - -
-
- -
-
- -**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. - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). - -
-
-
-
- - -
-
-
- -
client.rules.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a rule. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.rules().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the rule to delete. - -
-
-
-
- - -
-
-
- -
client.rules.update(id, request) -> UpdateRuleResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update an existing rule. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.rules().update( - "id", - UpdateRuleRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the rule to retrieve. - -
-
- -
-
- -**script:** `Optional` — Code to be executed when this rule runs. - -
-
- -
-
- -**name:** `Optional` — Name of this rule. - -
-
- -
-
- -**order:** `Optional` — Order that this rule should execute in relative to other rules. Lower-valued rules execute first. - -
-
- -
-
- -**enabled:** `Optional` — Whether the rule is enabled (true), or disabled (false). - -
-
-
-
- - -
-
-
- -## RulesConfigs -
client.rulesConfigs.list() -> List&lt;RulesConfig&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve rules config variable keys. - - Note: For security, config variable values cannot be retrieved outside rule execution. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.rulesConfigs().list(); -``` -
-
-
-
- - -
-
-
- -
client.rulesConfigs.set(key, request) -> SetRulesConfigResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Sets a rules config variable. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.rulesConfigs().set( - "key", - SetRulesConfigRequestContent - .builder() - .value("value") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**key:** `String` — Key of the rules config variable to set (max length: 127 characters). - -
-
- -
-
- -**value:** `String` — Value for a rules config variable. - -
-
-
-
- - -
-
-
- -
client.rulesConfigs.delete(key) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a rules config variable identified by its key. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.rulesConfigs().delete("key"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**key:** `String` — Key of the rules config variable to delete. - -
-
-
-
- - -
-
-
- -## SelfServiceProfiles -
client.selfServiceProfiles.list() -> SyncPagingIterable&lt;SelfServiceProfile&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves self-service profiles. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.selfServiceProfiles().list( - ListSelfServiceProfilesRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**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.selfServiceProfiles.create(request) -> CreateSelfServiceProfileResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a self-service profile. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.selfServiceProfiles().create( - CreateSelfServiceProfileRequestContent - .builder() - .name("name") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `String` — The name of the self-service Profile. - -
-
- -
-
- -**description:** `Optional` — The description of the self-service Profile. - -
-
- -
-
- -**branding:** `Optional` - -
-
- -
-
- -**allowedStrategies:** `Optional>` — List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `keycloak-samlp`, `pingfederate`] - -
-
- -
-
- -**userAttributes:** `Optional>` — List of attributes to be mapped that will be shown to the user during the SS-SSO flow. - -
-
- -
-
- -**userAttributeProfileId:** `Optional` — ID of the user-attribute-profile to associate with this self-service profile. - -
-
-
-
- - -
-
-
- -
client.selfServiceProfiles.get(id) -> GetSelfServiceProfileResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves a self-service profile by Id. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.selfServiceProfiles().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the self-service profile to retrieve - -
-
-
-
- - -
-
-
- -
client.selfServiceProfiles.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a self-service profile by Id. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.selfServiceProfiles().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the self-service profile to delete - -
-
-
-
- - -
-
-
- -
client.selfServiceProfiles.update(id, request) -> UpdateSelfServiceProfileResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Updates a self-service profile. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.selfServiceProfiles().update( - "id", - UpdateSelfServiceProfileRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the self-service profile to update - -
-
- -
-
- -**name:** `Optional` — The name of the self-service Profile. - -
-
- -
-
- -**description:** `Optional` - -
-
- -
-
- -**branding:** `Optional` - -
-
- -
-
- -**allowedStrategies:** `Optional>` — List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `keycloak-samlp`, `pingfederate`] - -
-
- -
-
- -**userAttributes:** `Optional>` - -
-
- -
-
- -**userAttributeProfileId:** `Optional` — ID of the user-attribute-profile to associate with this self-service profile. - -
-
-
-
- - -
-
-
- -## Sessions -
client.sessions.get(id) -> GetSessionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve session information. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.sessions().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of session to retrieve - -
-
-
-
- - -
-
-
- -
client.sessions.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a session by ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.sessions().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the session to delete. - -
-
-
-
- - -
-
-
- -
client.sessions.update(id, request) -> UpdateSessionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update session information. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.sessions().update( - "id", - UpdateSessionRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the session to update. - -
-
- -
-
- -**sessionMetadata:** `Optional>` - -
-
-
-
- - -
-
-
- -
client.sessions.revoke(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Revokes a session by ID and all associated refresh tokens. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.sessions().revoke("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the session to revoke. - -
-
-
-
- - -
-
-
- -## Stats -
client.stats.getActiveUsersCount() -> Double -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve the number of active users that logged in during the last 30 days. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.stats().getActiveUsersCount(); -``` -
-
-
-
- - -
-
-
- -
client.stats.getDaily() -> List&lt;DailyStats&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve the number of logins, signups and breached-password detections (subscription required) that occurred each day within a specified date range. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.stats().getDaily( - GetDailyStatsRequestParameters - .builder() - .from( - OptionalNullable.of("from") - ) - .to( - OptionalNullable.of("to") - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**from:** `Optional` — Optional first day of the date range (inclusive) in YYYYMMDD format. - -
-
- -
-
- -**to:** `Optional` — Optional last day of the date range (inclusive) in YYYYMMDD format. - -
-
-
-
- - -
-
-
- -## SupplementalSignals -
client.supplementalSignals.get() -> GetSupplementalSignalsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Get the supplemental signals configuration for a tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.supplementalSignals().get(); -``` -
-
-
-
- - -
-
-
- -
client.supplementalSignals.patch(request) -> PatchSupplementalSignalsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update the supplemental signals configuration for a tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.supplementalSignals().patch( - UpdateSupplementalSignalsRequestContent - .builder() - .akamaiEnabled(true) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**akamaiEnabled:** `Boolean` — Indicates if incoming Akamai Headers should be processed - -
-
-
-
- - -
-
-
- -## Tickets -
client.tickets.verifyEmail(request) -> VerifyEmailTicketResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create an email verification ticket for a given user. An email verification ticket is a generated URL that the user can consume to verify their email address. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.tickets().verifyEmail( - VerifyEmailTicketRequestContent - .builder() - .userId("user_id") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**resultUrl:** `Optional` — URL the user will be redirected to in the classic Universal Login experience once the ticket is used. Cannot be specified when using client_id or organization_id. - -
-
- -
-
- -**userId:** `String` — user_id of for whom the ticket should be created. - -
-
- -
-
- -**clientId:** `Optional` — ID of the client (application). If provided for tenants using the New Universal Login experience, the email template and UI displays application details, and the user is prompted to redirect to the application's default login route after the ticket is used. client_id is required to use the Password Reset Post Challenge trigger. - -
-
- -
-
- -**organizationId:** `Optional` — (Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters. - -
-
- -
-
- -**ttlSec:** `Optional` — Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days). - -
-
- -
-
- -**includeEmailInRedirect:** `Optional` — Whether to include the email address as part of the returnUrl in the reset_email (true), or not (false). - -
-
- -
-
- -**identity:** `Optional` - -
-
-
-
- - -
-
-
- -
client.tickets.changePassword(request) -> ChangePasswordTicketResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a password change ticket for a given user. A password change ticket is a generated URL that the user can consume to start a reset password flow. - -Note: This endpoint does not verify the given user’s identity. If you call this endpoint within your application, you must design your application to verify the user’s identity. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.tickets().changePassword( - ChangePasswordTicketRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**resultUrl:** `Optional` — URL the user will be redirected to in the classic Universal Login experience once the ticket is used. Cannot be specified when using client_id or organization_id. - -
-
- -
-
- -**userId:** `Optional` — user_id of for whom the ticket should be created. - -
-
- -
-
- -**clientId:** `Optional` — ID of the client (application). If provided for tenants using the New Universal Login experience, the email template and UI displays application details, and the user is prompted to redirect to the application's default login route after the ticket is used. client_id is required to use the Password Reset Post Challenge trigger. - -
-
- -
-
- -**organizationId:** `Optional` — (Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters. - -
-
- -
-
- -**connectionId:** `Optional` — ID of the connection. If provided, allows the user to be specified using email instead of user_id. If you set this value, you must also send the email parameter. You cannot send user_id when specifying a connection_id. - -
-
- -
-
- -**email:** `Optional` — Email address of the user for whom the tickets should be created. Requires the connection_id parameter. Cannot be specified when using user_id. - -
-
- -
-
- -**ttlSec:** `Optional` — Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days). - -
-
- -
-
- -**markEmailAsVerified:** `Optional` — Whether to set the email_verified attribute to true (true) or whether it should not be updated (false). - -
-
- -
-
- -**includeEmailInRedirect:** `Optional` — Whether to include the email address as part of the returnUrl in the reset_email (true), or not (false). - -
-
- -
-
- -**identity:** `Optional` - -
-
-
-
- - -
-
-
- -## TokenExchangeProfiles -
client.tokenExchangeProfiles.list() -> SyncPagingIterable&lt;TokenExchangeProfileResponseContent&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a list of all Token Exchange Profiles available in your tenant. - -By using this feature, you agree to the applicable Free Trial terms in Okta’s Master Subscription Agreement. It is your responsibility to securely validate the user’s subject_token. See User Guide for more details. - -This endpoint supports Checkpoint pagination. To search by checkpoint, use the following parameters: -
    -
  • from: Optional id from which to start selection.
  • -
  • take: The total amount 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. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.tokenExchangeProfiles().list( - TokenExchangeProfilesListRequest - .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
-
-
- - -
-
-
- -
client.tokenExchangeProfiles.create(request) -> CreateTokenExchangeProfileResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a new Token Exchange Profile within your tenant. - -By using this feature, you agree to the applicable Free Trial terms in Okta’s Master Subscription Agreement. It is your responsibility to securely validate the user’s subject_token. See User Guide for more details. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.tokenExchangeProfiles().create( - CreateTokenExchangeProfileRequestContent - .builder() - .name("name") - .subjectTokenType("subject_token_type") - .actionId("action_id") - .type(TokenExchangeProfileTypeEnum.CUSTOM_AUTHENTICATION) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `String` — Friendly name of this profile. - -
-
- -
-
- -**subjectTokenType:** `String` — 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. - -
-
- -
-
- -**actionId:** `String` — 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. - -
-
- -
-
- -**type:** `TokenExchangeProfileTypeEnum` - -
-
-
-
- - -
-
-
- -
client.tokenExchangeProfiles.get(id) -> GetTokenExchangeProfileResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details about a single Token Exchange Profile specified by ID. - -By using this feature, you agree to the applicable Free Trial terms in Okta’s Master Subscription Agreement. It is your responsibility to securely validate the user’s subject_token. See User Guide for more details. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.tokenExchangeProfiles().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the Token Exchange Profile to retrieve. - -
-
-
-
- - -
-
-
- -
client.tokenExchangeProfiles.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a Token Exchange Profile within your tenant. - -By using this feature, you agree to the applicable Free Trial terms in Okta's Master Subscription Agreement. It is your responsibility to securely validate the user's subject_token. See User Guide for more details. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.tokenExchangeProfiles().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the Token Exchange Profile to delete. - -
-
-
-
- - -
-
-
- -
client.tokenExchangeProfiles.update(id, request) -
-
- -#### 📝 Description - -
-
- -
-
- -Update a Token Exchange Profile within your tenant. - -By using this feature, you agree to the applicable Free Trial terms in Okta's Master Subscription Agreement. It is your responsibility to securely validate the user's subject_token. See User Guide for more details. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.tokenExchangeProfiles().update( - "id", - UpdateTokenExchangeProfileRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the Token Exchange Profile to update. - -
-
- -
-
- -**name:** `Optional` — Friendly name of this profile. - -
-
- -
-
- -**subjectTokenType:** `Optional` — 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. - -
-
-
-
- - -
-
-
- -## UserAttributeProfiles -
client.userAttributeProfiles.list() -> SyncPagingIterable&lt;UserAttributeProfile&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a list of User Attribute Profiles. This endpoint supports Checkpoint pagination. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.userAttributeProfiles().list( - ListUserAttributeProfileRequestParameters - .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 5. - -
-
-
-
- - -
-
-
- -
client.userAttributeProfiles.create(request) -> CreateUserAttributeProfileResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details about a single User Attribute Profile specified by ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.userAttributeProfiles().create( - CreateUserAttributeProfileRequestContent - .builder() - .name("name") - .userAttributes( - new HashMap() {{ - put("key", UserAttributeProfileUserAttributeAdditionalProperties - .builder() - .description("description") - .label("label") - .profileRequired(true) - .auth0Mapping("auth0_mapping") - .build()); - }} - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `String` - -
-
- -
-
- -**userId:** `Optional` - -
-
- -
-
- -**userAttributes:** `Map` - -
-
-
-
- - -
-
-
- -
client.userAttributeProfiles.listTemplates() -> ListUserAttributeProfileTemplateResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a list of User Attribute Profile Templates. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.userAttributeProfiles().listTemplates(); -``` -
-
-
-
- - -
-
-
- -
client.userAttributeProfiles.getTemplate(id) -> GetUserAttributeProfileTemplateResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a User Attribute Profile Template. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.userAttributeProfiles().getTemplate("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user-attribute-profile-template to retrieve. - -
-
-
-
- - -
-
-
- -
client.userAttributeProfiles.get(id) -> GetUserAttributeProfileResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details about a single User Attribute Profile specified by ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.userAttributeProfiles().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user-attribute-profile to retrieve. - -
-
-
-
- - -
-
-
- -
client.userAttributeProfiles.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a single User Attribute Profile specified by ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.userAttributeProfiles().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user-attribute-profile to delete. - -
-
-
-
- - -
-
-
- -
client.userAttributeProfiles.update(id, request) -> UpdateUserAttributeProfileResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update the details of a specific User attribute profile, such as name, user_id and user_attributes. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.userAttributeProfiles().update( - "id", - UpdateUserAttributeProfileRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user attribute profile to update. - -
-
- -
-
- -**name:** `Optional` - -
-
- -
-
- -**userId:** `Optional` - -
-
- -
-
- -**userAttributes:** `Optional>` - -
-
-
-
- - -
-
-
- -## UserBlocks -
client.userBlocks.listByIdentifier() -> ListUserBlocksByIdentifierResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details of all Brute-force Protection blocks for a user with the given identifier (username, phone number, or email). -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.userBlocks().listByIdentifier( - ListUserBlocksByIdentifierRequestParameters - .builder() - .identifier("identifier") - .considerBruteForceEnablement( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**identifier:** `String` — Should be any of a username, phone number, or email. - -
-
- -
-
- -**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. - - -
-
-
-
- - -
-
-
- -
client.userBlocks.deleteByIdentifier() -
-
- -#### 📝 Description - -
-
- -
-
- -Remove all Brute-force Protection blocks for the user with the given identifier (username, phone number, or email). - -Note: This endpoint does not unblock users that were blocked by a tenant administrator. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.userBlocks().deleteByIdentifier( - DeleteUserBlocksByIdentifierRequestParameters - .builder() - .identifier("identifier") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**identifier:** `String` — Should be any of a username, phone number, or email. - -
-
-
-
- - -
-
-
- -
client.userBlocks.list(id) -> ListUserBlocksResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details of all Brute-force Protection blocks for the user with the given ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.userBlocks().list( - "id", - ListUserBlocksRequestParameters - .builder() - .considerBruteForceEnablement( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — user_id of the user blocks to retrieve. - -
-
- -
-
- -**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. - - -
-
-
-
- - -
-
-
- -
client.userBlocks.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Remove all Brute-force Protection blocks for the user with the given ID. - -Note: This endpoint does not unblock users that were blocked by a tenant administrator. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.userBlocks().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The user_id of the user to update. - -
-
-
-
- - -
-
-
- -## Users -
client.users.list() -> SyncPagingIterable&lt;UserResponseSchema&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details of users. It is possible to: - -- Specify a 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. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -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) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. - -
-
- -
-
- -**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). - -
-
- -
-
- -**sort:** `Optional` — Field to sort by. Use field:order where order is 1 for ascending and -1 for descending. e.g. created_at:1 - -
-
- -
-
- -**connection:** `Optional` — Connection filter. Only applies when using search_engine=v1. To filter by connection with search_engine=v2|v3, use q=identities.connection:"connection_name" - -
-
- -
-
- -**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. - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). - -
-
- -
-
- -**q:** `Optional` — Query in Lucene query string syntax. Some query types cannot be used on metadata fields, for details see Searchable Fields. - -
-
- -
-
- -**searchEngine:** `Optional` — The version of the search engine - -
-
- -
-
- -**primaryOrder:** `Optional` — 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. - -
-
-
-
- - -
-
-
- -
client.users.create(request) -> CreateUserResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a new user for a given database or passwordless connection. - -Note: connection is required but other parameters such as email and password are dependent upon the type of connection. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().create( - CreateUserRequestContent - .builder() - .connection("connection") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**email:** `Optional` — The user's email. - -
-
- -
-
- -**phoneNumber:** `Optional` — The user's phone number (following the E.164 recommendation). - -
-
- -
-
- -**userMetadata:** `Optional>` - -
-
- -
-
- -**blocked:** `Optional` — Whether this user was blocked by an administrator (true) or not (false). - -
-
- -
-
- -**emailVerified:** `Optional` — Whether this email address is verified (true) or unverified (false). User will receive a verification email after creation if `email_verified` is false or not specified - -
-
- -
-
- -**phoneVerified:** `Optional` — Whether this phone number has been verified (true) or not (false). - -
-
- -
-
- -**appMetadata:** `Optional>` - -
-
- -
-
- -**givenName:** `Optional` — The user's given name(s). - -
-
- -
-
- -**familyName:** `Optional` — The user's family name(s). - -
-
- -
-
- -**name:** `Optional` — The user's full name. - -
-
- -
-
- -**nickname:** `Optional` — The user's nickname. - -
-
- -
-
- -**picture:** `Optional` — A URI pointing to the user's picture. - -
-
- -
-
- -**userId:** `Optional` — The external user's id provided by the identity provider. - -
-
- -
-
- -**connection:** `String` — Name of the connection this user should be created in. - -
-
- -
-
- -**password:** `Optional` — Initial password for this user. Only valid for auth0 connection strategy. - -
-
- -
-
- -**verifyEmail:** `Optional` — Whether the user will receive a verification email after creation (true) or no email (false). Overrides behavior of `email_verified` parameter. - -
-
- -
-
- -**username:** `Optional` — The user's username. Only valid if the connection requires a username. - -
-
-
-
- - -
-
-
- -
client.users.listUsersByEmail() -> List&lt;UserResponseSchema&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Find users by email. If Auth0 is the identity provider (idP), the email address associated with a user is saved in lower case, regardless of how you initially provided it. - -For example, if you register a user as JohnSmith@example.com, Auth0 saves the user's email as johnsmith@example.com. - -Therefore, when using this endpoint, make sure that you are searching for users via email addresses using the correct case. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().listUsersByEmail( - ListUsersByEmailRequestParameters - .builder() - .email("email") - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**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. - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). Defaults to true. - -
-
- -
-
- -**email:** `String` — Email address to search for (case-sensitive). - -
-
-
-
- - -
-
-
- -
client.users.get(id) -> GetUserResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see Retrieve Users with the Get Users Endpoint. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().get( - "id", - GetUserRequestParameters - .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to retrieve. - -
-
- -
-
- -**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. - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). - -
-
-
-
- - -
-
-
- -
client.users.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a user by user ID. This action cannot be undone. For Auth0 Dashboard instructions, see Delete Users. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to delete. - -
-
-
-
- - -
-
-
- -
client.users.update(id, request) -> UpdateUserResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update a user. - -These are the attributes that can be updated at the root level: - -
    -
  • app_metadata
  • -
  • blocked
  • -
  • email
  • -
  • email_verified
  • -
  • family_name
  • -
  • given_name
  • -
  • name
  • -
  • nickname
  • -
  • password
  • -
  • phone_number
  • -
  • phone_verified
  • -
  • picture
  • -
  • username
  • -
  • user_metadata
  • -
  • verify_email
  • -
- -Some considerations: -
    -
  • The properties of the new object will replace the old ones.
  • -
  • The metadata fields are an exception to this rule (user_metadata and app_metadata). These properties are merged instead of being replaced but be careful, the merge only occurs on the first level.
  • -
  • If you are updating email, email_verified, phone_number, phone_verified, username or password of a secondary identity, you need to specify the connection property too.
  • -
  • If you are updating email or phone_number you can specify, optionally, the client_id property.
  • -
  • Updating email_verified is not supported for enterprise and passwordless sms connections.
  • -
  • Updating the blocked to false does not affect the user's blocked state from an excessive amount of incorrectly provided credentials. Use the "Unblock a user" endpoint from the "User Blocks" API to change the user's state.
  • -
  • Supported attributes can be unset by supplying null as the value.
  • -
- -
Updating a field (non-metadata property)
-To mark the email address of a user as verified, the body to send should be: -
{ "email_verified": true }
- -
Updating a user metadata root property
Let's assume that our test user has the following user_metadata: -
{ "user_metadata" : { "profileCode": 1479 } }
- -To add the field addresses the body to send should be: -
{ "user_metadata" : { "addresses": {"work_address": "100 Industrial Way"} }}
- -The modified object ends up with the following user_metadata property:
{
-  "user_metadata": {
-    "profileCode": 1479,
-    "addresses": { "work_address": "100 Industrial Way" }
-  }
-}
- -
Updating an inner user metadata property
If there's existing user metadata to which we want to add "home_address": "742 Evergreen Terrace" (using the addresses property) we should send the whole addresses object. Since this is a first-level object, the object will be merged in, but its own properties will not be. The body to send should be: -
{
-  "user_metadata": {
-    "addresses": {
-      "work_address": "100 Industrial Way",
-      "home_address": "742 Evergreen Terrace"
-    }
-  }
-}
- -The modified object ends up with the following user_metadata property: -
{
-  "user_metadata": {
-    "profileCode": 1479,
-    "addresses": {
-      "work_address": "100 Industrial Way",
-      "home_address": "742 Evergreen Terrace"
-    }
-  }
-}
-
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().update( - "id", - UpdateUserRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to update. - -
-
- -
-
- -**blocked:** `Optional` — Whether this user was blocked by an administrator (true) or not (false). - -
-
- -
-
- -**emailVerified:** `Optional` — Whether this email address is verified (true) or unverified (false). If set to false the user will not receive a verification email unless `verify_email` is set to true. - -
-
- -
-
- -**email:** `Optional` — Email address of this user. - -
-
- -
-
- -**phoneNumber:** `Optional` — The user's phone number (following the E.164 recommendation). - -
-
- -
-
- -**phoneVerified:** `Optional` — Whether this phone number has been verified (true) or not (false). - -
-
- -
-
- -**userMetadata:** `Optional>` - -
-
- -
-
- -**appMetadata:** `Optional>` - -
-
- -
-
- -**givenName:** `Optional` — Given name/first name/forename of this user. - -
-
- -
-
- -**familyName:** `Optional` — Family name/last name/surname of this user. - -
-
- -
-
- -**name:** `Optional` — Name of this user. - -
-
- -
-
- -**nickname:** `Optional` — Preferred nickname or alias of this user. - -
-
- -
-
- -**picture:** `Optional` — URL to picture, photo, or avatar of this user. - -
-
- -
-
- -**verifyEmail:** `Optional` — Whether this user will receive a verification email after creation (true) or no email (false). Overrides behavior of `email_verified` parameter. - -
-
- -
-
- -**verifyPhoneNumber:** `Optional` — Whether this user will receive a text after changing the phone number (true) or no text (false). Only valid when changing phone number for SMS connections. - -
-
- -
-
- -**password:** `Optional` — New password for this user. Only valid for database connections. - -
-
- -
-
- -**connection:** `Optional` — Name of the connection to target for this user update. - -
-
- -
-
- -**clientId:** `Optional` — Auth0 client ID. Only valid when updating email address. - -
-
- -
-
- -**username:** `Optional` — The user's username. Only valid if the connection requires a username. - -
-
-
-
- - -
-
-
- -
client.users.regenerateRecoveryCode(id) -> RegenerateUsersRecoveryCodeResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -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. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -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() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user. - -
-
- -
-
- -**sessionId:** `Optional` — ID of the session to revoke. - -
-
- -
-
- -**preserveRefreshTokens:** `Optional` — Whether to preserve the refresh tokens associated with the session. - -
-
-
-
- - -
-
-
- -## Actions Versions -
client.actions.versions.list(actionId) -> SyncPagingIterable&lt;ActionVersion&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().versions().list( - "actionId", - ListActionVersionsRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(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"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**actionId:** `String` — The ID of the action. - -
-
- -
-
- -**id:** `String` — The ID of the action version. - -
-
-
-
- - -
-
-
- -
client.actions.versions.deploy(actionId, id, request) -> DeployActionVersionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Performs the equivalent of a roll-back of an action to an earlier, specified version. Creates a new, deployed action version that is identical to the specified version. If this action is currently bound to a trigger, the system will begin executing the newly-created version immediately. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().versions().deploy( - "actionId", - "id", - OptionalNullable.absent() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**actionId:** `String` — The ID of an action. - -
-
- -
-
- -**id:** `String` — The ID of an action version. - -
-
- -
-
- -**request:** `Optional` - -
-
-
-
- - -
-
-
- -## Actions Executions -
client.actions.executions.get(id) -> GetActionExecutionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve information about a specific execution of a trigger. Relevant execution IDs will be included in tenant logs generated as part of that authentication flow. Executions will only be stored for 10 days after their creation. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().executions().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the execution to retrieve. - -
-
-
-
- - -
-
-
- -## Actions Modules -
client.actions.modules.list() -> SyncPagingIterable&lt;ActionModuleListItem&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a paginated list of all Actions Modules with optional filtering and totals. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().modules().list( - GetActionModulesRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. Paging is disabled if parameter not sent. - -
-
-
-
- - -
-
-
- -
client.actions.modules.create(request) -> CreateActionModuleResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a new Actions Module for reusable code across actions. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().modules().create( - CreateActionModuleRequestContent - .builder() - .name("name") - .code("code") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `String` — The name of the action module. - -
-
- -
-
- -**code:** `String` — The source code of the action module. - -
-
- -
-
- -**secrets:** `Optional>` — The secrets to associate with the action module. - -
-
- -
-
- -**dependencies:** `Optional>` — The npm dependencies of the action module. - -
-
- -
-
- -**apiVersion:** `Optional` — The API version of the module. - -
-
- -
-
- -**publish:** `Optional` — Whether to publish the module immediately after creation. - -
-
-
-
- - -
-
-
- -
client.actions.modules.get(id) -> GetActionModuleResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details of a specific Actions Module by its unique identifier. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().modules().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the action module to retrieve. - -
-
-
-
- - -
-
-
- -
client.actions.modules.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Permanently delete an Actions Module. This will fail if the module is still in use by any actions. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().modules().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the Actions Module to delete. - -
-
-
-
- - -
-
-
- -
client.actions.modules.update(id, request) -> UpdateActionModuleResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update properties of an existing Actions Module, such as code, dependencies, or secrets. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().modules().update( - "id", - UpdateActionModuleRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the action module to update. - -
-
- -
-
- -**code:** `Optional` — The source code of the action module. - -
-
- -
-
- -**secrets:** `Optional>` — The secrets to associate with the action module. - -
-
- -
-
- -**dependencies:** `Optional>` — The npm dependencies of the action module. - -
-
-
-
- - -
-
-
- -
client.actions.modules.listActions(id) -> SyncPagingIterable&lt;ActionModuleAction&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().modules().listActions( - "id", - GetActionModuleActionsRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The unique ID of the module. - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. - -
-
-
-
- - -
-
-
- -
client.actions.modules.rollback(id, request) -> RollbackActionModuleResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Rolls back an Actions Module's draft to a previously created version. This action copies the code, dependencies, and secrets from the specified version into the current draft. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().modules().rollback( - "id", - RollbackActionModuleRequestParameters - .builder() - .moduleVersionId("module_version_id") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The unique ID of the module to roll back. - -
-
- -
-
- -**moduleVersionId:** `String` — The unique ID of the module version to roll back to. - -
-
-
-
- - -
-
-
- -## Actions Triggers -
client.actions.triggers.list() -> ListActionTriggersResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve the set of triggers currently available within actions. A trigger is an extensibility point to which actions can be bound. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().triggers().list(); -``` -
-
-
-
- - -
-
-
- -## Actions Modules Versions -
client.actions.modules.versions.list(id) -> SyncPagingIterable&lt;ActionModuleVersion&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -List all published versions of a specific Actions Module. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().modules().versions().list( - "id", - GetActionModuleVersionsRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The unique ID of the module. - -
-
- -
-
- -**page:** `Optional` — Use this field to request a specific page of the list results. - -
-
- -
-
- -**perPage:** `Optional` — The maximum number of results to be returned by the server in a single response. 20 by default. - -
-
-
-
- - -
-
-
- -
client.actions.modules.versions.create(id) -> CreateActionModuleVersionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Creates a new immutable version of an Actions Module from the current draft version. This publishes the draft as a new version that can be referenced by actions, while maintaining the existing draft for continued development. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().modules().versions().create("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the action module to create a version for. - -
-
-
-
- - -
-
-
- -
client.actions.modules.versions.get(id, versionId) -> GetActionModuleVersionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve the details of a specific, immutable version of an Actions Module. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().modules().versions().get("id", "versionId"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The unique ID of the module. - -
-
- -
-
- -**versionId:** `String` — The unique ID of the module version to retrieve. - -
-
-
-
- - -
-
-
- -## Actions Triggers Bindings -
client.actions.triggers.bindings.list(triggerId) -> SyncPagingIterable&lt;ActionBinding&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve the actions that are bound to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().triggers().bindings().list( - "triggerId", - ListActionTriggerBindingsRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**triggerId:** `String` — An actions extensibility point. - -
-
- -
-
- -**page:** `Optional` — Use this field to request a specific page of the list results. - -
-
- -
-
- -**perPage:** `Optional` — The maximum number of results to be returned in a single request. 20 by default - -
-
-
-
- - -
-
-
- -
client.actions.triggers.bindings.updateMany(triggerId, request) -> UpdateActionBindingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.actions().triggers().bindings().updateMany( - "triggerId", - UpdateActionBindingsRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**triggerId:** `String` — An actions extensibility point. - -
-
- -
-
- -**bindings:** `Optional>` — The actions that will be bound to this trigger. The order in which they are included will be the order in which they are executed. - -
-
-
-
- - -
-
-
- -## Anomaly Blocks -
client.anomaly.blocks.checkIp(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Check if the given IP address is blocked via the Suspicious IP Throttling due to multiple suspicious attempts. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.anomaly().blocks().checkIp("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — IP address to check. - -
-
-
-
- - -
-
-
- -
client.anomaly.blocks.unblockIp(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Remove a block imposed by Suspicious IP Throttling for the given IP address. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.anomaly().blocks().unblockIp("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — IP address to unblock. - -
-
-
-
- - -
-
-
- -## AttackProtection BotDetection -
client.attackProtection.botDetection.get() -> GetBotDetectionSettingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Get the Bot Detection configuration of your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.attackProtection().botDetection().get(); -``` -
-
-
-
- - -
-
-
- -
client.attackProtection.botDetection.update(request) -> UpdateBotDetectionSettingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update the Bot Detection configuration of your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.attackProtection().botDetection().update( - UpdateBotDetectionSettingsRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**botDetectionLevel:** `Optional` - -
-
- -
-
- -**challengePasswordPolicy:** `Optional` - -
-
- -
-
- -**challengePasswordlessPolicy:** `Optional` - -
-
- -
-
- -**challengePasswordResetPolicy:** `Optional` - -
-
- -
-
- -**allowlist:** `Optional>` - -
-
- -
-
- -**monitoringModeEnabled:** `Optional` - -
-
-
-
- - -
-
-
- -## AttackProtection BreachedPasswordDetection -
client.attackProtection.breachedPasswordDetection.get() -> GetBreachedPasswordDetectionSettingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details of the Breached Password Detection configuration of your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.attackProtection().breachedPasswordDetection().get(); -``` -
-
-
-
- - -
-
-
- -
client.attackProtection.breachedPasswordDetection.update(request) -> UpdateBreachedPasswordDetectionSettingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update details of the Breached Password Detection configuration of your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.attackProtection().breachedPasswordDetection().update( - UpdateBreachedPasswordDetectionSettingsRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**enabled:** `Optional` — Whether or not breached password detection is active. - -
-
- -
-
- -**shields:** `Optional>` - -Action to take when a breached password is detected during a login. - Possible values: block, user_notification, admin_notification. - -
-
- -
-
- -**adminNotificationFrequency:** `Optional>` - -When "admin_notification" is enabled, determines how often email notifications are sent. - Possible values: immediately, daily, weekly, monthly. - -
-
- -
-
- -**method:** `Optional` - -
-
- -
-
- -**stage:** `Optional` - -
-
-
-
- - -
-
-
- -## AttackProtection BruteForceProtection -
client.attackProtection.bruteForceProtection.get() -> GetBruteForceSettingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details of the Brute-force Protection configuration of your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.attackProtection().bruteForceProtection().get(); -``` -
-
-
-
- - -
-
-
- -
client.attackProtection.bruteForceProtection.update(request) -> UpdateBruteForceSettingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update the Brute-force Protection configuration of your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.attackProtection().bruteForceProtection().update( - UpdateBruteForceSettingsRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**enabled:** `Optional` — Whether or not brute force attack protections are active. - -
-
- -
-
- -**shields:** `Optional>` - -Action to take when a brute force protection threshold is violated. - Possible values: block, user_notification. - -
-
- -
-
- -**allowlist:** `Optional>` — List of trusted IP addresses that will not have attack protection enforced against them. - -
-
- -
-
- -**mode:** `Optional` - -
-
- -
-
- -**maxAttempts:** `Optional` — Maximum number of unsuccessful attempts. - -
-
-
-
- - -
-
-
- -## AttackProtection Captcha -
client.attackProtection.captcha.get() -> GetAttackProtectionCaptchaResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Get the CAPTCHA configuration for your client. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.attackProtection().captcha().get(); -``` -
-
-
-
- - -
-
-
- -
client.attackProtection.captcha.update(request) -> UpdateAttackProtectionCaptchaResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update existing CAPTCHA configuration for your client. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.attackProtection().captcha().update( - UpdateAttackProtectionCaptchaRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**activeProviderId:** `Optional` - -
-
- -
-
- -**arkose:** `Optional` - -
-
- -
-
- -**authChallenge:** `Optional` - -
-
- -
-
- -**hcaptcha:** `Optional` - -
-
- -
-
- -**friendlyCaptcha:** `Optional` - -
-
- -
-
- -**recaptchaEnterprise:** `Optional` - -
-
- -
-
- -**recaptchaV2:** `Optional` - -
-
- -
-
- -**simpleCaptcha:** `Optional>` - -
-
-
-
- - -
-
-
- -## AttackProtection SuspiciousIpThrottling -
client.attackProtection.suspiciousIpThrottling.get() -> GetSuspiciousIpThrottlingSettingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details of the Suspicious IP Throttling configuration of your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.attackProtection().suspiciousIpThrottling().get(); -``` -
-
-
-
- - -
-
-
- -
client.attackProtection.suspiciousIpThrottling.update(request) -> UpdateSuspiciousIpThrottlingSettingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update the details of the Suspicious IP Throttling configuration of your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.attackProtection().suspiciousIpThrottling().update( - UpdateSuspiciousIpThrottlingSettingsRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**enabled:** `Optional` — Whether or not suspicious IP throttling attack protections are active. - -
-
- -
-
- -**shields:** `Optional>` - -Action to take when a suspicious IP throttling threshold is violated. - Possible values: block, admin_notification. - -
-
- -
-
- -**allowlist:** `Optional>` - -
-
- -
-
- -**stage:** `Optional` - -
-
-
-
- - -
-
-
- -## Branding Templates -
client.branding.templates.getUniversalLogin() -> GetUniversalLoginTemplateResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().templates().getUniversalLogin(); -``` -
-
-
-
- - -
-
-
- -
client.branding.templates.updateUniversalLogin(request) -
-
- -#### 📝 Description - -
-
- -
-
- -Update the Universal Login branding template. - -

When content-type header is set to application/json:

-
-{
-  "template": "<!DOCTYPE html>{% assign resolved_dir = dir | default: "auto" %}<html lang="{{locale}}" dir="{{resolved_dir}}"><head>{%- auth0:head -%}</head><body class="_widget-auto-layout">{%- auth0:widget -%}</body></html>"
-}
-
- -

- When content-type header is set to text/html: -

-
-<!DOCTYPE html>
-{% assign resolved_dir = dir | default: "auto" %}
-<html lang="{{locale}}" dir="{{resolved_dir}}">
-  <head>
-    {%- auth0:head -%}
-  </head>
-  <body class="_widget-auto-layout">
-    {%- auth0:widget -%}
-  </body>
-</html>
-
-
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().templates().updateUniversalLogin( - UpdateUniversalLoginTemplateRequestContent.of("string") -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `UpdateUniversalLoginTemplateRequestContent` - -
-
-
-
- - -
-
-
- -
client.branding.templates.deleteUniversalLogin() -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().templates().deleteUniversalLogin(); -``` -
-
-
-
- - -
-
-
- -## Branding Themes -
client.branding.themes.create(request) -> CreateBrandingThemeResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create branding theme. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().themes().create( - CreateBrandingThemeRequestContent - .builder() - .borders( - BrandingThemeBorders - .builder() - .buttonBorderRadius(1.1) - .buttonBorderWeight(1.1) - .buttonsStyle(BrandingThemeBordersButtonsStyleEnum.PILL) - .inputBorderRadius(1.1) - .inputBorderWeight(1.1) - .inputsStyle(BrandingThemeBordersInputsStyleEnum.PILL) - .showWidgetShadow(true) - .widgetBorderWeight(1.1) - .widgetCornerRadius(1.1) - .build() - ) - .colors( - BrandingThemeColors - .builder() - .bodyText("body_text") - .error("error") - .header("header") - .icons("icons") - .inputBackground("input_background") - .inputBorder("input_border") - .inputFilledText("input_filled_text") - .inputLabelsPlaceholders("input_labels_placeholders") - .linksFocusedComponents("links_focused_components") - .primaryButton("primary_button") - .primaryButtonLabel("primary_button_label") - .secondaryButtonBorder("secondary_button_border") - .secondaryButtonLabel("secondary_button_label") - .success("success") - .widgetBackground("widget_background") - .widgetBorder("widget_border") - .build() - ) - .fonts( - BrandingThemeFonts - .builder() - .bodyText( - BrandingThemeFontBodyText - .builder() - .bold(true) - .size(1.1) - .build() - ) - .buttonsText( - BrandingThemeFontButtonsText - .builder() - .bold(true) - .size(1.1) - .build() - ) - .fontUrl("font_url") - .inputLabels( - BrandingThemeFontInputLabels - .builder() - .bold(true) - .size(1.1) - .build() - ) - .links( - BrandingThemeFontLinks - .builder() - .bold(true) - .size(1.1) - .build() - ) - .linksStyle(BrandingThemeFontLinksStyleEnum.NORMAL) - .referenceTextSize(1.1) - .subtitle( - BrandingThemeFontSubtitle - .builder() - .bold(true) - .size(1.1) - .build() - ) - .title( - BrandingThemeFontTitle - .builder() - .bold(true) - .size(1.1) - .build() - ) - .build() - ) - .pageBackground( - BrandingThemePageBackground - .builder() - .backgroundColor("background_color") - .backgroundImageUrl("background_image_url") - .pageLayout(BrandingThemePageBackgroundPageLayoutEnum.CENTER) - .build() - ) - .widget( - BrandingThemeWidget - .builder() - .headerTextAlignment(BrandingThemeWidgetHeaderTextAlignmentEnum.CENTER) - .logoHeight(1.1) - .logoPosition(BrandingThemeWidgetLogoPositionEnum.CENTER) - .logoUrl("logo_url") - .socialButtonsLayout(BrandingThemeWidgetSocialButtonsLayoutEnum.BOTTOM) - .build() - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**borders:** `BrandingThemeBorders` - -
-
- -
-
- -**colors:** `BrandingThemeColors` - -
-
- -
-
- -**displayName:** `Optional` — Display Name - -
-
- -
-
- -**fonts:** `BrandingThemeFonts` - -
-
- -
-
- -**pageBackground:** `BrandingThemePageBackground` - -
-
- -
-
- -**widget:** `BrandingThemeWidget` - -
-
-
-
- - -
-
-
- -
client.branding.themes.getDefault() -> GetBrandingDefaultThemeResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve default branding theme. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().themes().getDefault(); -``` -
-
-
-
- - -
-
-
- -
client.branding.themes.get(themeId) -> GetBrandingThemeResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve branding theme. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().themes().get("themeId"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**themeId:** `String` — The ID of the theme - -
-
-
-
- - -
-
-
- -
client.branding.themes.delete(themeId) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete branding theme. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().themes().delete("themeId"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**themeId:** `String` — The ID of the theme - -
-
-
-
- - -
-
-
- -
client.branding.themes.update(themeId, request) -> UpdateBrandingThemeResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update branding theme. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().themes().update( - "themeId", - UpdateBrandingThemeRequestContent - .builder() - .borders( - BrandingThemeBorders - .builder() - .buttonBorderRadius(1.1) - .buttonBorderWeight(1.1) - .buttonsStyle(BrandingThemeBordersButtonsStyleEnum.PILL) - .inputBorderRadius(1.1) - .inputBorderWeight(1.1) - .inputsStyle(BrandingThemeBordersInputsStyleEnum.PILL) - .showWidgetShadow(true) - .widgetBorderWeight(1.1) - .widgetCornerRadius(1.1) - .build() - ) - .colors( - BrandingThemeColors - .builder() - .bodyText("body_text") - .error("error") - .header("header") - .icons("icons") - .inputBackground("input_background") - .inputBorder("input_border") - .inputFilledText("input_filled_text") - .inputLabelsPlaceholders("input_labels_placeholders") - .linksFocusedComponents("links_focused_components") - .primaryButton("primary_button") - .primaryButtonLabel("primary_button_label") - .secondaryButtonBorder("secondary_button_border") - .secondaryButtonLabel("secondary_button_label") - .success("success") - .widgetBackground("widget_background") - .widgetBorder("widget_border") - .build() - ) - .fonts( - BrandingThemeFonts - .builder() - .bodyText( - BrandingThemeFontBodyText - .builder() - .bold(true) - .size(1.1) - .build() - ) - .buttonsText( - BrandingThemeFontButtonsText - .builder() - .bold(true) - .size(1.1) - .build() - ) - .fontUrl("font_url") - .inputLabels( - BrandingThemeFontInputLabels - .builder() - .bold(true) - .size(1.1) - .build() - ) - .links( - BrandingThemeFontLinks - .builder() - .bold(true) - .size(1.1) - .build() - ) - .linksStyle(BrandingThemeFontLinksStyleEnum.NORMAL) - .referenceTextSize(1.1) - .subtitle( - BrandingThemeFontSubtitle - .builder() - .bold(true) - .size(1.1) - .build() - ) - .title( - BrandingThemeFontTitle - .builder() - .bold(true) - .size(1.1) - .build() - ) - .build() - ) - .pageBackground( - BrandingThemePageBackground - .builder() - .backgroundColor("background_color") - .backgroundImageUrl("background_image_url") - .pageLayout(BrandingThemePageBackgroundPageLayoutEnum.CENTER) - .build() - ) - .widget( - BrandingThemeWidget - .builder() - .headerTextAlignment(BrandingThemeWidgetHeaderTextAlignmentEnum.CENTER) - .logoHeight(1.1) - .logoPosition(BrandingThemeWidgetLogoPositionEnum.CENTER) - .logoUrl("logo_url") - .socialButtonsLayout(BrandingThemeWidgetSocialButtonsLayoutEnum.BOTTOM) - .build() - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**themeId:** `String` — The ID of the theme - -
-
- -
-
- -**borders:** `BrandingThemeBorders` - -
-
- -
-
- -**colors:** `BrandingThemeColors` - -
-
- -
-
- -**displayName:** `Optional` — Display Name - -
-
- -
-
- -**fonts:** `BrandingThemeFonts` - -
-
- -
-
- -**pageBackground:** `BrandingThemePageBackground` - -
-
- -
-
- -**widget:** `BrandingThemeWidget` - -
-
-
-
- - -
-
-
- -## Branding Phone Providers -
client.branding.phone.providers.list() -> ListBrandingPhoneProvidersResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a list of phone providers details set for a Tenant. A list of fields to include or exclude may also be specified. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().phone().providers().list( - ListBrandingPhoneProvidersRequestParameters - .builder() - .disabled( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**disabled:** `Optional` — Whether the provider is enabled (false) or disabled (true). - -
-
-
-
- - -
-
-
- -
client.branding.phone.providers.create(request) -> CreateBrandingPhoneProviderResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a phone provider. -The credentials object requires different properties depending on the phone provider (which is specified using the name property). -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().phone().providers().create( - CreateBrandingPhoneProviderRequestContent - .builder() - .name(PhoneProviderNameEnum.TWILIO) - .credentials( - PhoneProviderCredentials.of( - TwilioProviderCredentials - .builder() - .authToken("auth_token") - .build() - ) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `PhoneProviderNameEnum` - -
-
- -
-
- -**disabled:** `Optional` — Whether the provider is enabled (false) or disabled (true). - -
-
- -
-
- -**configuration:** `Optional` - -
-
- -
-
- -**credentials:** `PhoneProviderCredentials` - -
-
-
-
- - -
-
-
- -
client.branding.phone.providers.get(id) -> GetBrandingPhoneProviderResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve phone provider details. A list of fields to include or exclude may also be specified. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().phone().providers().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` - -
-
-
-
- - -
-
-
- -
client.branding.phone.providers.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete the configured phone provider. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().phone().providers().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` - -
-
-
-
- - -
-
-
- -
client.branding.phone.providers.update(id, request) -> UpdateBrandingPhoneProviderResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update a phone provider. -The credentials object requires different properties depending on the phone provider (which is specified using the name property). -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().phone().providers().update( - "id", - UpdateBrandingPhoneProviderRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` - -
-
- -
-
- -**name:** `Optional` - -
-
- -
-
- -**disabled:** `Optional` — Whether the provider is enabled (false) or disabled (true). - -
-
- -
-
- -**credentials:** `Optional` - -
-
- -
-
- -**configuration:** `Optional` - -
-
-
-
- - -
-
-
- -
client.branding.phone.providers.test(id, request) -> CreatePhoneProviderSendTestResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().phone().providers().test( - "id", - CreatePhoneProviderSendTestRequestContent - .builder() - .to("to") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` - -
-
- -
-
- -**to:** `String` — The recipient phone number to receive a given notification. - -
-
- -
-
- -**deliveryMethod:** `Optional` - -
-
-
-
- - -
-
-
- -## Branding Phone Templates -
client.branding.phone.templates.list() -> ListPhoneTemplatesResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().phone().templates().list( - ListPhoneTemplatesRequestParameters - .builder() - .disabled( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**disabled:** `Optional` — Whether the template is enabled (false) or disabled (true). - -
-
-
-
- - -
-
-
- -
client.branding.phone.templates.create(request) -> CreatePhoneTemplateResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().phone().templates().create( - CreatePhoneTemplateRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**type:** `Optional` - -
-
- -
-
- -**disabled:** `Optional` — Whether the template is enabled (false) or disabled (true). - -
-
- -
-
- -**content:** `Optional` - -
-
-
-
- - -
-
-
- -
client.branding.phone.templates.get(id) -> GetPhoneTemplateResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().phone().templates().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` - -
-
-
-
- - -
-
-
- -
client.branding.phone.templates.delete(id) -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().phone().templates().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` - -
-
-
-
- - -
-
-
- -
client.branding.phone.templates.update(id, request) -> UpdatePhoneTemplateResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().phone().templates().update( - "id", - UpdatePhoneTemplateRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` - -
-
- -
-
- -**content:** `Optional` - -
-
- -
-
- -**disabled:** `Optional` — Whether the template is enabled (false) or disabled (true). - -
-
-
-
- - -
-
-
- -
client.branding.phone.templates.reset(id, request) -> ResetPhoneTemplateResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().phone().templates().reset("id", new -HashMap() {{put("key", "value"); -}}); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` - -
-
- -
-
- -**request:** `Object` - -
-
-
-
- - -
-
-
- -
client.branding.phone.templates.test(id, request) -> CreatePhoneTemplateTestNotificationResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.branding().phone().templates().test( - "id", - CreatePhoneTemplateTestNotificationRequestContent - .builder() - .to("to") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` - -
-
- -
-
- -**to:** `String` — Destination of the testing phone notification - -
-
- -
-
- -**deliveryMethod:** `Optional` - -
-
-
-
- - -
-
-
- -## ClientGrants Organizations -
client.clientGrants.organizations.list(id) -> SyncPagingIterable&lt;Organization&gt; -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.clientGrants().organizations().list( - "id", - ListClientGrantOrganizationsRequestParameters - .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the client grant - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
-
-
- - -
-
-
- -## Clients Credentials -
client.clients.credentials.list(clientId) -> List&lt;ClientCredential&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Get the details of a client credential. - -Important: To enable credentials to be used for a client authentication method, set the client_authentication_methods property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the signed_request_object property on the client. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.clients().credentials().list("client_id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**clientId:** `String` — ID of the client. - -
-
-
-
- - -
-
-
- -
client.clients.credentials.create(clientId, request) -> PostClientCredentialResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a client credential associated to your application. Credentials can be used to configure Private Key JWT and mTLS authentication methods, as well as for JWT-secured Authorization requests. - -
Public Key
Public Key credentials can be used to set up Private Key JWT client authentication and JWT-secured Authorization requests. - -Sample:
{
-  "credential_type": "public_key",
-  "name": "string",
-  "pem": "string",
-  "alg": "RS256",
-  "parse_expiry_from_cert": false,
-  "expires_at": "2022-12-31T23:59:59Z"
-}
-
Certificate (CA-signed & self-signed)
Certificate credentials can be used to set up mTLS client authentication. CA-signed certificates can be configured either with a signed certificate or with just the certificate Subject DN. - -CA-signed Certificate Sample (pem):
{
-  "credential_type": "x509_cert",
-  "name": "string",
-  "pem": "string"
-}
CA-signed Certificate Sample (subject_dn):
{
-  "credential_type": "cert_subject_dn",
-  "name": "string",
-  "subject_dn": "string"
-}
Self-signed Certificate Sample:
{
-  "credential_type": "cert_subject_dn",
-  "name": "string",
-  "pem": "string"
-}
- -The credential will be created but not yet enabled for use until you set the corresponding properties in the client: - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.clients().credentials().create( - "client_id", - PostClientCredentialRequestContent - .builder() - .credentialType(ClientCredentialTypeEnum.PUBLIC_KEY) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**clientId:** `String` — ID of the client. - -
-
- -
-
- -**credentialType:** `ClientCredentialTypeEnum` - -
-
- -
-
- -**name:** `Optional` — Friendly name for a credential. - -
-
- -
-
- -**subjectDn:** `Optional` — Subject Distinguished Name. Mutually exclusive with `pem` property. Applies to `cert_subject_dn` credential type. - -
-
- -
-
- -**pem:** `Optional` — PEM-formatted public key (SPKI and PKCS1) or X509 certificate. Must be JSON escaped. - -
-
- -
-
- -**alg:** `Optional` - -
-
- -
-
- -**parseExpiryFromCert:** `Optional` — Parse expiry from x509 certificate. If true, attempts to parse the expiry date from the provided PEM. Applies to `public_key` credential type. - -
-
- -
-
- -**expiresAt:** `Optional` — The ISO 8601 formatted date representing the expiration of the credential. If not specified (not recommended), the credential never expires. Applies to `public_key` credential type. - -
-
-
-
- - -
-
-
- -
client.clients.credentials.get(clientId, credentialId) -> GetClientCredentialResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Get the details of a client credential. - -Important: To enable credentials to be used for a client authentication method, set the client_authentication_methods property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the signed_request_object property on the client. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.clients().credentials().get("client_id", "credential_id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**clientId:** `String` — ID of the client. - -
-
- -
-
- -**credentialId:** `String` — ID of the credential. - -
-
-
-
- - -
-
-
- -
client.clients.credentials.delete(clientId, credentialId) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a client credential you previously created. May be enabled or disabled. For more information, read Client Credential Flow. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.clients().credentials().delete("client_id", "credential_id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**clientId:** `String` — ID of the client. - -
-
- -
-
- -**credentialId:** `String` — ID of the credential to delete. - -
-
-
-
- - -
-
-
- -
client.clients.credentials.update(clientId, credentialId, request) -> PatchClientCredentialResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Change a client credential you previously created. May be enabled or disabled. For more information, read Client Credential Flow. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.clients().credentials().update( - "client_id", - "credential_id", - PatchClientCredentialRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**clientId:** `String` — ID of the client. - -
-
- -
-
- -**credentialId:** `String` — ID of the credential. - -
-
- -
-
- -**expiresAt:** `Optional` — The ISO 8601 formatted date representing the expiration of the credential. - -
-
-
-
- - -
-
-
- -## Clients Connections -
client.clients.connections.get(id) -> SyncPagingIterable&lt;ConnectionForList&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve all connections that are enabled for the specified Application, using checkpoint pagination. A list of fields to include or exclude for each connection may also be specified. -
    -
  • - This endpoint requires the read:connections scope and any one of read:clients or read:client_summary. -
  • -
  • - 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.clients().connections().get( - "id", - ConnectionsGetRequest - .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the client for which to retrieve enabled connections. - -
-
- -
-
- -**strategy:** `Optional` — Provide strategies to only retrieve connections with such strategies - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
- -
-
- -**fields:** `Optional` — A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields - -
-
- -
-
- -**includeFields:** `Optional` — true if the fields specified are to be included in the result, false otherwise (defaults to true) - -
-
-
-
- - -
-
-
- -## Connections DirectoryProvisioning -
client.connections.directoryProvisioning.list() -> SyncPagingIterable&lt;DirectoryProvisioning&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a list of directory provisioning configurations of a tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.connections().directoryProvisioning().list( - ListDirectoryProvisioningsRequestParameters - .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(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.absent() -); -``` -
-
-
-
- -#### ⚙️ 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.absent() -); -``` -
-
-
-
- -#### ⚙️ 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 - -
-
-
-
- - -
-
-
- -## Connections Clients -
client.connections.clients.get(id) -> SyncPagingIterable&lt;ConnectionEnabledClient&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve all clients that have the specified connection 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( - OptionalNullable.of(1) - ) - .from( - OptionalNullable.of("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 or OIDC connection strategy. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.connections().keys().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the connection - -
-
-
-
- - -
-
-
- -
client.connections.keys.rotate(id, request) -> RotateConnectionsKeysResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Rotates the connection keys for the Okta or OIDC connection strategies. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.connections().keys().rotate( - "id", - OptionalNullable.absent() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the connection - -
-
- -
-
- -**request:** `Optional` - -
-
-
-
- - -
-
-
- -## Connections ScimConfiguration -
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.absent() -); -``` -
-
-
-
- -#### ⚙️ 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 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 in your tenant. A list of fields to include or exclude may also be specified. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.emails().provider().get( - GetEmailProviderRequestParameters - .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(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. 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) - .credentials( - EmailProviderCredentialsSchema.of( - EmailProviderCredentialsSchemaZero - .builder() - .apiKey("api_key") - .build() - ) - ) - .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:** `EmailProviderCredentialsSchema` - -
-
- -
-
- -**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. 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) -> List&lt;EventStreamDelivery&gt; -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -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) - ) - .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 - -
-
-
-
- - -
-
-
- -## 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 - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
-
-
- - -
-
-
- -
client.flows.executions.get(flowId, executionId) -> GetFlowExecutionResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.flows().executions().get( - "flow_id", - "execution_id", - GetFlowExecutionRequestParameters - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**flowId:** `String` — Flow id - -
-
- -
-
- -**executionId:** `String` — Flow execution id - -
-
- -
-
- -**hydrate:** `Optional` — Hydration param - -
-
-
-
- - -
-
-
- -
client.flows.executions.delete(flowId, executionId) -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.flows().executions().delete("flow_id", "execution_id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**flowId:** `String` — Flows id - -
-
- -
-
- -**executionId:** `String` — Flow execution identifier - -
-
-
-
- - -
-
-
- -## Flows Vault Connections -
client.flows.vault.connections.list() -> SyncPagingIterable&lt;FlowsVaultConnectionSummary&gt; -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.flows().vault().connections().list( - ListFlowsVaultConnectionsRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**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.flows.vault.connections.create(request) -> CreateFlowsVaultConnectionResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.flows().vault().connections().create( - CreateFlowsVaultConnectionRequestContent.of( - CreateFlowsVaultConnectionActivecampaign.of( - CreateFlowsVaultConnectionActivecampaignApiKey - .builder() - .name("name") - .appId(FlowsVaultConnectionAppIdActivecampaignEnum.ACTIVECAMPAIGN) - .setup( - FlowsVaultConnectioSetupApiKeyWithBaseUrl - .builder() - .type(FlowsVaultConnectioSetupTypeApiKeyEnum.API_KEY) - .apiKey("api_key") - .baseUrl("base_url") - .build() - ) - .build() - ) - ) -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `CreateFlowsVaultConnectionRequestContent` - -
-
-
-
- - -
-
-
- -
client.flows.vault.connections.get(id) -> GetFlowsVaultConnectionResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.flows().vault().connections().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Flows Vault connection ID - -
-
-
-
- - -
-
-
- -
client.flows.vault.connections.delete(id) -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.flows().vault().connections().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Vault connection id - -
-
-
-
- - -
-
-
- -
client.flows.vault.connections.update(id, request) -> UpdateFlowsVaultConnectionResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.flows().vault().connections().update( - "id", - UpdateFlowsVaultConnectionRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Flows Vault connection ID - -
-
- -
-
- -**name:** `Optional` — Flows Vault Connection name. - -
-
- -
-
- -**setup:** `Optional` - -
-
-
-
- - -
-
-
- -## Groups Members -
client.groups.members.get(id) -> SyncPagingIterable&lt;GroupMember&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -List all users that are a member of this group. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.groups().members().get( - "id", - GetGroupMembersRequestParameters - .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Unique identifier for the group (service-generated). - -
-
- -
-
- -**fields:** `Optional` — A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
-
-
- - -
-
-
- -## Guardian Enrollments -
client.guardian.enrollments.createTicket(request) -> CreateGuardianEnrollmentTicketResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a multi-factor authentication (MFA) enrollment ticket, and optionally send an email with the created ticket, to a given user. -Create a multi-factor authentication (MFA) enrollment ticket, and optionally send an email with the created ticket to a given user. Enrollment tickets can specify which factor users must enroll with or allow existing MFA users to enroll in additional factors.
- -Note: Users cannot enroll in Email as a factor through custom enrollment tickets. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().enrollments().createTicket( - CreateGuardianEnrollmentTicketRequestContent - .builder() - .userId("user_id") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**userId:** `String` — user_id for the enrollment ticket - -
-
- -
-
- -**email:** `Optional` — alternate email to which the enrollment email will be sent. Optional - by default, the email will be sent to the user's default address - -
-
- -
-
- -**sendMail:** `Optional` — Send an email to the user to start the enrollment - -
-
- -
-
- -**emailLocale:** `Optional` — Optional. Specify the locale of the enrollment email. Used with send_email. - -
-
- -
-
- -**factor:** `Optional` - -
-
- -
-
- -**allowMultipleEnrollments:** `Optional` — Optional. Allows a user who has previously enrolled in MFA to enroll with additional factors.
Note: Parameter can only be used with Universal Login; it cannot be used with Classic Login or custom MFA pages. - -
-
-
-
- - -
-
-
- -
client.guardian.enrollments.get(id) -> GetGuardianEnrollmentResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details, such as status and type, for a specific multi-factor authentication enrollment registered to a user account. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().enrollments().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the enrollment to be retrieve. - -
-
-
-
- - -
-
-
- -
client.guardian.enrollments.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Remove a specific multi-factor authentication (MFA) enrollment from a user's account. This allows the user to re-enroll with MFA. For more information, review Reset User Multi-Factor Authentication and Recovery Codes. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().enrollments().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the enrollment to be deleted. - -
-
-
-
- - -
-
-
- -## Guardian Factors -
client.guardian.factors.list() -> List&lt;GuardianFactor&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details of all multi-factor authentication factors associated with your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().list(); -``` -
-
-
-
- - -
-
-
- -
client.guardian.factors.set(name, request) -> SetGuardianFactorResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update the status (i.e., enabled or disabled) of a specific multi-factor authentication factor. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().set( - GuardianFactorNameEnum.PUSH_NOTIFICATION, - SetGuardianFactorRequestContent - .builder() - .enabled(true) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `GuardianFactorNameEnum` — Factor name. Can be `sms`, `push-notification`, `email`, `duo` `otp` `webauthn-roaming`, `webauthn-platform`, or `recovery-code`. - -
-
- -
-
- -**enabled:** `Boolean` — Whether this factor is enabled (true) or disabled (false). - -
-
-
-
- - -
-
-
- -## Guardian Policies -
client.guardian.policies.list() -> List&lt;MfaPolicyEnum&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve the multi-factor authentication (MFA) policies configured for your tenant. - -The following policies are supported: -
    -
  • all-applications policy prompts with MFA for all logins.
  • -
  • confidence-score policy prompts with MFA only for low confidence logins.
  • -
- -Note: The confidence-score policy is part of the Adaptive MFA feature. Adaptive MFA requires an add-on for the Enterprise plan; review Auth0 Pricing for more details. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().policies().list(); -``` -
-
-
-
- - -
-
-
- -
client.guardian.policies.set(request) -> List&lt;MfaPolicyEnum&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Set multi-factor authentication (MFA) policies for your tenant. - -The following policies are supported: -
    -
  • all-applications policy prompts with MFA for all logins.
  • -
  • confidence-score policy prompts with MFA only for low confidence logins.
  • -
- -Note: The confidence-score policy is part of the Adaptive MFA feature. Adaptive MFA requires an add-on for the Enterprise plan; review Auth0 Pricing for more details. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().policies().set( - Arrays.asList(MfaPolicyEnum.ALL_APPLICATIONS) -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `List` - -
-
-
-
- - -
-
-
- -## Guardian Factors Phone -
client.guardian.factors.phone.getMessageTypes() -> GetGuardianFactorPhoneMessageTypesResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve list of phone-type MFA factors (i.e., sms and voice) that are enabled for your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().phone().getMessageTypes(); -``` -
-
-
-
- - -
-
-
- -
client.guardian.factors.phone.setMessageTypes(request) -> SetGuardianFactorPhoneMessageTypesResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Replace the list of phone-type MFA factors (i.e., sms and voice) that are enabled for your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().phone().setMessageTypes( - SetGuardianFactorPhoneMessageTypesRequestContent - .builder() - .messageTypes( - Arrays.asList(GuardianFactorPhoneFactorMessageTypeEnum.SMS) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**messageTypes:** `List` — The list of phone factors to enable on the tenant. Can include `sms` and `voice`. - -
-
-
-
- - -
-
-
- -
client.guardian.factors.phone.getTwilioProvider() -> GetGuardianFactorsProviderPhoneTwilioResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve configuration details for a Twilio phone provider that has been set up in your tenant. To learn more, review Configure SMS and Voice Notifications for MFA. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().phone().getTwilioProvider(); -``` -
-
-
-
- - -
-
-
- -
client.guardian.factors.phone.setTwilioProvider(request) -> SetGuardianFactorsProviderPhoneTwilioResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update the configuration of a Twilio phone provider that has been set up in your tenant. To learn more, review Configure SMS and Voice Notifications for MFA. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().phone().setTwilioProvider( - SetGuardianFactorsProviderPhoneTwilioRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**from:** `Optional` — From number - -
-
- -
-
- -**messagingServiceSid:** `Optional` — Copilot SID - -
-
- -
-
- -**authToken:** `Optional` — Twilio Authentication token - -
-
- -
-
- -**sid:** `Optional` — Twilio SID - -
-
-
-
- - -
-
-
- -
client.guardian.factors.phone.getSelectedProvider() -> GetGuardianFactorsProviderPhoneResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details of the multi-factor authentication phone provider configured for your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().phone().getSelectedProvider(); -``` -
-
-
-
- - -
-
-
- -
client.guardian.factors.phone.setProvider(request) -> SetGuardianFactorsProviderPhoneResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().phone().setProvider( - SetGuardianFactorsProviderPhoneRequestContent - .builder() - .provider(GuardianFactorsProviderSmsProviderEnum.AUTH0) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**provider:** `GuardianFactorsProviderSmsProviderEnum` - -
-
-
-
- - -
-
-
- -
client.guardian.factors.phone.getTemplates() -> GetGuardianFactorPhoneTemplatesResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details of the multi-factor authentication enrollment and verification templates for phone-type factors available in your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().phone().getTemplates(); -``` -
-
-
-
- - -
-
-
- -
client.guardian.factors.phone.setTemplates(request) -> SetGuardianFactorPhoneTemplatesResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Customize the messages sent to complete phone enrollment and verification (subscription required). -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().phone().setTemplates( - SetGuardianFactorPhoneTemplatesRequestContent - .builder() - .enrollmentMessage("enrollment_message") - .verificationMessage("verification_message") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**enrollmentMessage:** `String` — Message sent to the user when they are invited to enroll with a phone number. - -
-
- -
-
- -**verificationMessage:** `String` — Message sent to the user when they are prompted to verify their account. - -
-
-
-
- - -
-
-
- -## Guardian Factors PushNotification -
client.guardian.factors.pushNotification.getApnsProvider() -> GetGuardianFactorsProviderApnsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve configuration details for the multi-factor authentication APNS provider associated with your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().pushNotification().getApnsProvider(); -``` -
-
-
-
- - -
-
-
- -
client.guardian.factors.pushNotification.setApnsProvider(request) -> SetGuardianFactorsProviderPushNotificationApnsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().pushNotification().setApnsProvider( - SetGuardianFactorsProviderPushNotificationApnsRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**sandbox:** `Optional` - -
-
- -
-
- -**bundleId:** `Optional` - -
-
- -
-
- -**p12:** `Optional` - -
-
-
-
- - -
-
-
- -
client.guardian.factors.pushNotification.updateApnsProvider(request) -> UpdateGuardianFactorsProviderPushNotificationApnsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().pushNotification().updateApnsProvider( - UpdateGuardianFactorsProviderPushNotificationApnsRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**sandbox:** `Optional` - -
-
- -
-
- -**bundleId:** `Optional` - -
-
- -
-
- -**p12:** `Optional` - -
-
-
-
- - -
-
-
- -
client.guardian.factors.pushNotification.setFcmProvider(request) -> Map&lt;String, Object&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().pushNotification().setFcmProvider( - SetGuardianFactorsProviderPushNotificationFcmRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**serverKey:** `Optional` - -
-
-
-
- - -
-
-
- -
client.guardian.factors.pushNotification.updateFcmProvider(request) -> Map&lt;String, Object&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().pushNotification().updateFcmProvider( - UpdateGuardianFactorsProviderPushNotificationFcmRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**serverKey:** `Optional` - -
-
-
-
- - -
-
-
- -
client.guardian.factors.pushNotification.setFcmv1Provider(request) -> Map&lt;String, Object&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().pushNotification().setFcmv1Provider( - SetGuardianFactorsProviderPushNotificationFcmv1RequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**serverCredentials:** `Optional` - -
-
-
-
- - -
-
-
- -
client.guardian.factors.pushNotification.updateFcmv1Provider(request) -> Map&lt;String, Object&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().pushNotification().updateFcmv1Provider( - UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**serverCredentials:** `Optional` - -
-
-
-
- - -
-
-
- -
client.guardian.factors.pushNotification.getSnsProvider() -> GetGuardianFactorsProviderSnsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve configuration details for an AWS SNS push notification provider that has been enabled for MFA. To learn more, review Configure Push Notifications for MFA. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().pushNotification().getSnsProvider(); -``` -
-
-
-
- - -
-
-
- -
client.guardian.factors.pushNotification.setSnsProvider(request) -> SetGuardianFactorsProviderPushNotificationSnsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Configure the AWS SNS push notification provider configuration (subscription required). -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().pushNotification().setSnsProvider( - SetGuardianFactorsProviderPushNotificationSnsRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**awsAccessKeyId:** `Optional` - -
-
- -
-
- -**awsSecretAccessKey:** `Optional` - -
-
- -
-
- -**awsRegion:** `Optional` - -
-
- -
-
- -**snsApnsPlatformApplicationArn:** `Optional` - -
-
- -
-
- -**snsGcmPlatformApplicationArn:** `Optional` - -
-
-
-
- - -
-
-
- -
client.guardian.factors.pushNotification.updateSnsProvider(request) -> UpdateGuardianFactorsProviderPushNotificationSnsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Configure the AWS SNS push notification provider configuration (subscription required). -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().pushNotification().updateSnsProvider( - UpdateGuardianFactorsProviderPushNotificationSnsRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**awsAccessKeyId:** `Optional` - -
-
- -
-
- -**awsSecretAccessKey:** `Optional` - -
-
- -
-
- -**awsRegion:** `Optional` - -
-
- -
-
- -**snsApnsPlatformApplicationArn:** `Optional` - -
-
- -
-
- -**snsGcmPlatformApplicationArn:** `Optional` - -
-
-
-
- - -
-
-
- -
client.guardian.factors.pushNotification.getSelectedProvider() -> GetGuardianFactorsProviderPushNotificationResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Modify the push notification provider configured for your tenant. For more information, review Configure Push Notifications for MFA. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().pushNotification().getSelectedProvider(); -``` -
-
-
-
- - -
-
-
- -
client.guardian.factors.pushNotification.setProvider(request) -> SetGuardianFactorsProviderPushNotificationResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Modify the push notification provider configured for your tenant. For more information, review Configure Push Notifications for MFA. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().pushNotification().setProvider( - SetGuardianFactorsProviderPushNotificationRequestContent - .builder() - .provider(GuardianFactorsProviderPushNotificationProviderDataEnum.GUARDIAN) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**provider:** `GuardianFactorsProviderPushNotificationProviderDataEnum` - -
-
-
-
- - -
-
-
- -## Guardian Factors Sms -
client.guardian.factors.sms.getTwilioProvider() -> GetGuardianFactorsProviderSmsTwilioResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve the Twilio SMS provider configuration (subscription required). - - A new endpoint is available to retrieve the Twilio configuration related to phone factors (phone Twilio configuration). It has the same payload as this one. Please use it instead. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().sms().getTwilioProvider(); -``` -
-
-
-
- - -
-
-
- -
client.guardian.factors.sms.setTwilioProvider(request) -> SetGuardianFactorsProviderSmsTwilioResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -This endpoint has been deprecated. To complete this action, use the Update Twilio phone configuration endpoint. - - Previous functionality: Update the Twilio SMS provider configuration. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().sms().setTwilioProvider( - SetGuardianFactorsProviderSmsTwilioRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**from:** `Optional` — From number - -
-
- -
-
- -**messagingServiceSid:** `Optional` — Copilot SID - -
-
- -
-
- -**authToken:** `Optional` — Twilio Authentication token - -
-
- -
-
- -**sid:** `Optional` — Twilio SID - -
-
-
-
- - -
-
-
- -
client.guardian.factors.sms.getSelectedProvider() -> GetGuardianFactorsProviderSmsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -This endpoint has been deprecated. To complete this action, use the Retrieve phone configuration endpoint instead. - - Previous functionality: Retrieve details for the multi-factor authentication SMS provider configured for your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().sms().getSelectedProvider(); -``` -
-
-
-
- - -
-
-
- -
client.guardian.factors.sms.setProvider(request) -> SetGuardianFactorsProviderSmsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -This endpoint has been deprecated. To complete this action, use the Update phone configuration endpoint instead. - - Previous functionality: Update the multi-factor authentication SMS provider configuration in your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().sms().setProvider( - SetGuardianFactorsProviderSmsRequestContent - .builder() - .provider(GuardianFactorsProviderSmsProviderEnum.AUTH0) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**provider:** `GuardianFactorsProviderSmsProviderEnum` - -
-
-
-
- - -
-
-
- -
client.guardian.factors.sms.getTemplates() -> GetGuardianFactorSmsTemplatesResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -This endpoint has been deprecated. To complete this action, use the Retrieve enrollment and verification phone templates endpoint instead. - - Previous function: Retrieve details of SMS enrollment and verification templates configured for your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().sms().getTemplates(); -``` -
-
-
-
- - -
-
-
- -
client.guardian.factors.sms.setTemplates(request) -> SetGuardianFactorSmsTemplatesResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -This endpoint has been deprecated. To complete this action, use the Update enrollment and verification phone templates endpoint instead. - - Previous functionality: Customize the messages sent to complete SMS enrollment and verification. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().sms().setTemplates( - SetGuardianFactorSmsTemplatesRequestContent - .builder() - .enrollmentMessage("enrollment_message") - .verificationMessage("verification_message") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**enrollmentMessage:** `String` — Message sent to the user when they are invited to enroll with a phone number. - -
-
- -
-
- -**verificationMessage:** `String` — Message sent to the user when they are prompted to verify their account. - -
-
-
-
- - -
-
-
- -## Guardian Factors Duo Settings -
client.guardian.factors.duo.settings.get() -> GetGuardianFactorDuoSettingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves the DUO account and factor configuration. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().duo().settings().get(); -``` -
-
-
-
- - -
-
-
- -
client.guardian.factors.duo.settings.set(request) -> SetGuardianFactorDuoSettingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Set the DUO account configuration and other properties specific to this factor. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().duo().settings().set( - SetGuardianFactorDuoSettingsRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**ikey:** `Optional` - -
-
- -
-
- -**skey:** `Optional` - -
-
- -
-
- -**host:** `Optional` - -
-
-
-
- - -
-
-
- -
client.guardian.factors.duo.settings.update(request) -> UpdateGuardianFactorDuoSettingsResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.guardian().factors().duo().settings().update( - UpdateGuardianFactorDuoSettingsRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**ikey:** `Optional` - -
-
- -
-
- -**skey:** `Optional` - -
-
- -
-
- -**host:** `Optional` - -
-
-
-
- - -
-
-
- -## Hooks Secrets -
client.hooks.secrets.get(id) -> Map&lt;String, String&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a hook's secrets by the ID of the hook. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.hooks().secrets().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the hook to retrieve secrets from. - -
-
-
-
- - -
-
-
- -
client.hooks.secrets.create(id, request) -
-
- -#### 📝 Description - -
-
- -
-
- -Add one or more secrets to an existing hook. Accepts an object of key-value pairs, where the key is the name of the secret. A hook can have a maximum of 20 secrets. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.hooks().secrets().create( - "id", - new HashMap() {{ - put("key", "value"); - }} -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the hook to retrieve - -
-
- -
-
- -**request:** `Map` - -
-
-
-
- - -
-
-
- -
client.hooks.secrets.delete(id, request) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete one or more existing secrets for a given hook. Accepts an array of secret names to delete. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.hooks().secrets().delete( - "id", - Arrays.asList("string") -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the hook whose secrets to delete. - -
-
- -
-
- -**request:** `List` - -
-
-
-
- - -
-
-
- -
client.hooks.secrets.update(id, request) -
-
- -#### 📝 Description - -
-
- -
-
- -Update one or more existing secrets for an existing hook. Accepts an object of key-value pairs, where the key is the name of the existing secret. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.hooks().secrets().update( - "id", - new HashMap() {{ - put("key", "value"); - }} -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the hook whose secrets to update. - -
-
- -
-
- -**request:** `Map` - -
-
-
-
- - -
-
-
- -## Jobs UsersExports -
client.jobs.usersExports.create(request) -> CreateExportUsersResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Export all users to a file via a long-running job. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.jobs().usersExports().create( - CreateExportUsersRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**connectionId:** `Optional` — connection_id of the connection from which users will be exported. - -
-
- -
-
- -**format:** `Optional` - -
-
- -
-
- -**limit:** `Optional` — Limit the number of records. - -
-
- -
-
- -**fields:** `Optional>` — List of fields to be included in the CSV. Defaults to a predefined set of fields. - -
-
-
-
- - -
-
-
- -## Jobs UsersImports -
client.jobs.usersImports.create(request) -> CreateImportUsersResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Import users from a formatted file into a connection via a long-running job. When importing users, with or without upsert, the `email_verified` is set to `false` when the email address is added or updated. Users must verify their email address. To avoid this behavior, set `email_verified` to `true` in the imported data. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.jobs().usersImports().create( - CreateImportUsersRequestContent - .builder() - .connectionId("connection_id") - .build() -); -``` -
-
-
-
- - -
-
-
- -## Jobs VerificationEmail -
client.jobs.verificationEmail.create(request) -> CreateVerificationEmailResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Send an email to the specified user that asks them to click a link to verify their email address. - -Note: You must have the `Status` toggle enabled for the verification email template for the email to be sent. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.jobs().verificationEmail().create( - CreateVerificationEmailRequestContent - .builder() - .userId("user_id") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**userId:** `String` — user_id of the user to send the verification email to. - -
-
- -
-
- -**clientId:** `Optional` — client_id of the client (application). If no value provided, the global Client ID will be used. - -
-
- -
-
- -**identity:** `Optional` - -
-
- -
-
- -**organizationId:** `Optional` — (Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters. - -
-
-
-
- - -
-
-
- -## Jobs Errors -
client.jobs.errors.get(id) -> ErrorsGetResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve error details of a failed job. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.jobs().errors().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the job. - -
-
-
-
- - -
-
-
- -## Keys CustomSigning -
client.keys.customSigning.get() -> GetCustomSigningKeysResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Get entire jwks representation of custom signing keys. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.keys().customSigning().get(); -``` -
-
-
-
- - -
-
-
- -
client.keys.customSigning.set(request) -> SetCustomSigningKeysResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create or replace entire jwks representation of custom signing keys. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.keys().customSigning().set( - SetCustomSigningKeysRequestContent - .builder() - .keys( - Arrays.asList( - CustomSigningKeyJwk - .builder() - .kty(CustomSigningKeyTypeEnum.EC) - .build() - ) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**keys:** `List` — An array of custom public signing keys. - -
-
-
-
- - -
-
-
- -
client.keys.customSigning.delete() -
-
- -#### 📝 Description - -
-
- -
-
- -Delete entire jwks representation of custom signing keys. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.keys().customSigning().delete(); -``` -
-
-
-
- - -
-
-
- -## Keys Encryption -
client.keys.encryption.list() -> SyncPagingIterable&lt;EncryptionKey&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details of all the encryption keys associated with your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.keys().encryption().list( - ListEncryptionKeysRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. Default value is 50, maximum value is 100. - -
-
- -
-
- -**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). - -
-
-
-
- - -
-
-
- -
client.keys.encryption.create(request) -> CreateEncryptionKeyResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create the new, pre-activated encryption key, without the key material. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.keys().encryption().create( - CreateEncryptionKeyRequestContent - .builder() - .type(CreateEncryptionKeyType.CUSTOMER_PROVIDED_ROOT_KEY) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**type:** `CreateEncryptionKeyType` - -
-
-
-
- - -
-
-
- -
client.keys.encryption.rekey() -
-
- -#### 📝 Description - -
-
- -
-
- -Perform rekeying operation on the key hierarchy. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.keys().encryption().rekey(); -``` -
-
-
-
- - -
-
-
- -
client.keys.encryption.get(kid) -> GetEncryptionKeyResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details of the encryption key with the given ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.keys().encryption().get("kid"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**kid:** `String` — Encryption key ID - -
-
-
-
- - -
-
-
- -
client.keys.encryption.import_(kid, request) -> ImportEncryptionKeyResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Import wrapped key material and activate encryption key. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.keys().encryption().import_( - "kid", - ImportEncryptionKeyRequestContent - .builder() - .wrappedKey("wrapped_key") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**kid:** `String` — Encryption key ID - -
-
- -
-
- -**wrappedKey:** `String` — Base64 encoded ciphertext of key material wrapped by public wrapping key. - -
-
-
-
- - -
-
-
- -
client.keys.encryption.delete(kid) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete the custom provided encryption key with the given ID and move back to using native encryption key. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.keys().encryption().delete("kid"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**kid:** `String` — Encryption key ID - -
-
-
-
- - -
-
-
- -
client.keys.encryption.createPublicWrappingKey(kid) -> CreateEncryptionKeyPublicWrappingResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create the public wrapping key to wrap your own encryption key material. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.keys().encryption().createPublicWrappingKey("kid"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**kid:** `String` — Encryption key ID - -
-
-
-
- - -
-
-
- -## Keys Signing -
client.keys.signing.list() -> List&lt;SigningKeys&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details of all the application signing keys associated with your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.keys().signing().list(); -``` -
-
-
-
- - -
-
-
- -
client.keys.signing.rotate() -> RotateSigningKeysResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Rotate the application signing key of your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.keys().signing().rotate(); -``` -
-
-
-
- - -
-
-
- -
client.keys.signing.get(kid) -> GetSigningKeysResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details of the application signing key with the given ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.keys().signing().get("kid"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**kid:** `String` — Key id of the key to retrieve - -
-
-
-
- - -
-
-
- -
client.keys.signing.revoke(kid) -> RevokedSigningKeysResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Revoke the application signing key with the given ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.keys().signing().revoke("kid"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**kid:** `String` — Key id of the key to revoke - -
-
-
-
- - -
-
-
- -## Organizations ClientGrants -
client.organizations.clientGrants.list(id) -> SyncPagingIterable&lt;OrganizationClientGrant&gt; -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -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) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Organization identifier. - -
-
- -
-
- -**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 DiscoveryDomains -
client.organizations.discoveryDomains.list(id) -> SyncPagingIterable&lt;OrganizationDiscoveryDomain&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve list of all organization discovery domains associated with the specified organization. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().discoveryDomains().list( - "id", - ListOrganizationDiscoveryDomainsRequestParameters - .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the organization. - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
-
-
- - -
-
-
- -
client.organizations.discoveryDomains.create(id, request) -> CreateOrganizationDiscoveryDomainResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a new discovery domain for an organization. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().discoveryDomains().create( - "id", - CreateOrganizationDiscoveryDomainRequestContent - .builder() - .domain("domain") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the organization. - -
-
- -
-
- -**domain:** `String` — The domain name to associate with the organization e.g. acme.com. - -
-
- -
-
- -**status:** `Optional` - -
-
- -
-
- -**useForOrganizationDiscovery:** `Optional` — Indicates whether this domain should be used for organization discovery. - -
-
-
-
- - -
-
-
- -
client.organizations.discoveryDomains.getByName(id, discoveryDomain) -> GetOrganizationDiscoveryDomainByNameResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details about a single organization discovery domain specified by domain name. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().discoveryDomains().getByName("id", "discovery_domain"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the organization. - -
-
- -
-
- -**discoveryDomain:** `String` — Domain name of the discovery domain. - -
-
-
-
- - -
-
-
- -
client.organizations.discoveryDomains.get(id, discoveryDomainId) -> GetOrganizationDiscoveryDomainResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details about a single organization discovery domain specified by ID. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().discoveryDomains().get("id", "discovery_domain_id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the organization. - -
-
- -
-
- -**discoveryDomainId:** `String` — ID of the discovery domain. - -
-
-
-
- - -
-
-
- -
client.organizations.discoveryDomains.delete(id, discoveryDomainId) -
-
- -#### 📝 Description - -
-
- -
-
- -Remove a discovery domain from an organization. This action cannot be undone. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().discoveryDomains().delete("id", "discovery_domain_id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the organization. - -
-
- -
-
- -**discoveryDomainId:** `String` — ID of the discovery domain. - -
-
-
-
- - -
-
-
- -
client.organizations.discoveryDomains.update(id, discoveryDomainId, request) -> UpdateOrganizationDiscoveryDomainResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The status field must be either pending or verified. The use_for_organization_discovery field can be true or false (default: true). -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().discoveryDomains().update( - "id", - "discovery_domain_id", - UpdateOrganizationDiscoveryDomainRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the organization. - -
-
- -
-
- -**discoveryDomainId:** `String` — ID of the discovery domain to update. - -
-
- -
-
- -**status:** `Optional` - -
-
- -
-
- -**useForOrganizationDiscovery:** `Optional` — Indicates whether this domain should be used for organization discovery. - -
-
-
-
- - -
-
-
- -## Organizations EnabledConnections -
client.organizations.enabledConnections.list(id) -> SyncPagingIterable&lt;OrganizationConnection&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().enabledConnections().list( - "id", - ListOrganizationConnectionsRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Organization identifier. - -
-
- -
-
- -**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.enabledConnections.add(id, request) -> AddOrganizationConnectionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Enable a specific connection for a given Organization. To enable a connection, it must already exist within your tenant; connections cannot be created through this action. - -Connections represent the relationship between Auth0 and a source of users. Available types of connections include database, enterprise, and social. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().enabledConnections().add( - "id", - AddOrganizationConnectionRequestContent - .builder() - .connectionId("connection_id") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Organization identifier. - -
-
- -
-
- -**connectionId:** `String` — Single connection ID to add to the organization. - -
-
- -
-
- -**assignMembershipOnLogin:** `Optional` — 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. - -
-
- -
-
- -**isSignupEnabled:** `Optional` — Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false. - -
-
- -
-
- -**showAsButton:** `Optional` — Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true. - -
-
-
-
- - -
-
-
- -
client.organizations.enabledConnections.get(id, connectionId) -> GetOrganizationConnectionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().enabledConnections().get("id", "connectionId"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Organization identifier. - -
-
- -
-
- -**connectionId:** `String` — Connection identifier. - -
-
-
-
- - -
-
-
- -
client.organizations.enabledConnections.delete(id, connectionId) -
-
- -#### 📝 Description - -
-
- -
-
- -Disable a specific connection for an Organization. Once disabled, Organization members can no longer use that connection to authenticate. - -Note: This action does not remove the connection from your tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().enabledConnections().delete("id", "connectionId"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Organization identifier. - -
-
- -
-
- -**connectionId:** `String` — Connection identifier. - -
-
-
-
- - -
-
-
- -
client.organizations.enabledConnections.update(id, connectionId, request) -> UpdateOrganizationConnectionResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Modify the details of a specific connection currently enabled for an Organization. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().enabledConnections().update( - "id", - "connectionId", - UpdateOrganizationConnectionRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Organization identifier. - -
-
- -
-
- -**connectionId:** `String` — Connection identifier. - -
-
- -
-
- -**assignMembershipOnLogin:** `Optional` — 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. - -
-
- -
-
- -**isSignupEnabled:** `Optional` — Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false. - -
-
- -
-
- -**showAsButton:** `Optional` — Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true. - -
-
-
-
- - -
-
-
- -## Organizations Invitations -
client.organizations.invitations.list(id) -> SyncPagingIterable&lt;OrganizationInvitation&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review Invite Organization Members. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -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") - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Organization identifier. - -
-
- -
-
- -**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` — 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. - -
-
- -
-
- -**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. - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). Defaults to true. - -
-
- -
-
- -**sort:** `Optional` — Field to sort by. Use field:order where order is 1 for ascending and -1 for descending Defaults to created_at:-1. - -
-
-
-
- - -
-
-
- -
client.organizations.invitations.create(id, request) -> CreateOrganizationInvitationResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a user invitation for a specific Organization. Upon creation, the listed user receives an email inviting them to join the Organization. To learn more about Organization invitations, review Invite Organization Members. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().invitations().create( - "id", - CreateOrganizationInvitationRequestContent - .builder() - .inviter( - OrganizationInvitationInviter - .builder() - .name("name") - .build() - ) - .invitee( - OrganizationInvitationInvitee - .builder() - .email("email") - .build() - ) - .clientId("client_id") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Organization identifier. - -
-
- -
-
- -**inviter:** `OrganizationInvitationInviter` - -
-
- -
-
- -**invitee:** `OrganizationInvitationInvitee` - -
-
- -
-
- -**clientId:** `String` — Auth0 client ID. Used to resolve the application's login initiation endpoint. - -
-
- -
-
- -**connectionId:** `Optional` — The id of the connection to force invitee to authenticate with. - -
-
- -
-
- -**appMetadata:** `Optional>` - -
-
- -
-
- -**userMetadata:** `Optional>` - -
-
- -
-
- -**ttlSec:** `Optional` — Number of seconds for which the invitation is valid before expiration. If unspecified or set to 0, this value defaults to 604800 seconds (7 days). Max value: 2592000 seconds (30 days). - -
-
- -
-
- -**roles:** `Optional>` — List of roles IDs to associated with the user. - -
-
- -
-
- -**sendInvitationEmail:** `Optional` — Whether the user will receive an invitation email (true) or no email (false), true by default - -
-
-
-
- - -
-
-
- -
client.organizations.invitations.get(id, invitationId) -> GetOrganizationInvitationResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().invitations().get( - "id", - "invitation_id", - GetOrganizationInvitationRequestParameters - .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Organization identifier. - -
-
- -
-
- -**invitationId:** `String` — The id of the user invitation. - -
-
- -
-
- -**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. - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). Defaults to true. - -
-
-
-
- - -
-
-
- -
client.organizations.invitations.delete(id, invitationId) -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().invitations().delete("id", "invitation_id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Organization identifier. - -
-
- -
-
- -**invitationId:** `String` — The id of the user invitation. - -
-
-
-
- - -
-
-
- -## Organizations Members -
client.organizations.members.list(id) -> SyncPagingIterable&lt;OrganizationMember&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -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. -
  • -
- -This endpoint supports two types of pagination: - -- Offset pagination -- Checkpoint pagination - -Checkpoint pagination must be used if you need to retrieve more than 1000 organization members. - -

Checkpoint Pagination

- -To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the from parameter. If there are more results, a next value will be included in the response. You can use this for subsequent API calls. When next is no longer included in the response, this indicates there are no more pages remaining. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().members().list( - "id", - ListOrganizationMembersRequestParameters - .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Organization identifier. - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
- -
-
- -**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. - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). - -
-
-
-
- - -
-
-
- -
client.organizations.members.create(id, request) -
-
- -#### 📝 Description - -
-
- -
-
- -Set one or more existing users as members of a specific Organization. - -To add a user to an Organization through this action, the user must already exist in your tenant. If a user does not yet exist, you can invite them to create an account, manually create them through the Auth0 Dashboard, or use the Management API. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().members().create( - "id", - CreateOrganizationMemberRequestContent - .builder() - .members( - Arrays.asList("members") - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Organization identifier. - -
-
- -
-
- -**members:** `List` — List of user IDs to add to the organization as members. - -
-
-
-
- - -
-
-
- -
client.organizations.members.delete(id, request) -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().members().delete( - "id", - DeleteOrganizationMembersRequestContent - .builder() - .members( - Arrays.asList("members") - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Organization identifier. - -
-
- -
-
- -**members:** `List` — List of user IDs to remove from the organization. - -
-
-
-
- - -
-
-
- -## Organizations Members Roles -
client.organizations.members.roles.list(id, userId) -> SyncPagingIterable&lt;Role&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -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. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.organizations().members().roles().list( - "id", - "user_id", - ListOrganizationMemberRolesRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(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 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") - ) - .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 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. - -
-
- -
-
- -**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. - -
-
-
-
- - -
-
-
- -## Prompts Rendering -
client.prompts.rendering.list() -> SyncPagingIterable&lt;ListAculsResponseContentItem&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Get render setting configurations for all screens. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -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) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**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. - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (default: true) or excluded (false). - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. Maximum value is 100, default value is 50. - -
-
- -
-
- -**includeTotals:** `Optional` — Return results inside an object that contains the total configuration count (true) or as a direct array of results (false, default). - -
-
- -
-
- -**prompt:** `Optional` — Name of the prompt to filter by - -
-
- -
-
- -**screen:** `Optional` — Name of the screen to filter by - -
-
- -
-
- -**renderingMode:** `Optional` — Rendering mode to filter by - -
-
-
-
- - -
-
-
- -
client.prompts.rendering.bulkUpdate(request) -> BulkUpdateAculResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Learn more about configuring render settings for advanced customization. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.prompts().rendering().bulkUpdate( - BulkUpdateAculRequestContent - .builder() - .configs( - Arrays.asList( - AculConfigsItem - .builder() - .prompt(PromptGroupNameEnum.LOGIN) - .screen(ScreenGroupNameEnum.LOGIN) - .build() - ) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**configs:** `List` - -
-
-
-
- - -
-
-
- -
client.prompts.rendering.get(prompt, screen) -> GetAculResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Get render settings for a screen. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.prompts().rendering().get(PromptGroupNameEnum.LOGIN, ScreenGroupNameEnum.LOGIN); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**prompt:** `PromptGroupNameEnum` — Name of the prompt - -
-
- -
-
- -**screen:** `ScreenGroupNameEnum` — Name of the screen - -
-
-
-
- - -
-
-
- -
client.prompts.rendering.update(prompt, screen, request) -> UpdateAculResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Learn more about configuring render settings for advanced customization. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.prompts().rendering().update( - PromptGroupNameEnum.LOGIN, - ScreenGroupNameEnum.LOGIN, - UpdateAculRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**prompt:** `PromptGroupNameEnum` — Name of the prompt - -
-
- -
-
- -**screen:** `ScreenGroupNameEnum` — Name of the screen - -
-
- -
-
- -**renderingMode:** `Optional` - -
-
- -
-
- -**contextConfiguration:** `Optional>` - -
-
- -
-
- -**defaultHeadTagsDisabled:** `Optional` — Override Universal Login default head tags - -
-
- -
-
- -**usePageTemplate:** `Optional` — Use page template with ACUL - -
-
- -
-
- -**headTags:** `Optional>` — An array of head tags - -
-
- -
-
- -**filters:** `Optional` - -
-
-
-
- - -
-
-
- -## Prompts CustomText -
client.prompts.customText.get(prompt, language) -> Map&lt;String, Object&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve custom text for a specific prompt and language. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.prompts().customText().get(PromptGroupNameEnum.LOGIN, PromptLanguageEnum.AM); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**prompt:** `PromptGroupNameEnum` — Name of the prompt. - -
-
- -
-
- -**language:** `PromptLanguageEnum` — Language to update. - -
-
-
-
- - -
-
-
- -
client.prompts.customText.set(prompt, language, request) -
-
- -#### 📝 Description - -
-
- -
-
- -Set custom text for a specific prompt. Existing texts will be overwritten. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.prompts().customText().set( - PromptGroupNameEnum.LOGIN, - PromptLanguageEnum.AM, - new HashMap() {{ - put("key", "value"); - }} -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**prompt:** `PromptGroupNameEnum` — Name of the prompt. - -
-
- -
-
- -**language:** `PromptLanguageEnum` — Language to update. - -
-
- -
-
- -**request:** `Map` - -
-
-
-
- - -
-
-
- -## Prompts Partials -
client.prompts.partials.get(prompt) -> Map&lt;String, Object&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Get template partials for a prompt -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.prompts().partials().get(PartialGroupsEnum.LOGIN); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**prompt:** `PartialGroupsEnum` — Name of the prompt. - -
-
-
-
- - -
-
-
- -
client.prompts.partials.set(prompt, request) -
-
- -#### 📝 Description - -
-
- -
-
- -Set template partials for a prompt -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.prompts().partials().set( - PartialGroupsEnum.LOGIN, - new HashMap() {{ - put("key", "value"); - }} -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**prompt:** `PartialGroupsEnum` — Name of the prompt. - -
-
- -
-
- -**request:** `Map` - -
-
-
-
- - -
-
-
- -## RiskAssessments Settings -
client.riskAssessments.settings.get() -> GetRiskAssessmentsSettingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Gets the tenant settings for risk assessments -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.riskAssessments().settings().get(); -``` -
-
-
-
- - -
-
-
- -
client.riskAssessments.settings.update(request) -> UpdateRiskAssessmentsSettingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Updates the tenant settings for risk assessments -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.riskAssessments().settings().update( - UpdateRiskAssessmentsSettingsRequestContent - .builder() - .enabled(true) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**enabled:** `Boolean` — Whether or not risk assessment is enabled. - -
-
-
-
- - -
-
-
- -## RiskAssessments Settings NewDevice -
client.riskAssessments.settings.newDevice.get() -> GetRiskAssessmentsSettingsNewDeviceResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Gets the risk assessment settings for the new device assessor -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.riskAssessments().settings().newDevice().get(); -``` -
-
-
-
- - -
-
-
- -
client.riskAssessments.settings.newDevice.update(request) -> UpdateRiskAssessmentsSettingsNewDeviceResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Updates the risk assessment settings for the new device assessor -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.riskAssessments().settings().newDevice().update( - UpdateRiskAssessmentsSettingsNewDeviceRequestContent - .builder() - .rememberFor(1) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**rememberFor:** `Integer` — Length of time to remember devices for, in days. - -
-
-
-
- - -
-
-
- -## Roles Permissions -
client.roles.permissions.list(id) -> SyncPagingIterable&lt;PermissionsResponsePayload&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve detailed list (name, description, resource server) of permissions granted by a specified user role. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.roles().permissions().list( - "id", - ListRolePermissionsRequestParameters - .builder() - .perPage( - OptionalNullable.of(1) - ) - .page( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the role to list granted permissions. - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. Defaults to 50. - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). - -
-
-
-
- - -
-
-
- -
client.roles.permissions.add(id, request) -
-
- -#### 📝 Description - -
-
- -
-
- -Add one or more permissions to a specified user role. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.roles().permissions().add( - "id", - AddRolePermissionsRequestContent - .builder() - .permissions( - Arrays.asList( - PermissionRequestPayload - .builder() - .resourceServerIdentifier("resource_server_identifier") - .permissionName("permission_name") - .build() - ) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the role to add permissions to. - -
-
- -
-
- -**permissions:** `List` — array of resource_server_identifier, permission_name pairs. - -
-
-
-
- - -
-
-
- -
client.roles.permissions.delete(id, request) -
-
- -#### 📝 Description - -
-
- -
-
- -Remove one or more permissions from a specified user role. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.roles().permissions().delete( - "id", - DeleteRolePermissionsRequestContent - .builder() - .permissions( - Arrays.asList( - PermissionRequestPayload - .builder() - .resourceServerIdentifier("resource_server_identifier") - .permissionName("permission_name") - .build() - ) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the role to remove permissions from. - -
-
- -
-
- -**permissions:** `List` — array of resource_server_identifier, permission_name pairs. - -
-
-
-
- - -
-
-
- -## Roles Users -
client.roles.users.list(id) -> SyncPagingIterable&lt;RoleUser&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve list of users associated with a specific role. For Dashboard instructions, review View Users Assigned to Roles. - -This endpoint supports two types of pagination: -
    -
  • Offset pagination
  • -
  • Checkpoint pagination
  • -
- -Checkpoint pagination must be used if you need to retrieve more than 1000 organization members. - -

Checkpoint Pagination

- -To search by checkpoint, use the following parameters: -
    -
  • from: Optional id from which to start selection.
  • -
  • take: The total amount 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. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.roles().users().list( - "id", - ListRoleUsersRequestParameters - .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the role to retrieve a list of users associated with. - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
-
-
- - -
-
-
- -
client.roles.users.assign(id, request) -
-
- -#### 📝 Description - -
-
- -
-
- -Assign one or more users to an existing user role. To learn more, review Role-Based Access Control. - -Note: New roles cannot be created through this action. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.roles().users().assign( - "id", - AssignRoleUsersRequestContent - .builder() - .users( - Arrays.asList("users") - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the role to assign users to. - -
-
- -
-
- -**users:** `List` — user_id's of the users to assign the role to. - -
-
-
-
- - -
-
-
- -## SelfServiceProfiles CustomText -
client.selfServiceProfiles.customText.list(id, language, page) -> Map&lt;String, String&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.selfServiceProfiles().customText().list("id", SelfServiceProfileCustomTextLanguageEnum.EN, SelfServiceProfileCustomTextPageEnum.GET_STARTED); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the self-service profile. - -
-
- -
-
- -**language:** `SelfServiceProfileCustomTextLanguageEnum` — The language of the custom text. - -
-
- -
-
- -**page:** `SelfServiceProfileCustomTextPageEnum` — The page where the custom text is shown. - -
-
-
-
- - -
-
-
- -
client.selfServiceProfiles.customText.set(id, language, page, request) -> Map&lt;String, String&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.selfServiceProfiles().customText().set( - "id", - SelfServiceProfileCustomTextLanguageEnum.EN, - SelfServiceProfileCustomTextPageEnum.GET_STARTED, - new HashMap() {{ - put("key", "value"); - }} -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the self-service profile. - -
-
- -
-
- -**language:** `SelfServiceProfileCustomTextLanguageEnum` — The language of the custom text. - -
-
- -
-
- -**page:** `SelfServiceProfileCustomTextPageEnum` — The page where the custom text is shown. - -
-
- -
-
- -**request:** `Map` - -
-
-
-
- - -
-
-
- -## SelfServiceProfiles SsoTicket -
client.selfServiceProfiles.ssoTicket.create(id, request) -> CreateSelfServiceProfileSsoTicketResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.selfServiceProfiles().ssoTicket().create( - "id", - CreateSelfServiceProfileSsoTicketRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The id of the self-service profile to retrieve - -
-
- -
-
- -**connectionId:** `Optional` — If provided, this will allow editing of the provided connection during the SSO Flow - -
-
- -
-
- -**connectionConfig:** `Optional` - -
-
- -
-
- -**enabledClients:** `Optional>` — List of client_ids that the connection will be enabled for. - -
-
- -
-
- -**enabledOrganizations:** `Optional>` — List of organizations that the connection will be enabled for. - -
-
- -
-
- -**ttlSec:** `Optional` — Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days). - -
-
- -
-
- -**domainAliasesConfig:** `Optional` - -
-
- -
-
- -**provisioningConfig:** `Optional` - -
-
- -
-
- -**useForOrganizationDiscovery:** `Optional` — Indicates whether a verified domain should be used for organization discovery during authentication. - -
-
-
-
- - -
-
-
- -
client.selfServiceProfiles.ssoTicket.revoke(profileId, id) -
-
- -#### 📝 Description - -
-
- -
-
- -Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a `202 Accepted` response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a `202 Accepted` response is also returned, signaling that no further action is required. -Clients should treat these `202` responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.selfServiceProfiles().ssoTicket().revoke("profileId", "id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**profileId:** `String` — The id of the self-service profile - -
-
- -
-
- -**id:** `String` — The id of the ticket to revoke - -
-
-
-
- - -
-
-
- -## Tenants Settings -
client.tenants.settings.get() -> GetTenantSettingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve tenant settings. A list of fields to include or exclude may also be specified. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.tenants().settings().get( - GetTenantSettingsRequestParameters - .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**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. - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). - -
-
-
-
- - -
-
-
- -
client.tenants.settings.update(request) -> UpdateTenantSettingsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update settings for a tenant. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.tenants().settings().update( - UpdateTenantSettingsRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**changePassword:** `Optional` - -
-
- -
-
- -**deviceFlow:** `Optional` - -
-
- -
-
- -**guardianMfaPage:** `Optional` - -
-
- -
-
- -**defaultAudience:** `Optional` — Default audience for API Authorization. - -
-
- -
-
- -**defaultDirectory:** `Optional` — Name of connection used for password grants at the `/token` endpoint. The following connection types are supported: LDAP, AD, Database Connections, Passwordless, Windows Azure Active Directory, ADFS. - -
-
- -
-
- -**errorPage:** `Optional` - -
-
- -
-
- -**defaultTokenQuota:** `Optional` - -
-
- -
-
- -**flags:** `Optional` - -
-
- -
-
- -**friendlyName:** `Optional` — Friendly name for this tenant. - -
-
- -
-
- -**pictureUrl:** `Optional` — URL of logo to be shown for this tenant (recommended size: 150x150) - -
-
- -
-
- -**supportEmail:** `Optional` — End-user support email. - -
-
- -
-
- -**supportUrl:** `Optional` — End-user support url. - -
-
- -
-
- -**allowedLogoutUrls:** `Optional>` — URLs that are valid to redirect to after logout from Auth0. - -
-
- -
-
- -**sessionLifetime:** `Optional` — Number of hours a session will stay valid. - -
-
- -
-
- -**idleSessionLifetime:** `Optional` — Number of hours for which a session can be inactive before the user must log in again. - -
-
- -
-
- -**ephemeralSessionLifetime:** `Optional` — Number of hours an ephemeral (non-persistent) session will stay valid. - -
-
- -
-
- -**idleEphemeralSessionLifetime:** `Optional` — Number of hours for which an ephemeral (non-persistent) session can be inactive before the user must log in again. - -
-
- -
-
- -**sandboxVersion:** `Optional` — Selected sandbox version for the extensibility environment - -
-
- -
-
- -**legacySandboxVersion:** `Optional` — Selected legacy sandbox version for the extensibility environment - -
-
- -
-
- -**defaultRedirectionUri:** `Optional` — The default absolute redirection uri, must be https - -
-
- -
-
- -**enabledLocales:** `Optional>` — Supported locales for the user interface - -
-
- -
-
- -**sessionCookie:** `Optional` - -
-
- -
-
- -**sessions:** `Optional` - -
-
- -
-
- -**oidcLogout:** `Optional` - -
-
- -
-
- -**customizeMfaInPostloginAction:** `Optional` — Whether to enable flexible factors for MFA in the PostLogin action - -
-
- -
-
- -**allowOrganizationNameInAuthenticationApi:** `Optional` — Whether to accept an organization name instead of an ID on auth endpoints - -
-
- -
-
- -**acrValuesSupported:** `Optional>` — Supported ACR values - -
-
- -
-
- -**mtls:** `Optional` - -
-
- -
-
- -**pushedAuthorizationRequestsSupported:** `Optional` — Enables the use of Pushed Authorization Requests - -
-
- -
-
- -**authorizationResponseIssParameterSupported:** `Optional` — Supports iss parameter in authorization responses - -
-
- -
-
- -**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`). -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. - -
-
- -
-
- -**resourceParameterProfile:** `Optional` - -
-
- -
-
- -**enableAiGuide:** `Optional` — Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant. - -
-
- -
-
- -**phoneConsolidatedExperience:** `Optional` — Whether Phone Consolidated Experience is enabled for this tenant. - -
-
-
-
- - -
-
-
- -## Users AuthenticationMethods -
client.users.authenticationMethods.list(id) -> SyncPagingIterable&lt;UserAuthenticationMethod&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve detailed list of authentication methods associated with a specified user. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().authenticationMethods().list( - "id", - ListUserAuthenticationMethodsRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the user in question. - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. Default is 0. - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. Default is 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.users.authenticationMethods.create(id, request) -> CreateUserAuthenticationMethodResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create an authentication method. Authentication methods created via this endpoint will be auto confirmed and should already have verification completed. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().authenticationMethods().create( - "id", - CreateUserAuthenticationMethodRequestContent - .builder() - .type(CreatedUserAuthenticationMethodTypeEnum.PHONE) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the user to whom the new authentication method will be assigned. - -
-
- -
-
- -**type:** `CreatedUserAuthenticationMethodTypeEnum` - -
-
- -
-
- -**name:** `Optional` — A human-readable label to identify the authentication method. - -
-
- -
-
- -**totpSecret:** `Optional` — Base32 encoded secret for TOTP generation. - -
-
- -
-
- -**phoneNumber:** `Optional` — Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice. - -
-
- -
-
- -**email:** `Optional` — Applies to email authentication methods only. The email address used to send verification messages. - -
-
- -
-
- -**preferredAuthenticationMethod:** `Optional` - -
-
- -
-
- -**keyId:** `Optional` — Applies to webauthn authentication methods only. The id of the credential. - -
-
- -
-
- -**publicKey:** `Optional` — Applies to webauthn authentication methods only. The public key, which is encoded as base64. - -
-
- -
-
- -**relyingPartyIdentifier:** `Optional` — Applies to webauthn authentication methods only. The relying party identifier. - -
-
-
-
- - -
-
-
- -
client.users.authenticationMethods.set(id, request) -> List&lt;SetUserAuthenticationMethodResponseContent&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Replace the specified user authentication methods with supplied values. - - Note: Authentication methods supplied through this action do not iterate on existing methods. Instead, any methods passed will overwrite the user’s existing settings. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().authenticationMethods().set( - "id", - Arrays.asList( - SetUserAuthenticationMethods - .builder() - .type(AuthenticationTypeEnum.PHONE) - .build() - ) -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the user in question. - -
-
- -
-
- -**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. - -
-
-
-
- - -
-
-
- -
client.users.authenticationMethods.update(id, authenticationMethodId, request) -> UpdateUserAuthenticationMethodResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Modify 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().update( - "id", - "authentication_method_id", - UpdateUserAuthenticationMethodRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — The ID of the user in question. - -
-
- -
-
- -**authenticationMethodId:** `String` — The ID of the authentication method to update. - -
-
- -
-
- -**name:** `Optional` — A human-readable label to identify the authentication method. - -
-
- -
-
- -**preferredAuthenticationMethod:** `Optional` - -
-
-
-
- - -
-
-
- -## Users Authenticators -
client.users.authenticators.deleteAll(id) -
-
- -#### 📝 Description - -
-
- -
-
- -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. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().authenticators().deleteAll("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to delete. - -
-
-
-
- - -
-
-
- -## Users ConnectedAccounts -
client.users.connectedAccounts.list(id) -> SyncPagingIterable&lt;ConnectedAccount&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve all connected accounts associated with the user. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().connectedAccounts().list( - "id", - GetUserConnectedAccountsRequestParameters - .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to list connected accounts for. - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results to return. Defaults to 10 with a maximum of 20 - -
-
-
-
- - -
-
-
- -## Users Enrollments -
client.users.enrollments.get(id) -> List&lt;UsersEnrollment&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve the first multi-factor authentication enrollment that a specific user has confirmed. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().enrollments().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to list enrollments for. - -
-
-
-
- - -
-
-
- -## Users FederatedConnectionsTokensets -
client.users.federatedConnectionsTokensets.list(id) -> List&lt;FederatedConnectionTokenSet&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -List active federated connections tokensets for a provided user -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().federatedConnectionsTokensets().list("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — User identifier - -
-
-
-
- - -
-
-
- -
client.users.federatedConnectionsTokensets.delete(id, tokensetId) -
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().federatedConnectionsTokensets().delete("id", "tokenset_id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — Id of the user that owns the tokenset - -
-
- -
-
- -**tokensetId:** `String` — The tokenset id - -
-
-
-
- - -
-
-
- -## Users Groups -
client.users.groups.get(id) -> SyncPagingIterable&lt;UserGroupsResponseSchema&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -List all groups to which this user belongs. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().groups().get( - "id", - GetUserGroupsRequestParameters - .builder() - .fields( - OptionalNullable.of("fields") - ) - .includeFields( - OptionalNullable.of(true) - ) - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to list groups for. - -
-
- -
-
- -**fields:** `Optional` — A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields - -
-
- -
-
- -**includeFields:** `Optional` — Whether specified fields are to be included (true) or excluded (false). - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
-
-
- - -
-
-
- -## Users Identities -
client.users.identities.link(id, request) -> List&lt;UserIdentity&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Link two user accounts together forming a primary and secondary relationship. On successful linking, the endpoint returns the new array of the primary account identities. - -Note: There are two ways of invoking the endpoint: - -
    -
  • With the authenticated primary account's JWT in the Authorization header, which has the update:current_user_identities scope: -
    -      POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities
    -      Authorization: "Bearer PRIMARY_ACCOUNT_JWT"
    -      {
    -        "link_with": "SECONDARY_ACCOUNT_JWT"
    -      }
    -    
    - In this case, only the link_with param is required in the body, which also contains the JWT obtained upon the secondary account's authentication. -
  • -
  • With a token generated by the API V2 containing the update:users scope: -
    -    POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities
    -    Authorization: "Bearer YOUR_API_V2_TOKEN"
    -    {
    -      "provider": "SECONDARY_ACCOUNT_PROVIDER",
    -      "connection_id": "SECONDARY_ACCOUNT_CONNECTION_ID(OPTIONAL)",
    -      "user_id": "SECONDARY_ACCOUNT_USER_ID"
    -    }
    -    
    - In this case you need to send provider and user_id in the body. Optionally you can also send the connection_id param which is suitable for identifying a particular database connection for the 'auth0' provider. -
  • -
-
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().identities().link( - "id", - LinkUserIdentityRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the primary user account to link a second user account to. - -
-
- -
-
- -**provider:** `Optional` - -
-
- -
-
- -**connectionId:** `Optional` — connection_id of the secondary user account being linked when more than one `auth0` database provider exists. - -
-
- -
-
- -**userId:** `Optional` - -
-
- -
-
- -**linkWith:** `Optional` — JWT for the secondary account being linked. If sending this parameter, `provider`, `user_id`, and `connection_id` must not be sent. - -
-
-
-
- - -
-
-
- -
client.users.identities.delete(id, provider, userId) -> List&lt;DeleteUserIdentityResponseContentItem&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Unlink a specific secondary account from a target user. This action requires the ID of both the target user and the secondary account. - -Unlinking the secondary account removes it from the identities array of the target user and creates a new standalone profile for the secondary account. To learn more, review Unlink User Accounts. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().identities().delete("id", UserIdentityProviderEnum.AD, "user_id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the primary user account. - -
-
- -
-
- -**provider:** `UserIdentityProviderEnum` — Identity provider name of the secondary linked account (e.g. `google-oauth2`). - -
-
- -
-
- -**userId:** `String` — ID of the secondary linked account (e.g. `123456789081523216417` part after the `|` in `google-oauth2|123456789081523216417`). - -
-
-
-
- - -
-
-
- -## Users Logs -
client.users.logs.list(id) -> SyncPagingIterable&lt;Log&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve log events for a specific user. - -Note: For more information on all possible event types, their respective acronyms and descriptions, see Log Event Type Codes. - -For more information on the list of fields that can be used in `sort`, see Searchable Fields. - -Auth0 limits the number of logs you can return by search criteria to 100 logs per request. Furthermore, you may only paginate through up to 1,000 search results. If you exceed this threshold, please redefine your search. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().logs().list( - "id", - ListUserLogsRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .sort( - OptionalNullable.of("sort") - ) - .includeTotals( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user of the logs to retrieve - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. Paging is disabled if parameter not sent. - -
-
- -
-
- -**sort:** `Optional` — Field to sort by. Use `fieldname:1` for ascending order and `fieldname:-1` for descending. - -
-
- -
-
- -**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). - -
-
-
-
- - -
-
-
- -## Users Multifactor -
client.users.multifactor.invalidateRememberBrowser(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Invalidate all remembered browsers across all authentication factors for a user. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().multifactor().invalidateRememberBrowser("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to invalidate all remembered browsers and authentication factors for. - -
-
-
-
- - -
-
-
- -
client.users.multifactor.deleteProvider(id, provider) -
-
- -#### 📝 Description - -
-
- -
-
- -Remove a multifactor authentication configuration from a user's account. This forces the user to manually reconfigure the multi-factor provider. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().multifactor().deleteProvider("id", UserMultifactorProviderEnum.DUO); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to remove a multifactor configuration from. - -
-
- -
-
- -**provider:** `UserMultifactorProviderEnum` — The multi-factor provider. Supported values 'duo' or 'google-authenticator' - -
-
-
-
- - -
-
-
- -## Users Organizations -
client.users.organizations.list(id) -> SyncPagingIterable&lt;Organization&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review Auth0 Organizations. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().organizations().list( - "id", - ListUserOrganizationsRequestParameters - .builder() - .page( - OptionalNullable.of(1) - ) - .perPage( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to retrieve the organizations for. - -
-
- -
-
- -**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). - -
-
-
-
- - -
-
-
- -## Users Permissions -
client.users.permissions.list(id) -> SyncPagingIterable&lt;UserPermissionSchema&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve all permissions associated with the user. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().permissions().list( - "id", - ListUserPermissionsRequestParameters - .builder() - .perPage( - OptionalNullable.of(1) - ) - .page( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to retrieve the permissions for. - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). - -
-
-
-
- - -
-
-
- -
client.users.permissions.create(id, request) -
-
- -#### 📝 Description - -
-
- -
-
- -Assign permissions to a user. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().permissions().create( - "id", - CreateUserPermissionsRequestContent - .builder() - .permissions( - Arrays.asList( - PermissionRequestPayload - .builder() - .resourceServerIdentifier("resource_server_identifier") - .permissionName("permission_name") - .build() - ) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to assign permissions to. - -
-
- -
-
- -**permissions:** `List` — List of permissions to add to this user. - -
-
-
-
- - -
-
-
- -
client.users.permissions.delete(id, request) -
-
- -#### 📝 Description - -
-
- -
-
- -Remove permissions from a user. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().permissions().delete( - "id", - DeleteUserPermissionsRequestContent - .builder() - .permissions( - Arrays.asList( - PermissionRequestPayload - .builder() - .resourceServerIdentifier("resource_server_identifier") - .permissionName("permission_name") - .build() - ) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to remove permissions from. - -
-
- -
-
- -**permissions:** `List` — List of permissions to remove from this user. - -
-
-
-
- - -
-
-
- -## Users RiskAssessments -
client.users.riskAssessments.clear(id, request) -
-
- -#### 📝 Description - -
-
- -
-
- -Clear risk assessment assessors for a specific user -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().riskAssessments().clear( - "id", - ClearAssessorsRequestContent - .builder() - .connection("connection") - .assessors( - Arrays.asList(AssessorsTypeEnum.NEW_DEVICE) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to clear assessors for. - -
-
- -
-
- -**connection:** `String` — The name of the connection containing the user whose assessors should be cleared. - -
-
- -
-
- -**assessors:** `List` — List of assessors to clear. - -
-
-
-
- - -
-
-
- -## Users Roles -
client.users.roles.list(id) -> SyncPagingIterable&lt;Role&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -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. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().roles().list( - "id", - ListUserRolesRequestParameters - .builder() - .perPage( - OptionalNullable.of(1) - ) - .page( - OptionalNullable.of(1) - ) - .includeTotals( - OptionalNullable.of(true) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to list roles for. - -
-
- -
-
- -**perPage:** `Optional` — Number of results per page. - -
-
- -
-
- -**page:** `Optional` — Page index of the results to return. First page is 0. - -
-
- -
-
- -**includeTotals:** `Optional` — Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). - -
-
-
-
- - -
-
-
- -
client.users.roles.assign(id, request) -
-
- -#### 📝 Description - -
-
- -
-
- -Assign one or more existing user roles to a user. For more information, review Role-Based Access Control. - -Note: New roles cannot be created through this action. Additionally, this action is used to assign roles to a user in the context of your whole tenant. To assign roles in the context of a specific Organization, use the following endpoint: Assign user roles to an Organization member. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().roles().assign( - "id", - AssignUserRolesRequestContent - .builder() - .roles( - Arrays.asList("roles") - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to associate roles with. - -
-
- -
-
- -**roles:** `List` — List of roles IDs to associated with the user. - -
-
-
-
- - -
-
-
- -
client.users.roles.delete(id, request) -
-
- -#### 📝 Description - -
-
- -
-
- -Remove one or more specified user roles assigned to a user. - -Note: This action removes a role from a user in the context of your whole tenant. If you want to unassign a role from a user in the context of a specific Organization, use the following endpoint: Delete user roles from an Organization member. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().roles().delete( - "id", - DeleteUserRolesRequestContent - .builder() - .roles( - Arrays.asList("roles") - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the user to remove roles from. - -
-
- -
-
- -**roles:** `List` — List of roles IDs to remove from the user. - -
-
-
-
- - -
-
-
- -## Users RefreshToken -
client.users.refreshToken.list(userId) -> SyncPagingIterable&lt;RefreshTokenResponseContent&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details for a user's refresh tokens. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().refreshToken().list( - "user_id", - ListRefreshTokensRequestParameters - .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**userId:** `String` — ID of the user to get refresh tokens for - -
-
- -
-
- -**from:** `Optional` — An optional cursor from which to start the selection (exclusive). - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
-
-
- - -
-
-
- -
client.users.refreshToken.delete(userId) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete all refresh tokens for a user. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().refreshToken().delete("user_id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**userId:** `String` — ID of the user to get remove refresh tokens for - -
-
-
-
- - -
-
-
- -## Users Sessions -
client.users.sessions.list(userId) -> SyncPagingIterable&lt;SessionResponseContent&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details for a user's sessions. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().sessions().list( - "user_id", - ListUserSessionsRequestParameters - .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**userId:** `String` — ID of the user to get sessions for - -
-
- -
-
- -**from:** `Optional` — An optional cursor from which to start the selection (exclusive). - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
-
-
- - -
-
-
- -
client.users.sessions.delete(userId) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete all sessions for a user. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.users().sessions().delete("user_id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**userId:** `String` — ID of the user to get sessions for - -
-
-
-
- - -
-
-
- -## VerifiableCredentials Verification Templates -
client.verifiableCredentials.verification.templates.list() -> SyncPagingIterable&lt;VerifiableCredentialTemplateResponse&gt; -
-
- -#### 📝 Description - -
-
- -
-
- -List a verifiable credential templates. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.verifiableCredentials().verification().templates().list( - ListVerifiableCredentialTemplatesRequestParameters - .builder() - .from( - OptionalNullable.of("from") - ) - .take( - OptionalNullable.of(1) - ) - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**from:** `Optional` — Optional Id from which to start selection. - -
-
- -
-
- -**take:** `Optional` — Number of results per page. Defaults to 50. - -
-
-
-
- - -
-
-
- -
client.verifiableCredentials.verification.templates.create(request) -> CreateVerifiableCredentialTemplateResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a verifiable credential template. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.verifiableCredentials().verification().templates().create( - CreateVerifiableCredentialTemplateRequestContent - .builder() - .name("name") - .type("type") - .dialect("dialect") - .presentation( - MdlPresentationRequest - .builder() - .orgIso1801351MDl( - MdlPresentationRequestProperties - .builder() - .orgIso1801351( - MdlPresentationProperties - .builder() - .build() - ) - .build() - ) - .build() - ) - .wellKnownTrustedIssuers("well_known_trusted_issuers") - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**name:** `String` - -
-
- -
-
- -**type:** `String` - -
-
- -
-
- -**dialect:** `String` - -
-
- -
-
- -**presentation:** `MdlPresentationRequest` - -
-
- -
-
- -**customCertificateAuthority:** `Optional` - -
-
- -
-
- -**wellKnownTrustedIssuers:** `String` - -
-
-
-
- - -
-
-
- -
client.verifiableCredentials.verification.templates.get(id) -> GetVerifiableCredentialTemplateResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Get a verifiable credential template. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.verifiableCredentials().verification().templates().get("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the template to retrieve. - -
-
-
-
- - -
-
-
- -
client.verifiableCredentials.verification.templates.delete(id) -
-
- -#### 📝 Description - -
-
- -
-
- -Delete a verifiable credential template. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.verifiableCredentials().verification().templates().delete("id"); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the template to retrieve. - -
-
-
-
- - -
-
-
- -
client.verifiableCredentials.verification.templates.update(id, request) -> UpdateVerifiableCredentialTemplateResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update a verifiable credential template. -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```java -client.verifiableCredentials().verification().templates().update( - "id", - UpdateVerifiableCredentialTemplateRequestContent - .builder() - .build() -); -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `String` — ID of the template to retrieve. - -
-
- -
-
- -**name:** `Optional` - -
-
- -
-
- -**type:** `Optional` - -
-
- -
-
- -**dialect:** `Optional` - -
-
- -
-
- -**presentation:** `Optional` - -
-
- -
-
- -**wellKnownTrustedIssuers:** `Optional` - -
-
- -
-
- -**version:** `Optional` - -
-
-
-
- - -
-
-
diff --git a/sample-app/build.gradle b/sample-app/build.gradle deleted file mode 100644 index 4ee8f227b..000000000 --- a/sample-app/build.gradle +++ /dev/null @@ -1,19 +0,0 @@ -plugins { - id 'java-library' -} - -repositories { - mavenCentral() - maven { - url 'https://s01.oss.sonatype.org/content/repositories/releases/' - } -} - -dependencies { - implementation rootProject -} - - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - diff --git a/sample-app/src/main/java/sample/App.java b/sample-app/src/main/java/sample/App.java deleted file mode 100644 index a2948490d..000000000 --- a/sample-app/src/main/java/sample/App.java +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -package sample; - -public final class App { - -} - diff --git a/settings.gradle b/settings.gradle index ef07c3f10..4e5216dd4 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,9 +1,2 @@ -pluginManagement { - repositories { - gradlePluginPortal() - } -} - -include 'sample-app' - -rootProject.name = 'auth0' +rootProject.name = 'auth0-java' +include 'auth0' diff --git a/src/main/java/com/auth0/client/LoggingOptions.java b/src/main/java/com/auth0/client/LoggingOptions.java deleted file mode 100644 index c0ef54b71..000000000 --- a/src/main/java/com/auth0/client/LoggingOptions.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.auth0.client; - -import com.auth0.utils.Asserts; -import java.util.Collections; -import java.util.Set; - -/** - * Used to configure the HTTP Logging options. - */ -public class LoggingOptions { - - public enum LogLevel { - - /** - * No logging. - */ - NONE, - - /** - * Logs request and response lines. - */ - BASIC, - - /** - * Logs request and response lines, along with their respective headers. Note that headers may contain - * sensitive information; see {@linkplain #headersToRedact} - */ - HEADERS, - - /** - * Logs request and response lines, along with their respective headers and bodies. Note that headers and bodies - * may contain sensitive information; see {@linkplain #headersToRedact} for header redaction, but that only - * applies to headers. This should only be used in controlled or non-production environments. - */ - BODY - } - - private LogLevel logLevel; - private Set headersToRedact = Collections.emptySet(); - - /** - * Create a new instance using the specified {@linkplain LogLevel} - * @param logLevel the log level to set. Must not be null. - */ - public LoggingOptions(LogLevel logLevel) { - Asserts.assertNotNull(logLevel, "logLevel"); - this.logLevel = logLevel; - } - - /** - * @return the log level of this instance. - */ - public LogLevel getLogLevel() { - return this.logLevel; - } - - /** - * @return the headers that should be redacted from the output log. - */ - public Set getHeadersToRedact() { - return headersToRedact; - } - - /** - * Sets the headers to redact from the log. When using {@code HEADERS} or {@code BODY} logging levels, there is the - * potential of leaking sensitive information such as "Authorization" or "Cookie" headers. Note that this does not - * redact any of the body contents from being logged, so care must always be taken with {@code HEADERS} or {@code BODY} - * log levels. - * - * @param headersToRedact the Set of headers to redact. - */ - public void setHeadersToRedact(Set headersToRedact) { - this.headersToRedact = headersToRedact; - } -} diff --git a/src/main/java/com/auth0/client/ProxyOptions.java b/src/main/java/com/auth0/client/ProxyOptions.java deleted file mode 100644 index 7a78f7aaa..000000000 --- a/src/main/java/com/auth0/client/ProxyOptions.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.auth0.client; - -import com.auth0.utils.Asserts; -import java.net.Proxy; -import okhttp3.Credentials; - -/** - * Used to configure Java Proxy-related configurations. - */ -public class ProxyOptions { - - private final Proxy proxy; - private String basicAuth; - - /** - * Builds a new instance using the given Proxy. - * The Proxy will not have authentication unless {@link #setBasicAuthentication(String, char[])} is set. - * - * @param proxy the Proxy to use. - */ - public ProxyOptions(Proxy proxy) { - Asserts.assertNotNull(proxy, "proxy"); - this.proxy = proxy; - } - - /** - * Setter that builds the authentication value to use for this Proxy. - * - * @param username the username to use. - * @param password the password to use. - */ - public void setBasicAuthentication(String username, char[] password) { - Asserts.assertNotNull(proxy, "username"); - Asserts.assertNotNull(proxy, "password"); - this.basicAuth = Credentials.basic(username, new String(password)); - } - - /** - * Getter of the Proxy instance to set - * - * @return the Proxy instance to set - */ - public Proxy getProxy() { - return proxy; - } - - /** - * Getter of the authentication value to use for this Proxy. - * - * @return the authentication value to use for this Proxy, or null if unset. - */ - public String getBasicAuthentication() { - return basicAuth; - } -} diff --git a/src/main/java/com/auth0/client/auth/AuthAPI.java b/src/main/java/com/auth0/client/auth/AuthAPI.java deleted file mode 100644 index 7072aed26..000000000 --- a/src/main/java/com/auth0/client/auth/AuthAPI.java +++ /dev/null @@ -1,1456 +0,0 @@ -package com.auth0.client.auth; - -import static com.auth0.json.ObjectMapperProvider.getMapper; - -import com.auth0.json.auth.*; -import com.auth0.net.*; -import com.auth0.net.client.Auth0HttpClient; -import com.auth0.net.client.DefaultHttpClient; -import com.auth0.net.client.HttpMethod; -import com.auth0.utils.Asserts; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import okhttp3.HttpUrl; -import org.jetbrains.annotations.TestOnly; - -/** - * Class that provides an implementation of of the Authentication and Authorization API methods defined by the - * Auth0 Authentication API. - * Instances are created using the {@link Builder}. If you are also using the {@link ManagementAPI}, it is recommended - * to configure each with the same {@link DefaultHttpClient} to enable both API clients to share the same Http client. - *

- * To use with a confidential client, instantiate an instance with a client secret: - *

- * {@code
- * AuthAPI auth = AuthAPI.newBuilder("{DOMAIN}", "{CLIENT-ID}", "{CLIENT-SECRET}").build();
- * }
- * 
- *

- * To use with a public client, or when only using APIs that do not require a client secret: - *

- * {@code
- * AuthAPI auth = AuthAPI.newBuilder("{DOMAIN}", "{CLIENT-ID}").build();
- * }
- * 
- * Operations that always require a client secret will throw a {@code InvalidStateException} if the client is not created - * with a secret. - */ -@SuppressWarnings("WeakerAccess") -public class AuthAPI { - - private static final String KEY_CLIENT_ID = "client_id"; - private static final String KEY_CLIENT_SECRET = "client_secret"; - private static final String KEY_GRANT_TYPE = "grant_type"; - private static final String KEY_USERNAME = "username"; - private static final String KEY_PASSWORD = "password"; - private static final String KEY_AUDIENCE = "audience"; - private static final String KEY_EMAIL = "email"; - private static final String KEY_CONNECTION = "connection"; - private static final String KEY_TOKEN = "token"; - private static final String KEY_REFRESH_TOKEN = "refresh_token"; - private static final String KEY_OTP = "otp"; - private static final String KEY_REALM = "realm"; - private static final String KEY_MFA_TOKEN = "mfa_token"; - private static final String KEY_CLIENT_ASSERTION = "client_assertion"; - private static final String KEY_CLIENT_ASSERTION_TYPE = "client_assertion_type"; - private static final String PATH_OAUTH = "oauth"; - private static final String PATH_TOKEN = "token"; - private static final String PATH_DBCONNECTIONS = "dbconnections"; - private static final String PATH_REVOKE = "revoke"; - private static final String PATH_PASSWORDLESS = "passwordless"; - private static final String PATH_START = "start"; - private static final String KEY_ORGANIZATION = "organization"; - private static final String KEY_PHONE_NUMBER = "phone_number"; - - private final Auth0HttpClient client; - private final String clientId; - private final String clientSecret; - private final ClientAssertionSigner clientAssertionSigner; - private final HttpUrl baseUrl; - - /** - * Initialize a new {@link Builder} to configure and create an instance. Use this to construct an instance - * with a client secret when using a confidential client (Regular Web Application). - * @param domain the tenant's domain. Must be a non-null valid HTTPS URL. - * @param clientId the application's client ID. - * @param clientSecret the applications client secret. - * @return a Builder for further configuration. - */ - public static Builder newBuilder(String domain, String clientId, String clientSecret) { - return new Builder(domain, clientId).withClientSecret(clientSecret); - } - - /** - * Initialize a new {@link Builder} to configure and create an instance. Use this to construct an instance - * with a client assertion signer used in place of a client secret when calling token APIs. - * - * @param domain the tenant's domain. Must be a non-null valid HTTPS URL. - * @param clientId the application's client ID. - * @param clientAssertionSigner the {@code ClientAssertionSigner} used to create the signed client assertion. - * @return a Builder for further configuration. - */ - public static Builder newBuilder(String domain, String clientId, ClientAssertionSigner clientAssertionSigner) { - return new Builder(domain, clientId).withClientAssertionSigner(clientAssertionSigner); - } - - /** - * Initialize a new {@link Builder} to configure and create an instance. Use this to construct an instance - * without a client secret (for example, when only using APIs that do not require a secret). - * @param domain the tenant's domain. Must be a non-null valid HTTPS URL. - * @param clientId the application's client ID. - * @return a Builder for further configuration. - */ - public static Builder newBuilder(String domain, String clientId) { - return new Builder(domain, clientId); - } - - private AuthAPI( - String domain, - String clientId, - String clientSecret, - ClientAssertionSigner clientAssertionSigner, - Auth0HttpClient httpClient) { - Asserts.assertNotNull(domain, "domain"); - Asserts.assertNotNull(clientId, "client id"); - Asserts.assertNotNull(httpClient, "Http client"); - - this.baseUrl = createBaseUrl(domain); - if (baseUrl == null) { - throw new IllegalArgumentException("The domain had an invalid format and couldn't be parsed as an URL."); - } - this.clientId = clientId; - this.clientSecret = clientSecret; - this.clientAssertionSigner = clientAssertionSigner; - this.client = httpClient; - } - - @TestOnly - Auth0HttpClient getHttpClient() { - return this.client; - } - - @TestOnly - HttpUrl getBaseUrl() { - return baseUrl; - } - - private HttpUrl createBaseUrl(String domain) { - String url = domain; - if (!domain.startsWith("https://") && !domain.startsWith("http://")) { - url = "https://" + domain; - } - return HttpUrl.parse(url); - } - - /** - * Creates an instance of the {@link AuthorizeUrlBuilder} with the given redirect url. - * i.e.: - *
-     * {@code
-     * String url = authAPI.authorizeUrl("https://me.auth0.com/callback")
-     *      .withConnection("facebook")
-     *      .withAudience("https://api.me.auth0.com/users")
-     *      .withScope("openid contacts")
-     *      .withState("my-custom-state")
-     *      .build();
-     * }
-     * 
- * - * @param redirectUri the URL to redirect to after authorization has been granted by the user. Your Auth0 application - * must have this URL as one of its Allowed Callback URLs. Must be a valid non-encoded URL. - * @return a new instance of the {@link AuthorizeUrlBuilder} to configure. - */ - public AuthorizeUrlBuilder authorizeUrl(String redirectUri) { - Asserts.assertValidUrl(redirectUri, "redirect uri"); - - return AuthorizeUrlBuilder.newInstance(baseUrl, clientId, redirectUri); - } - - public Request authorizeBackChannel( - String scope, String bindingMessage, Map loginHint) { - return authorizeBackChannel(scope, bindingMessage, loginHint, null, null); - } - - public Request authorizeBackChannel( - String scope, - String bindingMessage, - Map loginHint, - String audience, - Integer requestExpiry) { - Asserts.assertNotNull(scope, "scope"); - Asserts.assertNotNull(bindingMessage, "binding message"); - Asserts.assertNotNull(loginHint, "login hint"); - - String url = baseUrl.newBuilder().addPathSegment("bc-authorize").build().toString(); - - FormBodyRequest request = new FormBodyRequest<>( - client, null, url, HttpMethod.POST, new TypeReference() {}); - - request.addParameter(KEY_CLIENT_ID, clientId); - addClientAuthentication(request, false); - request.addParameter("scope", scope); - request.addParameter("binding_message", bindingMessage); - - if (Objects.nonNull(audience)) { - request.addParameter(KEY_AUDIENCE, audience); - } - if (Objects.nonNull(requestExpiry)) { - request.addParameter("requested_expiry", requestExpiry); - } - - try { - String loginHintJson = getMapper().writeValueAsString(loginHint); - request.addParameter("login_hint", loginHintJson); - } catch (JsonProcessingException e) { - throw new IllegalArgumentException("'loginHint' must be a map that can be serialized to JSON", e); - } - return request; - } - - public Request getBackChannelLoginStatus(String authReqId, String grantType) { - Asserts.assertNotNull(authReqId, "auth req id"); - Asserts.assertNotNull(grantType, "grant type"); - - String url = getTokenUrl(); - - FormBodyRequest request = new FormBodyRequest<>( - client, null, url, HttpMethod.POST, new TypeReference() {}); - - request.addParameter(KEY_CLIENT_ID, clientId); - addClientAuthentication(request, false); - request.addParameter("auth_req_id", authReqId); - request.addParameter(KEY_GRANT_TYPE, grantType); - - return request; - } - - /** - * Builds an authorization URL for Pushed Authorization Requests (PAR) - * @param requestUri the {@code request_uri} parameter from a successful pushed authorization request. - * @see AuthAPI#pushedAuthorizationRequest(String, String, Map) - * @see RFC 9126 - * @return the {@code request_uri} from a successful pushed authorization request. - */ - public String authorizeUrlWithPAR(String requestUri) { - Asserts.assertNotNull(requestUri, "request uri"); - return baseUrl.newBuilder() - .addPathSegment("authorize") - .addQueryParameter("client_id", clientId) - .addQueryParameter("request_uri", requestUri) - .build() - .toString(); - } - - /** - * Builds an authorization URL for JWT-Secured Authorization Request (JAR) - * @param request the {@code request} parameter value. As specified, it must be a signed JWT and contain claims representing the authorization parameters. - * @see AuthAPI#pushedAuthorizationRequestWithJAR(String) - * @see Authorization Code Flow with JWT-Secured Authorization Requests (JAR) - * @see RFC 9101 - * @return the authorization URL to redirect users to for authentication. - */ - public String authorizeUrlWithJAR(String request) { - Asserts.assertNotNull(request, "request"); - return baseUrl.newBuilder() - .addPathSegment("authorize") - .addQueryParameter("client_id", clientId) - .addQueryParameter("request", request) - .build() - .toString(); - } - - /** - * Builds a request to make a Pushed Authorization Request (PAR) to receive a {@code request_uri} to send to the {@code /authorize} endpoint. - * @param redirectUri the URL to redirect to after authorization has been granted by the user. Your Auth0 application - * must have this URL as one of its Allowed Callback URLs. Must be a valid non-encoded URL. - * @param responseType the response type to set. Must not be null. - * @param params an optional map of key/value pairs representing any additional parameters to send on the request. - * @see RFC 9126 - * @return a request to execute. - */ - public Request pushedAuthorizationRequest( - String redirectUri, String responseType, Map params) { - return pushedAuthorizationRequest(redirectUri, responseType, params, null); - } - - /** - * Builds a request to make a Pushed Authorization Request (PAR) to receive a {@code request_uri} to send to the {@code /authorize} endpoint. - * @param redirectUri the URL to redirect to after authorization has been granted by the user. Your Auth0 application - * must have this URL as one of its Allowed Callback URLs. Must be a valid non-encoded URL. - * @param responseType the response type to set. Must not be null. - * @param params an optional map of key/value pairs representing any additional parameters to send on the request. - * @param authorizationDetails A list of maps representing the value of the (optional) {@code authorization_details} parameter, used to perform Rich Authorization Requests. The list will be serialized to JSON and sent on the request. - * @see #pushedAuthorizationRequest(String, String, Map, List) - * @see RFC 9126 - * @see RFC 9396 - * @see Authorization Code Flow with Rich Authorization Requests (RAR) - * @return a request to execute. - */ - public Request pushedAuthorizationRequest( - String redirectUri, - String responseType, - Map params, - List> authorizationDetails) { - Asserts.assertValidUrl(redirectUri, "redirect uri"); - Asserts.assertNotNull(responseType, "response type"); - - String url = baseUrl.newBuilder().addPathSegments("oauth/par").build().toString(); - - FormBodyRequest request = new FormBodyRequest<>( - client, null, url, HttpMethod.POST, new TypeReference() {}); - request.addParameter("client_id", clientId); - request.addParameter("redirect_uri", redirectUri); - request.addParameter("response_type", responseType); - if (Objects.nonNull(this.clientSecret)) { - request.addParameter("client_secret", clientSecret); - } - if (params != null) { - params.forEach(request::addParameter); - } - try { - if (Objects.nonNull(authorizationDetails)) { - String authDetailsJson = getMapper().writeValueAsString(authorizationDetails); - request.addParameter("authorization_details", authDetailsJson); - } - } catch (JsonProcessingException e) { - throw new IllegalArgumentException( - "'authorizationDetails' must be a list that can be serialized to JSON", e); - } - return request; - } - - /** - * Builds a request to make a Pushed Authorization Request (PAR) with JWT-Secured Authorization Requests (JAR), to receive a {@code request_uri} to send to the {@code /authorize} endpoint. - * @param request The signed JWT containing the authorization parameters as claims. - * @see #pushedAuthorizationRequestWithJAR(String, List) - * @see Authorization Code Flow with PAR and JAR - * @see RFC 9101 - * @see RFC 9126 - * @return a request to execute. - */ - public Request pushedAuthorizationRequestWithJAR(String request) { - return pushedAuthorizationRequestWithJAR(request, null); - } - - /** - * Builds a request to make a Pushed Authorization Request (PAR) with JWT-Secured Authorization Requests (JAR), to receive a {@code request_uri} to send to the {@code /authorize} endpoint. - * @param request The signed JWT containing the authorization parameters as claims. - * @param authorizationDetails A list of maps representing the value of the (optional) {@code authorization_details} parameter, used to perform Rich Authorization Requests. The list will be serialized to JSON and sent on the request. - * @see #pushedAuthorizationRequestWithJAR(String) - * @see Authorization Code Flow with PAR and JAR - * @see Authorization Code Flow with Rich Authorization Requests (RAR) - * @see RFC 9101 - * @see RFC 9126 - * @see RFC 9396 - * @return a request to execute. - */ - public Request pushedAuthorizationRequestWithJAR( - String request, List> authorizationDetails) { - Asserts.assertNotNull(request, "request"); - - String url = baseUrl.newBuilder().addPathSegments("oauth/par").build().toString(); - - FormBodyRequest req = new FormBodyRequest<>( - client, null, url, HttpMethod.POST, new TypeReference() {}); - req.addParameter("client_id", clientId); - req.addParameter("request", request); - if (Objects.nonNull(this.clientSecret)) { - req.addParameter("client_secret", clientSecret); - } - - try { - if (Objects.nonNull(authorizationDetails)) { - String authDetailsJson = getMapper().writeValueAsString(authorizationDetails); - req.addParameter("authorization_details", authDetailsJson); - } - } catch (JsonProcessingException e) { - throw new IllegalArgumentException( - "'authorizationDetails' must be a list that can be serialized to JSON", e); - } - return req; - } - - /** - * Creates an instance of the {@link LogoutUrlBuilder} with the given return-to url. - * i.e.: - *
-     * {@code
-     * String url = authAPI.logoutUrl("https://me.auth0.com/home", true)
-     *      .useFederated(true)
-     *      .withAccessToken("A9CvPwFojaBIA9CvI");
-     * }
-     * 
- * - * @param returnToUrl the URL the user should be navigated to upon logout. Must be a valid non-encoded URL. - * @param setClientId whether the client_id value must be set or not. If {@code true}, the {@code returnToUrl} must - * be included in your Auth0 Application's Allowed Logout URLs list. If {@code false}, the - * {@code returnToUrl} must be included in your Auth0's Allowed Logout URLs at the Tenant level. - * @return a new instance of the {@link LogoutUrlBuilder} to configure. - */ - public LogoutUrlBuilder logoutUrl(String returnToUrl, boolean setClientId) { - Asserts.assertValidUrl(returnToUrl, "return to url"); - - return LogoutUrlBuilder.newInstance(baseUrl, clientId, returnToUrl, setClientId); - } - - /** - * Request the user information related to the access token. - * i.e.: - *
-     * {@code
-     * try {
-     *      UserInfo result = authAPI.userInfo("A9CvPwFojaBIA9CvI").execute().getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @see Get User Info API docs - * @param accessToken a valid access token belonging to an API signed with RS256 algorithm and containing the scope 'openid'. - * @return a Request to execute. - */ - public Request userInfo(String accessToken) { - Asserts.assertNotNull(accessToken, "access token"); - - String url = baseUrl.newBuilder().addPathSegment("userinfo").build().toString(); - BaseRequest request = - new BaseRequest<>(client, null, url, HttpMethod.GET, new TypeReference() {}); - request.addHeader("Authorization", "Bearer " + accessToken); - return request; - } - - /** - * Request a password reset for the given email and database connection, using the client ID configured for this client instance. - * The response will always be successful even if there's no user associated to the given email for that database connection. - * i.e.: - *
-     * {@code
-     * try {
-     *      authAPI.resetPassword("me@auth0.com", "db-connection").execute().getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @see Change Password API docs - * @param email the email associated to the database user. - * @param connection the database connection where the user was created. - * @return a Request to execute. - */ - public Request resetPassword(String email, String connection) { - return resetPassword(this.clientId, email, connection); - } - - /** - * Request a password reset for the given client ID, email, and database connection. The response will always be successful even if - * there's no user associated to the given email for that database connection. - * i.e.: - *
-     * {@code
-     * try {
-     *      authAPI.resetPassword("CLIENT-ID", "me@auth0.com", "db-connection").execute().getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @see Change Password API docs - * @param clientId the client ID of your client. - * @param email the email associated to the database user. - * @param connection the database connection where the user was created. - * @return a Request to execute. - */ - public Request resetPassword(String clientId, String email, String connection) { - return resetPassword(clientId, email, connection, null); - } - - /** - * Request a password reset for the given client ID, email, database connection and organization ID. The response will always be successful even if - * there's no user associated to the given email for that database connection. - * i.e.: - *
-     * {@code
-     * try {
-     *      authAPI.resetPassword("CLIENT-ID", "me@auth0.com", "db-connection", "ORGANIZATION-ID").execute().getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @see Change Password API docs - * @param clientId the client ID of your client. - * @param email the email associated to the database user. - * @param connection the database connection where the user was created. - * @param organization the organization ID where the user was created. - * @return a Request to execute. - */ - public Request resetPassword(String clientId, String email, String connection, String organization) { - Asserts.assertNotNull(email, "email"); - Asserts.assertNotNull(connection, "connection"); - - String url = baseUrl.newBuilder() - .addPathSegment(PATH_DBCONNECTIONS) - .addPathSegment("change_password") - .build() - .toString(); - VoidRequest request = new VoidRequest(client, null, url, HttpMethod.POST); - request.addParameter(KEY_CLIENT_ID, clientId); - request.addParameter(KEY_EMAIL, email); - request.addParameter(KEY_CONNECTION, connection); - request.addParameter(KEY_ORGANIZATION, organization); - return request; - } - - /** - * Creates a sign up request with the given credentials, phone number and database connection. - * "Requires Username" option must be turned on in the Connection's configuration first. - * i.e.: - *
-     * {@code
-     * try {
-     *      Map fields = new HashMap();
-     *      fields.put("age", "25);
-     *      fields.put("city", "Buenos Aires");
-     *      authAPI.signUp("me@auth0.com", "myself", new char[]{'s','e','c','r','e','t'}, "db-connection", "1234567890")
-     *          .setCustomFields(fields)
-     *          .execute();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @see Signup API docs - * @param email the desired user's email. - * @param username the desired user's username. - * @param password the desired user's password. - * @param connection the database connection where the user is going to be created. - * @param phoneNumber the desired users's phone number. - * @return a Request to configure and execute. - */ - public SignUpRequest signUp(String email, String username, char[] password, String connection, String phoneNumber) { - Asserts.assertNotNull(phoneNumber, "phone number"); - - SignUpRequest request = this.signUp(email, username, password, connection); - request.addParameter(KEY_PHONE_NUMBER, phoneNumber); - return request; - } - - /** - * Creates a sign up request with the given credentials and database connection. - * "Requires Username" option must be turned on in the Connection's configuration first. - * i.e.: - *
-     * {@code
-     * try {
-     *      Map fields = new HashMap();
-     *      fields.put("age", "25);
-     *      fields.put("city", "Buenos Aires");
-     *      authAPI.signUp("me@auth0.com", "myself", new char[]{'s','e','c','r','e','t'}, "db-connection")
-     *          .setCustomFields(fields)
-     *          .execute();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @see Signup API docs - * @param email the desired user's email. - * @param username the desired user's username. - * @param password the desired user's password. - * @param connection the database connection where the user is going to be created. - * @return a Request to configure and execute. - */ - public SignUpRequest signUp(String email, String username, char[] password, String connection) { - Asserts.assertNotNull(username, "username"); - - SignUpRequest request = this.signUp(email, password, connection); - request.addParameter(KEY_USERNAME, username); - return request; - } - - /** - * Creates a sign up request with the given credentials and database connection. - *
-     * {@code
-     * try {
-     *      Map fields = new HashMap();
-     *      fields.put("age", "25);
-     *      fields.put("city", "Buenos Aires");
-     *      authAPI.signUp("me@auth0.com", new char[]{'s','e','c','r','e','t'}, "db-connection")
-     *          .setCustomFields(fields)
-     *          .execute();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @see Signup API docs - * @param email the desired user's email. - * @param password the desired user's password. - * @param connection the database connection where the user is going to be created. - * @return a Request to configure and execute. - */ - public SignUpRequest signUp(String email, char[] password, String connection) { - Asserts.assertNotNull(email, "email"); - Asserts.assertNotNull(password, "password"); - Asserts.assertNotNull(connection, "connection"); - - String url = baseUrl.newBuilder() - .addPathSegment(PATH_DBCONNECTIONS) - .addPathSegment("signup") - .build() - .toString(); - SignUpRequest request = new SignUpRequest(client, url); - request.addParameter(KEY_CLIENT_ID, clientId); - request.addParameter(KEY_EMAIL, email); - request.addParameter(KEY_PASSWORD, password); - request.addParameter(KEY_CONNECTION, connection); - return request; - } - - /** - * Creates a log in request using the 'Password' grant and the given credentials. - * - * This flow should only be used from highly-trusted applications that cannot do redirects. - * If you can use redirect-based flows from your app, we recommend using the Authorization Code Flow instead. - * - * i.e.: - *
-     * {@code
-     * try {
-     *      TokenHolder result = authAPI.login("me@auth0.com", new char[]{'s','e','c','r','e','t})
-     *          .setScope("openid email nickname")
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @see Resource Owner Password API docs. - * @param emailOrUsername the identity of the user. - * @param password the password of the user. - * @return a Request to configure and execute. - */ - public TokenRequest login(String emailOrUsername, char[] password) { - Asserts.assertNotNull(emailOrUsername, "email or username"); - Asserts.assertNotNull(password, "password"); - - TokenRequest request = new TokenRequest(client, getTokenUrl()); - request.addParameter(KEY_CLIENT_ID, clientId); - request.addParameter(KEY_GRANT_TYPE, "password"); - request.addParameter(KEY_USERNAME, emailOrUsername); - request.addParameter(KEY_PASSWORD, password); - addClientAuthentication(request, true); - return request; - } - - /** - * Creates a log in request using the 'Password Realm' grant and the given credentials. - * Default used realm and audience are defined in the "API Authorization Settings" in the account's advanced settings in the Auth0 Dashboard. - * - * This flow should only be used from highly-trusted applications that cannot do redirects. - * If you can use redirect-based flows from your app, we recommend using the Authorization Code Flow instead. - * - *
-     * {@code
-     * try {
-     *      TokenHolder result = authAPI.login("me@auth0.com", new char[]{'s','e','c','r','e','t'}, "my-realm")
-     *          .setAudience("https://myapi.me.auth0.com/users")
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @param emailOrUsername the identity of the user. - * @param password the password of the user. - * @param realm the realm to use. - * @return a Request to configure and execute. - * @see Resource Owner Password API docs. - */ - public TokenRequest login(String emailOrUsername, char[] password, String realm) { - Asserts.assertNotNull(emailOrUsername, "email or username"); - Asserts.assertNotNull(password, "password"); - Asserts.assertNotNull(realm, "realm"); - - TokenRequest request = new TokenRequest(client, getTokenUrl()); - request.addParameter(KEY_CLIENT_ID, clientId); - request.addParameter(KEY_GRANT_TYPE, "http://auth0.com/oauth/grant-type/password-realm"); - request.addParameter(KEY_USERNAME, emailOrUsername); - request.addParameter(KEY_PASSWORD, password); - request.addParameter(KEY_REALM, realm); - addClientAuthentication(request, true); - return request; - } - - /** - * Creates a login request using the Passwordless grant type. - * Confidential clients (Regular Web Apps) must have a client secret configured on this {@code AuthAPI} instance. - * - *
-     * {@code
-     * try {
-     *      TokenHolder result = authAPI.exchangePasswordlessOtp("user@domain.com", "email", new char[]{'c','o','d','e'})
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      // Something happened
-     * }
-     * }
-     * 
- * - * @param emailOrPhone The email or phone number of the user. Must not be null. - * @param realm The realm to use. Typically "email" or "sms", unless using a custom Passwordless connection. Must not be null. - * @param otp The one-time password used to authenticate using Passwordless connections. Must not be null. - * - * @return A request to configure and execute - * - * @see Using Passwordless APIs - * @see Passwordless Authenticate User API docs - * @see AuthAPI#startPasswordlessEmailFlow(String, PasswordlessEmailType) - * @see AuthAPI#startPasswordlessSmsFlow(String) - */ - public TokenRequest exchangePasswordlessOtp(String emailOrPhone, String realm, char[] otp) { - Asserts.assertNotNull(emailOrPhone, "emailOrPhone"); - Asserts.assertNotNull(realm, "realm"); - Asserts.assertNotNull(otp, "otp"); - - TokenRequest request = new TokenRequest(client, getTokenUrl()); - request.addParameter(KEY_CLIENT_ID, clientId); - request.addParameter(KEY_GRANT_TYPE, "http://auth0.com/oauth/grant-type/passwordless/otp"); - request.addParameter(KEY_USERNAME, emailOrPhone); - request.addParameter(KEY_REALM, realm); - request.addParameter(KEY_OTP, otp); - addClientAuthentication(request, false); - return request; - } - - /** - * Creates a request to get a Token for the given audience using the 'Client Credentials' grant. - * Default used realm is defined in the "API Authorization Settings" in the account's advanced settings in the Auth0 Dashboard. - * This operation requires that a client secret be configured for the {@code AuthAPI} client. - *
-     * {@code
-     * try {
-     *      TokenHolder result = authAPI.requestToken("https://myapi.me.auth0.com/users")
-     *          .setRealm("my-realm")
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @see Client Credentials Flow API docs - * @param audience the audience of the API to request access to. - * @return a Request to configure and execute. - */ - public TokenRequest requestToken(String audience) { - return requestToken(audience, null); - } - - /** - * Creates a request to get a Token for the given audience using the 'Client Credentials' grant. - * Default used realm is defined in the "API Authorization Settings" in the account's advanced settings in the Auth0 Dashboard. - * This operation requires that a client secret be configured for the {@code AuthAPI} client. - *
-     * {@code
-     * try {
-     *      TokenHolder result = authAPI.requestToken("https://myapi.me.auth0.com/users", "org_123")
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @see Client Credentials Flow API docs - * @param audience the audience of the API to request access to. - * @param org the organization name or ID to be included in the request. - * @return a Request to configure and execute. - */ - public TokenRequest requestToken(String audience, String org) { - Asserts.assertNotNull(audience, "audience"); - - TokenRequest request = new TokenRequest(client, getTokenUrl()); - request.addParameter(KEY_CLIENT_ID, clientId); - request.addParameter(KEY_GRANT_TYPE, "client_credentials"); - request.addParameter(KEY_AUDIENCE, audience); - if (org != null && !org.trim().isEmpty()) { - request.addParameter(KEY_ORGANIZATION, org); - } - addClientAuthentication(request, true); - return request; - } - - /** - * 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. - *
-     * {@code
-     * try {
-     *      authAPI.revokeToken("ej2E8zNEzjrcSD2edjaE")
-     *          .execute();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @see Revoke refresh token API docs - * @param refreshToken the refresh token to revoke. - * @return a Request to execute. - */ - public Request revokeToken(String refreshToken) { - Asserts.assertNotNull(refreshToken, "refresh token"); - - String url = baseUrl.newBuilder() - .addPathSegment(PATH_OAUTH) - .addPathSegment(PATH_REVOKE) - .build() - .toString(); - VoidRequest request = new VoidRequest(client, null, url, HttpMethod.POST); - request.addParameter(KEY_CLIENT_ID, clientId); - request.addParameter(KEY_TOKEN, refreshToken); - addClientAuthentication(request, false); - return request; - } - - /** - * Creates a request to renew the authentication and get fresh new credentials using a valid Refresh Token and the - * {@code refresh_token} grant. - * Confidential clients (Regular Web Apps) must have a client secret configured on this {@code AuthAPI} instance. - * - *
-     * {@code
-     * try {
-     *      TokenHolder result = authAPI.renewAuth("ej2E8zNEzjrcSD2edjaE")
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @see Refresh Token API docs - * @param refreshToken the refresh token to use to get fresh new credentials. - * @return a Request to configure and execute. - */ - public TokenRequest renewAuth(String refreshToken) { - Asserts.assertNotNull(refreshToken, "refresh token"); - - TokenRequest request = new TokenRequest(client, getTokenUrl()); - request.addParameter(KEY_CLIENT_ID, clientId); - request.addParameter(KEY_GRANT_TYPE, "refresh_token"); - request.addParameter(KEY_REFRESH_TOKEN, refreshToken); - addClientAuthentication(request, false); - return request; - } - - /** - * Creates a request to exchange the code obtained in the /authorize call using the 'Authorization Code' grant. - * This operation requires the {@code AuthAPI} instance to have a client secret configured. - *
-     * {@code
-     * try {
-     *      TokenHolder result = authAPI.exchangeCode("SnWoFLMzApDskr", "https://me.auth0.com/callback")
-     *          .setScope("openid name nickname")
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @see Authorization Code Flow API docs - * @param code the authorization code received from the /authorize call. - * @param redirectUri the redirect uri sent on the /authorize call. - * @return a Request to configure and execute. - */ - public TokenRequest exchangeCode(String code, String redirectUri) { - return exchangeCode(code, redirectUri, true); - } - - /** - * Creates a request to exchange the code obtained from the {@code /authorize} call using the Authorization Code - * with PKCE grant. - * Confidential clients (Regular Web Apps) must have a client secret configured on this {@code AuthAPI} instance. - *
-     * {@code
-     * AuthAPI auth = AuthAPI.newBuilder("DOMAIN", "CLIENT-ID", "CLIENT-SECRET").build();
-     *
-     * SecureRandom sr = new SecureRandom();
-     * byte[] code = new byte[32];
-     * sr.nextBytes(code);
-     * String verifier = Base64.getUrlEncoder().withoutPadding().encodeToString(code);
-     *
-     * byte[] bytes = verifier.getBytes("US-ASCII");
-     * MessageDigest md = MessageDigest.getInstance("SHA-256");
-     * md.update(bytes, 0, bytes.length);
-     * byte[] digest = md.digest();
-     * String challenge = Base64.getUrlEncoder().withoutPadding().encodeToString(digest);
-     *
-     * // generate authorize URL with code challenge derived from verifier
-     * String url = auth.authorizeUrl("https://me.auth0.com/callback")
-     *      .withCodeChallenge(challenge)
-     *      .build();
-     *
-     * // on redirect, exchange code and verify challenge
-     * try {
-     *      TokenHolder result = auth.exchangeCodeWithVerifier("CODE", verifier, "https://me.auth0.com/callback")
-     *          .setScope("openid name nickname")
-     *          .execute();
-     * } catch (Auth0Exception e) {
-     *      // Something happened
-     * }
-     * }
-     * 
- * - * @param code the authorization code received from the {@code /authorize} call. - * @param verifier the cryptographically random key that was used to generate the {@code code_challenge} passed to - * {@code /authorize} - * @param redirectUri the redirect uri sent on the /authorize call. - * @return a Request to configure and execute. - */ - public TokenRequest exchangeCodeWithVerifier(String code, String verifier, String redirectUri) { - Asserts.assertNotNull(code, "code"); - Asserts.assertNotNull(redirectUri, "redirect uri"); - Asserts.assertNotNull(verifier, "verifier"); - - TokenRequest request = exchangeCode(code, redirectUri, false); - request.addParameter("code_verifier", verifier); - return request; - } - - /** - * Create a request to send an email containing a link or a code to begin authentication with Passwordless connections. - * Confidential clients (Regular Web Apps) must have a client secret configured on this {@code AuthAPI} instance. - *
-     * {@code
-     * try {
-     *      PasswordlessEmailResponse result = authAPI.startPasswordlessEmailFlow("user@domain.com", PasswordlessEmailType.CODE)
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      // Something happened
-     * }
-     * }
-     * 
- * - * @param email the email address to send the code or link to. Must not be null. - * @param type the type of the passwordless email request. Must not be null. - * - * @return a Request to configure and execute. - * - * @see Passwordless Authentication with Email documentation - * @see Get code or link API reference documentation - */ - public BaseRequest startPasswordlessEmailFlow(String email, PasswordlessEmailType type) { - Asserts.assertNotNull(email, "email"); - Asserts.assertNotNull(type, "type"); - - String url = baseUrl.newBuilder() - .addPathSegment(PATH_PASSWORDLESS) - .addPathSegment(PATH_START) - .build() - .toString(); - - BaseRequest request = new BaseRequest<>( - client, null, url, HttpMethod.POST, new TypeReference() {}); - request.addParameter(KEY_CLIENT_ID, clientId); - request.addParameter(KEY_CONNECTION, "email"); - request.addParameter(KEY_EMAIL, email); - request.addParameter("send", type.getType()); - addClientAuthentication(request, false); - return request; - } - - /** - * Create a request to send a text message containing a code to begin authentication with Passwordless connections. - * Confidential clients (Regular Web Apps) must have a client secret configured on this {@code AuthAPI} instance. - *
-     * {@code
-     * try {
-     *      PasswordlessSmsResponse result = authAPI.startPasswordlessSmsFlow("+16511234567")
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      // Something happened
-     * }
-     * }
-     * 
- * - * @param phoneNumber The phone number to send the code to. Must not be null. - * - * @return a Request to configure and execute. - * - * @see Passwordless Authentication with SMS documentation - * @see Get code or link API reference documentation - */ - public BaseRequest startPasswordlessSmsFlow(String phoneNumber) { - Asserts.assertNotNull(phoneNumber, "phoneNumber"); - - String url = baseUrl.newBuilder() - .addPathSegment(PATH_PASSWORDLESS) - .addPathSegment(PATH_START) - .build() - .toString(); - - BaseRequest request = - new BaseRequest<>(client, null, url, HttpMethod.POST, new TypeReference() {}); - request.addParameter(KEY_CLIENT_ID, clientId); - request.addParameter(KEY_CONNECTION, "sms"); - request.addParameter("phone_number", phoneNumber); - addClientAuthentication(request, false); - return request; - } - - /** - * Creates a request to exchange the mfa token and one-time password (OTP) to authenticate a user with an MFA OTP Authenticator. - * Confidential clients (Regular Web Apps) must have a client secret configured on this {@code AuthAPI} instance. - *
-     * {@code
-     * try {
-     *      TokenHolder result = authAPI.exchangeMfaOtp("the-mfa-token", new char[]{'a','n','o','t','p'})
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @param mfaToken the mfa_token received from the mfa_required error that occurred during login. Must not be null. - * @param otp the OTP Code provided by the user. Must not be null. - * - * @return a Request to configure and execute. - * - * @see Verify with one-time password (OTP) API documentation - */ - public TokenRequest exchangeMfaOtp(String mfaToken, char[] otp) { - Asserts.assertNotNull(mfaToken, "mfa token"); - Asserts.assertNotNull(otp, "otp"); - - TokenRequest request = new TokenRequest(client, getTokenUrl()); - request.addParameter(KEY_CLIENT_ID, clientId); - request.addParameter(KEY_GRANT_TYPE, "http://auth0.com/oauth/grant-type/mfa-otp"); - request.addParameter(KEY_MFA_TOKEN, mfaToken); - request.addParameter(KEY_OTP, otp); - addClientAuthentication(request, false); - return request; - } - - /** - * Creates a request to exchange the mfa token and an out-of-band (OOB) challenge (either Push notification, SMS, or Voice). - * Confidential clients (Regular Web Apps) must have a client secret configured on this {@code AuthAPI} instance. - *
-     * {@code
-     * try {
-     *      TokenHolder result = authAPI.exchangeMfaOob("the-mfa-token", new char[]{'a','n','o','t','p'}, new char[]{'b','i','n','d','c','o','d','e'})
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @param mfaToken the mfa_token received from the mfa_required error that occurred during login. Must not be null. - * @param oobCode the OOB Code provided by the user. Must not be null. - * @param bindingCode A code used to bind the side channel (used to deliver the challenge) with the main channel you are using to authenticate. This is usually an OTP-like code delivered as part of the challenge message. May be null. - * - * @return a Request to configure and execute. - * - * @see Verify with Out-of-band (OOB) API documentation - */ - public TokenRequest exchangeMfaOob(String mfaToken, char[] oobCode, char[] bindingCode) { - Asserts.assertNotNull(mfaToken, "mfa token"); - Asserts.assertNotNull(oobCode, "OOB code"); - - TokenRequest request = new TokenRequest(client, getTokenUrl()); - request.addParameter(KEY_CLIENT_ID, clientId); - request.addParameter(KEY_GRANT_TYPE, "http://auth0.com/oauth/grant-type/mfa-oob"); - request.addParameter(KEY_MFA_TOKEN, mfaToken); - request.addParameter("oob_code", oobCode); - - if (Objects.nonNull(bindingCode) && bindingCode.length > 0) { - request.addParameter("binding_code", bindingCode); - } - - addClientAuthentication(request, false); - return request; - } - - /** - * Creates a request to exchange the mfa token using a recovery code. - * Confidential clients (Regular Web Apps) must have a client secret configured on this {@code AuthAPI} instance. - *
-     * {@code
-     * try {
-     *      TokenHolder result = authAPI.exchangeMfaRecoveryCode("the-mfa-token", new char[]{'c','o','d','e'})
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @param mfaToken the mfa_token received from the mfa_required error that occurred during login. Must not be null. - * @param recoveryCode the recovery code provided by the user. Must not be null. - * @return a Request to configure and execute. - * - * @see Verify with a recovery code API documentation - */ - public TokenRequest exchangeMfaRecoveryCode(String mfaToken, char[] recoveryCode) { - Asserts.assertNotNull(mfaToken, "mfa token"); - Asserts.assertNotNull(recoveryCode, "recovery code"); - - TokenRequest request = new TokenRequest(client, getTokenUrl()); - request.addParameter(KEY_CLIENT_ID, clientId); - request.addParameter(KEY_GRANT_TYPE, "http://auth0.com/oauth/grant-type/mfa-recovery-code"); - request.addParameter(KEY_MFA_TOKEN, mfaToken); - request.addParameter("recovery_code", recoveryCode); - - addClientAuthentication(request, false); - return request; - } - - /** - * Request a challenge for multi-factor authentication (MFA) based on the challenge types supported by the application and user. - * Confidential clients (Regular Web Apps) must have a client secret configured on this {@code AuthAPI} instance. - *
-     * {@code
-     * try {
-     *      MfaChallengeResponse result = authAPI.mfaChallengeRequest("the-mfa-token", "otp", "authenticator-id")
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @param mfaToken The token received from mfa_required error. Must not be null. - * @param challengeType A whitespace-separated list of the challenges types accepted by your application. - * @param authenticatorId The ID of the authenticator to challenge. - * @return a Request to execute. - * @see Challenge Request API documentation - */ - public Request mfaChallengeRequest( - String mfaToken, String challengeType, String authenticatorId) { - Asserts.assertNotNull(mfaToken, "mfa token"); - - String url = baseUrl.newBuilder() - .addPathSegment("mfa") - .addPathSegment("challenge") - .build() - .toString(); - - BaseRequest request = - new BaseRequest<>(client, null, url, HttpMethod.POST, new TypeReference() {}); - - request.addParameter(KEY_MFA_TOKEN, mfaToken); - request.addParameter(KEY_CLIENT_ID, clientId); - addClientAuthentication(request, false); - if (Objects.nonNull(challengeType)) { - request.addParameter("challenge_type", challengeType); - } - if (Objects.nonNull(authenticatorId)) { - request.addParameter("authenticator_id", authenticatorId); - } - return request; - } - - /** - * Associates or adds a new OTP authenticator for multi-factor authentication (MFA). - * Confidential clients (Regular Web Apps) must have a client secret configured on this {@code AuthAPI} instance. - *
-     * {@code
-     * try {
-     *      CreatedOTPResponse result = authAPI.addOTPAuthenticator("the-mfa-token")
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @param mfaToken The token received from mfa_required error. Must not be null. - * @return a Request to execute. - * @see Add an Authenticator API documentation - */ - public Request addOtpAuthenticator(String mfaToken) { - Asserts.assertNotNull(mfaToken, "mfa token"); - - String url = baseUrl.newBuilder() - .addPathSegment("mfa") - .addPathSegment("associate") - .build() - .toString(); - - BaseRequest request = - new BaseRequest<>(client, null, url, HttpMethod.POST, new TypeReference() {}); - - request.addParameter("authenticator_types", Collections.singletonList("otp")); - request.addParameter(KEY_CLIENT_ID, clientId); - addClientAuthentication(request, false); - request.addHeader("Authorization", "Bearer " + mfaToken); - return request; - } - - private BaseRequest createBaseOobRequest(String mfaToken, List oobChannels) { - String url = baseUrl.newBuilder() - .addPathSegment("mfa") - .addPathSegment("associate") - .build() - .toString(); - - BaseRequest request = - new BaseRequest<>(client, null, url, HttpMethod.POST, new TypeReference() {}); - - request.addParameter("authenticator_types", Collections.singletonList("oob")); - request.addParameter("oob_channels", oobChannels); - request.addParameter(KEY_CLIENT_ID, clientId); - addClientAuthentication(request, false); - request.addHeader("Authorization", "Bearer " + mfaToken); - - return request; - } - - /** - * Associates or adds a new OOB authenticator for multi-factor authentication (MFA). - * Confidential clients (Regular Web Apps) must have a client secret configured on this {@code AuthAPI} instance. - *
-     * {@code
-     * try {
-     *      CreatedOobResponse result = authAPI.addOobAuthenticator("the-mfa-token", Arrays.asList("sms", "email"), "phone-number", "email-address")
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @param mfaToken The token received from mfa_required error. Must not be null. - * @param oobChannels The type of OOB channels supported by the client. Must not be null. - * @param phoneNumber The phone number for "sms" or "voice" channels. May be null if not using "sms" or "voice". - * @param emailAddress The email address for "email" channel. May be null if not using "email". - * @return a Request to execute. - * @see Enroll with SMS or voice - */ - public Request addOobAuthenticator( - String mfaToken, List oobChannels, String phoneNumber, String emailAddress) { - Asserts.assertNotNull(mfaToken, "mfa token"); - Asserts.assertNotNull(oobChannels, "OOB channels"); - if (oobChannels.contains("sms") || oobChannels.contains("voice")) { - Asserts.assertNotNull(phoneNumber, "phone number"); - } - if (oobChannels.contains("email")) { - Asserts.assertNotNull(emailAddress, "email address"); - } - - BaseRequest request = createBaseOobRequest(mfaToken, oobChannels); - if (phoneNumber != null) { - request.addParameter("phone_number", phoneNumber); - } - if (emailAddress != null) { - request.addParameter("email", emailAddress); - } - - return request; - } - - /** - * Returns a list of authenticators associated with your application. - *
-     * {@code
-     * try {
-     *      List result = authAPI.listAuthenticators("token")
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @param accessToken The Access Token obtained during login. The token must possess a scope of {@code read:authenticators} - * and an audience of {@code https://YOUR_DOMAIN/mfa/} - * @return a Request to execute. - * @see List authenticators API documentation - */ - public Request> listAuthenticators(String accessToken) { - Asserts.assertNotNull(accessToken, "access token"); - - String url = baseUrl.newBuilder() - .addPathSegment("mfa") - .addPathSegment("authenticators") - .build() - .toString(); - - BaseRequest> request = - new BaseRequest<>(client, null, url, HttpMethod.GET, new TypeReference>() {}); - - request.addHeader("Authorization", "Bearer " + accessToken); - return request; - } - - /** - * Deletes an associated authenticator using its ID. - *
-     * {@code
-     * try {
-     *    authAPI.deleteAuthenticator("token", "deviceId")
-     *          .execute()
-     *          .getBody();
-     * } catch (Auth0Exception e) {
-     *      //Something happened
-     * }
-     * }
-     * 
- * - * @param accessToken The Access Token obtained during login. The token must possess a scope of {@code remove:authenticators} - * and an audience of {@code https://YOUR_DOMAIN/mfa/} - * @param authenticatorId The unique identifier associated with the authenticator. We can obtain the authenticatorIds by making a - * call to {@code listAuthenticators} method in this api. - * @return a Request to execute. - * @see Delete authenticators API documentation - */ - public Request deleteAuthenticator(String accessToken, String authenticatorId) { - Asserts.assertNotNull(accessToken, "access token"); - Asserts.assertNotNull(authenticatorId, "authenticator id"); - - String url = baseUrl.newBuilder() - .addPathSegment("mfa") - .addPathSegment("authenticators") - .addPathSegment(authenticatorId) - .build() - .toString(); - - VoidRequest request = new VoidRequest(client, null, url, HttpMethod.DELETE); - request.addHeader("Authorization", "Bearer " + accessToken); - return request; - } - - private TokenRequest exchangeCode(String code, String redirectUri, boolean secretRequired) { - Asserts.assertNotNull(code, "code"); - Asserts.assertNotNull(redirectUri, "redirect uri"); - - TokenRequest request = new TokenRequest(client, getTokenUrl()); - request.addParameter(KEY_CLIENT_ID, clientId); - request.addParameter(KEY_GRANT_TYPE, "authorization_code"); - request.addParameter("code", code); - request.addParameter("redirect_uri", redirectUri); - addClientAuthentication(request, secretRequired); - return request; - } - - private String getTokenUrl() { - return baseUrl.newBuilder() - .addPathSegment(PATH_OAUTH) - .addPathSegment(PATH_TOKEN) - .build() - .toString(); - } - - private void addClientAuthentication(BaseRequest request, boolean required) { - if (required && (this.clientSecret == null && this.clientAssertionSigner == null)) { - throw new IllegalStateException( - "A client secret or client assertion signing key is required for this operation"); - } - - if (Objects.nonNull(this.clientAssertionSigner)) { - request.addParameter( - KEY_CLIENT_ASSERTION, - this.clientAssertionSigner.createSignedClientAssertion(clientId, baseUrl.toString(), clientId)); - request.addParameter(KEY_CLIENT_ASSERTION_TYPE, "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"); - } else if (Objects.nonNull(this.clientSecret)) { - request.addParameter(KEY_CLIENT_SECRET, clientSecret); - } - } - - /** - * Builder for {@link AuthAPI} API client instances. - */ - public static class Builder { - private final String domain; - private final String clientId; - private String clientSecret; - private ClientAssertionSigner clientAssertionSigner; - private Auth0HttpClient httpClient; - - public Builder(String domain, String clientId) { - this.domain = domain; - this.clientId = clientId; - this.clientSecret = null; - } - - /** - * Configure the client with a client secret. - * @param clientSecret the client secret of your application. - * @return the builder instance. - */ - public Builder withClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * Configure the client with a client assertion signer. - * @param clientAssertionSigner the client assertion signer to create the signed client assertion. - * @return the builder instance. - */ - public Builder withClientAssertionSigner(ClientAssertionSigner clientAssertionSigner) { - this.clientAssertionSigner = clientAssertionSigner; - return this; - } - - /** - * Configure the client with an {@link Auth0HttpClient}. - * @param httpClient the HTTP client to use when making requests. - * @return the builder instance. - * @see DefaultHttpClient - */ - public Builder withHttpClient(Auth0HttpClient httpClient) { - this.httpClient = httpClient; - return this; - } - - /** - * Builds an {@link AuthAPI} instance using this builder's configuration. - * @return the configured {@code AuthAPI} instance. - */ - public AuthAPI build() { - return new AuthAPI( - domain, - clientId, - clientSecret, - clientAssertionSigner, - Objects.nonNull(httpClient) - ? httpClient - : DefaultHttpClient.newBuilder().build()); - } - } -} diff --git a/src/main/java/com/auth0/client/auth/AuthorizeUrlBuilder.java b/src/main/java/com/auth0/client/auth/AuthorizeUrlBuilder.java deleted file mode 100644 index 23cd5f96b..000000000 --- a/src/main/java/com/auth0/client/auth/AuthorizeUrlBuilder.java +++ /dev/null @@ -1,174 +0,0 @@ -package com.auth0.client.auth; - -import static com.auth0.utils.Asserts.assertNotNull; - -import java.util.HashMap; -import java.util.Map; -import okhttp3.HttpUrl; - -/** - * Class that provides the methods to generate a valid Auth0 Authorize Url. It's based on the https://auth0.com/docs/api/authentication#social docs. - *

- * This class is not thread-safe: - * It makes use of {@link HashMap} for storing the parameters. Make sure to not call the builder methods - * from a different or un-synchronized thread. - */ -@SuppressWarnings("WeakerAccess") -public class AuthorizeUrlBuilder { - - private final HttpUrl.Builder builder; - private final Map parameters; - - /** - * Creates an instance of the {@link AuthorizeUrlBuilder} using the given domain and base parameters. - * - * @param baseUrl the base url constructed from a valid domain. - * @param clientId the application's client_id value to set - * @param redirectUri the redirect_uri value to set. Your Auth0 application must have this URL as one of its Allowed - * Callback URLs. - * @return a new instance of the {@link AuthorizeUrlBuilder} to configure. - */ - static AuthorizeUrlBuilder newInstance(HttpUrl baseUrl, String clientId, String redirectUri) { - return new AuthorizeUrlBuilder(baseUrl, clientId, redirectUri); - } - - private AuthorizeUrlBuilder(HttpUrl url, String clientId, String redirectUri) { - assertNotNull(url, "base url"); - assertNotNull(clientId, "client id"); - assertNotNull(redirectUri, "redirect uri"); - - parameters = new HashMap<>(); - builder = url.newBuilder() - .addPathSegment("authorize") - .addEncodedQueryParameter("redirect_uri", redirectUri) - .addQueryParameter("client_id", clientId); - withParameter("response_type", "code"); - } - - /** - * Sets the connection value. - * - * @param connection connection to set - * @return the builder instance - */ - public AuthorizeUrlBuilder withConnection(String connection) { - assertNotNull(connection, "connection"); - parameters.put("connection", connection); - return this; - } - - /** - * Sets the audience value. - * - * @param audience audience to set - * @return the builder instance - */ - public AuthorizeUrlBuilder withAudience(String audience) { - assertNotNull(audience, "audience"); - parameters.put("audience", audience); - return this; - } - - /** - * Sets the state value. - * - * @param state state to set - * @return the builder instance - */ - public AuthorizeUrlBuilder withState(String state) { - assertNotNull(state, "state"); - parameters.put("state", state); - return this; - } - - /** - * Sets the scope value. - * - * @param scope scope to set - * @return the builder instance - */ - public AuthorizeUrlBuilder withScope(String scope) { - assertNotNull(scope, "scope"); - parameters.put("scope", scope); - return this; - } - - /** - * Sets the response type value. - * - * @param responseType response type to set - * @return the builder instance - */ - public AuthorizeUrlBuilder withResponseType(String responseType) { - assertNotNull(responseType, "response type"); - parameters.put("response_type", responseType); - return this; - } - - /** - * Sets the organization query string parameter value used to login to an organization. - * - * @param organization The ID or name of the organization to log the user in to. - * @return the builder instance. - */ - public AuthorizeUrlBuilder withOrganization(String organization) { - assertNotNull(organization, "organization"); - parameters.put("organization", organization); - return this; - } - - /** - * Sets the invitation query string parameter to join an organization. If using this, you must also specify the - * organization using {@linkplain AuthorizeUrlBuilder#withOrganization(String)}. - * - * @param invitation The ID of the invitation to accept. This is available on the URL that is provided when accepting an invitation. - * @return the builder instance. - */ - public AuthorizeUrlBuilder withInvitation(String invitation) { - assertNotNull(invitation, "invitation"); - parameters.put("invitation", invitation); - return this; - } - - /** - * Sets an additional parameter. - * - * @param name name of the parameter - * @param value value of the parameter to set - * @return the builder instance - */ - public AuthorizeUrlBuilder withParameter(String name, String value) { - assertNotNull(name, "name"); - assertNotNull(value, "value"); - parameters.put(name, value); - return this; - } - - /** - * Sets the {@code code_challenge} parameter used when using the Authorization Code Flow with Proof of Code Exchange (PKCE). - * - * @param challenge the generated challenge from a {@code code_verifier} - * @return the builder instance. - * - * @see Authentication API docuementation - * @see Authorization Code Flow with Proof of Code Exchange (PKCE) - */ - public AuthorizeUrlBuilder withCodeChallenge(String challenge) { - assertNotNull(challenge, "challenge"); - parameters.put("code_challenge", challenge); - parameters.put("code_challenge_method", "S256"); - return this; - } - - /** - * Creates a string representation of the URL with the configured parameters. - * - * @return the string URL - */ - public String build() { - for (Map.Entry p : parameters.entrySet()) { - builder.addQueryParameter(p.getKey(), p.getValue()); - } - return builder.build().toString(); - } -} diff --git a/src/main/java/com/auth0/client/auth/ClientAssertionSigner.java b/src/main/java/com/auth0/client/auth/ClientAssertionSigner.java deleted file mode 100644 index 798252f41..000000000 --- a/src/main/java/com/auth0/client/auth/ClientAssertionSigner.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.auth0.client.auth; - -/** - * Responsible for creating a signed client assertion used to authenticate to the Authentication API - * - * @see OpenID Connect Core Specification - */ -public interface ClientAssertionSigner { - - /** - * Creates a signed JWT representing a client assertion used to authenticate to the Authentication API. - * - * @param issuer the Issuer. This MUST contain the client_id of the OAuth Client. - * @param audience the audience that identifies the Authorization Server as an intended audience. - * @param subject the Subject. This MUST contain the client_id of the OAuth Client. - * - * @return a signed JWT representing the client assertion. - */ - String createSignedClientAssertion(String issuer, String audience, String subject); -} diff --git a/src/main/java/com/auth0/client/auth/LogoutUrlBuilder.java b/src/main/java/com/auth0/client/auth/LogoutUrlBuilder.java deleted file mode 100644 index 0c571536c..000000000 --- a/src/main/java/com/auth0/client/auth/LogoutUrlBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.auth0.client.auth; - -import static com.auth0.utils.Asserts.assertNotNull; - -import java.util.HashMap; -import java.util.Map; -import okhttp3.HttpUrl; - -/** - * Class that provides the methods to generate a valid Auth0 Logout Url. It's based on the https://auth0.com/docs/api/authentication#logout docs. - *

- * This class is not thread-safe: - * It makes use of {@link HashMap} for storing the parameters. Make sure to not call the builder methods - * from a different or un-synchronized thread. - */ -@SuppressWarnings("WeakerAccess") -public class LogoutUrlBuilder { - - private final HttpUrl.Builder builder; - private final Map parameters; - - /** - * Creates a instance of the {@link LogoutUrlBuilder} using the given domain and base parameters. - * - * @param baseUrl the base url constructed from a valid domain. Must not be null. - * @param clientId the application's client_id value to set - * @param returnToUrl the URL the user should be navigated to upon logout. Must not be null. - * @param setClientId whether the client_id value must be set or not. If {@code true}, the {@code returnToUrl} must - * be included in your Auth0 Application's Allowed Logout URLs list. If {@code false}, the - * {@code returnToUrl} must be included in your Auth0's Allowed Logout URLs at the Tenant level. - * @return a new instance of the {@link LogoutUrlBuilder} to configure. - */ - static LogoutUrlBuilder newInstance(HttpUrl baseUrl, String clientId, String returnToUrl, boolean setClientId) { - return new LogoutUrlBuilder(baseUrl, setClientId ? clientId : null, returnToUrl); - } - - private LogoutUrlBuilder(HttpUrl url, String clientId, String returnToUrl) { - assertNotNull(url, "base url"); - assertNotNull(returnToUrl, "return to url"); - - parameters = new HashMap<>(); - builder = url.newBuilder() - .addPathSegment("v2") - .addPathSegment("logout") - .addEncodedQueryParameter("returnTo", returnToUrl); - if (clientId != null) { - builder.addQueryParameter("client_id", clientId); - } - } - - /** - * Request Federated logout. - * - * @param federated whether or not to request Federated logout. - * @return the builder instance - */ - public LogoutUrlBuilder useFederated(boolean federated) { - if (federated) { - parameters.put("federated", ""); - } else { - parameters.remove("federated"); - } - return this; - } - - /** - * Creates a string representation of the URL with the configured parameters. - * - * @return the string URL - */ - public String build() { - for (Map.Entry p : parameters.entrySet()) { - builder.addQueryParameter(p.getKey(), p.getValue()); - } - return builder.build().toString(); - } -} diff --git a/src/main/java/com/auth0/client/auth/PasswordlessEmailType.java b/src/main/java/com/auth0/client/auth/PasswordlessEmailType.java deleted file mode 100644 index b0a6aea10..000000000 --- a/src/main/java/com/auth0/client/auth/PasswordlessEmailType.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.auth0.client.auth; - -/** - * Represents the type of the Passwordless email request. - */ -public enum PasswordlessEmailType { - - /** - * Send a link. - */ - LINK("link"), - - /** - * Send a code. - */ - CODE("code"); - - private final String type; - - PasswordlessEmailType(String type) { - this.type = type; - } - - /** - * Gets the type of Passwordless email request. - * - * @return the type of Passwordless email request. - */ - public String getType() { - return type; - } -} diff --git a/src/main/java/com/auth0/client/auth/RSAClientAssertionSigner.java b/src/main/java/com/auth0/client/auth/RSAClientAssertionSigner.java deleted file mode 100644 index 6ecd3691b..000000000 --- a/src/main/java/com/auth0/client/auth/RSAClientAssertionSigner.java +++ /dev/null @@ -1,105 +0,0 @@ -package com.auth0.client.auth; - -import com.auth0.exception.ClientAssertionSigningException; -import com.auth0.jwt.JWT; -import com.auth0.jwt.JWTCreator; -import com.auth0.jwt.algorithms.Algorithm; -import com.auth0.jwt.exceptions.JWTCreationException; -import com.auth0.utils.Asserts; -import java.security.interfaces.RSAPrivateKey; -import java.time.Instant; -import java.util.UUID; -import org.jetbrains.annotations.TestOnly; - -/** - * An implementation of {@linkplain ClientAssertionSigner} for RSA-signed client assertions. - */ -public class RSAClientAssertionSigner implements ClientAssertionSigner { - - private final RSAPrivateKey assertionSigningKey; - private final RSASigningAlgorithm assertionSigningAlgorithm; - - /** - * Creates a new instance. - * - * @param assertionSigningKey the private key used to sign the assertion. Must not be null. - * @param assertionSigningAlgorithm The RSA algorithm used to sign the assertion. Must not be null. - * - * @see #RSAClientAssertionSigner(RSAPrivateKey) - */ - public RSAClientAssertionSigner(RSAPrivateKey assertionSigningKey, RSASigningAlgorithm assertionSigningAlgorithm) { - Asserts.assertNotNull(assertionSigningKey, "assertion signing key"); - Asserts.assertNotNull(assertionSigningAlgorithm, "assertion signing algorithm"); - - this.assertionSigningKey = assertionSigningKey; - this.assertionSigningAlgorithm = assertionSigningAlgorithm; - } - - /** - * Creates a new instance using the RSA256 signing algorithm. - * - * @param assertionSigningKey the private key used to sign the assertion. Must not be null. - * - * @see #RSAClientAssertionSigner(RSAPrivateKey, RSASigningAlgorithm) - */ - public RSAClientAssertionSigner(RSAPrivateKey assertionSigningKey) { - this(assertionSigningKey, RSASigningAlgorithm.RSA256); - } - - @Override - public String createSignedClientAssertion(String issuer, String audience, String subject) { - Instant now = Instant.now(); - JWTCreator.Builder builder = JWT.create() - .withIssuer(issuer) - .withAudience(audience) - .withSubject(subject) - .withIssuedAt(now) - .withExpiresAt(now.plusSeconds(180)) - .withClaim("jti", UUID.randomUUID().toString()); - - switch (assertionSigningAlgorithm) { - case RSA256: - try { - return builder.sign(Algorithm.RSA256(null, assertionSigningKey)); - } catch (JWTCreationException exception) { - throw new ClientAssertionSigningException( - "Error creating the JWT used for client assertion using the RSA256 signing algorithm", - exception); - } - case RSA384: - try { - return builder.sign(Algorithm.RSA384(null, assertionSigningKey)); - } catch (JWTCreationException exception) { - throw new ClientAssertionSigningException( - "Error creating the JWT used for client assertion using the RSA384 signing algorithm", - exception); - } - default: - throw new ClientAssertionSigningException( - "Error creating the JWT used for client assertion. Unknown algorithm."); - } - } - - /** - * @return the assertion signing algorithm configured. - */ - @TestOnly - RSASigningAlgorithm getAssertionSigningAlgorithm() { - return this.assertionSigningAlgorithm; - } - - /** - * Represents the RSA algorithms available to sign the client assertion. - */ - public enum RSASigningAlgorithm { - /** - * The RSA 256 algorithm - */ - RSA256, - - /** - * The RSA 384 algorithm - */ - RSA384 - } -} diff --git a/src/main/java/com/auth0/client/mgmt/ActionsClient.java b/src/main/java/com/auth0/client/mgmt/ActionsClient.java deleted file mode 100644 index df141d3e7..000000000 --- a/src/main/java/com/auth0/client/mgmt/ActionsClient.java +++ /dev/null @@ -1,191 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.actions.ExecutionsClient; -import com.auth0.client.mgmt.actions.ModulesClient; -import com.auth0.client.mgmt.actions.TriggersClient; -import com.auth0.client.mgmt.actions.VersionsClient; -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.types.Action; -import com.auth0.client.mgmt.types.CreateActionRequestContent; -import com.auth0.client.mgmt.types.CreateActionResponseContent; -import com.auth0.client.mgmt.types.DeleteActionRequestParameters; -import com.auth0.client.mgmt.types.DeployActionResponseContent; -import com.auth0.client.mgmt.types.GetActionResponseContent; -import com.auth0.client.mgmt.types.ListActionsRequestParameters; -import com.auth0.client.mgmt.types.TestActionRequestContent; -import com.auth0.client.mgmt.types.TestActionResponseContent; -import com.auth0.client.mgmt.types.UpdateActionRequestContent; -import com.auth0.client.mgmt.types.UpdateActionResponseContent; -import java.util.function.Supplier; - -public class ActionsClient { - protected final ClientOptions clientOptions; - - private final RawActionsClient rawClient; - - protected final Supplier versionsClient; - - protected final Supplier executionsClient; - - protected final Supplier modulesClient; - - protected final Supplier triggersClient; - - public ActionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawActionsClient(clientOptions); - this.versionsClient = Suppliers.memoize(() -> new VersionsClient(clientOptions)); - this.executionsClient = Suppliers.memoize(() -> new ExecutionsClient(clientOptions)); - this.modulesClient = Suppliers.memoize(() -> new ModulesClient(clientOptions)); - this.triggersClient = Suppliers.memoize(() -> new TriggersClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawActionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve all actions. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve all actions. - */ - public SyncPagingIterable list(ListActionsRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve all actions. - */ - public SyncPagingIterable list(ListActionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create an action. Once an action is created, it must be deployed, and then bound to a trigger before it will be executed as part of a flow. - */ - public CreateActionResponseContent create(CreateActionRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create an action. Once an action is created, it must be deployed, and then bound to a trigger before it will be executed as part of a flow. - */ - public CreateActionResponseContent create(CreateActionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve an action by its ID. - */ - public GetActionResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve an action by its ID. - */ - public GetActionResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted. - */ - public void delete(String id, DeleteActionRequestParameters request) { - this.rawClient.delete(id, request).body(); - } - - /** - * Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted. - */ - public void delete(String id, DeleteActionRequestParameters request, RequestOptions requestOptions) { - this.rawClient.delete(id, request, requestOptions).body(); - } - - /** - * Update an existing action. If this action is currently bound to a trigger, updating it will <strong>not</strong> affect any user flows until the action is deployed. - */ - public UpdateActionResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update an existing action. If this action is currently bound to a trigger, updating it will <strong>not</strong> affect any user flows until the action is deployed. - */ - public UpdateActionResponseContent update(String id, UpdateActionRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update an existing action. If this action is currently bound to a trigger, updating it will <strong>not</strong> affect any user flows until the action is deployed. - */ - public UpdateActionResponseContent update( - String id, UpdateActionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - /** - * Deploy an action. Deploying an action will create a new immutable version of the action. If the action is currently bound to a trigger, then the system will begin executing the newly deployed version of the action immediately. Otherwise, the action will only be executed as a part of a flow once it is bound to that flow. - */ - public DeployActionResponseContent deploy(String id) { - return this.rawClient.deploy(id).body(); - } - - /** - * Deploy an action. Deploying an action will create a new immutable version of the action. If the action is currently bound to a trigger, then the system will begin executing the newly deployed version of the action immediately. Otherwise, the action will only be executed as a part of a flow once it is bound to that flow. - */ - public DeployActionResponseContent deploy(String id, RequestOptions requestOptions) { - return this.rawClient.deploy(id, requestOptions).body(); - } - - /** - * Test an action. After updating an action, it can be tested prior to being deployed to ensure it behaves as expected. - */ - public TestActionResponseContent test(String id, TestActionRequestContent request) { - return this.rawClient.test(id, request).body(); - } - - /** - * Test an action. After updating an action, it can be tested prior to being deployed to ensure it behaves as expected. - */ - public TestActionResponseContent test(String id, TestActionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.test(id, request, requestOptions).body(); - } - - public VersionsClient versions() { - return this.versionsClient.get(); - } - - public ExecutionsClient executions() { - return this.executionsClient.get(); - } - - public ModulesClient modules() { - return this.modulesClient.get(); - } - - public TriggersClient triggers() { - return this.triggersClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncActionsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncActionsClient.java deleted file mode 100644 index 2227df524..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncActionsClient.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.actions.AsyncExecutionsClient; -import com.auth0.client.mgmt.actions.AsyncModulesClient; -import com.auth0.client.mgmt.actions.AsyncTriggersClient; -import com.auth0.client.mgmt.actions.AsyncVersionsClient; -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.types.Action; -import com.auth0.client.mgmt.types.CreateActionRequestContent; -import com.auth0.client.mgmt.types.CreateActionResponseContent; -import com.auth0.client.mgmt.types.DeleteActionRequestParameters; -import com.auth0.client.mgmt.types.DeployActionResponseContent; -import com.auth0.client.mgmt.types.GetActionResponseContent; -import com.auth0.client.mgmt.types.ListActionsRequestParameters; -import com.auth0.client.mgmt.types.TestActionRequestContent; -import com.auth0.client.mgmt.types.TestActionResponseContent; -import com.auth0.client.mgmt.types.UpdateActionRequestContent; -import com.auth0.client.mgmt.types.UpdateActionResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncActionsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawActionsClient rawClient; - - protected final Supplier versionsClient; - - protected final Supplier executionsClient; - - protected final Supplier modulesClient; - - protected final Supplier triggersClient; - - public AsyncActionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawActionsClient(clientOptions); - this.versionsClient = Suppliers.memoize(() -> new AsyncVersionsClient(clientOptions)); - this.executionsClient = Suppliers.memoize(() -> new AsyncExecutionsClient(clientOptions)); - this.modulesClient = Suppliers.memoize(() -> new AsyncModulesClient(clientOptions)); - this.triggersClient = Suppliers.memoize(() -> new AsyncTriggersClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawActionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve all actions. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve all actions. - */ - public CompletableFuture> list(ListActionsRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve all actions. - */ - public CompletableFuture> list( - ListActionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create an action. Once an action is created, it must be deployed, and then bound to a trigger before it will be executed as part of a flow. - */ - public CompletableFuture create(CreateActionRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create an action. Once an action is created, it must be deployed, and then bound to a trigger before it will be executed as part of a flow. - */ - public CompletableFuture create( - CreateActionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve an action by its ID. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve an action by its ID. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted. - */ - public CompletableFuture delete(String id, DeleteActionRequestParameters request) { - return this.rawClient.delete(id, request).thenApply(response -> response.body()); - } - - /** - * Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted. - */ - public CompletableFuture delete( - String id, DeleteActionRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.delete(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update an existing action. If this action is currently bound to a trigger, updating it will <strong>not</strong> affect any user flows until the action is deployed. - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update an existing action. If this action is currently bound to a trigger, updating it will <strong>not</strong> affect any user flows until the action is deployed. - */ - public CompletableFuture update(String id, UpdateActionRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update an existing action. If this action is currently bound to a trigger, updating it will <strong>not</strong> affect any user flows until the action is deployed. - */ - public CompletableFuture update( - String id, UpdateActionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Deploy an action. Deploying an action will create a new immutable version of the action. If the action is currently bound to a trigger, then the system will begin executing the newly deployed version of the action immediately. Otherwise, the action will only be executed as a part of a flow once it is bound to that flow. - */ - public CompletableFuture deploy(String id) { - return this.rawClient.deploy(id).thenApply(response -> response.body()); - } - - /** - * Deploy an action. Deploying an action will create a new immutable version of the action. If the action is currently bound to a trigger, then the system will begin executing the newly deployed version of the action immediately. Otherwise, the action will only be executed as a part of a flow once it is bound to that flow. - */ - public CompletableFuture deploy(String id, RequestOptions requestOptions) { - return this.rawClient.deploy(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Test an action. After updating an action, it can be tested prior to being deployed to ensure it behaves as expected. - */ - public CompletableFuture test(String id, TestActionRequestContent request) { - return this.rawClient.test(id, request).thenApply(response -> response.body()); - } - - /** - * Test an action. After updating an action, it can be tested prior to being deployed to ensure it behaves as expected. - */ - public CompletableFuture test( - String id, TestActionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.test(id, request, requestOptions).thenApply(response -> response.body()); - } - - public AsyncVersionsClient versions() { - return this.versionsClient.get(); - } - - public AsyncExecutionsClient executions() { - return this.executionsClient.get(); - } - - public AsyncModulesClient modules() { - return this.modulesClient.get(); - } - - public AsyncTriggersClient triggers() { - return this.triggersClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncBrandingClient.java b/src/main/java/com/auth0/client/mgmt/AsyncBrandingClient.java deleted file mode 100644 index 410492bbc..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncBrandingClient.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.branding.AsyncTemplatesClient; -import com.auth0.client.mgmt.branding.AsyncThemesClient; -import com.auth0.client.mgmt.branding.phone.AsyncPhoneClient; -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.types.GetBrandingResponseContent; -import com.auth0.client.mgmt.types.UpdateBrandingRequestContent; -import com.auth0.client.mgmt.types.UpdateBrandingResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncBrandingClient { - protected final ClientOptions clientOptions; - - private final AsyncRawBrandingClient rawClient; - - protected final Supplier templatesClient; - - protected final Supplier themesClient; - - protected final Supplier phoneClient; - - public AsyncBrandingClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawBrandingClient(clientOptions); - this.templatesClient = Suppliers.memoize(() -> new AsyncTemplatesClient(clientOptions)); - this.themesClient = Suppliers.memoize(() -> new AsyncThemesClient(clientOptions)); - this.phoneClient = Suppliers.memoize(() -> new AsyncPhoneClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawBrandingClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve branding settings. - */ - public CompletableFuture get() { - return this.rawClient.get().thenApply(response -> response.body()); - } - - /** - * Retrieve branding settings. - */ - public CompletableFuture get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).thenApply(response -> response.body()); - } - - /** - * Update branding settings. - */ - public CompletableFuture update() { - return this.rawClient.update().thenApply(response -> response.body()); - } - - /** - * Update branding settings. - */ - public CompletableFuture update(UpdateBrandingRequestContent request) { - return this.rawClient.update(request).thenApply(response -> response.body()); - } - - /** - * Update branding settings. - */ - public CompletableFuture update( - UpdateBrandingRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).thenApply(response -> response.body()); - } - - public AsyncTemplatesClient templates() { - return this.templatesClient.get(); - } - - public AsyncThemesClient themes() { - return this.themesClient.get(); - } - - public AsyncPhoneClient phone() { - return this.phoneClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncClientGrantsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncClientGrantsClient.java deleted file mode 100644 index 68800ba2d..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncClientGrantsClient.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.clientgrants.AsyncOrganizationsClient; -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.types.ClientGrantResponseContent; -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.UpdateClientGrantRequestContent; -import com.auth0.client.mgmt.types.UpdateClientGrantResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncClientGrantsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawClientGrantsClient rawClient; - - protected final Supplier organizationsClient; - - public AsyncClientGrantsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawClientGrantsClient(clientOptions); - this.organizationsClient = Suppliers.memoize(() -> new AsyncOrganizationsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawClientGrantsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grants</a>, including the scopes associated with the application/API pair. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grants</a>, including the scopes associated with the application/API pair. - */ - public CompletableFuture> list( - ListClientGrantsRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grants</a>, including the scopes associated with the application/API pair. - */ - public CompletableFuture> list( - ListClientGrantsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a client grant for a machine-to-machine login flow. To learn more, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public CompletableFuture create(CreateClientGrantRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create a client grant for a machine-to-machine login flow. To learn more, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public CompletableFuture create( - CreateClientGrantRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve a single <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grant</a>, including the - * scopes associated with the application/API pair. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve a single <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grant</a>, including the - * scopes associated with the application/API pair. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete the <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a> from your machine-to-machine application. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete the <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a> from your machine-to-machine application. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update a client grant. - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update a client grant. - */ - public CompletableFuture update( - String id, UpdateClientGrantRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update a client grant. - */ - public CompletableFuture update( - String id, UpdateClientGrantRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - public AsyncOrganizationsClient organizations() { - return this.organizationsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncClientsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncClientsClient.java deleted file mode 100644 index 24bec4614..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncClientsClient.java +++ /dev/null @@ -1,403 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.clients.AsyncConnectionsClient; -import com.auth0.client.mgmt.clients.AsyncCredentialsClient; -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.types.Client; -import com.auth0.client.mgmt.types.CreateClientRequestContent; -import com.auth0.client.mgmt.types.CreateClientResponseContent; -import com.auth0.client.mgmt.types.GetClientRequestParameters; -import com.auth0.client.mgmt.types.GetClientResponseContent; -import com.auth0.client.mgmt.types.ListClientsRequestParameters; -import com.auth0.client.mgmt.types.RotateClientSecretResponseContent; -import com.auth0.client.mgmt.types.UpdateClientRequestContent; -import com.auth0.client.mgmt.types.UpdateClientResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncClientsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawClientsClient rawClient; - - protected final Supplier credentialsClient; - - protected final Supplier connectionsClient; - - public AsyncClientsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawClientsClient(clientOptions); - this.credentialsClient = Suppliers.memoize(() -> new AsyncCredentialsClient(clientOptions)); - this.connectionsClient = Suppliers.memoize(() -> new AsyncConnectionsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawClientsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified. - * For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following can be retrieved with any scope: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scope: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the - * <code>read:client_keys</code> or <code>read:client_credentials</code> scope: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified. - * For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following can be retrieved with any scope: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scope: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the - * <code>read:client_keys</code> or <code>read:client_credentials</code> scope: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public CompletableFuture> list(ListClientsRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified. - * For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following can be retrieved with any scope: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scope: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the - * <code>read:client_keys</code> or <code>read:client_credentials</code> scope: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public CompletableFuture> list( - ListClientsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a new client (application or SSO integration). For more information, read <a href="https://www.auth0.com/docs/get-started/auth0-overview/create-applications">Create Applications</a> - * <a href="https://www.auth0.com/docs/authenticate/single-sign-on/api-endpoints-for-single-sign-on>">API Endpoints for Single Sign-On</a>. - *

Notes:

- *
    - *
  • We recommend leaving the client_secret parameter unspecified to allow the generation of a safe secret.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use - * <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> - * to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, specify fully defined credentials. - * These credentials will be automatically enabled for Private Key JWT authentication on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>create:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
- *

<div class="alert alert-warning">SSO Integrations created via this endpoint will accept login requests and share user profile information.</div>

- */ - public CompletableFuture create(CreateClientRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create a new client (application or SSO integration). For more information, read <a href="https://www.auth0.com/docs/get-started/auth0-overview/create-applications">Create Applications</a> - * <a href="https://www.auth0.com/docs/authenticate/single-sign-on/api-endpoints-for-single-sign-on>">API Endpoints for Single Sign-On</a>. - *

Notes:

- *
    - *
  • We recommend leaving the client_secret parameter unspecified to allow the generation of a safe secret.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use - * <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> - * to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, specify fully defined credentials. - * These credentials will be automatically enabled for Private Key JWT authentication on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>create:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
- *

<div class="alert alert-warning">SSO Integrations created via this endpoint will accept login requests and share user profile information.</div>

- */ - public CompletableFuture create( - CreateClientRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(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 <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following properties can be retrieved with any of the scopes: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scopes: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).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 <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following properties can be retrieved with any of the scopes: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scopes: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public CompletableFuture get(String id, GetClientRequestParameters request) { - return this.rawClient.get(id, request).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 <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following properties can be retrieved with any of the scopes: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scopes: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public CompletableFuture get( - String id, GetClientRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a client and related configuration (rules, connections, etc). - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete a client and related configuration (rules, connections, etc). - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

Notes:

- *
    - *
  • The client_secret and signing_key attributes can only be updated with the update:client_keys scope.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>update:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
  • To change a client's <code>is_first_party</code> property to <code>false</code>, the <code>organization_usage</code> and <code>organization_require_behavior</code> properties must be unset.
  • - *
- */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

Notes:

- *
    - *
  • The client_secret and signing_key attributes can only be updated with the update:client_keys scope.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>update:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
  • To change a client's <code>is_first_party</code> property to <code>false</code>, the <code>organization_usage</code> and <code>organization_require_behavior</code> properties must be unset.
  • - *
- */ - public CompletableFuture update(String id, UpdateClientRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

Notes:

- *
    - *
  • The client_secret and signing_key attributes can only be updated with the update:client_keys scope.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>update:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
  • To change a client's <code>is_first_party</code> property to <code>false</code>, the <code>organization_usage</code> and <code>organization_require_behavior</code> properties must be unset.
  • - *
- */ - public CompletableFuture update( - String id, UpdateClientRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Rotate a client secret. - *

This endpoint cannot be used with clients configured with Private Key JWT authentication method (client_authentication_methods configured with private_key_jwt). The generated secret is NOT base64 encoded.

- *

For more information, read <a href="https://www.auth0.com/docs/get-started/applications/rotate-client-secret">Rotate Client Secrets</a>.

- */ - public CompletableFuture rotateSecret(String id) { - return this.rawClient.rotateSecret(id).thenApply(response -> response.body()); - } - - /** - * Rotate a client secret. - *

This endpoint cannot be used with clients configured with Private Key JWT authentication method (client_authentication_methods configured with private_key_jwt). The generated secret is NOT base64 encoded.

- *

For more information, read <a href="https://www.auth0.com/docs/get-started/applications/rotate-client-secret">Rotate Client Secrets</a>.

- */ - public CompletableFuture rotateSecret(String id, RequestOptions requestOptions) { - return this.rawClient.rotateSecret(id, requestOptions).thenApply(response -> response.body()); - } - - public AsyncCredentialsClient credentials() { - return this.credentialsClient.get(); - } - - public AsyncConnectionsClient connections() { - return this.connectionsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncConnectionProfilesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncConnectionProfilesClient.java deleted file mode 100644 index f1f1a294e..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncConnectionProfilesClient.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * 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.ConnectionProfile; -import com.auth0.client.mgmt.types.CreateConnectionProfileRequestContent; -import com.auth0.client.mgmt.types.CreateConnectionProfileResponseContent; -import com.auth0.client.mgmt.types.GetConnectionProfileResponseContent; -import com.auth0.client.mgmt.types.GetConnectionProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.ListConnectionProfileRequestParameters; -import com.auth0.client.mgmt.types.ListConnectionProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateConnectionProfileRequestContent; -import com.auth0.client.mgmt.types.UpdateConnectionProfileResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncConnectionProfilesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawConnectionProfilesClient rawClient; - - public AsyncConnectionProfilesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawConnectionProfilesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawConnectionProfilesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a list of Connection Profiles. This endpoint supports Checkpoint pagination. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve a list of Connection Profiles. This endpoint supports Checkpoint pagination. - */ - public CompletableFuture> list( - ListConnectionProfileRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve a list of Connection Profiles. This endpoint supports Checkpoint pagination. - */ - public CompletableFuture> list( - ListConnectionProfileRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a Connection Profile. - */ - public CompletableFuture create( - CreateConnectionProfileRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create a Connection Profile. - */ - public CompletableFuture create( - CreateConnectionProfileRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve a list of Connection Profile Templates. - */ - public CompletableFuture listTemplates() { - return this.rawClient.listTemplates().thenApply(response -> response.body()); - } - - /** - * Retrieve a list of Connection Profile Templates. - */ - public CompletableFuture listTemplates( - RequestOptions requestOptions) { - return this.rawClient.listTemplates(requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve a Connection Profile Template. - */ - public CompletableFuture getTemplate(String id) { - return this.rawClient.getTemplate(id).thenApply(response -> response.body()); - } - - /** - * Retrieve a Connection Profile Template. - */ - public CompletableFuture getTemplate( - String id, RequestOptions requestOptions) { - return this.rawClient.getTemplate(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a single Connection Profile specified by ID. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a single Connection Profile specified by ID. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a single Connection Profile specified by ID. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete a single Connection Profile specified by ID. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update the details of a specific Connection Profile. - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update the details of a specific Connection Profile. - */ - public CompletableFuture update( - String id, UpdateConnectionProfileRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update the details of a specific Connection Profile. - */ - public CompletableFuture update( - String id, UpdateConnectionProfileRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncConnectionsClient.java deleted file mode 100644 index 872ad5838..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncConnectionsClient.java +++ /dev/null @@ -1,233 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.connections.AsyncClientsClient; -import com.auth0.client.mgmt.connections.AsyncDirectoryProvisioningClient; -import com.auth0.client.mgmt.connections.AsyncKeysClient; -import com.auth0.client.mgmt.connections.AsyncScimConfigurationClient; -import com.auth0.client.mgmt.connections.AsyncUsersClient; -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.types.ConnectionForList; -import com.auth0.client.mgmt.types.CreateConnectionRequestContent; -import com.auth0.client.mgmt.types.CreateConnectionResponseContent; -import com.auth0.client.mgmt.types.GetConnectionRequestParameters; -import com.auth0.client.mgmt.types.GetConnectionResponseContent; -import com.auth0.client.mgmt.types.ListConnectionsQueryParameters; -import com.auth0.client.mgmt.types.UpdateConnectionRequestContent; -import com.auth0.client.mgmt.types.UpdateConnectionResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncConnectionsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawConnectionsClient rawClient; - - protected final Supplier directoryProvisioningClient; - - protected final Supplier clientsClient; - - protected final Supplier keysClient; - - protected final Supplier scimConfigurationClient; - - protected final Supplier usersClient; - - public AsyncConnectionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawConnectionsClient(clientOptions); - this.directoryProvisioningClient = Suppliers.memoize(() -> new AsyncDirectoryProvisioningClient(clientOptions)); - this.clientsClient = Suppliers.memoize(() -> new AsyncClientsClient(clientOptions)); - this.keysClient = Suppliers.memoize(() -> new AsyncKeysClient(clientOptions)); - this.scimConfigurationClient = Suppliers.memoize(() -> new AsyncScimConfigurationClient(clientOptions)); - this.usersClient = Suppliers.memoize(() -> new AsyncUsersClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawConnectionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieves detailed list of all <a href="https://auth0.com/docs/authenticate/identity-providers">connections</a> that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 connections.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieves detailed list of all <a href="https://auth0.com/docs/authenticate/identity-providers">connections</a> that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 connections.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture> list(ListConnectionsQueryParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieves detailed list of all <a href="https://auth0.com/docs/authenticate/identity-providers">connections</a> that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 connections.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture> list( - ListConnectionsQueryParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Creates a new connection according to the JSON object received in <code>body</code>. - *

<b>Note:</b> If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.

- */ - public CompletableFuture create(CreateConnectionRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Creates a new connection according to the JSON object received in <code>body</code>. - *

<b>Note:</b> If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.

- */ - public CompletableFuture create( - CreateConnectionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details for a specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> along with options that can be used for identity provider configuration. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve details for a specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> along with options that can be used for identity provider configuration. - */ - public CompletableFuture get(String id, GetConnectionRequestParameters request) { - return this.rawClient.get(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve details for a specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> along with options that can be used for identity provider configuration. - */ - public CompletableFuture get( - String id, GetConnectionRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Removes a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. - *

<b>Note:</b> If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent <a href="https://auth0.com/docs/api/management/v2/connections/post-connections">create connection</a> requests, if they use an identical connection name.

- */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Removes a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. - *

<b>Note:</b> If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent <a href="https://auth0.com/docs/api/management/v2/connections/post-connections">create connection</a> requests, if they use an identical connection name.

- */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update details for a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a>, including option properties for identity provider configuration. - *

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

- */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update details for a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a>, including option properties for identity provider configuration. - *

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

- */ - public CompletableFuture update( - String id, UpdateConnectionRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update details for a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a>, including option properties for identity provider configuration. - *

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

- */ - public CompletableFuture update( - String id, UpdateConnectionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieves the status of an ad/ldap connection referenced by its <code>ID</code>. <code>200 OK</code> http status code response is returned when the connection is online, otherwise a <code>404</code> status code is returned along with an error message - */ - public CompletableFuture checkStatus(String id) { - return this.rawClient.checkStatus(id).thenApply(response -> response.body()); - } - - /** - * Retrieves the status of an ad/ldap connection referenced by its <code>ID</code>. <code>200 OK</code> http status code response is returned when the connection is online, otherwise a <code>404</code> status code is returned along with an error message - */ - public CompletableFuture checkStatus(String id, RequestOptions requestOptions) { - return this.rawClient.checkStatus(id, requestOptions).thenApply(response -> response.body()); - } - - public AsyncDirectoryProvisioningClient directoryProvisioning() { - return this.directoryProvisioningClient.get(); - } - - public AsyncClientsClient clients() { - return this.clientsClient.get(); - } - - public AsyncKeysClient keys() { - return this.keysClient.get(); - } - - public AsyncScimConfigurationClient scimConfiguration() { - return this.scimConfigurationClient.get(); - } - - public AsyncUsersClient users() { - return this.usersClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncCustomDomainsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncCustomDomainsClient.java deleted file mode 100644 index 9ebe7679c..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncCustomDomainsClient.java +++ /dev/null @@ -1,239 +0,0 @@ -/** - * 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.CreateCustomDomainRequestContent; -import com.auth0.client.mgmt.types.CreateCustomDomainResponseContent; -import com.auth0.client.mgmt.types.CustomDomain; -import com.auth0.client.mgmt.types.GetCustomDomainResponseContent; -import com.auth0.client.mgmt.types.ListCustomDomainsRequestParameters; -import com.auth0.client.mgmt.types.TestCustomDomainResponseContent; -import com.auth0.client.mgmt.types.UpdateCustomDomainRequestContent; -import com.auth0.client.mgmt.types.UpdateCustomDomainResponseContent; -import com.auth0.client.mgmt.types.VerifyCustomDomainResponseContent; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -public class AsyncCustomDomainsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawCustomDomainsClient rawClient; - - public AsyncCustomDomainsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawCustomDomainsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawCustomDomainsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/custom-domains">custom domains</a>. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/custom-domains">custom domains</a>. - */ - public CompletableFuture> list(ListCustomDomainsRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/custom-domains">custom domains</a>. - */ - public CompletableFuture> list( - ListCustomDomainsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a new custom domain. - *

Note: The custom domain will need to be verified before it will accept - * requests.

- *

Optional attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- */ - public CompletableFuture create(CreateCustomDomainRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create a new custom domain. - *

Note: The custom domain will need to be verified before it will accept - * requests.

- *

Optional attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- */ - public CompletableFuture create( - CreateCustomDomainRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve a custom domain configuration and status. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve a custom domain configuration and status. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a custom domain and stop serving requests for it. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete a custom domain and stop serving requests for it. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update a custom domain. - *

These are the attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

<h5>Updating CUSTOM_CLIENT_IP_HEADER for a custom domain</h5>To update the <code>custom_client_ip_header</code> for a domain, the body to - * send should be: - * <pre><code>{ "custom_client_ip_header": "cf-connecting-ip" }</code></pre>

- *

<h5>Updating TLS_POLICY for a custom domain</h5>To update the <code>tls_policy</code> for a domain, the body to send should be: - * <pre><code>{ "tls_policy": "recommended" }</code></pre>

- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- *

Some considerations:

- *
    - *
  • The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally.
  • - *
  • The <code>compatible</code> TLS policy is no longer supported.
  • - *
- */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update a custom domain. - *

These are the attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

<h5>Updating CUSTOM_CLIENT_IP_HEADER for a custom domain</h5>To update the <code>custom_client_ip_header</code> for a domain, the body to - * send should be: - * <pre><code>{ "custom_client_ip_header": "cf-connecting-ip" }</code></pre>

- *

<h5>Updating TLS_POLICY for a custom domain</h5>To update the <code>tls_policy</code> for a domain, the body to send should be: - * <pre><code>{ "tls_policy": "recommended" }</code></pre>

- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- *

Some considerations:

- *
    - *
  • The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally.
  • - *
  • The <code>compatible</code> TLS policy is no longer supported.
  • - *
- */ - public CompletableFuture update( - String id, UpdateCustomDomainRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update a custom domain. - *

These are the attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

<h5>Updating CUSTOM_CLIENT_IP_HEADER for a custom domain</h5>To update the <code>custom_client_ip_header</code> for a domain, the body to - * send should be: - * <pre><code>{ "custom_client_ip_header": "cf-connecting-ip" }</code></pre>

- *

<h5>Updating TLS_POLICY for a custom domain</h5>To update the <code>tls_policy</code> for a domain, the body to send should be: - * <pre><code>{ "tls_policy": "recommended" }</code></pre>

- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- *

Some considerations:

- *
    - *
  • The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally.
  • - *
  • The <code>compatible</code> TLS policy is no longer supported.
  • - *
- */ - public CompletableFuture update( - String id, UpdateCustomDomainRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Run the test process on a custom domain. - */ - public CompletableFuture test(String id) { - return this.rawClient.test(id).thenApply(response -> response.body()); - } - - /** - * Run the test process on a custom domain. - */ - public CompletableFuture test(String id, RequestOptions requestOptions) { - return this.rawClient.test(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Run the verification process on a custom domain. - *

Note: Check the <code>status</code> field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests.

- *

For <code>self_managed_certs</code>, when the custom domain is verified for the first time, the response will also include the <code>cname_api_key</code> which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests.

- *

<a href="https://auth0.com/docs/custom-domains#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Auth0 Managed certificates. - * <a href="https://auth0.com/docs/custom-domains/self-managed-certificates#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Self Managed certificates.

- */ - public CompletableFuture verify(String id) { - return this.rawClient.verify(id).thenApply(response -> response.body()); - } - - /** - * Run the verification process on a custom domain. - *

Note: Check the <code>status</code> field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests.

- *

For <code>self_managed_certs</code>, when the custom domain is verified for the first time, the response will also include the <code>cname_api_key</code> which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests.

- *

<a href="https://auth0.com/docs/custom-domains#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Auth0 Managed certificates. - * <a href="https://auth0.com/docs/custom-domains/self-managed-certificates#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Self Managed certificates.

- */ - public CompletableFuture verify(String id, RequestOptions requestOptions) { - return this.rawClient.verify(id, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncDeviceCredentialsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncDeviceCredentialsClient.java deleted file mode 100644 index 42608db48..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncDeviceCredentialsClient.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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.CreatePublicKeyDeviceCredentialRequestContent; -import com.auth0.client.mgmt.types.CreatePublicKeyDeviceCredentialResponseContent; -import com.auth0.client.mgmt.types.DeviceCredential; -import com.auth0.client.mgmt.types.ListDeviceCredentialsRequestParameters; -import java.util.concurrent.CompletableFuture; - -public class AsyncDeviceCredentialsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawDeviceCredentialsClient rawClient; - - public AsyncDeviceCredentialsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawDeviceCredentialsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawDeviceCredentialsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve device credential information (<code>public_key</code>, <code>refresh_token</code>, or <code>rotating_refresh_token</code>) associated with a specific user. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve device credential information (<code>public_key</code>, <code>refresh_token</code>, or <code>rotating_refresh_token</code>) associated with a specific user. - */ - public CompletableFuture> list( - ListDeviceCredentialsRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve device credential information (<code>public_key</code>, <code>refresh_token</code>, or <code>rotating_refresh_token</code>) associated with a specific user. - */ - public CompletableFuture> list( - ListDeviceCredentialsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a device credential public key to manage refresh token rotation for a given <code>user_id</code>. Device Credentials APIs are designed for ad-hoc administrative use only and paging is by default enabled for GET requests. - *

When refresh token rotation is enabled, the endpoint becomes consistent. For more information, read <a href="https://auth0.com/docs/get-started/tenant-settings/signing-keys"> Signing Keys</a>.

- */ - public CompletableFuture createPublicKey( - CreatePublicKeyDeviceCredentialRequestContent request) { - return this.rawClient.createPublicKey(request).thenApply(response -> response.body()); - } - - /** - * Create a device credential public key to manage refresh token rotation for a given <code>user_id</code>. Device Credentials APIs are designed for ad-hoc administrative use only and paging is by default enabled for GET requests. - *

When refresh token rotation is enabled, the endpoint becomes consistent. For more information, read <a href="https://auth0.com/docs/get-started/tenant-settings/signing-keys"> Signing Keys</a>.

- */ - public CompletableFuture createPublicKey( - CreatePublicKeyDeviceCredentialRequestContent request, RequestOptions requestOptions) { - return this.rawClient.createPublicKey(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Permanently delete a device credential (such as a refresh token or public key) with the given ID. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Permanently delete a device credential (such as a refresh token or public key) with the given ID. - */ - 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/AsyncEmailTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncEmailTemplatesClient.java deleted file mode 100644 index 7fbcf2397..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncEmailTemplatesClient.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * 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.CreateEmailTemplateRequestContent; -import com.auth0.client.mgmt.types.CreateEmailTemplateResponseContent; -import com.auth0.client.mgmt.types.EmailTemplateNameEnum; -import com.auth0.client.mgmt.types.GetEmailTemplateResponseContent; -import com.auth0.client.mgmt.types.SetEmailTemplateRequestContent; -import com.auth0.client.mgmt.types.SetEmailTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateEmailTemplateRequestContent; -import com.auth0.client.mgmt.types.UpdateEmailTemplateResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncEmailTemplatesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawEmailTemplatesClient rawClient; - - public AsyncEmailTemplatesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawEmailTemplatesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawEmailTemplatesClient withRawResponse() { - return this.rawClient; - } - - /** - * Create an email template. - */ - public CompletableFuture create(CreateEmailTemplateRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create an email template. - */ - public CompletableFuture create( - CreateEmailTemplateRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. - */ - public CompletableFuture get(EmailTemplateNameEnum templateName) { - return this.rawClient.get(templateName).thenApply(response -> response.body()); - } - - /** - * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. - */ - public CompletableFuture get( - EmailTemplateNameEnum templateName, RequestOptions requestOptions) { - return this.rawClient.get(templateName, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update an email template. - */ - public CompletableFuture set( - EmailTemplateNameEnum templateName, SetEmailTemplateRequestContent request) { - return this.rawClient.set(templateName, request).thenApply(response -> response.body()); - } - - /** - * Update an email template. - */ - public CompletableFuture set( - EmailTemplateNameEnum templateName, SetEmailTemplateRequestContent request, RequestOptions requestOptions) { - return this.rawClient.set(templateName, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Modify an email template. - */ - public CompletableFuture update(EmailTemplateNameEnum templateName) { - return this.rawClient.update(templateName).thenApply(response -> response.body()); - } - - /** - * Modify an email template. - */ - public CompletableFuture update( - EmailTemplateNameEnum templateName, UpdateEmailTemplateRequestContent request) { - return this.rawClient.update(templateName, request).thenApply(response -> response.body()); - } - - /** - * Modify an email template. - */ - public CompletableFuture update( - EmailTemplateNameEnum templateName, - UpdateEmailTemplateRequestContent request, - RequestOptions requestOptions) { - return this.rawClient.update(templateName, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncEventStreamsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncEventStreamsClient.java deleted file mode 100644 index bf26909a0..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncEventStreamsClient.java +++ /dev/null @@ -1,117 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -import com.auth0.client.mgmt.eventstreams.AsyncDeliveriesClient; -import com.auth0.client.mgmt.eventstreams.AsyncRedeliveriesClient; -import com.auth0.client.mgmt.types.CreateEventStreamResponseContent; -import com.auth0.client.mgmt.types.CreateEventStreamTestEventRequestContent; -import com.auth0.client.mgmt.types.CreateEventStreamTestEventResponseContent; -import com.auth0.client.mgmt.types.EventStreamResponseContent; -import com.auth0.client.mgmt.types.EventStreamsCreateRequest; -import com.auth0.client.mgmt.types.GetEventStreamResponseContent; -import com.auth0.client.mgmt.types.ListEventStreamsRequestParameters; -import com.auth0.client.mgmt.types.UpdateEventStreamRequestContent; -import com.auth0.client.mgmt.types.UpdateEventStreamResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncEventStreamsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawEventStreamsClient rawClient; - - protected final Supplier deliveriesClient; - - protected final Supplier redeliveriesClient; - - public AsyncEventStreamsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawEventStreamsClient(clientOptions); - this.deliveriesClient = Suppliers.memoize(() -> new AsyncDeliveriesClient(clientOptions)); - this.redeliveriesClient = Suppliers.memoize(() -> new AsyncRedeliveriesClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawEventStreamsClient withRawResponse() { - return this.rawClient; - } - - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - public CompletableFuture> list( - ListEventStreamsRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - public CompletableFuture> list( - ListEventStreamsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture create(EventStreamsCreateRequest request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - public CompletableFuture create( - EventStreamsCreateRequest 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, UpdateEventStreamRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture update( - String id, UpdateEventStreamRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture test( - String id, CreateEventStreamTestEventRequestContent request) { - return this.rawClient.test(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture test( - String id, CreateEventStreamTestEventRequestContent request, RequestOptions requestOptions) { - return this.rawClient.test(id, request, requestOptions).thenApply(response -> response.body()); - } - - public AsyncDeliveriesClient deliveries() { - return this.deliveriesClient.get(); - } - - public AsyncRedeliveriesClient redeliveries() { - return this.redeliveriesClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncFlowsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncFlowsClient.java deleted file mode 100644 index b62fccf64..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncFlowsClient.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -import com.auth0.client.mgmt.flows.AsyncExecutionsClient; -import com.auth0.client.mgmt.flows.vault.AsyncVaultClient; -import com.auth0.client.mgmt.types.CreateFlowRequestContent; -import com.auth0.client.mgmt.types.CreateFlowResponseContent; -import com.auth0.client.mgmt.types.FlowSummary; -import com.auth0.client.mgmt.types.GetFlowRequestParameters; -import com.auth0.client.mgmt.types.GetFlowResponseContent; -import com.auth0.client.mgmt.types.ListFlowsRequestParameters; -import com.auth0.client.mgmt.types.UpdateFlowRequestContent; -import com.auth0.client.mgmt.types.UpdateFlowResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncFlowsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawFlowsClient rawClient; - - protected final Supplier executionsClient; - - protected final Supplier vaultClient; - - public AsyncFlowsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawFlowsClient(clientOptions); - this.executionsClient = Suppliers.memoize(() -> new AsyncExecutionsClient(clientOptions)); - this.vaultClient = Suppliers.memoize(() -> new AsyncVaultClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawFlowsClient withRawResponse() { - return this.rawClient; - } - - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - public CompletableFuture> list(ListFlowsRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - public CompletableFuture> list( - ListFlowsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture create(CreateFlowRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - public CompletableFuture create( - CreateFlowRequestContent 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, GetFlowRequestParameters request) { - return this.rawClient.get(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture get( - String id, GetFlowRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, 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, UpdateFlowRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture update( - String id, UpdateFlowRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - public AsyncExecutionsClient executions() { - return this.executionsClient.get(); - } - - public AsyncVaultClient vault() { - return this.vaultClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncFormsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncFormsClient.java deleted file mode 100644 index 5a99a34d4..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncFormsClient.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * 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.CreateFormRequestContent; -import com.auth0.client.mgmt.types.CreateFormResponseContent; -import com.auth0.client.mgmt.types.FormSummary; -import com.auth0.client.mgmt.types.GetFormRequestParameters; -import com.auth0.client.mgmt.types.GetFormResponseContent; -import com.auth0.client.mgmt.types.ListFormsRequestParameters; -import com.auth0.client.mgmt.types.UpdateFormRequestContent; -import com.auth0.client.mgmt.types.UpdateFormResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncFormsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawFormsClient rawClient; - - public AsyncFormsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawFormsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawFormsClient withRawResponse() { - return this.rawClient; - } - - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - public CompletableFuture> list(ListFormsRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - public CompletableFuture> list( - ListFormsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture create(CreateFormRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - public CompletableFuture create( - CreateFormRequestContent 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, GetFormRequestParameters request) { - return this.rawClient.get(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture get( - String id, GetFormRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, 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, UpdateFormRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture update( - String id, UpdateFormRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncGroupsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncGroupsClient.java deleted file mode 100644 index 4876e6440..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncGroupsClient.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -import com.auth0.client.mgmt.groups.AsyncMembersClient; -import com.auth0.client.mgmt.types.GetGroupResponseContent; -import com.auth0.client.mgmt.types.Group; -import com.auth0.client.mgmt.types.ListGroupsRequestParameters; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncGroupsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawGroupsClient rawClient; - - protected final Supplier membersClient; - - public AsyncGroupsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawGroupsClient(clientOptions); - this.membersClient = Suppliers.memoize(() -> new AsyncMembersClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawGroupsClient withRawResponse() { - return this.rawClient; - } - - /** - * List all groups in your tenant. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * List all groups in your tenant. - */ - public CompletableFuture> list(ListGroupsRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * List all groups in your tenant. - */ - public CompletableFuture> list( - ListGroupsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve a group by its ID. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve a group by its ID. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - public AsyncMembersClient members() { - return this.membersClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncHooksClient.java b/src/main/java/com/auth0/client/mgmt/AsyncHooksClient.java deleted file mode 100644 index 10589d7bc..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncHooksClient.java +++ /dev/null @@ -1,140 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -import com.auth0.client.mgmt.hooks.AsyncSecretsClient; -import com.auth0.client.mgmt.types.CreateHookRequestContent; -import com.auth0.client.mgmt.types.CreateHookResponseContent; -import com.auth0.client.mgmt.types.GetHookRequestParameters; -import com.auth0.client.mgmt.types.GetHookResponseContent; -import com.auth0.client.mgmt.types.Hook; -import com.auth0.client.mgmt.types.ListHooksRequestParameters; -import com.auth0.client.mgmt.types.UpdateHookRequestContent; -import com.auth0.client.mgmt.types.UpdateHookResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncHooksClient { - protected final ClientOptions clientOptions; - - private final AsyncRawHooksClient rawClient; - - protected final Supplier secretsClient; - - public AsyncHooksClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawHooksClient(clientOptions); - this.secretsClient = Suppliers.memoize(() -> new AsyncSecretsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawHooksClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve all <a href="https://auth0.com/docs/hooks">hooks</a>. Accepts a list of fields to include or exclude in the result. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve all <a href="https://auth0.com/docs/hooks">hooks</a>. Accepts a list of fields to include or exclude in the result. - */ - public CompletableFuture> list(ListHooksRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve all <a href="https://auth0.com/docs/hooks">hooks</a>. Accepts a list of fields to include or exclude in the result. - */ - public CompletableFuture> list( - ListHooksRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a new hook. - */ - public CompletableFuture create(CreateHookRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create a new hook. - */ - public CompletableFuture create( - CreateHookRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/hooks">a hook</a> by its ID. Accepts a list of fields to include in the result. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/hooks">a hook</a> by its ID. Accepts a list of fields to include in the result. - */ - public CompletableFuture get(String id, GetHookRequestParameters request) { - return this.rawClient.get(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/hooks">a hook</a> by its ID. Accepts a list of fields to include in the result. - */ - public CompletableFuture get( - String id, GetHookRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a hook. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete a hook. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update an existing hook. - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update an existing hook. - */ - public CompletableFuture update(String id, UpdateHookRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update an existing hook. - */ - public CompletableFuture update( - String id, UpdateHookRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - public AsyncSecretsClient secrets() { - return this.secretsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncJobsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncJobsClient.java deleted file mode 100644 index 8f6728f9a..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncJobsClient.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * 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.jobs.AsyncErrorsClient; -import com.auth0.client.mgmt.jobs.AsyncUsersExportsClient; -import com.auth0.client.mgmt.jobs.AsyncUsersImportsClient; -import com.auth0.client.mgmt.jobs.AsyncVerificationEmailClient; -import com.auth0.client.mgmt.types.GetJobResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncJobsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawJobsClient rawClient; - - protected final Supplier usersExportsClient; - - protected final Supplier usersImportsClient; - - protected final Supplier verificationEmailClient; - - protected final Supplier errorsClient; - - public AsyncJobsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawJobsClient(clientOptions); - this.usersExportsClient = Suppliers.memoize(() -> new AsyncUsersExportsClient(clientOptions)); - this.usersImportsClient = Suppliers.memoize(() -> new AsyncUsersImportsClient(clientOptions)); - this.verificationEmailClient = Suppliers.memoize(() -> new AsyncVerificationEmailClient(clientOptions)); - this.errorsClient = Suppliers.memoize(() -> new AsyncErrorsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawJobsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieves a job. Useful to check its status. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieves a job. Useful to check its status. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - public AsyncUsersExportsClient usersExports() { - return this.usersExportsClient.get(); - } - - public AsyncUsersImportsClient usersImports() { - return this.usersImportsClient.get(); - } - - public AsyncVerificationEmailClient verificationEmail() { - return this.verificationEmailClient.get(); - } - - public AsyncErrorsClient errors() { - return this.errorsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncLogStreamsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncLogStreamsClient.java deleted file mode 100644 index 529385924..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncLogStreamsClient.java +++ /dev/null @@ -1,792 +0,0 @@ -/** - * 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.CreateLogStreamRequestContent; -import com.auth0.client.mgmt.types.CreateLogStreamResponseContent; -import com.auth0.client.mgmt.types.GetLogStreamResponseContent; -import com.auth0.client.mgmt.types.LogStreamResponseSchema; -import com.auth0.client.mgmt.types.UpdateLogStreamRequestContent; -import com.auth0.client.mgmt.types.UpdateLogStreamResponseContent; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -public class AsyncLogStreamsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawLogStreamsClient rawClient; - - public AsyncLogStreamsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawLogStreamsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawLogStreamsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/logs/streams">log streams</a>. - *

<h5>Sample Response</h5><pre><code>[{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active|paused|suspended", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }, { - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active|paused|suspended", - * "sink": { - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpContentType": "string", - * "httpEndpoint": "string", - * "httpAuthorization": "string" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "eventgrid", - * "status": "active|paused|suspended", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string", - * "azurePartnerTopic": "string" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active|paused|suspended", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active|paused|suspended", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active|paused|suspended", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }]</code></pre>

- */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/logs/streams">log streams</a>. - *

<h5>Sample Response</h5><pre><code>[{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active|paused|suspended", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }, { - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active|paused|suspended", - * "sink": { - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpContentType": "string", - * "httpEndpoint": "string", - * "httpAuthorization": "string" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "eventgrid", - * "status": "active|paused|suspended", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string", - * "azurePartnerTopic": "string" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active|paused|suspended", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active|paused|suspended", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active|paused|suspended", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }]</code></pre>

- */ - public CompletableFuture> list(RequestOptions requestOptions) { - return this.rawClient.list(requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a log stream. - *

<h5>Log Stream Types</h5> The <code>type</code> of log stream being created determines the properties required in the <code>sink</code> payload. - * <h5>HTTP Stream</h5> For an <code>http</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "http", - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpAuthorization": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active", - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Amazon EventBridge Stream</h5> For an <code>eventbridge</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "eventbridge", - * "sink": { - * "awsRegion": "string", - * "awsAccountId": "string" - * } - * }</code></pre> - * The response will include an additional field <code>awsPartnerEventSource</code> in the <code>sink</code>: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }</code></pre> - * <h5>Azure Event Grid Stream</h5> For an <code>Azure Event Grid</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "eventgrid", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string", - * "azurePartnerTopic": "string" - * } - * }</code></pre> - * <h5>Datadog Stream</h5> For a <code>Datadog</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "datadog", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Splunk Stream</h5> For a <code>Splunk</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "splunk", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Sumo Logic Stream</h5> For a <code>Sumo Logic</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "sumo", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre>

- */ - public CompletableFuture create(CreateLogStreamRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create a log stream. - *

<h5>Log Stream Types</h5> The <code>type</code> of log stream being created determines the properties required in the <code>sink</code> payload. - * <h5>HTTP Stream</h5> For an <code>http</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "http", - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpAuthorization": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active", - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Amazon EventBridge Stream</h5> For an <code>eventbridge</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "eventbridge", - * "sink": { - * "awsRegion": "string", - * "awsAccountId": "string" - * } - * }</code></pre> - * The response will include an additional field <code>awsPartnerEventSource</code> in the <code>sink</code>: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }</code></pre> - * <h5>Azure Event Grid Stream</h5> For an <code>Azure Event Grid</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "eventgrid", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string", - * "azurePartnerTopic": "string" - * } - * }</code></pre> - * <h5>Datadog Stream</h5> For a <code>Datadog</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "datadog", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Splunk Stream</h5> For a <code>Splunk</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "splunk", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Sumo Logic Stream</h5> For a <code>Sumo Logic</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "sumo", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre>

- */ - public CompletableFuture create( - CreateLogStreamRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve a log stream configuration and status. - *

<h5>Sample responses</h5><h5>Amazon EventBridge Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active|paused|suspended", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }</code></pre> <h5>HTTP Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active|paused|suspended", - * "sink": { - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpContentType": "string", - * "httpEndpoint": "string", - * "httpAuthorization": "string" - * } - * }</code></pre> <h5>Datadog Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active|paused|suspended", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * }

- *

}</code></pre><h5>Mixpanel</h5>

- *
Request: <pre><code>{
-     *   "name": "string",
-     *   "type": "mixpanel",
-     *   "sink": {
-     * 	"mixpanelRegion": "string", // "us" | "eu",
-     * 	"mixpanelProjectId": "string",
-     * 	"mixpanelServiceAccountUsername": "string",
-     * 	"mixpanelServiceAccountPassword": "string"
-     *   }
-     * } </code></pre>
-     *
-     *
-     * Response: <pre><code>{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "mixpanel",
-     * 	"status": "active",
-     * 	"sink": {
-     * 	  "mixpanelRegion": "string", // "us" | "eu",
-     * 	  "mixpanelProjectId": "string",
-     * 	  "mixpanelServiceAccountUsername": "string",
-     * 	  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-     * 	}
-     *   } </code></pre>
-     *
-     * <h5>Segment</h5>
-     *
-     * Request: <pre><code> {
-     *   "name": "string",
-     *   "type": "segment",
-     *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * }</code></pre>
-     *
-     * Response: <pre><code>{
-     *   "id": "string",
-     *   "name": "string",
-     *   "type": "segment",
-     *   "status": "active",
-     *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * } </code></pre>
-     * 
- *

<h5>Splunk Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active|paused|suspended", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> <h5>Sumo Logic Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active|paused|suspended", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre> <h5>Status</h5> The <code>status</code> of a log stream maybe any of the following: - * 1. <code>active</code> - Stream is currently enabled. - * 2. <code>paused</code> - Stream is currently user disabled and will not attempt log delivery. - * 3. <code>suspended</code> - Stream is currently disabled because of errors and will not attempt log delivery.

- */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve a log stream configuration and status. - *

<h5>Sample responses</h5><h5>Amazon EventBridge Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active|paused|suspended", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }</code></pre> <h5>HTTP Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active|paused|suspended", - * "sink": { - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpContentType": "string", - * "httpEndpoint": "string", - * "httpAuthorization": "string" - * } - * }</code></pre> <h5>Datadog Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active|paused|suspended", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * }

- *

}</code></pre><h5>Mixpanel</h5>

- *
Request: <pre><code>{
-     *   "name": "string",
-     *   "type": "mixpanel",
-     *   "sink": {
-     * 	"mixpanelRegion": "string", // "us" | "eu",
-     * 	"mixpanelProjectId": "string",
-     * 	"mixpanelServiceAccountUsername": "string",
-     * 	"mixpanelServiceAccountPassword": "string"
-     *   }
-     * } </code></pre>
-     *
-     *
-     * Response: <pre><code>{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "mixpanel",
-     * 	"status": "active",
-     * 	"sink": {
-     * 	  "mixpanelRegion": "string", // "us" | "eu",
-     * 	  "mixpanelProjectId": "string",
-     * 	  "mixpanelServiceAccountUsername": "string",
-     * 	  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-     * 	}
-     *   } </code></pre>
-     *
-     * <h5>Segment</h5>
-     *
-     * Request: <pre><code> {
-     *   "name": "string",
-     *   "type": "segment",
-     *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * }</code></pre>
-     *
-     * Response: <pre><code>{
-     *   "id": "string",
-     *   "name": "string",
-     *   "type": "segment",
-     *   "status": "active",
-     *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * } </code></pre>
-     * 
- *

<h5>Splunk Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active|paused|suspended", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> <h5>Sumo Logic Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active|paused|suspended", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre> <h5>Status</h5> The <code>status</code> of a log stream maybe any of the following: - * 1. <code>active</code> - Stream is currently enabled. - * 2. <code>paused</code> - Stream is currently user disabled and will not attempt log delivery. - * 3. <code>suspended</code> - Stream is currently disabled because of errors and will not attempt log delivery.

- */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a log stream. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete a log stream. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update a log stream. - *

<h4>Examples of how to use the PATCH endpoint.</h4> The following fields may be updated in a PATCH operation: <ul><li>name</li><li>status</li><li>sink</li></ul> Note: For log streams of type <code>eventbridge</code> and <code>eventgrid</code>, updating the <code>sink</code> is not permitted. - * <h5>Update the status of a log stream</h5><pre><code>{ - * "status": "active|paused" - * }</code></pre> - * <h5>Update the name of a log stream</h5><pre><code>{ - * "name": "string" - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>http</code></h5><pre><code>{ - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONARRAY|JSONLINES", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>datadog</code></h5><pre><code>{ - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>splunk</code></h5><pre><code>{ - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>sumo</code></h5><pre><code>{ - * "sink": { - * "sumoSourceAddress": "string" - * } - * }</code></pre>

- */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update a log stream. - *

<h4>Examples of how to use the PATCH endpoint.</h4> The following fields may be updated in a PATCH operation: <ul><li>name</li><li>status</li><li>sink</li></ul> Note: For log streams of type <code>eventbridge</code> and <code>eventgrid</code>, updating the <code>sink</code> is not permitted. - * <h5>Update the status of a log stream</h5><pre><code>{ - * "status": "active|paused" - * }</code></pre> - * <h5>Update the name of a log stream</h5><pre><code>{ - * "name": "string" - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>http</code></h5><pre><code>{ - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONARRAY|JSONLINES", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>datadog</code></h5><pre><code>{ - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>splunk</code></h5><pre><code>{ - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>sumo</code></h5><pre><code>{ - * "sink": { - * "sumoSourceAddress": "string" - * } - * }</code></pre>

- */ - public CompletableFuture update(String id, UpdateLogStreamRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update a log stream. - *

<h4>Examples of how to use the PATCH endpoint.</h4> The following fields may be updated in a PATCH operation: <ul><li>name</li><li>status</li><li>sink</li></ul> Note: For log streams of type <code>eventbridge</code> and <code>eventgrid</code>, updating the <code>sink</code> is not permitted. - * <h5>Update the status of a log stream</h5><pre><code>{ - * "status": "active|paused" - * }</code></pre> - * <h5>Update the name of a log stream</h5><pre><code>{ - * "name": "string" - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>http</code></h5><pre><code>{ - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONARRAY|JSONLINES", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>datadog</code></h5><pre><code>{ - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>splunk</code></h5><pre><code>{ - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>sumo</code></h5><pre><code>{ - * "sink": { - * "sumoSourceAddress": "string" - * } - * }</code></pre>

- */ - public CompletableFuture update( - String id, UpdateLogStreamRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncLogsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncLogsClient.java deleted file mode 100644 index ba75398c9..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncLogsClient.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * 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.GetLogResponseContent; -import com.auth0.client.mgmt.types.ListLogsRequestParameters; -import com.auth0.client.mgmt.types.Log; -import java.util.concurrent.CompletableFuture; - -public class AsyncLogsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawLogsClient rawClient; - - public AsyncLogsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawLogsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawLogsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve log entries that match the specified search criteria (or all log entries if no criteria specified). - *

Set custom search criteria using the <code>q</code> parameter, or search from a specific log ID (<i>"search from checkpoint"</i>).

- *

For more information on all possible event types, their respective acronyms, and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

<h5>To set custom search criteria, use the following parameters:</h5>

- *

<ul> - * <li><b>q:</b> Search Criteria using <a href="https://auth0.com/docs/logs/log-search-query-syntax">Query String Syntax</a></li> - * <li><b>page:</b> Page index of the results to return. First page is 0.</li> - * <li><b>per_page:</b> Number of results per page.</li> - * <li><b>sort:</b> Field to use for sorting appended with `:1` for ascending and `:-1` for descending. e.g. `date:-1`</li> - * <li><b>fields:</b> Comma-separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields.</li> - * <li><b>include_fields:</b> Whether specified fields are to be included (true) or excluded (false).</li> - * <li><b>include_totals:</b> Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). <b>Deprecated:</b> this field is deprecated and should be removed from use. See <a href="https://auth0.com/docs/product-lifecycle/deprecations-and-migrations/migrate-to-tenant-log-search-v3#pagination">Search Engine V3 Breaking Changes</a></li> - * </ul>

- *

For more information on the list of fields that can be used in <code>fields</code> and <code>sort</code>, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may paginate only through 1,000 search results. If you exceed this threshold, please redefine your search or use the <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#retrieve-logs-by-checkpoint">get logs by checkpoint method</a>.

- *

<h5>To search from a checkpoint log ID, use the following parameters:</h5> - * <ul> - * <li><b>from:</b> Log Event ID from which to start retrieving logs. You can limit the number of logs returned using the <code>take</code> parameter. If you use <code>from</code> at the same time as <code>q</code>, <code>from</code> takes precedence and <code>q</code> is ignored.</li> - * <li><b>take:</b> Number of entries to retrieve when using the <code>from</code> parameter.</li> - * </ul>

- *

<strong>Important:</strong> When fetching logs from a checkpoint log ID, any parameter other than <code>from</code> and <code>take</code> will be ignored, and date ordering is not guaranteed.

- */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve log entries that match the specified search criteria (or all log entries if no criteria specified). - *

Set custom search criteria using the <code>q</code> parameter, or search from a specific log ID (<i>"search from checkpoint"</i>).

- *

For more information on all possible event types, their respective acronyms, and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

<h5>To set custom search criteria, use the following parameters:</h5>

- *

<ul> - * <li><b>q:</b> Search Criteria using <a href="https://auth0.com/docs/logs/log-search-query-syntax">Query String Syntax</a></li> - * <li><b>page:</b> Page index of the results to return. First page is 0.</li> - * <li><b>per_page:</b> Number of results per page.</li> - * <li><b>sort:</b> Field to use for sorting appended with `:1` for ascending and `:-1` for descending. e.g. `date:-1`</li> - * <li><b>fields:</b> Comma-separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields.</li> - * <li><b>include_fields:</b> Whether specified fields are to be included (true) or excluded (false).</li> - * <li><b>include_totals:</b> Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). <b>Deprecated:</b> this field is deprecated and should be removed from use. See <a href="https://auth0.com/docs/product-lifecycle/deprecations-and-migrations/migrate-to-tenant-log-search-v3#pagination">Search Engine V3 Breaking Changes</a></li> - * </ul>

- *

For more information on the list of fields that can be used in <code>fields</code> and <code>sort</code>, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may paginate only through 1,000 search results. If you exceed this threshold, please redefine your search or use the <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#retrieve-logs-by-checkpoint">get logs by checkpoint method</a>.

- *

<h5>To search from a checkpoint log ID, use the following parameters:</h5> - * <ul> - * <li><b>from:</b> Log Event ID from which to start retrieving logs. You can limit the number of logs returned using the <code>take</code> parameter. If you use <code>from</code> at the same time as <code>q</code>, <code>from</code> takes precedence and <code>q</code> is ignored.</li> - * <li><b>take:</b> Number of entries to retrieve when using the <code>from</code> parameter.</li> - * </ul>

- *

<strong>Important:</strong> When fetching logs from a checkpoint log ID, any parameter other than <code>from</code> and <code>take</code> will be ignored, and date ordering is not guaranteed.

- */ - public CompletableFuture> list(ListLogsRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve log entries that match the specified search criteria (or all log entries if no criteria specified). - *

Set custom search criteria using the <code>q</code> parameter, or search from a specific log ID (<i>"search from checkpoint"</i>).

- *

For more information on all possible event types, their respective acronyms, and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

<h5>To set custom search criteria, use the following parameters:</h5>

- *

<ul> - * <li><b>q:</b> Search Criteria using <a href="https://auth0.com/docs/logs/log-search-query-syntax">Query String Syntax</a></li> - * <li><b>page:</b> Page index of the results to return. First page is 0.</li> - * <li><b>per_page:</b> Number of results per page.</li> - * <li><b>sort:</b> Field to use for sorting appended with `:1` for ascending and `:-1` for descending. e.g. `date:-1`</li> - * <li><b>fields:</b> Comma-separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields.</li> - * <li><b>include_fields:</b> Whether specified fields are to be included (true) or excluded (false).</li> - * <li><b>include_totals:</b> Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). <b>Deprecated:</b> this field is deprecated and should be removed from use. See <a href="https://auth0.com/docs/product-lifecycle/deprecations-and-migrations/migrate-to-tenant-log-search-v3#pagination">Search Engine V3 Breaking Changes</a></li> - * </ul>

- *

For more information on the list of fields that can be used in <code>fields</code> and <code>sort</code>, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may paginate only through 1,000 search results. If you exceed this threshold, please redefine your search or use the <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#retrieve-logs-by-checkpoint">get logs by checkpoint method</a>.

- *

<h5>To search from a checkpoint log ID, use the following parameters:</h5> - * <ul> - * <li><b>from:</b> Log Event ID from which to start retrieving logs. You can limit the number of logs returned using the <code>take</code> parameter. If you use <code>from</code> at the same time as <code>q</code>, <code>from</code> takes precedence and <code>q</code> is ignored.</li> - * <li><b>take:</b> Number of entries to retrieve when using the <code>from</code> parameter.</li> - * </ul>

- *

<strong>Important:</strong> When fetching logs from a checkpoint log ID, any parameter other than <code>from</code> and <code>take</code> will be ignored, and date ordering is not guaranteed.

- */ - public CompletableFuture> list( - ListLogsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve an individual log event. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve an individual log event. - */ - 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/AsyncManagementApi.java b/src/main/java/com/auth0/client/mgmt/AsyncManagementApi.java deleted file mode 100644 index eb0f4e9e9..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncManagementApi.java +++ /dev/null @@ -1,329 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.anomaly.AsyncAnomalyClient; -import com.auth0.client.mgmt.attackprotection.AsyncAttackProtectionClient; -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.keys.AsyncKeysClient; -import com.auth0.client.mgmt.riskassessments.AsyncRiskAssessmentsClient; -import com.auth0.client.mgmt.tenants.AsyncTenantsClient; -import com.auth0.client.mgmt.verifiablecredentials.AsyncVerifiableCredentialsClient; -import java.util.function.Supplier; - -public class AsyncManagementApi { - protected final ClientOptions clientOptions; - - protected final Supplier actionsClient; - - protected final Supplier brandingClient; - - protected final Supplier clientGrantsClient; - - protected final Supplier clientsClient; - - protected final Supplier connectionProfilesClient; - - protected final Supplier connectionsClient; - - protected final Supplier customDomainsClient; - - protected final Supplier deviceCredentialsClient; - - protected final Supplier emailTemplatesClient; - - protected final Supplier eventStreamsClient; - - protected final Supplier flowsClient; - - protected final Supplier formsClient; - - protected final Supplier userGrantsClient; - - protected final Supplier groupsClient; - - protected final Supplier hooksClient; - - protected final Supplier jobsClient; - - protected final Supplier logStreamsClient; - - protected final Supplier logsClient; - - protected final Supplier networkAclsClient; - - protected final Supplier organizationsClient; - - protected final Supplier promptsClient; - - protected final Supplier refreshTokensClient; - - protected final Supplier resourceServersClient; - - protected final Supplier rolesClient; - - protected final Supplier rulesClient; - - protected final Supplier rulesConfigsClient; - - protected final Supplier selfServiceProfilesClient; - - protected final Supplier sessionsClient; - - protected final Supplier statsClient; - - protected final Supplier supplementalSignalsClient; - - protected final Supplier ticketsClient; - - protected final Supplier tokenExchangeProfilesClient; - - protected final Supplier userAttributeProfilesClient; - - protected final Supplier userBlocksClient; - - protected final Supplier usersClient; - - protected final Supplier anomalyClient; - - protected final Supplier attackProtectionClient; - - protected final Supplier emailsClient; - - protected final Supplier guardianClient; - - protected final Supplier keysClient; - - protected final Supplier riskAssessmentsClient; - - protected final Supplier tenantsClient; - - protected final Supplier verifiableCredentialsClient; - - public AsyncManagementApi(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.actionsClient = Suppliers.memoize(() -> new AsyncActionsClient(clientOptions)); - this.brandingClient = Suppliers.memoize(() -> new AsyncBrandingClient(clientOptions)); - this.clientGrantsClient = Suppliers.memoize(() -> new AsyncClientGrantsClient(clientOptions)); - this.clientsClient = Suppliers.memoize(() -> new AsyncClientsClient(clientOptions)); - this.connectionProfilesClient = Suppliers.memoize(() -> new AsyncConnectionProfilesClient(clientOptions)); - this.connectionsClient = Suppliers.memoize(() -> new AsyncConnectionsClient(clientOptions)); - this.customDomainsClient = Suppliers.memoize(() -> new AsyncCustomDomainsClient(clientOptions)); - this.deviceCredentialsClient = Suppliers.memoize(() -> new AsyncDeviceCredentialsClient(clientOptions)); - this.emailTemplatesClient = Suppliers.memoize(() -> new AsyncEmailTemplatesClient(clientOptions)); - this.eventStreamsClient = Suppliers.memoize(() -> new AsyncEventStreamsClient(clientOptions)); - this.flowsClient = Suppliers.memoize(() -> new AsyncFlowsClient(clientOptions)); - this.formsClient = Suppliers.memoize(() -> new AsyncFormsClient(clientOptions)); - this.userGrantsClient = Suppliers.memoize(() -> new AsyncUserGrantsClient(clientOptions)); - this.groupsClient = Suppliers.memoize(() -> new AsyncGroupsClient(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.promptsClient = Suppliers.memoize(() -> new AsyncPromptsClient(clientOptions)); - this.refreshTokensClient = Suppliers.memoize(() -> new AsyncRefreshTokensClient(clientOptions)); - this.resourceServersClient = Suppliers.memoize(() -> new AsyncResourceServersClient(clientOptions)); - this.rolesClient = Suppliers.memoize(() -> new AsyncRolesClient(clientOptions)); - this.rulesClient = Suppliers.memoize(() -> new AsyncRulesClient(clientOptions)); - this.rulesConfigsClient = Suppliers.memoize(() -> new AsyncRulesConfigsClient(clientOptions)); - this.selfServiceProfilesClient = Suppliers.memoize(() -> new AsyncSelfServiceProfilesClient(clientOptions)); - this.sessionsClient = Suppliers.memoize(() -> new AsyncSessionsClient(clientOptions)); - this.statsClient = Suppliers.memoize(() -> new AsyncStatsClient(clientOptions)); - this.supplementalSignalsClient = Suppliers.memoize(() -> new AsyncSupplementalSignalsClient(clientOptions)); - this.ticketsClient = Suppliers.memoize(() -> new AsyncTicketsClient(clientOptions)); - this.tokenExchangeProfilesClient = Suppliers.memoize(() -> new AsyncTokenExchangeProfilesClient(clientOptions)); - this.userAttributeProfilesClient = Suppliers.memoize(() -> new AsyncUserAttributeProfilesClient(clientOptions)); - this.userBlocksClient = Suppliers.memoize(() -> new AsyncUserBlocksClient(clientOptions)); - this.usersClient = Suppliers.memoize(() -> new AsyncUsersClient(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.keysClient = Suppliers.memoize(() -> new AsyncKeysClient(clientOptions)); - this.riskAssessmentsClient = Suppliers.memoize(() -> new AsyncRiskAssessmentsClient(clientOptions)); - this.tenantsClient = Suppliers.memoize(() -> new AsyncTenantsClient(clientOptions)); - this.verifiableCredentialsClient = Suppliers.memoize(() -> new AsyncVerifiableCredentialsClient(clientOptions)); - } - - public AsyncActionsClient actions() { - return this.actionsClient.get(); - } - - public AsyncBrandingClient branding() { - return this.brandingClient.get(); - } - - public AsyncClientGrantsClient clientGrants() { - return this.clientGrantsClient.get(); - } - - public AsyncClientsClient clients() { - return this.clientsClient.get(); - } - - public AsyncConnectionProfilesClient connectionProfiles() { - return this.connectionProfilesClient.get(); - } - - public AsyncConnectionsClient connections() { - return this.connectionsClient.get(); - } - - public AsyncCustomDomainsClient customDomains() { - return this.customDomainsClient.get(); - } - - public AsyncDeviceCredentialsClient deviceCredentials() { - return this.deviceCredentialsClient.get(); - } - - public AsyncEmailTemplatesClient emailTemplates() { - return this.emailTemplatesClient.get(); - } - - public AsyncEventStreamsClient eventStreams() { - return this.eventStreamsClient.get(); - } - - public AsyncFlowsClient flows() { - return this.flowsClient.get(); - } - - public AsyncFormsClient forms() { - return this.formsClient.get(); - } - - public AsyncUserGrantsClient userGrants() { - return this.userGrantsClient.get(); - } - - public AsyncGroupsClient groups() { - return this.groupsClient.get(); - } - - public AsyncHooksClient hooks() { - return this.hooksClient.get(); - } - - public AsyncJobsClient jobs() { - return this.jobsClient.get(); - } - - public AsyncLogStreamsClient logStreams() { - return this.logStreamsClient.get(); - } - - public AsyncLogsClient logs() { - return this.logsClient.get(); - } - - public AsyncNetworkAclsClient networkAcls() { - return this.networkAclsClient.get(); - } - - public AsyncOrganizationsClient organizations() { - return this.organizationsClient.get(); - } - - public AsyncPromptsClient prompts() { - return this.promptsClient.get(); - } - - public AsyncRefreshTokensClient refreshTokens() { - return this.refreshTokensClient.get(); - } - - public AsyncResourceServersClient resourceServers() { - return this.resourceServersClient.get(); - } - - public AsyncRolesClient roles() { - return this.rolesClient.get(); - } - - public AsyncRulesClient rules() { - return this.rulesClient.get(); - } - - public AsyncRulesConfigsClient rulesConfigs() { - return this.rulesConfigsClient.get(); - } - - public AsyncSelfServiceProfilesClient selfServiceProfiles() { - return this.selfServiceProfilesClient.get(); - } - - public AsyncSessionsClient sessions() { - return this.sessionsClient.get(); - } - - public AsyncStatsClient stats() { - return this.statsClient.get(); - } - - public AsyncSupplementalSignalsClient supplementalSignals() { - return this.supplementalSignalsClient.get(); - } - - public AsyncTicketsClient tickets() { - return this.ticketsClient.get(); - } - - public AsyncTokenExchangeProfilesClient tokenExchangeProfiles() { - return this.tokenExchangeProfilesClient.get(); - } - - public AsyncUserAttributeProfilesClient userAttributeProfiles() { - return this.userAttributeProfilesClient.get(); - } - - public AsyncUserBlocksClient userBlocks() { - return this.userBlocksClient.get(); - } - - public AsyncUsersClient users() { - return this.usersClient.get(); - } - - public AsyncAnomalyClient anomaly() { - return this.anomalyClient.get(); - } - - public AsyncAttackProtectionClient attackProtection() { - return this.attackProtectionClient.get(); - } - - public AsyncEmailsClient emails() { - return this.emailsClient.get(); - } - - public AsyncGuardianClient guardian() { - return this.guardianClient.get(); - } - - public AsyncKeysClient keys() { - return this.keysClient.get(); - } - - public AsyncRiskAssessmentsClient riskAssessments() { - return this.riskAssessmentsClient.get(); - } - - public AsyncTenantsClient tenants() { - return this.tenantsClient.get(); - } - - public AsyncVerifiableCredentialsClient verifiableCredentials() { - return this.verifiableCredentialsClient.get(); - } - - public static AsyncManagementApiBuilder builder() { - return new AsyncManagementApiBuilder(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncManagementApiBuilder.java b/src/main/java/com/auth0/client/mgmt/AsyncManagementApiBuilder.java deleted file mode 100644 index d6af5f882..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncManagementApiBuilder.java +++ /dev/null @@ -1,205 +0,0 @@ -/** - * 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.Environment; -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; -import okhttp3.OkHttpClient; - -public class AsyncManagementApiBuilder { - private Optional timeout = Optional.empty(); - - private Optional maxRetries = Optional.empty(); - - private final Map customHeaders = new HashMap<>(); - - private String token = null; - - private Environment environment = Environment.DEFAULT; - - private OkHttpClient httpClient; - - /** - * Sets token - */ - public AsyncManagementApiBuilder token(String token) { - this.token = token; - return this; - } - - public AsyncManagementApiBuilder environment(Environment environment) { - this.environment = environment; - return this; - } - - public AsyncManagementApiBuilder url(String url) { - this.environment = Environment.custom(url); - return this; - } - - /** - * Sets the timeout (in seconds) for the client. Defaults to 60 seconds. - */ - public AsyncManagementApiBuilder timeout(int timeout) { - this.timeout = Optional.of(timeout); - return this; - } - - /** - * Sets the maximum number of retries for the client. Defaults to 2 retries. - */ - public AsyncManagementApiBuilder maxRetries(int maxRetries) { - this.maxRetries = Optional.of(maxRetries); - return this; - } - - /** - * Sets the underlying OkHttp client - */ - public AsyncManagementApiBuilder httpClient(OkHttpClient httpClient) { - this.httpClient = httpClient; - return this; - } - - /** - * Add a custom header to be sent with all requests. - * For headers that need to be computed dynamically or conditionally, use the setAdditional() method override instead. - * - * @param name The header name - * @param value The header value - * @return This builder for method chaining - */ - public AsyncManagementApiBuilder addHeader(String name, String value) { - this.customHeaders.put(name, value); - return this; - } - - protected ClientOptions buildClientOptions() { - ClientOptions.Builder builder = ClientOptions.builder(); - setEnvironment(builder); - setAuthentication(builder); - setHttpClient(builder); - setTimeouts(builder); - setRetries(builder); - for (Map.Entry header : this.customHeaders.entrySet()) { - builder.addHeader(header.getKey(), header.getValue()); - } - setAdditional(builder); - return builder.build(); - } - - /** - * Sets the environment configuration for the client. - * Override this method to modify URLs or add environment-specific logic. - * - * @param builder The ClientOptions.Builder to configure - */ - protected void setEnvironment(ClientOptions.Builder builder) { - builder.environment(this.environment); - } - - /** - * Override this method to customize authentication. - * This method is called during client options construction to set up authentication headers. - * - * @param builder The ClientOptions.Builder to configure - * - * Example: - *
{@code
-     * @Override
-     * protected void setAuthentication(ClientOptions.Builder builder) {
-     *     super.setAuthentication(builder); // Keep existing auth
-     *     builder.addHeader("X-API-Key", this.apiKey);
-     * }
-     * }
- */ - protected void setAuthentication(ClientOptions.Builder builder) { - if (this.token != null) { - builder.addHeader("Authorization", "Bearer " + this.token); - } - } - - /** - * Sets the request timeout configuration. - * Override this method to customize timeout behavior. - * - * @param builder The ClientOptions.Builder to configure - */ - protected void setTimeouts(ClientOptions.Builder builder) { - if (this.timeout.isPresent()) { - builder.timeout(this.timeout.get()); - } - } - - /** - * Sets the retry configuration for failed requests. - * Override this method to implement custom retry strategies. - * - * @param builder The ClientOptions.Builder to configure - */ - protected void setRetries(ClientOptions.Builder builder) { - if (this.maxRetries.isPresent()) { - builder.maxRetries(this.maxRetries.get()); - } - } - - /** - * Sets the OkHttp client configuration. - * Override this method to customize HTTP client behavior (interceptors, connection pools, etc). - * - * @param builder The ClientOptions.Builder to configure - */ - protected void setHttpClient(ClientOptions.Builder builder) { - if (this.httpClient != null) { - builder.httpClient(this.httpClient); - } - } - - /** - * Override this method to add any additional configuration to the client. - * This method is called at the end of the configuration chain, allowing you to add - * custom headers, modify settings, or perform any other client customization. - * - * @param builder The ClientOptions.Builder to configure - * - * Example: - *
{@code
-     * @Override
-     * protected void setAdditional(ClientOptions.Builder builder) {
-     *     builder.addHeader("X-Request-ID", () -> UUID.randomUUID().toString());
-     *     builder.addHeader("X-Client-Version", "1.0.0");
-     * }
-     * }
- */ - protected void setAdditional(ClientOptions.Builder builder) {} - - /** - * Override this method to add custom validation logic before the client is built. - * This method is called at the beginning of the build() method to ensure the configuration is valid. - * Throw an exception to prevent client creation if validation fails. - * - * Example: - *
{@code
-     * @Override
-     * protected void validateConfiguration() {
-     *     super.validateConfiguration(); // Run parent validations
-     *     if (tenantId == null || tenantId.isEmpty()) {
-     *         throw new IllegalStateException("tenantId is required");
-     *     }
-     * }
-     * }
- */ - protected void validateConfiguration() {} - - public AsyncManagementApi build() { - if (token == null) { - throw new RuntimeException("Please provide token"); - } - validateConfiguration(); - return new AsyncManagementApi(buildClientOptions()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncNetworkAclsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncNetworkAclsClient.java deleted file mode 100644 index ce4023d31..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncNetworkAclsClient.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * 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.CreateNetworkAclRequestContent; -import com.auth0.client.mgmt.types.GetNetworkAclsResponseContent; -import com.auth0.client.mgmt.types.ListNetworkAclsRequestParameters; -import com.auth0.client.mgmt.types.NetworkAclsResponseContent; -import com.auth0.client.mgmt.types.SetNetworkAclRequestContent; -import com.auth0.client.mgmt.types.SetNetworkAclsResponseContent; -import com.auth0.client.mgmt.types.UpdateNetworkAclRequestContent; -import com.auth0.client.mgmt.types.UpdateNetworkAclResponseContent; -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; - } - - /** - * Get all access control list entries for your client. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Get all access control list entries for your client. - */ - public CompletableFuture> list( - ListNetworkAclsRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Get all access control list entries for your client. - */ - public CompletableFuture> list( - ListNetworkAclsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a new access control list for your client. - */ - public CompletableFuture create(CreateNetworkAclRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create a new access control list for your client. - */ - public CompletableFuture create(CreateNetworkAclRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Get a specific access control list entry for your client. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Get a specific access control list entry for your client. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update existing access control list for your client. - */ - public CompletableFuture set(String id, SetNetworkAclRequestContent request) { - return this.rawClient.set(id, request).thenApply(response -> response.body()); - } - - /** - * Update existing access control list for your client. - */ - public CompletableFuture set( - String id, SetNetworkAclRequestContent request, RequestOptions requestOptions) { - return this.rawClient.set(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete existing access control list for your client. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete existing access control list for your client. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update existing access control list for your client. - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update existing access control list for your client. - */ - public CompletableFuture update( - String id, UpdateNetworkAclRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update existing access control list for your client. - */ - public CompletableFuture update( - String id, UpdateNetworkAclRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncOrganizationsClient.java deleted file mode 100644 index 0fcc037a6..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncOrganizationsClient.java +++ /dev/null @@ -1,221 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -import com.auth0.client.mgmt.organizations.AsyncClientGrantsClient; -import com.auth0.client.mgmt.organizations.AsyncDiscoveryDomainsClient; -import com.auth0.client.mgmt.organizations.AsyncEnabledConnectionsClient; -import com.auth0.client.mgmt.organizations.AsyncInvitationsClient; -import com.auth0.client.mgmt.organizations.AsyncMembersClient; -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.UpdateOrganizationRequestContent; -import com.auth0.client.mgmt.types.UpdateOrganizationResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncOrganizationsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawOrganizationsClient rawClient; - - protected final Supplier clientGrantsClient; - - protected final Supplier discoveryDomainsClient; - - protected final Supplier enabledConnectionsClient; - - protected final Supplier invitationsClient; - - protected final Supplier membersClient; - - public AsyncOrganizationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawOrganizationsClient(clientOptions); - this.clientGrantsClient = Suppliers.memoize(() -> new AsyncClientGrantsClient(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)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawOrganizationsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve detailed list of all Organizations available in your tenant. For more information, see Auth0 Organizations. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total number of entries to retrieve when using the <code>from</code> parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve detailed list of all Organizations available in your tenant. For more information, see Auth0 Organizations. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total number of entries to retrieve when using the <code>from</code> parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture> list(ListOrganizationsRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve detailed list of all Organizations available in your tenant. For more information, see Auth0 Organizations. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total number of entries to retrieve when using the <code>from</code> parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture> list( - ListOrganizationsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a new Organization within your tenant. To learn more about Organization settings, behavior, and configuration options, review <a href="https://auth0.com/docs/manage-users/organizations/create-first-organization">Create Your First Organization</a>. - */ - public CompletableFuture create(CreateOrganizationRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create a new Organization within your tenant. To learn more about Organization settings, behavior, and configuration options, review <a href="https://auth0.com/docs/manage-users/organizations/create-first-organization">Create Your First Organization</a>. - */ - public CompletableFuture create( - CreateOrganizationRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a single Organization specified by name. - */ - public CompletableFuture getByName(String name) { - return this.rawClient.getByName(name).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a single Organization specified by name. - */ - public CompletableFuture getByName( - String name, RequestOptions requestOptions) { - return this.rawClient.getByName(name, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a single Organization specified by ID. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a single Organization specified by ID. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Remove an Organization from your tenant. This action cannot be undone. - *

<b>Note</b>: Members are automatically disassociated from an Organization when it is deleted. However, this action does <b>not</b> delete these users from your tenant.

- */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Remove an Organization from your tenant. This action cannot be undone. - *

<b>Note</b>: Members are automatically disassociated from an Organization when it is deleted. However, this action does <b>not</b> delete these users from your tenant.

- */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update the details of a specific <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/create-organizations">Organization</a>, such as name and display name, branding options, and metadata. - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update the details of a specific <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/create-organizations">Organization</a>, such as name and display name, branding options, and metadata. - */ - public CompletableFuture update( - String id, UpdateOrganizationRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update the details of a specific <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/create-organizations">Organization</a>, such as name and display name, branding options, and metadata. - */ - public CompletableFuture update( - String id, UpdateOrganizationRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - public AsyncClientGrantsClient clientGrants() { - return this.clientGrantsClient.get(); - } - - public AsyncDiscoveryDomainsClient discoveryDomains() { - return this.discoveryDomainsClient.get(); - } - - public AsyncEnabledConnectionsClient enabledConnections() { - return this.enabledConnectionsClient.get(); - } - - public AsyncInvitationsClient invitations() { - return this.invitationsClient.get(); - } - - public AsyncMembersClient members() { - return this.membersClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncPromptsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncPromptsClient.java deleted file mode 100644 index fc6d9bdf7..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncPromptsClient.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * 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.prompts.AsyncCustomTextClient; -import com.auth0.client.mgmt.prompts.AsyncPartialsClient; -import com.auth0.client.mgmt.prompts.AsyncRenderingClient; -import com.auth0.client.mgmt.types.GetSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateSettingsRequestContent; -import com.auth0.client.mgmt.types.UpdateSettingsResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncPromptsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawPromptsClient rawClient; - - protected final Supplier renderingClient; - - protected final Supplier customTextClient; - - protected final Supplier partialsClient; - - public AsyncPromptsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawPromptsClient(clientOptions); - this.renderingClient = Suppliers.memoize(() -> new AsyncRenderingClient(clientOptions)); - this.customTextClient = Suppliers.memoize(() -> new AsyncCustomTextClient(clientOptions)); - this.partialsClient = Suppliers.memoize(() -> new AsyncPartialsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawPromptsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public CompletableFuture getSettings() { - return this.rawClient.getSettings().thenApply(response -> response.body()); - } - - /** - * Retrieve details of the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public CompletableFuture getSettings(RequestOptions requestOptions) { - return this.rawClient.getSettings(requestOptions).thenApply(response -> response.body()); - } - - /** - * Update the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public CompletableFuture updateSettings() { - return this.rawClient.updateSettings().thenApply(response -> response.body()); - } - - /** - * Update the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public CompletableFuture updateSettings(UpdateSettingsRequestContent request) { - return this.rawClient.updateSettings(request).thenApply(response -> response.body()); - } - - /** - * Update the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public CompletableFuture updateSettings( - UpdateSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.updateSettings(request, requestOptions).thenApply(response -> response.body()); - } - - public AsyncRenderingClient rendering() { - return this.renderingClient.get(); - } - - public AsyncCustomTextClient customText() { - return this.customTextClient.get(); - } - - public AsyncPartialsClient partials() { - return this.partialsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawActionsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawActionsClient.java deleted file mode 100644 index 0e97f91a2..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawActionsClient.java +++ /dev/null @@ -1,734 +0,0 @@ -/** - * 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.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.types.Action; -import com.auth0.client.mgmt.types.CreateActionRequestContent; -import com.auth0.client.mgmt.types.CreateActionResponseContent; -import com.auth0.client.mgmt.types.DeleteActionRequestParameters; -import com.auth0.client.mgmt.types.DeployActionResponseContent; -import com.auth0.client.mgmt.types.GetActionResponseContent; -import com.auth0.client.mgmt.types.ListActionsPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListActionsRequestParameters; -import com.auth0.client.mgmt.types.TestActionRequestContent; -import com.auth0.client.mgmt.types.TestActionResponseContent; -import com.auth0.client.mgmt.types.UpdateActionRequestContent; -import com.auth0.client.mgmt.types.UpdateActionResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawActionsClient { - protected final ClientOptions clientOptions; - - public AsyncRawActionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve all actions. - */ - public CompletableFuture>> list() { - return list(ListActionsRequestParameters.builder().build()); - } - - /** - * Retrieve all actions. - */ - public CompletableFuture>> list( - ListActionsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve all actions. - */ - public CompletableFuture>> list( - ListActionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions"); - if (!request.getTriggerId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "triggerId", request.getTriggerId().orElse(null), false); - } - if (!request.getActionName().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "actionName", request.getActionName().orElse(null), false); - } - if (!request.getDeployed().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "deployed", request.getDeployed().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - if (!request.getInstalled().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "installed", request.getInstalled().orElse(null), false); - } - 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); - } - 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()) { - ListActionsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListActionsPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListActionsRequestParameters nextRequest = ListActionsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getActions().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 (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 action. Once an action is created, it must be deployed, and then bound to a trigger before it will be executed as part of a flow. - */ - public CompletableFuture> create( - CreateActionRequestContent request) { - return create(request, null); - } - - /** - * Create an action. Once an action is created, it must be deployed, and then bound to a trigger before it will be executed as part of a flow. - */ - public CompletableFuture> create( - CreateActionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .build(); - 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) - .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); - } - 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, CreateActionResponseContent.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 (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 an action by its ID. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve an action by its ID. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetActionResponseContent.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 (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; - } - - /** - * Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted. - */ - public CompletableFuture> delete(String id) { - return delete(id, DeleteActionRequestParameters.builder().build()); - } - - /** - * Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted. - */ - public CompletableFuture> delete(String id, DeleteActionRequestParameters request) { - return delete(id, request, null); - } - - /** - * Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted. - */ - public CompletableFuture> delete( - String id, DeleteActionRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .addPathSegment(id); - if (!request.getForce().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "force", request.getForce().orElse(null), false); - } - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("DELETE", 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); - } - 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 (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 existing action. If this action is currently bound to a trigger, updating it will <strong>not</strong> affect any user flows until the action is deployed. - */ - public CompletableFuture> update(String id) { - return update(id, UpdateActionRequestContent.builder().build()); - } - - /** - * Update an existing action. If this action is currently bound to a trigger, updating it will <strong>not</strong> affect any user flows until the action is deployed. - */ - public CompletableFuture> update( - String id, UpdateActionRequestContent request) { - return update(id, request, null); - } - - /** - * Update an existing action. If this action is currently bound to a trigger, updating it will <strong>not</strong> affect any user flows until the action is deployed. - */ - public CompletableFuture> update( - String id, UpdateActionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateActionResponseContent.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 (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; - } - - /** - * Deploy an action. Deploying an action will create a new immutable version of the action. If the action is currently bound to a trigger, then the system will begin executing the newly deployed version of the action immediately. Otherwise, the action will only be executed as a part of a flow once it is bound to that flow. - */ - public CompletableFuture> deploy(String id) { - return deploy(id, null); - } - - /** - * Deploy an action. Deploying an action will create a new immutable version of the action. If the action is currently bound to a trigger, then the system will begin executing the newly deployed version of the action immediately. Otherwise, the action will only be executed as a part of a flow once it is bound to that flow. - */ - public CompletableFuture> deploy( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .addPathSegment(id) - .addPathSegments("deploy") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, DeployActionResponseContent.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 (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; - } - - /** - * Test an action. After updating an action, it can be tested prior to being deployed to ensure it behaves as expected. - */ - public CompletableFuture> test( - String id, TestActionRequestContent request) { - return test(id, request, null); - } - - /** - * Test an action. After updating an action, it can be tested prior to being deployed to ensure it behaves as expected. - */ - public CompletableFuture> test( - String id, TestActionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .addPathSegment(id) - .addPathSegments("test") - .build(); - 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) - .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); - } - 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, TestActionResponseContent.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 (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 deleted file mode 100644 index 09c82ac52..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawBrandingClient.java +++ /dev/null @@ -1,214 +0,0 @@ -/** - * 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.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.types.GetBrandingResponseContent; -import com.auth0.client.mgmt.types.UpdateBrandingRequestContent; -import com.auth0.client.mgmt.types.UpdateBrandingResponseContent; -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 AsyncRawBrandingClient { - protected final ClientOptions clientOptions; - - public AsyncRawBrandingClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve branding settings. - */ - public CompletableFuture> get() { - return get(null); - } - - /** - * Retrieve branding settings. - */ - public CompletableFuture> get(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetBrandingResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update branding settings. - */ - public CompletableFuture> update() { - return update(UpdateBrandingRequestContent.builder().build()); - } - - /** - * Update branding settings. - */ - public CompletableFuture> update( - UpdateBrandingRequestContent request) { - return update(request, null); - } - - /** - * Update branding settings. - */ - public CompletableFuture> update( - UpdateBrandingRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateBrandingResponseContent.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 (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/AsyncRawClientGrantsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawClientGrantsClient.java deleted file mode 100644 index 64d3b2689..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawClientGrantsClient.java +++ /dev/null @@ -1,550 +0,0 @@ -/** - * 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.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.ClientGrantResponseContent; -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.ListClientGrantPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListClientGrantsRequestParameters; -import com.auth0.client.mgmt.types.UpdateClientGrantRequestContent; -import com.auth0.client.mgmt.types.UpdateClientGrantResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawClientGrantsClient { - protected final ClientOptions clientOptions; - - public AsyncRawClientGrantsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grants</a>, including the scopes associated with the application/API pair. - */ - public CompletableFuture>> list() { - return list(ListClientGrantsRequestParameters.builder().build()); - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grants</a>, including the scopes associated with the application/API pair. - */ - public CompletableFuture>> list( - ListClientGrantsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grants</a>, including the scopes associated with the application/API pair. - */ - public CompletableFuture>> list( - ListClientGrantsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("client-grants"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - if (!request.getAudience().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "audience", request.getAudience().orElse(null), false); - } - if (!request.getClientId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "client_id", request.getClientId().orElse(null), false); - } - if (!request.getAllowAnyOrganization().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, - "allow_any_organization", - request.getAllowAnyOrganization().orElse(null), - false); - } - if (!request.getSubjectType().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "subject_type", request.getSubjectType().orElse(null), false); - } - 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); - } - 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()) { - ListClientGrantPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListClientGrantPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListClientGrantsRequestParameters nextRequest = ListClientGrantsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getClientGrants().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> { - try { - return list(nextRequest, requestOptions) - .get() - .body(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - }), - response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Create a client grant for a machine-to-machine login flow. To learn more, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public CompletableFuture> create( - CreateClientGrantRequestContent request) { - return create(request, null); - } - - /** - * Create a client grant for a machine-to-machine login flow. To learn more, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public CompletableFuture> create( - CreateClientGrantRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("client-grants") - .build(); - 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) - .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); - } - 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, CreateClientGrantResponseContent.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 (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 <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grant</a>, including the - * scopes associated with the application/API pair. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve a single <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grant</a>, including the - * scopes associated with the application/API pair. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("client-grants") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetClientGrantResponseContent.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 (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 the <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a> from your machine-to-machine application. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete the <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a> from your machine-to-machine application. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("client-grants") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 grant. - */ - public CompletableFuture> update(String id) { - return update(id, UpdateClientGrantRequestContent.builder().build()); - } - - /** - * Update a client grant. - */ - public CompletableFuture> update( - String id, UpdateClientGrantRequestContent request) { - return update(id, request, null); - } - - /** - * Update a client grant. - */ - public CompletableFuture> update( - String id, UpdateClientGrantRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("client-grants") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateClientGrantResponseContent.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 (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 deleted file mode 100644 index ebdd4995f..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawClientsClient.java +++ /dev/null @@ -1,899 +0,0 @@ -/** - * 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.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.Client; -import com.auth0.client.mgmt.types.CreateClientRequestContent; -import com.auth0.client.mgmt.types.CreateClientResponseContent; -import com.auth0.client.mgmt.types.GetClientRequestParameters; -import com.auth0.client.mgmt.types.GetClientResponseContent; -import com.auth0.client.mgmt.types.ListClientsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListClientsRequestParameters; -import com.auth0.client.mgmt.types.RotateClientSecretResponseContent; -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.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; - } - - /** - * Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified. - * For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following can be retrieved with any scope: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scope: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the - * <code>read:client_keys</code> or <code>read:client_credentials</code> scope: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public CompletableFuture>> list() { - return list(ListClientsRequestParameters.builder().build()); - } - - /** - * Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified. - * For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following can be retrieved with any scope: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scope: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the - * <code>read:client_keys</code> or <code>read:client_credentials</code> scope: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public CompletableFuture>> list( - ListClientsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified. - * For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following can be retrieved with any scope: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scope: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the - * <code>read:client_keys</code> or <code>read:client_credentials</code> scope: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public CompletableFuture>> list( - ListClientsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients"); - 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, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getIsGlobal().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "is_global", request.getIsGlobal().orElse(null), false); - } - if (!request.getIsFirstParty().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "is_first_party", request.getIsFirstParty().orElse(null), false); - } - if (!request.getAppType().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "app_type", request.getAppType().orElse(null), false); - } - if (!request.getQ().isAbsent()) { - QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().orElse(null), false); - } - 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); - } - 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()) { - ListClientsOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListClientsOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListClientsRequestParameters nextRequest = ListClientsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getClients().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 (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 client (application or SSO integration). For more information, read <a href="https://www.auth0.com/docs/get-started/auth0-overview/create-applications">Create Applications</a> - * <a href="https://www.auth0.com/docs/authenticate/single-sign-on/api-endpoints-for-single-sign-on>">API Endpoints for Single Sign-On</a>. - *

Notes:

- *
    - *
  • We recommend leaving the client_secret parameter unspecified to allow the generation of a safe secret.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use - * <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> - * to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, specify fully defined credentials. - * These credentials will be automatically enabled for Private Key JWT authentication on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>create:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
- *

<div class="alert alert-warning">SSO Integrations created via this endpoint will accept login requests and share user profile information.</div>

- */ - public CompletableFuture> create( - CreateClientRequestContent request) { - return create(request, null); - } - - /** - * Create a new client (application or SSO integration). For more information, read <a href="https://www.auth0.com/docs/get-started/auth0-overview/create-applications">Create Applications</a> - * <a href="https://www.auth0.com/docs/authenticate/single-sign-on/api-endpoints-for-single-sign-on>">API Endpoints for Single Sign-On</a>. - *

Notes:

- *
    - *
  • We recommend leaving the client_secret parameter unspecified to allow the generation of a safe secret.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use - * <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> - * to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, specify fully defined credentials. - * These credentials will be automatically enabled for Private Key JWT authentication on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>create:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
- *

<div class="alert alert-warning">SSO Integrations created via this endpoint will accept login requests and share user profile information.</div>

- */ - public CompletableFuture> create( - CreateClientRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .build(); - 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) - .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); - } - 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, CreateClientResponseContent.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 (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 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 <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following properties can be retrieved with any of the scopes: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scopes: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public CompletableFuture> get(String id) { - return get(id, GetClientRequestParameters.builder().build()); - } - - /** - * 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 <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following properties can be retrieved with any of the scopes: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scopes: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public CompletableFuture> get( - String id, GetClientRequestParameters request) { - return get(id, request, null); - } - - /** - * 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 <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following properties can be retrieved with any of the scopes: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scopes: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public CompletableFuture> get( - String id, GetClientRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(id); - 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); - } - 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); - } - 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, GetClientResponseContent.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 (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 and related configuration (rules, connections, etc). - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete a client and related configuration (rules, connections, etc). - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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; - } - - /** - * Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

Notes:

- *
    - *
  • The client_secret and signing_key attributes can only be updated with the update:client_keys scope.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>update:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
  • To change a client's <code>is_first_party</code> property to <code>false</code>, the <code>organization_usage</code> and <code>organization_require_behavior</code> properties must be unset.
  • - *
- */ - public CompletableFuture> update(String id) { - return update(id, UpdateClientRequestContent.builder().build()); - } - - /** - * Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

Notes:

- *
    - *
  • The client_secret and signing_key attributes can only be updated with the update:client_keys scope.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>update:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
  • To change a client's <code>is_first_party</code> property to <code>false</code>, the <code>organization_usage</code> and <code>organization_require_behavior</code> properties must be unset.
  • - *
- */ - public CompletableFuture> update( - String id, UpdateClientRequestContent request) { - return update(id, request, null); - } - - /** - * Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

Notes:

- *
    - *
  • The client_secret and signing_key attributes can only be updated with the update:client_keys scope.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>update:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
  • To change a client's <code>is_first_party</code> property to <code>false</code>, the <code>organization_usage</code> and <code>organization_require_behavior</code> properties must be unset.
  • - *
- */ - public CompletableFuture> update( - String id, UpdateClientRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateClientResponseContent.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 (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; - } - - /** - * Rotate a client secret. - *

This endpoint cannot be used with clients configured with Private Key JWT authentication method (client_authentication_methods configured with private_key_jwt). The generated secret is NOT base64 encoded.

- *

For more information, read <a href="https://www.auth0.com/docs/get-started/applications/rotate-client-secret">Rotate Client Secrets</a>.

- */ - public CompletableFuture> rotateSecret(String id) { - return rotateSecret(id, null); - } - - /** - * Rotate a client secret. - *

This endpoint cannot be used with clients configured with Private Key JWT authentication method (client_authentication_methods configured with private_key_jwt). The generated secret is NOT base64 encoded.

- *

For more information, read <a href="https://www.auth0.com/docs/get-started/applications/rotate-client-secret">Rotate Client Secrets</a>.

- */ - public CompletableFuture> rotateSecret( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(id) - .addPathSegments("rotate-secret") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, RotateClientSecretResponseContent.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 (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/AsyncRawConnectionProfilesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionProfilesClient.java deleted file mode 100644 index 1f2a5f77d..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionProfilesClient.java +++ /dev/null @@ -1,687 +0,0 @@ -/** - * 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.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.ConnectionProfile; -import com.auth0.client.mgmt.types.CreateConnectionProfileRequestContent; -import com.auth0.client.mgmt.types.CreateConnectionProfileResponseContent; -import com.auth0.client.mgmt.types.GetConnectionProfileResponseContent; -import com.auth0.client.mgmt.types.GetConnectionProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.ListConnectionProfileRequestParameters; -import com.auth0.client.mgmt.types.ListConnectionProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.ListConnectionProfilesPaginatedResponseContent; -import com.auth0.client.mgmt.types.UpdateConnectionProfileRequestContent; -import com.auth0.client.mgmt.types.UpdateConnectionProfileResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawConnectionProfilesClient { - protected final ClientOptions clientOptions; - - public AsyncRawConnectionProfilesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a list of Connection Profiles. This endpoint supports Checkpoint pagination. - */ - public CompletableFuture>> list() { - return list(ListConnectionProfileRequestParameters.builder().build()); - } - - /** - * Retrieve a list of Connection Profiles. This endpoint supports Checkpoint pagination. - */ - public CompletableFuture>> list( - ListConnectionProfileRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve a list of Connection Profiles. This endpoint supports Checkpoint pagination. - */ - public CompletableFuture>> list( - ListConnectionProfileRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connection-profiles"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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()) { - ListConnectionProfilesPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListConnectionProfilesPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListConnectionProfileRequestParameters nextRequest = - ListConnectionProfileRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getConnectionProfiles().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> { - try { - return list(nextRequest, requestOptions) - .get() - .body(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - }), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (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 Connection Profile. - */ - public CompletableFuture> create( - CreateConnectionProfileRequestContent request) { - return create(request, null); - } - - /** - * Create a Connection Profile. - */ - public CompletableFuture> create( - CreateConnectionProfileRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connection-profiles") - .build(); - 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) - .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); - } - 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, CreateConnectionProfileResponseContent.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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve a list of Connection Profile Templates. - */ - public CompletableFuture> listTemplates() { - return listTemplates(null); - } - - /** - * Retrieve a list of Connection Profile Templates. - */ - public CompletableFuture> listTemplates( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connection-profiles/templates") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListConnectionProfileTemplateResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve a Connection Profile Template. - */ - public CompletableFuture> getTemplate( - String id) { - return getTemplate(id, null); - } - - /** - * Retrieve a Connection Profile Template. - */ - public CompletableFuture> getTemplate( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connection-profiles/templates") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetConnectionProfileTemplateResponseContent.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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve details about a single Connection Profile specified by ID. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve details about a single Connection Profile specified by ID. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connection-profiles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetConnectionProfileResponseContent.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 (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 single Connection Profile specified by ID. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete a single Connection Profile specified by ID. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connection-profiles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update the details of a specific Connection Profile. - */ - public CompletableFuture> update(String id) { - return update(id, UpdateConnectionProfileRequestContent.builder().build()); - } - - /** - * Update the details of a specific Connection Profile. - */ - public CompletableFuture> update( - String id, UpdateConnectionProfileRequestContent request) { - return update(id, request, null); - } - - /** - * Update the details of a specific Connection Profile. - */ - public CompletableFuture> update( - String id, UpdateConnectionProfileRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connection-profiles") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateConnectionProfileResponseContent.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 (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/AsyncRawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionsClient.java deleted file mode 100644 index 366bc5031..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawConnectionsClient.java +++ /dev/null @@ -1,703 +0,0 @@ -/** - * 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.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.ConnectionForList; -import com.auth0.client.mgmt.types.CreateConnectionRequestContent; -import com.auth0.client.mgmt.types.CreateConnectionResponseContent; -import com.auth0.client.mgmt.types.GetConnectionRequestParameters; -import com.auth0.client.mgmt.types.GetConnectionResponseContent; -import com.auth0.client.mgmt.types.ListConnectionsCheckpointPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListConnectionsQueryParameters; -import com.auth0.client.mgmt.types.UpdateConnectionRequestContent; -import com.auth0.client.mgmt.types.UpdateConnectionResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawConnectionsClient { - protected final ClientOptions clientOptions; - - public AsyncRawConnectionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieves detailed list of all <a href="https://auth0.com/docs/authenticate/identity-providers">connections</a> that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 connections.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture>> list() { - return list(ListConnectionsQueryParameters.builder().build()); - } - - /** - * Retrieves detailed list of all <a href="https://auth0.com/docs/authenticate/identity-providers">connections</a> that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 connections.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture>> list( - ListConnectionsQueryParameters request) { - return list(request, null); - } - - /** - * Retrieves detailed list of all <a href="https://auth0.com/docs/authenticate/identity-providers">connections</a> that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 connections.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture>> list( - ListConnectionsQueryParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - if (!request.getName().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "name", request.getName().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); - } - if (request.getStrategy().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "strategy", request.getStrategy().get(), true); - } - 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); - } - 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()) { - ListConnectionsCheckpointPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListConnectionsCheckpointPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListConnectionsQueryParameters nextRequest = ListConnectionsQueryParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getConnections().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> { - try { - return list(nextRequest, requestOptions) - .get() - .body(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - }), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (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; - } - - /** - * Creates a new connection according to the JSON object received in <code>body</code>. - *

<b>Note:</b> If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.

- */ - public CompletableFuture> create( - CreateConnectionRequestContent request) { - return create(request, null); - } - - /** - * Creates a new connection according to the JSON object received in <code>body</code>. - *

<b>Note:</b> If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.

- */ - public CompletableFuture> create( - CreateConnectionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .build(); - 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) - .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); - } - 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, CreateConnectionResponseContent.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 (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 for a specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> along with options that can be used for identity provider configuration. - */ - public CompletableFuture> get(String id) { - return get(id, GetConnectionRequestParameters.builder().build()); - } - - /** - * Retrieve details for a specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> along with options that can be used for identity provider configuration. - */ - public CompletableFuture> get( - String id, GetConnectionRequestParameters request) { - return get(id, request, null); - } - - /** - * Retrieve details for a specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> along with options that can be used for identity provider configuration. - */ - public CompletableFuture> get( - String id, GetConnectionRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id); - 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); - } - 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); - } - 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, GetConnectionResponseContent.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 (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; - } - - /** - * Removes a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. - *

<b>Note:</b> If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent <a href="https://auth0.com/docs/api/management/v2/connections/post-connections">create connection</a> requests, if they use an identical connection name.

- */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Removes a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. - *

<b>Note:</b> If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent <a href="https://auth0.com/docs/api/management/v2/connections/post-connections">create connection</a> requests, if they use an identical connection name.

- */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 details for a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a>, including option properties for identity provider configuration. - *

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

- */ - public CompletableFuture> update(String id) { - return update(id, UpdateConnectionRequestContent.builder().build()); - } - - /** - * Update details for a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a>, including option properties for identity provider configuration. - *

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

- */ - public CompletableFuture> update( - String id, UpdateConnectionRequestContent request) { - return update(id, request, null); - } - - /** - * Update details for a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a>, including option properties for identity provider configuration. - *

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

- */ - public CompletableFuture> update( - String id, UpdateConnectionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateConnectionResponseContent.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 (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; - } - - /** - * Retrieves the status of an ad/ldap connection referenced by its <code>ID</code>. <code>200 OK</code> http status code response is returned when the connection is online, otherwise a <code>404</code> status code is returned along with an error message - */ - public CompletableFuture> checkStatus(String id) { - return checkStatus(id, null); - } - - /** - * Retrieves the status of an ad/ldap connection referenced by its <code>ID</code>. <code>200 OK</code> http status code response is returned when the connection is online, otherwise a <code>404</code> status code is returned along with an error message - */ - public CompletableFuture> checkStatus(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("status") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - 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 (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/AsyncRawCustomDomainsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawCustomDomainsClient.java deleted file mode 100644 index 9d06bddcb..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawCustomDomainsClient.java +++ /dev/null @@ -1,781 +0,0 @@ -/** - * 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.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.CreateCustomDomainRequestContent; -import com.auth0.client.mgmt.types.CreateCustomDomainResponseContent; -import com.auth0.client.mgmt.types.CustomDomain; -import com.auth0.client.mgmt.types.GetCustomDomainResponseContent; -import com.auth0.client.mgmt.types.ListCustomDomainsRequestParameters; -import com.auth0.client.mgmt.types.TestCustomDomainResponseContent; -import com.auth0.client.mgmt.types.UpdateCustomDomainRequestContent; -import com.auth0.client.mgmt.types.UpdateCustomDomainResponseContent; -import com.auth0.client.mgmt.types.VerifyCustomDomainResponseContent; -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; -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 AsyncRawCustomDomainsClient { - protected final ClientOptions clientOptions; - - public AsyncRawCustomDomainsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/custom-domains">custom domains</a>. - */ - public CompletableFuture>> list() { - return list(ListCustomDomainsRequestParameters.builder().build()); - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/custom-domains">custom domains</a>. - */ - public CompletableFuture>> list( - ListCustomDomainsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/custom-domains">custom domains</a>. - */ - public CompletableFuture>> list( - ListCustomDomainsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("custom-domains"); - if (!request.getQ().isAbsent()) { - QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().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); - } - if (!request.getSort().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sort", request.getSort().orElse(null), false); - } - 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); - } - 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 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Create a new custom domain. - *

Note: The custom domain will need to be verified before it will accept - * requests.

- *

Optional attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- */ - public CompletableFuture> create( - CreateCustomDomainRequestContent request) { - return create(request, null); - } - - /** - * Create a new custom domain. - *

Note: The custom domain will need to be verified before it will accept - * requests.

- *

Optional attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- */ - public CompletableFuture> create( - CreateCustomDomainRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("custom-domains") - .build(); - 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) - .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); - } - 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, CreateCustomDomainResponseContent.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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve a custom domain configuration and status. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve a custom domain configuration and status. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("custom-domains") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetCustomDomainResponseContent.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 (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 custom domain and stop serving requests for it. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete a custom domain and stop serving requests for it. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("custom-domains") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 custom domain. - *

These are the attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

<h5>Updating CUSTOM_CLIENT_IP_HEADER for a custom domain</h5>To update the <code>custom_client_ip_header</code> for a domain, the body to - * send should be: - * <pre><code>{ "custom_client_ip_header": "cf-connecting-ip" }</code></pre>

- *

<h5>Updating TLS_POLICY for a custom domain</h5>To update the <code>tls_policy</code> for a domain, the body to send should be: - * <pre><code>{ "tls_policy": "recommended" }</code></pre>

- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- *

Some considerations:

- *
    - *
  • The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally.
  • - *
  • The <code>compatible</code> TLS policy is no longer supported.
  • - *
- */ - public CompletableFuture> update(String id) { - return update(id, UpdateCustomDomainRequestContent.builder().build()); - } - - /** - * Update a custom domain. - *

These are the attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

<h5>Updating CUSTOM_CLIENT_IP_HEADER for a custom domain</h5>To update the <code>custom_client_ip_header</code> for a domain, the body to - * send should be: - * <pre><code>{ "custom_client_ip_header": "cf-connecting-ip" }</code></pre>

- *

<h5>Updating TLS_POLICY for a custom domain</h5>To update the <code>tls_policy</code> for a domain, the body to send should be: - * <pre><code>{ "tls_policy": "recommended" }</code></pre>

- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- *

Some considerations:

- *
    - *
  • The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally.
  • - *
  • The <code>compatible</code> TLS policy is no longer supported.
  • - *
- */ - public CompletableFuture> update( - String id, UpdateCustomDomainRequestContent request) { - return update(id, request, null); - } - - /** - * Update a custom domain. - *

These are the attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

<h5>Updating CUSTOM_CLIENT_IP_HEADER for a custom domain</h5>To update the <code>custom_client_ip_header</code> for a domain, the body to - * send should be: - * <pre><code>{ "custom_client_ip_header": "cf-connecting-ip" }</code></pre>

- *

<h5>Updating TLS_POLICY for a custom domain</h5>To update the <code>tls_policy</code> for a domain, the body to send should be: - * <pre><code>{ "tls_policy": "recommended" }</code></pre>

- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- *

Some considerations:

- *
    - *
  • The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally.
  • - *
  • The <code>compatible</code> TLS policy is no longer supported.
  • - *
- */ - public CompletableFuture> update( - String id, UpdateCustomDomainRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("custom-domains") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateCustomDomainResponseContent.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 (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; - } - - /** - * Run the test process on a custom domain. - */ - public CompletableFuture> test(String id) { - return test(id, null); - } - - /** - * Run the test process on a custom domain. - */ - public CompletableFuture> test( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("custom-domains") - .addPathSegment(id) - .addPathSegments("test") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, TestCustomDomainResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Run the verification process on a custom domain. - *

Note: Check the <code>status</code> field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests.

- *

For <code>self_managed_certs</code>, when the custom domain is verified for the first time, the response will also include the <code>cname_api_key</code> which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests.

- *

<a href="https://auth0.com/docs/custom-domains#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Auth0 Managed certificates. - * <a href="https://auth0.com/docs/custom-domains/self-managed-certificates#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Self Managed certificates.

- */ - public CompletableFuture> verify(String id) { - return verify(id, null); - } - - /** - * Run the verification process on a custom domain. - *

Note: Check the <code>status</code> field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests.

- *

For <code>self_managed_certs</code>, when the custom domain is verified for the first time, the response will also include the <code>cname_api_key</code> which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests.

- *

<a href="https://auth0.com/docs/custom-domains#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Auth0 Managed certificates. - * <a href="https://auth0.com/docs/custom-domains/self-managed-certificates#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Self Managed certificates.

- */ - public CompletableFuture> verify( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("custom-domains") - .addPathSegment(id) - .addPathSegments("verify") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, VerifyCustomDomainResponseContent.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 (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/AsyncRawDeviceCredentialsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawDeviceCredentialsClient.java deleted file mode 100644 index d5b06e3db..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawDeviceCredentialsClient.java +++ /dev/null @@ -1,361 +0,0 @@ -/** - * 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.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.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.types.CreatePublicKeyDeviceCredentialRequestContent; -import com.auth0.client.mgmt.types.CreatePublicKeyDeviceCredentialResponseContent; -import com.auth0.client.mgmt.types.DeviceCredential; -import com.auth0.client.mgmt.types.ListDeviceCredentialsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListDeviceCredentialsRequestParameters; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawDeviceCredentialsClient { - protected final ClientOptions clientOptions; - - public AsyncRawDeviceCredentialsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve device credential information (<code>public_key</code>, <code>refresh_token</code>, or <code>rotating_refresh_token</code>) associated with a specific user. - */ - public CompletableFuture>> list() { - return list(ListDeviceCredentialsRequestParameters.builder().build()); - } - - /** - * Retrieve device credential information (<code>public_key</code>, <code>refresh_token</code>, or <code>rotating_refresh_token</code>) associated with a specific user. - */ - public CompletableFuture>> list( - ListDeviceCredentialsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve device credential information (<code>public_key</code>, <code>refresh_token</code>, or <code>rotating_refresh_token</code>) associated with a specific user. - */ - public CompletableFuture>> list( - ListDeviceCredentialsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("device-credentials"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), 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); - } - if (!request.getUserId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "user_id", request.getUserId().orElse(null), false); - } - if (!request.getClientId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "client_id", request.getClientId().orElse(null), false); - } - if (!request.getType().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "type", request.getType().orElse(null), false); - } - 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); - } - 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()) { - ListDeviceCredentialsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListDeviceCredentialsOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListDeviceCredentialsRequestParameters nextRequest = - ListDeviceCredentialsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getDeviceCredentials().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 (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 device credential public key to manage refresh token rotation for a given <code>user_id</code>. Device Credentials APIs are designed for ad-hoc administrative use only and paging is by default enabled for GET requests. - *

When refresh token rotation is enabled, the endpoint becomes consistent. For more information, read <a href="https://auth0.com/docs/get-started/tenant-settings/signing-keys"> Signing Keys</a>.

- */ - public CompletableFuture> createPublicKey( - CreatePublicKeyDeviceCredentialRequestContent request) { - return createPublicKey(request, null); - } - - /** - * Create a device credential public key to manage refresh token rotation for a given <code>user_id</code>. Device Credentials APIs are designed for ad-hoc administrative use only and paging is by default enabled for GET requests. - *

When refresh token rotation is enabled, the endpoint becomes consistent. For more information, read <a href="https://auth0.com/docs/get-started/tenant-settings/signing-keys"> Signing Keys</a>.

- */ - public CompletableFuture> createPublicKey( - CreatePublicKeyDeviceCredentialRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("device-credentials") - .build(); - 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) - .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); - } - 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, CreatePublicKeyDeviceCredentialResponseContent.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 (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 a device credential (such as a refresh token or public key) with the given ID. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Permanently delete a device credential (such as a refresh token or public key) with the given ID. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("device-credentials") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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/AsyncRawEmailTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawEmailTemplatesClient.java deleted file mode 100644 index d5cdc01ed..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawEmailTemplatesClient.java +++ /dev/null @@ -1,435 +0,0 @@ -/** - * 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.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.CreateEmailTemplateRequestContent; -import com.auth0.client.mgmt.types.CreateEmailTemplateResponseContent; -import com.auth0.client.mgmt.types.EmailTemplateNameEnum; -import com.auth0.client.mgmt.types.GetEmailTemplateResponseContent; -import com.auth0.client.mgmt.types.SetEmailTemplateRequestContent; -import com.auth0.client.mgmt.types.SetEmailTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateEmailTemplateRequestContent; -import com.auth0.client.mgmt.types.UpdateEmailTemplateResponseContent; -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 AsyncRawEmailTemplatesClient { - protected final ClientOptions clientOptions; - - public AsyncRawEmailTemplatesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Create an email template. - */ - public CompletableFuture> create( - CreateEmailTemplateRequestContent request) { - return create(request, null); - } - - /** - * Create an email template. - */ - public CompletableFuture> create( - CreateEmailTemplateRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("email-templates") - .build(); - 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) - .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); - } - 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, CreateEmailTemplateResponseContent.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 (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 an email template by pre-defined name. These names are verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. - */ - public CompletableFuture> get( - EmailTemplateNameEnum templateName) { - return get(templateName, null); - } - - /** - * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. - */ - public CompletableFuture> get( - EmailTemplateNameEnum templateName, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("email-templates") - .addPathSegment(templateName.toString()) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetEmailTemplateResponseContent.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 (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 email template. - */ - public CompletableFuture> set( - EmailTemplateNameEnum templateName, SetEmailTemplateRequestContent request) { - return set(templateName, request, null); - } - - /** - * Update an email template. - */ - public CompletableFuture> set( - EmailTemplateNameEnum templateName, SetEmailTemplateRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("email-templates") - .addPathSegment(templateName.toString()) - .build(); - 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) - .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<>(); - 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, SetEmailTemplateResponseContent.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 (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; - } - - /** - * Modify an email template. - */ - public CompletableFuture> update( - EmailTemplateNameEnum templateName) { - return update(templateName, UpdateEmailTemplateRequestContent.builder().build()); - } - - /** - * Modify an email template. - */ - public CompletableFuture> update( - EmailTemplateNameEnum templateName, UpdateEmailTemplateRequestContent request) { - return update(templateName, request, null); - } - - /** - * Modify an email template. - */ - public CompletableFuture> update( - EmailTemplateNameEnum templateName, - UpdateEmailTemplateRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("email-templates") - .addPathSegment(templateName.toString()) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateEmailTemplateResponseContent.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 (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/AsyncRawEventStreamsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawEventStreamsClient.java deleted file mode 100644 index 46f178827..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawEventStreamsClient.java +++ /dev/null @@ -1,573 +0,0 @@ -/** - * 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.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.CreateEventStreamResponseContent; -import com.auth0.client.mgmt.types.CreateEventStreamTestEventRequestContent; -import com.auth0.client.mgmt.types.CreateEventStreamTestEventResponseContent; -import com.auth0.client.mgmt.types.EventStreamResponseContent; -import com.auth0.client.mgmt.types.EventStreamsCreateRequest; -import com.auth0.client.mgmt.types.GetEventStreamResponseContent; -import com.auth0.client.mgmt.types.ListEventStreamsRequestParameters; -import com.auth0.client.mgmt.types.ListEventStreamsResponseContent; -import com.auth0.client.mgmt.types.UpdateEventStreamRequestContent; -import com.auth0.client.mgmt.types.UpdateEventStreamResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawEventStreamsClient { - protected final ClientOptions clientOptions; - - public AsyncRawEventStreamsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public CompletableFuture>> list() { - return list(ListEventStreamsRequestParameters.builder().build()); - } - - public CompletableFuture>> list( - ListEventStreamsRequestParameters request) { - return list(request, null); - } - - public CompletableFuture>> list( - ListEventStreamsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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()) { - ListEventStreamsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListEventStreamsResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListEventStreamsRequestParameters nextRequest = ListEventStreamsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getEventStreams().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> { - try { - return list(nextRequest, requestOptions) - .get() - .body(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - }), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (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( - EventStreamsCreateRequest request) { - return create(request, null); - } - - public CompletableFuture> create( - EventStreamsCreateRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .build(); - 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) - .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); - } - 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, CreateEventStreamResponseContent.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 (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 httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetEventStreamResponseContent.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 (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 httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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, UpdateEventStreamRequestContent.builder().build()); - } - - public CompletableFuture> update( - String id, UpdateEventStreamRequestContent request) { - return update(id, request, null); - } - - public CompletableFuture> update( - String id, UpdateEventStreamRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateEventStreamResponseContent.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 (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> test( - String id, CreateEventStreamTestEventRequestContent request) { - return test(id, request, null); - } - - public CompletableFuture> test( - String id, CreateEventStreamTestEventRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .addPathSegment(id) - .addPathSegments("test") - .build(); - 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) - .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); - } - 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, CreateEventStreamTestEventResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawFlowsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawFlowsClient.java deleted file mode 100644 index 29cc968d7..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawFlowsClient.java +++ /dev/null @@ -1,505 +0,0 @@ -/** - * 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.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.types.CreateFlowRequestContent; -import com.auth0.client.mgmt.types.CreateFlowResponseContent; -import com.auth0.client.mgmt.types.FlowSummary; -import com.auth0.client.mgmt.types.GetFlowRequestParameters; -import com.auth0.client.mgmt.types.GetFlowResponseContent; -import com.auth0.client.mgmt.types.ListFlowsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListFlowsRequestParameters; -import com.auth0.client.mgmt.types.UpdateFlowRequestContent; -import com.auth0.client.mgmt.types.UpdateFlowResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawFlowsClient { - protected final ClientOptions clientOptions; - - public AsyncRawFlowsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public CompletableFuture>> list() { - return list(ListFlowsRequestParameters.builder().build()); - } - - public CompletableFuture>> list( - ListFlowsRequestParameters request) { - return list(request, null); - } - - public CompletableFuture>> list( - ListFlowsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getSynchronous().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "synchronous", request.getSynchronous().orElse(null), false); - } - if (request.getHydrate().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "hydrate", request.getHydrate().get(), true); - } - 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); - } - 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()) { - ListFlowsOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListFlowsOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListFlowsRequestParameters nextRequest = ListFlowsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getFlows().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 (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( - CreateFlowRequestContent request) { - return create(request, null); - } - - public CompletableFuture> create( - CreateFlowRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows") - .build(); - 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) - .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); - } - 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, CreateFlowResponseContent.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 (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, GetFlowRequestParameters.builder().build()); - } - - public CompletableFuture> get( - String id, GetFlowRequestParameters request) { - return get(id, request, null); - } - - public CompletableFuture> get( - String id, GetFlowRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows") - .addPathSegment(id); - if (request.getHydrate().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "hydrate", request.getHydrate().get(), true); - } - 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); - } - 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, GetFlowResponseContent.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 (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 httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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, UpdateFlowRequestContent.builder().build()); - } - - public CompletableFuture> update( - String id, UpdateFlowRequestContent request) { - return update(id, request, null); - } - - public CompletableFuture> update( - String id, UpdateFlowRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateFlowResponseContent.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 (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/AsyncRawFormsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawFormsClient.java deleted file mode 100644 index b7337791b..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawFormsClient.java +++ /dev/null @@ -1,491 +0,0 @@ -/** - * 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.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.types.CreateFormRequestContent; -import com.auth0.client.mgmt.types.CreateFormResponseContent; -import com.auth0.client.mgmt.types.FormSummary; -import com.auth0.client.mgmt.types.GetFormRequestParameters; -import com.auth0.client.mgmt.types.GetFormResponseContent; -import com.auth0.client.mgmt.types.ListFormsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListFormsRequestParameters; -import com.auth0.client.mgmt.types.UpdateFormRequestContent; -import com.auth0.client.mgmt.types.UpdateFormResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawFormsClient { - protected final ClientOptions clientOptions; - - public AsyncRawFormsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public CompletableFuture>> list() { - return list(ListFormsRequestParameters.builder().build()); - } - - public CompletableFuture>> list( - ListFormsRequestParameters request) { - return list(request, null); - } - - public CompletableFuture>> list( - ListFormsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("forms"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (request.getHydrate().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "hydrate", request.getHydrate().get(), true); - } - 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); - } - 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()) { - ListFormsOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListFormsOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListFormsRequestParameters nextRequest = ListFormsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getForms().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 (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( - CreateFormRequestContent request) { - return create(request, null); - } - - public CompletableFuture> create( - CreateFormRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("forms") - .build(); - 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) - .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); - } - 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, CreateFormResponseContent.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 (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, GetFormRequestParameters.builder().build()); - } - - public CompletableFuture> get( - String id, GetFormRequestParameters request) { - return get(id, request, null); - } - - public CompletableFuture> get( - String id, GetFormRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("forms") - .addPathSegment(id); - if (request.getHydrate().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "hydrate", request.getHydrate().get(), true); - } - 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); - } - 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, GetFormResponseContent.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 (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 httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("forms") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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, UpdateFormRequestContent.builder().build()); - } - - public CompletableFuture> update( - String id, UpdateFormRequestContent request) { - return update(id, request, null); - } - - public CompletableFuture> update( - String id, UpdateFormRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("forms") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateFormResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawGroupsClient.java deleted file mode 100644 index 03599bae7..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawGroupsClient.java +++ /dev/null @@ -1,261 +0,0 @@ -/** - * 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.ObjectMappers; -import com.auth0.client.mgmt.core.QueryStringMapper; -import com.auth0.client.mgmt.core.RequestOptions; -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.types.GetGroupResponseContent; -import com.auth0.client.mgmt.types.Group; -import com.auth0.client.mgmt.types.ListGroupsPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListGroupsRequestParameters; -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; - } - - /** - * List all groups in your tenant. - */ - public CompletableFuture>> list() { - return list(ListGroupsRequestParameters.builder().build()); - } - - /** - * List all groups in your tenant. - */ - public CompletableFuture>> list( - ListGroupsRequestParameters request) { - return list(request, null); - } - - /** - * List all groups in your tenant. - */ - public CompletableFuture>> list( - ListGroupsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("groups"); - if (!request.getConnectionId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "connection_id", request.getConnectionId().orElse(null), false); - } - if (!request.getName().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "name", request.getName().orElse(null), false); - } - if (!request.getExternalId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "external_id", request.getExternalId().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); - } - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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()) { - ListGroupsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListGroupsPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListGroupsRequestParameters nextRequest = ListGroupsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getGroups(); - 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 (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 group by its ID. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve a group by its ID. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("groups") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetGroupResponseContent.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 (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/AsyncRawHooksClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawHooksClient.java deleted file mode 100644 index d28cfee6e..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawHooksClient.java +++ /dev/null @@ -1,563 +0,0 @@ -/** - * 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.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.CreateHookRequestContent; -import com.auth0.client.mgmt.types.CreateHookResponseContent; -import com.auth0.client.mgmt.types.GetHookRequestParameters; -import com.auth0.client.mgmt.types.GetHookResponseContent; -import com.auth0.client.mgmt.types.Hook; -import com.auth0.client.mgmt.types.ListHooksOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListHooksRequestParameters; -import com.auth0.client.mgmt.types.UpdateHookRequestContent; -import com.auth0.client.mgmt.types.UpdateHookResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawHooksClient { - protected final ClientOptions clientOptions; - - public AsyncRawHooksClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve all <a href="https://auth0.com/docs/hooks">hooks</a>. Accepts a list of fields to include or exclude in the result. - */ - public CompletableFuture>> list() { - return list(ListHooksRequestParameters.builder().build()); - } - - /** - * Retrieve all <a href="https://auth0.com/docs/hooks">hooks</a>. Accepts a list of fields to include or exclude in the result. - */ - public CompletableFuture>> list( - ListHooksRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve all <a href="https://auth0.com/docs/hooks">hooks</a>. Accepts a list of fields to include or exclude in the result. - */ - public CompletableFuture>> list( - ListHooksRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getEnabled().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "enabled", request.getEnabled().orElse(null), false); - } - if (!request.getFields().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "fields", request.getFields().orElse(null), false); - } - if (!request.getTriggerId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "triggerId", request.getTriggerId().orElse(null), false); - } - 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); - } - 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()) { - ListHooksOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListHooksOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListHooksRequestParameters nextRequest = ListHooksRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getHooks().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 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 (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 hook. - */ - public CompletableFuture> create( - CreateHookRequestContent request) { - return create(request, null); - } - - /** - * Create a new hook. - */ - public CompletableFuture> create( - CreateHookRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks") - .build(); - 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) - .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); - } - 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, CreateHookResponseContent.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 (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 href="https://auth0.com/docs/hooks">a hook</a> by its ID. Accepts a list of fields to include in the result. - */ - public CompletableFuture> get(String id) { - return get(id, GetHookRequestParameters.builder().build()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/hooks">a hook</a> by its ID. Accepts a list of fields to include in the result. - */ - public CompletableFuture> get( - String id, GetHookRequestParameters request) { - return get(id, request, null); - } - - /** - * Retrieve <a href="https://auth0.com/docs/hooks">a hook</a> by its ID. Accepts a list of fields to include in the result. - */ - public CompletableFuture> get( - String id, GetHookRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks") - .addPathSegment(id); - if (!request.getFields().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "fields", request.getFields().orElse(null), false); - } - 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); - } - 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, GetHookResponseContent.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 (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 hook. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete a hook. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 existing hook. - */ - public CompletableFuture> update(String id) { - return update(id, UpdateHookRequestContent.builder().build()); - } - - /** - * Update an existing hook. - */ - public CompletableFuture> update( - String id, UpdateHookRequestContent request) { - return update(id, request, null); - } - - /** - * Update an existing hook. - */ - public CompletableFuture> update( - String id, UpdateHookRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateHookResponseContent.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 (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/AsyncRawJobsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawJobsClient.java deleted file mode 100644 index 11807f637..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawJobsClient.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * 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.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -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.GetJobResponseContent; -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.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawJobsClient { - protected final ClientOptions clientOptions; - - public AsyncRawJobsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieves a job. Useful to check its status. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieves a job. Useful to check its status. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetJobResponseContent.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 (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/AsyncRawLogStreamsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawLogStreamsClient.java deleted file mode 100644 index aa7e7964c..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawLogStreamsClient.java +++ /dev/null @@ -1,1171 +0,0 @@ -/** - * 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.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.CreateLogStreamRequestContent; -import com.auth0.client.mgmt.types.CreateLogStreamResponseContent; -import com.auth0.client.mgmt.types.GetLogStreamResponseContent; -import com.auth0.client.mgmt.types.LogStreamResponseSchema; -import com.auth0.client.mgmt.types.UpdateLogStreamRequestContent; -import com.auth0.client.mgmt.types.UpdateLogStreamResponseContent; -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; -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 AsyncRawLogStreamsClient { - protected final ClientOptions clientOptions; - - public AsyncRawLogStreamsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/logs/streams">log streams</a>. - *

<h5>Sample Response</h5><pre><code>[{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active|paused|suspended", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }, { - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active|paused|suspended", - * "sink": { - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpContentType": "string", - * "httpEndpoint": "string", - * "httpAuthorization": "string" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "eventgrid", - * "status": "active|paused|suspended", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string", - * "azurePartnerTopic": "string" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active|paused|suspended", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active|paused|suspended", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active|paused|suspended", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }]</code></pre>

- */ - public CompletableFuture>> list() { - return list(null); - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/logs/streams">log streams</a>. - *

<h5>Sample Response</h5><pre><code>[{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active|paused|suspended", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }, { - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active|paused|suspended", - * "sink": { - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpContentType": "string", - * "httpEndpoint": "string", - * "httpAuthorization": "string" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "eventgrid", - * "status": "active|paused|suspended", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string", - * "azurePartnerTopic": "string" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active|paused|suspended", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active|paused|suspended", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active|paused|suspended", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }]</code></pre>

- */ - public CompletableFuture>> list( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("log-streams") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture>> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, new TypeReference>() {}), - 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 (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 log stream. - *

<h5>Log Stream Types</h5> The <code>type</code> of log stream being created determines the properties required in the <code>sink</code> payload. - * <h5>HTTP Stream</h5> For an <code>http</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "http", - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpAuthorization": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active", - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Amazon EventBridge Stream</h5> For an <code>eventbridge</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "eventbridge", - * "sink": { - * "awsRegion": "string", - * "awsAccountId": "string" - * } - * }</code></pre> - * The response will include an additional field <code>awsPartnerEventSource</code> in the <code>sink</code>: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }</code></pre> - * <h5>Azure Event Grid Stream</h5> For an <code>Azure Event Grid</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "eventgrid", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string", - * "azurePartnerTopic": "string" - * } - * }</code></pre> - * <h5>Datadog Stream</h5> For a <code>Datadog</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "datadog", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Splunk Stream</h5> For a <code>Splunk</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "splunk", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Sumo Logic Stream</h5> For a <code>Sumo Logic</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "sumo", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre>

- */ - public CompletableFuture> create( - CreateLogStreamRequestContent request) { - return create(request, null); - } - - /** - * Create a log stream. - *

<h5>Log Stream Types</h5> The <code>type</code> of log stream being created determines the properties required in the <code>sink</code> payload. - * <h5>HTTP Stream</h5> For an <code>http</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "http", - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpAuthorization": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active", - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Amazon EventBridge Stream</h5> For an <code>eventbridge</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "eventbridge", - * "sink": { - * "awsRegion": "string", - * "awsAccountId": "string" - * } - * }</code></pre> - * The response will include an additional field <code>awsPartnerEventSource</code> in the <code>sink</code>: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }</code></pre> - * <h5>Azure Event Grid Stream</h5> For an <code>Azure Event Grid</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "eventgrid", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string", - * "azurePartnerTopic": "string" - * } - * }</code></pre> - * <h5>Datadog Stream</h5> For a <code>Datadog</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "datadog", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Splunk Stream</h5> For a <code>Splunk</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "splunk", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Sumo Logic Stream</h5> For a <code>Sumo Logic</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "sumo", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre>

- */ - public CompletableFuture> create( - CreateLogStreamRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("log-streams") - .build(); - 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) - .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); - } - 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, CreateLogStreamResponseContent.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 (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 log stream configuration and status. - *

<h5>Sample responses</h5><h5>Amazon EventBridge Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active|paused|suspended", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }</code></pre> <h5>HTTP Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active|paused|suspended", - * "sink": { - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpContentType": "string", - * "httpEndpoint": "string", - * "httpAuthorization": "string" - * } - * }</code></pre> <h5>Datadog Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active|paused|suspended", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * }

- *

}</code></pre><h5>Mixpanel</h5>

- *
Request: <pre><code>{
-     *   "name": "string",
-     *   "type": "mixpanel",
-     *   "sink": {
-     * 	"mixpanelRegion": "string", // "us" | "eu",
-     * 	"mixpanelProjectId": "string",
-     * 	"mixpanelServiceAccountUsername": "string",
-     * 	"mixpanelServiceAccountPassword": "string"
-     *   }
-     * } </code></pre>
-     *
-     *
-     * Response: <pre><code>{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "mixpanel",
-     * 	"status": "active",
-     * 	"sink": {
-     * 	  "mixpanelRegion": "string", // "us" | "eu",
-     * 	  "mixpanelProjectId": "string",
-     * 	  "mixpanelServiceAccountUsername": "string",
-     * 	  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-     * 	}
-     *   } </code></pre>
-     *
-     * <h5>Segment</h5>
-     *
-     * Request: <pre><code> {
-     *   "name": "string",
-     *   "type": "segment",
-     *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * }</code></pre>
-     *
-     * Response: <pre><code>{
-     *   "id": "string",
-     *   "name": "string",
-     *   "type": "segment",
-     *   "status": "active",
-     *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * } </code></pre>
-     * 
- *

<h5>Splunk Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active|paused|suspended", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> <h5>Sumo Logic Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active|paused|suspended", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre> <h5>Status</h5> The <code>status</code> of a log stream maybe any of the following: - * 1. <code>active</code> - Stream is currently enabled. - * 2. <code>paused</code> - Stream is currently user disabled and will not attempt log delivery. - * 3. <code>suspended</code> - Stream is currently disabled because of errors and will not attempt log delivery.

- */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve a log stream configuration and status. - *

<h5>Sample responses</h5><h5>Amazon EventBridge Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active|paused|suspended", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }</code></pre> <h5>HTTP Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active|paused|suspended", - * "sink": { - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpContentType": "string", - * "httpEndpoint": "string", - * "httpAuthorization": "string" - * } - * }</code></pre> <h5>Datadog Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active|paused|suspended", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * }

- *

}</code></pre><h5>Mixpanel</h5>

- *
Request: <pre><code>{
-     *   "name": "string",
-     *   "type": "mixpanel",
-     *   "sink": {
-     * 	"mixpanelRegion": "string", // "us" | "eu",
-     * 	"mixpanelProjectId": "string",
-     * 	"mixpanelServiceAccountUsername": "string",
-     * 	"mixpanelServiceAccountPassword": "string"
-     *   }
-     * } </code></pre>
-     *
-     *
-     * Response: <pre><code>{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "mixpanel",
-     * 	"status": "active",
-     * 	"sink": {
-     * 	  "mixpanelRegion": "string", // "us" | "eu",
-     * 	  "mixpanelProjectId": "string",
-     * 	  "mixpanelServiceAccountUsername": "string",
-     * 	  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-     * 	}
-     *   } </code></pre>
-     *
-     * <h5>Segment</h5>
-     *
-     * Request: <pre><code> {
-     *   "name": "string",
-     *   "type": "segment",
-     *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * }</code></pre>
-     *
-     * Response: <pre><code>{
-     *   "id": "string",
-     *   "name": "string",
-     *   "type": "segment",
-     *   "status": "active",
-     *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * } </code></pre>
-     * 
- *

<h5>Splunk Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active|paused|suspended", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> <h5>Sumo Logic Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active|paused|suspended", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre> <h5>Status</h5> The <code>status</code> of a log stream maybe any of the following: - * 1. <code>active</code> - Stream is currently enabled. - * 2. <code>paused</code> - Stream is currently user disabled and will not attempt log delivery. - * 3. <code>suspended</code> - Stream is currently disabled because of errors and will not attempt log delivery.

- */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("log-streams") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetLogStreamResponseContent.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 (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 log stream. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete a log stream. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("log-streams") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 log stream. - *

<h4>Examples of how to use the PATCH endpoint.</h4> The following fields may be updated in a PATCH operation: <ul><li>name</li><li>status</li><li>sink</li></ul> Note: For log streams of type <code>eventbridge</code> and <code>eventgrid</code>, updating the <code>sink</code> is not permitted. - * <h5>Update the status of a log stream</h5><pre><code>{ - * "status": "active|paused" - * }</code></pre> - * <h5>Update the name of a log stream</h5><pre><code>{ - * "name": "string" - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>http</code></h5><pre><code>{ - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONARRAY|JSONLINES", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>datadog</code></h5><pre><code>{ - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>splunk</code></h5><pre><code>{ - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>sumo</code></h5><pre><code>{ - * "sink": { - * "sumoSourceAddress": "string" - * } - * }</code></pre>

- */ - public CompletableFuture> update(String id) { - return update(id, UpdateLogStreamRequestContent.builder().build()); - } - - /** - * Update a log stream. - *

<h4>Examples of how to use the PATCH endpoint.</h4> The following fields may be updated in a PATCH operation: <ul><li>name</li><li>status</li><li>sink</li></ul> Note: For log streams of type <code>eventbridge</code> and <code>eventgrid</code>, updating the <code>sink</code> is not permitted. - * <h5>Update the status of a log stream</h5><pre><code>{ - * "status": "active|paused" - * }</code></pre> - * <h5>Update the name of a log stream</h5><pre><code>{ - * "name": "string" - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>http</code></h5><pre><code>{ - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONARRAY|JSONLINES", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>datadog</code></h5><pre><code>{ - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>splunk</code></h5><pre><code>{ - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>sumo</code></h5><pre><code>{ - * "sink": { - * "sumoSourceAddress": "string" - * } - * }</code></pre>

- */ - public CompletableFuture> update( - String id, UpdateLogStreamRequestContent request) { - return update(id, request, null); - } - - /** - * Update a log stream. - *

<h4>Examples of how to use the PATCH endpoint.</h4> The following fields may be updated in a PATCH operation: <ul><li>name</li><li>status</li><li>sink</li></ul> Note: For log streams of type <code>eventbridge</code> and <code>eventgrid</code>, updating the <code>sink</code> is not permitted. - * <h5>Update the status of a log stream</h5><pre><code>{ - * "status": "active|paused" - * }</code></pre> - * <h5>Update the name of a log stream</h5><pre><code>{ - * "name": "string" - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>http</code></h5><pre><code>{ - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONARRAY|JSONLINES", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>datadog</code></h5><pre><code>{ - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>splunk</code></h5><pre><code>{ - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>sumo</code></h5><pre><code>{ - * "sink": { - * "sumoSourceAddress": "string" - * } - * }</code></pre>

- */ - public CompletableFuture> update( - String id, UpdateLogStreamRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("log-streams") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateLogStreamResponseContent.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 (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/AsyncRawLogsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawLogsClient.java deleted file mode 100644 index c0ac5efc2..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawLogsClient.java +++ /dev/null @@ -1,319 +0,0 @@ -/** - * 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.ObjectMappers; -import com.auth0.client.mgmt.core.QueryStringMapper; -import com.auth0.client.mgmt.core.RequestOptions; -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.types.GetLogResponseContent; -import com.auth0.client.mgmt.types.ListLogOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListLogsRequestParameters; -import com.auth0.client.mgmt.types.Log; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawLogsClient { - protected final ClientOptions clientOptions; - - public AsyncRawLogsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve log entries that match the specified search criteria (or all log entries if no criteria specified). - *

Set custom search criteria using the <code>q</code> parameter, or search from a specific log ID (<i>"search from checkpoint"</i>).

- *

For more information on all possible event types, their respective acronyms, and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

<h5>To set custom search criteria, use the following parameters:</h5>

- *

<ul> - * <li><b>q:</b> Search Criteria using <a href="https://auth0.com/docs/logs/log-search-query-syntax">Query String Syntax</a></li> - * <li><b>page:</b> Page index of the results to return. First page is 0.</li> - * <li><b>per_page:</b> Number of results per page.</li> - * <li><b>sort:</b> Field to use for sorting appended with `:1` for ascending and `:-1` for descending. e.g. `date:-1`</li> - * <li><b>fields:</b> Comma-separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields.</li> - * <li><b>include_fields:</b> Whether specified fields are to be included (true) or excluded (false).</li> - * <li><b>include_totals:</b> Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). <b>Deprecated:</b> this field is deprecated and should be removed from use. See <a href="https://auth0.com/docs/product-lifecycle/deprecations-and-migrations/migrate-to-tenant-log-search-v3#pagination">Search Engine V3 Breaking Changes</a></li> - * </ul>

- *

For more information on the list of fields that can be used in <code>fields</code> and <code>sort</code>, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may paginate only through 1,000 search results. If you exceed this threshold, please redefine your search or use the <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#retrieve-logs-by-checkpoint">get logs by checkpoint method</a>.

- *

<h5>To search from a checkpoint log ID, use the following parameters:</h5> - * <ul> - * <li><b>from:</b> Log Event ID from which to start retrieving logs. You can limit the number of logs returned using the <code>take</code> parameter. If you use <code>from</code> at the same time as <code>q</code>, <code>from</code> takes precedence and <code>q</code> is ignored.</li> - * <li><b>take:</b> Number of entries to retrieve when using the <code>from</code> parameter.</li> - * </ul>

- *

<strong>Important:</strong> When fetching logs from a checkpoint log ID, any parameter other than <code>from</code> and <code>take</code> will be ignored, and date ordering is not guaranteed.

- */ - public CompletableFuture>> list() { - return list(ListLogsRequestParameters.builder().build()); - } - - /** - * Retrieve log entries that match the specified search criteria (or all log entries if no criteria specified). - *

Set custom search criteria using the <code>q</code> parameter, or search from a specific log ID (<i>"search from checkpoint"</i>).

- *

For more information on all possible event types, their respective acronyms, and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

<h5>To set custom search criteria, use the following parameters:</h5>

- *

<ul> - * <li><b>q:</b> Search Criteria using <a href="https://auth0.com/docs/logs/log-search-query-syntax">Query String Syntax</a></li> - * <li><b>page:</b> Page index of the results to return. First page is 0.</li> - * <li><b>per_page:</b> Number of results per page.</li> - * <li><b>sort:</b> Field to use for sorting appended with `:1` for ascending and `:-1` for descending. e.g. `date:-1`</li> - * <li><b>fields:</b> Comma-separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields.</li> - * <li><b>include_fields:</b> Whether specified fields are to be included (true) or excluded (false).</li> - * <li><b>include_totals:</b> Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). <b>Deprecated:</b> this field is deprecated and should be removed from use. See <a href="https://auth0.com/docs/product-lifecycle/deprecations-and-migrations/migrate-to-tenant-log-search-v3#pagination">Search Engine V3 Breaking Changes</a></li> - * </ul>

- *

For more information on the list of fields that can be used in <code>fields</code> and <code>sort</code>, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may paginate only through 1,000 search results. If you exceed this threshold, please redefine your search or use the <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#retrieve-logs-by-checkpoint">get logs by checkpoint method</a>.

- *

<h5>To search from a checkpoint log ID, use the following parameters:</h5> - * <ul> - * <li><b>from:</b> Log Event ID from which to start retrieving logs. You can limit the number of logs returned using the <code>take</code> parameter. If you use <code>from</code> at the same time as <code>q</code>, <code>from</code> takes precedence and <code>q</code> is ignored.</li> - * <li><b>take:</b> Number of entries to retrieve when using the <code>from</code> parameter.</li> - * </ul>

- *

<strong>Important:</strong> When fetching logs from a checkpoint log ID, any parameter other than <code>from</code> and <code>take</code> will be ignored, and date ordering is not guaranteed.

- */ - public CompletableFuture>> list( - ListLogsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve log entries that match the specified search criteria (or all log entries if no criteria specified). - *

Set custom search criteria using the <code>q</code> parameter, or search from a specific log ID (<i>"search from checkpoint"</i>).

- *

For more information on all possible event types, their respective acronyms, and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

<h5>To set custom search criteria, use the following parameters:</h5>

- *

<ul> - * <li><b>q:</b> Search Criteria using <a href="https://auth0.com/docs/logs/log-search-query-syntax">Query String Syntax</a></li> - * <li><b>page:</b> Page index of the results to return. First page is 0.</li> - * <li><b>per_page:</b> Number of results per page.</li> - * <li><b>sort:</b> Field to use for sorting appended with `:1` for ascending and `:-1` for descending. e.g. `date:-1`</li> - * <li><b>fields:</b> Comma-separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields.</li> - * <li><b>include_fields:</b> Whether specified fields are to be included (true) or excluded (false).</li> - * <li><b>include_totals:</b> Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). <b>Deprecated:</b> this field is deprecated and should be removed from use. See <a href="https://auth0.com/docs/product-lifecycle/deprecations-and-migrations/migrate-to-tenant-log-search-v3#pagination">Search Engine V3 Breaking Changes</a></li> - * </ul>

- *

For more information on the list of fields that can be used in <code>fields</code> and <code>sort</code>, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may paginate only through 1,000 search results. If you exceed this threshold, please redefine your search or use the <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#retrieve-logs-by-checkpoint">get logs by checkpoint method</a>.

- *

<h5>To search from a checkpoint log ID, use the following parameters:</h5> - * <ul> - * <li><b>from:</b> Log Event ID from which to start retrieving logs. You can limit the number of logs returned using the <code>take</code> parameter. If you use <code>from</code> at the same time as <code>q</code>, <code>from</code> takes precedence and <code>q</code> is ignored.</li> - * <li><b>take:</b> Number of entries to retrieve when using the <code>from</code> parameter.</li> - * </ul>

- *

<strong>Important:</strong> When fetching logs from a checkpoint log ID, any parameter other than <code>from</code> and <code>take</code> will be ignored, and date ordering is not guaranteed.

- */ - public CompletableFuture>> list( - ListLogsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("logs"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - if (!request.getSort().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sort", request.getSort().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, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getSearch().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "search", request.getSearch().orElse(null), false); - } - 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); - } - 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()) { - ListLogOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListLogOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListLogsRequestParameters nextRequest = ListLogsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getLogs().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 (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 an individual log event. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve an individual log event. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("logs") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetLogResponseContent.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 (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/AsyncRawNetworkAclsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawNetworkAclsClient.java deleted file mode 100644 index f5d815ae3..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawNetworkAclsClient.java +++ /dev/null @@ -1,634 +0,0 @@ -/** - * 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.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.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.CreateNetworkAclRequestContent; -import com.auth0.client.mgmt.types.GetNetworkAclsResponseContent; -import com.auth0.client.mgmt.types.ListNetworkAclsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListNetworkAclsRequestParameters; -import com.auth0.client.mgmt.types.NetworkAclsResponseContent; -import com.auth0.client.mgmt.types.SetNetworkAclRequestContent; -import com.auth0.client.mgmt.types.SetNetworkAclsResponseContent; -import com.auth0.client.mgmt.types.UpdateNetworkAclRequestContent; -import com.auth0.client.mgmt.types.UpdateNetworkAclResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawNetworkAclsClient { - protected final ClientOptions clientOptions; - - public AsyncRawNetworkAclsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Get all access control list entries for your client. - */ - public CompletableFuture>> list() { - return list(ListNetworkAclsRequestParameters.builder().build()); - } - - /** - * Get all access control list entries for your client. - */ - public CompletableFuture>> list( - ListNetworkAclsRequestParameters request) { - return list(request, null); - } - - /** - * Get all access control list entries for your client. - */ - public CompletableFuture>> list( - ListNetworkAclsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("network-acls"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - 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()) { - ListNetworkAclsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListNetworkAclsOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListNetworkAclsRequestParameters nextRequest = ListNetworkAclsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getNetworkAcls().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, result, parsedResponse, () -> { - try { - return list(nextRequest, requestOptions) - .get() - .body(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - }), - 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 (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 access control list for your client. - */ - public CompletableFuture> create(CreateNetworkAclRequestContent request) { - return create(request, null); - } - - /** - * Create a new access control list for your client. - */ - public CompletableFuture> create( - CreateNetworkAclRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("network-acls") - .build(); - 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) - .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); - } - 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; - 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 (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 access control list entry for your client. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Get a specific access control list entry for your client. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("network-acls") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetNetworkAclsResponseContent.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 (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 existing access control list for your client. - */ - public CompletableFuture> set( - String id, SetNetworkAclRequestContent request) { - return set(id, request, null); - } - - /** - * Update existing access control list for your client. - */ - public CompletableFuture> set( - String id, SetNetworkAclRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("network-acls") - .addPathSegment(id) - .build(); - 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) - .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<>(); - 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, SetNetworkAclsResponseContent.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 (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 existing access control list for your client. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete existing access control list for your client. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("network-acls") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 existing access control list for your client. - */ - public CompletableFuture> update(String id) { - return update(id, UpdateNetworkAclRequestContent.builder().build()); - } - - /** - * Update existing access control list for your client. - */ - public CompletableFuture> update( - String id, UpdateNetworkAclRequestContent request) { - return update(id, request, null); - } - - /** - * Update existing access control list for your client. - */ - public CompletableFuture> update( - String id, UpdateNetworkAclRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("network-acls") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateNetworkAclResponseContent.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 (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/AsyncRawOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawOrganizationsClient.java deleted file mode 100644 index a8337deb8..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawOrganizationsClient.java +++ /dev/null @@ -1,659 +0,0 @@ -/** - * 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.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.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.ListOrganizationsPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListOrganizationsRequestParameters; -import com.auth0.client.mgmt.types.Organization; -import com.auth0.client.mgmt.types.UpdateOrganizationRequestContent; -import com.auth0.client.mgmt.types.UpdateOrganizationResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawOrganizationsClient { - protected final ClientOptions clientOptions; - - public AsyncRawOrganizationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve detailed list of all Organizations available in your tenant. For more information, see Auth0 Organizations. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total number of entries to retrieve when using the <code>from</code> parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture>> list() { - return list(ListOrganizationsRequestParameters.builder().build()); - } - - /** - * Retrieve detailed list of all Organizations available in your tenant. For more information, see Auth0 Organizations. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total number of entries to retrieve when using the <code>from</code> parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture>> list( - ListOrganizationsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve detailed list of all Organizations available in your tenant. For more information, see Auth0 Organizations. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total number of entries to retrieve when using the <code>from</code> parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture>> list( - ListOrganizationsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - if (!request.getSort().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sort", request.getSort().orElse(null), false); - } - 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); - } - 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()) { - ListOrganizationsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListOrganizationsPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListOrganizationsRequestParameters nextRequest = ListOrganizationsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getOrganizations().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> { - try { - return list(nextRequest, requestOptions) - .get() - .body(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - }), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (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 Organization within your tenant. To learn more about Organization settings, behavior, and configuration options, review <a href="https://auth0.com/docs/manage-users/organizations/create-first-organization">Create Your First Organization</a>. - */ - public CompletableFuture> create( - CreateOrganizationRequestContent request) { - return create(request, null); - } - - /** - * Create a new Organization within your tenant. To learn more about Organization settings, behavior, and configuration options, review <a href="https://auth0.com/docs/manage-users/organizations/create-first-organization">Create Your First Organization</a>. - */ - public CompletableFuture> create( - CreateOrganizationRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .build(); - 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) - .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); - } - 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, CreateOrganizationResponseContent.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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve details about a single Organization specified by name. - */ - public CompletableFuture> getByName(String name) { - return getByName(name, null); - } - - /** - * Retrieve details about a single Organization specified by name. - */ - public CompletableFuture> getByName( - String name, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations/name") - .addPathSegment(name) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetOrganizationByNameResponseContent.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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve details about a single Organization specified by ID. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve details about a single Organization specified by ID. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetOrganizationResponseContent.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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Remove an Organization from your tenant. This action cannot be undone. - *

<b>Note</b>: Members are automatically disassociated from an Organization when it is deleted. However, this action does <b>not</b> delete these users from your tenant.

- */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Remove an Organization from your tenant. This action cannot be undone. - *

<b>Note</b>: Members are automatically disassociated from an Organization when it is deleted. However, this action does <b>not</b> delete these users from your tenant.

- */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update the details of a specific <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/create-organizations">Organization</a>, such as name and display name, branding options, and metadata. - */ - public CompletableFuture> update(String id) { - return update(id, UpdateOrganizationRequestContent.builder().build()); - } - - /** - * Update the details of a specific <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/create-organizations">Organization</a>, such as name and display name, branding options, and metadata. - */ - public CompletableFuture> update( - String id, UpdateOrganizationRequestContent request) { - return update(id, request, null); - } - - /** - * Update the details of a specific <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/create-organizations">Organization</a>, such as name and display name, branding options, and metadata. - */ - public CompletableFuture> update( - String id, UpdateOrganizationRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateOrganizationResponseContent.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 (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 deleted file mode 100644 index 64279e606..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawPromptsClient.java +++ /dev/null @@ -1,215 +0,0 @@ -/** - * 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.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.types.GetSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateSettingsRequestContent; -import com.auth0.client.mgmt.types.UpdateSettingsResponseContent; -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 AsyncRawPromptsClient { - protected final ClientOptions clientOptions; - - public AsyncRawPromptsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public CompletableFuture> getSettings() { - return getSettings(null); - } - - /** - * Retrieve details of the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public CompletableFuture> getSettings( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetSettingsResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public CompletableFuture> updateSettings() { - return updateSettings(UpdateSettingsRequestContent.builder().build()); - } - - /** - * Update the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public CompletableFuture> updateSettings( - UpdateSettingsRequestContent request) { - return updateSettings(request, null); - } - - /** - * Update the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public CompletableFuture> updateSettings( - UpdateSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateSettingsResponseContent.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 (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/AsyncRawRefreshTokensClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawRefreshTokensClient.java deleted file mode 100644 index 4e823b266..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawRefreshTokensClient.java +++ /dev/null @@ -1,308 +0,0 @@ -/** - * 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.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.GetRefreshTokenResponseContent; -import com.auth0.client.mgmt.types.UpdateRefreshTokenRequestContent; -import com.auth0.client.mgmt.types.UpdateRefreshTokenResponseContent; -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 AsyncRawRefreshTokensClient { - protected final ClientOptions clientOptions; - - public AsyncRawRefreshTokensClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve refresh token information. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve refresh token information. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("refresh-tokens") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetRefreshTokenResponseContent.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 (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 refresh token by its ID. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete a refresh token by its ID. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("refresh-tokens") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 refresh token by its ID. - */ - public CompletableFuture> update(String id) { - return update(id, UpdateRefreshTokenRequestContent.builder().build()); - } - - /** - * Update a refresh token by its ID. - */ - public CompletableFuture> update( - String id, UpdateRefreshTokenRequestContent request) { - return update(id, request, null); - } - - /** - * Update a refresh token by its ID. - */ - public CompletableFuture> update( - String id, UpdateRefreshTokenRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("refresh-tokens") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateRefreshTokenResponseContent.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 (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/AsyncRawResourceServersClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawResourceServersClient.java deleted file mode 100644 index ac9cd122b..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawResourceServersClient.java +++ /dev/null @@ -1,556 +0,0 @@ -/** - * 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.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.CreateResourceServerRequestContent; -import com.auth0.client.mgmt.types.CreateResourceServerResponseContent; -import com.auth0.client.mgmt.types.GetResourceServerRequestParameters; -import com.auth0.client.mgmt.types.GetResourceServerResponseContent; -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.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.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 AsyncRawResourceServersClient { - protected final ClientOptions clientOptions; - - public AsyncRawResourceServersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of all APIs associated with your tenant. - */ - public CompletableFuture>> list() { - return list(ListResourceServerRequestParameters.builder().build()); - } - - /** - * Retrieve details of all APIs associated with your tenant. - */ - public CompletableFuture>> list( - ListResourceServerRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve details of all APIs associated with your tenant. - */ - public CompletableFuture>> list( - ListResourceServerRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("resource-servers"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getIncludeFields().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); - } - if (request.getIdentifiers().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "identifiers", request.getIdentifiers().get(), true); - } - 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); - } - 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()) { - ListResourceServerOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListResourceServerOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListResourceServerRequestParameters nextRequest = ListResourceServerRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getResourceServers().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 (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 API associated with your tenant. Note that all new APIs must be registered with Auth0. For more information, read <a href="https://www.auth0.com/docs/get-started/apis"> APIs</a>. - */ - public CompletableFuture> create( - CreateResourceServerRequestContent request) { - return create(request, null); - } - - /** - * Create a new API associated with your tenant. Note that all new APIs must be registered with Auth0. For more information, read <a href="https://www.auth0.com/docs/get-started/apis"> APIs</a>. - */ - public CompletableFuture> create( - CreateResourceServerRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("resource-servers") - .build(); - 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) - .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); - } - 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, CreateResourceServerResponseContent.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 (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 href="https://auth0.com/docs/apis">API</a> details with the given ID. - */ - public CompletableFuture> get(String id) { - return get(id, GetResourceServerRequestParameters.builder().build()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/apis">API</a> details with the given ID. - */ - public CompletableFuture> get( - String id, GetResourceServerRequestParameters request) { - return get(id, request, null); - } - - /** - * Retrieve <a href="https://auth0.com/docs/apis">API</a> details with the given ID. - */ - public CompletableFuture> get( - String id, GetResourceServerRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("resource-servers") - .addPathSegment(id); - if (!request.getIncludeFields().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); - } - 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); - } - 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, GetResourceServerResponseContent.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 (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 existing API by ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete an existing API by ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("resource-servers") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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; - } - - /** - * Change an existing API setting by resource server ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public CompletableFuture> update(String id) { - return update(id, UpdateResourceServerRequestContent.builder().build()); - } - - /** - * Change an existing API setting by resource server ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public CompletableFuture> update( - String id, UpdateResourceServerRequestContent request) { - return update(id, request, null); - } - - /** - * Change an existing API setting by resource server ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public CompletableFuture> update( - String id, UpdateResourceServerRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("resource-servers") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateResourceServerResponseContent.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 (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/AsyncRawRolesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawRolesClient.java deleted file mode 100644 index f89c0e8fe..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawRolesClient.java +++ /dev/null @@ -1,538 +0,0 @@ -/** - * 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.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.CreateRoleRequestContent; -import com.auth0.client.mgmt.types.CreateRoleResponseContent; -import com.auth0.client.mgmt.types.GetRoleResponseContent; -import com.auth0.client.mgmt.types.ListRolesOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListRolesRequestParameters; -import com.auth0.client.mgmt.types.Role; -import com.auth0.client.mgmt.types.UpdateRoleRequestContent; -import com.auth0.client.mgmt.types.UpdateRoleResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawRolesClient { - protected final ClientOptions clientOptions; - - public AsyncRawRolesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve detailed list of user roles created in your tenant. - *

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

- */ - public CompletableFuture>> list() { - return list(ListRolesRequestParameters.builder().build()); - } - - /** - * Retrieve detailed list of user roles created in your tenant. - *

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

- */ - public CompletableFuture>> list( - ListRolesRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve detailed list of user roles created in your tenant. - *

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

- */ - public CompletableFuture>> list( - ListRolesRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles"); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getNameFilter().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "name_filter", request.getNameFilter().orElse(null), false); - } - 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); - } - 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()) { - ListRolesOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListRolesOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListRolesRequestParameters nextRequest = ListRolesRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getRoles().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 (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 user role for <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles are not associated with any permissions by default. To assign existing permissions to your role, review Associate Permissions with a Role. To create new permissions, review Add API Permissions.

- */ - public CompletableFuture> create( - CreateRoleRequestContent request) { - return create(request, null); - } - - /** - * Create a user role for <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles are not associated with any permissions by default. To assign existing permissions to your role, review Associate Permissions with a Role. To create new permissions, review Add API Permissions.

- */ - public CompletableFuture> create( - CreateRoleRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .build(); - 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) - .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); - } - 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, CreateRoleResponseContent.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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve details about a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve details about a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetRoleResponseContent.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 (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 specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> from your tenant. Once deleted, it is removed from any user who was previously assigned that role. This action cannot be undone. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> from your tenant. Once deleted, it is removed from any user who was previously assigned that role. This action cannot be undone. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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; - } - - /** - * Modify the details of a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public CompletableFuture> update(String id) { - return update(id, UpdateRoleRequestContent.builder().build()); - } - - /** - * Modify the details of a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public CompletableFuture> update( - String id, UpdateRoleRequestContent request) { - return update(id, request, null); - } - - /** - * Modify the details of a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public CompletableFuture> update( - String id, UpdateRoleRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateRoleResponseContent.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 (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/AsyncRawRulesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawRulesClient.java deleted file mode 100644 index f450b876a..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawRulesClient.java +++ /dev/null @@ -1,569 +0,0 @@ -/** - * 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.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.CreateRuleRequestContent; -import com.auth0.client.mgmt.types.CreateRuleResponseContent; -import com.auth0.client.mgmt.types.GetRuleRequestParameters; -import com.auth0.client.mgmt.types.GetRuleResponseContent; -import com.auth0.client.mgmt.types.ListRulesOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListRulesRequestParameters; -import com.auth0.client.mgmt.types.Rule; -import com.auth0.client.mgmt.types.UpdateRuleRequestContent; -import com.auth0.client.mgmt.types.UpdateRuleResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawRulesClient { - protected final ClientOptions clientOptions; - - public AsyncRawRulesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a filtered list of <a href="https://auth0.com/docs/rules">rules</a>. Accepts a list of fields to include or exclude. - */ - public CompletableFuture>> list() { - return list(ListRulesRequestParameters.builder().build()); - } - - /** - * Retrieve a filtered list of <a href="https://auth0.com/docs/rules">rules</a>. Accepts a list of fields to include or exclude. - */ - public CompletableFuture>> list( - ListRulesRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve a filtered list of <a href="https://auth0.com/docs/rules">rules</a>. Accepts a list of fields to include or exclude. - */ - public CompletableFuture>> list( - ListRulesRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("rules"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getEnabled().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "enabled", request.getEnabled().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); - } - 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); - } - 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()) { - ListRulesOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListRulesOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListRulesRequestParameters nextRequest = ListRulesRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getRules().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 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 (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 <a href="https://auth0.com/docs/rules#create-a-new-rule-using-the-management-api">new rule</a>. - *

Note: Changing a rule's stage of execution from the default <code>login_success</code> can change the rule's function signature to have user omitted.

- */ - public CompletableFuture> create( - CreateRuleRequestContent request) { - return create(request, null); - } - - /** - * Create a <a href="https://auth0.com/docs/rules#create-a-new-rule-using-the-management-api">new rule</a>. - *

Note: Changing a rule's stage of execution from the default <code>login_success</code> can change the rule's function signature to have user omitted.

- */ - public CompletableFuture> create( - CreateRuleRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("rules") - .build(); - 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) - .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); - } - 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, CreateRuleResponseContent.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 (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 href="https://auth0.com/docs/rules">rule</a> details. Accepts a list of fields to include or exclude in the result. - */ - public CompletableFuture> get(String id) { - return get(id, GetRuleRequestParameters.builder().build()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/rules">rule</a> details. Accepts a list of fields to include or exclude in the result. - */ - public CompletableFuture> get( - String id, GetRuleRequestParameters request) { - return get(id, request, null); - } - - /** - * Retrieve <a href="https://auth0.com/docs/rules">rule</a> details. Accepts a list of fields to include or exclude in the result. - */ - public CompletableFuture> get( - String id, GetRuleRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("rules") - .addPathSegment(id); - 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); - } - 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); - } - 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, GetRuleResponseContent.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 (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 rule. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete a rule. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("rules") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 existing rule. - */ - public CompletableFuture> update(String id) { - return update(id, UpdateRuleRequestContent.builder().build()); - } - - /** - * Update an existing rule. - */ - public CompletableFuture> update( - String id, UpdateRuleRequestContent request) { - return update(id, request, null); - } - - /** - * Update an existing rule. - */ - public CompletableFuture> update( - String id, UpdateRuleRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("rules") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateRuleResponseContent.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 (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/AsyncRawRulesConfigsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawRulesConfigsClient.java deleted file mode 100644 index 8e748ce1a..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawRulesConfigsClient.java +++ /dev/null @@ -1,282 +0,0 @@ -/** - * 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.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.types.RulesConfig; -import com.auth0.client.mgmt.types.SetRulesConfigRequestContent; -import com.auth0.client.mgmt.types.SetRulesConfigResponseContent; -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; -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 AsyncRawRulesConfigsClient { - protected final ClientOptions clientOptions; - - public AsyncRawRulesConfigsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve rules config variable keys. - *
Note: For security, config variable values cannot be retrieved outside rule execution.
-     * 
- */ - public CompletableFuture>> list() { - return list(null); - } - - /** - * Retrieve rules config variable keys. - *
Note: For security, config variable values cannot be retrieved outside rule execution.
-     * 
- */ - public CompletableFuture>> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("rules-configs") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture>> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, new TypeReference>() {}), - response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Sets a rules config variable. - */ - public CompletableFuture> set( - String key, SetRulesConfigRequestContent request) { - return set(key, request, null); - } - - /** - * Sets a rules config variable. - */ - public CompletableFuture> set( - String key, SetRulesConfigRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("rules-configs") - .addPathSegment(key) - .build(); - 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) - .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<>(); - 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, SetRulesConfigResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Delete a rules config variable identified by its key. - */ - public CompletableFuture> delete(String key) { - return delete(key, null); - } - - /** - * Delete a rules config variable identified by its key. - */ - public CompletableFuture> delete(String key, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("rules-configs") - .addPathSegment(key) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawSelfServiceProfilesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawSelfServiceProfilesClient.java deleted file mode 100644 index 5dc12e7a7..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawSelfServiceProfilesClient.java +++ /dev/null @@ -1,558 +0,0 @@ -/** - * 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.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.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.CreateSelfServiceProfileRequestContent; -import com.auth0.client.mgmt.types.CreateSelfServiceProfileResponseContent; -import com.auth0.client.mgmt.types.GetSelfServiceProfileResponseContent; -import com.auth0.client.mgmt.types.ListSelfServiceProfilesPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListSelfServiceProfilesRequestParameters; -import com.auth0.client.mgmt.types.SelfServiceProfile; -import com.auth0.client.mgmt.types.UpdateSelfServiceProfileRequestContent; -import com.auth0.client.mgmt.types.UpdateSelfServiceProfileResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawSelfServiceProfilesClient { - protected final ClientOptions clientOptions; - - public AsyncRawSelfServiceProfilesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieves self-service profiles. - */ - public CompletableFuture>> list() { - return list(ListSelfServiceProfilesRequestParameters.builder().build()); - } - - /** - * Retrieves self-service profiles. - */ - public CompletableFuture>> list( - ListSelfServiceProfilesRequestParameters request) { - return list(request, null); - } - - /** - * Retrieves self-service profiles. - */ - public CompletableFuture>> list( - ListSelfServiceProfilesRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - 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()) { - ListSelfServiceProfilesPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListSelfServiceProfilesPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListSelfServiceProfilesRequestParameters nextRequest = - ListSelfServiceProfilesRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getSelfServiceProfiles().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, result, parsedResponse, () -> { - try { - return list(nextRequest, requestOptions) - .get() - .body(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - }), - 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; - 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 (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; - } - - /** - * Creates a self-service profile. - */ - public CompletableFuture> create( - CreateSelfServiceProfileRequestContent request) { - return create(request, null); - } - - /** - * Creates a self-service profile. - */ - public CompletableFuture> create( - CreateSelfServiceProfileRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles") - .build(); - 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) - .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); - } - 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, CreateSelfServiceProfileResponseContent.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; - 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 (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; - } - - /** - * Retrieves a self-service profile by Id. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieves a self-service profile by Id. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetSelfServiceProfileResponseContent.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 (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; - } - - /** - * Deletes a self-service profile by Id. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Deletes a self-service profile by Id. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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; - 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 (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; - } - - /** - * Updates a self-service profile. - */ - public CompletableFuture> update(String id) { - return update(id, UpdateSelfServiceProfileRequestContent.builder().build()); - } - - /** - * Updates a self-service profile. - */ - public CompletableFuture> update( - String id, UpdateSelfServiceProfileRequestContent request) { - return update(id, request, null); - } - - /** - * Updates a self-service profile. - */ - public CompletableFuture> update( - String id, UpdateSelfServiceProfileRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateSelfServiceProfileResponseContent.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 (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/AsyncRawSessionsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawSessionsClient.java deleted file mode 100644 index 91f62050a..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawSessionsClient.java +++ /dev/null @@ -1,392 +0,0 @@ -/** - * 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.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.GetSessionResponseContent; -import com.auth0.client.mgmt.types.UpdateSessionRequestContent; -import com.auth0.client.mgmt.types.UpdateSessionResponseContent; -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 AsyncRawSessionsClient { - protected final ClientOptions clientOptions; - - public AsyncRawSessionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve session information. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve session information. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("sessions") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetSessionResponseContent.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 (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 session by ID. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete a session by ID. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("sessions") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 session information. - */ - public CompletableFuture> update(String id) { - return update(id, UpdateSessionRequestContent.builder().build()); - } - - /** - * Update session information. - */ - public CompletableFuture> update( - String id, UpdateSessionRequestContent request) { - return update(id, request, null); - } - - /** - * Update session information. - */ - public CompletableFuture> update( - String id, UpdateSessionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("sessions") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateSessionResponseContent.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 (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; - } - - /** - * Revokes a session by ID and all associated refresh tokens. - */ - public CompletableFuture> revoke(String id) { - return revoke(id, null); - } - - /** - * Revokes a session by ID and all associated refresh tokens. - */ - public CompletableFuture> revoke(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("sessions") - .addPathSegment(id) - .addPathSegments("revoke") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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/AsyncRawStatsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawStatsClient.java deleted file mode 100644 index 77b5c4689..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawStatsClient.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * 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.ObjectMappers; -import com.auth0.client.mgmt.core.QueryStringMapper; -import com.auth0.client.mgmt.core.RequestOptions; -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.types.DailyStats; -import com.auth0.client.mgmt.types.GetDailyStatsRequestParameters; -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; -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 AsyncRawStatsClient { - protected final ClientOptions clientOptions; - - public AsyncRawStatsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve the number of active users that logged in during the last 30 days. - */ - public CompletableFuture> getActiveUsersCount() { - return getActiveUsersCount(null); - } - - /** - * Retrieve the number of active users that logged in during the last 30 days. - */ - public CompletableFuture> getActiveUsersCount(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("stats/active-users") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, double.class), response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve the number of logins, signups and breached-password detections (subscription required) that occurred each day within a specified date range. - */ - public CompletableFuture>> getDaily() { - return getDaily(GetDailyStatsRequestParameters.builder().build()); - } - - /** - * Retrieve the number of logins, signups and breached-password detections (subscription required) that occurred each day within a specified date range. - */ - public CompletableFuture>> getDaily( - GetDailyStatsRequestParameters request) { - return getDaily(request, null); - } - - /** - * Retrieve the number of logins, signups and breached-password detections (subscription required) that occurred each day within a specified date range. - */ - public CompletableFuture>> getDaily( - GetDailyStatsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("stats/daily"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - if (!request.getTo().isAbsent()) { - QueryStringMapper.addQueryParameter(httpUrl, "to", request.getTo().orElse(null), false); - } - 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); - } - 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 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawSupplementalSignalsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawSupplementalSignalsClient.java deleted file mode 100644 index c2336bc33..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawSupplementalSignalsClient.java +++ /dev/null @@ -1,215 +0,0 @@ -/** - * 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.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.GetSupplementalSignalsResponseContent; -import com.auth0.client.mgmt.types.PatchSupplementalSignalsResponseContent; -import com.auth0.client.mgmt.types.UpdateSupplementalSignalsRequestContent; -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 AsyncRawSupplementalSignalsClient { - protected final ClientOptions clientOptions; - - public AsyncRawSupplementalSignalsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Get the supplemental signals configuration for a tenant. - */ - public CompletableFuture> get() { - return get(null); - } - - /** - * Get the supplemental signals configuration for a tenant. - */ - public CompletableFuture> get( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("supplemental-signals") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetSupplementalSignalsResponseContent.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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update the supplemental signals configuration for a tenant. - */ - public CompletableFuture> patch( - UpdateSupplementalSignalsRequestContent request) { - return patch(request, null); - } - - /** - * Update the supplemental signals configuration for a tenant. - */ - public CompletableFuture> patch( - UpdateSupplementalSignalsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("supplemental-signals") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, PatchSupplementalSignalsResponseContent.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 (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/AsyncRawTicketsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawTicketsClient.java deleted file mode 100644 index 10e1c2b1f..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawTicketsClient.java +++ /dev/null @@ -1,246 +0,0 @@ -/** - * 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.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.ChangePasswordTicketRequestContent; -import com.auth0.client.mgmt.types.ChangePasswordTicketResponseContent; -import com.auth0.client.mgmt.types.VerifyEmailTicketRequestContent; -import com.auth0.client.mgmt.types.VerifyEmailTicketResponseContent; -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 AsyncRawTicketsClient { - protected final ClientOptions clientOptions; - - public AsyncRawTicketsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Create an email verification ticket for a given user. An email verification ticket is a generated URL that the user can consume to verify their email address. - */ - public CompletableFuture> verifyEmail( - VerifyEmailTicketRequestContent request) { - return verifyEmail(request, null); - } - - /** - * Create an email verification ticket for a given user. An email verification ticket is a generated URL that the user can consume to verify their email address. - */ - public CompletableFuture> verifyEmail( - VerifyEmailTicketRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("tickets/email-verification") - .build(); - 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) - .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); - } - 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, VerifyEmailTicketResponseContent.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 (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 password change ticket for a given user. A password change ticket is a generated URL that the user can consume to start a reset password flow. - *

Note: This endpoint does not verify the given user’s identity. If you call this endpoint within your application, you must design your application to verify the user’s identity.

- */ - public CompletableFuture> changePassword() { - return changePassword(ChangePasswordTicketRequestContent.builder().build()); - } - - /** - * Create a password change ticket for a given user. A password change ticket is a generated URL that the user can consume to start a reset password flow. - *

Note: This endpoint does not verify the given user’s identity. If you call this endpoint within your application, you must design your application to verify the user’s identity.

- */ - public CompletableFuture> changePassword( - ChangePasswordTicketRequestContent request) { - return changePassword(request, null); - } - - /** - * Create a password change ticket for a given user. A password change ticket is a generated URL that the user can consume to start a reset password flow. - *

Note: This endpoint does not verify the given user’s identity. If you call this endpoint within your application, you must design your application to verify the user’s identity.

- */ - public CompletableFuture> changePassword( - ChangePasswordTicketRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("tickets/password-change") - .build(); - 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) - .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); - } - 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, ChangePasswordTicketResponseContent.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 (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/AsyncRawTokenExchangeProfilesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawTokenExchangeProfilesClient.java deleted file mode 100644 index 8845ae309..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawTokenExchangeProfilesClient.java +++ /dev/null @@ -1,556 +0,0 @@ -/** - * 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.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.CreateTokenExchangeProfileRequestContent; -import com.auth0.client.mgmt.types.CreateTokenExchangeProfileResponseContent; -import com.auth0.client.mgmt.types.GetTokenExchangeProfileResponseContent; -import com.auth0.client.mgmt.types.ListTokenExchangeProfileResponseContent; -import com.auth0.client.mgmt.types.TokenExchangeProfileResponseContent; -import com.auth0.client.mgmt.types.TokenExchangeProfilesListRequest; -import com.auth0.client.mgmt.types.UpdateTokenExchangeProfileRequestContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawTokenExchangeProfilesClient { - protected final ClientOptions clientOptions; - - public AsyncRawTokenExchangeProfilesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a list of all Token Exchange Profiles available in your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- *

This endpoint supports Checkpoint pagination. To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture>> - list() { - return list(TokenExchangeProfilesListRequest.builder().build()); - } - - /** - * Retrieve a list of all Token Exchange Profiles available in your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- *

This endpoint supports Checkpoint pagination. To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture>> list( - TokenExchangeProfilesListRequest request) { - return list(request, null); - } - - /** - * Retrieve a list of all Token Exchange Profiles available in your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- *

This endpoint supports Checkpoint pagination. To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture>> list( - TokenExchangeProfilesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("token-exchange-profiles"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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()) { - ListTokenExchangeProfileResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListTokenExchangeProfileResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - TokenExchangeProfilesListRequest nextRequest = TokenExchangeProfilesListRequest.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getTokenExchangeProfiles().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> { - try { - return list(nextRequest, requestOptions) - .get() - .body(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - }), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (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 Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture> create( - CreateTokenExchangeProfileRequestContent request) { - return create(request, null); - } - - /** - * Create a new Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture> create( - CreateTokenExchangeProfileRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("token-exchange-profiles") - .build(); - 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) - .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); - } - 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, CreateTokenExchangeProfileResponseContent.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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve details about a single Token Exchange Profile specified by ID. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve details about a single Token Exchange Profile specified by ID. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("token-exchange-profiles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetTokenExchangeProfileResponseContent.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 (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 Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("token-exchange-profiles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture> update(String id) { - return update(id, UpdateTokenExchangeProfileRequestContent.builder().build()); - } - - /** - * Update a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture> update( - String id, UpdateTokenExchangeProfileRequestContent request) { - return update(id, request, null); - } - - /** - * Update a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture> update( - String id, UpdateTokenExchangeProfileRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("token-exchange-profiles") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - 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 (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/AsyncRawUserAttributeProfilesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawUserAttributeProfilesClient.java deleted file mode 100644 index f4124c5fd..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawUserAttributeProfilesClient.java +++ /dev/null @@ -1,688 +0,0 @@ -/** - * 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.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.CreateUserAttributeProfileRequestContent; -import com.auth0.client.mgmt.types.CreateUserAttributeProfileResponseContent; -import com.auth0.client.mgmt.types.GetUserAttributeProfileResponseContent; -import com.auth0.client.mgmt.types.GetUserAttributeProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.ListUserAttributeProfileRequestParameters; -import com.auth0.client.mgmt.types.ListUserAttributeProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.ListUserAttributeProfilesPaginatedResponseContent; -import com.auth0.client.mgmt.types.UpdateUserAttributeProfileRequestContent; -import com.auth0.client.mgmt.types.UpdateUserAttributeProfileResponseContent; -import com.auth0.client.mgmt.types.UserAttributeProfile; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawUserAttributeProfilesClient { - protected final ClientOptions clientOptions; - - public AsyncRawUserAttributeProfilesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a list of User Attribute Profiles. This endpoint supports Checkpoint pagination. - */ - public CompletableFuture>> list() { - return list(ListUserAttributeProfileRequestParameters.builder().build()); - } - - /** - * Retrieve a list of User Attribute Profiles. This endpoint supports Checkpoint pagination. - */ - public CompletableFuture>> list( - ListUserAttributeProfileRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve a list of User Attribute Profiles. This endpoint supports Checkpoint pagination. - */ - public CompletableFuture>> list( - ListUserAttributeProfileRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-attribute-profiles"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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()) { - ListUserAttributeProfilesPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserAttributeProfilesPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListUserAttributeProfileRequestParameters nextRequest = - ListUserAttributeProfileRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getUserAttributeProfiles().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> { - try { - return list(nextRequest, requestOptions) - .get() - .body(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - }), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve details about a single User Attribute Profile specified by ID. - */ - public CompletableFuture> create( - CreateUserAttributeProfileRequestContent request) { - return create(request, null); - } - - /** - * Retrieve details about a single User Attribute Profile specified by ID. - */ - public CompletableFuture> create( - CreateUserAttributeProfileRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-attribute-profiles") - .build(); - 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) - .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); - } - 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, CreateUserAttributeProfileResponseContent.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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve a list of User Attribute Profile Templates. - */ - public CompletableFuture> - listTemplates() { - return listTemplates(null); - } - - /** - * Retrieve a list of User Attribute Profile Templates. - */ - public CompletableFuture> listTemplates( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-attribute-profiles/templates") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserAttributeProfileTemplateResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve a User Attribute Profile Template. - */ - public CompletableFuture> getTemplate( - String id) { - return getTemplate(id, null); - } - - /** - * Retrieve a User Attribute Profile Template. - */ - public CompletableFuture> getTemplate( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-attribute-profiles/templates") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetUserAttributeProfileTemplateResponseContent.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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve details about a single User Attribute Profile specified by ID. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve details about a single User Attribute Profile specified by ID. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-attribute-profiles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetUserAttributeProfileResponseContent.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 (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 single User Attribute Profile specified by ID. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete a single User Attribute Profile specified by ID. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-attribute-profiles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update the details of a specific User attribute profile, such as name, user_id and user_attributes. - */ - public CompletableFuture> update(String id) { - return update(id, UpdateUserAttributeProfileRequestContent.builder().build()); - } - - /** - * Update the details of a specific User attribute profile, such as name, user_id and user_attributes. - */ - public CompletableFuture> update( - String id, UpdateUserAttributeProfileRequestContent request) { - return update(id, request, null); - } - - /** - * Update the details of a specific User attribute profile, such as name, user_id and user_attributes. - */ - public CompletableFuture> update( - String id, UpdateUserAttributeProfileRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-attribute-profiles") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateUserAttributeProfileResponseContent.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 (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/AsyncRawUserBlocksClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawUserBlocksClient.java deleted file mode 100644 index f760785b9..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawUserBlocksClient.java +++ /dev/null @@ -1,403 +0,0 @@ -/** - * 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.ObjectMappers; -import com.auth0.client.mgmt.core.QueryStringMapper; -import com.auth0.client.mgmt.core.RequestOptions; -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.DeleteUserBlocksByIdentifierRequestParameters; -import com.auth0.client.mgmt.types.ListUserBlocksByIdentifierRequestParameters; -import com.auth0.client.mgmt.types.ListUserBlocksByIdentifierResponseContent; -import com.auth0.client.mgmt.types.ListUserBlocksRequestParameters; -import com.auth0.client.mgmt.types.ListUserBlocksResponseContent; -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.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawUserBlocksClient { - protected final ClientOptions clientOptions; - - public AsyncRawUserBlocksClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for a user with the given identifier (username, phone number, or email). - */ - public CompletableFuture> listByIdentifier( - ListUserBlocksByIdentifierRequestParameters request) { - return listByIdentifier(request, null); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for a user with the given identifier (username, phone number, or email). - */ - public CompletableFuture> listByIdentifier( - ListUserBlocksByIdentifierRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-blocks"); - QueryStringMapper.addQueryParameter(httpUrl, "identifier", request.getIdentifier(), false); - if (!request.getConsiderBruteForceEnablement().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, - "consider_brute_force_enablement", - request.getConsiderBruteForceEnablement().orElse(null), - false); - } - 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); - } - 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, ListUserBlocksByIdentifierResponseContent.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 (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 all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given identifier (username, phone number, or email). - *

Note: This endpoint does not unblock users that were <a href="https://auth0.com/docs/user-profile#block-and-unblock-a-user">blocked by a tenant administrator</a>.

- */ - public CompletableFuture> deleteByIdentifier( - DeleteUserBlocksByIdentifierRequestParameters request) { - return deleteByIdentifier(request, null); - } - - /** - * Remove all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given identifier (username, phone number, or email). - *

Note: This endpoint does not unblock users that were <a href="https://auth0.com/docs/user-profile#block-and-unblock-a-user">blocked by a tenant administrator</a>.

- */ - public CompletableFuture> deleteByIdentifier( - DeleteUserBlocksByIdentifierRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-blocks"); - QueryStringMapper.addQueryParameter(httpUrl, "identifier", request.getIdentifier(), false); - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("DELETE", 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); - } - 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 (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 all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - */ - public CompletableFuture> list(String id) { - return list(id, ListUserBlocksRequestParameters.builder().build()); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - */ - public CompletableFuture> list( - String id, ListUserBlocksRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - */ - public CompletableFuture> list( - String id, ListUserBlocksRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-blocks") - .addPathSegment(id); - if (!request.getConsiderBruteForceEnablement().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, - "consider_brute_force_enablement", - request.getConsiderBruteForceEnablement().orElse(null), - false); - } - 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); - } - 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, ListUserBlocksResponseContent.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 (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 all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - *

Note: This endpoint does not unblock users that were <a href="https://auth0.com/docs/user-profile#block-and-unblock-a-user">blocked by a tenant administrator</a>.

- */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Remove all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - *

Note: This endpoint does not unblock users that were <a href="https://auth0.com/docs/user-profile#block-and-unblock-a-user">blocked by a tenant administrator</a>.

- */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-blocks") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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/AsyncRawUserGrantsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawUserGrantsClient.java deleted file mode 100644 index 851e9ebc2..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawUserGrantsClient.java +++ /dev/null @@ -1,311 +0,0 @@ -/** - * 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.ObjectMappers; -import com.auth0.client.mgmt.core.QueryStringMapper; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.core.SyncPagingIterable; -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.types.DeleteUserGrantByUserIdRequestParameters; -import com.auth0.client.mgmt.types.ListUserGrantsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListUserGrantsRequestParameters; -import com.auth0.client.mgmt.types.UserGrant; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawUserGrantsClient { - protected final ClientOptions clientOptions; - - public AsyncRawUserGrantsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve the <a href="https://auth0.com/docs/api-auth/which-oauth-flow-to-use">grants</a> associated with your account. - */ - public CompletableFuture>> list() { - return list(ListUserGrantsRequestParameters.builder().build()); - } - - /** - * Retrieve the <a href="https://auth0.com/docs/api-auth/which-oauth-flow-to-use">grants</a> associated with your account. - */ - public CompletableFuture>> list( - ListUserGrantsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve the <a href="https://auth0.com/docs/api-auth/which-oauth-flow-to-use">grants</a> associated with your account. - */ - public CompletableFuture>> list( - ListUserGrantsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("grants"); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getUserId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "user_id", request.getUserId().orElse(null), false); - } - if (!request.getClientId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "client_id", request.getClientId().orElse(null), false); - } - if (!request.getAudience().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "audience", request.getAudience().orElse(null), false); - } - 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); - } - 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()) { - ListUserGrantsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserGrantsOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListUserGrantsRequestParameters nextRequest = ListUserGrantsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getGrants().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, result, parsedResponse, () -> { - try { - return list(nextRequest, requestOptions) - .get() - .body(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - }), - response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Delete a grant associated with your account. - */ - public CompletableFuture> deleteByUserId( - DeleteUserGrantByUserIdRequestParameters request) { - return deleteByUserId(request, null); - } - - /** - * Delete a grant associated with your account. - */ - public CompletableFuture> deleteByUserId( - DeleteUserGrantByUserIdRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("grants"); - QueryStringMapper.addQueryParameter(httpUrl, "user_id", request.getUserId(), false); - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("DELETE", 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); - } - 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 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Delete a grant associated with your account. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete a grant associated with your account. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("grants") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRawUsersClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRawUsersClient.java deleted file mode 100644 index 6f69d800f..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRawUsersClient.java +++ /dev/null @@ -1,1077 +0,0 @@ -/** - * 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.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.ServiceUnavailableError; -import com.auth0.client.mgmt.errors.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -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.ListUsersByEmailRequestParameters; -import com.auth0.client.mgmt.types.ListUsersOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListUsersRequestParameters; -import com.auth0.client.mgmt.types.RegenerateUsersRecoveryCodeResponseContent; -import com.auth0.client.mgmt.types.RevokeUserAccessRequestContent; -import com.auth0.client.mgmt.types.UpdateUserRequestContent; -import com.auth0.client.mgmt.types.UpdateUserResponseContent; -import com.auth0.client.mgmt.types.UserResponseSchema; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawUsersClient { - protected final ClientOptions clientOptions; - - public AsyncRawUsersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of users. It is possible to: - *
    - *
  • Specify a 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
  • - *
- *

<!-- only v3 is available -->

- *

The <code>q</code> query parameter can be used to get users that match the specified criteria <a href="https://auth0.com/docs/users/search/v3/query-syntax">using query string syntax.</a>

- *

<a href="https://auth0.com/docs/users/search/v3">Learn more about searching for users.</a>

- *

Read about <a href="https://auth0.com/docs/users/search/best-practices">best practices</a> 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 <a href="https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports">export job</a>, or the <a href="https://auth0.com/docs/extensions/user-import-export">User Import / Export</a> extension.

- */ - public CompletableFuture>> list() { - return list(ListUsersRequestParameters.builder().build()); - } - - /** - * Retrieve details of users. It is possible to: - *
    - *
  • Specify a 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
  • - *
- *

<!-- only v3 is available -->

- *

The <code>q</code> query parameter can be used to get users that match the specified criteria <a href="https://auth0.com/docs/users/search/v3/query-syntax">using query string syntax.</a>

- *

<a href="https://auth0.com/docs/users/search/v3">Learn more about searching for users.</a>

- *

Read about <a href="https://auth0.com/docs/users/search/best-practices">best practices</a> 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 <a href="https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports">export job</a>, or the <a href="https://auth0.com/docs/extensions/user-import-export">User Import / Export</a> extension.

- */ - public CompletableFuture>> list( - ListUsersRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve details of users. It is possible to: - *
    - *
  • Specify a 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
  • - *
- *

<!-- only v3 is available -->

- *

The <code>q</code> query parameter can be used to get users that match the specified criteria <a href="https://auth0.com/docs/users/search/v3/query-syntax">using query string syntax.</a>

- *

<a href="https://auth0.com/docs/users/search/v3">Learn more about searching for users.</a>

- *

Read about <a href="https://auth0.com/docs/users/search/best-practices">best practices</a> 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 <a href="https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports">export job</a>, or the <a href="https://auth0.com/docs/extensions/user-import-export">User Import / Export</a> extension.

- */ - public CompletableFuture>> list( - ListUsersRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getSort().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sort", request.getSort().orElse(null), false); - } - if (!request.getConnection().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "connection", request.getConnection().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); - } - if (!request.getQ().isAbsent()) { - QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().orElse(null), false); - } - if (!request.getSearchEngine().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "search_engine", request.getSearchEngine().orElse(null), false); - } - if (!request.getPrimaryOrder().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "primary_order", request.getPrimaryOrder().orElse(null), false); - } - 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); - } - 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()) { - ListUsersOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUsersOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListUsersRequestParameters nextRequest = ListUsersRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getUsers().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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; - case 503: - future.completeExceptionally(new ServiceUnavailableError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Create a new user for a given <a href="https://auth0.com/docs/connections/database">database</a> or <a href="https://auth0.com/docs/connections/passwordless">passwordless</a> connection. - *

Note: <code>connection</code> is required but other parameters such as <code>email</code> and <code>password</code> are dependent upon the type of connection.

- */ - public CompletableFuture> create( - CreateUserRequestContent request) { - return create(request, null); - } - - /** - * Create a new user for a given <a href="https://auth0.com/docs/connections/database">database</a> or <a href="https://auth0.com/docs/connections/passwordless">passwordless</a> connection. - *

Note: <code>connection</code> is required but other parameters such as <code>email</code> and <code>password</code> are dependent upon the type of connection.

- */ - public CompletableFuture> create( - CreateUserRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .build(); - 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) - .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); - } - 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, CreateUserResponseContent.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 (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; - } - - /** - * Find users by email. If Auth0 is the identity provider (idP), the email address associated with a user is saved in lower case, regardless of how you initially provided it. - *

For example, if you register a user as JohnSmith@example.com, Auth0 saves the user's email as johnsmith@example.com.

- *

Therefore, when using this endpoint, make sure that you are searching for users via email addresses using the correct case.

- */ - public CompletableFuture>> listUsersByEmail( - ListUsersByEmailRequestParameters request) { - return listUsersByEmail(request, null); - } - - /** - * Find users by email. If Auth0 is the identity provider (idP), the email address associated with a user is saved in lower case, regardless of how you initially provided it. - *

For example, if you register a user as JohnSmith@example.com, Auth0 saves the user's email as johnsmith@example.com.

- *

Therefore, when using this endpoint, make sure that you are searching for users via email addresses using the correct case.

- */ - public CompletableFuture>> listUsersByEmail( - ListUsersByEmailRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users-by-email"); - 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, "email", request.getEmail(), false); - 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); - } - 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 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see <a href="https://auth0.com/docs/manage-users/user-search/retrieve-users-with-get-users-endpoint">Retrieve Users with the Get Users Endpoint</a>. - */ - public CompletableFuture> get(String id) { - return get(id, GetUserRequestParameters.builder().build()); - } - - /** - * Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see <a href="https://auth0.com/docs/manage-users/user-search/retrieve-users-with-get-users-endpoint">Retrieve Users with the Get Users Endpoint</a>. - */ - public CompletableFuture> get( - String id, GetUserRequestParameters request) { - return get(id, request, null); - } - - /** - * Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see <a href="https://auth0.com/docs/manage-users/user-search/retrieve-users-with-get-users-endpoint">Retrieve Users with the Get Users Endpoint</a>. - */ - public CompletableFuture> get( - String id, GetUserRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id); - 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); - } - 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); - } - 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, GetUserResponseContent.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 (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 user by user ID. This action cannot be undone. For Auth0 Dashboard instructions, see <a href="https://auth0.com/docs/manage-users/user-accounts/delete-users">Delete Users</a>. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete a user by user ID. This action cannot be undone. For Auth0 Dashboard instructions, see <a href="https://auth0.com/docs/manage-users/user-accounts/delete-users">Delete Users</a>. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 user. - *

These are the attributes that can be updated at the root level:

- *

<ul> - * <li>app_metadata</li> - * <li>blocked</li> - * <li>email</li> - * <li>email_verified</li> - * <li>family_name</li> - * <li>given_name</li> - * <li>name</li> - * <li>nickname</li> - * <li>password</li> - * <li>phone_number</li> - * <li>phone_verified</li> - * <li>picture</li> - * <li>username</li> - * <li>user_metadata</li> - * <li>verify_email</li> - * </ul>

- *

Some considerations:

- *

<ul> - * <li>The properties of the new object will replace the old ones.</li> - * <li>The metadata fields are an exception to this rule (<code>user_metadata</code> and <code>app_metadata</code>). These properties are merged instead of being replaced but be careful, the merge only occurs on the first level.</li> - * <li>If you are updating <code>email</code>, <code>email_verified</code>, <code>phone_number</code>, <code>phone_verified</code>, <code>username</code> or <code>password</code> of a secondary identity, you need to specify the <code>connection</code> property too.</li> - * <li>If you are updating <code>email</code> or <code>phone_number</code> you can specify, optionally, the <code>client_id</code> property.</li> - * <li>Updating <code>email_verified</code> is not supported for enterprise and passwordless sms connections.</li> - * <li>Updating the <code>blocked</code> to <code>false</code> does not affect the user's blocked state from an excessive amount of incorrectly provided credentials. Use the "Unblock a user" endpoint from the "User Blocks" API to change the user's state.</li> - * <li>Supported attributes can be unset by supplying <code>null</code> as the value.</li> - * </ul>

- *

<h5>Updating a field (non-metadata property)</h5> - * To mark the email address of a user as verified, the body to send should be: - * <pre><code>{ "email_verified": true }</code></pre>

- *

<h5>Updating a user metadata root property</h5>Let's assume that our test user has the following <code>user_metadata</code>: - * <pre><code>{ "user_metadata" : { "profileCode": 1479 } }</code></pre>

- *

To add the field <code>addresses</code> the body to send should be:

- *

<pre><code>{ "user_metadata" : { "addresses": {"work_address": "100 Industrial Way"} }}</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { "work_address": "100 Industrial Way" } - * } - * }</code></pre>

- *

<h5>Updating an inner user metadata property</h5>If there's existing user metadata to which we want to add <code>"home_address": "742 Evergreen Terrace"</code> (using the <code>addresses</code> property) we should send the whole <code>addresses</code> object. Since this is a first-level object, the object will be merged in, but its own properties will not be. The body to send should be: - * <pre><code>{ - * "user_metadata": { - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:

- *

<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- */ - public CompletableFuture> update(String id) { - return update(id, UpdateUserRequestContent.builder().build()); - } - - /** - * Update a user. - *

These are the attributes that can be updated at the root level:

- *

<ul> - * <li>app_metadata</li> - * <li>blocked</li> - * <li>email</li> - * <li>email_verified</li> - * <li>family_name</li> - * <li>given_name</li> - * <li>name</li> - * <li>nickname</li> - * <li>password</li> - * <li>phone_number</li> - * <li>phone_verified</li> - * <li>picture</li> - * <li>username</li> - * <li>user_metadata</li> - * <li>verify_email</li> - * </ul>

- *

Some considerations:

- *

<ul> - * <li>The properties of the new object will replace the old ones.</li> - * <li>The metadata fields are an exception to this rule (<code>user_metadata</code> and <code>app_metadata</code>). These properties are merged instead of being replaced but be careful, the merge only occurs on the first level.</li> - * <li>If you are updating <code>email</code>, <code>email_verified</code>, <code>phone_number</code>, <code>phone_verified</code>, <code>username</code> or <code>password</code> of a secondary identity, you need to specify the <code>connection</code> property too.</li> - * <li>If you are updating <code>email</code> or <code>phone_number</code> you can specify, optionally, the <code>client_id</code> property.</li> - * <li>Updating <code>email_verified</code> is not supported for enterprise and passwordless sms connections.</li> - * <li>Updating the <code>blocked</code> to <code>false</code> does not affect the user's blocked state from an excessive amount of incorrectly provided credentials. Use the "Unblock a user" endpoint from the "User Blocks" API to change the user's state.</li> - * <li>Supported attributes can be unset by supplying <code>null</code> as the value.</li> - * </ul>

- *

<h5>Updating a field (non-metadata property)</h5> - * To mark the email address of a user as verified, the body to send should be: - * <pre><code>{ "email_verified": true }</code></pre>

- *

<h5>Updating a user metadata root property</h5>Let's assume that our test user has the following <code>user_metadata</code>: - * <pre><code>{ "user_metadata" : { "profileCode": 1479 } }</code></pre>

- *

To add the field <code>addresses</code> the body to send should be:

- *

<pre><code>{ "user_metadata" : { "addresses": {"work_address": "100 Industrial Way"} }}</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { "work_address": "100 Industrial Way" } - * } - * }</code></pre>

- *

<h5>Updating an inner user metadata property</h5>If there's existing user metadata to which we want to add <code>"home_address": "742 Evergreen Terrace"</code> (using the <code>addresses</code> property) we should send the whole <code>addresses</code> object. Since this is a first-level object, the object will be merged in, but its own properties will not be. The body to send should be: - * <pre><code>{ - * "user_metadata": { - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:

- *

<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- */ - public CompletableFuture> update( - String id, UpdateUserRequestContent request) { - return update(id, request, null); - } - - /** - * Update a user. - *

These are the attributes that can be updated at the root level:

- *

<ul> - * <li>app_metadata</li> - * <li>blocked</li> - * <li>email</li> - * <li>email_verified</li> - * <li>family_name</li> - * <li>given_name</li> - * <li>name</li> - * <li>nickname</li> - * <li>password</li> - * <li>phone_number</li> - * <li>phone_verified</li> - * <li>picture</li> - * <li>username</li> - * <li>user_metadata</li> - * <li>verify_email</li> - * </ul>

- *

Some considerations:

- *

<ul> - * <li>The properties of the new object will replace the old ones.</li> - * <li>The metadata fields are an exception to this rule (<code>user_metadata</code> and <code>app_metadata</code>). These properties are merged instead of being replaced but be careful, the merge only occurs on the first level.</li> - * <li>If you are updating <code>email</code>, <code>email_verified</code>, <code>phone_number</code>, <code>phone_verified</code>, <code>username</code> or <code>password</code> of a secondary identity, you need to specify the <code>connection</code> property too.</li> - * <li>If you are updating <code>email</code> or <code>phone_number</code> you can specify, optionally, the <code>client_id</code> property.</li> - * <li>Updating <code>email_verified</code> is not supported for enterprise and passwordless sms connections.</li> - * <li>Updating the <code>blocked</code> to <code>false</code> does not affect the user's blocked state from an excessive amount of incorrectly provided credentials. Use the "Unblock a user" endpoint from the "User Blocks" API to change the user's state.</li> - * <li>Supported attributes can be unset by supplying <code>null</code> as the value.</li> - * </ul>

- *

<h5>Updating a field (non-metadata property)</h5> - * To mark the email address of a user as verified, the body to send should be: - * <pre><code>{ "email_verified": true }</code></pre>

- *

<h5>Updating a user metadata root property</h5>Let's assume that our test user has the following <code>user_metadata</code>: - * <pre><code>{ "user_metadata" : { "profileCode": 1479 } }</code></pre>

- *

To add the field <code>addresses</code> the body to send should be:

- *

<pre><code>{ "user_metadata" : { "addresses": {"work_address": "100 Industrial Way"} }}</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { "work_address": "100 Industrial Way" } - * } - * }</code></pre>

- *

<h5>Updating an inner user metadata property</h5>If there's existing user metadata to which we want to add <code>"home_address": "742 Evergreen Terrace"</code> (using the <code>addresses</code> property) we should send the whole <code>addresses</code> object. Since this is a first-level object, the object will be merged in, but its own properties will not be. The body to send should be: - * <pre><code>{ - * "user_metadata": { - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:

- *

<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- */ - public CompletableFuture> update( - String id, UpdateUserRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateUserResponseContent.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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Remove an existing multi-factor authentication (MFA) <a href="https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa">recovery code</a> 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. - */ - public CompletableFuture> - regenerateRecoveryCode(String id) { - return regenerateRecoveryCode(id, null); - } - - /** - * Remove an existing multi-factor authentication (MFA) <a href="https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa">recovery code</a> 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. - */ - public CompletableFuture> - regenerateRecoveryCode(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("recovery-code-regeneration") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, RegenerateUsersRecoveryCodeResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Revokes selected resources related to a user (sessions, refresh tokens, ...). - */ - public CompletableFuture> revokeAccess(String id) { - return revokeAccess(id, RevokeUserAccessRequestContent.builder().build()); - } - - /** - * Revokes selected resources related to a user (sessions, refresh tokens, ...). - */ - public CompletableFuture> revokeAccess( - String id, RevokeUserAccessRequestContent request) { - return revokeAccess(id, request, null); - } - - /** - * Revokes selected resources related to a user (sessions, refresh tokens, ...). - */ - public CompletableFuture> revokeAccess( - String id, RevokeUserAccessRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("revoke-access") - .build(); - 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) - .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); - } - 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 (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/AsyncRefreshTokensClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRefreshTokensClient.java deleted file mode 100644 index 2ca93bc19..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRefreshTokensClient.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * 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.GetRefreshTokenResponseContent; -import com.auth0.client.mgmt.types.UpdateRefreshTokenRequestContent; -import com.auth0.client.mgmt.types.UpdateRefreshTokenResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncRefreshTokensClient { - protected final ClientOptions clientOptions; - - private final AsyncRawRefreshTokensClient rawClient; - - public AsyncRefreshTokensClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawRefreshTokensClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawRefreshTokensClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve refresh token information. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve refresh token information. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a refresh token by its ID. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete a refresh token by its ID. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update a refresh token by its ID. - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update a refresh token by its ID. - */ - public CompletableFuture update( - String id, UpdateRefreshTokenRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update a refresh token by its ID. - */ - public CompletableFuture update( - String id, UpdateRefreshTokenRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncResourceServersClient.java b/src/main/java/com/auth0/client/mgmt/AsyncResourceServersClient.java deleted file mode 100644 index accaa9fc0..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncResourceServersClient.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * 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.CreateResourceServerRequestContent; -import com.auth0.client.mgmt.types.CreateResourceServerResponseContent; -import com.auth0.client.mgmt.types.GetResourceServerRequestParameters; -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.UpdateResourceServerRequestContent; -import com.auth0.client.mgmt.types.UpdateResourceServerResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncResourceServersClient { - protected final ClientOptions clientOptions; - - private final AsyncRawResourceServersClient rawClient; - - public AsyncResourceServersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawResourceServersClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawResourceServersClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of all APIs associated with your tenant. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve details of all APIs associated with your tenant. - */ - public CompletableFuture> list(ListResourceServerRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve details of all APIs associated with your tenant. - */ - public CompletableFuture> list( - ListResourceServerRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a new API associated with your tenant. Note that all new APIs must be registered with Auth0. For more information, read <a href="https://www.auth0.com/docs/get-started/apis"> APIs</a>. - */ - public CompletableFuture create(CreateResourceServerRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create a new API associated with your tenant. Note that all new APIs must be registered with Auth0. For more information, read <a href="https://www.auth0.com/docs/get-started/apis"> APIs</a>. - */ - public CompletableFuture create( - CreateResourceServerRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/apis">API</a> details with the given ID. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/apis">API</a> details with the given ID. - */ - public CompletableFuture get( - String id, GetResourceServerRequestParameters request) { - return this.rawClient.get(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/apis">API</a> details with the given ID. - */ - public CompletableFuture get( - String id, GetResourceServerRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete an existing API by ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete an existing API by ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Change an existing API setting by resource server ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Change an existing API setting by resource server ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public CompletableFuture update( - String id, UpdateResourceServerRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Change an existing API setting by resource server ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public CompletableFuture update( - String id, UpdateResourceServerRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRolesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRolesClient.java deleted file mode 100644 index ee391ea85..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRolesClient.java +++ /dev/null @@ -1,144 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -import com.auth0.client.mgmt.roles.AsyncPermissionsClient; -import com.auth0.client.mgmt.roles.AsyncUsersClient; -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.UpdateRoleRequestContent; -import com.auth0.client.mgmt.types.UpdateRoleResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncRolesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawRolesClient rawClient; - - protected final Supplier permissionsClient; - - protected final Supplier usersClient; - - public AsyncRolesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawRolesClient(clientOptions); - this.permissionsClient = Suppliers.memoize(() -> new AsyncPermissionsClient(clientOptions)); - this.usersClient = Suppliers.memoize(() -> new AsyncUsersClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawRolesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve detailed list of user roles created in your tenant. - *

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

- */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve detailed list of user roles created in your tenant. - *

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

- */ - public CompletableFuture> list(ListRolesRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve detailed list of user roles created in your tenant. - *

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

- */ - public CompletableFuture> list( - ListRolesRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a user role for <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles are not associated with any permissions by default. To assign existing permissions to your role, review Associate Permissions with a Role. To create new permissions, review Add API Permissions.

- */ - public CompletableFuture create(CreateRoleRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create a user role for <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles are not associated with any permissions by default. To assign existing permissions to your role, review Associate Permissions with a Role. To create new permissions, review Add API Permissions.

- */ - public CompletableFuture create( - CreateRoleRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> from your tenant. Once deleted, it is removed from any user who was previously assigned that role. This action cannot be undone. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> from your tenant. Once deleted, it is removed from any user who was previously assigned that role. This action cannot be undone. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Modify the details of a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Modify the details of a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public CompletableFuture update(String id, UpdateRoleRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Modify the details of a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public CompletableFuture update( - String id, UpdateRoleRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - public AsyncPermissionsClient permissions() { - return this.permissionsClient.get(); - } - - public AsyncUsersClient users() { - return this.usersClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRulesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRulesClient.java deleted file mode 100644 index 1fa40c455..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRulesClient.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * 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.CreateRuleRequestContent; -import com.auth0.client.mgmt.types.CreateRuleResponseContent; -import com.auth0.client.mgmt.types.GetRuleRequestParameters; -import com.auth0.client.mgmt.types.GetRuleResponseContent; -import com.auth0.client.mgmt.types.ListRulesRequestParameters; -import com.auth0.client.mgmt.types.Rule; -import com.auth0.client.mgmt.types.UpdateRuleRequestContent; -import com.auth0.client.mgmt.types.UpdateRuleResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncRulesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawRulesClient rawClient; - - public AsyncRulesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawRulesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawRulesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a filtered list of <a href="https://auth0.com/docs/rules">rules</a>. Accepts a list of fields to include or exclude. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve a filtered list of <a href="https://auth0.com/docs/rules">rules</a>. Accepts a list of fields to include or exclude. - */ - public CompletableFuture> list(ListRulesRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve a filtered list of <a href="https://auth0.com/docs/rules">rules</a>. Accepts a list of fields to include or exclude. - */ - public CompletableFuture> list( - ListRulesRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a <a href="https://auth0.com/docs/rules#create-a-new-rule-using-the-management-api">new rule</a>. - *

Note: Changing a rule's stage of execution from the default <code>login_success</code> can change the rule's function signature to have user omitted.

- */ - public CompletableFuture create(CreateRuleRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create a <a href="https://auth0.com/docs/rules#create-a-new-rule-using-the-management-api">new rule</a>. - *

Note: Changing a rule's stage of execution from the default <code>login_success</code> can change the rule's function signature to have user omitted.

- */ - public CompletableFuture create( - CreateRuleRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/rules">rule</a> details. Accepts a list of fields to include or exclude in the result. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/rules">rule</a> details. Accepts a list of fields to include or exclude in the result. - */ - public CompletableFuture get(String id, GetRuleRequestParameters request) { - return this.rawClient.get(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/rules">rule</a> details. Accepts a list of fields to include or exclude in the result. - */ - public CompletableFuture get( - String id, GetRuleRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a rule. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete a rule. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update an existing rule. - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update an existing rule. - */ - public CompletableFuture update(String id, UpdateRuleRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update an existing rule. - */ - public CompletableFuture update( - String id, UpdateRuleRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncRulesConfigsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncRulesConfigsClient.java deleted file mode 100644 index 65d9d3c51..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncRulesConfigsClient.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 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.RulesConfig; -import com.auth0.client.mgmt.types.SetRulesConfigRequestContent; -import com.auth0.client.mgmt.types.SetRulesConfigResponseContent; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -public class AsyncRulesConfigsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawRulesConfigsClient rawClient; - - public AsyncRulesConfigsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawRulesConfigsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawRulesConfigsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve rules config variable keys. - *
Note: For security, config variable values cannot be retrieved outside rule execution.
-     * 
- */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve rules config variable keys. - *
Note: For security, config variable values cannot be retrieved outside rule execution.
-     * 
- */ - public CompletableFuture> list(RequestOptions requestOptions) { - return this.rawClient.list(requestOptions).thenApply(response -> response.body()); - } - - /** - * Sets a rules config variable. - */ - public CompletableFuture set(String key, SetRulesConfigRequestContent request) { - return this.rawClient.set(key, request).thenApply(response -> response.body()); - } - - /** - * Sets a rules config variable. - */ - public CompletableFuture set( - String key, SetRulesConfigRequestContent request, RequestOptions requestOptions) { - return this.rawClient.set(key, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a rules config variable identified by its key. - */ - public CompletableFuture delete(String key) { - return this.rawClient.delete(key).thenApply(response -> response.body()); - } - - /** - * Delete a rules config variable identified by its key. - */ - public CompletableFuture delete(String key, RequestOptions requestOptions) { - return this.rawClient.delete(key, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncSelfServiceProfilesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncSelfServiceProfilesClient.java deleted file mode 100644 index a90876d0d..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncSelfServiceProfilesClient.java +++ /dev/null @@ -1,142 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -import com.auth0.client.mgmt.selfserviceprofiles.AsyncCustomTextClient; -import com.auth0.client.mgmt.selfserviceprofiles.AsyncSsoTicketClient; -import com.auth0.client.mgmt.types.CreateSelfServiceProfileRequestContent; -import com.auth0.client.mgmt.types.CreateSelfServiceProfileResponseContent; -import com.auth0.client.mgmt.types.GetSelfServiceProfileResponseContent; -import com.auth0.client.mgmt.types.ListSelfServiceProfilesRequestParameters; -import com.auth0.client.mgmt.types.SelfServiceProfile; -import com.auth0.client.mgmt.types.UpdateSelfServiceProfileRequestContent; -import com.auth0.client.mgmt.types.UpdateSelfServiceProfileResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncSelfServiceProfilesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawSelfServiceProfilesClient rawClient; - - protected final Supplier customTextClient; - - protected final Supplier ssoTicketClient; - - public AsyncSelfServiceProfilesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawSelfServiceProfilesClient(clientOptions); - this.customTextClient = Suppliers.memoize(() -> new AsyncCustomTextClient(clientOptions)); - this.ssoTicketClient = Suppliers.memoize(() -> new AsyncSsoTicketClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawSelfServiceProfilesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieves self-service profiles. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieves self-service profiles. - */ - public CompletableFuture> list( - ListSelfServiceProfilesRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieves self-service profiles. - */ - public CompletableFuture> list( - ListSelfServiceProfilesRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Creates a self-service profile. - */ - public CompletableFuture create( - CreateSelfServiceProfileRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Creates a self-service profile. - */ - public CompletableFuture create( - CreateSelfServiceProfileRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieves a self-service profile by Id. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieves a self-service profile by Id. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Deletes a self-service profile by Id. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Deletes a self-service profile by Id. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Updates a self-service profile. - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Updates a self-service profile. - */ - public CompletableFuture update( - String id, UpdateSelfServiceProfileRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Updates a self-service profile. - */ - public CompletableFuture update( - String id, UpdateSelfServiceProfileRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - public AsyncCustomTextClient customText() { - return this.customTextClient.get(); - } - - public AsyncSsoTicketClient ssoTicket() { - return this.ssoTicketClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncSessionsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncSessionsClient.java deleted file mode 100644 index 1d1859b8c..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncSessionsClient.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * 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.GetSessionResponseContent; -import com.auth0.client.mgmt.types.UpdateSessionRequestContent; -import com.auth0.client.mgmt.types.UpdateSessionResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncSessionsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawSessionsClient rawClient; - - public AsyncSessionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawSessionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawSessionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve session information. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve session information. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a session by ID. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete a session by ID. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update session information. - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update session information. - */ - public CompletableFuture update(String id, UpdateSessionRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update session information. - */ - public CompletableFuture update( - String id, UpdateSessionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Revokes a session by ID and all associated refresh tokens. - */ - public CompletableFuture revoke(String id) { - return this.rawClient.revoke(id).thenApply(response -> response.body()); - } - - /** - * Revokes a session by ID and all associated refresh tokens. - */ - public CompletableFuture revoke(String id, RequestOptions requestOptions) { - return this.rawClient.revoke(id, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncStatsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncStatsClient.java deleted file mode 100644 index 2104cba7b..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncStatsClient.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 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.DailyStats; -import com.auth0.client.mgmt.types.GetDailyStatsRequestParameters; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -public class AsyncStatsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawStatsClient rawClient; - - public AsyncStatsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawStatsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawStatsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve the number of active users that logged in during the last 30 days. - */ - public CompletableFuture getActiveUsersCount() { - return this.rawClient.getActiveUsersCount().thenApply(response -> response.body()); - } - - /** - * Retrieve the number of active users that logged in during the last 30 days. - */ - public CompletableFuture getActiveUsersCount(RequestOptions requestOptions) { - return this.rawClient.getActiveUsersCount(requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve the number of logins, signups and breached-password detections (subscription required) that occurred each day within a specified date range. - */ - public CompletableFuture> getDaily() { - return this.rawClient.getDaily().thenApply(response -> response.body()); - } - - /** - * Retrieve the number of logins, signups and breached-password detections (subscription required) that occurred each day within a specified date range. - */ - public CompletableFuture> getDaily(GetDailyStatsRequestParameters request) { - return this.rawClient.getDaily(request).thenApply(response -> response.body()); - } - - /** - * Retrieve the number of logins, signups and breached-password detections (subscription required) that occurred each day within a specified date range. - */ - public CompletableFuture> getDaily( - GetDailyStatsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.getDaily(request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncSupplementalSignalsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncSupplementalSignalsClient.java deleted file mode 100644 index b4e20c250..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncSupplementalSignalsClient.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * 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.GetSupplementalSignalsResponseContent; -import com.auth0.client.mgmt.types.PatchSupplementalSignalsResponseContent; -import com.auth0.client.mgmt.types.UpdateSupplementalSignalsRequestContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncSupplementalSignalsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawSupplementalSignalsClient rawClient; - - public AsyncSupplementalSignalsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawSupplementalSignalsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawSupplementalSignalsClient withRawResponse() { - return this.rawClient; - } - - /** - * Get the supplemental signals configuration for a tenant. - */ - public CompletableFuture get() { - return this.rawClient.get().thenApply(response -> response.body()); - } - - /** - * Get the supplemental signals configuration for a tenant. - */ - public CompletableFuture get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).thenApply(response -> response.body()); - } - - /** - * Update the supplemental signals configuration for a tenant. - */ - public CompletableFuture patch( - UpdateSupplementalSignalsRequestContent request) { - return this.rawClient.patch(request).thenApply(response -> response.body()); - } - - /** - * Update the supplemental signals configuration for a tenant. - */ - public CompletableFuture patch( - UpdateSupplementalSignalsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.patch(request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncTicketsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncTicketsClient.java deleted file mode 100644 index 17fd197e2..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncTicketsClient.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 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.ChangePasswordTicketRequestContent; -import com.auth0.client.mgmt.types.ChangePasswordTicketResponseContent; -import com.auth0.client.mgmt.types.VerifyEmailTicketRequestContent; -import com.auth0.client.mgmt.types.VerifyEmailTicketResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncTicketsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawTicketsClient rawClient; - - public AsyncTicketsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawTicketsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawTicketsClient withRawResponse() { - return this.rawClient; - } - - /** - * Create an email verification ticket for a given user. An email verification ticket is a generated URL that the user can consume to verify their email address. - */ - public CompletableFuture verifyEmail(VerifyEmailTicketRequestContent request) { - return this.rawClient.verifyEmail(request).thenApply(response -> response.body()); - } - - /** - * Create an email verification ticket for a given user. An email verification ticket is a generated URL that the user can consume to verify their email address. - */ - public CompletableFuture verifyEmail( - VerifyEmailTicketRequestContent request, RequestOptions requestOptions) { - return this.rawClient.verifyEmail(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a password change ticket for a given user. A password change ticket is a generated URL that the user can consume to start a reset password flow. - *

Note: This endpoint does not verify the given user’s identity. If you call this endpoint within your application, you must design your application to verify the user’s identity.

- */ - public CompletableFuture changePassword() { - return this.rawClient.changePassword().thenApply(response -> response.body()); - } - - /** - * Create a password change ticket for a given user. A password change ticket is a generated URL that the user can consume to start a reset password flow. - *

Note: This endpoint does not verify the given user’s identity. If you call this endpoint within your application, you must design your application to verify the user’s identity.

- */ - public CompletableFuture changePassword( - ChangePasswordTicketRequestContent request) { - return this.rawClient.changePassword(request).thenApply(response -> response.body()); - } - - /** - * Create a password change ticket for a given user. A password change ticket is a generated URL that the user can consume to start a reset password flow. - *

Note: This endpoint does not verify the given user’s identity. If you call this endpoint within your application, you must design your application to verify the user’s identity.

- */ - public CompletableFuture changePassword( - ChangePasswordTicketRequestContent request, RequestOptions requestOptions) { - return this.rawClient.changePassword(request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncTokenExchangeProfilesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncTokenExchangeProfilesClient.java deleted file mode 100644 index 2780fe869..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncTokenExchangeProfilesClient.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * 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.CreateTokenExchangeProfileRequestContent; -import com.auth0.client.mgmt.types.CreateTokenExchangeProfileResponseContent; -import com.auth0.client.mgmt.types.GetTokenExchangeProfileResponseContent; -import com.auth0.client.mgmt.types.TokenExchangeProfileResponseContent; -import com.auth0.client.mgmt.types.TokenExchangeProfilesListRequest; -import com.auth0.client.mgmt.types.UpdateTokenExchangeProfileRequestContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncTokenExchangeProfilesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawTokenExchangeProfilesClient rawClient; - - public AsyncTokenExchangeProfilesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawTokenExchangeProfilesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawTokenExchangeProfilesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a list of all Token Exchange Profiles available in your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- *

This endpoint supports Checkpoint pagination. To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve a list of all Token Exchange Profiles available in your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- *

This endpoint supports Checkpoint pagination. To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture> list( - TokenExchangeProfilesListRequest request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve a list of all Token Exchange Profiles available in your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- *

This endpoint supports Checkpoint pagination. To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture> list( - TokenExchangeProfilesListRequest request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a new Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture create( - CreateTokenExchangeProfileRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create a new Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture create( - CreateTokenExchangeProfileRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a single Token Exchange Profile specified by ID. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a single Token Exchange Profile specified by ID. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture update(String id, UpdateTokenExchangeProfileRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CompletableFuture update( - String id, UpdateTokenExchangeProfileRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncUserAttributeProfilesClient.java b/src/main/java/com/auth0/client/mgmt/AsyncUserAttributeProfilesClient.java deleted file mode 100644 index 2400c905a..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncUserAttributeProfilesClient.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * 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.CreateUserAttributeProfileRequestContent; -import com.auth0.client.mgmt.types.CreateUserAttributeProfileResponseContent; -import com.auth0.client.mgmt.types.GetUserAttributeProfileResponseContent; -import com.auth0.client.mgmt.types.GetUserAttributeProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.ListUserAttributeProfileRequestParameters; -import com.auth0.client.mgmt.types.ListUserAttributeProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateUserAttributeProfileRequestContent; -import com.auth0.client.mgmt.types.UpdateUserAttributeProfileResponseContent; -import com.auth0.client.mgmt.types.UserAttributeProfile; -import java.util.concurrent.CompletableFuture; - -public class AsyncUserAttributeProfilesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawUserAttributeProfilesClient rawClient; - - public AsyncUserAttributeProfilesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawUserAttributeProfilesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawUserAttributeProfilesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a list of User Attribute Profiles. This endpoint supports Checkpoint pagination. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve a list of User Attribute Profiles. This endpoint supports Checkpoint pagination. - */ - public CompletableFuture> list( - ListUserAttributeProfileRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve a list of User Attribute Profiles. This endpoint supports Checkpoint pagination. - */ - public CompletableFuture> list( - ListUserAttributeProfileRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a single User Attribute Profile specified by ID. - */ - public CompletableFuture create( - CreateUserAttributeProfileRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a single User Attribute Profile specified by ID. - */ - public CompletableFuture create( - CreateUserAttributeProfileRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve a list of User Attribute Profile Templates. - */ - public CompletableFuture listTemplates() { - return this.rawClient.listTemplates().thenApply(response -> response.body()); - } - - /** - * Retrieve a list of User Attribute Profile Templates. - */ - public CompletableFuture listTemplates( - RequestOptions requestOptions) { - return this.rawClient.listTemplates(requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve a User Attribute Profile Template. - */ - public CompletableFuture getTemplate(String id) { - return this.rawClient.getTemplate(id).thenApply(response -> response.body()); - } - - /** - * Retrieve a User Attribute Profile Template. - */ - public CompletableFuture getTemplate( - String id, RequestOptions requestOptions) { - return this.rawClient.getTemplate(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a single User Attribute Profile specified by ID. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a single User Attribute Profile specified by ID. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a single User Attribute Profile specified by ID. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete a single User Attribute Profile specified by ID. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update the details of a specific User attribute profile, such as name, user_id and user_attributes. - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update the details of a specific User attribute profile, such as name, user_id and user_attributes. - */ - public CompletableFuture update( - String id, UpdateUserAttributeProfileRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update the details of a specific User attribute profile, such as name, user_id and user_attributes. - */ - public CompletableFuture update( - String id, UpdateUserAttributeProfileRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/AsyncUserBlocksClient.java b/src/main/java/com/auth0/client/mgmt/AsyncUserBlocksClient.java deleted file mode 100644 index 1b1c7b9d3..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncUserBlocksClient.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * 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.DeleteUserBlocksByIdentifierRequestParameters; -import com.auth0.client.mgmt.types.ListUserBlocksByIdentifierRequestParameters; -import com.auth0.client.mgmt.types.ListUserBlocksByIdentifierResponseContent; -import com.auth0.client.mgmt.types.ListUserBlocksRequestParameters; -import com.auth0.client.mgmt.types.ListUserBlocksResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncUserBlocksClient { - protected final ClientOptions clientOptions; - - private final AsyncRawUserBlocksClient rawClient; - - public AsyncUserBlocksClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawUserBlocksClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawUserBlocksClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for a user with the given identifier (username, phone number, or email). - */ - public CompletableFuture listByIdentifier( - ListUserBlocksByIdentifierRequestParameters request) { - return this.rawClient.listByIdentifier(request).thenApply(response -> response.body()); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for a user with the given identifier (username, phone number, or email). - */ - public CompletableFuture listByIdentifier( - ListUserBlocksByIdentifierRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.listByIdentifier(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Remove all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given identifier (username, phone number, or email). - *

Note: This endpoint does not unblock users that were <a href="https://auth0.com/docs/user-profile#block-and-unblock-a-user">blocked by a tenant administrator</a>.

- */ - public CompletableFuture deleteByIdentifier(DeleteUserBlocksByIdentifierRequestParameters request) { - return this.rawClient.deleteByIdentifier(request).thenApply(response -> response.body()); - } - - /** - * Remove all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given identifier (username, phone number, or email). - *

Note: This endpoint does not unblock users that were <a href="https://auth0.com/docs/user-profile#block-and-unblock-a-user">blocked by a tenant administrator</a>.

- */ - public CompletableFuture deleteByIdentifier( - DeleteUserBlocksByIdentifierRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.deleteByIdentifier(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - */ - public CompletableFuture list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - */ - public CompletableFuture list(String id, ListUserBlocksRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - */ - public CompletableFuture list( - String id, ListUserBlocksRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Remove all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - *

Note: This endpoint does not unblock users that were <a href="https://auth0.com/docs/user-profile#block-and-unblock-a-user">blocked by a tenant administrator</a>.

- */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Remove all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - *

Note: This endpoint does not unblock users that were <a href="https://auth0.com/docs/user-profile#block-and-unblock-a-user">blocked by a tenant administrator</a>.

- */ - 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/AsyncUserGrantsClient.java b/src/main/java/com/auth0/client/mgmt/AsyncUserGrantsClient.java deleted file mode 100644 index 3a3e21bf0..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncUserGrantsClient.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * 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.DeleteUserGrantByUserIdRequestParameters; -import com.auth0.client.mgmt.types.ListUserGrantsRequestParameters; -import com.auth0.client.mgmt.types.UserGrant; -import java.util.concurrent.CompletableFuture; - -public class AsyncUserGrantsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawUserGrantsClient rawClient; - - public AsyncUserGrantsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawUserGrantsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawUserGrantsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve the <a href="https://auth0.com/docs/api-auth/which-oauth-flow-to-use">grants</a> associated with your account. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve the <a href="https://auth0.com/docs/api-auth/which-oauth-flow-to-use">grants</a> associated with your account. - */ - public CompletableFuture> list(ListUserGrantsRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve the <a href="https://auth0.com/docs/api-auth/which-oauth-flow-to-use">grants</a> associated with your account. - */ - public CompletableFuture> list( - ListUserGrantsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a grant associated with your account. - */ - public CompletableFuture deleteByUserId(DeleteUserGrantByUserIdRequestParameters request) { - return this.rawClient.deleteByUserId(request).thenApply(response -> response.body()); - } - - /** - * Delete a grant associated with your account. - */ - public CompletableFuture deleteByUserId( - DeleteUserGrantByUserIdRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.deleteByUserId(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a grant associated with your account. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete a grant associated with your account. - */ - 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/AsyncUsersClient.java b/src/main/java/com/auth0/client/mgmt/AsyncUsersClient.java deleted file mode 100644 index 0c30ca45f..000000000 --- a/src/main/java/com/auth0/client/mgmt/AsyncUsersClient.java +++ /dev/null @@ -1,528 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -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.ListUsersByEmailRequestParameters; -import com.auth0.client.mgmt.types.ListUsersRequestParameters; -import com.auth0.client.mgmt.types.RegenerateUsersRecoveryCodeResponseContent; -import com.auth0.client.mgmt.types.RevokeUserAccessRequestContent; -import com.auth0.client.mgmt.types.UpdateUserRequestContent; -import com.auth0.client.mgmt.types.UpdateUserResponseContent; -import com.auth0.client.mgmt.types.UserResponseSchema; -import com.auth0.client.mgmt.users.AsyncAuthenticationMethodsClient; -import com.auth0.client.mgmt.users.AsyncAuthenticatorsClient; -import com.auth0.client.mgmt.users.AsyncConnectedAccountsClient; -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; -import com.auth0.client.mgmt.users.AsyncMultifactorClient; -import com.auth0.client.mgmt.users.AsyncOrganizationsClient; -import com.auth0.client.mgmt.users.AsyncPermissionsClient; -import com.auth0.client.mgmt.users.AsyncRefreshTokenClient; -import com.auth0.client.mgmt.users.AsyncRiskAssessmentsClient; -import com.auth0.client.mgmt.users.AsyncRolesClient; -import com.auth0.client.mgmt.users.AsyncSessionsClient; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncUsersClient { - protected final ClientOptions clientOptions; - - private final AsyncRawUsersClient rawClient; - - protected final Supplier authenticationMethodsClient; - - protected final Supplier authenticatorsClient; - - protected final Supplier connectedAccountsClient; - - protected final Supplier enrollmentsClient; - - protected final Supplier federatedConnectionsTokensetsClient; - - protected final Supplier groupsClient; - - protected final Supplier identitiesClient; - - protected final Supplier logsClient; - - protected final Supplier multifactorClient; - - protected final Supplier organizationsClient; - - protected final Supplier permissionsClient; - - protected final Supplier riskAssessmentsClient; - - protected final Supplier rolesClient; - - protected final Supplier refreshTokenClient; - - protected final Supplier sessionsClient; - - public AsyncUsersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawUsersClient(clientOptions); - this.authenticationMethodsClient = Suppliers.memoize(() -> new AsyncAuthenticationMethodsClient(clientOptions)); - this.authenticatorsClient = Suppliers.memoize(() -> new AsyncAuthenticatorsClient(clientOptions)); - this.connectedAccountsClient = Suppliers.memoize(() -> new AsyncConnectedAccountsClient(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)); - this.multifactorClient = Suppliers.memoize(() -> new AsyncMultifactorClient(clientOptions)); - this.organizationsClient = Suppliers.memoize(() -> new AsyncOrganizationsClient(clientOptions)); - this.permissionsClient = Suppliers.memoize(() -> new AsyncPermissionsClient(clientOptions)); - this.riskAssessmentsClient = Suppliers.memoize(() -> new AsyncRiskAssessmentsClient(clientOptions)); - this.rolesClient = Suppliers.memoize(() -> new AsyncRolesClient(clientOptions)); - this.refreshTokenClient = Suppliers.memoize(() -> new AsyncRefreshTokenClient(clientOptions)); - this.sessionsClient = Suppliers.memoize(() -> new AsyncSessionsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawUsersClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of users. It is possible to: - *
    - *
  • Specify a 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
  • - *
- *

<!-- only v3 is available -->

- *

The <code>q</code> query parameter can be used to get users that match the specified criteria <a href="https://auth0.com/docs/users/search/v3/query-syntax">using query string syntax.</a>

- *

<a href="https://auth0.com/docs/users/search/v3">Learn more about searching for users.</a>

- *

Read about <a href="https://auth0.com/docs/users/search/best-practices">best practices</a> 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 <a href="https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports">export job</a>, or the <a href="https://auth0.com/docs/extensions/user-import-export">User Import / Export</a> extension.

- */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve details of users. It is possible to: - *
    - *
  • Specify a 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
  • - *
- *

<!-- only v3 is available -->

- *

The <code>q</code> query parameter can be used to get users that match the specified criteria <a href="https://auth0.com/docs/users/search/v3/query-syntax">using query string syntax.</a>

- *

<a href="https://auth0.com/docs/users/search/v3">Learn more about searching for users.</a>

- *

Read about <a href="https://auth0.com/docs/users/search/best-practices">best practices</a> 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 <a href="https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports">export job</a>, or the <a href="https://auth0.com/docs/extensions/user-import-export">User Import / Export</a> extension.

- */ - public CompletableFuture> list(ListUsersRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve details of users. It is possible to: - *
    - *
  • Specify a 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
  • - *
- *

<!-- only v3 is available -->

- *

The <code>q</code> query parameter can be used to get users that match the specified criteria <a href="https://auth0.com/docs/users/search/v3/query-syntax">using query string syntax.</a>

- *

<a href="https://auth0.com/docs/users/search/v3">Learn more about searching for users.</a>

- *

Read about <a href="https://auth0.com/docs/users/search/best-practices">best practices</a> 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 <a href="https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports">export job</a>, or the <a href="https://auth0.com/docs/extensions/user-import-export">User Import / Export</a> extension.

- */ - public CompletableFuture> list( - ListUsersRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a new user for a given <a href="https://auth0.com/docs/connections/database">database</a> or <a href="https://auth0.com/docs/connections/passwordless">passwordless</a> connection. - *

Note: <code>connection</code> is required but other parameters such as <code>email</code> and <code>password</code> are dependent upon the type of connection.

- */ - public CompletableFuture create(CreateUserRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create a new user for a given <a href="https://auth0.com/docs/connections/database">database</a> or <a href="https://auth0.com/docs/connections/passwordless">passwordless</a> connection. - *

Note: <code>connection</code> is required but other parameters such as <code>email</code> and <code>password</code> are dependent upon the type of connection.

- */ - public CompletableFuture create( - CreateUserRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Find users by email. If Auth0 is the identity provider (idP), the email address associated with a user is saved in lower case, regardless of how you initially provided it. - *

For example, if you register a user as JohnSmith@example.com, Auth0 saves the user's email as johnsmith@example.com.

- *

Therefore, when using this endpoint, make sure that you are searching for users via email addresses using the correct case.

- */ - public CompletableFuture> listUsersByEmail(ListUsersByEmailRequestParameters request) { - return this.rawClient.listUsersByEmail(request).thenApply(response -> response.body()); - } - - /** - * Find users by email. If Auth0 is the identity provider (idP), the email address associated with a user is saved in lower case, regardless of how you initially provided it. - *

For example, if you register a user as JohnSmith@example.com, Auth0 saves the user's email as johnsmith@example.com.

- *

Therefore, when using this endpoint, make sure that you are searching for users via email addresses using the correct case.

- */ - public CompletableFuture> listUsersByEmail( - ListUsersByEmailRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.listUsersByEmail(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see <a href="https://auth0.com/docs/manage-users/user-search/retrieve-users-with-get-users-endpoint">Retrieve Users with the Get Users Endpoint</a>. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see <a href="https://auth0.com/docs/manage-users/user-search/retrieve-users-with-get-users-endpoint">Retrieve Users with the Get Users Endpoint</a>. - */ - public CompletableFuture get(String id, GetUserRequestParameters request) { - return this.rawClient.get(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see <a href="https://auth0.com/docs/manage-users/user-search/retrieve-users-with-get-users-endpoint">Retrieve Users with the Get Users Endpoint</a>. - */ - public CompletableFuture get( - String id, GetUserRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a user by user ID. This action cannot be undone. For Auth0 Dashboard instructions, see <a href="https://auth0.com/docs/manage-users/user-accounts/delete-users">Delete Users</a>. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete a user by user ID. This action cannot be undone. For Auth0 Dashboard instructions, see <a href="https://auth0.com/docs/manage-users/user-accounts/delete-users">Delete Users</a>. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update a user. - *

These are the attributes that can be updated at the root level:

- *

<ul> - * <li>app_metadata</li> - * <li>blocked</li> - * <li>email</li> - * <li>email_verified</li> - * <li>family_name</li> - * <li>given_name</li> - * <li>name</li> - * <li>nickname</li> - * <li>password</li> - * <li>phone_number</li> - * <li>phone_verified</li> - * <li>picture</li> - * <li>username</li> - * <li>user_metadata</li> - * <li>verify_email</li> - * </ul>

- *

Some considerations:

- *

<ul> - * <li>The properties of the new object will replace the old ones.</li> - * <li>The metadata fields are an exception to this rule (<code>user_metadata</code> and <code>app_metadata</code>). These properties are merged instead of being replaced but be careful, the merge only occurs on the first level.</li> - * <li>If you are updating <code>email</code>, <code>email_verified</code>, <code>phone_number</code>, <code>phone_verified</code>, <code>username</code> or <code>password</code> of a secondary identity, you need to specify the <code>connection</code> property too.</li> - * <li>If you are updating <code>email</code> or <code>phone_number</code> you can specify, optionally, the <code>client_id</code> property.</li> - * <li>Updating <code>email_verified</code> is not supported for enterprise and passwordless sms connections.</li> - * <li>Updating the <code>blocked</code> to <code>false</code> does not affect the user's blocked state from an excessive amount of incorrectly provided credentials. Use the "Unblock a user" endpoint from the "User Blocks" API to change the user's state.</li> - * <li>Supported attributes can be unset by supplying <code>null</code> as the value.</li> - * </ul>

- *

<h5>Updating a field (non-metadata property)</h5> - * To mark the email address of a user as verified, the body to send should be: - * <pre><code>{ "email_verified": true }</code></pre>

- *

<h5>Updating a user metadata root property</h5>Let's assume that our test user has the following <code>user_metadata</code>: - * <pre><code>{ "user_metadata" : { "profileCode": 1479 } }</code></pre>

- *

To add the field <code>addresses</code> the body to send should be:

- *

<pre><code>{ "user_metadata" : { "addresses": {"work_address": "100 Industrial Way"} }}</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { "work_address": "100 Industrial Way" } - * } - * }</code></pre>

- *

<h5>Updating an inner user metadata property</h5>If there's existing user metadata to which we want to add <code>"home_address": "742 Evergreen Terrace"</code> (using the <code>addresses</code> property) we should send the whole <code>addresses</code> object. Since this is a first-level object, the object will be merged in, but its own properties will not be. The body to send should be: - * <pre><code>{ - * "user_metadata": { - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:

- *

<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update a user. - *

These are the attributes that can be updated at the root level:

- *

<ul> - * <li>app_metadata</li> - * <li>blocked</li> - * <li>email</li> - * <li>email_verified</li> - * <li>family_name</li> - * <li>given_name</li> - * <li>name</li> - * <li>nickname</li> - * <li>password</li> - * <li>phone_number</li> - * <li>phone_verified</li> - * <li>picture</li> - * <li>username</li> - * <li>user_metadata</li> - * <li>verify_email</li> - * </ul>

- *

Some considerations:

- *

<ul> - * <li>The properties of the new object will replace the old ones.</li> - * <li>The metadata fields are an exception to this rule (<code>user_metadata</code> and <code>app_metadata</code>). These properties are merged instead of being replaced but be careful, the merge only occurs on the first level.</li> - * <li>If you are updating <code>email</code>, <code>email_verified</code>, <code>phone_number</code>, <code>phone_verified</code>, <code>username</code> or <code>password</code> of a secondary identity, you need to specify the <code>connection</code> property too.</li> - * <li>If you are updating <code>email</code> or <code>phone_number</code> you can specify, optionally, the <code>client_id</code> property.</li> - * <li>Updating <code>email_verified</code> is not supported for enterprise and passwordless sms connections.</li> - * <li>Updating the <code>blocked</code> to <code>false</code> does not affect the user's blocked state from an excessive amount of incorrectly provided credentials. Use the "Unblock a user" endpoint from the "User Blocks" API to change the user's state.</li> - * <li>Supported attributes can be unset by supplying <code>null</code> as the value.</li> - * </ul>

- *

<h5>Updating a field (non-metadata property)</h5> - * To mark the email address of a user as verified, the body to send should be: - * <pre><code>{ "email_verified": true }</code></pre>

- *

<h5>Updating a user metadata root property</h5>Let's assume that our test user has the following <code>user_metadata</code>: - * <pre><code>{ "user_metadata" : { "profileCode": 1479 } }</code></pre>

- *

To add the field <code>addresses</code> the body to send should be:

- *

<pre><code>{ "user_metadata" : { "addresses": {"work_address": "100 Industrial Way"} }}</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { "work_address": "100 Industrial Way" } - * } - * }</code></pre>

- *

<h5>Updating an inner user metadata property</h5>If there's existing user metadata to which we want to add <code>"home_address": "742 Evergreen Terrace"</code> (using the <code>addresses</code> property) we should send the whole <code>addresses</code> object. Since this is a first-level object, the object will be merged in, but its own properties will not be. The body to send should be: - * <pre><code>{ - * "user_metadata": { - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:

- *

<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- */ - public CompletableFuture update(String id, UpdateUserRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update a user. - *

These are the attributes that can be updated at the root level:

- *

<ul> - * <li>app_metadata</li> - * <li>blocked</li> - * <li>email</li> - * <li>email_verified</li> - * <li>family_name</li> - * <li>given_name</li> - * <li>name</li> - * <li>nickname</li> - * <li>password</li> - * <li>phone_number</li> - * <li>phone_verified</li> - * <li>picture</li> - * <li>username</li> - * <li>user_metadata</li> - * <li>verify_email</li> - * </ul>

- *

Some considerations:

- *

<ul> - * <li>The properties of the new object will replace the old ones.</li> - * <li>The metadata fields are an exception to this rule (<code>user_metadata</code> and <code>app_metadata</code>). These properties are merged instead of being replaced but be careful, the merge only occurs on the first level.</li> - * <li>If you are updating <code>email</code>, <code>email_verified</code>, <code>phone_number</code>, <code>phone_verified</code>, <code>username</code> or <code>password</code> of a secondary identity, you need to specify the <code>connection</code> property too.</li> - * <li>If you are updating <code>email</code> or <code>phone_number</code> you can specify, optionally, the <code>client_id</code> property.</li> - * <li>Updating <code>email_verified</code> is not supported for enterprise and passwordless sms connections.</li> - * <li>Updating the <code>blocked</code> to <code>false</code> does not affect the user's blocked state from an excessive amount of incorrectly provided credentials. Use the "Unblock a user" endpoint from the "User Blocks" API to change the user's state.</li> - * <li>Supported attributes can be unset by supplying <code>null</code> as the value.</li> - * </ul>

- *

<h5>Updating a field (non-metadata property)</h5> - * To mark the email address of a user as verified, the body to send should be: - * <pre><code>{ "email_verified": true }</code></pre>

- *

<h5>Updating a user metadata root property</h5>Let's assume that our test user has the following <code>user_metadata</code>: - * <pre><code>{ "user_metadata" : { "profileCode": 1479 } }</code></pre>

- *

To add the field <code>addresses</code> the body to send should be:

- *

<pre><code>{ "user_metadata" : { "addresses": {"work_address": "100 Industrial Way"} }}</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { "work_address": "100 Industrial Way" } - * } - * }</code></pre>

- *

<h5>Updating an inner user metadata property</h5>If there's existing user metadata to which we want to add <code>"home_address": "742 Evergreen Terrace"</code> (using the <code>addresses</code> property) we should send the whole <code>addresses</code> object. Since this is a first-level object, the object will be merged in, but its own properties will not be. The body to send should be: - * <pre><code>{ - * "user_metadata": { - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:

- *

<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- */ - public CompletableFuture update( - String id, UpdateUserRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Remove an existing multi-factor authentication (MFA) <a href="https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa">recovery code</a> 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. - */ - public CompletableFuture regenerateRecoveryCode(String id) { - return this.rawClient.regenerateRecoveryCode(id).thenApply(response -> response.body()); - } - - /** - * Remove an existing multi-factor authentication (MFA) <a href="https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa">recovery code</a> 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. - */ - public CompletableFuture regenerateRecoveryCode( - String id, RequestOptions requestOptions) { - return this.rawClient.regenerateRecoveryCode(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Revokes selected resources related to a user (sessions, refresh tokens, ...). - */ - public CompletableFuture revokeAccess(String id) { - return this.rawClient.revokeAccess(id).thenApply(response -> response.body()); - } - - /** - * Revokes selected resources related to a user (sessions, refresh tokens, ...). - */ - public CompletableFuture revokeAccess(String id, RevokeUserAccessRequestContent request) { - return this.rawClient.revokeAccess(id, request).thenApply(response -> response.body()); - } - - /** - * Revokes selected resources related to a user (sessions, refresh tokens, ...). - */ - public CompletableFuture revokeAccess( - String id, RevokeUserAccessRequestContent request, RequestOptions requestOptions) { - return this.rawClient.revokeAccess(id, request, requestOptions).thenApply(response -> response.body()); - } - - public AsyncAuthenticationMethodsClient authenticationMethods() { - return this.authenticationMethodsClient.get(); - } - - public AsyncAuthenticatorsClient authenticators() { - return this.authenticatorsClient.get(); - } - - public AsyncConnectedAccountsClient connectedAccounts() { - return this.connectedAccountsClient.get(); - } - - public AsyncEnrollmentsClient enrollments() { - return this.enrollmentsClient.get(); - } - - public AsyncFederatedConnectionsTokensetsClient federatedConnectionsTokensets() { - return this.federatedConnectionsTokensetsClient.get(); - } - - public AsyncGroupsClient groups() { - return this.groupsClient.get(); - } - - public AsyncIdentitiesClient identities() { - return this.identitiesClient.get(); - } - - public AsyncLogsClient logs() { - return this.logsClient.get(); - } - - public AsyncMultifactorClient multifactor() { - return this.multifactorClient.get(); - } - - public AsyncOrganizationsClient organizations() { - return this.organizationsClient.get(); - } - - public AsyncPermissionsClient permissions() { - return this.permissionsClient.get(); - } - - public AsyncRiskAssessmentsClient riskAssessments() { - return this.riskAssessmentsClient.get(); - } - - public AsyncRolesClient roles() { - return this.rolesClient.get(); - } - - public AsyncRefreshTokenClient refreshToken() { - return this.refreshTokenClient.get(); - } - - public AsyncSessionsClient sessions() { - return this.sessionsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/BrandingClient.java b/src/main/java/com/auth0/client/mgmt/BrandingClient.java deleted file mode 100644 index 90b5792f1..000000000 --- a/src/main/java/com/auth0/client/mgmt/BrandingClient.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.branding.TemplatesClient; -import com.auth0.client.mgmt.branding.ThemesClient; -import com.auth0.client.mgmt.branding.phone.PhoneClient; -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.types.GetBrandingResponseContent; -import com.auth0.client.mgmt.types.UpdateBrandingRequestContent; -import com.auth0.client.mgmt.types.UpdateBrandingResponseContent; -import java.util.function.Supplier; - -public class BrandingClient { - protected final ClientOptions clientOptions; - - private final RawBrandingClient rawClient; - - protected final Supplier templatesClient; - - protected final Supplier themesClient; - - protected final Supplier phoneClient; - - public BrandingClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawBrandingClient(clientOptions); - this.templatesClient = Suppliers.memoize(() -> new TemplatesClient(clientOptions)); - this.themesClient = Suppliers.memoize(() -> new ThemesClient(clientOptions)); - this.phoneClient = Suppliers.memoize(() -> new PhoneClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawBrandingClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve branding settings. - */ - public GetBrandingResponseContent get() { - return this.rawClient.get().body(); - } - - /** - * Retrieve branding settings. - */ - public GetBrandingResponseContent get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).body(); - } - - /** - * Update branding settings. - */ - public UpdateBrandingResponseContent update() { - return this.rawClient.update().body(); - } - - /** - * Update branding settings. - */ - public UpdateBrandingResponseContent update(UpdateBrandingRequestContent request) { - return this.rawClient.update(request).body(); - } - - /** - * Update branding settings. - */ - public UpdateBrandingResponseContent update(UpdateBrandingRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).body(); - } - - public TemplatesClient templates() { - return this.templatesClient.get(); - } - - public ThemesClient themes() { - return this.themesClient.get(); - } - - public PhoneClient phone() { - return this.phoneClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/ClientGrantsClient.java b/src/main/java/com/auth0/client/mgmt/ClientGrantsClient.java deleted file mode 100644 index f96e42753..000000000 --- a/src/main/java/com/auth0/client/mgmt/ClientGrantsClient.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.clientgrants.OrganizationsClient; -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.types.ClientGrantResponseContent; -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.UpdateClientGrantRequestContent; -import com.auth0.client.mgmt.types.UpdateClientGrantResponseContent; -import java.util.function.Supplier; - -public class ClientGrantsClient { - protected final ClientOptions clientOptions; - - private final RawClientGrantsClient rawClient; - - protected final Supplier organizationsClient; - - public ClientGrantsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawClientGrantsClient(clientOptions); - this.organizationsClient = Suppliers.memoize(() -> new OrganizationsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawClientGrantsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grants</a>, including the scopes associated with the application/API pair. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grants</a>, including the scopes associated with the application/API pair. - */ - public SyncPagingIterable list(ListClientGrantsRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grants</a>, including the scopes associated with the application/API pair. - */ - public SyncPagingIterable list( - ListClientGrantsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create a client grant for a machine-to-machine login flow. To learn more, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public CreateClientGrantResponseContent create(CreateClientGrantRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create a client grant for a machine-to-machine login flow. To learn more, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public CreateClientGrantResponseContent create( - CreateClientGrantRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve a single <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grant</a>, including the - * scopes associated with the application/API pair. - */ - public GetClientGrantResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve a single <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grant</a>, including the - * scopes associated with the application/API pair. - */ - public GetClientGrantResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Delete the <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a> from your machine-to-machine application. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete the <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a> from your machine-to-machine application. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update a client grant. - */ - public UpdateClientGrantResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update a client grant. - */ - public UpdateClientGrantResponseContent update(String id, UpdateClientGrantRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update a client grant. - */ - public UpdateClientGrantResponseContent update( - String id, UpdateClientGrantRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - public OrganizationsClient organizations() { - return this.organizationsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/ClientsClient.java b/src/main/java/com/auth0/client/mgmt/ClientsClient.java deleted file mode 100644 index 2e8759ea3..000000000 --- a/src/main/java/com/auth0/client/mgmt/ClientsClient.java +++ /dev/null @@ -1,399 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.clients.ConnectionsClient; -import com.auth0.client.mgmt.clients.CredentialsClient; -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.types.Client; -import com.auth0.client.mgmt.types.CreateClientRequestContent; -import com.auth0.client.mgmt.types.CreateClientResponseContent; -import com.auth0.client.mgmt.types.GetClientRequestParameters; -import com.auth0.client.mgmt.types.GetClientResponseContent; -import com.auth0.client.mgmt.types.ListClientsRequestParameters; -import com.auth0.client.mgmt.types.RotateClientSecretResponseContent; -import com.auth0.client.mgmt.types.UpdateClientRequestContent; -import com.auth0.client.mgmt.types.UpdateClientResponseContent; -import java.util.function.Supplier; - -public class ClientsClient { - protected final ClientOptions clientOptions; - - private final RawClientsClient rawClient; - - protected final Supplier credentialsClient; - - protected final Supplier connectionsClient; - - public ClientsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawClientsClient(clientOptions); - this.credentialsClient = Suppliers.memoize(() -> new CredentialsClient(clientOptions)); - this.connectionsClient = Suppliers.memoize(() -> new ConnectionsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawClientsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified. - * For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following can be retrieved with any scope: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scope: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the - * <code>read:client_keys</code> or <code>read:client_credentials</code> scope: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified. - * For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following can be retrieved with any scope: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scope: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the - * <code>read:client_keys</code> or <code>read:client_credentials</code> scope: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public SyncPagingIterable list(ListClientsRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified. - * For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following can be retrieved with any scope: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scope: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the - * <code>read:client_keys</code> or <code>read:client_credentials</code> scope: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public SyncPagingIterable list(ListClientsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create a new client (application or SSO integration). For more information, read <a href="https://www.auth0.com/docs/get-started/auth0-overview/create-applications">Create Applications</a> - * <a href="https://www.auth0.com/docs/authenticate/single-sign-on/api-endpoints-for-single-sign-on>">API Endpoints for Single Sign-On</a>. - *

Notes:

- *
    - *
  • We recommend leaving the client_secret parameter unspecified to allow the generation of a safe secret.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use - * <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> - * to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, specify fully defined credentials. - * These credentials will be automatically enabled for Private Key JWT authentication on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>create:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
- *

<div class="alert alert-warning">SSO Integrations created via this endpoint will accept login requests and share user profile information.</div>

- */ - public CreateClientResponseContent create(CreateClientRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create a new client (application or SSO integration). For more information, read <a href="https://www.auth0.com/docs/get-started/auth0-overview/create-applications">Create Applications</a> - * <a href="https://www.auth0.com/docs/authenticate/single-sign-on/api-endpoints-for-single-sign-on>">API Endpoints for Single Sign-On</a>. - *

Notes:

- *
    - *
  • We recommend leaving the client_secret parameter unspecified to allow the generation of a safe secret.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use - * <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> - * to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, specify fully defined credentials. - * These credentials will be automatically enabled for Private Key JWT authentication on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>create:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
- *

<div class="alert alert-warning">SSO Integrations created via this endpoint will accept login requests and share user profile information.</div>

- */ - public CreateClientResponseContent create(CreateClientRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(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 <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following properties can be retrieved with any of the scopes: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scopes: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public GetClientResponseContent get(String id) { - return this.rawClient.get(id).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 <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following properties can be retrieved with any of the scopes: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scopes: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public GetClientResponseContent get(String id, GetClientRequestParameters request) { - return this.rawClient.get(id, request).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 <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following properties can be retrieved with any of the scopes: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scopes: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public GetClientResponseContent get(String id, GetClientRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).body(); - } - - /** - * Delete a client and related configuration (rules, connections, etc). - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete a client and related configuration (rules, connections, etc). - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

Notes:

- *
    - *
  • The client_secret and signing_key attributes can only be updated with the update:client_keys scope.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>update:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
  • To change a client's <code>is_first_party</code> property to <code>false</code>, the <code>organization_usage</code> and <code>organization_require_behavior</code> properties must be unset.
  • - *
- */ - public UpdateClientResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

Notes:

- *
    - *
  • The client_secret and signing_key attributes can only be updated with the update:client_keys scope.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>update:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
  • To change a client's <code>is_first_party</code> property to <code>false</code>, the <code>organization_usage</code> and <code>organization_require_behavior</code> properties must be unset.
  • - *
- */ - public UpdateClientResponseContent update(String id, UpdateClientRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

Notes:

- *
    - *
  • The client_secret and signing_key attributes can only be updated with the update:client_keys scope.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>update:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
  • To change a client's <code>is_first_party</code> property to <code>false</code>, the <code>organization_usage</code> and <code>organization_require_behavior</code> properties must be unset.
  • - *
- */ - public UpdateClientResponseContent update( - String id, UpdateClientRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - /** - * Rotate a client secret. - *

This endpoint cannot be used with clients configured with Private Key JWT authentication method (client_authentication_methods configured with private_key_jwt). The generated secret is NOT base64 encoded.

- *

For more information, read <a href="https://www.auth0.com/docs/get-started/applications/rotate-client-secret">Rotate Client Secrets</a>.

- */ - public RotateClientSecretResponseContent rotateSecret(String id) { - return this.rawClient.rotateSecret(id).body(); - } - - /** - * Rotate a client secret. - *

This endpoint cannot be used with clients configured with Private Key JWT authentication method (client_authentication_methods configured with private_key_jwt). The generated secret is NOT base64 encoded.

- *

For more information, read <a href="https://www.auth0.com/docs/get-started/applications/rotate-client-secret">Rotate Client Secrets</a>.

- */ - public RotateClientSecretResponseContent rotateSecret(String id, RequestOptions requestOptions) { - return this.rawClient.rotateSecret(id, requestOptions).body(); - } - - public CredentialsClient credentials() { - return this.credentialsClient.get(); - } - - public ConnectionsClient connections() { - return this.connectionsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/ConnectionProfilesClient.java b/src/main/java/com/auth0/client/mgmt/ConnectionProfilesClient.java deleted file mode 100644 index 54e4be959..000000000 --- a/src/main/java/com/auth0/client/mgmt/ConnectionProfilesClient.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * 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.ConnectionProfile; -import com.auth0.client.mgmt.types.CreateConnectionProfileRequestContent; -import com.auth0.client.mgmt.types.CreateConnectionProfileResponseContent; -import com.auth0.client.mgmt.types.GetConnectionProfileResponseContent; -import com.auth0.client.mgmt.types.GetConnectionProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.ListConnectionProfileRequestParameters; -import com.auth0.client.mgmt.types.ListConnectionProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateConnectionProfileRequestContent; -import com.auth0.client.mgmt.types.UpdateConnectionProfileResponseContent; - -public class ConnectionProfilesClient { - protected final ClientOptions clientOptions; - - private final RawConnectionProfilesClient rawClient; - - public ConnectionProfilesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawConnectionProfilesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawConnectionProfilesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a list of Connection Profiles. This endpoint supports Checkpoint pagination. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve a list of Connection Profiles. This endpoint supports Checkpoint pagination. - */ - public SyncPagingIterable list(ListConnectionProfileRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve a list of Connection Profiles. This endpoint supports Checkpoint pagination. - */ - public SyncPagingIterable list( - ListConnectionProfileRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create a Connection Profile. - */ - public CreateConnectionProfileResponseContent create(CreateConnectionProfileRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create a Connection Profile. - */ - public CreateConnectionProfileResponseContent create( - CreateConnectionProfileRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve a list of Connection Profile Templates. - */ - public ListConnectionProfileTemplateResponseContent listTemplates() { - return this.rawClient.listTemplates().body(); - } - - /** - * Retrieve a list of Connection Profile Templates. - */ - public ListConnectionProfileTemplateResponseContent listTemplates(RequestOptions requestOptions) { - return this.rawClient.listTemplates(requestOptions).body(); - } - - /** - * Retrieve a Connection Profile Template. - */ - public GetConnectionProfileTemplateResponseContent getTemplate(String id) { - return this.rawClient.getTemplate(id).body(); - } - - /** - * Retrieve a Connection Profile Template. - */ - public GetConnectionProfileTemplateResponseContent getTemplate(String id, RequestOptions requestOptions) { - return this.rawClient.getTemplate(id, requestOptions).body(); - } - - /** - * Retrieve details about a single Connection Profile specified by ID. - */ - public GetConnectionProfileResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve details about a single Connection Profile specified by ID. - */ - public GetConnectionProfileResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Delete a single Connection Profile specified by ID. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete a single Connection Profile specified by ID. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update the details of a specific Connection Profile. - */ - public UpdateConnectionProfileResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update the details of a specific Connection Profile. - */ - public UpdateConnectionProfileResponseContent update(String id, UpdateConnectionProfileRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update the details of a specific Connection Profile. - */ - public UpdateConnectionProfileResponseContent update( - String id, UpdateConnectionProfileRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/ConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/ConnectionsClient.java deleted file mode 100644 index 999adfd88..000000000 --- a/src/main/java/com/auth0/client/mgmt/ConnectionsClient.java +++ /dev/null @@ -1,231 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.connections.ClientsClient; -import com.auth0.client.mgmt.connections.DirectoryProvisioningClient; -import com.auth0.client.mgmt.connections.KeysClient; -import com.auth0.client.mgmt.connections.ScimConfigurationClient; -import com.auth0.client.mgmt.connections.UsersClient; -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.types.ConnectionForList; -import com.auth0.client.mgmt.types.CreateConnectionRequestContent; -import com.auth0.client.mgmt.types.CreateConnectionResponseContent; -import com.auth0.client.mgmt.types.GetConnectionRequestParameters; -import com.auth0.client.mgmt.types.GetConnectionResponseContent; -import com.auth0.client.mgmt.types.ListConnectionsQueryParameters; -import com.auth0.client.mgmt.types.UpdateConnectionRequestContent; -import com.auth0.client.mgmt.types.UpdateConnectionResponseContent; -import java.util.function.Supplier; - -public class ConnectionsClient { - protected final ClientOptions clientOptions; - - private final RawConnectionsClient rawClient; - - protected final Supplier directoryProvisioningClient; - - protected final Supplier clientsClient; - - protected final Supplier keysClient; - - protected final Supplier scimConfigurationClient; - - protected final Supplier usersClient; - - public ConnectionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawConnectionsClient(clientOptions); - this.directoryProvisioningClient = Suppliers.memoize(() -> new DirectoryProvisioningClient(clientOptions)); - this.clientsClient = Suppliers.memoize(() -> new ClientsClient(clientOptions)); - this.keysClient = Suppliers.memoize(() -> new KeysClient(clientOptions)); - this.scimConfigurationClient = Suppliers.memoize(() -> new ScimConfigurationClient(clientOptions)); - this.usersClient = Suppliers.memoize(() -> new UsersClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawConnectionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieves detailed list of all <a href="https://auth0.com/docs/authenticate/identity-providers">connections</a> that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 connections.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieves detailed list of all <a href="https://auth0.com/docs/authenticate/identity-providers">connections</a> that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 connections.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public SyncPagingIterable list(ListConnectionsQueryParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieves detailed list of all <a href="https://auth0.com/docs/authenticate/identity-providers">connections</a> that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 connections.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public SyncPagingIterable list( - ListConnectionsQueryParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Creates a new connection according to the JSON object received in <code>body</code>. - *

<b>Note:</b> If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.

- */ - public CreateConnectionResponseContent create(CreateConnectionRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Creates a new connection according to the JSON object received in <code>body</code>. - *

<b>Note:</b> If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.

- */ - public CreateConnectionResponseContent create( - CreateConnectionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve details for a specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> along with options that can be used for identity provider configuration. - */ - public GetConnectionResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve details for a specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> along with options that can be used for identity provider configuration. - */ - public GetConnectionResponseContent get(String id, GetConnectionRequestParameters request) { - return this.rawClient.get(id, request).body(); - } - - /** - * Retrieve details for a specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> along with options that can be used for identity provider configuration. - */ - public GetConnectionResponseContent get( - String id, GetConnectionRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).body(); - } - - /** - * Removes a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. - *

<b>Note:</b> If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent <a href="https://auth0.com/docs/api/management/v2/connections/post-connections">create connection</a> requests, if they use an identical connection name.

- */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Removes a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. - *

<b>Note:</b> If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent <a href="https://auth0.com/docs/api/management/v2/connections/post-connections">create connection</a> requests, if they use an identical connection name.

- */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update details for a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a>, including option properties for identity provider configuration. - *

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

- */ - public UpdateConnectionResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update details for a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a>, including option properties for identity provider configuration. - *

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

- */ - public UpdateConnectionResponseContent update(String id, UpdateConnectionRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update details for a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a>, including option properties for identity provider configuration. - *

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

- */ - public UpdateConnectionResponseContent update( - String id, UpdateConnectionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - /** - * Retrieves the status of an ad/ldap connection referenced by its <code>ID</code>. <code>200 OK</code> http status code response is returned when the connection is online, otherwise a <code>404</code> status code is returned along with an error message - */ - public void checkStatus(String id) { - this.rawClient.checkStatus(id).body(); - } - - /** - * Retrieves the status of an ad/ldap connection referenced by its <code>ID</code>. <code>200 OK</code> http status code response is returned when the connection is online, otherwise a <code>404</code> status code is returned along with an error message - */ - public void checkStatus(String id, RequestOptions requestOptions) { - this.rawClient.checkStatus(id, requestOptions).body(); - } - - public DirectoryProvisioningClient directoryProvisioning() { - return this.directoryProvisioningClient.get(); - } - - public ClientsClient clients() { - return this.clientsClient.get(); - } - - public KeysClient keys() { - return this.keysClient.get(); - } - - public ScimConfigurationClient scimConfiguration() { - return this.scimConfigurationClient.get(); - } - - public UsersClient users() { - return this.usersClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/CustomDomainsClient.java b/src/main/java/com/auth0/client/mgmt/CustomDomainsClient.java deleted file mode 100644 index c91dcdba1..000000000 --- a/src/main/java/com/auth0/client/mgmt/CustomDomainsClient.java +++ /dev/null @@ -1,236 +0,0 @@ -/** - * 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.CreateCustomDomainRequestContent; -import com.auth0.client.mgmt.types.CreateCustomDomainResponseContent; -import com.auth0.client.mgmt.types.CustomDomain; -import com.auth0.client.mgmt.types.GetCustomDomainResponseContent; -import com.auth0.client.mgmt.types.ListCustomDomainsRequestParameters; -import com.auth0.client.mgmt.types.TestCustomDomainResponseContent; -import com.auth0.client.mgmt.types.UpdateCustomDomainRequestContent; -import com.auth0.client.mgmt.types.UpdateCustomDomainResponseContent; -import com.auth0.client.mgmt.types.VerifyCustomDomainResponseContent; -import java.util.List; - -public class CustomDomainsClient { - protected final ClientOptions clientOptions; - - private final RawCustomDomainsClient rawClient; - - public CustomDomainsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawCustomDomainsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawCustomDomainsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/custom-domains">custom domains</a>. - */ - public List list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/custom-domains">custom domains</a>. - */ - public List list(ListCustomDomainsRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/custom-domains">custom domains</a>. - */ - public List list(ListCustomDomainsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create a new custom domain. - *

Note: The custom domain will need to be verified before it will accept - * requests.

- *

Optional attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- */ - public CreateCustomDomainResponseContent create(CreateCustomDomainRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create a new custom domain. - *

Note: The custom domain will need to be verified before it will accept - * requests.

- *

Optional attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- */ - public CreateCustomDomainResponseContent create( - CreateCustomDomainRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve a custom domain configuration and status. - */ - public GetCustomDomainResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve a custom domain configuration and status. - */ - public GetCustomDomainResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Delete a custom domain and stop serving requests for it. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete a custom domain and stop serving requests for it. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update a custom domain. - *

These are the attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

<h5>Updating CUSTOM_CLIENT_IP_HEADER for a custom domain</h5>To update the <code>custom_client_ip_header</code> for a domain, the body to - * send should be: - * <pre><code>{ "custom_client_ip_header": "cf-connecting-ip" }</code></pre>

- *

<h5>Updating TLS_POLICY for a custom domain</h5>To update the <code>tls_policy</code> for a domain, the body to send should be: - * <pre><code>{ "tls_policy": "recommended" }</code></pre>

- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- *

Some considerations:

- *
    - *
  • The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally.
  • - *
  • The <code>compatible</code> TLS policy is no longer supported.
  • - *
- */ - public UpdateCustomDomainResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update a custom domain. - *

These are the attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

<h5>Updating CUSTOM_CLIENT_IP_HEADER for a custom domain</h5>To update the <code>custom_client_ip_header</code> for a domain, the body to - * send should be: - * <pre><code>{ "custom_client_ip_header": "cf-connecting-ip" }</code></pre>

- *

<h5>Updating TLS_POLICY for a custom domain</h5>To update the <code>tls_policy</code> for a domain, the body to send should be: - * <pre><code>{ "tls_policy": "recommended" }</code></pre>

- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- *

Some considerations:

- *
    - *
  • The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally.
  • - *
  • The <code>compatible</code> TLS policy is no longer supported.
  • - *
- */ - public UpdateCustomDomainResponseContent update(String id, UpdateCustomDomainRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update a custom domain. - *

These are the attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

<h5>Updating CUSTOM_CLIENT_IP_HEADER for a custom domain</h5>To update the <code>custom_client_ip_header</code> for a domain, the body to - * send should be: - * <pre><code>{ "custom_client_ip_header": "cf-connecting-ip" }</code></pre>

- *

<h5>Updating TLS_POLICY for a custom domain</h5>To update the <code>tls_policy</code> for a domain, the body to send should be: - * <pre><code>{ "tls_policy": "recommended" }</code></pre>

- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- *

Some considerations:

- *
    - *
  • The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally.
  • - *
  • The <code>compatible</code> TLS policy is no longer supported.
  • - *
- */ - public UpdateCustomDomainResponseContent update( - String id, UpdateCustomDomainRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - /** - * Run the test process on a custom domain. - */ - public TestCustomDomainResponseContent test(String id) { - return this.rawClient.test(id).body(); - } - - /** - * Run the test process on a custom domain. - */ - public TestCustomDomainResponseContent test(String id, RequestOptions requestOptions) { - return this.rawClient.test(id, requestOptions).body(); - } - - /** - * Run the verification process on a custom domain. - *

Note: Check the <code>status</code> field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests.

- *

For <code>self_managed_certs</code>, when the custom domain is verified for the first time, the response will also include the <code>cname_api_key</code> which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests.

- *

<a href="https://auth0.com/docs/custom-domains#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Auth0 Managed certificates. - * <a href="https://auth0.com/docs/custom-domains/self-managed-certificates#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Self Managed certificates.

- */ - public VerifyCustomDomainResponseContent verify(String id) { - return this.rawClient.verify(id).body(); - } - - /** - * Run the verification process on a custom domain. - *

Note: Check the <code>status</code> field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests.

- *

For <code>self_managed_certs</code>, when the custom domain is verified for the first time, the response will also include the <code>cname_api_key</code> which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests.

- *

<a href="https://auth0.com/docs/custom-domains#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Auth0 Managed certificates. - * <a href="https://auth0.com/docs/custom-domains/self-managed-certificates#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Self Managed certificates.

- */ - public VerifyCustomDomainResponseContent verify(String id, RequestOptions requestOptions) { - return this.rawClient.verify(id, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/DeviceCredentialsClient.java b/src/main/java/com/auth0/client/mgmt/DeviceCredentialsClient.java deleted file mode 100644 index 7bca7c738..000000000 --- a/src/main/java/com/auth0/client/mgmt/DeviceCredentialsClient.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * 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.CreatePublicKeyDeviceCredentialRequestContent; -import com.auth0.client.mgmt.types.CreatePublicKeyDeviceCredentialResponseContent; -import com.auth0.client.mgmt.types.DeviceCredential; -import com.auth0.client.mgmt.types.ListDeviceCredentialsRequestParameters; - -public class DeviceCredentialsClient { - protected final ClientOptions clientOptions; - - private final RawDeviceCredentialsClient rawClient; - - public DeviceCredentialsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawDeviceCredentialsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawDeviceCredentialsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve device credential information (<code>public_key</code>, <code>refresh_token</code>, or <code>rotating_refresh_token</code>) associated with a specific user. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve device credential information (<code>public_key</code>, <code>refresh_token</code>, or <code>rotating_refresh_token</code>) associated with a specific user. - */ - public SyncPagingIterable list(ListDeviceCredentialsRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve device credential information (<code>public_key</code>, <code>refresh_token</code>, or <code>rotating_refresh_token</code>) associated with a specific user. - */ - public SyncPagingIterable list( - ListDeviceCredentialsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create a device credential public key to manage refresh token rotation for a given <code>user_id</code>. Device Credentials APIs are designed for ad-hoc administrative use only and paging is by default enabled for GET requests. - *

When refresh token rotation is enabled, the endpoint becomes consistent. For more information, read <a href="https://auth0.com/docs/get-started/tenant-settings/signing-keys"> Signing Keys</a>.

- */ - public CreatePublicKeyDeviceCredentialResponseContent createPublicKey( - CreatePublicKeyDeviceCredentialRequestContent request) { - return this.rawClient.createPublicKey(request).body(); - } - - /** - * Create a device credential public key to manage refresh token rotation for a given <code>user_id</code>. Device Credentials APIs are designed for ad-hoc administrative use only and paging is by default enabled for GET requests. - *

When refresh token rotation is enabled, the endpoint becomes consistent. For more information, read <a href="https://auth0.com/docs/get-started/tenant-settings/signing-keys"> Signing Keys</a>.

- */ - public CreatePublicKeyDeviceCredentialResponseContent createPublicKey( - CreatePublicKeyDeviceCredentialRequestContent request, RequestOptions requestOptions) { - return this.rawClient.createPublicKey(request, requestOptions).body(); - } - - /** - * Permanently delete a device credential (such as a refresh token or public key) with the given ID. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Permanently delete a device credential (such as a refresh token or public key) with the given ID. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/EmailTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/EmailTemplatesClient.java deleted file mode 100644 index cda139182..000000000 --- a/src/main/java/com/auth0/client/mgmt/EmailTemplatesClient.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * 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.CreateEmailTemplateRequestContent; -import com.auth0.client.mgmt.types.CreateEmailTemplateResponseContent; -import com.auth0.client.mgmt.types.EmailTemplateNameEnum; -import com.auth0.client.mgmt.types.GetEmailTemplateResponseContent; -import com.auth0.client.mgmt.types.SetEmailTemplateRequestContent; -import com.auth0.client.mgmt.types.SetEmailTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateEmailTemplateRequestContent; -import com.auth0.client.mgmt.types.UpdateEmailTemplateResponseContent; - -public class EmailTemplatesClient { - protected final ClientOptions clientOptions; - - private final RawEmailTemplatesClient rawClient; - - public EmailTemplatesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawEmailTemplatesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawEmailTemplatesClient withRawResponse() { - return this.rawClient; - } - - /** - * Create an email template. - */ - public CreateEmailTemplateResponseContent create(CreateEmailTemplateRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create an email template. - */ - public CreateEmailTemplateResponseContent create( - CreateEmailTemplateRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. - */ - public GetEmailTemplateResponseContent get(EmailTemplateNameEnum templateName) { - return this.rawClient.get(templateName).body(); - } - - /** - * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. - */ - public GetEmailTemplateResponseContent get(EmailTemplateNameEnum templateName, RequestOptions requestOptions) { - return this.rawClient.get(templateName, requestOptions).body(); - } - - /** - * Update an email template. - */ - public SetEmailTemplateResponseContent set( - EmailTemplateNameEnum templateName, SetEmailTemplateRequestContent request) { - return this.rawClient.set(templateName, request).body(); - } - - /** - * Update an email template. - */ - public SetEmailTemplateResponseContent set( - EmailTemplateNameEnum templateName, SetEmailTemplateRequestContent request, RequestOptions requestOptions) { - return this.rawClient.set(templateName, request, requestOptions).body(); - } - - /** - * Modify an email template. - */ - public UpdateEmailTemplateResponseContent update(EmailTemplateNameEnum templateName) { - return this.rawClient.update(templateName).body(); - } - - /** - * Modify an email template. - */ - public UpdateEmailTemplateResponseContent update( - EmailTemplateNameEnum templateName, UpdateEmailTemplateRequestContent request) { - return this.rawClient.update(templateName, request).body(); - } - - /** - * Modify an email template. - */ - public UpdateEmailTemplateResponseContent update( - EmailTemplateNameEnum templateName, - UpdateEmailTemplateRequestContent request, - RequestOptions requestOptions) { - return this.rawClient.update(templateName, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/EventStreamsClient.java b/src/main/java/com/auth0/client/mgmt/EventStreamsClient.java deleted file mode 100644 index a74aa944e..000000000 --- a/src/main/java/com/auth0/client/mgmt/EventStreamsClient.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -import com.auth0.client.mgmt.eventstreams.DeliveriesClient; -import com.auth0.client.mgmt.eventstreams.RedeliveriesClient; -import com.auth0.client.mgmt.types.CreateEventStreamResponseContent; -import com.auth0.client.mgmt.types.CreateEventStreamTestEventRequestContent; -import com.auth0.client.mgmt.types.CreateEventStreamTestEventResponseContent; -import com.auth0.client.mgmt.types.EventStreamResponseContent; -import com.auth0.client.mgmt.types.EventStreamsCreateRequest; -import com.auth0.client.mgmt.types.GetEventStreamResponseContent; -import com.auth0.client.mgmt.types.ListEventStreamsRequestParameters; -import com.auth0.client.mgmt.types.UpdateEventStreamRequestContent; -import com.auth0.client.mgmt.types.UpdateEventStreamResponseContent; -import java.util.function.Supplier; - -public class EventStreamsClient { - protected final ClientOptions clientOptions; - - private final RawEventStreamsClient rawClient; - - protected final Supplier deliveriesClient; - - protected final Supplier redeliveriesClient; - - public EventStreamsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawEventStreamsClient(clientOptions); - this.deliveriesClient = Suppliers.memoize(() -> new DeliveriesClient(clientOptions)); - this.redeliveriesClient = Suppliers.memoize(() -> new RedeliveriesClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawEventStreamsClient withRawResponse() { - return this.rawClient; - } - - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - public SyncPagingIterable list(ListEventStreamsRequestParameters request) { - return this.rawClient.list(request).body(); - } - - public SyncPagingIterable list( - ListEventStreamsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - public CreateEventStreamResponseContent create(EventStreamsCreateRequest request) { - return this.rawClient.create(request).body(); - } - - public CreateEventStreamResponseContent create(EventStreamsCreateRequest request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - public GetEventStreamResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - public GetEventStreamResponseContent 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 UpdateEventStreamResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - public UpdateEventStreamResponseContent update(String id, UpdateEventStreamRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - public UpdateEventStreamResponseContent update( - String id, UpdateEventStreamRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - public CreateEventStreamTestEventResponseContent test(String id, CreateEventStreamTestEventRequestContent request) { - return this.rawClient.test(id, request).body(); - } - - public CreateEventStreamTestEventResponseContent test( - String id, CreateEventStreamTestEventRequestContent request, RequestOptions requestOptions) { - return this.rawClient.test(id, request, requestOptions).body(); - } - - public DeliveriesClient deliveries() { - return this.deliveriesClient.get(); - } - - public RedeliveriesClient redeliveries() { - return this.redeliveriesClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/FlowsClient.java b/src/main/java/com/auth0/client/mgmt/FlowsClient.java deleted file mode 100644 index 63b8fc6b2..000000000 --- a/src/main/java/com/auth0/client/mgmt/FlowsClient.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -import com.auth0.client.mgmt.flows.ExecutionsClient; -import com.auth0.client.mgmt.flows.vault.VaultClient; -import com.auth0.client.mgmt.types.CreateFlowRequestContent; -import com.auth0.client.mgmt.types.CreateFlowResponseContent; -import com.auth0.client.mgmt.types.FlowSummary; -import com.auth0.client.mgmt.types.GetFlowRequestParameters; -import com.auth0.client.mgmt.types.GetFlowResponseContent; -import com.auth0.client.mgmt.types.ListFlowsRequestParameters; -import com.auth0.client.mgmt.types.UpdateFlowRequestContent; -import com.auth0.client.mgmt.types.UpdateFlowResponseContent; -import java.util.function.Supplier; - -public class FlowsClient { - protected final ClientOptions clientOptions; - - private final RawFlowsClient rawClient; - - protected final Supplier executionsClient; - - protected final Supplier vaultClient; - - public FlowsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawFlowsClient(clientOptions); - this.executionsClient = Suppliers.memoize(() -> new ExecutionsClient(clientOptions)); - this.vaultClient = Suppliers.memoize(() -> new VaultClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawFlowsClient withRawResponse() { - return this.rawClient; - } - - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - public SyncPagingIterable list(ListFlowsRequestParameters request) { - return this.rawClient.list(request).body(); - } - - public SyncPagingIterable list(ListFlowsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - public CreateFlowResponseContent create(CreateFlowRequestContent request) { - return this.rawClient.create(request).body(); - } - - public CreateFlowResponseContent create(CreateFlowRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - public GetFlowResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - public GetFlowResponseContent get(String id, GetFlowRequestParameters request) { - return this.rawClient.get(id, request).body(); - } - - public GetFlowResponseContent get(String id, GetFlowRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, 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 UpdateFlowResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - public UpdateFlowResponseContent update(String id, UpdateFlowRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - public UpdateFlowResponseContent update( - String id, UpdateFlowRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - public ExecutionsClient executions() { - return this.executionsClient.get(); - } - - public VaultClient vault() { - return this.vaultClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/FormsClient.java b/src/main/java/com/auth0/client/mgmt/FormsClient.java deleted file mode 100644 index de9e6b84f..000000000 --- a/src/main/java/com/auth0/client/mgmt/FormsClient.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 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.CreateFormRequestContent; -import com.auth0.client.mgmt.types.CreateFormResponseContent; -import com.auth0.client.mgmt.types.FormSummary; -import com.auth0.client.mgmt.types.GetFormRequestParameters; -import com.auth0.client.mgmt.types.GetFormResponseContent; -import com.auth0.client.mgmt.types.ListFormsRequestParameters; -import com.auth0.client.mgmt.types.UpdateFormRequestContent; -import com.auth0.client.mgmt.types.UpdateFormResponseContent; - -public class FormsClient { - protected final ClientOptions clientOptions; - - private final RawFormsClient rawClient; - - public FormsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawFormsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawFormsClient withRawResponse() { - return this.rawClient; - } - - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - public SyncPagingIterable list(ListFormsRequestParameters request) { - return this.rawClient.list(request).body(); - } - - public SyncPagingIterable list(ListFormsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - public CreateFormResponseContent create(CreateFormRequestContent request) { - return this.rawClient.create(request).body(); - } - - public CreateFormResponseContent create(CreateFormRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - public GetFormResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - public GetFormResponseContent get(String id, GetFormRequestParameters request) { - return this.rawClient.get(id, request).body(); - } - - public GetFormResponseContent get(String id, GetFormRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, 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 UpdateFormResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - public UpdateFormResponseContent update(String id, UpdateFormRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - public UpdateFormResponseContent update( - String id, UpdateFormRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/GroupsClient.java b/src/main/java/com/auth0/client/mgmt/GroupsClient.java deleted file mode 100644 index b01f8ba90..000000000 --- a/src/main/java/com/auth0/client/mgmt/GroupsClient.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -import com.auth0.client.mgmt.groups.MembersClient; -import com.auth0.client.mgmt.types.GetGroupResponseContent; -import com.auth0.client.mgmt.types.Group; -import com.auth0.client.mgmt.types.ListGroupsRequestParameters; -import java.util.function.Supplier; - -public class GroupsClient { - protected final ClientOptions clientOptions; - - private final RawGroupsClient rawClient; - - protected final Supplier membersClient; - - public GroupsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawGroupsClient(clientOptions); - this.membersClient = Suppliers.memoize(() -> new MembersClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawGroupsClient withRawResponse() { - return this.rawClient; - } - - /** - * List all groups in your tenant. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * List all groups in your tenant. - */ - public SyncPagingIterable list(ListGroupsRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * List all groups in your tenant. - */ - public SyncPagingIterable list(ListGroupsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Retrieve a group by its ID. - */ - public GetGroupResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve a group by its ID. - */ - public GetGroupResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - public MembersClient members() { - return this.membersClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/HooksClient.java b/src/main/java/com/auth0/client/mgmt/HooksClient.java deleted file mode 100644 index 523dee184..000000000 --- a/src/main/java/com/auth0/client/mgmt/HooksClient.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -import com.auth0.client.mgmt.hooks.SecretsClient; -import com.auth0.client.mgmt.types.CreateHookRequestContent; -import com.auth0.client.mgmt.types.CreateHookResponseContent; -import com.auth0.client.mgmt.types.GetHookRequestParameters; -import com.auth0.client.mgmt.types.GetHookResponseContent; -import com.auth0.client.mgmt.types.Hook; -import com.auth0.client.mgmt.types.ListHooksRequestParameters; -import com.auth0.client.mgmt.types.UpdateHookRequestContent; -import com.auth0.client.mgmt.types.UpdateHookResponseContent; -import java.util.function.Supplier; - -public class HooksClient { - protected final ClientOptions clientOptions; - - private final RawHooksClient rawClient; - - protected final Supplier secretsClient; - - public HooksClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawHooksClient(clientOptions); - this.secretsClient = Suppliers.memoize(() -> new SecretsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawHooksClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve all <a href="https://auth0.com/docs/hooks">hooks</a>. Accepts a list of fields to include or exclude in the result. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve all <a href="https://auth0.com/docs/hooks">hooks</a>. Accepts a list of fields to include or exclude in the result. - */ - public SyncPagingIterable list(ListHooksRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve all <a href="https://auth0.com/docs/hooks">hooks</a>. Accepts a list of fields to include or exclude in the result. - */ - public SyncPagingIterable list(ListHooksRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create a new hook. - */ - public CreateHookResponseContent create(CreateHookRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create a new hook. - */ - public CreateHookResponseContent create(CreateHookRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve <a href="https://auth0.com/docs/hooks">a hook</a> by its ID. Accepts a list of fields to include in the result. - */ - public GetHookResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve <a href="https://auth0.com/docs/hooks">a hook</a> by its ID. Accepts a list of fields to include in the result. - */ - public GetHookResponseContent get(String id, GetHookRequestParameters request) { - return this.rawClient.get(id, request).body(); - } - - /** - * Retrieve <a href="https://auth0.com/docs/hooks">a hook</a> by its ID. Accepts a list of fields to include in the result. - */ - public GetHookResponseContent get(String id, GetHookRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).body(); - } - - /** - * Delete a hook. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete a hook. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update an existing hook. - */ - public UpdateHookResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update an existing hook. - */ - public UpdateHookResponseContent update(String id, UpdateHookRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update an existing hook. - */ - public UpdateHookResponseContent update( - String id, UpdateHookRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - public SecretsClient secrets() { - return this.secretsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/JobsClient.java b/src/main/java/com/auth0/client/mgmt/JobsClient.java deleted file mode 100644 index 0faa13e22..000000000 --- a/src/main/java/com/auth0/client/mgmt/JobsClient.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * 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.jobs.ErrorsClient; -import com.auth0.client.mgmt.jobs.UsersExportsClient; -import com.auth0.client.mgmt.jobs.UsersImportsClient; -import com.auth0.client.mgmt.jobs.VerificationEmailClient; -import com.auth0.client.mgmt.types.GetJobResponseContent; -import java.util.function.Supplier; - -public class JobsClient { - protected final ClientOptions clientOptions; - - private final RawJobsClient rawClient; - - protected final Supplier usersExportsClient; - - protected final Supplier usersImportsClient; - - protected final Supplier verificationEmailClient; - - protected final Supplier errorsClient; - - public JobsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawJobsClient(clientOptions); - this.usersExportsClient = Suppliers.memoize(() -> new UsersExportsClient(clientOptions)); - this.usersImportsClient = Suppliers.memoize(() -> new UsersImportsClient(clientOptions)); - this.verificationEmailClient = Suppliers.memoize(() -> new VerificationEmailClient(clientOptions)); - this.errorsClient = Suppliers.memoize(() -> new ErrorsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawJobsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieves a job. Useful to check its status. - */ - public GetJobResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieves a job. Useful to check its status. - */ - public GetJobResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - public UsersExportsClient usersExports() { - return this.usersExportsClient.get(); - } - - public UsersImportsClient usersImports() { - return this.usersImportsClient.get(); - } - - public VerificationEmailClient verificationEmail() { - return this.verificationEmailClient.get(); - } - - public ErrorsClient errors() { - return this.errorsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/LogStreamsClient.java b/src/main/java/com/auth0/client/mgmt/LogStreamsClient.java deleted file mode 100644 index 45907a75f..000000000 --- a/src/main/java/com/auth0/client/mgmt/LogStreamsClient.java +++ /dev/null @@ -1,790 +0,0 @@ -/** - * 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.CreateLogStreamRequestContent; -import com.auth0.client.mgmt.types.CreateLogStreamResponseContent; -import com.auth0.client.mgmt.types.GetLogStreamResponseContent; -import com.auth0.client.mgmt.types.LogStreamResponseSchema; -import com.auth0.client.mgmt.types.UpdateLogStreamRequestContent; -import com.auth0.client.mgmt.types.UpdateLogStreamResponseContent; -import java.util.List; - -public class LogStreamsClient { - protected final ClientOptions clientOptions; - - private final RawLogStreamsClient rawClient; - - public LogStreamsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawLogStreamsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawLogStreamsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/logs/streams">log streams</a>. - *

<h5>Sample Response</h5><pre><code>[{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active|paused|suspended", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }, { - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active|paused|suspended", - * "sink": { - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpContentType": "string", - * "httpEndpoint": "string", - * "httpAuthorization": "string" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "eventgrid", - * "status": "active|paused|suspended", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string", - * "azurePartnerTopic": "string" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active|paused|suspended", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active|paused|suspended", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active|paused|suspended", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }]</code></pre>

- */ - public List list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/logs/streams">log streams</a>. - *

<h5>Sample Response</h5><pre><code>[{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active|paused|suspended", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }, { - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active|paused|suspended", - * "sink": { - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpContentType": "string", - * "httpEndpoint": "string", - * "httpAuthorization": "string" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "eventgrid", - * "status": "active|paused|suspended", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string", - * "azurePartnerTopic": "string" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active|paused|suspended", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active|paused|suspended", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active|paused|suspended", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }]</code></pre>

- */ - public List list(RequestOptions requestOptions) { - return this.rawClient.list(requestOptions).body(); - } - - /** - * Create a log stream. - *

<h5>Log Stream Types</h5> The <code>type</code> of log stream being created determines the properties required in the <code>sink</code> payload. - * <h5>HTTP Stream</h5> For an <code>http</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "http", - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpAuthorization": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active", - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Amazon EventBridge Stream</h5> For an <code>eventbridge</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "eventbridge", - * "sink": { - * "awsRegion": "string", - * "awsAccountId": "string" - * } - * }</code></pre> - * The response will include an additional field <code>awsPartnerEventSource</code> in the <code>sink</code>: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }</code></pre> - * <h5>Azure Event Grid Stream</h5> For an <code>Azure Event Grid</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "eventgrid", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string", - * "azurePartnerTopic": "string" - * } - * }</code></pre> - * <h5>Datadog Stream</h5> For a <code>Datadog</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "datadog", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Splunk Stream</h5> For a <code>Splunk</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "splunk", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Sumo Logic Stream</h5> For a <code>Sumo Logic</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "sumo", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre>

- */ - public CreateLogStreamResponseContent create(CreateLogStreamRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create a log stream. - *

<h5>Log Stream Types</h5> The <code>type</code> of log stream being created determines the properties required in the <code>sink</code> payload. - * <h5>HTTP Stream</h5> For an <code>http</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "http", - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpAuthorization": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active", - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Amazon EventBridge Stream</h5> For an <code>eventbridge</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "eventbridge", - * "sink": { - * "awsRegion": "string", - * "awsAccountId": "string" - * } - * }</code></pre> - * The response will include an additional field <code>awsPartnerEventSource</code> in the <code>sink</code>: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }</code></pre> - * <h5>Azure Event Grid Stream</h5> For an <code>Azure Event Grid</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "eventgrid", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string", - * "azurePartnerTopic": "string" - * } - * }</code></pre> - * <h5>Datadog Stream</h5> For a <code>Datadog</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "datadog", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Splunk Stream</h5> For a <code>Splunk</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "splunk", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Sumo Logic Stream</h5> For a <code>Sumo Logic</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "sumo", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre>

- */ - public CreateLogStreamResponseContent create(CreateLogStreamRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve a log stream configuration and status. - *

<h5>Sample responses</h5><h5>Amazon EventBridge Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active|paused|suspended", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }</code></pre> <h5>HTTP Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active|paused|suspended", - * "sink": { - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpContentType": "string", - * "httpEndpoint": "string", - * "httpAuthorization": "string" - * } - * }</code></pre> <h5>Datadog Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active|paused|suspended", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * }

- *

}</code></pre><h5>Mixpanel</h5>

- *
Request: <pre><code>{
-     *   "name": "string",
-     *   "type": "mixpanel",
-     *   "sink": {
-     * 	"mixpanelRegion": "string", // "us" | "eu",
-     * 	"mixpanelProjectId": "string",
-     * 	"mixpanelServiceAccountUsername": "string",
-     * 	"mixpanelServiceAccountPassword": "string"
-     *   }
-     * } </code></pre>
-     *
-     *
-     * Response: <pre><code>{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "mixpanel",
-     * 	"status": "active",
-     * 	"sink": {
-     * 	  "mixpanelRegion": "string", // "us" | "eu",
-     * 	  "mixpanelProjectId": "string",
-     * 	  "mixpanelServiceAccountUsername": "string",
-     * 	  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-     * 	}
-     *   } </code></pre>
-     *
-     * <h5>Segment</h5>
-     *
-     * Request: <pre><code> {
-     *   "name": "string",
-     *   "type": "segment",
-     *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * }</code></pre>
-     *
-     * Response: <pre><code>{
-     *   "id": "string",
-     *   "name": "string",
-     *   "type": "segment",
-     *   "status": "active",
-     *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * } </code></pre>
-     * 
- *

<h5>Splunk Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active|paused|suspended", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> <h5>Sumo Logic Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active|paused|suspended", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre> <h5>Status</h5> The <code>status</code> of a log stream maybe any of the following: - * 1. <code>active</code> - Stream is currently enabled. - * 2. <code>paused</code> - Stream is currently user disabled and will not attempt log delivery. - * 3. <code>suspended</code> - Stream is currently disabled because of errors and will not attempt log delivery.

- */ - public GetLogStreamResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve a log stream configuration and status. - *

<h5>Sample responses</h5><h5>Amazon EventBridge Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active|paused|suspended", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }</code></pre> <h5>HTTP Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active|paused|suspended", - * "sink": { - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpContentType": "string", - * "httpEndpoint": "string", - * "httpAuthorization": "string" - * } - * }</code></pre> <h5>Datadog Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active|paused|suspended", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * }

- *

}</code></pre><h5>Mixpanel</h5>

- *
Request: <pre><code>{
-     *   "name": "string",
-     *   "type": "mixpanel",
-     *   "sink": {
-     * 	"mixpanelRegion": "string", // "us" | "eu",
-     * 	"mixpanelProjectId": "string",
-     * 	"mixpanelServiceAccountUsername": "string",
-     * 	"mixpanelServiceAccountPassword": "string"
-     *   }
-     * } </code></pre>
-     *
-     *
-     * Response: <pre><code>{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "mixpanel",
-     * 	"status": "active",
-     * 	"sink": {
-     * 	  "mixpanelRegion": "string", // "us" | "eu",
-     * 	  "mixpanelProjectId": "string",
-     * 	  "mixpanelServiceAccountUsername": "string",
-     * 	  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-     * 	}
-     *   } </code></pre>
-     *
-     * <h5>Segment</h5>
-     *
-     * Request: <pre><code> {
-     *   "name": "string",
-     *   "type": "segment",
-     *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * }</code></pre>
-     *
-     * Response: <pre><code>{
-     *   "id": "string",
-     *   "name": "string",
-     *   "type": "segment",
-     *   "status": "active",
-     *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * } </code></pre>
-     * 
- *

<h5>Splunk Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active|paused|suspended", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> <h5>Sumo Logic Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active|paused|suspended", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre> <h5>Status</h5> The <code>status</code> of a log stream maybe any of the following: - * 1. <code>active</code> - Stream is currently enabled. - * 2. <code>paused</code> - Stream is currently user disabled and will not attempt log delivery. - * 3. <code>suspended</code> - Stream is currently disabled because of errors and will not attempt log delivery.

- */ - public GetLogStreamResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Delete a log stream. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete a log stream. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update a log stream. - *

<h4>Examples of how to use the PATCH endpoint.</h4> The following fields may be updated in a PATCH operation: <ul><li>name</li><li>status</li><li>sink</li></ul> Note: For log streams of type <code>eventbridge</code> and <code>eventgrid</code>, updating the <code>sink</code> is not permitted. - * <h5>Update the status of a log stream</h5><pre><code>{ - * "status": "active|paused" - * }</code></pre> - * <h5>Update the name of a log stream</h5><pre><code>{ - * "name": "string" - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>http</code></h5><pre><code>{ - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONARRAY|JSONLINES", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>datadog</code></h5><pre><code>{ - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>splunk</code></h5><pre><code>{ - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>sumo</code></h5><pre><code>{ - * "sink": { - * "sumoSourceAddress": "string" - * } - * }</code></pre>

- */ - public UpdateLogStreamResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update a log stream. - *

<h4>Examples of how to use the PATCH endpoint.</h4> The following fields may be updated in a PATCH operation: <ul><li>name</li><li>status</li><li>sink</li></ul> Note: For log streams of type <code>eventbridge</code> and <code>eventgrid</code>, updating the <code>sink</code> is not permitted. - * <h5>Update the status of a log stream</h5><pre><code>{ - * "status": "active|paused" - * }</code></pre> - * <h5>Update the name of a log stream</h5><pre><code>{ - * "name": "string" - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>http</code></h5><pre><code>{ - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONARRAY|JSONLINES", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>datadog</code></h5><pre><code>{ - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>splunk</code></h5><pre><code>{ - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>sumo</code></h5><pre><code>{ - * "sink": { - * "sumoSourceAddress": "string" - * } - * }</code></pre>

- */ - public UpdateLogStreamResponseContent update(String id, UpdateLogStreamRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update a log stream. - *

<h4>Examples of how to use the PATCH endpoint.</h4> The following fields may be updated in a PATCH operation: <ul><li>name</li><li>status</li><li>sink</li></ul> Note: For log streams of type <code>eventbridge</code> and <code>eventgrid</code>, updating the <code>sink</code> is not permitted. - * <h5>Update the status of a log stream</h5><pre><code>{ - * "status": "active|paused" - * }</code></pre> - * <h5>Update the name of a log stream</h5><pre><code>{ - * "name": "string" - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>http</code></h5><pre><code>{ - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONARRAY|JSONLINES", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>datadog</code></h5><pre><code>{ - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>splunk</code></h5><pre><code>{ - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>sumo</code></h5><pre><code>{ - * "sink": { - * "sumoSourceAddress": "string" - * } - * }</code></pre>

- */ - public UpdateLogStreamResponseContent update( - String id, UpdateLogStreamRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/LogsClient.java b/src/main/java/com/auth0/client/mgmt/LogsClient.java deleted file mode 100644 index 4111ffced..000000000 --- a/src/main/java/com/auth0/client/mgmt/LogsClient.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * 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.GetLogResponseContent; -import com.auth0.client.mgmt.types.ListLogsRequestParameters; -import com.auth0.client.mgmt.types.Log; - -public class LogsClient { - protected final ClientOptions clientOptions; - - private final RawLogsClient rawClient; - - public LogsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawLogsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawLogsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve log entries that match the specified search criteria (or all log entries if no criteria specified). - *

Set custom search criteria using the <code>q</code> parameter, or search from a specific log ID (<i>"search from checkpoint"</i>).

- *

For more information on all possible event types, their respective acronyms, and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

<h5>To set custom search criteria, use the following parameters:</h5>

- *

<ul> - * <li><b>q:</b> Search Criteria using <a href="https://auth0.com/docs/logs/log-search-query-syntax">Query String Syntax</a></li> - * <li><b>page:</b> Page index of the results to return. First page is 0.</li> - * <li><b>per_page:</b> Number of results per page.</li> - * <li><b>sort:</b> Field to use for sorting appended with `:1` for ascending and `:-1` for descending. e.g. `date:-1`</li> - * <li><b>fields:</b> Comma-separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields.</li> - * <li><b>include_fields:</b> Whether specified fields are to be included (true) or excluded (false).</li> - * <li><b>include_totals:</b> Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). <b>Deprecated:</b> this field is deprecated and should be removed from use. See <a href="https://auth0.com/docs/product-lifecycle/deprecations-and-migrations/migrate-to-tenant-log-search-v3#pagination">Search Engine V3 Breaking Changes</a></li> - * </ul>

- *

For more information on the list of fields that can be used in <code>fields</code> and <code>sort</code>, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may paginate only through 1,000 search results. If you exceed this threshold, please redefine your search or use the <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#retrieve-logs-by-checkpoint">get logs by checkpoint method</a>.

- *

<h5>To search from a checkpoint log ID, use the following parameters:</h5> - * <ul> - * <li><b>from:</b> Log Event ID from which to start retrieving logs. You can limit the number of logs returned using the <code>take</code> parameter. If you use <code>from</code> at the same time as <code>q</code>, <code>from</code> takes precedence and <code>q</code> is ignored.</li> - * <li><b>take:</b> Number of entries to retrieve when using the <code>from</code> parameter.</li> - * </ul>

- *

<strong>Important:</strong> When fetching logs from a checkpoint log ID, any parameter other than <code>from</code> and <code>take</code> will be ignored, and date ordering is not guaranteed.

- */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve log entries that match the specified search criteria (or all log entries if no criteria specified). - *

Set custom search criteria using the <code>q</code> parameter, or search from a specific log ID (<i>"search from checkpoint"</i>).

- *

For more information on all possible event types, their respective acronyms, and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

<h5>To set custom search criteria, use the following parameters:</h5>

- *

<ul> - * <li><b>q:</b> Search Criteria using <a href="https://auth0.com/docs/logs/log-search-query-syntax">Query String Syntax</a></li> - * <li><b>page:</b> Page index of the results to return. First page is 0.</li> - * <li><b>per_page:</b> Number of results per page.</li> - * <li><b>sort:</b> Field to use for sorting appended with `:1` for ascending and `:-1` for descending. e.g. `date:-1`</li> - * <li><b>fields:</b> Comma-separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields.</li> - * <li><b>include_fields:</b> Whether specified fields are to be included (true) or excluded (false).</li> - * <li><b>include_totals:</b> Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). <b>Deprecated:</b> this field is deprecated and should be removed from use. See <a href="https://auth0.com/docs/product-lifecycle/deprecations-and-migrations/migrate-to-tenant-log-search-v3#pagination">Search Engine V3 Breaking Changes</a></li> - * </ul>

- *

For more information on the list of fields that can be used in <code>fields</code> and <code>sort</code>, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may paginate only through 1,000 search results. If you exceed this threshold, please redefine your search or use the <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#retrieve-logs-by-checkpoint">get logs by checkpoint method</a>.

- *

<h5>To search from a checkpoint log ID, use the following parameters:</h5> - * <ul> - * <li><b>from:</b> Log Event ID from which to start retrieving logs. You can limit the number of logs returned using the <code>take</code> parameter. If you use <code>from</code> at the same time as <code>q</code>, <code>from</code> takes precedence and <code>q</code> is ignored.</li> - * <li><b>take:</b> Number of entries to retrieve when using the <code>from</code> parameter.</li> - * </ul>

- *

<strong>Important:</strong> When fetching logs from a checkpoint log ID, any parameter other than <code>from</code> and <code>take</code> will be ignored, and date ordering is not guaranteed.

- */ - public SyncPagingIterable list(ListLogsRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve log entries that match the specified search criteria (or all log entries if no criteria specified). - *

Set custom search criteria using the <code>q</code> parameter, or search from a specific log ID (<i>"search from checkpoint"</i>).

- *

For more information on all possible event types, their respective acronyms, and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

<h5>To set custom search criteria, use the following parameters:</h5>

- *

<ul> - * <li><b>q:</b> Search Criteria using <a href="https://auth0.com/docs/logs/log-search-query-syntax">Query String Syntax</a></li> - * <li><b>page:</b> Page index of the results to return. First page is 0.</li> - * <li><b>per_page:</b> Number of results per page.</li> - * <li><b>sort:</b> Field to use for sorting appended with `:1` for ascending and `:-1` for descending. e.g. `date:-1`</li> - * <li><b>fields:</b> Comma-separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields.</li> - * <li><b>include_fields:</b> Whether specified fields are to be included (true) or excluded (false).</li> - * <li><b>include_totals:</b> Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). <b>Deprecated:</b> this field is deprecated and should be removed from use. See <a href="https://auth0.com/docs/product-lifecycle/deprecations-and-migrations/migrate-to-tenant-log-search-v3#pagination">Search Engine V3 Breaking Changes</a></li> - * </ul>

- *

For more information on the list of fields that can be used in <code>fields</code> and <code>sort</code>, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may paginate only through 1,000 search results. If you exceed this threshold, please redefine your search or use the <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#retrieve-logs-by-checkpoint">get logs by checkpoint method</a>.

- *

<h5>To search from a checkpoint log ID, use the following parameters:</h5> - * <ul> - * <li><b>from:</b> Log Event ID from which to start retrieving logs. You can limit the number of logs returned using the <code>take</code> parameter. If you use <code>from</code> at the same time as <code>q</code>, <code>from</code> takes precedence and <code>q</code> is ignored.</li> - * <li><b>take:</b> Number of entries to retrieve when using the <code>from</code> parameter.</li> - * </ul>

- *

<strong>Important:</strong> When fetching logs from a checkpoint log ID, any parameter other than <code>from</code> and <code>take</code> will be ignored, and date ordering is not guaranteed.

- */ - public SyncPagingIterable list(ListLogsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Retrieve an individual log event. - */ - public GetLogResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve an individual log event. - */ - public GetLogResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/ManagementApi.java b/src/main/java/com/auth0/client/mgmt/ManagementApi.java deleted file mode 100644 index f327c483e..000000000 --- a/src/main/java/com/auth0/client/mgmt/ManagementApi.java +++ /dev/null @@ -1,329 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.anomaly.AnomalyClient; -import com.auth0.client.mgmt.attackprotection.AttackProtectionClient; -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.keys.KeysClient; -import com.auth0.client.mgmt.riskassessments.RiskAssessmentsClient; -import com.auth0.client.mgmt.tenants.TenantsClient; -import com.auth0.client.mgmt.verifiablecredentials.VerifiableCredentialsClient; -import java.util.function.Supplier; - -public class ManagementApi { - protected final ClientOptions clientOptions; - - protected final Supplier actionsClient; - - protected final Supplier brandingClient; - - protected final Supplier clientGrantsClient; - - protected final Supplier clientsClient; - - protected final Supplier connectionProfilesClient; - - protected final Supplier connectionsClient; - - protected final Supplier customDomainsClient; - - protected final Supplier deviceCredentialsClient; - - protected final Supplier emailTemplatesClient; - - protected final Supplier eventStreamsClient; - - protected final Supplier flowsClient; - - protected final Supplier formsClient; - - protected final Supplier userGrantsClient; - - protected final Supplier groupsClient; - - protected final Supplier hooksClient; - - protected final Supplier jobsClient; - - protected final Supplier logStreamsClient; - - protected final Supplier logsClient; - - protected final Supplier networkAclsClient; - - protected final Supplier organizationsClient; - - protected final Supplier promptsClient; - - protected final Supplier refreshTokensClient; - - protected final Supplier resourceServersClient; - - protected final Supplier rolesClient; - - protected final Supplier rulesClient; - - protected final Supplier rulesConfigsClient; - - protected final Supplier selfServiceProfilesClient; - - protected final Supplier sessionsClient; - - protected final Supplier statsClient; - - protected final Supplier supplementalSignalsClient; - - protected final Supplier ticketsClient; - - protected final Supplier tokenExchangeProfilesClient; - - protected final Supplier userAttributeProfilesClient; - - protected final Supplier userBlocksClient; - - protected final Supplier usersClient; - - protected final Supplier anomalyClient; - - protected final Supplier attackProtectionClient; - - protected final Supplier emailsClient; - - protected final Supplier guardianClient; - - protected final Supplier keysClient; - - protected final Supplier riskAssessmentsClient; - - protected final Supplier tenantsClient; - - protected final Supplier verifiableCredentialsClient; - - public ManagementApi(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.actionsClient = Suppliers.memoize(() -> new ActionsClient(clientOptions)); - this.brandingClient = Suppliers.memoize(() -> new BrandingClient(clientOptions)); - this.clientGrantsClient = Suppliers.memoize(() -> new ClientGrantsClient(clientOptions)); - this.clientsClient = Suppliers.memoize(() -> new ClientsClient(clientOptions)); - this.connectionProfilesClient = Suppliers.memoize(() -> new ConnectionProfilesClient(clientOptions)); - this.connectionsClient = Suppliers.memoize(() -> new ConnectionsClient(clientOptions)); - this.customDomainsClient = Suppliers.memoize(() -> new CustomDomainsClient(clientOptions)); - this.deviceCredentialsClient = Suppliers.memoize(() -> new DeviceCredentialsClient(clientOptions)); - this.emailTemplatesClient = Suppliers.memoize(() -> new EmailTemplatesClient(clientOptions)); - this.eventStreamsClient = Suppliers.memoize(() -> new EventStreamsClient(clientOptions)); - this.flowsClient = Suppliers.memoize(() -> new FlowsClient(clientOptions)); - this.formsClient = Suppliers.memoize(() -> new FormsClient(clientOptions)); - this.userGrantsClient = Suppliers.memoize(() -> new UserGrantsClient(clientOptions)); - this.groupsClient = Suppliers.memoize(() -> new GroupsClient(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.promptsClient = Suppliers.memoize(() -> new PromptsClient(clientOptions)); - this.refreshTokensClient = Suppliers.memoize(() -> new RefreshTokensClient(clientOptions)); - this.resourceServersClient = Suppliers.memoize(() -> new ResourceServersClient(clientOptions)); - this.rolesClient = Suppliers.memoize(() -> new RolesClient(clientOptions)); - this.rulesClient = Suppliers.memoize(() -> new RulesClient(clientOptions)); - this.rulesConfigsClient = Suppliers.memoize(() -> new RulesConfigsClient(clientOptions)); - this.selfServiceProfilesClient = Suppliers.memoize(() -> new SelfServiceProfilesClient(clientOptions)); - this.sessionsClient = Suppliers.memoize(() -> new SessionsClient(clientOptions)); - this.statsClient = Suppliers.memoize(() -> new StatsClient(clientOptions)); - this.supplementalSignalsClient = Suppliers.memoize(() -> new SupplementalSignalsClient(clientOptions)); - this.ticketsClient = Suppliers.memoize(() -> new TicketsClient(clientOptions)); - this.tokenExchangeProfilesClient = Suppliers.memoize(() -> new TokenExchangeProfilesClient(clientOptions)); - this.userAttributeProfilesClient = Suppliers.memoize(() -> new UserAttributeProfilesClient(clientOptions)); - this.userBlocksClient = Suppliers.memoize(() -> new UserBlocksClient(clientOptions)); - this.usersClient = Suppliers.memoize(() -> new UsersClient(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.keysClient = Suppliers.memoize(() -> new KeysClient(clientOptions)); - this.riskAssessmentsClient = Suppliers.memoize(() -> new RiskAssessmentsClient(clientOptions)); - this.tenantsClient = Suppliers.memoize(() -> new TenantsClient(clientOptions)); - this.verifiableCredentialsClient = Suppliers.memoize(() -> new VerifiableCredentialsClient(clientOptions)); - } - - public ActionsClient actions() { - return this.actionsClient.get(); - } - - public BrandingClient branding() { - return this.brandingClient.get(); - } - - public ClientGrantsClient clientGrants() { - return this.clientGrantsClient.get(); - } - - public ClientsClient clients() { - return this.clientsClient.get(); - } - - public ConnectionProfilesClient connectionProfiles() { - return this.connectionProfilesClient.get(); - } - - public ConnectionsClient connections() { - return this.connectionsClient.get(); - } - - public CustomDomainsClient customDomains() { - return this.customDomainsClient.get(); - } - - public DeviceCredentialsClient deviceCredentials() { - return this.deviceCredentialsClient.get(); - } - - public EmailTemplatesClient emailTemplates() { - return this.emailTemplatesClient.get(); - } - - public EventStreamsClient eventStreams() { - return this.eventStreamsClient.get(); - } - - public FlowsClient flows() { - return this.flowsClient.get(); - } - - public FormsClient forms() { - return this.formsClient.get(); - } - - public UserGrantsClient userGrants() { - return this.userGrantsClient.get(); - } - - public GroupsClient groups() { - return this.groupsClient.get(); - } - - public HooksClient hooks() { - return this.hooksClient.get(); - } - - public JobsClient jobs() { - return this.jobsClient.get(); - } - - public LogStreamsClient logStreams() { - return this.logStreamsClient.get(); - } - - public LogsClient logs() { - return this.logsClient.get(); - } - - public NetworkAclsClient networkAcls() { - return this.networkAclsClient.get(); - } - - public OrganizationsClient organizations() { - return this.organizationsClient.get(); - } - - public PromptsClient prompts() { - return this.promptsClient.get(); - } - - public RefreshTokensClient refreshTokens() { - return this.refreshTokensClient.get(); - } - - public ResourceServersClient resourceServers() { - return this.resourceServersClient.get(); - } - - public RolesClient roles() { - return this.rolesClient.get(); - } - - public RulesClient rules() { - return this.rulesClient.get(); - } - - public RulesConfigsClient rulesConfigs() { - return this.rulesConfigsClient.get(); - } - - public SelfServiceProfilesClient selfServiceProfiles() { - return this.selfServiceProfilesClient.get(); - } - - public SessionsClient sessions() { - return this.sessionsClient.get(); - } - - public StatsClient stats() { - return this.statsClient.get(); - } - - public SupplementalSignalsClient supplementalSignals() { - return this.supplementalSignalsClient.get(); - } - - public TicketsClient tickets() { - return this.ticketsClient.get(); - } - - public TokenExchangeProfilesClient tokenExchangeProfiles() { - return this.tokenExchangeProfilesClient.get(); - } - - public UserAttributeProfilesClient userAttributeProfiles() { - return this.userAttributeProfilesClient.get(); - } - - public UserBlocksClient userBlocks() { - return this.userBlocksClient.get(); - } - - public UsersClient users() { - return this.usersClient.get(); - } - - public AnomalyClient anomaly() { - return this.anomalyClient.get(); - } - - public AttackProtectionClient attackProtection() { - return this.attackProtectionClient.get(); - } - - public EmailsClient emails() { - return this.emailsClient.get(); - } - - public GuardianClient guardian() { - return this.guardianClient.get(); - } - - public KeysClient keys() { - return this.keysClient.get(); - } - - public RiskAssessmentsClient riskAssessments() { - return this.riskAssessmentsClient.get(); - } - - public TenantsClient tenants() { - return this.tenantsClient.get(); - } - - public VerifiableCredentialsClient verifiableCredentials() { - return this.verifiableCredentialsClient.get(); - } - - public static ManagementApiBuilder builder() { - return new ManagementApiBuilder(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/ManagementApiBuilder.java b/src/main/java/com/auth0/client/mgmt/ManagementApiBuilder.java deleted file mode 100644 index 8e2c6099f..000000000 --- a/src/main/java/com/auth0/client/mgmt/ManagementApiBuilder.java +++ /dev/null @@ -1,328 +0,0 @@ -/** - * 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.Environment; -import com.auth0.client.mgmt.core.OAuthTokenSupplier; -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; -import java.util.function.Supplier; -import okhttp3.OkHttpClient; - -public class ManagementApiBuilder { - private Optional timeout = Optional.empty(); - - private Optional maxRetries = Optional.empty(); - - private final Map customHeaders = new HashMap<>(); - - private String token = null; - - private Environment environment = Environment.DEFAULT; - - private OkHttpClient httpClient; - - // Domain-based initialization fields - private String domain = null; - private String clientId = null; - private String clientSecret = null; - private String audience = null; - - /** - * Sets token - */ - public ManagementApiBuilder token(String token) { - this.token = token; - return this; - } - - public ManagementApiBuilder environment(Environment environment) { - this.environment = environment; - return this; - } - - public ManagementApiBuilder url(String url) { - this.environment = Environment.custom(url); - return this; - } - - /** - * Sets the Auth0 domain for the client. - * This will automatically construct the Management API URL as https://{domain}/api/v2 - * - *

Example: - *

{@code
-     * ManagementApi client = ManagementApi.builder()
-     *     .domain("your-tenant.auth0.com")
-     *     .clientCredentials("clientId", "clientSecret")
-     *     .build();
-     * }
- * - * @param domain The Auth0 domain (e.g., "your-tenant.auth0.com") - * @return This builder for method chaining - */ - public ManagementApiBuilder domain(String domain) { - this.domain = domain; - return this; - } - - /** - * Sets OAuth client credentials for automatic token management. - * When using client credentials, the SDK will automatically fetch and cache - * access tokens, refreshing them before expiry. - * - *

This is the recommended authentication method for server-to-server - * applications using the client credentials grant. - * - *

Example: - *

{@code
-     * ManagementApi client = ManagementApi.builder()
-     *     .domain("your-tenant.auth0.com")
-     *     .clientCredentials("your-client-id", "your-client-secret")
-     *     .build();
-     * }
- * - * @param clientId The OAuth client ID - * @param clientSecret The OAuth client secret - * @return This builder for method chaining - */ - public ManagementApiBuilder clientCredentials(String clientId, String clientSecret) { - this.clientId = clientId; - this.clientSecret = clientSecret; - return this; - } - - /** - * Sets a custom audience for the OAuth token request. - * If not specified, defaults to https://{domain}/api/v2/ - * - * @param audience The API audience for the token request - * @return This builder for method chaining - */ - public ManagementApiBuilder audience(String audience) { - this.audience = audience; - return this; - } - - /** - * Sets the timeout (in seconds) for the client. Defaults to 60 seconds. - */ - public ManagementApiBuilder timeout(int timeout) { - this.timeout = Optional.of(timeout); - return this; - } - - /** - * Sets the maximum number of retries for the client. Defaults to 2 retries. - */ - public ManagementApiBuilder maxRetries(int maxRetries) { - this.maxRetries = Optional.of(maxRetries); - return this; - } - - /** - * Sets the underlying OkHttp client - */ - public ManagementApiBuilder httpClient(OkHttpClient httpClient) { - this.httpClient = httpClient; - return this; - } - - /** - * Add a custom header to be sent with all requests. - * For headers that need to be computed dynamically or conditionally, use the setAdditional() method override instead. - * - * @param name The header name - * @param value The header value - * @return This builder for method chaining - */ - public ManagementApiBuilder addHeader(String name, String value) { - this.customHeaders.put(name, value); - return this; - } - - protected ClientOptions buildClientOptions() { - ClientOptions.Builder builder = ClientOptions.builder(); - setEnvironment(builder); - setAuthentication(builder); - setHttpClient(builder); - setTimeouts(builder); - setRetries(builder); - for (Map.Entry header : this.customHeaders.entrySet()) { - builder.addHeader(header.getKey(), header.getValue()); - } - setAdditional(builder); - return builder.build(); - } - - /** - * Sets the environment configuration for the client. - * When domain is set, constructs the URL as https://{domain}/api/v2 - * Otherwise uses the environment or url() configuration. - * - * @param builder The ClientOptions.Builder to configure - */ - protected void setEnvironment(ClientOptions.Builder builder) { - if (this.domain != null) { - String url = "https://" + this.domain + "/api/v2"; - builder.environment(Environment.custom(url)); - } else { - builder.environment(this.environment); - } - } - - /** - * Returns the base URL for OAuth token requests. - * This is used internally by setAuthentication() to configure the OAuthTokenSupplier. - * - * @return The base URL (e.g., "https://your-tenant.auth0.com") - */ - protected String getBaseUrl() { - if (this.domain != null) { - return "https://" + this.domain; - } - // Extract base URL from environment URL by removing /api/v2 suffix - String envUrl = this.environment.getUrl(); - if (envUrl.endsWith("/api/v2")) { - return envUrl.substring(0, envUrl.length() - 7); - } - return envUrl; - } - - /** - * Sets up authentication for the client. - * Supports both static token authentication and OAuth client credentials. - * - *

When client credentials are configured, creates an OAuthTokenSupplier that - * automatically fetches and caches access tokens, refreshing them before expiry. - * - * @param builder The ClientOptions.Builder to configure - */ - protected void setAuthentication(ClientOptions.Builder builder) { - if (this.clientId != null && this.clientSecret != null) { - // OAuth client credentials flow with automatic token management - String baseUrl = getBaseUrl(); - String aud = this.audience != null ? this.audience : baseUrl + "/api/v2/"; - - OAuthTokenSupplier tokenSupplier = new OAuthTokenSupplier(this.clientId, this.clientSecret, baseUrl, aud); - - builder.addHeader("Authorization", (Supplier) () -> "Bearer " + tokenSupplier.get()); - } else if (this.token != null) { - // Static token authentication - builder.addHeader("Authorization", "Bearer " + this.token); - } - } - - /** - * Sets the request timeout configuration. - * Override this method to customize timeout behavior. - * - * @param builder The ClientOptions.Builder to configure - */ - protected void setTimeouts(ClientOptions.Builder builder) { - if (this.timeout.isPresent()) { - builder.timeout(this.timeout.get()); - } - } - - /** - * Sets the retry configuration for failed requests. - * Override this method to implement custom retry strategies. - * - * @param builder The ClientOptions.Builder to configure - */ - protected void setRetries(ClientOptions.Builder builder) { - if (this.maxRetries.isPresent()) { - builder.maxRetries(this.maxRetries.get()); - } - } - - /** - * Sets the OkHttp client configuration. - * Override this method to customize HTTP client behavior (interceptors, connection pools, etc). - * - * @param builder The ClientOptions.Builder to configure - */ - protected void setHttpClient(ClientOptions.Builder builder) { - if (this.httpClient != null) { - builder.httpClient(this.httpClient); - } - } - - /** - * Override this method to add any additional configuration to the client. - * This method is called at the end of the configuration chain, allowing you to add - * custom headers, modify settings, or perform any other client customization. - * - * @param builder The ClientOptions.Builder to configure - * - * Example: - *

{@code
-     * @Override
-     * protected void setAdditional(ClientOptions.Builder builder) {
-     *     builder.addHeader("X-Request-ID", () -> UUID.randomUUID().toString());
-     *     builder.addHeader("X-Client-Version", "1.0.0");
-     * }
-     * }
- */ - protected void setAdditional(ClientOptions.Builder builder) {} - - /** - * Override this method to add custom validation logic before the client is built. - * This method is called at the beginning of the build() method to ensure the configuration is valid. - * Throw an exception to prevent client creation if validation fails. - * - * Example: - *
{@code
-     * @Override
-     * protected void validateConfiguration() {
-     *     super.validateConfiguration(); // Run parent validations
-     *     if (tenantId == null || tenantId.isEmpty()) {
-     *         throw new IllegalStateException("tenantId is required");
-     *     }
-     * }
-     * }
- */ - protected void validateConfiguration() {} - - /** - * Builds the ManagementApi client with the configured options. - * - *

Requires either: - *

    - *
  • A static token via {@link #token(String)}, OR
  • - *
  • OAuth client credentials via {@link #clientCredentials(String, String)}
  • - *
- * - *

The API URL can be configured via: - *

    - *
  • {@link #domain(String)} - recommended, automatically constructs the URL
  • - *
  • {@link #url(String)} - full URL specification
  • - *
  • {@link #environment(Environment)} - environment-based configuration
  • - *
- * - * @return A configured ManagementApi client instance - * @throws RuntimeException if authentication is not configured - */ - public ManagementApi build() { - // Validate authentication: require either token OR clientCredentials - boolean hasToken = this.token != null; - boolean hasClientCredentials = this.clientId != null && this.clientSecret != null; - - if (!hasToken && !hasClientCredentials) { - throw new RuntimeException( - "Please provide authentication: either token() or clientCredentials(clientId, clientSecret)"); - } - - // Validate that if clientId is provided, clientSecret is also provided - if (this.clientId != null && this.clientSecret == null) { - throw new RuntimeException("clientSecret is required when using clientCredentials"); - } - - validateConfiguration(); - return new ManagementApi(buildClientOptions()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/NetworkAclsClient.java b/src/main/java/com/auth0/client/mgmt/NetworkAclsClient.java deleted file mode 100644 index c812f3c33..000000000 --- a/src/main/java/com/auth0/client/mgmt/NetworkAclsClient.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * 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.CreateNetworkAclRequestContent; -import com.auth0.client.mgmt.types.GetNetworkAclsResponseContent; -import com.auth0.client.mgmt.types.ListNetworkAclsRequestParameters; -import com.auth0.client.mgmt.types.NetworkAclsResponseContent; -import com.auth0.client.mgmt.types.SetNetworkAclRequestContent; -import com.auth0.client.mgmt.types.SetNetworkAclsResponseContent; -import com.auth0.client.mgmt.types.UpdateNetworkAclRequestContent; -import com.auth0.client.mgmt.types.UpdateNetworkAclResponseContent; - -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; - } - - /** - * Get all access control list entries for your client. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Get all access control list entries for your client. - */ - public SyncPagingIterable list(ListNetworkAclsRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Get all access control list entries for your client. - */ - public SyncPagingIterable list( - ListNetworkAclsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create a new access control list for your client. - */ - public void create(CreateNetworkAclRequestContent request) { - this.rawClient.create(request).body(); - } - - /** - * Create a new access control list for your client. - */ - public void create(CreateNetworkAclRequestContent request, RequestOptions requestOptions) { - this.rawClient.create(request, requestOptions).body(); - } - - /** - * Get a specific access control list entry for your client. - */ - public GetNetworkAclsResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Get a specific access control list entry for your client. - */ - public GetNetworkAclsResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Update existing access control list for your client. - */ - public SetNetworkAclsResponseContent set(String id, SetNetworkAclRequestContent request) { - return this.rawClient.set(id, request).body(); - } - - /** - * Update existing access control list for your client. - */ - public SetNetworkAclsResponseContent set( - String id, SetNetworkAclRequestContent request, RequestOptions requestOptions) { - return this.rawClient.set(id, request, requestOptions).body(); - } - - /** - * Delete existing access control list for your client. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete existing access control list for your client. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update existing access control list for your client. - */ - public UpdateNetworkAclResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update existing access control list for your client. - */ - public UpdateNetworkAclResponseContent update(String id, UpdateNetworkAclRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update existing access control list for your client. - */ - public UpdateNetworkAclResponseContent update( - String id, UpdateNetworkAclRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/OrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/OrganizationsClient.java deleted file mode 100644 index f03292852..000000000 --- a/src/main/java/com/auth0/client/mgmt/OrganizationsClient.java +++ /dev/null @@ -1,218 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -import com.auth0.client.mgmt.organizations.ClientGrantsClient; -import com.auth0.client.mgmt.organizations.DiscoveryDomainsClient; -import com.auth0.client.mgmt.organizations.EnabledConnectionsClient; -import com.auth0.client.mgmt.organizations.InvitationsClient; -import com.auth0.client.mgmt.organizations.MembersClient; -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.UpdateOrganizationRequestContent; -import com.auth0.client.mgmt.types.UpdateOrganizationResponseContent; -import java.util.function.Supplier; - -public class OrganizationsClient { - protected final ClientOptions clientOptions; - - private final RawOrganizationsClient rawClient; - - protected final Supplier clientGrantsClient; - - protected final Supplier discoveryDomainsClient; - - protected final Supplier enabledConnectionsClient; - - protected final Supplier invitationsClient; - - protected final Supplier membersClient; - - public OrganizationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawOrganizationsClient(clientOptions); - this.clientGrantsClient = Suppliers.memoize(() -> new ClientGrantsClient(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)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawOrganizationsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve detailed list of all Organizations available in your tenant. For more information, see Auth0 Organizations. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total number of entries to retrieve when using the <code>from</code> parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve detailed list of all Organizations available in your tenant. For more information, see Auth0 Organizations. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total number of entries to retrieve when using the <code>from</code> parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public SyncPagingIterable list(ListOrganizationsRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve detailed list of all Organizations available in your tenant. For more information, see Auth0 Organizations. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total number of entries to retrieve when using the <code>from</code> parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public SyncPagingIterable list( - ListOrganizationsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create a new Organization within your tenant. To learn more about Organization settings, behavior, and configuration options, review <a href="https://auth0.com/docs/manage-users/organizations/create-first-organization">Create Your First Organization</a>. - */ - public CreateOrganizationResponseContent create(CreateOrganizationRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create a new Organization within your tenant. To learn more about Organization settings, behavior, and configuration options, review <a href="https://auth0.com/docs/manage-users/organizations/create-first-organization">Create Your First Organization</a>. - */ - public CreateOrganizationResponseContent create( - CreateOrganizationRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve details about a single Organization specified by name. - */ - public GetOrganizationByNameResponseContent getByName(String name) { - return this.rawClient.getByName(name).body(); - } - - /** - * Retrieve details about a single Organization specified by name. - */ - public GetOrganizationByNameResponseContent getByName(String name, RequestOptions requestOptions) { - return this.rawClient.getByName(name, requestOptions).body(); - } - - /** - * Retrieve details about a single Organization specified by ID. - */ - public GetOrganizationResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve details about a single Organization specified by ID. - */ - public GetOrganizationResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Remove an Organization from your tenant. This action cannot be undone. - *

<b>Note</b>: Members are automatically disassociated from an Organization when it is deleted. However, this action does <b>not</b> delete these users from your tenant.

- */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Remove an Organization from your tenant. This action cannot be undone. - *

<b>Note</b>: Members are automatically disassociated from an Organization when it is deleted. However, this action does <b>not</b> delete these users from your tenant.

- */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update the details of a specific <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/create-organizations">Organization</a>, such as name and display name, branding options, and metadata. - */ - public UpdateOrganizationResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update the details of a specific <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/create-organizations">Organization</a>, such as name and display name, branding options, and metadata. - */ - public UpdateOrganizationResponseContent update(String id, UpdateOrganizationRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update the details of a specific <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/create-organizations">Organization</a>, such as name and display name, branding options, and metadata. - */ - public UpdateOrganizationResponseContent update( - String id, UpdateOrganizationRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - public ClientGrantsClient clientGrants() { - return this.clientGrantsClient.get(); - } - - public DiscoveryDomainsClient discoveryDomains() { - return this.discoveryDomainsClient.get(); - } - - public EnabledConnectionsClient enabledConnections() { - return this.enabledConnectionsClient.get(); - } - - public InvitationsClient invitations() { - return this.invitationsClient.get(); - } - - public MembersClient members() { - return this.membersClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/PromptsClient.java b/src/main/java/com/auth0/client/mgmt/PromptsClient.java deleted file mode 100644 index 2b0f9ae14..000000000 --- a/src/main/java/com/auth0/client/mgmt/PromptsClient.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * 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.prompts.CustomTextClient; -import com.auth0.client.mgmt.prompts.PartialsClient; -import com.auth0.client.mgmt.prompts.RenderingClient; -import com.auth0.client.mgmt.types.GetSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateSettingsRequestContent; -import com.auth0.client.mgmt.types.UpdateSettingsResponseContent; -import java.util.function.Supplier; - -public class PromptsClient { - protected final ClientOptions clientOptions; - - private final RawPromptsClient rawClient; - - protected final Supplier renderingClient; - - protected final Supplier customTextClient; - - protected final Supplier partialsClient; - - public PromptsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawPromptsClient(clientOptions); - this.renderingClient = Suppliers.memoize(() -> new RenderingClient(clientOptions)); - this.customTextClient = Suppliers.memoize(() -> new CustomTextClient(clientOptions)); - this.partialsClient = Suppliers.memoize(() -> new PartialsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawPromptsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public GetSettingsResponseContent getSettings() { - return this.rawClient.getSettings().body(); - } - - /** - * Retrieve details of the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public GetSettingsResponseContent getSettings(RequestOptions requestOptions) { - return this.rawClient.getSettings(requestOptions).body(); - } - - /** - * Update the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public UpdateSettingsResponseContent updateSettings() { - return this.rawClient.updateSettings().body(); - } - - /** - * Update the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public UpdateSettingsResponseContent updateSettings(UpdateSettingsRequestContent request) { - return this.rawClient.updateSettings(request).body(); - } - - /** - * Update the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public UpdateSettingsResponseContent updateSettings( - UpdateSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.updateSettings(request, requestOptions).body(); - } - - public RenderingClient rendering() { - return this.renderingClient.get(); - } - - public CustomTextClient customText() { - return this.customTextClient.get(); - } - - public PartialsClient partials() { - return this.partialsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/RawActionsClient.java b/src/main/java/com/auth0/client/mgmt/RawActionsClient.java deleted file mode 100644 index 98e3a8f4b..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawActionsClient.java +++ /dev/null @@ -1,560 +0,0 @@ -/** - * 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.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.types.Action; -import com.auth0.client.mgmt.types.CreateActionRequestContent; -import com.auth0.client.mgmt.types.CreateActionResponseContent; -import com.auth0.client.mgmt.types.DeleteActionRequestParameters; -import com.auth0.client.mgmt.types.DeployActionResponseContent; -import com.auth0.client.mgmt.types.GetActionResponseContent; -import com.auth0.client.mgmt.types.ListActionsPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListActionsRequestParameters; -import com.auth0.client.mgmt.types.TestActionRequestContent; -import com.auth0.client.mgmt.types.TestActionResponseContent; -import com.auth0.client.mgmt.types.UpdateActionRequestContent; -import com.auth0.client.mgmt.types.UpdateActionResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawActionsClient { - protected final ClientOptions clientOptions; - - public RawActionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve all actions. - */ - public ManagementApiHttpResponse> list() { - return list(ListActionsRequestParameters.builder().build()); - } - - /** - * Retrieve all actions. - */ - public ManagementApiHttpResponse> list(ListActionsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve all actions. - */ - public ManagementApiHttpResponse> list( - ListActionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions"); - if (!request.getTriggerId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "triggerId", request.getTriggerId().orElse(null), false); - } - if (!request.getActionName().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "actionName", request.getActionName().orElse(null), false); - } - if (!request.getDeployed().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "deployed", request.getDeployed().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - if (!request.getInstalled().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "installed", request.getInstalled().orElse(null), false); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListActionsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListActionsPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListActionsRequestParameters nextRequest = ListActionsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getActions().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create an action. Once an action is created, it must be deployed, and then bound to a trigger before it will be executed as part of a flow. - */ - public ManagementApiHttpResponse create(CreateActionRequestContent request) { - return create(request, null); - } - - /** - * Create an action. Once an action is created, it must be deployed, and then bound to a trigger before it will be executed as part of a flow. - */ - public ManagementApiHttpResponse create( - CreateActionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .build(); - 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) - .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); - } - 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, CreateActionResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve an action by its ID. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve an action by its ID. - */ - public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetActionResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, DeleteActionRequestParameters.builder().build()); - } - - /** - * Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted. - */ - public ManagementApiHttpResponse delete(String id, DeleteActionRequestParameters request) { - return delete(id, request, null); - } - - /** - * Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted. - */ - public ManagementApiHttpResponse delete( - String id, DeleteActionRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .addPathSegment(id); - if (!request.getForce().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "force", request.getForce().orElse(null), false); - } - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("DELETE", 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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update an existing action. If this action is currently bound to a trigger, updating it will <strong>not</strong> affect any user flows until the action is deployed. - */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateActionRequestContent.builder().build()); - } - - /** - * Update an existing action. If this action is currently bound to a trigger, updating it will <strong>not</strong> affect any user flows until the action is deployed. - */ - public ManagementApiHttpResponse update( - String id, UpdateActionRequestContent request) { - return update(id, request, null); - } - - /** - * Update an existing action. If this action is currently bound to a trigger, updating it will <strong>not</strong> affect any user flows until the action is deployed. - */ - public ManagementApiHttpResponse update( - String id, UpdateActionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateActionResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Deploy an action. Deploying an action will create a new immutable version of the action. If the action is currently bound to a trigger, then the system will begin executing the newly deployed version of the action immediately. Otherwise, the action will only be executed as a part of a flow once it is bound to that flow. - */ - public ManagementApiHttpResponse deploy(String id) { - return deploy(id, null); - } - - /** - * Deploy an action. Deploying an action will create a new immutable version of the action. If the action is currently bound to a trigger, then the system will begin executing the newly deployed version of the action immediately. Otherwise, the action will only be executed as a part of a flow once it is bound to that flow. - */ - public ManagementApiHttpResponse deploy(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .addPathSegment(id) - .addPathSegments("deploy") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, DeployActionResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Test an action. After updating an action, it can be tested prior to being deployed to ensure it behaves as expected. - */ - public ManagementApiHttpResponse test(String id, TestActionRequestContent request) { - return test(id, request, null); - } - - /** - * Test an action. After updating an action, it can be tested prior to being deployed to ensure it behaves as expected. - */ - public ManagementApiHttpResponse test( - String id, TestActionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .addPathSegment(id) - .addPathSegments("test") - .build(); - 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) - .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); - } - 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, TestActionResponseContent.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 (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 deleted file mode 100644 index 443ce6889..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawBrandingClient.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * 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.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.types.GetBrandingResponseContent; -import com.auth0.client.mgmt.types.UpdateBrandingRequestContent; -import com.auth0.client.mgmt.types.UpdateBrandingResponseContent; -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 RawBrandingClient { - protected final ClientOptions clientOptions; - - public RawBrandingClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve branding settings. - */ - public ManagementApiHttpResponse get() { - return get(null); - } - - /** - * Retrieve branding settings. - */ - public ManagementApiHttpResponse get(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetBrandingResponseContent.class), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update branding settings. - */ - public ManagementApiHttpResponse update() { - return update(UpdateBrandingRequestContent.builder().build()); - } - - /** - * Update branding settings. - */ - public ManagementApiHttpResponse update(UpdateBrandingRequestContent request) { - return update(request, null); - } - - /** - * Update branding settings. - */ - public ManagementApiHttpResponse update( - UpdateBrandingRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateBrandingResponseContent.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 (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 deleted file mode 100644 index b288b691b..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawClientGrantsClient.java +++ /dev/null @@ -1,422 +0,0 @@ -/** - * 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.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.ClientGrantResponseContent; -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.ListClientGrantPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListClientGrantsRequestParameters; -import com.auth0.client.mgmt.types.UpdateClientGrantRequestContent; -import com.auth0.client.mgmt.types.UpdateClientGrantResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawClientGrantsClient { - protected final ClientOptions clientOptions; - - public RawClientGrantsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grants</a>, including the scopes associated with the application/API pair. - */ - public ManagementApiHttpResponse> list() { - return list(ListClientGrantsRequestParameters.builder().build()); - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grants</a>, including the scopes associated with the application/API pair. - */ - public ManagementApiHttpResponse> list( - ListClientGrantsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grants</a>, including the scopes associated with the application/API pair. - */ - public ManagementApiHttpResponse> list( - ListClientGrantsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("client-grants"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - if (!request.getAudience().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "audience", request.getAudience().orElse(null), false); - } - if (!request.getClientId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "client_id", request.getClientId().orElse(null), false); - } - if (!request.getAllowAnyOrganization().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, - "allow_any_organization", - request.getAllowAnyOrganization().orElse(null), - false); - } - if (!request.getSubjectType().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "subject_type", request.getSubjectType().orElse(null), false); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListClientGrantPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListClientGrantPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListClientGrantsRequestParameters nextRequest = ListClientGrantsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getClientGrants().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> list( - nextRequest, requestOptions) - .body()), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a client grant for a machine-to-machine login flow. To learn more, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public ManagementApiHttpResponse create(CreateClientGrantRequestContent request) { - return create(request, null); - } - - /** - * Create a client grant for a machine-to-machine login flow. To learn more, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public ManagementApiHttpResponse create( - CreateClientGrantRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("client-grants") - .build(); - 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) - .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); - } - 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, CreateClientGrantResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve a single <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grant</a>, including the - * scopes associated with the application/API pair. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve a single <a href="https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants">client grant</a>, including the - * scopes associated with the application/API pair. - */ - public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("client-grants") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetClientGrantResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete the <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a> from your machine-to-machine application. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete the <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a> from your machine-to-machine application. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("client-grants") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update a client grant. - */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateClientGrantRequestContent.builder().build()); - } - - /** - * Update a client grant. - */ - public ManagementApiHttpResponse update( - String id, UpdateClientGrantRequestContent request) { - return update(id, request, null); - } - - /** - * Update a client grant. - */ - public ManagementApiHttpResponse update( - String id, UpdateClientGrantRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("client-grants") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateClientGrantResponseContent.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 (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 deleted file mode 100644 index 1e6536e43..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawClientsClient.java +++ /dev/null @@ -1,747 +0,0 @@ -/** - * 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.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.Client; -import com.auth0.client.mgmt.types.CreateClientRequestContent; -import com.auth0.client.mgmt.types.CreateClientResponseContent; -import com.auth0.client.mgmt.types.GetClientRequestParameters; -import com.auth0.client.mgmt.types.GetClientResponseContent; -import com.auth0.client.mgmt.types.ListClientsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListClientsRequestParameters; -import com.auth0.client.mgmt.types.RotateClientSecretResponseContent; -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 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; - } - - /** - * Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified. - * For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following can be retrieved with any scope: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scope: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the - * <code>read:client_keys</code> or <code>read:client_credentials</code> scope: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse> list() { - return list(ListClientsRequestParameters.builder().build()); - } - - /** - * Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified. - * For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following can be retrieved with any scope: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scope: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the - * <code>read:client_keys</code> or <code>read:client_credentials</code> scope: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse> list(ListClientsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve clients (applications and SSO integrations) matching provided filters. A list of fields to include or exclude may also be specified. - * For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following can be retrieved with any scope: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scope: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the - * <code>read:client_keys</code> or <code>read:client_credentials</code> scope: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse> list( - ListClientsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients"); - 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, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getIsGlobal().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "is_global", request.getIsGlobal().orElse(null), false); - } - if (!request.getIsFirstParty().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "is_first_party", request.getIsFirstParty().orElse(null), false); - } - if (!request.getAppType().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "app_type", request.getAppType().orElse(null), false); - } - if (!request.getQ().isAbsent()) { - QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().orElse(null), false); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListClientsOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListClientsOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListClientsRequestParameters nextRequest = ListClientsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getClients().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a new client (application or SSO integration). For more information, read <a href="https://www.auth0.com/docs/get-started/auth0-overview/create-applications">Create Applications</a> - * <a href="https://www.auth0.com/docs/authenticate/single-sign-on/api-endpoints-for-single-sign-on>">API Endpoints for Single Sign-On</a>. - *

Notes:

- *
    - *
  • We recommend leaving the client_secret parameter unspecified to allow the generation of a safe secret.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use - * <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> - * to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, specify fully defined credentials. - * These credentials will be automatically enabled for Private Key JWT authentication on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>create:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
- *

<div class="alert alert-warning">SSO Integrations created via this endpoint will accept login requests and share user profile information.</div>

- */ - public ManagementApiHttpResponse create(CreateClientRequestContent request) { - return create(request, null); - } - - /** - * Create a new client (application or SSO integration). For more information, read <a href="https://www.auth0.com/docs/get-started/auth0-overview/create-applications">Create Applications</a> - * <a href="https://www.auth0.com/docs/authenticate/single-sign-on/api-endpoints-for-single-sign-on>">API Endpoints for Single Sign-On</a>. - *

Notes:

- *
    - *
  • We recommend leaving the client_secret parameter unspecified to allow the generation of a safe secret.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use - * <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> - * to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, specify fully defined credentials. - * These credentials will be automatically enabled for Private Key JWT authentication on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>create:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
- *

<div class="alert alert-warning">SSO Integrations created via this endpoint will accept login requests and share user profile information.</div>

- */ - public ManagementApiHttpResponse create( - CreateClientRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .build(); - 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) - .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); - } - 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, CreateClientResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * 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 <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following properties can be retrieved with any of the scopes: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scopes: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse get(String id) { - return get(id, GetClientRequestParameters.builder().build()); - } - - /** - * 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 <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following properties can be retrieved with any of the scopes: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scopes: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse get(String id, GetClientRequestParameters request) { - return get(id, request, null); - } - - /** - * 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 <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

<ul> - * <li> - * The following properties can be retrieved with any of the scopes: - * <code>client_id</code>, <code>app_type</code>, <code>name</code>, and <code>description</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:clients</code> or - * <code>read:client_keys</code> scopes: - * <code>callbacks</code>, <code>oidc_logout</code>, <code>allowed_origins</code>, - * <code>web_origins</code>, <code>tenant</code>, <code>global</code>, <code>config_route</code>, - * <code>callback_url_template</code>, <code>jwt_configuration</code>, - * <code>jwt_configuration.lifetime_in_seconds</code>, <code>jwt_configuration.secret_encoded</code>, - * <code>jwt_configuration.scopes</code>, <code>jwt_configuration.alg</code>, <code>api_type</code>, - * <code>logo_uri</code>, <code>allowed_clients</code>, <code>owners</code>, <code>custom_login_page</code>, - * <code>custom_login_page_off</code>, <code>sso</code>, <code>addons</code>, <code>form_template</code>, - * <code>custom_login_page_codeview</code>, <code>resource_servers</code>, <code>client_metadata</code>, - * <code>mobile</code>, <code>mobile.android</code>, <code>mobile.ios</code>, <code>allowed_logout_urls</code>, - * <code>token_endpoint_auth_method</code>, <code>is_first_party</code>, <code>oidc_conformant</code>, - * <code>is_token_endpoint_ip_header_trusted</code>, <code>initiate_login_uri</code>, <code>grant_types</code>, - * <code>refresh_token</code>, <code>refresh_token.rotation_type</code>, <code>refresh_token.expiration_type</code>, - * <code>refresh_token.leeway</code>, <code>refresh_token.token_lifetime</code>, <code>refresh_token.policies</code>, <code>organization_usage</code>, - * <code>organization_require_behavior</code>. - * </li> - * <li> - * The following properties can only be retrieved with the <code>read:client_keys</code> or <code>read:client_credentials</code> scopes: - * <code>encryption_key</code>, <code>encryption_key.pub</code>, <code>encryption_key.cert</code>, - * <code>client_secret</code>, <code>client_authentication_methods</code> and <code>signing_key</code>. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse get( - String id, GetClientRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(id); - 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); - } - 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); - } - 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, GetClientResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a client and related configuration (rules, connections, etc). - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete a client and related configuration (rules, connections, etc). - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

Notes:

- *
    - *
  • The client_secret and signing_key attributes can only be updated with the update:client_keys scope.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>update:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
  • To change a client's <code>is_first_party</code> property to <code>false</code>, the <code>organization_usage</code> and <code>organization_require_behavior</code> properties must be unset.
  • - *
- */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateClientRequestContent.builder().build()); - } - - /** - * Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

Notes:

- *
    - *
  • The client_secret and signing_key attributes can only be updated with the update:client_keys scope.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>update:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
  • To change a client's <code>is_first_party</code> property to <code>false</code>, the <code>organization_usage</code> and <code>organization_require_behavior</code> properties must be unset.
  • - *
- */ - public ManagementApiHttpResponse update( - String id, UpdateClientRequestContent request) { - return update(id, request, null); - } - - /** - * Updates a client's settings. For more information, read <a href="https://www.auth0.com/docs/get-started/applications"> Applications in Auth0</a> and <a href="https://www.auth0.com/docs/authenticate/single-sign-on"> Single Sign-On</a>. - *

Notes:

- *
    - *
  • The client_secret and signing_key attributes can only be updated with the update:client_keys scope.
  • - *
  • The <code>client_authentication_methods</code> and <code>token_endpoint_auth_method</code> properties are mutually exclusive. Use <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method. Otherwise, use <code>token_endpoint_auth_method</code> to configure the client with client secret (basic or post) or with no authentication method (none).
  • - *
  • When using <code>client_authentication_methods</code> to configure the client with Private Key JWT authentication method, only specify the credential IDs that were generated when creating the credentials on the client.
  • - *
  • To configure <code>client_authentication_methods</code>, the <code>update:client_credentials</code> scope is required.
  • - *
  • To configure <code>client_authentication_methods</code>, the property <code>jwt_configuration.alg</code> must be set to RS256.
  • - *
  • To change a client's <code>is_first_party</code> property to <code>false</code>, the <code>organization_usage</code> and <code>organization_require_behavior</code> properties must be unset.
  • - *
- */ - public ManagementApiHttpResponse update( - String id, UpdateClientRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateClientResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Rotate a client secret. - *

This endpoint cannot be used with clients configured with Private Key JWT authentication method (client_authentication_methods configured with private_key_jwt). The generated secret is NOT base64 encoded.

- *

For more information, read <a href="https://www.auth0.com/docs/get-started/applications/rotate-client-secret">Rotate Client Secrets</a>.

- */ - public ManagementApiHttpResponse rotateSecret(String id) { - return rotateSecret(id, null); - } - - /** - * Rotate a client secret. - *

This endpoint cannot be used with clients configured with Private Key JWT authentication method (client_authentication_methods configured with private_key_jwt). The generated secret is NOT base64 encoded.

- *

For more information, read <a href="https://www.auth0.com/docs/get-started/applications/rotate-client-secret">Rotate Client Secrets</a>.

- */ - public ManagementApiHttpResponse rotateSecret( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(id) - .addPathSegments("rotate-secret") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, RotateClientSecretResponseContent.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 (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 deleted file mode 100644 index 649d5b42c..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawConnectionProfilesClient.java +++ /dev/null @@ -1,522 +0,0 @@ -/** - * 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.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.ConnectionProfile; -import com.auth0.client.mgmt.types.CreateConnectionProfileRequestContent; -import com.auth0.client.mgmt.types.CreateConnectionProfileResponseContent; -import com.auth0.client.mgmt.types.GetConnectionProfileResponseContent; -import com.auth0.client.mgmt.types.GetConnectionProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.ListConnectionProfileRequestParameters; -import com.auth0.client.mgmt.types.ListConnectionProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.ListConnectionProfilesPaginatedResponseContent; -import com.auth0.client.mgmt.types.UpdateConnectionProfileRequestContent; -import com.auth0.client.mgmt.types.UpdateConnectionProfileResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawConnectionProfilesClient { - protected final ClientOptions clientOptions; - - public RawConnectionProfilesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a list of Connection Profiles. This endpoint supports Checkpoint pagination. - */ - public ManagementApiHttpResponse> list() { - return list(ListConnectionProfileRequestParameters.builder().build()); - } - - /** - * Retrieve a list of Connection Profiles. This endpoint supports Checkpoint pagination. - */ - public ManagementApiHttpResponse> list( - ListConnectionProfileRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve a list of Connection Profiles. This endpoint supports Checkpoint pagination. - */ - public ManagementApiHttpResponse> list( - ListConnectionProfileRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connection-profiles"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListConnectionProfilesPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListConnectionProfilesPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListConnectionProfileRequestParameters nextRequest = ListConnectionProfileRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getConnectionProfiles().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> list( - nextRequest, requestOptions) - .body()), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a Connection Profile. - */ - public ManagementApiHttpResponse create( - CreateConnectionProfileRequestContent request) { - return create(request, null); - } - - /** - * Create a Connection Profile. - */ - public ManagementApiHttpResponse create( - CreateConnectionProfileRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connection-profiles") - .build(); - 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) - .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); - } - 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, CreateConnectionProfileResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve a list of Connection Profile Templates. - */ - public ManagementApiHttpResponse listTemplates() { - return listTemplates(null); - } - - /** - * Retrieve a list of Connection Profile Templates. - */ - public ManagementApiHttpResponse listTemplates( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connection-profiles/templates") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListConnectionProfileTemplateResponseContent.class), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve a Connection Profile Template. - */ - public ManagementApiHttpResponse getTemplate(String id) { - return getTemplate(id, null); - } - - /** - * Retrieve a Connection Profile Template. - */ - public ManagementApiHttpResponse getTemplate( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connection-profiles/templates") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetConnectionProfileTemplateResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details about a single Connection Profile specified by ID. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve details about a single Connection Profile specified by ID. - */ - public ManagementApiHttpResponse get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connection-profiles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetConnectionProfileResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a single Connection Profile specified by ID. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete a single Connection Profile specified by ID. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connection-profiles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update the details of a specific Connection Profile. - */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateConnectionProfileRequestContent.builder().build()); - } - - /** - * Update the details of a specific Connection Profile. - */ - public ManagementApiHttpResponse update( - String id, UpdateConnectionProfileRequestContent request) { - return update(id, request, null); - } - - /** - * Update the details of a specific Connection Profile. - */ - public ManagementApiHttpResponse update( - String id, UpdateConnectionProfileRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connection-profiles") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateConnectionProfileResponseContent.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 (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 deleted file mode 100644 index 9f698a3b2..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawConnectionsClient.java +++ /dev/null @@ -1,547 +0,0 @@ -/** - * 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.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.ConnectionForList; -import com.auth0.client.mgmt.types.CreateConnectionRequestContent; -import com.auth0.client.mgmt.types.CreateConnectionResponseContent; -import com.auth0.client.mgmt.types.GetConnectionRequestParameters; -import com.auth0.client.mgmt.types.GetConnectionResponseContent; -import com.auth0.client.mgmt.types.ListConnectionsCheckpointPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListConnectionsQueryParameters; -import com.auth0.client.mgmt.types.UpdateConnectionRequestContent; -import com.auth0.client.mgmt.types.UpdateConnectionResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawConnectionsClient { - protected final ClientOptions clientOptions; - - public RawConnectionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieves detailed list of all <a href="https://auth0.com/docs/authenticate/identity-providers">connections</a> that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 connections.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public ManagementApiHttpResponse> list() { - return list(ListConnectionsQueryParameters.builder().build()); - } - - /** - * Retrieves detailed list of all <a href="https://auth0.com/docs/authenticate/identity-providers">connections</a> that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 connections.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public ManagementApiHttpResponse> list( - ListConnectionsQueryParameters request) { - return list(request, null); - } - - /** - * Retrieves detailed list of all <a href="https://auth0.com/docs/authenticate/identity-providers">connections</a> that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 connections.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public ManagementApiHttpResponse> list( - ListConnectionsQueryParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - if (!request.getName().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "name", request.getName().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); - } - if (request.getStrategy().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "strategy", request.getStrategy().get(), true); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListConnectionsCheckpointPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListConnectionsCheckpointPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListConnectionsQueryParameters nextRequest = ListConnectionsQueryParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getConnections().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> list( - nextRequest, requestOptions) - .body()), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Creates a new connection according to the JSON object received in <code>body</code>. - *

<b>Note:</b> If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.

- */ - public ManagementApiHttpResponse create(CreateConnectionRequestContent request) { - return create(request, null); - } - - /** - * Creates a new connection according to the JSON object received in <code>body</code>. - *

<b>Note:</b> If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.

- */ - public ManagementApiHttpResponse create( - CreateConnectionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .build(); - 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) - .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); - } - 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, CreateConnectionResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details for a specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> along with options that can be used for identity provider configuration. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, GetConnectionRequestParameters.builder().build()); - } - - /** - * Retrieve details for a specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> along with options that can be used for identity provider configuration. - */ - public ManagementApiHttpResponse get( - String id, GetConnectionRequestParameters request) { - return get(id, request, null); - } - - /** - * Retrieve details for a specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> along with options that can be used for identity provider configuration. - */ - public ManagementApiHttpResponse get( - String id, GetConnectionRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id); - 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); - } - 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); - } - 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, GetConnectionResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Removes a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. - *

<b>Note:</b> If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent <a href="https://auth0.com/docs/api/management/v2/connections/post-connections">create connection</a> requests, if they use an identical connection name.

- */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Removes a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. - *

<b>Note:</b> If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent <a href="https://auth0.com/docs/api/management/v2/connections/post-connections">create connection</a> requests, if they use an identical connection name.

- */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update details for a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a>, including option properties for identity provider configuration. - *

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

- */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateConnectionRequestContent.builder().build()); - } - - /** - * Update details for a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a>, including option properties for identity provider configuration. - *

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

- */ - public ManagementApiHttpResponse update( - String id, UpdateConnectionRequestContent request) { - return update(id, request, null); - } - - /** - * Update details for a specific <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a>, including option properties for identity provider configuration. - *

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

- */ - public ManagementApiHttpResponse update( - String id, UpdateConnectionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateConnectionResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieves the status of an ad/ldap connection referenced by its <code>ID</code>. <code>200 OK</code> http status code response is returned when the connection is online, otherwise a <code>404</code> status code is returned along with an error message - */ - public ManagementApiHttpResponse checkStatus(String id) { - return checkStatus(id, null); - } - - /** - * Retrieves the status of an ad/ldap connection referenced by its <code>ID</code>. <code>200 OK</code> http status code response is returned when the connection is online, otherwise a <code>404</code> status code is returned along with an error message - */ - public ManagementApiHttpResponse checkStatus(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("status") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - 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 (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 deleted file mode 100644 index 145bc8011..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawCustomDomainsClient.java +++ /dev/null @@ -1,615 +0,0 @@ -/** - * 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.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.CreateCustomDomainRequestContent; -import com.auth0.client.mgmt.types.CreateCustomDomainResponseContent; -import com.auth0.client.mgmt.types.CustomDomain; -import com.auth0.client.mgmt.types.GetCustomDomainResponseContent; -import com.auth0.client.mgmt.types.ListCustomDomainsRequestParameters; -import com.auth0.client.mgmt.types.TestCustomDomainResponseContent; -import com.auth0.client.mgmt.types.UpdateCustomDomainRequestContent; -import com.auth0.client.mgmt.types.UpdateCustomDomainResponseContent; -import com.auth0.client.mgmt.types.VerifyCustomDomainResponseContent; -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 RawCustomDomainsClient { - protected final ClientOptions clientOptions; - - public RawCustomDomainsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/custom-domains">custom domains</a>. - */ - public ManagementApiHttpResponse> list() { - return list(ListCustomDomainsRequestParameters.builder().build()); - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/custom-domains">custom domains</a>. - */ - public ManagementApiHttpResponse> list(ListCustomDomainsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/custom-domains">custom domains</a>. - */ - public ManagementApiHttpResponse> list( - ListCustomDomainsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("custom-domains"); - if (!request.getQ().isAbsent()) { - QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().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); - } - if (!request.getSort().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sort", request.getSort().orElse(null), false); - } - 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); - } - 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 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a new custom domain. - *

Note: The custom domain will need to be verified before it will accept - * requests.

- *

Optional attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- */ - public ManagementApiHttpResponse create( - CreateCustomDomainRequestContent request) { - return create(request, null); - } - - /** - * Create a new custom domain. - *

Note: The custom domain will need to be verified before it will accept - * requests.

- *

Optional attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- */ - public ManagementApiHttpResponse create( - CreateCustomDomainRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("custom-domains") - .build(); - 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) - .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); - } - 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, CreateCustomDomainResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve a custom domain configuration and status. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve a custom domain configuration and status. - */ - public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("custom-domains") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetCustomDomainResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a custom domain and stop serving requests for it. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete a custom domain and stop serving requests for it. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("custom-domains") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update a custom domain. - *

These are the attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

<h5>Updating CUSTOM_CLIENT_IP_HEADER for a custom domain</h5>To update the <code>custom_client_ip_header</code> for a domain, the body to - * send should be: - * <pre><code>{ "custom_client_ip_header": "cf-connecting-ip" }</code></pre>

- *

<h5>Updating TLS_POLICY for a custom domain</h5>To update the <code>tls_policy</code> for a domain, the body to send should be: - * <pre><code>{ "tls_policy": "recommended" }</code></pre>

- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- *

Some considerations:

- *
    - *
  • The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally.
  • - *
  • The <code>compatible</code> TLS policy is no longer supported.
  • - *
- */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateCustomDomainRequestContent.builder().build()); - } - - /** - * Update a custom domain. - *

These are the attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

<h5>Updating CUSTOM_CLIENT_IP_HEADER for a custom domain</h5>To update the <code>custom_client_ip_header</code> for a domain, the body to - * send should be: - * <pre><code>{ "custom_client_ip_header": "cf-connecting-ip" }</code></pre>

- *

<h5>Updating TLS_POLICY for a custom domain</h5>To update the <code>tls_policy</code> for a domain, the body to send should be: - * <pre><code>{ "tls_policy": "recommended" }</code></pre>

- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- *

Some considerations:

- *
    - *
  • The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally.
  • - *
  • The <code>compatible</code> TLS policy is no longer supported.
  • - *
- */ - public ManagementApiHttpResponse update( - String id, UpdateCustomDomainRequestContent request) { - return update(id, request, null); - } - - /** - * Update a custom domain. - *

These are the attributes that can be updated:

- *
    - *
  • custom_client_ip_header
  • - *
  • tls_policy
  • - *
- *

<h5>Updating CUSTOM_CLIENT_IP_HEADER for a custom domain</h5>To update the <code>custom_client_ip_header</code> for a domain, the body to - * send should be: - * <pre><code>{ "custom_client_ip_header": "cf-connecting-ip" }</code></pre>

- *

<h5>Updating TLS_POLICY for a custom domain</h5>To update the <code>tls_policy</code> for a domain, the body to send should be: - * <pre><code>{ "tls_policy": "recommended" }</code></pre>

- *

TLS Policies:

- *
    - *
  • recommended - for modern usage this includes TLS 1.2 only
  • - *
- *

Some considerations:

- *
    - *
  • The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally.
  • - *
  • The <code>compatible</code> TLS policy is no longer supported.
  • - *
- */ - public ManagementApiHttpResponse update( - String id, UpdateCustomDomainRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("custom-domains") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateCustomDomainResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Run the test process on a custom domain. - */ - public ManagementApiHttpResponse test(String id) { - return test(id, null); - } - - /** - * Run the test process on a custom domain. - */ - public ManagementApiHttpResponse test(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("custom-domains") - .addPathSegment(id) - .addPathSegments("test") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, TestCustomDomainResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Run the verification process on a custom domain. - *

Note: Check the <code>status</code> field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests.

- *

For <code>self_managed_certs</code>, when the custom domain is verified for the first time, the response will also include the <code>cname_api_key</code> which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests.

- *

<a href="https://auth0.com/docs/custom-domains#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Auth0 Managed certificates. - * <a href="https://auth0.com/docs/custom-domains/self-managed-certificates#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Self Managed certificates.

- */ - public ManagementApiHttpResponse verify(String id) { - return verify(id, null); - } - - /** - * Run the verification process on a custom domain. - *

Note: Check the <code>status</code> field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests.

- *

For <code>self_managed_certs</code>, when the custom domain is verified for the first time, the response will also include the <code>cname_api_key</code> which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests.

- *

<a href="https://auth0.com/docs/custom-domains#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Auth0 Managed certificates. - * <a href="https://auth0.com/docs/custom-domains/self-managed-certificates#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Self Managed certificates.

- */ - public ManagementApiHttpResponse verify( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("custom-domains") - .addPathSegment(id) - .addPathSegments("verify") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, VerifyCustomDomainResponseContent.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 (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 deleted file mode 100644 index 7412f575f..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawDeviceCredentialsClient.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * 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.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.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.types.CreatePublicKeyDeviceCredentialRequestContent; -import com.auth0.client.mgmt.types.CreatePublicKeyDeviceCredentialResponseContent; -import com.auth0.client.mgmt.types.DeviceCredential; -import com.auth0.client.mgmt.types.ListDeviceCredentialsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListDeviceCredentialsRequestParameters; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawDeviceCredentialsClient { - protected final ClientOptions clientOptions; - - public RawDeviceCredentialsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve device credential information (<code>public_key</code>, <code>refresh_token</code>, or <code>rotating_refresh_token</code>) associated with a specific user. - */ - public ManagementApiHttpResponse> list() { - return list(ListDeviceCredentialsRequestParameters.builder().build()); - } - - /** - * Retrieve device credential information (<code>public_key</code>, <code>refresh_token</code>, or <code>rotating_refresh_token</code>) associated with a specific user. - */ - public ManagementApiHttpResponse> list( - ListDeviceCredentialsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve device credential information (<code>public_key</code>, <code>refresh_token</code>, or <code>rotating_refresh_token</code>) associated with a specific user. - */ - public ManagementApiHttpResponse> list( - ListDeviceCredentialsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("device-credentials"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), 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); - } - if (!request.getUserId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "user_id", request.getUserId().orElse(null), false); - } - if (!request.getClientId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "client_id", request.getClientId().orElse(null), false); - } - if (!request.getType().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "type", request.getType().orElse(null), false); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListDeviceCredentialsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListDeviceCredentialsOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListDeviceCredentialsRequestParameters nextRequest = ListDeviceCredentialsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getDeviceCredentials().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a device credential public key to manage refresh token rotation for a given <code>user_id</code>. Device Credentials APIs are designed for ad-hoc administrative use only and paging is by default enabled for GET requests. - *

When refresh token rotation is enabled, the endpoint becomes consistent. For more information, read <a href="https://auth0.com/docs/get-started/tenant-settings/signing-keys"> Signing Keys</a>.

- */ - public ManagementApiHttpResponse createPublicKey( - CreatePublicKeyDeviceCredentialRequestContent request) { - return createPublicKey(request, null); - } - - /** - * Create a device credential public key to manage refresh token rotation for a given <code>user_id</code>. Device Credentials APIs are designed for ad-hoc administrative use only and paging is by default enabled for GET requests. - *

When refresh token rotation is enabled, the endpoint becomes consistent. For more information, read <a href="https://auth0.com/docs/get-started/tenant-settings/signing-keys"> Signing Keys</a>.

- */ - public ManagementApiHttpResponse createPublicKey( - CreatePublicKeyDeviceCredentialRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("device-credentials") - .build(); - 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) - .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); - } - 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, CreatePublicKeyDeviceCredentialResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Permanently delete a device credential (such as a refresh token or public key) with the given ID. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Permanently delete a device credential (such as a refresh token or public key) with the given ID. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("device-credentials") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 deleted file mode 100644 index 3e8c47f32..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawEmailTemplatesClient.java +++ /dev/null @@ -1,333 +0,0 @@ -/** - * 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.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.CreateEmailTemplateRequestContent; -import com.auth0.client.mgmt.types.CreateEmailTemplateResponseContent; -import com.auth0.client.mgmt.types.EmailTemplateNameEnum; -import com.auth0.client.mgmt.types.GetEmailTemplateResponseContent; -import com.auth0.client.mgmt.types.SetEmailTemplateRequestContent; -import com.auth0.client.mgmt.types.SetEmailTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateEmailTemplateRequestContent; -import com.auth0.client.mgmt.types.UpdateEmailTemplateResponseContent; -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 RawEmailTemplatesClient { - protected final ClientOptions clientOptions; - - public RawEmailTemplatesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Create an email template. - */ - public ManagementApiHttpResponse create( - CreateEmailTemplateRequestContent request) { - return create(request, null); - } - - /** - * Create an email template. - */ - public ManagementApiHttpResponse create( - CreateEmailTemplateRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("email-templates") - .build(); - 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) - .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); - } - 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, CreateEmailTemplateResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. - */ - public ManagementApiHttpResponse get(EmailTemplateNameEnum templateName) { - return get(templateName, null); - } - - /** - * Retrieve an email template by pre-defined name. These names are verify_email, verify_email_by_code, reset_email, reset_email_by_code, welcome_email, blocked_account, stolen_credentials, enrollment_email, mfa_oob_code, user_invitation, and async_approval. The names change_password, and password_reset are also supported for legacy scenarios. - */ - public ManagementApiHttpResponse get( - EmailTemplateNameEnum templateName, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("email-templates") - .addPathSegment(templateName.toString()) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetEmailTemplateResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update an email template. - */ - public ManagementApiHttpResponse set( - EmailTemplateNameEnum templateName, SetEmailTemplateRequestContent request) { - return set(templateName, request, null); - } - - /** - * Update an email template. - */ - public ManagementApiHttpResponse set( - EmailTemplateNameEnum templateName, SetEmailTemplateRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("email-templates") - .addPathSegment(templateName.toString()) - .build(); - 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) - .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); - } - 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, SetEmailTemplateResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Modify an email template. - */ - public ManagementApiHttpResponse update(EmailTemplateNameEnum templateName) { - return update(templateName, UpdateEmailTemplateRequestContent.builder().build()); - } - - /** - * Modify an email template. - */ - public ManagementApiHttpResponse update( - EmailTemplateNameEnum templateName, UpdateEmailTemplateRequestContent request) { - return update(templateName, request, null); - } - - /** - * Modify an email template. - */ - public ManagementApiHttpResponse update( - EmailTemplateNameEnum templateName, - UpdateEmailTemplateRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("email-templates") - .addPathSegment(templateName.toString()) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateEmailTemplateResponseContent.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 (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 deleted file mode 100644 index eaa8ea2a3..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawEventStreamsClient.java +++ /dev/null @@ -1,427 +0,0 @@ -/** - * 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.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.CreateEventStreamResponseContent; -import com.auth0.client.mgmt.types.CreateEventStreamTestEventRequestContent; -import com.auth0.client.mgmt.types.CreateEventStreamTestEventResponseContent; -import com.auth0.client.mgmt.types.EventStreamResponseContent; -import com.auth0.client.mgmt.types.EventStreamsCreateRequest; -import com.auth0.client.mgmt.types.GetEventStreamResponseContent; -import com.auth0.client.mgmt.types.ListEventStreamsRequestParameters; -import com.auth0.client.mgmt.types.ListEventStreamsResponseContent; -import com.auth0.client.mgmt.types.UpdateEventStreamRequestContent; -import com.auth0.client.mgmt.types.UpdateEventStreamResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawEventStreamsClient { - protected final ClientOptions clientOptions; - - public RawEventStreamsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public ManagementApiHttpResponse> list() { - return list(ListEventStreamsRequestParameters.builder().build()); - } - - public ManagementApiHttpResponse> list( - ListEventStreamsRequestParameters request) { - return list(request, null); - } - - public ManagementApiHttpResponse> list( - ListEventStreamsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListEventStreamsResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ListEventStreamsResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListEventStreamsRequestParameters nextRequest = ListEventStreamsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getEventStreams().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> list( - nextRequest, requestOptions) - .body()), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse create(EventStreamsCreateRequest request) { - return create(request, null); - } - - public ManagementApiHttpResponse create( - EventStreamsCreateRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .build(); - 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) - .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); - } - 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, CreateEventStreamResponseContent.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 (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 httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetEventStreamResponseContent.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 (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 httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateEventStreamRequestContent.builder().build()); - } - - public ManagementApiHttpResponse update( - String id, UpdateEventStreamRequestContent request) { - return update(id, request, null); - } - - public ManagementApiHttpResponse update( - String id, UpdateEventStreamRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateEventStreamResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse test( - String id, CreateEventStreamTestEventRequestContent request) { - return test(id, request, null); - } - - public ManagementApiHttpResponse test( - String id, CreateEventStreamTestEventRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .addPathSegment(id) - .addPathSegments("test") - .build(); - 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) - .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); - } - 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, CreateEventStreamTestEventResponseContent.class), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/RawFlowsClient.java b/src/main/java/com/auth0/client/mgmt/RawFlowsClient.java deleted file mode 100644 index f9ac8c90b..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawFlowsClient.java +++ /dev/null @@ -1,377 +0,0 @@ -/** - * 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.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.types.CreateFlowRequestContent; -import com.auth0.client.mgmt.types.CreateFlowResponseContent; -import com.auth0.client.mgmt.types.FlowSummary; -import com.auth0.client.mgmt.types.GetFlowRequestParameters; -import com.auth0.client.mgmt.types.GetFlowResponseContent; -import com.auth0.client.mgmt.types.ListFlowsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListFlowsRequestParameters; -import com.auth0.client.mgmt.types.UpdateFlowRequestContent; -import com.auth0.client.mgmt.types.UpdateFlowResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawFlowsClient { - protected final ClientOptions clientOptions; - - public RawFlowsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public ManagementApiHttpResponse> list() { - return list(ListFlowsRequestParameters.builder().build()); - } - - public ManagementApiHttpResponse> list(ListFlowsRequestParameters request) { - return list(request, null); - } - - public ManagementApiHttpResponse> list( - ListFlowsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getSynchronous().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "synchronous", request.getSynchronous().orElse(null), false); - } - if (request.getHydrate().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "hydrate", request.getHydrate().get(), true); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListFlowsOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListFlowsOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListFlowsRequestParameters nextRequest = ListFlowsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getFlows().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse create(CreateFlowRequestContent request) { - return create(request, null); - } - - public ManagementApiHttpResponse create( - CreateFlowRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows") - .build(); - 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) - .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); - } - 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, CreateFlowResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse get(String id) { - return get(id, GetFlowRequestParameters.builder().build()); - } - - public ManagementApiHttpResponse get(String id, GetFlowRequestParameters request) { - return get(id, request, null); - } - - public ManagementApiHttpResponse get( - String id, GetFlowRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows") - .addPathSegment(id); - if (request.getHydrate().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "hydrate", request.getHydrate().get(), true); - } - 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); - } - 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, GetFlowResponseContent.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 (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 httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateFlowRequestContent.builder().build()); - } - - public ManagementApiHttpResponse update(String id, UpdateFlowRequestContent request) { - return update(id, request, null); - } - - public ManagementApiHttpResponse update( - String id, UpdateFlowRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateFlowResponseContent.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 (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 deleted file mode 100644 index dbcca1501..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawFormsClient.java +++ /dev/null @@ -1,367 +0,0 @@ -/** - * 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.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.types.CreateFormRequestContent; -import com.auth0.client.mgmt.types.CreateFormResponseContent; -import com.auth0.client.mgmt.types.FormSummary; -import com.auth0.client.mgmt.types.GetFormRequestParameters; -import com.auth0.client.mgmt.types.GetFormResponseContent; -import com.auth0.client.mgmt.types.ListFormsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListFormsRequestParameters; -import com.auth0.client.mgmt.types.UpdateFormRequestContent; -import com.auth0.client.mgmt.types.UpdateFormResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawFormsClient { - protected final ClientOptions clientOptions; - - public RawFormsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public ManagementApiHttpResponse> list() { - return list(ListFormsRequestParameters.builder().build()); - } - - public ManagementApiHttpResponse> list(ListFormsRequestParameters request) { - return list(request, null); - } - - public ManagementApiHttpResponse> list( - ListFormsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("forms"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (request.getHydrate().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "hydrate", request.getHydrate().get(), true); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListFormsOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListFormsOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListFormsRequestParameters nextRequest = ListFormsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getForms().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse create(CreateFormRequestContent request) { - return create(request, null); - } - - public ManagementApiHttpResponse create( - CreateFormRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("forms") - .build(); - 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) - .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); - } - 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, CreateFormResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse get(String id) { - return get(id, GetFormRequestParameters.builder().build()); - } - - public ManagementApiHttpResponse get(String id, GetFormRequestParameters request) { - return get(id, request, null); - } - - public ManagementApiHttpResponse get( - String id, GetFormRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("forms") - .addPathSegment(id); - if (request.getHydrate().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "hydrate", request.getHydrate().get(), true); - } - 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); - } - 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, GetFormResponseContent.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 (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 httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("forms") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateFormRequestContent.builder().build()); - } - - public ManagementApiHttpResponse update(String id, UpdateFormRequestContent request) { - return update(id, request, null); - } - - public ManagementApiHttpResponse update( - String id, UpdateFormRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("forms") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateFormResponseContent.class), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/RawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/RawGroupsClient.java deleted file mode 100644 index a99ca73c5..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawGroupsClient.java +++ /dev/null @@ -1,204 +0,0 @@ -/** - * 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.ObjectMappers; -import com.auth0.client.mgmt.core.QueryStringMapper; -import com.auth0.client.mgmt.core.RequestOptions; -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.types.GetGroupResponseContent; -import com.auth0.client.mgmt.types.Group; -import com.auth0.client.mgmt.types.ListGroupsPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListGroupsRequestParameters; -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; - } - - /** - * List all groups in your tenant. - */ - public ManagementApiHttpResponse> list() { - return list(ListGroupsRequestParameters.builder().build()); - } - - /** - * List all groups in your tenant. - */ - public ManagementApiHttpResponse> list(ListGroupsRequestParameters request) { - return list(request, null); - } - - /** - * List all groups in your tenant. - */ - public ManagementApiHttpResponse> list( - ListGroupsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("groups"); - if (!request.getConnectionId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "connection_id", request.getConnectionId().orElse(null), false); - } - if (!request.getName().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "name", request.getName().orElse(null), false); - } - if (!request.getExternalId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "external_id", request.getExternalId().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); - } - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListGroupsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListGroupsPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListGroupsRequestParameters nextRequest = ListGroupsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getGroups(); - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve a group by its ID. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve a group by its ID. - */ - public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("groups") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetGroupResponseContent.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 (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 deleted file mode 100644 index 316459bd5..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawHooksClient.java +++ /dev/null @@ -1,430 +0,0 @@ -/** - * 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.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.CreateHookRequestContent; -import com.auth0.client.mgmt.types.CreateHookResponseContent; -import com.auth0.client.mgmt.types.GetHookRequestParameters; -import com.auth0.client.mgmt.types.GetHookResponseContent; -import com.auth0.client.mgmt.types.Hook; -import com.auth0.client.mgmt.types.ListHooksOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListHooksRequestParameters; -import com.auth0.client.mgmt.types.UpdateHookRequestContent; -import com.auth0.client.mgmt.types.UpdateHookResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawHooksClient { - protected final ClientOptions clientOptions; - - public RawHooksClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve all <a href="https://auth0.com/docs/hooks">hooks</a>. Accepts a list of fields to include or exclude in the result. - */ - public ManagementApiHttpResponse> list() { - return list(ListHooksRequestParameters.builder().build()); - } - - /** - * Retrieve all <a href="https://auth0.com/docs/hooks">hooks</a>. Accepts a list of fields to include or exclude in the result. - */ - public ManagementApiHttpResponse> list(ListHooksRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve all <a href="https://auth0.com/docs/hooks">hooks</a>. Accepts a list of fields to include or exclude in the result. - */ - public ManagementApiHttpResponse> list( - ListHooksRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getEnabled().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "enabled", request.getEnabled().orElse(null), false); - } - if (!request.getFields().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "fields", request.getFields().orElse(null), false); - } - if (!request.getTriggerId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "triggerId", request.getTriggerId().orElse(null), false); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListHooksOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListHooksOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListHooksRequestParameters nextRequest = ListHooksRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getHooks().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a new hook. - */ - public ManagementApiHttpResponse create(CreateHookRequestContent request) { - return create(request, null); - } - - /** - * Create a new hook. - */ - public ManagementApiHttpResponse create( - CreateHookRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks") - .build(); - 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) - .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); - } - 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, CreateHookResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve <a href="https://auth0.com/docs/hooks">a hook</a> by its ID. Accepts a list of fields to include in the result. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, GetHookRequestParameters.builder().build()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/hooks">a hook</a> by its ID. Accepts a list of fields to include in the result. - */ - public ManagementApiHttpResponse get(String id, GetHookRequestParameters request) { - return get(id, request, null); - } - - /** - * Retrieve <a href="https://auth0.com/docs/hooks">a hook</a> by its ID. Accepts a list of fields to include in the result. - */ - public ManagementApiHttpResponse get( - String id, GetHookRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks") - .addPathSegment(id); - if (!request.getFields().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "fields", request.getFields().orElse(null), false); - } - 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); - } - 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, GetHookResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a hook. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete a hook. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update an existing hook. - */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateHookRequestContent.builder().build()); - } - - /** - * Update an existing hook. - */ - public ManagementApiHttpResponse update(String id, UpdateHookRequestContent request) { - return update(id, request, null); - } - - /** - * Update an existing hook. - */ - public ManagementApiHttpResponse update( - String id, UpdateHookRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateHookResponseContent.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 (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 deleted file mode 100644 index 65b0c8df7..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawJobsClient.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * 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.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -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.GetJobResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawJobsClient { - protected final ClientOptions clientOptions; - - public RawJobsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieves a job. Useful to check its status. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieves a job. Useful to check its status. - */ - public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetJobResponseContent.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 (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 deleted file mode 100644 index 08fdd83d3..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawLogStreamsClient.java +++ /dev/null @@ -1,1052 +0,0 @@ -/** - * 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.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.CreateLogStreamRequestContent; -import com.auth0.client.mgmt.types.CreateLogStreamResponseContent; -import com.auth0.client.mgmt.types.GetLogStreamResponseContent; -import com.auth0.client.mgmt.types.LogStreamResponseSchema; -import com.auth0.client.mgmt.types.UpdateLogStreamRequestContent; -import com.auth0.client.mgmt.types.UpdateLogStreamResponseContent; -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 RawLogStreamsClient { - protected final ClientOptions clientOptions; - - public RawLogStreamsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/logs/streams">log streams</a>. - *

<h5>Sample Response</h5><pre><code>[{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active|paused|suspended", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }, { - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active|paused|suspended", - * "sink": { - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpContentType": "string", - * "httpEndpoint": "string", - * "httpAuthorization": "string" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "eventgrid", - * "status": "active|paused|suspended", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string", - * "azurePartnerTopic": "string" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active|paused|suspended", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active|paused|suspended", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active|paused|suspended", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }]</code></pre>

- */ - public ManagementApiHttpResponse> list() { - return list(null); - } - - /** - * Retrieve details on <a href="https://auth0.com/docs/logs/streams">log streams</a>. - *

<h5>Sample Response</h5><pre><code>[{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active|paused|suspended", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }, { - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active|paused|suspended", - * "sink": { - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpContentType": "string", - * "httpEndpoint": "string", - * "httpAuthorization": "string" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "eventgrid", - * "status": "active|paused|suspended", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string", - * "azurePartnerTopic": "string" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active|paused|suspended", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active|paused|suspended", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }, - * { - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active|paused|suspended", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }]</code></pre>

- */ - public ManagementApiHttpResponse> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("log-streams") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, new TypeReference>() {}), - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a log stream. - *

<h5>Log Stream Types</h5> The <code>type</code> of log stream being created determines the properties required in the <code>sink</code> payload. - * <h5>HTTP Stream</h5> For an <code>http</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "http", - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpAuthorization": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active", - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Amazon EventBridge Stream</h5> For an <code>eventbridge</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "eventbridge", - * "sink": { - * "awsRegion": "string", - * "awsAccountId": "string" - * } - * }</code></pre> - * The response will include an additional field <code>awsPartnerEventSource</code> in the <code>sink</code>: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }</code></pre> - * <h5>Azure Event Grid Stream</h5> For an <code>Azure Event Grid</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "eventgrid", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string", - * "azurePartnerTopic": "string" - * } - * }</code></pre> - * <h5>Datadog Stream</h5> For a <code>Datadog</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "datadog", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Splunk Stream</h5> For a <code>Splunk</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "splunk", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Sumo Logic Stream</h5> For a <code>Sumo Logic</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "sumo", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre>

- */ - public ManagementApiHttpResponse create(CreateLogStreamRequestContent request) { - return create(request, null); - } - - /** - * Create a log stream. - *

<h5>Log Stream Types</h5> The <code>type</code> of log stream being created determines the properties required in the <code>sink</code> payload. - * <h5>HTTP Stream</h5> For an <code>http</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "http", - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpAuthorization": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active", - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Amazon EventBridge Stream</h5> For an <code>eventbridge</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "eventbridge", - * "sink": { - * "awsRegion": "string", - * "awsAccountId": "string" - * } - * }</code></pre> - * The response will include an additional field <code>awsPartnerEventSource</code> in the <code>sink</code>: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }</code></pre> - * <h5>Azure Event Grid Stream</h5> For an <code>Azure Event Grid</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "eventgrid", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active", - * "sink": { - * "azureSubscriptionId": "string", - * "azureResourceGroup": "string", - * "azureRegion": "string", - * "azurePartnerTopic": "string" - * } - * }</code></pre> - * <h5>Datadog Stream</h5> For a <code>Datadog</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "datadog", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Splunk Stream</h5> For a <code>Splunk</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "splunk", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Sumo Logic Stream</h5> For a <code>Sumo Logic</code> Stream, the <code>sink</code> properties are listed in the payload below - * Request: <pre><code>{ - * "name": "string", - * "type": "sumo", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre> - * Response: <pre><code>{ - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre>

- */ - public ManagementApiHttpResponse create( - CreateLogStreamRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("log-streams") - .build(); - 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) - .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); - } - 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, CreateLogStreamResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve a log stream configuration and status. - *

<h5>Sample responses</h5><h5>Amazon EventBridge Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active|paused|suspended", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }</code></pre> <h5>HTTP Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active|paused|suspended", - * "sink": { - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpContentType": "string", - * "httpEndpoint": "string", - * "httpAuthorization": "string" - * } - * }</code></pre> <h5>Datadog Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active|paused|suspended", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * }

- *

}</code></pre><h5>Mixpanel</h5>

- *
Request: <pre><code>{
-     *   "name": "string",
-     *   "type": "mixpanel",
-     *   "sink": {
-     * 	"mixpanelRegion": "string", // "us" | "eu",
-     * 	"mixpanelProjectId": "string",
-     * 	"mixpanelServiceAccountUsername": "string",
-     * 	"mixpanelServiceAccountPassword": "string"
-     *   }
-     * } </code></pre>
-     *
-     *
-     * Response: <pre><code>{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "mixpanel",
-     * 	"status": "active",
-     * 	"sink": {
-     * 	  "mixpanelRegion": "string", // "us" | "eu",
-     * 	  "mixpanelProjectId": "string",
-     * 	  "mixpanelServiceAccountUsername": "string",
-     * 	  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-     * 	}
-     *   } </code></pre>
-     *
-     * <h5>Segment</h5>
-     *
-     * Request: <pre><code> {
-     *   "name": "string",
-     *   "type": "segment",
-     *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * }</code></pre>
-     *
-     * Response: <pre><code>{
-     *   "id": "string",
-     *   "name": "string",
-     *   "type": "segment",
-     *   "status": "active",
-     *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * } </code></pre>
-     * 
- *

<h5>Splunk Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active|paused|suspended", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> <h5>Sumo Logic Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active|paused|suspended", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre> <h5>Status</h5> The <code>status</code> of a log stream maybe any of the following: - * 1. <code>active</code> - Stream is currently enabled. - * 2. <code>paused</code> - Stream is currently user disabled and will not attempt log delivery. - * 3. <code>suspended</code> - Stream is currently disabled because of errors and will not attempt log delivery.

- */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve a log stream configuration and status. - *

<h5>Sample responses</h5><h5>Amazon EventBridge Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "eventbridge", - * "status": "active|paused|suspended", - * "sink": { - * "awsAccountId": "string", - * "awsRegion": "string", - * "awsPartnerEventSource": "string" - * } - * }</code></pre> <h5>HTTP Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "http", - * "status": "active|paused|suspended", - * "sink": { - * "httpContentFormat": "JSONLINES|JSONARRAY", - * "httpContentType": "string", - * "httpEndpoint": "string", - * "httpAuthorization": "string" - * } - * }</code></pre> <h5>Datadog Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "datadog", - * "status": "active|paused|suspended", - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * }

- *

}</code></pre><h5>Mixpanel</h5>

- *
Request: <pre><code>{
-     *   "name": "string",
-     *   "type": "mixpanel",
-     *   "sink": {
-     * 	"mixpanelRegion": "string", // "us" | "eu",
-     * 	"mixpanelProjectId": "string",
-     * 	"mixpanelServiceAccountUsername": "string",
-     * 	"mixpanelServiceAccountPassword": "string"
-     *   }
-     * } </code></pre>
-     *
-     *
-     * Response: <pre><code>{
-     * 	"id": "string",
-     * 	"name": "string",
-     * 	"type": "mixpanel",
-     * 	"status": "active",
-     * 	"sink": {
-     * 	  "mixpanelRegion": "string", // "us" | "eu",
-     * 	  "mixpanelProjectId": "string",
-     * 	  "mixpanelServiceAccountUsername": "string",
-     * 	  "mixpanelServiceAccountPassword": "string" // the following is redacted on return
-     * 	}
-     *   } </code></pre>
-     *
-     * <h5>Segment</h5>
-     *
-     * Request: <pre><code> {
-     *   "name": "string",
-     *   "type": "segment",
-     *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * }</code></pre>
-     *
-     * Response: <pre><code>{
-     *   "id": "string",
-     *   "name": "string",
-     *   "type": "segment",
-     *   "status": "active",
-     *   "sink": {
-     * 	"segmentWriteKey": "string"
-     *   }
-     * } </code></pre>
-     * 
- *

<h5>Splunk Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "splunk", - * "status": "active|paused|suspended", - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> <h5>Sumo Logic Log Stream</h5><pre><code>{ - * "id": "string", - * "name": "string", - * "type": "sumo", - * "status": "active|paused|suspended", - * "sink": { - * "sumoSourceAddress": "string", - * } - * }</code></pre> <h5>Status</h5> The <code>status</code> of a log stream maybe any of the following: - * 1. <code>active</code> - Stream is currently enabled. - * 2. <code>paused</code> - Stream is currently user disabled and will not attempt log delivery. - * 3. <code>suspended</code> - Stream is currently disabled because of errors and will not attempt log delivery.

- */ - public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("log-streams") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetLogStreamResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a log stream. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete a log stream. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("log-streams") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update a log stream. - *

<h4>Examples of how to use the PATCH endpoint.</h4> The following fields may be updated in a PATCH operation: <ul><li>name</li><li>status</li><li>sink</li></ul> Note: For log streams of type <code>eventbridge</code> and <code>eventgrid</code>, updating the <code>sink</code> is not permitted. - * <h5>Update the status of a log stream</h5><pre><code>{ - * "status": "active|paused" - * }</code></pre> - * <h5>Update the name of a log stream</h5><pre><code>{ - * "name": "string" - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>http</code></h5><pre><code>{ - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONARRAY|JSONLINES", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>datadog</code></h5><pre><code>{ - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>splunk</code></h5><pre><code>{ - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>sumo</code></h5><pre><code>{ - * "sink": { - * "sumoSourceAddress": "string" - * } - * }</code></pre>

- */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateLogStreamRequestContent.builder().build()); - } - - /** - * Update a log stream. - *

<h4>Examples of how to use the PATCH endpoint.</h4> The following fields may be updated in a PATCH operation: <ul><li>name</li><li>status</li><li>sink</li></ul> Note: For log streams of type <code>eventbridge</code> and <code>eventgrid</code>, updating the <code>sink</code> is not permitted. - * <h5>Update the status of a log stream</h5><pre><code>{ - * "status": "active|paused" - * }</code></pre> - * <h5>Update the name of a log stream</h5><pre><code>{ - * "name": "string" - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>http</code></h5><pre><code>{ - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONARRAY|JSONLINES", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>datadog</code></h5><pre><code>{ - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>splunk</code></h5><pre><code>{ - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>sumo</code></h5><pre><code>{ - * "sink": { - * "sumoSourceAddress": "string" - * } - * }</code></pre>

- */ - public ManagementApiHttpResponse update( - String id, UpdateLogStreamRequestContent request) { - return update(id, request, null); - } - - /** - * Update a log stream. - *

<h4>Examples of how to use the PATCH endpoint.</h4> The following fields may be updated in a PATCH operation: <ul><li>name</li><li>status</li><li>sink</li></ul> Note: For log streams of type <code>eventbridge</code> and <code>eventgrid</code>, updating the <code>sink</code> is not permitted. - * <h5>Update the status of a log stream</h5><pre><code>{ - * "status": "active|paused" - * }</code></pre> - * <h5>Update the name of a log stream</h5><pre><code>{ - * "name": "string" - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>http</code></h5><pre><code>{ - * "sink": { - * "httpEndpoint": "string", - * "httpContentType": "string", - * "httpContentFormat": "JSONARRAY|JSONLINES", - * "httpAuthorization": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>datadog</code></h5><pre><code>{ - * "sink": { - * "datadogRegion": "string", - * "datadogApiKey": "string" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>splunk</code></h5><pre><code>{ - * "sink": { - * "splunkDomain": "string", - * "splunkToken": "string", - * "splunkPort": "string", - * "splunkSecure": "boolean" - * } - * }</code></pre> - * <h5>Update the sink properties of a stream of type <code>sumo</code></h5><pre><code>{ - * "sink": { - * "sumoSourceAddress": "string" - * } - * }</code></pre>

- */ - public ManagementApiHttpResponse update( - String id, UpdateLogStreamRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("log-streams") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateLogStreamResponseContent.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 (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 deleted file mode 100644 index 8b6c77553..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawLogsClient.java +++ /dev/null @@ -1,260 +0,0 @@ -/** - * 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.ObjectMappers; -import com.auth0.client.mgmt.core.QueryStringMapper; -import com.auth0.client.mgmt.core.RequestOptions; -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.types.GetLogResponseContent; -import com.auth0.client.mgmt.types.ListLogOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListLogsRequestParameters; -import com.auth0.client.mgmt.types.Log; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawLogsClient { - protected final ClientOptions clientOptions; - - public RawLogsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve log entries that match the specified search criteria (or all log entries if no criteria specified). - *

Set custom search criteria using the <code>q</code> parameter, or search from a specific log ID (<i>"search from checkpoint"</i>).

- *

For more information on all possible event types, their respective acronyms, and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

<h5>To set custom search criteria, use the following parameters:</h5>

- *

<ul> - * <li><b>q:</b> Search Criteria using <a href="https://auth0.com/docs/logs/log-search-query-syntax">Query String Syntax</a></li> - * <li><b>page:</b> Page index of the results to return. First page is 0.</li> - * <li><b>per_page:</b> Number of results per page.</li> - * <li><b>sort:</b> Field to use for sorting appended with `:1` for ascending and `:-1` for descending. e.g. `date:-1`</li> - * <li><b>fields:</b> Comma-separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields.</li> - * <li><b>include_fields:</b> Whether specified fields are to be included (true) or excluded (false).</li> - * <li><b>include_totals:</b> Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). <b>Deprecated:</b> this field is deprecated and should be removed from use. See <a href="https://auth0.com/docs/product-lifecycle/deprecations-and-migrations/migrate-to-tenant-log-search-v3#pagination">Search Engine V3 Breaking Changes</a></li> - * </ul>

- *

For more information on the list of fields that can be used in <code>fields</code> and <code>sort</code>, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may paginate only through 1,000 search results. If you exceed this threshold, please redefine your search or use the <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#retrieve-logs-by-checkpoint">get logs by checkpoint method</a>.

- *

<h5>To search from a checkpoint log ID, use the following parameters:</h5> - * <ul> - * <li><b>from:</b> Log Event ID from which to start retrieving logs. You can limit the number of logs returned using the <code>take</code> parameter. If you use <code>from</code> at the same time as <code>q</code>, <code>from</code> takes precedence and <code>q</code> is ignored.</li> - * <li><b>take:</b> Number of entries to retrieve when using the <code>from</code> parameter.</li> - * </ul>

- *

<strong>Important:</strong> When fetching logs from a checkpoint log ID, any parameter other than <code>from</code> and <code>take</code> will be ignored, and date ordering is not guaranteed.

- */ - public ManagementApiHttpResponse> list() { - return list(ListLogsRequestParameters.builder().build()); - } - - /** - * Retrieve log entries that match the specified search criteria (or all log entries if no criteria specified). - *

Set custom search criteria using the <code>q</code> parameter, or search from a specific log ID (<i>"search from checkpoint"</i>).

- *

For more information on all possible event types, their respective acronyms, and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

<h5>To set custom search criteria, use the following parameters:</h5>

- *

<ul> - * <li><b>q:</b> Search Criteria using <a href="https://auth0.com/docs/logs/log-search-query-syntax">Query String Syntax</a></li> - * <li><b>page:</b> Page index of the results to return. First page is 0.</li> - * <li><b>per_page:</b> Number of results per page.</li> - * <li><b>sort:</b> Field to use for sorting appended with `:1` for ascending and `:-1` for descending. e.g. `date:-1`</li> - * <li><b>fields:</b> Comma-separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields.</li> - * <li><b>include_fields:</b> Whether specified fields are to be included (true) or excluded (false).</li> - * <li><b>include_totals:</b> Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). <b>Deprecated:</b> this field is deprecated and should be removed from use. See <a href="https://auth0.com/docs/product-lifecycle/deprecations-and-migrations/migrate-to-tenant-log-search-v3#pagination">Search Engine V3 Breaking Changes</a></li> - * </ul>

- *

For more information on the list of fields that can be used in <code>fields</code> and <code>sort</code>, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may paginate only through 1,000 search results. If you exceed this threshold, please redefine your search or use the <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#retrieve-logs-by-checkpoint">get logs by checkpoint method</a>.

- *

<h5>To search from a checkpoint log ID, use the following parameters:</h5> - * <ul> - * <li><b>from:</b> Log Event ID from which to start retrieving logs. You can limit the number of logs returned using the <code>take</code> parameter. If you use <code>from</code> at the same time as <code>q</code>, <code>from</code> takes precedence and <code>q</code> is ignored.</li> - * <li><b>take:</b> Number of entries to retrieve when using the <code>from</code> parameter.</li> - * </ul>

- *

<strong>Important:</strong> When fetching logs from a checkpoint log ID, any parameter other than <code>from</code> and <code>take</code> will be ignored, and date ordering is not guaranteed.

- */ - public ManagementApiHttpResponse> list(ListLogsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve log entries that match the specified search criteria (or all log entries if no criteria specified). - *

Set custom search criteria using the <code>q</code> parameter, or search from a specific log ID (<i>"search from checkpoint"</i>).

- *

For more information on all possible event types, their respective acronyms, and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

<h5>To set custom search criteria, use the following parameters:</h5>

- *

<ul> - * <li><b>q:</b> Search Criteria using <a href="https://auth0.com/docs/logs/log-search-query-syntax">Query String Syntax</a></li> - * <li><b>page:</b> Page index of the results to return. First page is 0.</li> - * <li><b>per_page:</b> Number of results per page.</li> - * <li><b>sort:</b> Field to use for sorting appended with `:1` for ascending and `:-1` for descending. e.g. `date:-1`</li> - * <li><b>fields:</b> Comma-separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields.</li> - * <li><b>include_fields:</b> Whether specified fields are to be included (true) or excluded (false).</li> - * <li><b>include_totals:</b> Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). <b>Deprecated:</b> this field is deprecated and should be removed from use. See <a href="https://auth0.com/docs/product-lifecycle/deprecations-and-migrations/migrate-to-tenant-log-search-v3#pagination">Search Engine V3 Breaking Changes</a></li> - * </ul>

- *

For more information on the list of fields that can be used in <code>fields</code> and <code>sort</code>, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may paginate only through 1,000 search results. If you exceed this threshold, please redefine your search or use the <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#retrieve-logs-by-checkpoint">get logs by checkpoint method</a>.

- *

<h5>To search from a checkpoint log ID, use the following parameters:</h5> - * <ul> - * <li><b>from:</b> Log Event ID from which to start retrieving logs. You can limit the number of logs returned using the <code>take</code> parameter. If you use <code>from</code> at the same time as <code>q</code>, <code>from</code> takes precedence and <code>q</code> is ignored.</li> - * <li><b>take:</b> Number of entries to retrieve when using the <code>from</code> parameter.</li> - * </ul>

- *

<strong>Important:</strong> When fetching logs from a checkpoint log ID, any parameter other than <code>from</code> and <code>take</code> will be ignored, and date ordering is not guaranteed.

- */ - public ManagementApiHttpResponse> list( - ListLogsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("logs"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - if (!request.getSort().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sort", request.getSort().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, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getSearch().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "search", request.getSearch().orElse(null), false); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListLogOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListLogOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListLogsRequestParameters nextRequest = ListLogsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getLogs().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve an individual log event. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve an individual log event. - */ - public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("logs") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetLogResponseContent.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 (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 deleted file mode 100644 index 9748e193f..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawNetworkAclsClient.java +++ /dev/null @@ -1,479 +0,0 @@ -/** - * 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.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.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.CreateNetworkAclRequestContent; -import com.auth0.client.mgmt.types.GetNetworkAclsResponseContent; -import com.auth0.client.mgmt.types.ListNetworkAclsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListNetworkAclsRequestParameters; -import com.auth0.client.mgmt.types.NetworkAclsResponseContent; -import com.auth0.client.mgmt.types.SetNetworkAclRequestContent; -import com.auth0.client.mgmt.types.SetNetworkAclsResponseContent; -import com.auth0.client.mgmt.types.UpdateNetworkAclRequestContent; -import com.auth0.client.mgmt.types.UpdateNetworkAclResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawNetworkAclsClient { - protected final ClientOptions clientOptions; - - public RawNetworkAclsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Get all access control list entries for your client. - */ - public ManagementApiHttpResponse> list() { - return list(ListNetworkAclsRequestParameters.builder().build()); - } - - /** - * Get all access control list entries for your client. - */ - public ManagementApiHttpResponse> list( - ListNetworkAclsRequestParameters request) { - return list(request, null); - } - - /** - * Get all access control list entries for your client. - */ - public ManagementApiHttpResponse> list( - ListNetworkAclsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("network-acls"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListNetworkAclsOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListNetworkAclsOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListNetworkAclsRequestParameters nextRequest = ListNetworkAclsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getNetworkAcls().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, result, parsedResponse, () -> list(nextRequest, requestOptions) - .body()), - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a new access control list for your client. - */ - public ManagementApiHttpResponse create(CreateNetworkAclRequestContent request) { - return create(request, null); - } - - /** - * Create a new access control list for your client. - */ - public ManagementApiHttpResponse create( - CreateNetworkAclRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("network-acls") - .build(); - 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) - .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); - } - 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); - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Get a specific access control list entry for your client. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Get a specific access control list entry for your client. - */ - public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("network-acls") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetNetworkAclsResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update existing access control list for your client. - */ - public ManagementApiHttpResponse set( - String id, SetNetworkAclRequestContent request) { - return set(id, request, null); - } - - /** - * Update existing access control list for your client. - */ - public ManagementApiHttpResponse set( - String id, SetNetworkAclRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("network-acls") - .addPathSegment(id) - .build(); - 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) - .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); - } - 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, SetNetworkAclsResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete existing access control list for your client. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete existing access control list for your client. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("network-acls") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update existing access control list for your client. - */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateNetworkAclRequestContent.builder().build()); - } - - /** - * Update existing access control list for your client. - */ - public ManagementApiHttpResponse update( - String id, UpdateNetworkAclRequestContent request) { - return update(id, request, null); - } - - /** - * Update existing access control list for your client. - */ - public ManagementApiHttpResponse update( - String id, UpdateNetworkAclRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("network-acls") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateNetworkAclResponseContent.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 (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 deleted file mode 100644 index c7c7df5f7..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawOrganizationsClient.java +++ /dev/null @@ -1,511 +0,0 @@ -/** - * 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.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.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.ListOrganizationsPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListOrganizationsRequestParameters; -import com.auth0.client.mgmt.types.Organization; -import com.auth0.client.mgmt.types.UpdateOrganizationRequestContent; -import com.auth0.client.mgmt.types.UpdateOrganizationResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawOrganizationsClient { - protected final ClientOptions clientOptions; - - public RawOrganizationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve detailed list of all Organizations available in your tenant. For more information, see Auth0 Organizations. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total number of entries to retrieve when using the <code>from</code> parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public ManagementApiHttpResponse> list() { - return list(ListOrganizationsRequestParameters.builder().build()); - } - - /** - * Retrieve detailed list of all Organizations available in your tenant. For more information, see Auth0 Organizations. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total number of entries to retrieve when using the <code>from</code> parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public ManagementApiHttpResponse> list( - ListOrganizationsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve detailed list of all Organizations available in your tenant. For more information, see Auth0 Organizations. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total number of entries to retrieve when using the <code>from</code> parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public ManagementApiHttpResponse> list( - ListOrganizationsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - if (!request.getSort().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sort", request.getSort().orElse(null), false); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListOrganizationsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListOrganizationsPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListOrganizationsRequestParameters nextRequest = ListOrganizationsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getOrganizations().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> list( - nextRequest, requestOptions) - .body()), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a new Organization within your tenant. To learn more about Organization settings, behavior, and configuration options, review <a href="https://auth0.com/docs/manage-users/organizations/create-first-organization">Create Your First Organization</a>. - */ - public ManagementApiHttpResponse create( - CreateOrganizationRequestContent request) { - return create(request, null); - } - - /** - * Create a new Organization within your tenant. To learn more about Organization settings, behavior, and configuration options, review <a href="https://auth0.com/docs/manage-users/organizations/create-first-organization">Create Your First Organization</a>. - */ - public ManagementApiHttpResponse create( - CreateOrganizationRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .build(); - 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) - .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); - } - 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, CreateOrganizationResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details about a single Organization specified by name. - */ - public ManagementApiHttpResponse getByName(String name) { - return getByName(name, null); - } - - /** - * Retrieve details about a single Organization specified by name. - */ - public ManagementApiHttpResponse getByName( - String name, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations/name") - .addPathSegment(name) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetOrganizationByNameResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details about a single Organization specified by ID. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve details about a single Organization specified by ID. - */ - public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetOrganizationResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Remove an Organization from your tenant. This action cannot be undone. - *

<b>Note</b>: Members are automatically disassociated from an Organization when it is deleted. However, this action does <b>not</b> delete these users from your tenant.

- */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Remove an Organization from your tenant. This action cannot be undone. - *

<b>Note</b>: Members are automatically disassociated from an Organization when it is deleted. However, this action does <b>not</b> delete these users from your tenant.

- */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update the details of a specific <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/create-organizations">Organization</a>, such as name and display name, branding options, and metadata. - */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateOrganizationRequestContent.builder().build()); - } - - /** - * Update the details of a specific <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/create-organizations">Organization</a>, such as name and display name, branding options, and metadata. - */ - public ManagementApiHttpResponse update( - String id, UpdateOrganizationRequestContent request) { - return update(id, request, null); - } - - /** - * Update the details of a specific <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/create-organizations">Organization</a>, such as name and display name, branding options, and metadata. - */ - public ManagementApiHttpResponse update( - String id, UpdateOrganizationRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateOrganizationResponseContent.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 (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 deleted file mode 100644 index 502a1d946..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawPromptsClient.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * 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.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.types.GetSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateSettingsRequestContent; -import com.auth0.client.mgmt.types.UpdateSettingsResponseContent; -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 RawPromptsClient { - protected final ClientOptions clientOptions; - - public RawPromptsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public ManagementApiHttpResponse getSettings() { - return getSettings(null); - } - - /** - * Retrieve details of the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public ManagementApiHttpResponse getSettings(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetSettingsResponseContent.class), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public ManagementApiHttpResponse updateSettings() { - return updateSettings(UpdateSettingsRequestContent.builder().build()); - } - - /** - * Update the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public ManagementApiHttpResponse updateSettings( - UpdateSettingsRequestContent request) { - return updateSettings(request, null); - } - - /** - * Update the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features. - */ - public ManagementApiHttpResponse updateSettings( - UpdateSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateSettingsResponseContent.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 (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 deleted file mode 100644 index 801e513b9..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawRefreshTokensClient.java +++ /dev/null @@ -1,236 +0,0 @@ -/** - * 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.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.GetRefreshTokenResponseContent; -import com.auth0.client.mgmt.types.UpdateRefreshTokenRequestContent; -import com.auth0.client.mgmt.types.UpdateRefreshTokenResponseContent; -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 RawRefreshTokensClient { - protected final ClientOptions clientOptions; - - public RawRefreshTokensClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve refresh token information. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve refresh token information. - */ - public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("refresh-tokens") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetRefreshTokenResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a refresh token by its ID. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete a refresh token by its ID. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("refresh-tokens") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update a refresh token by its ID. - */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateRefreshTokenRequestContent.builder().build()); - } - - /** - * Update a refresh token by its ID. - */ - public ManagementApiHttpResponse update( - String id, UpdateRefreshTokenRequestContent request) { - return update(id, request, null); - } - - /** - * Update a refresh token by its ID. - */ - public ManagementApiHttpResponse update( - String id, UpdateRefreshTokenRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("refresh-tokens") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateRefreshTokenResponseContent.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 (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 deleted file mode 100644 index 847c201ef..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawResourceServersClient.java +++ /dev/null @@ -1,427 +0,0 @@ -/** - * 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.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.CreateResourceServerRequestContent; -import com.auth0.client.mgmt.types.CreateResourceServerResponseContent; -import com.auth0.client.mgmt.types.GetResourceServerRequestParameters; -import com.auth0.client.mgmt.types.GetResourceServerResponseContent; -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.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 okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawResourceServersClient { - protected final ClientOptions clientOptions; - - public RawResourceServersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of all APIs associated with your tenant. - */ - public ManagementApiHttpResponse> list() { - return list(ListResourceServerRequestParameters.builder().build()); - } - - /** - * Retrieve details of all APIs associated with your tenant. - */ - public ManagementApiHttpResponse> list( - ListResourceServerRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve details of all APIs associated with your tenant. - */ - public ManagementApiHttpResponse> list( - ListResourceServerRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("resource-servers"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getIncludeFields().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); - } - if (request.getIdentifiers().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "identifiers", request.getIdentifiers().get(), true); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListResourceServerOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListResourceServerOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListResourceServerRequestParameters nextRequest = ListResourceServerRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getResourceServers().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a new API associated with your tenant. Note that all new APIs must be registered with Auth0. For more information, read <a href="https://www.auth0.com/docs/get-started/apis"> APIs</a>. - */ - public ManagementApiHttpResponse create( - CreateResourceServerRequestContent request) { - return create(request, null); - } - - /** - * Create a new API associated with your tenant. Note that all new APIs must be registered with Auth0. For more information, read <a href="https://www.auth0.com/docs/get-started/apis"> APIs</a>. - */ - public ManagementApiHttpResponse create( - CreateResourceServerRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("resource-servers") - .build(); - 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) - .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); - } - 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, CreateResourceServerResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve <a href="https://auth0.com/docs/apis">API</a> details with the given ID. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, GetResourceServerRequestParameters.builder().build()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/apis">API</a> details with the given ID. - */ - public ManagementApiHttpResponse get( - String id, GetResourceServerRequestParameters request) { - return get(id, request, null); - } - - /** - * Retrieve <a href="https://auth0.com/docs/apis">API</a> details with the given ID. - */ - public ManagementApiHttpResponse get( - String id, GetResourceServerRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("resource-servers") - .addPathSegment(id); - if (!request.getIncludeFields().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); - } - 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); - } - 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, GetResourceServerResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete an existing API by ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete an existing API by ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("resource-servers") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Change an existing API setting by resource server ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateResourceServerRequestContent.builder().build()); - } - - /** - * Change an existing API setting by resource server ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public ManagementApiHttpResponse update( - String id, UpdateResourceServerRequestContent request) { - return update(id, request, null); - } - - /** - * Change an existing API setting by resource server ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public ManagementApiHttpResponse update( - String id, UpdateResourceServerRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("resource-servers") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateResourceServerResponseContent.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 (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 deleted file mode 100644 index db4021f68..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawRolesClient.java +++ /dev/null @@ -1,409 +0,0 @@ -/** - * 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.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.CreateRoleRequestContent; -import com.auth0.client.mgmt.types.CreateRoleResponseContent; -import com.auth0.client.mgmt.types.GetRoleResponseContent; -import com.auth0.client.mgmt.types.ListRolesOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListRolesRequestParameters; -import com.auth0.client.mgmt.types.Role; -import com.auth0.client.mgmt.types.UpdateRoleRequestContent; -import com.auth0.client.mgmt.types.UpdateRoleResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawRolesClient { - protected final ClientOptions clientOptions; - - public RawRolesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve detailed list of user roles created in your tenant. - *

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

- */ - public ManagementApiHttpResponse> list() { - return list(ListRolesRequestParameters.builder().build()); - } - - /** - * Retrieve detailed list of user roles created in your tenant. - *

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

- */ - public ManagementApiHttpResponse> list(ListRolesRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve detailed list of user roles created in your tenant. - *

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

- */ - public ManagementApiHttpResponse> list( - ListRolesRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles"); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getNameFilter().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "name_filter", request.getNameFilter().orElse(null), false); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListRolesOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListRolesOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListRolesRequestParameters nextRequest = ListRolesRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getRoles().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a user role for <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles are not associated with any permissions by default. To assign existing permissions to your role, review Associate Permissions with a Role. To create new permissions, review Add API Permissions.

- */ - public ManagementApiHttpResponse create(CreateRoleRequestContent request) { - return create(request, null); - } - - /** - * Create a user role for <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles are not associated with any permissions by default. To assign existing permissions to your role, review Associate Permissions with a Role. To create new permissions, review Add API Permissions.

- */ - public ManagementApiHttpResponse create( - CreateRoleRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .build(); - 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) - .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); - } - 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, CreateRoleResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details about a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve details about a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetRoleResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> from your tenant. Once deleted, it is removed from any user who was previously assigned that role. This action cannot be undone. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> from your tenant. Once deleted, it is removed from any user who was previously assigned that role. This action cannot be undone. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Modify the details of a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateRoleRequestContent.builder().build()); - } - - /** - * Modify the details of a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public ManagementApiHttpResponse update(String id, UpdateRoleRequestContent request) { - return update(id, request, null); - } - - /** - * Modify the details of a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public ManagementApiHttpResponse update( - String id, UpdateRoleRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateRoleResponseContent.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 (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 deleted file mode 100644 index c58b81dd4..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawRulesClient.java +++ /dev/null @@ -1,436 +0,0 @@ -/** - * 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.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.CreateRuleRequestContent; -import com.auth0.client.mgmt.types.CreateRuleResponseContent; -import com.auth0.client.mgmt.types.GetRuleRequestParameters; -import com.auth0.client.mgmt.types.GetRuleResponseContent; -import com.auth0.client.mgmt.types.ListRulesOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListRulesRequestParameters; -import com.auth0.client.mgmt.types.Rule; -import com.auth0.client.mgmt.types.UpdateRuleRequestContent; -import com.auth0.client.mgmt.types.UpdateRuleResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawRulesClient { - protected final ClientOptions clientOptions; - - public RawRulesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a filtered list of <a href="https://auth0.com/docs/rules">rules</a>. Accepts a list of fields to include or exclude. - */ - public ManagementApiHttpResponse> list() { - return list(ListRulesRequestParameters.builder().build()); - } - - /** - * Retrieve a filtered list of <a href="https://auth0.com/docs/rules">rules</a>. Accepts a list of fields to include or exclude. - */ - public ManagementApiHttpResponse> list(ListRulesRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve a filtered list of <a href="https://auth0.com/docs/rules">rules</a>. Accepts a list of fields to include or exclude. - */ - public ManagementApiHttpResponse> list( - ListRulesRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("rules"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getEnabled().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "enabled", request.getEnabled().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); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListRulesOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListRulesOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListRulesRequestParameters nextRequest = ListRulesRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getRules().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a <a href="https://auth0.com/docs/rules#create-a-new-rule-using-the-management-api">new rule</a>. - *

Note: Changing a rule's stage of execution from the default <code>login_success</code> can change the rule's function signature to have user omitted.

- */ - public ManagementApiHttpResponse create(CreateRuleRequestContent request) { - return create(request, null); - } - - /** - * Create a <a href="https://auth0.com/docs/rules#create-a-new-rule-using-the-management-api">new rule</a>. - *

Note: Changing a rule's stage of execution from the default <code>login_success</code> can change the rule's function signature to have user omitted.

- */ - public ManagementApiHttpResponse create( - CreateRuleRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("rules") - .build(); - 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) - .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); - } - 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, CreateRuleResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve <a href="https://auth0.com/docs/rules">rule</a> details. Accepts a list of fields to include or exclude in the result. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, GetRuleRequestParameters.builder().build()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/rules">rule</a> details. Accepts a list of fields to include or exclude in the result. - */ - public ManagementApiHttpResponse get(String id, GetRuleRequestParameters request) { - return get(id, request, null); - } - - /** - * Retrieve <a href="https://auth0.com/docs/rules">rule</a> details. Accepts a list of fields to include or exclude in the result. - */ - public ManagementApiHttpResponse get( - String id, GetRuleRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("rules") - .addPathSegment(id); - 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); - } - 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); - } - 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, GetRuleResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a rule. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete a rule. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("rules") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update an existing rule. - */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateRuleRequestContent.builder().build()); - } - - /** - * Update an existing rule. - */ - public ManagementApiHttpResponse update(String id, UpdateRuleRequestContent request) { - return update(id, request, null); - } - - /** - * Update an existing rule. - */ - public ManagementApiHttpResponse update( - String id, UpdateRuleRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("rules") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateRuleResponseContent.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 (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 deleted file mode 100644 index 46750c43e..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawRulesConfigsClient.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * 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.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.types.RulesConfig; -import com.auth0.client.mgmt.types.SetRulesConfigRequestContent; -import com.auth0.client.mgmt.types.SetRulesConfigResponseContent; -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 RawRulesConfigsClient { - protected final ClientOptions clientOptions; - - public RawRulesConfigsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve rules config variable keys. - *
Note: For security, config variable values cannot be retrieved outside rule execution.
-     * 
- */ - public ManagementApiHttpResponse> list() { - return list(null); - } - - /** - * Retrieve rules config variable keys. - *
Note: For security, config variable values cannot be retrieved outside rule execution.
-     * 
- */ - public ManagementApiHttpResponse> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("rules-configs") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, new TypeReference>() {}), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Sets a rules config variable. - */ - public ManagementApiHttpResponse set( - String key, SetRulesConfigRequestContent request) { - return set(key, request, null); - } - - /** - * Sets a rules config variable. - */ - public ManagementApiHttpResponse set( - String key, SetRulesConfigRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("rules-configs") - .addPathSegment(key) - .build(); - 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) - .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); - } - 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, SetRulesConfigResponseContent.class), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a rules config variable identified by its key. - */ - public ManagementApiHttpResponse delete(String key) { - return delete(key, null); - } - - /** - * Delete a rules config variable identified by its key. - */ - public ManagementApiHttpResponse delete(String key, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("rules-configs") - .addPathSegment(key) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/RawSelfServiceProfilesClient.java b/src/main/java/com/auth0/client/mgmt/RawSelfServiceProfilesClient.java deleted file mode 100644 index 3e0b71886..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawSelfServiceProfilesClient.java +++ /dev/null @@ -1,422 +0,0 @@ -/** - * 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.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.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.CreateSelfServiceProfileRequestContent; -import com.auth0.client.mgmt.types.CreateSelfServiceProfileResponseContent; -import com.auth0.client.mgmt.types.GetSelfServiceProfileResponseContent; -import com.auth0.client.mgmt.types.ListSelfServiceProfilesPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListSelfServiceProfilesRequestParameters; -import com.auth0.client.mgmt.types.SelfServiceProfile; -import com.auth0.client.mgmt.types.UpdateSelfServiceProfileRequestContent; -import com.auth0.client.mgmt.types.UpdateSelfServiceProfileResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawSelfServiceProfilesClient { - protected final ClientOptions clientOptions; - - public RawSelfServiceProfilesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieves self-service profiles. - */ - public ManagementApiHttpResponse> list() { - return list(ListSelfServiceProfilesRequestParameters.builder().build()); - } - - /** - * Retrieves self-service profiles. - */ - public ManagementApiHttpResponse> list( - ListSelfServiceProfilesRequestParameters request) { - return list(request, null); - } - - /** - * Retrieves self-service profiles. - */ - public ManagementApiHttpResponse> list( - ListSelfServiceProfilesRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListSelfServiceProfilesPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListSelfServiceProfilesPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListSelfServiceProfilesRequestParameters nextRequest = - ListSelfServiceProfilesRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getSelfServiceProfiles().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, result, parsedResponse, () -> list(nextRequest, requestOptions) - .body()), - 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); - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Creates a self-service profile. - */ - public ManagementApiHttpResponse create( - CreateSelfServiceProfileRequestContent request) { - return create(request, null); - } - - /** - * Creates a self-service profile. - */ - public ManagementApiHttpResponse create( - CreateSelfServiceProfileRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles") - .build(); - 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) - .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); - } - 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, CreateSelfServiceProfileResponseContent.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); - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieves a self-service profile by Id. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieves a self-service profile by Id. - */ - public ManagementApiHttpResponse get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetSelfServiceProfileResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Deletes a self-service profile by Id. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Deletes a self-service profile by Id. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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); - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Updates a self-service profile. - */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateSelfServiceProfileRequestContent.builder().build()); - } - - /** - * Updates a self-service profile. - */ - public ManagementApiHttpResponse update( - String id, UpdateSelfServiceProfileRequestContent request) { - return update(id, request, null); - } - - /** - * Updates a self-service profile. - */ - public ManagementApiHttpResponse update( - String id, UpdateSelfServiceProfileRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateSelfServiceProfileResponseContent.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 (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 deleted file mode 100644 index 97bfdaf04..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawSessionsClient.java +++ /dev/null @@ -1,297 +0,0 @@ -/** - * 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.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.GetSessionResponseContent; -import com.auth0.client.mgmt.types.UpdateSessionRequestContent; -import com.auth0.client.mgmt.types.UpdateSessionResponseContent; -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 RawSessionsClient { - protected final ClientOptions clientOptions; - - public RawSessionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve session information. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve session information. - */ - public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("sessions") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetSessionResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a session by ID. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete a session by ID. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("sessions") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update session information. - */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateSessionRequestContent.builder().build()); - } - - /** - * Update session information. - */ - public ManagementApiHttpResponse update( - String id, UpdateSessionRequestContent request) { - return update(id, request, null); - } - - /** - * Update session information. - */ - public ManagementApiHttpResponse update( - String id, UpdateSessionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("sessions") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateSessionResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Revokes a session by ID and all associated refresh tokens. - */ - public ManagementApiHttpResponse revoke(String id) { - return revoke(id, null); - } - - /** - * Revokes a session by ID and all associated refresh tokens. - */ - public ManagementApiHttpResponse revoke(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("sessions") - .addPathSegment(id) - .addPathSegments("revoke") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 deleted file mode 100644 index e4e0df9bd..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawStatsClient.java +++ /dev/null @@ -1,165 +0,0 @@ -/** - * 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.ObjectMappers; -import com.auth0.client.mgmt.core.QueryStringMapper; -import com.auth0.client.mgmt.core.RequestOptions; -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.types.DailyStats; -import com.auth0.client.mgmt.types.GetDailyStatsRequestParameters; -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.Response; -import okhttp3.ResponseBody; - -public class RawStatsClient { - protected final ClientOptions clientOptions; - - public RawStatsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve the number of active users that logged in during the last 30 days. - */ - public ManagementApiHttpResponse getActiveUsersCount() { - return getActiveUsersCount(null); - } - - /** - * Retrieve the number of active users that logged in during the last 30 days. - */ - public ManagementApiHttpResponse getActiveUsersCount(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("stats/active-users") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, double.class), response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve the number of logins, signups and breached-password detections (subscription required) that occurred each day within a specified date range. - */ - public ManagementApiHttpResponse> getDaily() { - return getDaily(GetDailyStatsRequestParameters.builder().build()); - } - - /** - * Retrieve the number of logins, signups and breached-password detections (subscription required) that occurred each day within a specified date range. - */ - public ManagementApiHttpResponse> getDaily(GetDailyStatsRequestParameters request) { - return getDaily(request, null); - } - - /** - * Retrieve the number of logins, signups and breached-password detections (subscription required) that occurred each day within a specified date range. - */ - public ManagementApiHttpResponse> getDaily( - GetDailyStatsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("stats/daily"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - if (!request.getTo().isAbsent()) { - QueryStringMapper.addQueryParameter(httpUrl, "to", request.getTo().orElse(null), false); - } - 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); - } - 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 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/RawSupplementalSignalsClient.java b/src/main/java/com/auth0/client/mgmt/RawSupplementalSignalsClient.java deleted file mode 100644 index a3a24d23a..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawSupplementalSignalsClient.java +++ /dev/null @@ -1,166 +0,0 @@ -/** - * 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.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.GetSupplementalSignalsResponseContent; -import com.auth0.client.mgmt.types.PatchSupplementalSignalsResponseContent; -import com.auth0.client.mgmt.types.UpdateSupplementalSignalsRequestContent; -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 RawSupplementalSignalsClient { - protected final ClientOptions clientOptions; - - public RawSupplementalSignalsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Get the supplemental signals configuration for a tenant. - */ - public ManagementApiHttpResponse get() { - return get(null); - } - - /** - * Get the supplemental signals configuration for a tenant. - */ - public ManagementApiHttpResponse get(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("supplemental-signals") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetSupplementalSignalsResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update the supplemental signals configuration for a tenant. - */ - public ManagementApiHttpResponse patch( - UpdateSupplementalSignalsRequestContent request) { - return patch(request, null); - } - - /** - * Update the supplemental signals configuration for a tenant. - */ - public ManagementApiHttpResponse patch( - UpdateSupplementalSignalsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("supplemental-signals") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, PatchSupplementalSignalsResponseContent.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 (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 deleted file mode 100644 index 6befa0530..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawTicketsClient.java +++ /dev/null @@ -1,193 +0,0 @@ -/** - * 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.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.ChangePasswordTicketRequestContent; -import com.auth0.client.mgmt.types.ChangePasswordTicketResponseContent; -import com.auth0.client.mgmt.types.VerifyEmailTicketRequestContent; -import com.auth0.client.mgmt.types.VerifyEmailTicketResponseContent; -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 RawTicketsClient { - protected final ClientOptions clientOptions; - - public RawTicketsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Create an email verification ticket for a given user. An email verification ticket is a generated URL that the user can consume to verify their email address. - */ - public ManagementApiHttpResponse verifyEmail( - VerifyEmailTicketRequestContent request) { - return verifyEmail(request, null); - } - - /** - * Create an email verification ticket for a given user. An email verification ticket is a generated URL that the user can consume to verify their email address. - */ - public ManagementApiHttpResponse verifyEmail( - VerifyEmailTicketRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("tickets/email-verification") - .build(); - 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) - .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); - } - 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, VerifyEmailTicketResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a password change ticket for a given user. A password change ticket is a generated URL that the user can consume to start a reset password flow. - *

Note: This endpoint does not verify the given user’s identity. If you call this endpoint within your application, you must design your application to verify the user’s identity.

- */ - public ManagementApiHttpResponse changePassword() { - return changePassword(ChangePasswordTicketRequestContent.builder().build()); - } - - /** - * Create a password change ticket for a given user. A password change ticket is a generated URL that the user can consume to start a reset password flow. - *

Note: This endpoint does not verify the given user’s identity. If you call this endpoint within your application, you must design your application to verify the user’s identity.

- */ - public ManagementApiHttpResponse changePassword( - ChangePasswordTicketRequestContent request) { - return changePassword(request, null); - } - - /** - * Create a password change ticket for a given user. A password change ticket is a generated URL that the user can consume to start a reset password flow. - *

Note: This endpoint does not verify the given user’s identity. If you call this endpoint within your application, you must design your application to verify the user’s identity.

- */ - public ManagementApiHttpResponse changePassword( - ChangePasswordTicketRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("tickets/password-change") - .build(); - 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) - .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); - } - 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, ChangePasswordTicketResponseContent.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 (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 deleted file mode 100644 index 0c5c0a709..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawTokenExchangeProfilesClient.java +++ /dev/null @@ -1,431 +0,0 @@ -/** - * 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.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.CreateTokenExchangeProfileRequestContent; -import com.auth0.client.mgmt.types.CreateTokenExchangeProfileResponseContent; -import com.auth0.client.mgmt.types.GetTokenExchangeProfileResponseContent; -import com.auth0.client.mgmt.types.ListTokenExchangeProfileResponseContent; -import com.auth0.client.mgmt.types.TokenExchangeProfileResponseContent; -import com.auth0.client.mgmt.types.TokenExchangeProfilesListRequest; -import com.auth0.client.mgmt.types.UpdateTokenExchangeProfileRequestContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawTokenExchangeProfilesClient { - protected final ClientOptions clientOptions; - - public RawTokenExchangeProfilesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a list of all Token Exchange Profiles available in your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- *

This endpoint supports Checkpoint pagination. To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public ManagementApiHttpResponse> list() { - return list(TokenExchangeProfilesListRequest.builder().build()); - } - - /** - * Retrieve a list of all Token Exchange Profiles available in your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- *

This endpoint supports Checkpoint pagination. To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public ManagementApiHttpResponse> list( - TokenExchangeProfilesListRequest request) { - return list(request, null); - } - - /** - * Retrieve a list of all Token Exchange Profiles available in your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- *

This endpoint supports Checkpoint pagination. To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public ManagementApiHttpResponse> list( - TokenExchangeProfilesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("token-exchange-profiles"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListTokenExchangeProfileResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListTokenExchangeProfileResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - TokenExchangeProfilesListRequest nextRequest = TokenExchangeProfilesListRequest.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getTokenExchangeProfiles().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> list( - nextRequest, requestOptions) - .body()), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a new Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public ManagementApiHttpResponse create( - CreateTokenExchangeProfileRequestContent request) { - return create(request, null); - } - - /** - * Create a new Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public ManagementApiHttpResponse create( - CreateTokenExchangeProfileRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("token-exchange-profiles") - .build(); - 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) - .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); - } - 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, CreateTokenExchangeProfileResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details about a single Token Exchange Profile specified by ID. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve details about a single Token Exchange Profile specified by ID. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public ManagementApiHttpResponse get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("token-exchange-profiles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetTokenExchangeProfileResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("token-exchange-profiles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateTokenExchangeProfileRequestContent.builder().build()); - } - - /** - * Update a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public ManagementApiHttpResponse update(String id, UpdateTokenExchangeProfileRequestContent request) { - return update(id, request, null); - } - - /** - * Update a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public ManagementApiHttpResponse update( - String id, UpdateTokenExchangeProfileRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("token-exchange-profiles") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - 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 (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 deleted file mode 100644 index 5af63d14d..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawUserAttributeProfilesClient.java +++ /dev/null @@ -1,523 +0,0 @@ -/** - * 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.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.CreateUserAttributeProfileRequestContent; -import com.auth0.client.mgmt.types.CreateUserAttributeProfileResponseContent; -import com.auth0.client.mgmt.types.GetUserAttributeProfileResponseContent; -import com.auth0.client.mgmt.types.GetUserAttributeProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.ListUserAttributeProfileRequestParameters; -import com.auth0.client.mgmt.types.ListUserAttributeProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.ListUserAttributeProfilesPaginatedResponseContent; -import com.auth0.client.mgmt.types.UpdateUserAttributeProfileRequestContent; -import com.auth0.client.mgmt.types.UpdateUserAttributeProfileResponseContent; -import com.auth0.client.mgmt.types.UserAttributeProfile; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawUserAttributeProfilesClient { - protected final ClientOptions clientOptions; - - public RawUserAttributeProfilesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a list of User Attribute Profiles. This endpoint supports Checkpoint pagination. - */ - public ManagementApiHttpResponse> list() { - return list(ListUserAttributeProfileRequestParameters.builder().build()); - } - - /** - * Retrieve a list of User Attribute Profiles. This endpoint supports Checkpoint pagination. - */ - public ManagementApiHttpResponse> list( - ListUserAttributeProfileRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve a list of User Attribute Profiles. This endpoint supports Checkpoint pagination. - */ - public ManagementApiHttpResponse> list( - ListUserAttributeProfileRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-attribute-profiles"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListUserAttributeProfilesPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserAttributeProfilesPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListUserAttributeProfileRequestParameters nextRequest = - ListUserAttributeProfileRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getUserAttributeProfiles().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> list( - nextRequest, requestOptions) - .body()), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details about a single User Attribute Profile specified by ID. - */ - public ManagementApiHttpResponse create( - CreateUserAttributeProfileRequestContent request) { - return create(request, null); - } - - /** - * Retrieve details about a single User Attribute Profile specified by ID. - */ - public ManagementApiHttpResponse create( - CreateUserAttributeProfileRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-attribute-profiles") - .build(); - 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) - .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); - } - 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, CreateUserAttributeProfileResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve a list of User Attribute Profile Templates. - */ - public ManagementApiHttpResponse listTemplates() { - return listTemplates(null); - } - - /** - * Retrieve a list of User Attribute Profile Templates. - */ - public ManagementApiHttpResponse listTemplates( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-attribute-profiles/templates") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserAttributeProfileTemplateResponseContent.class), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve a User Attribute Profile Template. - */ - public ManagementApiHttpResponse getTemplate(String id) { - return getTemplate(id, null); - } - - /** - * Retrieve a User Attribute Profile Template. - */ - public ManagementApiHttpResponse getTemplate( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-attribute-profiles/templates") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetUserAttributeProfileTemplateResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details about a single User Attribute Profile specified by ID. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve details about a single User Attribute Profile specified by ID. - */ - public ManagementApiHttpResponse get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-attribute-profiles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetUserAttributeProfileResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a single User Attribute Profile specified by ID. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete a single User Attribute Profile specified by ID. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-attribute-profiles") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update the details of a specific User attribute profile, such as name, user_id and user_attributes. - */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateUserAttributeProfileRequestContent.builder().build()); - } - - /** - * Update the details of a specific User attribute profile, such as name, user_id and user_attributes. - */ - public ManagementApiHttpResponse update( - String id, UpdateUserAttributeProfileRequestContent request) { - return update(id, request, null); - } - - /** - * Update the details of a specific User attribute profile, such as name, user_id and user_attributes. - */ - public ManagementApiHttpResponse update( - String id, UpdateUserAttributeProfileRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-attribute-profiles") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateUserAttributeProfileResponseContent.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 (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 deleted file mode 100644 index eb1e604e1..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawUserBlocksClient.java +++ /dev/null @@ -1,308 +0,0 @@ -/** - * 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.ObjectMappers; -import com.auth0.client.mgmt.core.QueryStringMapper; -import com.auth0.client.mgmt.core.RequestOptions; -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.DeleteUserBlocksByIdentifierRequestParameters; -import com.auth0.client.mgmt.types.ListUserBlocksByIdentifierRequestParameters; -import com.auth0.client.mgmt.types.ListUserBlocksByIdentifierResponseContent; -import com.auth0.client.mgmt.types.ListUserBlocksRequestParameters; -import com.auth0.client.mgmt.types.ListUserBlocksResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawUserBlocksClient { - protected final ClientOptions clientOptions; - - public RawUserBlocksClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for a user with the given identifier (username, phone number, or email). - */ - public ManagementApiHttpResponse listByIdentifier( - ListUserBlocksByIdentifierRequestParameters request) { - return listByIdentifier(request, null); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for a user with the given identifier (username, phone number, or email). - */ - public ManagementApiHttpResponse listByIdentifier( - ListUserBlocksByIdentifierRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-blocks"); - QueryStringMapper.addQueryParameter(httpUrl, "identifier", request.getIdentifier(), false); - if (!request.getConsiderBruteForceEnablement().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, - "consider_brute_force_enablement", - request.getConsiderBruteForceEnablement().orElse(null), - false); - } - 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); - } - 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, ListUserBlocksByIdentifierResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Remove all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given identifier (username, phone number, or email). - *

Note: This endpoint does not unblock users that were <a href="https://auth0.com/docs/user-profile#block-and-unblock-a-user">blocked by a tenant administrator</a>.

- */ - public ManagementApiHttpResponse deleteByIdentifier(DeleteUserBlocksByIdentifierRequestParameters request) { - return deleteByIdentifier(request, null); - } - - /** - * Remove all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given identifier (username, phone number, or email). - *

Note: This endpoint does not unblock users that were <a href="https://auth0.com/docs/user-profile#block-and-unblock-a-user">blocked by a tenant administrator</a>.

- */ - public ManagementApiHttpResponse deleteByIdentifier( - DeleteUserBlocksByIdentifierRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-blocks"); - QueryStringMapper.addQueryParameter(httpUrl, "identifier", request.getIdentifier(), false); - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("DELETE", 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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - */ - public ManagementApiHttpResponse list(String id) { - return list(id, ListUserBlocksRequestParameters.builder().build()); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - */ - public ManagementApiHttpResponse list( - String id, ListUserBlocksRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - */ - public ManagementApiHttpResponse list( - String id, ListUserBlocksRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-blocks") - .addPathSegment(id); - if (!request.getConsiderBruteForceEnablement().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, - "consider_brute_force_enablement", - request.getConsiderBruteForceEnablement().orElse(null), - false); - } - 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); - } - 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, ListUserBlocksResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Remove all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - *

Note: This endpoint does not unblock users that were <a href="https://auth0.com/docs/user-profile#block-and-unblock-a-user">blocked by a tenant administrator</a>.

- */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Remove all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - *

Note: This endpoint does not unblock users that were <a href="https://auth0.com/docs/user-profile#block-and-unblock-a-user">blocked by a tenant administrator</a>.

- */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("user-blocks") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 deleted file mode 100644 index d42d2ad39..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawUserGrantsClient.java +++ /dev/null @@ -1,239 +0,0 @@ -/** - * 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.ObjectMappers; -import com.auth0.client.mgmt.core.QueryStringMapper; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.core.SyncPagingIterable; -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.types.DeleteUserGrantByUserIdRequestParameters; -import com.auth0.client.mgmt.types.ListUserGrantsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListUserGrantsRequestParameters; -import com.auth0.client.mgmt.types.UserGrant; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawUserGrantsClient { - protected final ClientOptions clientOptions; - - public RawUserGrantsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve the <a href="https://auth0.com/docs/api-auth/which-oauth-flow-to-use">grants</a> associated with your account. - */ - public ManagementApiHttpResponse> list() { - return list(ListUserGrantsRequestParameters.builder().build()); - } - - /** - * Retrieve the <a href="https://auth0.com/docs/api-auth/which-oauth-flow-to-use">grants</a> associated with your account. - */ - public ManagementApiHttpResponse> list(ListUserGrantsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve the <a href="https://auth0.com/docs/api-auth/which-oauth-flow-to-use">grants</a> associated with your account. - */ - public ManagementApiHttpResponse> list( - ListUserGrantsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("grants"); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getUserId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "user_id", request.getUserId().orElse(null), false); - } - if (!request.getClientId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "client_id", request.getClientId().orElse(null), false); - } - if (!request.getAudience().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "audience", request.getAudience().orElse(null), false); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListUserGrantsOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserGrantsOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListUserGrantsRequestParameters nextRequest = ListUserGrantsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getGrants().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, result, parsedResponse, () -> list(nextRequest, requestOptions) - .body()), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a grant associated with your account. - */ - public ManagementApiHttpResponse deleteByUserId(DeleteUserGrantByUserIdRequestParameters request) { - return deleteByUserId(request, null); - } - - /** - * Delete a grant associated with your account. - */ - public ManagementApiHttpResponse deleteByUserId( - DeleteUserGrantByUserIdRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("grants"); - QueryStringMapper.addQueryParameter(httpUrl, "user_id", request.getUserId(), false); - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("DELETE", 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); - } - 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 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a grant associated with your account. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete a grant associated with your account. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("grants") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/RawUsersClient.java b/src/main/java/com/auth0/client/mgmt/RawUsersClient.java deleted file mode 100644 index 02f76f6c1..000000000 --- a/src/main/java/com/auth0/client/mgmt/RawUsersClient.java +++ /dev/null @@ -1,878 +0,0 @@ -/** - * 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.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.ServiceUnavailableError; -import com.auth0.client.mgmt.errors.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -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.ListUsersByEmailRequestParameters; -import com.auth0.client.mgmt.types.ListUsersOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListUsersRequestParameters; -import com.auth0.client.mgmt.types.RegenerateUsersRecoveryCodeResponseContent; -import com.auth0.client.mgmt.types.RevokeUserAccessRequestContent; -import com.auth0.client.mgmt.types.UpdateUserRequestContent; -import com.auth0.client.mgmt.types.UpdateUserResponseContent; -import com.auth0.client.mgmt.types.UserResponseSchema; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import java.io.IOException; -import java.util.Collections; -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 RawUsersClient { - protected final ClientOptions clientOptions; - - public RawUsersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of users. It is possible to: - *
    - *
  • Specify a 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
  • - *
- *

<!-- only v3 is available -->

- *

The <code>q</code> query parameter can be used to get users that match the specified criteria <a href="https://auth0.com/docs/users/search/v3/query-syntax">using query string syntax.</a>

- *

<a href="https://auth0.com/docs/users/search/v3">Learn more about searching for users.</a>

- *

Read about <a href="https://auth0.com/docs/users/search/best-practices">best practices</a> 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 <a href="https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports">export job</a>, or the <a href="https://auth0.com/docs/extensions/user-import-export">User Import / Export</a> extension.

- */ - public ManagementApiHttpResponse> list() { - return list(ListUsersRequestParameters.builder().build()); - } - - /** - * Retrieve details of users. It is possible to: - *
    - *
  • Specify a 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
  • - *
- *

<!-- only v3 is available -->

- *

The <code>q</code> query parameter can be used to get users that match the specified criteria <a href="https://auth0.com/docs/users/search/v3/query-syntax">using query string syntax.</a>

- *

<a href="https://auth0.com/docs/users/search/v3">Learn more about searching for users.</a>

- *

Read about <a href="https://auth0.com/docs/users/search/best-practices">best practices</a> 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 <a href="https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports">export job</a>, or the <a href="https://auth0.com/docs/extensions/user-import-export">User Import / Export</a> extension.

- */ - public ManagementApiHttpResponse> list(ListUsersRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve details of users. It is possible to: - *
    - *
  • Specify a 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
  • - *
- *

<!-- only v3 is available -->

- *

The <code>q</code> query parameter can be used to get users that match the specified criteria <a href="https://auth0.com/docs/users/search/v3/query-syntax">using query string syntax.</a>

- *

<a href="https://auth0.com/docs/users/search/v3">Learn more about searching for users.</a>

- *

Read about <a href="https://auth0.com/docs/users/search/best-practices">best practices</a> 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 <a href="https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports">export job</a>, or the <a href="https://auth0.com/docs/extensions/user-import-export">User Import / Export</a> extension.

- */ - public ManagementApiHttpResponse> list( - ListUsersRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getSort().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sort", request.getSort().orElse(null), false); - } - if (!request.getConnection().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "connection", request.getConnection().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); - } - if (!request.getQ().isAbsent()) { - QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().orElse(null), false); - } - if (!request.getSearchEngine().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "search_engine", request.getSearchEngine().orElse(null), false); - } - if (!request.getPrimaryOrder().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "primary_order", request.getPrimaryOrder().orElse(null), false); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListUsersOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUsersOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListUsersRequestParameters nextRequest = ListUsersRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getUsers().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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); - case 503: - throw new ServiceUnavailableError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a new user for a given <a href="https://auth0.com/docs/connections/database">database</a> or <a href="https://auth0.com/docs/connections/passwordless">passwordless</a> connection. - *

Note: <code>connection</code> is required but other parameters such as <code>email</code> and <code>password</code> are dependent upon the type of connection.

- */ - public ManagementApiHttpResponse create(CreateUserRequestContent request) { - return create(request, null); - } - - /** - * Create a new user for a given <a href="https://auth0.com/docs/connections/database">database</a> or <a href="https://auth0.com/docs/connections/passwordless">passwordless</a> connection. - *

Note: <code>connection</code> is required but other parameters such as <code>email</code> and <code>password</code> are dependent upon the type of connection.

- */ - public ManagementApiHttpResponse create( - CreateUserRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .build(); - 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) - .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); - } - 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, CreateUserResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Find users by email. If Auth0 is the identity provider (idP), the email address associated with a user is saved in lower case, regardless of how you initially provided it. - *

For example, if you register a user as JohnSmith@example.com, Auth0 saves the user's email as johnsmith@example.com.

- *

Therefore, when using this endpoint, make sure that you are searching for users via email addresses using the correct case.

- */ - public ManagementApiHttpResponse> listUsersByEmail( - ListUsersByEmailRequestParameters request) { - return listUsersByEmail(request, null); - } - - /** - * Find users by email. If Auth0 is the identity provider (idP), the email address associated with a user is saved in lower case, regardless of how you initially provided it. - *

For example, if you register a user as JohnSmith@example.com, Auth0 saves the user's email as johnsmith@example.com.

- *

Therefore, when using this endpoint, make sure that you are searching for users via email addresses using the correct case.

- */ - public ManagementApiHttpResponse> listUsersByEmail( - ListUsersByEmailRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users-by-email"); - 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, "email", request.getEmail(), false); - 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); - } - 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 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see <a href="https://auth0.com/docs/manage-users/user-search/retrieve-users-with-get-users-endpoint">Retrieve Users with the Get Users Endpoint</a>. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, GetUserRequestParameters.builder().build()); - } - - /** - * Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see <a href="https://auth0.com/docs/manage-users/user-search/retrieve-users-with-get-users-endpoint">Retrieve Users with the Get Users Endpoint</a>. - */ - public ManagementApiHttpResponse get(String id, GetUserRequestParameters request) { - return get(id, request, null); - } - - /** - * Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see <a href="https://auth0.com/docs/manage-users/user-search/retrieve-users-with-get-users-endpoint">Retrieve Users with the Get Users Endpoint</a>. - */ - public ManagementApiHttpResponse get( - String id, GetUserRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id); - 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); - } - 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); - } - 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, GetUserResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a user by user ID. This action cannot be undone. For Auth0 Dashboard instructions, see <a href="https://auth0.com/docs/manage-users/user-accounts/delete-users">Delete Users</a>. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete a user by user ID. This action cannot be undone. For Auth0 Dashboard instructions, see <a href="https://auth0.com/docs/manage-users/user-accounts/delete-users">Delete Users</a>. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update a user. - *

These are the attributes that can be updated at the root level:

- *

<ul> - * <li>app_metadata</li> - * <li>blocked</li> - * <li>email</li> - * <li>email_verified</li> - * <li>family_name</li> - * <li>given_name</li> - * <li>name</li> - * <li>nickname</li> - * <li>password</li> - * <li>phone_number</li> - * <li>phone_verified</li> - * <li>picture</li> - * <li>username</li> - * <li>user_metadata</li> - * <li>verify_email</li> - * </ul>

- *

Some considerations:

- *

<ul> - * <li>The properties of the new object will replace the old ones.</li> - * <li>The metadata fields are an exception to this rule (<code>user_metadata</code> and <code>app_metadata</code>). These properties are merged instead of being replaced but be careful, the merge only occurs on the first level.</li> - * <li>If you are updating <code>email</code>, <code>email_verified</code>, <code>phone_number</code>, <code>phone_verified</code>, <code>username</code> or <code>password</code> of a secondary identity, you need to specify the <code>connection</code> property too.</li> - * <li>If you are updating <code>email</code> or <code>phone_number</code> you can specify, optionally, the <code>client_id</code> property.</li> - * <li>Updating <code>email_verified</code> is not supported for enterprise and passwordless sms connections.</li> - * <li>Updating the <code>blocked</code> to <code>false</code> does not affect the user's blocked state from an excessive amount of incorrectly provided credentials. Use the "Unblock a user" endpoint from the "User Blocks" API to change the user's state.</li> - * <li>Supported attributes can be unset by supplying <code>null</code> as the value.</li> - * </ul>

- *

<h5>Updating a field (non-metadata property)</h5> - * To mark the email address of a user as verified, the body to send should be: - * <pre><code>{ "email_verified": true }</code></pre>

- *

<h5>Updating a user metadata root property</h5>Let's assume that our test user has the following <code>user_metadata</code>: - * <pre><code>{ "user_metadata" : { "profileCode": 1479 } }</code></pre>

- *

To add the field <code>addresses</code> the body to send should be:

- *

<pre><code>{ "user_metadata" : { "addresses": {"work_address": "100 Industrial Way"} }}</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { "work_address": "100 Industrial Way" } - * } - * }</code></pre>

- *

<h5>Updating an inner user metadata property</h5>If there's existing user metadata to which we want to add <code>"home_address": "742 Evergreen Terrace"</code> (using the <code>addresses</code> property) we should send the whole <code>addresses</code> object. Since this is a first-level object, the object will be merged in, but its own properties will not be. The body to send should be: - * <pre><code>{ - * "user_metadata": { - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:

- *

<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateUserRequestContent.builder().build()); - } - - /** - * Update a user. - *

These are the attributes that can be updated at the root level:

- *

<ul> - * <li>app_metadata</li> - * <li>blocked</li> - * <li>email</li> - * <li>email_verified</li> - * <li>family_name</li> - * <li>given_name</li> - * <li>name</li> - * <li>nickname</li> - * <li>password</li> - * <li>phone_number</li> - * <li>phone_verified</li> - * <li>picture</li> - * <li>username</li> - * <li>user_metadata</li> - * <li>verify_email</li> - * </ul>

- *

Some considerations:

- *

<ul> - * <li>The properties of the new object will replace the old ones.</li> - * <li>The metadata fields are an exception to this rule (<code>user_metadata</code> and <code>app_metadata</code>). These properties are merged instead of being replaced but be careful, the merge only occurs on the first level.</li> - * <li>If you are updating <code>email</code>, <code>email_verified</code>, <code>phone_number</code>, <code>phone_verified</code>, <code>username</code> or <code>password</code> of a secondary identity, you need to specify the <code>connection</code> property too.</li> - * <li>If you are updating <code>email</code> or <code>phone_number</code> you can specify, optionally, the <code>client_id</code> property.</li> - * <li>Updating <code>email_verified</code> is not supported for enterprise and passwordless sms connections.</li> - * <li>Updating the <code>blocked</code> to <code>false</code> does not affect the user's blocked state from an excessive amount of incorrectly provided credentials. Use the "Unblock a user" endpoint from the "User Blocks" API to change the user's state.</li> - * <li>Supported attributes can be unset by supplying <code>null</code> as the value.</li> - * </ul>

- *

<h5>Updating a field (non-metadata property)</h5> - * To mark the email address of a user as verified, the body to send should be: - * <pre><code>{ "email_verified": true }</code></pre>

- *

<h5>Updating a user metadata root property</h5>Let's assume that our test user has the following <code>user_metadata</code>: - * <pre><code>{ "user_metadata" : { "profileCode": 1479 } }</code></pre>

- *

To add the field <code>addresses</code> the body to send should be:

- *

<pre><code>{ "user_metadata" : { "addresses": {"work_address": "100 Industrial Way"} }}</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { "work_address": "100 Industrial Way" } - * } - * }</code></pre>

- *

<h5>Updating an inner user metadata property</h5>If there's existing user metadata to which we want to add <code>"home_address": "742 Evergreen Terrace"</code> (using the <code>addresses</code> property) we should send the whole <code>addresses</code> object. Since this is a first-level object, the object will be merged in, but its own properties will not be. The body to send should be: - * <pre><code>{ - * "user_metadata": { - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:

- *

<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- */ - public ManagementApiHttpResponse update(String id, UpdateUserRequestContent request) { - return update(id, request, null); - } - - /** - * Update a user. - *

These are the attributes that can be updated at the root level:

- *

<ul> - * <li>app_metadata</li> - * <li>blocked</li> - * <li>email</li> - * <li>email_verified</li> - * <li>family_name</li> - * <li>given_name</li> - * <li>name</li> - * <li>nickname</li> - * <li>password</li> - * <li>phone_number</li> - * <li>phone_verified</li> - * <li>picture</li> - * <li>username</li> - * <li>user_metadata</li> - * <li>verify_email</li> - * </ul>

- *

Some considerations:

- *

<ul> - * <li>The properties of the new object will replace the old ones.</li> - * <li>The metadata fields are an exception to this rule (<code>user_metadata</code> and <code>app_metadata</code>). These properties are merged instead of being replaced but be careful, the merge only occurs on the first level.</li> - * <li>If you are updating <code>email</code>, <code>email_verified</code>, <code>phone_number</code>, <code>phone_verified</code>, <code>username</code> or <code>password</code> of a secondary identity, you need to specify the <code>connection</code> property too.</li> - * <li>If you are updating <code>email</code> or <code>phone_number</code> you can specify, optionally, the <code>client_id</code> property.</li> - * <li>Updating <code>email_verified</code> is not supported for enterprise and passwordless sms connections.</li> - * <li>Updating the <code>blocked</code> to <code>false</code> does not affect the user's blocked state from an excessive amount of incorrectly provided credentials. Use the "Unblock a user" endpoint from the "User Blocks" API to change the user's state.</li> - * <li>Supported attributes can be unset by supplying <code>null</code> as the value.</li> - * </ul>

- *

<h5>Updating a field (non-metadata property)</h5> - * To mark the email address of a user as verified, the body to send should be: - * <pre><code>{ "email_verified": true }</code></pre>

- *

<h5>Updating a user metadata root property</h5>Let's assume that our test user has the following <code>user_metadata</code>: - * <pre><code>{ "user_metadata" : { "profileCode": 1479 } }</code></pre>

- *

To add the field <code>addresses</code> the body to send should be:

- *

<pre><code>{ "user_metadata" : { "addresses": {"work_address": "100 Industrial Way"} }}</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { "work_address": "100 Industrial Way" } - * } - * }</code></pre>

- *

<h5>Updating an inner user metadata property</h5>If there's existing user metadata to which we want to add <code>"home_address": "742 Evergreen Terrace"</code> (using the <code>addresses</code> property) we should send the whole <code>addresses</code> object. Since this is a first-level object, the object will be merged in, but its own properties will not be. The body to send should be: - * <pre><code>{ - * "user_metadata": { - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:

- *

<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- */ - public ManagementApiHttpResponse update( - String id, UpdateUserRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateUserResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Remove an existing multi-factor authentication (MFA) <a href="https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa">recovery code</a> 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. - */ - public ManagementApiHttpResponse regenerateRecoveryCode(String id) { - return regenerateRecoveryCode(id, null); - } - - /** - * Remove an existing multi-factor authentication (MFA) <a href="https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa">recovery code</a> 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. - */ - public ManagementApiHttpResponse regenerateRecoveryCode( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("recovery-code-regeneration") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, RegenerateUsersRecoveryCodeResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Revokes selected resources related to a user (sessions, refresh tokens, ...). - */ - public ManagementApiHttpResponse revokeAccess(String id) { - return revokeAccess(id, RevokeUserAccessRequestContent.builder().build()); - } - - /** - * Revokes selected resources related to a user (sessions, refresh tokens, ...). - */ - public ManagementApiHttpResponse revokeAccess(String id, RevokeUserAccessRequestContent request) { - return revokeAccess(id, request, null); - } - - /** - * Revokes selected resources related to a user (sessions, refresh tokens, ...). - */ - public ManagementApiHttpResponse revokeAccess( - String id, RevokeUserAccessRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("revoke-access") - .build(); - 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) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/RefreshTokensClient.java b/src/main/java/com/auth0/client/mgmt/RefreshTokensClient.java deleted file mode 100644 index e8a17ba7c..000000000 --- a/src/main/java/com/auth0/client/mgmt/RefreshTokensClient.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * 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.GetRefreshTokenResponseContent; -import com.auth0.client.mgmt.types.UpdateRefreshTokenRequestContent; -import com.auth0.client.mgmt.types.UpdateRefreshTokenResponseContent; - -public class RefreshTokensClient { - protected final ClientOptions clientOptions; - - private final RawRefreshTokensClient rawClient; - - public RefreshTokensClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawRefreshTokensClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawRefreshTokensClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve refresh token information. - */ - public GetRefreshTokenResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve refresh token information. - */ - public GetRefreshTokenResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Delete a refresh token by its ID. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete a refresh token by its ID. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update a refresh token by its ID. - */ - public UpdateRefreshTokenResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update a refresh token by its ID. - */ - public UpdateRefreshTokenResponseContent update(String id, UpdateRefreshTokenRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update a refresh token by its ID. - */ - public UpdateRefreshTokenResponseContent update( - String id, UpdateRefreshTokenRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/ResourceServersClient.java b/src/main/java/com/auth0/client/mgmt/ResourceServersClient.java deleted file mode 100644 index 7aad20870..000000000 --- a/src/main/java/com/auth0/client/mgmt/ResourceServersClient.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * 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.CreateResourceServerRequestContent; -import com.auth0.client.mgmt.types.CreateResourceServerResponseContent; -import com.auth0.client.mgmt.types.GetResourceServerRequestParameters; -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.UpdateResourceServerRequestContent; -import com.auth0.client.mgmt.types.UpdateResourceServerResponseContent; - -public class ResourceServersClient { - protected final ClientOptions clientOptions; - - private final RawResourceServersClient rawClient; - - public ResourceServersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawResourceServersClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawResourceServersClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of all APIs associated with your tenant. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve details of all APIs associated with your tenant. - */ - public SyncPagingIterable list(ListResourceServerRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve details of all APIs associated with your tenant. - */ - public SyncPagingIterable list( - ListResourceServerRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create a new API associated with your tenant. Note that all new APIs must be registered with Auth0. For more information, read <a href="https://www.auth0.com/docs/get-started/apis"> APIs</a>. - */ - public CreateResourceServerResponseContent create(CreateResourceServerRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create a new API associated with your tenant. Note that all new APIs must be registered with Auth0. For more information, read <a href="https://www.auth0.com/docs/get-started/apis"> APIs</a>. - */ - public CreateResourceServerResponseContent create( - CreateResourceServerRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve <a href="https://auth0.com/docs/apis">API</a> details with the given ID. - */ - public GetResourceServerResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve <a href="https://auth0.com/docs/apis">API</a> details with the given ID. - */ - public GetResourceServerResponseContent get(String id, GetResourceServerRequestParameters request) { - return this.rawClient.get(id, request).body(); - } - - /** - * Retrieve <a href="https://auth0.com/docs/apis">API</a> details with the given ID. - */ - public GetResourceServerResponseContent get( - String id, GetResourceServerRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).body(); - } - - /** - * Delete an existing API by ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete an existing API by ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Change an existing API setting by resource server ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public UpdateResourceServerResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Change an existing API setting by resource server ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public UpdateResourceServerResponseContent update(String id, UpdateResourceServerRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Change an existing API setting by resource server ID. For more information, read <a href="https://www.auth0.com/docs/get-started/apis/api-settings">API Settings</a>. - */ - public UpdateResourceServerResponseContent update( - String id, UpdateResourceServerRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/RolesClient.java b/src/main/java/com/auth0/client/mgmt/RolesClient.java deleted file mode 100644 index 09f7a1a83..000000000 --- a/src/main/java/com/auth0/client/mgmt/RolesClient.java +++ /dev/null @@ -1,141 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -import com.auth0.client.mgmt.roles.PermissionsClient; -import com.auth0.client.mgmt.roles.UsersClient; -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.UpdateRoleRequestContent; -import com.auth0.client.mgmt.types.UpdateRoleResponseContent; -import java.util.function.Supplier; - -public class RolesClient { - protected final ClientOptions clientOptions; - - private final RawRolesClient rawClient; - - protected final Supplier permissionsClient; - - protected final Supplier usersClient; - - public RolesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawRolesClient(clientOptions); - this.permissionsClient = Suppliers.memoize(() -> new PermissionsClient(clientOptions)); - this.usersClient = Suppliers.memoize(() -> new UsersClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawRolesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve detailed list of user roles created in your tenant. - *

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

- */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve detailed list of user roles created in your tenant. - *

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

- */ - public SyncPagingIterable list(ListRolesRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve detailed list of user roles created in your tenant. - *

<b>Note</b>: 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) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create a user role for <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles are not associated with any permissions by default. To assign existing permissions to your role, review Associate Permissions with a Role. To create new permissions, review Add API Permissions.

- */ - public CreateRoleResponseContent create(CreateRoleRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create a user role for <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles are not associated with any permissions by default. To assign existing permissions to your role, review Associate Permissions with a Role. To create new permissions, review Add API Permissions.

- */ - public CreateRoleResponseContent create(CreateRoleRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve details about a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public GetRoleResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve details about a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public GetRoleResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Delete a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> from your tenant. Once deleted, it is removed from any user who was previously assigned that role. This action cannot be undone. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> from your tenant. Once deleted, it is removed from any user who was previously assigned that role. This action cannot be undone. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Modify the details of a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public UpdateRoleResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Modify the details of a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public UpdateRoleResponseContent update(String id, UpdateRoleRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Modify the details of a specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">user role</a> specified by ID. - */ - public UpdateRoleResponseContent update( - String id, UpdateRoleRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - public PermissionsClient permissions() { - return this.permissionsClient.get(); - } - - public UsersClient users() { - return this.usersClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/RulesClient.java b/src/main/java/com/auth0/client/mgmt/RulesClient.java deleted file mode 100644 index 9e9c9af7f..000000000 --- a/src/main/java/com/auth0/client/mgmt/RulesClient.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * 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.CreateRuleRequestContent; -import com.auth0.client.mgmt.types.CreateRuleResponseContent; -import com.auth0.client.mgmt.types.GetRuleRequestParameters; -import com.auth0.client.mgmt.types.GetRuleResponseContent; -import com.auth0.client.mgmt.types.ListRulesRequestParameters; -import com.auth0.client.mgmt.types.Rule; -import com.auth0.client.mgmt.types.UpdateRuleRequestContent; -import com.auth0.client.mgmt.types.UpdateRuleResponseContent; - -public class RulesClient { - protected final ClientOptions clientOptions; - - private final RawRulesClient rawClient; - - public RulesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawRulesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawRulesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a filtered list of <a href="https://auth0.com/docs/rules">rules</a>. Accepts a list of fields to include or exclude. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve a filtered list of <a href="https://auth0.com/docs/rules">rules</a>. Accepts a list of fields to include or exclude. - */ - public SyncPagingIterable list(ListRulesRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve a filtered list of <a href="https://auth0.com/docs/rules">rules</a>. Accepts a list of fields to include or exclude. - */ - public SyncPagingIterable list(ListRulesRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create a <a href="https://auth0.com/docs/rules#create-a-new-rule-using-the-management-api">new rule</a>. - *

Note: Changing a rule's stage of execution from the default <code>login_success</code> can change the rule's function signature to have user omitted.

- */ - public CreateRuleResponseContent create(CreateRuleRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create a <a href="https://auth0.com/docs/rules#create-a-new-rule-using-the-management-api">new rule</a>. - *

Note: Changing a rule's stage of execution from the default <code>login_success</code> can change the rule's function signature to have user omitted.

- */ - public CreateRuleResponseContent create(CreateRuleRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve <a href="https://auth0.com/docs/rules">rule</a> details. Accepts a list of fields to include or exclude in the result. - */ - public GetRuleResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve <a href="https://auth0.com/docs/rules">rule</a> details. Accepts a list of fields to include or exclude in the result. - */ - public GetRuleResponseContent get(String id, GetRuleRequestParameters request) { - return this.rawClient.get(id, request).body(); - } - - /** - * Retrieve <a href="https://auth0.com/docs/rules">rule</a> details. Accepts a list of fields to include or exclude in the result. - */ - public GetRuleResponseContent get(String id, GetRuleRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).body(); - } - - /** - * Delete a rule. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete a rule. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update an existing rule. - */ - public UpdateRuleResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update an existing rule. - */ - public UpdateRuleResponseContent update(String id, UpdateRuleRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update an existing rule. - */ - public UpdateRuleResponseContent update( - String id, UpdateRuleRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/RulesConfigsClient.java b/src/main/java/com/auth0/client/mgmt/RulesConfigsClient.java deleted file mode 100644 index dfc8a3186..000000000 --- a/src/main/java/com/auth0/client/mgmt/RulesConfigsClient.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 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.RulesConfig; -import com.auth0.client.mgmt.types.SetRulesConfigRequestContent; -import com.auth0.client.mgmt.types.SetRulesConfigResponseContent; -import java.util.List; - -public class RulesConfigsClient { - protected final ClientOptions clientOptions; - - private final RawRulesConfigsClient rawClient; - - public RulesConfigsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawRulesConfigsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawRulesConfigsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve rules config variable keys. - *
Note: For security, config variable values cannot be retrieved outside rule execution.
-     * 
- */ - public List list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve rules config variable keys. - *
Note: For security, config variable values cannot be retrieved outside rule execution.
-     * 
- */ - public List list(RequestOptions requestOptions) { - return this.rawClient.list(requestOptions).body(); - } - - /** - * Sets a rules config variable. - */ - public SetRulesConfigResponseContent set(String key, SetRulesConfigRequestContent request) { - return this.rawClient.set(key, request).body(); - } - - /** - * Sets a rules config variable. - */ - public SetRulesConfigResponseContent set( - String key, SetRulesConfigRequestContent request, RequestOptions requestOptions) { - return this.rawClient.set(key, request, requestOptions).body(); - } - - /** - * Delete a rules config variable identified by its key. - */ - public void delete(String key) { - this.rawClient.delete(key).body(); - } - - /** - * Delete a rules config variable identified by its key. - */ - public void delete(String key, RequestOptions requestOptions) { - this.rawClient.delete(key, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/SelfServiceProfilesClient.java b/src/main/java/com/auth0/client/mgmt/SelfServiceProfilesClient.java deleted file mode 100644 index bf2791125..000000000 --- a/src/main/java/com/auth0/client/mgmt/SelfServiceProfilesClient.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -import com.auth0.client.mgmt.selfserviceprofiles.CustomTextClient; -import com.auth0.client.mgmt.selfserviceprofiles.SsoTicketClient; -import com.auth0.client.mgmt.types.CreateSelfServiceProfileRequestContent; -import com.auth0.client.mgmt.types.CreateSelfServiceProfileResponseContent; -import com.auth0.client.mgmt.types.GetSelfServiceProfileResponseContent; -import com.auth0.client.mgmt.types.ListSelfServiceProfilesRequestParameters; -import com.auth0.client.mgmt.types.SelfServiceProfile; -import com.auth0.client.mgmt.types.UpdateSelfServiceProfileRequestContent; -import com.auth0.client.mgmt.types.UpdateSelfServiceProfileResponseContent; -import java.util.function.Supplier; - -public class SelfServiceProfilesClient { - protected final ClientOptions clientOptions; - - private final RawSelfServiceProfilesClient rawClient; - - protected final Supplier customTextClient; - - protected final Supplier ssoTicketClient; - - public SelfServiceProfilesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawSelfServiceProfilesClient(clientOptions); - this.customTextClient = Suppliers.memoize(() -> new CustomTextClient(clientOptions)); - this.ssoTicketClient = Suppliers.memoize(() -> new SsoTicketClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawSelfServiceProfilesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieves self-service profiles. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieves self-service profiles. - */ - public SyncPagingIterable list(ListSelfServiceProfilesRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieves self-service profiles. - */ - public SyncPagingIterable list( - ListSelfServiceProfilesRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Creates a self-service profile. - */ - public CreateSelfServiceProfileResponseContent create(CreateSelfServiceProfileRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Creates a self-service profile. - */ - public CreateSelfServiceProfileResponseContent create( - CreateSelfServiceProfileRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieves a self-service profile by Id. - */ - public GetSelfServiceProfileResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieves a self-service profile by Id. - */ - public GetSelfServiceProfileResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Deletes a self-service profile by Id. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Deletes a self-service profile by Id. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Updates a self-service profile. - */ - public UpdateSelfServiceProfileResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Updates a self-service profile. - */ - public UpdateSelfServiceProfileResponseContent update(String id, UpdateSelfServiceProfileRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Updates a self-service profile. - */ - public UpdateSelfServiceProfileResponseContent update( - String id, UpdateSelfServiceProfileRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - public CustomTextClient customText() { - return this.customTextClient.get(); - } - - public SsoTicketClient ssoTicket() { - return this.ssoTicketClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/SessionsClient.java b/src/main/java/com/auth0/client/mgmt/SessionsClient.java deleted file mode 100644 index 873e5995e..000000000 --- a/src/main/java/com/auth0/client/mgmt/SessionsClient.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * 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.GetSessionResponseContent; -import com.auth0.client.mgmt.types.UpdateSessionRequestContent; -import com.auth0.client.mgmt.types.UpdateSessionResponseContent; - -public class SessionsClient { - protected final ClientOptions clientOptions; - - private final RawSessionsClient rawClient; - - public SessionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawSessionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawSessionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve session information. - */ - public GetSessionResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve session information. - */ - public GetSessionResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Delete a session by ID. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete a session by ID. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update session information. - */ - public UpdateSessionResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update session information. - */ - public UpdateSessionResponseContent update(String id, UpdateSessionRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update session information. - */ - public UpdateSessionResponseContent update( - String id, UpdateSessionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - /** - * Revokes a session by ID and all associated refresh tokens. - */ - public void revoke(String id) { - this.rawClient.revoke(id).body(); - } - - /** - * Revokes a session by ID and all associated refresh tokens. - */ - public void revoke(String id, RequestOptions requestOptions) { - this.rawClient.revoke(id, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/StatsClient.java b/src/main/java/com/auth0/client/mgmt/StatsClient.java deleted file mode 100644 index 7b32b9d3b..000000000 --- a/src/main/java/com/auth0/client/mgmt/StatsClient.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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.DailyStats; -import com.auth0.client.mgmt.types.GetDailyStatsRequestParameters; -import java.util.List; - -public class StatsClient { - protected final ClientOptions clientOptions; - - private final RawStatsClient rawClient; - - public StatsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawStatsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawStatsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve the number of active users that logged in during the last 30 days. - */ - public double getActiveUsersCount() { - return this.rawClient.getActiveUsersCount().body(); - } - - /** - * Retrieve the number of active users that logged in during the last 30 days. - */ - public double getActiveUsersCount(RequestOptions requestOptions) { - return this.rawClient.getActiveUsersCount(requestOptions).body(); - } - - /** - * Retrieve the number of logins, signups and breached-password detections (subscription required) that occurred each day within a specified date range. - */ - public List getDaily() { - return this.rawClient.getDaily().body(); - } - - /** - * Retrieve the number of logins, signups and breached-password detections (subscription required) that occurred each day within a specified date range. - */ - public List getDaily(GetDailyStatsRequestParameters request) { - return this.rawClient.getDaily(request).body(); - } - - /** - * Retrieve the number of logins, signups and breached-password detections (subscription required) that occurred each day within a specified date range. - */ - public List getDaily(GetDailyStatsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.getDaily(request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/SupplementalSignalsClient.java b/src/main/java/com/auth0/client/mgmt/SupplementalSignalsClient.java deleted file mode 100644 index 5396f7906..000000000 --- a/src/main/java/com/auth0/client/mgmt/SupplementalSignalsClient.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * 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.GetSupplementalSignalsResponseContent; -import com.auth0.client.mgmt.types.PatchSupplementalSignalsResponseContent; -import com.auth0.client.mgmt.types.UpdateSupplementalSignalsRequestContent; - -public class SupplementalSignalsClient { - protected final ClientOptions clientOptions; - - private final RawSupplementalSignalsClient rawClient; - - public SupplementalSignalsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawSupplementalSignalsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawSupplementalSignalsClient withRawResponse() { - return this.rawClient; - } - - /** - * Get the supplemental signals configuration for a tenant. - */ - public GetSupplementalSignalsResponseContent get() { - return this.rawClient.get().body(); - } - - /** - * Get the supplemental signals configuration for a tenant. - */ - public GetSupplementalSignalsResponseContent get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).body(); - } - - /** - * Update the supplemental signals configuration for a tenant. - */ - public PatchSupplementalSignalsResponseContent patch(UpdateSupplementalSignalsRequestContent request) { - return this.rawClient.patch(request).body(); - } - - /** - * Update the supplemental signals configuration for a tenant. - */ - public PatchSupplementalSignalsResponseContent patch( - UpdateSupplementalSignalsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.patch(request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/TicketsClient.java b/src/main/java/com/auth0/client/mgmt/TicketsClient.java deleted file mode 100644 index 66dadb125..000000000 --- a/src/main/java/com/auth0/client/mgmt/TicketsClient.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * 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.ChangePasswordTicketRequestContent; -import com.auth0.client.mgmt.types.ChangePasswordTicketResponseContent; -import com.auth0.client.mgmt.types.VerifyEmailTicketRequestContent; -import com.auth0.client.mgmt.types.VerifyEmailTicketResponseContent; - -public class TicketsClient { - protected final ClientOptions clientOptions; - - private final RawTicketsClient rawClient; - - public TicketsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawTicketsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawTicketsClient withRawResponse() { - return this.rawClient; - } - - /** - * Create an email verification ticket for a given user. An email verification ticket is a generated URL that the user can consume to verify their email address. - */ - public VerifyEmailTicketResponseContent verifyEmail(VerifyEmailTicketRequestContent request) { - return this.rawClient.verifyEmail(request).body(); - } - - /** - * Create an email verification ticket for a given user. An email verification ticket is a generated URL that the user can consume to verify their email address. - */ - public VerifyEmailTicketResponseContent verifyEmail( - VerifyEmailTicketRequestContent request, RequestOptions requestOptions) { - return this.rawClient.verifyEmail(request, requestOptions).body(); - } - - /** - * Create a password change ticket for a given user. A password change ticket is a generated URL that the user can consume to start a reset password flow. - *

Note: This endpoint does not verify the given user’s identity. If you call this endpoint within your application, you must design your application to verify the user’s identity.

- */ - public ChangePasswordTicketResponseContent changePassword() { - return this.rawClient.changePassword().body(); - } - - /** - * Create a password change ticket for a given user. A password change ticket is a generated URL that the user can consume to start a reset password flow. - *

Note: This endpoint does not verify the given user’s identity. If you call this endpoint within your application, you must design your application to verify the user’s identity.

- */ - public ChangePasswordTicketResponseContent changePassword(ChangePasswordTicketRequestContent request) { - return this.rawClient.changePassword(request).body(); - } - - /** - * Create a password change ticket for a given user. A password change ticket is a generated URL that the user can consume to start a reset password flow. - *

Note: This endpoint does not verify the given user’s identity. If you call this endpoint within your application, you must design your application to verify the user’s identity.

- */ - public ChangePasswordTicketResponseContent changePassword( - ChangePasswordTicketRequestContent request, RequestOptions requestOptions) { - return this.rawClient.changePassword(request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/TokenExchangeProfilesClient.java b/src/main/java/com/auth0/client/mgmt/TokenExchangeProfilesClient.java deleted file mode 100644 index 6b8acbe71..000000000 --- a/src/main/java/com/auth0/client/mgmt/TokenExchangeProfilesClient.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * 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.CreateTokenExchangeProfileRequestContent; -import com.auth0.client.mgmt.types.CreateTokenExchangeProfileResponseContent; -import com.auth0.client.mgmt.types.GetTokenExchangeProfileResponseContent; -import com.auth0.client.mgmt.types.TokenExchangeProfileResponseContent; -import com.auth0.client.mgmt.types.TokenExchangeProfilesListRequest; -import com.auth0.client.mgmt.types.UpdateTokenExchangeProfileRequestContent; - -public class TokenExchangeProfilesClient { - protected final ClientOptions clientOptions; - - private final RawTokenExchangeProfilesClient rawClient; - - public TokenExchangeProfilesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawTokenExchangeProfilesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawTokenExchangeProfilesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a list of all Token Exchange Profiles available in your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- *

This endpoint supports Checkpoint pagination. To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve a list of all Token Exchange Profiles available in your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- *

This endpoint supports Checkpoint pagination. To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public SyncPagingIterable list(TokenExchangeProfilesListRequest request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve a list of all Token Exchange Profiles available in your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- *

This endpoint supports Checkpoint pagination. To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public SyncPagingIterable list( - TokenExchangeProfilesListRequest request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create a new Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CreateTokenExchangeProfileResponseContent create(CreateTokenExchangeProfileRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create a new Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public CreateTokenExchangeProfileResponseContent create( - CreateTokenExchangeProfileRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve details about a single Token Exchange Profile specified by ID. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public GetTokenExchangeProfileResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve details about a single Token Exchange Profile specified by ID. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta’s Master Subscription Agreement</a>. It is your responsibility to securely validate the user’s subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public GetTokenExchangeProfileResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Delete a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public void update(String id) { - this.rawClient.update(id).body(); - } - - /** - * Update a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public void update(String id, UpdateTokenExchangeProfileRequestContent request) { - this.rawClient.update(id, request).body(); - } - - /** - * Update a Token Exchange Profile within your tenant. - *

By using this feature, you agree to the applicable Free Trial terms in <a href="https://www.okta.com/legal/">Okta's Master Subscription Agreement</a>. It is your responsibility to securely validate the user's subject_token. See <a href="https://auth0.com/docs/authenticate/custom-token-exchange">User Guide</a> for more details.

- */ - public void update(String id, UpdateTokenExchangeProfileRequestContent request, RequestOptions requestOptions) { - this.rawClient.update(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/TokenProvider.java b/src/main/java/com/auth0/client/mgmt/TokenProvider.java deleted file mode 100644 index 8fbe2b122..000000000 --- a/src/main/java/com/auth0/client/mgmt/TokenProvider.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.exception.Auth0Exception; -import java.util.concurrent.CompletableFuture; - -/** - * A {@code TokenProvider} is responsible for providing the token used when making authorized requests to the Auth0 - * Management API. - */ -public interface TokenProvider { - - /** - * Responsible for obtaining a token for use with the Management API client for synchronous requests. - * @return the token required when making requests to the Auth0 Management API. - * @throws Auth0Exception if the token cannot be retrieved. - */ - String getToken() throws Auth0Exception; - - /** - * Responsible for obtaining a token for use with the Management API client for asynchronous requests. - * @return a {@link CompletableFuture} with the token required when making requests to the Auth0 Management API. - */ - CompletableFuture getTokenAsync(); -} diff --git a/src/main/java/com/auth0/client/mgmt/UserAttributeProfilesClient.java b/src/main/java/com/auth0/client/mgmt/UserAttributeProfilesClient.java deleted file mode 100644 index 854cbbd44..000000000 --- a/src/main/java/com/auth0/client/mgmt/UserAttributeProfilesClient.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * 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.CreateUserAttributeProfileRequestContent; -import com.auth0.client.mgmt.types.CreateUserAttributeProfileResponseContent; -import com.auth0.client.mgmt.types.GetUserAttributeProfileResponseContent; -import com.auth0.client.mgmt.types.GetUserAttributeProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.ListUserAttributeProfileRequestParameters; -import com.auth0.client.mgmt.types.ListUserAttributeProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateUserAttributeProfileRequestContent; -import com.auth0.client.mgmt.types.UpdateUserAttributeProfileResponseContent; -import com.auth0.client.mgmt.types.UserAttributeProfile; - -public class UserAttributeProfilesClient { - protected final ClientOptions clientOptions; - - private final RawUserAttributeProfilesClient rawClient; - - public UserAttributeProfilesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawUserAttributeProfilesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawUserAttributeProfilesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a list of User Attribute Profiles. This endpoint supports Checkpoint pagination. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve a list of User Attribute Profiles. This endpoint supports Checkpoint pagination. - */ - public SyncPagingIterable list(ListUserAttributeProfileRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve a list of User Attribute Profiles. This endpoint supports Checkpoint pagination. - */ - public SyncPagingIterable list( - ListUserAttributeProfileRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Retrieve details about a single User Attribute Profile specified by ID. - */ - public CreateUserAttributeProfileResponseContent create(CreateUserAttributeProfileRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Retrieve details about a single User Attribute Profile specified by ID. - */ - public CreateUserAttributeProfileResponseContent create( - CreateUserAttributeProfileRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve a list of User Attribute Profile Templates. - */ - public ListUserAttributeProfileTemplateResponseContent listTemplates() { - return this.rawClient.listTemplates().body(); - } - - /** - * Retrieve a list of User Attribute Profile Templates. - */ - public ListUserAttributeProfileTemplateResponseContent listTemplates(RequestOptions requestOptions) { - return this.rawClient.listTemplates(requestOptions).body(); - } - - /** - * Retrieve a User Attribute Profile Template. - */ - public GetUserAttributeProfileTemplateResponseContent getTemplate(String id) { - return this.rawClient.getTemplate(id).body(); - } - - /** - * Retrieve a User Attribute Profile Template. - */ - public GetUserAttributeProfileTemplateResponseContent getTemplate(String id, RequestOptions requestOptions) { - return this.rawClient.getTemplate(id, requestOptions).body(); - } - - /** - * Retrieve details about a single User Attribute Profile specified by ID. - */ - public GetUserAttributeProfileResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve details about a single User Attribute Profile specified by ID. - */ - public GetUserAttributeProfileResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Delete a single User Attribute Profile specified by ID. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete a single User Attribute Profile specified by ID. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update the details of a specific User attribute profile, such as name, user_id and user_attributes. - */ - public UpdateUserAttributeProfileResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update the details of a specific User attribute profile, such as name, user_id and user_attributes. - */ - public UpdateUserAttributeProfileResponseContent update( - String id, UpdateUserAttributeProfileRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update the details of a specific User attribute profile, such as name, user_id and user_attributes. - */ - public UpdateUserAttributeProfileResponseContent update( - String id, UpdateUserAttributeProfileRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/UserBlocksClient.java b/src/main/java/com/auth0/client/mgmt/UserBlocksClient.java deleted file mode 100644 index 4c3e3421b..000000000 --- a/src/main/java/com/auth0/client/mgmt/UserBlocksClient.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * 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.DeleteUserBlocksByIdentifierRequestParameters; -import com.auth0.client.mgmt.types.ListUserBlocksByIdentifierRequestParameters; -import com.auth0.client.mgmt.types.ListUserBlocksByIdentifierResponseContent; -import com.auth0.client.mgmt.types.ListUserBlocksRequestParameters; -import com.auth0.client.mgmt.types.ListUserBlocksResponseContent; - -public class UserBlocksClient { - protected final ClientOptions clientOptions; - - private final RawUserBlocksClient rawClient; - - public UserBlocksClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawUserBlocksClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawUserBlocksClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for a user with the given identifier (username, phone number, or email). - */ - public ListUserBlocksByIdentifierResponseContent listByIdentifier( - ListUserBlocksByIdentifierRequestParameters request) { - return this.rawClient.listByIdentifier(request).body(); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for a user with the given identifier (username, phone number, or email). - */ - public ListUserBlocksByIdentifierResponseContent listByIdentifier( - ListUserBlocksByIdentifierRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.listByIdentifier(request, requestOptions).body(); - } - - /** - * Remove all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given identifier (username, phone number, or email). - *

Note: This endpoint does not unblock users that were <a href="https://auth0.com/docs/user-profile#block-and-unblock-a-user">blocked by a tenant administrator</a>.

- */ - public void deleteByIdentifier(DeleteUserBlocksByIdentifierRequestParameters request) { - this.rawClient.deleteByIdentifier(request).body(); - } - - /** - * Remove all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given identifier (username, phone number, or email). - *

Note: This endpoint does not unblock users that were <a href="https://auth0.com/docs/user-profile#block-and-unblock-a-user">blocked by a tenant administrator</a>.

- */ - public void deleteByIdentifier( - DeleteUserBlocksByIdentifierRequestParameters request, RequestOptions requestOptions) { - this.rawClient.deleteByIdentifier(request, requestOptions).body(); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - */ - public ListUserBlocksResponseContent list(String id) { - return this.rawClient.list(id).body(); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - */ - public ListUserBlocksResponseContent list(String id, ListUserBlocksRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - */ - public ListUserBlocksResponseContent list( - String id, ListUserBlocksRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } - - /** - * Remove all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - *

Note: This endpoint does not unblock users that were <a href="https://auth0.com/docs/user-profile#block-and-unblock-a-user">blocked by a tenant administrator</a>.

- */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Remove all <a href="https://auth0.com/docs/secure/attack-protection/brute-force-protection">Brute-force Protection</a> blocks for the user with the given ID. - *

Note: This endpoint does not unblock users that were <a href="https://auth0.com/docs/user-profile#block-and-unblock-a-user">blocked by a tenant administrator</a>.

- */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/UserGrantsClient.java b/src/main/java/com/auth0/client/mgmt/UserGrantsClient.java deleted file mode 100644 index ede7274cd..000000000 --- a/src/main/java/com/auth0/client/mgmt/UserGrantsClient.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * 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.DeleteUserGrantByUserIdRequestParameters; -import com.auth0.client.mgmt.types.ListUserGrantsRequestParameters; -import com.auth0.client.mgmt.types.UserGrant; - -public class UserGrantsClient { - protected final ClientOptions clientOptions; - - private final RawUserGrantsClient rawClient; - - public UserGrantsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawUserGrantsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawUserGrantsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve the <a href="https://auth0.com/docs/api-auth/which-oauth-flow-to-use">grants</a> associated with your account. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve the <a href="https://auth0.com/docs/api-auth/which-oauth-flow-to-use">grants</a> associated with your account. - */ - public SyncPagingIterable list(ListUserGrantsRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve the <a href="https://auth0.com/docs/api-auth/which-oauth-flow-to-use">grants</a> associated with your account. - */ - public SyncPagingIterable list(ListUserGrantsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Delete a grant associated with your account. - */ - public void deleteByUserId(DeleteUserGrantByUserIdRequestParameters request) { - this.rawClient.deleteByUserId(request).body(); - } - - /** - * Delete a grant associated with your account. - */ - public void deleteByUserId(DeleteUserGrantByUserIdRequestParameters request, RequestOptions requestOptions) { - this.rawClient.deleteByUserId(request, requestOptions).body(); - } - - /** - * Delete a grant associated with your account. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete a grant associated with your account. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/UsersClient.java b/src/main/java/com/auth0/client/mgmt/UsersClient.java deleted file mode 100644 index cac371619..000000000 --- a/src/main/java/com/auth0/client/mgmt/UsersClient.java +++ /dev/null @@ -1,523 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -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.ListUsersByEmailRequestParameters; -import com.auth0.client.mgmt.types.ListUsersRequestParameters; -import com.auth0.client.mgmt.types.RegenerateUsersRecoveryCodeResponseContent; -import com.auth0.client.mgmt.types.RevokeUserAccessRequestContent; -import com.auth0.client.mgmt.types.UpdateUserRequestContent; -import com.auth0.client.mgmt.types.UpdateUserResponseContent; -import com.auth0.client.mgmt.types.UserResponseSchema; -import com.auth0.client.mgmt.users.AuthenticationMethodsClient; -import com.auth0.client.mgmt.users.AuthenticatorsClient; -import com.auth0.client.mgmt.users.ConnectedAccountsClient; -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; -import com.auth0.client.mgmt.users.MultifactorClient; -import com.auth0.client.mgmt.users.OrganizationsClient; -import com.auth0.client.mgmt.users.PermissionsClient; -import com.auth0.client.mgmt.users.RefreshTokenClient; -import com.auth0.client.mgmt.users.RiskAssessmentsClient; -import com.auth0.client.mgmt.users.RolesClient; -import com.auth0.client.mgmt.users.SessionsClient; -import java.util.List; -import java.util.function.Supplier; - -public class UsersClient { - protected final ClientOptions clientOptions; - - private final RawUsersClient rawClient; - - protected final Supplier authenticationMethodsClient; - - protected final Supplier authenticatorsClient; - - protected final Supplier connectedAccountsClient; - - protected final Supplier enrollmentsClient; - - protected final Supplier federatedConnectionsTokensetsClient; - - protected final Supplier groupsClient; - - protected final Supplier identitiesClient; - - protected final Supplier logsClient; - - protected final Supplier multifactorClient; - - protected final Supplier organizationsClient; - - protected final Supplier permissionsClient; - - protected final Supplier riskAssessmentsClient; - - protected final Supplier rolesClient; - - protected final Supplier refreshTokenClient; - - protected final Supplier sessionsClient; - - public UsersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawUsersClient(clientOptions); - this.authenticationMethodsClient = Suppliers.memoize(() -> new AuthenticationMethodsClient(clientOptions)); - this.authenticatorsClient = Suppliers.memoize(() -> new AuthenticatorsClient(clientOptions)); - this.connectedAccountsClient = Suppliers.memoize(() -> new ConnectedAccountsClient(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)); - this.multifactorClient = Suppliers.memoize(() -> new MultifactorClient(clientOptions)); - this.organizationsClient = Suppliers.memoize(() -> new OrganizationsClient(clientOptions)); - this.permissionsClient = Suppliers.memoize(() -> new PermissionsClient(clientOptions)); - this.riskAssessmentsClient = Suppliers.memoize(() -> new RiskAssessmentsClient(clientOptions)); - this.rolesClient = Suppliers.memoize(() -> new RolesClient(clientOptions)); - this.refreshTokenClient = Suppliers.memoize(() -> new RefreshTokenClient(clientOptions)); - this.sessionsClient = Suppliers.memoize(() -> new SessionsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawUsersClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of users. It is possible to: - *
    - *
  • Specify a 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
  • - *
- *

<!-- only v3 is available -->

- *

The <code>q</code> query parameter can be used to get users that match the specified criteria <a href="https://auth0.com/docs/users/search/v3/query-syntax">using query string syntax.</a>

- *

<a href="https://auth0.com/docs/users/search/v3">Learn more about searching for users.</a>

- *

Read about <a href="https://auth0.com/docs/users/search/best-practices">best practices</a> 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 <a href="https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports">export job</a>, or the <a href="https://auth0.com/docs/extensions/user-import-export">User Import / Export</a> extension.

- */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve details of users. It is possible to: - *
    - *
  • Specify a 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
  • - *
- *

<!-- only v3 is available -->

- *

The <code>q</code> query parameter can be used to get users that match the specified criteria <a href="https://auth0.com/docs/users/search/v3/query-syntax">using query string syntax.</a>

- *

<a href="https://auth0.com/docs/users/search/v3">Learn more about searching for users.</a>

- *

Read about <a href="https://auth0.com/docs/users/search/best-practices">best practices</a> 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 <a href="https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports">export job</a>, or the <a href="https://auth0.com/docs/extensions/user-import-export">User Import / Export</a> extension.

- */ - public SyncPagingIterable list(ListUsersRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve details of users. It is possible to: - *
    - *
  • Specify a 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
  • - *
- *

<!-- only v3 is available -->

- *

The <code>q</code> query parameter can be used to get users that match the specified criteria <a href="https://auth0.com/docs/users/search/v3/query-syntax">using query string syntax.</a>

- *

<a href="https://auth0.com/docs/users/search/v3">Learn more about searching for users.</a>

- *

Read about <a href="https://auth0.com/docs/users/search/best-practices">best practices</a> 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 <a href="https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports">export job</a>, or the <a href="https://auth0.com/docs/extensions/user-import-export">User Import / Export</a> extension.

- */ - public SyncPagingIterable list( - ListUsersRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create a new user for a given <a href="https://auth0.com/docs/connections/database">database</a> or <a href="https://auth0.com/docs/connections/passwordless">passwordless</a> connection. - *

Note: <code>connection</code> is required but other parameters such as <code>email</code> and <code>password</code> are dependent upon the type of connection.

- */ - public CreateUserResponseContent create(CreateUserRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create a new user for a given <a href="https://auth0.com/docs/connections/database">database</a> or <a href="https://auth0.com/docs/connections/passwordless">passwordless</a> connection. - *

Note: <code>connection</code> is required but other parameters such as <code>email</code> and <code>password</code> are dependent upon the type of connection.

- */ - public CreateUserResponseContent create(CreateUserRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Find users by email. If Auth0 is the identity provider (idP), the email address associated with a user is saved in lower case, regardless of how you initially provided it. - *

For example, if you register a user as JohnSmith@example.com, Auth0 saves the user's email as johnsmith@example.com.

- *

Therefore, when using this endpoint, make sure that you are searching for users via email addresses using the correct case.

- */ - public List listUsersByEmail(ListUsersByEmailRequestParameters request) { - return this.rawClient.listUsersByEmail(request).body(); - } - - /** - * Find users by email. If Auth0 is the identity provider (idP), the email address associated with a user is saved in lower case, regardless of how you initially provided it. - *

For example, if you register a user as JohnSmith@example.com, Auth0 saves the user's email as johnsmith@example.com.

- *

Therefore, when using this endpoint, make sure that you are searching for users via email addresses using the correct case.

- */ - public List listUsersByEmail( - ListUsersByEmailRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.listUsersByEmail(request, requestOptions).body(); - } - - /** - * Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see <a href="https://auth0.com/docs/manage-users/user-search/retrieve-users-with-get-users-endpoint">Retrieve Users with the Get Users Endpoint</a>. - */ - public GetUserResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see <a href="https://auth0.com/docs/manage-users/user-search/retrieve-users-with-get-users-endpoint">Retrieve Users with the Get Users Endpoint</a>. - */ - public GetUserResponseContent get(String id, GetUserRequestParameters request) { - return this.rawClient.get(id, request).body(); - } - - /** - * Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see <a href="https://auth0.com/docs/manage-users/user-search/retrieve-users-with-get-users-endpoint">Retrieve Users with the Get Users Endpoint</a>. - */ - public GetUserResponseContent get(String id, GetUserRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).body(); - } - - /** - * Delete a user by user ID. This action cannot be undone. For Auth0 Dashboard instructions, see <a href="https://auth0.com/docs/manage-users/user-accounts/delete-users">Delete Users</a>. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete a user by user ID. This action cannot be undone. For Auth0 Dashboard instructions, see <a href="https://auth0.com/docs/manage-users/user-accounts/delete-users">Delete Users</a>. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update a user. - *

These are the attributes that can be updated at the root level:

- *

<ul> - * <li>app_metadata</li> - * <li>blocked</li> - * <li>email</li> - * <li>email_verified</li> - * <li>family_name</li> - * <li>given_name</li> - * <li>name</li> - * <li>nickname</li> - * <li>password</li> - * <li>phone_number</li> - * <li>phone_verified</li> - * <li>picture</li> - * <li>username</li> - * <li>user_metadata</li> - * <li>verify_email</li> - * </ul>

- *

Some considerations:

- *

<ul> - * <li>The properties of the new object will replace the old ones.</li> - * <li>The metadata fields are an exception to this rule (<code>user_metadata</code> and <code>app_metadata</code>). These properties are merged instead of being replaced but be careful, the merge only occurs on the first level.</li> - * <li>If you are updating <code>email</code>, <code>email_verified</code>, <code>phone_number</code>, <code>phone_verified</code>, <code>username</code> or <code>password</code> of a secondary identity, you need to specify the <code>connection</code> property too.</li> - * <li>If you are updating <code>email</code> or <code>phone_number</code> you can specify, optionally, the <code>client_id</code> property.</li> - * <li>Updating <code>email_verified</code> is not supported for enterprise and passwordless sms connections.</li> - * <li>Updating the <code>blocked</code> to <code>false</code> does not affect the user's blocked state from an excessive amount of incorrectly provided credentials. Use the "Unblock a user" endpoint from the "User Blocks" API to change the user's state.</li> - * <li>Supported attributes can be unset by supplying <code>null</code> as the value.</li> - * </ul>

- *

<h5>Updating a field (non-metadata property)</h5> - * To mark the email address of a user as verified, the body to send should be: - * <pre><code>{ "email_verified": true }</code></pre>

- *

<h5>Updating a user metadata root property</h5>Let's assume that our test user has the following <code>user_metadata</code>: - * <pre><code>{ "user_metadata" : { "profileCode": 1479 } }</code></pre>

- *

To add the field <code>addresses</code> the body to send should be:

- *

<pre><code>{ "user_metadata" : { "addresses": {"work_address": "100 Industrial Way"} }}</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { "work_address": "100 Industrial Way" } - * } - * }</code></pre>

- *

<h5>Updating an inner user metadata property</h5>If there's existing user metadata to which we want to add <code>"home_address": "742 Evergreen Terrace"</code> (using the <code>addresses</code> property) we should send the whole <code>addresses</code> object. Since this is a first-level object, the object will be merged in, but its own properties will not be. The body to send should be: - * <pre><code>{ - * "user_metadata": { - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:

- *

<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- */ - public UpdateUserResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update a user. - *

These are the attributes that can be updated at the root level:

- *

<ul> - * <li>app_metadata</li> - * <li>blocked</li> - * <li>email</li> - * <li>email_verified</li> - * <li>family_name</li> - * <li>given_name</li> - * <li>name</li> - * <li>nickname</li> - * <li>password</li> - * <li>phone_number</li> - * <li>phone_verified</li> - * <li>picture</li> - * <li>username</li> - * <li>user_metadata</li> - * <li>verify_email</li> - * </ul>

- *

Some considerations:

- *

<ul> - * <li>The properties of the new object will replace the old ones.</li> - * <li>The metadata fields are an exception to this rule (<code>user_metadata</code> and <code>app_metadata</code>). These properties are merged instead of being replaced but be careful, the merge only occurs on the first level.</li> - * <li>If you are updating <code>email</code>, <code>email_verified</code>, <code>phone_number</code>, <code>phone_verified</code>, <code>username</code> or <code>password</code> of a secondary identity, you need to specify the <code>connection</code> property too.</li> - * <li>If you are updating <code>email</code> or <code>phone_number</code> you can specify, optionally, the <code>client_id</code> property.</li> - * <li>Updating <code>email_verified</code> is not supported for enterprise and passwordless sms connections.</li> - * <li>Updating the <code>blocked</code> to <code>false</code> does not affect the user's blocked state from an excessive amount of incorrectly provided credentials. Use the "Unblock a user" endpoint from the "User Blocks" API to change the user's state.</li> - * <li>Supported attributes can be unset by supplying <code>null</code> as the value.</li> - * </ul>

- *

<h5>Updating a field (non-metadata property)</h5> - * To mark the email address of a user as verified, the body to send should be: - * <pre><code>{ "email_verified": true }</code></pre>

- *

<h5>Updating a user metadata root property</h5>Let's assume that our test user has the following <code>user_metadata</code>: - * <pre><code>{ "user_metadata" : { "profileCode": 1479 } }</code></pre>

- *

To add the field <code>addresses</code> the body to send should be:

- *

<pre><code>{ "user_metadata" : { "addresses": {"work_address": "100 Industrial Way"} }}</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { "work_address": "100 Industrial Way" } - * } - * }</code></pre>

- *

<h5>Updating an inner user metadata property</h5>If there's existing user metadata to which we want to add <code>"home_address": "742 Evergreen Terrace"</code> (using the <code>addresses</code> property) we should send the whole <code>addresses</code> object. Since this is a first-level object, the object will be merged in, but its own properties will not be. The body to send should be: - * <pre><code>{ - * "user_metadata": { - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:

- *

<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- */ - public UpdateUserResponseContent update(String id, UpdateUserRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update a user. - *

These are the attributes that can be updated at the root level:

- *

<ul> - * <li>app_metadata</li> - * <li>blocked</li> - * <li>email</li> - * <li>email_verified</li> - * <li>family_name</li> - * <li>given_name</li> - * <li>name</li> - * <li>nickname</li> - * <li>password</li> - * <li>phone_number</li> - * <li>phone_verified</li> - * <li>picture</li> - * <li>username</li> - * <li>user_metadata</li> - * <li>verify_email</li> - * </ul>

- *

Some considerations:

- *

<ul> - * <li>The properties of the new object will replace the old ones.</li> - * <li>The metadata fields are an exception to this rule (<code>user_metadata</code> and <code>app_metadata</code>). These properties are merged instead of being replaced but be careful, the merge only occurs on the first level.</li> - * <li>If you are updating <code>email</code>, <code>email_verified</code>, <code>phone_number</code>, <code>phone_verified</code>, <code>username</code> or <code>password</code> of a secondary identity, you need to specify the <code>connection</code> property too.</li> - * <li>If you are updating <code>email</code> or <code>phone_number</code> you can specify, optionally, the <code>client_id</code> property.</li> - * <li>Updating <code>email_verified</code> is not supported for enterprise and passwordless sms connections.</li> - * <li>Updating the <code>blocked</code> to <code>false</code> does not affect the user's blocked state from an excessive amount of incorrectly provided credentials. Use the "Unblock a user" endpoint from the "User Blocks" API to change the user's state.</li> - * <li>Supported attributes can be unset by supplying <code>null</code> as the value.</li> - * </ul>

- *

<h5>Updating a field (non-metadata property)</h5> - * To mark the email address of a user as verified, the body to send should be: - * <pre><code>{ "email_verified": true }</code></pre>

- *

<h5>Updating a user metadata root property</h5>Let's assume that our test user has the following <code>user_metadata</code>: - * <pre><code>{ "user_metadata" : { "profileCode": 1479 } }</code></pre>

- *

To add the field <code>addresses</code> the body to send should be:

- *

<pre><code>{ "user_metadata" : { "addresses": {"work_address": "100 Industrial Way"} }}</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { "work_address": "100 Industrial Way" } - * } - * }</code></pre>

- *

<h5>Updating an inner user metadata property</h5>If there's existing user metadata to which we want to add <code>"home_address": "742 Evergreen Terrace"</code> (using the <code>addresses</code> property) we should send the whole <code>addresses</code> object. Since this is a first-level object, the object will be merged in, but its own properties will not be. The body to send should be: - * <pre><code>{ - * "user_metadata": { - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- *

The modified object ends up with the following <code>user_metadata</code> property:

- *

<pre><code>{ - * "user_metadata": { - * "profileCode": 1479, - * "addresses": { - * "work_address": "100 Industrial Way", - * "home_address": "742 Evergreen Terrace" - * } - * } - * }</code></pre>

- */ - public UpdateUserResponseContent update( - String id, UpdateUserRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - /** - * Remove an existing multi-factor authentication (MFA) <a href="https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa">recovery code</a> 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. - */ - public RegenerateUsersRecoveryCodeResponseContent regenerateRecoveryCode(String id) { - return this.rawClient.regenerateRecoveryCode(id).body(); - } - - /** - * Remove an existing multi-factor authentication (MFA) <a href="https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa">recovery code</a> 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. - */ - public RegenerateUsersRecoveryCodeResponseContent regenerateRecoveryCode(String id, RequestOptions requestOptions) { - return this.rawClient.regenerateRecoveryCode(id, requestOptions).body(); - } - - /** - * Revokes selected resources related to a user (sessions, refresh tokens, ...). - */ - public void revokeAccess(String id) { - this.rawClient.revokeAccess(id).body(); - } - - /** - * Revokes selected resources related to a user (sessions, refresh tokens, ...). - */ - public void revokeAccess(String id, RevokeUserAccessRequestContent request) { - this.rawClient.revokeAccess(id, request).body(); - } - - /** - * Revokes selected resources related to a user (sessions, refresh tokens, ...). - */ - public void revokeAccess(String id, RevokeUserAccessRequestContent request, RequestOptions requestOptions) { - this.rawClient.revokeAccess(id, request, requestOptions).body(); - } - - public AuthenticationMethodsClient authenticationMethods() { - return this.authenticationMethodsClient.get(); - } - - public AuthenticatorsClient authenticators() { - return this.authenticatorsClient.get(); - } - - public ConnectedAccountsClient connectedAccounts() { - return this.connectedAccountsClient.get(); - } - - public EnrollmentsClient enrollments() { - return this.enrollmentsClient.get(); - } - - public FederatedConnectionsTokensetsClient federatedConnectionsTokensets() { - return this.federatedConnectionsTokensetsClient.get(); - } - - public GroupsClient groups() { - return this.groupsClient.get(); - } - - public IdentitiesClient identities() { - return this.identitiesClient.get(); - } - - public LogsClient logs() { - return this.logsClient.get(); - } - - public MultifactorClient multifactor() { - return this.multifactorClient.get(); - } - - public OrganizationsClient organizations() { - return this.organizationsClient.get(); - } - - public PermissionsClient permissions() { - return this.permissionsClient.get(); - } - - public RiskAssessmentsClient riskAssessments() { - return this.riskAssessmentsClient.get(); - } - - public RolesClient roles() { - return this.rolesClient.get(); - } - - public RefreshTokenClient refreshToken() { - return this.refreshTokenClient.get(); - } - - public SessionsClient sessions() { - return this.sessionsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/actions/AsyncExecutionsClient.java b/src/main/java/com/auth0/client/mgmt/actions/AsyncExecutionsClient.java deleted file mode 100644 index 7ec189a7f..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/AsyncExecutionsClient.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.GetActionExecutionResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncExecutionsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawExecutionsClient rawClient; - - public AsyncExecutionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawExecutionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawExecutionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve information about a specific execution of a trigger. Relevant execution IDs will be included in tenant logs generated as part of that authentication flow. Executions will only be stored for 10 days after their creation. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve information about a specific execution of a trigger. Relevant execution IDs will be included in tenant logs generated as part of that authentication flow. Executions will only be stored for 10 days after their creation. - */ - 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/actions/AsyncModulesClient.java b/src/main/java/com/auth0/client/mgmt/actions/AsyncModulesClient.java deleted file mode 100644 index 3352e6f8d..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/AsyncModulesClient.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions; - -import com.auth0.client.mgmt.actions.modules.AsyncVersionsClient; -import com.auth0.client.mgmt.actions.types.CreateActionModuleRequestContent; -import com.auth0.client.mgmt.actions.types.GetActionModuleActionsRequestParameters; -import com.auth0.client.mgmt.actions.types.GetActionModulesRequestParameters; -import com.auth0.client.mgmt.actions.types.RollbackActionModuleRequestParameters; -import com.auth0.client.mgmt.actions.types.UpdateActionModuleRequestContent; -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.types.ActionModuleAction; -import com.auth0.client.mgmt.types.ActionModuleListItem; -import com.auth0.client.mgmt.types.CreateActionModuleResponseContent; -import com.auth0.client.mgmt.types.GetActionModuleResponseContent; -import com.auth0.client.mgmt.types.RollbackActionModuleResponseContent; -import com.auth0.client.mgmt.types.UpdateActionModuleResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncModulesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawModulesClient rawClient; - - protected final Supplier versionsClient; - - public AsyncModulesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawModulesClient(clientOptions); - this.versionsClient = Suppliers.memoize(() -> new AsyncVersionsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawModulesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a paginated list of all Actions Modules with optional filtering and totals. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve a paginated list of all Actions Modules with optional filtering and totals. - */ - public CompletableFuture> list(GetActionModulesRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve a paginated list of all Actions Modules with optional filtering and totals. - */ - public CompletableFuture> list( - GetActionModulesRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a new Actions Module for reusable code across actions. - */ - public CompletableFuture create(CreateActionModuleRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create a new Actions Module for reusable code across actions. - */ - public CompletableFuture create( - CreateActionModuleRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details of a specific Actions Module by its unique identifier. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve details of a specific Actions Module by its unique identifier. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Permanently delete an Actions Module. This will fail if the module is still in use by any actions. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Permanently delete an Actions Module. This will fail if the module is still in use by any actions. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update properties of an existing Actions Module, such as code, dependencies, or secrets. - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update properties of an existing Actions Module, such as code, dependencies, or secrets. - */ - public CompletableFuture update( - String id, UpdateActionModuleRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update properties of an existing Actions Module, such as code, dependencies, or secrets. - */ - public CompletableFuture update( - String id, UpdateActionModuleRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module. - */ - public CompletableFuture> listActions(String id) { - return this.rawClient.listActions(id).thenApply(response -> response.body()); - } - - /** - * Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module. - */ - public CompletableFuture> listActions( - String id, GetActionModuleActionsRequestParameters request) { - return this.rawClient.listActions(id, request).thenApply(response -> response.body()); - } - - /** - * Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module. - */ - public CompletableFuture> listActions( - String id, GetActionModuleActionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.listActions(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Rolls back an Actions Module's draft to a previously created version. This action copies the code, dependencies, and secrets from the specified version into the current draft. - */ - public CompletableFuture rollback( - String id, RollbackActionModuleRequestParameters request) { - return this.rawClient.rollback(id, request).thenApply(response -> response.body()); - } - - /** - * Rolls back an Actions Module's draft to a previously created version. This action copies the code, dependencies, and secrets from the specified version into the current draft. - */ - public CompletableFuture rollback( - String id, RollbackActionModuleRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.rollback(id, request, requestOptions).thenApply(response -> response.body()); - } - - public AsyncVersionsClient versions() { - return this.versionsClient.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 deleted file mode 100644 index 509f6c7e2..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/AsyncRawExecutionsClient.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.GetActionExecutionResponseContent; -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.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawExecutionsClient { - protected final ClientOptions clientOptions; - - public AsyncRawExecutionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve information about a specific execution of a trigger. Relevant execution IDs will be included in tenant logs generated as part of that authentication flow. Executions will only be stored for 10 days after their creation. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve information about a specific execution of a trigger. Relevant execution IDs will be included in tenant logs generated as part of that authentication flow. Executions will only be stored for 10 days after their creation. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/executions") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetActionExecutionResponseContent.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 (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/actions/AsyncRawModulesClient.java b/src/main/java/com/auth0/client/mgmt/actions/AsyncRawModulesClient.java deleted file mode 100644 index f0c070a23..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/AsyncRawModulesClient.java +++ /dev/null @@ -1,776 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions; - -import com.auth0.client.mgmt.actions.types.CreateActionModuleRequestContent; -import com.auth0.client.mgmt.actions.types.GetActionModuleActionsRequestParameters; -import com.auth0.client.mgmt.actions.types.GetActionModulesRequestParameters; -import com.auth0.client.mgmt.actions.types.RollbackActionModuleRequestParameters; -import com.auth0.client.mgmt.actions.types.UpdateActionModuleRequestContent; -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.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.PreconditionFailedError; -import com.auth0.client.mgmt.errors.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.types.ActionModuleAction; -import com.auth0.client.mgmt.types.ActionModuleListItem; -import com.auth0.client.mgmt.types.CreateActionModuleResponseContent; -import com.auth0.client.mgmt.types.GetActionModuleActionsResponseContent; -import com.auth0.client.mgmt.types.GetActionModuleResponseContent; -import com.auth0.client.mgmt.types.GetActionModulesResponseContent; -import com.auth0.client.mgmt.types.RollbackActionModuleResponseContent; -import com.auth0.client.mgmt.types.UpdateActionModuleResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawModulesClient { - protected final ClientOptions clientOptions; - - public AsyncRawModulesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a paginated list of all Actions Modules with optional filtering and totals. - */ - public CompletableFuture>> list() { - return list(GetActionModulesRequestParameters.builder().build()); - } - - /** - * Retrieve a paginated list of all Actions Modules with optional filtering and totals. - */ - public CompletableFuture>> list( - GetActionModulesRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve a paginated list of all Actions Modules with optional filtering and totals. - */ - public CompletableFuture>> list( - GetActionModulesRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - 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); - } - 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()) { - GetActionModulesResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetActionModulesResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - GetActionModulesRequestParameters nextRequest = GetActionModulesRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getModules().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 (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 Actions Module for reusable code across actions. - */ - public CompletableFuture> create( - CreateActionModuleRequestContent request) { - return create(request, null); - } - - /** - * Create a new Actions Module for reusable code across actions. - */ - public CompletableFuture> create( - CreateActionModuleRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .build(); - 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) - .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); - } - 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, CreateActionModuleResponseContent.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 (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 a specific Actions Module by its unique identifier. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve details of a specific Actions Module by its unique identifier. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetActionModuleResponseContent.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 (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 Actions Module. This will fail if the module is still in use by any actions. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Permanently delete an Actions Module. This will fail if the module is still in use by any actions. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 412: - future.completeExceptionally(new PreconditionFailedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update properties of an existing Actions Module, such as code, dependencies, or secrets. - */ - public CompletableFuture> update(String id) { - return update(id, UpdateActionModuleRequestContent.builder().build()); - } - - /** - * Update properties of an existing Actions Module, such as code, dependencies, or secrets. - */ - public CompletableFuture> update( - String id, UpdateActionModuleRequestContent request) { - return update(id, request, null); - } - - /** - * Update properties of an existing Actions Module, such as code, dependencies, or secrets. - */ - public CompletableFuture> update( - String id, UpdateActionModuleRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateActionModuleResponseContent.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 (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; - } - - /** - * Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module. - */ - public CompletableFuture>> listActions(String id) { - return listActions(id, GetActionModuleActionsRequestParameters.builder().build()); - } - - /** - * Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module. - */ - public CompletableFuture>> listActions( - String id, GetActionModuleActionsRequestParameters request) { - return listActions(id, request, null); - } - - /** - * Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module. - */ - public CompletableFuture>> listActions( - String id, GetActionModuleActionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .addPathSegment(id) - .addPathSegments("actions"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - 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); - } - 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()) { - GetActionModuleActionsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetActionModuleActionsResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - GetActionModuleActionsRequestParameters nextRequest = - GetActionModuleActionsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getActions().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, result, parsedResponse, () -> { - try { - return listActions(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 (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; - } - - /** - * Rolls back an Actions Module's draft to a previously created version. This action copies the code, dependencies, and secrets from the specified version into the current draft. - */ - public CompletableFuture> rollback( - String id, RollbackActionModuleRequestParameters request) { - return rollback(id, request, null); - } - - /** - * Rolls back an Actions Module's draft to a previously created version. This action copies the code, dependencies, and secrets from the specified version into the current draft. - */ - public CompletableFuture> rollback( - String id, RollbackActionModuleRequestParameters request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .addPathSegment(id) - .addPathSegments("rollback") - .build(); - 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) - .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); - } - 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, RollbackActionModuleResponseContent.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 (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/actions/AsyncRawTriggersClient.java b/src/main/java/com/auth0/client/mgmt/actions/AsyncRawTriggersClient.java deleted file mode 100644 index ae37d61ff..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/AsyncRawTriggersClient.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.types.ListActionTriggersResponseContent; -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.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawTriggersClient { - protected final ClientOptions clientOptions; - - public AsyncRawTriggersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve the set of triggers currently available within actions. A trigger is an extensibility point to which actions can be bound. - */ - public CompletableFuture> list() { - return list(null); - } - - /** - * Retrieve the set of triggers currently available within actions. A trigger is an extensibility point to which actions can be bound. - */ - public CompletableFuture> list( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/triggers") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListActionTriggersResponseContent.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 (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/actions/AsyncRawVersionsClient.java b/src/main/java/com/auth0/client/mgmt/actions/AsyncRawVersionsClient.java deleted file mode 100644 index 40becad9c..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/AsyncRawVersionsClient.java +++ /dev/null @@ -1,365 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions; - -import com.auth0.client.mgmt.actions.types.ListActionVersionsRequestParameters; -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.OptionalNullable; -import com.auth0.client.mgmt.core.QueryStringMapper; -import com.auth0.client.mgmt.core.RequestOptions; -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.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.auth0.client.mgmt.types.ListActionVersionsPaginatedResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawVersionsClient { - protected final ClientOptions clientOptions; - - public AsyncRawVersionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public CompletableFuture>> list(String actionId) { - return list(actionId, ListActionVersionsRequestParameters.builder().build()); - } - - /** - * Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public CompletableFuture>> list( - String actionId, ListActionVersionsRequestParameters request) { - return list(actionId, request, null); - } - - /** - * Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public CompletableFuture>> list( - String actionId, ListActionVersionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .addPathSegment(actionId) - .addPathSegments("versions"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - 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); - } - 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()) { - ListActionVersionsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListActionVersionsPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListActionVersionsRequestParameters nextRequest = ListActionVersionsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getVersions().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, result, parsedResponse, () -> { - try { - return list(actionId, 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 (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 version of an action. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public CompletableFuture> get( - String actionId, String id) { - return get(actionId, id, null); - } - - /** - * Retrieve a specific version of an action. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public CompletableFuture> get( - String actionId, String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .addPathSegment(actionId) - .addPathSegments("versions") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetActionVersionResponseContent.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 (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; - } - - /** - * Performs the equivalent of a roll-back of an action to an earlier, specified version. Creates a new, deployed action version that is identical to the specified version. If this action is currently bound to a trigger, the system will begin executing the newly-created version immediately. - */ - public CompletableFuture> deploy( - String actionId, String id) { - return deploy(actionId, id, OptionalNullable.absent()); - } - - /** - * Performs the equivalent of a roll-back of an action to an earlier, specified version. Creates a new, deployed action version that is identical to the specified version. If this action is currently bound to a trigger, the system will begin executing the newly-created version immediately. - */ - public CompletableFuture> deploy( - String actionId, String id, OptionalNullable request) { - return deploy(actionId, id, request, null); - } - - /** - * Performs the equivalent of a roll-back of an action to an earlier, specified version. Creates a new, deployed action version that is identical to the specified version. If this action is currently bound to a trigger, the system will begin executing the newly-created version immediately. - */ - public CompletableFuture> deploy( - String actionId, - String id, - OptionalNullable request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .addPathSegment(actionId) - .addPathSegments("versions") - .addPathSegment(id) - .addPathSegments("deploy") - .build(); - RequestBody body; - try { - body = RequestBody.create("", null); - if (request.isPresent()) { - 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) - .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); - } - 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, DeployActionVersionResponseContent.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 (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/actions/AsyncTriggersClient.java b/src/main/java/com/auth0/client/mgmt/actions/AsyncTriggersClient.java deleted file mode 100644 index adad679c5..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/AsyncTriggersClient.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions; - -import com.auth0.client.mgmt.actions.triggers.AsyncBindingsClient; -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.types.ListActionTriggersResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncTriggersClient { - protected final ClientOptions clientOptions; - - private final AsyncRawTriggersClient rawClient; - - protected final Supplier bindingsClient; - - public AsyncTriggersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawTriggersClient(clientOptions); - this.bindingsClient = Suppliers.memoize(() -> new AsyncBindingsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawTriggersClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve the set of triggers currently available within actions. A trigger is an extensibility point to which actions can be bound. - */ - public CompletableFuture list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve the set of triggers currently available within actions. A trigger is an extensibility point to which actions can be bound. - */ - public CompletableFuture list(RequestOptions requestOptions) { - return this.rawClient.list(requestOptions).thenApply(response -> response.body()); - } - - public AsyncBindingsClient bindings() { - return this.bindingsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/actions/AsyncVersionsClient.java b/src/main/java/com/auth0/client/mgmt/actions/AsyncVersionsClient.java deleted file mode 100644 index 1a4501006..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/AsyncVersionsClient.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions; - -import com.auth0.client.mgmt.actions.types.ListActionVersionsRequestParameters; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.auth0.client.mgmt.core.RequestOptions; -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 java.util.concurrent.CompletableFuture; - -public class AsyncVersionsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawVersionsClient rawClient; - - public AsyncVersionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawVersionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawVersionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public CompletableFuture> list(String actionId) { - return this.rawClient.list(actionId).thenApply(response -> response.body()); - } - - /** - * Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public CompletableFuture> list( - String actionId, ListActionVersionsRequestParameters request) { - return this.rawClient.list(actionId, request).thenApply(response -> response.body()); - } - - /** - * Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public CompletableFuture> list( - String actionId, ListActionVersionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(actionId, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve a specific version of an action. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public CompletableFuture get(String actionId, String id) { - return this.rawClient.get(actionId, id).thenApply(response -> response.body()); - } - - /** - * Retrieve a specific version of an action. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public CompletableFuture get( - String actionId, String id, RequestOptions requestOptions) { - return this.rawClient.get(actionId, id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Performs the equivalent of a roll-back of an action to an earlier, specified version. Creates a new, deployed action version that is identical to the specified version. If this action is currently bound to a trigger, the system will begin executing the newly-created version immediately. - */ - public CompletableFuture deploy(String actionId, String id) { - return this.rawClient.deploy(actionId, id).thenApply(response -> response.body()); - } - - /** - * Performs the equivalent of a roll-back of an action to an earlier, specified version. Creates a new, deployed action version that is identical to the specified version. If this action is currently bound to a trigger, the system will begin executing the newly-created version immediately. - */ - public CompletableFuture deploy( - String actionId, String id, OptionalNullable request) { - return this.rawClient.deploy(actionId, id, request).thenApply(response -> response.body()); - } - - /** - * Performs the equivalent of a roll-back of an action to an earlier, specified version. Creates a new, deployed action version that is identical to the specified version. If this action is currently bound to a trigger, the system will begin executing the newly-created version immediately. - */ - public CompletableFuture deploy( - String actionId, - String id, - OptionalNullable request, - RequestOptions requestOptions) { - return this.rawClient.deploy(actionId, id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/actions/ExecutionsClient.java b/src/main/java/com/auth0/client/mgmt/actions/ExecutionsClient.java deleted file mode 100644 index e1c31bf52..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/ExecutionsClient.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.GetActionExecutionResponseContent; - -public class ExecutionsClient { - protected final ClientOptions clientOptions; - - private final RawExecutionsClient rawClient; - - public ExecutionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawExecutionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawExecutionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve information about a specific execution of a trigger. Relevant execution IDs will be included in tenant logs generated as part of that authentication flow. Executions will only be stored for 10 days after their creation. - */ - public GetActionExecutionResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve information about a specific execution of a trigger. Relevant execution IDs will be included in tenant logs generated as part of that authentication flow. Executions will only be stored for 10 days after their creation. - */ - public GetActionExecutionResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/actions/ModulesClient.java b/src/main/java/com/auth0/client/mgmt/actions/ModulesClient.java deleted file mode 100644 index ab5b9c43f..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/ModulesClient.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions; - -import com.auth0.client.mgmt.actions.modules.VersionsClient; -import com.auth0.client.mgmt.actions.types.CreateActionModuleRequestContent; -import com.auth0.client.mgmt.actions.types.GetActionModuleActionsRequestParameters; -import com.auth0.client.mgmt.actions.types.GetActionModulesRequestParameters; -import com.auth0.client.mgmt.actions.types.RollbackActionModuleRequestParameters; -import com.auth0.client.mgmt.actions.types.UpdateActionModuleRequestContent; -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.types.ActionModuleAction; -import com.auth0.client.mgmt.types.ActionModuleListItem; -import com.auth0.client.mgmt.types.CreateActionModuleResponseContent; -import com.auth0.client.mgmt.types.GetActionModuleResponseContent; -import com.auth0.client.mgmt.types.RollbackActionModuleResponseContent; -import com.auth0.client.mgmt.types.UpdateActionModuleResponseContent; -import java.util.function.Supplier; - -public class ModulesClient { - protected final ClientOptions clientOptions; - - private final RawModulesClient rawClient; - - protected final Supplier versionsClient; - - public ModulesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawModulesClient(clientOptions); - this.versionsClient = Suppliers.memoize(() -> new VersionsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawModulesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a paginated list of all Actions Modules with optional filtering and totals. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve a paginated list of all Actions Modules with optional filtering and totals. - */ - public SyncPagingIterable list(GetActionModulesRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve a paginated list of all Actions Modules with optional filtering and totals. - */ - public SyncPagingIterable list( - GetActionModulesRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create a new Actions Module for reusable code across actions. - */ - public CreateActionModuleResponseContent create(CreateActionModuleRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create a new Actions Module for reusable code across actions. - */ - public CreateActionModuleResponseContent create( - CreateActionModuleRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve details of a specific Actions Module by its unique identifier. - */ - public GetActionModuleResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve details of a specific Actions Module by its unique identifier. - */ - public GetActionModuleResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Permanently delete an Actions Module. This will fail if the module is still in use by any actions. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Permanently delete an Actions Module. This will fail if the module is still in use by any actions. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update properties of an existing Actions Module, such as code, dependencies, or secrets. - */ - public UpdateActionModuleResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update properties of an existing Actions Module, such as code, dependencies, or secrets. - */ - public UpdateActionModuleResponseContent update(String id, UpdateActionModuleRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update properties of an existing Actions Module, such as code, dependencies, or secrets. - */ - public UpdateActionModuleResponseContent update( - String id, UpdateActionModuleRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - /** - * Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module. - */ - public SyncPagingIterable listActions(String id) { - return this.rawClient.listActions(id).body(); - } - - /** - * Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module. - */ - public SyncPagingIterable listActions( - String id, GetActionModuleActionsRequestParameters request) { - return this.rawClient.listActions(id, request).body(); - } - - /** - * Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module. - */ - public SyncPagingIterable listActions( - String id, GetActionModuleActionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.listActions(id, request, requestOptions).body(); - } - - /** - * Rolls back an Actions Module's draft to a previously created version. This action copies the code, dependencies, and secrets from the specified version into the current draft. - */ - public RollbackActionModuleResponseContent rollback(String id, RollbackActionModuleRequestParameters request) { - return this.rawClient.rollback(id, request).body(); - } - - /** - * Rolls back an Actions Module's draft to a previously created version. This action copies the code, dependencies, and secrets from the specified version into the current draft. - */ - public RollbackActionModuleResponseContent rollback( - String id, RollbackActionModuleRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.rollback(id, request, requestOptions).body(); - } - - public VersionsClient versions() { - return this.versionsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/actions/RawExecutionsClient.java b/src/main/java/com/auth0/client/mgmt/actions/RawExecutionsClient.java deleted file mode 100644 index 08eef45f4..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/RawExecutionsClient.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.GetActionExecutionResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawExecutionsClient { - protected final ClientOptions clientOptions; - - public RawExecutionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve information about a specific execution of a trigger. Relevant execution IDs will be included in tenant logs generated as part of that authentication flow. Executions will only be stored for 10 days after their creation. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve information about a specific execution of a trigger. Relevant execution IDs will be included in tenant logs generated as part of that authentication flow. Executions will only be stored for 10 days after their creation. - */ - public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/executions") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetActionExecutionResponseContent.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 (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 deleted file mode 100644 index e212f80b9..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/RawModulesClient.java +++ /dev/null @@ -1,582 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions; - -import com.auth0.client.mgmt.actions.types.CreateActionModuleRequestContent; -import com.auth0.client.mgmt.actions.types.GetActionModuleActionsRequestParameters; -import com.auth0.client.mgmt.actions.types.GetActionModulesRequestParameters; -import com.auth0.client.mgmt.actions.types.RollbackActionModuleRequestParameters; -import com.auth0.client.mgmt.actions.types.UpdateActionModuleRequestContent; -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.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.PreconditionFailedError; -import com.auth0.client.mgmt.errors.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.types.ActionModuleAction; -import com.auth0.client.mgmt.types.ActionModuleListItem; -import com.auth0.client.mgmt.types.CreateActionModuleResponseContent; -import com.auth0.client.mgmt.types.GetActionModuleActionsResponseContent; -import com.auth0.client.mgmt.types.GetActionModuleResponseContent; -import com.auth0.client.mgmt.types.GetActionModulesResponseContent; -import com.auth0.client.mgmt.types.RollbackActionModuleResponseContent; -import com.auth0.client.mgmt.types.UpdateActionModuleResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawModulesClient { - protected final ClientOptions clientOptions; - - public RawModulesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a paginated list of all Actions Modules with optional filtering and totals. - */ - public ManagementApiHttpResponse> list() { - return list(GetActionModulesRequestParameters.builder().build()); - } - - /** - * Retrieve a paginated list of all Actions Modules with optional filtering and totals. - */ - public ManagementApiHttpResponse> list( - GetActionModulesRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve a paginated list of all Actions Modules with optional filtering and totals. - */ - public ManagementApiHttpResponse> list( - GetActionModulesRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - GetActionModulesResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetActionModulesResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - GetActionModulesRequestParameters nextRequest = GetActionModulesRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getModules().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a new Actions Module for reusable code across actions. - */ - public ManagementApiHttpResponse create( - CreateActionModuleRequestContent request) { - return create(request, null); - } - - /** - * Create a new Actions Module for reusable code across actions. - */ - public ManagementApiHttpResponse create( - CreateActionModuleRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .build(); - 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) - .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); - } - 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, CreateActionModuleResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details of a specific Actions Module by its unique identifier. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve details of a specific Actions Module by its unique identifier. - */ - public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetActionModuleResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Permanently delete an Actions Module. This will fail if the module is still in use by any actions. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Permanently delete an Actions Module. This will fail if the module is still in use by any actions. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 412: - throw new PreconditionFailedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update properties of an existing Actions Module, such as code, dependencies, or secrets. - */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateActionModuleRequestContent.builder().build()); - } - - /** - * Update properties of an existing Actions Module, such as code, dependencies, or secrets. - */ - public ManagementApiHttpResponse update( - String id, UpdateActionModuleRequestContent request) { - return update(id, request, null); - } - - /** - * Update properties of an existing Actions Module, such as code, dependencies, or secrets. - */ - public ManagementApiHttpResponse update( - String id, UpdateActionModuleRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateActionModuleResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module. - */ - public ManagementApiHttpResponse> listActions(String id) { - return listActions(id, GetActionModuleActionsRequestParameters.builder().build()); - } - - /** - * Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module. - */ - public ManagementApiHttpResponse> listActions( - String id, GetActionModuleActionsRequestParameters request) { - return listActions(id, request, null); - } - - /** - * Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module. - */ - public ManagementApiHttpResponse> listActions( - String id, GetActionModuleActionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .addPathSegment(id) - .addPathSegments("actions"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - GetActionModuleActionsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetActionModuleActionsResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - GetActionModuleActionsRequestParameters nextRequest = GetActionModuleActionsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getActions().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, result, parsedResponse, () -> listActions(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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Rolls back an Actions Module's draft to a previously created version. This action copies the code, dependencies, and secrets from the specified version into the current draft. - */ - public ManagementApiHttpResponse rollback( - String id, RollbackActionModuleRequestParameters request) { - return rollback(id, request, null); - } - - /** - * Rolls back an Actions Module's draft to a previously created version. This action copies the code, dependencies, and secrets from the specified version into the current draft. - */ - public ManagementApiHttpResponse rollback( - String id, RollbackActionModuleRequestParameters request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .addPathSegment(id) - .addPathSegments("rollback") - .build(); - 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) - .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); - } - 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, RollbackActionModuleResponseContent.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 (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 deleted file mode 100644 index 66437cc7b..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/RawTriggersClient.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.types.ListActionTriggersResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawTriggersClient { - protected final ClientOptions clientOptions; - - public RawTriggersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve the set of triggers currently available within actions. A trigger is an extensibility point to which actions can be bound. - */ - public ManagementApiHttpResponse list() { - return list(null); - } - - /** - * Retrieve the set of triggers currently available within actions. A trigger is an extensibility point to which actions can be bound. - */ - public ManagementApiHttpResponse list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/triggers") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListActionTriggersResponseContent.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 (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 deleted file mode 100644 index 6fb609add..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/RawVersionsClient.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions; - -import com.auth0.client.mgmt.actions.types.ListActionVersionsRequestParameters; -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.OptionalNullable; -import com.auth0.client.mgmt.core.QueryStringMapper; -import com.auth0.client.mgmt.core.RequestOptions; -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.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.auth0.client.mgmt.types.ListActionVersionsPaginatedResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawVersionsClient { - protected final ClientOptions clientOptions; - - public RawVersionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public ManagementApiHttpResponse> list(String actionId) { - return list(actionId, ListActionVersionsRequestParameters.builder().build()); - } - - /** - * Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public ManagementApiHttpResponse> list( - String actionId, ListActionVersionsRequestParameters request) { - return list(actionId, request, null); - } - - /** - * Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public ManagementApiHttpResponse> list( - String actionId, ListActionVersionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .addPathSegment(actionId) - .addPathSegments("versions"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListActionVersionsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListActionVersionsPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListActionVersionsRequestParameters nextRequest = ListActionVersionsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getVersions().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, result, parsedResponse, () -> list(actionId, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve a specific version of an action. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public ManagementApiHttpResponse get(String actionId, String id) { - return get(actionId, id, null); - } - - /** - * Retrieve a specific version of an action. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public ManagementApiHttpResponse get( - String actionId, String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .addPathSegment(actionId) - .addPathSegments("versions") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetActionVersionResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Performs the equivalent of a roll-back of an action to an earlier, specified version. Creates a new, deployed action version that is identical to the specified version. If this action is currently bound to a trigger, the system will begin executing the newly-created version immediately. - */ - public ManagementApiHttpResponse deploy(String actionId, String id) { - return deploy(actionId, id, OptionalNullable.absent()); - } - - /** - * Performs the equivalent of a roll-back of an action to an earlier, specified version. Creates a new, deployed action version that is identical to the specified version. If this action is currently bound to a trigger, the system will begin executing the newly-created version immediately. - */ - public ManagementApiHttpResponse deploy( - String actionId, String id, OptionalNullable request) { - return deploy(actionId, id, request, null); - } - - /** - * Performs the equivalent of a roll-back of an action to an earlier, specified version. Creates a new, deployed action version that is identical to the specified version. If this action is currently bound to a trigger, the system will begin executing the newly-created version immediately. - */ - public ManagementApiHttpResponse deploy( - String actionId, - String id, - OptionalNullable request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/actions") - .addPathSegment(actionId) - .addPathSegments("versions") - .addPathSegment(id) - .addPathSegments("deploy") - .build(); - RequestBody body; - try { - body = RequestBody.create("", null); - if (request.isPresent()) { - 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) - .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); - } - 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, DeployActionVersionResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/actions/TriggersClient.java b/src/main/java/com/auth0/client/mgmt/actions/TriggersClient.java deleted file mode 100644 index c2c83fcd2..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/TriggersClient.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions; - -import com.auth0.client.mgmt.actions.triggers.BindingsClient; -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.types.ListActionTriggersResponseContent; -import java.util.function.Supplier; - -public class TriggersClient { - protected final ClientOptions clientOptions; - - private final RawTriggersClient rawClient; - - protected final Supplier bindingsClient; - - public TriggersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawTriggersClient(clientOptions); - this.bindingsClient = Suppliers.memoize(() -> new BindingsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawTriggersClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve the set of triggers currently available within actions. A trigger is an extensibility point to which actions can be bound. - */ - public ListActionTriggersResponseContent list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve the set of triggers currently available within actions. A trigger is an extensibility point to which actions can be bound. - */ - public ListActionTriggersResponseContent list(RequestOptions requestOptions) { - return this.rawClient.list(requestOptions).body(); - } - - public BindingsClient bindings() { - return this.bindingsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/actions/VersionsClient.java b/src/main/java/com/auth0/client/mgmt/actions/VersionsClient.java deleted file mode 100644 index 17c991c9b..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/VersionsClient.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions; - -import com.auth0.client.mgmt.actions.types.ListActionVersionsRequestParameters; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.auth0.client.mgmt.core.RequestOptions; -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; - -public class VersionsClient { - protected final ClientOptions clientOptions; - - private final RawVersionsClient rawClient; - - public VersionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawVersionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawVersionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public SyncPagingIterable list(String actionId) { - return this.rawClient.list(actionId).body(); - } - - /** - * Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public SyncPagingIterable list(String actionId, ListActionVersionsRequestParameters request) { - return this.rawClient.list(actionId, request).body(); - } - - /** - * Retrieve all of an action's versions. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public SyncPagingIterable list( - String actionId, ListActionVersionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(actionId, request, requestOptions).body(); - } - - /** - * Retrieve a specific version of an action. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public GetActionVersionResponseContent get(String actionId, String id) { - return this.rawClient.get(actionId, id).body(); - } - - /** - * Retrieve a specific version of an action. An action version is created whenever an action is deployed. An action version is immutable, once created. - */ - public GetActionVersionResponseContent get(String actionId, String id, RequestOptions requestOptions) { - return this.rawClient.get(actionId, id, requestOptions).body(); - } - - /** - * Performs the equivalent of a roll-back of an action to an earlier, specified version. Creates a new, deployed action version that is identical to the specified version. If this action is currently bound to a trigger, the system will begin executing the newly-created version immediately. - */ - public DeployActionVersionResponseContent deploy(String actionId, String id) { - return this.rawClient.deploy(actionId, id).body(); - } - - /** - * Performs the equivalent of a roll-back of an action to an earlier, specified version. Creates a new, deployed action version that is identical to the specified version. If this action is currently bound to a trigger, the system will begin executing the newly-created version immediately. - */ - public DeployActionVersionResponseContent deploy( - String actionId, String id, OptionalNullable request) { - return this.rawClient.deploy(actionId, id, request).body(); - } - - /** - * Performs the equivalent of a roll-back of an action to an earlier, specified version. Creates a new, deployed action version that is identical to the specified version. If this action is currently bound to a trigger, the system will begin executing the newly-created version immediately. - */ - public DeployActionVersionResponseContent deploy( - String actionId, - String id, - OptionalNullable request, - RequestOptions requestOptions) { - return this.rawClient.deploy(actionId, id, request, requestOptions).body(); - } -} 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 deleted file mode 100644 index 7872850b7..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/modules/AsyncRawVersionsClient.java +++ /dev/null @@ -1,355 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.modules; - -import com.auth0.client.mgmt.actions.modules.types.GetActionModuleVersionsRequestParameters; -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.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.PreconditionFailedError; -import com.auth0.client.mgmt.errors.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.types.ActionModuleVersion; -import com.auth0.client.mgmt.types.CreateActionModuleVersionResponseContent; -import com.auth0.client.mgmt.types.GetActionModuleVersionResponseContent; -import com.auth0.client.mgmt.types.GetActionModuleVersionsResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawVersionsClient { - protected final ClientOptions clientOptions; - - public AsyncRawVersionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * List all published versions of a specific Actions Module. - */ - public CompletableFuture>> list(String id) { - return list(id, GetActionModuleVersionsRequestParameters.builder().build()); - } - - /** - * List all published versions of a specific Actions Module. - */ - public CompletableFuture>> list( - String id, GetActionModuleVersionsRequestParameters request) { - return list(id, request, null); - } - - /** - * List all published versions of a specific Actions Module. - */ - public CompletableFuture>> list( - String id, GetActionModuleVersionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .addPathSegment(id) - .addPathSegments("versions"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - 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); - } - 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()) { - GetActionModuleVersionsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetActionModuleVersionsResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - GetActionModuleVersionsRequestParameters nextRequest = - GetActionModuleVersionsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getVersions().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 (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; - } - - /** - * Creates a new immutable version of an Actions Module from the current draft version. This publishes the draft as a new version that can be referenced by actions, while maintaining the existing draft for continued development. - */ - public CompletableFuture> create(String id) { - return create(id, null); - } - - /** - * Creates a new immutable version of an Actions Module from the current draft version. This publishes the draft as a new version that can be referenced by actions, while maintaining the existing draft for continued development. - */ - public CompletableFuture> create( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .addPathSegment(id) - .addPathSegments("versions") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, CreateActionModuleVersionResponseContent.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 412: - future.completeExceptionally(new PreconditionFailedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve the details of a specific, immutable version of an Actions Module. - */ - public CompletableFuture> get( - String id, String versionId) { - return get(id, versionId, null); - } - - /** - * Retrieve the details of a specific, immutable version of an Actions Module. - */ - public CompletableFuture> get( - String id, String versionId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .addPathSegment(id) - .addPathSegments("versions") - .addPathSegment(versionId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetActionModuleVersionResponseContent.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 (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/actions/modules/AsyncVersionsClient.java b/src/main/java/com/auth0/client/mgmt/actions/modules/AsyncVersionsClient.java deleted file mode 100644 index 651e6787b..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/modules/AsyncVersionsClient.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.modules; - -import com.auth0.client.mgmt.actions.modules.types.GetActionModuleVersionsRequestParameters; -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.ActionModuleVersion; -import com.auth0.client.mgmt.types.CreateActionModuleVersionResponseContent; -import com.auth0.client.mgmt.types.GetActionModuleVersionResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncVersionsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawVersionsClient rawClient; - - public AsyncVersionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawVersionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawVersionsClient withRawResponse() { - return this.rawClient; - } - - /** - * List all published versions of a specific Actions Module. - */ - public CompletableFuture> list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - /** - * List all published versions of a specific Actions Module. - */ - public CompletableFuture> list( - String id, GetActionModuleVersionsRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - /** - * List all published versions of a specific Actions Module. - */ - public CompletableFuture> list( - String id, GetActionModuleVersionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Creates a new immutable version of an Actions Module from the current draft version. This publishes the draft as a new version that can be referenced by actions, while maintaining the existing draft for continued development. - */ - public CompletableFuture create(String id) { - return this.rawClient.create(id).thenApply(response -> response.body()); - } - - /** - * Creates a new immutable version of an Actions Module from the current draft version. This publishes the draft as a new version that can be referenced by actions, while maintaining the existing draft for continued development. - */ - public CompletableFuture create( - String id, RequestOptions requestOptions) { - return this.rawClient.create(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve the details of a specific, immutable version of an Actions Module. - */ - public CompletableFuture get(String id, String versionId) { - return this.rawClient.get(id, versionId).thenApply(response -> response.body()); - } - - /** - * Retrieve the details of a specific, immutable version of an Actions Module. - */ - public CompletableFuture get( - String id, String versionId, RequestOptions requestOptions) { - return this.rawClient.get(id, versionId, requestOptions).thenApply(response -> response.body()); - } -} 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 deleted file mode 100644 index 79a0142d3..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/modules/RawVersionsClient.java +++ /dev/null @@ -1,267 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.modules; - -import com.auth0.client.mgmt.actions.modules.types.GetActionModuleVersionsRequestParameters; -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.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.PreconditionFailedError; -import com.auth0.client.mgmt.errors.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.types.ActionModuleVersion; -import com.auth0.client.mgmt.types.CreateActionModuleVersionResponseContent; -import com.auth0.client.mgmt.types.GetActionModuleVersionResponseContent; -import com.auth0.client.mgmt.types.GetActionModuleVersionsResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawVersionsClient { - protected final ClientOptions clientOptions; - - public RawVersionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * List all published versions of a specific Actions Module. - */ - public ManagementApiHttpResponse> list(String id) { - return list(id, GetActionModuleVersionsRequestParameters.builder().build()); - } - - /** - * List all published versions of a specific Actions Module. - */ - public ManagementApiHttpResponse> list( - String id, GetActionModuleVersionsRequestParameters request) { - return list(id, request, null); - } - - /** - * List all published versions of a specific Actions Module. - */ - public ManagementApiHttpResponse> list( - String id, GetActionModuleVersionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .addPathSegment(id) - .addPathSegments("versions"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - GetActionModuleVersionsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetActionModuleVersionsResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - GetActionModuleVersionsRequestParameters nextRequest = - GetActionModuleVersionsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getVersions().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Creates a new immutable version of an Actions Module from the current draft version. This publishes the draft as a new version that can be referenced by actions, while maintaining the existing draft for continued development. - */ - public ManagementApiHttpResponse create(String id) { - return create(id, null); - } - - /** - * Creates a new immutable version of an Actions Module from the current draft version. This publishes the draft as a new version that can be referenced by actions, while maintaining the existing draft for continued development. - */ - public ManagementApiHttpResponse create( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .addPathSegment(id) - .addPathSegments("versions") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, CreateActionModuleVersionResponseContent.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 412: - throw new PreconditionFailedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve the details of a specific, immutable version of an Actions Module. - */ - public ManagementApiHttpResponse get(String id, String versionId) { - return get(id, versionId, null); - } - - /** - * Retrieve the details of a specific, immutable version of an Actions Module. - */ - public ManagementApiHttpResponse get( - String id, String versionId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/modules") - .addPathSegment(id) - .addPathSegments("versions") - .addPathSegment(versionId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetActionModuleVersionResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/actions/modules/VersionsClient.java b/src/main/java/com/auth0/client/mgmt/actions/modules/VersionsClient.java deleted file mode 100644 index 9e750b561..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/modules/VersionsClient.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.modules; - -import com.auth0.client.mgmt.actions.modules.types.GetActionModuleVersionsRequestParameters; -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.ActionModuleVersion; -import com.auth0.client.mgmt.types.CreateActionModuleVersionResponseContent; -import com.auth0.client.mgmt.types.GetActionModuleVersionResponseContent; - -public class VersionsClient { - protected final ClientOptions clientOptions; - - private final RawVersionsClient rawClient; - - public VersionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawVersionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawVersionsClient withRawResponse() { - return this.rawClient; - } - - /** - * List all published versions of a specific Actions Module. - */ - public SyncPagingIterable list(String id) { - return this.rawClient.list(id).body(); - } - - /** - * List all published versions of a specific Actions Module. - */ - public SyncPagingIterable list(String id, GetActionModuleVersionsRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - /** - * List all published versions of a specific Actions Module. - */ - public SyncPagingIterable list( - String id, GetActionModuleVersionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } - - /** - * Creates a new immutable version of an Actions Module from the current draft version. This publishes the draft as a new version that can be referenced by actions, while maintaining the existing draft for continued development. - */ - public CreateActionModuleVersionResponseContent create(String id) { - return this.rawClient.create(id).body(); - } - - /** - * Creates a new immutable version of an Actions Module from the current draft version. This publishes the draft as a new version that can be referenced by actions, while maintaining the existing draft for continued development. - */ - public CreateActionModuleVersionResponseContent create(String id, RequestOptions requestOptions) { - return this.rawClient.create(id, requestOptions).body(); - } - - /** - * Retrieve the details of a specific, immutable version of an Actions Module. - */ - public GetActionModuleVersionResponseContent get(String id, String versionId) { - return this.rawClient.get(id, versionId).body(); - } - - /** - * Retrieve the details of a specific, immutable version of an Actions Module. - */ - public GetActionModuleVersionResponseContent get(String id, String versionId, RequestOptions requestOptions) { - return this.rawClient.get(id, versionId, requestOptions).body(); - } -} 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 deleted file mode 100644 index b8958aa6c..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/modules/types/GetActionModuleVersionsRequestParameters.java +++ /dev/null @@ -1,178 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.modules.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetActionModuleVersionsRequestParameters.Builder.class) -public final class GetActionModuleVersionsRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final Map additionalProperties; - - private GetActionModuleVersionsRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Use this field to request a specific page of the list results. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return The maximum number of results to be returned by the server in a single response. 20 by default. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetActionModuleVersionsRequestParameters - && equalTo((GetActionModuleVersionsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetActionModuleVersionsRequestParameters other) { - return page.equals(other.page) && perPage.equals(other.perPage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetActionModuleVersionsRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - return this; - } - - /** - *

Use this field to request a specific page of the list results.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

The maximum number of results to be returned by the server in a single response. 20 by default.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - return this; - } - - public GetActionModuleVersionsRequestParameters build() { - return new GetActionModuleVersionsRequestParameters(page, perPage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/actions/triggers/AsyncBindingsClient.java b/src/main/java/com/auth0/client/mgmt/actions/triggers/AsyncBindingsClient.java deleted file mode 100644 index db6d66bc4..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/triggers/AsyncBindingsClient.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.triggers; - -import com.auth0.client.mgmt.actions.triggers.types.ListActionTriggerBindingsRequestParameters; -import com.auth0.client.mgmt.actions.triggers.types.UpdateActionBindingsRequestContent; -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.ActionBinding; -import com.auth0.client.mgmt.types.UpdateActionBindingsResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncBindingsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawBindingsClient rawClient; - - public AsyncBindingsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawBindingsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawBindingsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve the actions that are bound to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow. - */ - public CompletableFuture> list(String triggerId) { - return this.rawClient.list(triggerId).thenApply(response -> response.body()); - } - - /** - * Retrieve the actions that are bound to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow. - */ - public CompletableFuture> list( - String triggerId, ListActionTriggerBindingsRequestParameters request) { - return this.rawClient.list(triggerId, request).thenApply(response -> response.body()); - } - - /** - * Retrieve the actions that are bound to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow. - */ - public CompletableFuture> list( - String triggerId, ListActionTriggerBindingsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(triggerId, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed. - */ - public CompletableFuture updateMany(String triggerId) { - return this.rawClient.updateMany(triggerId).thenApply(response -> response.body()); - } - - /** - * Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed. - */ - public CompletableFuture updateMany( - String triggerId, UpdateActionBindingsRequestContent request) { - return this.rawClient.updateMany(triggerId, request).thenApply(response -> response.body()); - } - - /** - * Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed. - */ - public CompletableFuture updateMany( - String triggerId, UpdateActionBindingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.updateMany(triggerId, request, requestOptions).thenApply(response -> response.body()); - } -} 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 deleted file mode 100644 index 8e82915d3..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/triggers/AsyncRawBindingsClient.java +++ /dev/null @@ -1,265 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.triggers; - -import com.auth0.client.mgmt.actions.triggers.types.ListActionTriggerBindingsRequestParameters; -import com.auth0.client.mgmt.actions.triggers.types.UpdateActionBindingsRequestContent; -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.SyncPagingIterable; -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.types.ActionBinding; -import com.auth0.client.mgmt.types.ListActionBindingsPaginatedResponseContent; -import com.auth0.client.mgmt.types.UpdateActionBindingsResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawBindingsClient { - protected final ClientOptions clientOptions; - - public AsyncRawBindingsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve the actions that are bound to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow. - */ - public CompletableFuture>> list(String triggerId) { - return list( - triggerId, ListActionTriggerBindingsRequestParameters.builder().build()); - } - - /** - * Retrieve the actions that are bound to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow. - */ - public CompletableFuture>> list( - String triggerId, ListActionTriggerBindingsRequestParameters request) { - return list(triggerId, request, null); - } - - /** - * Retrieve the actions that are bound to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow. - */ - public CompletableFuture>> list( - String triggerId, ListActionTriggerBindingsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/triggers") - .addPathSegment(triggerId) - .addPathSegments("bindings"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - 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); - } - 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()) { - ListActionBindingsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListActionBindingsPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListActionTriggerBindingsRequestParameters nextRequest = - ListActionTriggerBindingsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getBindings().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, result, parsedResponse, () -> { - try { - return list(triggerId, 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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed. - */ - public CompletableFuture> updateMany( - String triggerId) { - return updateMany( - triggerId, UpdateActionBindingsRequestContent.builder().build()); - } - - /** - * Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed. - */ - public CompletableFuture> updateMany( - String triggerId, UpdateActionBindingsRequestContent request) { - return updateMany(triggerId, request, null); - } - - /** - * Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed. - */ - public CompletableFuture> updateMany( - String triggerId, UpdateActionBindingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/triggers") - .addPathSegment(triggerId) - .addPathSegments("bindings") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateActionBindingsResponseContent.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 (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/actions/triggers/BindingsClient.java b/src/main/java/com/auth0/client/mgmt/actions/triggers/BindingsClient.java deleted file mode 100644 index 0c1f45ec3..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/triggers/BindingsClient.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.triggers; - -import com.auth0.client.mgmt.actions.triggers.types.ListActionTriggerBindingsRequestParameters; -import com.auth0.client.mgmt.actions.triggers.types.UpdateActionBindingsRequestContent; -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.ActionBinding; -import com.auth0.client.mgmt.types.UpdateActionBindingsResponseContent; - -public class BindingsClient { - protected final ClientOptions clientOptions; - - private final RawBindingsClient rawClient; - - public BindingsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawBindingsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawBindingsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve the actions that are bound to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow. - */ - public SyncPagingIterable list(String triggerId) { - return this.rawClient.list(triggerId).body(); - } - - /** - * Retrieve the actions that are bound to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow. - */ - public SyncPagingIterable list( - String triggerId, ListActionTriggerBindingsRequestParameters request) { - return this.rawClient.list(triggerId, request).body(); - } - - /** - * Retrieve the actions that are bound to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow. - */ - public SyncPagingIterable list( - String triggerId, ListActionTriggerBindingsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(triggerId, request, requestOptions).body(); - } - - /** - * Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed. - */ - public UpdateActionBindingsResponseContent updateMany(String triggerId) { - return this.rawClient.updateMany(triggerId).body(); - } - - /** - * Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed. - */ - public UpdateActionBindingsResponseContent updateMany( - String triggerId, UpdateActionBindingsRequestContent request) { - return this.rawClient.updateMany(triggerId, request).body(); - } - - /** - * Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed. - */ - public UpdateActionBindingsResponseContent updateMany( - String triggerId, UpdateActionBindingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.updateMany(triggerId, request, requestOptions).body(); - } -} 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 deleted file mode 100644 index 31dba3936..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/triggers/RawBindingsClient.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.triggers; - -import com.auth0.client.mgmt.actions.triggers.types.ListActionTriggerBindingsRequestParameters; -import com.auth0.client.mgmt.actions.triggers.types.UpdateActionBindingsRequestContent; -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.SyncPagingIterable; -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.types.ActionBinding; -import com.auth0.client.mgmt.types.ListActionBindingsPaginatedResponseContent; -import com.auth0.client.mgmt.types.UpdateActionBindingsResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawBindingsClient { - protected final ClientOptions clientOptions; - - public RawBindingsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve the actions that are bound to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow. - */ - public ManagementApiHttpResponse> list(String triggerId) { - return list( - triggerId, ListActionTriggerBindingsRequestParameters.builder().build()); - } - - /** - * Retrieve the actions that are bound to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow. - */ - public ManagementApiHttpResponse> list( - String triggerId, ListActionTriggerBindingsRequestParameters request) { - return list(triggerId, request, null); - } - - /** - * Retrieve the actions that are bound to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow. - */ - public ManagementApiHttpResponse> list( - String triggerId, ListActionTriggerBindingsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/triggers") - .addPathSegment(triggerId) - .addPathSegments("bindings"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListActionBindingsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListActionBindingsPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListActionTriggerBindingsRequestParameters nextRequest = - ListActionTriggerBindingsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getBindings().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, result, parsedResponse, () -> list(triggerId, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed. - */ - public ManagementApiHttpResponse updateMany(String triggerId) { - return updateMany( - triggerId, UpdateActionBindingsRequestContent.builder().build()); - } - - /** - * Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed. - */ - public ManagementApiHttpResponse updateMany( - String triggerId, UpdateActionBindingsRequestContent request) { - return updateMany(triggerId, request, null); - } - - /** - * Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed. - */ - public ManagementApiHttpResponse updateMany( - String triggerId, UpdateActionBindingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("actions/triggers") - .addPathSegment(triggerId) - .addPathSegments("bindings") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateActionBindingsResponseContent.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 (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 deleted file mode 100644 index a01a1b304..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/triggers/types/ListActionTriggerBindingsRequestParameters.java +++ /dev/null @@ -1,178 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.triggers.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListActionTriggerBindingsRequestParameters.Builder.class) -public final class ListActionTriggerBindingsRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final Map additionalProperties; - - private ListActionTriggerBindingsRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Use this field to request a specific page of the list results. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return The maximum number of results to be returned in a single request. 20 by default - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListActionTriggerBindingsRequestParameters - && equalTo((ListActionTriggerBindingsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListActionTriggerBindingsRequestParameters other) { - return page.equals(other.page) && perPage.equals(other.perPage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListActionTriggerBindingsRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - return this; - } - - /** - *

Use this field to request a specific page of the list results.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

The maximum number of results to be returned in a single request. 20 by default

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - return this; - } - - public ListActionTriggerBindingsRequestParameters build() { - return new ListActionTriggerBindingsRequestParameters(page, perPage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/actions/triggers/types/UpdateActionBindingsRequestContent.java b/src/main/java/com/auth0/client/mgmt/actions/triggers/types/UpdateActionBindingsRequestContent.java deleted file mode 100644 index c65556ba6..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/triggers/types/UpdateActionBindingsRequestContent.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.triggers.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.ActionBindingWithRef; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateActionBindingsRequestContent.Builder.class) -public final class UpdateActionBindingsRequestContent { - private final Optional> bindings; - - private final Map additionalProperties; - - private UpdateActionBindingsRequestContent( - Optional> bindings, Map additionalProperties) { - this.bindings = bindings; - this.additionalProperties = additionalProperties; - } - - /** - * @return The actions that will be bound to this trigger. The order in which they are included will be the order in which they are executed. - */ - @JsonProperty("bindings") - public Optional> getBindings() { - return bindings; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateActionBindingsRequestContent - && equalTo((UpdateActionBindingsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateActionBindingsRequestContent other) { - return bindings.equals(other.bindings); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.bindings); - } - - @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> bindings = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateActionBindingsRequestContent other) { - bindings(other.getBindings()); - return this; - } - - /** - *

The actions that will be bound to this trigger. The order in which they are included will be the order in which they are executed.

- */ - @JsonSetter(value = "bindings", nulls = Nulls.SKIP) - public Builder bindings(Optional> bindings) { - this.bindings = bindings; - return this; - } - - public Builder bindings(List bindings) { - this.bindings = Optional.ofNullable(bindings); - return this; - } - - public UpdateActionBindingsRequestContent build() { - return new UpdateActionBindingsRequestContent(bindings, additionalProperties); - } - } -} 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 deleted file mode 100644 index f2e77d219..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/types/CreateActionModuleRequestContent.java +++ /dev/null @@ -1,328 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.ActionModuleDependencyRequest; -import com.auth0.client.mgmt.types.ActionModuleSecretRequest; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateActionModuleRequestContent.Builder.class) -public final class CreateActionModuleRequestContent { - private final String name; - - private final String code; - - private final Optional> secrets; - - private final Optional> dependencies; - - private final Optional apiVersion; - - private final Optional publish; - - private final Map additionalProperties; - - private CreateActionModuleRequestContent( - String name, - String code, - Optional> secrets, - Optional> dependencies, - Optional apiVersion, - Optional publish, - Map additionalProperties) { - this.name = name; - this.code = code; - this.secrets = secrets; - this.dependencies = dependencies; - this.apiVersion = apiVersion; - this.publish = publish; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the action module. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return The source code of the action module. - */ - @JsonProperty("code") - public String getCode() { - return code; - } - - /** - * @return The secrets to associate with the action module. - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - /** - * @return The npm dependencies of the action module. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return The API version of the module. - */ - @JsonProperty("api_version") - public Optional getApiVersion() { - return apiVersion; - } - - /** - * @return Whether to publish the module immediately after creation. - */ - @JsonProperty("publish") - public Optional getPublish() { - return publish; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateActionModuleRequestContent && equalTo((CreateActionModuleRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateActionModuleRequestContent other) { - return name.equals(other.name) - && code.equals(other.code) - && secrets.equals(other.secrets) - && dependencies.equals(other.dependencies) - && apiVersion.equals(other.apiVersion) - && publish.equals(other.publish); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.code, this.secrets, this.dependencies, this.apiVersion, this.publish); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

The name of the action module.

- */ - CodeStage name(@NotNull String name); - - Builder from(CreateActionModuleRequestContent other); - } - - public interface CodeStage { - /** - *

The source code of the action module.

- */ - _FinalStage code(@NotNull String code); - } - - public interface _FinalStage { - CreateActionModuleRequestContent build(); - - /** - *

The secrets to associate with the action module.

- */ - _FinalStage secrets(Optional> secrets); - - _FinalStage secrets(List secrets); - - /** - *

The npm dependencies of the action module.

- */ - _FinalStage dependencies(Optional> dependencies); - - _FinalStage dependencies(List dependencies); - - /** - *

The API version of the module.

- */ - _FinalStage apiVersion(Optional apiVersion); - - _FinalStage apiVersion(String apiVersion); - - /** - *

Whether to publish the module immediately after creation.

- */ - _FinalStage publish(Optional publish); - - _FinalStage publish(Boolean publish); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, CodeStage, _FinalStage { - private String name; - - private String code; - - private Optional publish = Optional.empty(); - - private Optional apiVersion = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateActionModuleRequestContent other) { - name(other.getName()); - code(other.getCode()); - secrets(other.getSecrets()); - dependencies(other.getDependencies()); - apiVersion(other.getApiVersion()); - publish(other.getPublish()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("name") - public CodeStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("code") - public _FinalStage code(@NotNull String code) { - this.code = Objects.requireNonNull(code, "code must not be null"); - return this; - } - - /** - *

Whether to publish the module immediately after creation.

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

Whether to publish the module immediately after creation.

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

The API version of the module.

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

The API version of the module.

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

The npm dependencies of the action module.

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

The npm dependencies of the action module.

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

The secrets to associate with the action module.

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

The secrets to associate with the action module.

- */ - @java.lang.Override - @JsonSetter(value = "secrets", nulls = Nulls.SKIP) - public _FinalStage secrets(Optional> secrets) { - this.secrets = secrets; - return this; - } - - @java.lang.Override - public CreateActionModuleRequestContent build() { - return new CreateActionModuleRequestContent( - name, code, secrets, dependencies, apiVersion, publish, additionalProperties); - } - } -} 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 deleted file mode 100644 index 363e8755f..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModuleActionsRequestParameters.java +++ /dev/null @@ -1,178 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetActionModuleActionsRequestParameters.Builder.class) -public final class GetActionModuleActionsRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final Map additionalProperties; - - private GetActionModuleActionsRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetActionModuleActionsRequestParameters - && equalTo((GetActionModuleActionsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetActionModuleActionsRequestParameters other) { - return page.equals(other.page) && perPage.equals(other.perPage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetActionModuleActionsRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - return this; - } - - public GetActionModuleActionsRequestParameters build() { - return new GetActionModuleActionsRequestParameters(page, perPage, additionalProperties); - } - } -} 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 deleted file mode 100644 index 1c3fdddfe..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/types/GetActionModulesRequestParameters.java +++ /dev/null @@ -1,177 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetActionModulesRequestParameters.Builder.class) -public final class GetActionModulesRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final Map additionalProperties; - - private GetActionModulesRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. Paging is disabled if parameter not sent. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetActionModulesRequestParameters && equalTo((GetActionModulesRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetActionModulesRequestParameters other) { - return page.equals(other.page) && perPage.equals(other.perPage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetActionModulesRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page. Paging is disabled if parameter not sent.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - return this; - } - - public GetActionModulesRequestParameters build() { - return new GetActionModulesRequestParameters(page, perPage, additionalProperties); - } - } -} 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 deleted file mode 100644 index 637473e20..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/types/ListActionVersionsRequestParameters.java +++ /dev/null @@ -1,178 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListActionVersionsRequestParameters.Builder.class) -public final class ListActionVersionsRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final Map additionalProperties; - - private ListActionVersionsRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Use this field to request a specific page of the list results. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return This field specify the maximum number of results to be returned by the server. 20 by default - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListActionVersionsRequestParameters - && equalTo((ListActionVersionsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListActionVersionsRequestParameters other) { - return page.equals(other.page) && perPage.equals(other.perPage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListActionVersionsRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - return this; - } - - /** - *

Use this field to request a specific page of the list results.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

This field specify the maximum number of results to be returned by the server. 20 by default

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - return this; - } - - public ListActionVersionsRequestParameters build() { - return new ListActionVersionsRequestParameters(page, perPage, additionalProperties); - } - } -} 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 deleted file mode 100644 index dfd5cac48..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/types/RollbackActionModuleRequestParameters.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = RollbackActionModuleRequestParameters.Builder.class) -public final class RollbackActionModuleRequestParameters { - private final String moduleVersionId; - - private final Map additionalProperties; - - private RollbackActionModuleRequestParameters(String moduleVersionId, Map additionalProperties) { - this.moduleVersionId = moduleVersionId; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the module version to roll back to. - */ - @JsonProperty("module_version_id") - public String getModuleVersionId() { - return moduleVersionId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RollbackActionModuleRequestParameters - && equalTo((RollbackActionModuleRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(RollbackActionModuleRequestParameters other) { - return moduleVersionId.equals(other.moduleVersionId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.moduleVersionId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModuleVersionIdStage builder() { - return new Builder(); - } - - public interface ModuleVersionIdStage { - /** - *

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

- */ - _FinalStage moduleVersionId(@NotNull String moduleVersionId); - - Builder from(RollbackActionModuleRequestParameters other); - } - - public interface _FinalStage { - RollbackActionModuleRequestParameters build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModuleVersionIdStage, _FinalStage { - private String moduleVersionId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(RollbackActionModuleRequestParameters other) { - moduleVersionId(other.getModuleVersionId()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("module_version_id") - public _FinalStage moduleVersionId(@NotNull String moduleVersionId) { - this.moduleVersionId = Objects.requireNonNull(moduleVersionId, "moduleVersionId must not be null"); - return this; - } - - @java.lang.Override - public RollbackActionModuleRequestParameters build() { - return new RollbackActionModuleRequestParameters(moduleVersionId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/actions/types/UpdateActionModuleRequestContent.java b/src/main/java/com/auth0/client/mgmt/actions/types/UpdateActionModuleRequestContent.java deleted file mode 100644 index 0df1aa38c..000000000 --- a/src/main/java/com/auth0/client/mgmt/actions/types/UpdateActionModuleRequestContent.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.actions.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.ActionModuleDependencyRequest; -import com.auth0.client.mgmt.types.ActionModuleSecretRequest; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateActionModuleRequestContent.Builder.class) -public final class UpdateActionModuleRequestContent { - private final Optional code; - - private final Optional> secrets; - - private final Optional> dependencies; - - private final Map additionalProperties; - - private UpdateActionModuleRequestContent( - Optional code, - Optional> secrets, - Optional> dependencies, - Map additionalProperties) { - this.code = code; - this.secrets = secrets; - this.dependencies = dependencies; - this.additionalProperties = additionalProperties; - } - - /** - * @return The source code of the action module. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The secrets to associate with the action module. - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - /** - * @return The npm dependencies of the action module. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateActionModuleRequestContent && equalTo((UpdateActionModuleRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateActionModuleRequestContent other) { - return code.equals(other.code) && secrets.equals(other.secrets) && dependencies.equals(other.dependencies); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.code, this.secrets, this.dependencies); - } - - @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 code = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateActionModuleRequestContent other) { - code(other.getCode()); - secrets(other.getSecrets()); - dependencies(other.getDependencies()); - return this; - } - - /** - *

The source code of the action module.

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

The secrets to associate with the action module.

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

The npm dependencies of the action module.

- */ - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public Builder dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - public Builder dependencies(List dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - public UpdateActionModuleRequestContent build() { - return new UpdateActionModuleRequestContent(code, secrets, dependencies, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/anomaly/AnomalyClient.java b/src/main/java/com/auth0/client/mgmt/anomaly/AnomalyClient.java deleted file mode 100644 index 40f371b17..000000000 --- a/src/main/java/com/auth0/client/mgmt/anomaly/AnomalyClient.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.anomaly; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class AnomalyClient { - protected final ClientOptions clientOptions; - - protected final Supplier blocksClient; - - public AnomalyClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.blocksClient = Suppliers.memoize(() -> new BlocksClient(clientOptions)); - } - - public BlocksClient blocks() { - return this.blocksClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/anomaly/AsyncAnomalyClient.java b/src/main/java/com/auth0/client/mgmt/anomaly/AsyncAnomalyClient.java deleted file mode 100644 index 61cda0658..000000000 --- a/src/main/java/com/auth0/client/mgmt/anomaly/AsyncAnomalyClient.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.anomaly; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class AsyncAnomalyClient { - protected final ClientOptions clientOptions; - - protected final Supplier blocksClient; - - public AsyncAnomalyClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.blocksClient = Suppliers.memoize(() -> new AsyncBlocksClient(clientOptions)); - } - - public AsyncBlocksClient blocks() { - return this.blocksClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/anomaly/AsyncBlocksClient.java b/src/main/java/com/auth0/client/mgmt/anomaly/AsyncBlocksClient.java deleted file mode 100644 index 06f784726..000000000 --- a/src/main/java/com/auth0/client/mgmt/anomaly/AsyncBlocksClient.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.anomaly; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import java.util.concurrent.CompletableFuture; - -public class AsyncBlocksClient { - protected final ClientOptions clientOptions; - - private final AsyncRawBlocksClient rawClient; - - public AsyncBlocksClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawBlocksClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawBlocksClient withRawResponse() { - return this.rawClient; - } - - /** - * Check if the given IP address is blocked via the <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> due to multiple suspicious attempts. - */ - public CompletableFuture checkIp(String id) { - return this.rawClient.checkIp(id).thenApply(response -> response.body()); - } - - /** - * Check if the given IP address is blocked via the <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> due to multiple suspicious attempts. - */ - public CompletableFuture checkIp(String id, RequestOptions requestOptions) { - return this.rawClient.checkIp(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Remove a block imposed by <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> for the given IP address. - */ - public CompletableFuture unblockIp(String id) { - return this.rawClient.unblockIp(id).thenApply(response -> response.body()); - } - - /** - * Remove a block imposed by <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> for the given IP address. - */ - public CompletableFuture unblockIp(String id, RequestOptions requestOptions) { - return this.rawClient.unblockIp(id, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/anomaly/AsyncRawBlocksClient.java b/src/main/java/com/auth0/client/mgmt/anomaly/AsyncRawBlocksClient.java deleted file mode 100644 index bf00da071..000000000 --- a/src/main/java/com/auth0/client/mgmt/anomaly/AsyncRawBlocksClient.java +++ /dev/null @@ -1,199 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.anomaly; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.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.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawBlocksClient { - protected final ClientOptions clientOptions; - - public AsyncRawBlocksClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Check if the given IP address is blocked via the <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> due to multiple suspicious attempts. - */ - public CompletableFuture> checkIp(String id) { - return checkIp(id, null); - } - - /** - * Check if the given IP address is blocked via the <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> due to multiple suspicious attempts. - */ - public CompletableFuture> checkIp(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("anomaly/blocks/ips") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - 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 (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 block imposed by <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> for the given IP address. - */ - public CompletableFuture> unblockIp(String id) { - return unblockIp(id, null); - } - - /** - * Remove a block imposed by <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> for the given IP address. - */ - public CompletableFuture> unblockIp(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("anomaly/blocks/ips") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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/anomaly/BlocksClient.java b/src/main/java/com/auth0/client/mgmt/anomaly/BlocksClient.java deleted file mode 100644 index 314e48ad2..000000000 --- a/src/main/java/com/auth0/client/mgmt/anomaly/BlocksClient.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.anomaly; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; - -public class BlocksClient { - protected final ClientOptions clientOptions; - - private final RawBlocksClient rawClient; - - public BlocksClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawBlocksClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawBlocksClient withRawResponse() { - return this.rawClient; - } - - /** - * Check if the given IP address is blocked via the <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> due to multiple suspicious attempts. - */ - public void checkIp(String id) { - this.rawClient.checkIp(id).body(); - } - - /** - * Check if the given IP address is blocked via the <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> due to multiple suspicious attempts. - */ - public void checkIp(String id, RequestOptions requestOptions) { - this.rawClient.checkIp(id, requestOptions).body(); - } - - /** - * Remove a block imposed by <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> for the given IP address. - */ - public void unblockIp(String id) { - this.rawClient.unblockIp(id).body(); - } - - /** - * Remove a block imposed by <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> for the given IP address. - */ - public void unblockIp(String id, RequestOptions requestOptions) { - this.rawClient.unblockIp(id, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/anomaly/RawBlocksClient.java b/src/main/java/com/auth0/client/mgmt/anomaly/RawBlocksClient.java deleted file mode 100644 index c712fc492..000000000 --- a/src/main/java/com/auth0/client/mgmt/anomaly/RawBlocksClient.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.anomaly; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawBlocksClient { - protected final ClientOptions clientOptions; - - public RawBlocksClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Check if the given IP address is blocked via the <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> due to multiple suspicious attempts. - */ - public ManagementApiHttpResponse checkIp(String id) { - return checkIp(id, null); - } - - /** - * Check if the given IP address is blocked via the <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> due to multiple suspicious attempts. - */ - public ManagementApiHttpResponse checkIp(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("anomaly/blocks/ips") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Remove a block imposed by <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> for the given IP address. - */ - public ManagementApiHttpResponse unblockIp(String id) { - return unblockIp(id, null); - } - - /** - * Remove a block imposed by <a href="https://auth0.com/docs/configure/attack-protection/suspicious-ip-throttling">Suspicious IP Throttling</a> for the given IP address. - */ - public ManagementApiHttpResponse unblockIp(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("anomaly/blocks/ips") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncAttackProtectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncAttackProtectionClient.java deleted file mode 100644 index cbe0ff373..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncAttackProtectionClient.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class AsyncAttackProtectionClient { - protected final ClientOptions clientOptions; - - protected final Supplier botDetectionClient; - - protected final Supplier breachedPasswordDetectionClient; - - protected final Supplier bruteForceProtectionClient; - - protected final Supplier captchaClient; - - protected final Supplier suspiciousIpThrottlingClient; - - public AsyncAttackProtectionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.botDetectionClient = Suppliers.memoize(() -> new AsyncBotDetectionClient(clientOptions)); - this.breachedPasswordDetectionClient = - Suppliers.memoize(() -> new AsyncBreachedPasswordDetectionClient(clientOptions)); - this.bruteForceProtectionClient = Suppliers.memoize(() -> new AsyncBruteForceProtectionClient(clientOptions)); - this.captchaClient = Suppliers.memoize(() -> new AsyncCaptchaClient(clientOptions)); - this.suspiciousIpThrottlingClient = - Suppliers.memoize(() -> new AsyncSuspiciousIpThrottlingClient(clientOptions)); - } - - public AsyncBotDetectionClient botDetection() { - return this.botDetectionClient.get(); - } - - public AsyncBreachedPasswordDetectionClient breachedPasswordDetection() { - return this.breachedPasswordDetectionClient.get(); - } - - public AsyncBruteForceProtectionClient bruteForceProtection() { - return this.bruteForceProtectionClient.get(); - } - - public AsyncCaptchaClient captcha() { - return this.captchaClient.get(); - } - - public AsyncSuspiciousIpThrottlingClient suspiciousIpThrottling() { - return this.suspiciousIpThrottlingClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncBotDetectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncBotDetectionClient.java deleted file mode 100644 index 523b9ff77..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncBotDetectionClient.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateBotDetectionSettingsRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.GetBotDetectionSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateBotDetectionSettingsResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncBotDetectionClient { - protected final ClientOptions clientOptions; - - private final AsyncRawBotDetectionClient rawClient; - - public AsyncBotDetectionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawBotDetectionClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawBotDetectionClient withRawResponse() { - return this.rawClient; - } - - /** - * Get the Bot Detection configuration of your tenant. - */ - public CompletableFuture get() { - return this.rawClient.get().thenApply(response -> response.body()); - } - - /** - * Get the Bot Detection configuration of your tenant. - */ - public CompletableFuture get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).thenApply(response -> response.body()); - } - - /** - * Update the Bot Detection configuration of your tenant. - */ - public CompletableFuture update() { - return this.rawClient.update().thenApply(response -> response.body()); - } - - /** - * Update the Bot Detection configuration of your tenant. - */ - public CompletableFuture update( - UpdateBotDetectionSettingsRequestContent request) { - return this.rawClient.update(request).thenApply(response -> response.body()); - } - - /** - * Update the Bot Detection configuration of your tenant. - */ - public CompletableFuture update( - UpdateBotDetectionSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncBreachedPasswordDetectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncBreachedPasswordDetectionClient.java deleted file mode 100644 index ddb5d75cf..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncBreachedPasswordDetectionClient.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateBreachedPasswordDetectionSettingsRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.GetBreachedPasswordDetectionSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateBreachedPasswordDetectionSettingsResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncBreachedPasswordDetectionClient { - protected final ClientOptions clientOptions; - - private final AsyncRawBreachedPasswordDetectionClient rawClient; - - public AsyncBreachedPasswordDetectionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawBreachedPasswordDetectionClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawBreachedPasswordDetectionClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of the Breached Password Detection configuration of your tenant. - */ - public CompletableFuture get() { - return this.rawClient.get().thenApply(response -> response.body()); - } - - /** - * Retrieve details of the Breached Password Detection configuration of your tenant. - */ - public CompletableFuture get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).thenApply(response -> response.body()); - } - - /** - * Update details of the Breached Password Detection configuration of your tenant. - */ - public CompletableFuture update() { - return this.rawClient.update().thenApply(response -> response.body()); - } - - /** - * Update details of the Breached Password Detection configuration of your tenant. - */ - public CompletableFuture update( - UpdateBreachedPasswordDetectionSettingsRequestContent request) { - return this.rawClient.update(request).thenApply(response -> response.body()); - } - - /** - * Update details of the Breached Password Detection configuration of your tenant. - */ - public CompletableFuture update( - UpdateBreachedPasswordDetectionSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncBruteForceProtectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncBruteForceProtectionClient.java deleted file mode 100644 index 4a54b4d7b..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncBruteForceProtectionClient.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateBruteForceSettingsRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.GetBruteForceSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateBruteForceSettingsResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncBruteForceProtectionClient { - protected final ClientOptions clientOptions; - - private final AsyncRawBruteForceProtectionClient rawClient; - - public AsyncBruteForceProtectionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawBruteForceProtectionClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawBruteForceProtectionClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of the Brute-force Protection configuration of your tenant. - */ - public CompletableFuture get() { - return this.rawClient.get().thenApply(response -> response.body()); - } - - /** - * Retrieve details of the Brute-force Protection configuration of your tenant. - */ - public CompletableFuture get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).thenApply(response -> response.body()); - } - - /** - * Update the Brute-force Protection configuration of your tenant. - */ - public CompletableFuture update() { - return this.rawClient.update().thenApply(response -> response.body()); - } - - /** - * Update the Brute-force Protection configuration of your tenant. - */ - public CompletableFuture update( - UpdateBruteForceSettingsRequestContent request) { - return this.rawClient.update(request).thenApply(response -> response.body()); - } - - /** - * Update the Brute-force Protection configuration of your tenant. - */ - public CompletableFuture update( - UpdateBruteForceSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncCaptchaClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncCaptchaClient.java deleted file mode 100644 index 64ccef632..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncCaptchaClient.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateAttackProtectionCaptchaRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.GetAttackProtectionCaptchaResponseContent; -import com.auth0.client.mgmt.types.UpdateAttackProtectionCaptchaResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncCaptchaClient { - protected final ClientOptions clientOptions; - - private final AsyncRawCaptchaClient rawClient; - - public AsyncCaptchaClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawCaptchaClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawCaptchaClient withRawResponse() { - return this.rawClient; - } - - /** - * Get the CAPTCHA configuration for your client. - */ - public CompletableFuture get() { - return this.rawClient.get().thenApply(response -> response.body()); - } - - /** - * Get the CAPTCHA configuration for your client. - */ - public CompletableFuture get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).thenApply(response -> response.body()); - } - - /** - * Update existing CAPTCHA configuration for your client. - */ - public CompletableFuture update() { - return this.rawClient.update().thenApply(response -> response.body()); - } - - /** - * Update existing CAPTCHA configuration for your client. - */ - public CompletableFuture update( - UpdateAttackProtectionCaptchaRequestContent request) { - return this.rawClient.update(request).thenApply(response -> response.body()); - } - - /** - * Update existing CAPTCHA configuration for your client. - */ - public CompletableFuture update( - UpdateAttackProtectionCaptchaRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBotDetectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBotDetectionClient.java deleted file mode 100644 index c8d7f6f83..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBotDetectionClient.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateBotDetectionSettingsRequestContent; -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.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.GetBotDetectionSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateBotDetectionSettingsResponseContent; -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 AsyncRawBotDetectionClient { - protected final ClientOptions clientOptions; - - public AsyncRawBotDetectionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Get the Bot Detection configuration of your tenant. - */ - public CompletableFuture> get() { - return get(null); - } - - /** - * Get the Bot Detection configuration of your tenant. - */ - public CompletableFuture> get( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/bot-detection") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetBotDetectionSettingsResponseContent.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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update the Bot Detection configuration of your tenant. - */ - public CompletableFuture> update() { - return update(UpdateBotDetectionSettingsRequestContent.builder().build()); - } - - /** - * Update the Bot Detection configuration of your tenant. - */ - public CompletableFuture> update( - UpdateBotDetectionSettingsRequestContent request) { - return update(request, null); - } - - /** - * Update the Bot Detection configuration of your tenant. - */ - public CompletableFuture> update( - UpdateBotDetectionSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/bot-detection") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateBotDetectionSettingsResponseContent.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 (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/attackprotection/AsyncRawBreachedPasswordDetectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBreachedPasswordDetectionClient.java deleted file mode 100644 index c65c2610b..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBreachedPasswordDetectionClient.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateBreachedPasswordDetectionSettingsRequestContent; -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.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.types.GetBreachedPasswordDetectionSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateBreachedPasswordDetectionSettingsResponseContent; -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 AsyncRawBreachedPasswordDetectionClient { - protected final ClientOptions clientOptions; - - public AsyncRawBreachedPasswordDetectionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of the Breached Password Detection configuration of your tenant. - */ - public CompletableFuture> get() { - return get(null); - } - - /** - * Retrieve details of the Breached Password Detection configuration of your tenant. - */ - public CompletableFuture> get( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/breached-password-detection") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetBreachedPasswordDetectionSettingsResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update details of the Breached Password Detection configuration of your tenant. - */ - public CompletableFuture> - update() { - return update( - UpdateBreachedPasswordDetectionSettingsRequestContent.builder().build()); - } - - /** - * Update details of the Breached Password Detection configuration of your tenant. - */ - public CompletableFuture> update( - UpdateBreachedPasswordDetectionSettingsRequestContent request) { - return update(request, null); - } - - /** - * Update details of the Breached Password Detection configuration of your tenant. - */ - public CompletableFuture> update( - UpdateBreachedPasswordDetectionSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/breached-password-detection") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, - UpdateBreachedPasswordDetectionSettingsResponseContent.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 (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/attackprotection/AsyncRawBruteForceProtectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBruteForceProtectionClient.java deleted file mode 100644 index 1f84ba98c..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawBruteForceProtectionClient.java +++ /dev/null @@ -1,217 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateBruteForceSettingsRequestContent; -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.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.types.GetBruteForceSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateBruteForceSettingsResponseContent; -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 AsyncRawBruteForceProtectionClient { - protected final ClientOptions clientOptions; - - public AsyncRawBruteForceProtectionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of the Brute-force Protection configuration of your tenant. - */ - public CompletableFuture> get() { - return get(null); - } - - /** - * Retrieve details of the Brute-force Protection configuration of your tenant. - */ - public CompletableFuture> get( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/brute-force-protection") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetBruteForceSettingsResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update the Brute-force Protection configuration of your tenant. - */ - public CompletableFuture> update() { - return update(UpdateBruteForceSettingsRequestContent.builder().build()); - } - - /** - * Update the Brute-force Protection configuration of your tenant. - */ - public CompletableFuture> update( - UpdateBruteForceSettingsRequestContent request) { - return update(request, null); - } - - /** - * Update the Brute-force Protection configuration of your tenant. - */ - public CompletableFuture> update( - UpdateBruteForceSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/brute-force-protection") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateBruteForceSettingsResponseContent.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 (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/attackprotection/AsyncRawCaptchaClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawCaptchaClient.java deleted file mode 100644 index d0f1cd3e6..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawCaptchaClient.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateAttackProtectionCaptchaRequestContent; -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.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.GetAttackProtectionCaptchaResponseContent; -import com.auth0.client.mgmt.types.UpdateAttackProtectionCaptchaResponseContent; -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 AsyncRawCaptchaClient { - protected final ClientOptions clientOptions; - - public AsyncRawCaptchaClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Get the CAPTCHA configuration for your client. - */ - public CompletableFuture> get() { - return get(null); - } - - /** - * Get the CAPTCHA configuration for your client. - */ - public CompletableFuture> get( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/captcha") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetAttackProtectionCaptchaResponseContent.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 (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 existing CAPTCHA configuration for your client. - */ - public CompletableFuture> update() { - return update(UpdateAttackProtectionCaptchaRequestContent.builder().build()); - } - - /** - * Update existing CAPTCHA configuration for your client. - */ - public CompletableFuture> update( - UpdateAttackProtectionCaptchaRequestContent request) { - return update(request, null); - } - - /** - * Update existing CAPTCHA configuration for your client. - */ - public CompletableFuture> update( - UpdateAttackProtectionCaptchaRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/captcha") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateAttackProtectionCaptchaResponseContent.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 (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/attackprotection/AsyncRawSuspiciousIpThrottlingClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawSuspiciousIpThrottlingClient.java deleted file mode 100644 index d303ebe71..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncRawSuspiciousIpThrottlingClient.java +++ /dev/null @@ -1,218 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateSuspiciousIpThrottlingSettingsRequestContent; -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.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.types.GetSuspiciousIpThrottlingSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateSuspiciousIpThrottlingSettingsResponseContent; -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 AsyncRawSuspiciousIpThrottlingClient { - protected final ClientOptions clientOptions; - - public AsyncRawSuspiciousIpThrottlingClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of the Suspicious IP Throttling configuration of your tenant. - */ - public CompletableFuture> get() { - return get(null); - } - - /** - * Retrieve details of the Suspicious IP Throttling configuration of your tenant. - */ - public CompletableFuture> get( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/suspicious-ip-throttling") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetSuspiciousIpThrottlingSettingsResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update the details of the Suspicious IP Throttling configuration of your tenant. - */ - public CompletableFuture> update() { - return update( - UpdateSuspiciousIpThrottlingSettingsRequestContent.builder().build()); - } - - /** - * Update the details of the Suspicious IP Throttling configuration of your tenant. - */ - public CompletableFuture> update( - UpdateSuspiciousIpThrottlingSettingsRequestContent request) { - return update(request, null); - } - - /** - * Update the details of the Suspicious IP Throttling configuration of your tenant. - */ - public CompletableFuture> update( - UpdateSuspiciousIpThrottlingSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/suspicious-ip-throttling") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateSuspiciousIpThrottlingSettingsResponseContent.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 (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/attackprotection/AsyncSuspiciousIpThrottlingClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncSuspiciousIpThrottlingClient.java deleted file mode 100644 index ffe8ab679..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AsyncSuspiciousIpThrottlingClient.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateSuspiciousIpThrottlingSettingsRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.GetSuspiciousIpThrottlingSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateSuspiciousIpThrottlingSettingsResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncSuspiciousIpThrottlingClient { - protected final ClientOptions clientOptions; - - private final AsyncRawSuspiciousIpThrottlingClient rawClient; - - public AsyncSuspiciousIpThrottlingClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawSuspiciousIpThrottlingClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawSuspiciousIpThrottlingClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of the Suspicious IP Throttling configuration of your tenant. - */ - public CompletableFuture get() { - return this.rawClient.get().thenApply(response -> response.body()); - } - - /** - * Retrieve details of the Suspicious IP Throttling configuration of your tenant. - */ - public CompletableFuture get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).thenApply(response -> response.body()); - } - - /** - * Update the details of the Suspicious IP Throttling configuration of your tenant. - */ - public CompletableFuture update() { - return this.rawClient.update().thenApply(response -> response.body()); - } - - /** - * Update the details of the Suspicious IP Throttling configuration of your tenant. - */ - public CompletableFuture update( - UpdateSuspiciousIpThrottlingSettingsRequestContent request) { - return this.rawClient.update(request).thenApply(response -> response.body()); - } - - /** - * Update the details of the Suspicious IP Throttling configuration of your tenant. - */ - public CompletableFuture update( - UpdateSuspiciousIpThrottlingSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/AttackProtectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/AttackProtectionClient.java deleted file mode 100644 index d791fe54c..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/AttackProtectionClient.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class AttackProtectionClient { - protected final ClientOptions clientOptions; - - protected final Supplier botDetectionClient; - - protected final Supplier breachedPasswordDetectionClient; - - protected final Supplier bruteForceProtectionClient; - - protected final Supplier captchaClient; - - protected final Supplier suspiciousIpThrottlingClient; - - public AttackProtectionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.botDetectionClient = Suppliers.memoize(() -> new BotDetectionClient(clientOptions)); - this.breachedPasswordDetectionClient = - Suppliers.memoize(() -> new BreachedPasswordDetectionClient(clientOptions)); - this.bruteForceProtectionClient = Suppliers.memoize(() -> new BruteForceProtectionClient(clientOptions)); - this.captchaClient = Suppliers.memoize(() -> new CaptchaClient(clientOptions)); - this.suspiciousIpThrottlingClient = Suppliers.memoize(() -> new SuspiciousIpThrottlingClient(clientOptions)); - } - - public BotDetectionClient botDetection() { - return this.botDetectionClient.get(); - } - - public BreachedPasswordDetectionClient breachedPasswordDetection() { - return this.breachedPasswordDetectionClient.get(); - } - - public BruteForceProtectionClient bruteForceProtection() { - return this.bruteForceProtectionClient.get(); - } - - public CaptchaClient captcha() { - return this.captchaClient.get(); - } - - public SuspiciousIpThrottlingClient suspiciousIpThrottling() { - return this.suspiciousIpThrottlingClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/BotDetectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/BotDetectionClient.java deleted file mode 100644 index 471691e24..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/BotDetectionClient.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateBotDetectionSettingsRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.GetBotDetectionSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateBotDetectionSettingsResponseContent; - -public class BotDetectionClient { - protected final ClientOptions clientOptions; - - private final RawBotDetectionClient rawClient; - - public BotDetectionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawBotDetectionClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawBotDetectionClient withRawResponse() { - return this.rawClient; - } - - /** - * Get the Bot Detection configuration of your tenant. - */ - public GetBotDetectionSettingsResponseContent get() { - return this.rawClient.get().body(); - } - - /** - * Get the Bot Detection configuration of your tenant. - */ - public GetBotDetectionSettingsResponseContent get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).body(); - } - - /** - * Update the Bot Detection configuration of your tenant. - */ - public UpdateBotDetectionSettingsResponseContent update() { - return this.rawClient.update().body(); - } - - /** - * Update the Bot Detection configuration of your tenant. - */ - public UpdateBotDetectionSettingsResponseContent update(UpdateBotDetectionSettingsRequestContent request) { - return this.rawClient.update(request).body(); - } - - /** - * Update the Bot Detection configuration of your tenant. - */ - public UpdateBotDetectionSettingsResponseContent update( - UpdateBotDetectionSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/BreachedPasswordDetectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/BreachedPasswordDetectionClient.java deleted file mode 100644 index a2746f1ef..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/BreachedPasswordDetectionClient.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateBreachedPasswordDetectionSettingsRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.GetBreachedPasswordDetectionSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateBreachedPasswordDetectionSettingsResponseContent; - -public class BreachedPasswordDetectionClient { - protected final ClientOptions clientOptions; - - private final RawBreachedPasswordDetectionClient rawClient; - - public BreachedPasswordDetectionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawBreachedPasswordDetectionClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawBreachedPasswordDetectionClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of the Breached Password Detection configuration of your tenant. - */ - public GetBreachedPasswordDetectionSettingsResponseContent get() { - return this.rawClient.get().body(); - } - - /** - * Retrieve details of the Breached Password Detection configuration of your tenant. - */ - public GetBreachedPasswordDetectionSettingsResponseContent get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).body(); - } - - /** - * Update details of the Breached Password Detection configuration of your tenant. - */ - public UpdateBreachedPasswordDetectionSettingsResponseContent update() { - return this.rawClient.update().body(); - } - - /** - * Update details of the Breached Password Detection configuration of your tenant. - */ - public UpdateBreachedPasswordDetectionSettingsResponseContent update( - UpdateBreachedPasswordDetectionSettingsRequestContent request) { - return this.rawClient.update(request).body(); - } - - /** - * Update details of the Breached Password Detection configuration of your tenant. - */ - public UpdateBreachedPasswordDetectionSettingsResponseContent update( - UpdateBreachedPasswordDetectionSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/BruteForceProtectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/BruteForceProtectionClient.java deleted file mode 100644 index be1c4a722..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/BruteForceProtectionClient.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateBruteForceSettingsRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.GetBruteForceSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateBruteForceSettingsResponseContent; - -public class BruteForceProtectionClient { - protected final ClientOptions clientOptions; - - private final RawBruteForceProtectionClient rawClient; - - public BruteForceProtectionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawBruteForceProtectionClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawBruteForceProtectionClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of the Brute-force Protection configuration of your tenant. - */ - public GetBruteForceSettingsResponseContent get() { - return this.rawClient.get().body(); - } - - /** - * Retrieve details of the Brute-force Protection configuration of your tenant. - */ - public GetBruteForceSettingsResponseContent get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).body(); - } - - /** - * Update the Brute-force Protection configuration of your tenant. - */ - public UpdateBruteForceSettingsResponseContent update() { - return this.rawClient.update().body(); - } - - /** - * Update the Brute-force Protection configuration of your tenant. - */ - public UpdateBruteForceSettingsResponseContent update(UpdateBruteForceSettingsRequestContent request) { - return this.rawClient.update(request).body(); - } - - /** - * Update the Brute-force Protection configuration of your tenant. - */ - public UpdateBruteForceSettingsResponseContent update( - UpdateBruteForceSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/CaptchaClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/CaptchaClient.java deleted file mode 100644 index 8e11badfc..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/CaptchaClient.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateAttackProtectionCaptchaRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.GetAttackProtectionCaptchaResponseContent; -import com.auth0.client.mgmt.types.UpdateAttackProtectionCaptchaResponseContent; - -public class CaptchaClient { - protected final ClientOptions clientOptions; - - private final RawCaptchaClient rawClient; - - public CaptchaClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawCaptchaClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawCaptchaClient withRawResponse() { - return this.rawClient; - } - - /** - * Get the CAPTCHA configuration for your client. - */ - public GetAttackProtectionCaptchaResponseContent get() { - return this.rawClient.get().body(); - } - - /** - * Get the CAPTCHA configuration for your client. - */ - public GetAttackProtectionCaptchaResponseContent get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).body(); - } - - /** - * Update existing CAPTCHA configuration for your client. - */ - public UpdateAttackProtectionCaptchaResponseContent update() { - return this.rawClient.update().body(); - } - - /** - * Update existing CAPTCHA configuration for your client. - */ - public UpdateAttackProtectionCaptchaResponseContent update(UpdateAttackProtectionCaptchaRequestContent request) { - return this.rawClient.update(request).body(); - } - - /** - * Update existing CAPTCHA configuration for your client. - */ - public UpdateAttackProtectionCaptchaResponseContent update( - UpdateAttackProtectionCaptchaRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/RawBotDetectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/RawBotDetectionClient.java deleted file mode 100644 index 8ba3bfe69..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/RawBotDetectionClient.java +++ /dev/null @@ -1,177 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateBotDetectionSettingsRequestContent; -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.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.GetBotDetectionSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateBotDetectionSettingsResponseContent; -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 RawBotDetectionClient { - protected final ClientOptions clientOptions; - - public RawBotDetectionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Get the Bot Detection configuration of your tenant. - */ - public ManagementApiHttpResponse get() { - return get(null); - } - - /** - * Get the Bot Detection configuration of your tenant. - */ - public ManagementApiHttpResponse get(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/bot-detection") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetBotDetectionSettingsResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update the Bot Detection configuration of your tenant. - */ - public ManagementApiHttpResponse update() { - return update(UpdateBotDetectionSettingsRequestContent.builder().build()); - } - - /** - * Update the Bot Detection configuration of your tenant. - */ - public ManagementApiHttpResponse update( - UpdateBotDetectionSettingsRequestContent request) { - return update(request, null); - } - - /** - * Update the Bot Detection configuration of your tenant. - */ - public ManagementApiHttpResponse update( - UpdateBotDetectionSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/bot-detection") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateBotDetectionSettingsResponseContent.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 (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 deleted file mode 100644 index 7839a7ff7..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/RawBreachedPasswordDetectionClient.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateBreachedPasswordDetectionSettingsRequestContent; -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.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.types.GetBreachedPasswordDetectionSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateBreachedPasswordDetectionSettingsResponseContent; -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 RawBreachedPasswordDetectionClient { - protected final ClientOptions clientOptions; - - public RawBreachedPasswordDetectionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of the Breached Password Detection configuration of your tenant. - */ - public ManagementApiHttpResponse get() { - return get(null); - } - - /** - * Retrieve details of the Breached Password Detection configuration of your tenant. - */ - public ManagementApiHttpResponse get( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/breached-password-detection") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetBreachedPasswordDetectionSettingsResponseContent.class), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update details of the Breached Password Detection configuration of your tenant. - */ - public ManagementApiHttpResponse update() { - return update( - UpdateBreachedPasswordDetectionSettingsRequestContent.builder().build()); - } - - /** - * Update details of the Breached Password Detection configuration of your tenant. - */ - public ManagementApiHttpResponse update( - UpdateBreachedPasswordDetectionSettingsRequestContent request) { - return update(request, null); - } - - /** - * Update details of the Breached Password Detection configuration of your tenant. - */ - public ManagementApiHttpResponse update( - UpdateBreachedPasswordDetectionSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/breached-password-detection") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateBreachedPasswordDetectionSettingsResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/RawBruteForceProtectionClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/RawBruteForceProtectionClient.java deleted file mode 100644 index 935f9de72..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/RawBruteForceProtectionClient.java +++ /dev/null @@ -1,170 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateBruteForceSettingsRequestContent; -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.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.types.GetBruteForceSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateBruteForceSettingsResponseContent; -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 RawBruteForceProtectionClient { - protected final ClientOptions clientOptions; - - public RawBruteForceProtectionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of the Brute-force Protection configuration of your tenant. - */ - public ManagementApiHttpResponse get() { - return get(null); - } - - /** - * Retrieve details of the Brute-force Protection configuration of your tenant. - */ - public ManagementApiHttpResponse get(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/brute-force-protection") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetBruteForceSettingsResponseContent.class), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update the Brute-force Protection configuration of your tenant. - */ - public ManagementApiHttpResponse update() { - return update(UpdateBruteForceSettingsRequestContent.builder().build()); - } - - /** - * Update the Brute-force Protection configuration of your tenant. - */ - public ManagementApiHttpResponse update( - UpdateBruteForceSettingsRequestContent request) { - return update(request, null); - } - - /** - * Update the Brute-force Protection configuration of your tenant. - */ - public ManagementApiHttpResponse update( - UpdateBruteForceSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/brute-force-protection") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateBruteForceSettingsResponseContent.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 (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 deleted file mode 100644 index e88cc0bd8..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/RawCaptchaClient.java +++ /dev/null @@ -1,173 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateAttackProtectionCaptchaRequestContent; -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.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.GetAttackProtectionCaptchaResponseContent; -import com.auth0.client.mgmt.types.UpdateAttackProtectionCaptchaResponseContent; -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 RawCaptchaClient { - protected final ClientOptions clientOptions; - - public RawCaptchaClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Get the CAPTCHA configuration for your client. - */ - public ManagementApiHttpResponse get() { - return get(null); - } - - /** - * Get the CAPTCHA configuration for your client. - */ - public ManagementApiHttpResponse get(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/captcha") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetAttackProtectionCaptchaResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update existing CAPTCHA configuration for your client. - */ - public ManagementApiHttpResponse update() { - return update(UpdateAttackProtectionCaptchaRequestContent.builder().build()); - } - - /** - * Update existing CAPTCHA configuration for your client. - */ - public ManagementApiHttpResponse update( - UpdateAttackProtectionCaptchaRequestContent request) { - return update(request, null); - } - - /** - * Update existing CAPTCHA configuration for your client. - */ - public ManagementApiHttpResponse update( - UpdateAttackProtectionCaptchaRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/captcha") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateAttackProtectionCaptchaResponseContent.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 (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 deleted file mode 100644 index d1ce48e46..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/RawSuspiciousIpThrottlingClient.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateSuspiciousIpThrottlingSettingsRequestContent; -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.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.types.GetSuspiciousIpThrottlingSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateSuspiciousIpThrottlingSettingsResponseContent; -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 RawSuspiciousIpThrottlingClient { - protected final ClientOptions clientOptions; - - public RawSuspiciousIpThrottlingClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of the Suspicious IP Throttling configuration of your tenant. - */ - public ManagementApiHttpResponse get() { - return get(null); - } - - /** - * Retrieve details of the Suspicious IP Throttling configuration of your tenant. - */ - public ManagementApiHttpResponse get( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/suspicious-ip-throttling") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetSuspiciousIpThrottlingSettingsResponseContent.class), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update the details of the Suspicious IP Throttling configuration of your tenant. - */ - public ManagementApiHttpResponse update() { - return update( - UpdateSuspiciousIpThrottlingSettingsRequestContent.builder().build()); - } - - /** - * Update the details of the Suspicious IP Throttling configuration of your tenant. - */ - public ManagementApiHttpResponse update( - UpdateSuspiciousIpThrottlingSettingsRequestContent request) { - return update(request, null); - } - - /** - * Update the details of the Suspicious IP Throttling configuration of your tenant. - */ - public ManagementApiHttpResponse update( - UpdateSuspiciousIpThrottlingSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("attack-protection/suspicious-ip-throttling") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateSuspiciousIpThrottlingSettingsResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/SuspiciousIpThrottlingClient.java b/src/main/java/com/auth0/client/mgmt/attackprotection/SuspiciousIpThrottlingClient.java deleted file mode 100644 index d9243811d..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/SuspiciousIpThrottlingClient.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection; - -import com.auth0.client.mgmt.attackprotection.types.UpdateSuspiciousIpThrottlingSettingsRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.GetSuspiciousIpThrottlingSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateSuspiciousIpThrottlingSettingsResponseContent; - -public class SuspiciousIpThrottlingClient { - protected final ClientOptions clientOptions; - - private final RawSuspiciousIpThrottlingClient rawClient; - - public SuspiciousIpThrottlingClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawSuspiciousIpThrottlingClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawSuspiciousIpThrottlingClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of the Suspicious IP Throttling configuration of your tenant. - */ - public GetSuspiciousIpThrottlingSettingsResponseContent get() { - return this.rawClient.get().body(); - } - - /** - * Retrieve details of the Suspicious IP Throttling configuration of your tenant. - */ - public GetSuspiciousIpThrottlingSettingsResponseContent get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).body(); - } - - /** - * Update the details of the Suspicious IP Throttling configuration of your tenant. - */ - public UpdateSuspiciousIpThrottlingSettingsResponseContent update() { - return this.rawClient.update().body(); - } - - /** - * Update the details of the Suspicious IP Throttling configuration of your tenant. - */ - public UpdateSuspiciousIpThrottlingSettingsResponseContent update( - UpdateSuspiciousIpThrottlingSettingsRequestContent request) { - return this.rawClient.update(request).body(); - } - - /** - * Update the details of the Suspicious IP Throttling configuration of your tenant. - */ - public UpdateSuspiciousIpThrottlingSettingsResponseContent update( - UpdateSuspiciousIpThrottlingSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/types/UpdateAttackProtectionCaptchaRequestContent.java b/src/main/java/com/auth0/client/mgmt/attackprotection/types/UpdateAttackProtectionCaptchaRequestContent.java deleted file mode 100644 index ec5231efd..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/types/UpdateAttackProtectionCaptchaRequestContent.java +++ /dev/null @@ -1,291 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.AttackProtectionCaptchaAuthChallengeRequest; -import com.auth0.client.mgmt.types.AttackProtectionCaptchaProviderId; -import com.auth0.client.mgmt.types.AttackProtectionUpdateCaptchaArkose; -import com.auth0.client.mgmt.types.AttackProtectionUpdateCaptchaFriendlyCaptcha; -import com.auth0.client.mgmt.types.AttackProtectionUpdateCaptchaHcaptcha; -import com.auth0.client.mgmt.types.AttackProtectionUpdateCaptchaRecaptchaEnterprise; -import com.auth0.client.mgmt.types.AttackProtectionUpdateCaptchaRecaptchaV2; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateAttackProtectionCaptchaRequestContent.Builder.class) -public final class UpdateAttackProtectionCaptchaRequestContent { - private final Optional activeProviderId; - - private final Optional arkose; - - private final Optional authChallenge; - - private final Optional hcaptcha; - - private final Optional friendlyCaptcha; - - private final Optional recaptchaEnterprise; - - private final Optional recaptchaV2; - - private final Optional> simpleCaptcha; - - private final Map additionalProperties; - - private UpdateAttackProtectionCaptchaRequestContent( - Optional activeProviderId, - Optional arkose, - Optional authChallenge, - Optional hcaptcha, - Optional friendlyCaptcha, - Optional recaptchaEnterprise, - Optional recaptchaV2, - Optional> simpleCaptcha, - Map additionalProperties) { - this.activeProviderId = activeProviderId; - this.arkose = arkose; - this.authChallenge = authChallenge; - this.hcaptcha = hcaptcha; - this.friendlyCaptcha = friendlyCaptcha; - this.recaptchaEnterprise = recaptchaEnterprise; - this.recaptchaV2 = recaptchaV2; - this.simpleCaptcha = simpleCaptcha; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("active_provider_id") - public Optional getActiveProviderId() { - return activeProviderId; - } - - @JsonProperty("arkose") - public Optional getArkose() { - return arkose; - } - - @JsonProperty("auth_challenge") - public Optional getAuthChallenge() { - return authChallenge; - } - - @JsonProperty("hcaptcha") - public Optional getHcaptcha() { - return hcaptcha; - } - - @JsonProperty("friendly_captcha") - public Optional getFriendlyCaptcha() { - return friendlyCaptcha; - } - - @JsonProperty("recaptcha_enterprise") - public Optional getRecaptchaEnterprise() { - return recaptchaEnterprise; - } - - @JsonProperty("recaptcha_v2") - public Optional getRecaptchaV2() { - return recaptchaV2; - } - - @JsonProperty("simple_captcha") - public Optional> getSimpleCaptcha() { - return simpleCaptcha; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateAttackProtectionCaptchaRequestContent - && equalTo((UpdateAttackProtectionCaptchaRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateAttackProtectionCaptchaRequestContent other) { - return activeProviderId.equals(other.activeProviderId) - && arkose.equals(other.arkose) - && authChallenge.equals(other.authChallenge) - && hcaptcha.equals(other.hcaptcha) - && friendlyCaptcha.equals(other.friendlyCaptcha) - && recaptchaEnterprise.equals(other.recaptchaEnterprise) - && recaptchaV2.equals(other.recaptchaV2) - && simpleCaptcha.equals(other.simpleCaptcha); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.activeProviderId, - this.arkose, - this.authChallenge, - this.hcaptcha, - this.friendlyCaptcha, - this.recaptchaEnterprise, - this.recaptchaV2, - this.simpleCaptcha); - } - - @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 activeProviderId = Optional.empty(); - - private Optional arkose = Optional.empty(); - - private Optional authChallenge = Optional.empty(); - - private Optional hcaptcha = Optional.empty(); - - private Optional friendlyCaptcha = Optional.empty(); - - private Optional recaptchaEnterprise = Optional.empty(); - - private Optional recaptchaV2 = Optional.empty(); - - private Optional> simpleCaptcha = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateAttackProtectionCaptchaRequestContent other) { - activeProviderId(other.getActiveProviderId()); - arkose(other.getArkose()); - authChallenge(other.getAuthChallenge()); - hcaptcha(other.getHcaptcha()); - friendlyCaptcha(other.getFriendlyCaptcha()); - recaptchaEnterprise(other.getRecaptchaEnterprise()); - recaptchaV2(other.getRecaptchaV2()); - simpleCaptcha(other.getSimpleCaptcha()); - return this; - } - - @JsonSetter(value = "active_provider_id", nulls = Nulls.SKIP) - public Builder activeProviderId(Optional activeProviderId) { - this.activeProviderId = activeProviderId; - return this; - } - - public Builder activeProviderId(AttackProtectionCaptchaProviderId activeProviderId) { - this.activeProviderId = Optional.ofNullable(activeProviderId); - return this; - } - - @JsonSetter(value = "arkose", nulls = Nulls.SKIP) - public Builder arkose(Optional arkose) { - this.arkose = arkose; - return this; - } - - public Builder arkose(AttackProtectionUpdateCaptchaArkose arkose) { - this.arkose = Optional.ofNullable(arkose); - return this; - } - - @JsonSetter(value = "auth_challenge", nulls = Nulls.SKIP) - public Builder authChallenge(Optional authChallenge) { - this.authChallenge = authChallenge; - return this; - } - - public Builder authChallenge(AttackProtectionCaptchaAuthChallengeRequest authChallenge) { - this.authChallenge = Optional.ofNullable(authChallenge); - return this; - } - - @JsonSetter(value = "hcaptcha", nulls = Nulls.SKIP) - public Builder hcaptcha(Optional hcaptcha) { - this.hcaptcha = hcaptcha; - return this; - } - - public Builder hcaptcha(AttackProtectionUpdateCaptchaHcaptcha hcaptcha) { - this.hcaptcha = Optional.ofNullable(hcaptcha); - return this; - } - - @JsonSetter(value = "friendly_captcha", nulls = Nulls.SKIP) - public Builder friendlyCaptcha(Optional friendlyCaptcha) { - this.friendlyCaptcha = friendlyCaptcha; - return this; - } - - public Builder friendlyCaptcha(AttackProtectionUpdateCaptchaFriendlyCaptcha friendlyCaptcha) { - this.friendlyCaptcha = Optional.ofNullable(friendlyCaptcha); - return this; - } - - @JsonSetter(value = "recaptcha_enterprise", nulls = Nulls.SKIP) - public Builder recaptchaEnterprise( - Optional recaptchaEnterprise) { - this.recaptchaEnterprise = recaptchaEnterprise; - return this; - } - - public Builder recaptchaEnterprise(AttackProtectionUpdateCaptchaRecaptchaEnterprise recaptchaEnterprise) { - this.recaptchaEnterprise = Optional.ofNullable(recaptchaEnterprise); - return this; - } - - @JsonSetter(value = "recaptcha_v2", nulls = Nulls.SKIP) - public Builder recaptchaV2(Optional recaptchaV2) { - this.recaptchaV2 = recaptchaV2; - return this; - } - - public Builder recaptchaV2(AttackProtectionUpdateCaptchaRecaptchaV2 recaptchaV2) { - this.recaptchaV2 = Optional.ofNullable(recaptchaV2); - return this; - } - - @JsonSetter(value = "simple_captcha", nulls = Nulls.SKIP) - public Builder simpleCaptcha(Optional> simpleCaptcha) { - this.simpleCaptcha = simpleCaptcha; - return this; - } - - public Builder simpleCaptcha(Map simpleCaptcha) { - this.simpleCaptcha = Optional.ofNullable(simpleCaptcha); - return this; - } - - public UpdateAttackProtectionCaptchaRequestContent build() { - return new UpdateAttackProtectionCaptchaRequestContent( - activeProviderId, - arkose, - authChallenge, - hcaptcha, - friendlyCaptcha, - recaptchaEnterprise, - recaptchaV2, - simpleCaptcha, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/types/UpdateBotDetectionSettingsRequestContent.java b/src/main/java/com/auth0/client/mgmt/attackprotection/types/UpdateBotDetectionSettingsRequestContent.java deleted file mode 100644 index ae360f6ae..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/types/UpdateBotDetectionSettingsRequestContent.java +++ /dev/null @@ -1,243 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.BotDetectionChallengePolicyPasswordFlowEnum; -import com.auth0.client.mgmt.types.BotDetectionChallengePolicyPasswordResetFlowEnum; -import com.auth0.client.mgmt.types.BotDetectionChallengePolicyPasswordlessFlowEnum; -import com.auth0.client.mgmt.types.BotDetectionLevelEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateBotDetectionSettingsRequestContent.Builder.class) -public final class UpdateBotDetectionSettingsRequestContent { - private final Optional botDetectionLevel; - - private final Optional challengePasswordPolicy; - - private final Optional challengePasswordlessPolicy; - - private final Optional challengePasswordResetPolicy; - - private final Optional> allowlist; - - private final Optional monitoringModeEnabled; - - private final Map additionalProperties; - - private UpdateBotDetectionSettingsRequestContent( - Optional botDetectionLevel, - Optional challengePasswordPolicy, - Optional challengePasswordlessPolicy, - Optional challengePasswordResetPolicy, - Optional> allowlist, - Optional monitoringModeEnabled, - Map additionalProperties) { - this.botDetectionLevel = botDetectionLevel; - this.challengePasswordPolicy = challengePasswordPolicy; - this.challengePasswordlessPolicy = challengePasswordlessPolicy; - this.challengePasswordResetPolicy = challengePasswordResetPolicy; - this.allowlist = allowlist; - this.monitoringModeEnabled = monitoringModeEnabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("bot_detection_level") - public Optional getBotDetectionLevel() { - return botDetectionLevel; - } - - @JsonProperty("challenge_password_policy") - public Optional getChallengePasswordPolicy() { - return challengePasswordPolicy; - } - - @JsonProperty("challenge_passwordless_policy") - public Optional getChallengePasswordlessPolicy() { - return challengePasswordlessPolicy; - } - - @JsonProperty("challenge_password_reset_policy") - public Optional getChallengePasswordResetPolicy() { - return challengePasswordResetPolicy; - } - - @JsonProperty("allowlist") - public Optional> getAllowlist() { - return allowlist; - } - - @JsonProperty("monitoring_mode_enabled") - public Optional getMonitoringModeEnabled() { - return monitoringModeEnabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateBotDetectionSettingsRequestContent - && equalTo((UpdateBotDetectionSettingsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateBotDetectionSettingsRequestContent other) { - return botDetectionLevel.equals(other.botDetectionLevel) - && challengePasswordPolicy.equals(other.challengePasswordPolicy) - && challengePasswordlessPolicy.equals(other.challengePasswordlessPolicy) - && challengePasswordResetPolicy.equals(other.challengePasswordResetPolicy) - && allowlist.equals(other.allowlist) - && monitoringModeEnabled.equals(other.monitoringModeEnabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.botDetectionLevel, - this.challengePasswordPolicy, - this.challengePasswordlessPolicy, - this.challengePasswordResetPolicy, - this.allowlist, - this.monitoringModeEnabled); - } - - @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 botDetectionLevel = Optional.empty(); - - private Optional challengePasswordPolicy = Optional.empty(); - - private Optional challengePasswordlessPolicy = - Optional.empty(); - - private Optional challengePasswordResetPolicy = - Optional.empty(); - - private Optional> allowlist = Optional.empty(); - - private Optional monitoringModeEnabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateBotDetectionSettingsRequestContent other) { - botDetectionLevel(other.getBotDetectionLevel()); - challengePasswordPolicy(other.getChallengePasswordPolicy()); - challengePasswordlessPolicy(other.getChallengePasswordlessPolicy()); - challengePasswordResetPolicy(other.getChallengePasswordResetPolicy()); - allowlist(other.getAllowlist()); - monitoringModeEnabled(other.getMonitoringModeEnabled()); - return this; - } - - @JsonSetter(value = "bot_detection_level", nulls = Nulls.SKIP) - public Builder botDetectionLevel(Optional botDetectionLevel) { - this.botDetectionLevel = botDetectionLevel; - return this; - } - - public Builder botDetectionLevel(BotDetectionLevelEnum botDetectionLevel) { - this.botDetectionLevel = Optional.ofNullable(botDetectionLevel); - return this; - } - - @JsonSetter(value = "challenge_password_policy", nulls = Nulls.SKIP) - public Builder challengePasswordPolicy( - Optional challengePasswordPolicy) { - this.challengePasswordPolicy = challengePasswordPolicy; - return this; - } - - public Builder challengePasswordPolicy(BotDetectionChallengePolicyPasswordFlowEnum challengePasswordPolicy) { - this.challengePasswordPolicy = Optional.ofNullable(challengePasswordPolicy); - return this; - } - - @JsonSetter(value = "challenge_passwordless_policy", nulls = Nulls.SKIP) - public Builder challengePasswordlessPolicy( - Optional challengePasswordlessPolicy) { - this.challengePasswordlessPolicy = challengePasswordlessPolicy; - return this; - } - - public Builder challengePasswordlessPolicy( - BotDetectionChallengePolicyPasswordlessFlowEnum challengePasswordlessPolicy) { - this.challengePasswordlessPolicy = Optional.ofNullable(challengePasswordlessPolicy); - return this; - } - - @JsonSetter(value = "challenge_password_reset_policy", nulls = Nulls.SKIP) - public Builder challengePasswordResetPolicy( - Optional challengePasswordResetPolicy) { - this.challengePasswordResetPolicy = challengePasswordResetPolicy; - return this; - } - - public Builder challengePasswordResetPolicy( - BotDetectionChallengePolicyPasswordResetFlowEnum challengePasswordResetPolicy) { - this.challengePasswordResetPolicy = Optional.ofNullable(challengePasswordResetPolicy); - return this; - } - - @JsonSetter(value = "allowlist", nulls = Nulls.SKIP) - public Builder allowlist(Optional> allowlist) { - this.allowlist = allowlist; - return this; - } - - public Builder allowlist(List allowlist) { - this.allowlist = Optional.ofNullable(allowlist); - return this; - } - - @JsonSetter(value = "monitoring_mode_enabled", nulls = Nulls.SKIP) - public Builder monitoringModeEnabled(Optional monitoringModeEnabled) { - this.monitoringModeEnabled = monitoringModeEnabled; - return this; - } - - public Builder monitoringModeEnabled(Boolean monitoringModeEnabled) { - this.monitoringModeEnabled = Optional.ofNullable(monitoringModeEnabled); - return this; - } - - public UpdateBotDetectionSettingsRequestContent build() { - return new UpdateBotDetectionSettingsRequestContent( - botDetectionLevel, - challengePasswordPolicy, - challengePasswordlessPolicy, - challengePasswordResetPolicy, - allowlist, - monitoringModeEnabled, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/types/UpdateBreachedPasswordDetectionSettingsRequestContent.java b/src/main/java/com/auth0/client/mgmt/attackprotection/types/UpdateBreachedPasswordDetectionSettingsRequestContent.java deleted file mode 100644 index ddd475caa..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/types/UpdateBreachedPasswordDetectionSettingsRequestContent.java +++ /dev/null @@ -1,225 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.BreachedPasswordDetectionAdminNotificationFrequencyEnum; -import com.auth0.client.mgmt.types.BreachedPasswordDetectionMethodEnum; -import com.auth0.client.mgmt.types.BreachedPasswordDetectionShieldsEnum; -import com.auth0.client.mgmt.types.BreachedPasswordDetectionStage; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateBreachedPasswordDetectionSettingsRequestContent.Builder.class) -public final class UpdateBreachedPasswordDetectionSettingsRequestContent { - private final Optional enabled; - - private final Optional> shields; - - private final Optional> adminNotificationFrequency; - - private final Optional method; - - private final Optional stage; - - private final Map additionalProperties; - - private UpdateBreachedPasswordDetectionSettingsRequestContent( - Optional enabled, - Optional> shields, - Optional> adminNotificationFrequency, - Optional method, - Optional stage, - Map additionalProperties) { - this.enabled = enabled; - this.shields = shields; - this.adminNotificationFrequency = adminNotificationFrequency; - this.method = method; - this.stage = stage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether or not breached password detection is active. - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Action to take when a breached password is detected during a login. - * Possible values: <code>block</code>, <code>user_notification</code>, <code>admin_notification</code>. - */ - @JsonProperty("shields") - public Optional> getShields() { - return shields; - } - - /** - * @return When "admin_notification" is enabled, determines how often email notifications are sent. - * Possible values: <code>immediately</code>, <code>daily</code>, <code>weekly</code>, <code>monthly</code>. - */ - @JsonProperty("admin_notification_frequency") - public Optional> getAdminNotificationFrequency() { - return adminNotificationFrequency; - } - - @JsonProperty("method") - public Optional getMethod() { - return method; - } - - @JsonProperty("stage") - public Optional getStage() { - return stage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateBreachedPasswordDetectionSettingsRequestContent - && equalTo((UpdateBreachedPasswordDetectionSettingsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateBreachedPasswordDetectionSettingsRequestContent other) { - return enabled.equals(other.enabled) - && shields.equals(other.shields) - && adminNotificationFrequency.equals(other.adminNotificationFrequency) - && method.equals(other.method) - && stage.equals(other.stage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled, this.shields, this.adminNotificationFrequency, this.method, this.stage); - } - - @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 enabled = Optional.empty(); - - private Optional> shields = Optional.empty(); - - private Optional> adminNotificationFrequency = - Optional.empty(); - - private Optional method = Optional.empty(); - - private Optional stage = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateBreachedPasswordDetectionSettingsRequestContent other) { - enabled(other.getEnabled()); - shields(other.getShields()); - adminNotificationFrequency(other.getAdminNotificationFrequency()); - method(other.getMethod()); - stage(other.getStage()); - return this; - } - - /** - *

Whether or not breached password detection is active.

- */ - @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; - } - - /** - *

Action to take when a breached password is detected during a login. - * Possible values: <code>block</code>, <code>user_notification</code>, <code>admin_notification</code>.

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

When "admin_notification" is enabled, determines how often email notifications are sent. - * Possible values: <code>immediately</code>, <code>daily</code>, <code>weekly</code>, <code>monthly</code>.

- */ - @JsonSetter(value = "admin_notification_frequency", nulls = Nulls.SKIP) - public Builder adminNotificationFrequency( - Optional> adminNotificationFrequency) { - this.adminNotificationFrequency = adminNotificationFrequency; - return this; - } - - public Builder adminNotificationFrequency( - List adminNotificationFrequency) { - this.adminNotificationFrequency = Optional.ofNullable(adminNotificationFrequency); - return this; - } - - @JsonSetter(value = "method", nulls = Nulls.SKIP) - public Builder method(Optional method) { - this.method = method; - return this; - } - - public Builder method(BreachedPasswordDetectionMethodEnum method) { - this.method = Optional.ofNullable(method); - return this; - } - - @JsonSetter(value = "stage", nulls = Nulls.SKIP) - public Builder stage(Optional stage) { - this.stage = stage; - return this; - } - - public Builder stage(BreachedPasswordDetectionStage stage) { - this.stage = Optional.ofNullable(stage); - return this; - } - - public UpdateBreachedPasswordDetectionSettingsRequestContent build() { - return new UpdateBreachedPasswordDetectionSettingsRequestContent( - enabled, shields, adminNotificationFrequency, method, stage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/types/UpdateBruteForceSettingsRequestContent.java b/src/main/java/com/auth0/client/mgmt/attackprotection/types/UpdateBruteForceSettingsRequestContent.java deleted file mode 100644 index 39ac83e7a..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/types/UpdateBruteForceSettingsRequestContent.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.BruteForceProtectionModeEnum; -import com.auth0.client.mgmt.types.BruteForceProtectionShieldsEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateBruteForceSettingsRequestContent.Builder.class) -public final class UpdateBruteForceSettingsRequestContent { - private final Optional enabled; - - private final Optional> shields; - - private final Optional> allowlist; - - private final Optional mode; - - private final Optional maxAttempts; - - private final Map additionalProperties; - - private UpdateBruteForceSettingsRequestContent( - Optional enabled, - Optional> shields, - Optional> allowlist, - Optional mode, - Optional maxAttempts, - Map additionalProperties) { - this.enabled = enabled; - this.shields = shields; - this.allowlist = allowlist; - this.mode = mode; - this.maxAttempts = maxAttempts; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether or not brute force attack protections are active. - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Action to take when a brute force protection threshold is violated. - * Possible values: <code>block</code>, <code>user_notification</code>. - */ - @JsonProperty("shields") - public Optional> getShields() { - return shields; - } - - /** - * @return List of trusted IP addresses that will not have attack protection enforced against them. - */ - @JsonProperty("allowlist") - public Optional> getAllowlist() { - return allowlist; - } - - @JsonProperty("mode") - public Optional getMode() { - return mode; - } - - /** - * @return Maximum number of unsuccessful attempts. - */ - @JsonProperty("max_attempts") - public Optional getMaxAttempts() { - return maxAttempts; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateBruteForceSettingsRequestContent - && equalTo((UpdateBruteForceSettingsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateBruteForceSettingsRequestContent other) { - return enabled.equals(other.enabled) - && shields.equals(other.shields) - && allowlist.equals(other.allowlist) - && mode.equals(other.mode) - && maxAttempts.equals(other.maxAttempts); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled, this.shields, this.allowlist, this.mode, this.maxAttempts); - } - - @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 enabled = Optional.empty(); - - private Optional> shields = Optional.empty(); - - private Optional> allowlist = Optional.empty(); - - private Optional mode = Optional.empty(); - - private Optional maxAttempts = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateBruteForceSettingsRequestContent other) { - enabled(other.getEnabled()); - shields(other.getShields()); - allowlist(other.getAllowlist()); - mode(other.getMode()); - maxAttempts(other.getMaxAttempts()); - return this; - } - - /** - *

Whether or not brute force attack protections are active.

- */ - @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; - } - - /** - *

Action to take when a brute force protection threshold is violated. - * Possible values: <code>block</code>, <code>user_notification</code>.

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

List of trusted IP addresses that will not have attack protection enforced against them.

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

Maximum number of unsuccessful attempts.

- */ - @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; - } - - public UpdateBruteForceSettingsRequestContent build() { - return new UpdateBruteForceSettingsRequestContent( - enabled, shields, allowlist, mode, maxAttempts, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/attackprotection/types/UpdateSuspiciousIpThrottlingSettingsRequestContent.java b/src/main/java/com/auth0/client/mgmt/attackprotection/types/UpdateSuspiciousIpThrottlingSettingsRequestContent.java deleted file mode 100644 index de916780f..000000000 --- a/src/main/java/com/auth0/client/mgmt/attackprotection/types/UpdateSuspiciousIpThrottlingSettingsRequestContent.java +++ /dev/null @@ -1,188 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.attackprotection.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.SuspiciousIpThrottlingShieldsEnum; -import com.auth0.client.mgmt.types.SuspiciousIpThrottlingStage; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateSuspiciousIpThrottlingSettingsRequestContent.Builder.class) -public final class UpdateSuspiciousIpThrottlingSettingsRequestContent { - private final Optional enabled; - - private final Optional> shields; - - private final Optional> allowlist; - - private final Optional stage; - - private final Map additionalProperties; - - private UpdateSuspiciousIpThrottlingSettingsRequestContent( - Optional enabled, - Optional> shields, - Optional> allowlist, - Optional stage, - Map additionalProperties) { - this.enabled = enabled; - this.shields = shields; - this.allowlist = allowlist; - this.stage = stage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether or not suspicious IP throttling attack protections are active. - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Action to take when a suspicious IP throttling threshold is violated. - * Possible values: <code>block</code>, <code>admin_notification</code>. - */ - @JsonProperty("shields") - public Optional> getShields() { - return shields; - } - - @JsonProperty("allowlist") - public Optional> getAllowlist() { - return allowlist; - } - - @JsonProperty("stage") - public Optional getStage() { - return stage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateSuspiciousIpThrottlingSettingsRequestContent - && equalTo((UpdateSuspiciousIpThrottlingSettingsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateSuspiciousIpThrottlingSettingsRequestContent other) { - return enabled.equals(other.enabled) - && shields.equals(other.shields) - && allowlist.equals(other.allowlist) - && stage.equals(other.stage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled, this.shields, this.allowlist, this.stage); - } - - @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 enabled = Optional.empty(); - - private Optional> shields = Optional.empty(); - - private Optional> allowlist = Optional.empty(); - - private Optional stage = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateSuspiciousIpThrottlingSettingsRequestContent other) { - enabled(other.getEnabled()); - shields(other.getShields()); - allowlist(other.getAllowlist()); - stage(other.getStage()); - return this; - } - - /** - *

Whether or not suspicious IP throttling attack protections are active.

- */ - @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; - } - - /** - *

Action to take when a suspicious IP throttling threshold is violated. - * Possible values: <code>block</code>, <code>admin_notification</code>.

- */ - @JsonSetter(value = "shields", nulls = Nulls.SKIP) - public Builder shields(Optional> shields) { - this.shields = shields; - return this; - } - - public Builder shields(List shields) { - this.shields = Optional.ofNullable(shields); - return this; - } - - @JsonSetter(value = "allowlist", nulls = Nulls.SKIP) - public Builder allowlist(Optional> allowlist) { - this.allowlist = allowlist; - return this; - } - - public Builder allowlist(List allowlist) { - this.allowlist = Optional.ofNullable(allowlist); - return this; - } - - @JsonSetter(value = "stage", nulls = Nulls.SKIP) - public Builder stage(Optional stage) { - this.stage = stage; - return this; - } - - public Builder stage(SuspiciousIpThrottlingStage stage) { - this.stage = Optional.ofNullable(stage); - return this; - } - - public UpdateSuspiciousIpThrottlingSettingsRequestContent build() { - return new UpdateSuspiciousIpThrottlingSettingsRequestContent( - enabled, shields, allowlist, stage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/AsyncRawTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/branding/AsyncRawTemplatesClient.java deleted file mode 100644 index b7a4f943d..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/AsyncRawTemplatesClient.java +++ /dev/null @@ -1,336 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding; - -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.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.PaymentRequiredError; -import com.auth0.client.mgmt.errors.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.types.GetUniversalLoginTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateUniversalLoginTemplateRequestContent; -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 AsyncRawTemplatesClient { - protected final ClientOptions clientOptions; - - public AsyncRawTemplatesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public CompletableFuture> getUniversalLogin() { - return getUniversalLogin(null); - } - - public CompletableFuture> getUniversalLogin( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/templates/universal-login") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetUniversalLoginTemplateResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 402: - future.completeExceptionally(new PaymentRequiredError( - 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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update the Universal Login branding template. - *

<p>When <code>content-type</code> header is set to <code>application/json</code>:</p> - * <pre> - * { - * "template": "&lt;!DOCTYPE html&gt;{% assign resolved_dir = dir | default: "auto" %}&lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt;&lt;head&gt;{%- auth0:head -%}&lt;/head&gt;&lt;body class="_widget-auto-layout"&gt;{%- auth0:widget -%}&lt;/body&gt;&lt;/html&gt;" - * } - * </pre>

- *

<p> - * When <code>content-type</code> header is set to <code>text/html</code>: - * </p> - * <pre> - * &lt!DOCTYPE html&gt; - * {% assign resolved_dir = dir | default: "auto" %} - * &lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt; - * &lt;head&gt; - * {%- auth0:head -%} - * &lt;/head&gt; - * &lt;body class="_widget-auto-layout"&gt; - * {%- auth0:widget -%} - * &lt;/body&gt; - * &lt;/html&gt; - * </pre>

- */ - public CompletableFuture> updateUniversalLogin( - UpdateUniversalLoginTemplateRequestContent request) { - return updateUniversalLogin(request, null); - } - - /** - * Update the Universal Login branding template. - *

<p>When <code>content-type</code> header is set to <code>application/json</code>:</p> - * <pre> - * { - * "template": "&lt;!DOCTYPE html&gt;{% assign resolved_dir = dir | default: "auto" %}&lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt;&lt;head&gt;{%- auth0:head -%}&lt;/head&gt;&lt;body class="_widget-auto-layout"&gt;{%- auth0:widget -%}&lt;/body&gt;&lt;/html&gt;" - * } - * </pre>

- *

<p> - * When <code>content-type</code> header is set to <code>text/html</code>: - * </p> - * <pre> - * &lt!DOCTYPE html&gt; - * {% assign resolved_dir = dir | default: "auto" %} - * &lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt; - * &lt;head&gt; - * {%- auth0:head -%} - * &lt;/head&gt; - * &lt;body class="_widget-auto-layout"&gt; - * {%- auth0:widget -%} - * &lt;/body&gt; - * &lt;/html&gt; - * </pre>

- */ - public CompletableFuture> updateUniversalLogin( - UpdateUniversalLoginTemplateRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/templates/universal-login") - .build(); - 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) - .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<>(); - 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 402: - future.completeExceptionally(new PaymentRequiredError( - 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 (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> deleteUniversalLogin() { - return deleteUniversalLogin(null); - } - - public CompletableFuture> deleteUniversalLogin(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/templates/universal-login") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 402: - future.completeExceptionally(new PaymentRequiredError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/AsyncRawThemesClient.java b/src/main/java/com/auth0/client/mgmt/branding/AsyncRawThemesClient.java deleted file mode 100644 index 618a45b5e..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/AsyncRawThemesClient.java +++ /dev/null @@ -1,486 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding; - -import com.auth0.client.mgmt.branding.types.CreateBrandingThemeRequestContent; -import com.auth0.client.mgmt.branding.types.UpdateBrandingThemeRequestContent; -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.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.CreateBrandingThemeResponseContent; -import com.auth0.client.mgmt.types.GetBrandingDefaultThemeResponseContent; -import com.auth0.client.mgmt.types.GetBrandingThemeResponseContent; -import com.auth0.client.mgmt.types.UpdateBrandingThemeResponseContent; -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 AsyncRawThemesClient { - protected final ClientOptions clientOptions; - - public AsyncRawThemesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Create branding theme. - */ - public CompletableFuture> create( - CreateBrandingThemeRequestContent request) { - return create(request, null); - } - - /** - * Create branding theme. - */ - public CompletableFuture> create( - CreateBrandingThemeRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/themes") - .build(); - 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) - .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); - } - 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, CreateBrandingThemeResponseContent.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 (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 default branding theme. - */ - public CompletableFuture> getDefault() { - return getDefault(null); - } - - /** - * Retrieve default branding theme. - */ - public CompletableFuture> getDefault( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/themes/default") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetBrandingDefaultThemeResponseContent.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 (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 branding theme. - */ - public CompletableFuture> get(String themeId) { - return get(themeId, null); - } - - /** - * Retrieve branding theme. - */ - public CompletableFuture> get( - String themeId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/themes") - .addPathSegment(themeId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetBrandingThemeResponseContent.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 (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 branding theme. - */ - public CompletableFuture> delete(String themeId) { - return delete(themeId, null); - } - - /** - * Delete branding theme. - */ - public CompletableFuture> delete(String themeId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/themes") - .addPathSegment(themeId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 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 (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 branding theme. - */ - public CompletableFuture> update( - String themeId, UpdateBrandingThemeRequestContent request) { - return update(themeId, request, null); - } - - /** - * Update branding theme. - */ - public CompletableFuture> update( - String themeId, UpdateBrandingThemeRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/themes") - .addPathSegment(themeId) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateBrandingThemeResponseContent.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 (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/branding/AsyncTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/branding/AsyncTemplatesClient.java deleted file mode 100644 index a23523d44..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/AsyncTemplatesClient.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.GetUniversalLoginTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateUniversalLoginTemplateRequestContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncTemplatesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawTemplatesClient rawClient; - - public AsyncTemplatesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawTemplatesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawTemplatesClient withRawResponse() { - return this.rawClient; - } - - public CompletableFuture getUniversalLogin() { - return this.rawClient.getUniversalLogin().thenApply(response -> response.body()); - } - - public CompletableFuture getUniversalLogin( - RequestOptions requestOptions) { - return this.rawClient.getUniversalLogin(requestOptions).thenApply(response -> response.body()); - } - - /** - * Update the Universal Login branding template. - *

<p>When <code>content-type</code> header is set to <code>application/json</code>:</p> - * <pre> - * { - * "template": "&lt;!DOCTYPE html&gt;{% assign resolved_dir = dir | default: "auto" %}&lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt;&lt;head&gt;{%- auth0:head -%}&lt;/head&gt;&lt;body class="_widget-auto-layout"&gt;{%- auth0:widget -%}&lt;/body&gt;&lt;/html&gt;" - * } - * </pre>

- *

<p> - * When <code>content-type</code> header is set to <code>text/html</code>: - * </p> - * <pre> - * &lt!DOCTYPE html&gt; - * {% assign resolved_dir = dir | default: "auto" %} - * &lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt; - * &lt;head&gt; - * {%- auth0:head -%} - * &lt;/head&gt; - * &lt;body class="_widget-auto-layout"&gt; - * {%- auth0:widget -%} - * &lt;/body&gt; - * &lt;/html&gt; - * </pre>

- */ - public CompletableFuture updateUniversalLogin(UpdateUniversalLoginTemplateRequestContent request) { - return this.rawClient.updateUniversalLogin(request).thenApply(response -> response.body()); - } - - /** - * Update the Universal Login branding template. - *

<p>When <code>content-type</code> header is set to <code>application/json</code>:</p> - * <pre> - * { - * "template": "&lt;!DOCTYPE html&gt;{% assign resolved_dir = dir | default: "auto" %}&lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt;&lt;head&gt;{%- auth0:head -%}&lt;/head&gt;&lt;body class="_widget-auto-layout"&gt;{%- auth0:widget -%}&lt;/body&gt;&lt;/html&gt;" - * } - * </pre>

- *

<p> - * When <code>content-type</code> header is set to <code>text/html</code>: - * </p> - * <pre> - * &lt!DOCTYPE html&gt; - * {% assign resolved_dir = dir | default: "auto" %} - * &lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt; - * &lt;head&gt; - * {%- auth0:head -%} - * &lt;/head&gt; - * &lt;body class="_widget-auto-layout"&gt; - * {%- auth0:widget -%} - * &lt;/body&gt; - * &lt;/html&gt; - * </pre>

- */ - public CompletableFuture updateUniversalLogin( - UpdateUniversalLoginTemplateRequestContent request, RequestOptions requestOptions) { - return this.rawClient.updateUniversalLogin(request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture deleteUniversalLogin() { - return this.rawClient.deleteUniversalLogin().thenApply(response -> response.body()); - } - - public CompletableFuture deleteUniversalLogin(RequestOptions requestOptions) { - return this.rawClient.deleteUniversalLogin(requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/AsyncThemesClient.java b/src/main/java/com/auth0/client/mgmt/branding/AsyncThemesClient.java deleted file mode 100644 index 4625a2d9f..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/AsyncThemesClient.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding; - -import com.auth0.client.mgmt.branding.types.CreateBrandingThemeRequestContent; -import com.auth0.client.mgmt.branding.types.UpdateBrandingThemeRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.CreateBrandingThemeResponseContent; -import com.auth0.client.mgmt.types.GetBrandingDefaultThemeResponseContent; -import com.auth0.client.mgmt.types.GetBrandingThemeResponseContent; -import com.auth0.client.mgmt.types.UpdateBrandingThemeResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncThemesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawThemesClient rawClient; - - public AsyncThemesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawThemesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawThemesClient withRawResponse() { - return this.rawClient; - } - - /** - * Create branding theme. - */ - public CompletableFuture create(CreateBrandingThemeRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create branding theme. - */ - public CompletableFuture create( - CreateBrandingThemeRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve default branding theme. - */ - public CompletableFuture getDefault() { - return this.rawClient.getDefault().thenApply(response -> response.body()); - } - - /** - * Retrieve default branding theme. - */ - public CompletableFuture getDefault(RequestOptions requestOptions) { - return this.rawClient.getDefault(requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve branding theme. - */ - public CompletableFuture get(String themeId) { - return this.rawClient.get(themeId).thenApply(response -> response.body()); - } - - /** - * Retrieve branding theme. - */ - public CompletableFuture get(String themeId, RequestOptions requestOptions) { - return this.rawClient.get(themeId, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete branding theme. - */ - public CompletableFuture delete(String themeId) { - return this.rawClient.delete(themeId).thenApply(response -> response.body()); - } - - /** - * Delete branding theme. - */ - public CompletableFuture delete(String themeId, RequestOptions requestOptions) { - return this.rawClient.delete(themeId, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update branding theme. - */ - public CompletableFuture update( - String themeId, UpdateBrandingThemeRequestContent request) { - return this.rawClient.update(themeId, request).thenApply(response -> response.body()); - } - - /** - * Update branding theme. - */ - public CompletableFuture update( - String themeId, UpdateBrandingThemeRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(themeId, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/RawTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/branding/RawTemplatesClient.java deleted file mode 100644 index 85a5a3f0f..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/RawTemplatesClient.java +++ /dev/null @@ -1,261 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding; - -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.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.PaymentRequiredError; -import com.auth0.client.mgmt.errors.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.types.GetUniversalLoginTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateUniversalLoginTemplateRequestContent; -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 RawTemplatesClient { - protected final ClientOptions clientOptions; - - public RawTemplatesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public ManagementApiHttpResponse getUniversalLogin() { - return getUniversalLogin(null); - } - - public ManagementApiHttpResponse getUniversalLogin( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/templates/universal-login") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetUniversalLoginTemplateResponseContent.class), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 402: - throw new PaymentRequiredError( - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update the Universal Login branding template. - *

<p>When <code>content-type</code> header is set to <code>application/json</code>:</p> - * <pre> - * { - * "template": "&lt;!DOCTYPE html&gt;{% assign resolved_dir = dir | default: "auto" %}&lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt;&lt;head&gt;{%- auth0:head -%}&lt;/head&gt;&lt;body class="_widget-auto-layout"&gt;{%- auth0:widget -%}&lt;/body&gt;&lt;/html&gt;" - * } - * </pre>

- *

<p> - * When <code>content-type</code> header is set to <code>text/html</code>: - * </p> - * <pre> - * &lt!DOCTYPE html&gt; - * {% assign resolved_dir = dir | default: "auto" %} - * &lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt; - * &lt;head&gt; - * {%- auth0:head -%} - * &lt;/head&gt; - * &lt;body class="_widget-auto-layout"&gt; - * {%- auth0:widget -%} - * &lt;/body&gt; - * &lt;/html&gt; - * </pre>

- */ - public ManagementApiHttpResponse updateUniversalLogin(UpdateUniversalLoginTemplateRequestContent request) { - return updateUniversalLogin(request, null); - } - - /** - * Update the Universal Login branding template. - *

<p>When <code>content-type</code> header is set to <code>application/json</code>:</p> - * <pre> - * { - * "template": "&lt;!DOCTYPE html&gt;{% assign resolved_dir = dir | default: "auto" %}&lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt;&lt;head&gt;{%- auth0:head -%}&lt;/head&gt;&lt;body class="_widget-auto-layout"&gt;{%- auth0:widget -%}&lt;/body&gt;&lt;/html&gt;" - * } - * </pre>

- *

<p> - * When <code>content-type</code> header is set to <code>text/html</code>: - * </p> - * <pre> - * &lt!DOCTYPE html&gt; - * {% assign resolved_dir = dir | default: "auto" %} - * &lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt; - * &lt;head&gt; - * {%- auth0:head -%} - * &lt;/head&gt; - * &lt;body class="_widget-auto-layout"&gt; - * {%- auth0:widget -%} - * &lt;/body&gt; - * &lt;/html&gt; - * </pre>

- */ - public ManagementApiHttpResponse updateUniversalLogin( - UpdateUniversalLoginTemplateRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/templates/universal-login") - .build(); - 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) - .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); - } - 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 402: - throw new PaymentRequiredError( - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse deleteUniversalLogin() { - return deleteUniversalLogin(null); - } - - public ManagementApiHttpResponse deleteUniversalLogin(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/templates/universal-login") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 402: - throw new PaymentRequiredError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/RawThemesClient.java b/src/main/java/com/auth0/client/mgmt/branding/RawThemesClient.java deleted file mode 100644 index a16997d17..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/RawThemesClient.java +++ /dev/null @@ -1,367 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding; - -import com.auth0.client.mgmt.branding.types.CreateBrandingThemeRequestContent; -import com.auth0.client.mgmt.branding.types.UpdateBrandingThemeRequestContent; -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.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.CreateBrandingThemeResponseContent; -import com.auth0.client.mgmt.types.GetBrandingDefaultThemeResponseContent; -import com.auth0.client.mgmt.types.GetBrandingThemeResponseContent; -import com.auth0.client.mgmt.types.UpdateBrandingThemeResponseContent; -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 RawThemesClient { - protected final ClientOptions clientOptions; - - public RawThemesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Create branding theme. - */ - public ManagementApiHttpResponse create( - CreateBrandingThemeRequestContent request) { - return create(request, null); - } - - /** - * Create branding theme. - */ - public ManagementApiHttpResponse create( - CreateBrandingThemeRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/themes") - .build(); - 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) - .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); - } - 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, CreateBrandingThemeResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve default branding theme. - */ - public ManagementApiHttpResponse getDefault() { - return getDefault(null); - } - - /** - * Retrieve default branding theme. - */ - public ManagementApiHttpResponse getDefault(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/themes/default") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetBrandingDefaultThemeResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve branding theme. - */ - public ManagementApiHttpResponse get(String themeId) { - return get(themeId, null); - } - - /** - * Retrieve branding theme. - */ - public ManagementApiHttpResponse get( - String themeId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/themes") - .addPathSegment(themeId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetBrandingThemeResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete branding theme. - */ - public ManagementApiHttpResponse delete(String themeId) { - return delete(themeId, null); - } - - /** - * Delete branding theme. - */ - public ManagementApiHttpResponse delete(String themeId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/themes") - .addPathSegment(themeId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update branding theme. - */ - public ManagementApiHttpResponse update( - String themeId, UpdateBrandingThemeRequestContent request) { - return update(themeId, request, null); - } - - /** - * Update branding theme. - */ - public ManagementApiHttpResponse update( - String themeId, UpdateBrandingThemeRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/themes") - .addPathSegment(themeId) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateBrandingThemeResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/TemplatesClient.java b/src/main/java/com/auth0/client/mgmt/branding/TemplatesClient.java deleted file mode 100644 index 06ec08d52..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/TemplatesClient.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.GetUniversalLoginTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateUniversalLoginTemplateRequestContent; - -public class TemplatesClient { - protected final ClientOptions clientOptions; - - private final RawTemplatesClient rawClient; - - public TemplatesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawTemplatesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawTemplatesClient withRawResponse() { - return this.rawClient; - } - - public GetUniversalLoginTemplateResponseContent getUniversalLogin() { - return this.rawClient.getUniversalLogin().body(); - } - - public GetUniversalLoginTemplateResponseContent getUniversalLogin(RequestOptions requestOptions) { - return this.rawClient.getUniversalLogin(requestOptions).body(); - } - - /** - * Update the Universal Login branding template. - *

<p>When <code>content-type</code> header is set to <code>application/json</code>:</p> - * <pre> - * { - * "template": "&lt;!DOCTYPE html&gt;{% assign resolved_dir = dir | default: "auto" %}&lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt;&lt;head&gt;{%- auth0:head -%}&lt;/head&gt;&lt;body class="_widget-auto-layout"&gt;{%- auth0:widget -%}&lt;/body&gt;&lt;/html&gt;" - * } - * </pre>

- *

<p> - * When <code>content-type</code> header is set to <code>text/html</code>: - * </p> - * <pre> - * &lt!DOCTYPE html&gt; - * {% assign resolved_dir = dir | default: "auto" %} - * &lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt; - * &lt;head&gt; - * {%- auth0:head -%} - * &lt;/head&gt; - * &lt;body class="_widget-auto-layout"&gt; - * {%- auth0:widget -%} - * &lt;/body&gt; - * &lt;/html&gt; - * </pre>

- */ - public void updateUniversalLogin(UpdateUniversalLoginTemplateRequestContent request) { - this.rawClient.updateUniversalLogin(request).body(); - } - - /** - * Update the Universal Login branding template. - *

<p>When <code>content-type</code> header is set to <code>application/json</code>:</p> - * <pre> - * { - * "template": "&lt;!DOCTYPE html&gt;{% assign resolved_dir = dir | default: "auto" %}&lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt;&lt;head&gt;{%- auth0:head -%}&lt;/head&gt;&lt;body class="_widget-auto-layout"&gt;{%- auth0:widget -%}&lt;/body&gt;&lt;/html&gt;" - * } - * </pre>

- *

<p> - * When <code>content-type</code> header is set to <code>text/html</code>: - * </p> - * <pre> - * &lt!DOCTYPE html&gt; - * {% assign resolved_dir = dir | default: "auto" %} - * &lt;html lang="{{locale}}" dir="{{resolved_dir}}"&gt; - * &lt;head&gt; - * {%- auth0:head -%} - * &lt;/head&gt; - * &lt;body class="_widget-auto-layout"&gt; - * {%- auth0:widget -%} - * &lt;/body&gt; - * &lt;/html&gt; - * </pre>

- */ - public void updateUniversalLogin( - UpdateUniversalLoginTemplateRequestContent request, RequestOptions requestOptions) { - this.rawClient.updateUniversalLogin(request, requestOptions).body(); - } - - public void deleteUniversalLogin() { - this.rawClient.deleteUniversalLogin().body(); - } - - public void deleteUniversalLogin(RequestOptions requestOptions) { - this.rawClient.deleteUniversalLogin(requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/ThemesClient.java b/src/main/java/com/auth0/client/mgmt/branding/ThemesClient.java deleted file mode 100644 index a1e1c3312..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/ThemesClient.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding; - -import com.auth0.client.mgmt.branding.types.CreateBrandingThemeRequestContent; -import com.auth0.client.mgmt.branding.types.UpdateBrandingThemeRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.CreateBrandingThemeResponseContent; -import com.auth0.client.mgmt.types.GetBrandingDefaultThemeResponseContent; -import com.auth0.client.mgmt.types.GetBrandingThemeResponseContent; -import com.auth0.client.mgmt.types.UpdateBrandingThemeResponseContent; - -public class ThemesClient { - protected final ClientOptions clientOptions; - - private final RawThemesClient rawClient; - - public ThemesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawThemesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawThemesClient withRawResponse() { - return this.rawClient; - } - - /** - * Create branding theme. - */ - public CreateBrandingThemeResponseContent create(CreateBrandingThemeRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create branding theme. - */ - public CreateBrandingThemeResponseContent create( - CreateBrandingThemeRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve default branding theme. - */ - public GetBrandingDefaultThemeResponseContent getDefault() { - return this.rawClient.getDefault().body(); - } - - /** - * Retrieve default branding theme. - */ - public GetBrandingDefaultThemeResponseContent getDefault(RequestOptions requestOptions) { - return this.rawClient.getDefault(requestOptions).body(); - } - - /** - * Retrieve branding theme. - */ - public GetBrandingThemeResponseContent get(String themeId) { - return this.rawClient.get(themeId).body(); - } - - /** - * Retrieve branding theme. - */ - public GetBrandingThemeResponseContent get(String themeId, RequestOptions requestOptions) { - return this.rawClient.get(themeId, requestOptions).body(); - } - - /** - * Delete branding theme. - */ - public void delete(String themeId) { - this.rawClient.delete(themeId).body(); - } - - /** - * Delete branding theme. - */ - public void delete(String themeId, RequestOptions requestOptions) { - this.rawClient.delete(themeId, requestOptions).body(); - } - - /** - * Update branding theme. - */ - public UpdateBrandingThemeResponseContent update(String themeId, UpdateBrandingThemeRequestContent request) { - return this.rawClient.update(themeId, request).body(); - } - - /** - * Update branding theme. - */ - public UpdateBrandingThemeResponseContent update( - String themeId, UpdateBrandingThemeRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(themeId, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncPhoneClient.java b/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncPhoneClient.java deleted file mode 100644 index 91aead55c..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncPhoneClient.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.phone; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class AsyncPhoneClient { - protected final ClientOptions clientOptions; - - protected final Supplier providersClient; - - protected final Supplier templatesClient; - - public AsyncPhoneClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.providersClient = Suppliers.memoize(() -> new AsyncProvidersClient(clientOptions)); - this.templatesClient = Suppliers.memoize(() -> new AsyncTemplatesClient(clientOptions)); - } - - public AsyncProvidersClient providers() { - return this.providersClient.get(); - } - - public AsyncTemplatesClient templates() { - return this.templatesClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncProvidersClient.java b/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncProvidersClient.java deleted file mode 100644 index 2c88e697d..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncProvidersClient.java +++ /dev/null @@ -1,140 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.phone; - -import com.auth0.client.mgmt.branding.phone.types.CreateBrandingPhoneProviderRequestContent; -import com.auth0.client.mgmt.branding.phone.types.CreatePhoneProviderSendTestRequestContent; -import com.auth0.client.mgmt.branding.phone.types.ListBrandingPhoneProvidersRequestParameters; -import com.auth0.client.mgmt.branding.phone.types.UpdateBrandingPhoneProviderRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.CreateBrandingPhoneProviderResponseContent; -import com.auth0.client.mgmt.types.CreatePhoneProviderSendTestResponseContent; -import com.auth0.client.mgmt.types.GetBrandingPhoneProviderResponseContent; -import com.auth0.client.mgmt.types.ListBrandingPhoneProvidersResponseContent; -import com.auth0.client.mgmt.types.UpdateBrandingPhoneProviderResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncProvidersClient { - protected final ClientOptions clientOptions; - - private final AsyncRawProvidersClient rawClient; - - public AsyncProvidersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawProvidersClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawProvidersClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone providers</a> details set for a Tenant. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone providers</a> details set for a Tenant. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture list( - ListBrandingPhoneProvidersRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone providers</a> details set for a Tenant. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture list( - ListBrandingPhoneProvidersRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public CompletableFuture create( - CreateBrandingPhoneProviderRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public CompletableFuture create( - CreateBrandingPhoneProviderRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a> details. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a> details. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete the configured phone provider. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete the configured phone provider. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public CompletableFuture update( - String id, UpdateBrandingPhoneProviderRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public CompletableFuture update( - String id, UpdateBrandingPhoneProviderRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture test( - String id, CreatePhoneProviderSendTestRequestContent request) { - return this.rawClient.test(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture test( - String id, CreatePhoneProviderSendTestRequestContent request, RequestOptions requestOptions) { - return this.rawClient.test(id, request, requestOptions).thenApply(response -> response.body()); - } -} 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 deleted file mode 100644 index ea8a53c5e..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncRawProvidersClient.java +++ /dev/null @@ -1,621 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.phone; - -import com.auth0.client.mgmt.branding.phone.types.CreateBrandingPhoneProviderRequestContent; -import com.auth0.client.mgmt.branding.phone.types.CreatePhoneProviderSendTestRequestContent; -import com.auth0.client.mgmt.branding.phone.types.ListBrandingPhoneProvidersRequestParameters; -import com.auth0.client.mgmt.branding.phone.types.UpdateBrandingPhoneProviderRequestContent; -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.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.CreateBrandingPhoneProviderResponseContent; -import com.auth0.client.mgmt.types.CreatePhoneProviderSendTestResponseContent; -import com.auth0.client.mgmt.types.GetBrandingPhoneProviderResponseContent; -import com.auth0.client.mgmt.types.ListBrandingPhoneProvidersResponseContent; -import com.auth0.client.mgmt.types.UpdateBrandingPhoneProviderResponseContent; -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 AsyncRawProvidersClient { - protected final ClientOptions clientOptions; - - public AsyncRawProvidersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone providers</a> details set for a Tenant. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture> list() { - return list(ListBrandingPhoneProvidersRequestParameters.builder().build()); - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone providers</a> details set for a Tenant. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture> list( - ListBrandingPhoneProvidersRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone providers</a> details set for a Tenant. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture> list( - ListBrandingPhoneProvidersRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/providers"); - if (!request.getDisabled().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "disabled", request.getDisabled().orElse(null), false); - } - 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); - } - 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, ListBrandingPhoneProvidersResponseContent.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 (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 <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public CompletableFuture> create( - CreateBrandingPhoneProviderRequestContent request) { - return create(request, null); - } - - /** - * Create a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public CompletableFuture> create( - CreateBrandingPhoneProviderRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/providers") - .build(); - 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) - .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); - } - 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, CreateBrandingPhoneProviderResponseContent.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 (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 href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a> details. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a> details. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/providers") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetBrandingPhoneProviderResponseContent.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 (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 the configured phone provider. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete the configured phone provider. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/providers") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 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 (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 <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public CompletableFuture> update(String id) { - return update(id, UpdateBrandingPhoneProviderRequestContent.builder().build()); - } - - /** - * Update a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public CompletableFuture> update( - String id, UpdateBrandingPhoneProviderRequestContent request) { - return update(id, request, null); - } - - /** - * Update a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public CompletableFuture> update( - String id, UpdateBrandingPhoneProviderRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/providers") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateBrandingPhoneProviderResponseContent.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 (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> test( - String id, CreatePhoneProviderSendTestRequestContent request) { - return test(id, request, null); - } - - public CompletableFuture> test( - String id, CreatePhoneProviderSendTestRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/providers") - .addPathSegment(id) - .addPathSegments("try") - .build(); - 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) - .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); - } - 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, CreatePhoneProviderSendTestResponseContent.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 (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/branding/phone/AsyncRawTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncRawTemplatesClient.java deleted file mode 100644 index 5b0d5c92a..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncRawTemplatesClient.java +++ /dev/null @@ -1,668 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.phone; - -import com.auth0.client.mgmt.branding.phone.types.CreatePhoneTemplateRequestContent; -import com.auth0.client.mgmt.branding.phone.types.CreatePhoneTemplateTestNotificationRequestContent; -import com.auth0.client.mgmt.branding.phone.types.ListPhoneTemplatesRequestParameters; -import com.auth0.client.mgmt.branding.phone.types.UpdatePhoneTemplateRequestContent; -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.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.CreatePhoneTemplateResponseContent; -import com.auth0.client.mgmt.types.CreatePhoneTemplateTestNotificationResponseContent; -import com.auth0.client.mgmt.types.GetPhoneTemplateResponseContent; -import com.auth0.client.mgmt.types.ListPhoneTemplatesResponseContent; -import com.auth0.client.mgmt.types.ResetPhoneTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdatePhoneTemplateResponseContent; -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 AsyncRawTemplatesClient { - protected final ClientOptions clientOptions; - - public AsyncRawTemplatesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public CompletableFuture> list() { - return list(ListPhoneTemplatesRequestParameters.builder().build()); - } - - public CompletableFuture> list( - ListPhoneTemplatesRequestParameters request) { - return list(request, null); - } - - public CompletableFuture> list( - ListPhoneTemplatesRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/templates"); - if (!request.getDisabled().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "disabled", request.getDisabled().orElse(null), false); - } - 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); - } - 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, ListPhoneTemplatesResponseContent.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 (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() { - return create(CreatePhoneTemplateRequestContent.builder().build()); - } - - public CompletableFuture> create( - CreatePhoneTemplateRequestContent request) { - return create(request, null); - } - - public CompletableFuture> create( - CreatePhoneTemplateRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/templates") - .build(); - 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) - .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); - } - 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, CreatePhoneTemplateResponseContent.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 (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 httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/templates") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetPhoneTemplateResponseContent.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 (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 httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/templates") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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, UpdatePhoneTemplateRequestContent.builder().build()); - } - - public CompletableFuture> update( - String id, UpdatePhoneTemplateRequestContent request) { - return update(id, request, null); - } - - public CompletableFuture> update( - String id, UpdatePhoneTemplateRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/templates") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdatePhoneTemplateResponseContent.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 (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> reset( - String id, Object request) { - return reset(id, request, null); - } - - public CompletableFuture> reset( - String id, Object request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/templates") - .addPathSegment(id) - .addPathSegments("reset") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ResetPhoneTemplateResponseContent.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 (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> test( - String id, CreatePhoneTemplateTestNotificationRequestContent request) { - return test(id, request, null); - } - - public CompletableFuture> test( - String id, CreatePhoneTemplateTestNotificationRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/templates") - .addPathSegment(id) - .addPathSegments("try") - .build(); - 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) - .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); - } - 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, CreatePhoneTemplateTestNotificationResponseContent.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 (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/branding/phone/AsyncTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncTemplatesClient.java deleted file mode 100644 index 0f57afb71..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/AsyncTemplatesClient.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.phone; - -import com.auth0.client.mgmt.branding.phone.types.CreatePhoneTemplateRequestContent; -import com.auth0.client.mgmt.branding.phone.types.CreatePhoneTemplateTestNotificationRequestContent; -import com.auth0.client.mgmt.branding.phone.types.ListPhoneTemplatesRequestParameters; -import com.auth0.client.mgmt.branding.phone.types.UpdatePhoneTemplateRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.CreatePhoneTemplateResponseContent; -import com.auth0.client.mgmt.types.CreatePhoneTemplateTestNotificationResponseContent; -import com.auth0.client.mgmt.types.GetPhoneTemplateResponseContent; -import com.auth0.client.mgmt.types.ListPhoneTemplatesResponseContent; -import com.auth0.client.mgmt.types.ResetPhoneTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdatePhoneTemplateResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncTemplatesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawTemplatesClient rawClient; - - public AsyncTemplatesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawTemplatesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawTemplatesClient withRawResponse() { - return this.rawClient; - } - - public CompletableFuture list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - public CompletableFuture list(ListPhoneTemplatesRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - public CompletableFuture list( - ListPhoneTemplatesRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture create() { - return this.rawClient.create().thenApply(response -> response.body()); - } - - public CompletableFuture create(CreatePhoneTemplateRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - public CompletableFuture create( - CreatePhoneTemplateRequestContent 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, UpdatePhoneTemplateRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture update( - String id, UpdatePhoneTemplateRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture reset(String id, Object request) { - return this.rawClient.reset(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture reset( - String id, Object request, RequestOptions requestOptions) { - return this.rawClient.reset(id, request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture test( - String id, CreatePhoneTemplateTestNotificationRequestContent request) { - return this.rawClient.test(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture test( - String id, CreatePhoneTemplateTestNotificationRequestContent request, RequestOptions requestOptions) { - return this.rawClient.test(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/phone/PhoneClient.java b/src/main/java/com/auth0/client/mgmt/branding/phone/PhoneClient.java deleted file mode 100644 index e9cee2da4..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/PhoneClient.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.phone; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class PhoneClient { - protected final ClientOptions clientOptions; - - protected final Supplier providersClient; - - protected final Supplier templatesClient; - - public PhoneClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.providersClient = Suppliers.memoize(() -> new ProvidersClient(clientOptions)); - this.templatesClient = Suppliers.memoize(() -> new TemplatesClient(clientOptions)); - } - - public ProvidersClient providers() { - return this.providersClient.get(); - } - - public TemplatesClient templates() { - return this.templatesClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/phone/ProvidersClient.java b/src/main/java/com/auth0/client/mgmt/branding/phone/ProvidersClient.java deleted file mode 100644 index c762a0b4c..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/ProvidersClient.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.phone; - -import com.auth0.client.mgmt.branding.phone.types.CreateBrandingPhoneProviderRequestContent; -import com.auth0.client.mgmt.branding.phone.types.CreatePhoneProviderSendTestRequestContent; -import com.auth0.client.mgmt.branding.phone.types.ListBrandingPhoneProvidersRequestParameters; -import com.auth0.client.mgmt.branding.phone.types.UpdateBrandingPhoneProviderRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.CreateBrandingPhoneProviderResponseContent; -import com.auth0.client.mgmt.types.CreatePhoneProviderSendTestResponseContent; -import com.auth0.client.mgmt.types.GetBrandingPhoneProviderResponseContent; -import com.auth0.client.mgmt.types.ListBrandingPhoneProvidersResponseContent; -import com.auth0.client.mgmt.types.UpdateBrandingPhoneProviderResponseContent; - -public class ProvidersClient { - protected final ClientOptions clientOptions; - - private final RawProvidersClient rawClient; - - public ProvidersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawProvidersClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawProvidersClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone providers</a> details set for a Tenant. A list of fields to include or exclude may also be specified. - */ - public ListBrandingPhoneProvidersResponseContent list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone providers</a> details set for a Tenant. A list of fields to include or exclude may also be specified. - */ - public ListBrandingPhoneProvidersResponseContent list(ListBrandingPhoneProvidersRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone providers</a> details set for a Tenant. A list of fields to include or exclude may also be specified. - */ - public ListBrandingPhoneProvidersResponseContent list( - ListBrandingPhoneProvidersRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public CreateBrandingPhoneProviderResponseContent create(CreateBrandingPhoneProviderRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public CreateBrandingPhoneProviderResponseContent create( - CreateBrandingPhoneProviderRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Retrieve <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a> details. A list of fields to include or exclude may also be specified. - */ - public GetBrandingPhoneProviderResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a> details. A list of fields to include or exclude may also be specified. - */ - public GetBrandingPhoneProviderResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Delete the configured phone provider. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete the configured phone provider. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public UpdateBrandingPhoneProviderResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public UpdateBrandingPhoneProviderResponseContent update( - String id, UpdateBrandingPhoneProviderRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public UpdateBrandingPhoneProviderResponseContent update( - String id, UpdateBrandingPhoneProviderRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - public CreatePhoneProviderSendTestResponseContent test( - String id, CreatePhoneProviderSendTestRequestContent request) { - return this.rawClient.test(id, request).body(); - } - - public CreatePhoneProviderSendTestResponseContent test( - String id, CreatePhoneProviderSendTestRequestContent request, RequestOptions requestOptions) { - return this.rawClient.test(id, request, requestOptions).body(); - } -} 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 deleted file mode 100644 index 1e3d469ef..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/RawProvidersClient.java +++ /dev/null @@ -1,474 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.phone; - -import com.auth0.client.mgmt.branding.phone.types.CreateBrandingPhoneProviderRequestContent; -import com.auth0.client.mgmt.branding.phone.types.CreatePhoneProviderSendTestRequestContent; -import com.auth0.client.mgmt.branding.phone.types.ListBrandingPhoneProvidersRequestParameters; -import com.auth0.client.mgmt.branding.phone.types.UpdateBrandingPhoneProviderRequestContent; -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.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.CreateBrandingPhoneProviderResponseContent; -import com.auth0.client.mgmt.types.CreatePhoneProviderSendTestResponseContent; -import com.auth0.client.mgmt.types.GetBrandingPhoneProviderResponseContent; -import com.auth0.client.mgmt.types.ListBrandingPhoneProvidersResponseContent; -import com.auth0.client.mgmt.types.UpdateBrandingPhoneProviderResponseContent; -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 RawProvidersClient { - protected final ClientOptions clientOptions; - - public RawProvidersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone providers</a> details set for a Tenant. A list of fields to include or exclude may also be specified. - */ - public ManagementApiHttpResponse list() { - return list(ListBrandingPhoneProvidersRequestParameters.builder().build()); - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone providers</a> details set for a Tenant. A list of fields to include or exclude may also be specified. - */ - public ManagementApiHttpResponse list( - ListBrandingPhoneProvidersRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve a list of <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone providers</a> details set for a Tenant. A list of fields to include or exclude may also be specified. - */ - public ManagementApiHttpResponse list( - ListBrandingPhoneProvidersRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/providers"); - if (!request.getDisabled().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "disabled", request.getDisabled().orElse(null), false); - } - 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); - } - 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, ListBrandingPhoneProvidersResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public ManagementApiHttpResponse create( - CreateBrandingPhoneProviderRequestContent request) { - return create(request, null); - } - - /** - * Create a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public ManagementApiHttpResponse create( - CreateBrandingPhoneProviderRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/providers") - .build(); - 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) - .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); - } - 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, CreateBrandingPhoneProviderResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a> details. A list of fields to include or exclude may also be specified. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a> details. A list of fields to include or exclude may also be specified. - */ - public ManagementApiHttpResponse get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/providers") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetBrandingPhoneProviderResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete the configured phone provider. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete the configured phone provider. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/providers") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateBrandingPhoneProviderRequestContent.builder().build()); - } - - /** - * Update a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public ManagementApiHttpResponse update( - String id, UpdateBrandingPhoneProviderRequestContent request) { - return update(id, request, null); - } - - /** - * Update a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>. - * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property). - */ - public ManagementApiHttpResponse update( - String id, UpdateBrandingPhoneProviderRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/providers") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateBrandingPhoneProviderResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse test( - String id, CreatePhoneProviderSendTestRequestContent request) { - return test(id, request, null); - } - - public ManagementApiHttpResponse test( - String id, CreatePhoneProviderSendTestRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/providers") - .addPathSegment(id) - .addPathSegments("try") - .build(); - 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) - .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); - } - 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, CreatePhoneProviderSendTestResponseContent.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 (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 deleted file mode 100644 index eeada4900..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/RawTemplatesClient.java +++ /dev/null @@ -1,498 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.phone; - -import com.auth0.client.mgmt.branding.phone.types.CreatePhoneTemplateRequestContent; -import com.auth0.client.mgmt.branding.phone.types.CreatePhoneTemplateTestNotificationRequestContent; -import com.auth0.client.mgmt.branding.phone.types.ListPhoneTemplatesRequestParameters; -import com.auth0.client.mgmt.branding.phone.types.UpdatePhoneTemplateRequestContent; -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.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.CreatePhoneTemplateResponseContent; -import com.auth0.client.mgmt.types.CreatePhoneTemplateTestNotificationResponseContent; -import com.auth0.client.mgmt.types.GetPhoneTemplateResponseContent; -import com.auth0.client.mgmt.types.ListPhoneTemplatesResponseContent; -import com.auth0.client.mgmt.types.ResetPhoneTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdatePhoneTemplateResponseContent; -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 RawTemplatesClient { - protected final ClientOptions clientOptions; - - public RawTemplatesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public ManagementApiHttpResponse list() { - return list(ListPhoneTemplatesRequestParameters.builder().build()); - } - - public ManagementApiHttpResponse list( - ListPhoneTemplatesRequestParameters request) { - return list(request, null); - } - - public ManagementApiHttpResponse list( - ListPhoneTemplatesRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/templates"); - if (!request.getDisabled().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "disabled", request.getDisabled().orElse(null), false); - } - 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); - } - 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, ListPhoneTemplatesResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse create() { - return create(CreatePhoneTemplateRequestContent.builder().build()); - } - - public ManagementApiHttpResponse create( - CreatePhoneTemplateRequestContent request) { - return create(request, null); - } - - public ManagementApiHttpResponse create( - CreatePhoneTemplateRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/templates") - .build(); - 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) - .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); - } - 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, CreatePhoneTemplateResponseContent.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 (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 httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/templates") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetPhoneTemplateResponseContent.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 (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 httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/templates") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse update(String id) { - return update(id, UpdatePhoneTemplateRequestContent.builder().build()); - } - - public ManagementApiHttpResponse update( - String id, UpdatePhoneTemplateRequestContent request) { - return update(id, request, null); - } - - public ManagementApiHttpResponse update( - String id, UpdatePhoneTemplateRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/templates") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdatePhoneTemplateResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse reset(String id, Object request) { - return reset(id, request, null); - } - - public ManagementApiHttpResponse reset( - String id, Object request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/templates") - .addPathSegment(id) - .addPathSegments("reset") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ResetPhoneTemplateResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse test( - String id, CreatePhoneTemplateTestNotificationRequestContent request) { - return test(id, request, null); - } - - public ManagementApiHttpResponse test( - String id, CreatePhoneTemplateTestNotificationRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("branding/phone/templates") - .addPathSegment(id) - .addPathSegments("try") - .build(); - 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) - .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); - } - 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, CreatePhoneTemplateTestNotificationResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/phone/TemplatesClient.java b/src/main/java/com/auth0/client/mgmt/branding/phone/TemplatesClient.java deleted file mode 100644 index ced259322..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/TemplatesClient.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.phone; - -import com.auth0.client.mgmt.branding.phone.types.CreatePhoneTemplateRequestContent; -import com.auth0.client.mgmt.branding.phone.types.CreatePhoneTemplateTestNotificationRequestContent; -import com.auth0.client.mgmt.branding.phone.types.ListPhoneTemplatesRequestParameters; -import com.auth0.client.mgmt.branding.phone.types.UpdatePhoneTemplateRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.CreatePhoneTemplateResponseContent; -import com.auth0.client.mgmt.types.CreatePhoneTemplateTestNotificationResponseContent; -import com.auth0.client.mgmt.types.GetPhoneTemplateResponseContent; -import com.auth0.client.mgmt.types.ListPhoneTemplatesResponseContent; -import com.auth0.client.mgmt.types.ResetPhoneTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdatePhoneTemplateResponseContent; - -public class TemplatesClient { - protected final ClientOptions clientOptions; - - private final RawTemplatesClient rawClient; - - public TemplatesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawTemplatesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawTemplatesClient withRawResponse() { - return this.rawClient; - } - - public ListPhoneTemplatesResponseContent list() { - return this.rawClient.list().body(); - } - - public ListPhoneTemplatesResponseContent list(ListPhoneTemplatesRequestParameters request) { - return this.rawClient.list(request).body(); - } - - public ListPhoneTemplatesResponseContent list( - ListPhoneTemplatesRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - public CreatePhoneTemplateResponseContent create() { - return this.rawClient.create().body(); - } - - public CreatePhoneTemplateResponseContent create(CreatePhoneTemplateRequestContent request) { - return this.rawClient.create(request).body(); - } - - public CreatePhoneTemplateResponseContent create( - CreatePhoneTemplateRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - public GetPhoneTemplateResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - public GetPhoneTemplateResponseContent 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 UpdatePhoneTemplateResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - public UpdatePhoneTemplateResponseContent update(String id, UpdatePhoneTemplateRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - public UpdatePhoneTemplateResponseContent update( - String id, UpdatePhoneTemplateRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - public ResetPhoneTemplateResponseContent reset(String id, Object request) { - return this.rawClient.reset(id, request).body(); - } - - public ResetPhoneTemplateResponseContent reset(String id, Object request, RequestOptions requestOptions) { - return this.rawClient.reset(id, request, requestOptions).body(); - } - - public CreatePhoneTemplateTestNotificationResponseContent test( - String id, CreatePhoneTemplateTestNotificationRequestContent request) { - return this.rawClient.test(id, request).body(); - } - - public CreatePhoneTemplateTestNotificationResponseContent test( - String id, CreatePhoneTemplateTestNotificationRequestContent request, RequestOptions requestOptions) { - return this.rawClient.test(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/phone/types/CreateBrandingPhoneProviderRequestContent.java b/src/main/java/com/auth0/client/mgmt/branding/phone/types/CreateBrandingPhoneProviderRequestContent.java deleted file mode 100644 index 070e85106..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/types/CreateBrandingPhoneProviderRequestContent.java +++ /dev/null @@ -1,208 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.phone.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.PhoneProviderConfiguration; -import com.auth0.client.mgmt.types.PhoneProviderCredentials; -import com.auth0.client.mgmt.types.PhoneProviderNameEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateBrandingPhoneProviderRequestContent.Builder.class) -public final class CreateBrandingPhoneProviderRequestContent { - private final PhoneProviderNameEnum name; - - private final Optional disabled; - - private final Optional configuration; - - private final PhoneProviderCredentials credentials; - - private final Map additionalProperties; - - private CreateBrandingPhoneProviderRequestContent( - PhoneProviderNameEnum name, - Optional disabled, - Optional configuration, - PhoneProviderCredentials credentials, - Map additionalProperties) { - this.name = name; - this.disabled = disabled; - this.configuration = configuration; - this.credentials = credentials; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public PhoneProviderNameEnum getName() { - return name; - } - - /** - * @return Whether the provider is enabled (false) or disabled (true). - */ - @JsonProperty("disabled") - public Optional getDisabled() { - return disabled; - } - - @JsonProperty("configuration") - public Optional getConfiguration() { - return configuration; - } - - @JsonProperty("credentials") - public PhoneProviderCredentials getCredentials() { - return credentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateBrandingPhoneProviderRequestContent - && equalTo((CreateBrandingPhoneProviderRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateBrandingPhoneProviderRequestContent other) { - return name.equals(other.name) - && disabled.equals(other.disabled) - && configuration.equals(other.configuration) - && credentials.equals(other.credentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.disabled, this.configuration, this.credentials); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - CredentialsStage name(@NotNull PhoneProviderNameEnum name); - - Builder from(CreateBrandingPhoneProviderRequestContent other); - } - - public interface CredentialsStage { - _FinalStage credentials(@NotNull PhoneProviderCredentials credentials); - } - - public interface _FinalStage { - CreateBrandingPhoneProviderRequestContent build(); - - /** - *

Whether the provider is enabled (false) or disabled (true).

- */ - _FinalStage disabled(Optional disabled); - - _FinalStage disabled(Boolean disabled); - - _FinalStage configuration(Optional configuration); - - _FinalStage configuration(PhoneProviderConfiguration configuration); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, CredentialsStage, _FinalStage { - private PhoneProviderNameEnum name; - - private PhoneProviderCredentials credentials; - - private Optional configuration = Optional.empty(); - - private Optional disabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateBrandingPhoneProviderRequestContent other) { - name(other.getName()); - disabled(other.getDisabled()); - configuration(other.getConfiguration()); - credentials(other.getCredentials()); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public CredentialsStage name(@NotNull PhoneProviderNameEnum name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("credentials") - public _FinalStage credentials(@NotNull PhoneProviderCredentials credentials) { - this.credentials = Objects.requireNonNull(credentials, "credentials must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage configuration(PhoneProviderConfiguration configuration) { - this.configuration = Optional.ofNullable(configuration); - return this; - } - - @java.lang.Override - @JsonSetter(value = "configuration", nulls = Nulls.SKIP) - public _FinalStage configuration(Optional configuration) { - this.configuration = configuration; - return this; - } - - /** - *

Whether the provider is enabled (false) or disabled (true).

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

Whether the provider is enabled (false) or disabled (true).

- */ - @java.lang.Override - @JsonSetter(value = "disabled", nulls = Nulls.SKIP) - public _FinalStage disabled(Optional disabled) { - this.disabled = disabled; - return this; - } - - @java.lang.Override - public CreateBrandingPhoneProviderRequestContent build() { - return new CreateBrandingPhoneProviderRequestContent( - name, disabled, configuration, credentials, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/phone/types/CreatePhoneProviderSendTestRequestContent.java b/src/main/java/com/auth0/client/mgmt/branding/phone/types/CreatePhoneProviderSendTestRequestContent.java deleted file mode 100644 index ebbbd5cce..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/types/CreatePhoneProviderSendTestRequestContent.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.phone.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.PhoneProviderDeliveryMethodEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreatePhoneProviderSendTestRequestContent.Builder.class) -public final class CreatePhoneProviderSendTestRequestContent { - private final String to; - - private final Optional deliveryMethod; - - private final Map additionalProperties; - - private CreatePhoneProviderSendTestRequestContent( - String to, - Optional deliveryMethod, - Map additionalProperties) { - this.to = to; - this.deliveryMethod = deliveryMethod; - this.additionalProperties = additionalProperties; - } - - /** - * @return The recipient phone number to receive a given notification. - */ - @JsonProperty("to") - public String getTo() { - return to; - } - - @JsonProperty("delivery_method") - public Optional getDeliveryMethod() { - return deliveryMethod; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreatePhoneProviderSendTestRequestContent - && equalTo((CreatePhoneProviderSendTestRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreatePhoneProviderSendTestRequestContent other) { - return to.equals(other.to) && deliveryMethod.equals(other.deliveryMethod); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.to, this.deliveryMethod); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ToStage builder() { - return new Builder(); - } - - public interface ToStage { - /** - *

The recipient phone number to receive a given notification.

- */ - _FinalStage to(@NotNull String to); - - Builder from(CreatePhoneProviderSendTestRequestContent other); - } - - public interface _FinalStage { - CreatePhoneProviderSendTestRequestContent build(); - - _FinalStage deliveryMethod(Optional deliveryMethod); - - _FinalStage deliveryMethod(PhoneProviderDeliveryMethodEnum deliveryMethod); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ToStage, _FinalStage { - private String to; - - private Optional deliveryMethod = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreatePhoneProviderSendTestRequestContent other) { - to(other.getTo()); - deliveryMethod(other.getDeliveryMethod()); - return this; - } - - /** - *

The 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. - */ - @java.lang.Override - @JsonSetter("to") - public _FinalStage to(@NotNull String to) { - this.to = Objects.requireNonNull(to, "to must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage deliveryMethod(PhoneProviderDeliveryMethodEnum deliveryMethod) { - this.deliveryMethod = Optional.ofNullable(deliveryMethod); - return this; - } - - @java.lang.Override - @JsonSetter(value = "delivery_method", nulls = Nulls.SKIP) - public _FinalStage deliveryMethod(Optional deliveryMethod) { - this.deliveryMethod = deliveryMethod; - return this; - } - - @java.lang.Override - public CreatePhoneProviderSendTestRequestContent build() { - return new CreatePhoneProviderSendTestRequestContent(to, deliveryMethod, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/phone/types/CreatePhoneTemplateRequestContent.java b/src/main/java/com/auth0/client/mgmt/branding/phone/types/CreatePhoneTemplateRequestContent.java deleted file mode 100644 index 2d9f5467d..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/types/CreatePhoneTemplateRequestContent.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.phone.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.PhoneTemplateContent; -import com.auth0.client.mgmt.types.PhoneTemplateNotificationTypeEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreatePhoneTemplateRequestContent.Builder.class) -public final class CreatePhoneTemplateRequestContent { - private final Optional type; - - private final Optional disabled; - - private final Optional content; - - private final Map additionalProperties; - - private CreatePhoneTemplateRequestContent( - Optional type, - Optional disabled, - Optional content, - Map additionalProperties) { - this.type = type; - this.disabled = disabled; - this.content = content; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return Whether the template is enabled (false) or disabled (true). - */ - @JsonProperty("disabled") - public Optional getDisabled() { - return disabled; - } - - @JsonProperty("content") - public Optional getContent() { - return content; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreatePhoneTemplateRequestContent && equalTo((CreatePhoneTemplateRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreatePhoneTemplateRequestContent other) { - return type.equals(other.type) && disabled.equals(other.disabled) && content.equals(other.content); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.disabled, this.content); - } - - @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 type = Optional.empty(); - - private Optional disabled = Optional.empty(); - - private Optional content = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreatePhoneTemplateRequestContent other) { - type(other.getType()); - disabled(other.getDisabled()); - content(other.getContent()); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(PhoneTemplateNotificationTypeEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

Whether the template is enabled (false) or disabled (true).

- */ - @JsonSetter(value = "disabled", nulls = Nulls.SKIP) - public Builder disabled(Optional disabled) { - this.disabled = disabled; - return this; - } - - public Builder disabled(Boolean disabled) { - this.disabled = Optional.ofNullable(disabled); - return this; - } - - @JsonSetter(value = "content", nulls = Nulls.SKIP) - public Builder content(Optional content) { - this.content = content; - return this; - } - - public Builder content(PhoneTemplateContent content) { - this.content = Optional.ofNullable(content); - return this; - } - - public CreatePhoneTemplateRequestContent build() { - return new CreatePhoneTemplateRequestContent(type, disabled, content, additionalProperties); - } - } -} 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 deleted file mode 100644 index 7cb0e906b..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/types/CreatePhoneTemplateTestNotificationRequestContent.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.phone.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.PhoneProviderDeliveryMethodEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreatePhoneTemplateTestNotificationRequestContent.Builder.class) -public final class CreatePhoneTemplateTestNotificationRequestContent { - private final String to; - - private final Optional deliveryMethod; - - private final Map additionalProperties; - - private CreatePhoneTemplateTestNotificationRequestContent( - String to, - Optional deliveryMethod, - Map additionalProperties) { - this.to = to; - this.deliveryMethod = deliveryMethod; - this.additionalProperties = additionalProperties; - } - - /** - * @return Destination of the testing phone notification - */ - @JsonProperty("to") - public String getTo() { - return to; - } - - @JsonProperty("delivery_method") - public Optional getDeliveryMethod() { - return deliveryMethod; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreatePhoneTemplateTestNotificationRequestContent - && equalTo((CreatePhoneTemplateTestNotificationRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreatePhoneTemplateTestNotificationRequestContent other) { - return to.equals(other.to) && deliveryMethod.equals(other.deliveryMethod); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.to, this.deliveryMethod); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ToStage builder() { - return new Builder(); - } - - public interface ToStage { - /** - *

Destination of the testing phone notification

- */ - _FinalStage to(@NotNull String to); - - Builder from(CreatePhoneTemplateTestNotificationRequestContent other); - } - - public interface _FinalStage { - CreatePhoneTemplateTestNotificationRequestContent build(); - - _FinalStage deliveryMethod(Optional deliveryMethod); - - _FinalStage deliveryMethod(PhoneProviderDeliveryMethodEnum deliveryMethod); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ToStage, _FinalStage { - private String to; - - private Optional deliveryMethod = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreatePhoneTemplateTestNotificationRequestContent other) { - to(other.getTo()); - deliveryMethod(other.getDeliveryMethod()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("to") - public _FinalStage to(@NotNull String to) { - this.to = Objects.requireNonNull(to, "to must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage deliveryMethod(PhoneProviderDeliveryMethodEnum deliveryMethod) { - this.deliveryMethod = Optional.ofNullable(deliveryMethod); - return this; - } - - @java.lang.Override - @JsonSetter(value = "delivery_method", nulls = Nulls.SKIP) - public _FinalStage deliveryMethod(Optional deliveryMethod) { - this.deliveryMethod = deliveryMethod; - return this; - } - - @java.lang.Override - public CreatePhoneTemplateTestNotificationRequestContent build() { - return new CreatePhoneTemplateTestNotificationRequestContent(to, deliveryMethod, additionalProperties); - } - } -} 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 deleted file mode 100644 index 4546bbb2e..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/types/ListBrandingPhoneProvidersRequestParameters.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListBrandingPhoneProvidersRequestParameters.Builder.class) -public final class ListBrandingPhoneProvidersRequestParameters { - private final OptionalNullable disabled; - - private final Map additionalProperties; - - private ListBrandingPhoneProvidersRequestParameters( - OptionalNullable disabled, Map additionalProperties) { - this.disabled = disabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether the provider is enabled (false) or disabled (true). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("disabled") - public OptionalNullable getDisabled() { - if (disabled == null) { - return OptionalNullable.absent(); - } - 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; - return other instanceof ListBrandingPhoneProvidersRequestParameters - && equalTo((ListBrandingPhoneProvidersRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListBrandingPhoneProvidersRequestParameters other) { - return disabled.equals(other.disabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.disabled); - } - - @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 disabled = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListBrandingPhoneProvidersRequestParameters other) { - disabled(other.getDisabled()); - return this; - } - - /** - *

Whether the provider is enabled (false) or disabled (true).

- */ - @JsonSetter(value = "disabled", nulls = Nulls.SKIP) - public Builder disabled(@Nullable OptionalNullable disabled) { - this.disabled = disabled; - return this; - } - - public Builder disabled(Boolean disabled) { - this.disabled = OptionalNullable.of(disabled); - return this; - } - - public Builder disabled(Optional disabled) { - if (disabled.isPresent()) { - this.disabled = OptionalNullable.of(disabled.get()); - } else { - this.disabled = OptionalNullable.absent(); - } - return this; - } - - public Builder disabled(com.auth0.client.mgmt.core.Nullable disabled) { - if (disabled.isNull()) { - this.disabled = OptionalNullable.ofNull(); - } else if (disabled.isEmpty()) { - this.disabled = OptionalNullable.absent(); - } else { - this.disabled = OptionalNullable.of(disabled.get()); - } - return this; - } - - public ListBrandingPhoneProvidersRequestParameters build() { - return new ListBrandingPhoneProvidersRequestParameters(disabled, additionalProperties); - } - } -} 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 deleted file mode 100644 index a2186347a..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/types/ListPhoneTemplatesRequestParameters.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListPhoneTemplatesRequestParameters.Builder.class) -public final class ListPhoneTemplatesRequestParameters { - private final OptionalNullable disabled; - - private final Map additionalProperties; - - private ListPhoneTemplatesRequestParameters( - OptionalNullable disabled, Map additionalProperties) { - this.disabled = disabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether the template is enabled (false) or disabled (true). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("disabled") - public OptionalNullable getDisabled() { - if (disabled == null) { - return OptionalNullable.absent(); - } - 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; - return other instanceof ListPhoneTemplatesRequestParameters - && equalTo((ListPhoneTemplatesRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListPhoneTemplatesRequestParameters other) { - return disabled.equals(other.disabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.disabled); - } - - @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 disabled = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListPhoneTemplatesRequestParameters other) { - disabled(other.getDisabled()); - return this; - } - - /** - *

Whether the template is enabled (false) or disabled (true).

- */ - @JsonSetter(value = "disabled", nulls = Nulls.SKIP) - public Builder disabled(@Nullable OptionalNullable disabled) { - this.disabled = disabled; - return this; - } - - public Builder disabled(Boolean disabled) { - this.disabled = OptionalNullable.of(disabled); - return this; - } - - public Builder disabled(Optional disabled) { - if (disabled.isPresent()) { - this.disabled = OptionalNullable.of(disabled.get()); - } else { - this.disabled = OptionalNullable.absent(); - } - return this; - } - - public Builder disabled(com.auth0.client.mgmt.core.Nullable disabled) { - if (disabled.isNull()) { - this.disabled = OptionalNullable.ofNull(); - } else if (disabled.isEmpty()) { - this.disabled = OptionalNullable.absent(); - } else { - this.disabled = OptionalNullable.of(disabled.get()); - } - return this; - } - - public ListPhoneTemplatesRequestParameters build() { - return new ListPhoneTemplatesRequestParameters(disabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/phone/types/UpdateBrandingPhoneProviderRequestContent.java b/src/main/java/com/auth0/client/mgmt/branding/phone/types/UpdateBrandingPhoneProviderRequestContent.java deleted file mode 100644 index bf8583d48..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/types/UpdateBrandingPhoneProviderRequestContent.java +++ /dev/null @@ -1,180 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.phone.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.PhoneProviderConfiguration; -import com.auth0.client.mgmt.types.PhoneProviderCredentials; -import com.auth0.client.mgmt.types.PhoneProviderNameEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateBrandingPhoneProviderRequestContent.Builder.class) -public final class UpdateBrandingPhoneProviderRequestContent { - private final Optional name; - - private final Optional disabled; - - private final Optional credentials; - - private final Optional configuration; - - private final Map additionalProperties; - - private UpdateBrandingPhoneProviderRequestContent( - Optional name, - Optional disabled, - Optional credentials, - Optional configuration, - Map additionalProperties) { - this.name = name; - this.disabled = disabled; - this.credentials = credentials; - this.configuration = configuration; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Whether the provider is enabled (false) or disabled (true). - */ - @JsonProperty("disabled") - public Optional getDisabled() { - return disabled; - } - - @JsonProperty("credentials") - public Optional getCredentials() { - return credentials; - } - - @JsonProperty("configuration") - public Optional getConfiguration() { - return configuration; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateBrandingPhoneProviderRequestContent - && equalTo((UpdateBrandingPhoneProviderRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateBrandingPhoneProviderRequestContent other) { - return name.equals(other.name) - && disabled.equals(other.disabled) - && credentials.equals(other.credentials) - && configuration.equals(other.configuration); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.disabled, this.credentials, this.configuration); - } - - @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 disabled = Optional.empty(); - - private Optional credentials = Optional.empty(); - - private Optional configuration = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateBrandingPhoneProviderRequestContent other) { - name(other.getName()); - disabled(other.getDisabled()); - credentials(other.getCredentials()); - configuration(other.getConfiguration()); - return this; - } - - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public Builder name(Optional name) { - this.name = name; - return this; - } - - public Builder name(PhoneProviderNameEnum name) { - this.name = Optional.ofNullable(name); - return this; - } - - /** - *

Whether the provider is enabled (false) or disabled (true).

- */ - @JsonSetter(value = "disabled", nulls = Nulls.SKIP) - public Builder disabled(Optional disabled) { - this.disabled = disabled; - return this; - } - - public Builder disabled(Boolean disabled) { - this.disabled = Optional.ofNullable(disabled); - return this; - } - - @JsonSetter(value = "credentials", nulls = Nulls.SKIP) - public Builder credentials(Optional credentials) { - this.credentials = credentials; - return this; - } - - public Builder credentials(PhoneProviderCredentials credentials) { - this.credentials = Optional.ofNullable(credentials); - return this; - } - - @JsonSetter(value = "configuration", nulls = Nulls.SKIP) - public Builder configuration(Optional configuration) { - this.configuration = configuration; - return this; - } - - public Builder configuration(PhoneProviderConfiguration configuration) { - this.configuration = Optional.ofNullable(configuration); - return this; - } - - public UpdateBrandingPhoneProviderRequestContent build() { - return new UpdateBrandingPhoneProviderRequestContent( - name, disabled, credentials, configuration, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/branding/phone/types/UpdatePhoneTemplateRequestContent.java b/src/main/java/com/auth0/client/mgmt/branding/phone/types/UpdatePhoneTemplateRequestContent.java deleted file mode 100644 index 3e19fd8f5..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/phone/types/UpdatePhoneTemplateRequestContent.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.phone.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.PartialPhoneTemplateContent; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdatePhoneTemplateRequestContent.Builder.class) -public final class UpdatePhoneTemplateRequestContent { - private final Optional content; - - private final Optional disabled; - - private final Map additionalProperties; - - private UpdatePhoneTemplateRequestContent( - Optional content, - Optional disabled, - Map additionalProperties) { - this.content = content; - this.disabled = disabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("content") - public Optional getContent() { - return content; - } - - /** - * @return Whether the template is enabled (false) or disabled (true). - */ - @JsonProperty("disabled") - public Optional getDisabled() { - return disabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdatePhoneTemplateRequestContent && equalTo((UpdatePhoneTemplateRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdatePhoneTemplateRequestContent other) { - return content.equals(other.content) && disabled.equals(other.disabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.content, this.disabled); - } - - @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 content = Optional.empty(); - - private Optional disabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdatePhoneTemplateRequestContent other) { - content(other.getContent()); - disabled(other.getDisabled()); - return this; - } - - @JsonSetter(value = "content", nulls = Nulls.SKIP) - public Builder content(Optional content) { - this.content = content; - return this; - } - - public Builder content(PartialPhoneTemplateContent content) { - this.content = Optional.ofNullable(content); - return this; - } - - /** - *

Whether the template is enabled (false) or disabled (true).

- */ - @JsonSetter(value = "disabled", nulls = Nulls.SKIP) - public Builder disabled(Optional disabled) { - this.disabled = disabled; - return this; - } - - public Builder disabled(Boolean disabled) { - this.disabled = Optional.ofNullable(disabled); - return this; - } - - public UpdatePhoneTemplateRequestContent build() { - return new UpdatePhoneTemplateRequestContent(content, disabled, additionalProperties); - } - } -} 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 deleted file mode 100644 index ccf342554..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/types/CreateBrandingThemeRequestContent.java +++ /dev/null @@ -1,252 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -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.BrandingThemePageBackground; -import com.auth0.client.mgmt.types.BrandingThemeWidget; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateBrandingThemeRequestContent.Builder.class) -public final class CreateBrandingThemeRequestContent { - private final BrandingThemeBorders borders; - - private final BrandingThemeColors colors; - - private final Optional displayName; - - private final BrandingThemeFonts fonts; - - private final BrandingThemePageBackground pageBackground; - - private final BrandingThemeWidget widget; - - private final Map additionalProperties; - - private CreateBrandingThemeRequestContent( - BrandingThemeBorders borders, - BrandingThemeColors colors, - Optional displayName, - BrandingThemeFonts fonts, - BrandingThemePageBackground pageBackground, - BrandingThemeWidget widget, - Map additionalProperties) { - this.borders = borders; - this.colors = colors; - this.displayName = displayName; - this.fonts = fonts; - this.pageBackground = pageBackground; - this.widget = widget; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("borders") - public BrandingThemeBorders getBorders() { - return borders; - } - - @JsonProperty("colors") - public BrandingThemeColors getColors() { - return colors; - } - - /** - * @return Display Name - */ - @JsonProperty("displayName") - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("fonts") - public BrandingThemeFonts getFonts() { - return fonts; - } - - @JsonProperty("page_background") - public BrandingThemePageBackground getPageBackground() { - return pageBackground; - } - - @JsonProperty("widget") - public BrandingThemeWidget getWidget() { - return widget; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateBrandingThemeRequestContent && equalTo((CreateBrandingThemeRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateBrandingThemeRequestContent other) { - return borders.equals(other.borders) - && colors.equals(other.colors) - && displayName.equals(other.displayName) - && fonts.equals(other.fonts) - && 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); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BordersStage builder() { - return new Builder(); - } - - public interface BordersStage { - ColorsStage borders(@NotNull BrandingThemeBorders borders); - - Builder from(CreateBrandingThemeRequestContent other); - } - - public interface ColorsStage { - FontsStage colors(@NotNull BrandingThemeColors colors); - } - - public interface FontsStage { - PageBackgroundStage fonts(@NotNull BrandingThemeFonts fonts); - } - - public interface PageBackgroundStage { - WidgetStage pageBackground(@NotNull BrandingThemePageBackground pageBackground); - } - - public interface WidgetStage { - _FinalStage widget(@NotNull BrandingThemeWidget widget); - } - - public interface _FinalStage { - CreateBrandingThemeRequestContent build(); - - /** - *

Display Name

- */ - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements BordersStage, ColorsStage, FontsStage, PageBackgroundStage, WidgetStage, _FinalStage { - private BrandingThemeBorders borders; - - private BrandingThemeColors colors; - - private BrandingThemeFonts fonts; - - private BrandingThemePageBackground pageBackground; - - private BrandingThemeWidget widget; - - private Optional displayName = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateBrandingThemeRequestContent other) { - borders(other.getBorders()); - colors(other.getColors()); - displayName(other.getDisplayName()); - fonts(other.getFonts()); - pageBackground(other.getPageBackground()); - widget(other.getWidget()); - return this; - } - - @java.lang.Override - @JsonSetter("borders") - public ColorsStage borders(@NotNull BrandingThemeBorders borders) { - this.borders = Objects.requireNonNull(borders, "borders must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("colors") - public FontsStage colors(@NotNull BrandingThemeColors colors) { - this.colors = Objects.requireNonNull(colors, "colors must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("fonts") - public PageBackgroundStage fonts(@NotNull BrandingThemeFonts fonts) { - this.fonts = Objects.requireNonNull(fonts, "fonts must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("page_background") - public WidgetStage pageBackground(@NotNull BrandingThemePageBackground pageBackground) { - this.pageBackground = Objects.requireNonNull(pageBackground, "pageBackground must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("widget") - public _FinalStage widget(@NotNull BrandingThemeWidget widget) { - this.widget = Objects.requireNonNull(widget, "widget must not be null"); - return this; - } - - /** - *

Display Name

- * @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; - } - - /** - *

Display Name

- */ - @java.lang.Override - @JsonSetter(value = "displayName", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public CreateBrandingThemeRequestContent build() { - return new CreateBrandingThemeRequestContent( - borders, colors, displayName, fonts, pageBackground, widget, additionalProperties); - } - } -} 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 deleted file mode 100644 index 385409f0b..000000000 --- a/src/main/java/com/auth0/client/mgmt/branding/types/UpdateBrandingThemeRequestContent.java +++ /dev/null @@ -1,252 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.branding.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -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.BrandingThemePageBackground; -import com.auth0.client.mgmt.types.BrandingThemeWidget; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateBrandingThemeRequestContent.Builder.class) -public final class UpdateBrandingThemeRequestContent { - private final BrandingThemeBorders borders; - - private final BrandingThemeColors colors; - - private final Optional displayName; - - private final BrandingThemeFonts fonts; - - private final BrandingThemePageBackground pageBackground; - - private final BrandingThemeWidget widget; - - private final Map additionalProperties; - - private UpdateBrandingThemeRequestContent( - BrandingThemeBorders borders, - BrandingThemeColors colors, - Optional displayName, - BrandingThemeFonts fonts, - BrandingThemePageBackground pageBackground, - BrandingThemeWidget widget, - Map additionalProperties) { - this.borders = borders; - this.colors = colors; - this.displayName = displayName; - this.fonts = fonts; - this.pageBackground = pageBackground; - this.widget = widget; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("borders") - public BrandingThemeBorders getBorders() { - return borders; - } - - @JsonProperty("colors") - public BrandingThemeColors getColors() { - return colors; - } - - /** - * @return Display Name - */ - @JsonProperty("displayName") - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("fonts") - public BrandingThemeFonts getFonts() { - return fonts; - } - - @JsonProperty("page_background") - public BrandingThemePageBackground getPageBackground() { - return pageBackground; - } - - @JsonProperty("widget") - public BrandingThemeWidget getWidget() { - return widget; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateBrandingThemeRequestContent && equalTo((UpdateBrandingThemeRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateBrandingThemeRequestContent other) { - return borders.equals(other.borders) - && colors.equals(other.colors) - && displayName.equals(other.displayName) - && fonts.equals(other.fonts) - && 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); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BordersStage builder() { - return new Builder(); - } - - public interface BordersStage { - ColorsStage borders(@NotNull BrandingThemeBorders borders); - - Builder from(UpdateBrandingThemeRequestContent other); - } - - public interface ColorsStage { - FontsStage colors(@NotNull BrandingThemeColors colors); - } - - public interface FontsStage { - PageBackgroundStage fonts(@NotNull BrandingThemeFonts fonts); - } - - public interface PageBackgroundStage { - WidgetStage pageBackground(@NotNull BrandingThemePageBackground pageBackground); - } - - public interface WidgetStage { - _FinalStage widget(@NotNull BrandingThemeWidget widget); - } - - public interface _FinalStage { - UpdateBrandingThemeRequestContent build(); - - /** - *

Display Name

- */ - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements BordersStage, ColorsStage, FontsStage, PageBackgroundStage, WidgetStage, _FinalStage { - private BrandingThemeBorders borders; - - private BrandingThemeColors colors; - - private BrandingThemeFonts fonts; - - private BrandingThemePageBackground pageBackground; - - private BrandingThemeWidget widget; - - private Optional displayName = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateBrandingThemeRequestContent other) { - borders(other.getBorders()); - colors(other.getColors()); - displayName(other.getDisplayName()); - fonts(other.getFonts()); - pageBackground(other.getPageBackground()); - widget(other.getWidget()); - return this; - } - - @java.lang.Override - @JsonSetter("borders") - public ColorsStage borders(@NotNull BrandingThemeBorders borders) { - this.borders = Objects.requireNonNull(borders, "borders must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("colors") - public FontsStage colors(@NotNull BrandingThemeColors colors) { - this.colors = Objects.requireNonNull(colors, "colors must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("fonts") - public PageBackgroundStage fonts(@NotNull BrandingThemeFonts fonts) { - this.fonts = Objects.requireNonNull(fonts, "fonts must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("page_background") - public WidgetStage pageBackground(@NotNull BrandingThemePageBackground pageBackground) { - this.pageBackground = Objects.requireNonNull(pageBackground, "pageBackground must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("widget") - public _FinalStage widget(@NotNull BrandingThemeWidget widget) { - this.widget = Objects.requireNonNull(widget, "widget must not be null"); - return this; - } - - /** - *

Display Name

- * @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; - } - - /** - *

Display Name

- */ - @java.lang.Override - @JsonSetter(value = "displayName", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public UpdateBrandingThemeRequestContent build() { - return new UpdateBrandingThemeRequestContent( - borders, colors, displayName, fonts, pageBackground, widget, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/clientgrants/AsyncOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/clientgrants/AsyncOrganizationsClient.java deleted file mode 100644 index 5d0796fdd..000000000 --- a/src/main/java/com/auth0/client/mgmt/clientgrants/AsyncOrganizationsClient.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.clientgrants; - -import com.auth0.client.mgmt.clientgrants.types.ListClientGrantOrganizationsRequestParameters; -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.Organization; -import java.util.concurrent.CompletableFuture; - -public class AsyncOrganizationsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawOrganizationsClient rawClient; - - public AsyncOrganizationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawOrganizationsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawOrganizationsClient withRawResponse() { - return this.rawClient; - } - - public CompletableFuture> list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - public CompletableFuture> list( - String id, ListClientGrantOrganizationsRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture> list( - String id, ListClientGrantOrganizationsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/clientgrants/AsyncRawOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/clientgrants/AsyncRawOrganizationsClient.java deleted file mode 100644 index e5bc9afa3..000000000 --- a/src/main/java/com/auth0/client/mgmt/clientgrants/AsyncRawOrganizationsClient.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.clientgrants; - -import com.auth0.client.mgmt.clientgrants.types.ListClientGrantOrganizationsRequestParameters; -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.SyncPagingIterable; -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.types.ListClientGrantOrganizationsPaginatedResponseContent; -import com.auth0.client.mgmt.types.Organization; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawOrganizationsClient { - protected final ClientOptions clientOptions; - - public AsyncRawOrganizationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public CompletableFuture>> list(String id) { - return list(id, ListClientGrantOrganizationsRequestParameters.builder().build()); - } - - public CompletableFuture>> list( - String id, ListClientGrantOrganizationsRequestParameters request) { - return list(id, request, null); - } - - public CompletableFuture>> list( - String id, ListClientGrantOrganizationsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("client-grants") - .addPathSegment(id) - .addPathSegments("organizations"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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()) { - ListClientGrantOrganizationsPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListClientGrantOrganizationsPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListClientGrantOrganizationsRequestParameters nextRequest = - ListClientGrantOrganizationsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getOrganizations().orElse(Collections.emptyList()); - 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 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/clientgrants/OrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/clientgrants/OrganizationsClient.java deleted file mode 100644 index a89f02ae5..000000000 --- a/src/main/java/com/auth0/client/mgmt/clientgrants/OrganizationsClient.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.clientgrants; - -import com.auth0.client.mgmt.clientgrants.types.ListClientGrantOrganizationsRequestParameters; -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.Organization; - -public class OrganizationsClient { - protected final ClientOptions clientOptions; - - private final RawOrganizationsClient rawClient; - - public OrganizationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawOrganizationsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawOrganizationsClient withRawResponse() { - return this.rawClient; - } - - public SyncPagingIterable list(String id) { - return this.rawClient.list(id).body(); - } - - public SyncPagingIterable list(String id, ListClientGrantOrganizationsRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - public SyncPagingIterable list( - String id, ListClientGrantOrganizationsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/clientgrants/RawOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/clientgrants/RawOrganizationsClient.java deleted file mode 100644 index 8c134935f..000000000 --- a/src/main/java/com/auth0/client/mgmt/clientgrants/RawOrganizationsClient.java +++ /dev/null @@ -1,117 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.clientgrants; - -import com.auth0.client.mgmt.clientgrants.types.ListClientGrantOrganizationsRequestParameters; -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.SyncPagingIterable; -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.types.ListClientGrantOrganizationsPaginatedResponseContent; -import com.auth0.client.mgmt.types.Organization; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawOrganizationsClient { - protected final ClientOptions clientOptions; - - public RawOrganizationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public ManagementApiHttpResponse> list(String id) { - return list(id, ListClientGrantOrganizationsRequestParameters.builder().build()); - } - - public ManagementApiHttpResponse> list( - String id, ListClientGrantOrganizationsRequestParameters request) { - return list(id, request, null); - } - - public ManagementApiHttpResponse> list( - String id, ListClientGrantOrganizationsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("client-grants") - .addPathSegment(id) - .addPathSegments("organizations"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListClientGrantOrganizationsPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListClientGrantOrganizationsPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListClientGrantOrganizationsRequestParameters nextRequest = - ListClientGrantOrganizationsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getOrganizations().orElse(Collections.emptyList()); - 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 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} 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 deleted file mode 100644 index 265a509fe..000000000 --- a/src/main/java/com/auth0/client/mgmt/clientgrants/types/ListClientGrantOrganizationsRequestParameters.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListClientGrantOrganizationsRequestParameters.Builder.class) -public final class ListClientGrantOrganizationsRequestParameters { - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private ListClientGrantOrganizationsRequestParameters( - 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() { - 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; - return other instanceof ListClientGrantOrganizationsRequestParameters - && equalTo((ListClientGrantOrganizationsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListClientGrantOrganizationsRequestParameters 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(ListClientGrantOrganizationsRequestParameters 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(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 ListClientGrantOrganizationsRequestParameters build() { - return new ListClientGrantOrganizationsRequestParameters(from, take, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/clients/AsyncConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/clients/AsyncConnectionsClient.java deleted file mode 100644 index 57aec09a9..000000000 --- a/src/main/java/com/auth0/client/mgmt/clients/AsyncConnectionsClient.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.clients; - -import com.auth0.client.mgmt.clients.types.ConnectionsGetRequest; -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.ConnectionForList; -import java.util.concurrent.CompletableFuture; - -public class AsyncConnectionsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawConnectionsClient rawClient; - - public AsyncConnectionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawConnectionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawConnectionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve all connections that are enabled for the specified <a href="https://www.auth0.com/docs/get-started/applications"> Application</a>, using checkpoint pagination. A list of fields to include or exclude for each connection may also be specified. - *

<ul> - * <li> - * This endpoint requires the <code>read:connections</code> scope and any one of <code>read:clients</code> or <code>read:client_summary</code>. - * </li> - * <li> - * <b>Note</b>: The first time you call this endpoint, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no further results are remaining. - * </li> - * </ul>

- */ - public CompletableFuture> get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve all connections that are enabled for the specified <a href="https://www.auth0.com/docs/get-started/applications"> Application</a>, using checkpoint pagination. A list of fields to include or exclude for each connection may also be specified. - *

<ul> - * <li> - * This endpoint requires the <code>read:connections</code> scope and any one of <code>read:clients</code> or <code>read:client_summary</code>. - * </li> - * <li> - * <b>Note</b>: The first time you call this endpoint, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no further results are remaining. - * </li> - * </ul>

- */ - public CompletableFuture> get(String id, ConnectionsGetRequest request) { - return this.rawClient.get(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve all connections that are enabled for the specified <a href="https://www.auth0.com/docs/get-started/applications"> Application</a>, using checkpoint pagination. A list of fields to include or exclude for each connection may also be specified. - *

<ul> - * <li> - * This endpoint requires the <code>read:connections</code> scope and any one of <code>read:clients</code> or <code>read:client_summary</code>. - * </li> - * <li> - * <b>Note</b>: The first time you call this endpoint, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no further results are remaining. - * </li> - * </ul>

- */ - public CompletableFuture> get( - String id, ConnectionsGetRequest request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/clients/AsyncCredentialsClient.java b/src/main/java/com/auth0/client/mgmt/clients/AsyncCredentialsClient.java deleted file mode 100644 index cf5d698b0..000000000 --- a/src/main/java/com/auth0/client/mgmt/clients/AsyncCredentialsClient.java +++ /dev/null @@ -1,180 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.clients; - -import com.auth0.client.mgmt.clients.types.PatchClientCredentialRequestContent; -import com.auth0.client.mgmt.clients.types.PostClientCredentialRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.ClientCredential; -import com.auth0.client.mgmt.types.GetClientCredentialResponseContent; -import com.auth0.client.mgmt.types.PatchClientCredentialResponseContent; -import com.auth0.client.mgmt.types.PostClientCredentialResponseContent; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -public class AsyncCredentialsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawCredentialsClient rawClient; - - public AsyncCredentialsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawCredentialsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawCredentialsClient withRawResponse() { - return this.rawClient; - } - - /** - * Get the details of a client credential. - *

<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.

- */ - public CompletableFuture> list(String clientId) { - return this.rawClient.list(clientId).thenApply(response -> response.body()); - } - - /** - * Get the details of a client credential. - *

<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.

- */ - public CompletableFuture> list(String clientId, RequestOptions requestOptions) { - return this.rawClient.list(clientId, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a client credential associated to your application. Credentials can be used to configure Private Key JWT and mTLS authentication methods, as well as for JWT-secured Authorization requests. - *

<h5>Public Key</h5>Public Key credentials can be used to set up Private Key JWT client authentication and JWT-secured Authorization requests.

- *

Sample: <pre><code>{ - * "credential_type": "public_key", - * "name": "string", - * "pem": "string", - * "alg": "RS256", - * "parse_expiry_from_cert": false, - * "expires_at": "2022-12-31T23:59:59Z" - * }</code></pre>

- *

<h5>Certificate (CA-signed & self-signed)</h5>Certificate credentials can be used to set up mTLS client authentication. CA-signed certificates can be configured either with a signed certificate or with just the certificate Subject DN.

- *

CA-signed Certificate Sample (pem): <pre><code>{ - * "credential_type": "x509_cert", - * "name": "string", - * "pem": "string" - * }</code></pre>CA-signed Certificate Sample (subject_dn): <pre><code>{ - * "credential_type": "cert_subject_dn", - * "name": "string", - * "subject_dn": "string" - * }</code></pre>Self-signed Certificate Sample: <pre><code>{ - * "credential_type": "cert_subject_dn", - * "name": "string", - * "pem": "string" - * }</code></pre>

- *

The credential will be created but not yet enabled for use until you set the corresponding properties in the client:

- *

<ul> - * <li>To enable the credential for Private Key JWT or mTLS authentication methods, set the <code>client_authentication_methods</code> property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-private-key-jwt">Configure Private Key JWT Authentication</a> and <a href="https://auth0.com/docs/get-started/applications/configure-mtls">Configure mTLS Authentication</a></li> - * <li>To enable the credential for JWT-secured Authorization requests, set the <code>signed_request_object</code>property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-jar">Configure JWT-secured Authorization Requests (JAR)</a></li> - * </ul>

- */ - public CompletableFuture create( - String clientId, PostClientCredentialRequestContent request) { - return this.rawClient.create(clientId, request).thenApply(response -> response.body()); - } - - /** - * Create a client credential associated to your application. Credentials can be used to configure Private Key JWT and mTLS authentication methods, as well as for JWT-secured Authorization requests. - *

<h5>Public Key</h5>Public Key credentials can be used to set up Private Key JWT client authentication and JWT-secured Authorization requests.

- *

Sample: <pre><code>{ - * "credential_type": "public_key", - * "name": "string", - * "pem": "string", - * "alg": "RS256", - * "parse_expiry_from_cert": false, - * "expires_at": "2022-12-31T23:59:59Z" - * }</code></pre>

- *

<h5>Certificate (CA-signed & self-signed)</h5>Certificate credentials can be used to set up mTLS client authentication. CA-signed certificates can be configured either with a signed certificate or with just the certificate Subject DN.

- *

CA-signed Certificate Sample (pem): <pre><code>{ - * "credential_type": "x509_cert", - * "name": "string", - * "pem": "string" - * }</code></pre>CA-signed Certificate Sample (subject_dn): <pre><code>{ - * "credential_type": "cert_subject_dn", - * "name": "string", - * "subject_dn": "string" - * }</code></pre>Self-signed Certificate Sample: <pre><code>{ - * "credential_type": "cert_subject_dn", - * "name": "string", - * "pem": "string" - * }</code></pre>

- *

The credential will be created but not yet enabled for use until you set the corresponding properties in the client:

- *

<ul> - * <li>To enable the credential for Private Key JWT or mTLS authentication methods, set the <code>client_authentication_methods</code> property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-private-key-jwt">Configure Private Key JWT Authentication</a> and <a href="https://auth0.com/docs/get-started/applications/configure-mtls">Configure mTLS Authentication</a></li> - * <li>To enable the credential for JWT-secured Authorization requests, set the <code>signed_request_object</code>property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-jar">Configure JWT-secured Authorization Requests (JAR)</a></li> - * </ul>

- */ - public CompletableFuture create( - String clientId, PostClientCredentialRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(clientId, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Get the details of a client credential. - *

<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.

- */ - public CompletableFuture get(String clientId, String credentialId) { - return this.rawClient.get(clientId, credentialId).thenApply(response -> response.body()); - } - - /** - * Get the details of a client credential. - *

<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.

- */ - public CompletableFuture get( - String clientId, String credentialId, RequestOptions requestOptions) { - return this.rawClient.get(clientId, credentialId, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public CompletableFuture delete(String clientId, String credentialId) { - return this.rawClient.delete(clientId, credentialId).thenApply(response -> response.body()); - } - - /** - * Delete a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public CompletableFuture delete(String clientId, String credentialId, RequestOptions requestOptions) { - return this.rawClient.delete(clientId, credentialId, requestOptions).thenApply(response -> response.body()); - } - - /** - * Change a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public CompletableFuture update(String clientId, String credentialId) { - return this.rawClient.update(clientId, credentialId).thenApply(response -> response.body()); - } - - /** - * Change a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public CompletableFuture update( - String clientId, String credentialId, PatchClientCredentialRequestContent request) { - return this.rawClient.update(clientId, credentialId, request).thenApply(response -> response.body()); - } - - /** - * Change a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public CompletableFuture update( - String clientId, - String credentialId, - PatchClientCredentialRequestContent request, - RequestOptions requestOptions) { - return this.rawClient - .update(clientId, credentialId, request, requestOptions) - .thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/clients/AsyncRawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/clients/AsyncRawConnectionsClient.java deleted file mode 100644 index 6c1227144..000000000 --- a/src/main/java/com/auth0/client/mgmt/clients/AsyncRawConnectionsClient.java +++ /dev/null @@ -1,198 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.clients; - -import com.auth0.client.mgmt.clients.types.ConnectionsGetRequest; -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.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.types.ConnectionForList; -import com.auth0.client.mgmt.types.ListClientConnectionsResponseContent; -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 AsyncRawConnectionsClient { - protected final ClientOptions clientOptions; - - public AsyncRawConnectionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve all connections that are enabled for the specified <a href="https://www.auth0.com/docs/get-started/applications"> Application</a>, using checkpoint pagination. A list of fields to include or exclude for each connection may also be specified. - *

<ul> - * <li> - * This endpoint requires the <code>read:connections</code> scope and any one of <code>read:clients</code> or <code>read:client_summary</code>. - * </li> - * <li> - * <b>Note</b>: The first time you call this endpoint, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no further results are remaining. - * </li> - * </ul>

- */ - public CompletableFuture>> get(String id) { - return get(id, ConnectionsGetRequest.builder().build()); - } - - /** - * Retrieve all connections that are enabled for the specified <a href="https://www.auth0.com/docs/get-started/applications"> Application</a>, using checkpoint pagination. A list of fields to include or exclude for each connection may also be specified. - *

<ul> - * <li> - * This endpoint requires the <code>read:connections</code> scope and any one of <code>read:clients</code> or <code>read:client_summary</code>. - * </li> - * <li> - * <b>Note</b>: The first time you call this endpoint, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no further results are remaining. - * </li> - * </ul>

- */ - public CompletableFuture>> get( - String id, ConnectionsGetRequest request) { - return get(id, request, null); - } - - /** - * Retrieve all connections that are enabled for the specified <a href="https://www.auth0.com/docs/get-started/applications"> Application</a>, using checkpoint pagination. A list of fields to include or exclude for each connection may also be specified. - *

<ul> - * <li> - * This endpoint requires the <code>read:connections</code> scope and any one of <code>read:clients</code> or <code>read:client_summary</code>. - * </li> - * <li> - * <b>Note</b>: The first time you call this endpoint, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no further results are remaining. - * </li> - * </ul>

- */ - public CompletableFuture>> get( - String id, ConnectionsGetRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(id) - .addPathSegments("connections"); - 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); - } - if (!request.getIncludeFields().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); - } - if (request.getStrategy().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "strategy", request.getStrategy().get(), true); - } - 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); - } - 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()) { - ListClientConnectionsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListClientConnectionsResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ConnectionsGetRequest nextRequest = ConnectionsGetRequest.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getConnections(); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> { - try { - return get(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 (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/clients/AsyncRawCredentialsClient.java b/src/main/java/com/auth0/client/mgmt/clients/AsyncRawCredentialsClient.java deleted file mode 100644 index 796e86051..000000000 --- a/src/main/java/com/auth0/client/mgmt/clients/AsyncRawCredentialsClient.java +++ /dev/null @@ -1,572 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.clients; - -import com.auth0.client.mgmt.clients.types.PatchClientCredentialRequestContent; -import com.auth0.client.mgmt.clients.types.PostClientCredentialRequestContent; -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.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.ClientCredential; -import com.auth0.client.mgmt.types.GetClientCredentialResponseContent; -import com.auth0.client.mgmt.types.PatchClientCredentialResponseContent; -import com.auth0.client.mgmt.types.PostClientCredentialResponseContent; -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; -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 AsyncRawCredentialsClient { - protected final ClientOptions clientOptions; - - public AsyncRawCredentialsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Get the details of a client credential. - *

<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.

- */ - public CompletableFuture>> list(String clientId) { - return list(clientId, null); - } - - /** - * Get the details of a client credential. - *

<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.

- */ - public CompletableFuture>> list( - String clientId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(clientId) - .addPathSegments("credentials") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture>> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, new TypeReference>() {}), - 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 (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 credential associated to your application. Credentials can be used to configure Private Key JWT and mTLS authentication methods, as well as for JWT-secured Authorization requests. - *

<h5>Public Key</h5>Public Key credentials can be used to set up Private Key JWT client authentication and JWT-secured Authorization requests.

- *

Sample: <pre><code>{ - * "credential_type": "public_key", - * "name": "string", - * "pem": "string", - * "alg": "RS256", - * "parse_expiry_from_cert": false, - * "expires_at": "2022-12-31T23:59:59Z" - * }</code></pre>

- *

<h5>Certificate (CA-signed & self-signed)</h5>Certificate credentials can be used to set up mTLS client authentication. CA-signed certificates can be configured either with a signed certificate or with just the certificate Subject DN.

- *

CA-signed Certificate Sample (pem): <pre><code>{ - * "credential_type": "x509_cert", - * "name": "string", - * "pem": "string" - * }</code></pre>CA-signed Certificate Sample (subject_dn): <pre><code>{ - * "credential_type": "cert_subject_dn", - * "name": "string", - * "subject_dn": "string" - * }</code></pre>Self-signed Certificate Sample: <pre><code>{ - * "credential_type": "cert_subject_dn", - * "name": "string", - * "pem": "string" - * }</code></pre>

- *

The credential will be created but not yet enabled for use until you set the corresponding properties in the client:

- *

<ul> - * <li>To enable the credential for Private Key JWT or mTLS authentication methods, set the <code>client_authentication_methods</code> property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-private-key-jwt">Configure Private Key JWT Authentication</a> and <a href="https://auth0.com/docs/get-started/applications/configure-mtls">Configure mTLS Authentication</a></li> - * <li>To enable the credential for JWT-secured Authorization requests, set the <code>signed_request_object</code>property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-jar">Configure JWT-secured Authorization Requests (JAR)</a></li> - * </ul>

- */ - public CompletableFuture> create( - String clientId, PostClientCredentialRequestContent request) { - return create(clientId, request, null); - } - - /** - * Create a client credential associated to your application. Credentials can be used to configure Private Key JWT and mTLS authentication methods, as well as for JWT-secured Authorization requests. - *

<h5>Public Key</h5>Public Key credentials can be used to set up Private Key JWT client authentication and JWT-secured Authorization requests.

- *

Sample: <pre><code>{ - * "credential_type": "public_key", - * "name": "string", - * "pem": "string", - * "alg": "RS256", - * "parse_expiry_from_cert": false, - * "expires_at": "2022-12-31T23:59:59Z" - * }</code></pre>

- *

<h5>Certificate (CA-signed & self-signed)</h5>Certificate credentials can be used to set up mTLS client authentication. CA-signed certificates can be configured either with a signed certificate or with just the certificate Subject DN.

- *

CA-signed Certificate Sample (pem): <pre><code>{ - * "credential_type": "x509_cert", - * "name": "string", - * "pem": "string" - * }</code></pre>CA-signed Certificate Sample (subject_dn): <pre><code>{ - * "credential_type": "cert_subject_dn", - * "name": "string", - * "subject_dn": "string" - * }</code></pre>Self-signed Certificate Sample: <pre><code>{ - * "credential_type": "cert_subject_dn", - * "name": "string", - * "pem": "string" - * }</code></pre>

- *

The credential will be created but not yet enabled for use until you set the corresponding properties in the client:

- *

<ul> - * <li>To enable the credential for Private Key JWT or mTLS authentication methods, set the <code>client_authentication_methods</code> property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-private-key-jwt">Configure Private Key JWT Authentication</a> and <a href="https://auth0.com/docs/get-started/applications/configure-mtls">Configure mTLS Authentication</a></li> - * <li>To enable the credential for JWT-secured Authorization requests, set the <code>signed_request_object</code>property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-jar">Configure JWT-secured Authorization Requests (JAR)</a></li> - * </ul>

- */ - public CompletableFuture> create( - String clientId, PostClientCredentialRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(clientId) - .addPathSegments("credentials") - .build(); - 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) - .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); - } - 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, PostClientCredentialResponseContent.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 (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 the details of a client credential. - *

<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.

- */ - public CompletableFuture> get( - String clientId, String credentialId) { - return get(clientId, credentialId, null); - } - - /** - * Get the details of a client credential. - *

<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.

- */ - public CompletableFuture> get( - String clientId, String credentialId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(clientId) - .addPathSegments("credentials") - .addPathSegment(credentialId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetClientCredentialResponseContent.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 (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 credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public CompletableFuture> delete(String clientId, String credentialId) { - return delete(clientId, credentialId, null); - } - - /** - * Delete a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public CompletableFuture> delete( - String clientId, String credentialId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(clientId) - .addPathSegments("credentials") - .addPathSegment(credentialId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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; - } - - /** - * Change a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public CompletableFuture> update( - String clientId, String credentialId) { - return update( - clientId, - credentialId, - PatchClientCredentialRequestContent.builder().build()); - } - - /** - * Change a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public CompletableFuture> update( - String clientId, String credentialId, PatchClientCredentialRequestContent request) { - return update(clientId, credentialId, request, null); - } - - /** - * Change a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public CompletableFuture> update( - String clientId, - String credentialId, - PatchClientCredentialRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(clientId) - .addPathSegments("credentials") - .addPathSegment(credentialId) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, PatchClientCredentialResponseContent.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 (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/clients/ConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/clients/ConnectionsClient.java deleted file mode 100644 index 3182774c9..000000000 --- a/src/main/java/com/auth0/client/mgmt/clients/ConnectionsClient.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.clients; - -import com.auth0.client.mgmt.clients.types.ConnectionsGetRequest; -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.ConnectionForList; - -public class ConnectionsClient { - protected final ClientOptions clientOptions; - - private final RawConnectionsClient rawClient; - - public ConnectionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawConnectionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawConnectionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve all connections that are enabled for the specified <a href="https://www.auth0.com/docs/get-started/applications"> Application</a>, using checkpoint pagination. A list of fields to include or exclude for each connection may also be specified. - *

<ul> - * <li> - * This endpoint requires the <code>read:connections</code> scope and any one of <code>read:clients</code> or <code>read:client_summary</code>. - * </li> - * <li> - * <b>Note</b>: The first time you call this endpoint, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no further results are remaining. - * </li> - * </ul>

- */ - public SyncPagingIterable get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve all connections that are enabled for the specified <a href="https://www.auth0.com/docs/get-started/applications"> Application</a>, using checkpoint pagination. A list of fields to include or exclude for each connection may also be specified. - *

<ul> - * <li> - * This endpoint requires the <code>read:connections</code> scope and any one of <code>read:clients</code> or <code>read:client_summary</code>. - * </li> - * <li> - * <b>Note</b>: The first time you call this endpoint, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no further results are remaining. - * </li> - * </ul>

- */ - public SyncPagingIterable get(String id, ConnectionsGetRequest request) { - return this.rawClient.get(id, request).body(); - } - - /** - * Retrieve all connections that are enabled for the specified <a href="https://www.auth0.com/docs/get-started/applications"> Application</a>, using checkpoint pagination. A list of fields to include or exclude for each connection may also be specified. - *

<ul> - * <li> - * This endpoint requires the <code>read:connections</code> scope and any one of <code>read:clients</code> or <code>read:client_summary</code>. - * </li> - * <li> - * <b>Note</b>: The first time you call this endpoint, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no further results are remaining. - * </li> - * </ul>

- */ - public SyncPagingIterable get( - String id, ConnectionsGetRequest request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/clients/CredentialsClient.java b/src/main/java/com/auth0/client/mgmt/clients/CredentialsClient.java deleted file mode 100644 index 577201989..000000000 --- a/src/main/java/com/auth0/client/mgmt/clients/CredentialsClient.java +++ /dev/null @@ -1,177 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.clients; - -import com.auth0.client.mgmt.clients.types.PatchClientCredentialRequestContent; -import com.auth0.client.mgmt.clients.types.PostClientCredentialRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.ClientCredential; -import com.auth0.client.mgmt.types.GetClientCredentialResponseContent; -import com.auth0.client.mgmt.types.PatchClientCredentialResponseContent; -import com.auth0.client.mgmt.types.PostClientCredentialResponseContent; -import java.util.List; - -public class CredentialsClient { - protected final ClientOptions clientOptions; - - private final RawCredentialsClient rawClient; - - public CredentialsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawCredentialsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawCredentialsClient withRawResponse() { - return this.rawClient; - } - - /** - * Get the details of a client credential. - *

<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.

- */ - public List list(String clientId) { - return this.rawClient.list(clientId).body(); - } - - /** - * Get the details of a client credential. - *

<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.

- */ - public List list(String clientId, RequestOptions requestOptions) { - return this.rawClient.list(clientId, requestOptions).body(); - } - - /** - * Create a client credential associated to your application. Credentials can be used to configure Private Key JWT and mTLS authentication methods, as well as for JWT-secured Authorization requests. - *

<h5>Public Key</h5>Public Key credentials can be used to set up Private Key JWT client authentication and JWT-secured Authorization requests.

- *

Sample: <pre><code>{ - * "credential_type": "public_key", - * "name": "string", - * "pem": "string", - * "alg": "RS256", - * "parse_expiry_from_cert": false, - * "expires_at": "2022-12-31T23:59:59Z" - * }</code></pre>

- *

<h5>Certificate (CA-signed & self-signed)</h5>Certificate credentials can be used to set up mTLS client authentication. CA-signed certificates can be configured either with a signed certificate or with just the certificate Subject DN.

- *

CA-signed Certificate Sample (pem): <pre><code>{ - * "credential_type": "x509_cert", - * "name": "string", - * "pem": "string" - * }</code></pre>CA-signed Certificate Sample (subject_dn): <pre><code>{ - * "credential_type": "cert_subject_dn", - * "name": "string", - * "subject_dn": "string" - * }</code></pre>Self-signed Certificate Sample: <pre><code>{ - * "credential_type": "cert_subject_dn", - * "name": "string", - * "pem": "string" - * }</code></pre>

- *

The credential will be created but not yet enabled for use until you set the corresponding properties in the client:

- *

<ul> - * <li>To enable the credential for Private Key JWT or mTLS authentication methods, set the <code>client_authentication_methods</code> property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-private-key-jwt">Configure Private Key JWT Authentication</a> and <a href="https://auth0.com/docs/get-started/applications/configure-mtls">Configure mTLS Authentication</a></li> - * <li>To enable the credential for JWT-secured Authorization requests, set the <code>signed_request_object</code>property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-jar">Configure JWT-secured Authorization Requests (JAR)</a></li> - * </ul>

- */ - public PostClientCredentialResponseContent create(String clientId, PostClientCredentialRequestContent request) { - return this.rawClient.create(clientId, request).body(); - } - - /** - * Create a client credential associated to your application. Credentials can be used to configure Private Key JWT and mTLS authentication methods, as well as for JWT-secured Authorization requests. - *

<h5>Public Key</h5>Public Key credentials can be used to set up Private Key JWT client authentication and JWT-secured Authorization requests.

- *

Sample: <pre><code>{ - * "credential_type": "public_key", - * "name": "string", - * "pem": "string", - * "alg": "RS256", - * "parse_expiry_from_cert": false, - * "expires_at": "2022-12-31T23:59:59Z" - * }</code></pre>

- *

<h5>Certificate (CA-signed & self-signed)</h5>Certificate credentials can be used to set up mTLS client authentication. CA-signed certificates can be configured either with a signed certificate or with just the certificate Subject DN.

- *

CA-signed Certificate Sample (pem): <pre><code>{ - * "credential_type": "x509_cert", - * "name": "string", - * "pem": "string" - * }</code></pre>CA-signed Certificate Sample (subject_dn): <pre><code>{ - * "credential_type": "cert_subject_dn", - * "name": "string", - * "subject_dn": "string" - * }</code></pre>Self-signed Certificate Sample: <pre><code>{ - * "credential_type": "cert_subject_dn", - * "name": "string", - * "pem": "string" - * }</code></pre>

- *

The credential will be created but not yet enabled for use until you set the corresponding properties in the client:

- *

<ul> - * <li>To enable the credential for Private Key JWT or mTLS authentication methods, set the <code>client_authentication_methods</code> property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-private-key-jwt">Configure Private Key JWT Authentication</a> and <a href="https://auth0.com/docs/get-started/applications/configure-mtls">Configure mTLS Authentication</a></li> - * <li>To enable the credential for JWT-secured Authorization requests, set the <code>signed_request_object</code>property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-jar">Configure JWT-secured Authorization Requests (JAR)</a></li> - * </ul>

- */ - public PostClientCredentialResponseContent create( - String clientId, PostClientCredentialRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(clientId, request, requestOptions).body(); - } - - /** - * Get the details of a client credential. - *

<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.

- */ - public GetClientCredentialResponseContent get(String clientId, String credentialId) { - return this.rawClient.get(clientId, credentialId).body(); - } - - /** - * Get the details of a client credential. - *

<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.

- */ - public GetClientCredentialResponseContent get(String clientId, String credentialId, RequestOptions requestOptions) { - return this.rawClient.get(clientId, credentialId, requestOptions).body(); - } - - /** - * Delete a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public void delete(String clientId, String credentialId) { - this.rawClient.delete(clientId, credentialId).body(); - } - - /** - * Delete a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public void delete(String clientId, String credentialId, RequestOptions requestOptions) { - this.rawClient.delete(clientId, credentialId, requestOptions).body(); - } - - /** - * Change a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public PatchClientCredentialResponseContent update(String clientId, String credentialId) { - return this.rawClient.update(clientId, credentialId).body(); - } - - /** - * Change a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public PatchClientCredentialResponseContent update( - String clientId, String credentialId, PatchClientCredentialRequestContent request) { - return this.rawClient.update(clientId, credentialId, request).body(); - } - - /** - * Change a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public PatchClientCredentialResponseContent update( - String clientId, - String credentialId, - PatchClientCredentialRequestContent request, - RequestOptions requestOptions) { - return this.rawClient - .update(clientId, credentialId, request, requestOptions) - .body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/clients/RawConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/clients/RawConnectionsClient.java deleted file mode 100644 index c1ea7ded6..000000000 --- a/src/main/java/com/auth0/client/mgmt/clients/RawConnectionsClient.java +++ /dev/null @@ -1,163 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.clients; - -import com.auth0.client.mgmt.clients.types.ConnectionsGetRequest; -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.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.types.ConnectionForList; -import com.auth0.client.mgmt.types.ListClientConnectionsResponseContent; -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 RawConnectionsClient { - protected final ClientOptions clientOptions; - - public RawConnectionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve all connections that are enabled for the specified <a href="https://www.auth0.com/docs/get-started/applications"> Application</a>, using checkpoint pagination. A list of fields to include or exclude for each connection may also be specified. - *

<ul> - * <li> - * This endpoint requires the <code>read:connections</code> scope and any one of <code>read:clients</code> or <code>read:client_summary</code>. - * </li> - * <li> - * <b>Note</b>: The first time you call this endpoint, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no further results are remaining. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse> get(String id) { - return get(id, ConnectionsGetRequest.builder().build()); - } - - /** - * Retrieve all connections that are enabled for the specified <a href="https://www.auth0.com/docs/get-started/applications"> Application</a>, using checkpoint pagination. A list of fields to include or exclude for each connection may also be specified. - *

<ul> - * <li> - * This endpoint requires the <code>read:connections</code> scope and any one of <code>read:clients</code> or <code>read:client_summary</code>. - * </li> - * <li> - * <b>Note</b>: The first time you call this endpoint, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no further results are remaining. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse> get( - String id, ConnectionsGetRequest request) { - return get(id, request, null); - } - - /** - * Retrieve all connections that are enabled for the specified <a href="https://www.auth0.com/docs/get-started/applications"> Application</a>, using checkpoint pagination. A list of fields to include or exclude for each connection may also be specified. - *

<ul> - * <li> - * This endpoint requires the <code>read:connections</code> scope and any one of <code>read:clients</code> or <code>read:client_summary</code>. - * </li> - * <li> - * <b>Note</b>: The first time you call this endpoint, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no further results are remaining. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse> get( - String id, ConnectionsGetRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(id) - .addPathSegments("connections"); - 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); - } - if (!request.getIncludeFields().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); - } - if (request.getStrategy().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "strategy", request.getStrategy().get(), true); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListClientConnectionsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListClientConnectionsResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ConnectionsGetRequest nextRequest = ConnectionsGetRequest.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getConnections(); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> get( - 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 (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 deleted file mode 100644 index fdeb4b0ed..000000000 --- a/src/main/java/com/auth0/client/mgmt/clients/RawCredentialsClient.java +++ /dev/null @@ -1,453 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.clients; - -import com.auth0.client.mgmt.clients.types.PatchClientCredentialRequestContent; -import com.auth0.client.mgmt.clients.types.PostClientCredentialRequestContent; -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.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.ClientCredential; -import com.auth0.client.mgmt.types.GetClientCredentialResponseContent; -import com.auth0.client.mgmt.types.PatchClientCredentialResponseContent; -import com.auth0.client.mgmt.types.PostClientCredentialResponseContent; -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 RawCredentialsClient { - protected final ClientOptions clientOptions; - - public RawCredentialsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Get the details of a client credential. - *

<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.

- */ - public ManagementApiHttpResponse> list(String clientId) { - return list(clientId, null); - } - - /** - * Get the details of a client credential. - *

<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.

- */ - public ManagementApiHttpResponse> list(String clientId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(clientId) - .addPathSegments("credentials") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, new TypeReference>() {}), - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a client credential associated to your application. Credentials can be used to configure Private Key JWT and mTLS authentication methods, as well as for JWT-secured Authorization requests. - *

<h5>Public Key</h5>Public Key credentials can be used to set up Private Key JWT client authentication and JWT-secured Authorization requests.

- *

Sample: <pre><code>{ - * "credential_type": "public_key", - * "name": "string", - * "pem": "string", - * "alg": "RS256", - * "parse_expiry_from_cert": false, - * "expires_at": "2022-12-31T23:59:59Z" - * }</code></pre>

- *

<h5>Certificate (CA-signed & self-signed)</h5>Certificate credentials can be used to set up mTLS client authentication. CA-signed certificates can be configured either with a signed certificate or with just the certificate Subject DN.

- *

CA-signed Certificate Sample (pem): <pre><code>{ - * "credential_type": "x509_cert", - * "name": "string", - * "pem": "string" - * }</code></pre>CA-signed Certificate Sample (subject_dn): <pre><code>{ - * "credential_type": "cert_subject_dn", - * "name": "string", - * "subject_dn": "string" - * }</code></pre>Self-signed Certificate Sample: <pre><code>{ - * "credential_type": "cert_subject_dn", - * "name": "string", - * "pem": "string" - * }</code></pre>

- *

The credential will be created but not yet enabled for use until you set the corresponding properties in the client:

- *

<ul> - * <li>To enable the credential for Private Key JWT or mTLS authentication methods, set the <code>client_authentication_methods</code> property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-private-key-jwt">Configure Private Key JWT Authentication</a> and <a href="https://auth0.com/docs/get-started/applications/configure-mtls">Configure mTLS Authentication</a></li> - * <li>To enable the credential for JWT-secured Authorization requests, set the <code>signed_request_object</code>property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-jar">Configure JWT-secured Authorization Requests (JAR)</a></li> - * </ul>

- */ - public ManagementApiHttpResponse create( - String clientId, PostClientCredentialRequestContent request) { - return create(clientId, request, null); - } - - /** - * Create a client credential associated to your application. Credentials can be used to configure Private Key JWT and mTLS authentication methods, as well as for JWT-secured Authorization requests. - *

<h5>Public Key</h5>Public Key credentials can be used to set up Private Key JWT client authentication and JWT-secured Authorization requests.

- *

Sample: <pre><code>{ - * "credential_type": "public_key", - * "name": "string", - * "pem": "string", - * "alg": "RS256", - * "parse_expiry_from_cert": false, - * "expires_at": "2022-12-31T23:59:59Z" - * }</code></pre>

- *

<h5>Certificate (CA-signed & self-signed)</h5>Certificate credentials can be used to set up mTLS client authentication. CA-signed certificates can be configured either with a signed certificate or with just the certificate Subject DN.

- *

CA-signed Certificate Sample (pem): <pre><code>{ - * "credential_type": "x509_cert", - * "name": "string", - * "pem": "string" - * }</code></pre>CA-signed Certificate Sample (subject_dn): <pre><code>{ - * "credential_type": "cert_subject_dn", - * "name": "string", - * "subject_dn": "string" - * }</code></pre>Self-signed Certificate Sample: <pre><code>{ - * "credential_type": "cert_subject_dn", - * "name": "string", - * "pem": "string" - * }</code></pre>

- *

The credential will be created but not yet enabled for use until you set the corresponding properties in the client:

- *

<ul> - * <li>To enable the credential for Private Key JWT or mTLS authentication methods, set the <code>client_authentication_methods</code> property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-private-key-jwt">Configure Private Key JWT Authentication</a> and <a href="https://auth0.com/docs/get-started/applications/configure-mtls">Configure mTLS Authentication</a></li> - * <li>To enable the credential for JWT-secured Authorization requests, set the <code>signed_request_object</code>property on the client. For more information, read <a href="https://auth0.com/docs/get-started/applications/configure-jar">Configure JWT-secured Authorization Requests (JAR)</a></li> - * </ul>

- */ - public ManagementApiHttpResponse create( - String clientId, PostClientCredentialRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(clientId) - .addPathSegments("credentials") - .build(); - 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) - .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); - } - 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, PostClientCredentialResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Get the details of a client credential. - *

<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.

- */ - public ManagementApiHttpResponse get(String clientId, String credentialId) { - return get(clientId, credentialId, null); - } - - /** - * Get the details of a client credential. - *

<b>Important</b>: To enable credentials to be used for a client authentication method, set the <code>client_authentication_methods</code> property on the client. To enable credentials to be used for JWT-Secured Authorization requests set the <code>signed_request_object</code> property on the client.

- */ - public ManagementApiHttpResponse get( - String clientId, String credentialId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(clientId) - .addPathSegments("credentials") - .addPathSegment(credentialId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetClientCredentialResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public ManagementApiHttpResponse delete(String clientId, String credentialId) { - return delete(clientId, credentialId, null); - } - - /** - * Delete a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public ManagementApiHttpResponse delete(String clientId, String credentialId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(clientId) - .addPathSegments("credentials") - .addPathSegment(credentialId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Change a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public ManagementApiHttpResponse update( - String clientId, String credentialId) { - return update( - clientId, - credentialId, - PatchClientCredentialRequestContent.builder().build()); - } - - /** - * Change a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public ManagementApiHttpResponse update( - String clientId, String credentialId, PatchClientCredentialRequestContent request) { - return update(clientId, credentialId, request, null); - } - - /** - * Change a client credential you previously created. May be enabled or disabled. For more information, read <a href="https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow">Client Credential Flow</a>. - */ - public ManagementApiHttpResponse update( - String clientId, - String credentialId, - PatchClientCredentialRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("clients") - .addPathSegment(clientId) - .addPathSegments("credentials") - .addPathSegment(credentialId) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, PatchClientCredentialResponseContent.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 (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 deleted file mode 100644 index 59a09f896..000000000 --- a/src/main/java/com/auth0/client/mgmt/clients/types/ConnectionsGetRequest.java +++ /dev/null @@ -1,366 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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; -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; -import java.util.Collections; -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 = ConnectionsGetRequest.Builder.class) -public final class ConnectionsGetRequest { - private final Optional> strategy; - - private final OptionalNullable from; - - private final OptionalNullable take; - - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final Map additionalProperties; - - private ConnectionsGetRequest( - Optional> strategy, - OptionalNullable from, - OptionalNullable take, - OptionalNullable fields, - OptionalNullable includeFields, - Map additionalProperties) { - this.strategy = strategy; - this.from = from; - this.take = take; - this.fields = fields; - this.includeFields = includeFields; - this.additionalProperties = additionalProperties; - } - - /** - * @return Provide strategies to only retrieve connections with such strategies - */ - @JsonIgnore - public Optional> getStrategy() { - if (strategy == null) { - return Optional.empty(); - } - return strategy; - } - - /** - * @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() { - return take; - } - - /** - * @return A comma separated list of fields to include or exclude (depending on include_fields) from the result, 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 <code>true</code> if the fields specified are to be included in the result, <code>false</code> otherwise (defaults to <code>true</code>) - */ - @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("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("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 ConnectionsGetRequest && equalTo((ConnectionsGetRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionsGetRequest other) { - return strategy.equals(other.strategy) - && 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.strategy, 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 Optional> strategy = Optional.empty(); - - 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(ConnectionsGetRequest other) { - strategy(other.getStrategy()); - from(other.getFrom()); - take(other.getTake()); - fields(other.getFields()); - includeFields(other.getIncludeFields()); - return this; - } - - /** - *

Provide strategies to only retrieve connections with such strategies

- */ - @JsonSetter(value = "strategy", nulls = Nulls.SKIP) - public Builder strategy(@Nullable Optional> strategy) { - this.strategy = strategy; - return this; - } - - public Builder strategy(List strategy) { - this.strategy = Optional.ofNullable(strategy); - return this; - } - - public Builder strategy(com.auth0.client.mgmt.core.Nullable> strategy) { - if (strategy.isNull()) { - this.strategy = null; - } else if (strategy.isEmpty()) { - this.strategy = Optional.empty(); - } else { - this.strategy = Optional.of(strategy.get()); - } - return this; - } - - public Builder strategy(ConnectionStrategyEnum strategy) { - this.strategy = Optional.of(Collections.singletonList(strategy)); - 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(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; - } - - /** - *

A comma separated list of fields to include or exclude (depending on include_fields) from the result, 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; - } - - /** - *

<code>true</code> if the fields specified are to be included in the result, <code>false</code> otherwise (defaults to <code>true</code>)

- */ - @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 ConnectionsGetRequest build() { - return new ConnectionsGetRequest(strategy, from, take, fields, includeFields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/clients/types/PatchClientCredentialRequestContent.java b/src/main/java/com/auth0/client/mgmt/clients/types/PatchClientCredentialRequestContent.java deleted file mode 100644 index 170fe0ac7..000000000 --- a/src/main/java/com/auth0/client/mgmt/clients/types/PatchClientCredentialRequestContent.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = PatchClientCredentialRequestContent.Builder.class) -public final class PatchClientCredentialRequestContent { - private final OptionalNullable expiresAt; - - private final Map additionalProperties; - - private PatchClientCredentialRequestContent( - OptionalNullable expiresAt, Map additionalProperties) { - this.expiresAt = expiresAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The ISO 8601 formatted date representing the expiration of the credential. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("expires_at") - public OptionalNullable getExpiresAt() { - if (expiresAt == null) { - return OptionalNullable.absent(); - } - return expiresAt; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("expires_at") - private OptionalNullable _getExpiresAt() { - return expiresAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PatchClientCredentialRequestContent - && equalTo((PatchClientCredentialRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(PatchClientCredentialRequestContent other) { - return expiresAt.equals(other.expiresAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.expiresAt); - } - - @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 expiresAt = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(PatchClientCredentialRequestContent other) { - expiresAt(other.getExpiresAt()); - return this; - } - - /** - *

The ISO 8601 formatted date representing the expiration of the credential.

- */ - @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; - } - - public PatchClientCredentialRequestContent build() { - return new PatchClientCredentialRequestContent(expiresAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/clients/types/PostClientCredentialRequestContent.java b/src/main/java/com/auth0/client/mgmt/clients/types/PostClientCredentialRequestContent.java deleted file mode 100644 index 42aea8adf..000000000 --- a/src/main/java/com/auth0/client/mgmt/clients/types/PostClientCredentialRequestContent.java +++ /dev/null @@ -1,363 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.clients.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.ClientCredentialTypeEnum; -import com.auth0.client.mgmt.types.PublicKeyCredentialAlgorithmEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = PostClientCredentialRequestContent.Builder.class) -public final class PostClientCredentialRequestContent { - private final ClientCredentialTypeEnum credentialType; - - private final Optional name; - - private final Optional subjectDn; - - private final Optional pem; - - private final Optional alg; - - private final Optional parseExpiryFromCert; - - private final Optional expiresAt; - - private final Map additionalProperties; - - private PostClientCredentialRequestContent( - ClientCredentialTypeEnum credentialType, - Optional name, - Optional subjectDn, - Optional pem, - Optional alg, - Optional parseExpiryFromCert, - Optional expiresAt, - Map additionalProperties) { - this.credentialType = credentialType; - this.name = name; - this.subjectDn = subjectDn; - this.pem = pem; - this.alg = alg; - this.parseExpiryFromCert = parseExpiryFromCert; - this.expiresAt = expiresAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("credential_type") - public ClientCredentialTypeEnum getCredentialType() { - return credentialType; - } - - /** - * @return Friendly name for a credential. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Subject Distinguished Name. Mutually exclusive with pem property. Applies to cert_subject_dn credential type. - */ - @JsonProperty("subject_dn") - public Optional getSubjectDn() { - return subjectDn; - } - - /** - * @return PEM-formatted public key (SPKI and PKCS1) or X509 certificate. Must be JSON escaped. - */ - @JsonProperty("pem") - public Optional getPem() { - return pem; - } - - @JsonProperty("alg") - public Optional getAlg() { - return alg; - } - - /** - * @return Parse expiry from x509 certificate. If true, attempts to parse the expiry date from the provided PEM. Applies to public_key credential type. - */ - @JsonProperty("parse_expiry_from_cert") - public Optional getParseExpiryFromCert() { - return parseExpiryFromCert; - } - - /** - * @return The ISO 8601 formatted date representing the expiration of the credential. If not specified (not recommended), the credential never expires. Applies to public_key credential type. - */ - @JsonProperty("expires_at") - public Optional getExpiresAt() { - return expiresAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PostClientCredentialRequestContent - && equalTo((PostClientCredentialRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(PostClientCredentialRequestContent other) { - return credentialType.equals(other.credentialType) - && name.equals(other.name) - && subjectDn.equals(other.subjectDn) - && pem.equals(other.pem) - && alg.equals(other.alg) - && parseExpiryFromCert.equals(other.parseExpiryFromCert) - && expiresAt.equals(other.expiresAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.credentialType, - this.name, - this.subjectDn, - this.pem, - this.alg, - this.parseExpiryFromCert, - this.expiresAt); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static CredentialTypeStage builder() { - return new Builder(); - } - - public interface CredentialTypeStage { - _FinalStage credentialType(@NotNull ClientCredentialTypeEnum credentialType); - - Builder from(PostClientCredentialRequestContent other); - } - - public interface _FinalStage { - PostClientCredentialRequestContent build(); - - /** - *

Friendly name for a credential.

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

Subject Distinguished Name. Mutually exclusive with pem property. Applies to cert_subject_dn credential type.

- */ - _FinalStage subjectDn(Optional subjectDn); - - _FinalStage subjectDn(String subjectDn); - - /** - *

PEM-formatted public key (SPKI and PKCS1) or X509 certificate. Must be JSON escaped.

- */ - _FinalStage pem(Optional pem); - - _FinalStage pem(String pem); - - _FinalStage alg(Optional alg); - - _FinalStage alg(PublicKeyCredentialAlgorithmEnum alg); - - /** - *

Parse expiry from x509 certificate. If true, attempts to parse the expiry date from the provided PEM. Applies to public_key credential type.

- */ - _FinalStage parseExpiryFromCert(Optional parseExpiryFromCert); - - _FinalStage parseExpiryFromCert(Boolean parseExpiryFromCert); - - /** - *

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

- */ - _FinalStage expiresAt(Optional expiresAt); - - _FinalStage expiresAt(OffsetDateTime expiresAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements CredentialTypeStage, _FinalStage { - private ClientCredentialTypeEnum credentialType; - - private Optional expiresAt = Optional.empty(); - - private Optional parseExpiryFromCert = Optional.empty(); - - private Optional alg = Optional.empty(); - - private Optional pem = Optional.empty(); - - private Optional subjectDn = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(PostClientCredentialRequestContent other) { - credentialType(other.getCredentialType()); - name(other.getName()); - subjectDn(other.getSubjectDn()); - pem(other.getPem()); - alg(other.getAlg()); - parseExpiryFromCert(other.getParseExpiryFromCert()); - expiresAt(other.getExpiresAt()); - return this; - } - - @java.lang.Override - @JsonSetter("credential_type") - public _FinalStage credentialType(@NotNull ClientCredentialTypeEnum credentialType) { - this.credentialType = Objects.requireNonNull(credentialType, "credentialType must not be null"); - return this; - } - - /** - *

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

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

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

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

Parse expiry from x509 certificate. If true, attempts to parse the expiry date from the provided PEM. Applies to public_key credential type.

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

Parse expiry from x509 certificate. If true, attempts to parse the expiry date from the provided PEM. Applies to public_key credential type.

- */ - @java.lang.Override - @JsonSetter(value = "parse_expiry_from_cert", nulls = Nulls.SKIP) - public _FinalStage parseExpiryFromCert(Optional parseExpiryFromCert) { - this.parseExpiryFromCert = parseExpiryFromCert; - return this; - } - - @java.lang.Override - public _FinalStage alg(PublicKeyCredentialAlgorithmEnum alg) { - this.alg = Optional.ofNullable(alg); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alg", nulls = Nulls.SKIP) - public _FinalStage alg(Optional alg) { - this.alg = alg; - return this; - } - - /** - *

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. - */ - @java.lang.Override - public _FinalStage pem(String pem) { - this.pem = Optional.ofNullable(pem); - return this; - } - - /** - *

PEM-formatted public key (SPKI and PKCS1) or X509 certificate. Must be JSON escaped.

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

Subject Distinguished Name. Mutually exclusive with pem property. Applies to cert_subject_dn credential type.

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

Subject Distinguished Name. Mutually exclusive with pem property. Applies to cert_subject_dn credential type.

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

Friendly name for a credential.

- * @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; - } - - /** - *

Friendly name for a credential.

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public PostClientCredentialRequestContent build() { - return new PostClientCredentialRequestContent( - credentialType, name, subjectDn, pem, alg, parseExpiryFromCert, expiresAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/connections/AsyncClientsClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncClientsClient.java deleted file mode 100644 index acef15c08..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncClientsClient.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.connections.types.GetConnectionEnabledClientsRequestParameters; -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.ConnectionEnabledClient; -import com.auth0.client.mgmt.types.UpdateEnabledClientConnectionsRequestContentItem; -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; - } - - /** - * Retrieve all clients that have the specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> enabled. - *

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

- */ - public CompletableFuture> get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve all clients that have the specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> enabled. - *

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

- */ - public CompletableFuture> get( - String id, GetConnectionEnabledClientsRequestParameters request) { - return this.rawClient.get(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve all clients that have the specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> enabled. - *

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

- */ - public CompletableFuture> get( - String id, GetConnectionEnabledClientsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture update(String id, List request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture update( - String id, List request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/connections/AsyncDirectoryProvisioningClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncDirectoryProvisioningClient.java deleted file mode 100644 index 75de74fe3..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncDirectoryProvisioningClient.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.connections.directoryprovisioning.AsyncSynchronizationsClient; -import com.auth0.client.mgmt.connections.types.ListDirectoryProvisioningsRequestParameters; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.OptionalNullable; -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.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.UpdateDirectoryProvisioningRequestContent; -import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncDirectoryProvisioningClient { - protected final ClientOptions clientOptions; - - private final AsyncRawDirectoryProvisioningClient rawClient; - - protected final Supplier synchronizationsClient; - - public AsyncDirectoryProvisioningClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawDirectoryProvisioningClient(clientOptions); - this.synchronizationsClient = Suppliers.memoize(() -> new AsyncSynchronizationsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawDirectoryProvisioningClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a list of directory provisioning configurations of a tenant. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve a list of directory provisioning configurations of a tenant. - */ - public CompletableFuture> list( - ListDirectoryProvisioningsRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve a list of directory provisioning configurations of a tenant. - */ - public CompletableFuture> list( - ListDirectoryProvisioningsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve the directory provisioning configuration of a connection. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve the directory provisioning configuration of a connection. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a directory provisioning configuration for a connection. - */ - public CompletableFuture create(String id) { - return this.rawClient.create(id).thenApply(response -> response.body()); - } - - /** - * Create a directory provisioning configuration for a connection. - */ - public CompletableFuture create( - String id, OptionalNullable request) { - return this.rawClient.create(id, request).thenApply(response -> response.body()); - } - - /** - * Create a directory provisioning configuration for a connection. - */ - public CompletableFuture create( - String id, - OptionalNullable request, - RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete the directory provisioning configuration of a connection. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete the directory provisioning configuration of a connection. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update the directory provisioning configuration of a connection. - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update the directory provisioning configuration of a connection. - */ - public CompletableFuture update( - String id, OptionalNullable request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update the directory provisioning configuration of a connection. - */ - public CompletableFuture update( - String id, - OptionalNullable request, - RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve the directory provisioning default attribute mapping of a connection. - */ - public CompletableFuture getDefaultMapping(String id) { - return this.rawClient.getDefaultMapping(id).thenApply(response -> response.body()); - } - - /** - * Retrieve the directory provisioning default attribute mapping of a connection. - */ - public CompletableFuture getDefaultMapping( - String id, RequestOptions requestOptions) { - return this.rawClient.getDefaultMapping(id, 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 deleted file mode 100644 index 6bfc0677d..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncKeysClient.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.ConnectionKey; -import com.auth0.client.mgmt.types.RotateConnectionKeysRequestContent; -import com.auth0.client.mgmt.types.RotateConnectionsKeysResponseContent; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -public class AsyncKeysClient { - protected final ClientOptions clientOptions; - - private final AsyncRawKeysClient rawClient; - - public AsyncKeysClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawKeysClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawKeysClient withRawResponse() { - return this.rawClient; - } - - /** - * Gets the connection keys for the Okta or OIDC connection strategy. - */ - 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. - */ - public CompletableFuture> get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Rotates the connection keys for the Okta or OIDC connection strategies. - */ - 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. - */ - public CompletableFuture rotate( - String id, OptionalNullable request) { - return this.rawClient.rotate(id, request).thenApply(response -> response.body()); - } - - /** - * Rotates the connection keys for the Okta or OIDC connection strategies. - */ - public CompletableFuture rotate( - String id, OptionalNullable request, RequestOptions requestOptions) { - return this.rawClient.rotate(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawClientsClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawClientsClient.java deleted file mode 100644 index ff1ba7f53..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawClientsClient.java +++ /dev/null @@ -1,258 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.connections.types.GetConnectionEnabledClientsRequestParameters; -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.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.types.ConnectionEnabledClient; -import com.auth0.client.mgmt.types.GetConnectionEnabledClientsResponseContent; -import com.auth0.client.mgmt.types.UpdateEnabledClientConnectionsRequestContentItem; -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 AsyncRawClientsClient { - protected final ClientOptions clientOptions; - - public AsyncRawClientsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve all clients that have the specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> enabled. - *

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

- */ - public CompletableFuture>> get(String id) { - return get(id, GetConnectionEnabledClientsRequestParameters.builder().build()); - } - - /** - * Retrieve all clients that have the specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> enabled. - *

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

- */ - public CompletableFuture>> get( - String id, GetConnectionEnabledClientsRequestParameters request) { - return get(id, request, null); - } - - /** - * Retrieve all clients that have the specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> enabled. - *

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

- */ - public CompletableFuture>> get( - String id, GetConnectionEnabledClientsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("clients"); - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - 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); - } - 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()) { - GetConnectionEnabledClientsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetConnectionEnabledClientsResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - GetConnectionEnabledClientsRequestParameters nextRequest = - GetConnectionEnabledClientsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getClients(); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> { - try { - return get(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 (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, List request) { - return update(id, request, null); - } - - public CompletableFuture> update( - String id, List request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("clients") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - 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 (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/connections/AsyncRawDirectoryProvisioningClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawDirectoryProvisioningClient.java deleted file mode 100644 index c117f49b0..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawDirectoryProvisioningClient.java +++ /dev/null @@ -1,661 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.connections.types.ListDirectoryProvisioningsRequestParameters; -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.OptionalNullable; -import com.auth0.client.mgmt.core.QueryStringMapper; -import com.auth0.client.mgmt.core.RequestOptions; -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.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.ListDirectoryProvisioningsResponseContent; -import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningRequestContent; -import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningResponseContent; -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 AsyncRawDirectoryProvisioningClient { - protected final ClientOptions clientOptions; - - public AsyncRawDirectoryProvisioningClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a list of directory provisioning configurations of a tenant. - */ - public CompletableFuture>> list() { - return list(ListDirectoryProvisioningsRequestParameters.builder().build()); - } - - /** - * Retrieve a list of directory provisioning configurations of a tenant. - */ - public CompletableFuture>> list( - ListDirectoryProvisioningsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve a list of directory provisioning configurations of a tenant. - */ - public CompletableFuture>> list( - ListDirectoryProvisioningsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections-directory-provisionings"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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()) { - ListDirectoryProvisioningsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListDirectoryProvisioningsResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListDirectoryProvisioningsRequestParameters nextRequest = - ListDirectoryProvisioningsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getDirectoryProvisionings(); - 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 (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 the directory provisioning configuration of a connection. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve the directory provisioning configuration of a connection. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("directory-provisioning") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetDirectoryProvisioningResponseContent.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 (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 directory provisioning configuration for a connection. - */ - public CompletableFuture> create(String id) { - return create(id, OptionalNullable.absent()); - } - - /** - * Create a directory provisioning configuration for a connection. - */ - public CompletableFuture> create( - String id, OptionalNullable request) { - return create(id, request, null); - } - - /** - * Create a directory provisioning configuration for a connection. - */ - public CompletableFuture> create( - String id, - OptionalNullable request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("directory-provisioning") - .build(); - RequestBody body; - try { - body = RequestBody.create("", null); - if (request.isPresent()) { - 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) - .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); - } - 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, CreateDirectoryProvisioningResponseContent.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 (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 the directory provisioning configuration of a connection. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete the directory provisioning configuration of a connection. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("directory-provisioning") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update the directory provisioning configuration of a connection. - */ - public CompletableFuture> update(String id) { - return update(id, OptionalNullable.absent()); - } - - /** - * Update the directory provisioning configuration of a connection. - */ - public CompletableFuture> update( - String id, OptionalNullable request) { - return update(id, request, null); - } - - /** - * Update the directory provisioning configuration of a connection. - */ - public CompletableFuture> update( - String id, - OptionalNullable request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("directory-provisioning") - .build(); - RequestBody body; - try { - body = RequestBody.create("", null); - if (request.isPresent()) { - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateDirectoryProvisioningResponseContent.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 (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 the directory provisioning default attribute mapping of a connection. - */ - public CompletableFuture> - getDefaultMapping(String id) { - return getDefaultMapping(id, null); - } - - /** - * Retrieve the directory provisioning default attribute mapping of a connection. - */ - public CompletableFuture> - getDefaultMapping(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("directory-provisioning") - .addPathSegments("default-mapping") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, - GetDirectoryProvisioningDefaultMappingResponseContent.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 (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/connections/AsyncRawKeysClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawKeysClient.java deleted file mode 100644 index 6e6eab192..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawKeysClient.java +++ /dev/null @@ -1,243 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -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.OptionalNullable; -import com.auth0.client.mgmt.core.RequestOptions; -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.ConnectionKey; -import com.auth0.client.mgmt.types.RotateConnectionKeysRequestContent; -import com.auth0.client.mgmt.types.RotateConnectionsKeysResponseContent; -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; -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 AsyncRawKeysClient { - protected final ClientOptions clientOptions; - - public AsyncRawKeysClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Gets the connection keys for the Okta or OIDC connection strategy. - */ - public CompletableFuture>> get(String id) { - return get(id, null); - } - - /** - * Gets the connection keys for the Okta or OIDC connection strategy. - */ - public CompletableFuture>> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("keys") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture>> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Rotates the connection keys for the Okta or OIDC connection strategies. - */ - public CompletableFuture> rotate(String id) { - return rotate(id, OptionalNullable.absent()); - } - - /** - * Rotates the connection keys for the Okta or OIDC connection strategies. - */ - public CompletableFuture> rotate( - String id, OptionalNullable request) { - return rotate(id, request, null); - } - - /** - * Rotates the connection keys for the Okta or OIDC connection strategies. - */ - public CompletableFuture> rotate( - String id, OptionalNullable request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("keys") - .addPathSegments("rotate") - .build(); - RequestBody body; - try { - body = RequestBody.create("", null); - if (request.isPresent()) { - 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) - .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); - } - 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, RotateConnectionsKeysResponseContent.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 (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/connections/AsyncRawScimConfigurationClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawScimConfigurationClient.java deleted file mode 100644 index b87582b13..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawScimConfigurationClient.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.connections.types.UpdateScimConfigurationRequestContent; -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.OptionalNullable; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.errors.BadRequestError; -import com.auth0.client.mgmt.errors.NotFoundError; -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; -import com.auth0.client.mgmt.types.UpdateScimConfigurationResponseContent; -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 AsyncRawScimConfigurationClient { - protected final ClientOptions clientOptions; - - public AsyncRawScimConfigurationClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieves a scim configuration by its <code>connectionId</code>. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieves a scim configuration by its <code>connectionId</code>. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("scim-configuration") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetScimConfigurationResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Create a scim configuration for a connection. - */ - public CompletableFuture> create(String id) { - return create(id, OptionalNullable.absent()); - } - - /** - * Create a scim configuration for a connection. - */ - public CompletableFuture> create( - String id, OptionalNullable request) { - return create(id, request, null); - } - - /** - * Create a scim configuration for a connection. - */ - public CompletableFuture> create( - String id, OptionalNullable request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("scim-configuration") - .build(); - RequestBody body; - try { - body = RequestBody.create("", null); - if (request.isPresent()) { - 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) - .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); - } - 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, CreateScimConfigurationResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Deletes a scim configuration by its <code>connectionId</code>. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Deletes a scim configuration by its <code>connectionId</code>. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("scim-configuration") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update a scim configuration by its <code>connectionId</code>. - */ - public CompletableFuture> update( - String id, UpdateScimConfigurationRequestContent request) { - return update(id, request, null); - } - - /** - * Update a scim configuration by its <code>connectionId</code>. - */ - public CompletableFuture> update( - String id, UpdateScimConfigurationRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("scim-configuration") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateScimConfigurationResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieves a scim configuration's default mapping by its <code>connectionId</code>. - */ - public CompletableFuture> - getDefaultMapping(String id) { - return getDefaultMapping(id, null); - } - - /** - * Retrieves a scim configuration's default mapping by its <code>connectionId</code>. - */ - public CompletableFuture> - getDefaultMapping(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("scim-configuration") - .addPathSegments("default-mapping") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetScimConfigurationDefaultMappingResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawUsersClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncRawUsersClient.java deleted file mode 100644 index 8c1f46ff5..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncRawUsersClient.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.connections.types.DeleteConnectionUsersByEmailQueryParameters; -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.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.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.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawUsersClient { - protected final ClientOptions clientOptions; - - public AsyncRawUsersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Deletes a specified connection user by its email (you cannot delete all users from specific connection). Currently, only Database Connections are supported. - */ - public CompletableFuture> deleteByEmail( - String id, DeleteConnectionUsersByEmailQueryParameters request) { - return deleteByEmail(id, request, null); - } - - /** - * Deletes a specified connection user by its email (you cannot delete all users from specific connection). Currently, only Database Connections are supported. - */ - public CompletableFuture> deleteByEmail( - String id, DeleteConnectionUsersByEmailQueryParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("users"); - QueryStringMapper.addQueryParameter(httpUrl, "email", request.getEmail(), false); - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("DELETE", 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); - } - 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 (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/connections/AsyncScimConfigurationClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncScimConfigurationClient.java deleted file mode 100644 index 25033a5d1..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncScimConfigurationClient.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.connections.scimconfiguration.AsyncTokensClient; -import com.auth0.client.mgmt.connections.types.UpdateScimConfigurationRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.core.Suppliers; -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; -import com.auth0.client.mgmt.types.UpdateScimConfigurationResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncScimConfigurationClient { - protected final ClientOptions clientOptions; - - private final AsyncRawScimConfigurationClient rawClient; - - protected final Supplier tokensClient; - - public AsyncScimConfigurationClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawScimConfigurationClient(clientOptions); - this.tokensClient = Suppliers.memoize(() -> new AsyncTokensClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawScimConfigurationClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieves a scim configuration by its <code>connectionId</code>. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieves a scim configuration by its <code>connectionId</code>. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a scim configuration for a connection. - */ - public CompletableFuture create(String id) { - return this.rawClient.create(id).thenApply(response -> response.body()); - } - - /** - * Create a scim configuration for a connection. - */ - public CompletableFuture create( - String id, OptionalNullable request) { - return this.rawClient.create(id, request).thenApply(response -> response.body()); - } - - /** - * Create a scim configuration for a connection. - */ - public CompletableFuture create( - String id, OptionalNullable request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Deletes a scim configuration by its <code>connectionId</code>. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Deletes a scim configuration by its <code>connectionId</code>. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update a scim configuration by its <code>connectionId</code>. - */ - public CompletableFuture update( - String id, UpdateScimConfigurationRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update a scim configuration by its <code>connectionId</code>. - */ - public CompletableFuture update( - String id, UpdateScimConfigurationRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieves a scim configuration's default mapping by its <code>connectionId</code>. - */ - public CompletableFuture getDefaultMapping(String id) { - return this.rawClient.getDefaultMapping(id).thenApply(response -> response.body()); - } - - /** - * Retrieves a scim configuration's default mapping by its <code>connectionId</code>. - */ - public CompletableFuture getDefaultMapping( - String id, RequestOptions requestOptions) { - return this.rawClient.getDefaultMapping(id, requestOptions).thenApply(response -> response.body()); - } - - public AsyncTokensClient tokens() { - return this.tokensClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/connections/AsyncUsersClient.java b/src/main/java/com/auth0/client/mgmt/connections/AsyncUsersClient.java deleted file mode 100644 index 753552b4b..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/AsyncUsersClient.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.connections.types.DeleteConnectionUsersByEmailQueryParameters; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import java.util.concurrent.CompletableFuture; - -public class AsyncUsersClient { - protected final ClientOptions clientOptions; - - private final AsyncRawUsersClient rawClient; - - public AsyncUsersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawUsersClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawUsersClient withRawResponse() { - return this.rawClient; - } - - /** - * Deletes a specified connection user by its email (you cannot delete all users from specific connection). Currently, only Database Connections are supported. - */ - public CompletableFuture deleteByEmail(String id, DeleteConnectionUsersByEmailQueryParameters request) { - return this.rawClient.deleteByEmail(id, request).thenApply(response -> response.body()); - } - - /** - * Deletes a specified connection user by its email (you cannot delete all users from specific connection). Currently, only Database Connections are supported. - */ - public CompletableFuture deleteByEmail( - String id, DeleteConnectionUsersByEmailQueryParameters request, RequestOptions requestOptions) { - return this.rawClient.deleteByEmail(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/connections/ClientsClient.java b/src/main/java/com/auth0/client/mgmt/connections/ClientsClient.java deleted file mode 100644 index 3cde8a29f..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/ClientsClient.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.connections.types.GetConnectionEnabledClientsRequestParameters; -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.ConnectionEnabledClient; -import com.auth0.client.mgmt.types.UpdateEnabledClientConnectionsRequestContentItem; -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; - } - - /** - * Retrieve all clients that have the specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> enabled. - *

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

- */ - public SyncPagingIterable get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve all clients that have the specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> enabled. - *

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

- */ - public SyncPagingIterable get( - String id, GetConnectionEnabledClientsRequestParameters request) { - return this.rawClient.get(id, request).body(); - } - - /** - * Retrieve all clients that have the specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> enabled. - *

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

- */ - public SyncPagingIterable get( - String id, GetConnectionEnabledClientsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).body(); - } - - public void update(String id, List request) { - this.rawClient.update(id, request).body(); - } - - public void update( - String id, List request, RequestOptions requestOptions) { - this.rawClient.update(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/connections/DirectoryProvisioningClient.java b/src/main/java/com/auth0/client/mgmt/connections/DirectoryProvisioningClient.java deleted file mode 100644 index 8acf645d7..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/DirectoryProvisioningClient.java +++ /dev/null @@ -1,160 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.connections.directoryprovisioning.SynchronizationsClient; -import com.auth0.client.mgmt.connections.types.ListDirectoryProvisioningsRequestParameters; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.OptionalNullable; -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.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.UpdateDirectoryProvisioningRequestContent; -import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningResponseContent; -import java.util.function.Supplier; - -public class DirectoryProvisioningClient { - protected final ClientOptions clientOptions; - - private final RawDirectoryProvisioningClient rawClient; - - protected final Supplier synchronizationsClient; - - public DirectoryProvisioningClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawDirectoryProvisioningClient(clientOptions); - this.synchronizationsClient = Suppliers.memoize(() -> new SynchronizationsClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawDirectoryProvisioningClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a list of directory provisioning configurations of a tenant. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve a list of directory provisioning configurations of a tenant. - */ - public SyncPagingIterable list(ListDirectoryProvisioningsRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve a list of directory provisioning configurations of a tenant. - */ - public SyncPagingIterable list( - ListDirectoryProvisioningsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Retrieve the directory provisioning configuration of a connection. - */ - public GetDirectoryProvisioningResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve the directory provisioning configuration of a connection. - */ - public GetDirectoryProvisioningResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Create a directory provisioning configuration for a connection. - */ - public CreateDirectoryProvisioningResponseContent create(String id) { - return this.rawClient.create(id).body(); - } - - /** - * Create a directory provisioning configuration for a connection. - */ - public CreateDirectoryProvisioningResponseContent create( - String id, OptionalNullable request) { - return this.rawClient.create(id, request).body(); - } - - /** - * Create a directory provisioning configuration for a connection. - */ - public CreateDirectoryProvisioningResponseContent create( - String id, - OptionalNullable request, - RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).body(); - } - - /** - * Delete the directory provisioning configuration of a connection. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete the directory provisioning configuration of a connection. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update the directory provisioning configuration of a connection. - */ - public UpdateDirectoryProvisioningResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update the directory provisioning configuration of a connection. - */ - public UpdateDirectoryProvisioningResponseContent update( - String id, OptionalNullable request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update the directory provisioning configuration of a connection. - */ - public UpdateDirectoryProvisioningResponseContent update( - String id, - OptionalNullable request, - RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - /** - * Retrieve the directory provisioning default attribute mapping of a connection. - */ - public GetDirectoryProvisioningDefaultMappingResponseContent getDefaultMapping(String id) { - return this.rawClient.getDefaultMapping(id).body(); - } - - /** - * Retrieve the directory provisioning default attribute mapping of a connection. - */ - public GetDirectoryProvisioningDefaultMappingResponseContent getDefaultMapping( - String id, RequestOptions requestOptions) { - return this.rawClient.getDefaultMapping(id, 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 deleted file mode 100644 index 248b5a68c..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/KeysClient.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.ConnectionKey; -import com.auth0.client.mgmt.types.RotateConnectionKeysRequestContent; -import com.auth0.client.mgmt.types.RotateConnectionsKeysResponseContent; -import java.util.List; - -public class KeysClient { - protected final ClientOptions clientOptions; - - private final RawKeysClient rawClient; - - public KeysClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawKeysClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawKeysClient withRawResponse() { - return this.rawClient; - } - - /** - * Gets the connection keys for the Okta or OIDC connection strategy. - */ - public List get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Gets the connection keys for the Okta or OIDC connection strategy. - */ - public List get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Rotates the connection keys for the Okta or OIDC connection strategies. - */ - public RotateConnectionsKeysResponseContent rotate(String id) { - return this.rawClient.rotate(id).body(); - } - - /** - * Rotates the connection keys for the Okta or OIDC connection strategies. - */ - public RotateConnectionsKeysResponseContent rotate( - String id, OptionalNullable request) { - return this.rawClient.rotate(id, request).body(); - } - - /** - * Rotates the connection keys for the Okta or OIDC connection strategies. - */ - public RotateConnectionsKeysResponseContent rotate( - String id, OptionalNullable request, RequestOptions requestOptions) { - return this.rawClient.rotate(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/connections/RawClientsClient.java b/src/main/java/com/auth0/client/mgmt/connections/RawClientsClient.java deleted file mode 100644 index f9426f034..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/RawClientsClient.java +++ /dev/null @@ -1,200 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.connections.types.GetConnectionEnabledClientsRequestParameters; -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.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.types.ConnectionEnabledClient; -import com.auth0.client.mgmt.types.GetConnectionEnabledClientsResponseContent; -import com.auth0.client.mgmt.types.UpdateEnabledClientConnectionsRequestContentItem; -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 RawClientsClient { - protected final ClientOptions clientOptions; - - public RawClientsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve all clients that have the specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> enabled. - *

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

- */ - public ManagementApiHttpResponse> get(String id) { - return get(id, GetConnectionEnabledClientsRequestParameters.builder().build()); - } - - /** - * Retrieve all clients that have the specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> enabled. - *

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

- */ - public ManagementApiHttpResponse> get( - String id, GetConnectionEnabledClientsRequestParameters request) { - return get(id, request, null); - } - - /** - * Retrieve all clients that have the specified <a href="https://auth0.com/docs/authenticate/identity-providers">connection</a> enabled. - *

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

- */ - public ManagementApiHttpResponse> get( - String id, GetConnectionEnabledClientsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("clients"); - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - GetConnectionEnabledClientsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetConnectionEnabledClientsResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - GetConnectionEnabledClientsRequestParameters nextRequest = - GetConnectionEnabledClientsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getClients(); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> get( - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse update( - String id, List request) { - return update(id, request, null); - } - - public ManagementApiHttpResponse update( - String id, List request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("clients") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - 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 (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 deleted file mode 100644 index 794586fa2..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/RawDirectoryProvisioningClient.java +++ /dev/null @@ -1,506 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.connections.types.ListDirectoryProvisioningsRequestParameters; -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.OptionalNullable; -import com.auth0.client.mgmt.core.QueryStringMapper; -import com.auth0.client.mgmt.core.RequestOptions; -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.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.ListDirectoryProvisioningsResponseContent; -import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningRequestContent; -import com.auth0.client.mgmt.types.UpdateDirectoryProvisioningResponseContent; -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 RawDirectoryProvisioningClient { - protected final ClientOptions clientOptions; - - public RawDirectoryProvisioningClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a list of directory provisioning configurations of a tenant. - */ - public ManagementApiHttpResponse> list() { - return list(ListDirectoryProvisioningsRequestParameters.builder().build()); - } - - /** - * Retrieve a list of directory provisioning configurations of a tenant. - */ - public ManagementApiHttpResponse> list( - ListDirectoryProvisioningsRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve a list of directory provisioning configurations of a tenant. - */ - public ManagementApiHttpResponse> list( - ListDirectoryProvisioningsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections-directory-provisionings"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListDirectoryProvisioningsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListDirectoryProvisioningsResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListDirectoryProvisioningsRequestParameters nextRequest = - ListDirectoryProvisioningsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getDirectoryProvisionings(); - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve the directory provisioning configuration of a connection. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve the directory provisioning configuration of a connection. - */ - public ManagementApiHttpResponse get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("directory-provisioning") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetDirectoryProvisioningResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a directory provisioning configuration for a connection. - */ - public ManagementApiHttpResponse create(String id) { - return create(id, OptionalNullable.absent()); - } - - /** - * Create a directory provisioning configuration for a connection. - */ - public ManagementApiHttpResponse create( - String id, OptionalNullable request) { - return create(id, request, null); - } - - /** - * Create a directory provisioning configuration for a connection. - */ - public ManagementApiHttpResponse create( - String id, - OptionalNullable request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("directory-provisioning") - .build(); - RequestBody body; - try { - body = RequestBody.create("", null); - if (request.isPresent()) { - 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) - .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); - } - 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, CreateDirectoryProvisioningResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete the directory provisioning configuration of a connection. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete the directory provisioning configuration of a connection. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("directory-provisioning") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update the directory provisioning configuration of a connection. - */ - public ManagementApiHttpResponse update(String id) { - return update(id, OptionalNullable.absent()); - } - - /** - * Update the directory provisioning configuration of a connection. - */ - public ManagementApiHttpResponse update( - String id, OptionalNullable request) { - return update(id, request, null); - } - - /** - * Update the directory provisioning configuration of a connection. - */ - public ManagementApiHttpResponse update( - String id, - OptionalNullable request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("directory-provisioning") - .build(); - RequestBody body; - try { - body = RequestBody.create("", null); - if (request.isPresent()) { - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateDirectoryProvisioningResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve the directory provisioning default attribute mapping of a connection. - */ - public ManagementApiHttpResponse getDefaultMapping( - String id) { - return getDefaultMapping(id, null); - } - - /** - * Retrieve the directory provisioning default attribute mapping of a connection. - */ - public ManagementApiHttpResponse getDefaultMapping( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("directory-provisioning") - .addPathSegments("default-mapping") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetDirectoryProvisioningDefaultMappingResponseContent.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 (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 deleted file mode 100644 index 379455dad..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/RawKeysClient.java +++ /dev/null @@ -1,191 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -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.OptionalNullable; -import com.auth0.client.mgmt.core.RequestOptions; -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.ConnectionKey; -import com.auth0.client.mgmt.types.RotateConnectionKeysRequestContent; -import com.auth0.client.mgmt.types.RotateConnectionsKeysResponseContent; -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 RawKeysClient { - protected final ClientOptions clientOptions; - - public RawKeysClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Gets the connection keys for the Okta or OIDC connection strategy. - */ - public ManagementApiHttpResponse> get(String id) { - return get(id, null); - } - - /** - * Gets the connection keys for the Okta or OIDC connection strategy. - */ - public ManagementApiHttpResponse> get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("keys") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Rotates the connection keys for the Okta or OIDC connection strategies. - */ - public ManagementApiHttpResponse rotate(String id) { - return rotate(id, OptionalNullable.absent()); - } - - /** - * Rotates the connection keys for the Okta or OIDC connection strategies. - */ - public ManagementApiHttpResponse rotate( - String id, OptionalNullable request) { - return rotate(id, request, null); - } - - /** - * Rotates the connection keys for the Okta or OIDC connection strategies. - */ - public ManagementApiHttpResponse rotate( - String id, OptionalNullable request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("keys") - .addPathSegments("rotate") - .build(); - RequestBody body; - try { - body = RequestBody.create("", null); - if (request.isPresent()) { - 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) - .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); - } - 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, RotateConnectionsKeysResponseContent.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 (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 deleted file mode 100644 index bc2d8ecc6..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/RawScimConfigurationClient.java +++ /dev/null @@ -1,348 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.connections.types.UpdateScimConfigurationRequestContent; -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.OptionalNullable; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.errors.BadRequestError; -import com.auth0.client.mgmt.errors.NotFoundError; -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; -import com.auth0.client.mgmt.types.UpdateScimConfigurationResponseContent; -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 RawScimConfigurationClient { - protected final ClientOptions clientOptions; - - public RawScimConfigurationClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieves a scim configuration by its <code>connectionId</code>. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieves a scim configuration by its <code>connectionId</code>. - */ - public ManagementApiHttpResponse get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("scim-configuration") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetScimConfigurationResponseContent.class), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a scim configuration for a connection. - */ - public ManagementApiHttpResponse create(String id) { - return create(id, OptionalNullable.absent()); - } - - /** - * Create a scim configuration for a connection. - */ - public ManagementApiHttpResponse create( - String id, OptionalNullable request) { - return create(id, request, null); - } - - /** - * Create a scim configuration for a connection. - */ - public ManagementApiHttpResponse create( - String id, OptionalNullable request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("scim-configuration") - .build(); - RequestBody body; - try { - body = RequestBody.create("", null); - if (request.isPresent()) { - 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) - .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); - } - 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, CreateScimConfigurationResponseContent.class), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Deletes a scim configuration by its <code>connectionId</code>. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Deletes a scim configuration by its <code>connectionId</code>. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("scim-configuration") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update a scim configuration by its <code>connectionId</code>. - */ - public ManagementApiHttpResponse update( - String id, UpdateScimConfigurationRequestContent request) { - return update(id, request, null); - } - - /** - * Update a scim configuration by its <code>connectionId</code>. - */ - public ManagementApiHttpResponse update( - String id, UpdateScimConfigurationRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("scim-configuration") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateScimConfigurationResponseContent.class), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieves a scim configuration's default mapping by its <code>connectionId</code>. - */ - public ManagementApiHttpResponse getDefaultMapping(String id) { - return getDefaultMapping(id, null); - } - - /** - * Retrieves a scim configuration's default mapping by its <code>connectionId</code>. - */ - public ManagementApiHttpResponse getDefaultMapping( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("scim-configuration") - .addPathSegments("default-mapping") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetScimConfigurationDefaultMappingResponseContent.class), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/connections/RawUsersClient.java b/src/main/java/com/auth0/client/mgmt/connections/RawUsersClient.java deleted file mode 100644 index 40d1bba27..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/RawUsersClient.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.connections.types.DeleteConnectionUsersByEmailQueryParameters; -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.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.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawUsersClient { - protected final ClientOptions clientOptions; - - public RawUsersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Deletes a specified connection user by its email (you cannot delete all users from specific connection). Currently, only Database Connections are supported. - */ - public ManagementApiHttpResponse deleteByEmail( - String id, DeleteConnectionUsersByEmailQueryParameters request) { - return deleteByEmail(id, request, null); - } - - /** - * Deletes a specified connection user by its email (you cannot delete all users from specific connection). Currently, only Database Connections are supported. - */ - public ManagementApiHttpResponse deleteByEmail( - String id, DeleteConnectionUsersByEmailQueryParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("users"); - QueryStringMapper.addQueryParameter(httpUrl, "email", request.getEmail(), false); - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl.build()) - .method("DELETE", 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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/connections/ScimConfigurationClient.java b/src/main/java/com/auth0/client/mgmt/connections/ScimConfigurationClient.java deleted file mode 100644 index f4b9bd602..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/ScimConfigurationClient.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.connections.scimconfiguration.TokensClient; -import com.auth0.client.mgmt.connections.types.UpdateScimConfigurationRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.core.Suppliers; -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; -import com.auth0.client.mgmt.types.UpdateScimConfigurationResponseContent; -import java.util.function.Supplier; - -public class ScimConfigurationClient { - protected final ClientOptions clientOptions; - - private final RawScimConfigurationClient rawClient; - - protected final Supplier tokensClient; - - public ScimConfigurationClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawScimConfigurationClient(clientOptions); - this.tokensClient = Suppliers.memoize(() -> new TokensClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawScimConfigurationClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieves a scim configuration by its <code>connectionId</code>. - */ - public GetScimConfigurationResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieves a scim configuration by its <code>connectionId</code>. - */ - public GetScimConfigurationResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Create a scim configuration for a connection. - */ - public CreateScimConfigurationResponseContent create(String id) { - return this.rawClient.create(id).body(); - } - - /** - * Create a scim configuration for a connection. - */ - public CreateScimConfigurationResponseContent create( - String id, OptionalNullable request) { - return this.rawClient.create(id, request).body(); - } - - /** - * Create a scim configuration for a connection. - */ - public CreateScimConfigurationResponseContent create( - String id, OptionalNullable request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).body(); - } - - /** - * Deletes a scim configuration by its <code>connectionId</code>. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Deletes a scim configuration by its <code>connectionId</code>. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update a scim configuration by its <code>connectionId</code>. - */ - public UpdateScimConfigurationResponseContent update(String id, UpdateScimConfigurationRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update a scim configuration by its <code>connectionId</code>. - */ - public UpdateScimConfigurationResponseContent update( - String id, UpdateScimConfigurationRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } - - /** - * Retrieves a scim configuration's default mapping by its <code>connectionId</code>. - */ - public GetScimConfigurationDefaultMappingResponseContent getDefaultMapping(String id) { - return this.rawClient.getDefaultMapping(id).body(); - } - - /** - * Retrieves a scim configuration's default mapping by its <code>connectionId</code>. - */ - public GetScimConfigurationDefaultMappingResponseContent getDefaultMapping( - String id, RequestOptions requestOptions) { - return this.rawClient.getDefaultMapping(id, requestOptions).body(); - } - - public TokensClient tokens() { - return this.tokensClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/connections/UsersClient.java b/src/main/java/com/auth0/client/mgmt/connections/UsersClient.java deleted file mode 100644 index e644ca0dd..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/UsersClient.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections; - -import com.auth0.client.mgmt.connections.types.DeleteConnectionUsersByEmailQueryParameters; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; - -public class UsersClient { - protected final ClientOptions clientOptions; - - private final RawUsersClient rawClient; - - public UsersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawUsersClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawUsersClient withRawResponse() { - return this.rawClient; - } - - /** - * Deletes a specified connection user by its email (you cannot delete all users from specific connection). Currently, only Database Connections are supported. - */ - public void deleteByEmail(String id, DeleteConnectionUsersByEmailQueryParameters request) { - this.rawClient.deleteByEmail(id, request).body(); - } - - /** - * Deletes a specified connection user by its email (you cannot delete all users from specific connection). Currently, only Database Connections are supported. - */ - public void deleteByEmail( - String id, DeleteConnectionUsersByEmailQueryParameters request, RequestOptions requestOptions) { - this.rawClient.deleteByEmail(id, request, requestOptions).body(); - } -} 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 deleted file mode 100644 index 4e26fd082..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/directoryprovisioning/AsyncRawSynchronizationsClient.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections.directoryprovisioning; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.CreateDirectorySynchronizationResponseContent; -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 AsyncRawSynchronizationsClient { - protected final ClientOptions clientOptions; - - public AsyncRawSynchronizationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Request an on-demand synchronization of the directory. - */ - public CompletableFuture> create( - String id) { - return create(id, null); - } - - /** - * Request an on-demand synchronization of the directory. - */ - public CompletableFuture> create( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("directory-provisioning") - .addPathSegments("synchronizations") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, CreateDirectorySynchronizationResponseContent.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 (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/connections/directoryprovisioning/AsyncSynchronizationsClient.java b/src/main/java/com/auth0/client/mgmt/connections/directoryprovisioning/AsyncSynchronizationsClient.java deleted file mode 100644 index 19b5540e3..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/directoryprovisioning/AsyncSynchronizationsClient.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections.directoryprovisioning; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.CreateDirectorySynchronizationResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncSynchronizationsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawSynchronizationsClient rawClient; - - public AsyncSynchronizationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawSynchronizationsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawSynchronizationsClient withRawResponse() { - return this.rawClient; - } - - /** - * Request an on-demand synchronization of the directory. - */ - public CompletableFuture create(String id) { - return this.rawClient.create(id).thenApply(response -> response.body()); - } - - /** - * Request an on-demand synchronization of the directory. - */ - public CompletableFuture create( - String id, RequestOptions requestOptions) { - return this.rawClient.create(id, requestOptions).thenApply(response -> response.body()); - } -} 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 deleted file mode 100644 index 9348ab59d..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/directoryprovisioning/RawSynchronizationsClient.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections.directoryprovisioning; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.CreateDirectorySynchronizationResponseContent; -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 RawSynchronizationsClient { - protected final ClientOptions clientOptions; - - public RawSynchronizationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Request an on-demand synchronization of the directory. - */ - public ManagementApiHttpResponse create(String id) { - return create(id, null); - } - - /** - * Request an on-demand synchronization of the directory. - */ - public ManagementApiHttpResponse create( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("directory-provisioning") - .addPathSegments("synchronizations") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, CreateDirectorySynchronizationResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/connections/directoryprovisioning/SynchronizationsClient.java b/src/main/java/com/auth0/client/mgmt/connections/directoryprovisioning/SynchronizationsClient.java deleted file mode 100644 index 004640d01..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/directoryprovisioning/SynchronizationsClient.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections.directoryprovisioning; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.CreateDirectorySynchronizationResponseContent; - -public class SynchronizationsClient { - protected final ClientOptions clientOptions; - - private final RawSynchronizationsClient rawClient; - - public SynchronizationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawSynchronizationsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawSynchronizationsClient withRawResponse() { - return this.rawClient; - } - - /** - * Request an on-demand synchronization of the directory. - */ - public CreateDirectorySynchronizationResponseContent create(String id) { - return this.rawClient.create(id).body(); - } - - /** - * Request an on-demand synchronization of the directory. - */ - public CreateDirectorySynchronizationResponseContent create(String id, RequestOptions requestOptions) { - return this.rawClient.create(id, requestOptions).body(); - } -} 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 deleted file mode 100644 index 7a5153496..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/AsyncRawTokensClient.java +++ /dev/null @@ -1,284 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections.scimconfiguration; - -import com.auth0.client.mgmt.connections.scimconfiguration.types.CreateScimTokenRequestContent; -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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ConflictError; -import com.auth0.client.mgmt.errors.NotFoundError; -import com.auth0.client.mgmt.types.CreateScimTokenResponseContent; -import com.auth0.client.mgmt.types.ScimTokenItem; -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; -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 AsyncRawTokensClient { - protected final ClientOptions clientOptions; - - public AsyncRawTokensClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieves all scim tokens by its connection <code>id</code>. - */ - public CompletableFuture>> get(String id) { - return get(id, null); - } - - /** - * Retrieves all scim tokens by its connection <code>id</code>. - */ - public CompletableFuture>> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("scim-configuration") - .addPathSegments("tokens") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture>> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, new TypeReference>() {}), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Create a scim token for a scim client. - */ - public CompletableFuture> create(String id) { - return create(id, CreateScimTokenRequestContent.builder().build()); - } - - /** - * Create a scim token for a scim client. - */ - public CompletableFuture> create( - String id, CreateScimTokenRequestContent request) { - return create(id, request, null); - } - - /** - * Create a scim token for a scim client. - */ - public CompletableFuture> create( - String id, CreateScimTokenRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("scim-configuration") - .addPathSegments("tokens") - .build(); - 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) - .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); - } - 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, CreateScimTokenResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - 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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Deletes a scim token by its connection <code>id</code> and <code>tokenId</code>. - */ - public CompletableFuture> delete(String id, String tokenId) { - return delete(id, tokenId, null); - } - - /** - * Deletes a scim token by its connection <code>id</code> and <code>tokenId</code>. - */ - public CompletableFuture> delete( - String id, String tokenId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("scim-configuration/tokens") - .addPathSegment(tokenId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/AsyncTokensClient.java b/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/AsyncTokensClient.java deleted file mode 100644 index 5f3857162..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/AsyncTokensClient.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections.scimconfiguration; - -import com.auth0.client.mgmt.connections.scimconfiguration.types.CreateScimTokenRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.CreateScimTokenResponseContent; -import com.auth0.client.mgmt.types.ScimTokenItem; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -public class AsyncTokensClient { - protected final ClientOptions clientOptions; - - private final AsyncRawTokensClient rawClient; - - public AsyncTokensClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawTokensClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawTokensClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieves all scim tokens by its connection <code>id</code>. - */ - public CompletableFuture> get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieves all scim tokens by its connection <code>id</code>. - */ - public CompletableFuture> get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a scim token for a scim client. - */ - public CompletableFuture create(String id) { - return this.rawClient.create(id).thenApply(response -> response.body()); - } - - /** - * Create a scim token for a scim client. - */ - public CompletableFuture create(String id, CreateScimTokenRequestContent request) { - return this.rawClient.create(id, request).thenApply(response -> response.body()); - } - - /** - * Create a scim token for a scim client. - */ - public CompletableFuture create( - String id, CreateScimTokenRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Deletes a scim token by its connection <code>id</code> and <code>tokenId</code>. - */ - public CompletableFuture delete(String id, String tokenId) { - return this.rawClient.delete(id, tokenId).thenApply(response -> response.body()); - } - - /** - * Deletes a scim token by its connection <code>id</code> and <code>tokenId</code>. - */ - public CompletableFuture delete(String id, String tokenId, RequestOptions requestOptions) { - return this.rawClient.delete(id, tokenId, requestOptions).thenApply(response -> response.body()); - } -} 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 deleted file mode 100644 index 3d7541e32..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/RawTokensClient.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections.scimconfiguration; - -import com.auth0.client.mgmt.connections.scimconfiguration.types.CreateScimTokenRequestContent; -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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ConflictError; -import com.auth0.client.mgmt.errors.NotFoundError; -import com.auth0.client.mgmt.types.CreateScimTokenResponseContent; -import com.auth0.client.mgmt.types.ScimTokenItem; -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 RawTokensClient { - protected final ClientOptions clientOptions; - - public RawTokensClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieves all scim tokens by its connection <code>id</code>. - */ - public ManagementApiHttpResponse> get(String id) { - return get(id, null); - } - - /** - * Retrieves all scim tokens by its connection <code>id</code>. - */ - public ManagementApiHttpResponse> get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("scim-configuration") - .addPathSegments("tokens") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, new TypeReference>() {}), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a scim token for a scim client. - */ - public ManagementApiHttpResponse create(String id) { - return create(id, CreateScimTokenRequestContent.builder().build()); - } - - /** - * Create a scim token for a scim client. - */ - public ManagementApiHttpResponse create( - String id, CreateScimTokenRequestContent request) { - return create(id, request, null); - } - - /** - * Create a scim token for a scim client. - */ - public ManagementApiHttpResponse create( - String id, CreateScimTokenRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("scim-configuration") - .addPathSegments("tokens") - .build(); - 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) - .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); - } - 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, CreateScimTokenResponseContent.class), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - 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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Deletes a scim token by its connection <code>id</code> and <code>tokenId</code>. - */ - public ManagementApiHttpResponse delete(String id, String tokenId) { - return delete(id, tokenId, null); - } - - /** - * Deletes a scim token by its connection <code>id</code> and <code>tokenId</code>. - */ - public ManagementApiHttpResponse delete(String id, String tokenId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("connections") - .addPathSegment(id) - .addPathSegments("scim-configuration/tokens") - .addPathSegment(tokenId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/TokensClient.java b/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/TokensClient.java deleted file mode 100644 index 8db9256aa..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/TokensClient.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections.scimconfiguration; - -import com.auth0.client.mgmt.connections.scimconfiguration.types.CreateScimTokenRequestContent; -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.CreateScimTokenResponseContent; -import com.auth0.client.mgmt.types.ScimTokenItem; -import java.util.List; - -public class TokensClient { - protected final ClientOptions clientOptions; - - private final RawTokensClient rawClient; - - public TokensClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawTokensClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawTokensClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieves all scim tokens by its connection <code>id</code>. - */ - public List get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieves all scim tokens by its connection <code>id</code>. - */ - public List get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Create a scim token for a scim client. - */ - public CreateScimTokenResponseContent create(String id) { - return this.rawClient.create(id).body(); - } - - /** - * Create a scim token for a scim client. - */ - public CreateScimTokenResponseContent create(String id, CreateScimTokenRequestContent request) { - return this.rawClient.create(id, request).body(); - } - - /** - * Create a scim token for a scim client. - */ - public CreateScimTokenResponseContent create( - String id, CreateScimTokenRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).body(); - } - - /** - * Deletes a scim token by its connection <code>id</code> and <code>tokenId</code>. - */ - public void delete(String id, String tokenId) { - this.rawClient.delete(id, tokenId).body(); - } - - /** - * Deletes a scim token by its connection <code>id</code> and <code>tokenId</code>. - */ - public void delete(String id, String tokenId, RequestOptions requestOptions) { - this.rawClient.delete(id, tokenId, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/types/CreateScimTokenRequestContent.java b/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/types/CreateScimTokenRequestContent.java deleted file mode 100644 index dadd47f4f..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/scimconfiguration/types/CreateScimTokenRequestContent.java +++ /dev/null @@ -1,166 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections.scimconfiguration.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 = CreateScimTokenRequestContent.Builder.class) -public final class CreateScimTokenRequestContent { - private final Optional> scopes; - - private final OptionalNullable tokenLifetime; - - private final Map additionalProperties; - - private CreateScimTokenRequestContent( - Optional> scopes, - OptionalNullable tokenLifetime, - Map additionalProperties) { - this.scopes = scopes; - this.tokenLifetime = tokenLifetime; - this.additionalProperties = additionalProperties; - } - - /** - * @return The scopes of the scim token - */ - @JsonProperty("scopes") - public Optional> getScopes() { - return scopes; - } - - /** - * @return Lifetime of the token in seconds. Must be greater than 900 - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("token_lifetime") - public OptionalNullable getTokenLifetime() { - if (tokenLifetime == null) { - return OptionalNullable.absent(); - } - return tokenLifetime; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("token_lifetime") - private OptionalNullable _getTokenLifetime() { - return tokenLifetime; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateScimTokenRequestContent && equalTo((CreateScimTokenRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateScimTokenRequestContent other) { - return scopes.equals(other.scopes) && tokenLifetime.equals(other.tokenLifetime); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.scopes, this.tokenLifetime); - } - - @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> scopes = Optional.empty(); - - private OptionalNullable tokenLifetime = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateScimTokenRequestContent other) { - scopes(other.getScopes()); - tokenLifetime(other.getTokenLifetime()); - return this; - } - - /** - *

The scopes of the scim token

- */ - @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; - } - - /** - *

Lifetime of the token in seconds. Must be greater than 900

- */ - @JsonSetter(value = "token_lifetime", nulls = Nulls.SKIP) - public Builder tokenLifetime(@Nullable OptionalNullable tokenLifetime) { - this.tokenLifetime = tokenLifetime; - return this; - } - - public Builder tokenLifetime(Integer tokenLifetime) { - this.tokenLifetime = OptionalNullable.of(tokenLifetime); - return this; - } - - public Builder tokenLifetime(Optional tokenLifetime) { - if (tokenLifetime.isPresent()) { - this.tokenLifetime = OptionalNullable.of(tokenLifetime.get()); - } else { - this.tokenLifetime = OptionalNullable.absent(); - } - return this; - } - - public Builder tokenLifetime(com.auth0.client.mgmt.core.Nullable tokenLifetime) { - if (tokenLifetime.isNull()) { - this.tokenLifetime = OptionalNullable.ofNull(); - } else if (tokenLifetime.isEmpty()) { - this.tokenLifetime = OptionalNullable.absent(); - } else { - this.tokenLifetime = OptionalNullable.of(tokenLifetime.get()); - } - return this; - } - - public CreateScimTokenRequestContent build() { - return new CreateScimTokenRequestContent(scopes, tokenLifetime, additionalProperties); - } - } -} 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 deleted file mode 100644 index b211900f5..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/types/DeleteConnectionUsersByEmailQueryParameters.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * 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.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = DeleteConnectionUsersByEmailQueryParameters.Builder.class) -public final class DeleteConnectionUsersByEmailQueryParameters { - private final String email; - - private final Map additionalProperties; - - private DeleteConnectionUsersByEmailQueryParameters(String email, Map additionalProperties) { - this.email = email; - this.additionalProperties = additionalProperties; - } - - /** - * @return The email of the user to delete - */ - @JsonProperty("email") - public String getEmail() { - return email; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DeleteConnectionUsersByEmailQueryParameters - && equalTo((DeleteConnectionUsersByEmailQueryParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DeleteConnectionUsersByEmailQueryParameters other) { - return email.equals(other.email); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.email); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EmailStage builder() { - return new Builder(); - } - - public interface EmailStage { - /** - *

The email of the user to delete

- */ - _FinalStage email(@NotNull String email); - - Builder from(DeleteConnectionUsersByEmailQueryParameters other); - } - - public interface _FinalStage { - DeleteConnectionUsersByEmailQueryParameters build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EmailStage, _FinalStage { - private String email; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DeleteConnectionUsersByEmailQueryParameters other) { - email(other.getEmail()); - return this; - } - - /** - *

The 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. - */ - @java.lang.Override - @JsonSetter("email") - public _FinalStage email(@NotNull String email) { - this.email = Objects.requireNonNull(email, "email must not be null"); - return this; - } - - @java.lang.Override - public DeleteConnectionUsersByEmailQueryParameters build() { - return new DeleteConnectionUsersByEmailQueryParameters(email, additionalProperties); - } - } -} 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 deleted file mode 100644 index 5a8350257..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/types/GetConnectionEnabledClientsRequestParameters.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.connections.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetConnectionEnabledClientsRequestParameters.Builder.class) -public final class GetConnectionEnabledClientsRequestParameters { - private final OptionalNullable take; - - private final OptionalNullable from; - - private final Map additionalProperties; - - private GetConnectionEnabledClientsRequestParameters( - OptionalNullable take, OptionalNullable from, Map additionalProperties) { - this.take = take; - this.from = from; - this.additionalProperties = additionalProperties; - } - - /** - * @return Number of results per page. Defaults to 50. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("take") - public OptionalNullable getTake() { - return take; - } - - /** - * @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; - } - - @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; - return other instanceof GetConnectionEnabledClientsRequestParameters - && equalTo((GetConnectionEnabledClientsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetConnectionEnabledClientsRequestParameters other) { - return take.equals(other.take) && from.equals(other.from); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.take, this.from); - } - - @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 take = OptionalNullable.absent(); - - private OptionalNullable from = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetConnectionEnabledClientsRequestParameters other) { - take(other.getTake()); - from(other.getFrom()); - return this; - } - - /** - *

Number of results per page. Defaults to 50.

- */ - @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(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(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; - } - - /** - *

Optional Id from which to start selection.

- */ - @JsonSetter(value = "from", nulls = Nulls.SKIP) - public Builder from(@org.jetbrains.annotations.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(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; - } - - public GetConnectionEnabledClientsRequestParameters build() { - return new GetConnectionEnabledClientsRequestParameters(take, from, additionalProperties); - } - } -} 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 deleted file mode 100644 index c2f5a05b3..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/types/ListDirectoryProvisioningsRequestParameters.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListDirectoryProvisioningsRequestParameters.Builder.class) -public final class ListDirectoryProvisioningsRequestParameters { - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private ListDirectoryProvisioningsRequestParameters( - 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() { - 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; - return other instanceof ListDirectoryProvisioningsRequestParameters - && equalTo((ListDirectoryProvisioningsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListDirectoryProvisioningsRequestParameters 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(ListDirectoryProvisioningsRequestParameters 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(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 ListDirectoryProvisioningsRequestParameters build() { - return new ListDirectoryProvisioningsRequestParameters(from, take, additionalProperties); - } - } -} 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 deleted file mode 100644 index cea97bfcb..000000000 --- a/src/main/java/com/auth0/client/mgmt/connections/types/UpdateScimConfigurationRequestContent.java +++ /dev/null @@ -1,177 +0,0 @@ -/** - * 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.ScimMappingItem; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = UpdateScimConfigurationRequestContent.Builder.class) -public final class UpdateScimConfigurationRequestContent { - private final String userIdAttribute; - - private final List mapping; - - private final Map additionalProperties; - - private UpdateScimConfigurationRequestContent( - String userIdAttribute, List mapping, Map additionalProperties) { - this.userIdAttribute = userIdAttribute; - this.mapping = mapping; - this.additionalProperties = additionalProperties; - } - - /** - * @return User ID attribute for generating unique user ids - */ - @JsonProperty("user_id_attribute") - public String getUserIdAttribute() { - return userIdAttribute; - } - - /** - * @return The mapping between auth0 and SCIM - */ - @JsonProperty("mapping") - public List getMapping() { - return mapping; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateScimConfigurationRequestContent - && equalTo((UpdateScimConfigurationRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateScimConfigurationRequestContent other) { - return userIdAttribute.equals(other.userIdAttribute) && mapping.equals(other.mapping); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.userIdAttribute, this.mapping); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static UserIdAttributeStage builder() { - return new Builder(); - } - - public interface UserIdAttributeStage { - /** - *

User ID attribute for generating unique user ids

- */ - _FinalStage userIdAttribute(@NotNull String userIdAttribute); - - Builder from(UpdateScimConfigurationRequestContent other); - } - - public interface _FinalStage { - UpdateScimConfigurationRequestContent build(); - - /** - *

The mapping between auth0 and SCIM

- */ - _FinalStage mapping(List mapping); - - _FinalStage addMapping(ScimMappingItem mapping); - - _FinalStage addAllMapping(List mapping); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements UserIdAttributeStage, _FinalStage { - private String userIdAttribute; - - private List mapping = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateScimConfigurationRequestContent other) { - userIdAttribute(other.getUserIdAttribute()); - mapping(other.getMapping()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("user_id_attribute") - public _FinalStage userIdAttribute(@NotNull String userIdAttribute) { - this.userIdAttribute = Objects.requireNonNull(userIdAttribute, "userIdAttribute must not be null"); - return this; - } - - /** - *

The mapping between auth0 and SCIM

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

The mapping between auth0 and SCIM

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addMapping(ScimMappingItem mapping) { - this.mapping.add(mapping); - return this; - } - - /** - *

The mapping between auth0 and SCIM

- */ - @java.lang.Override - @JsonSetter(value = "mapping", nulls = Nulls.SKIP) - public _FinalStage mapping(List mapping) { - this.mapping.clear(); - if (mapping != null) { - this.mapping.addAll(mapping); - } - return this; - } - - @java.lang.Override - public UpdateScimConfigurationRequestContent build() { - return new UpdateScimConfigurationRequestContent(userIdAttribute, mapping, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/AsyncCustomPager.java b/src/main/java/com/auth0/client/mgmt/core/AsyncCustomPager.java deleted file mode 100644 index f1b9f7c87..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/AsyncCustomPager.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.io.IOException; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionStage; - -/** - * Skeleton implementation for custom asynchronous bidirectional pagination. - * - * THIS CLASS MUST BE IMPLEMENTED BY THE USER. - * - * This file is added to .fernignore and will not be regenerated. - * Replace this skeleton implementation with your custom async pagination logic - * that handles your API's specific pagination structure (e.g., HATEOAS links). - * - * Example implementation for HATEOAS-style async pagination: - *
{@code
- * public class AsyncCustomPager implements BiDirectionalPage {
- *     private final List items;
- *     private final String nextUrl;
- *     private final String previousUrl;
- *     private final AsyncHttpClient client;
- *
- *     public AsyncCustomPager(Response response, AsyncHttpClient client, ...) {
- *         this.items = response.getData();
- *         this.nextUrl = response.getLinks().getNext();
- *         this.previousUrl = response.getLinks().getPrevious();
- *         // ... store other needed context
- *     }
- *
- *     @Override
- *     public boolean hasNext() {
- *         return nextUrl != null;
- *     }
- *
- *     @Override
- *     public CompletableFuture> nextPageAsync() {
- *         if (!hasNext()) {
- *             CompletableFuture> future = new CompletableFuture<>();
- *             future.completeExceptionally(new NoSuchElementException("No next page available"));
- *             return future;
- *         }
- *         // Make async HTTP request to nextUrl
- *         return client.getAsync(nextUrl)
- *             .thenApply(response -> new AsyncCustomPager<>(response, client, ...));
- *     }
- *
- *     // ... implement other methods
- * }
- * }
- * - * @param The type of items in the page - */ -public class AsyncCustomPager implements BiDirectionalPage { - - /** - * Create an AsyncCustomPager from an initial response. - * - * @param initialResponse The first page response from the API - * @param clientOptions The client options containing HTTP client and other configuration - * @param requestOptions Request options for authentication, headers, etc. - * @return A CompletableFuture containing the new AsyncCustomPager instance - */ - public static CompletableFuture> createAsync( - Object initialResponse, ClientOptions clientOptions, Object requestOptions) { - throw new UnsupportedOperationException("AsyncCustomPager must be implemented. " - + "Please implement this class in core/AsyncCustomPager.java to define your async pagination logic. " - + "This file has been added to .fernignore and will not be overwritten. " - + "See the class documentation for implementation examples."); - } - - @Override - public boolean hasNext() { - throw new UnsupportedOperationException("AsyncCustomPager.hasNext() must be implemented. " - + "This method should return true if a next page is available."); - } - - @Override - public boolean hasPrevious() { - throw new UnsupportedOperationException("AsyncCustomPager.hasPrevious() must be implemented. " - + "This method should return true if a previous page is available."); - } - - /** - * Asynchronously fetch the next page. - * - * @return A CompletableFuture that completes with the next page - * @throws java.util.NoSuchElementException if no next page exists (wrapped in CompletableFuture) - */ - public CompletableFuture> nextPageAsync() { - CompletableFuture> future = new CompletableFuture<>(); - future.completeExceptionally( - new UnsupportedOperationException("AsyncCustomPager.nextPageAsync() must be implemented. " - + "This method should asynchronously fetch and return the next page of results.")); - return future; - } - - /** - * Asynchronously fetch the previous page. - * - * @return A CompletableFuture that completes with the previous page - * @throws java.util.NoSuchElementException if no previous page exists (wrapped in CompletableFuture) - */ - public CompletableFuture> previousPageAsync() { - CompletableFuture> future = new CompletableFuture<>(); - future.completeExceptionally( - new UnsupportedOperationException("AsyncCustomPager.previousPageAsync() must be implemented. " - + "This method should asynchronously fetch and return the previous page of results.")); - return future; - } - - @Override - public BiDirectionalPage nextPage() throws IOException { - throw new UnsupportedOperationException("AsyncCustomPager.nextPage() must be implemented. " - + "Consider using nextPageAsync() for async operations, or implement synchronous blocking version."); - } - - @Override - public BiDirectionalPage previousPage() throws IOException { - throw new UnsupportedOperationException( - "AsyncCustomPager.previousPage() must be implemented. " - + "Consider using previousPageAsync() for async operations, or implement synchronous blocking version."); - } - - @Override - public List getItems() { - throw new UnsupportedOperationException("AsyncCustomPager.getItems() must be implemented. " - + "This method should return the items in the current page."); - } - - @Override - public Optional getResponse() { - throw new UnsupportedOperationException("AsyncCustomPager.getResponse() must be implemented. " - + "This method should return the full response object for accessing pagination metadata."); - } - - /** - * Asynchronously iterate through all pages starting from current. - * Returns a CompletableFuture that completes with all items from all pages. - * - * @return CompletableFuture containing all items across all pages - */ - public CompletableFuture> getAllItemsAsync() { - throw new UnsupportedOperationException("AsyncCustomPager.getAllItemsAsync() must be implemented. " - + "This method should asynchronously fetch all pages and return all items."); - } - - /** - * Process each page asynchronously as it arrives. - * - * @param pageProcessor Function to process each page - * @return CompletableFuture that completes when all pages are processed - */ - public CompletableFuture forEachPageAsync( - java.util.function.Function, CompletionStage> pageProcessor) { - throw new UnsupportedOperationException("AsyncCustomPager.forEachPageAsync() must be implemented. " - + "This method should asynchronously process each page with the given function."); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/BasePage.java b/src/main/java/com/auth0/client/mgmt/core/BasePage.java deleted file mode 100644 index c212dbc7c..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/BasePage.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.util.List; -import java.util.Optional; - -public abstract class BasePage { - private final boolean hasNext; - private final List items; - private final Object response; - - public BasePage(boolean hasNext, List items, Object response) { - this.hasNext = hasNext; - this.items = items; - this.response = response; - } - - public boolean hasNext() { - return !items.isEmpty() && hasNext; - } - - public List getItems() { - return items; - } - - /** - * Returns the full response object for accessing pagination metadata like cursor tokens. - * - * @return Optional containing the response, or empty if unavailable - */ - public Optional getResponse() { - @SuppressWarnings("unchecked") - R typedResponse = (R) response; - return Optional.ofNullable(typedResponse); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/BiDirectionalPage.java b/src/main/java/com/auth0/client/mgmt/core/BiDirectionalPage.java deleted file mode 100644 index 8f61f3a42..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/BiDirectionalPage.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.util.List; - -/** - * Interface for pages that support bidirectional pagination (both forward and backward navigation). - * This is used for custom pagination scenarios where the API provides both next and previous page links. - * - * @param The type of items in the page - */ -public interface BiDirectionalPage { - /** - * Returns whether there is a next page available. - * - * @return true if next page exists and can be fetched - */ - boolean hasNext(); - - /** - * Returns whether there is a previous page available. - * - * @return true if previous page exists and can be fetched - */ - boolean hasPrevious(); - - /** - * Fetches and returns the next page. - * - * @return the next page - * @throws java.util.NoSuchElementException if no next page exists - * @throws java.io.IOException if the HTTP request fails - */ - BiDirectionalPage nextPage() throws java.io.IOException; - - /** - * Fetches and returns the previous page. - * - * @return the previous page - * @throws java.util.NoSuchElementException if no previous page exists - * @throws java.io.IOException if the HTTP request fails - */ - BiDirectionalPage previousPage() throws java.io.IOException; - - /** - * Returns the items in the current page. - * - * @return list of items in this page - */ - List getItems(); - - /** - * Returns the full response object for accessing pagination metadata. - * - * @return Optional containing the response, or empty if unavailable - */ - java.util.Optional getResponse(); -} diff --git a/src/main/java/com/auth0/client/mgmt/core/ClientOptions.java b/src/main/java/com/auth0/client/mgmt/core/ClientOptions.java deleted file mode 100644 index e1f7e84b0..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/ClientOptions.java +++ /dev/null @@ -1,190 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.TimeUnit; -import java.util.function.Supplier; -import okhttp3.OkHttpClient; - -public final class ClientOptions { - private final Environment environment; - - private final Map headers; - - private final Map> headerSuppliers; - - private final OkHttpClient httpClient; - - private final int timeout; - - private final int maxRetries; - - private ClientOptions( - Environment environment, - Map headers, - Map> headerSuppliers, - OkHttpClient httpClient, - int timeout, - int maxRetries) { - this.environment = environment; - this.headers = new HashMap<>(); - this.headers.putAll(headers); - this.headers.putAll(new HashMap() { - { - put("X-Fern-Language", "JAVA"); - put("X-Fern-SDK-Name", "com.auth0.fern:api-sdk"); - put("X-Fern-SDK-Version", "0.0.938"); - } - }); - this.headerSuppliers = headerSuppliers; - this.httpClient = httpClient; - this.timeout = timeout; - this.maxRetries = maxRetries; - } - - public Environment environment() { - return this.environment; - } - - public Map headers(RequestOptions requestOptions) { - Map values = new HashMap<>(this.headers); - headerSuppliers.forEach((key, supplier) -> { - values.put(key, supplier.get()); - }); - if (requestOptions != null) { - values.putAll(requestOptions.getHeaders()); - } - return values; - } - - public int timeout(RequestOptions requestOptions) { - if (requestOptions == null) { - return this.timeout; - } - return requestOptions.getTimeout().orElse(this.timeout); - } - - public OkHttpClient httpClient() { - return this.httpClient; - } - - public OkHttpClient httpClientWithTimeout(RequestOptions requestOptions) { - if (requestOptions == null) { - return this.httpClient; - } - return this.httpClient - .newBuilder() - .callTimeout(requestOptions.getTimeout().get(), requestOptions.getTimeoutTimeUnit()) - .connectTimeout(0, TimeUnit.SECONDS) - .writeTimeout(0, TimeUnit.SECONDS) - .readTimeout(0, TimeUnit.SECONDS) - .build(); - } - - public int maxRetries() { - return this.maxRetries; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Environment environment; - - private final Map headers = new HashMap<>(); - - private final Map> headerSuppliers = new HashMap<>(); - - private int maxRetries = 2; - - private Optional timeout = Optional.empty(); - - private OkHttpClient httpClient = null; - - public Builder environment(Environment environment) { - this.environment = environment; - return this; - } - - public Builder addHeader(String key, String value) { - this.headers.put(key, value); - return this; - } - - public Builder addHeader(String key, Supplier value) { - this.headerSuppliers.put(key, value); - return this; - } - - /** - * Override the timeout in seconds. Defaults to 60 seconds. - */ - public Builder timeout(int timeout) { - this.timeout = Optional.of(timeout); - return this; - } - - /** - * Override the timeout in seconds. Defaults to 60 seconds. - */ - public Builder timeout(Optional timeout) { - this.timeout = timeout; - return this; - } - - /** - * Override the maximum number of retries. Defaults to 2 retries. - */ - public Builder maxRetries(int maxRetries) { - this.maxRetries = maxRetries; - return this; - } - - public Builder httpClient(OkHttpClient httpClient) { - this.httpClient = httpClient; - return this; - } - - public ClientOptions build() { - OkHttpClient.Builder httpClientBuilder = - this.httpClient != null ? this.httpClient.newBuilder() : new OkHttpClient.Builder(); - - if (this.httpClient != null) { - timeout.ifPresent(timeout -> httpClientBuilder - .callTimeout(timeout, TimeUnit.SECONDS) - .connectTimeout(0, TimeUnit.SECONDS) - .writeTimeout(0, TimeUnit.SECONDS) - .readTimeout(0, TimeUnit.SECONDS)); - } else { - httpClientBuilder - .callTimeout(this.timeout.orElse(60), TimeUnit.SECONDS) - .connectTimeout(0, TimeUnit.SECONDS) - .writeTimeout(0, TimeUnit.SECONDS) - .readTimeout(0, TimeUnit.SECONDS) - .addInterceptor(new RetryInterceptor(this.maxRetries)); - } - - this.httpClient = httpClientBuilder.build(); - this.timeout = Optional.of(httpClient.callTimeoutMillis() / 1000); - - return new ClientOptions( - environment, headers, headerSuppliers, httpClient, this.timeout.get(), this.maxRetries); - } - - /** - * Create a new Builder initialized with values from an existing ClientOptions - */ - 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(); - return builder; - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/CustomPager.java b/src/main/java/com/auth0/client/mgmt/core/CustomPager.java deleted file mode 100644 index 56f1f3333..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/CustomPager.java +++ /dev/null @@ -1,117 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.io.IOException; -import java.util.Iterator; -import java.util.List; -import java.util.Optional; - -/** - * Skeleton implementation for custom bidirectional pagination. - * - * THIS CLASS MUST BE IMPLEMENTED BY THE USER. - * - * This file is added to .fernignore and will not be regenerated. - * Replace this skeleton implementation with your custom pagination logic - * that handles your API's specific pagination structure (e.g., HATEOAS links). - * - * Example implementation for HATEOAS-style pagination: - *
{@code
- * public class CustomPager implements BiDirectionalPage, Iterable {
- *     private final List items;
- *     private final String nextUrl;
- *     private final String previousUrl;
- *     private final OkHttpClient client;
- *     private final TypeReference> responseType;
- *
- *     public CustomPager(Response response, OkHttpClient client, ...) {
- *         this.items = response.getData();
- *         this.nextUrl = response.getLinks().getNext();
- *         this.previousUrl = response.getLinks().getPrevious();
- *         // ... store other needed context
- *     }
- *
- *     @Override
- *     public boolean hasNext() {
- *         return nextUrl != null;
- *     }
- *
- *     @Override
- *     public CustomPager nextPage() throws IOException {
- *         if (!hasNext()) {
- *             throw new NoSuchElementException("No next page available");
- *         }
- *         // Make HTTP request to nextUrl
- *         // Parse response
- *         // Return new CustomPager instance
- *     }
- *
- *     // ... implement other methods
- * }
- * }
- * - * @param The type of items in the page - */ -public class CustomPager implements BiDirectionalPage, Iterable { - - /** - * Create a CustomPager from an initial response. - * - * @param initialResponse The first page response from the API - * @param clientOptions The client options containing HTTP client and other configuration - * @param requestOptions Request options for authentication, headers, etc. - * @return A new CustomPager instance - * @throws IOException if the request fails - */ - public static CustomPager create(Object initialResponse, ClientOptions clientOptions, Object requestOptions) - throws IOException { - throw new UnsupportedOperationException("CustomPager must be implemented. " - + "Please implement this class in core/CustomPager.java to define your pagination logic. " - + "This file has been added to .fernignore and will not be overwritten. " - + "See the class documentation for implementation examples."); - } - - @Override - public boolean hasNext() { - throw new UnsupportedOperationException("CustomPager.hasNext() must be implemented. " - + "This method should return true if a next page is available."); - } - - @Override - public boolean hasPrevious() { - throw new UnsupportedOperationException("CustomPager.hasPrevious() must be implemented. " - + "This method should return true if a previous page is available."); - } - - @Override - public BiDirectionalPage nextPage() throws IOException { - throw new UnsupportedOperationException("CustomPager.nextPage() must be implemented. " - + "This method should fetch and return the next page of results."); - } - - @Override - public BiDirectionalPage previousPage() throws IOException { - throw new UnsupportedOperationException("CustomPager.previousPage() must be implemented. " - + "This method should fetch and return the previous page of results."); - } - - @Override - public List getItems() { - throw new UnsupportedOperationException("CustomPager.getItems() must be implemented. " - + "This method should return the items in the current page."); - } - - @Override - public Optional getResponse() { - throw new UnsupportedOperationException("CustomPager.getResponse() must be implemented. " - + "This method should return the full response object for accessing pagination metadata."); - } - - @Override - public Iterator iterator() { - throw new UnsupportedOperationException("CustomPager.iterator() must be implemented. " - + "This method should return an iterator that traverses all items across all pages."); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/DateTimeDeserializer.java b/src/main/java/com/auth0/client/mgmt/core/DateTimeDeserializer.java deleted file mode 100644 index bee373689..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/DateTimeDeserializer.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonToken; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.module.SimpleModule; -import java.io.IOException; -import java.time.Instant; -import java.time.LocalDateTime; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.format.DateTimeFormatter; -import java.time.temporal.TemporalAccessor; -import java.time.temporal.TemporalQueries; - -/** - * Custom deserializer that handles converting ISO8601 dates into {@link OffsetDateTime} objects. - */ -class DateTimeDeserializer extends JsonDeserializer { - private static final SimpleModule MODULE; - - static { - MODULE = new SimpleModule().addDeserializer(OffsetDateTime.class, new DateTimeDeserializer()); - } - - /** - * Gets a module wrapping this deserializer as an adapter for the Jackson ObjectMapper. - * - * @return A {@link SimpleModule} to be plugged onto Jackson ObjectMapper. - */ - public static SimpleModule getModule() { - return MODULE; - } - - @Override - public OffsetDateTime deserialize(JsonParser parser, DeserializationContext context) throws IOException { - JsonToken token = parser.currentToken(); - 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); - - if (temporal.query(TemporalQueries.offset()) == null) { - return LocalDateTime.from(temporal).atOffset(ZoneOffset.UTC); - } else { - return OffsetDateTime.from(temporal); - } - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/Environment.java b/src/main/java/com/auth0/client/mgmt/core/Environment.java deleted file mode 100644 index d69f0ce4c..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/Environment.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -public final class Environment { - public static final Environment DEFAULT = new Environment("https://%7BTENANT%7D.auth0.com/api/v2"); - - private final String url; - - private Environment(String url) { - this.url = url; - } - - public String getUrl() { - return this.url; - } - - public static Environment custom(String url) { - return new Environment(url); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/FileStream.java b/src/main/java/com/auth0/client/mgmt/core/FileStream.java deleted file mode 100644 index 7d60f50a4..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/FileStream.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.io.InputStream; -import java.util.Objects; -import okhttp3.MediaType; -import okhttp3.RequestBody; -import org.jetbrains.annotations.Nullable; - -/** - * Represents a file stream with associated metadata for file uploads. - */ -public class FileStream { - private final InputStream inputStream; - private final String fileName; - private final MediaType contentType; - - /** - * Constructs a FileStream with the given input stream and optional metadata. - * - * @param inputStream The input stream of the file content. Must not be null. - * @param fileName The name of the file, or null if unknown. - * @param contentType The MIME type of the file content, or null if unknown. - * @throws NullPointerException if inputStream is null - */ - public FileStream(InputStream inputStream, @Nullable String fileName, @Nullable MediaType contentType) { - this.inputStream = Objects.requireNonNull(inputStream, "Input stream cannot be null"); - this.fileName = fileName; - this.contentType = contentType; - } - - public FileStream(InputStream inputStream) { - this(inputStream, null, null); - } - - public InputStream getInputStream() { - return inputStream; - } - - @Nullable - public String getFileName() { - return fileName; - } - - @Nullable - public MediaType getContentType() { - return contentType; - } - - /** - * Creates a RequestBody suitable for use with OkHttp client. - * - * @return A RequestBody instance representing this file stream. - */ - public RequestBody toRequestBody() { - return new InputStreamRequestBody(contentType, inputStream); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/InputStreamRequestBody.java b/src/main/java/com/auth0/client/mgmt/core/InputStreamRequestBody.java deleted file mode 100644 index a8c4be629..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/InputStreamRequestBody.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Objects; -import okhttp3.MediaType; -import okhttp3.RequestBody; -import okio.BufferedSink; -import okio.Okio; -import okio.Source; -import org.jetbrains.annotations.Nullable; - -/** - * A custom implementation of OkHttp's RequestBody that wraps an InputStream. - * This class allows streaming of data from an InputStream directly to an HTTP request body, - * which is useful for file uploads or sending large amounts of data without loading it all into memory. - */ -public class InputStreamRequestBody extends RequestBody { - private final InputStream inputStream; - private final MediaType contentType; - - /** - * Constructs an InputStreamRequestBody with the specified content type and input stream. - * - * @param contentType the MediaType of the content, or null if not known - * @param inputStream the InputStream containing the data to be sent - * @throws NullPointerException if inputStream is null - */ - public InputStreamRequestBody(@Nullable MediaType contentType, InputStream inputStream) { - this.contentType = contentType; - this.inputStream = Objects.requireNonNull(inputStream, "inputStream == null"); - } - - /** - * Returns the content type of this request body. - * - * @return the MediaType of the content, or null if not specified - */ - @Nullable - @Override - public MediaType contentType() { - return contentType; - } - - /** - * Returns the content length of this request body, if known. - * This method attempts to determine the length using the InputStream's available() method, - * which may not always accurately reflect the total length of the stream. - * - * @return the content length, or -1 if the length is unknown - * @throws IOException if an I/O error occurs - */ - @Override - public long contentLength() throws IOException { - return inputStream.available() == 0 ? -1 : inputStream.available(); - } - - /** - * Writes the content of the InputStream to the given BufferedSink. - * This method is responsible for transferring the data from the InputStream to the network request. - * - * @param sink the BufferedSink to write the content to - * @throws IOException if an I/O error occurs during writing - */ - @Override - public void writeTo(BufferedSink sink) throws IOException { - try (Source source = Okio.source(inputStream)) { - sink.writeAll(source); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/ManagementApiException.java b/src/main/java/com/auth0/client/mgmt/core/ManagementApiException.java deleted file mode 100644 index 967f3a372..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/ManagementApiException.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import okhttp3.Response; - -/** - * This exception type will be thrown for any non-2XX API responses. - */ -public class ManagementApiException extends ManagementException { - /** - * The error code of the response that triggered the exception. - */ - private final int statusCode; - - /** - * The body of the response that triggered the exception. - */ - private final Object body; - - private final Map> headers; - - public ManagementApiException(String message, int statusCode, Object body) { - super(message); - this.statusCode = statusCode; - this.body = body; - this.headers = new HashMap<>(); - } - - public ManagementApiException(String message, int statusCode, Object body, Response rawResponse) { - super(message); - this.statusCode = statusCode; - this.body = body; - this.headers = new HashMap<>(); - rawResponse.headers().forEach(header -> { - String key = header.component1(); - String value = header.component2(); - this.headers.computeIfAbsent(key, _str -> new ArrayList<>()).add(value); - }); - } - - /** - * @return the statusCode - */ - public int statusCode() { - return this.statusCode; - } - - /** - * @return the body - */ - public Object body() { - return this.body; - } - - /** - * @return the headers - */ - public Map> headers() { - return this.headers; - } - - @Override - public String toString() { - return "ManagementApiException{" + "message: " + getMessage() + ", statusCode: " + statusCode + ", body: " - + ObjectMappers.stringify(body) + "}"; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/ManagementApiHttpResponse.java b/src/main/java/com/auth0/client/mgmt/core/ManagementApiHttpResponse.java deleted file mode 100644 index 3e5b6755b..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/ManagementApiHttpResponse.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import okhttp3.Response; - -public final class ManagementApiHttpResponse { - - private final T body; - - private final Map> headers; - - public ManagementApiHttpResponse(T body, Response rawResponse) { - this.body = body; - - Map> headers = new HashMap<>(); - rawResponse.headers().forEach(header -> { - String key = header.component1(); - String value = header.component2(); - headers.computeIfAbsent(key, _str -> new ArrayList<>()).add(value); - }); - this.headers = headers; - } - - public T body() { - return this.body; - } - - public Map> headers() { - return headers; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/ManagementException.java b/src/main/java/com/auth0/client/mgmt/core/ManagementException.java deleted file mode 100644 index f663f4803..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/ManagementException.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -/** - * This class serves as the base exception for all errors in the SDK. - */ -public class ManagementException extends RuntimeException { - public ManagementException(String message) { - super(message); - } - - public ManagementException(String message, Exception e) { - super(message, e); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/MediaTypes.java b/src/main/java/com/auth0/client/mgmt/core/MediaTypes.java deleted file mode 100644 index ced1fd0ce..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/MediaTypes.java +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import okhttp3.MediaType; - -public final class MediaTypes { - - public static final MediaType APPLICATION_JSON = MediaType.parse("application/json"); - - private MediaTypes() {} -} diff --git a/src/main/java/com/auth0/client/mgmt/core/Nullable.java b/src/main/java/com/auth0/client/mgmt/core/Nullable.java deleted file mode 100644 index 789d4de38..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/Nullable.java +++ /dev/null @@ -1,140 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.util.Optional; -import java.util.function.Function; - -public final class Nullable { - - private final Either, Null> value; - - private Nullable() { - this.value = Either.left(Optional.empty()); - } - - private Nullable(T value) { - if (value == null) { - this.value = Either.right(Null.INSTANCE); - } else { - this.value = Either.left(Optional.of(value)); - } - } - - public static Nullable ofNull() { - return new Nullable<>(null); - } - - public static Nullable of(T value) { - return new Nullable<>(value); - } - - public static Nullable empty() { - return new Nullable<>(); - } - - public static Nullable ofOptional(Optional value) { - if (value.isPresent()) { - return of(value.get()); - } else { - return empty(); - } - } - - public boolean isNull() { - return this.value.isRight(); - } - - public boolean isEmpty() { - return this.value.isLeft() && !this.value.getLeft().isPresent(); - } - - public T get() { - if (this.isNull()) { - return null; - } - - return this.value.getLeft().get(); - } - - public Nullable map(Function mapper) { - if (this.isNull()) { - return Nullable.ofNull(); - } - - return Nullable.ofOptional(this.value.getLeft().map(mapper)); - } - - @Override - public boolean equals(Object other) { - if (!(other instanceof Nullable)) { - return false; - } - - if (((Nullable) other).isNull() && this.isNull()) { - return true; - } - - return this.value.getLeft().equals(((Nullable) other).value.getLeft()); - } - - private static final class Either { - private L left = null; - private R right = null; - - private Either(L left, R right) { - if (left != null && right != null) { - throw new IllegalArgumentException("Left and right argument cannot both be non-null."); - } - - if (left == null && right == null) { - throw new IllegalArgumentException("Left and right argument cannot both be null."); - } - - if (left != null) { - this.left = left; - } - - if (right != null) { - this.right = right; - } - } - - public static Either left(L left) { - return new Either<>(left, null); - } - - public static Either right(R right) { - return new Either<>(null, right); - } - - public boolean isLeft() { - return this.left != null; - } - - public boolean isRight() { - return this.right != null; - } - - public L getLeft() { - if (!this.isLeft()) { - throw new IllegalArgumentException("Cannot get left from right Either."); - } - return this.left; - } - - public R getRight() { - if (!this.isRight()) { - throw new IllegalArgumentException("Cannot get right from left Either."); - } - return this.right; - } - } - - private static final class Null { - private static final Null INSTANCE = new Null(); - - private Null() {} - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/NullableNonemptyFilter.java b/src/main/java/com/auth0/client/mgmt/core/NullableNonemptyFilter.java deleted file mode 100644 index b0a0f8776..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/NullableNonemptyFilter.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.util.Optional; - -public final class NullableNonemptyFilter { - @Override - public boolean equals(Object o) { - boolean isOptionalEmpty = isOptionalEmpty(o); - - return isOptionalEmpty; - } - - private boolean isOptionalEmpty(Object o) { - if (o instanceof Optional) { - return !((Optional) o).isPresent(); - } - if (o instanceof OptionalNullable) { - return ((OptionalNullable) o).isAbsent(); - } - return false; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/OAuthTokenException.java b/src/main/java/com/auth0/client/mgmt/core/OAuthTokenException.java deleted file mode 100644 index 8ad1a1486..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/OAuthTokenException.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.auth0.client.mgmt.core; - -/** - * Exception thrown when OAuth token fetching fails. - * - *

This exception is thrown when there are issues obtaining an access token - * using the OAuth 2.0 client credentials flow, such as: - *

    - *
  • Invalid client credentials
  • - *
  • Network connectivity issues
  • - *
  • Auth0 service unavailability
  • - *
  • Invalid audience or base URL
  • - *
- */ -public class OAuthTokenException extends RuntimeException { - - /** - * Creates a new OAuth token exception with the specified message. - * - * @param message The error message - */ - public OAuthTokenException(String message) { - super(message); - } - - /** - * Creates a new OAuth token exception with the specified message and cause. - * - * @param message The error message - * @param cause The underlying cause - */ - public OAuthTokenException(String message, Throwable cause) { - super(message, cause); - } - - /** - * Creates a new OAuth token exception with the specified cause. - * - * @param cause The underlying cause - */ - public OAuthTokenException(Throwable cause) { - super(cause); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/OAuthTokenSupplier.java b/src/main/java/com/auth0/client/mgmt/core/OAuthTokenSupplier.java deleted file mode 100644 index 11dc988a2..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/OAuthTokenSupplier.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * OAuth token supplier for fetching and caching access tokens using client credentials. - * - * This class handles the OAuth 2.0 client credentials flow to obtain access tokens - * from Auth0. Tokens are cached and automatically refreshed when they expire. - */ -package com.auth0.client.mgmt.core; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.io.IOException; -import java.time.Instant; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import okhttp3.*; - -public class OAuthTokenSupplier implements java.util.function.Supplier { - private static final MediaType JSON = MediaType.get("application/json; charset=utf-8"); - private static final long BUFFER_SECONDS = 120; - - // Shared HTTP client for all OAuth token requests to avoid resource leaks - private static final OkHttpClient SHARED_HTTP_CLIENT = - new OkHttpClient.Builder().callTimeout(30, TimeUnit.SECONDS).build(); - - private final String clientId; - private final String clientSecret; - private final String tokenUrl; - private final String audience; - - private volatile String accessToken; - private volatile Instant expiresAt; - - /** - * Creates a new OAuth token supplier. - * - * @param clientId The OAuth client ID - * @param clientSecret The OAuth client secret - * @param baseUrl The Auth0 base URL (e.g., "https://your-domain.auth0.com") - * @param audience The API audience. If null, defaults to baseUrl + "/api/v2/" - * @throws IllegalArgumentException if baseUrl is null or empty - */ - public OAuthTokenSupplier(String clientId, String clientSecret, String baseUrl, String audience) { - if (baseUrl == null || baseUrl.trim().isEmpty()) { - throw new IllegalArgumentException("baseUrl cannot be null or empty"); - } - - this.clientId = clientId; - this.clientSecret = clientSecret; - - String normalizedBaseUrl = baseUrl.replaceAll("/+$", ""); - this.tokenUrl = normalizedBaseUrl + "/oauth/token"; - this.audience = audience != null ? audience : normalizedBaseUrl + "/api/v2/"; - this.expiresAt = Instant.now(); - } - - /** - * Gets an access token, fetching a new one if the cached token has expired. - * - * @return A valid Bearer token string (without "Bearer " prefix) - * @throws OAuthTokenException if token fetching fails due to network issues, - * invalid credentials, or Auth0 service problems - */ - @Override - public String get() { - if (accessToken == null || Instant.now().isAfter(expiresAt)) { - synchronized (this) { - if (accessToken == null || Instant.now().isAfter(expiresAt)) { - fetchToken(); - } - } - } - return accessToken; - } - - /** - * Fetches a new access token from Auth0. - * - * @throws OAuthTokenException if token fetching fails - */ - private void fetchToken() { - try { - Map requestData = new HashMap<>(); - requestData.put("client_id", clientId); - requestData.put("client_secret", clientSecret); - requestData.put("audience", audience); - requestData.put("grant_type", "client_credentials"); - - String requestBody = ObjectMappers.JSON_MAPPER.writeValueAsString(requestData); - - Request request = new Request.Builder() - .url(tokenUrl) - .post(RequestBody.create(requestBody, JSON)) - .addHeader("Content-Type", "application/json") - .build(); - - try (Response response = SHARED_HTTP_CLIENT.newCall(request).execute()) { - if (!response.isSuccessful()) { - throw new OAuthTokenException( - "Failed to fetch OAuth token: HTTP " + response.code() + " - " + response.message()); - } - - String responseBody = response.body() != null ? response.body().string() : "{}"; - TokenResponse tokenResponse = ObjectMappers.JSON_MAPPER.readValue(responseBody, TokenResponse.class); - - if (tokenResponse.accessToken == null || tokenResponse.accessToken.isEmpty()) { - throw new OAuthTokenException("OAuth token response did not contain an access token"); - } - - this.accessToken = tokenResponse.accessToken; - this.expiresAt = Instant.now() - .plusSeconds(tokenResponse.expiresIn != null ? tokenResponse.expiresIn : 86400) - .minusSeconds(BUFFER_SECONDS); - } - } catch (IOException e) { - throw new OAuthTokenException("Failed to fetch OAuth token due to network error", e); - } - } - - /** - * Response from Auth0 token endpoint. - */ - @JsonIgnoreProperties(ignoreUnknown = true) - private static class TokenResponse { - @JsonProperty("access_token") - String accessToken; - - @JsonProperty("expires_in") - Integer expiresIn; - - @JsonProperty("token_type") - String tokenType; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/ObjectMappers.java b/src/main/java/com/auth0/client/mgmt/core/ObjectMappers.java deleted file mode 100644 index 10d06b6bc..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/ObjectMappers.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; -import com.fasterxml.jackson.databind.json.JsonMapper; -import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import java.io.IOException; - -public final class ObjectMappers { - public static final ObjectMapper JSON_MAPPER = JsonMapper.builder() - .addModule(new Jdk8Module()) - .addModule(new JavaTimeModule()) - .addModule(DateTimeDeserializer.getModule()) - .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) - .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) - .build(); - - private ObjectMappers() {} - - public static String stringify(Object o) { - try { - return JSON_MAPPER - .setSerializationInclusion(JsonInclude.Include.ALWAYS) - .writerWithDefaultPrettyPrinter() - .writeValueAsString(o); - } catch (IOException e) { - return o.getClass().getName() + "@" + Integer.toHexString(o.hashCode()); - } - } - - public static Object parseErrorBody(String responseBodyString) { - try { - return JSON_MAPPER.readValue(responseBodyString, Object.class); - } catch (JsonProcessingException ignored) { - return responseBodyString; - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/OptionalNullable.java b/src/main/java/com/auth0/client/mgmt/core/OptionalNullable.java deleted file mode 100644 index 4ddd536f8..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/OptionalNullable.java +++ /dev/null @@ -1,187 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Objects; -import java.util.Optional; -import java.util.function.Function; - -/** - * An optional wrapper type that supports null values, distinguishing between: - * - ABSENT: field not present (e.g., not included in request) - * - NULL: field explicitly set to null - * - PRESENT: field has a non-null value - * - * This is useful for partial updates, JSON Merge Patch (RFC 7396), and any API - * that needs to differentiate between "not specified" and "set to null". - * - * Use this for optional> types where null is a valid value. - * For regular optional types (where null is not valid), use Optional instead. - */ -public final class OptionalNullable { - - private enum State { - ABSENT, - NULL, - PRESENT - } - - private final State state; - private final T value; - - private OptionalNullable(State state, T value) { - this.state = state; - this.value = value; - } - - /** - * Creates an absent OptionalNullable (field not present). - */ - public static OptionalNullable absent() { - return new OptionalNullable<>(State.ABSENT, null); - } - - /** - * Creates a null OptionalNullable (field explicitly set to null). - */ - public static OptionalNullable ofNull() { - return new OptionalNullable<>(State.NULL, null); - } - - /** - * Creates an OptionalNullable with a value. - */ - public static OptionalNullable of(T value) { - Objects.requireNonNull(value, "Use ofNull() for null values"); - return new OptionalNullable<>(State.PRESENT, value); - } - - /** - * Creates an OptionalNullable from a nullable value. - */ - @JsonCreator - public static OptionalNullable ofNullable(T value) { - return value == null ? ofNull() : of(value); - } - - /** - * Returns true if the field was absent from the request. - */ - public boolean isAbsent() { - return state == State.ABSENT; - } - - /** - * Returns true if the field was explicitly set to null. - */ - public boolean isNull() { - return state == State.NULL; - } - - /** - * Returns true if the field has a value. - */ - public boolean isPresent() { - return state == State.PRESENT; - } - - /** - * Returns true if the field was present in the request (either null or with a value). - */ - public boolean wasSpecified() { - return state != State.ABSENT; - } - - /** - * Gets the value if present, throws if absent or null. - */ - public T get() { - if (state != State.PRESENT) { - throw new IllegalStateException("Cannot get value from " + state + " OptionalNullable"); - } - return value; - } - - /** - * Gets the value if present or explicitly null, throws if absent. - * This is useful for update operations where null is a valid value to set. - */ - public T getValueOrNull() { - if (state == State.ABSENT) { - throw new IllegalStateException("No value set"); - } - return value; // Returns the actual value if PRESENT, or null if NULL - } - - /** - * Gets the value if present, returns null if explicitly set to null, or returns the provided default if absent. - */ - public T orElse(T defaultValue) { - if (state == State.PRESENT) return value; - if (state == State.NULL) return null; - return defaultValue; - } - - /** - * Converts to an Optional, returning empty for both absent and null states. - */ - public Optional toOptional() { - return state == State.PRESENT ? Optional.of(value) : Optional.empty(); - } - - /** - * Maps the value if present, preserving absent and null states. - */ - public OptionalNullable map(Function mapper) { - if (state == State.PRESENT) { - return OptionalNullable.of(mapper.apply(value)); - } else if (state == State.NULL) { - return OptionalNullable.ofNull(); - } else { - return OptionalNullable.absent(); - } - } - - /** - * For JSON serialization - serialize the actual value or null. - * Absent values should be handled by @JsonInclude(JsonInclude.Include.CUSTOM) - */ - @JsonValue - public Object getJsonValue() { - if (state == State.ABSENT) { - // Should not be serialized - handled by custom inclusion - throw new IllegalStateException("Absent values should not be serialized"); - } - return state == State.NULL ? null : value; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - OptionalNullable that = (OptionalNullable) o; - return state == that.state && Objects.equals(value, that.value); - } - - @Override - public int hashCode() { - return Objects.hash(state, value); - } - - @Override - public String toString() { - switch (state) { - case ABSENT: - return "OptionalNullable.absent()"; - case NULL: - return "OptionalNullable.ofNull()"; - case PRESENT: - return "OptionalNullable.of(" + value + ")"; - default: - throw new IllegalStateException("Unknown state: " + state); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/QueryStringMapper.java b/src/main/java/com/auth0/client/mgmt/core/QueryStringMapper.java deleted file mode 100644 index f85b1b1a1..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/QueryStringMapper.java +++ /dev/null @@ -1,142 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.ObjectNode; -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import okhttp3.HttpUrl; -import okhttp3.MultipartBody; - -public class QueryStringMapper { - - private static final ObjectMapper MAPPER = ObjectMappers.JSON_MAPPER; - - public static void addQueryParameter(HttpUrl.Builder httpUrl, String key, Object value, boolean arraysAsRepeats) { - JsonNode valueNode = MAPPER.valueToTree(value); - - List> flat; - if (valueNode.isObject()) { - flat = flattenObject((ObjectNode) valueNode, arraysAsRepeats); - } else if (valueNode.isArray()) { - flat = flattenArray((ArrayNode) valueNode, "", arraysAsRepeats); - } else { - if (valueNode.isTextual()) { - httpUrl.addQueryParameter(key, valueNode.textValue()); - } else { - httpUrl.addQueryParameter(key, valueNode.toString()); - } - return; - } - - for (Map.Entry field : flat) { - if (field.getValue().isTextual()) { - httpUrl.addQueryParameter(key + field.getKey(), field.getValue().textValue()); - } else { - httpUrl.addQueryParameter(key + field.getKey(), field.getValue().toString()); - } - } - } - - public static void addFormDataPart( - MultipartBody.Builder multipartBody, String key, Object value, boolean arraysAsRepeats) { - JsonNode valueNode = MAPPER.valueToTree(value); - - List> flat; - if (valueNode.isObject()) { - flat = flattenObject((ObjectNode) valueNode, arraysAsRepeats); - } else if (valueNode.isArray()) { - flat = flattenArray((ArrayNode) valueNode, "", arraysAsRepeats); - } else { - if (valueNode.isTextual()) { - multipartBody.addFormDataPart(key, valueNode.textValue()); - } else { - multipartBody.addFormDataPart(key, valueNode.toString()); - } - return; - } - - for (Map.Entry field : flat) { - if (field.getValue().isTextual()) { - multipartBody.addFormDataPart( - key + field.getKey(), field.getValue().textValue()); - } else { - multipartBody.addFormDataPart( - key + field.getKey(), field.getValue().toString()); - } - } - } - - public static List> flattenObject(ObjectNode object, boolean arraysAsRepeats) { - List> flat = new ArrayList<>(); - - Iterator> fields = object.fields(); - while (fields.hasNext()) { - Map.Entry field = fields.next(); - - String key = "[" + field.getKey() + "]"; - - if (field.getValue().isObject()) { - List> flatField = - flattenObject((ObjectNode) field.getValue(), arraysAsRepeats); - addAll(flat, flatField, key); - } else if (field.getValue().isArray()) { - List> flatField = - flattenArray((ArrayNode) field.getValue(), key, arraysAsRepeats); - addAll(flat, flatField, ""); - } else { - flat.add(new AbstractMap.SimpleEntry<>(key, field.getValue())); - } - } - - return flat; - } - - private static List> flattenArray( - ArrayNode array, String key, boolean arraysAsRepeats) { - List> flat = new ArrayList<>(); - - Iterator elements = array.elements(); - - int index = 0; - while (elements.hasNext()) { - JsonNode element = elements.next(); - - String indexKey = key + "[" + index + "]"; - - if (arraysAsRepeats) { - indexKey = key; - } - - if (element.isObject()) { - List> flatField = flattenObject((ObjectNode) element, arraysAsRepeats); - addAll(flat, flatField, indexKey); - } else if (element.isArray()) { - List> flatField = flattenArray((ArrayNode) element, "", arraysAsRepeats); - addAll(flat, flatField, indexKey); - } else { - flat.add(new AbstractMap.SimpleEntry<>(indexKey, element)); - } - - index++; - } - - return flat; - } - - private static void addAll( - List> target, List> source, String prefix) { - for (Map.Entry entry : source) { - Map.Entry entryToAdd = - new AbstractMap.SimpleEntry<>(prefix + entry.getKey(), entry.getValue()); - target.add(entryToAdd); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/RequestOptions.java b/src/main/java/com/auth0/client/mgmt/core/RequestOptions.java deleted file mode 100644 index 735186a1f..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/RequestOptions.java +++ /dev/null @@ -1,276 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - * - * MODIFIED: Added support for per-request OAuth client credentials. - * This allows overriding OAuth credentials on a per-request basis. - */ -package com.auth0.client.mgmt.core; - -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; -import java.util.concurrent.TimeUnit; -import java.util.function.Supplier; - -public final class RequestOptions { - private final String token; - - private final Optional timeout; - - private final TimeUnit timeoutTimeUnit; - - private final Map headers; - - private final Map> headerSuppliers; - - // Per-request OAuth credentials - private final String clientId; - - private final String clientSecret; - - private final String audience; - - private final String baseUrl; - - // Cached token supplier for per-request credentials (lazily initialized) - private transient volatile OAuthTokenSupplier cachedTokenSupplier; - - private RequestOptions( - String token, - Optional timeout, - TimeUnit timeoutTimeUnit, - Map headers, - Map> headerSuppliers, - String clientId, - String clientSecret, - String audience, - String baseUrl) { - this.token = token; - this.timeout = timeout; - this.timeoutTimeUnit = timeoutTimeUnit; - this.headers = headers; - this.headerSuppliers = headerSuppliers; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.audience = audience; - this.baseUrl = baseUrl; - } - - public Optional getTimeout() { - return timeout; - } - - public TimeUnit getTimeoutTimeUnit() { - return timeoutTimeUnit; - } - - /** - * Returns the client ID for per-request OAuth credentials, if set. - */ - public String getClientId() { - return clientId; - } - - /** - * Returns the client secret for per-request OAuth credentials, if set. - */ - public String getClientSecret() { - return clientSecret; - } - - /** - * Returns the audience for per-request OAuth credentials, if set. - */ - public String getAudience() { - return audience; - } - - /** - * Checks if per-request OAuth credentials have been configured. - */ - public boolean hasClientCredentials() { - return clientId != null && clientSecret != null; - } - - /** - * Gets the base URL for per-request OAuth token fetching. - */ - public String getBaseUrl() { - return baseUrl; - } - - /** - * Gets the HTTP headers for this request. - * - *

Note: When per-request OAuth credentials are configured, this method will - * automatically fetch an access token (blocking network call). Tokens are cached and reused. - * - * @return Map of HTTP header names to values - * @throws OAuthTokenException if OAuth token fetching fails - */ - public Map getHeaders() { - Map headers = new HashMap<>(); - - if (hasClientCredentials() && baseUrl != null) { - if (cachedTokenSupplier == null) { - synchronized (this) { - if (cachedTokenSupplier == null) { - cachedTokenSupplier = new OAuthTokenSupplier(clientId, clientSecret, baseUrl, audience); - } - } - } - headers.put("Authorization", "Bearer " + cachedTokenSupplier.get()); - } else if (this.token != null) { - headers.put("Authorization", "Bearer " + this.token); - } - - headers.putAll(this.headers); - this.headerSuppliers.forEach((key, supplier) -> { - headers.put(key, supplier.get()); - }); - return headers; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String token = null; - - private Optional timeout = Optional.empty(); - - private TimeUnit timeoutTimeUnit = TimeUnit.SECONDS; - - private final Map headers = new HashMap<>(); - - private final Map> headerSuppliers = new HashMap<>(); - - private String clientId = null; - - private String clientSecret = null; - - private String audience = null; - - private String baseUrl = null; - - public Builder token(String token) { - this.token = token; - return this; - } - - /** - * Sets the base URL for OAuth token requests. - * This is required when using per-request client credentials. - * - * @param baseUrl The Auth0 base URL (e.g., "https://your-domain.auth0.com") - * @return This builder for method chaining - */ - public Builder baseUrl(String baseUrl) { - this.baseUrl = baseUrl; - return this; - } - - /** - * Sets OAuth client credentials for this request only. - * This overrides any client-level authentication and fetches a new token - * using the provided credentials. - * - * Useful for multi-tenant scenarios where different requests need different OAuth tokens. - * - * Note: You must also call baseUrl() to specify where to fetch the token from. - * - * @param clientId The OAuth client ID - * @param clientSecret The OAuth client secret - * @return This builder for method chaining - */ - public Builder clientCredentials(String clientId, String clientSecret) { - this.clientId = clientId; - this.clientSecret = clientSecret; - return this; - } - - /** - * Sets OAuth client credentials with a custom audience for this request only. - * - * Note: You must also call baseUrl() to specify where to fetch the token from. - * - * @param clientId The OAuth client ID - * @param clientSecret The OAuth client secret - * @param audience The custom audience for the token request - * @return This builder for method chaining - */ - public Builder clientCredentialsWithAudience(String clientId, String clientSecret, String audience) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.audience = audience; - return this; - } - - public Builder timeout(Integer timeout) { - this.timeout = Optional.of(timeout); - return this; - } - - public Builder timeout(Integer timeout, TimeUnit timeoutTimeUnit) { - this.timeout = Optional.of(timeout); - this.timeoutTimeUnit = timeoutTimeUnit; - return this; - } - - public Builder addHeader(String key, String value) { - this.headers.put(key, value); - return this; - } - - public Builder addHeader(String key, Supplier value) { - this.headerSuppliers.put(key, value); - return this; - } - - public RequestOptions build() { - return new RequestOptions( - token, - timeout, - timeoutTimeUnit, - headers, - headerSuppliers, - clientId, - clientSecret, - audience, - baseUrl); - } - } - - /** - * Convenience method to create RequestOptions with client credentials. - * - * @param baseUrl The Auth0 base URL (e.g., "https://your-domain.auth0.com") - * @param clientId The OAuth client ID - * @param clientSecret The OAuth client secret - * @return RequestOptions configured with the provided credentials - */ - public static RequestOptions withClientCredentials(String baseUrl, String clientId, String clientSecret) { - return builder() - .baseUrl(baseUrl) - .clientCredentials(clientId, clientSecret) - .build(); - } - - /** - * Convenience method to create RequestOptions with client credentials and custom audience. - * - * @param baseUrl The Auth0 base URL (e.g., "https://your-domain.auth0.com") - * @param clientId The OAuth client ID - * @param clientSecret The OAuth client secret - * @param audience The custom audience for the token request - * @return RequestOptions configured with the provided credentials and audience - */ - public static RequestOptions withClientCredentialsAndAudience( - String baseUrl, String clientId, String clientSecret, String audience) { - return builder() - .baseUrl(baseUrl) - .clientCredentialsWithAudience(clientId, clientSecret, audience) - .build(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/ResponseBodyInputStream.java b/src/main/java/com/auth0/client/mgmt/core/ResponseBodyInputStream.java deleted file mode 100644 index 49db4ff6b..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/ResponseBodyInputStream.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.io.FilterInputStream; -import java.io.IOException; -import okhttp3.Response; - -/** - * A custom InputStream that wraps the InputStream from the OkHttp Response and ensures that the - * OkHttp Response object is properly closed when the stream is closed. - * - * This class extends FilterInputStream and takes an OkHttp Response object as a parameter. - * It retrieves the InputStream from the Response and overrides the close method to close - * both the InputStream and the Response object, ensuring proper resource management and preventing - * premature closure of the underlying HTTP connection. - */ -public class ResponseBodyInputStream extends FilterInputStream { - private final Response response; - - /** - * Constructs a ResponseBodyInputStream that wraps the InputStream from the given OkHttp - * Response object. - * - * @param response the OkHttp Response object from which the InputStream is retrieved - * @throws IOException if an I/O error occurs while retrieving the InputStream - */ - public ResponseBodyInputStream(Response response) throws IOException { - super(response.body().byteStream()); - this.response = response; - } - - /** - * Closes the InputStream and the associated OkHttp Response object. This ensures that the - * underlying HTTP connection is properly closed after the stream is no longer needed. - * - * @throws IOException if an I/O error occurs - */ - @Override - public void close() throws IOException { - super.close(); - response.close(); // Ensure the response is closed when the stream is closed - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/ResponseBodyReader.java b/src/main/java/com/auth0/client/mgmt/core/ResponseBodyReader.java deleted file mode 100644 index 7eff702df..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/ResponseBodyReader.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.io.FilterReader; -import java.io.IOException; -import okhttp3.Response; - -/** - * A custom Reader that wraps the Reader from the OkHttp Response and ensures that the - * OkHttp Response object is properly closed when the reader is closed. - * - * This class extends FilterReader and takes an OkHttp Response object as a parameter. - * It retrieves the Reader from the Response and overrides the close method to close - * both the Reader and the Response object, ensuring proper resource management and preventing - * premature closure of the underlying HTTP connection. - */ -public class ResponseBodyReader extends FilterReader { - private final Response response; - - /** - * Constructs a ResponseBodyReader that wraps the Reader from the given OkHttp Response object. - * - * @param response the OkHttp Response object from which the Reader is retrieved - * @throws IOException if an I/O error occurs while retrieving the Reader - */ - public ResponseBodyReader(Response response) throws IOException { - super(response.body().charStream()); - this.response = response; - } - - /** - * Closes the Reader and the associated OkHttp Response object. This ensures that the - * underlying HTTP connection is properly closed after the reader is no longer needed. - * - * @throws IOException if an I/O error occurs - */ - @Override - public void close() throws IOException { - super.close(); - response.close(); // Ensure the response is closed when the reader is closed - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/RetryInterceptor.java b/src/main/java/com/auth0/client/mgmt/core/RetryInterceptor.java deleted file mode 100644 index 17f2fbacf..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/RetryInterceptor.java +++ /dev/null @@ -1,180 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.io.IOException; -import java.time.Duration; -import java.time.ZonedDateTime; -import java.time.format.DateTimeFormatter; -import java.time.format.DateTimeParseException; -import java.util.Optional; -import java.util.Random; -import okhttp3.Interceptor; -import okhttp3.Response; - -public class RetryInterceptor implements Interceptor { - - private static final Duration INITIAL_RETRY_DELAY = Duration.ofMillis(1000); - private static final Duration MAX_RETRY_DELAY = Duration.ofMillis(60000); - private static final double JITTER_FACTOR = 0.2; - - private final ExponentialBackoff backoff; - private final Random random = new Random(); - - public RetryInterceptor(int maxRetries) { - this.backoff = new ExponentialBackoff(maxRetries); - } - - @Override - public Response intercept(Chain chain) throws IOException { - Response response = chain.proceed(chain.request()); - - if (shouldRetry(response.code())) { - return retryChain(response, chain); - } - - return response; - } - - private Response retryChain(Response response, Chain chain) throws IOException { - Optional nextBackoff = this.backoff.nextBackoff(response); - while (nextBackoff.isPresent()) { - try { - Thread.sleep(nextBackoff.get().toMillis()); - } catch (InterruptedException e) { - throw new IOException("Interrupted while trying request", e); - } - response.close(); - response = chain.proceed(chain.request()); - if (shouldRetry(response.code())) { - nextBackoff = this.backoff.nextBackoff(response); - } else { - return response; - } - } - - return response; - } - - /** - * Calculates the retry delay from response headers, with fallback to exponential backoff. - * Priority: Retry-After > X-RateLimit-Reset > Exponential Backoff - */ - private Duration getRetryDelayFromHeaders(Response response, int retryAttempt) { - // Check for Retry-After header first (RFC 7231), with no jitter - String retryAfter = response.header("Retry-After"); - if (retryAfter != null) { - // Parse as number of seconds... - Optional secondsDelay = tryParseLong(retryAfter) - .map(seconds -> seconds * 1000) - .filter(delayMs -> delayMs > 0) - .map(delayMs -> Math.min(delayMs, MAX_RETRY_DELAY.toMillis())) - .map(Duration::ofMillis); - if (secondsDelay.isPresent()) { - return secondsDelay.get(); - } - - // ...or as an HTTP date; both are valid - Optional dateDelay = tryParseHttpDate(retryAfter) - .map(resetTime -> resetTime.toInstant().toEpochMilli() - System.currentTimeMillis()) - .filter(delayMs -> delayMs > 0) - .map(delayMs -> Math.min(delayMs, MAX_RETRY_DELAY.toMillis())) - .map(Duration::ofMillis); - if (dateDelay.isPresent()) { - return dateDelay.get(); - } - } - - // Then check for industry-standard X-RateLimit-Reset header, with positive jitter - String rateLimitReset = response.header("X-RateLimit-Reset"); - if (rateLimitReset != null) { - // Assume Unix timestamp in epoch seconds - Optional rateLimitDelay = tryParseLong(rateLimitReset) - .map(resetTimeSeconds -> (resetTimeSeconds * 1000) - System.currentTimeMillis()) - .filter(delayMs -> delayMs > 0) - .map(delayMs -> Math.min(delayMs, MAX_RETRY_DELAY.toMillis())) - .map(this::addPositiveJitter) - .map(Duration::ofMillis); - if (rateLimitDelay.isPresent()) { - return rateLimitDelay.get(); - } - } - - // Fall back to exponential backoff, with symmetric jitter - long baseDelay = INITIAL_RETRY_DELAY.toMillis() * (1L << retryAttempt); // 2^retryAttempt - long cappedDelay = Math.min(baseDelay, MAX_RETRY_DELAY.toMillis()); - return Duration.ofMillis(addSymmetricJitter(cappedDelay)); - } - - /** - * Attempts to parse a string as a long, returning empty Optional on failure. - */ - private Optional tryParseLong(String value) { - if (value == null) { - return Optional.empty(); - } - try { - return Optional.of(Long.parseLong(value)); - } catch (NumberFormatException e) { - return Optional.empty(); - } - } - - /** - * Attempts to parse a string as an HTTP date (RFC 1123), returning empty Optional on failure. - */ - private Optional tryParseHttpDate(String value) { - if (value == null) { - return Optional.empty(); - } - try { - return Optional.of(ZonedDateTime.parse(value, DateTimeFormatter.RFC_1123_DATE_TIME)); - } catch (DateTimeParseException e) { - return Optional.empty(); - } - } - - /** - * Adds positive jitter (100-120% of original value) to prevent thundering herd. - * Used for X-RateLimit-Reset header delays. - */ - private long addPositiveJitter(long delayMs) { - double jitterMultiplier = 1.0 + (random.nextDouble() * JITTER_FACTOR); - return (long) (delayMs * jitterMultiplier); - } - - /** - * Adds symmetric jitter (90-110% of original value) to prevent thundering herd. - * Used for exponential backoff delays. - */ - private long addSymmetricJitter(long delayMs) { - double jitterMultiplier = 1.0 + ((random.nextDouble() - 0.5) * JITTER_FACTOR); - return (long) (delayMs * jitterMultiplier); - } - - private static boolean shouldRetry(int statusCode) { - return statusCode == 408 || statusCode == 429 || statusCode >= 500; - } - - private final class ExponentialBackoff { - - private final int maxNumRetries; - - private int retryNumber = 0; - - ExponentialBackoff(int maxNumRetries) { - this.maxNumRetries = maxNumRetries; - } - - public Optional nextBackoff(Response response) { - if (retryNumber >= maxNumRetries) { - return Optional.empty(); - } - - Duration delay = getRetryDelayFromHeaders(response, retryNumber); - retryNumber += 1; - return Optional.of(delay); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/Stream.java b/src/main/java/com/auth0/client/mgmt/core/Stream.java deleted file mode 100644 index c2d438973..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/Stream.java +++ /dev/null @@ -1,302 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.io.Closeable; -import java.io.IOException; -import java.io.Reader; -import java.util.Iterator; -import java.util.NoSuchElementException; -import java.util.Scanner; - -/** - * The {@code Stream} class implements {@link Iterable} to provide a simple mechanism for reading and parsing - * objects of a given type from data streamed via a {@link Reader} using a specified delimiter. - *

- * {@code Stream} assumes that data is being pushed to the provided {@link Reader} asynchronously and utilizes a - * {@code Scanner} to block during iteration if the next object is not available. - * Iterable stream for parsing JSON and Server-Sent Events (SSE) data. - * Supports both newline-delimited JSON and SSE with optional stream termination. - * - * @param The type of objects in the stream. - */ -public final class Stream implements Iterable, Closeable { - - private static final String NEWLINE = "\n"; - private static final String DATA_PREFIX = "data:"; - - public enum StreamType { - JSON, - SSE - } - - private final Class valueType; - private final Scanner scanner; - private final StreamType streamType; - private final String messageTerminator; - private final String streamTerminator; - private final Reader sseReader; - private boolean isClosed = false; - - /** - * Constructs a new {@code Stream} with the specified value type, reader, and delimiter. - * - * @param valueType The class of the objects in the stream. - * @param reader The reader that provides the streamed data. - * @param delimiter The delimiter used to separate elements in the stream. - */ - public Stream(Class valueType, Reader reader, String delimiter) { - this.valueType = valueType; - this.scanner = new Scanner(reader).useDelimiter(delimiter); - this.streamType = StreamType.JSON; - this.messageTerminator = delimiter; - this.streamTerminator = null; - this.sseReader = null; - } - - private Stream(Class valueType, StreamType type, Reader reader, String terminator) { - this.valueType = valueType; - this.streamType = type; - if (type == StreamType.JSON) { - this.scanner = new Scanner(reader).useDelimiter(terminator); - this.messageTerminator = terminator; - this.streamTerminator = null; - this.sseReader = null; - } else { - this.scanner = null; - this.messageTerminator = NEWLINE; - this.streamTerminator = terminator; - this.sseReader = reader; - } - } - - public static Stream fromJson(Class valueType, Reader reader, String delimiter) { - return new Stream<>(valueType, reader, delimiter); - } - - public static Stream fromJson(Class valueType, Reader reader) { - return new Stream<>(valueType, reader, NEWLINE); - } - - public static Stream fromSse(Class valueType, Reader sseReader) { - return new Stream<>(valueType, StreamType.SSE, sseReader, null); - } - - public static Stream fromSse(Class valueType, Reader sseReader, String streamTerminator) { - return new Stream<>(valueType, StreamType.SSE, sseReader, streamTerminator); - } - - @Override - public void close() throws IOException { - if (!isClosed) { - isClosed = true; - if (scanner != null) { - scanner.close(); - } - if (sseReader != null) { - sseReader.close(); - } - } - } - - private boolean isStreamClosed() { - return isClosed; - } - - /** - * Returns an iterator over the elements in this stream that blocks during iteration when the next object is - * not yet available. - * - * @return An iterator that can be used to traverse the elements in the stream. - */ - @Override - public Iterator iterator() { - if (streamType == StreamType.SSE) { - return new SSEIterator(); - } else { - return new JsonIterator(); - } - } - - private final class JsonIterator implements Iterator { - - /** - * Returns {@code true} if there are more elements in the stream. - *

- * Will block and wait for input if the stream has not ended and the next object is not yet available. - * - * @return {@code true} if there are more elements, {@code false} otherwise. - */ - @Override - public boolean hasNext() { - if (isStreamClosed()) { - return false; - } - return scanner.hasNext(); - } - - /** - * Returns the next element in the stream. - *

- * Will block and wait for input if the stream has not ended and the next object is not yet available. - * - * @return The next element in the stream. - * @throws NoSuchElementException If there are no more elements in the stream. - */ - @Override - public T next() { - if (isStreamClosed()) { - throw new NoSuchElementException("Stream is closed"); - } - - if (!scanner.hasNext()) { - throw new NoSuchElementException(); - } else { - try { - T parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(scanner.next().trim(), valueType); - return parsedResponse; - } catch (Exception e) { - throw new RuntimeException(e); - } - } - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - } - - private final class SSEIterator implements Iterator { - private Scanner sseScanner; - private T nextItem; - private boolean hasNextItem = false; - private boolean endOfStream = false; - private StringBuilder eventDataBuffer = new StringBuilder(); - private String currentEventType = null; - - private SSEIterator() { - if (sseReader != null && !isStreamClosed()) { - this.sseScanner = new Scanner(sseReader); - } else { - this.endOfStream = true; - } - } - - @Override - public boolean hasNext() { - if (isStreamClosed() || endOfStream) { - return false; - } - - if (hasNextItem) { - return true; - } - - return readNextMessage(); - } - - @Override - public T next() { - if (!hasNext()) { - throw new NoSuchElementException("No more elements in stream"); - } - - T result = nextItem; - nextItem = null; - hasNextItem = false; - return result; - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - private boolean readNextMessage() { - if (sseScanner == null || isStreamClosed()) { - endOfStream = true; - return false; - } - - try { - while (sseScanner.hasNextLine()) { - String line = sseScanner.nextLine(); - - if (line.trim().isEmpty()) { - if (eventDataBuffer.length() > 0) { - try { - nextItem = ObjectMappers.JSON_MAPPER.readValue(eventDataBuffer.toString(), valueType); - hasNextItem = true; - eventDataBuffer.setLength(0); - currentEventType = null; - return true; - } catch (Exception parseEx) { - System.err.println("Failed to parse SSE event: " + parseEx.getMessage()); - eventDataBuffer.setLength(0); - currentEventType = null; - continue; - } - } - continue; - } - - if (line.startsWith(DATA_PREFIX)) { - String dataContent = line.substring(DATA_PREFIX.length()); - if (dataContent.startsWith(" ")) { - dataContent = dataContent.substring(1); - } - - if (eventDataBuffer.length() == 0 - && streamTerminator != null - && dataContent.trim().equals(streamTerminator)) { - endOfStream = true; - return false; - } - - if (eventDataBuffer.length() > 0) { - eventDataBuffer.append('\n'); - } - eventDataBuffer.append(dataContent); - } else if (line.startsWith("event:")) { - String eventValue = line.length() > 6 ? line.substring(6) : ""; - if (eventValue.startsWith(" ")) { - eventValue = eventValue.substring(1); - } - currentEventType = eventValue; - } else if (line.startsWith("id:")) { - // Event ID field (ignored) - } else if (line.startsWith("retry:")) { - // Retry field (ignored) - } else if (line.startsWith(":")) { - // Comment line (ignored) - } - } - - if (eventDataBuffer.length() > 0) { - try { - nextItem = ObjectMappers.JSON_MAPPER.readValue(eventDataBuffer.toString(), valueType); - hasNextItem = true; - eventDataBuffer.setLength(0); - currentEventType = null; - return true; - } catch (Exception parseEx) { - System.err.println("Failed to parse final SSE event: " + parseEx.getMessage()); - eventDataBuffer.setLength(0); - currentEventType = null; - } - } - - endOfStream = true; - return false; - - } catch (Exception e) { - System.err.println("Failed to parse SSE stream: " + e.getMessage()); - endOfStream = true; - return false; - } - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/Suppliers.java b/src/main/java/com/auth0/client/mgmt/core/Suppliers.java deleted file mode 100644 index 29e113889..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/Suppliers.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.util.Objects; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Supplier; - -public final class Suppliers { - private Suppliers() {} - - public static Supplier memoize(Supplier delegate) { - AtomicReference value = new AtomicReference<>(); - return () -> { - T val = value.get(); - if (val == null) { - val = value.updateAndGet(cur -> cur == null ? Objects.requireNonNull(delegate.get()) : cur); - } - return val; - }; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/SyncPage.java b/src/main/java/com/auth0/client/mgmt/core/SyncPage.java deleted file mode 100644 index 25a8d1bf9..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/SyncPage.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.util.List; -import java.util.NoSuchElementException; -import java.util.function.Supplier; - -public class SyncPage extends BasePage { - protected final Supplier> nextSupplier; - - public SyncPage(boolean hasNext, List items, Object response, Supplier> nextSupplier) { - super(hasNext, items, response); - this.nextSupplier = nextSupplier; - } - - public SyncPage nextPage() { - if (!hasNext()) { - throw new NoSuchElementException(); - } - return nextSupplier.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/core/SyncPagingIterable.java b/src/main/java/com/auth0/client/mgmt/core/SyncPagingIterable.java deleted file mode 100644 index bc3dc871e..000000000 --- a/src/main/java/com/auth0/client/mgmt/core/SyncPagingIterable.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.NoSuchElementException; -import java.util.Optional; -import java.util.function.Supplier; -import java.util.stream.Stream; -import java.util.stream.StreamSupport; - -public class SyncPagingIterable extends SyncPage implements Iterable { - - public SyncPagingIterable( - boolean hasNext, List items, Object response, Supplier> getNext) { - super(hasNext, items, response, getNext); - } - - public SyncPagingIterable( - boolean hasNext, Optional> items, Object response, Supplier> getNext) { - super(hasNext, items.orElse(new ArrayList<>()), response, getNext); - } - - public Stream streamItems() { - return StreamSupport.stream(this.spliterator(), false); - } - - @Override - public Iterator iterator() { - return new Iterator() { - private Iterator itemsIterator = getItems().iterator(); - private SyncPage currentPage = SyncPagingIterable.this; - - @Override - public boolean hasNext() { - if (itemsIterator.hasNext()) { - return true; - } - if (currentPage.hasNext()) { - advancePage(); - return itemsIterator.hasNext(); - } - return false; - } - - @Override - public T next() { - if (!hasNext()) { - throw new NoSuchElementException(); - } - return itemsIterator.next(); - } - - private void advancePage() { - currentPage = currentPage.nextPage(); - itemsIterator = currentPage.getItems().iterator(); - } - }; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/emails/AsyncEmailsClient.java b/src/main/java/com/auth0/client/mgmt/emails/AsyncEmailsClient.java deleted file mode 100644 index 3bc022a98..000000000 --- a/src/main/java/com/auth0/client/mgmt/emails/AsyncEmailsClient.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.emails; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class AsyncEmailsClient { - protected final ClientOptions clientOptions; - - protected final Supplier providerClient; - - public AsyncEmailsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.providerClient = Suppliers.memoize(() -> new AsyncProviderClient(clientOptions)); - } - - public AsyncProviderClient provider() { - return this.providerClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/emails/AsyncProviderClient.java b/src/main/java/com/auth0/client/mgmt/emails/AsyncProviderClient.java deleted file mode 100644 index 4b10e0607..000000000 --- a/src/main/java/com/auth0/client/mgmt/emails/AsyncProviderClient.java +++ /dev/null @@ -1,304 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.emails; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -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.GetEmailProviderResponseContent; -import com.auth0.client.mgmt.types.UpdateEmailProviderResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncProviderClient { - protected final ClientOptions clientOptions; - - private final AsyncRawProviderClient rawClient; - - public AsyncProviderClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawProviderClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawProviderClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of the <a href="https://auth0.com/docs/customize/email/smtp-email-providers">email provider configuration</a> in your tenant. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture get() { - return this.rawClient.get().thenApply(response -> response.body()); - } - - /** - * Retrieve details of the <a href="https://auth0.com/docs/customize/email/smtp-email-providers">email provider configuration</a> in your tenant. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture get(GetEmailProviderRequestParameters request) { - return this.rawClient.get(request).thenApply(response -> response.body()); - } - - /** - * Retrieve details of the <a href="https://auth0.com/docs/customize/email/smtp-email-providers">email provider configuration</a> in your tenant. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture get( - GetEmailProviderRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * </li> - * <li> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public CompletableFuture create(CreateEmailProviderRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * </li> - * <li> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public CompletableFuture create( - CreateEmailProviderRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete the email provider. - */ - public CompletableFuture delete() { - return this.rawClient.delete().thenApply(response -> response.body()); - } - - /** - * Delete the email provider. - */ - public CompletableFuture delete(RequestOptions requestOptions) { - return this.rawClient.delete(requestOptions).thenApply(response -> response.body()); - } - - /** - * Update an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public CompletableFuture update() { - return this.rawClient.update().thenApply(response -> response.body()); - } - - /** - * Update an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public CompletableFuture update(UpdateEmailProviderRequestContent request) { - return this.rawClient.update(request).thenApply(response -> response.body()); - } - - /** - * Update an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public CompletableFuture update( - UpdateEmailProviderRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/emails/AsyncRawProviderClient.java b/src/main/java/com/auth0/client/mgmt/emails/AsyncRawProviderClient.java deleted file mode 100644 index 0bd147838..000000000 --- a/src/main/java/com/auth0/client/mgmt/emails/AsyncRawProviderClient.java +++ /dev/null @@ -1,637 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.emails; - -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.emails.types.CreateEmailProviderRequestContent; -import com.auth0.client.mgmt.emails.types.GetEmailProviderRequestParameters; -import com.auth0.client.mgmt.emails.types.UpdateEmailProviderRequestContent; -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.CreateEmailProviderResponseContent; -import com.auth0.client.mgmt.types.GetEmailProviderResponseContent; -import com.auth0.client.mgmt.types.UpdateEmailProviderResponseContent; -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 AsyncRawProviderClient { - protected final ClientOptions clientOptions; - - public AsyncRawProviderClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of the <a href="https://auth0.com/docs/customize/email/smtp-email-providers">email provider configuration</a> in your tenant. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture> get() { - return get(GetEmailProviderRequestParameters.builder().build()); - } - - /** - * Retrieve details of the <a href="https://auth0.com/docs/customize/email/smtp-email-providers">email provider configuration</a> in your tenant. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture> get( - GetEmailProviderRequestParameters request) { - return get(request, null); - } - - /** - * Retrieve details of the <a href="https://auth0.com/docs/customize/email/smtp-email-providers">email provider configuration</a> in your tenant. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture> get( - GetEmailProviderRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("emails/provider"); - 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); - } - 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); - } - 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, GetEmailProviderResponseContent.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 (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 <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * </li> - * <li> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public CompletableFuture> create( - CreateEmailProviderRequestContent request) { - return create(request, null); - } - - /** - * Create an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * </li> - * <li> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public CompletableFuture> create( - CreateEmailProviderRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("emails/provider") - .build(); - 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) - .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); - } - 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, CreateEmailProviderResponseContent.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 (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 the email provider. - */ - public CompletableFuture> delete() { - return delete(null); - } - - /** - * Delete the email provider. - */ - public CompletableFuture> delete(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("emails/provider") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public CompletableFuture> update() { - return update(UpdateEmailProviderRequestContent.builder().build()); - } - - /** - * Update an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public CompletableFuture> update( - UpdateEmailProviderRequestContent request) { - return update(request, null); - } - - /** - * Update an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public CompletableFuture> update( - UpdateEmailProviderRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("emails/provider") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateEmailProviderResponseContent.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 (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/emails/EmailsClient.java b/src/main/java/com/auth0/client/mgmt/emails/EmailsClient.java deleted file mode 100644 index 63af4d1d7..000000000 --- a/src/main/java/com/auth0/client/mgmt/emails/EmailsClient.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.emails; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class EmailsClient { - protected final ClientOptions clientOptions; - - protected final Supplier providerClient; - - public EmailsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.providerClient = Suppliers.memoize(() -> new ProviderClient(clientOptions)); - } - - public ProviderClient provider() { - return this.providerClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/emails/ProviderClient.java b/src/main/java/com/auth0/client/mgmt/emails/ProviderClient.java deleted file mode 100644 index b4003e0a2..000000000 --- a/src/main/java/com/auth0/client/mgmt/emails/ProviderClient.java +++ /dev/null @@ -1,303 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.emails; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -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.GetEmailProviderResponseContent; -import com.auth0.client.mgmt.types.UpdateEmailProviderResponseContent; - -public class ProviderClient { - protected final ClientOptions clientOptions; - - private final RawProviderClient rawClient; - - public ProviderClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawProviderClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawProviderClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of the <a href="https://auth0.com/docs/customize/email/smtp-email-providers">email provider configuration</a> in your tenant. A list of fields to include or exclude may also be specified. - */ - public GetEmailProviderResponseContent get() { - return this.rawClient.get().body(); - } - - /** - * Retrieve details of the <a href="https://auth0.com/docs/customize/email/smtp-email-providers">email provider configuration</a> in your tenant. A list of fields to include or exclude may also be specified. - */ - public GetEmailProviderResponseContent get(GetEmailProviderRequestParameters request) { - return this.rawClient.get(request).body(); - } - - /** - * Retrieve details of the <a href="https://auth0.com/docs/customize/email/smtp-email-providers">email provider configuration</a> in your tenant. A list of fields to include or exclude may also be specified. - */ - public GetEmailProviderResponseContent get( - GetEmailProviderRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(request, requestOptions).body(); - } - - /** - * Create an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * </li> - * <li> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public CreateEmailProviderResponseContent create(CreateEmailProviderRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * </li> - * <li> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public CreateEmailProviderResponseContent create( - CreateEmailProviderRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Delete the email provider. - */ - public void delete() { - this.rawClient.delete().body(); - } - - /** - * Delete the email provider. - */ - public void delete(RequestOptions requestOptions) { - this.rawClient.delete(requestOptions).body(); - } - - /** - * Update an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public UpdateEmailProviderResponseContent update() { - return this.rawClient.update().body(); - } - - /** - * Update an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public UpdateEmailProviderResponseContent update(UpdateEmailProviderRequestContent request) { - return this.rawClient.update(request).body(); - } - - /** - * Update an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public UpdateEmailProviderResponseContent update( - UpdateEmailProviderRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/emails/RawProviderClient.java b/src/main/java/com/auth0/client/mgmt/emails/RawProviderClient.java deleted file mode 100644 index 7c294829f..000000000 --- a/src/main/java/com/auth0/client/mgmt/emails/RawProviderClient.java +++ /dev/null @@ -1,534 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.emails; - -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.emails.types.CreateEmailProviderRequestContent; -import com.auth0.client.mgmt.emails.types.GetEmailProviderRequestParameters; -import com.auth0.client.mgmt.emails.types.UpdateEmailProviderRequestContent; -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.CreateEmailProviderResponseContent; -import com.auth0.client.mgmt.types.GetEmailProviderResponseContent; -import com.auth0.client.mgmt.types.UpdateEmailProviderResponseContent; -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 RawProviderClient { - protected final ClientOptions clientOptions; - - public RawProviderClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of the <a href="https://auth0.com/docs/customize/email/smtp-email-providers">email provider configuration</a> in your tenant. A list of fields to include or exclude may also be specified. - */ - public ManagementApiHttpResponse get() { - return get(GetEmailProviderRequestParameters.builder().build()); - } - - /** - * Retrieve details of the <a href="https://auth0.com/docs/customize/email/smtp-email-providers">email provider configuration</a> in your tenant. A list of fields to include or exclude may also be specified. - */ - public ManagementApiHttpResponse get(GetEmailProviderRequestParameters request) { - return get(request, null); - } - - /** - * Retrieve details of the <a href="https://auth0.com/docs/customize/email/smtp-email-providers">email provider configuration</a> in your tenant. A list of fields to include or exclude may also be specified. - */ - public ManagementApiHttpResponse get( - GetEmailProviderRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("emails/provider"); - 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); - } - 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); - } - 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, GetEmailProviderResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * </li> - * <li> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse create( - CreateEmailProviderRequestContent request) { - return create(request, null); - } - - /** - * Create an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * </li> - * <li> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse create( - CreateEmailProviderRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("emails/provider") - .build(); - 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) - .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); - } - 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, CreateEmailProviderResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete the email provider. - */ - public ManagementApiHttpResponse delete() { - return delete(null); - } - - /** - * Delete the email provider. - */ - public ManagementApiHttpResponse delete(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("emails/provider") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse update() { - return update(UpdateEmailProviderRequestContent.builder().build()); - } - - /** - * Update an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse update( - UpdateEmailProviderRequestContent request) { - return update(request, null); - } - - /** - * Update an <a href="https://auth0.com/docs/email/providers">email provider</a>. The <code>credentials</code> object - * requires different properties depending on the email provider (which is specified using the <code>name</code> property): - *

<ul> - * <li><code>mandrill</code> requires <code>api_key</code></li> - * <li><code>sendgrid</code> requires <code>api_key</code></li> - * <li> - * <code>sparkpost</code> requires <code>api_key</code>. Optionally, set <code>region</code> to <code>eu</code> to use - * the SparkPost service hosted in Western Europe; set to <code>null</code> to use the SparkPost service hosted in - * North America. <code>eu</code> or <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li> - * <code>mailgun</code> requires <code>api_key</code> and <code>domain</code>. Optionally, set <code>region</code> to - * <code>eu</code> to use the Mailgun service hosted in Europe; set to <code>null</code> otherwise. <code>eu</code> or - * <code>null</code> are the only valid values for <code>region</code>. - * </li> - * <li><code>ses</code> requires <code>accessKeyId</code>, <code>secretAccessKey</code>, and <code>region</code></li> - * <li> - * <code>smtp</code> requires <code>smtp_host</code>, <code>smtp_port</code>, <code>smtp_user</code>, and - * <code>smtp_pass</code> - * </li> - * </ul> - * Depending on the type of provider it is possible to specify <code>settings</code> object with different configuration - * options, which will be used when sending an email: - * <ul> - * <li> - * <code>smtp</code> provider, <code>settings</code> may contain <code>headers</code> object. - * <ul> - * <li> - * When using AWS SES SMTP host, you may provide a name of configuration set in - * <code>X-SES-Configuration-Set</code> header. Value must be a string. - * </li> - * <li> - * When using Sparkpost host, you may provide value for - * <code>X-MSYS_API</code> header. Value must be an object. - * </li> - * </ul> - * for <code>ses</code> provider, <code>settings</code> may contain <code>message</code> object, where you can provide - * a name of configuration set in <code>configuration_set_name</code> property. Value must be a string. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse update( - UpdateEmailProviderRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("emails/provider") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateEmailProviderResponseContent.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 (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 deleted file mode 100644 index 556c5738a..000000000 --- a/src/main/java/com/auth0/client/mgmt/emails/types/CreateEmailProviderRequestContent.java +++ /dev/null @@ -1,288 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.auth0.client.mgmt.types.EmailProviderCredentialsSchema; -import com.auth0.client.mgmt.types.EmailProviderNameEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateEmailProviderRequestContent.Builder.class) -public final class CreateEmailProviderRequestContent { - private final EmailProviderNameEnum name; - - private final Optional enabled; - - private final Optional defaultFromAddress; - - private final EmailProviderCredentialsSchema credentials; - - private final OptionalNullable> settings; - - private final Map additionalProperties; - - private CreateEmailProviderRequestContent( - EmailProviderNameEnum name, - Optional enabled, - Optional defaultFromAddress, - EmailProviderCredentialsSchema credentials, - OptionalNullable> settings, - Map additionalProperties) { - this.name = name; - this.enabled = enabled; - this.defaultFromAddress = defaultFromAddress; - this.credentials = credentials; - this.settings = settings; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public EmailProviderNameEnum getName() { - return name; - } - - /** - * @return Whether the provider is enabled (true) or disabled (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Email address to use as "from" when no other address specified. - */ - @JsonProperty("default_from_address") - public Optional getDefaultFromAddress() { - return defaultFromAddress; - } - - @JsonProperty("credentials") - public EmailProviderCredentialsSchema getCredentials() { - return credentials; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("settings") - public OptionalNullable> getSettings() { - if (settings == null) { - return OptionalNullable.absent(); - } - return settings; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("settings") - private OptionalNullable> _getSettings() { - return settings; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateEmailProviderRequestContent && equalTo((CreateEmailProviderRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateEmailProviderRequestContent other) { - return name.equals(other.name) - && enabled.equals(other.enabled) - && defaultFromAddress.equals(other.defaultFromAddress) - && credentials.equals(other.credentials) - && settings.equals(other.settings); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.enabled, this.defaultFromAddress, this.credentials, this.settings); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - CredentialsStage name(@NotNull EmailProviderNameEnum name); - - Builder from(CreateEmailProviderRequestContent other); - } - - public interface CredentialsStage { - _FinalStage credentials(@NotNull EmailProviderCredentialsSchema credentials); - } - - public interface _FinalStage { - CreateEmailProviderRequestContent build(); - - /** - *

Whether the provider is enabled (true) or disabled (false).

- */ - _FinalStage enabled(Optional enabled); - - _FinalStage enabled(Boolean enabled); - - /** - *

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

- */ - _FinalStage defaultFromAddress(Optional defaultFromAddress); - - _FinalStage defaultFromAddress(String defaultFromAddress); - - _FinalStage settings(@Nullable OptionalNullable> settings); - - _FinalStage settings(Map settings); - - _FinalStage settings(Optional> settings); - - _FinalStage settings(com.auth0.client.mgmt.core.Nullable> settings); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, CredentialsStage, _FinalStage { - private EmailProviderNameEnum name; - - private EmailProviderCredentialsSchema credentials; - - private OptionalNullable> settings = OptionalNullable.absent(); - - private Optional defaultFromAddress = Optional.empty(); - - private Optional enabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateEmailProviderRequestContent other) { - name(other.getName()); - enabled(other.getEnabled()); - defaultFromAddress(other.getDefaultFromAddress()); - credentials(other.getCredentials()); - settings(other.getSettings()); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public CredentialsStage 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()) { - this.settings = OptionalNullable.ofNull(); - } else if (settings.isEmpty()) { - this.settings = OptionalNullable.absent(); - } else { - this.settings = OptionalNullable.of(settings.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage settings(Optional> settings) { - if (settings.isPresent()) { - this.settings = OptionalNullable.of(settings.get()); - } else { - this.settings = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage settings(Map settings) { - this.settings = OptionalNullable.of(settings); - return this; - } - - @java.lang.Override - @JsonSetter(value = "settings", nulls = Nulls.SKIP) - public _FinalStage settings(@Nullable OptionalNullable> settings) { - this.settings = settings; - 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. - */ - @java.lang.Override - public _FinalStage defaultFromAddress(String defaultFromAddress) { - this.defaultFromAddress = Optional.ofNullable(defaultFromAddress); - return this; - } - - /** - *

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

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

Whether the provider is enabled (true) or disabled (false).

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

Whether the provider is enabled (true) or disabled (false).

- */ - @java.lang.Override - @JsonSetter(value = "enabled", nulls = Nulls.SKIP) - public _FinalStage enabled(Optional enabled) { - this.enabled = enabled; - return this; - } - - @java.lang.Override - public CreateEmailProviderRequestContent build() { - return new CreateEmailProviderRequestContent( - name, enabled, defaultFromAddress, credentials, settings, additionalProperties); - } - } -} 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 deleted file mode 100644 index df18ed7be..000000000 --- a/src/main/java/com/auth0/client/mgmt/emails/types/GetEmailProviderRequestParameters.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetEmailProviderRequestParameters.Builder.class) -public final class GetEmailProviderRequestParameters { - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final Map additionalProperties; - - private GetEmailProviderRequestParameters( - OptionalNullable fields, - OptionalNullable includeFields, - Map additionalProperties) { - this.fields = fields; - this.includeFields = includeFields; - this.additionalProperties = additionalProperties; - } - - /** - * @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. - */ - @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). - */ - @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("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 GetEmailProviderRequestParameters && equalTo((GetEmailProviderRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetEmailProviderRequestParameters other) { - return fields.equals(other.fields) && includeFields.equals(other.includeFields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetEmailProviderRequestParameters other) { - fields(other.getFields()); - includeFields(other.getIncludeFields()); - return this; - } - - /** - *

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.

- */ - @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).

- */ - @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 GetEmailProviderRequestParameters build() { - return new GetEmailProviderRequestParameters(fields, includeFields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/emails/types/UpdateEmailProviderRequestContent.java b/src/main/java/com/auth0/client/mgmt/emails/types/UpdateEmailProviderRequestContent.java deleted file mode 100644 index 54dd8275c..000000000 --- a/src/main/java/com/auth0/client/mgmt/emails/types/UpdateEmailProviderRequestContent.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.auth0.client.mgmt.types.EmailProviderCredentialsSchema; -import com.auth0.client.mgmt.types.EmailProviderNameEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateEmailProviderRequestContent.Builder.class) -public final class UpdateEmailProviderRequestContent { - private final Optional name; - - private final Optional enabled; - - private final Optional defaultFromAddress; - - private final Optional credentials; - - private final OptionalNullable> settings; - - private final Map additionalProperties; - - private UpdateEmailProviderRequestContent( - Optional name, - Optional enabled, - Optional defaultFromAddress, - Optional credentials, - OptionalNullable> settings, - Map additionalProperties) { - this.name = name; - this.enabled = enabled; - this.defaultFromAddress = defaultFromAddress; - this.credentials = credentials; - this.settings = settings; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Whether the provider is enabled (true) or disabled (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Email address to use as "from" when no other address specified. - */ - @JsonProperty("default_from_address") - public Optional getDefaultFromAddress() { - return defaultFromAddress; - } - - @JsonProperty("credentials") - public Optional getCredentials() { - return credentials; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("settings") - public OptionalNullable> getSettings() { - if (settings == null) { - return OptionalNullable.absent(); - } - return settings; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("settings") - private OptionalNullable> _getSettings() { - return settings; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateEmailProviderRequestContent && equalTo((UpdateEmailProviderRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateEmailProviderRequestContent other) { - return name.equals(other.name) - && enabled.equals(other.enabled) - && defaultFromAddress.equals(other.defaultFromAddress) - && credentials.equals(other.credentials) - && settings.equals(other.settings); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.enabled, this.defaultFromAddress, this.credentials, this.settings); - } - - @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 enabled = Optional.empty(); - - private Optional defaultFromAddress = Optional.empty(); - - private Optional credentials = Optional.empty(); - - private OptionalNullable> settings = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateEmailProviderRequestContent other) { - name(other.getName()); - enabled(other.getEnabled()); - defaultFromAddress(other.getDefaultFromAddress()); - credentials(other.getCredentials()); - settings(other.getSettings()); - return this; - } - - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public Builder name(Optional name) { - this.name = name; - return this; - } - - public Builder name(EmailProviderNameEnum name) { - this.name = Optional.ofNullable(name); - return this; - } - - /** - *

Whether the provider is enabled (true) or disabled (false).

- */ - @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; - } - - /** - *

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

- */ - @JsonSetter(value = "default_from_address", nulls = Nulls.SKIP) - public Builder defaultFromAddress(Optional defaultFromAddress) { - this.defaultFromAddress = defaultFromAddress; - return this; - } - - public Builder defaultFromAddress(String defaultFromAddress) { - this.defaultFromAddress = Optional.ofNullable(defaultFromAddress); - return this; - } - - @JsonSetter(value = "credentials", nulls = Nulls.SKIP) - public Builder credentials(Optional credentials) { - this.credentials = credentials; - return this; - } - - public Builder credentials(EmailProviderCredentialsSchema credentials) { - this.credentials = Optional.ofNullable(credentials); - return this; - } - - @JsonSetter(value = "settings", nulls = Nulls.SKIP) - public Builder settings(@Nullable OptionalNullable> settings) { - this.settings = settings; - return this; - } - - public Builder settings(Map settings) { - this.settings = OptionalNullable.of(settings); - return this; - } - - public Builder settings(Optional> settings) { - if (settings.isPresent()) { - this.settings = OptionalNullable.of(settings.get()); - } else { - this.settings = OptionalNullable.absent(); - } - return this; - } - - public Builder settings(com.auth0.client.mgmt.core.Nullable> settings) { - if (settings.isNull()) { - this.settings = OptionalNullable.ofNull(); - } else if (settings.isEmpty()) { - this.settings = OptionalNullable.absent(); - } else { - this.settings = OptionalNullable.of(settings.get()); - } - return this; - } - - public UpdateEmailProviderRequestContent build() { - return new UpdateEmailProviderRequestContent( - name, enabled, defaultFromAddress, credentials, settings, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/errors/BadRequestError.java b/src/main/java/com/auth0/client/mgmt/errors/BadRequestError.java deleted file mode 100644 index 5998d5628..000000000 --- a/src/main/java/com/auth0/client/mgmt/errors/BadRequestError.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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 BadRequestError extends ManagementApiException { - /** - * The body of the response that triggered the exception. - */ - private final Object body; - - public BadRequestError(Object body) { - super("BadRequestError", 400, body); - this.body = body; - } - - public BadRequestError(Object body, Response rawResponse) { - super("BadRequestError", 400, 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/ConflictError.java b/src/main/java/com/auth0/client/mgmt/errors/ConflictError.java deleted file mode 100644 index 53940ac20..000000000 --- a/src/main/java/com/auth0/client/mgmt/errors/ConflictError.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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 ConflictError extends ManagementApiException { - /** - * The body of the response that triggered the exception. - */ - private final Object body; - - public ConflictError(Object body) { - super("ConflictError", 409, body); - this.body = body; - } - - public ConflictError(Object body, Response rawResponse) { - super("ConflictError", 409, 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/ContentTooLargeError.java b/src/main/java/com/auth0/client/mgmt/errors/ContentTooLargeError.java deleted file mode 100644 index 0b56d4a30..000000000 --- a/src/main/java/com/auth0/client/mgmt/errors/ContentTooLargeError.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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 ContentTooLargeError extends ManagementApiException { - /** - * The body of the response that triggered the exception. - */ - private final Object body; - - public ContentTooLargeError(Object body) { - super("ContentTooLargeError", 413, body); - this.body = body; - } - - public ContentTooLargeError(Object body, Response rawResponse) { - super("ContentTooLargeError", 413, 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/ForbiddenError.java b/src/main/java/com/auth0/client/mgmt/errors/ForbiddenError.java deleted file mode 100644 index 6648b7af1..000000000 --- a/src/main/java/com/auth0/client/mgmt/errors/ForbiddenError.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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 ForbiddenError extends ManagementApiException { - /** - * The body of the response that triggered the exception. - */ - private final Object body; - - public ForbiddenError(Object body) { - super("ForbiddenError", 403, body); - this.body = body; - } - - public ForbiddenError(Object body, Response rawResponse) { - super("ForbiddenError", 403, 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/InternalServerError.java b/src/main/java/com/auth0/client/mgmt/errors/InternalServerError.java deleted file mode 100644 index bbe615ac0..000000000 --- a/src/main/java/com/auth0/client/mgmt/errors/InternalServerError.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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 InternalServerError extends ManagementApiException { - /** - * The body of the response that triggered the exception. - */ - private final Object body; - - public InternalServerError(Object body) { - super("InternalServerError", 500, body); - this.body = body; - } - - public InternalServerError(Object body, Response rawResponse) { - super("InternalServerError", 500, 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/NotFoundError.java b/src/main/java/com/auth0/client/mgmt/errors/NotFoundError.java deleted file mode 100644 index e3b072d83..000000000 --- a/src/main/java/com/auth0/client/mgmt/errors/NotFoundError.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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 NotFoundError extends ManagementApiException { - /** - * The body of the response that triggered the exception. - */ - private final Object body; - - public NotFoundError(Object body) { - super("NotFoundError", 404, body); - this.body = body; - } - - public NotFoundError(Object body, Response rawResponse) { - super("NotFoundError", 404, 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/PaymentRequiredError.java b/src/main/java/com/auth0/client/mgmt/errors/PaymentRequiredError.java deleted file mode 100644 index 7cef21310..000000000 --- a/src/main/java/com/auth0/client/mgmt/errors/PaymentRequiredError.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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 PaymentRequiredError extends ManagementApiException { - /** - * The body of the response that triggered the exception. - */ - private final Object body; - - public PaymentRequiredError(Object body) { - super("PaymentRequiredError", 402, body); - this.body = body; - } - - public PaymentRequiredError(Object body, Response rawResponse) { - super("PaymentRequiredError", 402, 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/PreconditionFailedError.java b/src/main/java/com/auth0/client/mgmt/errors/PreconditionFailedError.java deleted file mode 100644 index e3db25998..000000000 --- a/src/main/java/com/auth0/client/mgmt/errors/PreconditionFailedError.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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 PreconditionFailedError extends ManagementApiException { - /** - * The body of the response that triggered the exception. - */ - private final Object body; - - public PreconditionFailedError(Object body) { - super("PreconditionFailedError", 412, body); - this.body = body; - } - - public PreconditionFailedError(Object body, Response rawResponse) { - super("PreconditionFailedError", 412, 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/ServiceUnavailableError.java b/src/main/java/com/auth0/client/mgmt/errors/ServiceUnavailableError.java deleted file mode 100644 index 30f466141..000000000 --- a/src/main/java/com/auth0/client/mgmt/errors/ServiceUnavailableError.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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 ServiceUnavailableError extends ManagementApiException { - /** - * The body of the response that triggered the exception. - */ - private final Object body; - - public ServiceUnavailableError(Object body) { - super("ServiceUnavailableError", 503, body); - this.body = body; - } - - public ServiceUnavailableError(Object body, Response rawResponse) { - super("ServiceUnavailableError", 503, 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/TooManyRequestsError.java b/src/main/java/com/auth0/client/mgmt/errors/TooManyRequestsError.java deleted file mode 100644 index cae04a023..000000000 --- a/src/main/java/com/auth0/client/mgmt/errors/TooManyRequestsError.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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 TooManyRequestsError extends ManagementApiException { - /** - * The body of the response that triggered the exception. - */ - private final Object body; - - public TooManyRequestsError(Object body) { - super("TooManyRequestsError", 429, body); - this.body = body; - } - - public TooManyRequestsError(Object body, Response rawResponse) { - super("TooManyRequestsError", 429, 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/UnauthorizedError.java b/src/main/java/com/auth0/client/mgmt/errors/UnauthorizedError.java deleted file mode 100644 index a766ae2d4..000000000 --- a/src/main/java/com/auth0/client/mgmt/errors/UnauthorizedError.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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 UnauthorizedError extends ManagementApiException { - /** - * The body of the response that triggered the exception. - */ - private final Object body; - - public UnauthorizedError(Object body) { - super("UnauthorizedError", 401, body); - this.body = body; - } - - public UnauthorizedError(Object body, Response rawResponse) { - super("UnauthorizedError", 401, 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 deleted file mode 100644 index 342ff8d23..000000000 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncDeliveriesClient.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.eventstreams; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -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 { - protected final ClientOptions clientOptions; - - private final AsyncRawDeliveriesClient rawClient; - - public AsyncDeliveriesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawDeliveriesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawDeliveriesClient withRawResponse() { - return this.rawClient; - } - - public CompletableFuture> list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - public CompletableFuture> list( - String id, ListEventStreamDeliveriesRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture> list( - String id, ListEventStreamDeliveriesRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture getHistory(String id, String eventId) { - return this.rawClient.getHistory(id, eventId).thenApply(response -> response.body()); - } - - public CompletableFuture getHistory( - String id, String eventId, RequestOptions requestOptions) { - return this.rawClient.getHistory(id, eventId, 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 deleted file mode 100644 index 23a0e8c2b..000000000 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncRawDeliveriesClient.java +++ /dev/null @@ -1,231 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.eventstreams; - -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.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.eventstreams.types.ListEventStreamDeliveriesRequestParameters; -import com.auth0.client.mgmt.types.EventStreamDelivery; -import com.auth0.client.mgmt.types.GetEventStreamDeliveryHistoryResponseContent; -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; -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 AsyncRawDeliveriesClient { - protected final ClientOptions clientOptions; - - public AsyncRawDeliveriesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public CompletableFuture>> list(String id) { - return list(id, ListEventStreamDeliveriesRequestParameters.builder().build()); - } - - public CompletableFuture>> list( - String id, ListEventStreamDeliveriesRequestParameters request) { - return list(id, request, null); - } - - public CompletableFuture>> list( - String id, ListEventStreamDeliveriesRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .addPathSegment(id) - .addPathSegments("deliveries"); - if (!request.getStatuses().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "statuses", request.getStatuses().orElse(null), false); - } - if (!request.getEventTypes().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "event_types", request.getEventTypes().orElse(null), false); - } - if (!request.getDateFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "date_from", request.getDateFrom().orElse(null), false); - } - if (!request.getDateTo().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "date_to", request.getDateTo().orElse(null), false); - } - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - public CompletableFuture> getHistory( - String id, String eventId) { - return getHistory(id, eventId, null); - } - - public CompletableFuture> getHistory( - String id, String eventId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .addPathSegment(id) - .addPathSegments("deliveries") - .addPathSegment(eventId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetEventStreamDeliveryHistoryResponseContent.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 (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/eventstreams/AsyncRawRedeliveriesClient.java b/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncRawRedeliveriesClient.java deleted file mode 100644 index 870028b5b..000000000 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncRawRedeliveriesClient.java +++ /dev/null @@ -1,218 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.eventstreams; - -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.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.eventstreams.types.CreateEventStreamRedeliveryRequestContent; -import com.auth0.client.mgmt.types.CreateEventStreamRedeliveryResponseContent; -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 AsyncRawRedeliveriesClient { - protected final ClientOptions clientOptions; - - public AsyncRawRedeliveriesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public CompletableFuture> create(String id) { - return create(id, CreateEventStreamRedeliveryRequestContent.builder().build()); - } - - public CompletableFuture> create( - String id, CreateEventStreamRedeliveryRequestContent request) { - return create(id, request, null); - } - - public CompletableFuture> create( - String id, CreateEventStreamRedeliveryRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .addPathSegment(id) - .addPathSegments("redeliver") - .build(); - 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) - .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); - } - 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, CreateEventStreamRedeliveryResponseContent.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 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 (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> createById(String id, String eventId) { - return createById(id, eventId, null); - } - - public CompletableFuture> createById( - String id, String eventId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .addPathSegment(id) - .addPathSegments("redeliver") - .addPathSegment(eventId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 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 (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/eventstreams/AsyncRedeliveriesClient.java b/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncRedeliveriesClient.java deleted file mode 100644 index b9ae128e5..000000000 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/AsyncRedeliveriesClient.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.eventstreams; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.eventstreams.types.CreateEventStreamRedeliveryRequestContent; -import com.auth0.client.mgmt.types.CreateEventStreamRedeliveryResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncRedeliveriesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawRedeliveriesClient rawClient; - - public AsyncRedeliveriesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawRedeliveriesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawRedeliveriesClient withRawResponse() { - return this.rawClient; - } - - public CompletableFuture create(String id) { - return this.rawClient.create(id).thenApply(response -> response.body()); - } - - public CompletableFuture create( - String id, CreateEventStreamRedeliveryRequestContent request) { - return this.rawClient.create(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture create( - String id, CreateEventStreamRedeliveryRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture createById(String id, String eventId) { - return this.rawClient.createById(id, eventId).thenApply(response -> response.body()); - } - - public CompletableFuture createById(String id, String eventId, RequestOptions requestOptions) { - return this.rawClient.createById(id, eventId, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/eventstreams/DeliveriesClient.java b/src/main/java/com/auth0/client/mgmt/eventstreams/DeliveriesClient.java deleted file mode 100644 index e4447c2d6..000000000 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/DeliveriesClient.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.eventstreams; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -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; - - private final RawDeliveriesClient rawClient; - - public DeliveriesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawDeliveriesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawDeliveriesClient withRawResponse() { - return this.rawClient; - } - - public List list(String id) { - return this.rawClient.list(id).body(); - } - - public List list(String id, ListEventStreamDeliveriesRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - public List list( - String id, ListEventStreamDeliveriesRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } - - public GetEventStreamDeliveryHistoryResponseContent getHistory(String id, String eventId) { - return this.rawClient.getHistory(id, eventId).body(); - } - - public GetEventStreamDeliveryHistoryResponseContent getHistory( - String id, String eventId, RequestOptions requestOptions) { - return this.rawClient.getHistory(id, eventId, 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 deleted file mode 100644 index 4137ff1fc..000000000 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/RawDeliveriesClient.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.eventstreams; - -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.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.eventstreams.types.ListEventStreamDeliveriesRequestParameters; -import com.auth0.client.mgmt.types.EventStreamDelivery; -import com.auth0.client.mgmt.types.GetEventStreamDeliveryHistoryResponseContent; -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.Response; -import okhttp3.ResponseBody; - -public class RawDeliveriesClient { - protected final ClientOptions clientOptions; - - public RawDeliveriesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public ManagementApiHttpResponse> list(String id) { - return list(id, ListEventStreamDeliveriesRequestParameters.builder().build()); - } - - public ManagementApiHttpResponse> list( - String id, ListEventStreamDeliveriesRequestParameters request) { - return list(id, request, null); - } - - public ManagementApiHttpResponse> list( - String id, ListEventStreamDeliveriesRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .addPathSegment(id) - .addPathSegments("deliveries"); - if (!request.getStatuses().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "statuses", request.getStatuses().orElse(null), false); - } - if (!request.getEventTypes().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "event_types", request.getEventTypes().orElse(null), false); - } - if (!request.getDateFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "date_from", request.getDateFrom().orElse(null), false); - } - if (!request.getDateTo().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "date_to", request.getDateTo().orElse(null), false); - } - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse getHistory( - String id, String eventId) { - return getHistory(id, eventId, null); - } - - public ManagementApiHttpResponse getHistory( - String id, String eventId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .addPathSegment(id) - .addPathSegments("deliveries") - .addPathSegment(eventId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetEventStreamDeliveryHistoryResponseContent.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 (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 deleted file mode 100644 index 251d36d88..000000000 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/RawRedeliveriesClient.java +++ /dev/null @@ -1,166 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.eventstreams; - -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.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.eventstreams.types.CreateEventStreamRedeliveryRequestContent; -import com.auth0.client.mgmt.types.CreateEventStreamRedeliveryResponseContent; -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 RawRedeliveriesClient { - protected final ClientOptions clientOptions; - - public RawRedeliveriesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public ManagementApiHttpResponse create(String id) { - return create(id, CreateEventStreamRedeliveryRequestContent.builder().build()); - } - - public ManagementApiHttpResponse create( - String id, CreateEventStreamRedeliveryRequestContent request) { - return create(id, request, null); - } - - public ManagementApiHttpResponse create( - String id, CreateEventStreamRedeliveryRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .addPathSegment(id) - .addPathSegments("redeliver") - .build(); - 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) - .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); - } - 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, CreateEventStreamRedeliveryResponseContent.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 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse createById(String id, String eventId) { - return createById(id, eventId, null); - } - - public ManagementApiHttpResponse createById(String id, String eventId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("event-streams") - .addPathSegment(id) - .addPathSegments("redeliver") - .addPathSegment(eventId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/eventstreams/RedeliveriesClient.java b/src/main/java/com/auth0/client/mgmt/eventstreams/RedeliveriesClient.java deleted file mode 100644 index 3ab86d00e..000000000 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/RedeliveriesClient.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.eventstreams; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.eventstreams.types.CreateEventStreamRedeliveryRequestContent; -import com.auth0.client.mgmt.types.CreateEventStreamRedeliveryResponseContent; - -public class RedeliveriesClient { - protected final ClientOptions clientOptions; - - private final RawRedeliveriesClient rawClient; - - public RedeliveriesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawRedeliveriesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawRedeliveriesClient withRawResponse() { - return this.rawClient; - } - - public CreateEventStreamRedeliveryResponseContent create(String id) { - return this.rawClient.create(id).body(); - } - - public CreateEventStreamRedeliveryResponseContent create( - String id, CreateEventStreamRedeliveryRequestContent request) { - return this.rawClient.create(id, request).body(); - } - - public CreateEventStreamRedeliveryResponseContent create( - String id, CreateEventStreamRedeliveryRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).body(); - } - - public void createById(String id, String eventId) { - this.rawClient.createById(id, eventId).body(); - } - - public void createById(String id, String eventId, RequestOptions requestOptions) { - this.rawClient.createById(id, eventId, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/eventstreams/types/CreateEventStreamRedeliveryRequestContent.java b/src/main/java/com/auth0/client/mgmt/eventstreams/types/CreateEventStreamRedeliveryRequestContent.java deleted file mode 100644 index 04e899610..000000000 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/types/CreateEventStreamRedeliveryRequestContent.java +++ /dev/null @@ -1,199 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.eventstreams.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.EventStreamDeliveryStatusEnum; -import com.auth0.client.mgmt.types.EventStreamEventTypeEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = CreateEventStreamRedeliveryRequestContent.Builder.class) -public final class CreateEventStreamRedeliveryRequestContent { - private final Optional dateFrom; - - private final Optional dateTo; - - private final Optional> statuses; - - private final Optional> eventTypes; - - private final Map additionalProperties; - - private CreateEventStreamRedeliveryRequestContent( - Optional dateFrom, - Optional dateTo, - Optional> statuses, - Optional> eventTypes, - Map additionalProperties) { - this.dateFrom = dateFrom; - this.dateTo = dateTo; - this.statuses = statuses; - this.eventTypes = eventTypes; - this.additionalProperties = additionalProperties; - } - - /** - * @return An RFC-3339 date-time for redelivery start, inclusive. Does not allow sub-second precision. - */ - @JsonProperty("date_from") - public Optional getDateFrom() { - return dateFrom; - } - - /** - * @return An RFC-3339 date-time for redelivery end, exclusive. Does not allow sub-second precision. - */ - @JsonProperty("date_to") - public Optional getDateTo() { - return dateTo; - } - - /** - * @return Filter by status - */ - @JsonProperty("statuses") - public Optional> getStatuses() { - return statuses; - } - - /** - * @return Filter by event type - */ - @JsonProperty("event_types") - public Optional> getEventTypes() { - return eventTypes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateEventStreamRedeliveryRequestContent - && equalTo((CreateEventStreamRedeliveryRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateEventStreamRedeliveryRequestContent other) { - return dateFrom.equals(other.dateFrom) - && dateTo.equals(other.dateTo) - && statuses.equals(other.statuses) - && eventTypes.equals(other.eventTypes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.dateFrom, this.dateTo, this.statuses, this.eventTypes); - } - - @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 dateFrom = Optional.empty(); - - private Optional dateTo = Optional.empty(); - - private Optional> statuses = Optional.empty(); - - private Optional> eventTypes = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateEventStreamRedeliveryRequestContent other) { - dateFrom(other.getDateFrom()); - dateTo(other.getDateTo()); - statuses(other.getStatuses()); - eventTypes(other.getEventTypes()); - return this; - } - - /** - *

An RFC-3339 date-time for redelivery start, inclusive. Does not allow sub-second precision.

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

An RFC-3339 date-time for redelivery end, exclusive. Does not allow sub-second precision.

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

Filter by status

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

Filter by event type

- */ - @JsonSetter(value = "event_types", nulls = Nulls.SKIP) - public Builder eventTypes(Optional> eventTypes) { - this.eventTypes = eventTypes; - return this; - } - - public Builder eventTypes(List eventTypes) { - this.eventTypes = Optional.ofNullable(eventTypes); - return this; - } - - public CreateEventStreamRedeliveryRequestContent build() { - return new CreateEventStreamRedeliveryRequestContent( - dateFrom, dateTo, statuses, eventTypes, additionalProperties); - } - } -} 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 deleted file mode 100644 index 02389dd4a..000000000 --- a/src/main/java/com/auth0/client/mgmt/eventstreams/types/ListEventStreamDeliveriesRequestParameters.java +++ /dev/null @@ -1,429 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListEventStreamDeliveriesRequestParameters.Builder.class) -public final class ListEventStreamDeliveriesRequestParameters { - private final OptionalNullable statuses; - - private final OptionalNullable eventTypes; - - private final OptionalNullable dateFrom; - - private final OptionalNullable dateTo; - - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private ListEventStreamDeliveriesRequestParameters( - OptionalNullable statuses, - OptionalNullable eventTypes, - OptionalNullable dateFrom, - OptionalNullable dateTo, - OptionalNullable from, - OptionalNullable take, - Map additionalProperties) { - this.statuses = statuses; - this.eventTypes = eventTypes; - this.dateFrom = dateFrom; - this.dateTo = dateTo; - this.from = from; - this.take = take; - this.additionalProperties = additionalProperties; - } - - /** - * @return Comma-separated list of statuses by which to filter - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("statuses") - public OptionalNullable getStatuses() { - if (statuses == null) { - return OptionalNullable.absent(); - } - return statuses; - } - - /** - * @return Comma-separated list of event types by which to filter - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("event_types") - public OptionalNullable getEventTypes() { - if (eventTypes == null) { - return OptionalNullable.absent(); - } - return eventTypes; - } - - /** - * @return An RFC-3339 date-time for redelivery start, inclusive. Does not allow sub-second precision. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("date_from") - public OptionalNullable getDateFrom() { - if (dateFrom == null) { - return OptionalNullable.absent(); - } - return dateFrom; - } - - /** - * @return An RFC-3339 date-time for redelivery end, exclusive. Does not allow sub-second precision. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("date_to") - public OptionalNullable getDateTo() { - if (dateTo == null) { - return OptionalNullable.absent(); - } - return dateTo; - } - - /** - * @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() { - 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; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListEventStreamDeliveriesRequestParameters - && equalTo((ListEventStreamDeliveriesRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListEventStreamDeliveriesRequestParameters other) { - return statuses.equals(other.statuses) - && eventTypes.equals(other.eventTypes) - && dateFrom.equals(other.dateFrom) - && dateTo.equals(other.dateTo) - && from.equals(other.from) - && take.equals(other.take); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.statuses, this.eventTypes, this.dateFrom, this.dateTo, 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 statuses = OptionalNullable.absent(); - - private OptionalNullable eventTypes = OptionalNullable.absent(); - - private OptionalNullable dateFrom = OptionalNullable.absent(); - - private OptionalNullable dateTo = OptionalNullable.absent(); - - private OptionalNullable from = OptionalNullable.absent(); - - private OptionalNullable take = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListEventStreamDeliveriesRequestParameters other) { - statuses(other.getStatuses()); - eventTypes(other.getEventTypes()); - dateFrom(other.getDateFrom()); - dateTo(other.getDateTo()); - from(other.getFrom()); - take(other.getTake()); - return this; - } - - /** - *

Comma-separated list of statuses by which to filter

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

Comma-separated list of event types by which to filter

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

An RFC-3339 date-time for redelivery start, inclusive. Does not allow sub-second precision.

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

An RFC-3339 date-time for redelivery end, exclusive. Does not allow sub-second precision.

- */ - @JsonSetter(value = "date_to", nulls = Nulls.SKIP) - public Builder dateTo(@Nullable OptionalNullable dateTo) { - this.dateTo = dateTo; - return this; - } - - public Builder dateTo(String dateTo) { - this.dateTo = OptionalNullable.of(dateTo); - return this; - } - - public Builder dateTo(Optional dateTo) { - if (dateTo.isPresent()) { - this.dateTo = OptionalNullable.of(dateTo.get()); - } else { - this.dateTo = OptionalNullable.absent(); - } - return this; - } - - public Builder dateTo(com.auth0.client.mgmt.core.Nullable dateTo) { - if (dateTo.isNull()) { - this.dateTo = OptionalNullable.ofNull(); - } else if (dateTo.isEmpty()) { - this.dateTo = OptionalNullable.absent(); - } else { - this.dateTo = OptionalNullable.of(dateTo.get()); - } - 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(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 ListEventStreamDeliveriesRequestParameters build() { - return new ListEventStreamDeliveriesRequestParameters( - statuses, eventTypes, dateFrom, dateTo, from, take, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/flows/AsyncExecutionsClient.java b/src/main/java/com/auth0/client/mgmt/flows/AsyncExecutionsClient.java deleted file mode 100644 index 7c49c8e85..000000000 --- a/src/main/java/com/auth0/client/mgmt/flows/AsyncExecutionsClient.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.flows; - -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.flows.types.GetFlowExecutionRequestParameters; -import com.auth0.client.mgmt.flows.types.ListFlowExecutionsRequestParameters; -import com.auth0.client.mgmt.types.FlowExecutionSummary; -import com.auth0.client.mgmt.types.GetFlowExecutionResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncExecutionsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawExecutionsClient rawClient; - - public AsyncExecutionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawExecutionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawExecutionsClient withRawResponse() { - return this.rawClient; - } - - public CompletableFuture> list(String flowId) { - return this.rawClient.list(flowId).thenApply(response -> response.body()); - } - - public CompletableFuture> list( - String flowId, ListFlowExecutionsRequestParameters request) { - return this.rawClient.list(flowId, request).thenApply(response -> response.body()); - } - - public CompletableFuture> list( - String flowId, ListFlowExecutionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(flowId, request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture get(String flowId, String executionId) { - return this.rawClient.get(flowId, executionId).thenApply(response -> response.body()); - } - - public CompletableFuture get( - String flowId, String executionId, GetFlowExecutionRequestParameters request) { - return this.rawClient.get(flowId, executionId, request).thenApply(response -> response.body()); - } - - public CompletableFuture get( - String flowId, - String executionId, - GetFlowExecutionRequestParameters request, - RequestOptions requestOptions) { - return this.rawClient.get(flowId, executionId, request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture delete(String flowId, String executionId) { - return this.rawClient.delete(flowId, executionId).thenApply(response -> response.body()); - } - - public CompletableFuture delete(String flowId, String executionId, RequestOptions requestOptions) { - return this.rawClient.delete(flowId, executionId, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/flows/AsyncRawExecutionsClient.java b/src/main/java/com/auth0/client/mgmt/flows/AsyncRawExecutionsClient.java deleted file mode 100644 index c70835217..000000000 --- a/src/main/java/com/auth0/client/mgmt/flows/AsyncRawExecutionsClient.java +++ /dev/null @@ -1,320 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.flows; - -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.SyncPagingIterable; -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.flows.types.GetFlowExecutionRequestParameters; -import com.auth0.client.mgmt.flows.types.ListFlowExecutionsRequestParameters; -import com.auth0.client.mgmt.types.FlowExecutionSummary; -import com.auth0.client.mgmt.types.GetFlowExecutionResponseContent; -import com.auth0.client.mgmt.types.ListFlowExecutionsPaginatedResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawExecutionsClient { - protected final ClientOptions clientOptions; - - public AsyncRawExecutionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public CompletableFuture>> list(String flowId) { - return list(flowId, ListFlowExecutionsRequestParameters.builder().build()); - } - - public CompletableFuture>> list( - String flowId, ListFlowExecutionsRequestParameters request) { - return list(flowId, request, null); - } - - public CompletableFuture>> list( - String flowId, ListFlowExecutionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows") - .addPathSegment(flowId) - .addPathSegments("executions"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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()) { - ListFlowExecutionsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListFlowExecutionsPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListFlowExecutionsRequestParameters nextRequest = ListFlowExecutionsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getExecutions().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> { - try { - return list(flowId, 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 (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 flowId, String executionId) { - return get( - flowId, executionId, GetFlowExecutionRequestParameters.builder().build()); - } - - public CompletableFuture> get( - String flowId, String executionId, GetFlowExecutionRequestParameters request) { - return get(flowId, executionId, request, null); - } - - public CompletableFuture> get( - String flowId, - String executionId, - GetFlowExecutionRequestParameters request, - RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows") - .addPathSegment(flowId) - .addPathSegments("executions") - .addPathSegment(executionId); - if (request.getHydrate().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "hydrate", request.getHydrate().get(), true); - } - 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); - } - 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, GetFlowExecutionResponseContent.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 (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 flowId, String executionId) { - return delete(flowId, executionId, null); - } - - public CompletableFuture> delete( - String flowId, String executionId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows") - .addPathSegment(flowId) - .addPathSegments("executions") - .addPathSegment(executionId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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/flows/ExecutionsClient.java b/src/main/java/com/auth0/client/mgmt/flows/ExecutionsClient.java deleted file mode 100644 index ddcb37e92..000000000 --- a/src/main/java/com/auth0/client/mgmt/flows/ExecutionsClient.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.flows; - -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.flows.types.GetFlowExecutionRequestParameters; -import com.auth0.client.mgmt.flows.types.ListFlowExecutionsRequestParameters; -import com.auth0.client.mgmt.types.FlowExecutionSummary; -import com.auth0.client.mgmt.types.GetFlowExecutionResponseContent; - -public class ExecutionsClient { - protected final ClientOptions clientOptions; - - private final RawExecutionsClient rawClient; - - public ExecutionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawExecutionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawExecutionsClient withRawResponse() { - return this.rawClient; - } - - public SyncPagingIterable list(String flowId) { - return this.rawClient.list(flowId).body(); - } - - public SyncPagingIterable list(String flowId, ListFlowExecutionsRequestParameters request) { - return this.rawClient.list(flowId, request).body(); - } - - public SyncPagingIterable list( - String flowId, ListFlowExecutionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(flowId, request, requestOptions).body(); - } - - public GetFlowExecutionResponseContent get(String flowId, String executionId) { - return this.rawClient.get(flowId, executionId).body(); - } - - public GetFlowExecutionResponseContent get( - String flowId, String executionId, GetFlowExecutionRequestParameters request) { - return this.rawClient.get(flowId, executionId, request).body(); - } - - public GetFlowExecutionResponseContent get( - String flowId, - String executionId, - GetFlowExecutionRequestParameters request, - RequestOptions requestOptions) { - return this.rawClient.get(flowId, executionId, request, requestOptions).body(); - } - - public void delete(String flowId, String executionId) { - this.rawClient.delete(flowId, executionId).body(); - } - - public void delete(String flowId, String executionId, RequestOptions requestOptions) { - this.rawClient.delete(flowId, executionId, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/flows/RawExecutionsClient.java b/src/main/java/com/auth0/client/mgmt/flows/RawExecutionsClient.java deleted file mode 100644 index 6bc25eb8a..000000000 --- a/src/main/java/com/auth0/client/mgmt/flows/RawExecutionsClient.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.flows; - -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.SyncPagingIterable; -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.flows.types.GetFlowExecutionRequestParameters; -import com.auth0.client.mgmt.flows.types.ListFlowExecutionsRequestParameters; -import com.auth0.client.mgmt.types.FlowExecutionSummary; -import com.auth0.client.mgmt.types.GetFlowExecutionResponseContent; -import com.auth0.client.mgmt.types.ListFlowExecutionsPaginatedResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawExecutionsClient { - protected final ClientOptions clientOptions; - - public RawExecutionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public ManagementApiHttpResponse> list(String flowId) { - return list(flowId, ListFlowExecutionsRequestParameters.builder().build()); - } - - public ManagementApiHttpResponse> list( - String flowId, ListFlowExecutionsRequestParameters request) { - return list(flowId, request, null); - } - - public ManagementApiHttpResponse> list( - String flowId, ListFlowExecutionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows") - .addPathSegment(flowId) - .addPathSegments("executions"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListFlowExecutionsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListFlowExecutionsPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListFlowExecutionsRequestParameters nextRequest = ListFlowExecutionsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getExecutions().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> list( - flowId, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse get(String flowId, String executionId) { - return get( - flowId, executionId, GetFlowExecutionRequestParameters.builder().build()); - } - - public ManagementApiHttpResponse get( - String flowId, String executionId, GetFlowExecutionRequestParameters request) { - return get(flowId, executionId, request, null); - } - - public ManagementApiHttpResponse get( - String flowId, - String executionId, - GetFlowExecutionRequestParameters request, - RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows") - .addPathSegment(flowId) - .addPathSegments("executions") - .addPathSegment(executionId); - if (request.getHydrate().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "hydrate", request.getHydrate().get(), true); - } - 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); - } - 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, GetFlowExecutionResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse delete(String flowId, String executionId) { - return delete(flowId, executionId, null); - } - - public ManagementApiHttpResponse delete(String flowId, String executionId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows") - .addPathSegment(flowId) - .addPathSegments("executions") - .addPathSegment(executionId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 deleted file mode 100644 index 38e2a94f2..000000000 --- a/src/main/java/com/auth0/client/mgmt/flows/types/GetFlowExecutionRequestParameters.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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; -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; -import java.util.Collections; -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 = GetFlowExecutionRequestParameters.Builder.class) -public final class GetFlowExecutionRequestParameters { - private final Optional> hydrate; - - private final Map additionalProperties; - - private GetFlowExecutionRequestParameters( - Optional> hydrate, - Map additionalProperties) { - this.hydrate = hydrate; - this.additionalProperties = additionalProperties; - } - - /** - * @return Hydration param - */ - @JsonIgnore - public Optional> getHydrate() { - if (hydrate == null) { - return Optional.empty(); - } - 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; - return other instanceof GetFlowExecutionRequestParameters && equalTo((GetFlowExecutionRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetFlowExecutionRequestParameters other) { - return hydrate.equals(other.hydrate); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.hydrate); - } - - @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> hydrate = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetFlowExecutionRequestParameters other) { - hydrate(other.getHydrate()); - return this; - } - - /** - *

Hydration param

- */ - @JsonSetter(value = "hydrate", nulls = Nulls.SKIP) - public Builder hydrate(@Nullable Optional> hydrate) { - this.hydrate = hydrate; - return this; - } - - public Builder hydrate(List hydrate) { - this.hydrate = Optional.ofNullable(hydrate); - return this; - } - - public Builder hydrate( - com.auth0.client.mgmt.core.Nullable> hydrate) { - if (hydrate.isNull()) { - this.hydrate = null; - } else if (hydrate.isEmpty()) { - this.hydrate = Optional.empty(); - } else { - this.hydrate = Optional.of(hydrate.get()); - } - return this; - } - - public Builder hydrate(GetFlowExecutionRequestParametersHydrateEnum hydrate) { - this.hydrate = Optional.of(Collections.singletonList(hydrate)); - return this; - } - - public GetFlowExecutionRequestParameters build() { - return new GetFlowExecutionRequestParameters(hydrate, additionalProperties); - } - } -} 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 deleted file mode 100644 index 48f9441be..000000000 --- a/src/main/java/com/auth0/client/mgmt/flows/types/ListFlowExecutionsRequestParameters.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListFlowExecutionsRequestParameters.Builder.class) -public final class ListFlowExecutionsRequestParameters { - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private ListFlowExecutionsRequestParameters( - 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() { - 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; - return other instanceof ListFlowExecutionsRequestParameters - && equalTo((ListFlowExecutionsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListFlowExecutionsRequestParameters 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(ListFlowExecutionsRequestParameters 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(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 ListFlowExecutionsRequestParameters build() { - return new ListFlowExecutionsRequestParameters(from, take, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/flows/vault/AsyncConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/flows/vault/AsyncConnectionsClient.java deleted file mode 100644 index 4ae8157cd..000000000 --- a/src/main/java/com/auth0/client/mgmt/flows/vault/AsyncConnectionsClient.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.flows.vault; - -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.flows.vault.types.ListFlowsVaultConnectionsRequestParameters; -import com.auth0.client.mgmt.flows.vault.types.UpdateFlowsVaultConnectionRequestContent; -import com.auth0.client.mgmt.types.CreateFlowsVaultConnectionRequestContent; -import com.auth0.client.mgmt.types.CreateFlowsVaultConnectionResponseContent; -import com.auth0.client.mgmt.types.FlowsVaultConnectionSummary; -import com.auth0.client.mgmt.types.GetFlowsVaultConnectionResponseContent; -import com.auth0.client.mgmt.types.UpdateFlowsVaultConnectionResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncConnectionsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawConnectionsClient rawClient; - - public AsyncConnectionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawConnectionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawConnectionsClient withRawResponse() { - return this.rawClient; - } - - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - public CompletableFuture> list( - ListFlowsVaultConnectionsRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - public CompletableFuture> list( - ListFlowsVaultConnectionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture create( - CreateFlowsVaultConnectionRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - public CompletableFuture create( - CreateFlowsVaultConnectionRequestContent 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, UpdateFlowsVaultConnectionRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture update( - String id, UpdateFlowsVaultConnectionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } -} 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 deleted file mode 100644 index 69afed7dc..000000000 --- a/src/main/java/com/auth0/client/mgmt/flows/vault/AsyncRawConnectionsClient.java +++ /dev/null @@ -1,497 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.flows.vault; - -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.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.vault.types.ListFlowsVaultConnectionsRequestParameters; -import com.auth0.client.mgmt.flows.vault.types.UpdateFlowsVaultConnectionRequestContent; -import com.auth0.client.mgmt.types.CreateFlowsVaultConnectionRequestContent; -import com.auth0.client.mgmt.types.CreateFlowsVaultConnectionResponseContent; -import com.auth0.client.mgmt.types.FlowsVaultConnectionSummary; -import com.auth0.client.mgmt.types.GetFlowsVaultConnectionResponseContent; -import com.auth0.client.mgmt.types.ListFlowsVaultConnectionsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.UpdateFlowsVaultConnectionResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawConnectionsClient { - protected final ClientOptions clientOptions; - - public AsyncRawConnectionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public CompletableFuture>> list() { - return list(ListFlowsVaultConnectionsRequestParameters.builder().build()); - } - - public CompletableFuture>> list( - ListFlowsVaultConnectionsRequestParameters request) { - return list(request, null); - } - - public CompletableFuture>> list( - ListFlowsVaultConnectionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows/vault/connections"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - 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()) { - ListFlowsVaultConnectionsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, - ListFlowsVaultConnectionsOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListFlowsVaultConnectionsRequestParameters nextRequest = - ListFlowsVaultConnectionsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getConnections().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (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( - CreateFlowsVaultConnectionRequestContent request) { - return create(request, null); - } - - public CompletableFuture> create( - CreateFlowsVaultConnectionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows/vault/connections") - .build(); - 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) - .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); - } - 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, CreateFlowsVaultConnectionResponseContent.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 (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 httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows/vault/connections") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetFlowsVaultConnectionResponseContent.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 (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 httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows/vault/connections") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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, UpdateFlowsVaultConnectionRequestContent.builder().build()); - } - - public CompletableFuture> update( - String id, UpdateFlowsVaultConnectionRequestContent request) { - return update(id, request, null); - } - - public CompletableFuture> update( - String id, UpdateFlowsVaultConnectionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows/vault/connections") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateFlowsVaultConnectionResponseContent.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 (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/flows/vault/AsyncVaultClient.java b/src/main/java/com/auth0/client/mgmt/flows/vault/AsyncVaultClient.java deleted file mode 100644 index a7d7074a7..000000000 --- a/src/main/java/com/auth0/client/mgmt/flows/vault/AsyncVaultClient.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.flows.vault; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class AsyncVaultClient { - protected final ClientOptions clientOptions; - - protected final Supplier connectionsClient; - - public AsyncVaultClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.connectionsClient = Suppliers.memoize(() -> new AsyncConnectionsClient(clientOptions)); - } - - public AsyncConnectionsClient connections() { - return this.connectionsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/flows/vault/ConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/flows/vault/ConnectionsClient.java deleted file mode 100644 index dc3020290..000000000 --- a/src/main/java/com/auth0/client/mgmt/flows/vault/ConnectionsClient.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.flows.vault; - -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.flows.vault.types.ListFlowsVaultConnectionsRequestParameters; -import com.auth0.client.mgmt.flows.vault.types.UpdateFlowsVaultConnectionRequestContent; -import com.auth0.client.mgmt.types.CreateFlowsVaultConnectionRequestContent; -import com.auth0.client.mgmt.types.CreateFlowsVaultConnectionResponseContent; -import com.auth0.client.mgmt.types.FlowsVaultConnectionSummary; -import com.auth0.client.mgmt.types.GetFlowsVaultConnectionResponseContent; -import com.auth0.client.mgmt.types.UpdateFlowsVaultConnectionResponseContent; - -public class ConnectionsClient { - protected final ClientOptions clientOptions; - - private final RawConnectionsClient rawClient; - - public ConnectionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawConnectionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawConnectionsClient withRawResponse() { - return this.rawClient; - } - - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - public SyncPagingIterable list(ListFlowsVaultConnectionsRequestParameters request) { - return this.rawClient.list(request).body(); - } - - public SyncPagingIterable list( - ListFlowsVaultConnectionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - public CreateFlowsVaultConnectionResponseContent create(CreateFlowsVaultConnectionRequestContent request) { - return this.rawClient.create(request).body(); - } - - public CreateFlowsVaultConnectionResponseContent create( - CreateFlowsVaultConnectionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - public GetFlowsVaultConnectionResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - public GetFlowsVaultConnectionResponseContent 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 UpdateFlowsVaultConnectionResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - public UpdateFlowsVaultConnectionResponseContent update( - String id, UpdateFlowsVaultConnectionRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - public UpdateFlowsVaultConnectionResponseContent update( - String id, UpdateFlowsVaultConnectionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } -} 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 deleted file mode 100644 index 60280b9e8..000000000 --- a/src/main/java/com/auth0/client/mgmt/flows/vault/RawConnectionsClient.java +++ /dev/null @@ -1,370 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.flows.vault; - -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.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.vault.types.ListFlowsVaultConnectionsRequestParameters; -import com.auth0.client.mgmt.flows.vault.types.UpdateFlowsVaultConnectionRequestContent; -import com.auth0.client.mgmt.types.CreateFlowsVaultConnectionRequestContent; -import com.auth0.client.mgmt.types.CreateFlowsVaultConnectionResponseContent; -import com.auth0.client.mgmt.types.FlowsVaultConnectionSummary; -import com.auth0.client.mgmt.types.GetFlowsVaultConnectionResponseContent; -import com.auth0.client.mgmt.types.ListFlowsVaultConnectionsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.UpdateFlowsVaultConnectionResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawConnectionsClient { - protected final ClientOptions clientOptions; - - public RawConnectionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public ManagementApiHttpResponse> list() { - return list(ListFlowsVaultConnectionsRequestParameters.builder().build()); - } - - public ManagementApiHttpResponse> list( - ListFlowsVaultConnectionsRequestParameters request) { - return list(request, null); - } - - public ManagementApiHttpResponse> list( - ListFlowsVaultConnectionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows/vault/connections"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListFlowsVaultConnectionsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListFlowsVaultConnectionsOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListFlowsVaultConnectionsRequestParameters nextRequest = - ListFlowsVaultConnectionsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getConnections().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse create( - CreateFlowsVaultConnectionRequestContent request) { - return create(request, null); - } - - public ManagementApiHttpResponse create( - CreateFlowsVaultConnectionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows/vault/connections") - .build(); - 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) - .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); - } - 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, CreateFlowsVaultConnectionResponseContent.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 (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 httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows/vault/connections") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetFlowsVaultConnectionResponseContent.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 (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 httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows/vault/connections") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse update(String id) { - return update(id, UpdateFlowsVaultConnectionRequestContent.builder().build()); - } - - public ManagementApiHttpResponse update( - String id, UpdateFlowsVaultConnectionRequestContent request) { - return update(id, request, null); - } - - public ManagementApiHttpResponse update( - String id, UpdateFlowsVaultConnectionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("flows/vault/connections") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateFlowsVaultConnectionResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/flows/vault/VaultClient.java b/src/main/java/com/auth0/client/mgmt/flows/vault/VaultClient.java deleted file mode 100644 index 8211fe9a6..000000000 --- a/src/main/java/com/auth0/client/mgmt/flows/vault/VaultClient.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.flows.vault; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class VaultClient { - protected final ClientOptions clientOptions; - - protected final Supplier connectionsClient; - - public VaultClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.connectionsClient = Suppliers.memoize(() -> new ConnectionsClient(clientOptions)); - } - - public ConnectionsClient connections() { - return this.connectionsClient.get(); - } -} 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 deleted file mode 100644 index 59dcad827..000000000 --- a/src/main/java/com/auth0/client/mgmt/flows/vault/types/ListFlowsVaultConnectionsRequestParameters.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.flows.vault.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListFlowsVaultConnectionsRequestParameters.Builder.class) -public final class ListFlowsVaultConnectionsRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final Map additionalProperties; - - private ListFlowsVaultConnectionsRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. Defaults to 50. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - return includeTotals; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListFlowsVaultConnectionsRequestParameters - && equalTo((ListFlowsVaultConnectionsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListFlowsVaultConnectionsRequestParameters other) { - return page.equals(other.page) && perPage.equals(other.perPage) && includeTotals.equals(other.includeTotals); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage, this.includeTotals); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListFlowsVaultConnectionsRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page. Defaults to 50.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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(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; - } - - public ListFlowsVaultConnectionsRequestParameters build() { - return new ListFlowsVaultConnectionsRequestParameters(page, perPage, includeTotals, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/flows/vault/types/UpdateFlowsVaultConnectionRequestContent.java b/src/main/java/com/auth0/client/mgmt/flows/vault/types/UpdateFlowsVaultConnectionRequestContent.java deleted file mode 100644 index df611d005..000000000 --- a/src/main/java/com/auth0/client/mgmt/flows/vault/types/UpdateFlowsVaultConnectionRequestContent.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.flows.vault.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.UpdateFlowsVaultConnectionSetup; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateFlowsVaultConnectionRequestContent.Builder.class) -public final class UpdateFlowsVaultConnectionRequestContent { - private final Optional name; - - private final Optional setup; - - private final Map additionalProperties; - - private UpdateFlowsVaultConnectionRequestContent( - Optional name, - Optional setup, - Map additionalProperties) { - this.name = name; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("setup") - public Optional getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateFlowsVaultConnectionRequestContent - && equalTo((UpdateFlowsVaultConnectionRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateFlowsVaultConnectionRequestContent other) { - return name.equals(other.name) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.setup); - } - - @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 setup = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateFlowsVaultConnectionRequestContent other) { - name(other.getName()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- */ - @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 = "setup", nulls = Nulls.SKIP) - public Builder setup(Optional setup) { - this.setup = setup; - return this; - } - - public Builder setup(UpdateFlowsVaultConnectionSetup setup) { - this.setup = Optional.ofNullable(setup); - return this; - } - - public UpdateFlowsVaultConnectionRequestContent build() { - return new UpdateFlowsVaultConnectionRequestContent(name, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/groups/AsyncMembersClient.java b/src/main/java/com/auth0/client/mgmt/groups/AsyncMembersClient.java deleted file mode 100644 index ff414e688..000000000 --- a/src/main/java/com/auth0/client/mgmt/groups/AsyncMembersClient.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.groups; - -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.groups.types.GetGroupMembersRequestParameters; -import com.auth0.client.mgmt.types.GroupMember; -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 all users that are a member of this group. - */ - public CompletableFuture> get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * List all users that are a member of this group. - */ - public CompletableFuture> get(String id, GetGroupMembersRequestParameters request) { - return this.rawClient.get(id, request).thenApply(response -> response.body()); - } - - /** - * List all users that are a member of this group. - */ - public CompletableFuture> get( - String id, GetGroupMembersRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/groups/AsyncRawMembersClient.java b/src/main/java/com/auth0/client/mgmt/groups/AsyncRawMembersClient.java deleted file mode 100644 index d66c1afaa..000000000 --- a/src/main/java/com/auth0/client/mgmt/groups/AsyncRawMembersClient.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.groups; - -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.SyncPagingIterable; -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.groups.types.GetGroupMembersRequestParameters; -import com.auth0.client.mgmt.types.GetGroupMembersResponseContent; -import com.auth0.client.mgmt.types.GroupMember; -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 all users that are a member of this group. - */ - public CompletableFuture>> get(String id) { - return get(id, GetGroupMembersRequestParameters.builder().build()); - } - - /** - * List all users that are a member of this group. - */ - public CompletableFuture>> get( - String id, GetGroupMembersRequestParameters request) { - return get(id, request, null); - } - - /** - * List all users that are a member of this group. - */ - public CompletableFuture>> get( - String id, GetGroupMembersRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("groups") - .addPathSegment(id) - .addPathSegments("members"); - 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); - } - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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()) { - GetGroupMembersResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGroupMembersResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - GetGroupMembersRequestParameters nextRequest = GetGroupMembersRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getMembers(); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> { - try { - return get(id, nextRequest, requestOptions) - .get() - .body(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - }), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (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/groups/MembersClient.java b/src/main/java/com/auth0/client/mgmt/groups/MembersClient.java deleted file mode 100644 index 9e3e321f5..000000000 --- a/src/main/java/com/auth0/client/mgmt/groups/MembersClient.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.groups; - -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.groups.types.GetGroupMembersRequestParameters; -import com.auth0.client.mgmt.types.GroupMember; - -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 all users that are a member of this group. - */ - public SyncPagingIterable get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * List all users that are a member of this group. - */ - public SyncPagingIterable get(String id, GetGroupMembersRequestParameters request) { - return this.rawClient.get(id, request).body(); - } - - /** - * List all users that are a member of this group. - */ - public SyncPagingIterable get( - String id, GetGroupMembersRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/groups/RawMembersClient.java b/src/main/java/com/auth0/client/mgmt/groups/RawMembersClient.java deleted file mode 100644 index 2719590c7..000000000 --- a/src/main/java/com/auth0/client/mgmt/groups/RawMembersClient.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.groups; - -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.SyncPagingIterable; -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.groups.types.GetGroupMembersRequestParameters; -import com.auth0.client.mgmt.types.GetGroupMembersResponseContent; -import com.auth0.client.mgmt.types.GroupMember; -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 all users that are a member of this group. - */ - public ManagementApiHttpResponse> get(String id) { - return get(id, GetGroupMembersRequestParameters.builder().build()); - } - - /** - * List all users that are a member of this group. - */ - public ManagementApiHttpResponse> get( - String id, GetGroupMembersRequestParameters request) { - return get(id, request, null); - } - - /** - * List all users that are a member of this group. - */ - public ManagementApiHttpResponse> get( - String id, GetGroupMembersRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("groups") - .addPathSegment(id) - .addPathSegments("members"); - 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); - } - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - GetGroupMembersResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetGroupMembersResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - GetGroupMembersRequestParameters nextRequest = GetGroupMembersRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getMembers(); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> get( - id, nextRequest, requestOptions) - .body()), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (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 deleted file mode 100644 index cee282e0b..000000000 --- a/src/main/java/com/auth0/client/mgmt/groups/types/GetGroupMembersRequestParameters.java +++ /dev/null @@ -1,307 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetGroupMembersRequestParameters.Builder.class) -public final class GetGroupMembersRequestParameters { - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private GetGroupMembersRequestParameters( - OptionalNullable fields, - OptionalNullable includeFields, - OptionalNullable from, - OptionalNullable take, - Map additionalProperties) { - this.fields = fields; - this.includeFields = includeFields; - this.from = from; - this.take = take; - this.additionalProperties = additionalProperties; - } - - /** - * @return A comma separated list of fields to include or exclude (depending on include_fields) from the result, 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). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("include_fields") - public OptionalNullable getIncludeFields() { - if (includeFields == null) { - return OptionalNullable.absent(); - } - return includeFields; - } - - /** - * @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() { - 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; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetGroupMembersRequestParameters && equalTo((GetGroupMembersRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetGroupMembersRequestParameters other) { - return fields.equals(other.fields) - && includeFields.equals(other.includeFields) - && 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); - } - - @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 fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - private OptionalNullable from = OptionalNullable.absent(); - - private OptionalNullable take = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetGroupMembersRequestParameters other) { - fields(other.getFields()); - includeFields(other.getIncludeFields()); - from(other.getFrom()); - take(other.getTake()); - return this; - } - - /** - *

A comma separated list of fields to include or exclude (depending on include_fields) from the result, 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).

- */ - @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; - } - - /** - *

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(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 GetGroupMembersRequestParameters build() { - return new GetGroupMembersRequestParameters(fields, includeFields, from, take, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/AsyncEnrollmentsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/AsyncEnrollmentsClient.java deleted file mode 100644 index 2df1eda7f..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/AsyncEnrollmentsClient.java +++ /dev/null @@ -1,77 +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.RequestOptions; -import com.auth0.client.mgmt.guardian.types.CreateGuardianEnrollmentTicketRequestContent; -import com.auth0.client.mgmt.types.CreateGuardianEnrollmentTicketResponseContent; -import com.auth0.client.mgmt.types.GetGuardianEnrollmentResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncEnrollmentsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawEnrollmentsClient rawClient; - - public AsyncEnrollmentsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawEnrollmentsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawEnrollmentsClient withRawResponse() { - return this.rawClient; - } - - /** - * Create a <a href="https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/create-custom-enrollment-tickets">multi-factor authentication (MFA) enrollment ticket</a>, and optionally send an email with the created ticket, to a given user. - * Create a <a href="https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/create-custom-enrollment-tickets">multi-factor authentication (MFA) enrollment ticket</a>, and optionally send an email with the created ticket to a given user. Enrollment tickets can specify which factor users must enroll with or allow existing MFA users to enroll in additional factors.<br/> - *

Note: Users cannot enroll in Email as a factor through custom enrollment tickets.

- */ - public CompletableFuture createTicket( - CreateGuardianEnrollmentTicketRequestContent request) { - return this.rawClient.createTicket(request).thenApply(response -> response.body()); - } - - /** - * Create a <a href="https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/create-custom-enrollment-tickets">multi-factor authentication (MFA) enrollment ticket</a>, and optionally send an email with the created ticket, to a given user. - * Create a <a href="https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/create-custom-enrollment-tickets">multi-factor authentication (MFA) enrollment ticket</a>, and optionally send an email with the created ticket to a given user. Enrollment tickets can specify which factor users must enroll with or allow existing MFA users to enroll in additional factors.<br/> - *

Note: Users cannot enroll in Email as a factor through custom enrollment tickets.

- */ - public CompletableFuture createTicket( - CreateGuardianEnrollmentTicketRequestContent request, RequestOptions requestOptions) { - return this.rawClient.createTicket(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details, such as status and type, for a specific multi-factor authentication enrollment registered to a user account. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve details, such as status and type, for a specific multi-factor authentication enrollment registered to a user account. - */ - public CompletableFuture get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Remove a specific multi-factor authentication (MFA) enrollment from a user's account. This allows the user to re-enroll with MFA. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa">Reset User Multi-Factor Authentication and Recovery Codes</a>. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Remove a specific multi-factor authentication (MFA) enrollment from a user's account. This allows the user to re-enroll with MFA. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa">Reset User Multi-Factor Authentication and Recovery Codes</a>. - */ - 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/guardian/AsyncFactorsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/AsyncFactorsClient.java deleted file mode 100644 index bc95ff62f..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/AsyncFactorsClient.java +++ /dev/null @@ -1,95 +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.RequestOptions; -import com.auth0.client.mgmt.core.Suppliers; -import com.auth0.client.mgmt.guardian.factors.AsyncPhoneClient; -import com.auth0.client.mgmt.guardian.factors.AsyncPushNotificationClient; -import com.auth0.client.mgmt.guardian.factors.AsyncSmsClient; -import com.auth0.client.mgmt.guardian.factors.duo.AsyncDuoClient; -import com.auth0.client.mgmt.guardian.types.SetGuardianFactorRequestContent; -import com.auth0.client.mgmt.types.GuardianFactor; -import com.auth0.client.mgmt.types.GuardianFactorNameEnum; -import com.auth0.client.mgmt.types.SetGuardianFactorResponseContent; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncFactorsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawFactorsClient rawClient; - - protected final Supplier phoneClient; - - protected final Supplier pushNotificationClient; - - protected final Supplier smsClient; - - protected final Supplier duoClient; - - public AsyncFactorsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawFactorsClient(clientOptions); - this.phoneClient = Suppliers.memoize(() -> new AsyncPhoneClient(clientOptions)); - this.pushNotificationClient = Suppliers.memoize(() -> new AsyncPushNotificationClient(clientOptions)); - this.smsClient = Suppliers.memoize(() -> new AsyncSmsClient(clientOptions)); - this.duoClient = Suppliers.memoize(() -> new AsyncDuoClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawFactorsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors">multi-factor authentication factors</a> associated with your tenant. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors">multi-factor authentication factors</a> associated with your tenant. - */ - public CompletableFuture> list(RequestOptions requestOptions) { - return this.rawClient.list(requestOptions).thenApply(response -> response.body()); - } - - /** - * Update the status (i.e., enabled or disabled) of a specific multi-factor authentication factor. - */ - public CompletableFuture set( - GuardianFactorNameEnum name, SetGuardianFactorRequestContent request) { - return this.rawClient.set(name, request).thenApply(response -> response.body()); - } - - /** - * Update the status (i.e., enabled or disabled) of a specific multi-factor authentication factor. - */ - public CompletableFuture set( - GuardianFactorNameEnum name, SetGuardianFactorRequestContent request, RequestOptions requestOptions) { - return this.rawClient.set(name, request, requestOptions).thenApply(response -> response.body()); - } - - public AsyncPhoneClient phone() { - return this.phoneClient.get(); - } - - public AsyncPushNotificationClient pushNotification() { - return this.pushNotificationClient.get(); - } - - public AsyncSmsClient sms() { - return this.smsClient.get(); - } - - public AsyncDuoClient duo() { - return this.duoClient.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 ce7f4ca9b..000000000 --- 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/AsyncPoliciesClient.java b/src/main/java/com/auth0/client/mgmt/guardian/AsyncPoliciesClient.java deleted file mode 100644 index 1ea9b5c01..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/AsyncPoliciesClient.java +++ /dev/null @@ -1,80 +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.RequestOptions; -import com.auth0.client.mgmt.types.MfaPolicyEnum; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -public class AsyncPoliciesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawPoliciesClient rawClient; - - public AsyncPoliciesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawPoliciesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawPoliciesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve the <a href="https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa">multi-factor authentication (MFA) policies</a> configured for your tenant. - *

The following policies are supported:

- *

<ul> - * <li><code>all-applications</code> policy prompts with MFA for all logins.</li> - * <li><code>confidence-score</code> policy prompts with MFA only for low confidence logins.</li> - * </ul>

- *

<b>Note</b>: The <code>confidence-score</code> policy is part of the <a href="https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa">Adaptive MFA feature</a>. Adaptive MFA requires an add-on for the Enterprise plan; review <a href="https://auth0.com/pricing">Auth0 Pricing</a> for more details.

- */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve the <a href="https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa">multi-factor authentication (MFA) policies</a> configured for your tenant. - *

The following policies are supported:

- *

<ul> - * <li><code>all-applications</code> policy prompts with MFA for all logins.</li> - * <li><code>confidence-score</code> policy prompts with MFA only for low confidence logins.</li> - * </ul>

- *

<b>Note</b>: The <code>confidence-score</code> policy is part of the <a href="https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa">Adaptive MFA feature</a>. Adaptive MFA requires an add-on for the Enterprise plan; review <a href="https://auth0.com/pricing">Auth0 Pricing</a> for more details.

- */ - public CompletableFuture> list(RequestOptions requestOptions) { - return this.rawClient.list(requestOptions).thenApply(response -> response.body()); - } - - /** - * Set <a href="https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa">multi-factor authentication (MFA) policies</a> for your tenant. - *

The following policies are supported:

- *

<ul> - * <li><code>all-applications</code> policy prompts with MFA for all logins.</li> - * <li><code>confidence-score</code> policy prompts with MFA only for low confidence logins.</li> - * </ul>

- *

<b>Note</b>: The <code>confidence-score</code> policy is part of the <a href="https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa">Adaptive MFA feature</a>. Adaptive MFA requires an add-on for the Enterprise plan; review <a href="https://auth0.com/pricing">Auth0 Pricing</a> for more details.

- */ - public CompletableFuture> set(List request) { - return this.rawClient.set(request).thenApply(response -> response.body()); - } - - /** - * Set <a href="https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa">multi-factor authentication (MFA) policies</a> for your tenant. - *

The following policies are supported:

- *

<ul> - * <li><code>all-applications</code> policy prompts with MFA for all logins.</li> - * <li><code>confidence-score</code> policy prompts with MFA only for low confidence logins.</li> - * </ul>

- *

<b>Note</b>: The <code>confidence-score</code> policy is part of the <a href="https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa">Adaptive MFA feature</a>. Adaptive MFA requires an add-on for the Enterprise plan; review <a href="https://auth0.com/pricing">Auth0 Pricing</a> for more details.

- */ - public CompletableFuture> set(List request, RequestOptions requestOptions) { - return this.rawClient.set(request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawEnrollmentsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawEnrollmentsClient.java deleted file mode 100644 index 3981a5b82..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawEnrollmentsClient.java +++ /dev/null @@ -1,289 +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.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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.NotFoundError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.guardian.types.CreateGuardianEnrollmentTicketRequestContent; -import com.auth0.client.mgmt.types.CreateGuardianEnrollmentTicketResponseContent; -import com.auth0.client.mgmt.types.GetGuardianEnrollmentResponseContent; -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 AsyncRawEnrollmentsClient { - protected final ClientOptions clientOptions; - - public AsyncRawEnrollmentsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Create a <a href="https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/create-custom-enrollment-tickets">multi-factor authentication (MFA) enrollment ticket</a>, and optionally send an email with the created ticket, to a given user. - * Create a <a href="https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/create-custom-enrollment-tickets">multi-factor authentication (MFA) enrollment ticket</a>, and optionally send an email with the created ticket to a given user. Enrollment tickets can specify which factor users must enroll with or allow existing MFA users to enroll in additional factors.<br/> - *

Note: Users cannot enroll in Email as a factor through custom enrollment tickets.

- */ - public CompletableFuture> createTicket( - CreateGuardianEnrollmentTicketRequestContent request) { - return createTicket(request, null); - } - - /** - * Create a <a href="https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/create-custom-enrollment-tickets">multi-factor authentication (MFA) enrollment ticket</a>, and optionally send an email with the created ticket, to a given user. - * Create a <a href="https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/create-custom-enrollment-tickets">multi-factor authentication (MFA) enrollment ticket</a>, and optionally send an email with the created ticket to a given user. Enrollment tickets can specify which factor users must enroll with or allow existing MFA users to enroll in additional factors.<br/> - *

Note: Users cannot enroll in Email as a factor through custom enrollment tickets.

- */ - public CompletableFuture> createTicket( - CreateGuardianEnrollmentTicketRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/enrollments/ticket") - .build(); - 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) - .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); - } - 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, CreateGuardianEnrollmentTicketResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve details, such as status and type, for a specific multi-factor authentication enrollment registered to a user account. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve details, such as status and type, for a specific multi-factor authentication enrollment registered to a user account. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/enrollments") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianEnrollmentResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Remove a specific multi-factor authentication (MFA) enrollment from a user's account. This allows the user to re-enroll with MFA. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa">Reset User Multi-Factor Authentication and Recovery Codes</a>. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Remove a specific multi-factor authentication (MFA) enrollment from a user's account. This allows the user to re-enroll with MFA. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa">Reset User Multi-Factor Authentication and Recovery Codes</a>. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/enrollments") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawFactorsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawFactorsClient.java deleted file mode 100644 index 62dfea126..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawFactorsClient.java +++ /dev/null @@ -1,206 +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.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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.guardian.types.SetGuardianFactorRequestContent; -import com.auth0.client.mgmt.types.GuardianFactor; -import com.auth0.client.mgmt.types.GuardianFactorNameEnum; -import com.auth0.client.mgmt.types.SetGuardianFactorResponseContent; -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; -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 AsyncRawFactorsClient { - protected final ClientOptions clientOptions; - - public AsyncRawFactorsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors">multi-factor authentication factors</a> associated with your tenant. - */ - public CompletableFuture>> list() { - return list(null); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors">multi-factor authentication factors</a> associated with your tenant. - */ - public CompletableFuture>> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture>> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update the status (i.e., enabled or disabled) of a specific multi-factor authentication factor. - */ - public CompletableFuture> set( - GuardianFactorNameEnum name, SetGuardianFactorRequestContent request) { - return set(name, request, null); - } - - /** - * Update the status (i.e., enabled or disabled) of a specific multi-factor authentication factor. - */ - public CompletableFuture> set( - GuardianFactorNameEnum name, SetGuardianFactorRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors") - .addPathSegment(name.toString()) - .build(); - 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) - .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<>(); - 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, SetGuardianFactorResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawPoliciesClient.java b/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawPoliciesClient.java deleted file mode 100644 index a9f0ad1b9..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/AsyncRawPoliciesClient.java +++ /dev/null @@ -1,224 +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.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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.types.MfaPolicyEnum; -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; -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 AsyncRawPoliciesClient { - protected final ClientOptions clientOptions; - - public AsyncRawPoliciesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve the <a href="https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa">multi-factor authentication (MFA) policies</a> configured for your tenant. - *

The following policies are supported:

- *

<ul> - * <li><code>all-applications</code> policy prompts with MFA for all logins.</li> - * <li><code>confidence-score</code> policy prompts with MFA only for low confidence logins.</li> - * </ul>

- *

<b>Note</b>: The <code>confidence-score</code> policy is part of the <a href="https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa">Adaptive MFA feature</a>. Adaptive MFA requires an add-on for the Enterprise plan; review <a href="https://auth0.com/pricing">Auth0 Pricing</a> for more details.

- */ - public CompletableFuture>> list() { - return list(null); - } - - /** - * Retrieve the <a href="https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa">multi-factor authentication (MFA) policies</a> configured for your tenant. - *

The following policies are supported:

- *

<ul> - * <li><code>all-applications</code> policy prompts with MFA for all logins.</li> - * <li><code>confidence-score</code> policy prompts with MFA only for low confidence logins.</li> - * </ul>

- *

<b>Note</b>: The <code>confidence-score</code> policy is part of the <a href="https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa">Adaptive MFA feature</a>. Adaptive MFA requires an add-on for the Enterprise plan; review <a href="https://auth0.com/pricing">Auth0 Pricing</a> for more details.

- */ - public CompletableFuture>> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/policies") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture>> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Set <a href="https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa">multi-factor authentication (MFA) policies</a> for your tenant. - *

The following policies are supported:

- *

<ul> - * <li><code>all-applications</code> policy prompts with MFA for all logins.</li> - * <li><code>confidence-score</code> policy prompts with MFA only for low confidence logins.</li> - * </ul>

- *

<b>Note</b>: The <code>confidence-score</code> policy is part of the <a href="https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa">Adaptive MFA feature</a>. Adaptive MFA requires an add-on for the Enterprise plan; review <a href="https://auth0.com/pricing">Auth0 Pricing</a> for more details.

- */ - public CompletableFuture>> set(List request) { - return set(request, null); - } - - /** - * Set <a href="https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa">multi-factor authentication (MFA) policies</a> for your tenant. - *

The following policies are supported:

- *

<ul> - * <li><code>all-applications</code> policy prompts with MFA for all logins.</li> - * <li><code>confidence-score</code> policy prompts with MFA only for low confidence logins.</li> - * </ul>

- *

<b>Note</b>: The <code>confidence-score</code> policy is part of the <a href="https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa">Adaptive MFA feature</a>. Adaptive MFA requires an add-on for the Enterprise plan; review <a href="https://auth0.com/pricing">Auth0 Pricing</a> for more details.

- */ - public CompletableFuture>> set( - List request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/policies") - .build(); - 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) - .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<>(); - 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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/EnrollmentsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/EnrollmentsClient.java deleted file mode 100644 index d68f7d4c5..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/EnrollmentsClient.java +++ /dev/null @@ -1,76 +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.RequestOptions; -import com.auth0.client.mgmt.guardian.types.CreateGuardianEnrollmentTicketRequestContent; -import com.auth0.client.mgmt.types.CreateGuardianEnrollmentTicketResponseContent; -import com.auth0.client.mgmt.types.GetGuardianEnrollmentResponseContent; - -public class EnrollmentsClient { - protected final ClientOptions clientOptions; - - private final RawEnrollmentsClient rawClient; - - public EnrollmentsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawEnrollmentsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawEnrollmentsClient withRawResponse() { - return this.rawClient; - } - - /** - * Create a <a href="https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/create-custom-enrollment-tickets">multi-factor authentication (MFA) enrollment ticket</a>, and optionally send an email with the created ticket, to a given user. - * Create a <a href="https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/create-custom-enrollment-tickets">multi-factor authentication (MFA) enrollment ticket</a>, and optionally send an email with the created ticket to a given user. Enrollment tickets can specify which factor users must enroll with or allow existing MFA users to enroll in additional factors.<br/> - *

Note: Users cannot enroll in Email as a factor through custom enrollment tickets.

- */ - public CreateGuardianEnrollmentTicketResponseContent createTicket( - CreateGuardianEnrollmentTicketRequestContent request) { - return this.rawClient.createTicket(request).body(); - } - - /** - * Create a <a href="https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/create-custom-enrollment-tickets">multi-factor authentication (MFA) enrollment ticket</a>, and optionally send an email with the created ticket, to a given user. - * Create a <a href="https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/create-custom-enrollment-tickets">multi-factor authentication (MFA) enrollment ticket</a>, and optionally send an email with the created ticket to a given user. Enrollment tickets can specify which factor users must enroll with or allow existing MFA users to enroll in additional factors.<br/> - *

Note: Users cannot enroll in Email as a factor through custom enrollment tickets.

- */ - public CreateGuardianEnrollmentTicketResponseContent createTicket( - CreateGuardianEnrollmentTicketRequestContent request, RequestOptions requestOptions) { - return this.rawClient.createTicket(request, requestOptions).body(); - } - - /** - * Retrieve details, such as status and type, for a specific multi-factor authentication enrollment registered to a user account. - */ - public GetGuardianEnrollmentResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve details, such as status and type, for a specific multi-factor authentication enrollment registered to a user account. - */ - public GetGuardianEnrollmentResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Remove a specific multi-factor authentication (MFA) enrollment from a user's account. This allows the user to re-enroll with MFA. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa">Reset User Multi-Factor Authentication and Recovery Codes</a>. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Remove a specific multi-factor authentication (MFA) enrollment from a user's account. This allows the user to re-enroll with MFA. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa">Reset User Multi-Factor Authentication and Recovery Codes</a>. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/FactorsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/FactorsClient.java deleted file mode 100644 index d9f4c4927..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/FactorsClient.java +++ /dev/null @@ -1,93 +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.RequestOptions; -import com.auth0.client.mgmt.core.Suppliers; -import com.auth0.client.mgmt.guardian.factors.PhoneClient; -import com.auth0.client.mgmt.guardian.factors.PushNotificationClient; -import com.auth0.client.mgmt.guardian.factors.SmsClient; -import com.auth0.client.mgmt.guardian.factors.duo.DuoClient; -import com.auth0.client.mgmt.guardian.types.SetGuardianFactorRequestContent; -import com.auth0.client.mgmt.types.GuardianFactor; -import com.auth0.client.mgmt.types.GuardianFactorNameEnum; -import com.auth0.client.mgmt.types.SetGuardianFactorResponseContent; -import java.util.List; -import java.util.function.Supplier; - -public class FactorsClient { - protected final ClientOptions clientOptions; - - private final RawFactorsClient rawClient; - - protected final Supplier phoneClient; - - protected final Supplier pushNotificationClient; - - protected final Supplier smsClient; - - protected final Supplier duoClient; - - public FactorsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawFactorsClient(clientOptions); - this.phoneClient = Suppliers.memoize(() -> new PhoneClient(clientOptions)); - this.pushNotificationClient = Suppliers.memoize(() -> new PushNotificationClient(clientOptions)); - this.smsClient = Suppliers.memoize(() -> new SmsClient(clientOptions)); - this.duoClient = Suppliers.memoize(() -> new DuoClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawFactorsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors">multi-factor authentication factors</a> associated with your tenant. - */ - public List list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors">multi-factor authentication factors</a> associated with your tenant. - */ - public List list(RequestOptions requestOptions) { - return this.rawClient.list(requestOptions).body(); - } - - /** - * Update the status (i.e., enabled or disabled) of a specific multi-factor authentication factor. - */ - public SetGuardianFactorResponseContent set(GuardianFactorNameEnum name, SetGuardianFactorRequestContent request) { - return this.rawClient.set(name, request).body(); - } - - /** - * Update the status (i.e., enabled or disabled) of a specific multi-factor authentication factor. - */ - public SetGuardianFactorResponseContent set( - GuardianFactorNameEnum name, SetGuardianFactorRequestContent request, RequestOptions requestOptions) { - return this.rawClient.set(name, request, requestOptions).body(); - } - - public PhoneClient phone() { - return this.phoneClient.get(); - } - - public PushNotificationClient pushNotification() { - return this.pushNotificationClient.get(); - } - - public SmsClient sms() { - return this.smsClient.get(); - } - - public DuoClient duo() { - return this.duoClient.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 0850d1d09..000000000 --- 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/PoliciesClient.java b/src/main/java/com/auth0/client/mgmt/guardian/PoliciesClient.java deleted file mode 100644 index df16a5110..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/PoliciesClient.java +++ /dev/null @@ -1,79 +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.RequestOptions; -import com.auth0.client.mgmt.types.MfaPolicyEnum; -import java.util.List; - -public class PoliciesClient { - protected final ClientOptions clientOptions; - - private final RawPoliciesClient rawClient; - - public PoliciesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawPoliciesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawPoliciesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve the <a href="https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa">multi-factor authentication (MFA) policies</a> configured for your tenant. - *

The following policies are supported:

- *

<ul> - * <li><code>all-applications</code> policy prompts with MFA for all logins.</li> - * <li><code>confidence-score</code> policy prompts with MFA only for low confidence logins.</li> - * </ul>

- *

<b>Note</b>: The <code>confidence-score</code> policy is part of the <a href="https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa">Adaptive MFA feature</a>. Adaptive MFA requires an add-on for the Enterprise plan; review <a href="https://auth0.com/pricing">Auth0 Pricing</a> for more details.

- */ - public List list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve the <a href="https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa">multi-factor authentication (MFA) policies</a> configured for your tenant. - *

The following policies are supported:

- *

<ul> - * <li><code>all-applications</code> policy prompts with MFA for all logins.</li> - * <li><code>confidence-score</code> policy prompts with MFA only for low confidence logins.</li> - * </ul>

- *

<b>Note</b>: The <code>confidence-score</code> policy is part of the <a href="https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa">Adaptive MFA feature</a>. Adaptive MFA requires an add-on for the Enterprise plan; review <a href="https://auth0.com/pricing">Auth0 Pricing</a> for more details.

- */ - public List list(RequestOptions requestOptions) { - return this.rawClient.list(requestOptions).body(); - } - - /** - * Set <a href="https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa">multi-factor authentication (MFA) policies</a> for your tenant. - *

The following policies are supported:

- *

<ul> - * <li><code>all-applications</code> policy prompts with MFA for all logins.</li> - * <li><code>confidence-score</code> policy prompts with MFA only for low confidence logins.</li> - * </ul>

- *

<b>Note</b>: The <code>confidence-score</code> policy is part of the <a href="https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa">Adaptive MFA feature</a>. Adaptive MFA requires an add-on for the Enterprise plan; review <a href="https://auth0.com/pricing">Auth0 Pricing</a> for more details.

- */ - public List set(List request) { - return this.rawClient.set(request).body(); - } - - /** - * Set <a href="https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa">multi-factor authentication (MFA) policies</a> for your tenant. - *

The following policies are supported:

- *

<ul> - * <li><code>all-applications</code> policy prompts with MFA for all logins.</li> - * <li><code>confidence-score</code> policy prompts with MFA only for low confidence logins.</li> - * </ul>

- *

<b>Note</b>: The <code>confidence-score</code> policy is part of the <a href="https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa">Adaptive MFA feature</a>. Adaptive MFA requires an add-on for the Enterprise plan; review <a href="https://auth0.com/pricing">Auth0 Pricing</a> for more details.

- */ - public List set(List request, RequestOptions requestOptions) { - return this.rawClient.set(request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/RawEnrollmentsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/RawEnrollmentsClient.java deleted file mode 100644 index 1e4712778..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/RawEnrollmentsClient.java +++ /dev/null @@ -1,224 +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.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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.NotFoundError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.guardian.types.CreateGuardianEnrollmentTicketRequestContent; -import com.auth0.client.mgmt.types.CreateGuardianEnrollmentTicketResponseContent; -import com.auth0.client.mgmt.types.GetGuardianEnrollmentResponseContent; -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 RawEnrollmentsClient { - protected final ClientOptions clientOptions; - - public RawEnrollmentsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Create a <a href="https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/create-custom-enrollment-tickets">multi-factor authentication (MFA) enrollment ticket</a>, and optionally send an email with the created ticket, to a given user. - * Create a <a href="https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/create-custom-enrollment-tickets">multi-factor authentication (MFA) enrollment ticket</a>, and optionally send an email with the created ticket to a given user. Enrollment tickets can specify which factor users must enroll with or allow existing MFA users to enroll in additional factors.<br/> - *

Note: Users cannot enroll in Email as a factor through custom enrollment tickets.

- */ - public ManagementApiHttpResponse createTicket( - CreateGuardianEnrollmentTicketRequestContent request) { - return createTicket(request, null); - } - - /** - * Create a <a href="https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/create-custom-enrollment-tickets">multi-factor authentication (MFA) enrollment ticket</a>, and optionally send an email with the created ticket, to a given user. - * Create a <a href="https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/create-custom-enrollment-tickets">multi-factor authentication (MFA) enrollment ticket</a>, and optionally send an email with the created ticket to a given user. Enrollment tickets can specify which factor users must enroll with or allow existing MFA users to enroll in additional factors.<br/> - *

Note: Users cannot enroll in Email as a factor through custom enrollment tickets.

- */ - public ManagementApiHttpResponse createTicket( - CreateGuardianEnrollmentTicketRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/enrollments/ticket") - .build(); - 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) - .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); - } - 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, CreateGuardianEnrollmentTicketResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details, such as status and type, for a specific multi-factor authentication enrollment registered to a user account. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve details, such as status and type, for a specific multi-factor authentication enrollment registered to a user account. - */ - public ManagementApiHttpResponse get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/enrollments") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianEnrollmentResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Remove a specific multi-factor authentication (MFA) enrollment from a user's account. This allows the user to re-enroll with MFA. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa">Reset User Multi-Factor Authentication and Recovery Codes</a>. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Remove a specific multi-factor authentication (MFA) enrollment from a user's account. This allows the user to re-enroll with MFA. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa">Reset User Multi-Factor Authentication and Recovery Codes</a>. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/enrollments") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/RawFactorsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/RawFactorsClient.java deleted file mode 100644 index 8924c6714..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/RawFactorsClient.java +++ /dev/null @@ -1,162 +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.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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.guardian.types.SetGuardianFactorRequestContent; -import com.auth0.client.mgmt.types.GuardianFactor; -import com.auth0.client.mgmt.types.GuardianFactorNameEnum; -import com.auth0.client.mgmt.types.SetGuardianFactorResponseContent; -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 RawFactorsClient { - protected final ClientOptions clientOptions; - - public RawFactorsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors">multi-factor authentication factors</a> associated with your tenant. - */ - public ManagementApiHttpResponse> list() { - return list(null); - } - - /** - * Retrieve details of all <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors">multi-factor authentication factors</a> associated with your tenant. - */ - public ManagementApiHttpResponse> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update the status (i.e., enabled or disabled) of a specific multi-factor authentication factor. - */ - public ManagementApiHttpResponse set( - GuardianFactorNameEnum name, SetGuardianFactorRequestContent request) { - return set(name, request, null); - } - - /** - * Update the status (i.e., enabled or disabled) of a specific multi-factor authentication factor. - */ - public ManagementApiHttpResponse set( - GuardianFactorNameEnum name, SetGuardianFactorRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors") - .addPathSegment(name.toString()) - .build(); - 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) - .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); - } - 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, SetGuardianFactorResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/RawPoliciesClient.java b/src/main/java/com/auth0/client/mgmt/guardian/RawPoliciesClient.java deleted file mode 100644 index ec7b75cf0..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/RawPoliciesClient.java +++ /dev/null @@ -1,182 +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.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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.types.MfaPolicyEnum; -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 RawPoliciesClient { - protected final ClientOptions clientOptions; - - public RawPoliciesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve the <a href="https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa">multi-factor authentication (MFA) policies</a> configured for your tenant. - *

The following policies are supported:

- *

<ul> - * <li><code>all-applications</code> policy prompts with MFA for all logins.</li> - * <li><code>confidence-score</code> policy prompts with MFA only for low confidence logins.</li> - * </ul>

- *

<b>Note</b>: The <code>confidence-score</code> policy is part of the <a href="https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa">Adaptive MFA feature</a>. Adaptive MFA requires an add-on for the Enterprise plan; review <a href="https://auth0.com/pricing">Auth0 Pricing</a> for more details.

- */ - public ManagementApiHttpResponse> list() { - return list(null); - } - - /** - * Retrieve the <a href="https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa">multi-factor authentication (MFA) policies</a> configured for your tenant. - *

The following policies are supported:

- *

<ul> - * <li><code>all-applications</code> policy prompts with MFA for all logins.</li> - * <li><code>confidence-score</code> policy prompts with MFA only for low confidence logins.</li> - * </ul>

- *

<b>Note</b>: The <code>confidence-score</code> policy is part of the <a href="https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa">Adaptive MFA feature</a>. Adaptive MFA requires an add-on for the Enterprise plan; review <a href="https://auth0.com/pricing">Auth0 Pricing</a> for more details.

- */ - public ManagementApiHttpResponse> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/policies") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Set <a href="https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa">multi-factor authentication (MFA) policies</a> for your tenant. - *

The following policies are supported:

- *

<ul> - * <li><code>all-applications</code> policy prompts with MFA for all logins.</li> - * <li><code>confidence-score</code> policy prompts with MFA only for low confidence logins.</li> - * </ul>

- *

<b>Note</b>: The <code>confidence-score</code> policy is part of the <a href="https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa">Adaptive MFA feature</a>. Adaptive MFA requires an add-on for the Enterprise plan; review <a href="https://auth0.com/pricing">Auth0 Pricing</a> for more details.

- */ - public ManagementApiHttpResponse> set(List request) { - return set(request, null); - } - - /** - * Set <a href="https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa">multi-factor authentication (MFA) policies</a> for your tenant. - *

The following policies are supported:

- *

<ul> - * <li><code>all-applications</code> policy prompts with MFA for all logins.</li> - * <li><code>confidence-score</code> policy prompts with MFA only for low confidence logins.</li> - * </ul>

- *

<b>Note</b>: The <code>confidence-score</code> policy is part of the <a href="https://auth0.com/docs/secure/multi-factor-authentication/adaptive-mfa">Adaptive MFA feature</a>. Adaptive MFA requires an add-on for the Enterprise plan; review <a href="https://auth0.com/pricing">Auth0 Pricing</a> for more details.

- */ - public ManagementApiHttpResponse> set( - List request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/policies") - .build(); - 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) - .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); - } - 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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} 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 deleted file mode 100644 index 3c395b10d..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncPhoneClient.java +++ /dev/null @@ -1,163 +0,0 @@ -/** - * 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.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.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.SetGuardianFactorPhoneMessageTypesResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorPhoneTemplatesResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneTwilioResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncPhoneClient { - protected final ClientOptions clientOptions; - - private final AsyncRawPhoneClient rawClient; - - public AsyncPhoneClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawPhoneClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawPhoneClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve list of <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">phone-type MFA factors</a> (i.e., sms and voice) that are enabled for your tenant. - */ - public CompletableFuture getMessageTypes() { - return this.rawClient.getMessageTypes().thenApply(response -> response.body()); - } - - /** - * Retrieve list of <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">phone-type MFA factors</a> (i.e., sms and voice) that are enabled for your tenant. - */ - public CompletableFuture getMessageTypes( - RequestOptions requestOptions) { - return this.rawClient.getMessageTypes(requestOptions).thenApply(response -> response.body()); - } - - /** - * Replace the list of <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">phone-type MFA factors</a> (i.e., sms and voice) that are enabled for your tenant. - */ - public CompletableFuture setMessageTypes( - SetGuardianFactorPhoneMessageTypesRequestContent request) { - return this.rawClient.setMessageTypes(request).thenApply(response -> response.body()); - } - - /** - * Replace the list of <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">phone-type MFA factors</a> (i.e., sms and voice) that are enabled for your tenant. - */ - public CompletableFuture setMessageTypes( - SetGuardianFactorPhoneMessageTypesRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setMessageTypes(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve configuration details for a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public CompletableFuture getTwilioProvider() { - return this.rawClient.getTwilioProvider().thenApply(response -> response.body()); - } - - /** - * Retrieve configuration details for a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public CompletableFuture getTwilioProvider( - RequestOptions requestOptions) { - return this.rawClient.getTwilioProvider(requestOptions).thenApply(response -> response.body()); - } - - /** - * Update the configuration of a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public CompletableFuture setTwilioProvider() { - return this.rawClient.setTwilioProvider().thenApply(response -> response.body()); - } - - /** - * Update the configuration of a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public CompletableFuture setTwilioProvider( - SetGuardianFactorsProviderPhoneTwilioRequestContent request) { - return this.rawClient.setTwilioProvider(request).thenApply(response -> response.body()); - } - - /** - * Update the configuration of a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public CompletableFuture setTwilioProvider( - SetGuardianFactorsProviderPhoneTwilioRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setTwilioProvider(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details of the multi-factor authentication phone provider configured for your tenant. - */ - public CompletableFuture getSelectedProvider() { - return this.rawClient.getSelectedProvider().thenApply(response -> response.body()); - } - - /** - * Retrieve details of the multi-factor authentication phone provider configured for your tenant. - */ - public CompletableFuture getSelectedProvider( - RequestOptions requestOptions) { - return this.rawClient.getSelectedProvider(requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture setProvider( - SetGuardianFactorsProviderPhoneRequestContent request) { - return this.rawClient.setProvider(request).thenApply(response -> response.body()); - } - - public CompletableFuture setProvider( - SetGuardianFactorsProviderPhoneRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setProvider(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. - */ - public CompletableFuture getTemplates() { - return this.rawClient.getTemplates().thenApply(response -> response.body()); - } - - /** - * Retrieve details of the multi-factor authentication enrollment and verification templates for phone-type factors available in your tenant. - */ - public CompletableFuture getTemplates( - RequestOptions requestOptions) { - return this.rawClient.getTemplates(requestOptions).thenApply(response -> response.body()); - } - - /** - * Customize the messages sent to complete phone enrollment and verification (subscription required). - */ - public CompletableFuture setTemplates( - SetGuardianFactorPhoneTemplatesRequestContent request) { - return this.rawClient.setTemplates(request).thenApply(response -> response.body()); - } - - /** - * Customize the messages sent to complete phone enrollment and verification (subscription required). - */ - public CompletableFuture setTemplates( - SetGuardianFactorPhoneTemplatesRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setTemplates(request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncPushNotificationClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncPushNotificationClient.java deleted file mode 100644 index fa448b77b..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncPushNotificationClient.java +++ /dev/null @@ -1,289 +0,0 @@ -/** - * 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.SetGuardianFactorsProviderPushNotificationApnsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationFcmRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationFcmv1RequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationSnsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationApnsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationFcmRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationSnsRequestContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderApnsResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderPushNotificationResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderSnsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPushNotificationApnsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPushNotificationResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPushNotificationSnsResponseContent; -import com.auth0.client.mgmt.types.UpdateGuardianFactorsProviderPushNotificationApnsResponseContent; -import com.auth0.client.mgmt.types.UpdateGuardianFactorsProviderPushNotificationSnsResponseContent; -import java.util.Map; -import java.util.concurrent.CompletableFuture; - -public class AsyncPushNotificationClient { - protected final ClientOptions clientOptions; - - private final AsyncRawPushNotificationClient rawClient; - - public AsyncPushNotificationClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawPushNotificationClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawPushNotificationClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve configuration details for the multi-factor authentication APNS provider associated with your tenant. - */ - public CompletableFuture getApnsProvider() { - return this.rawClient.getApnsProvider().thenApply(response -> response.body()); - } - - /** - * Retrieve configuration details for the multi-factor authentication APNS provider associated with your tenant. - */ - public CompletableFuture getApnsProvider( - RequestOptions requestOptions) { - return this.rawClient.getApnsProvider(requestOptions).thenApply(response -> response.body()); - } - - /** - * Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public CompletableFuture setApnsProvider() { - return this.rawClient.setApnsProvider().thenApply(response -> response.body()); - } - - /** - * Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public CompletableFuture setApnsProvider( - SetGuardianFactorsProviderPushNotificationApnsRequestContent request) { - return this.rawClient.setApnsProvider(request).thenApply(response -> response.body()); - } - - /** - * Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public CompletableFuture setApnsProvider( - SetGuardianFactorsProviderPushNotificationApnsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setApnsProvider(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public CompletableFuture updateApnsProvider() { - return this.rawClient.updateApnsProvider().thenApply(response -> response.body()); - } - - /** - * Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public CompletableFuture updateApnsProvider( - UpdateGuardianFactorsProviderPushNotificationApnsRequestContent request) { - return this.rawClient.updateApnsProvider(request).thenApply(response -> response.body()); - } - - /** - * Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public CompletableFuture updateApnsProvider( - UpdateGuardianFactorsProviderPushNotificationApnsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.updateApnsProvider(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public CompletableFuture> setFcmProvider() { - return this.rawClient.setFcmProvider().thenApply(response -> response.body()); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public CompletableFuture> setFcmProvider( - SetGuardianFactorsProviderPushNotificationFcmRequestContent request) { - return this.rawClient.setFcmProvider(request).thenApply(response -> response.body()); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public CompletableFuture> setFcmProvider( - SetGuardianFactorsProviderPushNotificationFcmRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setFcmProvider(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public CompletableFuture> updateFcmProvider() { - return this.rawClient.updateFcmProvider().thenApply(response -> response.body()); - } - - /** - * Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public CompletableFuture> updateFcmProvider( - UpdateGuardianFactorsProviderPushNotificationFcmRequestContent request) { - return this.rawClient.updateFcmProvider(request).thenApply(response -> response.body()); - } - - /** - * Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public CompletableFuture> updateFcmProvider( - UpdateGuardianFactorsProviderPushNotificationFcmRequestContent request, RequestOptions requestOptions) { - return this.rawClient.updateFcmProvider(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public CompletableFuture> setFcmv1Provider() { - return this.rawClient.setFcmv1Provider().thenApply(response -> response.body()); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public CompletableFuture> setFcmv1Provider( - SetGuardianFactorsProviderPushNotificationFcmv1RequestContent request) { - return this.rawClient.setFcmv1Provider(request).thenApply(response -> response.body()); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public CompletableFuture> setFcmv1Provider( - SetGuardianFactorsProviderPushNotificationFcmv1RequestContent request, RequestOptions requestOptions) { - return this.rawClient.setFcmv1Provider(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public CompletableFuture> updateFcmv1Provider() { - return this.rawClient.updateFcmv1Provider().thenApply(response -> response.body()); - } - - /** - * Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public CompletableFuture> updateFcmv1Provider( - UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent request) { - return this.rawClient.updateFcmv1Provider(request).thenApply(response -> response.body()); - } - - /** - * Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public CompletableFuture> updateFcmv1Provider( - UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent request, RequestOptions requestOptions) { - return this.rawClient.updateFcmv1Provider(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve configuration details for an AWS SNS push notification provider that has been enabled for MFA. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public CompletableFuture getSnsProvider() { - return this.rawClient.getSnsProvider().thenApply(response -> response.body()); - } - - /** - * Retrieve configuration details for an AWS SNS push notification provider that has been enabled for MFA. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public CompletableFuture getSnsProvider( - RequestOptions requestOptions) { - return this.rawClient.getSnsProvider(requestOptions).thenApply(response -> response.body()); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public CompletableFuture setSnsProvider() { - return this.rawClient.setSnsProvider().thenApply(response -> response.body()); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public CompletableFuture setSnsProvider( - SetGuardianFactorsProviderPushNotificationSnsRequestContent request) { - return this.rawClient.setSnsProvider(request).thenApply(response -> response.body()); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public CompletableFuture setSnsProvider( - SetGuardianFactorsProviderPushNotificationSnsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setSnsProvider(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public CompletableFuture updateSnsProvider() { - return this.rawClient.updateSnsProvider().thenApply(response -> response.body()); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public CompletableFuture updateSnsProvider( - UpdateGuardianFactorsProviderPushNotificationSnsRequestContent request) { - return this.rawClient.updateSnsProvider(request).thenApply(response -> response.body()); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public CompletableFuture updateSnsProvider( - UpdateGuardianFactorsProviderPushNotificationSnsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.updateSnsProvider(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public CompletableFuture getSelectedProvider() { - return this.rawClient.getSelectedProvider().thenApply(response -> response.body()); - } - - /** - * Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public CompletableFuture getSelectedProvider( - RequestOptions requestOptions) { - return this.rawClient.getSelectedProvider(requestOptions).thenApply(response -> response.body()); - } - - /** - * Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public CompletableFuture setProvider( - SetGuardianFactorsProviderPushNotificationRequestContent request) { - return this.rawClient.setProvider(request).thenApply(response -> response.body()); - } - - /** - * Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public CompletableFuture setProvider( - SetGuardianFactorsProviderPushNotificationRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setProvider(request, requestOptions).thenApply(response -> response.body()); - } -} 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 deleted file mode 100644 index 69bd75112..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawPhoneClient.java +++ /dev/null @@ -1,721 +0,0 @@ -/** - * 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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.NotFoundError; -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.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.SetGuardianFactorPhoneMessageTypesResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorPhoneTemplatesResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneTwilioResponseContent; -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 AsyncRawPhoneClient { - protected final ClientOptions clientOptions; - - public AsyncRawPhoneClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve list of <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">phone-type MFA factors</a> (i.e., sms and voice) that are enabled for your tenant. - */ - public CompletableFuture> - getMessageTypes() { - return getMessageTypes(null); - } - - /** - * Retrieve list of <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">phone-type MFA factors</a> (i.e., sms and voice) that are enabled for your tenant. - */ - public CompletableFuture> - getMessageTypes(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/phone/message-types") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorPhoneMessageTypesResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Replace the list of <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">phone-type MFA factors</a> (i.e., sms and voice) that are enabled for your tenant. - */ - public CompletableFuture> - setMessageTypes(SetGuardianFactorPhoneMessageTypesRequestContent request) { - return setMessageTypes(request, null); - } - - /** - * Replace the list of <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">phone-type MFA factors</a> (i.e., sms and voice) that are enabled for your tenant. - */ - public CompletableFuture> - setMessageTypes(SetGuardianFactorPhoneMessageTypesRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/phone/message-types") - .build(); - 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) - .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<>(); - 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, SetGuardianFactorPhoneMessageTypesResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve configuration details for a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public CompletableFuture> - getTwilioProvider() { - return getTwilioProvider(null); - } - - /** - * Retrieve configuration details for a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public CompletableFuture> - getTwilioProvider(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/phone/providers/twilio") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorsProviderPhoneTwilioResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update the configuration of a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public CompletableFuture> - setTwilioProvider() { - return setTwilioProvider( - SetGuardianFactorsProviderPhoneTwilioRequestContent.builder().build()); - } - - /** - * Update the configuration of a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public CompletableFuture> - setTwilioProvider(SetGuardianFactorsProviderPhoneTwilioRequestContent request) { - return setTwilioProvider(request, null); - } - - /** - * Update the configuration of a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public CompletableFuture> - setTwilioProvider( - SetGuardianFactorsProviderPhoneTwilioRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/phone/providers/twilio") - .build(); - 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) - .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<>(); - 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, SetGuardianFactorsProviderPhoneTwilioResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve details of the multi-factor authentication phone provider configured for your tenant. - */ - public CompletableFuture> - getSelectedProvider() { - return getSelectedProvider(null); - } - - /** - * Retrieve details of the multi-factor authentication phone provider configured for your tenant. - */ - public CompletableFuture> - getSelectedProvider(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/phone/selected-provider") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorsProviderPhoneResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - public CompletableFuture> setProvider( - SetGuardianFactorsProviderPhoneRequestContent request) { - return setProvider(request, null); - } - - public CompletableFuture> setProvider( - SetGuardianFactorsProviderPhoneRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/phone/selected-provider") - .build(); - 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) - .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<>(); - 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, SetGuardianFactorsProviderPhoneResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve details of the multi-factor authentication enrollment and verification templates for phone-type factors available in your tenant. - */ - public CompletableFuture> getTemplates() { - return getTemplates(null); - } - - /** - * Retrieve details of the multi-factor authentication enrollment and verification templates for phone-type factors available in your tenant. - */ - public CompletableFuture> getTemplates( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/phone/templates") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorPhoneTemplatesResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Customize the messages sent to complete phone enrollment and verification (subscription required). - */ - public CompletableFuture> setTemplates( - SetGuardianFactorPhoneTemplatesRequestContent request) { - return setTemplates(request, null); - } - - /** - * Customize the messages sent to complete phone enrollment and verification (subscription required). - */ - public CompletableFuture> setTemplates( - SetGuardianFactorPhoneTemplatesRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/phone/templates") - .build(); - 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) - .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<>(); - 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, SetGuardianFactorPhoneTemplatesResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} 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 deleted file mode 100644 index 9c1ef2b1e..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawPushNotificationClient.java +++ /dev/null @@ -1,1156 +0,0 @@ -/** - * 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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationApnsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationFcmRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationFcmv1RequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationSnsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationApnsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationFcmRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationSnsRequestContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderApnsResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderPushNotificationResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderSnsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPushNotificationApnsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPushNotificationResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPushNotificationSnsResponseContent; -import com.auth0.client.mgmt.types.UpdateGuardianFactorsProviderPushNotificationApnsResponseContent; -import com.auth0.client.mgmt.types.UpdateGuardianFactorsProviderPushNotificationSnsResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import java.io.IOException; -import java.util.Map; -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 AsyncRawPushNotificationClient { - protected final ClientOptions clientOptions; - - public AsyncRawPushNotificationClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve configuration details for the multi-factor authentication APNS provider associated with your tenant. - */ - public CompletableFuture> - getApnsProvider() { - return getApnsProvider(null); - } - - /** - * Retrieve configuration details for the multi-factor authentication APNS provider associated with your tenant. - */ - public CompletableFuture> getApnsProvider( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/apns") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorsProviderApnsResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public CompletableFuture> - setApnsProvider() { - return setApnsProvider(SetGuardianFactorsProviderPushNotificationApnsRequestContent.builder() - .build()); - } - - /** - * Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public CompletableFuture> - setApnsProvider(SetGuardianFactorsProviderPushNotificationApnsRequestContent request) { - return setApnsProvider(request, null); - } - - /** - * Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public CompletableFuture> - setApnsProvider( - SetGuardianFactorsProviderPushNotificationApnsRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/apns") - .build(); - 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) - .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<>(); - 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, - SetGuardianFactorsProviderPushNotificationApnsResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public CompletableFuture< - ManagementApiHttpResponse> - updateApnsProvider() { - return updateApnsProvider(UpdateGuardianFactorsProviderPushNotificationApnsRequestContent.builder() - .build()); - } - - /** - * Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public CompletableFuture< - ManagementApiHttpResponse> - updateApnsProvider(UpdateGuardianFactorsProviderPushNotificationApnsRequestContent request) { - return updateApnsProvider(request, null); - } - - /** - * Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public CompletableFuture< - ManagementApiHttpResponse> - updateApnsProvider( - UpdateGuardianFactorsProviderPushNotificationApnsRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/apns") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> - future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, - UpdateGuardianFactorsProviderPushNotificationApnsResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public CompletableFuture>> setFcmProvider() { - return setFcmProvider(SetGuardianFactorsProviderPushNotificationFcmRequestContent.builder() - .build()); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public CompletableFuture>> setFcmProvider( - SetGuardianFactorsProviderPushNotificationFcmRequestContent request) { - return setFcmProvider(request, null); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public CompletableFuture>> setFcmProvider( - SetGuardianFactorsProviderPushNotificationFcmRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/fcm") - .build(); - 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) - .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<>(); - 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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public CompletableFuture>> updateFcmProvider() { - return updateFcmProvider(UpdateGuardianFactorsProviderPushNotificationFcmRequestContent.builder() - .build()); - } - - /** - * Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public CompletableFuture>> updateFcmProvider( - UpdateGuardianFactorsProviderPushNotificationFcmRequestContent request) { - return updateFcmProvider(request, null); - } - - /** - * Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public CompletableFuture>> updateFcmProvider( - UpdateGuardianFactorsProviderPushNotificationFcmRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/fcm") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture>> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public CompletableFuture>> setFcmv1Provider() { - return setFcmv1Provider(SetGuardianFactorsProviderPushNotificationFcmv1RequestContent.builder() - .build()); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public CompletableFuture>> setFcmv1Provider( - SetGuardianFactorsProviderPushNotificationFcmv1RequestContent request) { - return setFcmv1Provider(request, null); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public CompletableFuture>> setFcmv1Provider( - SetGuardianFactorsProviderPushNotificationFcmv1RequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/fcmv1") - .build(); - 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) - .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<>(); - 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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public CompletableFuture>> updateFcmv1Provider() { - return updateFcmv1Provider(UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent.builder() - .build()); - } - - /** - * Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public CompletableFuture>> updateFcmv1Provider( - UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent request) { - return updateFcmv1Provider(request, null); - } - - /** - * Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public CompletableFuture>> updateFcmv1Provider( - UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/fcmv1") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture>> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve configuration details for an AWS SNS push notification provider that has been enabled for MFA. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public CompletableFuture> getSnsProvider() { - return getSnsProvider(null); - } - - /** - * Retrieve configuration details for an AWS SNS push notification provider that has been enabled for MFA. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public CompletableFuture> getSnsProvider( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/sns") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorsProviderSnsResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public CompletableFuture> - setSnsProvider() { - return setSnsProvider(SetGuardianFactorsProviderPushNotificationSnsRequestContent.builder() - .build()); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public CompletableFuture> - setSnsProvider(SetGuardianFactorsProviderPushNotificationSnsRequestContent request) { - return setSnsProvider(request, null); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public CompletableFuture> - setSnsProvider( - SetGuardianFactorsProviderPushNotificationSnsRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/sns") - .build(); - 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) - .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<>(); - 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, - SetGuardianFactorsProviderPushNotificationSnsResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public CompletableFuture> - updateSnsProvider() { - return updateSnsProvider(UpdateGuardianFactorsProviderPushNotificationSnsRequestContent.builder() - .build()); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public CompletableFuture> - updateSnsProvider(UpdateGuardianFactorsProviderPushNotificationSnsRequestContent request) { - return updateSnsProvider(request, null); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public CompletableFuture> - updateSnsProvider( - UpdateGuardianFactorsProviderPushNotificationSnsRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/sns") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> - future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, - UpdateGuardianFactorsProviderPushNotificationSnsResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public CompletableFuture> - getSelectedProvider() { - return getSelectedProvider(null); - } - - /** - * Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public CompletableFuture> - getSelectedProvider(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/selected-provider") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, - GetGuardianFactorsProviderPushNotificationResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public CompletableFuture> - setProvider(SetGuardianFactorsProviderPushNotificationRequestContent request) { - return setProvider(request, null); - } - - /** - * Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public CompletableFuture> - setProvider( - SetGuardianFactorsProviderPushNotificationRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/selected-provider") - .build(); - 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) - .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<>(); - 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, - SetGuardianFactorsProviderPushNotificationResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} 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 deleted file mode 100644 index d9bab8e3c..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncRawSmsClient.java +++ /dev/null @@ -1,578 +0,0 @@ -/** - * 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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorSmsTemplatesRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderSmsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderSmsTwilioRequestContent; -import com.auth0.client.mgmt.types.GetGuardianFactorSmsTemplatesResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderSmsResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderSmsTwilioResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorSmsTemplatesResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsTwilioResponseContent; -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 AsyncRawSmsClient { - protected final ClientOptions clientOptions; - - public AsyncRawSmsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve the <a href="https://auth0.com/docs/multifactor-authentication/twilio-configuration">Twilio SMS provider configuration</a> (subscription required). - *
A new endpoint is available to retrieve the Twilio configuration related to phone factors (<a href='https://auth0.com/docs/api/management/v2/#!/Guardian/get_twilio'>phone Twilio configuration</a>). It has the same payload as this one. Please use it instead.
-     * 
- */ - public CompletableFuture> - getTwilioProvider() { - return getTwilioProvider(null); - } - - /** - * Retrieve the <a href="https://auth0.com/docs/multifactor-authentication/twilio-configuration">Twilio SMS provider configuration</a> (subscription required). - *
A new endpoint is available to retrieve the Twilio configuration related to phone factors (<a href='https://auth0.com/docs/api/management/v2/#!/Guardian/get_twilio'>phone Twilio configuration</a>). It has the same payload as this one. Please use it instead.
-     * 
- */ - public CompletableFuture> - getTwilioProvider(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/sms/providers/twilio") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorsProviderSmsTwilioResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-twilio">Update Twilio phone configuration</a> endpoint. - *
<b>Previous functionality</b>: Update the Twilio SMS provider configuration.
-     * 
- */ - public CompletableFuture> - setTwilioProvider() { - return setTwilioProvider( - SetGuardianFactorsProviderSmsTwilioRequestContent.builder().build()); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-twilio">Update Twilio phone configuration</a> endpoint. - *
<b>Previous functionality</b>: Update the Twilio SMS provider configuration.
-     * 
- */ - public CompletableFuture> - setTwilioProvider(SetGuardianFactorsProviderSmsTwilioRequestContent request) { - return setTwilioProvider(request, null); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-twilio">Update Twilio phone configuration</a> endpoint. - *
<b>Previous functionality</b>: Update the Twilio SMS provider configuration.
-     * 
- */ - public CompletableFuture> - setTwilioProvider( - SetGuardianFactorsProviderSmsTwilioRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/sms/providers/twilio") - .build(); - 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) - .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<>(); - 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, SetGuardianFactorsProviderSmsTwilioResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/get-phone-providers">Retrieve phone configuration</a> endpoint instead. - *
<b>Previous functionality</b>: Retrieve details for the multi-factor authentication SMS provider configured for your tenant.
-     * 
- */ - public CompletableFuture> - getSelectedProvider() { - return getSelectedProvider(null); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/get-phone-providers">Retrieve phone configuration</a> endpoint instead. - *
<b>Previous functionality</b>: Retrieve details for the multi-factor authentication SMS provider configured for your tenant.
-     * 
- */ - public CompletableFuture> - getSelectedProvider(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/sms/selected-provider") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorsProviderSmsResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-phone-providers">Update phone configuration</a> endpoint instead. - *
<b>Previous functionality</b>: Update the multi-factor authentication SMS provider configuration in your tenant.
-     * 
- */ - public CompletableFuture> setProvider( - SetGuardianFactorsProviderSmsRequestContent request) { - return setProvider(request, null); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-phone-providers">Update phone configuration</a> endpoint instead. - *
<b>Previous functionality</b>: Update the multi-factor authentication SMS provider configuration in your tenant.
-     * 
- */ - public CompletableFuture> setProvider( - SetGuardianFactorsProviderSmsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/sms/selected-provider") - .build(); - 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) - .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<>(); - 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, SetGuardianFactorsProviderSmsResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/get-factor-phone-templates">Retrieve enrollment and verification phone templates</a> endpoint instead. - *
<b>Previous function</b>: Retrieve details of SMS enrollment and verification templates configured for your tenant.
-     * 
- */ - public CompletableFuture> getTemplates() { - return getTemplates(null); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/get-factor-phone-templates">Retrieve enrollment and verification phone templates</a> endpoint instead. - *
<b>Previous function</b>: Retrieve details of SMS enrollment and verification templates configured for your tenant.
-     * 
- */ - public CompletableFuture> getTemplates( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/sms/templates") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorSmsTemplatesResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-factor-phone-templates">Update enrollment and verification phone templates</a> endpoint instead. - *
<b>Previous functionality</b>: Customize the messages sent to complete SMS enrollment and verification.
-     * 
- */ - public CompletableFuture> setTemplates( - SetGuardianFactorSmsTemplatesRequestContent request) { - return setTemplates(request, null); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-factor-phone-templates">Update enrollment and verification phone templates</a> endpoint instead. - *
<b>Previous functionality</b>: Customize the messages sent to complete SMS enrollment and verification.
-     * 
- */ - public CompletableFuture> setTemplates( - SetGuardianFactorSmsTemplatesRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/sms/templates") - .build(); - 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) - .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<>(); - 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, SetGuardianFactorSmsTemplatesResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} 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 deleted file mode 100644 index cfff6df6b..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/AsyncSmsClient.java +++ /dev/null @@ -1,160 +0,0 @@ -/** - * 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.SetGuardianFactorSmsTemplatesRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderSmsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderSmsTwilioRequestContent; -import com.auth0.client.mgmt.types.GetGuardianFactorSmsTemplatesResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderSmsResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderSmsTwilioResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorSmsTemplatesResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsTwilioResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncSmsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawSmsClient rawClient; - - public AsyncSmsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawSmsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawSmsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve the <a href="https://auth0.com/docs/multifactor-authentication/twilio-configuration">Twilio SMS provider configuration</a> (subscription required). - *
A new endpoint is available to retrieve the Twilio configuration related to phone factors (<a href='https://auth0.com/docs/api/management/v2/#!/Guardian/get_twilio'>phone Twilio configuration</a>). It has the same payload as this one. Please use it instead.
-     * 
- */ - public CompletableFuture getTwilioProvider() { - return this.rawClient.getTwilioProvider().thenApply(response -> response.body()); - } - - /** - * Retrieve the <a href="https://auth0.com/docs/multifactor-authentication/twilio-configuration">Twilio SMS provider configuration</a> (subscription required). - *
A new endpoint is available to retrieve the Twilio configuration related to phone factors (<a href='https://auth0.com/docs/api/management/v2/#!/Guardian/get_twilio'>phone Twilio configuration</a>). It has the same payload as this one. Please use it instead.
-     * 
- */ - public CompletableFuture getTwilioProvider( - RequestOptions requestOptions) { - return this.rawClient.getTwilioProvider(requestOptions).thenApply(response -> response.body()); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-twilio">Update Twilio phone configuration</a> endpoint. - *
<b>Previous functionality</b>: Update the Twilio SMS provider configuration.
-     * 
- */ - public CompletableFuture setTwilioProvider() { - return this.rawClient.setTwilioProvider().thenApply(response -> response.body()); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-twilio">Update Twilio phone configuration</a> endpoint. - *
<b>Previous functionality</b>: Update the Twilio SMS provider configuration.
-     * 
- */ - public CompletableFuture setTwilioProvider( - SetGuardianFactorsProviderSmsTwilioRequestContent request) { - return this.rawClient.setTwilioProvider(request).thenApply(response -> response.body()); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-twilio">Update Twilio phone configuration</a> endpoint. - *
<b>Previous functionality</b>: Update the Twilio SMS provider configuration.
-     * 
- */ - public CompletableFuture setTwilioProvider( - SetGuardianFactorsProviderSmsTwilioRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setTwilioProvider(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/get-phone-providers">Retrieve phone configuration</a> endpoint instead. - *
<b>Previous functionality</b>: Retrieve details for the multi-factor authentication SMS provider configured for your tenant.
-     * 
- */ - public CompletableFuture getSelectedProvider() { - return this.rawClient.getSelectedProvider().thenApply(response -> response.body()); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/get-phone-providers">Retrieve phone configuration</a> endpoint instead. - *
<b>Previous functionality</b>: Retrieve details for the multi-factor authentication SMS provider configured for your tenant.
-     * 
- */ - public CompletableFuture getSelectedProvider( - RequestOptions requestOptions) { - return this.rawClient.getSelectedProvider(requestOptions).thenApply(response -> response.body()); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-phone-providers">Update phone configuration</a> endpoint instead. - *
<b>Previous functionality</b>: Update the multi-factor authentication SMS provider configuration in your tenant.
-     * 
- */ - public CompletableFuture setProvider( - SetGuardianFactorsProviderSmsRequestContent request) { - return this.rawClient.setProvider(request).thenApply(response -> response.body()); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-phone-providers">Update phone configuration</a> endpoint instead. - *
<b>Previous functionality</b>: Update the multi-factor authentication SMS provider configuration in your tenant.
-     * 
- */ - public CompletableFuture setProvider( - SetGuardianFactorsProviderSmsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setProvider(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/get-factor-phone-templates">Retrieve enrollment and verification phone templates</a> endpoint instead. - *
<b>Previous function</b>: Retrieve details of SMS enrollment and verification templates configured for your tenant.
-     * 
- */ - public CompletableFuture getTemplates() { - return this.rawClient.getTemplates().thenApply(response -> response.body()); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/get-factor-phone-templates">Retrieve enrollment and verification phone templates</a> endpoint instead. - *
<b>Previous function</b>: Retrieve details of SMS enrollment and verification templates configured for your tenant.
-     * 
- */ - public CompletableFuture getTemplates(RequestOptions requestOptions) { - return this.rawClient.getTemplates(requestOptions).thenApply(response -> response.body()); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-factor-phone-templates">Update enrollment and verification phone templates</a> endpoint instead. - *
<b>Previous functionality</b>: Customize the messages sent to complete SMS enrollment and verification.
-     * 
- */ - public CompletableFuture setTemplates( - SetGuardianFactorSmsTemplatesRequestContent request) { - return this.rawClient.setTemplates(request).thenApply(response -> response.body()); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-factor-phone-templates">Update enrollment and verification phone templates</a> endpoint instead. - *
<b>Previous functionality</b>: Customize the messages sent to complete SMS enrollment and verification.
-     * 
- */ - public CompletableFuture setTemplates( - SetGuardianFactorSmsTemplatesRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setTemplates(request, requestOptions).thenApply(response -> response.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 deleted file mode 100644 index 0bbe2445e..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/PhoneClient.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * 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.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.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.SetGuardianFactorPhoneMessageTypesResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorPhoneTemplatesResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneTwilioResponseContent; - -public class PhoneClient { - protected final ClientOptions clientOptions; - - private final RawPhoneClient rawClient; - - public PhoneClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawPhoneClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawPhoneClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve list of <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">phone-type MFA factors</a> (i.e., sms and voice) that are enabled for your tenant. - */ - public GetGuardianFactorPhoneMessageTypesResponseContent getMessageTypes() { - return this.rawClient.getMessageTypes().body(); - } - - /** - * Retrieve list of <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">phone-type MFA factors</a> (i.e., sms and voice) that are enabled for your tenant. - */ - public GetGuardianFactorPhoneMessageTypesResponseContent getMessageTypes(RequestOptions requestOptions) { - return this.rawClient.getMessageTypes(requestOptions).body(); - } - - /** - * Replace the list of <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">phone-type MFA factors</a> (i.e., sms and voice) that are enabled for your tenant. - */ - public SetGuardianFactorPhoneMessageTypesResponseContent setMessageTypes( - SetGuardianFactorPhoneMessageTypesRequestContent request) { - return this.rawClient.setMessageTypes(request).body(); - } - - /** - * Replace the list of <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">phone-type MFA factors</a> (i.e., sms and voice) that are enabled for your tenant. - */ - public SetGuardianFactorPhoneMessageTypesResponseContent setMessageTypes( - SetGuardianFactorPhoneMessageTypesRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setMessageTypes(request, requestOptions).body(); - } - - /** - * Retrieve configuration details for a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public GetGuardianFactorsProviderPhoneTwilioResponseContent getTwilioProvider() { - return this.rawClient.getTwilioProvider().body(); - } - - /** - * Retrieve configuration details for a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public GetGuardianFactorsProviderPhoneTwilioResponseContent getTwilioProvider(RequestOptions requestOptions) { - return this.rawClient.getTwilioProvider(requestOptions).body(); - } - - /** - * Update the configuration of a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public SetGuardianFactorsProviderPhoneTwilioResponseContent setTwilioProvider() { - return this.rawClient.setTwilioProvider().body(); - } - - /** - * Update the configuration of a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public SetGuardianFactorsProviderPhoneTwilioResponseContent setTwilioProvider( - SetGuardianFactorsProviderPhoneTwilioRequestContent request) { - return this.rawClient.setTwilioProvider(request).body(); - } - - /** - * Update the configuration of a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public SetGuardianFactorsProviderPhoneTwilioResponseContent setTwilioProvider( - SetGuardianFactorsProviderPhoneTwilioRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setTwilioProvider(request, requestOptions).body(); - } - - /** - * Retrieve details of the multi-factor authentication phone provider configured for your tenant. - */ - public GetGuardianFactorsProviderPhoneResponseContent getSelectedProvider() { - return this.rawClient.getSelectedProvider().body(); - } - - /** - * Retrieve details of the multi-factor authentication phone provider configured for your tenant. - */ - public GetGuardianFactorsProviderPhoneResponseContent getSelectedProvider(RequestOptions requestOptions) { - return this.rawClient.getSelectedProvider(requestOptions).body(); - } - - public SetGuardianFactorsProviderPhoneResponseContent setProvider( - SetGuardianFactorsProviderPhoneRequestContent request) { - return this.rawClient.setProvider(request).body(); - } - - public SetGuardianFactorsProviderPhoneResponseContent setProvider( - SetGuardianFactorsProviderPhoneRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setProvider(request, requestOptions).body(); - } - - /** - * Retrieve details of the multi-factor authentication enrollment and verification templates for phone-type factors available in your tenant. - */ - public GetGuardianFactorPhoneTemplatesResponseContent getTemplates() { - return this.rawClient.getTemplates().body(); - } - - /** - * Retrieve details of the multi-factor authentication enrollment and verification templates for phone-type factors available in your tenant. - */ - public GetGuardianFactorPhoneTemplatesResponseContent getTemplates(RequestOptions requestOptions) { - return this.rawClient.getTemplates(requestOptions).body(); - } - - /** - * Customize the messages sent to complete phone enrollment and verification (subscription required). - */ - public SetGuardianFactorPhoneTemplatesResponseContent setTemplates( - SetGuardianFactorPhoneTemplatesRequestContent request) { - return this.rawClient.setTemplates(request).body(); - } - - /** - * Customize the messages sent to complete phone enrollment and verification (subscription required). - */ - public SetGuardianFactorPhoneTemplatesResponseContent setTemplates( - SetGuardianFactorPhoneTemplatesRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setTemplates(request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/PushNotificationClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/PushNotificationClient.java deleted file mode 100644 index 8e3b97126..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/PushNotificationClient.java +++ /dev/null @@ -1,284 +0,0 @@ -/** - * 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.SetGuardianFactorsProviderPushNotificationApnsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationFcmRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationFcmv1RequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationSnsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationApnsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationFcmRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationSnsRequestContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderApnsResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderPushNotificationResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderSnsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPushNotificationApnsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPushNotificationResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPushNotificationSnsResponseContent; -import com.auth0.client.mgmt.types.UpdateGuardianFactorsProviderPushNotificationApnsResponseContent; -import com.auth0.client.mgmt.types.UpdateGuardianFactorsProviderPushNotificationSnsResponseContent; -import java.util.Map; - -public class PushNotificationClient { - protected final ClientOptions clientOptions; - - private final RawPushNotificationClient rawClient; - - public PushNotificationClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawPushNotificationClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawPushNotificationClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve configuration details for the multi-factor authentication APNS provider associated with your tenant. - */ - public GetGuardianFactorsProviderApnsResponseContent getApnsProvider() { - return this.rawClient.getApnsProvider().body(); - } - - /** - * Retrieve configuration details for the multi-factor authentication APNS provider associated with your tenant. - */ - public GetGuardianFactorsProviderApnsResponseContent getApnsProvider(RequestOptions requestOptions) { - return this.rawClient.getApnsProvider(requestOptions).body(); - } - - /** - * Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public SetGuardianFactorsProviderPushNotificationApnsResponseContent setApnsProvider() { - return this.rawClient.setApnsProvider().body(); - } - - /** - * Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public SetGuardianFactorsProviderPushNotificationApnsResponseContent setApnsProvider( - SetGuardianFactorsProviderPushNotificationApnsRequestContent request) { - return this.rawClient.setApnsProvider(request).body(); - } - - /** - * Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public SetGuardianFactorsProviderPushNotificationApnsResponseContent setApnsProvider( - SetGuardianFactorsProviderPushNotificationApnsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setApnsProvider(request, requestOptions).body(); - } - - /** - * Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public UpdateGuardianFactorsProviderPushNotificationApnsResponseContent updateApnsProvider() { - return this.rawClient.updateApnsProvider().body(); - } - - /** - * Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public UpdateGuardianFactorsProviderPushNotificationApnsResponseContent updateApnsProvider( - UpdateGuardianFactorsProviderPushNotificationApnsRequestContent request) { - return this.rawClient.updateApnsProvider(request).body(); - } - - /** - * Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public UpdateGuardianFactorsProviderPushNotificationApnsResponseContent updateApnsProvider( - UpdateGuardianFactorsProviderPushNotificationApnsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.updateApnsProvider(request, requestOptions).body(); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public Map setFcmProvider() { - return this.rawClient.setFcmProvider().body(); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public Map setFcmProvider(SetGuardianFactorsProviderPushNotificationFcmRequestContent request) { - return this.rawClient.setFcmProvider(request).body(); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public Map setFcmProvider( - SetGuardianFactorsProviderPushNotificationFcmRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setFcmProvider(request, requestOptions).body(); - } - - /** - * Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public Map updateFcmProvider() { - return this.rawClient.updateFcmProvider().body(); - } - - /** - * Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public Map updateFcmProvider( - UpdateGuardianFactorsProviderPushNotificationFcmRequestContent request) { - return this.rawClient.updateFcmProvider(request).body(); - } - - /** - * Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public Map updateFcmProvider( - UpdateGuardianFactorsProviderPushNotificationFcmRequestContent request, RequestOptions requestOptions) { - return this.rawClient.updateFcmProvider(request, requestOptions).body(); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public Map setFcmv1Provider() { - return this.rawClient.setFcmv1Provider().body(); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public Map setFcmv1Provider(SetGuardianFactorsProviderPushNotificationFcmv1RequestContent request) { - return this.rawClient.setFcmv1Provider(request).body(); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public Map setFcmv1Provider( - SetGuardianFactorsProviderPushNotificationFcmv1RequestContent request, RequestOptions requestOptions) { - return this.rawClient.setFcmv1Provider(request, requestOptions).body(); - } - - /** - * Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public Map updateFcmv1Provider() { - return this.rawClient.updateFcmv1Provider().body(); - } - - /** - * Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public Map updateFcmv1Provider( - UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent request) { - return this.rawClient.updateFcmv1Provider(request).body(); - } - - /** - * Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public Map updateFcmv1Provider( - UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent request, RequestOptions requestOptions) { - return this.rawClient.updateFcmv1Provider(request, requestOptions).body(); - } - - /** - * Retrieve configuration details for an AWS SNS push notification provider that has been enabled for MFA. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public GetGuardianFactorsProviderSnsResponseContent getSnsProvider() { - return this.rawClient.getSnsProvider().body(); - } - - /** - * Retrieve configuration details for an AWS SNS push notification provider that has been enabled for MFA. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public GetGuardianFactorsProviderSnsResponseContent getSnsProvider(RequestOptions requestOptions) { - return this.rawClient.getSnsProvider(requestOptions).body(); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public SetGuardianFactorsProviderPushNotificationSnsResponseContent setSnsProvider() { - return this.rawClient.setSnsProvider().body(); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public SetGuardianFactorsProviderPushNotificationSnsResponseContent setSnsProvider( - SetGuardianFactorsProviderPushNotificationSnsRequestContent request) { - return this.rawClient.setSnsProvider(request).body(); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public SetGuardianFactorsProviderPushNotificationSnsResponseContent setSnsProvider( - SetGuardianFactorsProviderPushNotificationSnsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setSnsProvider(request, requestOptions).body(); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public UpdateGuardianFactorsProviderPushNotificationSnsResponseContent updateSnsProvider() { - return this.rawClient.updateSnsProvider().body(); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public UpdateGuardianFactorsProviderPushNotificationSnsResponseContent updateSnsProvider( - UpdateGuardianFactorsProviderPushNotificationSnsRequestContent request) { - return this.rawClient.updateSnsProvider(request).body(); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public UpdateGuardianFactorsProviderPushNotificationSnsResponseContent updateSnsProvider( - UpdateGuardianFactorsProviderPushNotificationSnsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.updateSnsProvider(request, requestOptions).body(); - } - - /** - * Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public GetGuardianFactorsProviderPushNotificationResponseContent getSelectedProvider() { - return this.rawClient.getSelectedProvider().body(); - } - - /** - * Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public GetGuardianFactorsProviderPushNotificationResponseContent getSelectedProvider( - RequestOptions requestOptions) { - return this.rawClient.getSelectedProvider(requestOptions).body(); - } - - /** - * Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public SetGuardianFactorsProviderPushNotificationResponseContent setProvider( - SetGuardianFactorsProviderPushNotificationRequestContent request) { - return this.rawClient.setProvider(request).body(); - } - - /** - * Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public SetGuardianFactorsProviderPushNotificationResponseContent setProvider( - SetGuardianFactorsProviderPushNotificationRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setProvider(request, requestOptions).body(); - } -} 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 deleted file mode 100644 index 3977ed15a..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/RawPhoneClient.java +++ /dev/null @@ -1,550 +0,0 @@ -/** - * 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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.NotFoundError; -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.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.SetGuardianFactorPhoneMessageTypesResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorPhoneTemplatesResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPhoneTwilioResponseContent; -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 RawPhoneClient { - protected final ClientOptions clientOptions; - - public RawPhoneClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve list of <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">phone-type MFA factors</a> (i.e., sms and voice) that are enabled for your tenant. - */ - public ManagementApiHttpResponse getMessageTypes() { - return getMessageTypes(null); - } - - /** - * Retrieve list of <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">phone-type MFA factors</a> (i.e., sms and voice) that are enabled for your tenant. - */ - public ManagementApiHttpResponse getMessageTypes( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/phone/message-types") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorPhoneMessageTypesResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Replace the list of <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">phone-type MFA factors</a> (i.e., sms and voice) that are enabled for your tenant. - */ - public ManagementApiHttpResponse setMessageTypes( - SetGuardianFactorPhoneMessageTypesRequestContent request) { - return setMessageTypes(request, null); - } - - /** - * Replace the list of <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">phone-type MFA factors</a> (i.e., sms and voice) that are enabled for your tenant. - */ - public ManagementApiHttpResponse setMessageTypes( - SetGuardianFactorPhoneMessageTypesRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/phone/message-types") - .build(); - 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) - .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); - } - 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, SetGuardianFactorPhoneMessageTypesResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve configuration details for a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public ManagementApiHttpResponse getTwilioProvider() { - return getTwilioProvider(null); - } - - /** - * Retrieve configuration details for a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public ManagementApiHttpResponse getTwilioProvider( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/phone/providers/twilio") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorsProviderPhoneTwilioResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update the configuration of a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public ManagementApiHttpResponse setTwilioProvider() { - return setTwilioProvider( - SetGuardianFactorsProviderPhoneTwilioRequestContent.builder().build()); - } - - /** - * Update the configuration of a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public ManagementApiHttpResponse setTwilioProvider( - SetGuardianFactorsProviderPhoneTwilioRequestContent request) { - return setTwilioProvider(request, null); - } - - /** - * Update the configuration of a Twilio phone provider that has been set up in your tenant. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa">Configure SMS and Voice Notifications for MFA</a>. - */ - public ManagementApiHttpResponse setTwilioProvider( - SetGuardianFactorsProviderPhoneTwilioRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/phone/providers/twilio") - .build(); - 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) - .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); - } - 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, SetGuardianFactorsProviderPhoneTwilioResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details of the multi-factor authentication phone provider configured for your tenant. - */ - public ManagementApiHttpResponse getSelectedProvider() { - return getSelectedProvider(null); - } - - /** - * Retrieve details of the multi-factor authentication phone provider configured for your tenant. - */ - public ManagementApiHttpResponse getSelectedProvider( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/phone/selected-provider") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorsProviderPhoneResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse setProvider( - SetGuardianFactorsProviderPhoneRequestContent request) { - return setProvider(request, null); - } - - public ManagementApiHttpResponse setProvider( - SetGuardianFactorsProviderPhoneRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/phone/selected-provider") - .build(); - 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) - .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); - } - 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, SetGuardianFactorsProviderPhoneResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details of the multi-factor authentication enrollment and verification templates for phone-type factors available in your tenant. - */ - public ManagementApiHttpResponse getTemplates() { - return getTemplates(null); - } - - /** - * Retrieve details of the multi-factor authentication enrollment and verification templates for phone-type factors available in your tenant. - */ - public ManagementApiHttpResponse getTemplates( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/phone/templates") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorPhoneTemplatesResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Customize the messages sent to complete phone enrollment and verification (subscription required). - */ - public ManagementApiHttpResponse setTemplates( - SetGuardianFactorPhoneTemplatesRequestContent request) { - return setTemplates(request, null); - } - - /** - * Customize the messages sent to complete phone enrollment and verification (subscription required). - */ - public ManagementApiHttpResponse setTemplates( - SetGuardianFactorPhoneTemplatesRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/phone/templates") - .build(); - 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) - .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); - } - 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, SetGuardianFactorPhoneTemplatesResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} 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 deleted file mode 100644 index a7eff43a9..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/RawPushNotificationClient.java +++ /dev/null @@ -1,899 +0,0 @@ -/** - * 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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationApnsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationFcmRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationFcmv1RequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationSnsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationApnsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationFcmRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationSnsRequestContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderApnsResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderPushNotificationResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderSnsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPushNotificationApnsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPushNotificationResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPushNotificationSnsResponseContent; -import com.auth0.client.mgmt.types.UpdateGuardianFactorsProviderPushNotificationApnsResponseContent; -import com.auth0.client.mgmt.types.UpdateGuardianFactorsProviderPushNotificationSnsResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import java.io.IOException; -import java.util.Map; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawPushNotificationClient { - protected final ClientOptions clientOptions; - - public RawPushNotificationClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve configuration details for the multi-factor authentication APNS provider associated with your tenant. - */ - public ManagementApiHttpResponse getApnsProvider() { - return getApnsProvider(null); - } - - /** - * Retrieve configuration details for the multi-factor authentication APNS provider associated with your tenant. - */ - public ManagementApiHttpResponse getApnsProvider( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/apns") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorsProviderApnsResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public ManagementApiHttpResponse setApnsProvider() { - return setApnsProvider(SetGuardianFactorsProviderPushNotificationApnsRequestContent.builder() - .build()); - } - - /** - * Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public ManagementApiHttpResponse setApnsProvider( - SetGuardianFactorsProviderPushNotificationApnsRequestContent request) { - return setApnsProvider(request, null); - } - - /** - * Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public ManagementApiHttpResponse setApnsProvider( - SetGuardianFactorsProviderPushNotificationApnsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/apns") - .build(); - 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) - .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); - } - 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, - SetGuardianFactorsProviderPushNotificationApnsResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public ManagementApiHttpResponse - updateApnsProvider() { - return updateApnsProvider(UpdateGuardianFactorsProviderPushNotificationApnsRequestContent.builder() - .build()); - } - - /** - * Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public ManagementApiHttpResponse - updateApnsProvider(UpdateGuardianFactorsProviderPushNotificationApnsRequestContent request) { - return updateApnsProvider(request, null); - } - - /** - * Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. - */ - public ManagementApiHttpResponse - updateApnsProvider( - UpdateGuardianFactorsProviderPushNotificationApnsRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/apns") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, - UpdateGuardianFactorsProviderPushNotificationApnsResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public ManagementApiHttpResponse> setFcmProvider() { - return setFcmProvider(SetGuardianFactorsProviderPushNotificationFcmRequestContent.builder() - .build()); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public ManagementApiHttpResponse> setFcmProvider( - SetGuardianFactorsProviderPushNotificationFcmRequestContent request) { - return setFcmProvider(request, null); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public ManagementApiHttpResponse> setFcmProvider( - SetGuardianFactorsProviderPushNotificationFcmRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/fcm") - .build(); - 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) - .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); - } - 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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public ManagementApiHttpResponse> updateFcmProvider() { - return updateFcmProvider(UpdateGuardianFactorsProviderPushNotificationFcmRequestContent.builder() - .build()); - } - - /** - * Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public ManagementApiHttpResponse> updateFcmProvider( - UpdateGuardianFactorsProviderPushNotificationFcmRequestContent request) { - return updateFcmProvider(request, null); - } - - /** - * Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. - */ - public ManagementApiHttpResponse> updateFcmProvider( - UpdateGuardianFactorsProviderPushNotificationFcmRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/fcm") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public ManagementApiHttpResponse> setFcmv1Provider() { - return setFcmv1Provider(SetGuardianFactorsProviderPushNotificationFcmv1RequestContent.builder() - .build()); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public ManagementApiHttpResponse> setFcmv1Provider( - SetGuardianFactorsProviderPushNotificationFcmv1RequestContent request) { - return setFcmv1Provider(request, null); - } - - /** - * Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public ManagementApiHttpResponse> setFcmv1Provider( - SetGuardianFactorsProviderPushNotificationFcmv1RequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/fcmv1") - .build(); - 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) - .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); - } - 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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public ManagementApiHttpResponse> updateFcmv1Provider() { - return updateFcmv1Provider(UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent.builder() - .build()); - } - - /** - * Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public ManagementApiHttpResponse> updateFcmv1Provider( - UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent request) { - return updateFcmv1Provider(request, null); - } - - /** - * Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - */ - public ManagementApiHttpResponse> updateFcmv1Provider( - UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/fcmv1") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve configuration details for an AWS SNS push notification provider that has been enabled for MFA. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public ManagementApiHttpResponse getSnsProvider() { - return getSnsProvider(null); - } - - /** - * Retrieve configuration details for an AWS SNS push notification provider that has been enabled for MFA. To learn more, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public ManagementApiHttpResponse getSnsProvider( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/sns") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorsProviderSnsResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public ManagementApiHttpResponse setSnsProvider() { - return setSnsProvider(SetGuardianFactorsProviderPushNotificationSnsRequestContent.builder() - .build()); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public ManagementApiHttpResponse setSnsProvider( - SetGuardianFactorsProviderPushNotificationSnsRequestContent request) { - return setSnsProvider(request, null); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public ManagementApiHttpResponse setSnsProvider( - SetGuardianFactorsProviderPushNotificationSnsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/sns") - .build(); - 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) - .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); - } - 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, SetGuardianFactorsProviderPushNotificationSnsResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public ManagementApiHttpResponse - updateSnsProvider() { - return updateSnsProvider(UpdateGuardianFactorsProviderPushNotificationSnsRequestContent.builder() - .build()); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public ManagementApiHttpResponse updateSnsProvider( - UpdateGuardianFactorsProviderPushNotificationSnsRequestContent request) { - return updateSnsProvider(request, null); - } - - /** - * Configure the <a href="https://auth0.com/docs/multifactor-authentication/developer/sns-configuration">AWS SNS push notification provider configuration</a> (subscription required). - */ - public ManagementApiHttpResponse updateSnsProvider( - UpdateGuardianFactorsProviderPushNotificationSnsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/providers/sns") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, - UpdateGuardianFactorsProviderPushNotificationSnsResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public ManagementApiHttpResponse getSelectedProvider() { - return getSelectedProvider(null); - } - - /** - * Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public ManagementApiHttpResponse getSelectedProvider( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/selected-provider") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorsProviderPushNotificationResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public ManagementApiHttpResponse setProvider( - SetGuardianFactorsProviderPushNotificationRequestContent request) { - return setProvider(request, null); - } - - /** - * Modify the push notification provider configured for your tenant. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa">Configure Push Notifications for MFA</a>. - */ - public ManagementApiHttpResponse setProvider( - SetGuardianFactorsProviderPushNotificationRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/push-notification/selected-provider") - .build(); - 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) - .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); - } - 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, SetGuardianFactorsProviderPushNotificationResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/RawSmsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/RawSmsClient.java deleted file mode 100644 index e925d117c..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/RawSmsClient.java +++ /dev/null @@ -1,450 +0,0 @@ -/** - * 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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorSmsTemplatesRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderSmsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderSmsTwilioRequestContent; -import com.auth0.client.mgmt.types.GetGuardianFactorSmsTemplatesResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderSmsResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderSmsTwilioResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorSmsTemplatesResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsTwilioResponseContent; -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 RawSmsClient { - protected final ClientOptions clientOptions; - - public RawSmsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve the <a href="https://auth0.com/docs/multifactor-authentication/twilio-configuration">Twilio SMS provider configuration</a> (subscription required). - *
A new endpoint is available to retrieve the Twilio configuration related to phone factors (<a href='https://auth0.com/docs/api/management/v2/#!/Guardian/get_twilio'>phone Twilio configuration</a>). It has the same payload as this one. Please use it instead.
-     * 
- */ - public ManagementApiHttpResponse getTwilioProvider() { - return getTwilioProvider(null); - } - - /** - * Retrieve the <a href="https://auth0.com/docs/multifactor-authentication/twilio-configuration">Twilio SMS provider configuration</a> (subscription required). - *
A new endpoint is available to retrieve the Twilio configuration related to phone factors (<a href='https://auth0.com/docs/api/management/v2/#!/Guardian/get_twilio'>phone Twilio configuration</a>). It has the same payload as this one. Please use it instead.
-     * 
- */ - public ManagementApiHttpResponse getTwilioProvider( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/sms/providers/twilio") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorsProviderSmsTwilioResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-twilio">Update Twilio phone configuration</a> endpoint. - *
<b>Previous functionality</b>: Update the Twilio SMS provider configuration.
-     * 
- */ - public ManagementApiHttpResponse setTwilioProvider() { - return setTwilioProvider( - SetGuardianFactorsProviderSmsTwilioRequestContent.builder().build()); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-twilio">Update Twilio phone configuration</a> endpoint. - *
<b>Previous functionality</b>: Update the Twilio SMS provider configuration.
-     * 
- */ - public ManagementApiHttpResponse setTwilioProvider( - SetGuardianFactorsProviderSmsTwilioRequestContent request) { - return setTwilioProvider(request, null); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-twilio">Update Twilio phone configuration</a> endpoint. - *
<b>Previous functionality</b>: Update the Twilio SMS provider configuration.
-     * 
- */ - public ManagementApiHttpResponse setTwilioProvider( - SetGuardianFactorsProviderSmsTwilioRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/sms/providers/twilio") - .build(); - 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) - .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); - } - 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, SetGuardianFactorsProviderSmsTwilioResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/get-phone-providers">Retrieve phone configuration</a> endpoint instead. - *
<b>Previous functionality</b>: Retrieve details for the multi-factor authentication SMS provider configured for your tenant.
-     * 
- */ - public ManagementApiHttpResponse getSelectedProvider() { - return getSelectedProvider(null); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/get-phone-providers">Retrieve phone configuration</a> endpoint instead. - *
<b>Previous functionality</b>: Retrieve details for the multi-factor authentication SMS provider configured for your tenant.
-     * 
- */ - public ManagementApiHttpResponse getSelectedProvider( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/sms/selected-provider") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorsProviderSmsResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-phone-providers">Update phone configuration</a> endpoint instead. - *
<b>Previous functionality</b>: Update the multi-factor authentication SMS provider configuration in your tenant.
-     * 
- */ - public ManagementApiHttpResponse setProvider( - SetGuardianFactorsProviderSmsRequestContent request) { - return setProvider(request, null); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-phone-providers">Update phone configuration</a> endpoint instead. - *
<b>Previous functionality</b>: Update the multi-factor authentication SMS provider configuration in your tenant.
-     * 
- */ - public ManagementApiHttpResponse setProvider( - SetGuardianFactorsProviderSmsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/sms/selected-provider") - .build(); - 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) - .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); - } - 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, SetGuardianFactorsProviderSmsResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/get-factor-phone-templates">Retrieve enrollment and verification phone templates</a> endpoint instead. - *
<b>Previous function</b>: Retrieve details of SMS enrollment and verification templates configured for your tenant.
-     * 
- */ - public ManagementApiHttpResponse getTemplates() { - return getTemplates(null); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/get-factor-phone-templates">Retrieve enrollment and verification phone templates</a> endpoint instead. - *
<b>Previous function</b>: Retrieve details of SMS enrollment and verification templates configured for your tenant.
-     * 
- */ - public ManagementApiHttpResponse getTemplates( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/sms/templates") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorSmsTemplatesResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-factor-phone-templates">Update enrollment and verification phone templates</a> endpoint instead. - *
<b>Previous functionality</b>: Customize the messages sent to complete SMS enrollment and verification.
-     * 
- */ - public ManagementApiHttpResponse setTemplates( - SetGuardianFactorSmsTemplatesRequestContent request) { - return setTemplates(request, null); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-factor-phone-templates">Update enrollment and verification phone templates</a> endpoint instead. - *
<b>Previous functionality</b>: Customize the messages sent to complete SMS enrollment and verification.
-     * 
- */ - public ManagementApiHttpResponse setTemplates( - SetGuardianFactorSmsTemplatesRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/sms/templates") - .build(); - 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) - .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); - } - 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, SetGuardianFactorSmsTemplatesResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} 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 deleted file mode 100644 index 5963a5de3..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/SmsClient.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * 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.SetGuardianFactorSmsTemplatesRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderSmsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderSmsTwilioRequestContent; -import com.auth0.client.mgmt.types.GetGuardianFactorSmsTemplatesResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderSmsResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderSmsTwilioResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorSmsTemplatesResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsTwilioResponseContent; - -public class SmsClient { - protected final ClientOptions clientOptions; - - private final RawSmsClient rawClient; - - public SmsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawSmsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawSmsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve the <a href="https://auth0.com/docs/multifactor-authentication/twilio-configuration">Twilio SMS provider configuration</a> (subscription required). - *
A new endpoint is available to retrieve the Twilio configuration related to phone factors (<a href='https://auth0.com/docs/api/management/v2/#!/Guardian/get_twilio'>phone Twilio configuration</a>). It has the same payload as this one. Please use it instead.
-     * 
- */ - public GetGuardianFactorsProviderSmsTwilioResponseContent getTwilioProvider() { - return this.rawClient.getTwilioProvider().body(); - } - - /** - * Retrieve the <a href="https://auth0.com/docs/multifactor-authentication/twilio-configuration">Twilio SMS provider configuration</a> (subscription required). - *
A new endpoint is available to retrieve the Twilio configuration related to phone factors (<a href='https://auth0.com/docs/api/management/v2/#!/Guardian/get_twilio'>phone Twilio configuration</a>). It has the same payload as this one. Please use it instead.
-     * 
- */ - public GetGuardianFactorsProviderSmsTwilioResponseContent getTwilioProvider(RequestOptions requestOptions) { - return this.rawClient.getTwilioProvider(requestOptions).body(); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-twilio">Update Twilio phone configuration</a> endpoint. - *
<b>Previous functionality</b>: Update the Twilio SMS provider configuration.
-     * 
- */ - public SetGuardianFactorsProviderSmsTwilioResponseContent setTwilioProvider() { - return this.rawClient.setTwilioProvider().body(); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-twilio">Update Twilio phone configuration</a> endpoint. - *
<b>Previous functionality</b>: Update the Twilio SMS provider configuration.
-     * 
- */ - public SetGuardianFactorsProviderSmsTwilioResponseContent setTwilioProvider( - SetGuardianFactorsProviderSmsTwilioRequestContent request) { - return this.rawClient.setTwilioProvider(request).body(); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-twilio">Update Twilio phone configuration</a> endpoint. - *
<b>Previous functionality</b>: Update the Twilio SMS provider configuration.
-     * 
- */ - public SetGuardianFactorsProviderSmsTwilioResponseContent setTwilioProvider( - SetGuardianFactorsProviderSmsTwilioRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setTwilioProvider(request, requestOptions).body(); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/get-phone-providers">Retrieve phone configuration</a> endpoint instead. - *
<b>Previous functionality</b>: Retrieve details for the multi-factor authentication SMS provider configured for your tenant.
-     * 
- */ - public GetGuardianFactorsProviderSmsResponseContent getSelectedProvider() { - return this.rawClient.getSelectedProvider().body(); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/get-phone-providers">Retrieve phone configuration</a> endpoint instead. - *
<b>Previous functionality</b>: Retrieve details for the multi-factor authentication SMS provider configured for your tenant.
-     * 
- */ - public GetGuardianFactorsProviderSmsResponseContent getSelectedProvider(RequestOptions requestOptions) { - return this.rawClient.getSelectedProvider(requestOptions).body(); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-phone-providers">Update phone configuration</a> endpoint instead. - *
<b>Previous functionality</b>: Update the multi-factor authentication SMS provider configuration in your tenant.
-     * 
- */ - public SetGuardianFactorsProviderSmsResponseContent setProvider( - SetGuardianFactorsProviderSmsRequestContent request) { - return this.rawClient.setProvider(request).body(); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-phone-providers">Update phone configuration</a> endpoint instead. - *
<b>Previous functionality</b>: Update the multi-factor authentication SMS provider configuration in your tenant.
-     * 
- */ - public SetGuardianFactorsProviderSmsResponseContent setProvider( - SetGuardianFactorsProviderSmsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setProvider(request, requestOptions).body(); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/get-factor-phone-templates">Retrieve enrollment and verification phone templates</a> endpoint instead. - *
<b>Previous function</b>: Retrieve details of SMS enrollment and verification templates configured for your tenant.
-     * 
- */ - public GetGuardianFactorSmsTemplatesResponseContent getTemplates() { - return this.rawClient.getTemplates().body(); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/get-factor-phone-templates">Retrieve enrollment and verification phone templates</a> endpoint instead. - *
<b>Previous function</b>: Retrieve details of SMS enrollment and verification templates configured for your tenant.
-     * 
- */ - public GetGuardianFactorSmsTemplatesResponseContent getTemplates(RequestOptions requestOptions) { - return this.rawClient.getTemplates(requestOptions).body(); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-factor-phone-templates">Update enrollment and verification phone templates</a> endpoint instead. - *
<b>Previous functionality</b>: Customize the messages sent to complete SMS enrollment and verification.
-     * 
- */ - public SetGuardianFactorSmsTemplatesResponseContent setTemplates( - SetGuardianFactorSmsTemplatesRequestContent request) { - return this.rawClient.setTemplates(request).body(); - } - - /** - * This endpoint has been deprecated. To complete this action, use the <a href="https://auth0.com/docs/api/management/v2/guardian/put-factor-phone-templates">Update enrollment and verification phone templates</a> endpoint instead. - *
<b>Previous functionality</b>: Customize the messages sent to complete SMS enrollment and verification.
-     * 
- */ - public SetGuardianFactorSmsTemplatesResponseContent setTemplates( - SetGuardianFactorSmsTemplatesRequestContent request, RequestOptions requestOptions) { - return this.rawClient.setTemplates(request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/AsyncDuoClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/AsyncDuoClient.java deleted file mode 100644 index 28fa68e40..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/AsyncDuoClient.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.guardian.factors.duo; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class AsyncDuoClient { - protected final ClientOptions clientOptions; - - protected final Supplier settingsClient; - - public AsyncDuoClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.settingsClient = Suppliers.memoize(() -> new AsyncSettingsClient(clientOptions)); - } - - public AsyncSettingsClient settings() { - return this.settingsClient.get(); - } -} 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 deleted file mode 100644 index 48d8f0434..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/AsyncRawSettingsClient.java +++ /dev/null @@ -1,298 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.guardian.factors.duo; - -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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.guardian.factors.duo.types.SetGuardianFactorDuoSettingsRequestContent; -import com.auth0.client.mgmt.guardian.factors.duo.types.UpdateGuardianFactorDuoSettingsRequestContent; -import com.auth0.client.mgmt.types.GetGuardianFactorDuoSettingsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorDuoSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateGuardianFactorDuoSettingsResponseContent; -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 AsyncRawSettingsClient { - protected final ClientOptions clientOptions; - - public AsyncRawSettingsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieves the DUO account and factor configuration. - */ - public CompletableFuture> get() { - return get(null); - } - - /** - * Retrieves the DUO account and factor configuration. - */ - public CompletableFuture> get( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/duo/settings") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorDuoSettingsResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Set the DUO account configuration and other properties specific to this factor. - */ - public CompletableFuture> set() { - return set(SetGuardianFactorDuoSettingsRequestContent.builder().build()); - } - - /** - * Set the DUO account configuration and other properties specific to this factor. - */ - public CompletableFuture> set( - SetGuardianFactorDuoSettingsRequestContent request) { - return set(request, null); - } - - /** - * Set the DUO account configuration and other properties specific to this factor. - */ - public CompletableFuture> set( - SetGuardianFactorDuoSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/duo/settings") - .build(); - 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) - .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<>(); - 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, SetGuardianFactorDuoSettingsResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - public CompletableFuture> update() { - return update(UpdateGuardianFactorDuoSettingsRequestContent.builder().build()); - } - - public CompletableFuture> update( - UpdateGuardianFactorDuoSettingsRequestContent request) { - return update(request, null); - } - - public CompletableFuture> update( - UpdateGuardianFactorDuoSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/duo/settings") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateGuardianFactorDuoSettingsResponseContent.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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/AsyncSettingsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/AsyncSettingsClient.java deleted file mode 100644 index dd1d36dbc..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/AsyncSettingsClient.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.guardian.factors.duo; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.guardian.factors.duo.types.SetGuardianFactorDuoSettingsRequestContent; -import com.auth0.client.mgmt.guardian.factors.duo.types.UpdateGuardianFactorDuoSettingsRequestContent; -import com.auth0.client.mgmt.types.GetGuardianFactorDuoSettingsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorDuoSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateGuardianFactorDuoSettingsResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncSettingsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawSettingsClient rawClient; - - public AsyncSettingsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawSettingsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawSettingsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieves the DUO account and factor configuration. - */ - public CompletableFuture get() { - return this.rawClient.get().thenApply(response -> response.body()); - } - - /** - * Retrieves the DUO account and factor configuration. - */ - public CompletableFuture get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).thenApply(response -> response.body()); - } - - /** - * Set the DUO account configuration and other properties specific to this factor. - */ - public CompletableFuture set() { - return this.rawClient.set().thenApply(response -> response.body()); - } - - /** - * Set the DUO account configuration and other properties specific to this factor. - */ - public CompletableFuture set( - SetGuardianFactorDuoSettingsRequestContent request) { - return this.rawClient.set(request).thenApply(response -> response.body()); - } - - /** - * Set the DUO account configuration and other properties specific to this factor. - */ - public CompletableFuture set( - SetGuardianFactorDuoSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.set(request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture update() { - return this.rawClient.update().thenApply(response -> response.body()); - } - - public CompletableFuture update( - UpdateGuardianFactorDuoSettingsRequestContent request) { - return this.rawClient.update(request).thenApply(response -> response.body()); - } - - public CompletableFuture update( - UpdateGuardianFactorDuoSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/DuoClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/DuoClient.java deleted file mode 100644 index 7305cbbff..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/DuoClient.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.guardian.factors.duo; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class DuoClient { - protected final ClientOptions clientOptions; - - protected final Supplier settingsClient; - - public DuoClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.settingsClient = Suppliers.memoize(() -> new SettingsClient(clientOptions)); - } - - public SettingsClient settings() { - return this.settingsClient.get(); - } -} 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 deleted file mode 100644 index 421dd9a52..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/RawSettingsClient.java +++ /dev/null @@ -1,233 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.guardian.factors.duo; - -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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.guardian.factors.duo.types.SetGuardianFactorDuoSettingsRequestContent; -import com.auth0.client.mgmt.guardian.factors.duo.types.UpdateGuardianFactorDuoSettingsRequestContent; -import com.auth0.client.mgmt.types.GetGuardianFactorDuoSettingsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorDuoSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateGuardianFactorDuoSettingsResponseContent; -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 RawSettingsClient { - protected final ClientOptions clientOptions; - - public RawSettingsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieves the DUO account and factor configuration. - */ - public ManagementApiHttpResponse get() { - return get(null); - } - - /** - * Retrieves the DUO account and factor configuration. - */ - public ManagementApiHttpResponse get(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/duo/settings") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetGuardianFactorDuoSettingsResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Set the DUO account configuration and other properties specific to this factor. - */ - public ManagementApiHttpResponse set() { - return set(SetGuardianFactorDuoSettingsRequestContent.builder().build()); - } - - /** - * Set the DUO account configuration and other properties specific to this factor. - */ - public ManagementApiHttpResponse set( - SetGuardianFactorDuoSettingsRequestContent request) { - return set(request, null); - } - - /** - * Set the DUO account configuration and other properties specific to this factor. - */ - public ManagementApiHttpResponse set( - SetGuardianFactorDuoSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/duo/settings") - .build(); - 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) - .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); - } - 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, SetGuardianFactorDuoSettingsResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse update() { - return update(UpdateGuardianFactorDuoSettingsRequestContent.builder().build()); - } - - public ManagementApiHttpResponse update( - UpdateGuardianFactorDuoSettingsRequestContent request) { - return update(request, null); - } - - public ManagementApiHttpResponse update( - UpdateGuardianFactorDuoSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("guardian/factors/duo/settings") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateGuardianFactorDuoSettingsResponseContent.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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/SettingsClient.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/SettingsClient.java deleted file mode 100644 index 043252cdf..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/SettingsClient.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.guardian.factors.duo; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.guardian.factors.duo.types.SetGuardianFactorDuoSettingsRequestContent; -import com.auth0.client.mgmt.guardian.factors.duo.types.UpdateGuardianFactorDuoSettingsRequestContent; -import com.auth0.client.mgmt.types.GetGuardianFactorDuoSettingsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorDuoSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateGuardianFactorDuoSettingsResponseContent; - -public class SettingsClient { - protected final ClientOptions clientOptions; - - private final RawSettingsClient rawClient; - - public SettingsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawSettingsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawSettingsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieves the DUO account and factor configuration. - */ - public GetGuardianFactorDuoSettingsResponseContent get() { - return this.rawClient.get().body(); - } - - /** - * Retrieves the DUO account and factor configuration. - */ - public GetGuardianFactorDuoSettingsResponseContent get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).body(); - } - - /** - * Set the DUO account configuration and other properties specific to this factor. - */ - public SetGuardianFactorDuoSettingsResponseContent set() { - return this.rawClient.set().body(); - } - - /** - * Set the DUO account configuration and other properties specific to this factor. - */ - public SetGuardianFactorDuoSettingsResponseContent set(SetGuardianFactorDuoSettingsRequestContent request) { - return this.rawClient.set(request).body(); - } - - /** - * Set the DUO account configuration and other properties specific to this factor. - */ - public SetGuardianFactorDuoSettingsResponseContent set( - SetGuardianFactorDuoSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.set(request, requestOptions).body(); - } - - public UpdateGuardianFactorDuoSettingsResponseContent update() { - return this.rawClient.update().body(); - } - - public UpdateGuardianFactorDuoSettingsResponseContent update( - UpdateGuardianFactorDuoSettingsRequestContent request) { - return this.rawClient.update(request).body(); - } - - public UpdateGuardianFactorDuoSettingsResponseContent update( - UpdateGuardianFactorDuoSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/types/SetGuardianFactorDuoSettingsRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/types/SetGuardianFactorDuoSettingsRequestContent.java deleted file mode 100644 index b830c8788..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/types/SetGuardianFactorDuoSettingsRequestContent.java +++ /dev/null @@ -1,144 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.guardian.factors.duo.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SetGuardianFactorDuoSettingsRequestContent.Builder.class) -public final class SetGuardianFactorDuoSettingsRequestContent { - private final Optional ikey; - - private final Optional skey; - - private final Optional host; - - private final Map additionalProperties; - - private SetGuardianFactorDuoSettingsRequestContent( - Optional ikey, - Optional skey, - Optional host, - Map additionalProperties) { - this.ikey = ikey; - this.skey = skey; - this.host = host; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("ikey") - public Optional getIkey() { - return ikey; - } - - @JsonProperty("skey") - public Optional getSkey() { - return skey; - } - - @JsonProperty("host") - public Optional getHost() { - return host; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorDuoSettingsRequestContent - && equalTo((SetGuardianFactorDuoSettingsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorDuoSettingsRequestContent other) { - return ikey.equals(other.ikey) && skey.equals(other.skey) && host.equals(other.host); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.ikey, this.skey, this.host); - } - - @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 ikey = Optional.empty(); - - private Optional skey = Optional.empty(); - - private Optional host = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorDuoSettingsRequestContent other) { - ikey(other.getIkey()); - skey(other.getSkey()); - host(other.getHost()); - return this; - } - - @JsonSetter(value = "ikey", nulls = Nulls.SKIP) - public Builder ikey(Optional ikey) { - this.ikey = ikey; - return this; - } - - public Builder ikey(String ikey) { - this.ikey = Optional.ofNullable(ikey); - return this; - } - - @JsonSetter(value = "skey", nulls = Nulls.SKIP) - public Builder skey(Optional skey) { - this.skey = skey; - return this; - } - - public Builder skey(String skey) { - this.skey = Optional.ofNullable(skey); - return this; - } - - @JsonSetter(value = "host", nulls = Nulls.SKIP) - public Builder host(Optional host) { - this.host = host; - return this; - } - - public Builder host(String host) { - this.host = Optional.ofNullable(host); - return this; - } - - public SetGuardianFactorDuoSettingsRequestContent build() { - return new SetGuardianFactorDuoSettingsRequestContent(ikey, skey, host, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/types/UpdateGuardianFactorDuoSettingsRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/types/UpdateGuardianFactorDuoSettingsRequestContent.java deleted file mode 100644 index aac1ee029..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/duo/types/UpdateGuardianFactorDuoSettingsRequestContent.java +++ /dev/null @@ -1,144 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.guardian.factors.duo.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateGuardianFactorDuoSettingsRequestContent.Builder.class) -public final class UpdateGuardianFactorDuoSettingsRequestContent { - private final Optional ikey; - - private final Optional skey; - - private final Optional host; - - private final Map additionalProperties; - - private UpdateGuardianFactorDuoSettingsRequestContent( - Optional ikey, - Optional skey, - Optional host, - Map additionalProperties) { - this.ikey = ikey; - this.skey = skey; - this.host = host; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("ikey") - public Optional getIkey() { - return ikey; - } - - @JsonProperty("skey") - public Optional getSkey() { - return skey; - } - - @JsonProperty("host") - public Optional getHost() { - return host; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateGuardianFactorDuoSettingsRequestContent - && equalTo((UpdateGuardianFactorDuoSettingsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateGuardianFactorDuoSettingsRequestContent other) { - return ikey.equals(other.ikey) && skey.equals(other.skey) && host.equals(other.host); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.ikey, this.skey, this.host); - } - - @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 ikey = Optional.empty(); - - private Optional skey = Optional.empty(); - - private Optional host = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateGuardianFactorDuoSettingsRequestContent other) { - ikey(other.getIkey()); - skey(other.getSkey()); - host(other.getHost()); - return this; - } - - @JsonSetter(value = "ikey", nulls = Nulls.SKIP) - public Builder ikey(Optional ikey) { - this.ikey = ikey; - return this; - } - - public Builder ikey(String ikey) { - this.ikey = Optional.ofNullable(ikey); - return this; - } - - @JsonSetter(value = "skey", nulls = Nulls.SKIP) - public Builder skey(Optional skey) { - this.skey = skey; - return this; - } - - public Builder skey(String skey) { - this.skey = Optional.ofNullable(skey); - return this; - } - - @JsonSetter(value = "host", nulls = Nulls.SKIP) - public Builder host(Optional host) { - this.host = host; - return this; - } - - public Builder host(String host) { - this.host = Optional.ofNullable(host); - return this; - } - - public UpdateGuardianFactorDuoSettingsRequestContent build() { - return new UpdateGuardianFactorDuoSettingsRequestContent(ikey, skey, host, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorPhoneMessageTypesRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorPhoneMessageTypesRequestContent.java deleted file mode 100644 index 09209a2db..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorPhoneMessageTypesRequestContent.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * 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.auth0.client.mgmt.types.GuardianFactorPhoneFactorMessageTypeEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = SetGuardianFactorPhoneMessageTypesRequestContent.Builder.class) -public final class SetGuardianFactorPhoneMessageTypesRequestContent { - private final List messageTypes; - - private final Map additionalProperties; - - private SetGuardianFactorPhoneMessageTypesRequestContent( - List messageTypes, Map additionalProperties) { - this.messageTypes = messageTypes; - this.additionalProperties = additionalProperties; - } - - /** - * @return The list of phone factors to enable on the tenant. Can include sms and voice. - */ - @JsonProperty("message_types") - public List getMessageTypes() { - return messageTypes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorPhoneMessageTypesRequestContent - && equalTo((SetGuardianFactorPhoneMessageTypesRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorPhoneMessageTypesRequestContent other) { - return messageTypes.equals(other.messageTypes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.messageTypes); - } - - @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 messageTypes = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorPhoneMessageTypesRequestContent other) { - messageTypes(other.getMessageTypes()); - return this; - } - - /** - *

The list of phone factors to enable on the tenant. Can include sms and voice.

- */ - @JsonSetter(value = "message_types", nulls = Nulls.SKIP) - public Builder messageTypes(List messageTypes) { - this.messageTypes.clear(); - if (messageTypes != null) { - this.messageTypes.addAll(messageTypes); - } - return this; - } - - public Builder addMessageTypes(GuardianFactorPhoneFactorMessageTypeEnum messageTypes) { - this.messageTypes.add(messageTypes); - return this; - } - - public Builder addAllMessageTypes(List messageTypes) { - if (messageTypes != null) { - this.messageTypes.addAll(messageTypes); - } - return this; - } - - public SetGuardianFactorPhoneMessageTypesRequestContent build() { - return new SetGuardianFactorPhoneMessageTypesRequestContent(messageTypes, additionalProperties); - } - } -} 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 deleted file mode 100644 index 8dd8996bf..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorPhoneTemplatesRequestContent.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * 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; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = SetGuardianFactorPhoneTemplatesRequestContent.Builder.class) -public final class SetGuardianFactorPhoneTemplatesRequestContent { - private final String enrollmentMessage; - - private final String verificationMessage; - - private final Map additionalProperties; - - private SetGuardianFactorPhoneTemplatesRequestContent( - String enrollmentMessage, String verificationMessage, Map additionalProperties) { - this.enrollmentMessage = enrollmentMessage; - this.verificationMessage = verificationMessage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Message sent to the user when they are invited to enroll with a phone number. - */ - @JsonProperty("enrollment_message") - public String getEnrollmentMessage() { - return enrollmentMessage; - } - - /** - * @return Message sent to the user when they are prompted to verify their account. - */ - @JsonProperty("verification_message") - public String getVerificationMessage() { - return verificationMessage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorPhoneTemplatesRequestContent - && equalTo((SetGuardianFactorPhoneTemplatesRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorPhoneTemplatesRequestContent other) { - return enrollmentMessage.equals(other.enrollmentMessage) - && verificationMessage.equals(other.verificationMessage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enrollmentMessage, this.verificationMessage); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EnrollmentMessageStage builder() { - return new Builder(); - } - - public interface EnrollmentMessageStage { - /** - *

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

- */ - VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMessage); - - Builder from(SetGuardianFactorPhoneTemplatesRequestContent other); - } - - public interface VerificationMessageStage { - /** - *

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

- */ - _FinalStage verificationMessage(@NotNull String verificationMessage); - } - - public interface _FinalStage { - SetGuardianFactorPhoneTemplatesRequestContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EnrollmentMessageStage, VerificationMessageStage, _FinalStage { - private String enrollmentMessage; - - private String verificationMessage; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SetGuardianFactorPhoneTemplatesRequestContent other) { - enrollmentMessage(other.getEnrollmentMessage()); - verificationMessage(other.getVerificationMessage()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("enrollment_message") - public VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMessage) { - this.enrollmentMessage = Objects.requireNonNull(enrollmentMessage, "enrollmentMessage must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("verification_message") - public _FinalStage verificationMessage(@NotNull String verificationMessage) { - this.verificationMessage = - Objects.requireNonNull(verificationMessage, "verificationMessage must not be null"); - return this; - } - - @java.lang.Override - public SetGuardianFactorPhoneTemplatesRequestContent build() { - return new SetGuardianFactorPhoneTemplatesRequestContent( - enrollmentMessage, verificationMessage, additionalProperties); - } - } -} 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 deleted file mode 100644 index f11acb96f..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorSmsTemplatesRequestContent.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * 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; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = SetGuardianFactorSmsTemplatesRequestContent.Builder.class) -public final class SetGuardianFactorSmsTemplatesRequestContent { - private final String enrollmentMessage; - - private final String verificationMessage; - - private final Map additionalProperties; - - private SetGuardianFactorSmsTemplatesRequestContent( - String enrollmentMessage, String verificationMessage, Map additionalProperties) { - this.enrollmentMessage = enrollmentMessage; - this.verificationMessage = verificationMessage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Message sent to the user when they are invited to enroll with a phone number. - */ - @JsonProperty("enrollment_message") - public String getEnrollmentMessage() { - return enrollmentMessage; - } - - /** - * @return Message sent to the user when they are prompted to verify their account. - */ - @JsonProperty("verification_message") - public String getVerificationMessage() { - return verificationMessage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorSmsTemplatesRequestContent - && equalTo((SetGuardianFactorSmsTemplatesRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorSmsTemplatesRequestContent other) { - return enrollmentMessage.equals(other.enrollmentMessage) - && verificationMessage.equals(other.verificationMessage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enrollmentMessage, this.verificationMessage); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EnrollmentMessageStage builder() { - return new Builder(); - } - - public interface EnrollmentMessageStage { - /** - *

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

- */ - VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMessage); - - Builder from(SetGuardianFactorSmsTemplatesRequestContent other); - } - - public interface VerificationMessageStage { - /** - *

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

- */ - _FinalStage verificationMessage(@NotNull String verificationMessage); - } - - public interface _FinalStage { - SetGuardianFactorSmsTemplatesRequestContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EnrollmentMessageStage, VerificationMessageStage, _FinalStage { - private String enrollmentMessage; - - private String verificationMessage; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SetGuardianFactorSmsTemplatesRequestContent other) { - enrollmentMessage(other.getEnrollmentMessage()); - verificationMessage(other.getVerificationMessage()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("enrollment_message") - public VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMessage) { - this.enrollmentMessage = Objects.requireNonNull(enrollmentMessage, "enrollmentMessage must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("verification_message") - public _FinalStage verificationMessage(@NotNull String verificationMessage) { - this.verificationMessage = - Objects.requireNonNull(verificationMessage, "verificationMessage must not be null"); - return this; - } - - @java.lang.Override - public SetGuardianFactorSmsTemplatesRequestContent build() { - return new SetGuardianFactorSmsTemplatesRequestContent( - enrollmentMessage, verificationMessage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPhoneRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPhoneRequestContent.java deleted file mode 100644 index db7494815..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPhoneRequestContent.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * 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.auth0.client.mgmt.types.GuardianFactorsProviderSmsProviderEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = SetGuardianFactorsProviderPhoneRequestContent.Builder.class) -public final class SetGuardianFactorsProviderPhoneRequestContent { - private final GuardianFactorsProviderSmsProviderEnum provider; - - private final Map additionalProperties; - - private SetGuardianFactorsProviderPhoneRequestContent( - GuardianFactorsProviderSmsProviderEnum provider, Map additionalProperties) { - this.provider = provider; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("provider") - public GuardianFactorsProviderSmsProviderEnum getProvider() { - return provider; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorsProviderPhoneRequestContent - && equalTo((SetGuardianFactorsProviderPhoneRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorsProviderPhoneRequestContent other) { - return provider.equals(other.provider); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.provider); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ProviderStage builder() { - return new Builder(); - } - - public interface ProviderStage { - _FinalStage provider(@NotNull GuardianFactorsProviderSmsProviderEnum provider); - - Builder from(SetGuardianFactorsProviderPhoneRequestContent other); - } - - public interface _FinalStage { - SetGuardianFactorsProviderPhoneRequestContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ProviderStage, _FinalStage { - private GuardianFactorsProviderSmsProviderEnum provider; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SetGuardianFactorsProviderPhoneRequestContent other) { - provider(other.getProvider()); - return this; - } - - @java.lang.Override - @JsonSetter("provider") - public _FinalStage provider(@NotNull GuardianFactorsProviderSmsProviderEnum provider) { - this.provider = Objects.requireNonNull(provider, "provider must not be null"); - return this; - } - - @java.lang.Override - public SetGuardianFactorsProviderPhoneRequestContent build() { - return new SetGuardianFactorsProviderPhoneRequestContent(provider, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPhoneTwilioRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPhoneTwilioRequestContent.java deleted file mode 100644 index fd52ad20f..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPhoneTwilioRequestContent.java +++ /dev/null @@ -1,318 +0,0 @@ -/** - * 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.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 = SetGuardianFactorsProviderPhoneTwilioRequestContent.Builder.class) -public final class SetGuardianFactorsProviderPhoneTwilioRequestContent { - private final OptionalNullable from; - - private final OptionalNullable messagingServiceSid; - - private final OptionalNullable authToken; - - private final OptionalNullable sid; - - private final Map additionalProperties; - - private SetGuardianFactorsProviderPhoneTwilioRequestContent( - OptionalNullable from, - OptionalNullable messagingServiceSid, - OptionalNullable authToken, - OptionalNullable sid, - Map additionalProperties) { - this.from = from; - this.messagingServiceSid = messagingServiceSid; - this.authToken = authToken; - this.sid = sid; - this.additionalProperties = additionalProperties; - } - - /** - * @return From number - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - public OptionalNullable getFrom() { - if (from == null) { - return OptionalNullable.absent(); - } - return from; - } - - /** - * @return Copilot SID - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("messaging_service_sid") - public OptionalNullable getMessagingServiceSid() { - if (messagingServiceSid == null) { - return OptionalNullable.absent(); - } - return messagingServiceSid; - } - - /** - * @return Twilio Authentication token - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("auth_token") - public OptionalNullable getAuthToken() { - if (authToken == null) { - return OptionalNullable.absent(); - } - return authToken; - } - - /** - * @return Twilio SID - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sid") - public OptionalNullable getSid() { - if (sid == null) { - return OptionalNullable.absent(); - } - return sid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - private OptionalNullable _getFrom() { - return from; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("messaging_service_sid") - private OptionalNullable _getMessagingServiceSid() { - return messagingServiceSid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("auth_token") - private OptionalNullable _getAuthToken() { - return authToken; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sid") - private OptionalNullable _getSid() { - return sid; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorsProviderPhoneTwilioRequestContent - && equalTo((SetGuardianFactorsProviderPhoneTwilioRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorsProviderPhoneTwilioRequestContent other) { - return from.equals(other.from) - && messagingServiceSid.equals(other.messagingServiceSid) - && authToken.equals(other.authToken) - && sid.equals(other.sid); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.from, this.messagingServiceSid, this.authToken, this.sid); - } - - @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 messagingServiceSid = OptionalNullable.absent(); - - private OptionalNullable authToken = OptionalNullable.absent(); - - private OptionalNullable sid = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorsProviderPhoneTwilioRequestContent other) { - from(other.getFrom()); - messagingServiceSid(other.getMessagingServiceSid()); - authToken(other.getAuthToken()); - sid(other.getSid()); - return this; - } - - /** - *

From number

- */ - @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; - } - - /** - *

Copilot SID

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

Twilio Authentication token

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

Twilio SID

- */ - @JsonSetter(value = "sid", nulls = Nulls.SKIP) - public Builder sid(@Nullable OptionalNullable sid) { - this.sid = sid; - return this; - } - - public Builder sid(String sid) { - this.sid = OptionalNullable.of(sid); - return this; - } - - public Builder sid(Optional sid) { - if (sid.isPresent()) { - this.sid = OptionalNullable.of(sid.get()); - } else { - this.sid = OptionalNullable.absent(); - } - return this; - } - - public Builder sid(com.auth0.client.mgmt.core.Nullable sid) { - if (sid.isNull()) { - this.sid = OptionalNullable.ofNull(); - } else if (sid.isEmpty()) { - this.sid = OptionalNullable.absent(); - } else { - this.sid = OptionalNullable.of(sid.get()); - } - return this; - } - - public SetGuardianFactorsProviderPhoneTwilioRequestContent build() { - return new SetGuardianFactorsProviderPhoneTwilioRequestContent( - from, messagingServiceSid, authToken, sid, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPushNotificationApnsRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPushNotificationApnsRequestContent.java deleted file mode 100644 index bb64d5a9e..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPushNotificationApnsRequestContent.java +++ /dev/null @@ -1,208 +0,0 @@ -/** - * 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.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 = SetGuardianFactorsProviderPushNotificationApnsRequestContent.Builder.class) -public final class SetGuardianFactorsProviderPushNotificationApnsRequestContent { - private final Optional sandbox; - - private final OptionalNullable bundleId; - - private final OptionalNullable p12; - - private final Map additionalProperties; - - private SetGuardianFactorsProviderPushNotificationApnsRequestContent( - Optional sandbox, - OptionalNullable bundleId, - OptionalNullable p12, - Map additionalProperties) { - this.sandbox = sandbox; - this.bundleId = bundleId; - this.p12 = p12; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("sandbox") - public Optional getSandbox() { - return sandbox; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("bundle_id") - public OptionalNullable getBundleId() { - if (bundleId == null) { - return OptionalNullable.absent(); - } - return bundleId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("p12") - public OptionalNullable getP12() { - if (p12 == null) { - return OptionalNullable.absent(); - } - return p12; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("bundle_id") - private OptionalNullable _getBundleId() { - return bundleId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("p12") - private OptionalNullable _getP12() { - return p12; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorsProviderPushNotificationApnsRequestContent - && equalTo((SetGuardianFactorsProviderPushNotificationApnsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorsProviderPushNotificationApnsRequestContent other) { - return sandbox.equals(other.sandbox) && bundleId.equals(other.bundleId) && p12.equals(other.p12); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.sandbox, this.bundleId, this.p12); - } - - @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 sandbox = Optional.empty(); - - private OptionalNullable bundleId = OptionalNullable.absent(); - - private OptionalNullable p12 = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorsProviderPushNotificationApnsRequestContent other) { - sandbox(other.getSandbox()); - bundleId(other.getBundleId()); - p12(other.getP12()); - return this; - } - - @JsonSetter(value = "sandbox", nulls = Nulls.SKIP) - public Builder sandbox(Optional sandbox) { - this.sandbox = sandbox; - return this; - } - - public Builder sandbox(Boolean sandbox) { - this.sandbox = Optional.ofNullable(sandbox); - return this; - } - - @JsonSetter(value = "bundle_id", nulls = Nulls.SKIP) - public Builder bundleId(@Nullable OptionalNullable bundleId) { - this.bundleId = bundleId; - return this; - } - - public Builder bundleId(String bundleId) { - this.bundleId = OptionalNullable.of(bundleId); - return this; - } - - public Builder bundleId(Optional bundleId) { - if (bundleId.isPresent()) { - this.bundleId = OptionalNullable.of(bundleId.get()); - } else { - this.bundleId = OptionalNullable.absent(); - } - return this; - } - - public Builder bundleId(com.auth0.client.mgmt.core.Nullable bundleId) { - if (bundleId.isNull()) { - this.bundleId = OptionalNullable.ofNull(); - } else if (bundleId.isEmpty()) { - this.bundleId = OptionalNullable.absent(); - } else { - this.bundleId = OptionalNullable.of(bundleId.get()); - } - return this; - } - - @JsonSetter(value = "p12", nulls = Nulls.SKIP) - public Builder p12(@Nullable OptionalNullable p12) { - this.p12 = p12; - return this; - } - - public Builder p12(String p12) { - this.p12 = OptionalNullable.of(p12); - return this; - } - - public Builder p12(Optional p12) { - if (p12.isPresent()) { - this.p12 = OptionalNullable.of(p12.get()); - } else { - this.p12 = OptionalNullable.absent(); - } - return this; - } - - public Builder p12(com.auth0.client.mgmt.core.Nullable p12) { - if (p12.isNull()) { - this.p12 = OptionalNullable.ofNull(); - } else if (p12.isEmpty()) { - this.p12 = OptionalNullable.absent(); - } else { - this.p12 = OptionalNullable.of(p12.get()); - } - return this; - } - - public SetGuardianFactorsProviderPushNotificationApnsRequestContent build() { - return new SetGuardianFactorsProviderPushNotificationApnsRequestContent( - sandbox, bundleId, p12, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPushNotificationFcmRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPushNotificationFcmRequestContent.java deleted file mode 100644 index c1222a5c4..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPushNotificationFcmRequestContent.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * 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.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 = SetGuardianFactorsProviderPushNotificationFcmRequestContent.Builder.class) -public final class SetGuardianFactorsProviderPushNotificationFcmRequestContent { - private final OptionalNullable serverKey; - - private final Map additionalProperties; - - private SetGuardianFactorsProviderPushNotificationFcmRequestContent( - OptionalNullable serverKey, Map additionalProperties) { - this.serverKey = serverKey; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("server_key") - public OptionalNullable getServerKey() { - if (serverKey == null) { - return OptionalNullable.absent(); - } - return serverKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("server_key") - private OptionalNullable _getServerKey() { - return serverKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorsProviderPushNotificationFcmRequestContent - && equalTo((SetGuardianFactorsProviderPushNotificationFcmRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorsProviderPushNotificationFcmRequestContent other) { - return serverKey.equals(other.serverKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.serverKey); - } - - @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 serverKey = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorsProviderPushNotificationFcmRequestContent other) { - serverKey(other.getServerKey()); - return this; - } - - @JsonSetter(value = "server_key", nulls = Nulls.SKIP) - public Builder serverKey(@Nullable OptionalNullable serverKey) { - this.serverKey = serverKey; - return this; - } - - public Builder serverKey(String serverKey) { - this.serverKey = OptionalNullable.of(serverKey); - return this; - } - - public Builder serverKey(Optional serverKey) { - if (serverKey.isPresent()) { - this.serverKey = OptionalNullable.of(serverKey.get()); - } else { - this.serverKey = OptionalNullable.absent(); - } - return this; - } - - public Builder serverKey(com.auth0.client.mgmt.core.Nullable serverKey) { - if (serverKey.isNull()) { - this.serverKey = OptionalNullable.ofNull(); - } else if (serverKey.isEmpty()) { - this.serverKey = OptionalNullable.absent(); - } else { - this.serverKey = OptionalNullable.of(serverKey.get()); - } - return this; - } - - public SetGuardianFactorsProviderPushNotificationFcmRequestContent build() { - return new SetGuardianFactorsProviderPushNotificationFcmRequestContent(serverKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPushNotificationFcmv1RequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPushNotificationFcmv1RequestContent.java deleted file mode 100644 index 00e72f513..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPushNotificationFcmv1RequestContent.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * 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.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 = SetGuardianFactorsProviderPushNotificationFcmv1RequestContent.Builder.class) -public final class SetGuardianFactorsProviderPushNotificationFcmv1RequestContent { - private final OptionalNullable serverCredentials; - - private final Map additionalProperties; - - private SetGuardianFactorsProviderPushNotificationFcmv1RequestContent( - OptionalNullable serverCredentials, Map additionalProperties) { - this.serverCredentials = serverCredentials; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("server_credentials") - public OptionalNullable getServerCredentials() { - if (serverCredentials == null) { - return OptionalNullable.absent(); - } - return serverCredentials; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("server_credentials") - private OptionalNullable _getServerCredentials() { - return serverCredentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorsProviderPushNotificationFcmv1RequestContent - && equalTo((SetGuardianFactorsProviderPushNotificationFcmv1RequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorsProviderPushNotificationFcmv1RequestContent other) { - return serverCredentials.equals(other.serverCredentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.serverCredentials); - } - - @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 serverCredentials = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorsProviderPushNotificationFcmv1RequestContent other) { - serverCredentials(other.getServerCredentials()); - return this; - } - - @JsonSetter(value = "server_credentials", nulls = Nulls.SKIP) - public Builder serverCredentials(@Nullable OptionalNullable serverCredentials) { - this.serverCredentials = serverCredentials; - return this; - } - - public Builder serverCredentials(String serverCredentials) { - this.serverCredentials = OptionalNullable.of(serverCredentials); - return this; - } - - public Builder serverCredentials(Optional serverCredentials) { - if (serverCredentials.isPresent()) { - this.serverCredentials = OptionalNullable.of(serverCredentials.get()); - } else { - this.serverCredentials = OptionalNullable.absent(); - } - return this; - } - - public Builder serverCredentials(com.auth0.client.mgmt.core.Nullable serverCredentials) { - if (serverCredentials.isNull()) { - this.serverCredentials = OptionalNullable.ofNull(); - } else if (serverCredentials.isEmpty()) { - this.serverCredentials = OptionalNullable.absent(); - } else { - this.serverCredentials = OptionalNullable.of(serverCredentials.get()); - } - return this; - } - - public SetGuardianFactorsProviderPushNotificationFcmv1RequestContent build() { - return new SetGuardianFactorsProviderPushNotificationFcmv1RequestContent( - serverCredentials, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPushNotificationRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPushNotificationRequestContent.java deleted file mode 100644 index 2c04c266d..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPushNotificationRequestContent.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * 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.auth0.client.mgmt.types.GuardianFactorsProviderPushNotificationProviderDataEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = SetGuardianFactorsProviderPushNotificationRequestContent.Builder.class) -public final class SetGuardianFactorsProviderPushNotificationRequestContent { - private final GuardianFactorsProviderPushNotificationProviderDataEnum provider; - - private final Map additionalProperties; - - private SetGuardianFactorsProviderPushNotificationRequestContent( - GuardianFactorsProviderPushNotificationProviderDataEnum provider, - Map additionalProperties) { - this.provider = provider; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("provider") - public GuardianFactorsProviderPushNotificationProviderDataEnum getProvider() { - return provider; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorsProviderPushNotificationRequestContent - && equalTo((SetGuardianFactorsProviderPushNotificationRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorsProviderPushNotificationRequestContent other) { - return provider.equals(other.provider); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.provider); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ProviderStage builder() { - return new Builder(); - } - - public interface ProviderStage { - _FinalStage provider(@NotNull GuardianFactorsProviderPushNotificationProviderDataEnum provider); - - Builder from(SetGuardianFactorsProviderPushNotificationRequestContent other); - } - - public interface _FinalStage { - SetGuardianFactorsProviderPushNotificationRequestContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ProviderStage, _FinalStage { - private GuardianFactorsProviderPushNotificationProviderDataEnum provider; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SetGuardianFactorsProviderPushNotificationRequestContent other) { - provider(other.getProvider()); - return this; - } - - @java.lang.Override - @JsonSetter("provider") - public _FinalStage provider(@NotNull GuardianFactorsProviderPushNotificationProviderDataEnum provider) { - this.provider = Objects.requireNonNull(provider, "provider must not be null"); - return this; - } - - @java.lang.Override - public SetGuardianFactorsProviderPushNotificationRequestContent build() { - return new SetGuardianFactorsProviderPushNotificationRequestContent(provider, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPushNotificationSnsRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPushNotificationSnsRequestContent.java deleted file mode 100644 index badfad30f..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderPushNotificationSnsRequestContent.java +++ /dev/null @@ -1,360 +0,0 @@ -/** - * 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.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 = SetGuardianFactorsProviderPushNotificationSnsRequestContent.Builder.class) -public final class SetGuardianFactorsProviderPushNotificationSnsRequestContent { - private final OptionalNullable awsAccessKeyId; - - private final OptionalNullable awsSecretAccessKey; - - private final OptionalNullable awsRegion; - - private final OptionalNullable snsApnsPlatformApplicationArn; - - private final OptionalNullable snsGcmPlatformApplicationArn; - - private final Map additionalProperties; - - private SetGuardianFactorsProviderPushNotificationSnsRequestContent( - OptionalNullable awsAccessKeyId, - OptionalNullable awsSecretAccessKey, - OptionalNullable awsRegion, - OptionalNullable snsApnsPlatformApplicationArn, - OptionalNullable snsGcmPlatformApplicationArn, - Map additionalProperties) { - this.awsAccessKeyId = awsAccessKeyId; - this.awsSecretAccessKey = awsSecretAccessKey; - this.awsRegion = awsRegion; - this.snsApnsPlatformApplicationArn = snsApnsPlatformApplicationArn; - this.snsGcmPlatformApplicationArn = snsGcmPlatformApplicationArn; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_access_key_id") - public OptionalNullable getAwsAccessKeyId() { - if (awsAccessKeyId == null) { - return OptionalNullable.absent(); - } - return awsAccessKeyId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_secret_access_key") - public OptionalNullable getAwsSecretAccessKey() { - if (awsSecretAccessKey == null) { - return OptionalNullable.absent(); - } - return awsSecretAccessKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_region") - public OptionalNullable getAwsRegion() { - if (awsRegion == null) { - return OptionalNullable.absent(); - } - return awsRegion; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_apns_platform_application_arn") - public OptionalNullable getSnsApnsPlatformApplicationArn() { - if (snsApnsPlatformApplicationArn == null) { - return OptionalNullable.absent(); - } - return snsApnsPlatformApplicationArn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_gcm_platform_application_arn") - public OptionalNullable getSnsGcmPlatformApplicationArn() { - if (snsGcmPlatformApplicationArn == null) { - return OptionalNullable.absent(); - } - return snsGcmPlatformApplicationArn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_access_key_id") - private OptionalNullable _getAwsAccessKeyId() { - return awsAccessKeyId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_secret_access_key") - private OptionalNullable _getAwsSecretAccessKey() { - return awsSecretAccessKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_region") - private OptionalNullable _getAwsRegion() { - return awsRegion; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_apns_platform_application_arn") - private OptionalNullable _getSnsApnsPlatformApplicationArn() { - return snsApnsPlatformApplicationArn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_gcm_platform_application_arn") - private OptionalNullable _getSnsGcmPlatformApplicationArn() { - return snsGcmPlatformApplicationArn; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorsProviderPushNotificationSnsRequestContent - && equalTo((SetGuardianFactorsProviderPushNotificationSnsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorsProviderPushNotificationSnsRequestContent other) { - return awsAccessKeyId.equals(other.awsAccessKeyId) - && awsSecretAccessKey.equals(other.awsSecretAccessKey) - && awsRegion.equals(other.awsRegion) - && snsApnsPlatformApplicationArn.equals(other.snsApnsPlatformApplicationArn) - && snsGcmPlatformApplicationArn.equals(other.snsGcmPlatformApplicationArn); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.awsAccessKeyId, - this.awsSecretAccessKey, - this.awsRegion, - this.snsApnsPlatformApplicationArn, - this.snsGcmPlatformApplicationArn); - } - - @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 awsAccessKeyId = OptionalNullable.absent(); - - private OptionalNullable awsSecretAccessKey = OptionalNullable.absent(); - - private OptionalNullable awsRegion = OptionalNullable.absent(); - - private OptionalNullable snsApnsPlatformApplicationArn = OptionalNullable.absent(); - - private OptionalNullable snsGcmPlatformApplicationArn = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorsProviderPushNotificationSnsRequestContent other) { - awsAccessKeyId(other.getAwsAccessKeyId()); - awsSecretAccessKey(other.getAwsSecretAccessKey()); - awsRegion(other.getAwsRegion()); - snsApnsPlatformApplicationArn(other.getSnsApnsPlatformApplicationArn()); - snsGcmPlatformApplicationArn(other.getSnsGcmPlatformApplicationArn()); - return this; - } - - @JsonSetter(value = "aws_access_key_id", nulls = Nulls.SKIP) - public Builder awsAccessKeyId(@Nullable OptionalNullable awsAccessKeyId) { - this.awsAccessKeyId = awsAccessKeyId; - return this; - } - - public Builder awsAccessKeyId(String awsAccessKeyId) { - this.awsAccessKeyId = OptionalNullable.of(awsAccessKeyId); - return this; - } - - public Builder awsAccessKeyId(Optional awsAccessKeyId) { - if (awsAccessKeyId.isPresent()) { - this.awsAccessKeyId = OptionalNullable.of(awsAccessKeyId.get()); - } else { - this.awsAccessKeyId = OptionalNullable.absent(); - } - return this; - } - - public Builder awsAccessKeyId(com.auth0.client.mgmt.core.Nullable awsAccessKeyId) { - if (awsAccessKeyId.isNull()) { - this.awsAccessKeyId = OptionalNullable.ofNull(); - } else if (awsAccessKeyId.isEmpty()) { - this.awsAccessKeyId = OptionalNullable.absent(); - } else { - this.awsAccessKeyId = OptionalNullable.of(awsAccessKeyId.get()); - } - return this; - } - - @JsonSetter(value = "aws_secret_access_key", nulls = Nulls.SKIP) - public Builder awsSecretAccessKey(@Nullable OptionalNullable awsSecretAccessKey) { - this.awsSecretAccessKey = awsSecretAccessKey; - return this; - } - - public Builder awsSecretAccessKey(String awsSecretAccessKey) { - this.awsSecretAccessKey = OptionalNullable.of(awsSecretAccessKey); - return this; - } - - public Builder awsSecretAccessKey(Optional awsSecretAccessKey) { - if (awsSecretAccessKey.isPresent()) { - this.awsSecretAccessKey = OptionalNullable.of(awsSecretAccessKey.get()); - } else { - this.awsSecretAccessKey = OptionalNullable.absent(); - } - return this; - } - - public Builder awsSecretAccessKey(com.auth0.client.mgmt.core.Nullable awsSecretAccessKey) { - if (awsSecretAccessKey.isNull()) { - this.awsSecretAccessKey = OptionalNullable.ofNull(); - } else if (awsSecretAccessKey.isEmpty()) { - this.awsSecretAccessKey = OptionalNullable.absent(); - } else { - this.awsSecretAccessKey = OptionalNullable.of(awsSecretAccessKey.get()); - } - return this; - } - - @JsonSetter(value = "aws_region", nulls = Nulls.SKIP) - public Builder awsRegion(@Nullable OptionalNullable awsRegion) { - this.awsRegion = awsRegion; - return this; - } - - public Builder awsRegion(String awsRegion) { - this.awsRegion = OptionalNullable.of(awsRegion); - return this; - } - - public Builder awsRegion(Optional awsRegion) { - if (awsRegion.isPresent()) { - this.awsRegion = OptionalNullable.of(awsRegion.get()); - } else { - this.awsRegion = OptionalNullable.absent(); - } - return this; - } - - public Builder awsRegion(com.auth0.client.mgmt.core.Nullable awsRegion) { - if (awsRegion.isNull()) { - this.awsRegion = OptionalNullable.ofNull(); - } else if (awsRegion.isEmpty()) { - this.awsRegion = OptionalNullable.absent(); - } else { - this.awsRegion = OptionalNullable.of(awsRegion.get()); - } - return this; - } - - @JsonSetter(value = "sns_apns_platform_application_arn", nulls = Nulls.SKIP) - public Builder snsApnsPlatformApplicationArn(@Nullable OptionalNullable snsApnsPlatformApplicationArn) { - this.snsApnsPlatformApplicationArn = snsApnsPlatformApplicationArn; - return this; - } - - public Builder snsApnsPlatformApplicationArn(String snsApnsPlatformApplicationArn) { - this.snsApnsPlatformApplicationArn = OptionalNullable.of(snsApnsPlatformApplicationArn); - return this; - } - - public Builder snsApnsPlatformApplicationArn(Optional snsApnsPlatformApplicationArn) { - if (snsApnsPlatformApplicationArn.isPresent()) { - this.snsApnsPlatformApplicationArn = OptionalNullable.of(snsApnsPlatformApplicationArn.get()); - } else { - this.snsApnsPlatformApplicationArn = OptionalNullable.absent(); - } - return this; - } - - public Builder snsApnsPlatformApplicationArn( - com.auth0.client.mgmt.core.Nullable snsApnsPlatformApplicationArn) { - if (snsApnsPlatformApplicationArn.isNull()) { - this.snsApnsPlatformApplicationArn = OptionalNullable.ofNull(); - } else if (snsApnsPlatformApplicationArn.isEmpty()) { - this.snsApnsPlatformApplicationArn = OptionalNullable.absent(); - } else { - this.snsApnsPlatformApplicationArn = OptionalNullable.of(snsApnsPlatformApplicationArn.get()); - } - return this; - } - - @JsonSetter(value = "sns_gcm_platform_application_arn", nulls = Nulls.SKIP) - public Builder snsGcmPlatformApplicationArn(@Nullable OptionalNullable snsGcmPlatformApplicationArn) { - this.snsGcmPlatformApplicationArn = snsGcmPlatformApplicationArn; - return this; - } - - public Builder snsGcmPlatformApplicationArn(String snsGcmPlatformApplicationArn) { - this.snsGcmPlatformApplicationArn = OptionalNullable.of(snsGcmPlatformApplicationArn); - return this; - } - - public Builder snsGcmPlatformApplicationArn(Optional snsGcmPlatformApplicationArn) { - if (snsGcmPlatformApplicationArn.isPresent()) { - this.snsGcmPlatformApplicationArn = OptionalNullable.of(snsGcmPlatformApplicationArn.get()); - } else { - this.snsGcmPlatformApplicationArn = OptionalNullable.absent(); - } - return this; - } - - public Builder snsGcmPlatformApplicationArn( - com.auth0.client.mgmt.core.Nullable snsGcmPlatformApplicationArn) { - if (snsGcmPlatformApplicationArn.isNull()) { - this.snsGcmPlatformApplicationArn = OptionalNullable.ofNull(); - } else if (snsGcmPlatformApplicationArn.isEmpty()) { - this.snsGcmPlatformApplicationArn = OptionalNullable.absent(); - } else { - this.snsGcmPlatformApplicationArn = OptionalNullable.of(snsGcmPlatformApplicationArn.get()); - } - return this; - } - - public SetGuardianFactorsProviderPushNotificationSnsRequestContent build() { - return new SetGuardianFactorsProviderPushNotificationSnsRequestContent( - awsAccessKeyId, - awsSecretAccessKey, - awsRegion, - snsApnsPlatformApplicationArn, - snsGcmPlatformApplicationArn, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderSmsRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderSmsRequestContent.java deleted file mode 100644 index 7d041b21f..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderSmsRequestContent.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * 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.auth0.client.mgmt.types.GuardianFactorsProviderSmsProviderEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = SetGuardianFactorsProviderSmsRequestContent.Builder.class) -public final class SetGuardianFactorsProviderSmsRequestContent { - private final GuardianFactorsProviderSmsProviderEnum provider; - - private final Map additionalProperties; - - private SetGuardianFactorsProviderSmsRequestContent( - GuardianFactorsProviderSmsProviderEnum provider, Map additionalProperties) { - this.provider = provider; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("provider") - public GuardianFactorsProviderSmsProviderEnum getProvider() { - return provider; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorsProviderSmsRequestContent - && equalTo((SetGuardianFactorsProviderSmsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorsProviderSmsRequestContent other) { - return provider.equals(other.provider); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.provider); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ProviderStage builder() { - return new Builder(); - } - - public interface ProviderStage { - _FinalStage provider(@NotNull GuardianFactorsProviderSmsProviderEnum provider); - - Builder from(SetGuardianFactorsProviderSmsRequestContent other); - } - - public interface _FinalStage { - SetGuardianFactorsProviderSmsRequestContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ProviderStage, _FinalStage { - private GuardianFactorsProviderSmsProviderEnum provider; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SetGuardianFactorsProviderSmsRequestContent other) { - provider(other.getProvider()); - return this; - } - - @java.lang.Override - @JsonSetter("provider") - public _FinalStage provider(@NotNull GuardianFactorsProviderSmsProviderEnum provider) { - this.provider = Objects.requireNonNull(provider, "provider must not be null"); - return this; - } - - @java.lang.Override - public SetGuardianFactorsProviderSmsRequestContent build() { - return new SetGuardianFactorsProviderSmsRequestContent(provider, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderSmsTwilioRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderSmsTwilioRequestContent.java deleted file mode 100644 index df428ac9b..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/SetGuardianFactorsProviderSmsTwilioRequestContent.java +++ /dev/null @@ -1,318 +0,0 @@ -/** - * 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.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 = SetGuardianFactorsProviderSmsTwilioRequestContent.Builder.class) -public final class SetGuardianFactorsProviderSmsTwilioRequestContent { - private final OptionalNullable from; - - private final OptionalNullable messagingServiceSid; - - private final OptionalNullable authToken; - - private final OptionalNullable sid; - - private final Map additionalProperties; - - private SetGuardianFactorsProviderSmsTwilioRequestContent( - OptionalNullable from, - OptionalNullable messagingServiceSid, - OptionalNullable authToken, - OptionalNullable sid, - Map additionalProperties) { - this.from = from; - this.messagingServiceSid = messagingServiceSid; - this.authToken = authToken; - this.sid = sid; - this.additionalProperties = additionalProperties; - } - - /** - * @return From number - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - public OptionalNullable getFrom() { - if (from == null) { - return OptionalNullable.absent(); - } - return from; - } - - /** - * @return Copilot SID - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("messaging_service_sid") - public OptionalNullable getMessagingServiceSid() { - if (messagingServiceSid == null) { - return OptionalNullable.absent(); - } - return messagingServiceSid; - } - - /** - * @return Twilio Authentication token - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("auth_token") - public OptionalNullable getAuthToken() { - if (authToken == null) { - return OptionalNullable.absent(); - } - return authToken; - } - - /** - * @return Twilio SID - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sid") - public OptionalNullable getSid() { - if (sid == null) { - return OptionalNullable.absent(); - } - return sid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - private OptionalNullable _getFrom() { - return from; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("messaging_service_sid") - private OptionalNullable _getMessagingServiceSid() { - return messagingServiceSid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("auth_token") - private OptionalNullable _getAuthToken() { - return authToken; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sid") - private OptionalNullable _getSid() { - return sid; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorsProviderSmsTwilioRequestContent - && equalTo((SetGuardianFactorsProviderSmsTwilioRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorsProviderSmsTwilioRequestContent other) { - return from.equals(other.from) - && messagingServiceSid.equals(other.messagingServiceSid) - && authToken.equals(other.authToken) - && sid.equals(other.sid); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.from, this.messagingServiceSid, this.authToken, this.sid); - } - - @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 messagingServiceSid = OptionalNullable.absent(); - - private OptionalNullable authToken = OptionalNullable.absent(); - - private OptionalNullable sid = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorsProviderSmsTwilioRequestContent other) { - from(other.getFrom()); - messagingServiceSid(other.getMessagingServiceSid()); - authToken(other.getAuthToken()); - sid(other.getSid()); - return this; - } - - /** - *

From number

- */ - @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; - } - - /** - *

Copilot SID

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

Twilio Authentication token

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

Twilio SID

- */ - @JsonSetter(value = "sid", nulls = Nulls.SKIP) - public Builder sid(@Nullable OptionalNullable sid) { - this.sid = sid; - return this; - } - - public Builder sid(String sid) { - this.sid = OptionalNullable.of(sid); - return this; - } - - public Builder sid(Optional sid) { - if (sid.isPresent()) { - this.sid = OptionalNullable.of(sid.get()); - } else { - this.sid = OptionalNullable.absent(); - } - return this; - } - - public Builder sid(com.auth0.client.mgmt.core.Nullable sid) { - if (sid.isNull()) { - this.sid = OptionalNullable.ofNull(); - } else if (sid.isEmpty()) { - this.sid = OptionalNullable.absent(); - } else { - this.sid = OptionalNullable.of(sid.get()); - } - return this; - } - - public SetGuardianFactorsProviderSmsTwilioRequestContent build() { - return new SetGuardianFactorsProviderSmsTwilioRequestContent( - from, messagingServiceSid, authToken, sid, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/UpdateGuardianFactorsProviderPushNotificationApnsRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/UpdateGuardianFactorsProviderPushNotificationApnsRequestContent.java deleted file mode 100644 index 64ebbc400..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/UpdateGuardianFactorsProviderPushNotificationApnsRequestContent.java +++ /dev/null @@ -1,208 +0,0 @@ -/** - * 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.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 = UpdateGuardianFactorsProviderPushNotificationApnsRequestContent.Builder.class) -public final class UpdateGuardianFactorsProviderPushNotificationApnsRequestContent { - private final Optional sandbox; - - private final OptionalNullable bundleId; - - private final OptionalNullable p12; - - private final Map additionalProperties; - - private UpdateGuardianFactorsProviderPushNotificationApnsRequestContent( - Optional sandbox, - OptionalNullable bundleId, - OptionalNullable p12, - Map additionalProperties) { - this.sandbox = sandbox; - this.bundleId = bundleId; - this.p12 = p12; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("sandbox") - public Optional getSandbox() { - return sandbox; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("bundle_id") - public OptionalNullable getBundleId() { - if (bundleId == null) { - return OptionalNullable.absent(); - } - return bundleId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("p12") - public OptionalNullable getP12() { - if (p12 == null) { - return OptionalNullable.absent(); - } - return p12; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("bundle_id") - private OptionalNullable _getBundleId() { - return bundleId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("p12") - private OptionalNullable _getP12() { - return p12; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateGuardianFactorsProviderPushNotificationApnsRequestContent - && equalTo((UpdateGuardianFactorsProviderPushNotificationApnsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateGuardianFactorsProviderPushNotificationApnsRequestContent other) { - return sandbox.equals(other.sandbox) && bundleId.equals(other.bundleId) && p12.equals(other.p12); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.sandbox, this.bundleId, this.p12); - } - - @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 sandbox = Optional.empty(); - - private OptionalNullable bundleId = OptionalNullable.absent(); - - private OptionalNullable p12 = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateGuardianFactorsProviderPushNotificationApnsRequestContent other) { - sandbox(other.getSandbox()); - bundleId(other.getBundleId()); - p12(other.getP12()); - return this; - } - - @JsonSetter(value = "sandbox", nulls = Nulls.SKIP) - public Builder sandbox(Optional sandbox) { - this.sandbox = sandbox; - return this; - } - - public Builder sandbox(Boolean sandbox) { - this.sandbox = Optional.ofNullable(sandbox); - return this; - } - - @JsonSetter(value = "bundle_id", nulls = Nulls.SKIP) - public Builder bundleId(@Nullable OptionalNullable bundleId) { - this.bundleId = bundleId; - return this; - } - - public Builder bundleId(String bundleId) { - this.bundleId = OptionalNullable.of(bundleId); - return this; - } - - public Builder bundleId(Optional bundleId) { - if (bundleId.isPresent()) { - this.bundleId = OptionalNullable.of(bundleId.get()); - } else { - this.bundleId = OptionalNullable.absent(); - } - return this; - } - - public Builder bundleId(com.auth0.client.mgmt.core.Nullable bundleId) { - if (bundleId.isNull()) { - this.bundleId = OptionalNullable.ofNull(); - } else if (bundleId.isEmpty()) { - this.bundleId = OptionalNullable.absent(); - } else { - this.bundleId = OptionalNullable.of(bundleId.get()); - } - return this; - } - - @JsonSetter(value = "p12", nulls = Nulls.SKIP) - public Builder p12(@Nullable OptionalNullable p12) { - this.p12 = p12; - return this; - } - - public Builder p12(String p12) { - this.p12 = OptionalNullable.of(p12); - return this; - } - - public Builder p12(Optional p12) { - if (p12.isPresent()) { - this.p12 = OptionalNullable.of(p12.get()); - } else { - this.p12 = OptionalNullable.absent(); - } - return this; - } - - public Builder p12(com.auth0.client.mgmt.core.Nullable p12) { - if (p12.isNull()) { - this.p12 = OptionalNullable.ofNull(); - } else if (p12.isEmpty()) { - this.p12 = OptionalNullable.absent(); - } else { - this.p12 = OptionalNullable.of(p12.get()); - } - return this; - } - - public UpdateGuardianFactorsProviderPushNotificationApnsRequestContent build() { - return new UpdateGuardianFactorsProviderPushNotificationApnsRequestContent( - sandbox, bundleId, p12, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/UpdateGuardianFactorsProviderPushNotificationFcmRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/UpdateGuardianFactorsProviderPushNotificationFcmRequestContent.java deleted file mode 100644 index 26c1b64e2..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/UpdateGuardianFactorsProviderPushNotificationFcmRequestContent.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * 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.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 = UpdateGuardianFactorsProviderPushNotificationFcmRequestContent.Builder.class) -public final class UpdateGuardianFactorsProviderPushNotificationFcmRequestContent { - private final OptionalNullable serverKey; - - private final Map additionalProperties; - - private UpdateGuardianFactorsProviderPushNotificationFcmRequestContent( - OptionalNullable serverKey, Map additionalProperties) { - this.serverKey = serverKey; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("server_key") - public OptionalNullable getServerKey() { - if (serverKey == null) { - return OptionalNullable.absent(); - } - return serverKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("server_key") - private OptionalNullable _getServerKey() { - return serverKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateGuardianFactorsProviderPushNotificationFcmRequestContent - && equalTo((UpdateGuardianFactorsProviderPushNotificationFcmRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateGuardianFactorsProviderPushNotificationFcmRequestContent other) { - return serverKey.equals(other.serverKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.serverKey); - } - - @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 serverKey = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateGuardianFactorsProviderPushNotificationFcmRequestContent other) { - serverKey(other.getServerKey()); - return this; - } - - @JsonSetter(value = "server_key", nulls = Nulls.SKIP) - public Builder serverKey(@Nullable OptionalNullable serverKey) { - this.serverKey = serverKey; - return this; - } - - public Builder serverKey(String serverKey) { - this.serverKey = OptionalNullable.of(serverKey); - return this; - } - - public Builder serverKey(Optional serverKey) { - if (serverKey.isPresent()) { - this.serverKey = OptionalNullable.of(serverKey.get()); - } else { - this.serverKey = OptionalNullable.absent(); - } - return this; - } - - public Builder serverKey(com.auth0.client.mgmt.core.Nullable serverKey) { - if (serverKey.isNull()) { - this.serverKey = OptionalNullable.ofNull(); - } else if (serverKey.isEmpty()) { - this.serverKey = OptionalNullable.absent(); - } else { - this.serverKey = OptionalNullable.of(serverKey.get()); - } - return this; - } - - public UpdateGuardianFactorsProviderPushNotificationFcmRequestContent build() { - return new UpdateGuardianFactorsProviderPushNotificationFcmRequestContent(serverKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent.java deleted file mode 100644 index 7c62c7240..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * 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.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 = UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent.Builder.class) -public final class UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent { - private final OptionalNullable serverCredentials; - - private final Map additionalProperties; - - private UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent( - OptionalNullable serverCredentials, Map additionalProperties) { - this.serverCredentials = serverCredentials; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("server_credentials") - public OptionalNullable getServerCredentials() { - if (serverCredentials == null) { - return OptionalNullable.absent(); - } - return serverCredentials; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("server_credentials") - private OptionalNullable _getServerCredentials() { - return serverCredentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent - && equalTo((UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent other) { - return serverCredentials.equals(other.serverCredentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.serverCredentials); - } - - @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 serverCredentials = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent other) { - serverCredentials(other.getServerCredentials()); - return this; - } - - @JsonSetter(value = "server_credentials", nulls = Nulls.SKIP) - public Builder serverCredentials(@Nullable OptionalNullable serverCredentials) { - this.serverCredentials = serverCredentials; - return this; - } - - public Builder serverCredentials(String serverCredentials) { - this.serverCredentials = OptionalNullable.of(serverCredentials); - return this; - } - - public Builder serverCredentials(Optional serverCredentials) { - if (serverCredentials.isPresent()) { - this.serverCredentials = OptionalNullable.of(serverCredentials.get()); - } else { - this.serverCredentials = OptionalNullable.absent(); - } - return this; - } - - public Builder serverCredentials(com.auth0.client.mgmt.core.Nullable serverCredentials) { - if (serverCredentials.isNull()) { - this.serverCredentials = OptionalNullable.ofNull(); - } else if (serverCredentials.isEmpty()) { - this.serverCredentials = OptionalNullable.absent(); - } else { - this.serverCredentials = OptionalNullable.of(serverCredentials.get()); - } - return this; - } - - public UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent build() { - return new UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent( - serverCredentials, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/UpdateGuardianFactorsProviderPushNotificationSnsRequestContent.java b/src/main/java/com/auth0/client/mgmt/guardian/factors/types/UpdateGuardianFactorsProviderPushNotificationSnsRequestContent.java deleted file mode 100644 index 1b2f29eed..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/factors/types/UpdateGuardianFactorsProviderPushNotificationSnsRequestContent.java +++ /dev/null @@ -1,360 +0,0 @@ -/** - * 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.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 = UpdateGuardianFactorsProviderPushNotificationSnsRequestContent.Builder.class) -public final class UpdateGuardianFactorsProviderPushNotificationSnsRequestContent { - private final OptionalNullable awsAccessKeyId; - - private final OptionalNullable awsSecretAccessKey; - - private final OptionalNullable awsRegion; - - private final OptionalNullable snsApnsPlatformApplicationArn; - - private final OptionalNullable snsGcmPlatformApplicationArn; - - private final Map additionalProperties; - - private UpdateGuardianFactorsProviderPushNotificationSnsRequestContent( - OptionalNullable awsAccessKeyId, - OptionalNullable awsSecretAccessKey, - OptionalNullable awsRegion, - OptionalNullable snsApnsPlatformApplicationArn, - OptionalNullable snsGcmPlatformApplicationArn, - Map additionalProperties) { - this.awsAccessKeyId = awsAccessKeyId; - this.awsSecretAccessKey = awsSecretAccessKey; - this.awsRegion = awsRegion; - this.snsApnsPlatformApplicationArn = snsApnsPlatformApplicationArn; - this.snsGcmPlatformApplicationArn = snsGcmPlatformApplicationArn; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_access_key_id") - public OptionalNullable getAwsAccessKeyId() { - if (awsAccessKeyId == null) { - return OptionalNullable.absent(); - } - return awsAccessKeyId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_secret_access_key") - public OptionalNullable getAwsSecretAccessKey() { - if (awsSecretAccessKey == null) { - return OptionalNullable.absent(); - } - return awsSecretAccessKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_region") - public OptionalNullable getAwsRegion() { - if (awsRegion == null) { - return OptionalNullable.absent(); - } - return awsRegion; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_apns_platform_application_arn") - public OptionalNullable getSnsApnsPlatformApplicationArn() { - if (snsApnsPlatformApplicationArn == null) { - return OptionalNullable.absent(); - } - return snsApnsPlatformApplicationArn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_gcm_platform_application_arn") - public OptionalNullable getSnsGcmPlatformApplicationArn() { - if (snsGcmPlatformApplicationArn == null) { - return OptionalNullable.absent(); - } - return snsGcmPlatformApplicationArn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_access_key_id") - private OptionalNullable _getAwsAccessKeyId() { - return awsAccessKeyId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_secret_access_key") - private OptionalNullable _getAwsSecretAccessKey() { - return awsSecretAccessKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_region") - private OptionalNullable _getAwsRegion() { - return awsRegion; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_apns_platform_application_arn") - private OptionalNullable _getSnsApnsPlatformApplicationArn() { - return snsApnsPlatformApplicationArn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_gcm_platform_application_arn") - private OptionalNullable _getSnsGcmPlatformApplicationArn() { - return snsGcmPlatformApplicationArn; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateGuardianFactorsProviderPushNotificationSnsRequestContent - && equalTo((UpdateGuardianFactorsProviderPushNotificationSnsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateGuardianFactorsProviderPushNotificationSnsRequestContent other) { - return awsAccessKeyId.equals(other.awsAccessKeyId) - && awsSecretAccessKey.equals(other.awsSecretAccessKey) - && awsRegion.equals(other.awsRegion) - && snsApnsPlatformApplicationArn.equals(other.snsApnsPlatformApplicationArn) - && snsGcmPlatformApplicationArn.equals(other.snsGcmPlatformApplicationArn); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.awsAccessKeyId, - this.awsSecretAccessKey, - this.awsRegion, - this.snsApnsPlatformApplicationArn, - this.snsGcmPlatformApplicationArn); - } - - @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 awsAccessKeyId = OptionalNullable.absent(); - - private OptionalNullable awsSecretAccessKey = OptionalNullable.absent(); - - private OptionalNullable awsRegion = OptionalNullable.absent(); - - private OptionalNullable snsApnsPlatformApplicationArn = OptionalNullable.absent(); - - private OptionalNullable snsGcmPlatformApplicationArn = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateGuardianFactorsProviderPushNotificationSnsRequestContent other) { - awsAccessKeyId(other.getAwsAccessKeyId()); - awsSecretAccessKey(other.getAwsSecretAccessKey()); - awsRegion(other.getAwsRegion()); - snsApnsPlatformApplicationArn(other.getSnsApnsPlatformApplicationArn()); - snsGcmPlatformApplicationArn(other.getSnsGcmPlatformApplicationArn()); - return this; - } - - @JsonSetter(value = "aws_access_key_id", nulls = Nulls.SKIP) - public Builder awsAccessKeyId(@Nullable OptionalNullable awsAccessKeyId) { - this.awsAccessKeyId = awsAccessKeyId; - return this; - } - - public Builder awsAccessKeyId(String awsAccessKeyId) { - this.awsAccessKeyId = OptionalNullable.of(awsAccessKeyId); - return this; - } - - public Builder awsAccessKeyId(Optional awsAccessKeyId) { - if (awsAccessKeyId.isPresent()) { - this.awsAccessKeyId = OptionalNullable.of(awsAccessKeyId.get()); - } else { - this.awsAccessKeyId = OptionalNullable.absent(); - } - return this; - } - - public Builder awsAccessKeyId(com.auth0.client.mgmt.core.Nullable awsAccessKeyId) { - if (awsAccessKeyId.isNull()) { - this.awsAccessKeyId = OptionalNullable.ofNull(); - } else if (awsAccessKeyId.isEmpty()) { - this.awsAccessKeyId = OptionalNullable.absent(); - } else { - this.awsAccessKeyId = OptionalNullable.of(awsAccessKeyId.get()); - } - return this; - } - - @JsonSetter(value = "aws_secret_access_key", nulls = Nulls.SKIP) - public Builder awsSecretAccessKey(@Nullable OptionalNullable awsSecretAccessKey) { - this.awsSecretAccessKey = awsSecretAccessKey; - return this; - } - - public Builder awsSecretAccessKey(String awsSecretAccessKey) { - this.awsSecretAccessKey = OptionalNullable.of(awsSecretAccessKey); - return this; - } - - public Builder awsSecretAccessKey(Optional awsSecretAccessKey) { - if (awsSecretAccessKey.isPresent()) { - this.awsSecretAccessKey = OptionalNullable.of(awsSecretAccessKey.get()); - } else { - this.awsSecretAccessKey = OptionalNullable.absent(); - } - return this; - } - - public Builder awsSecretAccessKey(com.auth0.client.mgmt.core.Nullable awsSecretAccessKey) { - if (awsSecretAccessKey.isNull()) { - this.awsSecretAccessKey = OptionalNullable.ofNull(); - } else if (awsSecretAccessKey.isEmpty()) { - this.awsSecretAccessKey = OptionalNullable.absent(); - } else { - this.awsSecretAccessKey = OptionalNullable.of(awsSecretAccessKey.get()); - } - return this; - } - - @JsonSetter(value = "aws_region", nulls = Nulls.SKIP) - public Builder awsRegion(@Nullable OptionalNullable awsRegion) { - this.awsRegion = awsRegion; - return this; - } - - public Builder awsRegion(String awsRegion) { - this.awsRegion = OptionalNullable.of(awsRegion); - return this; - } - - public Builder awsRegion(Optional awsRegion) { - if (awsRegion.isPresent()) { - this.awsRegion = OptionalNullable.of(awsRegion.get()); - } else { - this.awsRegion = OptionalNullable.absent(); - } - return this; - } - - public Builder awsRegion(com.auth0.client.mgmt.core.Nullable awsRegion) { - if (awsRegion.isNull()) { - this.awsRegion = OptionalNullable.ofNull(); - } else if (awsRegion.isEmpty()) { - this.awsRegion = OptionalNullable.absent(); - } else { - this.awsRegion = OptionalNullable.of(awsRegion.get()); - } - return this; - } - - @JsonSetter(value = "sns_apns_platform_application_arn", nulls = Nulls.SKIP) - public Builder snsApnsPlatformApplicationArn(@Nullable OptionalNullable snsApnsPlatformApplicationArn) { - this.snsApnsPlatformApplicationArn = snsApnsPlatformApplicationArn; - return this; - } - - public Builder snsApnsPlatformApplicationArn(String snsApnsPlatformApplicationArn) { - this.snsApnsPlatformApplicationArn = OptionalNullable.of(snsApnsPlatformApplicationArn); - return this; - } - - public Builder snsApnsPlatformApplicationArn(Optional snsApnsPlatformApplicationArn) { - if (snsApnsPlatformApplicationArn.isPresent()) { - this.snsApnsPlatformApplicationArn = OptionalNullable.of(snsApnsPlatformApplicationArn.get()); - } else { - this.snsApnsPlatformApplicationArn = OptionalNullable.absent(); - } - return this; - } - - public Builder snsApnsPlatformApplicationArn( - com.auth0.client.mgmt.core.Nullable snsApnsPlatformApplicationArn) { - if (snsApnsPlatformApplicationArn.isNull()) { - this.snsApnsPlatformApplicationArn = OptionalNullable.ofNull(); - } else if (snsApnsPlatformApplicationArn.isEmpty()) { - this.snsApnsPlatformApplicationArn = OptionalNullable.absent(); - } else { - this.snsApnsPlatformApplicationArn = OptionalNullable.of(snsApnsPlatformApplicationArn.get()); - } - return this; - } - - @JsonSetter(value = "sns_gcm_platform_application_arn", nulls = Nulls.SKIP) - public Builder snsGcmPlatformApplicationArn(@Nullable OptionalNullable snsGcmPlatformApplicationArn) { - this.snsGcmPlatformApplicationArn = snsGcmPlatformApplicationArn; - return this; - } - - public Builder snsGcmPlatformApplicationArn(String snsGcmPlatformApplicationArn) { - this.snsGcmPlatformApplicationArn = OptionalNullable.of(snsGcmPlatformApplicationArn); - return this; - } - - public Builder snsGcmPlatformApplicationArn(Optional snsGcmPlatformApplicationArn) { - if (snsGcmPlatformApplicationArn.isPresent()) { - this.snsGcmPlatformApplicationArn = OptionalNullable.of(snsGcmPlatformApplicationArn.get()); - } else { - this.snsGcmPlatformApplicationArn = OptionalNullable.absent(); - } - return this; - } - - public Builder snsGcmPlatformApplicationArn( - com.auth0.client.mgmt.core.Nullable snsGcmPlatformApplicationArn) { - if (snsGcmPlatformApplicationArn.isNull()) { - this.snsGcmPlatformApplicationArn = OptionalNullable.ofNull(); - } else if (snsGcmPlatformApplicationArn.isEmpty()) { - this.snsGcmPlatformApplicationArn = OptionalNullable.absent(); - } else { - this.snsGcmPlatformApplicationArn = OptionalNullable.of(snsGcmPlatformApplicationArn.get()); - } - return this; - } - - public UpdateGuardianFactorsProviderPushNotificationSnsRequestContent build() { - return new UpdateGuardianFactorsProviderPushNotificationSnsRequestContent( - awsAccessKeyId, - awsSecretAccessKey, - awsRegion, - snsApnsPlatformApplicationArn, - snsGcmPlatformApplicationArn, - additionalProperties); - } - } -} 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 deleted file mode 100644 index 680a9edde..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/types/CreateGuardianEnrollmentTicketRequestContent.java +++ /dev/null @@ -1,323 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.guardian.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.GuardianEnrollmentFactorEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateGuardianEnrollmentTicketRequestContent.Builder.class) -public final class CreateGuardianEnrollmentTicketRequestContent { - private final String userId; - - private final Optional email; - - private final Optional sendMail; - - private final Optional emailLocale; - - private final Optional factor; - - private final Optional allowMultipleEnrollments; - - private final Map additionalProperties; - - private CreateGuardianEnrollmentTicketRequestContent( - String userId, - Optional email, - Optional sendMail, - Optional emailLocale, - Optional factor, - Optional allowMultipleEnrollments, - Map additionalProperties) { - this.userId = userId; - this.email = email; - this.sendMail = sendMail; - this.emailLocale = emailLocale; - this.factor = factor; - this.allowMultipleEnrollments = allowMultipleEnrollments; - this.additionalProperties = additionalProperties; - } - - /** - * @return user_id for the enrollment ticket - */ - @JsonProperty("user_id") - public String getUserId() { - return userId; - } - - /** - * @return alternate email to which the enrollment email will be sent. Optional - by default, the email will be sent to the user's default address - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - /** - * @return Send an email to the user to start the enrollment - */ - @JsonProperty("send_mail") - public Optional getSendMail() { - return sendMail; - } - - /** - * @return Optional. Specify the locale of the enrollment email. Used with send_email. - */ - @JsonProperty("email_locale") - public Optional getEmailLocale() { - return emailLocale; - } - - @JsonProperty("factor") - public Optional getFactor() { - return factor; - } - - /** - * @return Optional. Allows a user who has previously enrolled in MFA to enroll with additional factors.<br />Note: Parameter can only be used with Universal Login; it cannot be used with Classic Login or custom MFA pages. - */ - @JsonProperty("allow_multiple_enrollments") - public Optional getAllowMultipleEnrollments() { - return allowMultipleEnrollments; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateGuardianEnrollmentTicketRequestContent - && equalTo((CreateGuardianEnrollmentTicketRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateGuardianEnrollmentTicketRequestContent other) { - return userId.equals(other.userId) - && email.equals(other.email) - && sendMail.equals(other.sendMail) - && emailLocale.equals(other.emailLocale) - && factor.equals(other.factor) - && allowMultipleEnrollments.equals(other.allowMultipleEnrollments); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.userId, this.email, this.sendMail, this.emailLocale, this.factor, this.allowMultipleEnrollments); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static UserIdStage builder() { - return new Builder(); - } - - public interface UserIdStage { - /** - *

user_id for the enrollment ticket

- */ - _FinalStage userId(@NotNull String userId); - - Builder from(CreateGuardianEnrollmentTicketRequestContent other); - } - - public interface _FinalStage { - CreateGuardianEnrollmentTicketRequestContent build(); - - /** - *

alternate email to which the enrollment email will be sent. Optional - by default, the email will be sent to the user's default address

- */ - _FinalStage email(Optional email); - - _FinalStage email(String email); - - /** - *

Send an email to the user to start the enrollment

- */ - _FinalStage sendMail(Optional sendMail); - - _FinalStage sendMail(Boolean sendMail); - - /** - *

Optional. Specify the locale of the enrollment email. Used with send_email.

- */ - _FinalStage emailLocale(Optional emailLocale); - - _FinalStage emailLocale(String emailLocale); - - _FinalStage factor(Optional factor); - - _FinalStage factor(GuardianEnrollmentFactorEnum factor); - - /** - *

Optional. Allows a user who has previously enrolled in MFA to enroll with additional factors.<br />Note: Parameter can only be used with Universal Login; it cannot be used with Classic Login or custom MFA pages.

- */ - _FinalStage allowMultipleEnrollments(Optional allowMultipleEnrollments); - - _FinalStage allowMultipleEnrollments(Boolean allowMultipleEnrollments); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements UserIdStage, _FinalStage { - private String userId; - - private Optional allowMultipleEnrollments = Optional.empty(); - - private Optional factor = Optional.empty(); - - private Optional emailLocale = Optional.empty(); - - private Optional sendMail = Optional.empty(); - - private Optional email = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateGuardianEnrollmentTicketRequestContent other) { - userId(other.getUserId()); - email(other.getEmail()); - sendMail(other.getSendMail()); - emailLocale(other.getEmailLocale()); - factor(other.getFactor()); - allowMultipleEnrollments(other.getAllowMultipleEnrollments()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("user_id") - public _FinalStage userId(@NotNull String userId) { - this.userId = Objects.requireNonNull(userId, "userId must not be null"); - return this; - } - - /** - *

Optional. Allows a user who has previously enrolled in MFA to enroll with additional factors.<br />Note: Parameter can only be used with Universal Login; it cannot be used with Classic Login or custom MFA pages.

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

Optional. Allows a user who has previously enrolled in MFA to enroll with additional factors.<br />Note: Parameter can only be used with Universal Login; it cannot be used with Classic Login or custom MFA pages.

- */ - @java.lang.Override - @JsonSetter(value = "allow_multiple_enrollments", nulls = Nulls.SKIP) - public _FinalStage allowMultipleEnrollments(Optional allowMultipleEnrollments) { - this.allowMultipleEnrollments = allowMultipleEnrollments; - return this; - } - - @java.lang.Override - public _FinalStage factor(GuardianEnrollmentFactorEnum factor) { - this.factor = Optional.ofNullable(factor); - return this; - } - - @java.lang.Override - @JsonSetter(value = "factor", nulls = Nulls.SKIP) - public _FinalStage factor(Optional factor) { - this.factor = factor; - return this; - } - - /** - *

Optional. Specify the locale of the enrollment email. Used with send_email.

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

Optional. Specify the locale of the enrollment email. Used with send_email.

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

Send an email to the user to start the enrollment

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

Send an email to the user to start the enrollment

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

alternate email to which the enrollment email will be sent. Optional - by default, the email will be sent to the user's default address

- * @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; - } - - /** - *

alternate email to which the enrollment email will be sent. Optional - by default, the email will be sent to the user's default address

- */ - @java.lang.Override - @JsonSetter(value = "email", nulls = Nulls.SKIP) - public _FinalStage email(Optional email) { - this.email = email; - return this; - } - - @java.lang.Override - public CreateGuardianEnrollmentTicketRequestContent build() { - return new CreateGuardianEnrollmentTicketRequestContent( - userId, email, sendMail, emailLocale, factor, allowMultipleEnrollments, additionalProperties); - } - } -} 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 deleted file mode 100644 index 1f50447d3..000000000 --- a/src/main/java/com/auth0/client/mgmt/guardian/types/SetGuardianFactorRequestContent.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.guardian.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = SetGuardianFactorRequestContent.Builder.class) -public final class SetGuardianFactorRequestContent { - private final boolean enabled; - - private final Map additionalProperties; - - private SetGuardianFactorRequestContent(boolean enabled, Map additionalProperties) { - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether this factor is enabled (true) or disabled (false). - */ - @JsonProperty("enabled") - public boolean getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorRequestContent && equalTo((SetGuardianFactorRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorRequestContent other) { - return enabled == other.enabled; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EnabledStage builder() { - return new Builder(); - } - - public interface EnabledStage { - /** - *

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

- */ - _FinalStage enabled(boolean enabled); - - Builder from(SetGuardianFactorRequestContent other); - } - - public interface _FinalStage { - SetGuardianFactorRequestContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EnabledStage, _FinalStage { - private boolean enabled; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SetGuardianFactorRequestContent other) { - enabled(other.getEnabled()); - 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. - */ - @java.lang.Override - @JsonSetter("enabled") - public _FinalStage enabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - @java.lang.Override - public SetGuardianFactorRequestContent build() { - return new SetGuardianFactorRequestContent(enabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/hooks/AsyncRawSecretsClient.java b/src/main/java/com/auth0/client/mgmt/hooks/AsyncRawSecretsClient.java deleted file mode 100644 index 29879ba8e..000000000 --- a/src/main/java/com/auth0/client/mgmt/hooks/AsyncRawSecretsClient.java +++ /dev/null @@ -1,413 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.hooks; - -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.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.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import java.io.IOException; -import java.util.List; -import java.util.Map; -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 AsyncRawSecretsClient { - protected final ClientOptions clientOptions; - - public AsyncRawSecretsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a hook's secrets by the ID of the hook. - */ - public CompletableFuture>> get(String id) { - return get(id, null); - } - - /** - * Retrieve a hook's secrets by the ID of the hook. - */ - public CompletableFuture>> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks") - .addPathSegment(id) - .addPathSegments("secrets") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture>> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Add one or more secrets to an existing hook. Accepts an object of key-value pairs, where the key is the name of the secret. A hook can have a maximum of 20 secrets. - */ - public CompletableFuture> create(String id, Map request) { - return create(id, request, null); - } - - /** - * Add one or more secrets to an existing hook. Accepts an object of key-value pairs, where the key is the name of the secret. A hook can have a maximum of 20 secrets. - */ - public CompletableFuture> create( - String id, Map request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks") - .addPathSegment(id) - .addPathSegments("secrets") - .build(); - 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) - .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); - } - 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 (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 one or more existing secrets for a given hook. Accepts an array of secret names to delete. - */ - public CompletableFuture> delete(String id, List request) { - return delete(id, request, null); - } - - /** - * Delete one or more existing secrets for a given hook. Accepts an array of secret names to delete. - */ - public CompletableFuture> delete( - String id, List request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks") - .addPathSegment(id) - .addPathSegments("secrets") - .build(); - 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) - .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); - } - 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 (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 one or more existing secrets for an existing hook. Accepts an object of key-value pairs, where the key is the name of the existing secret. - */ - public CompletableFuture> update(String id, Map request) { - return update(id, request, null); - } - - /** - * Update one or more existing secrets for an existing hook. Accepts an object of key-value pairs, where the key is the name of the existing secret. - */ - public CompletableFuture> update( - String id, Map request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks") - .addPathSegment(id) - .addPathSegments("secrets") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - 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 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 (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/hooks/AsyncSecretsClient.java b/src/main/java/com/auth0/client/mgmt/hooks/AsyncSecretsClient.java deleted file mode 100644 index c2e2cd657..000000000 --- a/src/main/java/com/auth0/client/mgmt/hooks/AsyncSecretsClient.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.hooks; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; - -public class AsyncSecretsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawSecretsClient rawClient; - - public AsyncSecretsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawSecretsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawSecretsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a hook's secrets by the ID of the hook. - */ - public CompletableFuture> get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve a hook's secrets by the ID of the hook. - */ - public CompletableFuture> get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Add one or more secrets to an existing hook. Accepts an object of key-value pairs, where the key is the name of the secret. A hook can have a maximum of 20 secrets. - */ - public CompletableFuture create(String id, Map request) { - return this.rawClient.create(id, request).thenApply(response -> response.body()); - } - - /** - * Add one or more secrets to an existing hook. Accepts an object of key-value pairs, where the key is the name of the secret. A hook can have a maximum of 20 secrets. - */ - public CompletableFuture create(String id, Map request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete one or more existing secrets for a given hook. Accepts an array of secret names to delete. - */ - public CompletableFuture delete(String id, List request) { - return this.rawClient.delete(id, request).thenApply(response -> response.body()); - } - - /** - * Delete one or more existing secrets for a given hook. Accepts an array of secret names to delete. - */ - public CompletableFuture delete(String id, List request, RequestOptions requestOptions) { - return this.rawClient.delete(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update one or more existing secrets for an existing hook. Accepts an object of key-value pairs, where the key is the name of the existing secret. - */ - public CompletableFuture update(String id, Map request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update one or more existing secrets for an existing hook. Accepts an object of key-value pairs, where the key is the name of the existing secret. - */ - public CompletableFuture update(String id, Map request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/hooks/RawSecretsClient.java b/src/main/java/com/auth0/client/mgmt/hooks/RawSecretsClient.java deleted file mode 100644 index aa30296e0..000000000 --- a/src/main/java/com/auth0/client/mgmt/hooks/RawSecretsClient.java +++ /dev/null @@ -1,315 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.hooks; - -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.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.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import java.io.IOException; -import java.util.List; -import java.util.Map; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawSecretsClient { - protected final ClientOptions clientOptions; - - public RawSecretsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a hook's secrets by the ID of the hook. - */ - public ManagementApiHttpResponse> get(String id) { - return get(id, null); - } - - /** - * Retrieve a hook's secrets by the ID of the hook. - */ - public ManagementApiHttpResponse> get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks") - .addPathSegment(id) - .addPathSegments("secrets") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Add one or more secrets to an existing hook. Accepts an object of key-value pairs, where the key is the name of the secret. A hook can have a maximum of 20 secrets. - */ - public ManagementApiHttpResponse create(String id, Map request) { - return create(id, request, null); - } - - /** - * Add one or more secrets to an existing hook. Accepts an object of key-value pairs, where the key is the name of the secret. A hook can have a maximum of 20 secrets. - */ - public ManagementApiHttpResponse create( - String id, Map request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks") - .addPathSegment(id) - .addPathSegments("secrets") - .build(); - 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) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete one or more existing secrets for a given hook. Accepts an array of secret names to delete. - */ - public ManagementApiHttpResponse delete(String id, List request) { - return delete(id, request, null); - } - - /** - * Delete one or more existing secrets for a given hook. Accepts an array of secret names to delete. - */ - public ManagementApiHttpResponse delete(String id, List request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks") - .addPathSegment(id) - .addPathSegments("secrets") - .build(); - 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) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update one or more existing secrets for an existing hook. Accepts an object of key-value pairs, where the key is the name of the existing secret. - */ - public ManagementApiHttpResponse update(String id, Map request) { - return update(id, request, null); - } - - /** - * Update one or more existing secrets for an existing hook. Accepts an object of key-value pairs, where the key is the name of the existing secret. - */ - public ManagementApiHttpResponse update( - String id, Map request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("hooks") - .addPathSegment(id) - .addPathSegments("secrets") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - 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 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/hooks/SecretsClient.java b/src/main/java/com/auth0/client/mgmt/hooks/SecretsClient.java deleted file mode 100644 index 9b73a4f1f..000000000 --- a/src/main/java/com/auth0/client/mgmt/hooks/SecretsClient.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.hooks; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import java.util.List; -import java.util.Map; - -public class SecretsClient { - protected final ClientOptions clientOptions; - - private final RawSecretsClient rawClient; - - public SecretsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawSecretsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawSecretsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a hook's secrets by the ID of the hook. - */ - public Map get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve a hook's secrets by the ID of the hook. - */ - public Map get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Add one or more secrets to an existing hook. Accepts an object of key-value pairs, where the key is the name of the secret. A hook can have a maximum of 20 secrets. - */ - public void create(String id, Map request) { - this.rawClient.create(id, request).body(); - } - - /** - * Add one or more secrets to an existing hook. Accepts an object of key-value pairs, where the key is the name of the secret. A hook can have a maximum of 20 secrets. - */ - public void create(String id, Map request, RequestOptions requestOptions) { - this.rawClient.create(id, request, requestOptions).body(); - } - - /** - * Delete one or more existing secrets for a given hook. Accepts an array of secret names to delete. - */ - public void delete(String id, List request) { - this.rawClient.delete(id, request).body(); - } - - /** - * Delete one or more existing secrets for a given hook. Accepts an array of secret names to delete. - */ - public void delete(String id, List request, RequestOptions requestOptions) { - this.rawClient.delete(id, request, requestOptions).body(); - } - - /** - * Update one or more existing secrets for an existing hook. Accepts an object of key-value pairs, where the key is the name of the existing secret. - */ - public void update(String id, Map request) { - this.rawClient.update(id, request).body(); - } - - /** - * Update one or more existing secrets for an existing hook. Accepts an object of key-value pairs, where the key is the name of the existing secret. - */ - public void update(String id, Map request, RequestOptions requestOptions) { - this.rawClient.update(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/jobs/AsyncErrorsClient.java b/src/main/java/com/auth0/client/mgmt/jobs/AsyncErrorsClient.java deleted file mode 100644 index 55043ca49..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/AsyncErrorsClient.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs; - -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.concurrent.CompletableFuture; - -public class AsyncErrorsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawErrorsClient rawClient; - - public AsyncErrorsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawErrorsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawErrorsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve error details of a failed job. - */ - 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) { - 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 deleted file mode 100644 index 03417da76..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawErrorsClient.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.jobs.types.ErrorsGetResponse; -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.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawErrorsClient { - protected final ClientOptions clientOptions; - - public AsyncRawErrorsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve error details of a failed job. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Retrieve error details of a failed job. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs") - .addPathSegment(id) - .addPathSegments("errors") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ErrorsGetResponse.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 (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/jobs/AsyncRawUsersExportsClient.java b/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawUsersExportsClient.java deleted file mode 100644 index ed62d74e1..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawUsersExportsClient.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs; - -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.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.jobs.types.CreateExportUsersRequestContent; -import com.auth0.client.mgmt.types.CreateExportUsersResponseContent; -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 AsyncRawUsersExportsClient { - protected final ClientOptions clientOptions; - - public AsyncRawUsersExportsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Export all users to a file via a long-running job. - */ - public CompletableFuture> create() { - return create(CreateExportUsersRequestContent.builder().build()); - } - - /** - * Export all users to a file via a long-running job. - */ - public CompletableFuture> create( - CreateExportUsersRequestContent request) { - return create(request, null); - } - - /** - * Export all users to a file via a long-running job. - */ - public CompletableFuture> create( - CreateExportUsersRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs/users-exports") - .build(); - 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) - .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); - } - 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, CreateExportUsersResponseContent.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 (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/jobs/AsyncRawUsersImportsClient.java b/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawUsersImportsClient.java deleted file mode 100644 index 9ec3608d5..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawUsersImportsClient.java +++ /dev/null @@ -1,507 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.FileStream; -import com.auth0.client.mgmt.core.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ContentTooLargeError; -import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.InternalServerError; -import com.auth0.client.mgmt.errors.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.jobs.types.CreateImportUsersRequestContent; -import com.auth0.client.mgmt.types.CreateImportUsersResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.nio.file.Files; -import java.util.concurrent.CompletableFuture; -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.MediaType; -import okhttp3.MultipartBody; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawUsersImportsClient { - protected final ClientOptions clientOptions; - - public AsyncRawUsersImportsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Import users from a <a href="https://auth0.com/docs/users/references/bulk-import-database-schema-examples">formatted file</a> into a connection via a long-running job. When importing users, with or without upsert, the email_verified is set to false when the email address is added or updated. Users must verify their email address. To avoid this behavior, set email_verified to true in the imported data. - */ - public CompletableFuture> create( - File users, CreateImportUsersRequestContent request) { - return create(users, request, null); - } - - /** - * Import users from a <a href="https://auth0.com/docs/users/references/bulk-import-database-schema-examples">formatted file</a> into a connection via a long-running job. When importing users, with or without upsert, the email_verified is set to false when the email address is added or updated. Users must verify their email address. To avoid this behavior, set email_verified to true in the imported data. - */ - public CompletableFuture> create( - File users, CreateImportUsersRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs/users-imports") - .build(); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - try { - String usersMimeType = Files.probeContentType(users.toPath()); - MediaType usersMimeTypeMediaType = usersMimeType != null ? MediaType.parse(usersMimeType) : null; - multipartBodyBuilder.addFormDataPart( - "users", users.getName(), RequestBody.create(users, usersMimeTypeMediaType)); - multipartBodyBuilder.addFormDataPart( - "connection_id", ObjectMappers.JSON_MAPPER.writeValueAsString(request.getConnectionId())); - if (request.getUpsert().isPresent()) { - multipartBodyBuilder.addFormDataPart( - "upsert", - ObjectMappers.JSON_MAPPER.writeValueAsString( - request.getUpsert().get())); - } - if (request.getExternalId().isPresent()) { - multipartBodyBuilder.addFormDataPart( - "external_id", - ObjectMappers.JSON_MAPPER.writeValueAsString( - request.getExternalId().get())); - } - if (request.getSendCompletionEmail().isPresent()) { - multipartBodyBuilder.addFormDataPart( - "send_completion_email", - ObjectMappers.JSON_MAPPER.writeValueAsString( - request.getSendCompletionEmail().get())); - } - } catch (Exception e) { - throw new RuntimeException(e); - } - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl) - .method("POST", multipartBodyBuilder.build()) - .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); - } - 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, CreateImportUsersResponseContent.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 413: - future.completeExceptionally(new ContentTooLargeError( - 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 (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( - InputStream stream, String filename) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs/users-imports") - .build(); - FileStream fs = new FileStream(stream, filename, null); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - multipartBodyBuilder.addFormDataPart("users", filename, fs.toRequestBody()); - RequestBody body = multipartBodyBuilder.build(); - Request.Builder _requestBuilder = new Request.Builder(); - _requestBuilder.url(httpUrl); - _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(null))); - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - 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, CreateImportUsersResponseContent.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 413: - future.completeExceptionally(new ContentTooLargeError( - 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 (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( - InputStream stream, String filename, MediaType mediaType) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs/users-imports") - .build(); - FileStream fs = new FileStream(stream, filename, mediaType); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - multipartBodyBuilder.addFormDataPart("users", filename, fs.toRequestBody()); - RequestBody body = multipartBodyBuilder.build(); - Request.Builder _requestBuilder = new Request.Builder(); - _requestBuilder.url(httpUrl); - _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(null))); - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - 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, CreateImportUsersResponseContent.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 413: - future.completeExceptionally(new ContentTooLargeError( - 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 (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( - InputStream stream, String filename, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs/users-imports") - .build(); - FileStream fs = new FileStream(stream, filename, null); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - multipartBodyBuilder.addFormDataPart("users", filename, fs.toRequestBody()); - RequestBody body = multipartBodyBuilder.build(); - Request.Builder _requestBuilder = new Request.Builder(); - _requestBuilder.url(httpUrl); - _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(requestOptions))); - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, CreateImportUsersResponseContent.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 413: - future.completeExceptionally(new ContentTooLargeError( - 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 (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( - InputStream stream, String filename, MediaType mediaType, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs/users-imports") - .build(); - FileStream fs = new FileStream(stream, filename, mediaType); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - multipartBodyBuilder.addFormDataPart("users", filename, fs.toRequestBody()); - RequestBody body = multipartBodyBuilder.build(); - Request.Builder _requestBuilder = new Request.Builder(); - _requestBuilder.url(httpUrl); - _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(requestOptions))); - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, CreateImportUsersResponseContent.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 413: - future.completeExceptionally(new ContentTooLargeError( - 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 (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/jobs/AsyncRawVerificationEmailClient.java b/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawVerificationEmailClient.java deleted file mode 100644 index 067880b49..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/AsyncRawVerificationEmailClient.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs; - -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.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.jobs.types.CreateVerificationEmailRequestContent; -import com.auth0.client.mgmt.types.CreateVerificationEmailResponseContent; -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 AsyncRawVerificationEmailClient { - protected final ClientOptions clientOptions; - - public AsyncRawVerificationEmailClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Send an email to the specified user that asks them to click a link to <a href="https://auth0.com/docs/email/custom#verification-email">verify their email address</a>. - *

Note: You must have the Status toggle enabled for the verification email template for the email to be sent.

- */ - public CompletableFuture> create( - CreateVerificationEmailRequestContent request) { - return create(request, null); - } - - /** - * Send an email to the specified user that asks them to click a link to <a href="https://auth0.com/docs/email/custom#verification-email">verify their email address</a>. - *

Note: You must have the Status toggle enabled for the verification email template for the email to be sent.

- */ - public CompletableFuture> create( - CreateVerificationEmailRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs/verification-email") - .build(); - 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) - .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); - } - 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, CreateVerificationEmailResponseContent.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 (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/jobs/AsyncUsersExportsClient.java b/src/main/java/com/auth0/client/mgmt/jobs/AsyncUsersExportsClient.java deleted file mode 100644 index 048fc7282..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/AsyncUsersExportsClient.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.jobs.types.CreateExportUsersRequestContent; -import com.auth0.client.mgmt.types.CreateExportUsersResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncUsersExportsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawUsersExportsClient rawClient; - - public AsyncUsersExportsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawUsersExportsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawUsersExportsClient withRawResponse() { - return this.rawClient; - } - - /** - * Export all users to a file via a long-running job. - */ - public CompletableFuture create() { - return this.rawClient.create().thenApply(response -> response.body()); - } - - /** - * Export all users to a file via a long-running job. - */ - public CompletableFuture create(CreateExportUsersRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Export all users to a file via a long-running job. - */ - public CompletableFuture create( - CreateExportUsersRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/jobs/AsyncUsersImportsClient.java b/src/main/java/com/auth0/client/mgmt/jobs/AsyncUsersImportsClient.java deleted file mode 100644 index 3e5e32661..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/AsyncUsersImportsClient.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.jobs.types.CreateImportUsersRequestContent; -import com.auth0.client.mgmt.types.CreateImportUsersResponseContent; -import java.io.File; -import java.io.InputStream; -import java.util.concurrent.CompletableFuture; -import okhttp3.MediaType; - -public class AsyncUsersImportsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawUsersImportsClient rawClient; - - public AsyncUsersImportsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawUsersImportsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawUsersImportsClient withRawResponse() { - return this.rawClient; - } - - /** - * Import users from a <a href="https://auth0.com/docs/users/references/bulk-import-database-schema-examples">formatted file</a> into a connection via a long-running job. When importing users, with or without upsert, the email_verified is set to false when the email address is added or updated. Users must verify their email address. To avoid this behavior, set email_verified to true in the imported data. - */ - public CompletableFuture create( - File users, CreateImportUsersRequestContent request) { - return this.rawClient.create(users, request).thenApply(response -> response.body()); - } - - /** - * Import users from a <a href="https://auth0.com/docs/users/references/bulk-import-database-schema-examples">formatted file</a> into a connection via a long-running job. When importing users, with or without upsert, the email_verified is set to false when the email address is added or updated. Users must verify their email address. To avoid this behavior, set email_verified to true in the imported data. - */ - public CompletableFuture create( - File users, CreateImportUsersRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(users, request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture create(InputStream stream, String filename) { - return this.rawClient.create(stream, filename).thenApply(response -> response.body()); - } - - public CompletableFuture create( - InputStream stream, String filename, MediaType mediaType) { - return this.rawClient.create(stream, filename, mediaType).thenApply(response -> response.body()); - } - - public CompletableFuture create( - InputStream stream, String filename, RequestOptions requestOptions) { - return this.rawClient.create(stream, filename, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture create( - InputStream stream, String filename, MediaType mediaType, RequestOptions requestOptions) { - return this.rawClient - .create(stream, filename, mediaType, requestOptions) - .thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/jobs/AsyncVerificationEmailClient.java b/src/main/java/com/auth0/client/mgmt/jobs/AsyncVerificationEmailClient.java deleted file mode 100644 index 5533d81c9..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/AsyncVerificationEmailClient.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.jobs.types.CreateVerificationEmailRequestContent; -import com.auth0.client.mgmt.types.CreateVerificationEmailResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncVerificationEmailClient { - protected final ClientOptions clientOptions; - - private final AsyncRawVerificationEmailClient rawClient; - - public AsyncVerificationEmailClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawVerificationEmailClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawVerificationEmailClient withRawResponse() { - return this.rawClient; - } - - /** - * Send an email to the specified user that asks them to click a link to <a href="https://auth0.com/docs/email/custom#verification-email">verify their email address</a>. - *

Note: You must have the Status toggle enabled for the verification email template for the email to be sent.

- */ - public CompletableFuture create( - CreateVerificationEmailRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Send an email to the specified user that asks them to click a link to <a href="https://auth0.com/docs/email/custom#verification-email">verify their email address</a>. - *

Note: You must have the Status toggle enabled for the verification email template for the email to be sent.

- */ - public CompletableFuture create( - CreateVerificationEmailRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/jobs/ErrorsClient.java b/src/main/java/com/auth0/client/mgmt/jobs/ErrorsClient.java deleted file mode 100644 index bde7f5fd1..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/ErrorsClient.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.jobs.types.ErrorsGetResponse; - -public class ErrorsClient { - protected final ClientOptions clientOptions; - - private final RawErrorsClient rawClient; - - public ErrorsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawErrorsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawErrorsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve error details of a failed job. - */ - public ErrorsGetResponse get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve error details of a failed job. - */ - public ErrorsGetResponse 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 deleted file mode 100644 index 0c939a325..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/RawErrorsClient.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.jobs.types.ErrorsGetResponse; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawErrorsClient { - protected final ClientOptions clientOptions; - - public RawErrorsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve error details of a failed job. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Retrieve error details of a failed job. - */ - public ManagementApiHttpResponse get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs") - .addPathSegment(id) - .addPathSegments("errors") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ErrorsGetResponse.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 (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 deleted file mode 100644 index 31e18ab67..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/RawUsersExportsClient.java +++ /dev/null @@ -1,110 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs; - -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.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.jobs.types.CreateExportUsersRequestContent; -import com.auth0.client.mgmt.types.CreateExportUsersResponseContent; -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 RawUsersExportsClient { - protected final ClientOptions clientOptions; - - public RawUsersExportsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Export all users to a file via a long-running job. - */ - public ManagementApiHttpResponse create() { - return create(CreateExportUsersRequestContent.builder().build()); - } - - /** - * Export all users to a file via a long-running job. - */ - public ManagementApiHttpResponse create(CreateExportUsersRequestContent request) { - return create(request, null); - } - - /** - * Export all users to a file via a long-running job. - */ - public ManagementApiHttpResponse create( - CreateExportUsersRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs/users-exports") - .build(); - 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) - .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); - } - 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, CreateExportUsersResponseContent.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 (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 deleted file mode 100644 index 15d463e8c..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/RawUsersImportsClient.java +++ /dev/null @@ -1,367 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.FileStream; -import com.auth0.client.mgmt.core.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ContentTooLargeError; -import com.auth0.client.mgmt.errors.ForbiddenError; -import com.auth0.client.mgmt.errors.InternalServerError; -import com.auth0.client.mgmt.errors.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.jobs.types.CreateImportUsersRequestContent; -import com.auth0.client.mgmt.types.CreateImportUsersResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.nio.file.Files; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.MediaType; -import okhttp3.MultipartBody; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawUsersImportsClient { - protected final ClientOptions clientOptions; - - public RawUsersImportsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Import users from a <a href="https://auth0.com/docs/users/references/bulk-import-database-schema-examples">formatted file</a> into a connection via a long-running job. When importing users, with or without upsert, the email_verified is set to false when the email address is added or updated. Users must verify their email address. To avoid this behavior, set email_verified to true in the imported data. - */ - public ManagementApiHttpResponse create( - File users, CreateImportUsersRequestContent request) { - return create(users, request, null); - } - - /** - * Import users from a <a href="https://auth0.com/docs/users/references/bulk-import-database-schema-examples">formatted file</a> into a connection via a long-running job. When importing users, with or without upsert, the email_verified is set to false when the email address is added or updated. Users must verify their email address. To avoid this behavior, set email_verified to true in the imported data. - */ - public ManagementApiHttpResponse create( - File users, CreateImportUsersRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs/users-imports") - .build(); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - try { - String usersMimeType = Files.probeContentType(users.toPath()); - MediaType usersMimeTypeMediaType = usersMimeType != null ? MediaType.parse(usersMimeType) : null; - multipartBodyBuilder.addFormDataPart( - "users", users.getName(), RequestBody.create(users, usersMimeTypeMediaType)); - multipartBodyBuilder.addFormDataPart( - "connection_id", ObjectMappers.JSON_MAPPER.writeValueAsString(request.getConnectionId())); - if (request.getUpsert().isPresent()) { - multipartBodyBuilder.addFormDataPart( - "upsert", - ObjectMappers.JSON_MAPPER.writeValueAsString( - request.getUpsert().get())); - } - if (request.getExternalId().isPresent()) { - multipartBodyBuilder.addFormDataPart( - "external_id", - ObjectMappers.JSON_MAPPER.writeValueAsString( - request.getExternalId().get())); - } - if (request.getSendCompletionEmail().isPresent()) { - multipartBodyBuilder.addFormDataPart( - "send_completion_email", - ObjectMappers.JSON_MAPPER.writeValueAsString( - request.getSendCompletionEmail().get())); - } - } catch (Exception e) { - throw new RuntimeException(e); - } - Request.Builder _requestBuilder = new Request.Builder() - .url(httpUrl) - .method("POST", multipartBodyBuilder.build()) - .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); - } - 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, CreateImportUsersResponseContent.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 413: - throw new ContentTooLargeError( - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse create(InputStream stream, String filename) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs/users-imports") - .build(); - FileStream fs = new FileStream(stream, filename, null); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - multipartBodyBuilder.addFormDataPart("users", filename, fs.toRequestBody()); - RequestBody body = multipartBodyBuilder.build(); - Request.Builder _requestBuilder = new Request.Builder(); - _requestBuilder.url(httpUrl); - _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(null))); - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - 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, CreateImportUsersResponseContent.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 413: - throw new ContentTooLargeError( - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse create( - InputStream stream, String filename, MediaType mediaType) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs/users-imports") - .build(); - FileStream fs = new FileStream(stream, filename, mediaType); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - multipartBodyBuilder.addFormDataPart("users", filename, fs.toRequestBody()); - RequestBody body = multipartBodyBuilder.build(); - Request.Builder _requestBuilder = new Request.Builder(); - _requestBuilder.url(httpUrl); - _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(null))); - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - 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, CreateImportUsersResponseContent.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 413: - throw new ContentTooLargeError( - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse create( - InputStream stream, String filename, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs/users-imports") - .build(); - FileStream fs = new FileStream(stream, filename, null); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - multipartBodyBuilder.addFormDataPart("users", filename, fs.toRequestBody()); - RequestBody body = multipartBodyBuilder.build(); - Request.Builder _requestBuilder = new Request.Builder(); - _requestBuilder.url(httpUrl); - _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(requestOptions))); - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CreateImportUsersResponseContent.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 413: - throw new ContentTooLargeError( - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse create( - InputStream stream, String filename, MediaType mediaType, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs/users-imports") - .build(); - FileStream fs = new FileStream(stream, filename, mediaType); - MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - multipartBodyBuilder.addFormDataPart("users", filename, fs.toRequestBody()); - RequestBody body = multipartBodyBuilder.build(); - Request.Builder _requestBuilder = new Request.Builder(); - _requestBuilder.url(httpUrl); - _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(requestOptions))); - Request okhttpRequest = _requestBuilder.build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CreateImportUsersResponseContent.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 413: - throw new ContentTooLargeError( - 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 (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 deleted file mode 100644 index f795154ae..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/RawVerificationEmailClient.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs; - -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.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.jobs.types.CreateVerificationEmailRequestContent; -import com.auth0.client.mgmt.types.CreateVerificationEmailResponseContent; -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 RawVerificationEmailClient { - protected final ClientOptions clientOptions; - - public RawVerificationEmailClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Send an email to the specified user that asks them to click a link to <a href="https://auth0.com/docs/email/custom#verification-email">verify their email address</a>. - *

Note: You must have the Status toggle enabled for the verification email template for the email to be sent.

- */ - public ManagementApiHttpResponse create( - CreateVerificationEmailRequestContent request) { - return create(request, null); - } - - /** - * Send an email to the specified user that asks them to click a link to <a href="https://auth0.com/docs/email/custom#verification-email">verify their email address</a>. - *

Note: You must have the Status toggle enabled for the verification email template for the email to be sent.

- */ - public ManagementApiHttpResponse create( - CreateVerificationEmailRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("jobs/verification-email") - .build(); - 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) - .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); - } - 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, CreateVerificationEmailResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/jobs/UsersExportsClient.java b/src/main/java/com/auth0/client/mgmt/jobs/UsersExportsClient.java deleted file mode 100644 index 1599e2ce5..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/UsersExportsClient.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.jobs.types.CreateExportUsersRequestContent; -import com.auth0.client.mgmt.types.CreateExportUsersResponseContent; - -public class UsersExportsClient { - protected final ClientOptions clientOptions; - - private final RawUsersExportsClient rawClient; - - public UsersExportsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawUsersExportsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawUsersExportsClient withRawResponse() { - return this.rawClient; - } - - /** - * Export all users to a file via a long-running job. - */ - public CreateExportUsersResponseContent create() { - return this.rawClient.create().body(); - } - - /** - * Export all users to a file via a long-running job. - */ - public CreateExportUsersResponseContent create(CreateExportUsersRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Export all users to a file via a long-running job. - */ - public CreateExportUsersResponseContent create( - CreateExportUsersRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/jobs/UsersImportsClient.java b/src/main/java/com/auth0/client/mgmt/jobs/UsersImportsClient.java deleted file mode 100644 index 19cd59ea9..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/UsersImportsClient.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.jobs.types.CreateImportUsersRequestContent; -import com.auth0.client.mgmt.types.CreateImportUsersResponseContent; -import java.io.File; -import java.io.InputStream; -import okhttp3.MediaType; - -public class UsersImportsClient { - protected final ClientOptions clientOptions; - - private final RawUsersImportsClient rawClient; - - public UsersImportsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawUsersImportsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawUsersImportsClient withRawResponse() { - return this.rawClient; - } - - /** - * Import users from a <a href="https://auth0.com/docs/users/references/bulk-import-database-schema-examples">formatted file</a> into a connection via a long-running job. When importing users, with or without upsert, the email_verified is set to false when the email address is added or updated. Users must verify their email address. To avoid this behavior, set email_verified to true in the imported data. - */ - public CreateImportUsersResponseContent create(File users, CreateImportUsersRequestContent request) { - return this.rawClient.create(users, request).body(); - } - - /** - * Import users from a <a href="https://auth0.com/docs/users/references/bulk-import-database-schema-examples">formatted file</a> into a connection via a long-running job. When importing users, with or without upsert, the email_verified is set to false when the email address is added or updated. Users must verify their email address. To avoid this behavior, set email_verified to true in the imported data. - */ - public CreateImportUsersResponseContent create( - File users, CreateImportUsersRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(users, request, requestOptions).body(); - } - - public CreateImportUsersResponseContent create(InputStream stream, String filename) { - return this.rawClient.create(stream, filename).body(); - } - - public CreateImportUsersResponseContent create(InputStream stream, String filename, MediaType mediaType) { - return this.rawClient.create(stream, filename, mediaType).body(); - } - - public CreateImportUsersResponseContent create(InputStream stream, String filename, RequestOptions requestOptions) { - return this.rawClient.create(stream, filename, requestOptions).body(); - } - - public CreateImportUsersResponseContent create( - InputStream stream, String filename, MediaType mediaType, RequestOptions requestOptions) { - return this.rawClient - .create(stream, filename, mediaType, requestOptions) - .body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/jobs/VerificationEmailClient.java b/src/main/java/com/auth0/client/mgmt/jobs/VerificationEmailClient.java deleted file mode 100644 index d00c8a7be..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/VerificationEmailClient.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.jobs.types.CreateVerificationEmailRequestContent; -import com.auth0.client.mgmt.types.CreateVerificationEmailResponseContent; - -public class VerificationEmailClient { - protected final ClientOptions clientOptions; - - private final RawVerificationEmailClient rawClient; - - public VerificationEmailClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawVerificationEmailClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawVerificationEmailClient withRawResponse() { - return this.rawClient; - } - - /** - * Send an email to the specified user that asks them to click a link to <a href="https://auth0.com/docs/email/custom#verification-email">verify their email address</a>. - *

Note: You must have the Status toggle enabled for the verification email template for the email to be sent.

- */ - public CreateVerificationEmailResponseContent create(CreateVerificationEmailRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Send an email to the specified user that asks them to click a link to <a href="https://auth0.com/docs/email/custom#verification-email">verify their email address</a>. - *

Note: You must have the Status toggle enabled for the verification email template for the email to be sent.

- */ - public CreateVerificationEmailResponseContent create( - CreateVerificationEmailRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/jobs/types/CreateExportUsersRequestContent.java b/src/main/java/com/auth0/client/mgmt/jobs/types/CreateExportUsersRequestContent.java deleted file mode 100644 index 363375c59..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/types/CreateExportUsersRequestContent.java +++ /dev/null @@ -1,190 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.CreateExportUsersFields; -import com.auth0.client.mgmt.types.JobFileFormatEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateExportUsersRequestContent.Builder.class) -public final class CreateExportUsersRequestContent { - private final Optional connectionId; - - private final Optional format; - - private final Optional limit; - - private final Optional> fields; - - private final Map additionalProperties; - - private CreateExportUsersRequestContent( - Optional connectionId, - Optional format, - Optional limit, - Optional> fields, - Map additionalProperties) { - this.connectionId = connectionId; - this.format = format; - this.limit = limit; - this.fields = fields; - this.additionalProperties = additionalProperties; - } - - /** - * @return connection_id of the connection from which users will be exported. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - @JsonProperty("format") - public Optional getFormat() { - return format; - } - - /** - * @return Limit the number of records. - */ - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - /** - * @return List of fields to be included in the CSV. Defaults to a predefined set of fields. - */ - @JsonProperty("fields") - public Optional> getFields() { - return fields; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateExportUsersRequestContent && equalTo((CreateExportUsersRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateExportUsersRequestContent other) { - return connectionId.equals(other.connectionId) - && format.equals(other.format) - && limit.equals(other.limit) - && fields.equals(other.fields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.format, this.limit, this.fields); - } - - @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 connectionId = Optional.empty(); - - private Optional format = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional> fields = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateExportUsersRequestContent other) { - connectionId(other.getConnectionId()); - format(other.getFormat()); - limit(other.getLimit()); - fields(other.getFields()); - return this; - } - - /** - *

connection_id of the connection from which users will be exported.

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - return this; - } - - @JsonSetter(value = "format", nulls = Nulls.SKIP) - public Builder format(Optional format) { - this.format = format; - return this; - } - - public Builder format(JobFileFormatEnum format) { - this.format = Optional.ofNullable(format); - return this; - } - - /** - *

Limit the number of records.

- */ - @JsonSetter(value = "limit", nulls = Nulls.SKIP) - public Builder limit(Optional limit) { - this.limit = limit; - return this; - } - - public Builder limit(Integer limit) { - this.limit = Optional.ofNullable(limit); - return this; - } - - /** - *

List of fields to be included in the CSV. Defaults to a predefined set of fields.

- */ - @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public Builder fields(Optional> fields) { - this.fields = fields; - return this; - } - - public Builder fields(List fields) { - this.fields = Optional.ofNullable(fields); - return this; - } - - public CreateExportUsersRequestContent build() { - return new CreateExportUsersRequestContent(connectionId, format, limit, fields, additionalProperties); - } - } -} 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 deleted file mode 100644 index ef399ab4b..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/types/CreateImportUsersRequestContent.java +++ /dev/null @@ -1,247 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateImportUsersRequestContent.Builder.class) -public final class CreateImportUsersRequestContent { - private final String connectionId; - - private final Optional upsert; - - private final Optional externalId; - - private final Optional sendCompletionEmail; - - private final Map additionalProperties; - - private CreateImportUsersRequestContent( - String connectionId, - Optional upsert, - Optional externalId, - Optional sendCompletionEmail, - Map additionalProperties) { - this.connectionId = connectionId; - this.upsert = upsert; - this.externalId = externalId; - this.sendCompletionEmail = sendCompletionEmail; - this.additionalProperties = additionalProperties; - } - - /** - * @return connection_id of the connection to which users will be imported. - */ - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - /** - * @return Whether to update users if they already exist (true) or to ignore them (false). - */ - @JsonProperty("upsert") - public Optional getUpsert() { - return upsert; - } - - /** - * @return Customer-defined ID. - */ - @JsonProperty("external_id") - public Optional getExternalId() { - return externalId; - } - - /** - * @return Whether to send a completion email to all tenant owners when the job is finished (true) or not (false). - */ - @JsonProperty("send_completion_email") - public Optional getSendCompletionEmail() { - return sendCompletionEmail; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateImportUsersRequestContent && equalTo((CreateImportUsersRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateImportUsersRequestContent other) { - return connectionId.equals(other.connectionId) - && upsert.equals(other.upsert) - && externalId.equals(other.externalId) - && sendCompletionEmail.equals(other.sendCompletionEmail); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.upsert, this.externalId, this.sendCompletionEmail); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - /** - *

connection_id of the connection to which users will be imported.

- */ - _FinalStage connectionId(@NotNull String connectionId); - - Builder from(CreateImportUsersRequestContent other); - } - - public interface _FinalStage { - CreateImportUsersRequestContent build(); - - /** - *

Whether to update users if they already exist (true) or to ignore them (false).

- */ - _FinalStage upsert(Optional upsert); - - _FinalStage upsert(Boolean upsert); - - /** - *

Customer-defined ID.

- */ - _FinalStage externalId(Optional externalId); - - _FinalStage externalId(String externalId); - - /** - *

Whether to send a completion email to all tenant owners when the job is finished (true) or not (false).

- */ - _FinalStage sendCompletionEmail(Optional sendCompletionEmail); - - _FinalStage sendCompletionEmail(Boolean sendCompletionEmail); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, _FinalStage { - private String connectionId; - - private Optional sendCompletionEmail = Optional.empty(); - - private Optional externalId = Optional.empty(); - - private Optional upsert = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateImportUsersRequestContent other) { - connectionId(other.getConnectionId()); - upsert(other.getUpsert()); - externalId(other.getExternalId()); - sendCompletionEmail(other.getSendCompletionEmail()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("connection_id") - public _FinalStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - /** - *

Whether to send a completion email to all tenant owners when the job is finished (true) or not (false).

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

Whether to send a completion email to all tenant owners when the job is finished (true) or not (false).

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

Customer-defined ID.

- * @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; - } - - /** - *

Customer-defined ID.

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

Whether to update users if they already exist (true) or to ignore them (false).

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

Whether to update users if they already exist (true) or to ignore them (false).

- */ - @java.lang.Override - @JsonSetter(value = "upsert", nulls = Nulls.SKIP) - public _FinalStage upsert(Optional upsert) { - this.upsert = upsert; - return this; - } - - @java.lang.Override - public CreateImportUsersRequestContent build() { - return new CreateImportUsersRequestContent( - connectionId, upsert, externalId, sendCompletionEmail, additionalProperties); - } - } -} 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 deleted file mode 100644 index 2aefa6c31..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/types/CreateVerificationEmailRequestContent.java +++ /dev/null @@ -1,236 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.Identity; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateVerificationEmailRequestContent.Builder.class) -public final class CreateVerificationEmailRequestContent { - private final String userId; - - private final Optional clientId; - - private final Optional identity; - - private final Optional organizationId; - - private final Map additionalProperties; - - private CreateVerificationEmailRequestContent( - String userId, - Optional clientId, - Optional identity, - Optional organizationId, - Map additionalProperties) { - this.userId = userId; - this.clientId = clientId; - this.identity = identity; - this.organizationId = organizationId; - this.additionalProperties = additionalProperties; - } - - /** - * @return user_id of the user to send the verification email to. - */ - @JsonProperty("user_id") - public String getUserId() { - return userId; - } - - /** - * @return client_id of the client (application). If no value provided, the global Client ID will be used. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("identity") - public Optional getIdentity() { - return identity; - } - - /** - * @return (Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters. - */ - @JsonProperty("organization_id") - public Optional getOrganizationId() { - return organizationId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateVerificationEmailRequestContent - && equalTo((CreateVerificationEmailRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateVerificationEmailRequestContent other) { - return userId.equals(other.userId) - && clientId.equals(other.clientId) - && identity.equals(other.identity) - && organizationId.equals(other.organizationId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.userId, this.clientId, this.identity, this.organizationId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static UserIdStage builder() { - return new Builder(); - } - - public interface UserIdStage { - /** - *

user_id of the user to send the verification email to.

- */ - _FinalStage userId(@NotNull String userId); - - Builder from(CreateVerificationEmailRequestContent other); - } - - public interface _FinalStage { - CreateVerificationEmailRequestContent build(); - - /** - *

client_id of the client (application). If no value provided, the global Client ID will be used.

- */ - _FinalStage clientId(Optional clientId); - - _FinalStage clientId(String clientId); - - _FinalStage identity(Optional identity); - - _FinalStage identity(Identity identity); - - /** - *

(Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters.

- */ - _FinalStage organizationId(Optional organizationId); - - _FinalStage organizationId(String organizationId); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements UserIdStage, _FinalStage { - private String userId; - - private Optional organizationId = Optional.empty(); - - private Optional identity = Optional.empty(); - - private Optional clientId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateVerificationEmailRequestContent other) { - userId(other.getUserId()); - clientId(other.getClientId()); - identity(other.getIdentity()); - organizationId(other.getOrganizationId()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("user_id") - public _FinalStage userId(@NotNull String userId) { - this.userId = Objects.requireNonNull(userId, "userId must not be null"); - return this; - } - - /** - *

(Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters.

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

(Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters.

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

client_id of the client (application). If no value provided, the global Client ID will be used.

- * @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; - } - - /** - *

client_id of the client (application). If no value provided, the global Client ID will be used.

- */ - @java.lang.Override - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public _FinalStage clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - @java.lang.Override - public CreateVerificationEmailRequestContent build() { - return new CreateVerificationEmailRequestContent( - userId, clientId, identity, organizationId, additionalProperties); - } - } -} 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 deleted file mode 100644 index 234a856c7..000000000 --- a/src/main/java/com/auth0/client/mgmt/jobs/types/ErrorsGetResponse.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.jobs.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.GetJobErrorResponseContent; -import com.auth0.client.mgmt.types.GetJobGenericErrorResponseContent; -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.Objects; - -@JsonDeserialize(using = ErrorsGetResponse.Deserializer.class) -public final class ErrorsGetResponse { - private final Object value; - - private final int type; - - private ErrorsGetResponse(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((GetJobGenericErrorResponseContent) 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 ErrorsGetResponse && equalTo((ErrorsGetResponse) other); - } - - private boolean equalTo(ErrorsGetResponse 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 ErrorsGetResponse of(List value) { - return new ErrorsGetResponse(value, 0); - } - - public static ErrorsGetResponse of(GetJobGenericErrorResponseContent value) { - return new ErrorsGetResponse(value, 1); - } - - public interface Visitor { - T visit(List value); - - T visit(GetJobGenericErrorResponseContent value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(ErrorsGetResponse.class); - } - - @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) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, GetJobGenericErrorResponseContent.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/keys/AsyncCustomSigningClient.java b/src/main/java/com/auth0/client/mgmt/keys/AsyncCustomSigningClient.java deleted file mode 100644 index 66e2a00be..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/AsyncCustomSigningClient.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * 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.SetCustomSigningKeysRequestContent; -import com.auth0.client.mgmt.types.GetCustomSigningKeysResponseContent; -import com.auth0.client.mgmt.types.SetCustomSigningKeysResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncCustomSigningClient { - protected final ClientOptions clientOptions; - - private final AsyncRawCustomSigningClient rawClient; - - public AsyncCustomSigningClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawCustomSigningClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawCustomSigningClient withRawResponse() { - return this.rawClient; - } - - /** - * Get entire jwks representation of custom signing keys. - */ - public CompletableFuture get() { - return this.rawClient.get().thenApply(response -> response.body()); - } - - /** - * Get entire jwks representation of custom signing keys. - */ - public CompletableFuture get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).thenApply(response -> response.body()); - } - - /** - * Create or replace entire jwks representation of custom signing keys. - */ - public CompletableFuture set(SetCustomSigningKeysRequestContent request) { - return this.rawClient.set(request).thenApply(response -> response.body()); - } - - /** - * Create or replace entire jwks representation of custom signing keys. - */ - public CompletableFuture set( - SetCustomSigningKeysRequestContent request, RequestOptions requestOptions) { - return this.rawClient.set(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete entire jwks representation of custom signing keys. - */ - public CompletableFuture delete() { - return this.rawClient.delete().thenApply(response -> response.body()); - } - - /** - * Delete entire jwks representation of custom signing keys. - */ - public CompletableFuture delete(RequestOptions requestOptions) { - return this.rawClient.delete(requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/keys/AsyncEncryptionClient.java b/src/main/java/com/auth0/client/mgmt/keys/AsyncEncryptionClient.java deleted file mode 100644 index fab4f4f50..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/AsyncEncryptionClient.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -import com.auth0.client.mgmt.keys.types.CreateEncryptionKeyRequestContent; -import com.auth0.client.mgmt.keys.types.ImportEncryptionKeyRequestContent; -import com.auth0.client.mgmt.keys.types.ListEncryptionKeysRequestParameters; -import com.auth0.client.mgmt.types.CreateEncryptionKeyPublicWrappingResponseContent; -import com.auth0.client.mgmt.types.CreateEncryptionKeyResponseContent; -import com.auth0.client.mgmt.types.EncryptionKey; -import com.auth0.client.mgmt.types.GetEncryptionKeyResponseContent; -import com.auth0.client.mgmt.types.ImportEncryptionKeyResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncEncryptionClient { - protected final ClientOptions clientOptions; - - private final AsyncRawEncryptionClient rawClient; - - public AsyncEncryptionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawEncryptionClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawEncryptionClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of all the encryption keys associated with your tenant. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve details of all the encryption keys associated with your tenant. - */ - public CompletableFuture> list(ListEncryptionKeysRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Retrieve details of all the encryption keys associated with your tenant. - */ - public CompletableFuture> list( - ListEncryptionKeysRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create the new, pre-activated encryption key, without the key material. - */ - public CompletableFuture create(CreateEncryptionKeyRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create the new, pre-activated encryption key, without the key material. - */ - public CompletableFuture create( - CreateEncryptionKeyRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Perform rekeying operation on the key hierarchy. - */ - public CompletableFuture rekey() { - return this.rawClient.rekey().thenApply(response -> response.body()); - } - - /** - * Perform rekeying operation on the key hierarchy. - */ - public CompletableFuture rekey(RequestOptions requestOptions) { - return this.rawClient.rekey(requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details of the encryption key with the given ID. - */ - public CompletableFuture get(String kid) { - return this.rawClient.get(kid).thenApply(response -> response.body()); - } - - /** - * Retrieve details of the encryption key with the given ID. - */ - public CompletableFuture get(String kid, RequestOptions requestOptions) { - return this.rawClient.get(kid, requestOptions).thenApply(response -> response.body()); - } - - /** - * Import wrapped key material and activate encryption key. - */ - public CompletableFuture import_( - String kid, ImportEncryptionKeyRequestContent request) { - return this.rawClient.import_(kid, request).thenApply(response -> response.body()); - } - - /** - * Import wrapped key material and activate encryption key. - */ - public CompletableFuture import_( - String kid, ImportEncryptionKeyRequestContent request, RequestOptions requestOptions) { - return this.rawClient.import_(kid, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete the custom provided encryption key with the given ID and move back to using native encryption key. - */ - public CompletableFuture delete(String kid) { - return this.rawClient.delete(kid).thenApply(response -> response.body()); - } - - /** - * Delete the custom provided encryption key with the given ID and move back to using native encryption key. - */ - public CompletableFuture delete(String kid, RequestOptions requestOptions) { - return this.rawClient.delete(kid, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create the public wrapping key to wrap your own encryption key material. - */ - public CompletableFuture createPublicWrappingKey(String kid) { - return this.rawClient.createPublicWrappingKey(kid).thenApply(response -> response.body()); - } - - /** - * Create the public wrapping key to wrap your own encryption key material. - */ - public CompletableFuture createPublicWrappingKey( - String kid, RequestOptions requestOptions) { - return this.rawClient.createPublicWrappingKey(kid, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/keys/AsyncKeysClient.java b/src/main/java/com/auth0/client/mgmt/keys/AsyncKeysClient.java deleted file mode 100644 index 8823269ff..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/AsyncKeysClient.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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.Suppliers; -import java.util.function.Supplier; - -public class AsyncKeysClient { - protected final ClientOptions clientOptions; - - protected final Supplier customSigningClient; - - protected final Supplier encryptionClient; - - 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.signingClient = Suppliers.memoize(() -> new AsyncSigningClient(clientOptions)); - } - - public AsyncCustomSigningClient customSigning() { - return this.customSigningClient.get(); - } - - public AsyncEncryptionClient encryption() { - return this.encryptionClient.get(); - } - - public AsyncSigningClient signing() { - return this.signingClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/keys/AsyncRawCustomSigningClient.java b/src/main/java/com/auth0/client/mgmt/keys/AsyncRawCustomSigningClient.java deleted file mode 100644 index 0d30c22b9..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/AsyncRawCustomSigningClient.java +++ /dev/null @@ -1,289 +0,0 @@ -/** - * 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.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.keys.types.SetCustomSigningKeysRequestContent; -import com.auth0.client.mgmt.types.GetCustomSigningKeysResponseContent; -import com.auth0.client.mgmt.types.SetCustomSigningKeysResponseContent; -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 AsyncRawCustomSigningClient { - protected final ClientOptions clientOptions; - - public AsyncRawCustomSigningClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Get entire jwks representation of custom signing keys. - */ - public CompletableFuture> get() { - return get(null); - } - - /** - * Get entire jwks representation of custom signing keys. - */ - public CompletableFuture> get( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/custom-signing") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetCustomSigningKeysResponseContent.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 (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 or replace entire jwks representation of custom signing keys. - */ - public CompletableFuture> set( - SetCustomSigningKeysRequestContent request) { - return set(request, null); - } - - /** - * Create or replace entire jwks representation of custom signing keys. - */ - public CompletableFuture> set( - SetCustomSigningKeysRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/custom-signing") - .build(); - 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) - .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<>(); - 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, SetCustomSigningKeysResponseContent.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 (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 entire jwks representation of custom signing keys. - */ - public CompletableFuture> delete() { - return delete(null); - } - - /** - * Delete entire jwks representation of custom signing keys. - */ - public CompletableFuture> delete(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/custom-signing") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/keys/AsyncRawEncryptionClient.java b/src/main/java/com/auth0/client/mgmt/keys/AsyncRawEncryptionClient.java deleted file mode 100644 index 1d6508d0b..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/AsyncRawEncryptionClient.java +++ /dev/null @@ -1,693 +0,0 @@ -/** - * 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.QueryStringMapper; -import com.auth0.client.mgmt.core.RequestOptions; -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.keys.types.CreateEncryptionKeyRequestContent; -import com.auth0.client.mgmt.keys.types.ImportEncryptionKeyRequestContent; -import com.auth0.client.mgmt.keys.types.ListEncryptionKeysRequestParameters; -import com.auth0.client.mgmt.types.CreateEncryptionKeyPublicWrappingResponseContent; -import com.auth0.client.mgmt.types.CreateEncryptionKeyResponseContent; -import com.auth0.client.mgmt.types.EncryptionKey; -import com.auth0.client.mgmt.types.GetEncryptionKeyResponseContent; -import com.auth0.client.mgmt.types.ImportEncryptionKeyResponseContent; -import com.auth0.client.mgmt.types.ListEncryptionKeyOffsetPaginatedResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawEncryptionClient { - protected final ClientOptions clientOptions; - - public AsyncRawEncryptionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of all the encryption keys associated with your tenant. - */ - public CompletableFuture>> list() { - return list(ListEncryptionKeysRequestParameters.builder().build()); - } - - /** - * Retrieve details of all the encryption keys associated with your tenant. - */ - public CompletableFuture>> list( - ListEncryptionKeysRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve details of all the encryption keys associated with your tenant. - */ - public CompletableFuture>> list( - ListEncryptionKeysRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/encryption"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - 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()) { - ListEncryptionKeyOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListEncryptionKeyOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListEncryptionKeysRequestParameters nextRequest = ListEncryptionKeysRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getKeys().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 (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 the new, pre-activated encryption key, without the key material. - */ - public CompletableFuture> create( - CreateEncryptionKeyRequestContent request) { - return create(request, null); - } - - /** - * Create the new, pre-activated encryption key, without the key material. - */ - public CompletableFuture> create( - CreateEncryptionKeyRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/encryption") - .build(); - 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) - .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); - } - 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, CreateEncryptionKeyResponseContent.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 (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; - } - - /** - * Perform rekeying operation on the key hierarchy. - */ - public CompletableFuture> rekey() { - return rekey(null); - } - - /** - * Perform rekeying operation on the key hierarchy. - */ - public CompletableFuture> rekey(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/encryption/rekey") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve details of the encryption key with the given ID. - */ - public CompletableFuture> get(String kid) { - return get(kid, null); - } - - /** - * Retrieve details of the encryption key with the given ID. - */ - public CompletableFuture> get( - String kid, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/encryption") - .addPathSegment(kid) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetEncryptionKeyResponseContent.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 (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; - } - - /** - * Import wrapped key material and activate encryption key. - */ - public CompletableFuture> import_( - String kid, ImportEncryptionKeyRequestContent request) { - return import_(kid, request, null); - } - - /** - * Import wrapped key material and activate encryption key. - */ - public CompletableFuture> import_( - String kid, ImportEncryptionKeyRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/encryption") - .addPathSegment(kid) - .build(); - 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) - .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); - } - 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, ImportEncryptionKeyResponseContent.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 (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 the custom provided encryption key with the given ID and move back to using native encryption key. - */ - public CompletableFuture> delete(String kid) { - return delete(kid, null); - } - - /** - * Delete the custom provided encryption key with the given ID and move back to using native encryption key. - */ - public CompletableFuture> delete(String kid, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/encryption") - .addPathSegment(kid) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 the public wrapping key to wrap your own encryption key material. - */ - public CompletableFuture> - createPublicWrappingKey(String kid) { - return createPublicWrappingKey(kid, null); - } - - /** - * Create the public wrapping key to wrap your own encryption key material. - */ - public CompletableFuture> - createPublicWrappingKey(String kid, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/encryption") - .addPathSegment(kid) - .addPathSegments("wrapping-key") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, CreateEncryptionKeyPublicWrappingResponseContent.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 (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 deleted file mode 100644 index 56f3529a7..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/AsyncRawSigningClient.java +++ /dev/null @@ -1,370 +0,0 @@ -/** - * 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.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -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.GetSigningKeysResponseContent; -import com.auth0.client.mgmt.types.RevokedSigningKeysResponseContent; -import com.auth0.client.mgmt.types.RotateSigningKeysResponseContent; -import com.auth0.client.mgmt.types.SigningKeys; -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; -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 AsyncRawSigningClient { - protected final ClientOptions clientOptions; - - public AsyncRawSigningClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of all the application signing keys associated with your tenant. - */ - public CompletableFuture>> list() { - return list(null); - } - - /** - * Retrieve details of all the application signing keys associated with your tenant. - */ - public CompletableFuture>> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/signing") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture>> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Rotate the application signing key of your tenant. - */ - public CompletableFuture> rotate() { - return rotate(null); - } - - /** - * Rotate the application signing key of your tenant. - */ - public CompletableFuture> rotate( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/signing/rotate") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, RotateSigningKeysResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve details of the application signing key with the given ID. - */ - public CompletableFuture> get(String kid) { - return get(kid, null); - } - - /** - * Retrieve details of the application signing key with the given ID. - */ - public CompletableFuture> get( - String kid, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/signing") - .addPathSegment(kid) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetSigningKeysResponseContent.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 (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; - } - - /** - * Revoke the application signing key with the given ID. - */ - public CompletableFuture> revoke(String kid) { - return revoke(kid, null); - } - - /** - * Revoke the application signing key with the given ID. - */ - public CompletableFuture> revoke( - String kid, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/signing") - .addPathSegment(kid) - .addPathSegments("revoke") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("PUT", RequestBody.create("", null)) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - 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, RevokedSigningKeysResponseContent.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 (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/AsyncSigningClient.java b/src/main/java/com/auth0/client/mgmt/keys/AsyncSigningClient.java deleted file mode 100644 index f5cedffd1..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/AsyncSigningClient.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 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.types.GetSigningKeysResponseContent; -import com.auth0.client.mgmt.types.RevokedSigningKeysResponseContent; -import com.auth0.client.mgmt.types.RotateSigningKeysResponseContent; -import com.auth0.client.mgmt.types.SigningKeys; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -public class AsyncSigningClient { - protected final ClientOptions clientOptions; - - private final AsyncRawSigningClient rawClient; - - public AsyncSigningClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawSigningClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawSigningClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of all the application signing keys associated with your tenant. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Retrieve details of all the application signing keys associated with your tenant. - */ - public CompletableFuture> list(RequestOptions requestOptions) { - return this.rawClient.list(requestOptions).thenApply(response -> response.body()); - } - - /** - * Rotate the application signing key of your tenant. - */ - public CompletableFuture rotate() { - return this.rawClient.rotate().thenApply(response -> response.body()); - } - - /** - * Rotate the application signing key of your tenant. - */ - public CompletableFuture rotate(RequestOptions requestOptions) { - return this.rawClient.rotate(requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details of the application signing key with the given ID. - */ - public CompletableFuture get(String kid) { - return this.rawClient.get(kid).thenApply(response -> response.body()); - } - - /** - * Retrieve details of the application signing key with the given ID. - */ - public CompletableFuture get(String kid, RequestOptions requestOptions) { - return this.rawClient.get(kid, requestOptions).thenApply(response -> response.body()); - } - - /** - * Revoke the application signing key with the given ID. - */ - public CompletableFuture revoke(String kid) { - return this.rawClient.revoke(kid).thenApply(response -> response.body()); - } - - /** - * Revoke the application signing key with the given ID. - */ - public CompletableFuture revoke(String kid, RequestOptions requestOptions) { - return this.rawClient.revoke(kid, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/keys/CustomSigningClient.java b/src/main/java/com/auth0/client/mgmt/keys/CustomSigningClient.java deleted file mode 100644 index eb3b4981f..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/CustomSigningClient.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 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.SetCustomSigningKeysRequestContent; -import com.auth0.client.mgmt.types.GetCustomSigningKeysResponseContent; -import com.auth0.client.mgmt.types.SetCustomSigningKeysResponseContent; - -public class CustomSigningClient { - protected final ClientOptions clientOptions; - - private final RawCustomSigningClient rawClient; - - public CustomSigningClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawCustomSigningClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawCustomSigningClient withRawResponse() { - return this.rawClient; - } - - /** - * Get entire jwks representation of custom signing keys. - */ - public GetCustomSigningKeysResponseContent get() { - return this.rawClient.get().body(); - } - - /** - * Get entire jwks representation of custom signing keys. - */ - public GetCustomSigningKeysResponseContent get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).body(); - } - - /** - * Create or replace entire jwks representation of custom signing keys. - */ - public SetCustomSigningKeysResponseContent set(SetCustomSigningKeysRequestContent request) { - return this.rawClient.set(request).body(); - } - - /** - * Create or replace entire jwks representation of custom signing keys. - */ - public SetCustomSigningKeysResponseContent set( - SetCustomSigningKeysRequestContent request, RequestOptions requestOptions) { - return this.rawClient.set(request, requestOptions).body(); - } - - /** - * Delete entire jwks representation of custom signing keys. - */ - public void delete() { - this.rawClient.delete().body(); - } - - /** - * Delete entire jwks representation of custom signing keys. - */ - public void delete(RequestOptions requestOptions) { - this.rawClient.delete(requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/keys/EncryptionClient.java b/src/main/java/com/auth0/client/mgmt/keys/EncryptionClient.java deleted file mode 100644 index 0830d6d7d..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/EncryptionClient.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * 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.core.SyncPagingIterable; -import com.auth0.client.mgmt.keys.types.CreateEncryptionKeyRequestContent; -import com.auth0.client.mgmt.keys.types.ImportEncryptionKeyRequestContent; -import com.auth0.client.mgmt.keys.types.ListEncryptionKeysRequestParameters; -import com.auth0.client.mgmt.types.CreateEncryptionKeyPublicWrappingResponseContent; -import com.auth0.client.mgmt.types.CreateEncryptionKeyResponseContent; -import com.auth0.client.mgmt.types.EncryptionKey; -import com.auth0.client.mgmt.types.GetEncryptionKeyResponseContent; -import com.auth0.client.mgmt.types.ImportEncryptionKeyResponseContent; - -public class EncryptionClient { - protected final ClientOptions clientOptions; - - private final RawEncryptionClient rawClient; - - public EncryptionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawEncryptionClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawEncryptionClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of all the encryption keys associated with your tenant. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve details of all the encryption keys associated with your tenant. - */ - public SyncPagingIterable list(ListEncryptionKeysRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Retrieve details of all the encryption keys associated with your tenant. - */ - public SyncPagingIterable list( - ListEncryptionKeysRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create the new, pre-activated encryption key, without the key material. - */ - public CreateEncryptionKeyResponseContent create(CreateEncryptionKeyRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create the new, pre-activated encryption key, without the key material. - */ - public CreateEncryptionKeyResponseContent create( - CreateEncryptionKeyRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Perform rekeying operation on the key hierarchy. - */ - public void rekey() { - this.rawClient.rekey().body(); - } - - /** - * Perform rekeying operation on the key hierarchy. - */ - public void rekey(RequestOptions requestOptions) { - this.rawClient.rekey(requestOptions).body(); - } - - /** - * Retrieve details of the encryption key with the given ID. - */ - public GetEncryptionKeyResponseContent get(String kid) { - return this.rawClient.get(kid).body(); - } - - /** - * Retrieve details of the encryption key with the given ID. - */ - public GetEncryptionKeyResponseContent get(String kid, RequestOptions requestOptions) { - return this.rawClient.get(kid, requestOptions).body(); - } - - /** - * Import wrapped key material and activate encryption key. - */ - public ImportEncryptionKeyResponseContent import_(String kid, ImportEncryptionKeyRequestContent request) { - return this.rawClient.import_(kid, request).body(); - } - - /** - * Import wrapped key material and activate encryption key. - */ - public ImportEncryptionKeyResponseContent import_( - String kid, ImportEncryptionKeyRequestContent request, RequestOptions requestOptions) { - return this.rawClient.import_(kid, request, requestOptions).body(); - } - - /** - * Delete the custom provided encryption key with the given ID and move back to using native encryption key. - */ - public void delete(String kid) { - this.rawClient.delete(kid).body(); - } - - /** - * Delete the custom provided encryption key with the given ID and move back to using native encryption key. - */ - public void delete(String kid, RequestOptions requestOptions) { - this.rawClient.delete(kid, requestOptions).body(); - } - - /** - * Create the public wrapping key to wrap your own encryption key material. - */ - public CreateEncryptionKeyPublicWrappingResponseContent createPublicWrappingKey(String kid) { - return this.rawClient.createPublicWrappingKey(kid).body(); - } - - /** - * Create the public wrapping key to wrap your own encryption key material. - */ - public CreateEncryptionKeyPublicWrappingResponseContent createPublicWrappingKey( - String kid, RequestOptions requestOptions) { - return this.rawClient.createPublicWrappingKey(kid, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/keys/KeysClient.java b/src/main/java/com/auth0/client/mgmt/keys/KeysClient.java deleted file mode 100644 index df7f643c8..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/KeysClient.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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.Suppliers; -import java.util.function.Supplier; - -public class KeysClient { - protected final ClientOptions clientOptions; - - protected final Supplier customSigningClient; - - protected final Supplier encryptionClient; - - 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.signingClient = Suppliers.memoize(() -> new SigningClient(clientOptions)); - } - - public CustomSigningClient customSigning() { - return this.customSigningClient.get(); - } - - public EncryptionClient encryption() { - return this.encryptionClient.get(); - } - - public SigningClient signing() { - return this.signingClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/keys/RawCustomSigningClient.java b/src/main/java/com/auth0/client/mgmt/keys/RawCustomSigningClient.java deleted file mode 100644 index 6def929b2..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/RawCustomSigningClient.java +++ /dev/null @@ -1,221 +0,0 @@ -/** - * 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.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.keys.types.SetCustomSigningKeysRequestContent; -import com.auth0.client.mgmt.types.GetCustomSigningKeysResponseContent; -import com.auth0.client.mgmt.types.SetCustomSigningKeysResponseContent; -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 RawCustomSigningClient { - protected final ClientOptions clientOptions; - - public RawCustomSigningClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Get entire jwks representation of custom signing keys. - */ - public ManagementApiHttpResponse get() { - return get(null); - } - - /** - * Get entire jwks representation of custom signing keys. - */ - public ManagementApiHttpResponse get(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/custom-signing") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetCustomSigningKeysResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create or replace entire jwks representation of custom signing keys. - */ - public ManagementApiHttpResponse set( - SetCustomSigningKeysRequestContent request) { - return set(request, null); - } - - /** - * Create or replace entire jwks representation of custom signing keys. - */ - public ManagementApiHttpResponse set( - SetCustomSigningKeysRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/custom-signing") - .build(); - 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) - .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); - } - 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, SetCustomSigningKeysResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete entire jwks representation of custom signing keys. - */ - public ManagementApiHttpResponse delete() { - return delete(null); - } - - /** - * Delete entire jwks representation of custom signing keys. - */ - public ManagementApiHttpResponse delete(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/custom-signing") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/keys/RawEncryptionClient.java b/src/main/java/com/auth0/client/mgmt/keys/RawEncryptionClient.java deleted file mode 100644 index 7f3857ad7..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/RawEncryptionClient.java +++ /dev/null @@ -1,520 +0,0 @@ -/** - * 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.QueryStringMapper; -import com.auth0.client.mgmt.core.RequestOptions; -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.keys.types.CreateEncryptionKeyRequestContent; -import com.auth0.client.mgmt.keys.types.ImportEncryptionKeyRequestContent; -import com.auth0.client.mgmt.keys.types.ListEncryptionKeysRequestParameters; -import com.auth0.client.mgmt.types.CreateEncryptionKeyPublicWrappingResponseContent; -import com.auth0.client.mgmt.types.CreateEncryptionKeyResponseContent; -import com.auth0.client.mgmt.types.EncryptionKey; -import com.auth0.client.mgmt.types.GetEncryptionKeyResponseContent; -import com.auth0.client.mgmt.types.ImportEncryptionKeyResponseContent; -import com.auth0.client.mgmt.types.ListEncryptionKeyOffsetPaginatedResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawEncryptionClient { - protected final ClientOptions clientOptions; - - public RawEncryptionClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of all the encryption keys associated with your tenant. - */ - public ManagementApiHttpResponse> list() { - return list(ListEncryptionKeysRequestParameters.builder().build()); - } - - /** - * Retrieve details of all the encryption keys associated with your tenant. - */ - public ManagementApiHttpResponse> list( - ListEncryptionKeysRequestParameters request) { - return list(request, null); - } - - /** - * Retrieve details of all the encryption keys associated with your tenant. - */ - public ManagementApiHttpResponse> list( - ListEncryptionKeysRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/encryption"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListEncryptionKeyOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListEncryptionKeyOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListEncryptionKeysRequestParameters nextRequest = ListEncryptionKeysRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getKeys().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create the new, pre-activated encryption key, without the key material. - */ - public ManagementApiHttpResponse create( - CreateEncryptionKeyRequestContent request) { - return create(request, null); - } - - /** - * Create the new, pre-activated encryption key, without the key material. - */ - public ManagementApiHttpResponse create( - CreateEncryptionKeyRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/encryption") - .build(); - 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) - .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); - } - 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, CreateEncryptionKeyResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Perform rekeying operation on the key hierarchy. - */ - public ManagementApiHttpResponse rekey() { - return rekey(null); - } - - /** - * Perform rekeying operation on the key hierarchy. - */ - public ManagementApiHttpResponse rekey(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/encryption/rekey") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details of the encryption key with the given ID. - */ - public ManagementApiHttpResponse get(String kid) { - return get(kid, null); - } - - /** - * Retrieve details of the encryption key with the given ID. - */ - public ManagementApiHttpResponse get(String kid, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/encryption") - .addPathSegment(kid) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetEncryptionKeyResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Import wrapped key material and activate encryption key. - */ - public ManagementApiHttpResponse import_( - String kid, ImportEncryptionKeyRequestContent request) { - return import_(kid, request, null); - } - - /** - * Import wrapped key material and activate encryption key. - */ - public ManagementApiHttpResponse import_( - String kid, ImportEncryptionKeyRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/encryption") - .addPathSegment(kid) - .build(); - 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) - .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); - } - 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, ImportEncryptionKeyResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete the custom provided encryption key with the given ID and move back to using native encryption key. - */ - public ManagementApiHttpResponse delete(String kid) { - return delete(kid, null); - } - - /** - * Delete the custom provided encryption key with the given ID and move back to using native encryption key. - */ - public ManagementApiHttpResponse delete(String kid, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/encryption") - .addPathSegment(kid) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create the public wrapping key to wrap your own encryption key material. - */ - public ManagementApiHttpResponse createPublicWrappingKey( - String kid) { - return createPublicWrappingKey(kid, null); - } - - /** - * Create the public wrapping key to wrap your own encryption key material. - */ - public ManagementApiHttpResponse createPublicWrappingKey( - String kid, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/encryption") - .addPathSegment(kid) - .addPathSegments("wrapping-key") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, CreateEncryptionKeyPublicWrappingResponseContent.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 (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 deleted file mode 100644 index 378745dd8..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/RawSigningClient.java +++ /dev/null @@ -1,278 +0,0 @@ -/** - * 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.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -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.GetSigningKeysResponseContent; -import com.auth0.client.mgmt.types.RevokedSigningKeysResponseContent; -import com.auth0.client.mgmt.types.RotateSigningKeysResponseContent; -import com.auth0.client.mgmt.types.SigningKeys; -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 RawSigningClient { - protected final ClientOptions clientOptions; - - public RawSigningClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details of all the application signing keys associated with your tenant. - */ - public ManagementApiHttpResponse> list() { - return list(null); - } - - /** - * Retrieve details of all the application signing keys associated with your tenant. - */ - public ManagementApiHttpResponse> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/signing") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Rotate the application signing key of your tenant. - */ - public ManagementApiHttpResponse rotate() { - return rotate(null); - } - - /** - * Rotate the application signing key of your tenant. - */ - public ManagementApiHttpResponse rotate(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/signing/rotate") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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, RotateSigningKeysResponseContent.class), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details of the application signing key with the given ID. - */ - public ManagementApiHttpResponse get(String kid) { - return get(kid, null); - } - - /** - * Retrieve details of the application signing key with the given ID. - */ - public ManagementApiHttpResponse get(String kid, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/signing") - .addPathSegment(kid) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetSigningKeysResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Revoke the application signing key with the given ID. - */ - public ManagementApiHttpResponse revoke(String kid) { - return revoke(kid, null); - } - - /** - * Revoke the application signing key with the given ID. - */ - public ManagementApiHttpResponse revoke( - String kid, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("keys/signing") - .addPathSegment(kid) - .addPathSegments("revoke") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("PUT", RequestBody.create("", null)) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - 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, RevokedSigningKeysResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/keys/SigningClient.java b/src/main/java/com/auth0/client/mgmt/keys/SigningClient.java deleted file mode 100644 index 007648645..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/SigningClient.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * 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.types.GetSigningKeysResponseContent; -import com.auth0.client.mgmt.types.RevokedSigningKeysResponseContent; -import com.auth0.client.mgmt.types.RotateSigningKeysResponseContent; -import com.auth0.client.mgmt.types.SigningKeys; -import java.util.List; - -public class SigningClient { - protected final ClientOptions clientOptions; - - private final RawSigningClient rawClient; - - public SigningClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawSigningClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawSigningClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details of all the application signing keys associated with your tenant. - */ - public List list() { - return this.rawClient.list().body(); - } - - /** - * Retrieve details of all the application signing keys associated with your tenant. - */ - public List list(RequestOptions requestOptions) { - return this.rawClient.list(requestOptions).body(); - } - - /** - * Rotate the application signing key of your tenant. - */ - public RotateSigningKeysResponseContent rotate() { - return this.rawClient.rotate().body(); - } - - /** - * Rotate the application signing key of your tenant. - */ - public RotateSigningKeysResponseContent rotate(RequestOptions requestOptions) { - return this.rawClient.rotate(requestOptions).body(); - } - - /** - * Retrieve details of the application signing key with the given ID. - */ - public GetSigningKeysResponseContent get(String kid) { - return this.rawClient.get(kid).body(); - } - - /** - * Retrieve details of the application signing key with the given ID. - */ - public GetSigningKeysResponseContent get(String kid, RequestOptions requestOptions) { - return this.rawClient.get(kid, requestOptions).body(); - } - - /** - * Revoke the application signing key with the given ID. - */ - public RevokedSigningKeysResponseContent revoke(String kid) { - return this.rawClient.revoke(kid).body(); - } - - /** - * Revoke the application signing key with the given ID. - */ - public RevokedSigningKeysResponseContent revoke(String kid, RequestOptions requestOptions) { - return this.rawClient.revoke(kid, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/keys/types/CreateEncryptionKeyRequestContent.java b/src/main/java/com/auth0/client/mgmt/keys/types/CreateEncryptionKeyRequestContent.java deleted file mode 100644 index 980fad36a..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/types/CreateEncryptionKeyRequestContent.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * 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.CreateEncryptionKeyType; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateEncryptionKeyRequestContent.Builder.class) -public final class CreateEncryptionKeyRequestContent { - private final CreateEncryptionKeyType type; - - private final Map additionalProperties; - - private CreateEncryptionKeyRequestContent(CreateEncryptionKeyType type, Map additionalProperties) { - this.type = type; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public CreateEncryptionKeyType getType() { - return type; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateEncryptionKeyRequestContent && equalTo((CreateEncryptionKeyRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateEncryptionKeyRequestContent other) { - return type.equals(other.type); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - _FinalStage type(@NotNull CreateEncryptionKeyType type); - - Builder from(CreateEncryptionKeyRequestContent other); - } - - public interface _FinalStage { - CreateEncryptionKeyRequestContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, _FinalStage { - private CreateEncryptionKeyType type; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateEncryptionKeyRequestContent other) { - type(other.getType()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull CreateEncryptionKeyType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public CreateEncryptionKeyRequestContent build() { - return new CreateEncryptionKeyRequestContent(type, additionalProperties); - } - } -} 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 deleted file mode 100644 index d87c5b36d..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/types/ImportEncryptionKeyRequestContent.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * 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.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = ImportEncryptionKeyRequestContent.Builder.class) -public final class ImportEncryptionKeyRequestContent { - private final String wrappedKey; - - private final Map additionalProperties; - - private ImportEncryptionKeyRequestContent(String wrappedKey, Map additionalProperties) { - this.wrappedKey = wrappedKey; - this.additionalProperties = additionalProperties; - } - - /** - * @return Base64 encoded ciphertext of key material wrapped by public wrapping key. - */ - @JsonProperty("wrapped_key") - public String getWrappedKey() { - return wrappedKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ImportEncryptionKeyRequestContent && equalTo((ImportEncryptionKeyRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ImportEncryptionKeyRequestContent other) { - return wrappedKey.equals(other.wrappedKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.wrappedKey); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static WrappedKeyStage builder() { - return new Builder(); - } - - public interface WrappedKeyStage { - /** - *

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

- */ - _FinalStage wrappedKey(@NotNull String wrappedKey); - - Builder from(ImportEncryptionKeyRequestContent other); - } - - public interface _FinalStage { - ImportEncryptionKeyRequestContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements WrappedKeyStage, _FinalStage { - private String wrappedKey; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ImportEncryptionKeyRequestContent other) { - wrappedKey(other.getWrappedKey()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("wrapped_key") - public _FinalStage wrappedKey(@NotNull String wrappedKey) { - this.wrappedKey = Objects.requireNonNull(wrappedKey, "wrappedKey must not be null"); - return this; - } - - @java.lang.Override - public ImportEncryptionKeyRequestContent build() { - return new ImportEncryptionKeyRequestContent(wrappedKey, additionalProperties); - } - } -} 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 deleted file mode 100644 index 1d7cedcba..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/types/ListEncryptionKeysRequestParameters.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.keys.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListEncryptionKeysRequestParameters.Builder.class) -public final class ListEncryptionKeysRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final Map additionalProperties; - - private ListEncryptionKeysRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. Default value is 50, maximum value is 100. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - return includeTotals; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListEncryptionKeysRequestParameters - && equalTo((ListEncryptionKeysRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListEncryptionKeysRequestParameters other) { - return page.equals(other.page) && perPage.equals(other.perPage) && includeTotals.equals(other.includeTotals); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage, this.includeTotals); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListEncryptionKeysRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page. Default value is 50, maximum value is 100.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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(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; - } - - public ListEncryptionKeysRequestParameters build() { - return new ListEncryptionKeysRequestParameters(page, perPage, includeTotals, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/keys/types/SetCustomSigningKeysRequestContent.java b/src/main/java/com/auth0/client/mgmt/keys/types/SetCustomSigningKeysRequestContent.java deleted file mode 100644 index 78249d6b9..000000000 --- a/src/main/java/com/auth0/client/mgmt/keys/types/SetCustomSigningKeysRequestContent.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * 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.CustomSigningKeyJwk; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = SetCustomSigningKeysRequestContent.Builder.class) -public final class SetCustomSigningKeysRequestContent { - private final List keys; - - private final Map additionalProperties; - - private SetCustomSigningKeysRequestContent( - List keys, Map additionalProperties) { - this.keys = keys; - this.additionalProperties = additionalProperties; - } - - /** - * @return An array of custom public signing keys. - */ - @JsonProperty("keys") - public List getKeys() { - return keys; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetCustomSigningKeysRequestContent - && equalTo((SetCustomSigningKeysRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetCustomSigningKeysRequestContent 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(SetCustomSigningKeysRequestContent other) { - keys(other.getKeys()); - return this; - } - - /** - *

An array of custom public signing 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(CustomSigningKeyJwk keys) { - this.keys.add(keys); - return this; - } - - public Builder addAllKeys(List keys) { - if (keys != null) { - this.keys.addAll(keys); - } - return this; - } - - public SetCustomSigningKeysRequestContent build() { - return new SetCustomSigningKeysRequestContent(keys, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncClientGrantsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncClientGrantsClient.java deleted file mode 100644 index 780a65c64..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncClientGrantsClient.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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.AssociateOrganizationClientGrantRequestContent; -import com.auth0.client.mgmt.organizations.types.ListOrganizationClientGrantsRequestParameters; -import com.auth0.client.mgmt.types.AssociateOrganizationClientGrantResponseContent; -import com.auth0.client.mgmt.types.OrganizationClientGrant; -import java.util.concurrent.CompletableFuture; - -public class AsyncClientGrantsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawClientGrantsClient rawClient; - - public AsyncClientGrantsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawClientGrantsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawClientGrantsClient withRawResponse() { - return this.rawClient; - } - - public CompletableFuture> list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - public CompletableFuture> list( - String id, ListOrganizationClientGrantsRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture> list( - String id, ListOrganizationClientGrantsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture create( - String id, AssociateOrganizationClientGrantRequestContent request) { - return this.rawClient.create(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture create( - String id, AssociateOrganizationClientGrantRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture delete(String id, String grantId) { - return this.rawClient.delete(id, grantId).thenApply(response -> response.body()); - } - - public CompletableFuture delete(String id, String grantId, RequestOptions requestOptions) { - return this.rawClient.delete(id, grantId, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncDiscoveryDomainsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncDiscoveryDomainsClient.java deleted file mode 100644 index 7f02e4015..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncDiscoveryDomainsClient.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * 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.CreateOrganizationDiscoveryDomainRequestContent; -import com.auth0.client.mgmt.organizations.types.ListOrganizationDiscoveryDomainsRequestParameters; -import com.auth0.client.mgmt.organizations.types.UpdateOrganizationDiscoveryDomainRequestContent; -import com.auth0.client.mgmt.types.CreateOrganizationDiscoveryDomainResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationDiscoveryDomainByNameResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationDiscoveryDomainResponseContent; -import com.auth0.client.mgmt.types.OrganizationDiscoveryDomain; -import com.auth0.client.mgmt.types.UpdateOrganizationDiscoveryDomainResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncDiscoveryDomainsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawDiscoveryDomainsClient rawClient; - - public AsyncDiscoveryDomainsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawDiscoveryDomainsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawDiscoveryDomainsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve list of all organization discovery domains associated with the specified organization. - */ - public CompletableFuture> list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - /** - * Retrieve list of all organization discovery domains associated with the specified organization. - */ - public CompletableFuture> list( - String id, ListOrganizationDiscoveryDomainsRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve list of all organization discovery domains associated with the specified organization. - */ - public CompletableFuture> list( - String id, ListOrganizationDiscoveryDomainsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a new discovery domain for an organization. - */ - public CompletableFuture create( - String id, CreateOrganizationDiscoveryDomainRequestContent request) { - return this.rawClient.create(id, request).thenApply(response -> response.body()); - } - - /** - * Create a new discovery domain for an organization. - */ - public CompletableFuture create( - String id, CreateOrganizationDiscoveryDomainRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a single organization discovery domain specified by domain name. - */ - public CompletableFuture getByName( - String id, String discoveryDomain) { - return this.rawClient.getByName(id, discoveryDomain).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a single organization discovery domain specified by domain name. - */ - public CompletableFuture getByName( - String id, String discoveryDomain, RequestOptions requestOptions) { - return this.rawClient.getByName(id, discoveryDomain, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a single organization discovery domain specified by ID. - */ - public CompletableFuture get(String id, String discoveryDomainId) { - return this.rawClient.get(id, discoveryDomainId).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a single organization discovery domain specified by ID. - */ - public CompletableFuture get( - String id, String discoveryDomainId, RequestOptions requestOptions) { - return this.rawClient.get(id, discoveryDomainId, requestOptions).thenApply(response -> response.body()); - } - - /** - * Remove a discovery domain from an organization. This action cannot be undone. - */ - public CompletableFuture delete(String id, String discoveryDomainId) { - return this.rawClient.delete(id, discoveryDomainId).thenApply(response -> response.body()); - } - - /** - * Remove a discovery domain from an organization. This action cannot be undone. - */ - public CompletableFuture delete(String id, String discoveryDomainId, RequestOptions requestOptions) { - return this.rawClient.delete(id, discoveryDomainId, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The <code>status</code> field must be either <code>pending</code> or <code>verified</code>. The <code>use_for_organization_discovery</code> field can be <code>true</code> or <code>false</code> (default: <code>true</code>). - */ - public CompletableFuture update( - String id, String discoveryDomainId) { - return this.rawClient.update(id, discoveryDomainId).thenApply(response -> response.body()); - } - - /** - * Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The <code>status</code> field must be either <code>pending</code> or <code>verified</code>. The <code>use_for_organization_discovery</code> field can be <code>true</code> or <code>false</code> (default: <code>true</code>). - */ - public CompletableFuture update( - String id, String discoveryDomainId, UpdateOrganizationDiscoveryDomainRequestContent request) { - return this.rawClient.update(id, discoveryDomainId, request).thenApply(response -> response.body()); - } - - /** - * Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The <code>status</code> field must be either <code>pending</code> or <code>verified</code>. The <code>use_for_organization_discovery</code> field can be <code>true</code> or <code>false</code> (default: <code>true</code>). - */ - public CompletableFuture update( - String id, - String discoveryDomainId, - UpdateOrganizationDiscoveryDomainRequestContent request, - RequestOptions requestOptions) { - return this.rawClient - .update(id, discoveryDomainId, request, requestOptions) - .thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncEnabledConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncEnabledConnectionsClient.java deleted file mode 100644 index bfc2e0378..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncEnabledConnectionsClient.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * 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.AddOrganizationConnectionRequestContent; -import com.auth0.client.mgmt.organizations.types.ListOrganizationConnectionsRequestParameters; -import com.auth0.client.mgmt.organizations.types.UpdateOrganizationConnectionRequestContent; -import com.auth0.client.mgmt.types.AddOrganizationConnectionResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationConnectionResponseContent; -import com.auth0.client.mgmt.types.OrganizationConnection; -import com.auth0.client.mgmt.types.UpdateOrganizationConnectionResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncEnabledConnectionsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawEnabledConnectionsClient rawClient; - - public AsyncEnabledConnectionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawEnabledConnectionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawEnabledConnectionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public CompletableFuture> list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public CompletableFuture> list( - String id, ListOrganizationConnectionsRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public CompletableFuture> list( - String id, ListOrganizationConnectionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Enable a specific connection for a given Organization. To enable a connection, it must already exist within your tenant; connections cannot be created through this action. - *

<a href="https://auth0.com/docs/authenticate/identity-providers">Connections</a> represent the relationship between Auth0 and a source of users. Available types of connections include database, enterprise, and social.

- */ - public CompletableFuture add( - String id, AddOrganizationConnectionRequestContent request) { - return this.rawClient.add(id, request).thenApply(response -> response.body()); - } - - /** - * Enable a specific connection for a given Organization. To enable a connection, it must already exist within your tenant; connections cannot be created through this action. - *

<a href="https://auth0.com/docs/authenticate/identity-providers">Connections</a> represent the relationship between Auth0 and a source of users. Available types of connections include database, enterprise, and social.

- */ - public CompletableFuture add( - String id, AddOrganizationConnectionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.add(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public CompletableFuture get(String id, String connectionId) { - return this.rawClient.get(id, connectionId).thenApply(response -> response.body()); - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public CompletableFuture get( - String id, String connectionId, RequestOptions requestOptions) { - return this.rawClient.get(id, connectionId, requestOptions).thenApply(response -> response.body()); - } - - /** - * Disable a specific connection for an Organization. Once disabled, Organization members can no longer use that connection to authenticate. - *

<b>Note</b>: This action does not remove the connection from your tenant.

- */ - public CompletableFuture delete(String id, String connectionId) { - return this.rawClient.delete(id, connectionId).thenApply(response -> response.body()); - } - - /** - * Disable a specific connection for an Organization. Once disabled, Organization members can no longer use that connection to authenticate. - *

<b>Note</b>: This action does not remove the connection from your tenant.

- */ - public CompletableFuture delete(String id, String connectionId, RequestOptions requestOptions) { - return this.rawClient.delete(id, connectionId, requestOptions).thenApply(response -> response.body()); - } - - /** - * Modify the details of a specific connection currently enabled for an Organization. - */ - public CompletableFuture update(String id, String connectionId) { - return this.rawClient.update(id, connectionId).thenApply(response -> response.body()); - } - - /** - * Modify the details of a specific connection currently enabled for an Organization. - */ - public CompletableFuture update( - String id, String connectionId, UpdateOrganizationConnectionRequestContent request) { - return this.rawClient.update(id, connectionId, request).thenApply(response -> response.body()); - } - - /** - * Modify the details of a specific connection currently enabled for an Organization. - */ - public CompletableFuture update( - String id, - String connectionId, - UpdateOrganizationConnectionRequestContent request, - RequestOptions requestOptions) { - return this.rawClient.update(id, connectionId, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncInvitationsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncInvitationsClient.java deleted file mode 100644 index e1e81ab65..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncInvitationsClient.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * 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.CreateOrganizationInvitationRequestContent; -import com.auth0.client.mgmt.organizations.types.GetOrganizationInvitationRequestParameters; -import com.auth0.client.mgmt.organizations.types.ListOrganizationInvitationsRequestParameters; -import com.auth0.client.mgmt.types.CreateOrganizationInvitationResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationInvitationResponseContent; -import com.auth0.client.mgmt.types.OrganizationInvitation; -import java.util.concurrent.CompletableFuture; - -public class AsyncInvitationsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawInvitationsClient rawClient; - - public AsyncInvitationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawInvitationsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawInvitationsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public CompletableFuture> list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - /** - * Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public CompletableFuture> list( - String id, ListOrganizationInvitationsRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public CompletableFuture> list( - String id, ListOrganizationInvitationsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a user invitation for a specific Organization. Upon creation, the listed user receives an email inviting them to join the Organization. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public CompletableFuture create( - String id, CreateOrganizationInvitationRequestContent request) { - return this.rawClient.create(id, request).thenApply(response -> response.body()); - } - - /** - * Create a user invitation for a specific Organization. Upon creation, the listed user receives an email inviting them to join the Organization. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public CompletableFuture create( - String id, CreateOrganizationInvitationRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture get(String id, String invitationId) { - return this.rawClient.get(id, invitationId).thenApply(response -> response.body()); - } - - public CompletableFuture get( - String id, String invitationId, GetOrganizationInvitationRequestParameters request) { - return this.rawClient.get(id, invitationId, request).thenApply(response -> response.body()); - } - - public CompletableFuture get( - String id, - String invitationId, - GetOrganizationInvitationRequestParameters request, - RequestOptions requestOptions) { - return this.rawClient.get(id, invitationId, request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture delete(String id, String invitationId) { - return this.rawClient.delete(id, invitationId).thenApply(response -> response.body()); - } - - public CompletableFuture delete(String id, String invitationId, RequestOptions requestOptions) { - return this.rawClient.delete(id, invitationId, 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 deleted file mode 100644 index 31c2ebc5c..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncMembersClient.java +++ /dev/null @@ -1,141 +0,0 @@ -/** - * 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.Suppliers; -import com.auth0.client.mgmt.core.SyncPagingIterable; -import com.auth0.client.mgmt.organizations.members.AsyncRolesClient; -import com.auth0.client.mgmt.organizations.types.CreateOrganizationMemberRequestContent; -import com.auth0.client.mgmt.organizations.types.DeleteOrganizationMembersRequestContent; -import com.auth0.client.mgmt.organizations.types.ListOrganizationMembersRequestParameters; -import com.auth0.client.mgmt.types.OrganizationMember; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncMembersClient { - protected final ClientOptions clientOptions; - - private final AsyncRawMembersClient rawClient; - - protected final Supplier rolesClient; - - public AsyncMembersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawMembersClient(clientOptions); - this.rolesClient = Suppliers.memoize(() -> new AsyncRolesClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawMembersClient withRawResponse() { - return this.rawClient; - } - - /** - * 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. - *

<ul> - * <li> - * Use the <code>fields</code> parameter to optionally define the specific member details retrieved. If <code>fields</code> is left blank, all fields (except roles) are returned. - * </li> - * <li> - * Member roles are not sent by default. Use <code>fields=roles</code> to retrieve the roles assigned to each listed member. To use this parameter, you must include the <code>read:organization_member_roles</code> scope in the token. - * </li> - * </ul>

- *

This endpoint supports two types of pagination:

- *
    - *
  • Offset pagination
  • - *
  • Checkpoint pagination
  • - *
- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the <code>from</code> parameter. If there are more results, a <code>next</code> value will be included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, this indicates there are no more pages remaining.

- */ - public CompletableFuture> list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - /** - * 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. - *

<ul> - * <li> - * Use the <code>fields</code> parameter to optionally define the specific member details retrieved. If <code>fields</code> is left blank, all fields (except roles) are returned. - * </li> - * <li> - * Member roles are not sent by default. Use <code>fields=roles</code> to retrieve the roles assigned to each listed member. To use this parameter, you must include the <code>read:organization_member_roles</code> scope in the token. - * </li> - * </ul>

- *

This endpoint supports two types of pagination:

- *
    - *
  • Offset pagination
  • - *
  • Checkpoint pagination
  • - *
- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the <code>from</code> parameter. If there are more results, a <code>next</code> value will be included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, this indicates there are no more pages remaining.

- */ - public CompletableFuture> list( - String id, ListOrganizationMembersRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - /** - * 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. - *

<ul> - * <li> - * Use the <code>fields</code> parameter to optionally define the specific member details retrieved. If <code>fields</code> is left blank, all fields (except roles) are returned. - * </li> - * <li> - * Member roles are not sent by default. Use <code>fields=roles</code> to retrieve the roles assigned to each listed member. To use this parameter, you must include the <code>read:organization_member_roles</code> scope in the token. - * </li> - * </ul>

- *

This endpoint supports two types of pagination:

- *
    - *
  • Offset pagination
  • - *
  • Checkpoint pagination
  • - *
- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the <code>from</code> parameter. If there are more results, a <code>next</code> value will be included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, this indicates there are no more pages remaining.

- */ - public CompletableFuture> list( - String id, ListOrganizationMembersRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Set one or more existing users as members of a specific <a href="https://auth0.com/docs/manage-users/organizations">Organization</a>. - *

To add a user to an Organization through this action, the user must already exist in your tenant. If a user does not yet exist, you can <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">invite them to create an account</a>, manually create them through the Auth0 Dashboard, or use the Management API.

- */ - public CompletableFuture create(String id, CreateOrganizationMemberRequestContent request) { - return this.rawClient.create(id, request).thenApply(response -> response.body()); - } - - /** - * Set one or more existing users as members of a specific <a href="https://auth0.com/docs/manage-users/organizations">Organization</a>. - *

To add a user to an Organization through this action, the user must already exist in your tenant. If a user does not yet exist, you can <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">invite them to create an account</a>, manually create them through the Auth0 Dashboard, or use the Management API.

- */ - public CompletableFuture create( - String id, CreateOrganizationMemberRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture delete(String id, DeleteOrganizationMembersRequestContent request) { - return this.rawClient.delete(id, request).thenApply(response -> response.body()); - } - - public CompletableFuture delete( - String id, DeleteOrganizationMembersRequestContent request, RequestOptions requestOptions) { - return this.rawClient.delete(id, request, requestOptions).thenApply(response -> response.body()); - } - - public AsyncRolesClient roles() { - return this.rolesClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawClientGrantsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawClientGrantsClient.java deleted file mode 100644 index ff1f03932..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawClientGrantsClient.java +++ /dev/null @@ -1,349 +0,0 @@ -/** - * 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.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.AssociateOrganizationClientGrantRequestContent; -import com.auth0.client.mgmt.organizations.types.ListOrganizationClientGrantsRequestParameters; -import com.auth0.client.mgmt.types.AssociateOrganizationClientGrantResponseContent; -import com.auth0.client.mgmt.types.ListOrganizationClientGrantsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.OrganizationClientGrant; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawClientGrantsClient { - protected final ClientOptions clientOptions; - - public AsyncRawClientGrantsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public CompletableFuture>> list(String id) { - return list(id, ListOrganizationClientGrantsRequestParameters.builder().build()); - } - - public CompletableFuture>> list( - String id, ListOrganizationClientGrantsRequestParameters request) { - return list(id, request, null); - } - - public CompletableFuture>> list( - String id, ListOrganizationClientGrantsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("client-grants"); - if (!request.getAudience().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "audience", request.getAudience().orElse(null), false); - } - if (!request.getClientId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "client_id", request.getClientId().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (request.getGrantIds().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "grant_ids", request.getGrantIds().get(), true); - } - 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); - } - 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()) { - ListOrganizationClientGrantsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, - ListOrganizationClientGrantsOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListOrganizationClientGrantsRequestParameters nextRequest = - ListOrganizationClientGrantsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getClientGrants().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - public CompletableFuture> create( - String id, AssociateOrganizationClientGrantRequestContent request) { - return create(id, request, null); - } - - public CompletableFuture> create( - String id, AssociateOrganizationClientGrantRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("client-grants") - .build(); - 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) - .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); - } - 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, AssociateOrganizationClientGrantResponseContent.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 (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, String grantId) { - return delete(id, grantId, null); - } - - public CompletableFuture> delete( - String id, String grantId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("client-grants") - .addPathSegment(grantId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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/AsyncRawDiscoveryDomainsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawDiscoveryDomainsClient.java deleted file mode 100644 index 982ce062b..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawDiscoveryDomainsClient.java +++ /dev/null @@ -1,644 +0,0 @@ -/** - * 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.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.CreateOrganizationDiscoveryDomainRequestContent; -import com.auth0.client.mgmt.organizations.types.ListOrganizationDiscoveryDomainsRequestParameters; -import com.auth0.client.mgmt.organizations.types.UpdateOrganizationDiscoveryDomainRequestContent; -import com.auth0.client.mgmt.types.CreateOrganizationDiscoveryDomainResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationDiscoveryDomainByNameResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationDiscoveryDomainResponseContent; -import com.auth0.client.mgmt.types.ListOrganizationDiscoveryDomainsResponseContent; -import com.auth0.client.mgmt.types.OrganizationDiscoveryDomain; -import com.auth0.client.mgmt.types.UpdateOrganizationDiscoveryDomainResponseContent; -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 AsyncRawDiscoveryDomainsClient { - protected final ClientOptions clientOptions; - - public AsyncRawDiscoveryDomainsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve list of all organization discovery domains associated with the specified organization. - */ - public CompletableFuture>> list( - String id) { - return list( - id, ListOrganizationDiscoveryDomainsRequestParameters.builder().build()); - } - - /** - * Retrieve list of all organization discovery domains associated with the specified organization. - */ - public CompletableFuture>> list( - String id, ListOrganizationDiscoveryDomainsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve list of all organization discovery domains associated with the specified organization. - */ - public CompletableFuture>> list( - String id, ListOrganizationDiscoveryDomainsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("discovery-domains"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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()) { - ListOrganizationDiscoveryDomainsResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListOrganizationDiscoveryDomainsResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListOrganizationDiscoveryDomainsRequestParameters nextRequest = - ListOrganizationDiscoveryDomainsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getDomains(); - 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 (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 discovery domain for an organization. - */ - public CompletableFuture> create( - String id, CreateOrganizationDiscoveryDomainRequestContent request) { - return create(id, request, null); - } - - /** - * Create a new discovery domain for an organization. - */ - public CompletableFuture> create( - String id, CreateOrganizationDiscoveryDomainRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("discovery-domains") - .build(); - 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) - .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); - } - 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, CreateOrganizationDiscoveryDomainResponseContent.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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve details about a single organization discovery domain specified by domain name. - */ - public CompletableFuture> getByName( - String id, String discoveryDomain) { - return getByName(id, discoveryDomain, null); - } - - /** - * Retrieve details about a single organization discovery domain specified by domain name. - */ - public CompletableFuture> getByName( - String id, String discoveryDomain, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("discovery-domains/name") - .addPathSegment(discoveryDomain) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetOrganizationDiscoveryDomainByNameResponseContent.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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve details about a single organization discovery domain specified by ID. - */ - public CompletableFuture> get( - String id, String discoveryDomainId) { - return get(id, discoveryDomainId, null); - } - - /** - * Retrieve details about a single organization discovery domain specified by ID. - */ - public CompletableFuture> get( - String id, String discoveryDomainId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("discovery-domains") - .addPathSegment(discoveryDomainId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetOrganizationDiscoveryDomainResponseContent.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 (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 discovery domain from an organization. This action cannot be undone. - */ - public CompletableFuture> delete(String id, String discoveryDomainId) { - return delete(id, discoveryDomainId, null); - } - - /** - * Remove a discovery domain from an organization. This action cannot be undone. - */ - public CompletableFuture> delete( - String id, String discoveryDomainId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("discovery-domains") - .addPathSegment(discoveryDomainId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The <code>status</code> field must be either <code>pending</code> or <code>verified</code>. The <code>use_for_organization_discovery</code> field can be <code>true</code> or <code>false</code> (default: <code>true</code>). - */ - public CompletableFuture> update( - String id, String discoveryDomainId) { - return update( - id, - discoveryDomainId, - UpdateOrganizationDiscoveryDomainRequestContent.builder().build()); - } - - /** - * Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The <code>status</code> field must be either <code>pending</code> or <code>verified</code>. The <code>use_for_organization_discovery</code> field can be <code>true</code> or <code>false</code> (default: <code>true</code>). - */ - public CompletableFuture> update( - String id, String discoveryDomainId, UpdateOrganizationDiscoveryDomainRequestContent request) { - return update(id, discoveryDomainId, request, null); - } - - /** - * Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The <code>status</code> field must be either <code>pending</code> or <code>verified</code>. The <code>use_for_organization_discovery</code> field can be <code>true</code> or <code>false</code> (default: <code>true</code>). - */ - public CompletableFuture> update( - String id, - String discoveryDomainId, - UpdateOrganizationDiscoveryDomainRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("discovery-domains") - .addPathSegment(discoveryDomainId) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateOrganizationDiscoveryDomainResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 404: - future.completeExceptionally(new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawEnabledConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawEnabledConnectionsClient.java deleted file mode 100644 index 638ce747b..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawEnabledConnectionsClient.java +++ /dev/null @@ -1,539 +0,0 @@ -/** - * 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.SyncPagingIterable; -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.organizations.types.AddOrganizationConnectionRequestContent; -import com.auth0.client.mgmt.organizations.types.ListOrganizationConnectionsRequestParameters; -import com.auth0.client.mgmt.organizations.types.UpdateOrganizationConnectionRequestContent; -import com.auth0.client.mgmt.types.AddOrganizationConnectionResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationConnectionResponseContent; -import com.auth0.client.mgmt.types.ListOrganizationConnectionsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.OrganizationConnection; -import com.auth0.client.mgmt.types.UpdateOrganizationConnectionResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawEnabledConnectionsClient { - protected final ClientOptions clientOptions; - - public AsyncRawEnabledConnectionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public CompletableFuture>> list(String id) { - return list(id, ListOrganizationConnectionsRequestParameters.builder().build()); - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public CompletableFuture>> list( - String id, ListOrganizationConnectionsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public CompletableFuture>> list( - String id, ListOrganizationConnectionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("enabled_connections"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - 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()) { - ListOrganizationConnectionsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, - ListOrganizationConnectionsOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListOrganizationConnectionsRequestParameters nextRequest = - ListOrganizationConnectionsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getEnabledConnections().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Enable a specific connection for a given Organization. To enable a connection, it must already exist within your tenant; connections cannot be created through this action. - *

<a href="https://auth0.com/docs/authenticate/identity-providers">Connections</a> represent the relationship between Auth0 and a source of users. Available types of connections include database, enterprise, and social.

- */ - public CompletableFuture> add( - String id, AddOrganizationConnectionRequestContent request) { - return add(id, request, null); - } - - /** - * Enable a specific connection for a given Organization. To enable a connection, it must already exist within your tenant; connections cannot be created through this action. - *

<a href="https://auth0.com/docs/authenticate/identity-providers">Connections</a> represent the relationship between Auth0 and a source of users. Available types of connections include database, enterprise, and social.

- */ - public CompletableFuture> add( - String id, AddOrganizationConnectionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("enabled_connections") - .build(); - 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) - .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); - } - 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, AddOrganizationConnectionResponseContent.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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public CompletableFuture> get( - String id, String connectionId) { - return get(id, connectionId, null); - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public CompletableFuture> get( - String id, String connectionId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("enabled_connections") - .addPathSegment(connectionId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetOrganizationConnectionResponseContent.class), - response)); - return; - } - try { - switch (response.code()) { - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Disable a specific connection for an Organization. Once disabled, Organization members can no longer use that connection to authenticate. - *

<b>Note</b>: This action does not remove the connection from your tenant.

- */ - public CompletableFuture> delete(String id, String connectionId) { - return delete(id, connectionId, null); - } - - /** - * Disable a specific connection for an Organization. Once disabled, Organization members can no longer use that connection to authenticate. - *

<b>Note</b>: This action does not remove the connection from your tenant.

- */ - public CompletableFuture> delete( - String id, String connectionId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("enabled_connections") - .addPathSegment(connectionId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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; - } - - /** - * Modify the details of a specific connection currently enabled for an Organization. - */ - public CompletableFuture> update( - String id, String connectionId) { - return update( - id, - connectionId, - UpdateOrganizationConnectionRequestContent.builder().build()); - } - - /** - * Modify the details of a specific connection currently enabled for an Organization. - */ - public CompletableFuture> update( - String id, String connectionId, UpdateOrganizationConnectionRequestContent request) { - return update(id, connectionId, request, null); - } - - /** - * Modify the details of a specific connection currently enabled for an Organization. - */ - public CompletableFuture> update( - String id, - String connectionId, - UpdateOrganizationConnectionRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("enabled_connections") - .addPathSegment(connectionId) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateOrganizationConnectionResponseContent.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 (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/AsyncRawInvitationsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawInvitationsClient.java deleted file mode 100644 index 6d6b407b0..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawInvitationsClient.java +++ /dev/null @@ -1,464 +0,0 @@ -/** - * 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.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.types.CreateOrganizationInvitationRequestContent; -import com.auth0.client.mgmt.organizations.types.GetOrganizationInvitationRequestParameters; -import com.auth0.client.mgmt.organizations.types.ListOrganizationInvitationsRequestParameters; -import com.auth0.client.mgmt.types.CreateOrganizationInvitationResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationInvitationResponseContent; -import com.auth0.client.mgmt.types.ListOrganizationInvitationsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.OrganizationInvitation; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawInvitationsClient { - protected final ClientOptions clientOptions; - - public AsyncRawInvitationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public CompletableFuture>> list(String id) { - return list(id, ListOrganizationInvitationsRequestParameters.builder().build()); - } - - /** - * Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public CompletableFuture>> list( - String id, ListOrganizationInvitationsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public CompletableFuture>> list( - String id, ListOrganizationInvitationsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("invitations"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), 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); - } - if (!request.getSort().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sort", request.getSort().orElse(null), false); - } - 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); - } - 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()) { - ListOrganizationInvitationsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, - ListOrganizationInvitationsOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListOrganizationInvitationsRequestParameters nextRequest = - ListOrganizationInvitationsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getInvitations().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 (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 user invitation for a specific Organization. Upon creation, the listed user receives an email inviting them to join the Organization. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public CompletableFuture> create( - String id, CreateOrganizationInvitationRequestContent request) { - return create(id, request, null); - } - - /** - * Create a user invitation for a specific Organization. Upon creation, the listed user receives an email inviting them to join the Organization. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public CompletableFuture> create( - String id, CreateOrganizationInvitationRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("invitations") - .build(); - 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) - .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); - } - 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, CreateOrganizationInvitationResponseContent.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 (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, String invitationId) { - return get( - id, - invitationId, - GetOrganizationInvitationRequestParameters.builder().build()); - } - - public CompletableFuture> get( - String id, String invitationId, GetOrganizationInvitationRequestParameters request) { - return get(id, invitationId, request, null); - } - - public CompletableFuture> get( - String id, - String invitationId, - GetOrganizationInvitationRequestParameters request, - RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("invitations") - .addPathSegment(invitationId); - 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); - } - 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); - } - 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, GetOrganizationInvitationResponseContent.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 (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, String invitationId) { - return delete(id, invitationId, null); - } - - public CompletableFuture> delete( - String id, String invitationId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("invitations") - .addPathSegment(invitationId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 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 (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/AsyncRawMembersClient.java b/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawMembersClient.java deleted file mode 100644 index da8efd521..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/AsyncRawMembersClient.java +++ /dev/null @@ -1,399 +0,0 @@ -/** - * 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.SyncPagingIterable; -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.organizations.types.CreateOrganizationMemberRequestContent; -import com.auth0.client.mgmt.organizations.types.DeleteOrganizationMembersRequestContent; -import com.auth0.client.mgmt.organizations.types.ListOrganizationMembersRequestParameters; -import com.auth0.client.mgmt.types.ListOrganizationMembersPaginatedResponseContent; -import com.auth0.client.mgmt.types.OrganizationMember; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawMembersClient { - protected final ClientOptions clientOptions; - - public AsyncRawMembersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * 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. - *

<ul> - * <li> - * Use the <code>fields</code> parameter to optionally define the specific member details retrieved. If <code>fields</code> is left blank, all fields (except roles) are returned. - * </li> - * <li> - * Member roles are not sent by default. Use <code>fields=roles</code> to retrieve the roles assigned to each listed member. To use this parameter, you must include the <code>read:organization_member_roles</code> scope in the token. - * </li> - * </ul>

- *

This endpoint supports two types of pagination:

- *
    - *
  • Offset pagination
  • - *
  • Checkpoint pagination
  • - *
- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the <code>from</code> parameter. If there are more results, a <code>next</code> value will be included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, this indicates there are no more pages remaining.

- */ - public CompletableFuture>> list(String id) { - return list(id, ListOrganizationMembersRequestParameters.builder().build()); - } - - /** - * 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. - *

<ul> - * <li> - * Use the <code>fields</code> parameter to optionally define the specific member details retrieved. If <code>fields</code> is left blank, all fields (except roles) are returned. - * </li> - * <li> - * Member roles are not sent by default. Use <code>fields=roles</code> to retrieve the roles assigned to each listed member. To use this parameter, you must include the <code>read:organization_member_roles</code> scope in the token. - * </li> - * </ul>

- *

This endpoint supports two types of pagination:

- *
    - *
  • Offset pagination
  • - *
  • Checkpoint pagination
  • - *
- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the <code>from</code> parameter. If there are more results, a <code>next</code> value will be included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, this indicates there are no more pages remaining.

- */ - public CompletableFuture>> list( - String id, ListOrganizationMembersRequestParameters request) { - return list(id, request, null); - } - - /** - * 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. - *

<ul> - * <li> - * Use the <code>fields</code> parameter to optionally define the specific member details retrieved. If <code>fields</code> is left blank, all fields (except roles) are returned. - * </li> - * <li> - * Member roles are not sent by default. Use <code>fields=roles</code> to retrieve the roles assigned to each listed member. To use this parameter, you must include the <code>read:organization_member_roles</code> scope in the token. - * </li> - * </ul>

- *

This endpoint supports two types of pagination:

- *
    - *
  • Offset pagination
  • - *
  • Checkpoint pagination
  • - *
- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the <code>from</code> parameter. If there are more results, a <code>next</code> value will be included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, this indicates there are no more pages remaining.

- */ - public CompletableFuture>> list( - String id, ListOrganizationMembersRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .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); - } - if (!request.getIncludeFields().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); - } - 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); - } - 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()) { - ListOrganizationMembersPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListOrganizationMembersPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListOrganizationMembersRequestParameters nextRequest = - ListOrganizationMembersRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getMembers().orElse(Collections.emptyList()); - 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 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Set one or more existing users as members of a specific <a href="https://auth0.com/docs/manage-users/organizations">Organization</a>. - *

To add a user to an Organization through this action, the user must already exist in your tenant. If a user does not yet exist, you can <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">invite them to create an account</a>, manually create them through the Auth0 Dashboard, or use the Management API.

- */ - public CompletableFuture> create( - String id, CreateOrganizationMemberRequestContent request) { - return create(id, request, null); - } - - /** - * Set one or more existing users as members of a specific <a href="https://auth0.com/docs/manage-users/organizations">Organization</a>. - *

To add a user to an Organization through this action, the user must already exist in your tenant. If a user does not yet exist, you can <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">invite them to create an account</a>, manually create them through the Auth0 Dashboard, or use the Management API.

- */ - public CompletableFuture> create( - String id, CreateOrganizationMemberRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("members") - .build(); - 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) - .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); - } - 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 (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, DeleteOrganizationMembersRequestContent request) { - return delete(id, request, null); - } - - public CompletableFuture> delete( - String id, DeleteOrganizationMembersRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("members") - .build(); - 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) - .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); - } - 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 (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/ClientGrantsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/ClientGrantsClient.java deleted file mode 100644 index 00c485c11..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/ClientGrantsClient.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * 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.AssociateOrganizationClientGrantRequestContent; -import com.auth0.client.mgmt.organizations.types.ListOrganizationClientGrantsRequestParameters; -import com.auth0.client.mgmt.types.AssociateOrganizationClientGrantResponseContent; -import com.auth0.client.mgmt.types.OrganizationClientGrant; - -public class ClientGrantsClient { - protected final ClientOptions clientOptions; - - private final RawClientGrantsClient rawClient; - - public ClientGrantsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawClientGrantsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawClientGrantsClient withRawResponse() { - return this.rawClient; - } - - public SyncPagingIterable list(String id) { - return this.rawClient.list(id).body(); - } - - public SyncPagingIterable list( - String id, ListOrganizationClientGrantsRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - public SyncPagingIterable list( - String id, ListOrganizationClientGrantsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } - - public AssociateOrganizationClientGrantResponseContent create( - String id, AssociateOrganizationClientGrantRequestContent request) { - return this.rawClient.create(id, request).body(); - } - - public AssociateOrganizationClientGrantResponseContent create( - String id, AssociateOrganizationClientGrantRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).body(); - } - - public void delete(String id, String grantId) { - this.rawClient.delete(id, grantId).body(); - } - - public void delete(String id, String grantId, RequestOptions requestOptions) { - this.rawClient.delete(id, grantId, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/DiscoveryDomainsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/DiscoveryDomainsClient.java deleted file mode 100644 index 9b96fa066..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/DiscoveryDomainsClient.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * 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.CreateOrganizationDiscoveryDomainRequestContent; -import com.auth0.client.mgmt.organizations.types.ListOrganizationDiscoveryDomainsRequestParameters; -import com.auth0.client.mgmt.organizations.types.UpdateOrganizationDiscoveryDomainRequestContent; -import com.auth0.client.mgmt.types.CreateOrganizationDiscoveryDomainResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationDiscoveryDomainByNameResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationDiscoveryDomainResponseContent; -import com.auth0.client.mgmt.types.OrganizationDiscoveryDomain; -import com.auth0.client.mgmt.types.UpdateOrganizationDiscoveryDomainResponseContent; - -public class DiscoveryDomainsClient { - protected final ClientOptions clientOptions; - - private final RawDiscoveryDomainsClient rawClient; - - public DiscoveryDomainsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawDiscoveryDomainsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawDiscoveryDomainsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve list of all organization discovery domains associated with the specified organization. - */ - public SyncPagingIterable list(String id) { - return this.rawClient.list(id).body(); - } - - /** - * Retrieve list of all organization discovery domains associated with the specified organization. - */ - public SyncPagingIterable list( - String id, ListOrganizationDiscoveryDomainsRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - /** - * Retrieve list of all organization discovery domains associated with the specified organization. - */ - public SyncPagingIterable list( - String id, ListOrganizationDiscoveryDomainsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } - - /** - * Create a new discovery domain for an organization. - */ - public CreateOrganizationDiscoveryDomainResponseContent create( - String id, CreateOrganizationDiscoveryDomainRequestContent request) { - return this.rawClient.create(id, request).body(); - } - - /** - * Create a new discovery domain for an organization. - */ - public CreateOrganizationDiscoveryDomainResponseContent create( - String id, CreateOrganizationDiscoveryDomainRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).body(); - } - - /** - * Retrieve details about a single organization discovery domain specified by domain name. - */ - public GetOrganizationDiscoveryDomainByNameResponseContent getByName(String id, String discoveryDomain) { - return this.rawClient.getByName(id, discoveryDomain).body(); - } - - /** - * Retrieve details about a single organization discovery domain specified by domain name. - */ - public GetOrganizationDiscoveryDomainByNameResponseContent getByName( - String id, String discoveryDomain, RequestOptions requestOptions) { - return this.rawClient.getByName(id, discoveryDomain, requestOptions).body(); - } - - /** - * Retrieve details about a single organization discovery domain specified by ID. - */ - public GetOrganizationDiscoveryDomainResponseContent get(String id, String discoveryDomainId) { - return this.rawClient.get(id, discoveryDomainId).body(); - } - - /** - * Retrieve details about a single organization discovery domain specified by ID. - */ - public GetOrganizationDiscoveryDomainResponseContent get( - String id, String discoveryDomainId, RequestOptions requestOptions) { - return this.rawClient.get(id, discoveryDomainId, requestOptions).body(); - } - - /** - * Remove a discovery domain from an organization. This action cannot be undone. - */ - public void delete(String id, String discoveryDomainId) { - this.rawClient.delete(id, discoveryDomainId).body(); - } - - /** - * Remove a discovery domain from an organization. This action cannot be undone. - */ - public void delete(String id, String discoveryDomainId, RequestOptions requestOptions) { - this.rawClient.delete(id, discoveryDomainId, requestOptions).body(); - } - - /** - * Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The <code>status</code> field must be either <code>pending</code> or <code>verified</code>. The <code>use_for_organization_discovery</code> field can be <code>true</code> or <code>false</code> (default: <code>true</code>). - */ - public UpdateOrganizationDiscoveryDomainResponseContent update(String id, String discoveryDomainId) { - return this.rawClient.update(id, discoveryDomainId).body(); - } - - /** - * Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The <code>status</code> field must be either <code>pending</code> or <code>verified</code>. The <code>use_for_organization_discovery</code> field can be <code>true</code> or <code>false</code> (default: <code>true</code>). - */ - public UpdateOrganizationDiscoveryDomainResponseContent update( - String id, String discoveryDomainId, UpdateOrganizationDiscoveryDomainRequestContent request) { - return this.rawClient.update(id, discoveryDomainId, request).body(); - } - - /** - * Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The <code>status</code> field must be either <code>pending</code> or <code>verified</code>. The <code>use_for_organization_discovery</code> field can be <code>true</code> or <code>false</code> (default: <code>true</code>). - */ - public UpdateOrganizationDiscoveryDomainResponseContent update( - String id, - String discoveryDomainId, - UpdateOrganizationDiscoveryDomainRequestContent request, - RequestOptions requestOptions) { - return this.rawClient - .update(id, discoveryDomainId, request, requestOptions) - .body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/EnabledConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/EnabledConnectionsClient.java deleted file mode 100644 index cf3da245b..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/EnabledConnectionsClient.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * 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.AddOrganizationConnectionRequestContent; -import com.auth0.client.mgmt.organizations.types.ListOrganizationConnectionsRequestParameters; -import com.auth0.client.mgmt.organizations.types.UpdateOrganizationConnectionRequestContent; -import com.auth0.client.mgmt.types.AddOrganizationConnectionResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationConnectionResponseContent; -import com.auth0.client.mgmt.types.OrganizationConnection; -import com.auth0.client.mgmt.types.UpdateOrganizationConnectionResponseContent; - -public class EnabledConnectionsClient { - protected final ClientOptions clientOptions; - - private final RawEnabledConnectionsClient rawClient; - - public EnabledConnectionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawEnabledConnectionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawEnabledConnectionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public SyncPagingIterable list(String id) { - return this.rawClient.list(id).body(); - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public SyncPagingIterable list( - String id, ListOrganizationConnectionsRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public SyncPagingIterable list( - String id, ListOrganizationConnectionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } - - /** - * Enable a specific connection for a given Organization. To enable a connection, it must already exist within your tenant; connections cannot be created through this action. - *

<a href="https://auth0.com/docs/authenticate/identity-providers">Connections</a> represent the relationship between Auth0 and a source of users. Available types of connections include database, enterprise, and social.

- */ - public AddOrganizationConnectionResponseContent add(String id, AddOrganizationConnectionRequestContent request) { - return this.rawClient.add(id, request).body(); - } - - /** - * Enable a specific connection for a given Organization. To enable a connection, it must already exist within your tenant; connections cannot be created through this action. - *

<a href="https://auth0.com/docs/authenticate/identity-providers">Connections</a> represent the relationship between Auth0 and a source of users. Available types of connections include database, enterprise, and social.

- */ - public AddOrganizationConnectionResponseContent add( - String id, AddOrganizationConnectionRequestContent request, RequestOptions requestOptions) { - return this.rawClient.add(id, request, requestOptions).body(); - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public GetOrganizationConnectionResponseContent get(String id, String connectionId) { - return this.rawClient.get(id, connectionId).body(); - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public GetOrganizationConnectionResponseContent get(String id, String connectionId, RequestOptions requestOptions) { - return this.rawClient.get(id, connectionId, requestOptions).body(); - } - - /** - * Disable a specific connection for an Organization. Once disabled, Organization members can no longer use that connection to authenticate. - *

<b>Note</b>: This action does not remove the connection from your tenant.

- */ - public void delete(String id, String connectionId) { - this.rawClient.delete(id, connectionId).body(); - } - - /** - * Disable a specific connection for an Organization. Once disabled, Organization members can no longer use that connection to authenticate. - *

<b>Note</b>: This action does not remove the connection from your tenant.

- */ - public void delete(String id, String connectionId, RequestOptions requestOptions) { - this.rawClient.delete(id, connectionId, requestOptions).body(); - } - - /** - * Modify the details of a specific connection currently enabled for an Organization. - */ - public UpdateOrganizationConnectionResponseContent update(String id, String connectionId) { - return this.rawClient.update(id, connectionId).body(); - } - - /** - * Modify the details of a specific connection currently enabled for an Organization. - */ - public UpdateOrganizationConnectionResponseContent update( - String id, String connectionId, UpdateOrganizationConnectionRequestContent request) { - return this.rawClient.update(id, connectionId, request).body(); - } - - /** - * Modify the details of a specific connection currently enabled for an Organization. - */ - public UpdateOrganizationConnectionResponseContent update( - String id, - String connectionId, - UpdateOrganizationConnectionRequestContent request, - RequestOptions requestOptions) { - return this.rawClient.update(id, connectionId, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/InvitationsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/InvitationsClient.java deleted file mode 100644 index 9f2280f6e..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/InvitationsClient.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * 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.CreateOrganizationInvitationRequestContent; -import com.auth0.client.mgmt.organizations.types.GetOrganizationInvitationRequestParameters; -import com.auth0.client.mgmt.organizations.types.ListOrganizationInvitationsRequestParameters; -import com.auth0.client.mgmt.types.CreateOrganizationInvitationResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationInvitationResponseContent; -import com.auth0.client.mgmt.types.OrganizationInvitation; - -public class InvitationsClient { - protected final ClientOptions clientOptions; - - private final RawInvitationsClient rawClient; - - public InvitationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawInvitationsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawInvitationsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public SyncPagingIterable list(String id) { - return this.rawClient.list(id).body(); - } - - /** - * Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public SyncPagingIterable list( - String id, ListOrganizationInvitationsRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - /** - * Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public SyncPagingIterable list( - String id, ListOrganizationInvitationsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } - - /** - * Create a user invitation for a specific Organization. Upon creation, the listed user receives an email inviting them to join the Organization. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public CreateOrganizationInvitationResponseContent create( - String id, CreateOrganizationInvitationRequestContent request) { - return this.rawClient.create(id, request).body(); - } - - /** - * Create a user invitation for a specific Organization. Upon creation, the listed user receives an email inviting them to join the Organization. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public CreateOrganizationInvitationResponseContent create( - String id, CreateOrganizationInvitationRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).body(); - } - - public GetOrganizationInvitationResponseContent get(String id, String invitationId) { - return this.rawClient.get(id, invitationId).body(); - } - - public GetOrganizationInvitationResponseContent get( - String id, String invitationId, GetOrganizationInvitationRequestParameters request) { - return this.rawClient.get(id, invitationId, request).body(); - } - - public GetOrganizationInvitationResponseContent get( - String id, - String invitationId, - GetOrganizationInvitationRequestParameters request, - RequestOptions requestOptions) { - return this.rawClient.get(id, invitationId, request, requestOptions).body(); - } - - public void delete(String id, String invitationId) { - this.rawClient.delete(id, invitationId).body(); - } - - public void delete(String id, String invitationId, RequestOptions requestOptions) { - this.rawClient.delete(id, invitationId, 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 deleted file mode 100644 index ec7fc62c8..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/MembersClient.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * 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.Suppliers; -import com.auth0.client.mgmt.core.SyncPagingIterable; -import com.auth0.client.mgmt.organizations.members.RolesClient; -import com.auth0.client.mgmt.organizations.types.CreateOrganizationMemberRequestContent; -import com.auth0.client.mgmt.organizations.types.DeleteOrganizationMembersRequestContent; -import com.auth0.client.mgmt.organizations.types.ListOrganizationMembersRequestParameters; -import com.auth0.client.mgmt.types.OrganizationMember; -import java.util.function.Supplier; - -public class MembersClient { - protected final ClientOptions clientOptions; - - private final RawMembersClient rawClient; - - protected final Supplier rolesClient; - - public MembersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawMembersClient(clientOptions); - this.rolesClient = Suppliers.memoize(() -> new RolesClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawMembersClient withRawResponse() { - return this.rawClient; - } - - /** - * 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. - *

<ul> - * <li> - * Use the <code>fields</code> parameter to optionally define the specific member details retrieved. If <code>fields</code> is left blank, all fields (except roles) are returned. - * </li> - * <li> - * Member roles are not sent by default. Use <code>fields=roles</code> to retrieve the roles assigned to each listed member. To use this parameter, you must include the <code>read:organization_member_roles</code> scope in the token. - * </li> - * </ul>

- *

This endpoint supports two types of pagination:

- *
    - *
  • Offset pagination
  • - *
  • Checkpoint pagination
  • - *
- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the <code>from</code> parameter. If there are more results, a <code>next</code> value will be included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, this indicates there are no more pages remaining.

- */ - public SyncPagingIterable list(String id) { - return this.rawClient.list(id).body(); - } - - /** - * 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. - *

<ul> - * <li> - * Use the <code>fields</code> parameter to optionally define the specific member details retrieved. If <code>fields</code> is left blank, all fields (except roles) are returned. - * </li> - * <li> - * Member roles are not sent by default. Use <code>fields=roles</code> to retrieve the roles assigned to each listed member. To use this parameter, you must include the <code>read:organization_member_roles</code> scope in the token. - * </li> - * </ul>

- *

This endpoint supports two types of pagination:

- *
    - *
  • Offset pagination
  • - *
  • Checkpoint pagination
  • - *
- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the <code>from</code> parameter. If there are more results, a <code>next</code> value will be included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, this indicates there are no more pages remaining.

- */ - public SyncPagingIterable list(String id, ListOrganizationMembersRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - /** - * 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. - *

<ul> - * <li> - * Use the <code>fields</code> parameter to optionally define the specific member details retrieved. If <code>fields</code> is left blank, all fields (except roles) are returned. - * </li> - * <li> - * Member roles are not sent by default. Use <code>fields=roles</code> to retrieve the roles assigned to each listed member. To use this parameter, you must include the <code>read:organization_member_roles</code> scope in the token. - * </li> - * </ul>

- *

This endpoint supports two types of pagination:

- *
    - *
  • Offset pagination
  • - *
  • Checkpoint pagination
  • - *
- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the <code>from</code> parameter. If there are more results, a <code>next</code> value will be included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, this indicates there are no more pages remaining.

- */ - public SyncPagingIterable list( - String id, ListOrganizationMembersRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } - - /** - * Set one or more existing users as members of a specific <a href="https://auth0.com/docs/manage-users/organizations">Organization</a>. - *

To add a user to an Organization through this action, the user must already exist in your tenant. If a user does not yet exist, you can <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">invite them to create an account</a>, manually create them through the Auth0 Dashboard, or use the Management API.

- */ - public void create(String id, CreateOrganizationMemberRequestContent request) { - this.rawClient.create(id, request).body(); - } - - /** - * Set one or more existing users as members of a specific <a href="https://auth0.com/docs/manage-users/organizations">Organization</a>. - *

To add a user to an Organization through this action, the user must already exist in your tenant. If a user does not yet exist, you can <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">invite them to create an account</a>, manually create them through the Auth0 Dashboard, or use the Management API.

- */ - public void create(String id, CreateOrganizationMemberRequestContent request, RequestOptions requestOptions) { - this.rawClient.create(id, request, requestOptions).body(); - } - - public void delete(String id, DeleteOrganizationMembersRequestContent request) { - this.rawClient.delete(id, request).body(); - } - - public void delete(String id, DeleteOrganizationMembersRequestContent request, RequestOptions requestOptions) { - this.rawClient.delete(id, request, requestOptions).body(); - } - - public RolesClient roles() { - return this.rolesClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/RawClientGrantsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/RawClientGrantsClient.java deleted file mode 100644 index 74a99a44f..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/RawClientGrantsClient.java +++ /dev/null @@ -1,264 +0,0 @@ -/** - * 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.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.AssociateOrganizationClientGrantRequestContent; -import com.auth0.client.mgmt.organizations.types.ListOrganizationClientGrantsRequestParameters; -import com.auth0.client.mgmt.types.AssociateOrganizationClientGrantResponseContent; -import com.auth0.client.mgmt.types.ListOrganizationClientGrantsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.OrganizationClientGrant; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawClientGrantsClient { - protected final ClientOptions clientOptions; - - public RawClientGrantsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - public ManagementApiHttpResponse> list(String id) { - return list(id, ListOrganizationClientGrantsRequestParameters.builder().build()); - } - - public ManagementApiHttpResponse> list( - String id, ListOrganizationClientGrantsRequestParameters request) { - return list(id, request, null); - } - - public ManagementApiHttpResponse> list( - String id, ListOrganizationClientGrantsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("client-grants"); - if (!request.getAudience().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "audience", request.getAudience().orElse(null), false); - } - if (!request.getClientId().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "client_id", request.getClientId().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (request.getGrantIds().isPresent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "grant_ids", request.getGrantIds().get(), true); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListOrganizationClientGrantsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListOrganizationClientGrantsOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListOrganizationClientGrantsRequestParameters nextRequest = - ListOrganizationClientGrantsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getClientGrants().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse create( - String id, AssociateOrganizationClientGrantRequestContent request) { - return create(id, request, null); - } - - public ManagementApiHttpResponse create( - String id, AssociateOrganizationClientGrantRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("client-grants") - .build(); - 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) - .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); - } - 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, AssociateOrganizationClientGrantResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse delete(String id, String grantId) { - return delete(id, grantId, null); - } - - public ManagementApiHttpResponse delete(String id, String grantId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("client-grants") - .addPathSegment(grantId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 deleted file mode 100644 index dfa84af8f..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/RawDiscoveryDomainsClient.java +++ /dev/null @@ -1,493 +0,0 @@ -/** - * 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.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.CreateOrganizationDiscoveryDomainRequestContent; -import com.auth0.client.mgmt.organizations.types.ListOrganizationDiscoveryDomainsRequestParameters; -import com.auth0.client.mgmt.organizations.types.UpdateOrganizationDiscoveryDomainRequestContent; -import com.auth0.client.mgmt.types.CreateOrganizationDiscoveryDomainResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationDiscoveryDomainByNameResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationDiscoveryDomainResponseContent; -import com.auth0.client.mgmt.types.ListOrganizationDiscoveryDomainsResponseContent; -import com.auth0.client.mgmt.types.OrganizationDiscoveryDomain; -import com.auth0.client.mgmt.types.UpdateOrganizationDiscoveryDomainResponseContent; -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 RawDiscoveryDomainsClient { - protected final ClientOptions clientOptions; - - public RawDiscoveryDomainsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve list of all organization discovery domains associated with the specified organization. - */ - public ManagementApiHttpResponse> list(String id) { - return list( - id, ListOrganizationDiscoveryDomainsRequestParameters.builder().build()); - } - - /** - * Retrieve list of all organization discovery domains associated with the specified organization. - */ - public ManagementApiHttpResponse> list( - String id, ListOrganizationDiscoveryDomainsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve list of all organization discovery domains associated with the specified organization. - */ - public ManagementApiHttpResponse> list( - String id, ListOrganizationDiscoveryDomainsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("discovery-domains"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListOrganizationDiscoveryDomainsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListOrganizationDiscoveryDomainsResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListOrganizationDiscoveryDomainsRequestParameters nextRequest = - ListOrganizationDiscoveryDomainsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getDomains(); - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a new discovery domain for an organization. - */ - public ManagementApiHttpResponse create( - String id, CreateOrganizationDiscoveryDomainRequestContent request) { - return create(id, request, null); - } - - /** - * Create a new discovery domain for an organization. - */ - public ManagementApiHttpResponse create( - String id, CreateOrganizationDiscoveryDomainRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("discovery-domains") - .build(); - 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) - .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); - } - 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, CreateOrganizationDiscoveryDomainResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details about a single organization discovery domain specified by domain name. - */ - public ManagementApiHttpResponse getByName( - String id, String discoveryDomain) { - return getByName(id, discoveryDomain, null); - } - - /** - * Retrieve details about a single organization discovery domain specified by domain name. - */ - public ManagementApiHttpResponse getByName( - String id, String discoveryDomain, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("discovery-domains/name") - .addPathSegment(discoveryDomain) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetOrganizationDiscoveryDomainByNameResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details about a single organization discovery domain specified by ID. - */ - public ManagementApiHttpResponse get( - String id, String discoveryDomainId) { - return get(id, discoveryDomainId, null); - } - - /** - * Retrieve details about a single organization discovery domain specified by ID. - */ - public ManagementApiHttpResponse get( - String id, String discoveryDomainId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("discovery-domains") - .addPathSegment(discoveryDomainId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetOrganizationDiscoveryDomainResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Remove a discovery domain from an organization. This action cannot be undone. - */ - public ManagementApiHttpResponse delete(String id, String discoveryDomainId) { - return delete(id, discoveryDomainId, null); - } - - /** - * Remove a discovery domain from an organization. This action cannot be undone. - */ - public ManagementApiHttpResponse delete(String id, String discoveryDomainId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("discovery-domains") - .addPathSegment(discoveryDomainId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The <code>status</code> field must be either <code>pending</code> or <code>verified</code>. The <code>use_for_organization_discovery</code> field can be <code>true</code> or <code>false</code> (default: <code>true</code>). - */ - public ManagementApiHttpResponse update( - String id, String discoveryDomainId) { - return update( - id, - discoveryDomainId, - UpdateOrganizationDiscoveryDomainRequestContent.builder().build()); - } - - /** - * Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The <code>status</code> field must be either <code>pending</code> or <code>verified</code>. The <code>use_for_organization_discovery</code> field can be <code>true</code> or <code>false</code> (default: <code>true</code>). - */ - public ManagementApiHttpResponse update( - String id, String discoveryDomainId, UpdateOrganizationDiscoveryDomainRequestContent request) { - return update(id, discoveryDomainId, request, null); - } - - /** - * Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The <code>status</code> field must be either <code>pending</code> or <code>verified</code>. The <code>use_for_organization_discovery</code> field can be <code>true</code> or <code>false</code> (default: <code>true</code>). - */ - public ManagementApiHttpResponse update( - String id, - String discoveryDomainId, - UpdateOrganizationDiscoveryDomainRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("discovery-domains") - .addPathSegment(discoveryDomainId) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateOrganizationDiscoveryDomainResponseContent.class), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 404: - throw new NotFoundError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/RawEnabledConnectionsClient.java b/src/main/java/com/auth0/client/mgmt/organizations/RawEnabledConnectionsClient.java deleted file mode 100644 index a4a34f453..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/RawEnabledConnectionsClient.java +++ /dev/null @@ -1,417 +0,0 @@ -/** - * 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.SyncPagingIterable; -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.organizations.types.AddOrganizationConnectionRequestContent; -import com.auth0.client.mgmt.organizations.types.ListOrganizationConnectionsRequestParameters; -import com.auth0.client.mgmt.organizations.types.UpdateOrganizationConnectionRequestContent; -import com.auth0.client.mgmt.types.AddOrganizationConnectionResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationConnectionResponseContent; -import com.auth0.client.mgmt.types.ListOrganizationConnectionsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.OrganizationConnection; -import com.auth0.client.mgmt.types.UpdateOrganizationConnectionResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawEnabledConnectionsClient { - protected final ClientOptions clientOptions; - - public RawEnabledConnectionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public ManagementApiHttpResponse> list(String id) { - return list(id, ListOrganizationConnectionsRequestParameters.builder().build()); - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public ManagementApiHttpResponse> list( - String id, ListOrganizationConnectionsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public ManagementApiHttpResponse> list( - String id, ListOrganizationConnectionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("enabled_connections"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListOrganizationConnectionsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListOrganizationConnectionsOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListOrganizationConnectionsRequestParameters nextRequest = - ListOrganizationConnectionsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getEnabledConnections().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Enable a specific connection for a given Organization. To enable a connection, it must already exist within your tenant; connections cannot be created through this action. - *

<a href="https://auth0.com/docs/authenticate/identity-providers">Connections</a> represent the relationship between Auth0 and a source of users. Available types of connections include database, enterprise, and social.

- */ - public ManagementApiHttpResponse add( - String id, AddOrganizationConnectionRequestContent request) { - return add(id, request, null); - } - - /** - * Enable a specific connection for a given Organization. To enable a connection, it must already exist within your tenant; connections cannot be created through this action. - *

<a href="https://auth0.com/docs/authenticate/identity-providers">Connections</a> represent the relationship between Auth0 and a source of users. Available types of connections include database, enterprise, and social.

- */ - public ManagementApiHttpResponse add( - String id, AddOrganizationConnectionRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("enabled_connections") - .build(); - 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) - .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); - } - 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, AddOrganizationConnectionResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public ManagementApiHttpResponse get(String id, String connectionId) { - return get(id, connectionId, null); - } - - /** - * Retrieve details about a specific connection currently enabled for an Organization. Information returned includes details such as connection ID, name, strategy, and whether the connection automatically grants membership upon login. - */ - public ManagementApiHttpResponse get( - String id, String connectionId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("enabled_connections") - .addPathSegment(connectionId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetOrganizationConnectionResponseContent.class), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Disable a specific connection for an Organization. Once disabled, Organization members can no longer use that connection to authenticate. - *

<b>Note</b>: This action does not remove the connection from your tenant.

- */ - public ManagementApiHttpResponse delete(String id, String connectionId) { - return delete(id, connectionId, null); - } - - /** - * Disable a specific connection for an Organization. Once disabled, Organization members can no longer use that connection to authenticate. - *

<b>Note</b>: This action does not remove the connection from your tenant.

- */ - public ManagementApiHttpResponse delete(String id, String connectionId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("enabled_connections") - .addPathSegment(connectionId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Modify the details of a specific connection currently enabled for an Organization. - */ - public ManagementApiHttpResponse update( - String id, String connectionId) { - return update( - id, - connectionId, - UpdateOrganizationConnectionRequestContent.builder().build()); - } - - /** - * Modify the details of a specific connection currently enabled for an Organization. - */ - public ManagementApiHttpResponse update( - String id, String connectionId, UpdateOrganizationConnectionRequestContent request) { - return update(id, connectionId, request, null); - } - - /** - * Modify the details of a specific connection currently enabled for an Organization. - */ - public ManagementApiHttpResponse update( - String id, - String connectionId, - UpdateOrganizationConnectionRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("enabled_connections") - .addPathSegment(connectionId) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateOrganizationConnectionResponseContent.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 (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 deleted file mode 100644 index 5d1989446..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/RawInvitationsClient.java +++ /dev/null @@ -1,356 +0,0 @@ -/** - * 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.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.types.CreateOrganizationInvitationRequestContent; -import com.auth0.client.mgmt.organizations.types.GetOrganizationInvitationRequestParameters; -import com.auth0.client.mgmt.organizations.types.ListOrganizationInvitationsRequestParameters; -import com.auth0.client.mgmt.types.CreateOrganizationInvitationResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationInvitationResponseContent; -import com.auth0.client.mgmt.types.ListOrganizationInvitationsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.OrganizationInvitation; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawInvitationsClient { - protected final ClientOptions clientOptions; - - public RawInvitationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public ManagementApiHttpResponse> list(String id) { - return list(id, ListOrganizationInvitationsRequestParameters.builder().build()); - } - - /** - * Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public ManagementApiHttpResponse> list( - String id, ListOrganizationInvitationsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public ManagementApiHttpResponse> list( - String id, ListOrganizationInvitationsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("invitations"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), 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); - } - if (!request.getSort().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sort", request.getSort().orElse(null), false); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListOrganizationInvitationsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListOrganizationInvitationsOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListOrganizationInvitationsRequestParameters nextRequest = - ListOrganizationInvitationsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getInvitations().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a user invitation for a specific Organization. Upon creation, the listed user receives an email inviting them to join the Organization. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public ManagementApiHttpResponse create( - String id, CreateOrganizationInvitationRequestContent request) { - return create(id, request, null); - } - - /** - * Create a user invitation for a specific Organization. Upon creation, the listed user receives an email inviting them to join the Organization. To learn more about Organization invitations, review <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">Invite Organization Members</a>. - */ - public ManagementApiHttpResponse create( - String id, CreateOrganizationInvitationRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("invitations") - .build(); - 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) - .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); - } - 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, CreateOrganizationInvitationResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse get(String id, String invitationId) { - return get( - id, - invitationId, - GetOrganizationInvitationRequestParameters.builder().build()); - } - - public ManagementApiHttpResponse get( - String id, String invitationId, GetOrganizationInvitationRequestParameters request) { - return get(id, invitationId, request, null); - } - - public ManagementApiHttpResponse get( - String id, - String invitationId, - GetOrganizationInvitationRequestParameters request, - RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("invitations") - .addPathSegment(invitationId); - 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); - } - 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); - } - 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, GetOrganizationInvitationResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse delete(String id, String invitationId) { - return delete(id, invitationId, null); - } - - public ManagementApiHttpResponse delete(String id, String invitationId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("invitations") - .addPathSegment(invitationId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 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 (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 deleted file mode 100644 index 9cdd816cd..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/RawMembersClient.java +++ /dev/null @@ -1,320 +0,0 @@ -/** - * 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.SyncPagingIterable; -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.organizations.types.CreateOrganizationMemberRequestContent; -import com.auth0.client.mgmt.organizations.types.DeleteOrganizationMembersRequestContent; -import com.auth0.client.mgmt.organizations.types.ListOrganizationMembersRequestParameters; -import com.auth0.client.mgmt.types.ListOrganizationMembersPaginatedResponseContent; -import com.auth0.client.mgmt.types.OrganizationMember; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawMembersClient { - protected final ClientOptions clientOptions; - - public RawMembersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * 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. - *

<ul> - * <li> - * Use the <code>fields</code> parameter to optionally define the specific member details retrieved. If <code>fields</code> is left blank, all fields (except roles) are returned. - * </li> - * <li> - * Member roles are not sent by default. Use <code>fields=roles</code> to retrieve the roles assigned to each listed member. To use this parameter, you must include the <code>read:organization_member_roles</code> scope in the token. - * </li> - * </ul>

- *

This endpoint supports two types of pagination:

- *
    - *
  • Offset pagination
  • - *
  • Checkpoint pagination
  • - *
- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the <code>from</code> parameter. If there are more results, a <code>next</code> value will be included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, this indicates there are no more pages remaining.

- */ - public ManagementApiHttpResponse> list(String id) { - return list(id, ListOrganizationMembersRequestParameters.builder().build()); - } - - /** - * 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. - *

<ul> - * <li> - * Use the <code>fields</code> parameter to optionally define the specific member details retrieved. If <code>fields</code> is left blank, all fields (except roles) are returned. - * </li> - * <li> - * Member roles are not sent by default. Use <code>fields=roles</code> to retrieve the roles assigned to each listed member. To use this parameter, you must include the <code>read:organization_member_roles</code> scope in the token. - * </li> - * </ul>

- *

This endpoint supports two types of pagination:

- *
    - *
  • Offset pagination
  • - *
  • Checkpoint pagination
  • - *
- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the <code>from</code> parameter. If there are more results, a <code>next</code> value will be included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, this indicates there are no more pages remaining.

- */ - public ManagementApiHttpResponse> list( - String id, ListOrganizationMembersRequestParameters request) { - return list(id, request, null); - } - - /** - * 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. - *

<ul> - * <li> - * Use the <code>fields</code> parameter to optionally define the specific member details retrieved. If <code>fields</code> is left blank, all fields (except roles) are returned. - * </li> - * <li> - * Member roles are not sent by default. Use <code>fields=roles</code> to retrieve the roles assigned to each listed member. To use this parameter, you must include the <code>read:organization_member_roles</code> scope in the token. - * </li> - * </ul>

- *

This endpoint supports two types of pagination:

- *
    - *
  • Offset pagination
  • - *
  • Checkpoint pagination
  • - *
- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the <code>from</code> parameter. If there are more results, a <code>next</code> value will be included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, this indicates there are no more pages remaining.

- */ - public ManagementApiHttpResponse> list( - String id, ListOrganizationMembersRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .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); - } - if (!request.getIncludeFields().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "include_fields", request.getIncludeFields().orElse(null), false); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListOrganizationMembersPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListOrganizationMembersPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListOrganizationMembersRequestParameters nextRequest = - ListOrganizationMembersRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getMembers().orElse(Collections.emptyList()); - 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 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Set one or more existing users as members of a specific <a href="https://auth0.com/docs/manage-users/organizations">Organization</a>. - *

To add a user to an Organization through this action, the user must already exist in your tenant. If a user does not yet exist, you can <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">invite them to create an account</a>, manually create them through the Auth0 Dashboard, or use the Management API.

- */ - public ManagementApiHttpResponse create(String id, CreateOrganizationMemberRequestContent request) { - return create(id, request, null); - } - - /** - * Set one or more existing users as members of a specific <a href="https://auth0.com/docs/manage-users/organizations">Organization</a>. - *

To add a user to an Organization through this action, the user must already exist in your tenant. If a user does not yet exist, you can <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members">invite them to create an account</a>, manually create them through the Auth0 Dashboard, or use the Management API.

- */ - public ManagementApiHttpResponse create( - String id, CreateOrganizationMemberRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("members") - .build(); - 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) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse delete(String id, DeleteOrganizationMembersRequestContent request) { - return delete(id, request, null); - } - - public ManagementApiHttpResponse delete( - String id, DeleteOrganizationMembersRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("members") - .build(); - 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) - .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); - } - 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 (IOException e) { - throw 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 deleted file mode 100644 index 83a6c6bcf..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRawRolesClient.java +++ /dev/null @@ -1,374 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.organizations.members; - -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.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.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.organizations.members.types.AssignOrganizationMemberRolesRequestContent; -import com.auth0.client.mgmt.organizations.members.types.DeleteOrganizationMemberRolesRequestContent; -import com.auth0.client.mgmt.organizations.members.types.ListOrganizationMemberRolesRequestParameters; -import com.auth0.client.mgmt.types.ListOrganizationMemberRolesOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.Role; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawRolesClient { - protected final ClientOptions clientOptions; - - public AsyncRawRolesClient(ClientOptions clientOptions) { - this.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.

- */ - public CompletableFuture>> list(String id, String userId) { - return list( - id, - userId, - ListOrganizationMemberRolesRequestParameters.builder().build()); - } - - /** - * 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.

- */ - public CompletableFuture>> list( - String id, String userId, ListOrganizationMemberRolesRequestParameters request) { - return list(id, userId, request, null); - } - - /** - * 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.

- */ - public CompletableFuture>> list( - String id, - String userId, - ListOrganizationMemberRolesRequestParameters request, - RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("members") - .addPathSegment(userId) - .addPathSegments("roles"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - 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()) { - ListOrganizationMemberRolesOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, - ListOrganizationMemberRolesOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListOrganizationMemberRolesRequestParameters nextRequest = - ListOrganizationMemberRolesRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getRoles().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, result, parsedResponse, () -> { - try { - return list(id, userId, 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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Assign one or more <a href="https://auth0.com/docs/manage-users/access-control/rbac">roles</a> 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.

- */ - public CompletableFuture> assign( - String id, String userId, AssignOrganizationMemberRolesRequestContent request) { - return assign(id, userId, request, null); - } - - /** - * Assign one or more <a href="https://auth0.com/docs/manage-users/access-control/rbac">roles</a> 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.

- */ - public CompletableFuture> assign( - String id, - String userId, - AssignOrganizationMemberRolesRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("members") - .addPathSegment(userId) - .addPathSegments("roles") - .build(); - 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) - .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); - } - 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 (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 Organization-specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">roles</a> 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.

- */ - public CompletableFuture> delete( - String id, String userId, DeleteOrganizationMemberRolesRequestContent request) { - return delete(id, userId, request, null); - } - - /** - * Remove one or more Organization-specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">roles</a> 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.

- */ - public CompletableFuture> delete( - String id, - String userId, - DeleteOrganizationMemberRolesRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("members") - .addPathSegment(userId) - .addPathSegments("roles") - .build(); - 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) - .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); - } - 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 (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/members/AsyncRolesClient.java b/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRolesClient.java deleted file mode 100644 index c04b4ad9d..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/AsyncRolesClient.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.organizations.members; - -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.members.types.AssignOrganizationMemberRolesRequestContent; -import com.auth0.client.mgmt.organizations.members.types.DeleteOrganizationMemberRolesRequestContent; -import com.auth0.client.mgmt.organizations.members.types.ListOrganizationMemberRolesRequestParameters; -import com.auth0.client.mgmt.types.Role; -import java.util.concurrent.CompletableFuture; - -public class AsyncRolesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawRolesClient rawClient; - - public AsyncRolesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawRolesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawRolesClient withRawResponse() { - return this.rawClient; - } - - /** - * 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.

- */ - public CompletableFuture> list(String id, String userId) { - return this.rawClient.list(id, userId).thenApply(response -> response.body()); - } - - /** - * 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.

- */ - public CompletableFuture> list( - String id, String userId, ListOrganizationMemberRolesRequestParameters request) { - return this.rawClient.list(id, userId, request).thenApply(response -> response.body()); - } - - /** - * 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.

- */ - public CompletableFuture> list( - String id, - String userId, - ListOrganizationMemberRolesRequestParameters request, - RequestOptions requestOptions) { - return this.rawClient.list(id, userId, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Assign one or more <a href="https://auth0.com/docs/manage-users/access-control/rbac">roles</a> 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.

- */ - public CompletableFuture assign( - String id, String userId, AssignOrganizationMemberRolesRequestContent request) { - return this.rawClient.assign(id, userId, request).thenApply(response -> response.body()); - } - - /** - * Assign one or more <a href="https://auth0.com/docs/manage-users/access-control/rbac">roles</a> 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.

- */ - public CompletableFuture assign( - String id, - String userId, - AssignOrganizationMemberRolesRequestContent request, - RequestOptions requestOptions) { - return this.rawClient.assign(id, userId, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Remove one or more Organization-specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">roles</a> 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.

- */ - public CompletableFuture delete( - String id, String userId, DeleteOrganizationMemberRolesRequestContent request) { - return this.rawClient.delete(id, userId, request).thenApply(response -> response.body()); - } - - /** - * Remove one or more Organization-specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">roles</a> 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.

- */ - public CompletableFuture delete( - String id, - String userId, - DeleteOrganizationMemberRolesRequestContent request, - RequestOptions requestOptions) { - return this.rawClient.delete(id, userId, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/members/RawRolesClient.java b/src/main/java/com/auth0/client/mgmt/organizations/members/RawRolesClient.java deleted file mode 100644 index f1624d5e2..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/RawRolesClient.java +++ /dev/null @@ -1,296 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.organizations.members; - -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.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.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.organizations.members.types.AssignOrganizationMemberRolesRequestContent; -import com.auth0.client.mgmt.organizations.members.types.DeleteOrganizationMemberRolesRequestContent; -import com.auth0.client.mgmt.organizations.members.types.ListOrganizationMemberRolesRequestParameters; -import com.auth0.client.mgmt.types.ListOrganizationMemberRolesOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.Role; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawRolesClient { - protected final ClientOptions clientOptions; - - public RawRolesClient(ClientOptions clientOptions) { - this.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.

- */ - public ManagementApiHttpResponse> list(String id, String userId) { - return list( - id, - userId, - ListOrganizationMemberRolesRequestParameters.builder().build()); - } - - /** - * 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.

- */ - public ManagementApiHttpResponse> list( - String id, String userId, ListOrganizationMemberRolesRequestParameters request) { - return list(id, userId, request, null); - } - - /** - * 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.

- */ - public ManagementApiHttpResponse> list( - String id, - String userId, - ListOrganizationMemberRolesRequestParameters request, - RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("members") - .addPathSegment(userId) - .addPathSegments("roles"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListOrganizationMemberRolesOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListOrganizationMemberRolesOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListOrganizationMemberRolesRequestParameters nextRequest = - ListOrganizationMemberRolesRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getRoles().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, result, parsedResponse, () -> list(id, userId, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Assign one or more <a href="https://auth0.com/docs/manage-users/access-control/rbac">roles</a> 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.

- */ - public ManagementApiHttpResponse assign( - String id, String userId, AssignOrganizationMemberRolesRequestContent request) { - return assign(id, userId, request, null); - } - - /** - * Assign one or more <a href="https://auth0.com/docs/manage-users/access-control/rbac">roles</a> 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.

- */ - public ManagementApiHttpResponse assign( - String id, - String userId, - AssignOrganizationMemberRolesRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("members") - .addPathSegment(userId) - .addPathSegments("roles") - .build(); - 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) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Remove one or more Organization-specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">roles</a> 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.

- */ - public ManagementApiHttpResponse delete( - String id, String userId, DeleteOrganizationMemberRolesRequestContent request) { - return delete(id, userId, request, null); - } - - /** - * Remove one or more Organization-specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">roles</a> 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.

- */ - public ManagementApiHttpResponse delete( - String id, - String userId, - DeleteOrganizationMemberRolesRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("organizations") - .addPathSegment(id) - .addPathSegments("members") - .addPathSegment(userId) - .addPathSegments("roles") - .build(); - 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) - .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); - } - 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 (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 deleted file mode 100644 index 7dfd2bb18..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/RolesClient.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.organizations.members; - -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.members.types.AssignOrganizationMemberRolesRequestContent; -import com.auth0.client.mgmt.organizations.members.types.DeleteOrganizationMemberRolesRequestContent; -import com.auth0.client.mgmt.organizations.members.types.ListOrganizationMemberRolesRequestParameters; -import com.auth0.client.mgmt.types.Role; - -public class RolesClient { - protected final ClientOptions clientOptions; - - private final RawRolesClient rawClient; - - public RolesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawRolesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawRolesClient withRawResponse() { - return this.rawClient; - } - - /** - * 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.

- */ - public SyncPagingIterable list(String id, String userId) { - return this.rawClient.list(id, userId).body(); - } - - /** - * 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.

- */ - public SyncPagingIterable list( - String id, String userId, ListOrganizationMemberRolesRequestParameters request) { - return this.rawClient.list(id, userId, request).body(); - } - - /** - * 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.

- */ - public SyncPagingIterable list( - String id, - String userId, - ListOrganizationMemberRolesRequestParameters request, - RequestOptions requestOptions) { - return this.rawClient.list(id, userId, request, requestOptions).body(); - } - - /** - * Assign one or more <a href="https://auth0.com/docs/manage-users/access-control/rbac">roles</a> 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.

- */ - public void assign(String id, String userId, AssignOrganizationMemberRolesRequestContent request) { - this.rawClient.assign(id, userId, request).body(); - } - - /** - * Assign one or more <a href="https://auth0.com/docs/manage-users/access-control/rbac">roles</a> 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.

- */ - public void assign( - String id, - String userId, - AssignOrganizationMemberRolesRequestContent request, - RequestOptions requestOptions) { - this.rawClient.assign(id, userId, request, requestOptions).body(); - } - - /** - * Remove one or more Organization-specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">roles</a> 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.

- */ - public void delete(String id, String userId, DeleteOrganizationMemberRolesRequestContent request) { - this.rawClient.delete(id, userId, request).body(); - } - - /** - * Remove one or more Organization-specific <a href="https://auth0.com/docs/manage-users/access-control/rbac">roles</a> 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.

- */ - public void delete( - String id, - String userId, - DeleteOrganizationMemberRolesRequestContent request, - RequestOptions requestOptions) { - this.rawClient.delete(id, userId, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/members/types/AssignOrganizationMemberRolesRequestContent.java b/src/main/java/com/auth0/client/mgmt/organizations/members/types/AssignOrganizationMemberRolesRequestContent.java deleted file mode 100644 index 69687c67c..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/types/AssignOrganizationMemberRolesRequestContent.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.organizations.members.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = AssignOrganizationMemberRolesRequestContent.Builder.class) -public final class AssignOrganizationMemberRolesRequestContent { - private final List roles; - - private final Map additionalProperties; - - private AssignOrganizationMemberRolesRequestContent(List roles, Map additionalProperties) { - this.roles = roles; - this.additionalProperties = additionalProperties; - } - - /** - * @return List of roles IDs to associated with the user. - */ - @JsonProperty("roles") - public List getRoles() { - return roles; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AssignOrganizationMemberRolesRequestContent - && equalTo((AssignOrganizationMemberRolesRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AssignOrganizationMemberRolesRequestContent other) { - return roles.equals(other.roles); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.roles); - } - - @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 roles = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AssignOrganizationMemberRolesRequestContent other) { - roles(other.getRoles()); - return this; - } - - /** - *

List of roles IDs to associated with the user.

- */ - @JsonSetter(value = "roles", nulls = Nulls.SKIP) - public Builder roles(List roles) { - this.roles.clear(); - if (roles != null) { - this.roles.addAll(roles); - } - return this; - } - - public Builder addRoles(String roles) { - this.roles.add(roles); - return this; - } - - public Builder addAllRoles(List roles) { - if (roles != null) { - this.roles.addAll(roles); - } - return this; - } - - public AssignOrganizationMemberRolesRequestContent build() { - return new AssignOrganizationMemberRolesRequestContent(roles, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/members/types/DeleteOrganizationMemberRolesRequestContent.java b/src/main/java/com/auth0/client/mgmt/organizations/members/types/DeleteOrganizationMemberRolesRequestContent.java deleted file mode 100644 index cdf4036f7..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/types/DeleteOrganizationMemberRolesRequestContent.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.organizations.members.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = DeleteOrganizationMemberRolesRequestContent.Builder.class) -public final class DeleteOrganizationMemberRolesRequestContent { - private final List roles; - - private final Map additionalProperties; - - private DeleteOrganizationMemberRolesRequestContent(List roles, Map additionalProperties) { - this.roles = roles; - this.additionalProperties = additionalProperties; - } - - /** - * @return List of roles IDs associated with the organization member to remove. - */ - @JsonProperty("roles") - public List getRoles() { - return roles; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DeleteOrganizationMemberRolesRequestContent - && equalTo((DeleteOrganizationMemberRolesRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DeleteOrganizationMemberRolesRequestContent other) { - return roles.equals(other.roles); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.roles); - } - - @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 roles = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(DeleteOrganizationMemberRolesRequestContent other) { - roles(other.getRoles()); - return this; - } - - /** - *

List of roles IDs associated with the organization member to remove.

- */ - @JsonSetter(value = "roles", nulls = Nulls.SKIP) - public Builder roles(List roles) { - this.roles.clear(); - if (roles != null) { - this.roles.addAll(roles); - } - return this; - } - - public Builder addRoles(String roles) { - this.roles.add(roles); - return this; - } - - public Builder addAllRoles(List roles) { - if (roles != null) { - this.roles.addAll(roles); - } - return this; - } - - public DeleteOrganizationMemberRolesRequestContent build() { - return new DeleteOrganizationMemberRolesRequestContent(roles, additionalProperties); - } - } -} 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 deleted file mode 100644 index 91ca62ef7..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/members/types/ListOrganizationMemberRolesRequestParameters.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.organizations.members.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListOrganizationMemberRolesRequestParameters.Builder.class) -public final class ListOrganizationMemberRolesRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final Map additionalProperties; - - private ListOrganizationMemberRolesRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. Defaults to 50. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - return includeTotals; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListOrganizationMemberRolesRequestParameters - && equalTo((ListOrganizationMemberRolesRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListOrganizationMemberRolesRequestParameters other) { - return page.equals(other.page) && perPage.equals(other.perPage) && includeTotals.equals(other.includeTotals); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage, this.includeTotals); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListOrganizationMemberRolesRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page. Defaults to 50.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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(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; - } - - public ListOrganizationMemberRolesRequestParameters build() { - return new ListOrganizationMemberRolesRequestParameters(page, perPage, includeTotals, additionalProperties); - } - } -} 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 deleted file mode 100644 index 01aa3b991..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/AddOrganizationConnectionRequestContent.java +++ /dev/null @@ -1,248 +0,0 @@ -/** - * 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; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AddOrganizationConnectionRequestContent.Builder.class) -public final class AddOrganizationConnectionRequestContent { - private final String connectionId; - - private final Optional assignMembershipOnLogin; - - private final Optional isSignupEnabled; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private AddOrganizationConnectionRequestContent( - String connectionId, - Optional assignMembershipOnLogin, - Optional isSignupEnabled, - Optional showAsButton, - Map additionalProperties) { - this.connectionId = connectionId; - this.assignMembershipOnLogin = assignMembershipOnLogin; - this.isSignupEnabled = isSignupEnabled; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - /** - * @return Single connection ID to add to the organization. - */ - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - /** - * @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 organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false. - */ - @JsonProperty("is_signup_enabled") - public Optional getIsSignupEnabled() { - return isSignupEnabled; - } - - /** - * @return Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true. - */ - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AddOrganizationConnectionRequestContent - && equalTo((AddOrganizationConnectionRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AddOrganizationConnectionRequestContent other) { - return connectionId.equals(other.connectionId) - && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) - && isSignupEnabled.equals(other.isSignupEnabled) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.assignMembershipOnLogin, this.isSignupEnabled, this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - /** - *

Single connection ID to add to the organization.

- */ - _FinalStage connectionId(@NotNull String connectionId); - - Builder from(AddOrganizationConnectionRequestContent other); - } - - public interface _FinalStage { - AddOrganizationConnectionRequestContent build(); - - /** - *

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 organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

- */ - _FinalStage isSignupEnabled(Optional isSignupEnabled); - - _FinalStage isSignupEnabled(Boolean isSignupEnabled); - - /** - *

Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true.

- */ - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, _FinalStage { - private String connectionId; - - private Optional showAsButton = Optional.empty(); - - private Optional isSignupEnabled = Optional.empty(); - - private Optional assignMembershipOnLogin = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AddOrganizationConnectionRequestContent other) { - connectionId(other.getConnectionId()); - assignMembershipOnLogin(other.getAssignMembershipOnLogin()); - isSignupEnabled(other.getIsSignupEnabled()); - showAsButton(other.getShowAsButton()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("connection_id") - public _FinalStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - /** - *

Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true.

- * @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. Default: true.

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

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

- * @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. Default: false.

- */ - @java.lang.Override - @JsonSetter(value = "is_signup_enabled", nulls = Nulls.SKIP) - public _FinalStage isSignupEnabled(Optional isSignupEnabled) { - this.isSignupEnabled = isSignupEnabled; - 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 AddOrganizationConnectionRequestContent build() { - return new AddOrganizationConnectionRequestContent( - connectionId, assignMembershipOnLogin, isSignupEnabled, showAsButton, additionalProperties); - } - } -} 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 deleted file mode 100644 index 2a3717228..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/AssociateOrganizationClientGrantRequestContent.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * 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.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 = AssociateOrganizationClientGrantRequestContent.Builder.class) -public final class AssociateOrganizationClientGrantRequestContent { - private final String grantId; - - private final Map additionalProperties; - - private AssociateOrganizationClientGrantRequestContent(String grantId, Map additionalProperties) { - this.grantId = grantId; - this.additionalProperties = additionalProperties; - } - - /** - * @return A Client Grant ID to add to the organization. - */ - @JsonProperty("grant_id") - public String getGrantId() { - return grantId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AssociateOrganizationClientGrantRequestContent - && equalTo((AssociateOrganizationClientGrantRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AssociateOrganizationClientGrantRequestContent other) { - return grantId.equals(other.grantId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.grantId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static GrantIdStage builder() { - return new Builder(); - } - - public interface GrantIdStage { - /** - *

A Client Grant ID to add to the organization.

- */ - _FinalStage grantId(@NotNull String grantId); - - Builder from(AssociateOrganizationClientGrantRequestContent other); - } - - public interface _FinalStage { - AssociateOrganizationClientGrantRequestContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements GrantIdStage, _FinalStage { - private String grantId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AssociateOrganizationClientGrantRequestContent other) { - grantId(other.getGrantId()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("grant_id") - public _FinalStage grantId(@NotNull String grantId) { - this.grantId = Objects.requireNonNull(grantId, "grantId must not be null"); - return this; - } - - @java.lang.Override - public AssociateOrganizationClientGrantRequestContent build() { - return new AssociateOrganizationClientGrantRequestContent(grantId, additionalProperties); - } - } -} 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 deleted file mode 100644 index 98670b649..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationDiscoveryDomainRequestContent.java +++ /dev/null @@ -1,193 +0,0 @@ -/** - * 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.OrganizationDiscoveryDomainStatus; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateOrganizationDiscoveryDomainRequestContent.Builder.class) -public final class CreateOrganizationDiscoveryDomainRequestContent { - private final String domain; - - private final Optional status; - - private final Optional useForOrganizationDiscovery; - - private final Map additionalProperties; - - private CreateOrganizationDiscoveryDomainRequestContent( - String domain, - Optional status, - Optional useForOrganizationDiscovery, - Map additionalProperties) { - this.domain = domain; - this.status = status; - this.useForOrganizationDiscovery = useForOrganizationDiscovery; - this.additionalProperties = additionalProperties; - } - - /** - * @return The domain name to associate with the organization e.g. acme.com. - */ - @JsonProperty("domain") - public String getDomain() { - return domain; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return Indicates whether this domain should be used for organization discovery. - */ - @JsonProperty("use_for_organization_discovery") - public Optional getUseForOrganizationDiscovery() { - return useForOrganizationDiscovery; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateOrganizationDiscoveryDomainRequestContent - && equalTo((CreateOrganizationDiscoveryDomainRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateOrganizationDiscoveryDomainRequestContent other) { - return domain.equals(other.domain) - && status.equals(other.status) - && useForOrganizationDiscovery.equals(other.useForOrganizationDiscovery); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.domain, this.status, this.useForOrganizationDiscovery); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static DomainStage builder() { - return new Builder(); - } - - public interface DomainStage { - /** - *

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

- */ - _FinalStage domain(@NotNull String domain); - - Builder from(CreateOrganizationDiscoveryDomainRequestContent other); - } - - public interface _FinalStage { - CreateOrganizationDiscoveryDomainRequestContent build(); - - _FinalStage status(Optional status); - - _FinalStage status(OrganizationDiscoveryDomainStatus status); - - /** - *

Indicates whether this domain should be used for organization discovery.

- */ - _FinalStage useForOrganizationDiscovery(Optional useForOrganizationDiscovery); - - _FinalStage useForOrganizationDiscovery(Boolean useForOrganizationDiscovery); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements DomainStage, _FinalStage { - private String domain; - - private Optional useForOrganizationDiscovery = Optional.empty(); - - private Optional status = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateOrganizationDiscoveryDomainRequestContent other) { - domain(other.getDomain()); - status(other.getStatus()); - useForOrganizationDiscovery(other.getUseForOrganizationDiscovery()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("domain") - public _FinalStage domain(@NotNull String domain) { - this.domain = Objects.requireNonNull(domain, "domain must not be null"); - return this; - } - - /** - *

Indicates whether this domain should be used for organization discovery.

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

Indicates whether this domain should be used for organization discovery.

- */ - @java.lang.Override - @JsonSetter(value = "use_for_organization_discovery", nulls = Nulls.SKIP) - public _FinalStage useForOrganizationDiscovery(Optional useForOrganizationDiscovery) { - this.useForOrganizationDiscovery = useForOrganizationDiscovery; - return this; - } - - @java.lang.Override - public _FinalStage status(OrganizationDiscoveryDomainStatus status) { - this.status = Optional.ofNullable(status); - return this; - } - - @java.lang.Override - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public _FinalStage status(Optional status) { - this.status = status; - return this; - } - - @java.lang.Override - public CreateOrganizationDiscoveryDomainRequestContent build() { - return new CreateOrganizationDiscoveryDomainRequestContent( - domain, status, useForOrganizationDiscovery, additionalProperties); - } - } -} 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 deleted file mode 100644 index e1fc23bc4..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationInvitationRequestContent.java +++ /dev/null @@ -1,420 +0,0 @@ -/** - * 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.OrganizationInvitationInvitee; -import com.auth0.client.mgmt.types.OrganizationInvitationInviter; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateOrganizationInvitationRequestContent.Builder.class) -public final class CreateOrganizationInvitationRequestContent { - private final OrganizationInvitationInviter inviter; - - private final OrganizationInvitationInvitee invitee; - - private final String clientId; - - private final Optional connectionId; - - private final Optional> appMetadata; - - private final Optional> userMetadata; - - private final Optional ttlSec; - - private final Optional> roles; - - private final Optional sendInvitationEmail; - - private final Map additionalProperties; - - private CreateOrganizationInvitationRequestContent( - OrganizationInvitationInviter inviter, - OrganizationInvitationInvitee invitee, - String clientId, - Optional connectionId, - Optional> appMetadata, - Optional> userMetadata, - Optional ttlSec, - Optional> roles, - Optional sendInvitationEmail, - Map additionalProperties) { - this.inviter = inviter; - this.invitee = invitee; - this.clientId = clientId; - this.connectionId = connectionId; - this.appMetadata = appMetadata; - this.userMetadata = userMetadata; - this.ttlSec = ttlSec; - this.roles = roles; - this.sendInvitationEmail = sendInvitationEmail; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("inviter") - public OrganizationInvitationInviter getInviter() { - return inviter; - } - - @JsonProperty("invitee") - public OrganizationInvitationInvitee getInvitee() { - return invitee; - } - - /** - * @return Auth0 client ID. Used to resolve the application's login initiation endpoint. - */ - @JsonProperty("client_id") - public String getClientId() { - return clientId; - } - - /** - * @return The id of the connection to force invitee to authenticate with. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - @JsonProperty("app_metadata") - public Optional> getAppMetadata() { - return appMetadata; - } - - @JsonProperty("user_metadata") - public Optional> getUserMetadata() { - return userMetadata; - } - - /** - * @return Number of seconds for which the invitation is valid before expiration. If unspecified or set to 0, this value defaults to 604800 seconds (7 days). Max value: 2592000 seconds (30 days). - */ - @JsonProperty("ttl_sec") - public Optional getTtlSec() { - return ttlSec; - } - - /** - * @return List of roles IDs to associated with the user. - */ - @JsonProperty("roles") - public Optional> getRoles() { - return roles; - } - - /** - * @return Whether the user will receive an invitation email (true) or no email (false), true by default - */ - @JsonProperty("send_invitation_email") - public Optional getSendInvitationEmail() { - return sendInvitationEmail; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateOrganizationInvitationRequestContent - && equalTo((CreateOrganizationInvitationRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateOrganizationInvitationRequestContent other) { - return inviter.equals(other.inviter) - && invitee.equals(other.invitee) - && clientId.equals(other.clientId) - && connectionId.equals(other.connectionId) - && appMetadata.equals(other.appMetadata) - && userMetadata.equals(other.userMetadata) - && ttlSec.equals(other.ttlSec) - && roles.equals(other.roles) - && sendInvitationEmail.equals(other.sendInvitationEmail); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.inviter, - this.invitee, - this.clientId, - this.connectionId, - this.appMetadata, - this.userMetadata, - this.ttlSec, - this.roles, - this.sendInvitationEmail); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static InviterStage builder() { - return new Builder(); - } - - public interface InviterStage { - InviteeStage inviter(@NotNull OrganizationInvitationInviter inviter); - - Builder from(CreateOrganizationInvitationRequestContent other); - } - - public interface InviteeStage { - ClientIdStage invitee(@NotNull OrganizationInvitationInvitee invitee); - } - - public interface ClientIdStage { - /** - *

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

- */ - _FinalStage clientId(@NotNull String clientId); - } - - public interface _FinalStage { - CreateOrganizationInvitationRequestContent build(); - - /** - *

The id of the connection to force invitee to authenticate with.

- */ - _FinalStage connectionId(Optional connectionId); - - _FinalStage connectionId(String connectionId); - - _FinalStage appMetadata(Optional> appMetadata); - - _FinalStage appMetadata(Map appMetadata); - - _FinalStage userMetadata(Optional> userMetadata); - - _FinalStage userMetadata(Map userMetadata); - - /** - *

Number of seconds for which the invitation is valid before expiration. If unspecified or set to 0, this value defaults to 604800 seconds (7 days). Max value: 2592000 seconds (30 days).

- */ - _FinalStage ttlSec(Optional ttlSec); - - _FinalStage ttlSec(Integer ttlSec); - - /** - *

List of roles IDs to associated with the user.

- */ - _FinalStage roles(Optional> roles); - - _FinalStage roles(List roles); - - /** - *

Whether the user will receive an invitation email (true) or no email (false), true by default

- */ - _FinalStage sendInvitationEmail(Optional sendInvitationEmail); - - _FinalStage sendInvitationEmail(Boolean sendInvitationEmail); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements InviterStage, InviteeStage, ClientIdStage, _FinalStage { - private OrganizationInvitationInviter inviter; - - private OrganizationInvitationInvitee invitee; - - private String clientId; - - private Optional sendInvitationEmail = Optional.empty(); - - private Optional> roles = Optional.empty(); - - private Optional ttlSec = Optional.empty(); - - private Optional> userMetadata = Optional.empty(); - - private Optional> appMetadata = Optional.empty(); - - private Optional connectionId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateOrganizationInvitationRequestContent other) { - inviter(other.getInviter()); - invitee(other.getInvitee()); - clientId(other.getClientId()); - connectionId(other.getConnectionId()); - appMetadata(other.getAppMetadata()); - userMetadata(other.getUserMetadata()); - ttlSec(other.getTtlSec()); - roles(other.getRoles()); - sendInvitationEmail(other.getSendInvitationEmail()); - return this; - } - - @java.lang.Override - @JsonSetter("inviter") - public InviteeStage inviter(@NotNull OrganizationInvitationInviter inviter) { - this.inviter = Objects.requireNonNull(inviter, "inviter must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("invitee") - public ClientIdStage invitee(@NotNull OrganizationInvitationInvitee invitee) { - this.invitee = Objects.requireNonNull(invitee, "invitee must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("client_id") - public _FinalStage clientId(@NotNull String clientId) { - this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); - return this; - } - - /** - *

Whether the user will receive an invitation email (true) or no email (false), true by default

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

Whether the user will receive an invitation email (true) or no email (false), true by default

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

List of roles IDs to associated with the user.

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

List of roles IDs to associated with the user.

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

Number of seconds for which the invitation is valid before expiration. If unspecified or set to 0, this value defaults to 604800 seconds (7 days). Max value: 2592000 seconds (30 days).

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

Number of seconds for which the invitation is valid before expiration. If unspecified or set to 0, this value defaults to 604800 seconds (7 days). Max value: 2592000 seconds (30 days).

- */ - @java.lang.Override - @JsonSetter(value = "ttl_sec", nulls = Nulls.SKIP) - public _FinalStage ttlSec(Optional ttlSec) { - this.ttlSec = ttlSec; - 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; - } - - /** - *

The id of the connection to force invitee to authenticate with.

- * @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; - } - - /** - *

The id of the connection to force invitee to authenticate with.

- */ - @java.lang.Override - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public _FinalStage connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - @java.lang.Override - public CreateOrganizationInvitationRequestContent build() { - return new CreateOrganizationInvitationRequestContent( - inviter, - invitee, - clientId, - connectionId, - appMetadata, - userMetadata, - ttlSec, - roles, - sendInvitationEmail, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationMemberRequestContent.java b/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationMemberRequestContent.java deleted file mode 100644 index 2fc0bfa7f..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/CreateOrganizationMemberRequestContent.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * 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 = CreateOrganizationMemberRequestContent.Builder.class) -public final class CreateOrganizationMemberRequestContent { - private final List members; - - private final Map additionalProperties; - - private CreateOrganizationMemberRequestContent(List members, Map additionalProperties) { - this.members = members; - this.additionalProperties = additionalProperties; - } - - /** - * @return List of user IDs to add to the organization as members. - */ - @JsonProperty("members") - public List getMembers() { - return members; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateOrganizationMemberRequestContent - && equalTo((CreateOrganizationMemberRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateOrganizationMemberRequestContent other) { - return members.equals(other.members); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.members); - } - - @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<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateOrganizationMemberRequestContent other) { - members(other.getMembers()); - return this; - } - - /** - *

List of user IDs to add to the organization as members.

- */ - @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(String members) { - this.members.add(members); - return this; - } - - public Builder addAllMembers(List members) { - if (members != null) { - this.members.addAll(members); - } - return this; - } - - public CreateOrganizationMemberRequestContent build() { - return new CreateOrganizationMemberRequestContent(members, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/DeleteOrganizationMembersRequestContent.java b/src/main/java/com/auth0/client/mgmt/organizations/types/DeleteOrganizationMembersRequestContent.java deleted file mode 100644 index 107e0da29..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/DeleteOrganizationMembersRequestContent.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * 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 = DeleteOrganizationMembersRequestContent.Builder.class) -public final class DeleteOrganizationMembersRequestContent { - private final List members; - - private final Map additionalProperties; - - private DeleteOrganizationMembersRequestContent(List members, Map additionalProperties) { - this.members = members; - this.additionalProperties = additionalProperties; - } - - /** - * @return List of user IDs to remove from the organization. - */ - @JsonProperty("members") - public List getMembers() { - return members; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DeleteOrganizationMembersRequestContent - && equalTo((DeleteOrganizationMembersRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DeleteOrganizationMembersRequestContent other) { - return members.equals(other.members); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.members); - } - - @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<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(DeleteOrganizationMembersRequestContent other) { - members(other.getMembers()); - return this; - } - - /** - *

List of user IDs to remove from 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(String members) { - this.members.add(members); - return this; - } - - public Builder addAllMembers(List members) { - if (members != null) { - this.members.addAll(members); - } - return this; - } - - public DeleteOrganizationMembersRequestContent build() { - return new DeleteOrganizationMembersRequestContent(members, additionalProperties); - } - } -} 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 deleted file mode 100644 index 3fa65613f..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/GetOrganizationInvitationRequestParameters.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * 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 = GetOrganizationInvitationRequestParameters.Builder.class) -public final class GetOrganizationInvitationRequestParameters { - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final Map additionalProperties; - - private GetOrganizationInvitationRequestParameters( - OptionalNullable fields, - OptionalNullable includeFields, - Map additionalProperties) { - this.fields = fields; - this.includeFields = includeFields; - this.additionalProperties = additionalProperties; - } - - /** - * @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("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 GetOrganizationInvitationRequestParameters - && equalTo((GetOrganizationInvitationRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetOrganizationInvitationRequestParameters other) { - return fields.equals(other.fields) && includeFields.equals(other.includeFields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetOrganizationInvitationRequestParameters other) { - fields(other.getFields()); - includeFields(other.getIncludeFields()); - 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 GetOrganizationInvitationRequestParameters build() { - return new GetOrganizationInvitationRequestParameters(fields, includeFields, additionalProperties); - } - } -} 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 deleted file mode 100644 index f7e4ccaef..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationClientGrantsRequestParameters.java +++ /dev/null @@ -1,409 +0,0 @@ -/** - * 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.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; -import java.util.Collections; -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 = ListOrganizationClientGrantsRequestParameters.Builder.class) -public final class ListOrganizationClientGrantsRequestParameters { - private final Optional> grantIds; - - private final OptionalNullable audience; - - private final OptionalNullable clientId; - - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final Map additionalProperties; - - private ListOrganizationClientGrantsRequestParameters( - Optional> grantIds, - OptionalNullable audience, - OptionalNullable clientId, - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - Map additionalProperties) { - this.grantIds = grantIds; - this.audience = audience; - this.clientId = clientId; - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.additionalProperties = additionalProperties; - } - - /** - * @return Optional filter on the ID of the client grant. Must be URL encoded and may be specified multiple times (max 10).<br /><b>e.g.</b> <i>../client-grants?grant_ids=id1&grant_ids=id2</i> - */ - @JsonIgnore - public Optional> getGrantIds() { - if (grantIds == null) { - return Optional.empty(); - } - return grantIds; - } - - /** - * @return Optional filter on audience of the client grant. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("audience") - public OptionalNullable getAudience() { - if (audience == null) { - return OptionalNullable.absent(); - } - return audience; - } - - /** - * @return Optional filter on client_id of the client grant. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("client_id") - public OptionalNullable getClientId() { - if (clientId == null) { - return OptionalNullable.absent(); - } - return clientId; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. Defaults to 50. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - 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; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListOrganizationClientGrantsRequestParameters - && equalTo((ListOrganizationClientGrantsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListOrganizationClientGrantsRequestParameters other) { - return grantIds.equals(other.grantIds) - && audience.equals(other.audience) - && clientId.equals(other.clientId) - && page.equals(other.page) - && perPage.equals(other.perPage) - && includeTotals.equals(other.includeTotals); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.grantIds, this.audience, this.clientId, this.page, this.perPage, this.includeTotals); - } - - @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> grantIds = Optional.empty(); - - private OptionalNullable audience = OptionalNullable.absent(); - - private OptionalNullable clientId = OptionalNullable.absent(); - - private OptionalNullable page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListOrganizationClientGrantsRequestParameters other) { - grantIds(other.getGrantIds()); - audience(other.getAudience()); - clientId(other.getClientId()); - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - return this; - } - - /** - *

Optional filter on the ID of the client grant. Must be URL encoded and may be specified multiple times (max 10).<br /><b>e.g.</b> <i>../client-grants?grant_ids=id1&grant_ids=id2</i>

- */ - @JsonSetter(value = "grant_ids", nulls = Nulls.SKIP) - public Builder grantIds(@Nullable Optional> grantIds) { - this.grantIds = grantIds; - return this; - } - - public Builder grantIds(List grantIds) { - this.grantIds = Optional.ofNullable(grantIds); - return this; - } - - public Builder grantIds(com.auth0.client.mgmt.core.Nullable> grantIds) { - if (grantIds.isNull()) { - this.grantIds = null; - } else if (grantIds.isEmpty()) { - this.grantIds = Optional.empty(); - } else { - this.grantIds = Optional.of(grantIds.get()); - } - return this; - } - - public Builder grantIds(String grantIds) { - this.grantIds = Optional.of(Collections.singletonList(grantIds)); - return this; - } - - /** - *

Optional filter on audience of the client grant.

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

Optional filter on client_id of the client grant.

- */ - @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; - } - - /** - *

Page index of the results to return. First page is 0.

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

Number of results per page. Defaults to 50.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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; - } - - public ListOrganizationClientGrantsRequestParameters build() { - return new ListOrganizationClientGrantsRequestParameters( - grantIds, audience, clientId, page, perPage, includeTotals, additionalProperties); - } - } -} 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 deleted file mode 100644 index 1f5f6812a..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationConnectionsRequestParameters.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.organizations.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListOrganizationConnectionsRequestParameters.Builder.class) -public final class ListOrganizationConnectionsRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final Map additionalProperties; - - private ListOrganizationConnectionsRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. Defaults to 50. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - return includeTotals; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListOrganizationConnectionsRequestParameters - && equalTo((ListOrganizationConnectionsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListOrganizationConnectionsRequestParameters other) { - return page.equals(other.page) && perPage.equals(other.perPage) && includeTotals.equals(other.includeTotals); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage, this.includeTotals); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListOrganizationConnectionsRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page. Defaults to 50.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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(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; - } - - public ListOrganizationConnectionsRequestParameters build() { - return new ListOrganizationConnectionsRequestParameters(page, perPage, includeTotals, additionalProperties); - } - } -} 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 deleted file mode 100644 index 7ebb5edb9..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationDiscoveryDomainsRequestParameters.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * 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 = ListOrganizationDiscoveryDomainsRequestParameters.Builder.class) -public final class ListOrganizationDiscoveryDomainsRequestParameters { - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private ListOrganizationDiscoveryDomainsRequestParameters( - 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() { - 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; - return other instanceof ListOrganizationDiscoveryDomainsRequestParameters - && equalTo((ListOrganizationDiscoveryDomainsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListOrganizationDiscoveryDomainsRequestParameters 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(ListOrganizationDiscoveryDomainsRequestParameters 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(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 ListOrganizationDiscoveryDomainsRequestParameters build() { - return new ListOrganizationDiscoveryDomainsRequestParameters(from, take, additionalProperties); - } - } -} 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 deleted file mode 100644 index 456c405d1..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationInvitationsRequestParameters.java +++ /dev/null @@ -1,411 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.organizations.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListOrganizationInvitationsRequestParameters.Builder.class) -public final class ListOrganizationInvitationsRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final OptionalNullable sort; - - private final Map additionalProperties; - - private ListOrganizationInvitationsRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - OptionalNullable fields, - OptionalNullable includeFields, - OptionalNullable sort, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.fields = fields; - this.includeFields = includeFields; - this.sort = sort; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. Defaults to 50. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("include_totals") - public OptionalNullable getIncludeTotals() { - return includeTotals; - } - - /** - * @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; - } - - /** - * @return Field to sort by. Use field:order where order is 1 for ascending and -1 for descending Defaults to created_at:-1. - */ - @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("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; - return other instanceof ListOrganizationInvitationsRequestParameters - && equalTo((ListOrganizationInvitationsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListOrganizationInvitationsRequestParameters other) { - return page.equals(other.page) - && perPage.equals(other.perPage) - && includeTotals.equals(other.includeTotals) - && fields.equals(other.fields) - && includeFields.equals(other.includeFields) - && sort.equals(other.sort); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage, this.includeTotals, this.fields, this.includeFields, 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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - private OptionalNullable fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - private OptionalNullable sort = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListOrganizationInvitationsRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - fields(other.getFields()); - includeFields(other.getIncludeFields()); - sort(other.getSort()); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page. Defaults to 50.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - return this; - } - - /** - *

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.

- */ - @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(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(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; - } - - /** - *

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(@org.jetbrains.annotations.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(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(@org.jetbrains.annotations.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(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; - } - - /** - *

Field to sort by. Use field:order where order is 1 for ascending and -1 for descending Defaults to created_at:-1.

- */ - @JsonSetter(value = "sort", nulls = Nulls.SKIP) - public Builder sort(@org.jetbrains.annotations.Nullable OptionalNullable sort) { - this.sort = sort; - return this; - } - - public Builder sort(String 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(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 ListOrganizationInvitationsRequestParameters build() { - return new ListOrganizationInvitationsRequestParameters( - page, perPage, includeTotals, fields, includeFields, sort, additionalProperties); - } - } -} 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 deleted file mode 100644 index 4c9a985ac..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/ListOrganizationMembersRequestParameters.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * 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 = ListOrganizationMembersRequestParameters.Builder.class) -public final class ListOrganizationMembersRequestParameters { - private final OptionalNullable from; - - private final OptionalNullable take; - - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final Map additionalProperties; - - private ListOrganizationMembersRequestParameters( - 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. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("take") - public OptionalNullable getTake() { - 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). - */ - @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("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 ListOrganizationMembersRequestParameters - && equalTo((ListOrganizationMembersRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListOrganizationMembersRequestParameters 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(ListOrganizationMembersRequestParameters 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.

- */ - @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(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).

- */ - @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 ListOrganizationMembersRequestParameters build() { - return new ListOrganizationMembersRequestParameters( - from, take, fields, includeFields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/UpdateOrganizationConnectionRequestContent.java b/src/main/java/com/auth0/client/mgmt/organizations/types/UpdateOrganizationConnectionRequestContent.java deleted file mode 100644 index ee5ef19d8..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/UpdateOrganizationConnectionRequestContent.java +++ /dev/null @@ -1,165 +0,0 @@ -/** - * 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 = UpdateOrganizationConnectionRequestContent.Builder.class) -public final class UpdateOrganizationConnectionRequestContent { - private final Optional assignMembershipOnLogin; - - private final Optional isSignupEnabled; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private UpdateOrganizationConnectionRequestContent( - Optional assignMembershipOnLogin, - Optional isSignupEnabled, - Optional showAsButton, - Map additionalProperties) { - this.assignMembershipOnLogin = assignMembershipOnLogin; - this.isSignupEnabled = isSignupEnabled; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - /** - * @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 organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false. - */ - @JsonProperty("is_signup_enabled") - public Optional getIsSignupEnabled() { - return isSignupEnabled; - } - - /** - * @return Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true. - */ - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateOrganizationConnectionRequestContent - && equalTo((UpdateOrganizationConnectionRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateOrganizationConnectionRequestContent other) { - return assignMembershipOnLogin.equals(other.assignMembershipOnLogin) - && isSignupEnabled.equals(other.isSignupEnabled) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.assignMembershipOnLogin, this.isSignupEnabled, this.showAsButton); - } - - @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 assignMembershipOnLogin = Optional.empty(); - - private Optional isSignupEnabled = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateOrganizationConnectionRequestContent other) { - assignMembershipOnLogin(other.getAssignMembershipOnLogin()); - isSignupEnabled(other.getIsSignupEnabled()); - showAsButton(other.getShowAsButton()); - 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.

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

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

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

Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true.

- */ - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - public UpdateOrganizationConnectionRequestContent build() { - return new UpdateOrganizationConnectionRequestContent( - assignMembershipOnLogin, isSignupEnabled, showAsButton, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/organizations/types/UpdateOrganizationDiscoveryDomainRequestContent.java b/src/main/java/com/auth0/client/mgmt/organizations/types/UpdateOrganizationDiscoveryDomainRequestContent.java deleted file mode 100644 index 794cd4e12..000000000 --- a/src/main/java/com/auth0/client/mgmt/organizations/types/UpdateOrganizationDiscoveryDomainRequestContent.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * 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.OrganizationDiscoveryDomainStatus; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateOrganizationDiscoveryDomainRequestContent.Builder.class) -public final class UpdateOrganizationDiscoveryDomainRequestContent { - private final Optional status; - - private final Optional useForOrganizationDiscovery; - - private final Map additionalProperties; - - private UpdateOrganizationDiscoveryDomainRequestContent( - Optional status, - Optional useForOrganizationDiscovery, - Map additionalProperties) { - this.status = status; - this.useForOrganizationDiscovery = useForOrganizationDiscovery; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return Indicates whether this domain should be used for organization discovery. - */ - @JsonProperty("use_for_organization_discovery") - public Optional getUseForOrganizationDiscovery() { - return useForOrganizationDiscovery; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateOrganizationDiscoveryDomainRequestContent - && equalTo((UpdateOrganizationDiscoveryDomainRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateOrganizationDiscoveryDomainRequestContent other) { - return status.equals(other.status) && useForOrganizationDiscovery.equals(other.useForOrganizationDiscovery); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.status, this.useForOrganizationDiscovery); - } - - @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 status = Optional.empty(); - - private Optional useForOrganizationDiscovery = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateOrganizationDiscoveryDomainRequestContent other) { - status(other.getStatus()); - useForOrganizationDiscovery(other.getUseForOrganizationDiscovery()); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(OrganizationDiscoveryDomainStatus status) { - this.status = Optional.ofNullable(status); - return this; - } - - /** - *

Indicates whether this domain should be used for organization discovery.

- */ - @JsonSetter(value = "use_for_organization_discovery", nulls = Nulls.SKIP) - public Builder useForOrganizationDiscovery(Optional useForOrganizationDiscovery) { - this.useForOrganizationDiscovery = useForOrganizationDiscovery; - return this; - } - - public Builder useForOrganizationDiscovery(Boolean useForOrganizationDiscovery) { - this.useForOrganizationDiscovery = Optional.ofNullable(useForOrganizationDiscovery); - return this; - } - - public UpdateOrganizationDiscoveryDomainRequestContent build() { - return new UpdateOrganizationDiscoveryDomainRequestContent( - status, useForOrganizationDiscovery, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/prompts/AsyncCustomTextClient.java b/src/main/java/com/auth0/client/mgmt/prompts/AsyncCustomTextClient.java deleted file mode 100644 index 5063f6321..000000000 --- a/src/main/java/com/auth0/client/mgmt/prompts/AsyncCustomTextClient.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.prompts; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.PromptGroupNameEnum; -import com.auth0.client.mgmt.types.PromptLanguageEnum; -import java.util.Map; -import java.util.concurrent.CompletableFuture; - -public class AsyncCustomTextClient { - protected final ClientOptions clientOptions; - - private final AsyncRawCustomTextClient rawClient; - - public AsyncCustomTextClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawCustomTextClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawCustomTextClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve custom text for a specific prompt and language. - */ - public CompletableFuture> get(PromptGroupNameEnum prompt, PromptLanguageEnum language) { - return this.rawClient.get(prompt, language).thenApply(response -> response.body()); - } - - /** - * Retrieve custom text for a specific prompt and language. - */ - public CompletableFuture> get( - PromptGroupNameEnum prompt, PromptLanguageEnum language, RequestOptions requestOptions) { - return this.rawClient.get(prompt, language, requestOptions).thenApply(response -> response.body()); - } - - /** - * Set custom text for a specific prompt. Existing texts will be overwritten. - */ - public CompletableFuture set( - PromptGroupNameEnum prompt, PromptLanguageEnum language, Map request) { - return this.rawClient.set(prompt, language, request).thenApply(response -> response.body()); - } - - /** - * Set custom text for a specific prompt. Existing texts will be overwritten. - */ - public CompletableFuture set( - PromptGroupNameEnum prompt, - PromptLanguageEnum language, - Map request, - RequestOptions requestOptions) { - return this.rawClient.set(prompt, language, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/prompts/AsyncPartialsClient.java b/src/main/java/com/auth0/client/mgmt/prompts/AsyncPartialsClient.java deleted file mode 100644 index f55727f33..000000000 --- a/src/main/java/com/auth0/client/mgmt/prompts/AsyncPartialsClient.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.prompts; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.PartialGroupsEnum; -import java.util.Map; -import java.util.concurrent.CompletableFuture; - -public class AsyncPartialsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawPartialsClient rawClient; - - public AsyncPartialsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawPartialsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawPartialsClient withRawResponse() { - return this.rawClient; - } - - /** - * Get template partials for a prompt - */ - public CompletableFuture> get(PartialGroupsEnum prompt) { - return this.rawClient.get(prompt).thenApply(response -> response.body()); - } - - /** - * Get template partials for a prompt - */ - public CompletableFuture> get(PartialGroupsEnum prompt, RequestOptions requestOptions) { - return this.rawClient.get(prompt, requestOptions).thenApply(response -> response.body()); - } - - /** - * Set template partials for a prompt - */ - public CompletableFuture set(PartialGroupsEnum prompt, Map request) { - return this.rawClient.set(prompt, request).thenApply(response -> response.body()); - } - - /** - * Set template partials for a prompt - */ - public CompletableFuture set( - PartialGroupsEnum prompt, Map request, RequestOptions requestOptions) { - return this.rawClient.set(prompt, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawCustomTextClient.java b/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawCustomTextClient.java deleted file mode 100644 index ca0c1277a..000000000 --- a/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawCustomTextClient.java +++ /dev/null @@ -1,227 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.prompts; - -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.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.PromptGroupNameEnum; -import com.auth0.client.mgmt.types.PromptLanguageEnum; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import java.io.IOException; -import java.util.Map; -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 AsyncRawCustomTextClient { - protected final ClientOptions clientOptions; - - public AsyncRawCustomTextClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve custom text for a specific prompt and language. - */ - public CompletableFuture>> get( - PromptGroupNameEnum prompt, PromptLanguageEnum language) { - return get(prompt, language, null); - } - - /** - * Retrieve custom text for a specific prompt and language. - */ - public CompletableFuture>> get( - PromptGroupNameEnum prompt, PromptLanguageEnum language, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts") - .addPathSegment(prompt.toString()) - .addPathSegments("custom-text") - .addPathSegment(language.toString()) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture>> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Set custom text for a specific prompt. Existing texts will be overwritten. - */ - public CompletableFuture> set( - PromptGroupNameEnum prompt, PromptLanguageEnum language, Map request) { - return set(prompt, language, request, null); - } - - /** - * Set custom text for a specific prompt. Existing texts will be overwritten. - */ - public CompletableFuture> set( - PromptGroupNameEnum prompt, - PromptLanguageEnum language, - Map request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts") - .addPathSegment(prompt.toString()) - .addPathSegments("custom-text") - .addPathSegment(language.toString()) - .build(); - 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) - .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<>(); - 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 (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/prompts/AsyncRawPartialsClient.java b/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawPartialsClient.java deleted file mode 100644 index 5767e8a1d..000000000 --- a/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawPartialsClient.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.prompts; - -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.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.PartialGroupsEnum; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import java.io.IOException; -import java.util.Map; -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 AsyncRawPartialsClient { - protected final ClientOptions clientOptions; - - public AsyncRawPartialsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Get template partials for a prompt - */ - public CompletableFuture>> get(PartialGroupsEnum prompt) { - return get(prompt, null); - } - - /** - * Get template partials for a prompt - */ - public CompletableFuture>> get( - PartialGroupsEnum prompt, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts") - .addPathSegment(prompt.toString()) - .addPathSegments("partials") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture>> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Set template partials for a prompt - */ - public CompletableFuture> set( - PartialGroupsEnum prompt, Map request) { - return set(prompt, request, null); - } - - /** - * Set template partials for a prompt - */ - public CompletableFuture> set( - PartialGroupsEnum prompt, Map request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts") - .addPathSegment(prompt.toString()) - .addPathSegments("partials") - .build(); - 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) - .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<>(); - 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 (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/prompts/AsyncRawRenderingClient.java b/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawRenderingClient.java deleted file mode 100644 index d2e266649..000000000 --- a/src/main/java/com/auth0/client/mgmt/prompts/AsyncRawRenderingClient.java +++ /dev/null @@ -1,496 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.prompts; - -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.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.PaymentRequiredError; -import com.auth0.client.mgmt.errors.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.prompts.types.BulkUpdateAculRequestContent; -import com.auth0.client.mgmt.prompts.types.ListAculsRequestParameters; -import com.auth0.client.mgmt.prompts.types.UpdateAculRequestContent; -import com.auth0.client.mgmt.types.BulkUpdateAculResponseContent; -import com.auth0.client.mgmt.types.GetAculResponseContent; -import com.auth0.client.mgmt.types.ListAculsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListAculsResponseContentItem; -import com.auth0.client.mgmt.types.PromptGroupNameEnum; -import com.auth0.client.mgmt.types.ScreenGroupNameEnum; -import com.auth0.client.mgmt.types.UpdateAculResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawRenderingClient { - protected final ClientOptions clientOptions; - - public AsyncRawRenderingClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Get render setting configurations for all screens. - */ - public CompletableFuture>> list() { - return list(ListAculsRequestParameters.builder().build()); - } - - /** - * Get render setting configurations for all screens. - */ - public CompletableFuture>> list( - ListAculsRequestParameters request) { - return list(request, null); - } - - /** - * Get render setting configurations for all screens. - */ - public CompletableFuture>> list( - ListAculsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts/rendering"); - 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, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getPrompt().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "prompt", request.getPrompt().orElse(null), false); - } - if (!request.getScreen().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "screen", request.getScreen().orElse(null), false); - } - if (!request.getRenderingMode().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "rendering_mode", request.getRenderingMode().orElse(null), false); - } - 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); - } - 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()) { - ListAculsOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListAculsOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListAculsRequestParameters nextRequest = ListAculsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getConfigs().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 402: - future.completeExceptionally(new PaymentRequiredError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public CompletableFuture> bulkUpdate( - BulkUpdateAculRequestContent request) { - return bulkUpdate(request, null); - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public CompletableFuture> bulkUpdate( - BulkUpdateAculRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts/rendering") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, BulkUpdateAculResponseContent.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 402: - future.completeExceptionally(new PaymentRequiredError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Get render settings for a screen. - */ - public CompletableFuture> get( - PromptGroupNameEnum prompt, ScreenGroupNameEnum screen) { - return get(prompt, screen, null); - } - - /** - * Get render settings for a screen. - */ - public CompletableFuture> get( - PromptGroupNameEnum prompt, ScreenGroupNameEnum screen, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts") - .addPathSegment(prompt.toString()) - .addPathSegments("screen") - .addPathSegment(screen.toString()) - .addPathSegments("rendering") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetAculResponseContent.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 402: - future.completeExceptionally(new PaymentRequiredError( - 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 (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; - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public CompletableFuture> update( - PromptGroupNameEnum prompt, ScreenGroupNameEnum screen) { - return update(prompt, screen, UpdateAculRequestContent.builder().build()); - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public CompletableFuture> update( - PromptGroupNameEnum prompt, ScreenGroupNameEnum screen, UpdateAculRequestContent request) { - return update(prompt, screen, request, null); - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public CompletableFuture> update( - PromptGroupNameEnum prompt, - ScreenGroupNameEnum screen, - UpdateAculRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts") - .addPathSegment(prompt.toString()) - .addPathSegments("screen") - .addPathSegment(screen.toString()) - .addPathSegments("rendering") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateAculResponseContent.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 402: - future.completeExceptionally(new PaymentRequiredError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/prompts/AsyncRenderingClient.java b/src/main/java/com/auth0/client/mgmt/prompts/AsyncRenderingClient.java deleted file mode 100644 index 6079315d7..000000000 --- a/src/main/java/com/auth0/client/mgmt/prompts/AsyncRenderingClient.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.prompts; - -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.prompts.types.BulkUpdateAculRequestContent; -import com.auth0.client.mgmt.prompts.types.ListAculsRequestParameters; -import com.auth0.client.mgmt.prompts.types.UpdateAculRequestContent; -import com.auth0.client.mgmt.types.BulkUpdateAculResponseContent; -import com.auth0.client.mgmt.types.GetAculResponseContent; -import com.auth0.client.mgmt.types.ListAculsResponseContentItem; -import com.auth0.client.mgmt.types.PromptGroupNameEnum; -import com.auth0.client.mgmt.types.ScreenGroupNameEnum; -import com.auth0.client.mgmt.types.UpdateAculResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncRenderingClient { - protected final ClientOptions clientOptions; - - private final AsyncRawRenderingClient rawClient; - - public AsyncRenderingClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawRenderingClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawRenderingClient withRawResponse() { - return this.rawClient; - } - - /** - * Get render setting configurations for all screens. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * Get render setting configurations for all screens. - */ - public CompletableFuture> list( - ListAculsRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * Get render setting configurations for all screens. - */ - public CompletableFuture> list( - ListAculsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public CompletableFuture bulkUpdate(BulkUpdateAculRequestContent request) { - return this.rawClient.bulkUpdate(request).thenApply(response -> response.body()); - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public CompletableFuture bulkUpdate( - BulkUpdateAculRequestContent request, RequestOptions requestOptions) { - return this.rawClient.bulkUpdate(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Get render settings for a screen. - */ - public CompletableFuture get(PromptGroupNameEnum prompt, ScreenGroupNameEnum screen) { - return this.rawClient.get(prompt, screen).thenApply(response -> response.body()); - } - - /** - * Get render settings for a screen. - */ - public CompletableFuture get( - PromptGroupNameEnum prompt, ScreenGroupNameEnum screen, RequestOptions requestOptions) { - return this.rawClient.get(prompt, screen, requestOptions).thenApply(response -> response.body()); - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public CompletableFuture update(PromptGroupNameEnum prompt, ScreenGroupNameEnum screen) { - return this.rawClient.update(prompt, screen).thenApply(response -> response.body()); - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public CompletableFuture update( - PromptGroupNameEnum prompt, ScreenGroupNameEnum screen, UpdateAculRequestContent request) { - return this.rawClient.update(prompt, screen, request).thenApply(response -> response.body()); - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public CompletableFuture update( - PromptGroupNameEnum prompt, - ScreenGroupNameEnum screen, - UpdateAculRequestContent request, - RequestOptions requestOptions) { - return this.rawClient.update(prompt, screen, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/prompts/CustomTextClient.java b/src/main/java/com/auth0/client/mgmt/prompts/CustomTextClient.java deleted file mode 100644 index feed169cd..000000000 --- a/src/main/java/com/auth0/client/mgmt/prompts/CustomTextClient.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.prompts; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.PromptGroupNameEnum; -import com.auth0.client.mgmt.types.PromptLanguageEnum; -import java.util.Map; - -public class CustomTextClient { - protected final ClientOptions clientOptions; - - private final RawCustomTextClient rawClient; - - public CustomTextClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawCustomTextClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawCustomTextClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve custom text for a specific prompt and language. - */ - public Map get(PromptGroupNameEnum prompt, PromptLanguageEnum language) { - return this.rawClient.get(prompt, language).body(); - } - - /** - * Retrieve custom text for a specific prompt and language. - */ - public Map get( - PromptGroupNameEnum prompt, PromptLanguageEnum language, RequestOptions requestOptions) { - return this.rawClient.get(prompt, language, requestOptions).body(); - } - - /** - * Set custom text for a specific prompt. Existing texts will be overwritten. - */ - public void set(PromptGroupNameEnum prompt, PromptLanguageEnum language, Map request) { - this.rawClient.set(prompt, language, request).body(); - } - - /** - * Set custom text for a specific prompt. Existing texts will be overwritten. - */ - public void set( - PromptGroupNameEnum prompt, - PromptLanguageEnum language, - Map request, - RequestOptions requestOptions) { - this.rawClient.set(prompt, language, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/prompts/PartialsClient.java b/src/main/java/com/auth0/client/mgmt/prompts/PartialsClient.java deleted file mode 100644 index 387ef1d0b..000000000 --- a/src/main/java/com/auth0/client/mgmt/prompts/PartialsClient.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.prompts; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.PartialGroupsEnum; -import java.util.Map; - -public class PartialsClient { - protected final ClientOptions clientOptions; - - private final RawPartialsClient rawClient; - - public PartialsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawPartialsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawPartialsClient withRawResponse() { - return this.rawClient; - } - - /** - * Get template partials for a prompt - */ - public Map get(PartialGroupsEnum prompt) { - return this.rawClient.get(prompt).body(); - } - - /** - * Get template partials for a prompt - */ - public Map get(PartialGroupsEnum prompt, RequestOptions requestOptions) { - return this.rawClient.get(prompt, requestOptions).body(); - } - - /** - * Set template partials for a prompt - */ - public void set(PartialGroupsEnum prompt, Map request) { - this.rawClient.set(prompt, request).body(); - } - - /** - * Set template partials for a prompt - */ - public void set(PartialGroupsEnum prompt, Map request, RequestOptions requestOptions) { - this.rawClient.set(prompt, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/prompts/RawCustomTextClient.java b/src/main/java/com/auth0/client/mgmt/prompts/RawCustomTextClient.java deleted file mode 100644 index d177e3c69..000000000 --- a/src/main/java/com/auth0/client/mgmt/prompts/RawCustomTextClient.java +++ /dev/null @@ -1,178 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.prompts; - -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.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.PromptGroupNameEnum; -import com.auth0.client.mgmt.types.PromptLanguageEnum; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import java.io.IOException; -import java.util.Map; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawCustomTextClient { - protected final ClientOptions clientOptions; - - public RawCustomTextClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve custom text for a specific prompt and language. - */ - public ManagementApiHttpResponse> get(PromptGroupNameEnum prompt, PromptLanguageEnum language) { - return get(prompt, language, null); - } - - /** - * Retrieve custom text for a specific prompt and language. - */ - public ManagementApiHttpResponse> get( - PromptGroupNameEnum prompt, PromptLanguageEnum language, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts") - .addPathSegment(prompt.toString()) - .addPathSegments("custom-text") - .addPathSegment(language.toString()) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Set custom text for a specific prompt. Existing texts will be overwritten. - */ - public ManagementApiHttpResponse set( - PromptGroupNameEnum prompt, PromptLanguageEnum language, Map request) { - return set(prompt, language, request, null); - } - - /** - * Set custom text for a specific prompt. Existing texts will be overwritten. - */ - public ManagementApiHttpResponse set( - PromptGroupNameEnum prompt, - PromptLanguageEnum language, - Map request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts") - .addPathSegment(prompt.toString()) - .addPathSegments("custom-text") - .addPathSegment(language.toString()) - .build(); - 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) - .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); - } - 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 (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 deleted file mode 100644 index 2d11561ca..000000000 --- a/src/main/java/com/auth0/client/mgmt/prompts/RawPartialsClient.java +++ /dev/null @@ -1,170 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.prompts; - -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.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.PartialGroupsEnum; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import java.io.IOException; -import java.util.Map; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawPartialsClient { - protected final ClientOptions clientOptions; - - public RawPartialsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Get template partials for a prompt - */ - public ManagementApiHttpResponse> get(PartialGroupsEnum prompt) { - return get(prompt, null); - } - - /** - * Get template partials for a prompt - */ - public ManagementApiHttpResponse> get(PartialGroupsEnum prompt, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts") - .addPathSegment(prompt.toString()) - .addPathSegments("partials") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Set template partials for a prompt - */ - public ManagementApiHttpResponse set(PartialGroupsEnum prompt, Map request) { - return set(prompt, request, null); - } - - /** - * Set template partials for a prompt - */ - public ManagementApiHttpResponse set( - PartialGroupsEnum prompt, Map request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts") - .addPathSegment(prompt.toString()) - .addPathSegments("partials") - .build(); - 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) - .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); - } - 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 (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 deleted file mode 100644 index c4b922f6e..000000000 --- a/src/main/java/com/auth0/client/mgmt/prompts/RawRenderingClient.java +++ /dev/null @@ -1,385 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.prompts; - -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.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.PaymentRequiredError; -import com.auth0.client.mgmt.errors.TooManyRequestsError; -import com.auth0.client.mgmt.errors.UnauthorizedError; -import com.auth0.client.mgmt.prompts.types.BulkUpdateAculRequestContent; -import com.auth0.client.mgmt.prompts.types.ListAculsRequestParameters; -import com.auth0.client.mgmt.prompts.types.UpdateAculRequestContent; -import com.auth0.client.mgmt.types.BulkUpdateAculResponseContent; -import com.auth0.client.mgmt.types.GetAculResponseContent; -import com.auth0.client.mgmt.types.ListAculsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.ListAculsResponseContentItem; -import com.auth0.client.mgmt.types.PromptGroupNameEnum; -import com.auth0.client.mgmt.types.ScreenGroupNameEnum; -import com.auth0.client.mgmt.types.UpdateAculResponseContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawRenderingClient { - protected final ClientOptions clientOptions; - - public RawRenderingClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Get render setting configurations for all screens. - */ - public ManagementApiHttpResponse> list() { - return list(ListAculsRequestParameters.builder().build()); - } - - /** - * Get render setting configurations for all screens. - */ - public ManagementApiHttpResponse> list( - ListAculsRequestParameters request) { - return list(request, null); - } - - /** - * Get render setting configurations for all screens. - */ - public ManagementApiHttpResponse> list( - ListAculsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts/rendering"); - 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, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - if (!request.getPrompt().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "prompt", request.getPrompt().orElse(null), false); - } - if (!request.getScreen().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "screen", request.getScreen().orElse(null), false); - } - if (!request.getRenderingMode().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "rendering_mode", request.getRenderingMode().orElse(null), false); - } - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListAculsOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListAculsOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListAculsRequestParameters nextRequest = ListAculsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getConfigs().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 402: - throw new PaymentRequiredError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public ManagementApiHttpResponse bulkUpdate(BulkUpdateAculRequestContent request) { - return bulkUpdate(request, null); - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public ManagementApiHttpResponse bulkUpdate( - BulkUpdateAculRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts/rendering") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, BulkUpdateAculResponseContent.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 402: - throw new PaymentRequiredError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Get render settings for a screen. - */ - public ManagementApiHttpResponse get( - PromptGroupNameEnum prompt, ScreenGroupNameEnum screen) { - return get(prompt, screen, null); - } - - /** - * Get render settings for a screen. - */ - public ManagementApiHttpResponse get( - PromptGroupNameEnum prompt, ScreenGroupNameEnum screen, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts") - .addPathSegment(prompt.toString()) - .addPathSegments("screen") - .addPathSegment(screen.toString()) - .addPathSegments("rendering") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetAculResponseContent.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 402: - throw new PaymentRequiredError( - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public ManagementApiHttpResponse update( - PromptGroupNameEnum prompt, ScreenGroupNameEnum screen) { - return update(prompt, screen, UpdateAculRequestContent.builder().build()); - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public ManagementApiHttpResponse update( - PromptGroupNameEnum prompt, ScreenGroupNameEnum screen, UpdateAculRequestContent request) { - return update(prompt, screen, request, null); - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public ManagementApiHttpResponse update( - PromptGroupNameEnum prompt, - ScreenGroupNameEnum screen, - UpdateAculRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("prompts") - .addPathSegment(prompt.toString()) - .addPathSegments("screen") - .addPathSegment(screen.toString()) - .addPathSegments("rendering") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateAculResponseContent.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 402: - throw new PaymentRequiredError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/prompts/RenderingClient.java b/src/main/java/com/auth0/client/mgmt/prompts/RenderingClient.java deleted file mode 100644 index 0833006c0..000000000 --- a/src/main/java/com/auth0/client/mgmt/prompts/RenderingClient.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.prompts; - -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.prompts.types.BulkUpdateAculRequestContent; -import com.auth0.client.mgmt.prompts.types.ListAculsRequestParameters; -import com.auth0.client.mgmt.prompts.types.UpdateAculRequestContent; -import com.auth0.client.mgmt.types.BulkUpdateAculResponseContent; -import com.auth0.client.mgmt.types.GetAculResponseContent; -import com.auth0.client.mgmt.types.ListAculsResponseContentItem; -import com.auth0.client.mgmt.types.PromptGroupNameEnum; -import com.auth0.client.mgmt.types.ScreenGroupNameEnum; -import com.auth0.client.mgmt.types.UpdateAculResponseContent; - -public class RenderingClient { - protected final ClientOptions clientOptions; - - private final RawRenderingClient rawClient; - - public RenderingClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawRenderingClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawRenderingClient withRawResponse() { - return this.rawClient; - } - - /** - * Get render setting configurations for all screens. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * Get render setting configurations for all screens. - */ - public SyncPagingIterable list(ListAculsRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * Get render setting configurations for all screens. - */ - public SyncPagingIterable list( - ListAculsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public BulkUpdateAculResponseContent bulkUpdate(BulkUpdateAculRequestContent request) { - return this.rawClient.bulkUpdate(request).body(); - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public BulkUpdateAculResponseContent bulkUpdate( - BulkUpdateAculRequestContent request, RequestOptions requestOptions) { - return this.rawClient.bulkUpdate(request, requestOptions).body(); - } - - /** - * Get render settings for a screen. - */ - public GetAculResponseContent get(PromptGroupNameEnum prompt, ScreenGroupNameEnum screen) { - return this.rawClient.get(prompt, screen).body(); - } - - /** - * Get render settings for a screen. - */ - public GetAculResponseContent get( - PromptGroupNameEnum prompt, ScreenGroupNameEnum screen, RequestOptions requestOptions) { - return this.rawClient.get(prompt, screen, requestOptions).body(); - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public UpdateAculResponseContent update(PromptGroupNameEnum prompt, ScreenGroupNameEnum screen) { - return this.rawClient.update(prompt, screen).body(); - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public UpdateAculResponseContent update( - PromptGroupNameEnum prompt, ScreenGroupNameEnum screen, UpdateAculRequestContent request) { - return this.rawClient.update(prompt, screen, request).body(); - } - - /** - * Learn more about <a href='https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens'>configuring render settings</a> for advanced customization. - */ - public UpdateAculResponseContent update( - PromptGroupNameEnum prompt, - ScreenGroupNameEnum screen, - UpdateAculRequestContent request, - RequestOptions requestOptions) { - return this.rawClient.update(prompt, screen, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/prompts/types/BulkUpdateAculRequestContent.java b/src/main/java/com/auth0/client/mgmt/prompts/types/BulkUpdateAculRequestContent.java deleted file mode 100644 index f23bb371f..000000000 --- a/src/main/java/com/auth0/client/mgmt/prompts/types/BulkUpdateAculRequestContent.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.prompts.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.AculConfigsItem; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = BulkUpdateAculRequestContent.Builder.class) -public final class BulkUpdateAculRequestContent { - private final List configs; - - private final Map additionalProperties; - - private BulkUpdateAculRequestContent(List configs, Map additionalProperties) { - this.configs = configs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("configs") - public List getConfigs() { - return configs; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BulkUpdateAculRequestContent && equalTo((BulkUpdateAculRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BulkUpdateAculRequestContent other) { - return configs.equals(other.configs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.configs); - } - - @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 configs = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(BulkUpdateAculRequestContent other) { - configs(other.getConfigs()); - return this; - } - - @JsonSetter(value = "configs", nulls = Nulls.SKIP) - public Builder configs(List configs) { - this.configs.clear(); - if (configs != null) { - this.configs.addAll(configs); - } - return this; - } - - public Builder addConfigs(AculConfigsItem configs) { - this.configs.add(configs); - return this; - } - - public Builder addAllConfigs(List configs) { - if (configs != null) { - this.configs.addAll(configs); - } - return this; - } - - public BulkUpdateAculRequestContent build() { - return new BulkUpdateAculRequestContent(configs, additionalProperties); - } - } -} 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 deleted file mode 100644 index 3bcc187a2..000000000 --- a/src/main/java/com/auth0/client/mgmt/prompts/types/ListAculsRequestParameters.java +++ /dev/null @@ -1,547 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListAculsRequestParameters.Builder.class) -public final class ListAculsRequestParameters { - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final OptionalNullable prompt; - - private final OptionalNullable screen; - - private final OptionalNullable renderingMode; - - private final Map additionalProperties; - - private ListAculsRequestParameters( - OptionalNullable fields, - OptionalNullable includeFields, - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - OptionalNullable prompt, - OptionalNullable screen, - OptionalNullable renderingMode, - Map additionalProperties) { - this.fields = fields; - this.includeFields = includeFields; - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.prompt = prompt; - this.screen = screen; - this.renderingMode = renderingMode; - this.additionalProperties = additionalProperties; - } - - /** - * @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 (default: true) or excluded (false). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("include_fields") - public OptionalNullable getIncludeFields() { - if (includeFields == null) { - return OptionalNullable.absent(); - } - return includeFields; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. Maximum value is 100, default value is 50. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @return Return results inside an object that contains the total configuration 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() { - return includeTotals; - } - - /** - * @return Name of the prompt to filter by - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("prompt") - public OptionalNullable getPrompt() { - if (prompt == null) { - return OptionalNullable.absent(); - } - return prompt; - } - - /** - * @return Name of the screen to filter by - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("screen") - public OptionalNullable getScreen() { - if (screen == null) { - return OptionalNullable.absent(); - } - return screen; - } - - /** - * @return Rendering mode to filter by - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("rendering_mode") - public OptionalNullable getRenderingMode() { - if (renderingMode == null) { - return OptionalNullable.absent(); - } - 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("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; - return other instanceof ListAculsRequestParameters && equalTo((ListAculsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListAculsRequestParameters other) { - return fields.equals(other.fields) - && includeFields.equals(other.includeFields) - && page.equals(other.page) - && perPage.equals(other.perPage) - && includeTotals.equals(other.includeTotals) - && prompt.equals(other.prompt) - && screen.equals(other.screen) - && renderingMode.equals(other.renderingMode); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.fields, - this.includeFields, - this.page, - this.perPage, - this.includeTotals, - this.prompt, - this.screen, - this.renderingMode); - } - - @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 fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - private OptionalNullable page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - private OptionalNullable prompt = OptionalNullable.absent(); - - private OptionalNullable screen = OptionalNullable.absent(); - - private OptionalNullable renderingMode = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListAculsRequestParameters other) { - fields(other.getFields()); - includeFields(other.getIncludeFields()); - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - prompt(other.getPrompt()); - screen(other.getScreen()); - renderingMode(other.getRenderingMode()); - 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 (default: true) or excluded (false).

- */ - @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; - } - - /** - *

Page index of the results to return. First page is 0.

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

Number of results per page. Maximum value is 100, default value is 50.

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

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

- */ - @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(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; - } - - /** - *

Name of the prompt to filter by

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

Name of the screen to filter by

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

Rendering mode to filter by

- */ - @JsonSetter(value = "rendering_mode", nulls = Nulls.SKIP) - public Builder renderingMode(@Nullable OptionalNullable renderingMode) { - this.renderingMode = renderingMode; - return this; - } - - public Builder renderingMode(AculRenderingModeEnum renderingMode) { - this.renderingMode = OptionalNullable.of(renderingMode); - return this; - } - - public Builder renderingMode(Optional renderingMode) { - if (renderingMode.isPresent()) { - this.renderingMode = OptionalNullable.of(renderingMode.get()); - } else { - this.renderingMode = OptionalNullable.absent(); - } - return this; - } - - public Builder renderingMode(com.auth0.client.mgmt.core.Nullable renderingMode) { - if (renderingMode.isNull()) { - this.renderingMode = OptionalNullable.ofNull(); - } else if (renderingMode.isEmpty()) { - this.renderingMode = OptionalNullable.absent(); - } else { - this.renderingMode = OptionalNullable.of(renderingMode.get()); - } - return this; - } - - public ListAculsRequestParameters build() { - return new ListAculsRequestParameters( - fields, - includeFields, - page, - perPage, - includeTotals, - prompt, - screen, - renderingMode, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/prompts/types/UpdateAculRequestContent.java b/src/main/java/com/auth0/client/mgmt/prompts/types/UpdateAculRequestContent.java deleted file mode 100644 index 2e69170a3..000000000 --- a/src/main/java/com/auth0/client/mgmt/prompts/types/UpdateAculRequestContent.java +++ /dev/null @@ -1,346 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.AculContextConfigurationItem; -import com.auth0.client.mgmt.types.AculFilters; -import com.auth0.client.mgmt.types.AculHeadTag; -import com.auth0.client.mgmt.types.AculRenderingModeEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateAculRequestContent.Builder.class) -public final class UpdateAculRequestContent { - private final Optional renderingMode; - - private final Optional> contextConfiguration; - - private final OptionalNullable defaultHeadTagsDisabled; - - private final OptionalNullable usePageTemplate; - - private final Optional> headTags; - - private final OptionalNullable filters; - - private final Map additionalProperties; - - private UpdateAculRequestContent( - Optional renderingMode, - Optional> contextConfiguration, - OptionalNullable defaultHeadTagsDisabled, - OptionalNullable usePageTemplate, - Optional> headTags, - OptionalNullable filters, - Map additionalProperties) { - this.renderingMode = renderingMode; - this.contextConfiguration = contextConfiguration; - this.defaultHeadTagsDisabled = defaultHeadTagsDisabled; - this.usePageTemplate = usePageTemplate; - this.headTags = headTags; - this.filters = filters; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("rendering_mode") - public Optional getRenderingMode() { - return renderingMode; - } - - @JsonProperty("context_configuration") - public Optional> getContextConfiguration() { - return contextConfiguration; - } - - /** - * @return Override Universal Login default head tags - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("default_head_tags_disabled") - public OptionalNullable getDefaultHeadTagsDisabled() { - if (defaultHeadTagsDisabled == null) { - return OptionalNullable.absent(); - } - return defaultHeadTagsDisabled; - } - - /** - * @return Use page template with ACUL - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("use_page_template") - public OptionalNullable getUsePageTemplate() { - if (usePageTemplate == null) { - return OptionalNullable.absent(); - } - return usePageTemplate; - } - - /** - * @return An array of head tags - */ - @JsonProperty("head_tags") - public Optional> getHeadTags() { - return headTags; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("filters") - public OptionalNullable getFilters() { - if (filters == null) { - return OptionalNullable.absent(); - } - return filters; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("default_head_tags_disabled") - private OptionalNullable _getDefaultHeadTagsDisabled() { - return defaultHeadTagsDisabled; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("use_page_template") - private OptionalNullable _getUsePageTemplate() { - return usePageTemplate; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("filters") - private OptionalNullable _getFilters() { - return filters; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateAculRequestContent && equalTo((UpdateAculRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateAculRequestContent other) { - return renderingMode.equals(other.renderingMode) - && contextConfiguration.equals(other.contextConfiguration) - && defaultHeadTagsDisabled.equals(other.defaultHeadTagsDisabled) - && usePageTemplate.equals(other.usePageTemplate) - && headTags.equals(other.headTags) - && filters.equals(other.filters); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.renderingMode, - this.contextConfiguration, - this.defaultHeadTagsDisabled, - this.usePageTemplate, - this.headTags, - this.filters); - } - - @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 renderingMode = Optional.empty(); - - private Optional> contextConfiguration = Optional.empty(); - - private OptionalNullable defaultHeadTagsDisabled = OptionalNullable.absent(); - - private OptionalNullable usePageTemplate = OptionalNullable.absent(); - - private Optional> headTags = Optional.empty(); - - private OptionalNullable filters = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateAculRequestContent other) { - renderingMode(other.getRenderingMode()); - contextConfiguration(other.getContextConfiguration()); - defaultHeadTagsDisabled(other.getDefaultHeadTagsDisabled()); - usePageTemplate(other.getUsePageTemplate()); - headTags(other.getHeadTags()); - filters(other.getFilters()); - return this; - } - - @JsonSetter(value = "rendering_mode", nulls = Nulls.SKIP) - public Builder renderingMode(Optional renderingMode) { - this.renderingMode = renderingMode; - return this; - } - - public Builder renderingMode(AculRenderingModeEnum renderingMode) { - this.renderingMode = Optional.ofNullable(renderingMode); - return this; - } - - @JsonSetter(value = "context_configuration", nulls = Nulls.SKIP) - public Builder contextConfiguration(Optional> contextConfiguration) { - this.contextConfiguration = contextConfiguration; - return this; - } - - public Builder contextConfiguration(List contextConfiguration) { - this.contextConfiguration = Optional.ofNullable(contextConfiguration); - return this; - } - - /** - *

Override Universal Login default head tags

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

Use page template with ACUL

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

An array of head tags

- */ - @JsonSetter(value = "head_tags", nulls = Nulls.SKIP) - public Builder headTags(Optional> headTags) { - this.headTags = headTags; - return this; - } - - public Builder headTags(List headTags) { - this.headTags = Optional.ofNullable(headTags); - return this; - } - - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public Builder filters(@Nullable OptionalNullable filters) { - this.filters = filters; - return this; - } - - public Builder filters(AculFilters filters) { - this.filters = OptionalNullable.of(filters); - return this; - } - - public Builder filters(Optional filters) { - if (filters.isPresent()) { - this.filters = OptionalNullable.of(filters.get()); - } else { - this.filters = OptionalNullable.absent(); - } - return this; - } - - public Builder filters(com.auth0.client.mgmt.core.Nullable filters) { - if (filters.isNull()) { - this.filters = OptionalNullable.ofNull(); - } else if (filters.isEmpty()) { - this.filters = OptionalNullable.absent(); - } else { - this.filters = OptionalNullable.of(filters.get()); - } - return this; - } - - public UpdateAculRequestContent build() { - return new UpdateAculRequestContent( - renderingMode, - contextConfiguration, - defaultHeadTagsDisabled, - usePageTemplate, - headTags, - filters, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/riskassessments/AsyncRawSettingsClient.java b/src/main/java/com/auth0/client/mgmt/riskassessments/AsyncRawSettingsClient.java deleted file mode 100644 index 797e4d1d1..000000000 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/AsyncRawSettingsClient.java +++ /dev/null @@ -1,221 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.riskassessments; - -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.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.riskassessments.types.UpdateRiskAssessmentsSettingsRequestContent; -import com.auth0.client.mgmt.types.GetRiskAssessmentsSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateRiskAssessmentsSettingsResponseContent; -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 AsyncRawSettingsClient { - protected final ClientOptions clientOptions; - - public AsyncRawSettingsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Gets the tenant settings for risk assessments - */ - public CompletableFuture> get() { - return get(null); - } - - /** - * Gets the tenant settings for risk assessments - */ - public CompletableFuture> get( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("risk-assessments/settings") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetRiskAssessmentsSettingsResponseContent.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 (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; - } - - /** - * Updates the tenant settings for risk assessments - */ - public CompletableFuture> update( - UpdateRiskAssessmentsSettingsRequestContent request) { - return update(request, null); - } - - /** - * Updates the tenant settings for risk assessments - */ - public CompletableFuture> update( - UpdateRiskAssessmentsSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("risk-assessments/settings") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateRiskAssessmentsSettingsResponseContent.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 (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/riskassessments/AsyncRiskAssessmentsClient.java b/src/main/java/com/auth0/client/mgmt/riskassessments/AsyncRiskAssessmentsClient.java deleted file mode 100644 index de56f77e3..000000000 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/AsyncRiskAssessmentsClient.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.riskassessments; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class AsyncRiskAssessmentsClient { - protected final ClientOptions clientOptions; - - protected final Supplier settingsClient; - - public AsyncRiskAssessmentsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.settingsClient = Suppliers.memoize(() -> new AsyncSettingsClient(clientOptions)); - } - - public AsyncSettingsClient settings() { - return this.settingsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/riskassessments/AsyncSettingsClient.java b/src/main/java/com/auth0/client/mgmt/riskassessments/AsyncSettingsClient.java deleted file mode 100644 index 44d88da20..000000000 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/AsyncSettingsClient.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.riskassessments; - -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.riskassessments.settings.AsyncNewDeviceClient; -import com.auth0.client.mgmt.riskassessments.types.UpdateRiskAssessmentsSettingsRequestContent; -import com.auth0.client.mgmt.types.GetRiskAssessmentsSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateRiskAssessmentsSettingsResponseContent; -import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; - -public class AsyncSettingsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawSettingsClient rawClient; - - protected final Supplier newDeviceClient; - - public AsyncSettingsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawSettingsClient(clientOptions); - this.newDeviceClient = Suppliers.memoize(() -> new AsyncNewDeviceClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawSettingsClient withRawResponse() { - return this.rawClient; - } - - /** - * Gets the tenant settings for risk assessments - */ - public CompletableFuture get() { - return this.rawClient.get().thenApply(response -> response.body()); - } - - /** - * Gets the tenant settings for risk assessments - */ - public CompletableFuture get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).thenApply(response -> response.body()); - } - - /** - * Updates the tenant settings for risk assessments - */ - public CompletableFuture update( - UpdateRiskAssessmentsSettingsRequestContent request) { - return this.rawClient.update(request).thenApply(response -> response.body()); - } - - /** - * Updates the tenant settings for risk assessments - */ - public CompletableFuture update( - UpdateRiskAssessmentsSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).thenApply(response -> response.body()); - } - - public AsyncNewDeviceClient newDevice() { - return this.newDeviceClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/riskassessments/RawSettingsClient.java b/src/main/java/com/auth0/client/mgmt/riskassessments/RawSettingsClient.java deleted file mode 100644 index 93b37248c..000000000 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/RawSettingsClient.java +++ /dev/null @@ -1,170 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.riskassessments; - -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.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.riskassessments.types.UpdateRiskAssessmentsSettingsRequestContent; -import com.auth0.client.mgmt.types.GetRiskAssessmentsSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateRiskAssessmentsSettingsResponseContent; -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 RawSettingsClient { - protected final ClientOptions clientOptions; - - public RawSettingsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Gets the tenant settings for risk assessments - */ - public ManagementApiHttpResponse get() { - return get(null); - } - - /** - * Gets the tenant settings for risk assessments - */ - public ManagementApiHttpResponse get(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("risk-assessments/settings") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetRiskAssessmentsSettingsResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Updates the tenant settings for risk assessments - */ - public ManagementApiHttpResponse update( - UpdateRiskAssessmentsSettingsRequestContent request) { - return update(request, null); - } - - /** - * Updates the tenant settings for risk assessments - */ - public ManagementApiHttpResponse update( - UpdateRiskAssessmentsSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("risk-assessments/settings") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateRiskAssessmentsSettingsResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/riskassessments/RiskAssessmentsClient.java b/src/main/java/com/auth0/client/mgmt/riskassessments/RiskAssessmentsClient.java deleted file mode 100644 index 74ad58fb2..000000000 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/RiskAssessmentsClient.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.riskassessments; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class RiskAssessmentsClient { - protected final ClientOptions clientOptions; - - protected final Supplier settingsClient; - - public RiskAssessmentsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.settingsClient = Suppliers.memoize(() -> new SettingsClient(clientOptions)); - } - - public SettingsClient settings() { - return this.settingsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/riskassessments/SettingsClient.java b/src/main/java/com/auth0/client/mgmt/riskassessments/SettingsClient.java deleted file mode 100644 index be5bd1855..000000000 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/SettingsClient.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.riskassessments; - -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.riskassessments.settings.NewDeviceClient; -import com.auth0.client.mgmt.riskassessments.types.UpdateRiskAssessmentsSettingsRequestContent; -import com.auth0.client.mgmt.types.GetRiskAssessmentsSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateRiskAssessmentsSettingsResponseContent; -import java.util.function.Supplier; - -public class SettingsClient { - protected final ClientOptions clientOptions; - - private final RawSettingsClient rawClient; - - protected final Supplier newDeviceClient; - - public SettingsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawSettingsClient(clientOptions); - this.newDeviceClient = Suppliers.memoize(() -> new NewDeviceClient(clientOptions)); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawSettingsClient withRawResponse() { - return this.rawClient; - } - - /** - * Gets the tenant settings for risk assessments - */ - public GetRiskAssessmentsSettingsResponseContent get() { - return this.rawClient.get().body(); - } - - /** - * Gets the tenant settings for risk assessments - */ - public GetRiskAssessmentsSettingsResponseContent get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).body(); - } - - /** - * Updates the tenant settings for risk assessments - */ - public UpdateRiskAssessmentsSettingsResponseContent update(UpdateRiskAssessmentsSettingsRequestContent request) { - return this.rawClient.update(request).body(); - } - - /** - * Updates the tenant settings for risk assessments - */ - public UpdateRiskAssessmentsSettingsResponseContent update( - UpdateRiskAssessmentsSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).body(); - } - - public NewDeviceClient newDevice() { - return this.newDeviceClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/riskassessments/settings/AsyncNewDeviceClient.java b/src/main/java/com/auth0/client/mgmt/riskassessments/settings/AsyncNewDeviceClient.java deleted file mode 100644 index ef55537f0..000000000 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/settings/AsyncNewDeviceClient.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.riskassessments.settings; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.riskassessments.settings.types.UpdateRiskAssessmentsSettingsNewDeviceRequestContent; -import com.auth0.client.mgmt.types.GetRiskAssessmentsSettingsNewDeviceResponseContent; -import com.auth0.client.mgmt.types.UpdateRiskAssessmentsSettingsNewDeviceResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncNewDeviceClient { - protected final ClientOptions clientOptions; - - private final AsyncRawNewDeviceClient rawClient; - - public AsyncNewDeviceClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawNewDeviceClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawNewDeviceClient withRawResponse() { - return this.rawClient; - } - - /** - * Gets the risk assessment settings for the new device assessor - */ - public CompletableFuture get() { - return this.rawClient.get().thenApply(response -> response.body()); - } - - /** - * Gets the risk assessment settings for the new device assessor - */ - public CompletableFuture get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).thenApply(response -> response.body()); - } - - /** - * Updates the risk assessment settings for the new device assessor - */ - public CompletableFuture update( - UpdateRiskAssessmentsSettingsNewDeviceRequestContent request) { - return this.rawClient.update(request).thenApply(response -> response.body()); - } - - /** - * Updates the risk assessment settings for the new device assessor - */ - public CompletableFuture update( - UpdateRiskAssessmentsSettingsNewDeviceRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).thenApply(response -> response.body()); - } -} 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 deleted file mode 100644 index 0d031ad39..000000000 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/settings/AsyncRawNewDeviceClient.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.riskassessments.settings; - -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.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.riskassessments.settings.types.UpdateRiskAssessmentsSettingsNewDeviceRequestContent; -import com.auth0.client.mgmt.types.GetRiskAssessmentsSettingsNewDeviceResponseContent; -import com.auth0.client.mgmt.types.UpdateRiskAssessmentsSettingsNewDeviceResponseContent; -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 AsyncRawNewDeviceClient { - protected final ClientOptions clientOptions; - - public AsyncRawNewDeviceClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Gets the risk assessment settings for the new device assessor - */ - public CompletableFuture> get() { - return get(null); - } - - /** - * Gets the risk assessment settings for the new device assessor - */ - public CompletableFuture> get( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("risk-assessments/settings/new-device") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetRiskAssessmentsSettingsNewDeviceResponseContent.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 (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; - } - - /** - * Updates the risk assessment settings for the new device assessor - */ - public CompletableFuture> update( - UpdateRiskAssessmentsSettingsNewDeviceRequestContent request) { - return update(request, null); - } - - /** - * Updates the risk assessment settings for the new device assessor - */ - public CompletableFuture> update( - UpdateRiskAssessmentsSettingsNewDeviceRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("risk-assessments/settings/new-device") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, - UpdateRiskAssessmentsSettingsNewDeviceResponseContent.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 (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/riskassessments/settings/NewDeviceClient.java b/src/main/java/com/auth0/client/mgmt/riskassessments/settings/NewDeviceClient.java deleted file mode 100644 index 15a94842a..000000000 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/settings/NewDeviceClient.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.riskassessments.settings; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.riskassessments.settings.types.UpdateRiskAssessmentsSettingsNewDeviceRequestContent; -import com.auth0.client.mgmt.types.GetRiskAssessmentsSettingsNewDeviceResponseContent; -import com.auth0.client.mgmt.types.UpdateRiskAssessmentsSettingsNewDeviceResponseContent; - -public class NewDeviceClient { - protected final ClientOptions clientOptions; - - private final RawNewDeviceClient rawClient; - - public NewDeviceClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawNewDeviceClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawNewDeviceClient withRawResponse() { - return this.rawClient; - } - - /** - * Gets the risk assessment settings for the new device assessor - */ - public GetRiskAssessmentsSettingsNewDeviceResponseContent get() { - return this.rawClient.get().body(); - } - - /** - * Gets the risk assessment settings for the new device assessor - */ - public GetRiskAssessmentsSettingsNewDeviceResponseContent get(RequestOptions requestOptions) { - return this.rawClient.get(requestOptions).body(); - } - - /** - * Updates the risk assessment settings for the new device assessor - */ - public UpdateRiskAssessmentsSettingsNewDeviceResponseContent update( - UpdateRiskAssessmentsSettingsNewDeviceRequestContent request) { - return this.rawClient.update(request).body(); - } - - /** - * Updates the risk assessment settings for the new device assessor - */ - public UpdateRiskAssessmentsSettingsNewDeviceResponseContent update( - UpdateRiskAssessmentsSettingsNewDeviceRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).body(); - } -} 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 deleted file mode 100644 index 424ea00c1..000000000 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/settings/RawNewDeviceClient.java +++ /dev/null @@ -1,171 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.riskassessments.settings; - -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.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.riskassessments.settings.types.UpdateRiskAssessmentsSettingsNewDeviceRequestContent; -import com.auth0.client.mgmt.types.GetRiskAssessmentsSettingsNewDeviceResponseContent; -import com.auth0.client.mgmt.types.UpdateRiskAssessmentsSettingsNewDeviceResponseContent; -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 RawNewDeviceClient { - protected final ClientOptions clientOptions; - - public RawNewDeviceClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Gets the risk assessment settings for the new device assessor - */ - public ManagementApiHttpResponse get() { - return get(null); - } - - /** - * Gets the risk assessment settings for the new device assessor - */ - public ManagementApiHttpResponse get( - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("risk-assessments/settings/new-device") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetRiskAssessmentsSettingsNewDeviceResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Updates the risk assessment settings for the new device assessor - */ - public ManagementApiHttpResponse update( - UpdateRiskAssessmentsSettingsNewDeviceRequestContent request) { - return update(request, null); - } - - /** - * Updates the risk assessment settings for the new device assessor - */ - public ManagementApiHttpResponse update( - UpdateRiskAssessmentsSettingsNewDeviceRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("risk-assessments/settings/new-device") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateRiskAssessmentsSettingsNewDeviceResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/riskassessments/settings/types/UpdateRiskAssessmentsSettingsNewDeviceRequestContent.java b/src/main/java/com/auth0/client/mgmt/riskassessments/settings/types/UpdateRiskAssessmentsSettingsNewDeviceRequestContent.java deleted file mode 100644 index 36fa76082..000000000 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/settings/types/UpdateRiskAssessmentsSettingsNewDeviceRequestContent.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.riskassessments.settings.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = UpdateRiskAssessmentsSettingsNewDeviceRequestContent.Builder.class) -public final class UpdateRiskAssessmentsSettingsNewDeviceRequestContent { - private final int rememberFor; - - private final Map additionalProperties; - - private UpdateRiskAssessmentsSettingsNewDeviceRequestContent( - int rememberFor, Map additionalProperties) { - this.rememberFor = rememberFor; - this.additionalProperties = additionalProperties; - } - - /** - * @return Length of time to remember devices for, in days. - */ - @JsonProperty("remember_for") - public int getRememberFor() { - return rememberFor; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateRiskAssessmentsSettingsNewDeviceRequestContent - && equalTo((UpdateRiskAssessmentsSettingsNewDeviceRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateRiskAssessmentsSettingsNewDeviceRequestContent other) { - return rememberFor == other.rememberFor; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.rememberFor); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static RememberForStage builder() { - return new Builder(); - } - - public interface RememberForStage { - /** - *

Length of time to remember devices for, in days.

- */ - _FinalStage rememberFor(int rememberFor); - - Builder from(UpdateRiskAssessmentsSettingsNewDeviceRequestContent other); - } - - public interface _FinalStage { - UpdateRiskAssessmentsSettingsNewDeviceRequestContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements RememberForStage, _FinalStage { - private int rememberFor; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateRiskAssessmentsSettingsNewDeviceRequestContent other) { - rememberFor(other.getRememberFor()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("remember_for") - public _FinalStage rememberFor(int rememberFor) { - this.rememberFor = rememberFor; - return this; - } - - @java.lang.Override - public UpdateRiskAssessmentsSettingsNewDeviceRequestContent build() { - return new UpdateRiskAssessmentsSettingsNewDeviceRequestContent(rememberFor, additionalProperties); - } - } -} 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 deleted file mode 100644 index 4a2aa240f..000000000 --- a/src/main/java/com/auth0/client/mgmt/riskassessments/types/UpdateRiskAssessmentsSettingsRequestContent.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.riskassessments.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = UpdateRiskAssessmentsSettingsRequestContent.Builder.class) -public final class UpdateRiskAssessmentsSettingsRequestContent { - private final boolean enabled; - - private final Map additionalProperties; - - private UpdateRiskAssessmentsSettingsRequestContent(boolean enabled, Map additionalProperties) { - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether or not risk assessment is enabled. - */ - @JsonProperty("enabled") - public boolean getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateRiskAssessmentsSettingsRequestContent - && equalTo((UpdateRiskAssessmentsSettingsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateRiskAssessmentsSettingsRequestContent other) { - return enabled == other.enabled; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EnabledStage builder() { - return new Builder(); - } - - public interface EnabledStage { - /** - *

Whether or not risk assessment is enabled.

- */ - _FinalStage enabled(boolean enabled); - - Builder from(UpdateRiskAssessmentsSettingsRequestContent other); - } - - public interface _FinalStage { - UpdateRiskAssessmentsSettingsRequestContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EnabledStage, _FinalStage { - private boolean enabled; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateRiskAssessmentsSettingsRequestContent other) { - enabled(other.getEnabled()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("enabled") - public _FinalStage enabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - @java.lang.Override - public UpdateRiskAssessmentsSettingsRequestContent build() { - return new UpdateRiskAssessmentsSettingsRequestContent(enabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/roles/AsyncPermissionsClient.java b/src/main/java/com/auth0/client/mgmt/roles/AsyncPermissionsClient.java deleted file mode 100644 index 4c9bbab90..000000000 --- a/src/main/java/com/auth0/client/mgmt/roles/AsyncPermissionsClient.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.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.roles.types.AddRolePermissionsRequestContent; -import com.auth0.client.mgmt.roles.types.DeleteRolePermissionsRequestContent; -import com.auth0.client.mgmt.roles.types.ListRolePermissionsRequestParameters; -import com.auth0.client.mgmt.types.PermissionsResponsePayload; -import java.util.concurrent.CompletableFuture; - -public class AsyncPermissionsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawPermissionsClient rawClient; - - public AsyncPermissionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawPermissionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawPermissionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve detailed list (name, description, resource server) of permissions granted by a specified user role. - */ - public CompletableFuture> list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - /** - * Retrieve detailed list (name, description, resource server) of permissions granted by a specified user role. - */ - public CompletableFuture> list( - String id, ListRolePermissionsRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve detailed list (name, description, resource server) of permissions granted by a specified user role. - */ - public CompletableFuture> list( - String id, ListRolePermissionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Add one or more <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/manage-permissions">permissions</a> to a specified user role. - */ - public CompletableFuture add(String id, AddRolePermissionsRequestContent request) { - return this.rawClient.add(id, request).thenApply(response -> response.body()); - } - - /** - * Add one or more <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/manage-permissions">permissions</a> to a specified user role. - */ - public CompletableFuture add( - String id, AddRolePermissionsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.add(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Remove one or more <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/manage-permissions">permissions</a> from a specified user role. - */ - public CompletableFuture delete(String id, DeleteRolePermissionsRequestContent request) { - return this.rawClient.delete(id, request).thenApply(response -> response.body()); - } - - /** - * Remove one or more <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/manage-permissions">permissions</a> from a specified user role. - */ - public CompletableFuture delete( - String id, DeleteRolePermissionsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.delete(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/roles/AsyncRawPermissionsClient.java b/src/main/java/com/auth0/client/mgmt/roles/AsyncRawPermissionsClient.java deleted file mode 100644 index f3c28c499..000000000 --- a/src/main/java/com/auth0/client/mgmt/roles/AsyncRawPermissionsClient.java +++ /dev/null @@ -1,350 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.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.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.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.roles.types.AddRolePermissionsRequestContent; -import com.auth0.client.mgmt.roles.types.DeleteRolePermissionsRequestContent; -import com.auth0.client.mgmt.roles.types.ListRolePermissionsRequestParameters; -import com.auth0.client.mgmt.types.ListRolePermissionsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.PermissionsResponsePayload; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawPermissionsClient { - protected final ClientOptions clientOptions; - - public AsyncRawPermissionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve detailed list (name, description, resource server) of permissions granted by a specified user role. - */ - public CompletableFuture>> list( - String id) { - return list(id, ListRolePermissionsRequestParameters.builder().build()); - } - - /** - * Retrieve detailed list (name, description, resource server) of permissions granted by a specified user role. - */ - public CompletableFuture>> list( - String id, ListRolePermissionsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve detailed list (name, description, resource server) of permissions granted by a specified user role. - */ - public CompletableFuture>> list( - String id, ListRolePermissionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .addPathSegment(id) - .addPathSegments("permissions"); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - 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()) { - ListRolePermissionsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListRolePermissionsOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListRolePermissionsRequestParameters nextRequest = - ListRolePermissionsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getPermissions().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 (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 one or more <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/manage-permissions">permissions</a> to a specified user role. - */ - public CompletableFuture> add(String id, AddRolePermissionsRequestContent request) { - return add(id, request, null); - } - - /** - * Add one or more <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/manage-permissions">permissions</a> to a specified user role. - */ - public CompletableFuture> add( - String id, AddRolePermissionsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .addPathSegment(id) - .addPathSegments("permissions") - .build(); - 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) - .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); - } - 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 (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 <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/manage-permissions">permissions</a> from a specified user role. - */ - public CompletableFuture> delete( - String id, DeleteRolePermissionsRequestContent request) { - return delete(id, request, null); - } - - /** - * Remove one or more <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/manage-permissions">permissions</a> from a specified user role. - */ - public CompletableFuture> delete( - String id, DeleteRolePermissionsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .addPathSegment(id) - .addPathSegments("permissions") - .build(); - 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) - .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); - } - 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 (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/roles/AsyncRawUsersClient.java b/src/main/java/com/auth0/client/mgmt/roles/AsyncRawUsersClient.java deleted file mode 100644 index b8332b3df..000000000 --- a/src/main/java/com/auth0/client/mgmt/roles/AsyncRawUsersClient.java +++ /dev/null @@ -1,300 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.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.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.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.roles.types.AssignRoleUsersRequestContent; -import com.auth0.client.mgmt.roles.types.ListRoleUsersRequestParameters; -import com.auth0.client.mgmt.types.ListRoleUsersPaginatedResponseContent; -import com.auth0.client.mgmt.types.RoleUser; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawUsersClient { - protected final ClientOptions clientOptions; - - public AsyncRawUsersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve list of users associated with a specific role. For Dashboard instructions, review <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/roles/view-users-assigned-to-roles">View Users Assigned to Roles</a>. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture>> list(String id) { - return list(id, ListRoleUsersRequestParameters.builder().build()); - } - - /** - * Retrieve list of users associated with a specific role. For Dashboard instructions, review <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/roles/view-users-assigned-to-roles">View Users Assigned to Roles</a>. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture>> list( - String id, ListRoleUsersRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve list of users associated with a specific role. For Dashboard instructions, review <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/roles/view-users-assigned-to-roles">View Users Assigned to Roles</a>. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture>> list( - String id, ListRoleUsersRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .addPathSegment(id) - .addPathSegments("users"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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()) { - ListRoleUsersPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListRoleUsersPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListRoleUsersRequestParameters nextRequest = ListRoleUsersRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getUsers().orElse(Collections.emptyList()); - 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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Assign one or more users to an existing user role. To learn more, review <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles cannot be created through this action.

- */ - public CompletableFuture> assign(String id, AssignRoleUsersRequestContent request) { - return assign(id, request, null); - } - - /** - * Assign one or more users to an existing user role. To learn more, review <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles cannot be created through this action.

- */ - public CompletableFuture> assign( - String id, AssignRoleUsersRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .addPathSegment(id) - .addPathSegments("users") - .build(); - 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) - .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); - } - 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 (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/roles/AsyncUsersClient.java b/src/main/java/com/auth0/client/mgmt/roles/AsyncUsersClient.java deleted file mode 100644 index 4e55dcd99..000000000 --- a/src/main/java/com/auth0/client/mgmt/roles/AsyncUsersClient.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.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.roles.types.AssignRoleUsersRequestContent; -import com.auth0.client.mgmt.roles.types.ListRoleUsersRequestParameters; -import com.auth0.client.mgmt.types.RoleUser; -import java.util.concurrent.CompletableFuture; - -public class AsyncUsersClient { - protected final ClientOptions clientOptions; - - private final AsyncRawUsersClient rawClient; - - public AsyncUsersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawUsersClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawUsersClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve list of users associated with a specific role. For Dashboard instructions, review <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/roles/view-users-assigned-to-roles">View Users Assigned to Roles</a>. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> 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()); - } - - /** - * Retrieve list of users associated with a specific role. For Dashboard instructions, review <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/roles/view-users-assigned-to-roles">View Users Assigned to Roles</a>. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture> list(String id, ListRoleUsersRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve list of users associated with a specific role. For Dashboard instructions, review <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/roles/view-users-assigned-to-roles">View Users Assigned to Roles</a>. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public CompletableFuture> list( - String id, ListRoleUsersRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Assign one or more users to an existing user role. To learn more, review <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles cannot be created through this action.

- */ - public CompletableFuture assign(String id, AssignRoleUsersRequestContent request) { - return this.rawClient.assign(id, request).thenApply(response -> response.body()); - } - - /** - * Assign one or more users to an existing user role. To learn more, review <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles cannot be created through this action.

- */ - public CompletableFuture assign( - String id, AssignRoleUsersRequestContent request, RequestOptions requestOptions) { - return this.rawClient.assign(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/roles/PermissionsClient.java b/src/main/java/com/auth0/client/mgmt/roles/PermissionsClient.java deleted file mode 100644 index 760e9b771..000000000 --- a/src/main/java/com/auth0/client/mgmt/roles/PermissionsClient.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.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.roles.types.AddRolePermissionsRequestContent; -import com.auth0.client.mgmt.roles.types.DeleteRolePermissionsRequestContent; -import com.auth0.client.mgmt.roles.types.ListRolePermissionsRequestParameters; -import com.auth0.client.mgmt.types.PermissionsResponsePayload; - -public class PermissionsClient { - protected final ClientOptions clientOptions; - - private final RawPermissionsClient rawClient; - - public PermissionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawPermissionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawPermissionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve detailed list (name, description, resource server) of permissions granted by a specified user role. - */ - public SyncPagingIterable list(String id) { - return this.rawClient.list(id).body(); - } - - /** - * Retrieve detailed list (name, description, resource server) of permissions granted by a specified user role. - */ - public SyncPagingIterable list( - String id, ListRolePermissionsRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - /** - * Retrieve detailed list (name, description, resource server) of permissions granted by a specified user role. - */ - public SyncPagingIterable list( - String id, ListRolePermissionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } - - /** - * Add one or more <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/manage-permissions">permissions</a> to a specified user role. - */ - public void add(String id, AddRolePermissionsRequestContent request) { - this.rawClient.add(id, request).body(); - } - - /** - * Add one or more <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/manage-permissions">permissions</a> to a specified user role. - */ - public void add(String id, AddRolePermissionsRequestContent request, RequestOptions requestOptions) { - this.rawClient.add(id, request, requestOptions).body(); - } - - /** - * Remove one or more <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/manage-permissions">permissions</a> from a specified user role. - */ - public void delete(String id, DeleteRolePermissionsRequestContent request) { - this.rawClient.delete(id, request).body(); - } - - /** - * Remove one or more <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/manage-permissions">permissions</a> from a specified user role. - */ - public void delete(String id, DeleteRolePermissionsRequestContent request, RequestOptions requestOptions) { - this.rawClient.delete(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/roles/RawPermissionsClient.java b/src/main/java/com/auth0/client/mgmt/roles/RawPermissionsClient.java deleted file mode 100644 index 575516b6f..000000000 --- a/src/main/java/com/auth0/client/mgmt/roles/RawPermissionsClient.java +++ /dev/null @@ -1,268 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.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.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.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.roles.types.AddRolePermissionsRequestContent; -import com.auth0.client.mgmt.roles.types.DeleteRolePermissionsRequestContent; -import com.auth0.client.mgmt.roles.types.ListRolePermissionsRequestParameters; -import com.auth0.client.mgmt.types.ListRolePermissionsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.PermissionsResponsePayload; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawPermissionsClient { - protected final ClientOptions clientOptions; - - public RawPermissionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve detailed list (name, description, resource server) of permissions granted by a specified user role. - */ - public ManagementApiHttpResponse> list(String id) { - return list(id, ListRolePermissionsRequestParameters.builder().build()); - } - - /** - * Retrieve detailed list (name, description, resource server) of permissions granted by a specified user role. - */ - public ManagementApiHttpResponse> list( - String id, ListRolePermissionsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve detailed list (name, description, resource server) of permissions granted by a specified user role. - */ - public ManagementApiHttpResponse> list( - String id, ListRolePermissionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .addPathSegment(id) - .addPathSegments("permissions"); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListRolePermissionsOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListRolePermissionsOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListRolePermissionsRequestParameters nextRequest = ListRolePermissionsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getPermissions().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Add one or more <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/manage-permissions">permissions</a> to a specified user role. - */ - public ManagementApiHttpResponse add(String id, AddRolePermissionsRequestContent request) { - return add(id, request, null); - } - - /** - * Add one or more <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/manage-permissions">permissions</a> to a specified user role. - */ - public ManagementApiHttpResponse add( - String id, AddRolePermissionsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .addPathSegment(id) - .addPathSegments("permissions") - .build(); - 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) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Remove one or more <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/manage-permissions">permissions</a> from a specified user role. - */ - public ManagementApiHttpResponse delete(String id, DeleteRolePermissionsRequestContent request) { - return delete(id, request, null); - } - - /** - * Remove one or more <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/manage-permissions">permissions</a> from a specified user role. - */ - public ManagementApiHttpResponse delete( - String id, DeleteRolePermissionsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .addPathSegment(id) - .addPathSegments("permissions") - .build(); - 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) - .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); - } - 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 (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 deleted file mode 100644 index df0d01767..000000000 --- a/src/main/java/com/auth0/client/mgmt/roles/RawUsersClient.java +++ /dev/null @@ -1,242 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.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.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.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.roles.types.AssignRoleUsersRequestContent; -import com.auth0.client.mgmt.roles.types.ListRoleUsersRequestParameters; -import com.auth0.client.mgmt.types.ListRoleUsersPaginatedResponseContent; -import com.auth0.client.mgmt.types.RoleUser; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawUsersClient { - protected final ClientOptions clientOptions; - - public RawUsersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve list of users associated with a specific role. For Dashboard instructions, review <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/roles/view-users-assigned-to-roles">View Users Assigned to Roles</a>. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public ManagementApiHttpResponse> list(String id) { - return list(id, ListRoleUsersRequestParameters.builder().build()); - } - - /** - * Retrieve list of users associated with a specific role. For Dashboard instructions, review <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/roles/view-users-assigned-to-roles">View Users Assigned to Roles</a>. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public ManagementApiHttpResponse> list( - String id, ListRoleUsersRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve list of users associated with a specific role. For Dashboard instructions, review <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/roles/view-users-assigned-to-roles">View Users Assigned to Roles</a>. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public ManagementApiHttpResponse> list( - String id, ListRoleUsersRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .addPathSegment(id) - .addPathSegments("users"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListRoleUsersPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListRoleUsersPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListRoleUsersRequestParameters nextRequest = ListRoleUsersRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getUsers().orElse(Collections.emptyList()); - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Assign one or more users to an existing user role. To learn more, review <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles cannot be created through this action.

- */ - public ManagementApiHttpResponse assign(String id, AssignRoleUsersRequestContent request) { - return assign(id, request, null); - } - - /** - * Assign one or more users to an existing user role. To learn more, review <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles cannot be created through this action.

- */ - public ManagementApiHttpResponse assign( - String id, AssignRoleUsersRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("roles") - .addPathSegment(id) - .addPathSegments("users") - .build(); - 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) - .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); - } - 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 (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 deleted file mode 100644 index ef6849e83..000000000 --- a/src/main/java/com/auth0/client/mgmt/roles/UsersClient.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.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.roles.types.AssignRoleUsersRequestContent; -import com.auth0.client.mgmt.roles.types.ListRoleUsersRequestParameters; -import com.auth0.client.mgmt.types.RoleUser; - -public class UsersClient { - protected final ClientOptions clientOptions; - - private final RawUsersClient rawClient; - - public UsersClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawUsersClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawUsersClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve list of users associated with a specific role. For Dashboard instructions, review <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/roles/view-users-assigned-to-roles">View Users Assigned to Roles</a>. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public SyncPagingIterable list(String id) { - return this.rawClient.list(id).body(); - } - - /** - * Retrieve list of users associated with a specific role. For Dashboard instructions, review <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/roles/view-users-assigned-to-roles">View Users Assigned to Roles</a>. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public SyncPagingIterable list(String id, ListRoleUsersRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - /** - * Retrieve list of users associated with a specific role. For Dashboard instructions, review <a href="https://auth0.com/docs/manage-users/access-control/configure-core-rbac/roles/view-users-assigned-to-roles">View Users Assigned to Roles</a>. - *

This endpoint supports two types of pagination:

- *

<ul> - * <li>Offset pagination</li> - * <li>Checkpoint pagination</li> - * </ul>

- *

Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.

- *

<h2>Checkpoint Pagination</h2>

- *

To search by checkpoint, use the following parameters:

- *

<ul> - * <li><code>from</code>: Optional id from which to start selection.</li> - * <li><code>take</code>: The total amount of entries to retrieve when using the from parameter. Defaults to 50.</li> - * </ul>

- *

<b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.

- */ - public SyncPagingIterable list( - String id, ListRoleUsersRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } - - /** - * Assign one or more users to an existing user role. To learn more, review <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles cannot be created through this action.

- */ - public void assign(String id, AssignRoleUsersRequestContent request) { - this.rawClient.assign(id, request).body(); - } - - /** - * Assign one or more users to an existing user role. To learn more, review <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles cannot be created through this action.

- */ - public void assign(String id, AssignRoleUsersRequestContent request, RequestOptions requestOptions) { - this.rawClient.assign(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/roles/types/AddRolePermissionsRequestContent.java b/src/main/java/com/auth0/client/mgmt/roles/types/AddRolePermissionsRequestContent.java deleted file mode 100644 index f8856de96..000000000 --- a/src/main/java/com/auth0/client/mgmt/roles/types/AddRolePermissionsRequestContent.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.roles.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.PermissionRequestPayload; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = AddRolePermissionsRequestContent.Builder.class) -public final class AddRolePermissionsRequestContent { - private final List permissions; - - private final Map additionalProperties; - - private AddRolePermissionsRequestContent( - List permissions, Map additionalProperties) { - this.permissions = permissions; - this.additionalProperties = additionalProperties; - } - - /** - * @return array of resource_server_identifier, permission_name pairs. - */ - @JsonProperty("permissions") - public List getPermissions() { - return permissions; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AddRolePermissionsRequestContent && equalTo((AddRolePermissionsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AddRolePermissionsRequestContent other) { - return permissions.equals(other.permissions); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.permissions); - } - - @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 permissions = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AddRolePermissionsRequestContent other) { - permissions(other.getPermissions()); - return this; - } - - /** - *

array of resource_server_identifier, permission_name pairs.

- */ - @JsonSetter(value = "permissions", nulls = Nulls.SKIP) - public Builder permissions(List permissions) { - this.permissions.clear(); - if (permissions != null) { - this.permissions.addAll(permissions); - } - return this; - } - - public Builder addPermissions(PermissionRequestPayload permissions) { - this.permissions.add(permissions); - return this; - } - - public Builder addAllPermissions(List permissions) { - if (permissions != null) { - this.permissions.addAll(permissions); - } - return this; - } - - public AddRolePermissionsRequestContent build() { - return new AddRolePermissionsRequestContent(permissions, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/roles/types/AssignRoleUsersRequestContent.java b/src/main/java/com/auth0/client/mgmt/roles/types/AssignRoleUsersRequestContent.java deleted file mode 100644 index c91daef11..000000000 --- a/src/main/java/com/auth0/client/mgmt/roles/types/AssignRoleUsersRequestContent.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.roles.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = AssignRoleUsersRequestContent.Builder.class) -public final class AssignRoleUsersRequestContent { - private final List users; - - private final Map additionalProperties; - - private AssignRoleUsersRequestContent(List users, Map additionalProperties) { - this.users = users; - this.additionalProperties = additionalProperties; - } - - /** - * @return user_id's of the users to assign the role to. - */ - @JsonProperty("users") - public List getUsers() { - return users; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AssignRoleUsersRequestContent && equalTo((AssignRoleUsersRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AssignRoleUsersRequestContent other) { - return users.equals(other.users); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.users); - } - - @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 users = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AssignRoleUsersRequestContent other) { - users(other.getUsers()); - return this; - } - - /** - *

user_id's of the users to assign the role to.

- */ - @JsonSetter(value = "users", nulls = Nulls.SKIP) - public Builder users(List users) { - this.users.clear(); - if (users != null) { - this.users.addAll(users); - } - return this; - } - - public Builder addUsers(String users) { - this.users.add(users); - return this; - } - - public Builder addAllUsers(List users) { - if (users != null) { - this.users.addAll(users); - } - return this; - } - - public AssignRoleUsersRequestContent build() { - return new AssignRoleUsersRequestContent(users, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/roles/types/DeleteRolePermissionsRequestContent.java b/src/main/java/com/auth0/client/mgmt/roles/types/DeleteRolePermissionsRequestContent.java deleted file mode 100644 index c611cacf3..000000000 --- a/src/main/java/com/auth0/client/mgmt/roles/types/DeleteRolePermissionsRequestContent.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.roles.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.PermissionRequestPayload; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = DeleteRolePermissionsRequestContent.Builder.class) -public final class DeleteRolePermissionsRequestContent { - private final List permissions; - - private final Map additionalProperties; - - private DeleteRolePermissionsRequestContent( - List permissions, Map additionalProperties) { - this.permissions = permissions; - this.additionalProperties = additionalProperties; - } - - /** - * @return array of resource_server_identifier, permission_name pairs. - */ - @JsonProperty("permissions") - public List getPermissions() { - return permissions; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DeleteRolePermissionsRequestContent - && equalTo((DeleteRolePermissionsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DeleteRolePermissionsRequestContent other) { - return permissions.equals(other.permissions); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.permissions); - } - - @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 permissions = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(DeleteRolePermissionsRequestContent other) { - permissions(other.getPermissions()); - return this; - } - - /** - *

array of resource_server_identifier, permission_name pairs.

- */ - @JsonSetter(value = "permissions", nulls = Nulls.SKIP) - public Builder permissions(List permissions) { - this.permissions.clear(); - if (permissions != null) { - this.permissions.addAll(permissions); - } - return this; - } - - public Builder addPermissions(PermissionRequestPayload permissions) { - this.permissions.add(permissions); - return this; - } - - public Builder addAllPermissions(List permissions) { - if (permissions != null) { - this.permissions.addAll(permissions); - } - return this; - } - - public DeleteRolePermissionsRequestContent build() { - return new DeleteRolePermissionsRequestContent(permissions, additionalProperties); - } - } -} 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 deleted file mode 100644 index 0f0635376..000000000 --- a/src/main/java/com/auth0/client/mgmt/roles/types/ListRolePermissionsRequestParameters.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.roles.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListRolePermissionsRequestParameters.Builder.class) -public final class ListRolePermissionsRequestParameters { - private final OptionalNullable perPage; - - private final OptionalNullable page; - - private final OptionalNullable includeTotals; - - private final Map additionalProperties; - - private ListRolePermissionsRequestParameters( - OptionalNullable perPage, - OptionalNullable page, - OptionalNullable includeTotals, - Map additionalProperties) { - this.perPage = perPage; - this.page = page; - this.includeTotals = includeTotals; - this.additionalProperties = additionalProperties; - } - - /** - * @return Number of results per page. Defaults to 50. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @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() { - return includeTotals; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListRolePermissionsRequestParameters - && equalTo((ListRolePermissionsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListRolePermissionsRequestParameters other) { - return perPage.equals(other.perPage) && page.equals(other.page) && includeTotals.equals(other.includeTotals); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.perPage, this.page, this.includeTotals); - } - - @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 perPage = OptionalNullable.absent(); - - private OptionalNullable page = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListRolePermissionsRequestParameters other) { - perPage(other.getPerPage()); - page(other.getPage()); - includeTotals(other.getIncludeTotals()); - return this; - } - - /** - *

Number of results per page. Defaults to 50.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - 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(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(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; - } - - public ListRolePermissionsRequestParameters build() { - return new ListRolePermissionsRequestParameters(perPage, page, includeTotals, additionalProperties); - } - } -} 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 deleted file mode 100644 index 15b28d60a..000000000 --- a/src/main/java/com/auth0/client/mgmt/roles/types/ListRoleUsersRequestParameters.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListRoleUsersRequestParameters.Builder.class) -public final class ListRoleUsersRequestParameters { - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private ListRoleUsersRequestParameters( - 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() { - 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; - return other instanceof ListRoleUsersRequestParameters && equalTo((ListRoleUsersRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListRoleUsersRequestParameters 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(ListRoleUsersRequestParameters 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(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 ListRoleUsersRequestParameters build() { - return new ListRoleUsersRequestParameters(from, take, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncCustomTextClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncCustomTextClient.java deleted file mode 100644 index 383ae9e94..000000000 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncCustomTextClient.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.selfserviceprofiles; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.SelfServiceProfileCustomTextLanguageEnum; -import com.auth0.client.mgmt.types.SelfServiceProfileCustomTextPageEnum; -import java.util.Map; -import java.util.concurrent.CompletableFuture; - -public class AsyncCustomTextClient { - protected final ClientOptions clientOptions; - - private final AsyncRawCustomTextClient rawClient; - - public AsyncCustomTextClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawCustomTextClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawCustomTextClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. - */ - public CompletableFuture> list( - String id, SelfServiceProfileCustomTextLanguageEnum language, SelfServiceProfileCustomTextPageEnum page) { - return this.rawClient.list(id, language, page).thenApply(response -> response.body()); - } - - /** - * Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. - */ - public CompletableFuture> list( - String id, - SelfServiceProfileCustomTextLanguageEnum language, - SelfServiceProfileCustomTextPageEnum page, - RequestOptions requestOptions) { - return this.rawClient.list(id, language, page, requestOptions).thenApply(response -> response.body()); - } - - /** - * Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. - */ - public CompletableFuture> set( - String id, - SelfServiceProfileCustomTextLanguageEnum language, - SelfServiceProfileCustomTextPageEnum page, - Map request) { - return this.rawClient.set(id, language, page, request).thenApply(response -> response.body()); - } - - /** - * Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. - */ - public CompletableFuture> set( - String id, - SelfServiceProfileCustomTextLanguageEnum language, - SelfServiceProfileCustomTextPageEnum page, - Map request, - RequestOptions requestOptions) { - return this.rawClient.set(id, language, page, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawCustomTextClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawCustomTextClient.java deleted file mode 100644 index 445774c61..000000000 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawCustomTextClient.java +++ /dev/null @@ -1,233 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.selfserviceprofiles; - -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.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.SelfServiceProfileCustomTextLanguageEnum; -import com.auth0.client.mgmt.types.SelfServiceProfileCustomTextPageEnum; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import java.io.IOException; -import java.util.Map; -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 AsyncRawCustomTextClient { - protected final ClientOptions clientOptions; - - public AsyncRawCustomTextClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. - */ - public CompletableFuture>> list( - String id, SelfServiceProfileCustomTextLanguageEnum language, SelfServiceProfileCustomTextPageEnum page) { - return list(id, language, page, null); - } - - /** - * Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. - */ - public CompletableFuture>> list( - String id, - SelfServiceProfileCustomTextLanguageEnum language, - SelfServiceProfileCustomTextPageEnum page, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles") - .addPathSegment(id) - .addPathSegments("custom-text") - .addPathSegment(language.toString()) - .addPathSegment(page.toString()) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture>> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, new TypeReference>() {}), - 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 (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; - } - - /** - * Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. - */ - public CompletableFuture>> set( - String id, - SelfServiceProfileCustomTextLanguageEnum language, - SelfServiceProfileCustomTextPageEnum page, - Map request) { - return set(id, language, page, request, null); - } - - /** - * Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. - */ - public CompletableFuture>> set( - String id, - SelfServiceProfileCustomTextLanguageEnum language, - SelfServiceProfileCustomTextPageEnum page, - Map request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles") - .addPathSegment(id) - .addPathSegments("custom-text") - .addPathSegment(language.toString()) - .addPathSegment(page.toString()) - .build(); - 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) - .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<>(); - 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 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 (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/selfserviceprofiles/AsyncRawSsoTicketClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawSsoTicketClient.java deleted file mode 100644 index fbcaf4f45..000000000 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncRawSsoTicketClient.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.selfserviceprofiles; - -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.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.selfserviceprofiles.types.CreateSelfServiceProfileSsoTicketRequestContent; -import com.auth0.client.mgmt.types.CreateSelfServiceProfileSsoTicketResponseContent; -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 AsyncRawSsoTicketClient { - protected final ClientOptions clientOptions; - - public AsyncRawSsoTicketClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. - */ - public CompletableFuture> create( - String id) { - return create( - id, CreateSelfServiceProfileSsoTicketRequestContent.builder().build()); - } - - /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. - */ - public CompletableFuture> create( - String id, CreateSelfServiceProfileSsoTicketRequestContent request) { - return create(id, request, null); - } - - /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. - */ - public CompletableFuture> create( - String id, CreateSelfServiceProfileSsoTicketRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles") - .addPathSegment(id) - .addPathSegments("sso-ticket") - .build(); - 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) - .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); - } - 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, CreateSelfServiceProfileSsoTicketResponseContent.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 (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; - } - - /** - * Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. - * Clients should treat these 202 responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. - */ - public CompletableFuture> revoke(String profileId, String id) { - return revoke(profileId, id, null); - } - - /** - * Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. - * Clients should treat these 202 responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. - */ - public CompletableFuture> revoke( - String profileId, String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles") - .addPathSegment(profileId) - .addPathSegments("sso-ticket") - .addPathSegment(id) - .addPathSegments("revoke") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncSsoTicketClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncSsoTicketClient.java deleted file mode 100644 index ddcac596e..000000000 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/AsyncSsoTicketClient.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.selfserviceprofiles; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.selfserviceprofiles.types.CreateSelfServiceProfileSsoTicketRequestContent; -import com.auth0.client.mgmt.types.CreateSelfServiceProfileSsoTicketResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncSsoTicketClient { - protected final ClientOptions clientOptions; - - private final AsyncRawSsoTicketClient rawClient; - - public AsyncSsoTicketClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawSsoTicketClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawSsoTicketClient withRawResponse() { - return this.rawClient; - } - - /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. - */ - public CompletableFuture create(String id) { - return this.rawClient.create(id).thenApply(response -> response.body()); - } - - /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. - */ - public CompletableFuture create( - String id, CreateSelfServiceProfileSsoTicketRequestContent request) { - return this.rawClient.create(id, request).thenApply(response -> response.body()); - } - - /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. - */ - public CompletableFuture create( - String id, CreateSelfServiceProfileSsoTicketRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. - * Clients should treat these 202 responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. - */ - public CompletableFuture revoke(String profileId, String id) { - return this.rawClient.revoke(profileId, id).thenApply(response -> response.body()); - } - - /** - * Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. - * Clients should treat these 202 responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. - */ - public CompletableFuture revoke(String profileId, String id, RequestOptions requestOptions) { - return this.rawClient.revoke(profileId, id, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/CustomTextClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/CustomTextClient.java deleted file mode 100644 index 60683e9d0..000000000 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/CustomTextClient.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.selfserviceprofiles; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.types.SelfServiceProfileCustomTextLanguageEnum; -import com.auth0.client.mgmt.types.SelfServiceProfileCustomTextPageEnum; -import java.util.Map; - -public class CustomTextClient { - protected final ClientOptions clientOptions; - - private final RawCustomTextClient rawClient; - - public CustomTextClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawCustomTextClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawCustomTextClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. - */ - public Map list( - String id, SelfServiceProfileCustomTextLanguageEnum language, SelfServiceProfileCustomTextPageEnum page) { - return this.rawClient.list(id, language, page).body(); - } - - /** - * Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. - */ - public Map list( - String id, - SelfServiceProfileCustomTextLanguageEnum language, - SelfServiceProfileCustomTextPageEnum page, - RequestOptions requestOptions) { - return this.rawClient.list(id, language, page, requestOptions).body(); - } - - /** - * Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. - */ - public Map set( - String id, - SelfServiceProfileCustomTextLanguageEnum language, - SelfServiceProfileCustomTextPageEnum page, - Map request) { - return this.rawClient.set(id, language, page, request).body(); - } - - /** - * Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. - */ - public Map set( - String id, - SelfServiceProfileCustomTextLanguageEnum language, - SelfServiceProfileCustomTextPageEnum page, - Map request, - RequestOptions requestOptions) { - return this.rawClient.set(id, language, page, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawCustomTextClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawCustomTextClient.java deleted file mode 100644 index 72dd8edb4..000000000 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawCustomTextClient.java +++ /dev/null @@ -1,187 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.selfserviceprofiles; - -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.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.SelfServiceProfileCustomTextLanguageEnum; -import com.auth0.client.mgmt.types.SelfServiceProfileCustomTextPageEnum; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import java.io.IOException; -import java.util.Map; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawCustomTextClient { - protected final ClientOptions clientOptions; - - public RawCustomTextClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. - */ - public ManagementApiHttpResponse> list( - String id, SelfServiceProfileCustomTextLanguageEnum language, SelfServiceProfileCustomTextPageEnum page) { - return list(id, language, page, null); - } - - /** - * Retrieves text customizations for a given self-service profile, language and Self Service SSO Flow page. - */ - public ManagementApiHttpResponse> list( - String id, - SelfServiceProfileCustomTextLanguageEnum language, - SelfServiceProfileCustomTextPageEnum page, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles") - .addPathSegment(id) - .addPathSegments("custom-text") - .addPathSegment(language.toString()) - .addPathSegment(page.toString()) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, new TypeReference>() {}), - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. - */ - public ManagementApiHttpResponse> set( - String id, - SelfServiceProfileCustomTextLanguageEnum language, - SelfServiceProfileCustomTextPageEnum page, - Map request) { - return set(id, language, page, request, null); - } - - /** - * Updates text customizations for a given self-service profile, language and Self Service SSO Flow page. - */ - public ManagementApiHttpResponse> set( - String id, - SelfServiceProfileCustomTextLanguageEnum language, - SelfServiceProfileCustomTextPageEnum page, - Map request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles") - .addPathSegment(id) - .addPathSegments("custom-text") - .addPathSegment(language.toString()) - .addPathSegment(page.toString()) - .build(); - 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) - .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); - } - 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 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 (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 deleted file mode 100644 index 0d5cbed7e..000000000 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/RawSsoTicketClient.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.selfserviceprofiles; - -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.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.selfserviceprofiles.types.CreateSelfServiceProfileSsoTicketRequestContent; -import com.auth0.client.mgmt.types.CreateSelfServiceProfileSsoTicketResponseContent; -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 RawSsoTicketClient { - protected final ClientOptions clientOptions; - - public RawSsoTicketClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. - */ - public ManagementApiHttpResponse create(String id) { - return create( - id, CreateSelfServiceProfileSsoTicketRequestContent.builder().build()); - } - - /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. - */ - public ManagementApiHttpResponse create( - String id, CreateSelfServiceProfileSsoTicketRequestContent request) { - return create(id, request, null); - } - - /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. - */ - public ManagementApiHttpResponse create( - String id, CreateSelfServiceProfileSsoTicketRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles") - .addPathSegment(id) - .addPathSegments("sso-ticket") - .build(); - 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) - .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); - } - 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, CreateSelfServiceProfileSsoTicketResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. - * Clients should treat these 202 responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. - */ - public ManagementApiHttpResponse revoke(String profileId, String id) { - return revoke(profileId, id, null); - } - - /** - * Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. - * Clients should treat these 202 responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. - */ - public ManagementApiHttpResponse revoke(String profileId, String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("self-service-profiles") - .addPathSegment(profileId) - .addPathSegments("sso-ticket") - .addPathSegment(id) - .addPathSegments("revoke") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/SsoTicketClient.java b/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/SsoTicketClient.java deleted file mode 100644 index d6dabe9a1..000000000 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/SsoTicketClient.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.selfserviceprofiles; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.selfserviceprofiles.types.CreateSelfServiceProfileSsoTicketRequestContent; -import com.auth0.client.mgmt.types.CreateSelfServiceProfileSsoTicketResponseContent; - -public class SsoTicketClient { - protected final ClientOptions clientOptions; - - private final RawSsoTicketClient rawClient; - - public SsoTicketClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawSsoTicketClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawSsoTicketClient withRawResponse() { - return this.rawClient; - } - - /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. - */ - public CreateSelfServiceProfileSsoTicketResponseContent create(String id) { - return this.rawClient.create(id).body(); - } - - /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. - */ - public CreateSelfServiceProfileSsoTicketResponseContent create( - String id, CreateSelfServiceProfileSsoTicketRequestContent request) { - return this.rawClient.create(id, request).body(); - } - - /** - * Creates an SSO access ticket to initiate the Self Service SSO Flow using a self-service profile. - */ - public CreateSelfServiceProfileSsoTicketResponseContent create( - String id, CreateSelfServiceProfileSsoTicketRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).body(); - } - - /** - * Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. - * Clients should treat these 202 responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. - */ - public void revoke(String profileId, String id) { - this.rawClient.revoke(profileId, id).body(); - } - - /** - * Revokes an SSO access ticket and invalidates associated sessions. The ticket will no longer be accepted to initiate a Self-Service SSO session. If any users have already started a session through this ticket, their session will be terminated. Clients should expect a 202 Accepted response upon successful processing, indicating that the request has been acknowledged and that the revocation is underway but may not be fully completed at the time of response. If the specified ticket does not exist, a 202 Accepted response is also returned, signaling that no further action is required. - * Clients should treat these 202 responses as an acknowledgment that the request has been accepted and is in progress, even if the ticket was not found. - */ - public void revoke(String profileId, String id, RequestOptions requestOptions) { - this.rawClient.revoke(profileId, id, requestOptions).body(); - } -} 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 deleted file mode 100644 index a948402ca..000000000 --- a/src/main/java/com/auth0/client/mgmt/selfserviceprofiles/types/CreateSelfServiceProfileSsoTicketRequestContent.java +++ /dev/null @@ -1,320 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.selfserviceprofiles.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.SelfServiceProfileSsoTicketConnectionConfig; -import com.auth0.client.mgmt.types.SelfServiceProfileSsoTicketDomainAliasesConfig; -import com.auth0.client.mgmt.types.SelfServiceProfileSsoTicketEnabledOrganization; -import com.auth0.client.mgmt.types.SelfServiceProfileSsoTicketProvisioningConfig; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateSelfServiceProfileSsoTicketRequestContent.Builder.class) -public final class CreateSelfServiceProfileSsoTicketRequestContent { - private final Optional connectionId; - - private final Optional connectionConfig; - - private final Optional> enabledClients; - - private final Optional> enabledOrganizations; - - private final Optional ttlSec; - - private final Optional domainAliasesConfig; - - private final Optional provisioningConfig; - - private final Optional useForOrganizationDiscovery; - - private final Map additionalProperties; - - private CreateSelfServiceProfileSsoTicketRequestContent( - Optional connectionId, - Optional connectionConfig, - Optional> enabledClients, - Optional> enabledOrganizations, - Optional ttlSec, - Optional domainAliasesConfig, - Optional provisioningConfig, - Optional useForOrganizationDiscovery, - Map additionalProperties) { - this.connectionId = connectionId; - this.connectionConfig = connectionConfig; - this.enabledClients = enabledClients; - this.enabledOrganizations = enabledOrganizations; - this.ttlSec = ttlSec; - this.domainAliasesConfig = domainAliasesConfig; - this.provisioningConfig = provisioningConfig; - this.useForOrganizationDiscovery = useForOrganizationDiscovery; - this.additionalProperties = additionalProperties; - } - - /** - * @return If provided, this will allow editing of the provided connection during the SSO Flow - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - @JsonProperty("connection_config") - public Optional getConnectionConfig() { - return connectionConfig; - } - - /** - * @return List of client_ids that the connection will be enabled for. - */ - @JsonProperty("enabled_clients") - public Optional> getEnabledClients() { - return enabledClients; - } - - /** - * @return List of organizations that the connection will be enabled for. - */ - @JsonProperty("enabled_organizations") - public Optional> getEnabledOrganizations() { - return enabledOrganizations; - } - - /** - * @return Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days). - */ - @JsonProperty("ttl_sec") - public Optional getTtlSec() { - return ttlSec; - } - - @JsonProperty("domain_aliases_config") - public Optional getDomainAliasesConfig() { - return domainAliasesConfig; - } - - @JsonProperty("provisioning_config") - public Optional getProvisioningConfig() { - return provisioningConfig; - } - - /** - * @return Indicates whether a verified domain should be used for organization discovery during authentication. - */ - @JsonProperty("use_for_organization_discovery") - public Optional getUseForOrganizationDiscovery() { - return useForOrganizationDiscovery; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateSelfServiceProfileSsoTicketRequestContent - && equalTo((CreateSelfServiceProfileSsoTicketRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateSelfServiceProfileSsoTicketRequestContent other) { - return connectionId.equals(other.connectionId) - && connectionConfig.equals(other.connectionConfig) - && enabledClients.equals(other.enabledClients) - && enabledOrganizations.equals(other.enabledOrganizations) - && ttlSec.equals(other.ttlSec) - && domainAliasesConfig.equals(other.domainAliasesConfig) - && provisioningConfig.equals(other.provisioningConfig) - && useForOrganizationDiscovery.equals(other.useForOrganizationDiscovery); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.connectionConfig, - this.enabledClients, - this.enabledOrganizations, - this.ttlSec, - this.domainAliasesConfig, - this.provisioningConfig, - this.useForOrganizationDiscovery); - } - - @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 connectionId = Optional.empty(); - - private Optional connectionConfig = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional> enabledOrganizations = Optional.empty(); - - private Optional ttlSec = Optional.empty(); - - private Optional domainAliasesConfig = Optional.empty(); - - private Optional provisioningConfig = Optional.empty(); - - private Optional useForOrganizationDiscovery = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateSelfServiceProfileSsoTicketRequestContent other) { - connectionId(other.getConnectionId()); - connectionConfig(other.getConnectionConfig()); - enabledClients(other.getEnabledClients()); - enabledOrganizations(other.getEnabledOrganizations()); - ttlSec(other.getTtlSec()); - domainAliasesConfig(other.getDomainAliasesConfig()); - provisioningConfig(other.getProvisioningConfig()); - useForOrganizationDiscovery(other.getUseForOrganizationDiscovery()); - return this; - } - - /** - *

If provided, this will allow editing of the provided connection during the SSO Flow

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - return this; - } - - @JsonSetter(value = "connection_config", nulls = Nulls.SKIP) - public Builder connectionConfig(Optional connectionConfig) { - this.connectionConfig = connectionConfig; - return this; - } - - public Builder connectionConfig(SelfServiceProfileSsoTicketConnectionConfig connectionConfig) { - this.connectionConfig = Optional.ofNullable(connectionConfig); - return this; - } - - /** - *

List of client_ids that the connection will be enabled for.

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

List of organizations that the connection will be enabled for.

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

Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days).

- */ - @JsonSetter(value = "ttl_sec", nulls = Nulls.SKIP) - public Builder ttlSec(Optional ttlSec) { - this.ttlSec = ttlSec; - return this; - } - - public Builder ttlSec(Integer ttlSec) { - this.ttlSec = Optional.ofNullable(ttlSec); - return this; - } - - @JsonSetter(value = "domain_aliases_config", nulls = Nulls.SKIP) - public Builder domainAliasesConfig( - Optional domainAliasesConfig) { - this.domainAliasesConfig = domainAliasesConfig; - return this; - } - - public Builder domainAliasesConfig(SelfServiceProfileSsoTicketDomainAliasesConfig domainAliasesConfig) { - this.domainAliasesConfig = Optional.ofNullable(domainAliasesConfig); - return this; - } - - @JsonSetter(value = "provisioning_config", nulls = Nulls.SKIP) - public Builder provisioningConfig(Optional provisioningConfig) { - this.provisioningConfig = provisioningConfig; - return this; - } - - public Builder provisioningConfig(SelfServiceProfileSsoTicketProvisioningConfig provisioningConfig) { - this.provisioningConfig = Optional.ofNullable(provisioningConfig); - return this; - } - - /** - *

Indicates whether a verified domain should be used for organization discovery during authentication.

- */ - @JsonSetter(value = "use_for_organization_discovery", nulls = Nulls.SKIP) - public Builder useForOrganizationDiscovery(Optional useForOrganizationDiscovery) { - this.useForOrganizationDiscovery = useForOrganizationDiscovery; - return this; - } - - public Builder useForOrganizationDiscovery(Boolean useForOrganizationDiscovery) { - this.useForOrganizationDiscovery = Optional.ofNullable(useForOrganizationDiscovery); - return this; - } - - public CreateSelfServiceProfileSsoTicketRequestContent build() { - return new CreateSelfServiceProfileSsoTicketRequestContent( - connectionId, - connectionConfig, - enabledClients, - enabledOrganizations, - ttlSec, - domainAliasesConfig, - provisioningConfig, - useForOrganizationDiscovery, - 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 deleted file mode 100644 index 8a7430677..000000000 --- a/src/main/java/com/auth0/client/mgmt/tenants/AsyncRawSettingsClient.java +++ /dev/null @@ -1,239 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.tenants; - -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.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.tenants.types.GetTenantSettingsRequestParameters; -import com.auth0.client.mgmt.tenants.types.UpdateTenantSettingsRequestContent; -import com.auth0.client.mgmt.types.GetTenantSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateTenantSettingsResponseContent; -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 AsyncRawSettingsClient { - protected final ClientOptions clientOptions; - - public AsyncRawSettingsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve tenant settings. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture> get() { - return get(GetTenantSettingsRequestParameters.builder().build()); - } - - /** - * Retrieve tenant settings. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture> get( - GetTenantSettingsRequestParameters request) { - return get(request, null); - } - - /** - * Retrieve tenant settings. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture> get( - GetTenantSettingsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("tenants/settings"); - 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); - } - 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); - } - 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, GetTenantSettingsResponseContent.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 (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 settings for a tenant. - */ - public CompletableFuture> update() { - return update(UpdateTenantSettingsRequestContent.builder().build()); - } - - /** - * Update settings for a tenant. - */ - public CompletableFuture> update( - UpdateTenantSettingsRequestContent request) { - return update(request, null); - } - - /** - * Update settings for a tenant. - */ - public CompletableFuture> update( - UpdateTenantSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("tenants/settings") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateTenantSettingsResponseContent.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 (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/tenants/AsyncSettingsClient.java b/src/main/java/com/auth0/client/mgmt/tenants/AsyncSettingsClient.java deleted file mode 100644 index 5a6ccbd39..000000000 --- a/src/main/java/com/auth0/client/mgmt/tenants/AsyncSettingsClient.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.tenants; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.tenants.types.GetTenantSettingsRequestParameters; -import com.auth0.client.mgmt.tenants.types.UpdateTenantSettingsRequestContent; -import com.auth0.client.mgmt.types.GetTenantSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateTenantSettingsResponseContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncSettingsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawSettingsClient rawClient; - - public AsyncSettingsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawSettingsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawSettingsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve tenant settings. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture get() { - return this.rawClient.get().thenApply(response -> response.body()); - } - - /** - * Retrieve tenant settings. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture get(GetTenantSettingsRequestParameters request) { - return this.rawClient.get(request).thenApply(response -> response.body()); - } - - /** - * Retrieve tenant settings. A list of fields to include or exclude may also be specified. - */ - public CompletableFuture get( - GetTenantSettingsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update settings for a tenant. - */ - public CompletableFuture update() { - return this.rawClient.update().thenApply(response -> response.body()); - } - - /** - * Update settings for a tenant. - */ - public CompletableFuture update(UpdateTenantSettingsRequestContent request) { - return this.rawClient.update(request).thenApply(response -> response.body()); - } - - /** - * Update settings for a tenant. - */ - public CompletableFuture update( - UpdateTenantSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/tenants/AsyncTenantsClient.java b/src/main/java/com/auth0/client/mgmt/tenants/AsyncTenantsClient.java deleted file mode 100644 index ee247dd1f..000000000 --- a/src/main/java/com/auth0/client/mgmt/tenants/AsyncTenantsClient.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.tenants; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class AsyncTenantsClient { - protected final ClientOptions clientOptions; - - protected final Supplier settingsClient; - - public AsyncTenantsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.settingsClient = Suppliers.memoize(() -> new AsyncSettingsClient(clientOptions)); - } - - public AsyncSettingsClient settings() { - return this.settingsClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/tenants/RawSettingsClient.java b/src/main/java/com/auth0/client/mgmt/tenants/RawSettingsClient.java deleted file mode 100644 index 14304f903..000000000 --- a/src/main/java/com/auth0/client/mgmt/tenants/RawSettingsClient.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.tenants; - -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.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.tenants.types.GetTenantSettingsRequestParameters; -import com.auth0.client.mgmt.tenants.types.UpdateTenantSettingsRequestContent; -import com.auth0.client.mgmt.types.GetTenantSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateTenantSettingsResponseContent; -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 RawSettingsClient { - protected final ClientOptions clientOptions; - - public RawSettingsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve tenant settings. A list of fields to include or exclude may also be specified. - */ - public ManagementApiHttpResponse get() { - return get(GetTenantSettingsRequestParameters.builder().build()); - } - - /** - * Retrieve tenant settings. A list of fields to include or exclude may also be specified. - */ - public ManagementApiHttpResponse get(GetTenantSettingsRequestParameters request) { - return get(request, null); - } - - /** - * Retrieve tenant settings. A list of fields to include or exclude may also be specified. - */ - public ManagementApiHttpResponse get( - GetTenantSettingsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("tenants/settings"); - 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); - } - 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); - } - 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, GetTenantSettingsResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update settings for a tenant. - */ - public ManagementApiHttpResponse update() { - return update(UpdateTenantSettingsRequestContent.builder().build()); - } - - /** - * Update settings for a tenant. - */ - public ManagementApiHttpResponse update( - UpdateTenantSettingsRequestContent request) { - return update(request, null); - } - - /** - * Update settings for a tenant. - */ - public ManagementApiHttpResponse update( - UpdateTenantSettingsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("tenants/settings") - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateTenantSettingsResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/tenants/SettingsClient.java b/src/main/java/com/auth0/client/mgmt/tenants/SettingsClient.java deleted file mode 100644 index fe89bda7e..000000000 --- a/src/main/java/com/auth0/client/mgmt/tenants/SettingsClient.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.tenants; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.tenants.types.GetTenantSettingsRequestParameters; -import com.auth0.client.mgmt.tenants.types.UpdateTenantSettingsRequestContent; -import com.auth0.client.mgmt.types.GetTenantSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateTenantSettingsResponseContent; - -public class SettingsClient { - protected final ClientOptions clientOptions; - - private final RawSettingsClient rawClient; - - public SettingsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawSettingsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawSettingsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve tenant settings. A list of fields to include or exclude may also be specified. - */ - public GetTenantSettingsResponseContent get() { - return this.rawClient.get().body(); - } - - /** - * Retrieve tenant settings. A list of fields to include or exclude may also be specified. - */ - public GetTenantSettingsResponseContent get(GetTenantSettingsRequestParameters request) { - return this.rawClient.get(request).body(); - } - - /** - * Retrieve tenant settings. A list of fields to include or exclude may also be specified. - */ - public GetTenantSettingsResponseContent get( - GetTenantSettingsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(request, requestOptions).body(); - } - - /** - * Update settings for a tenant. - */ - public UpdateTenantSettingsResponseContent update() { - return this.rawClient.update().body(); - } - - /** - * Update settings for a tenant. - */ - public UpdateTenantSettingsResponseContent update(UpdateTenantSettingsRequestContent request) { - return this.rawClient.update(request).body(); - } - - /** - * Update settings for a tenant. - */ - public UpdateTenantSettingsResponseContent update( - UpdateTenantSettingsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/tenants/TenantsClient.java b/src/main/java/com/auth0/client/mgmt/tenants/TenantsClient.java deleted file mode 100644 index 489803a17..000000000 --- a/src/main/java/com/auth0/client/mgmt/tenants/TenantsClient.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.tenants; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class TenantsClient { - protected final ClientOptions clientOptions; - - protected final Supplier settingsClient; - - public TenantsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.settingsClient = Suppliers.memoize(() -> new SettingsClient(clientOptions)); - } - - public SettingsClient settings() { - return this.settingsClient.get(); - } -} 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 deleted file mode 100644 index d4967a56a..000000000 --- a/src/main/java/com/auth0/client/mgmt/tenants/types/GetTenantSettingsRequestParameters.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetTenantSettingsRequestParameters.Builder.class) -public final class GetTenantSettingsRequestParameters { - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final Map additionalProperties; - - private GetTenantSettingsRequestParameters( - OptionalNullable fields, - OptionalNullable includeFields, - Map additionalProperties) { - this.fields = fields; - this.includeFields = includeFields; - this.additionalProperties = additionalProperties; - } - - /** - * @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). - */ - @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("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 GetTenantSettingsRequestParameters - && equalTo((GetTenantSettingsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetTenantSettingsRequestParameters other) { - return fields.equals(other.fields) && includeFields.equals(other.includeFields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetTenantSettingsRequestParameters other) { - fields(other.getFields()); - includeFields(other.getIncludeFields()); - 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).

- */ - @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 GetTenantSettingsRequestParameters build() { - return new GetTenantSettingsRequestParameters(fields, includeFields, additionalProperties); - } - } -} 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 deleted file mode 100644 index 173cc06bd..000000000 --- a/src/main/java/com/auth0/client/mgmt/tenants/types/UpdateTenantSettingsRequestContent.java +++ /dev/null @@ -1,1535 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.auth0.client.mgmt.types.DefaultTokenQuota; -import com.auth0.client.mgmt.types.SessionCookieSchema; -import com.auth0.client.mgmt.types.TenantOidcLogoutSettings; -import com.auth0.client.mgmt.types.TenantSettingsDeviceFlow; -import com.auth0.client.mgmt.types.TenantSettingsErrorPage; -import com.auth0.client.mgmt.types.TenantSettingsFlags; -import com.auth0.client.mgmt.types.TenantSettingsGuardianPage; -import com.auth0.client.mgmt.types.TenantSettingsMtls; -import com.auth0.client.mgmt.types.TenantSettingsPasswordPage; -import com.auth0.client.mgmt.types.TenantSettingsResourceParameterProfile; -import com.auth0.client.mgmt.types.TenantSettingsSessions; -import com.auth0.client.mgmt.types.TenantSettingsSupportedLocalesEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateTenantSettingsRequestContent.Builder.class) -public final class UpdateTenantSettingsRequestContent { - private final OptionalNullable changePassword; - - private final OptionalNullable deviceFlow; - - private final OptionalNullable guardianMfaPage; - - private final Optional defaultAudience; - - private final Optional defaultDirectory; - - private final OptionalNullable errorPage; - - private final OptionalNullable defaultTokenQuota; - - private final Optional flags; - - private final Optional friendlyName; - - private final Optional pictureUrl; - - private final Optional supportEmail; - - private final Optional supportUrl; - - private final Optional> allowedLogoutUrls; - - private final Optional sessionLifetime; - - private final Optional idleSessionLifetime; - - private final Optional ephemeralSessionLifetime; - - private final Optional idleEphemeralSessionLifetime; - - private final Optional sandboxVersion; - - private final Optional legacySandboxVersion; - - private final Optional defaultRedirectionUri; - - private final Optional> enabledLocales; - - private final OptionalNullable sessionCookie; - - private final OptionalNullable sessions; - - private final Optional oidcLogout; - - private final OptionalNullable customizeMfaInPostloginAction; - - private final OptionalNullable allowOrganizationNameInAuthenticationApi; - - private final Optional> acrValuesSupported; - - private final OptionalNullable mtls; - - private final OptionalNullable pushedAuthorizationRequestsSupported; - - private final OptionalNullable authorizationResponseIssParameterSupported; - - private final OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt; - - private final Optional resourceParameterProfile; - - private final Optional enableAiGuide; - - private final Optional phoneConsolidatedExperience; - - private final Map additionalProperties; - - private UpdateTenantSettingsRequestContent( - OptionalNullable changePassword, - OptionalNullable deviceFlow, - OptionalNullable guardianMfaPage, - Optional defaultAudience, - Optional defaultDirectory, - OptionalNullable errorPage, - OptionalNullable defaultTokenQuota, - Optional flags, - Optional friendlyName, - Optional pictureUrl, - Optional supportEmail, - Optional supportUrl, - Optional> allowedLogoutUrls, - Optional sessionLifetime, - Optional idleSessionLifetime, - Optional ephemeralSessionLifetime, - Optional idleEphemeralSessionLifetime, - Optional sandboxVersion, - Optional legacySandboxVersion, - Optional defaultRedirectionUri, - Optional> enabledLocales, - OptionalNullable sessionCookie, - OptionalNullable sessions, - Optional oidcLogout, - OptionalNullable customizeMfaInPostloginAction, - OptionalNullable allowOrganizationNameInAuthenticationApi, - Optional> acrValuesSupported, - OptionalNullable mtls, - OptionalNullable pushedAuthorizationRequestsSupported, - OptionalNullable authorizationResponseIssParameterSupported, - OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt, - Optional resourceParameterProfile, - Optional enableAiGuide, - Optional phoneConsolidatedExperience, - Map additionalProperties) { - this.changePassword = changePassword; - this.deviceFlow = deviceFlow; - this.guardianMfaPage = guardianMfaPage; - this.defaultAudience = defaultAudience; - this.defaultDirectory = defaultDirectory; - this.errorPage = errorPage; - this.defaultTokenQuota = defaultTokenQuota; - this.flags = flags; - this.friendlyName = friendlyName; - this.pictureUrl = pictureUrl; - this.supportEmail = supportEmail; - this.supportUrl = supportUrl; - this.allowedLogoutUrls = allowedLogoutUrls; - this.sessionLifetime = sessionLifetime; - this.idleSessionLifetime = idleSessionLifetime; - this.ephemeralSessionLifetime = ephemeralSessionLifetime; - this.idleEphemeralSessionLifetime = idleEphemeralSessionLifetime; - this.sandboxVersion = sandboxVersion; - this.legacySandboxVersion = legacySandboxVersion; - this.defaultRedirectionUri = defaultRedirectionUri; - this.enabledLocales = enabledLocales; - this.sessionCookie = sessionCookie; - this.sessions = sessions; - this.oidcLogout = oidcLogout; - this.customizeMfaInPostloginAction = customizeMfaInPostloginAction; - this.allowOrganizationNameInAuthenticationApi = allowOrganizationNameInAuthenticationApi; - this.acrValuesSupported = acrValuesSupported; - this.mtls = mtls; - this.pushedAuthorizationRequestsSupported = pushedAuthorizationRequestsSupported; - this.authorizationResponseIssParameterSupported = authorizationResponseIssParameterSupported; - this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; - this.resourceParameterProfile = resourceParameterProfile; - this.enableAiGuide = enableAiGuide; - this.phoneConsolidatedExperience = phoneConsolidatedExperience; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("change_password") - public OptionalNullable getChangePassword() { - if (changePassword == null) { - return OptionalNullable.absent(); - } - return changePassword; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("device_flow") - public OptionalNullable getDeviceFlow() { - if (deviceFlow == null) { - return OptionalNullable.absent(); - } - return deviceFlow; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("guardian_mfa_page") - public OptionalNullable getGuardianMfaPage() { - if (guardianMfaPage == null) { - return OptionalNullable.absent(); - } - return guardianMfaPage; - } - - /** - * @return Default audience for API Authorization. - */ - @JsonProperty("default_audience") - public Optional getDefaultAudience() { - return defaultAudience; - } - - /** - * @return Name of connection used for password grants at the /token endpoint. The following connection types are supported: LDAP, AD, Database Connections, Passwordless, Windows Azure Active Directory, ADFS. - */ - @JsonProperty("default_directory") - public Optional getDefaultDirectory() { - return defaultDirectory; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("error_page") - public OptionalNullable getErrorPage() { - if (errorPage == null) { - return OptionalNullable.absent(); - } - return errorPage; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("default_token_quota") - public OptionalNullable getDefaultTokenQuota() { - if (defaultTokenQuota == null) { - return OptionalNullable.absent(); - } - return defaultTokenQuota; - } - - @JsonProperty("flags") - public Optional getFlags() { - return flags; - } - - /** - * @return Friendly name for this tenant. - */ - @JsonProperty("friendly_name") - public Optional getFriendlyName() { - return friendlyName; - } - - /** - * @return URL of logo to be shown for this tenant (recommended size: 150x150) - */ - @JsonProperty("picture_url") - public Optional getPictureUrl() { - return pictureUrl; - } - - /** - * @return End-user support email. - */ - @JsonProperty("support_email") - public Optional getSupportEmail() { - return supportEmail; - } - - /** - * @return End-user support url. - */ - @JsonProperty("support_url") - public Optional getSupportUrl() { - return supportUrl; - } - - /** - * @return URLs that are valid to redirect to after logout from Auth0. - */ - @JsonProperty("allowed_logout_urls") - public Optional> getAllowedLogoutUrls() { - return allowedLogoutUrls; - } - - /** - * @return Number of hours a session will stay valid. - */ - @JsonProperty("session_lifetime") - public Optional getSessionLifetime() { - return sessionLifetime; - } - - /** - * @return Number of hours for which a session can be inactive before the user must log in again. - */ - @JsonProperty("idle_session_lifetime") - public Optional getIdleSessionLifetime() { - return idleSessionLifetime; - } - - /** - * @return Number of hours an ephemeral (non-persistent) session will stay valid. - */ - @JsonProperty("ephemeral_session_lifetime") - public Optional getEphemeralSessionLifetime() { - return ephemeralSessionLifetime; - } - - /** - * @return Number of hours for which an ephemeral (non-persistent) session can be inactive before the user must log in again. - */ - @JsonProperty("idle_ephemeral_session_lifetime") - public Optional getIdleEphemeralSessionLifetime() { - return idleEphemeralSessionLifetime; - } - - /** - * @return Selected sandbox version for the extensibility environment - */ - @JsonProperty("sandbox_version") - public Optional getSandboxVersion() { - return sandboxVersion; - } - - /** - * @return Selected legacy sandbox version for the extensibility environment - */ - @JsonProperty("legacy_sandbox_version") - public Optional getLegacySandboxVersion() { - return legacySandboxVersion; - } - - /** - * @return The default absolute redirection uri, must be https - */ - @JsonProperty("default_redirection_uri") - public Optional getDefaultRedirectionUri() { - return defaultRedirectionUri; - } - - /** - * @return Supported locales for the user interface - */ - @JsonProperty("enabled_locales") - public Optional> getEnabledLocales() { - return enabledLocales; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_cookie") - public OptionalNullable getSessionCookie() { - if (sessionCookie == null) { - return OptionalNullable.absent(); - } - return sessionCookie; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sessions") - public OptionalNullable getSessions() { - if (sessions == null) { - return OptionalNullable.absent(); - } - return sessions; - } - - @JsonProperty("oidc_logout") - public Optional getOidcLogout() { - return oidcLogout; - } - - /** - * @return Whether to enable flexible factors for MFA in the PostLogin action - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("customize_mfa_in_postlogin_action") - public OptionalNullable getCustomizeMfaInPostloginAction() { - if (customizeMfaInPostloginAction == null) { - return OptionalNullable.absent(); - } - return customizeMfaInPostloginAction; - } - - /** - * @return Whether to accept an organization name instead of an ID on auth endpoints - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("allow_organization_name_in_authentication_api") - public OptionalNullable getAllowOrganizationNameInAuthenticationApi() { - if (allowOrganizationNameInAuthenticationApi == null) { - return OptionalNullable.absent(); - } - return allowOrganizationNameInAuthenticationApi; - } - - /** - * @return Supported ACR values - */ - @JsonProperty("acr_values_supported") - public Optional> getAcrValuesSupported() { - return acrValuesSupported; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("mtls") - public OptionalNullable getMtls() { - if (mtls == null) { - return OptionalNullable.absent(); - } - return mtls; - } - - /** - * @return Enables the use of Pushed Authorization Requests - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("pushed_authorization_requests_supported") - public OptionalNullable getPushedAuthorizationRequestsSupported() { - if (pushedAuthorizationRequestsSupported == null) { - return OptionalNullable.absent(); - } - return pushedAuthorizationRequestsSupported; - } - - /** - * @return Supports iss parameter in authorization responses - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("authorization_response_iss_parameter_supported") - public OptionalNullable getAuthorizationResponseIssParameterSupported() { - if (authorizationResponseIssParameterSupported == null) { - return OptionalNullable.absent(); - } - return authorizationResponseIssParameterSupported; - } - - /** - * @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. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("skip_non_verifiable_callback_uri_confirmation_prompt") - public OptionalNullable getSkipNonVerifiableCallbackUriConfirmationPrompt() { - if (skipNonVerifiableCallbackUriConfirmationPrompt == null) { - return OptionalNullable.absent(); - } - return skipNonVerifiableCallbackUriConfirmationPrompt; - } - - @JsonProperty("resource_parameter_profile") - public Optional getResourceParameterProfile() { - return resourceParameterProfile; - } - - /** - * @return Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant. - */ - @JsonProperty("enable_ai_guide") - public Optional getEnableAiGuide() { - return enableAiGuide; - } - - /** - * @return Whether Phone Consolidated Experience is enabled for this tenant. - */ - @JsonProperty("phone_consolidated_experience") - public Optional getPhoneConsolidatedExperience() { - return phoneConsolidatedExperience; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("change_password") - private OptionalNullable _getChangePassword() { - return changePassword; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("device_flow") - private OptionalNullable _getDeviceFlow() { - return deviceFlow; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("guardian_mfa_page") - private OptionalNullable _getGuardianMfaPage() { - return guardianMfaPage; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("error_page") - private OptionalNullable _getErrorPage() { - return errorPage; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("default_token_quota") - private OptionalNullable _getDefaultTokenQuota() { - return defaultTokenQuota; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_cookie") - private OptionalNullable _getSessionCookie() { - return sessionCookie; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sessions") - private OptionalNullable _getSessions() { - return sessions; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("customize_mfa_in_postlogin_action") - private OptionalNullable _getCustomizeMfaInPostloginAction() { - return customizeMfaInPostloginAction; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("allow_organization_name_in_authentication_api") - private OptionalNullable _getAllowOrganizationNameInAuthenticationApi() { - return allowOrganizationNameInAuthenticationApi; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("mtls") - private OptionalNullable _getMtls() { - return mtls; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("pushed_authorization_requests_supported") - private OptionalNullable _getPushedAuthorizationRequestsSupported() { - return pushedAuthorizationRequestsSupported; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("authorization_response_iss_parameter_supported") - private OptionalNullable _getAuthorizationResponseIssParameterSupported() { - return authorizationResponseIssParameterSupported; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("skip_non_verifiable_callback_uri_confirmation_prompt") - private OptionalNullable _getSkipNonVerifiableCallbackUriConfirmationPrompt() { - return skipNonVerifiableCallbackUriConfirmationPrompt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateTenantSettingsRequestContent - && equalTo((UpdateTenantSettingsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateTenantSettingsRequestContent other) { - return changePassword.equals(other.changePassword) - && deviceFlow.equals(other.deviceFlow) - && guardianMfaPage.equals(other.guardianMfaPage) - && defaultAudience.equals(other.defaultAudience) - && defaultDirectory.equals(other.defaultDirectory) - && errorPage.equals(other.errorPage) - && defaultTokenQuota.equals(other.defaultTokenQuota) - && flags.equals(other.flags) - && friendlyName.equals(other.friendlyName) - && pictureUrl.equals(other.pictureUrl) - && supportEmail.equals(other.supportEmail) - && supportUrl.equals(other.supportUrl) - && allowedLogoutUrls.equals(other.allowedLogoutUrls) - && sessionLifetime.equals(other.sessionLifetime) - && idleSessionLifetime.equals(other.idleSessionLifetime) - && ephemeralSessionLifetime.equals(other.ephemeralSessionLifetime) - && idleEphemeralSessionLifetime.equals(other.idleEphemeralSessionLifetime) - && sandboxVersion.equals(other.sandboxVersion) - && legacySandboxVersion.equals(other.legacySandboxVersion) - && defaultRedirectionUri.equals(other.defaultRedirectionUri) - && enabledLocales.equals(other.enabledLocales) - && sessionCookie.equals(other.sessionCookie) - && sessions.equals(other.sessions) - && oidcLogout.equals(other.oidcLogout) - && customizeMfaInPostloginAction.equals(other.customizeMfaInPostloginAction) - && allowOrganizationNameInAuthenticationApi.equals(other.allowOrganizationNameInAuthenticationApi) - && acrValuesSupported.equals(other.acrValuesSupported) - && mtls.equals(other.mtls) - && pushedAuthorizationRequestsSupported.equals(other.pushedAuthorizationRequestsSupported) - && authorizationResponseIssParameterSupported.equals(other.authorizationResponseIssParameterSupported) - && skipNonVerifiableCallbackUriConfirmationPrompt.equals( - other.skipNonVerifiableCallbackUriConfirmationPrompt) - && resourceParameterProfile.equals(other.resourceParameterProfile) - && enableAiGuide.equals(other.enableAiGuide) - && phoneConsolidatedExperience.equals(other.phoneConsolidatedExperience); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.changePassword, - this.deviceFlow, - this.guardianMfaPage, - this.defaultAudience, - this.defaultDirectory, - this.errorPage, - this.defaultTokenQuota, - this.flags, - this.friendlyName, - this.pictureUrl, - this.supportEmail, - this.supportUrl, - this.allowedLogoutUrls, - this.sessionLifetime, - this.idleSessionLifetime, - this.ephemeralSessionLifetime, - this.idleEphemeralSessionLifetime, - this.sandboxVersion, - this.legacySandboxVersion, - this.defaultRedirectionUri, - this.enabledLocales, - this.sessionCookie, - this.sessions, - this.oidcLogout, - this.customizeMfaInPostloginAction, - this.allowOrganizationNameInAuthenticationApi, - this.acrValuesSupported, - this.mtls, - this.pushedAuthorizationRequestsSupported, - this.authorizationResponseIssParameterSupported, - this.skipNonVerifiableCallbackUriConfirmationPrompt, - this.resourceParameterProfile, - this.enableAiGuide, - this.phoneConsolidatedExperience); - } - - @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 changePassword = OptionalNullable.absent(); - - private OptionalNullable deviceFlow = OptionalNullable.absent(); - - private OptionalNullable guardianMfaPage = OptionalNullable.absent(); - - private Optional defaultAudience = Optional.empty(); - - private Optional defaultDirectory = Optional.empty(); - - private OptionalNullable errorPage = OptionalNullable.absent(); - - private OptionalNullable defaultTokenQuota = OptionalNullable.absent(); - - private Optional flags = Optional.empty(); - - private Optional friendlyName = Optional.empty(); - - private Optional pictureUrl = Optional.empty(); - - private Optional supportEmail = Optional.empty(); - - private Optional supportUrl = Optional.empty(); - - private Optional> allowedLogoutUrls = Optional.empty(); - - private Optional sessionLifetime = Optional.empty(); - - private Optional idleSessionLifetime = Optional.empty(); - - private Optional ephemeralSessionLifetime = Optional.empty(); - - private Optional idleEphemeralSessionLifetime = Optional.empty(); - - private Optional sandboxVersion = Optional.empty(); - - private Optional legacySandboxVersion = Optional.empty(); - - private Optional defaultRedirectionUri = Optional.empty(); - - private Optional> enabledLocales = Optional.empty(); - - private OptionalNullable sessionCookie = OptionalNullable.absent(); - - private OptionalNullable sessions = OptionalNullable.absent(); - - private Optional oidcLogout = Optional.empty(); - - private OptionalNullable customizeMfaInPostloginAction = OptionalNullable.absent(); - - private OptionalNullable allowOrganizationNameInAuthenticationApi = OptionalNullable.absent(); - - private Optional> acrValuesSupported = Optional.empty(); - - private OptionalNullable mtls = OptionalNullable.absent(); - - private OptionalNullable pushedAuthorizationRequestsSupported = OptionalNullable.absent(); - - private OptionalNullable authorizationResponseIssParameterSupported = OptionalNullable.absent(); - - private OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.absent(); - - private Optional resourceParameterProfile = Optional.empty(); - - private Optional enableAiGuide = Optional.empty(); - - private Optional phoneConsolidatedExperience = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateTenantSettingsRequestContent other) { - changePassword(other.getChangePassword()); - deviceFlow(other.getDeviceFlow()); - guardianMfaPage(other.getGuardianMfaPage()); - defaultAudience(other.getDefaultAudience()); - defaultDirectory(other.getDefaultDirectory()); - errorPage(other.getErrorPage()); - defaultTokenQuota(other.getDefaultTokenQuota()); - flags(other.getFlags()); - friendlyName(other.getFriendlyName()); - pictureUrl(other.getPictureUrl()); - supportEmail(other.getSupportEmail()); - supportUrl(other.getSupportUrl()); - allowedLogoutUrls(other.getAllowedLogoutUrls()); - sessionLifetime(other.getSessionLifetime()); - idleSessionLifetime(other.getIdleSessionLifetime()); - ephemeralSessionLifetime(other.getEphemeralSessionLifetime()); - idleEphemeralSessionLifetime(other.getIdleEphemeralSessionLifetime()); - sandboxVersion(other.getSandboxVersion()); - legacySandboxVersion(other.getLegacySandboxVersion()); - defaultRedirectionUri(other.getDefaultRedirectionUri()); - enabledLocales(other.getEnabledLocales()); - sessionCookie(other.getSessionCookie()); - sessions(other.getSessions()); - oidcLogout(other.getOidcLogout()); - customizeMfaInPostloginAction(other.getCustomizeMfaInPostloginAction()); - allowOrganizationNameInAuthenticationApi(other.getAllowOrganizationNameInAuthenticationApi()); - acrValuesSupported(other.getAcrValuesSupported()); - mtls(other.getMtls()); - pushedAuthorizationRequestsSupported(other.getPushedAuthorizationRequestsSupported()); - authorizationResponseIssParameterSupported(other.getAuthorizationResponseIssParameterSupported()); - skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); - resourceParameterProfile(other.getResourceParameterProfile()); - enableAiGuide(other.getEnableAiGuide()); - phoneConsolidatedExperience(other.getPhoneConsolidatedExperience()); - return this; - } - - @JsonSetter(value = "change_password", nulls = Nulls.SKIP) - public Builder changePassword(@Nullable OptionalNullable changePassword) { - this.changePassword = changePassword; - return this; - } - - public Builder changePassword(TenantSettingsPasswordPage changePassword) { - this.changePassword = OptionalNullable.of(changePassword); - return this; - } - - public Builder changePassword(Optional changePassword) { - if (changePassword.isPresent()) { - this.changePassword = OptionalNullable.of(changePassword.get()); - } else { - this.changePassword = OptionalNullable.absent(); - } - return this; - } - - public Builder changePassword(com.auth0.client.mgmt.core.Nullable changePassword) { - if (changePassword.isNull()) { - this.changePassword = OptionalNullable.ofNull(); - } else if (changePassword.isEmpty()) { - this.changePassword = OptionalNullable.absent(); - } else { - this.changePassword = OptionalNullable.of(changePassword.get()); - } - return this; - } - - @JsonSetter(value = "device_flow", nulls = Nulls.SKIP) - public Builder deviceFlow(@Nullable OptionalNullable deviceFlow) { - this.deviceFlow = deviceFlow; - return this; - } - - public Builder deviceFlow(TenantSettingsDeviceFlow deviceFlow) { - this.deviceFlow = OptionalNullable.of(deviceFlow); - return this; - } - - public Builder deviceFlow(Optional deviceFlow) { - if (deviceFlow.isPresent()) { - this.deviceFlow = OptionalNullable.of(deviceFlow.get()); - } else { - this.deviceFlow = OptionalNullable.absent(); - } - return this; - } - - public Builder deviceFlow(com.auth0.client.mgmt.core.Nullable deviceFlow) { - if (deviceFlow.isNull()) { - this.deviceFlow = OptionalNullable.ofNull(); - } else if (deviceFlow.isEmpty()) { - this.deviceFlow = OptionalNullable.absent(); - } else { - this.deviceFlow = OptionalNullable.of(deviceFlow.get()); - } - return this; - } - - @JsonSetter(value = "guardian_mfa_page", nulls = Nulls.SKIP) - public Builder guardianMfaPage(@Nullable OptionalNullable guardianMfaPage) { - this.guardianMfaPage = guardianMfaPage; - return this; - } - - public Builder guardianMfaPage(TenantSettingsGuardianPage guardianMfaPage) { - this.guardianMfaPage = OptionalNullable.of(guardianMfaPage); - return this; - } - - public Builder guardianMfaPage(Optional guardianMfaPage) { - if (guardianMfaPage.isPresent()) { - this.guardianMfaPage = OptionalNullable.of(guardianMfaPage.get()); - } else { - this.guardianMfaPage = OptionalNullable.absent(); - } - return this; - } - - public Builder guardianMfaPage( - com.auth0.client.mgmt.core.Nullable guardianMfaPage) { - if (guardianMfaPage.isNull()) { - this.guardianMfaPage = OptionalNullable.ofNull(); - } else if (guardianMfaPage.isEmpty()) { - this.guardianMfaPage = OptionalNullable.absent(); - } else { - this.guardianMfaPage = OptionalNullable.of(guardianMfaPage.get()); - } - return this; - } - - /** - *

Default audience for API Authorization.

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

Name of connection used for password grants at the /token endpoint. The following connection types are supported: LDAP, AD, Database Connections, Passwordless, Windows Azure Active Directory, ADFS.

- */ - @JsonSetter(value = "default_directory", nulls = Nulls.SKIP) - public Builder defaultDirectory(Optional defaultDirectory) { - this.defaultDirectory = defaultDirectory; - return this; - } - - public Builder defaultDirectory(String defaultDirectory) { - this.defaultDirectory = Optional.ofNullable(defaultDirectory); - return this; - } - - @JsonSetter(value = "error_page", nulls = Nulls.SKIP) - public Builder errorPage(@Nullable OptionalNullable errorPage) { - this.errorPage = errorPage; - return this; - } - - public Builder errorPage(TenantSettingsErrorPage errorPage) { - this.errorPage = OptionalNullable.of(errorPage); - return this; - } - - public Builder errorPage(Optional errorPage) { - if (errorPage.isPresent()) { - this.errorPage = OptionalNullable.of(errorPage.get()); - } else { - this.errorPage = OptionalNullable.absent(); - } - return this; - } - - public Builder errorPage(com.auth0.client.mgmt.core.Nullable errorPage) { - if (errorPage.isNull()) { - this.errorPage = OptionalNullable.ofNull(); - } else if (errorPage.isEmpty()) { - this.errorPage = OptionalNullable.absent(); - } else { - this.errorPage = OptionalNullable.of(errorPage.get()); - } - return this; - } - - @JsonSetter(value = "default_token_quota", nulls = Nulls.SKIP) - public Builder defaultTokenQuota(@Nullable OptionalNullable defaultTokenQuota) { - this.defaultTokenQuota = defaultTokenQuota; - return this; - } - - public Builder defaultTokenQuota(DefaultTokenQuota defaultTokenQuota) { - this.defaultTokenQuota = OptionalNullable.of(defaultTokenQuota); - return this; - } - - public Builder defaultTokenQuota(Optional defaultTokenQuota) { - if (defaultTokenQuota.isPresent()) { - this.defaultTokenQuota = OptionalNullable.of(defaultTokenQuota.get()); - } else { - this.defaultTokenQuota = OptionalNullable.absent(); - } - return this; - } - - public Builder defaultTokenQuota(com.auth0.client.mgmt.core.Nullable defaultTokenQuota) { - if (defaultTokenQuota.isNull()) { - this.defaultTokenQuota = OptionalNullable.ofNull(); - } else if (defaultTokenQuota.isEmpty()) { - this.defaultTokenQuota = OptionalNullable.absent(); - } else { - this.defaultTokenQuota = OptionalNullable.of(defaultTokenQuota.get()); - } - return this; - } - - @JsonSetter(value = "flags", nulls = Nulls.SKIP) - public Builder flags(Optional flags) { - this.flags = flags; - return this; - } - - public Builder flags(TenantSettingsFlags flags) { - this.flags = Optional.ofNullable(flags); - return this; - } - - /** - *

Friendly name for this tenant.

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

URL of logo to be shown for this tenant (recommended size: 150x150)

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

End-user support email.

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

End-user support url.

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

URLs that are valid to redirect to after logout from Auth0.

- */ - @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; - } - - /** - *

Number of hours a session will stay valid.

- */ - @JsonSetter(value = "session_lifetime", nulls = Nulls.SKIP) - public Builder sessionLifetime(Optional sessionLifetime) { - this.sessionLifetime = sessionLifetime; - return this; - } - - public Builder sessionLifetime(Integer sessionLifetime) { - this.sessionLifetime = Optional.ofNullable(sessionLifetime); - return this; - } - - /** - *

Number of hours for which a session can be inactive before the user must log in again.

- */ - @JsonSetter(value = "idle_session_lifetime", nulls = Nulls.SKIP) - public Builder idleSessionLifetime(Optional idleSessionLifetime) { - this.idleSessionLifetime = idleSessionLifetime; - return this; - } - - public Builder idleSessionLifetime(Integer idleSessionLifetime) { - this.idleSessionLifetime = Optional.ofNullable(idleSessionLifetime); - return this; - } - - /** - *

Number of hours an ephemeral (non-persistent) session will stay valid.

- */ - @JsonSetter(value = "ephemeral_session_lifetime", nulls = Nulls.SKIP) - public Builder ephemeralSessionLifetime(Optional ephemeralSessionLifetime) { - this.ephemeralSessionLifetime = ephemeralSessionLifetime; - return this; - } - - public Builder ephemeralSessionLifetime(Integer ephemeralSessionLifetime) { - this.ephemeralSessionLifetime = Optional.ofNullable(ephemeralSessionLifetime); - return this; - } - - /** - *

Number of hours for which an ephemeral (non-persistent) session can be inactive before the user must log in again.

- */ - @JsonSetter(value = "idle_ephemeral_session_lifetime", nulls = Nulls.SKIP) - public Builder idleEphemeralSessionLifetime(Optional idleEphemeralSessionLifetime) { - this.idleEphemeralSessionLifetime = idleEphemeralSessionLifetime; - return this; - } - - public Builder idleEphemeralSessionLifetime(Integer idleEphemeralSessionLifetime) { - this.idleEphemeralSessionLifetime = Optional.ofNullable(idleEphemeralSessionLifetime); - return this; - } - - /** - *

Selected sandbox version for the extensibility environment

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

Selected legacy sandbox version for the extensibility environment

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

The default absolute redirection uri, must be https

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

Supported locales for the user interface

- */ - @JsonSetter(value = "enabled_locales", nulls = Nulls.SKIP) - public Builder enabledLocales(Optional> enabledLocales) { - this.enabledLocales = enabledLocales; - return this; - } - - public Builder enabledLocales(List enabledLocales) { - this.enabledLocales = Optional.ofNullable(enabledLocales); - return this; - } - - @JsonSetter(value = "session_cookie", nulls = Nulls.SKIP) - public Builder sessionCookie(@Nullable OptionalNullable sessionCookie) { - this.sessionCookie = sessionCookie; - return this; - } - - public Builder sessionCookie(SessionCookieSchema sessionCookie) { - this.sessionCookie = OptionalNullable.of(sessionCookie); - return this; - } - - public Builder sessionCookie(Optional sessionCookie) { - if (sessionCookie.isPresent()) { - this.sessionCookie = OptionalNullable.of(sessionCookie.get()); - } else { - this.sessionCookie = OptionalNullable.absent(); - } - return this; - } - - public Builder sessionCookie(com.auth0.client.mgmt.core.Nullable sessionCookie) { - if (sessionCookie.isNull()) { - this.sessionCookie = OptionalNullable.ofNull(); - } else if (sessionCookie.isEmpty()) { - this.sessionCookie = OptionalNullable.absent(); - } else { - this.sessionCookie = OptionalNullable.of(sessionCookie.get()); - } - return this; - } - - @JsonSetter(value = "sessions", nulls = Nulls.SKIP) - public Builder sessions(@Nullable OptionalNullable sessions) { - this.sessions = sessions; - return this; - } - - public Builder sessions(TenantSettingsSessions sessions) { - this.sessions = OptionalNullable.of(sessions); - return this; - } - - public Builder sessions(Optional sessions) { - if (sessions.isPresent()) { - this.sessions = OptionalNullable.of(sessions.get()); - } else { - this.sessions = OptionalNullable.absent(); - } - return this; - } - - public Builder sessions(com.auth0.client.mgmt.core.Nullable sessions) { - if (sessions.isNull()) { - this.sessions = OptionalNullable.ofNull(); - } else if (sessions.isEmpty()) { - this.sessions = OptionalNullable.absent(); - } else { - this.sessions = OptionalNullable.of(sessions.get()); - } - return this; - } - - @JsonSetter(value = "oidc_logout", nulls = Nulls.SKIP) - public Builder oidcLogout(Optional oidcLogout) { - this.oidcLogout = oidcLogout; - return this; - } - - public Builder oidcLogout(TenantOidcLogoutSettings oidcLogout) { - this.oidcLogout = Optional.ofNullable(oidcLogout); - return this; - } - - /** - *

Whether to enable flexible factors for MFA in the PostLogin action

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

Whether to accept an organization name instead of an ID on auth endpoints

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

Supported ACR values

- */ - @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; - } - - @JsonSetter(value = "mtls", nulls = Nulls.SKIP) - public Builder mtls(@Nullable OptionalNullable mtls) { - this.mtls = mtls; - return this; - } - - public Builder mtls(TenantSettingsMtls mtls) { - this.mtls = OptionalNullable.of(mtls); - return this; - } - - public Builder mtls(Optional mtls) { - if (mtls.isPresent()) { - this.mtls = OptionalNullable.of(mtls.get()); - } else { - this.mtls = OptionalNullable.absent(); - } - return this; - } - - public Builder mtls(com.auth0.client.mgmt.core.Nullable mtls) { - if (mtls.isNull()) { - this.mtls = OptionalNullable.ofNull(); - } else if (mtls.isEmpty()) { - this.mtls = OptionalNullable.absent(); - } else { - this.mtls = OptionalNullable.of(mtls.get()); - } - return this; - } - - /** - *

Enables the use of Pushed Authorization Requests

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

Supports iss parameter in authorization responses

- */ - @JsonSetter(value = "authorization_response_iss_parameter_supported", nulls = Nulls.SKIP) - public Builder authorizationResponseIssParameterSupported( - @Nullable OptionalNullable authorizationResponseIssParameterSupported) { - this.authorizationResponseIssParameterSupported = authorizationResponseIssParameterSupported; - return this; - } - - public Builder authorizationResponseIssParameterSupported(Boolean authorizationResponseIssParameterSupported) { - this.authorizationResponseIssParameterSupported = - OptionalNullable.of(authorizationResponseIssParameterSupported); - return this; - } - - public Builder authorizationResponseIssParameterSupported( - Optional authorizationResponseIssParameterSupported) { - if (authorizationResponseIssParameterSupported.isPresent()) { - this.authorizationResponseIssParameterSupported = - OptionalNullable.of(authorizationResponseIssParameterSupported.get()); - } else { - this.authorizationResponseIssParameterSupported = OptionalNullable.absent(); - } - return this; - } - - public Builder authorizationResponseIssParameterSupported( - com.auth0.client.mgmt.core.Nullable authorizationResponseIssParameterSupported) { - if (authorizationResponseIssParameterSupported.isNull()) { - this.authorizationResponseIssParameterSupported = OptionalNullable.ofNull(); - } else if (authorizationResponseIssParameterSupported.isEmpty()) { - this.authorizationResponseIssParameterSupported = OptionalNullable.absent(); - } else { - this.authorizationResponseIssParameterSupported = - OptionalNullable.of(authorizationResponseIssParameterSupported.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( - @Nullable OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; - return this; - } - - public Builder skipNonVerifiableCallbackUriConfirmationPrompt( - Boolean skipNonVerifiableCallbackUriConfirmationPrompt) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = - OptionalNullable.of(skipNonVerifiableCallbackUriConfirmationPrompt); - return this; - } - - public Builder skipNonVerifiableCallbackUriConfirmationPrompt( - Optional skipNonVerifiableCallbackUriConfirmationPrompt) { - if (skipNonVerifiableCallbackUriConfirmationPrompt.isPresent()) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = - OptionalNullable.of(skipNonVerifiableCallbackUriConfirmationPrompt.get()); - } else { - this.skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.absent(); - } - return this; - } - - public Builder skipNonVerifiableCallbackUriConfirmationPrompt( - com.auth0.client.mgmt.core.Nullable skipNonVerifiableCallbackUriConfirmationPrompt) { - if (skipNonVerifiableCallbackUriConfirmationPrompt.isNull()) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.ofNull(); - } else if (skipNonVerifiableCallbackUriConfirmationPrompt.isEmpty()) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.absent(); - } else { - this.skipNonVerifiableCallbackUriConfirmationPrompt = - OptionalNullable.of(skipNonVerifiableCallbackUriConfirmationPrompt.get()); - } - return this; - } - - @JsonSetter(value = "resource_parameter_profile", nulls = Nulls.SKIP) - public Builder resourceParameterProfile( - Optional resourceParameterProfile) { - this.resourceParameterProfile = resourceParameterProfile; - return this; - } - - public Builder resourceParameterProfile(TenantSettingsResourceParameterProfile resourceParameterProfile) { - this.resourceParameterProfile = Optional.ofNullable(resourceParameterProfile); - return this; - } - - /** - *

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

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

Whether Phone Consolidated Experience is enabled for this tenant.

- */ - @JsonSetter(value = "phone_consolidated_experience", nulls = Nulls.SKIP) - public Builder phoneConsolidatedExperience(Optional phoneConsolidatedExperience) { - this.phoneConsolidatedExperience = phoneConsolidatedExperience; - return this; - } - - public Builder phoneConsolidatedExperience(Boolean phoneConsolidatedExperience) { - this.phoneConsolidatedExperience = Optional.ofNullable(phoneConsolidatedExperience); - return this; - } - - public UpdateTenantSettingsRequestContent build() { - return new UpdateTenantSettingsRequestContent( - changePassword, - deviceFlow, - guardianMfaPage, - defaultAudience, - defaultDirectory, - errorPage, - defaultTokenQuota, - flags, - friendlyName, - pictureUrl, - supportEmail, - supportUrl, - allowedLogoutUrls, - sessionLifetime, - idleSessionLifetime, - ephemeralSessionLifetime, - idleEphemeralSessionLifetime, - sandboxVersion, - legacySandboxVersion, - defaultRedirectionUri, - enabledLocales, - sessionCookie, - sessions, - oidcLogout, - customizeMfaInPostloginAction, - allowOrganizationNameInAuthenticationApi, - acrValuesSupported, - mtls, - pushedAuthorizationRequestsSupported, - authorizationResponseIssParameterSupported, - skipNonVerifiableCallbackUriConfirmationPrompt, - resourceParameterProfile, - enableAiGuide, - phoneConsolidatedExperience, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/Action.java b/src/main/java/com/auth0/client/mgmt/types/Action.java deleted file mode 100644 index 0cb6f0fc6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/Action.java +++ /dev/null @@ -1,602 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = Action.Builder.class) -public final class Action { - private final Optional id; - - private final Optional name; - - private final Optional> supportedTriggers; - - private final Optional allChangesDeployed; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional runtime; - - private final Optional> secrets; - - private final Optional deployedVersion; - - private final Optional installedIntegrationId; - - private final Optional integration; - - private final Optional status; - - private final Optional builtAt; - - private final Optional deploy; - - private final Optional> modules; - - private final Map additionalProperties; - - private Action( - Optional id, - Optional name, - Optional> supportedTriggers, - Optional allChangesDeployed, - Optional createdAt, - Optional updatedAt, - Optional code, - Optional> dependencies, - Optional runtime, - Optional> secrets, - Optional deployedVersion, - Optional installedIntegrationId, - Optional integration, - Optional status, - Optional builtAt, - Optional deploy, - Optional> modules, - Map additionalProperties) { - this.id = id; - this.name = name; - this.supportedTriggers = supportedTriggers; - this.allChangesDeployed = allChangesDeployed; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.code = code; - this.dependencies = dependencies; - this.runtime = runtime; - this.secrets = secrets; - this.deployedVersion = deployedVersion; - this.installedIntegrationId = installedIntegrationId; - this.integration = integration; - this.status = status; - this.builtAt = builtAt; - this.deploy = deploy; - this.modules = modules; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the action. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of an action. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The list of triggers that this action supports. At this time, an action can only target a single trigger at a time. - */ - @JsonProperty("supported_triggers") - public Optional> getSupportedTriggers() { - return supportedTriggers; - } - - /** - * @return True if all of an Action's contents have been deployed. - */ - @JsonProperty("all_changes_deployed") - public Optional getAllChangesDeployed() { - return allChangesDeployed; - } - - /** - * @return The time when this action was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when this action was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return The source code of the action. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The list of third party npm modules, and their versions, that this action depends on. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return The Node runtime. For example: node22, defaults to node22 - */ - @JsonProperty("runtime") - public Optional getRuntime() { - return runtime; - } - - /** - * @return The list of secrets that are included in an action or a version of an action. - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - @JsonProperty("deployed_version") - public Optional getDeployedVersion() { - return deployedVersion; - } - - /** - * @return installed_integration_id is the fk reference to the InstalledIntegration entity. - */ - @JsonProperty("installed_integration_id") - public Optional getInstalledIntegrationId() { - return installedIntegrationId; - } - - @JsonProperty("integration") - public Optional getIntegration() { - return integration; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return The time when this action was built successfully. - */ - @JsonProperty("built_at") - public Optional getBuiltAt() { - return builtAt; - } - - /** - * @return True if the action should be deployed after creation. - */ - @JsonProperty("deploy") - public Optional getDeploy() { - return deploy; - } - - /** - * @return The list of action modules and their versions used by this action. - */ - @JsonProperty("modules") - public Optional> getModules() { - return modules; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Action && equalTo((Action) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(Action other) { - return id.equals(other.id) - && name.equals(other.name) - && supportedTriggers.equals(other.supportedTriggers) - && allChangesDeployed.equals(other.allChangesDeployed) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && runtime.equals(other.runtime) - && secrets.equals(other.secrets) - && deployedVersion.equals(other.deployedVersion) - && installedIntegrationId.equals(other.installedIntegrationId) - && integration.equals(other.integration) - && status.equals(other.status) - && builtAt.equals(other.builtAt) - && deploy.equals(other.deploy) - && modules.equals(other.modules); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.supportedTriggers, - this.allChangesDeployed, - this.createdAt, - this.updatedAt, - this.code, - this.dependencies, - this.runtime, - this.secrets, - this.deployedVersion, - this.installedIntegrationId, - this.integration, - this.status, - this.builtAt, - this.deploy, - this.modules); - } - - @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> supportedTriggers = Optional.empty(); - - private Optional allChangesDeployed = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional code = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional runtime = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional deployedVersion = Optional.empty(); - - private Optional installedIntegrationId = Optional.empty(); - - private Optional integration = Optional.empty(); - - private Optional status = Optional.empty(); - - private Optional builtAt = Optional.empty(); - - private Optional deploy = Optional.empty(); - - private Optional> modules = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(Action other) { - id(other.getId()); - name(other.getName()); - supportedTriggers(other.getSupportedTriggers()); - allChangesDeployed(other.getAllChangesDeployed()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - code(other.getCode()); - dependencies(other.getDependencies()); - runtime(other.getRuntime()); - secrets(other.getSecrets()); - deployedVersion(other.getDeployedVersion()); - installedIntegrationId(other.getInstalledIntegrationId()); - integration(other.getIntegration()); - status(other.getStatus()); - builtAt(other.getBuiltAt()); - deploy(other.getDeploy()); - modules(other.getModules()); - return this; - } - - /** - *

The unique ID of the action.

- */ - @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 an action.

- */ - @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 list of triggers that this action supports. At this time, an action can only target a single trigger at a time.

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

True if all of an Action's contents have been deployed.

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

The time when this action 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 time when this action was 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; - } - - /** - *

The source code of the action.

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

The list of third party npm modules, and their versions, that this action depends on.

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

The Node runtime. For example: node22, defaults to node22

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

The list of secrets that are included in an action or a version of an action.

- */ - @JsonSetter(value = "secrets", nulls = Nulls.SKIP) - public Builder secrets(Optional> secrets) { - this.secrets = secrets; - return this; - } - - public Builder secrets(List secrets) { - this.secrets = Optional.ofNullable(secrets); - return this; - } - - @JsonSetter(value = "deployed_version", nulls = Nulls.SKIP) - public Builder deployedVersion(Optional deployedVersion) { - this.deployedVersion = deployedVersion; - return this; - } - - public Builder deployedVersion(ActionDeployedVersion deployedVersion) { - this.deployedVersion = Optional.ofNullable(deployedVersion); - return this; - } - - /** - *

installed_integration_id is the fk reference to the InstalledIntegration entity.

- */ - @JsonSetter(value = "installed_integration_id", nulls = Nulls.SKIP) - public Builder installedIntegrationId(Optional installedIntegrationId) { - this.installedIntegrationId = installedIntegrationId; - return this; - } - - public Builder installedIntegrationId(String installedIntegrationId) { - this.installedIntegrationId = Optional.ofNullable(installedIntegrationId); - return this; - } - - @JsonSetter(value = "integration", nulls = Nulls.SKIP) - public Builder integration(Optional integration) { - this.integration = integration; - return this; - } - - public Builder integration(Integration integration) { - this.integration = Optional.ofNullable(integration); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(ActionBuildStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - /** - *

The time when this action was built successfully.

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

True if the action should be deployed after creation.

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

The list of action modules and their versions used by this action.

- */ - @JsonSetter(value = "modules", nulls = Nulls.SKIP) - public Builder modules(Optional> modules) { - this.modules = modules; - return this; - } - - public Builder modules(List modules) { - this.modules = Optional.ofNullable(modules); - return this; - } - - public Action build() { - return new Action( - id, - name, - supportedTriggers, - allChangesDeployed, - createdAt, - updatedAt, - code, - dependencies, - runtime, - secrets, - deployedVersion, - installedIntegrationId, - integration, - status, - builtAt, - deploy, - modules, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionBase.java b/src/main/java/com/auth0/client/mgmt/types/ActionBase.java deleted file mode 100644 index 5a4f5c3e4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionBase.java +++ /dev/null @@ -1,257 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = ActionBase.Builder.class) -public final class ActionBase { - private final Optional id; - - private final Optional name; - - private final Optional> supportedTriggers; - - private final Optional allChangesDeployed; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private ActionBase( - Optional id, - Optional name, - Optional> supportedTriggers, - Optional allChangesDeployed, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.supportedTriggers = supportedTriggers; - this.allChangesDeployed = allChangesDeployed; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the action. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of an action. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The list of triggers that this action supports. At this time, an action can only target a single trigger at a time. - */ - @JsonProperty("supported_triggers") - public Optional> getSupportedTriggers() { - return supportedTriggers; - } - - /** - * @return True if all of an Action's contents have been deployed. - */ - @JsonProperty("all_changes_deployed") - public Optional getAllChangesDeployed() { - return allChangesDeployed; - } - - /** - * @return The time when this action was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when this action was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionBase && equalTo((ActionBase) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionBase other) { - return id.equals(other.id) - && name.equals(other.name) - && supportedTriggers.equals(other.supportedTriggers) - && allChangesDeployed.equals(other.allChangesDeployed) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.name, this.supportedTriggers, this.allChangesDeployed, this.createdAt, this.updatedAt); - } - - @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> supportedTriggers = Optional.empty(); - - private Optional allChangesDeployed = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionBase other) { - id(other.getId()); - name(other.getName()); - supportedTriggers(other.getSupportedTriggers()); - allChangesDeployed(other.getAllChangesDeployed()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

The unique ID of the action.

- */ - @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 an action.

- */ - @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 list of triggers that this action supports. At this time, an action can only target a single trigger at a time.

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

True if all of an Action's contents have been deployed.

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

The time when this action 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 time when this action was 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; - } - - public ActionBase build() { - return new ActionBase( - id, name, supportedTriggers, allChangesDeployed, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionBinding.java b/src/main/java/com/auth0/client/mgmt/types/ActionBinding.java deleted file mode 100644 index 54cde00d1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionBinding.java +++ /dev/null @@ -1,242 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ActionBinding.Builder.class) -public final class ActionBinding { - private final Optional id; - - private final Optional triggerId; - - private final Optional displayName; - - private final Optional action; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private ActionBinding( - Optional id, - Optional triggerId, - Optional displayName, - Optional action, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.triggerId = triggerId; - this.displayName = displayName; - this.action = action; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of this binding. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("trigger_id") - public Optional getTriggerId() { - return triggerId; - } - - /** - * @return The name of the binding. - */ - @JsonProperty("display_name") - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("action") - public Optional getAction() { - return action; - } - - /** - * @return The time when the binding was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when the binding was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionBinding && equalTo((ActionBinding) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionBinding other) { - return id.equals(other.id) - && triggerId.equals(other.triggerId) - && displayName.equals(other.displayName) - && action.equals(other.action) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.triggerId, this.displayName, this.action, this.createdAt, this.updatedAt); - } - - @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 triggerId = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional action = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionBinding other) { - id(other.getId()); - triggerId(other.getTriggerId()); - displayName(other.getDisplayName()); - action(other.getAction()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

The unique ID of this binding.

- */ - @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 = "trigger_id", nulls = Nulls.SKIP) - public Builder triggerId(Optional triggerId) { - this.triggerId = triggerId; - return this; - } - - public Builder triggerId(String triggerId) { - this.triggerId = Optional.ofNullable(triggerId); - return this; - } - - /** - *

The name of the binding.

- */ - @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 = "action", nulls = Nulls.SKIP) - public Builder action(Optional action) { - this.action = action; - return this; - } - - public Builder action(Action action) { - this.action = Optional.ofNullable(action); - return this; - } - - /** - *

The time when the binding 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 time when the binding was 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; - } - - public ActionBinding build() { - return new ActionBinding(id, triggerId, displayName, action, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionBindingRef.java b/src/main/java/com/auth0/client/mgmt/types/ActionBindingRef.java deleted file mode 100644 index 3be4a031d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionBindingRef.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ActionBindingRef.Builder.class) -public final class ActionBindingRef { - private final Optional type; - - private final Optional value; - - private final Map additionalProperties; - - private ActionBindingRef( - Optional type, Optional value, Map additionalProperties) { - this.type = type; - this.value = value; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return The id or name of an action that is being bound to a trigger. - */ - @JsonProperty("value") - public Optional getValue() { - return value; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionBindingRef && equalTo((ActionBindingRef) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionBindingRef 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 ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional type = Optional.empty(); - - private Optional value = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionBindingRef other) { - type(other.getType()); - value(other.getValue()); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(ActionBindingRefTypeEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

The id or name of an action that is being bound to a trigger.

- */ - @JsonSetter(value = "value", nulls = Nulls.SKIP) - public Builder value(Optional value) { - this.value = value; - return this; - } - - public Builder value(String value) { - this.value = Optional.ofNullable(value); - return this; - } - - public ActionBindingRef build() { - return new ActionBindingRef(type, value, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionBindingRefTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ActionBindingRefTypeEnum.java deleted file mode 100644 index 85c0fc20b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionBindingRefTypeEnum.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ActionBindingRefTypeEnum { - public static final ActionBindingRefTypeEnum BINDING_ID = - new ActionBindingRefTypeEnum(Value.BINDING_ID, "binding_id"); - - public static final ActionBindingRefTypeEnum ACTION_NAME = - new ActionBindingRefTypeEnum(Value.ACTION_NAME, "action_name"); - - public static final ActionBindingRefTypeEnum ACTION_ID = new ActionBindingRefTypeEnum(Value.ACTION_ID, "action_id"); - - private final Value value; - - private final String string; - - ActionBindingRefTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ActionBindingRefTypeEnum - && this.string.equals(((ActionBindingRefTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case BINDING_ID: - return visitor.visitBindingId(); - case ACTION_NAME: - return visitor.visitActionName(); - case ACTION_ID: - return visitor.visitActionId(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ActionBindingRefTypeEnum valueOf(String value) { - switch (value) { - case "binding_id": - return BINDING_ID; - case "action_name": - return ACTION_NAME; - case "action_id": - return ACTION_ID; - default: - return new ActionBindingRefTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - BINDING_ID, - - ACTION_ID, - - ACTION_NAME, - - UNKNOWN - } - - public interface Visitor { - T visitBindingId(); - - T visitActionId(); - - T visitActionName(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionBindingTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ActionBindingTypeEnum.java deleted file mode 100644 index f1495c76a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionBindingTypeEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ActionBindingTypeEnum { - public static final ActionBindingTypeEnum TRIGGER_BOUND = - new ActionBindingTypeEnum(Value.TRIGGER_BOUND, "trigger-bound"); - - public static final ActionBindingTypeEnum ENTITY_BOUND = - new ActionBindingTypeEnum(Value.ENTITY_BOUND, "entity-bound"); - - private final Value value; - - private final String string; - - ActionBindingTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ActionBindingTypeEnum - && this.string.equals(((ActionBindingTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TRIGGER_BOUND: - return visitor.visitTriggerBound(); - case ENTITY_BOUND: - return visitor.visitEntityBound(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ActionBindingTypeEnum valueOf(String value) { - switch (value) { - case "trigger-bound": - return TRIGGER_BOUND; - case "entity-bound": - return ENTITY_BOUND; - default: - return new ActionBindingTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - TRIGGER_BOUND, - - ENTITY_BOUND, - - UNKNOWN - } - - public interface Visitor { - T visitTriggerBound(); - - T visitEntityBound(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionBindingWithRef.java b/src/main/java/com/auth0/client/mgmt/types/ActionBindingWithRef.java deleted file mode 100644 index 530a28018..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionBindingWithRef.java +++ /dev/null @@ -1,191 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ActionBindingWithRef.Builder.class) -public final class ActionBindingWithRef { - private final ActionBindingRef ref; - - private final Optional displayName; - - private final Optional> secrets; - - private final Map additionalProperties; - - private ActionBindingWithRef( - ActionBindingRef ref, - Optional displayName, - Optional> secrets, - Map additionalProperties) { - this.ref = ref; - this.displayName = displayName; - this.secrets = secrets; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("ref") - public ActionBindingRef getRef() { - return ref; - } - - /** - * @return The name of the binding. - */ - @JsonProperty("display_name") - public Optional getDisplayName() { - return displayName; - } - - /** - * @return The list of secrets that are included in an action or a version of an action. - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionBindingWithRef && equalTo((ActionBindingWithRef) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionBindingWithRef other) { - return ref.equals(other.ref) && displayName.equals(other.displayName) && secrets.equals(other.secrets); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.ref, this.displayName, this.secrets); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static RefStage builder() { - return new Builder(); - } - - public interface RefStage { - _FinalStage ref(@NotNull ActionBindingRef ref); - - Builder from(ActionBindingWithRef other); - } - - public interface _FinalStage { - ActionBindingWithRef build(); - - /** - *

The name of the binding.

- */ - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - /** - *

The list of secrets that are included in an action or a version of an action.

- */ - _FinalStage secrets(Optional> secrets); - - _FinalStage secrets(List secrets); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements RefStage, _FinalStage { - private ActionBindingRef ref; - - private Optional> secrets = Optional.empty(); - - private Optional displayName = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ActionBindingWithRef other) { - ref(other.getRef()); - displayName(other.getDisplayName()); - secrets(other.getSecrets()); - return this; - } - - @java.lang.Override - @JsonSetter("ref") - public _FinalStage ref(@NotNull ActionBindingRef ref) { - this.ref = Objects.requireNonNull(ref, "ref must not be null"); - return this; - } - - /** - *

The list of secrets that are included in an action or a version of an action.

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

The list of secrets that are included in an action or a version of an action.

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

The name of the binding.

- * @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; - } - - /** - *

The name of the binding.

- */ - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public ActionBindingWithRef build() { - return new ActionBindingWithRef(ref, displayName, secrets, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionBuildStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/ActionBuildStatusEnum.java deleted file mode 100644 index 6370c3f4b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionBuildStatusEnum.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ActionBuildStatusEnum { - public static final ActionBuildStatusEnum FAILED = new ActionBuildStatusEnum(Value.FAILED, "failed"); - - public static final ActionBuildStatusEnum PENDING = new ActionBuildStatusEnum(Value.PENDING, "pending"); - - public static final ActionBuildStatusEnum BUILT = new ActionBuildStatusEnum(Value.BUILT, "built"); - - public static final ActionBuildStatusEnum BUILDING = new ActionBuildStatusEnum(Value.BUILDING, "building"); - - public static final ActionBuildStatusEnum PACKAGED = new ActionBuildStatusEnum(Value.PACKAGED, "packaged"); - - public static final ActionBuildStatusEnum RETRYING = new ActionBuildStatusEnum(Value.RETRYING, "retrying"); - - private final Value value; - - private final String string; - - ActionBuildStatusEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ActionBuildStatusEnum - && this.string.equals(((ActionBuildStatusEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FAILED: - return visitor.visitFailed(); - case PENDING: - return visitor.visitPending(); - case BUILT: - return visitor.visitBuilt(); - case BUILDING: - return visitor.visitBuilding(); - case PACKAGED: - return visitor.visitPackaged(); - case RETRYING: - return visitor.visitRetrying(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ActionBuildStatusEnum valueOf(String value) { - switch (value) { - case "failed": - return FAILED; - case "pending": - return PENDING; - case "built": - return BUILT; - case "building": - return BUILDING; - case "packaged": - return PACKAGED; - case "retrying": - return RETRYING; - default: - return new ActionBuildStatusEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PENDING, - - BUILDING, - - PACKAGED, - - BUILT, - - RETRYING, - - FAILED, - - UNKNOWN - } - - public interface Visitor { - T visitPending(); - - T visitBuilding(); - - T visitPackaged(); - - T visitBuilt(); - - T visitRetrying(); - - T visitFailed(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionDeployedVersion.java b/src/main/java/com/auth0/client/mgmt/types/ActionDeployedVersion.java deleted file mode 100644 index c30564982..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionDeployedVersion.java +++ /dev/null @@ -1,576 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = ActionDeployedVersion.Builder.class) -public final class ActionDeployedVersion { - private final Optional id; - - private final Optional actionId; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional deployed; - - private final Optional runtime; - - private final Optional> secrets; - - private final Optional status; - - private final Optional number; - - private final Optional> errors; - - private final Optional action; - - private final Optional builtAt; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional> supportedTriggers; - - private final Optional> modules; - - private final Map additionalProperties; - - private ActionDeployedVersion( - Optional id, - Optional actionId, - Optional code, - Optional> dependencies, - Optional deployed, - Optional runtime, - Optional> secrets, - Optional status, - Optional number, - Optional> errors, - Optional action, - Optional builtAt, - Optional createdAt, - Optional updatedAt, - Optional> supportedTriggers, - Optional> modules, - Map additionalProperties) { - this.id = id; - this.actionId = actionId; - this.code = code; - this.dependencies = dependencies; - this.deployed = deployed; - this.runtime = runtime; - this.secrets = secrets; - this.status = status; - this.number = number; - this.errors = errors; - this.action = action; - this.builtAt = builtAt; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.supportedTriggers = supportedTriggers; - this.modules = modules; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique id of an action version. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The id of the action to which this version belongs. - */ - @JsonProperty("action_id") - public Optional getActionId() { - return actionId; - } - - /** - * @return The source code of this specific version of the action. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The list of third party npm modules, and their versions, that this specific version depends on. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return Indicates if this specific version is the currently one deployed. - */ - @JsonProperty("deployed") - public Optional getDeployed() { - return deployed; - } - - /** - * @return The Node runtime. For example: node22 - */ - @JsonProperty("runtime") - public Optional getRuntime() { - return runtime; - } - - /** - * @return The list of secrets that are included in an action or a version of an action. - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return The index of this version in list of versions for the action. - */ - @JsonProperty("number") - public Optional getNumber() { - return number; - } - - /** - * @return Any errors that occurred while the version was being built. - */ - @JsonProperty("errors") - public Optional> getErrors() { - return errors; - } - - @JsonProperty("action") - public Optional getAction() { - return action; - } - - /** - * @return The time when this version was built successfully. - */ - @JsonProperty("built_at") - public Optional getBuiltAt() { - return builtAt; - } - - /** - * @return The time when this version was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when a version was updated. Versions are never updated externally. Only Auth0 will update an action version as it is being built. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return The list of triggers that this version supports. At this time, a version can only target a single trigger at a time. - */ - @JsonProperty("supported_triggers") - public Optional> getSupportedTriggers() { - return supportedTriggers; - } - - /** - * @return The list of action modules and their versions used by this action version. - */ - @JsonProperty("modules") - public Optional> getModules() { - return modules; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionDeployedVersion && equalTo((ActionDeployedVersion) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionDeployedVersion other) { - return id.equals(other.id) - && actionId.equals(other.actionId) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && deployed.equals(other.deployed) - && runtime.equals(other.runtime) - && secrets.equals(other.secrets) - && status.equals(other.status) - && number.equals(other.number) - && errors.equals(other.errors) - && action.equals(other.action) - && builtAt.equals(other.builtAt) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && supportedTriggers.equals(other.supportedTriggers) - && modules.equals(other.modules); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.actionId, - this.code, - this.dependencies, - this.deployed, - this.runtime, - this.secrets, - this.status, - this.number, - this.errors, - this.action, - this.builtAt, - this.createdAt, - this.updatedAt, - this.supportedTriggers, - this.modules); - } - - @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 actionId = Optional.empty(); - - private Optional code = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional deployed = Optional.empty(); - - private Optional runtime = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional status = Optional.empty(); - - private Optional number = Optional.empty(); - - private Optional> errors = Optional.empty(); - - private Optional action = Optional.empty(); - - private Optional builtAt = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional> supportedTriggers = Optional.empty(); - - private Optional> modules = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionDeployedVersion other) { - id(other.getId()); - actionId(other.getActionId()); - code(other.getCode()); - dependencies(other.getDependencies()); - deployed(other.getDeployed()); - runtime(other.getRuntime()); - secrets(other.getSecrets()); - status(other.getStatus()); - number(other.getNumber()); - errors(other.getErrors()); - action(other.getAction()); - builtAt(other.getBuiltAt()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - supportedTriggers(other.getSupportedTriggers()); - modules(other.getModules()); - return this; - } - - /** - *

The unique id of an action version.

- */ - @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 id of the action to which this version belongs.

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

The source code of this specific version of the action.

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

The list of third party npm modules, and their versions, that this specific version depends on.

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

Indicates if this specific version is the currently one deployed.

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

The Node runtime. For example: node22

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

The list of secrets that are included in an action or a version of an action.

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

The index of this version in list of versions for the action.

- */ - @JsonSetter(value = "number", nulls = Nulls.SKIP) - public Builder number(Optional number) { - this.number = number; - return this; - } - - public Builder number(Double number) { - this.number = Optional.ofNullable(number); - return this; - } - - /** - *

Any errors that occurred while the version was being built.

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

The time when this version was built successfully.

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

The time when this version 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 time when a version was updated. Versions are never updated externally. Only Auth0 will update an action version as it is being built.

- */ - @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; - } - - /** - *

The list of triggers that this version supports. At this time, a version can only target a single trigger at a time.

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

The list of action modules and their versions used by this action version.

- */ - @JsonSetter(value = "modules", nulls = Nulls.SKIP) - public Builder modules(Optional> modules) { - this.modules = modules; - return this; - } - - public Builder modules(List modules) { - this.modules = Optional.ofNullable(modules); - return this; - } - - public ActionDeployedVersion build() { - return new ActionDeployedVersion( - id, - actionId, - code, - dependencies, - deployed, - runtime, - secrets, - status, - number, - errors, - action, - builtAt, - createdAt, - updatedAt, - supportedTriggers, - modules, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionError.java b/src/main/java/com/auth0/client/mgmt/types/ActionError.java deleted file mode 100644 index 490a8520c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionError.java +++ /dev/null @@ -1,140 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ActionError.Builder.class) -public final class ActionError { - private final Optional id; - - private final Optional msg; - - private final Optional url; - - private final Map additionalProperties; - - private ActionError( - Optional id, Optional msg, Optional url, Map additionalProperties) { - this.id = id; - this.msg = msg; - this.url = url; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("msg") - public Optional getMsg() { - return msg; - } - - @JsonProperty("url") - public Optional getUrl() { - return url; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionError && equalTo((ActionError) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionError other) { - return id.equals(other.id) && msg.equals(other.msg) && url.equals(other.url); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.msg, this.url); - } - - @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 msg = Optional.empty(); - - private Optional url = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionError other) { - id(other.getId()); - msg(other.getMsg()); - url(other.getUrl()); - 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 = "msg", nulls = Nulls.SKIP) - public Builder msg(Optional msg) { - this.msg = msg; - return this; - } - - public Builder msg(String msg) { - this.msg = Optional.ofNullable(msg); - return this; - } - - @JsonSetter(value = "url", nulls = Nulls.SKIP) - public Builder url(Optional url) { - this.url = url; - return this; - } - - public Builder url(String url) { - this.url = Optional.ofNullable(url); - return this; - } - - public ActionError build() { - return new ActionError(id, msg, url, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionExecutionResult.java b/src/main/java/com/auth0/client/mgmt/types/ActionExecutionResult.java deleted file mode 100644 index a7e149c1a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionExecutionResult.java +++ /dev/null @@ -1,188 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ActionExecutionResult.Builder.class) -public final class ActionExecutionResult { - private final Optional actionName; - - private final Optional error; - - private final Optional startedAt; - - private final Optional endedAt; - - private final Map additionalProperties; - - private ActionExecutionResult( - Optional actionName, - Optional error, - Optional startedAt, - Optional endedAt, - Map additionalProperties) { - this.actionName = actionName; - this.error = error; - this.startedAt = startedAt; - this.endedAt = endedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the action that was executed. - */ - @JsonProperty("action_name") - public Optional getActionName() { - return actionName; - } - - @JsonProperty("error") - public Optional getError() { - return error; - } - - /** - * @return The time when the action was started. - */ - @JsonProperty("started_at") - public Optional getStartedAt() { - return startedAt; - } - - /** - * @return The time when the action finished executing. - */ - @JsonProperty("ended_at") - public Optional getEndedAt() { - return endedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionExecutionResult && equalTo((ActionExecutionResult) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionExecutionResult other) { - return actionName.equals(other.actionName) - && error.equals(other.error) - && startedAt.equals(other.startedAt) - && endedAt.equals(other.endedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.actionName, this.error, this.startedAt, this.endedAt); - } - - @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 actionName = Optional.empty(); - - private Optional error = Optional.empty(); - - private Optional startedAt = Optional.empty(); - - private Optional endedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionExecutionResult other) { - actionName(other.getActionName()); - error(other.getError()); - startedAt(other.getStartedAt()); - endedAt(other.getEndedAt()); - return this; - } - - /** - *

The name of the action that was executed.

- */ - @JsonSetter(value = "action_name", nulls = Nulls.SKIP) - public Builder actionName(Optional actionName) { - this.actionName = actionName; - return this; - } - - public Builder actionName(String actionName) { - this.actionName = Optional.ofNullable(actionName); - return this; - } - - @JsonSetter(value = "error", nulls = Nulls.SKIP) - public Builder error(Optional error) { - this.error = error; - return this; - } - - public Builder error(ActionError error) { - this.error = Optional.ofNullable(error); - return this; - } - - /** - *

The time when the action was started.

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

The time when the action finished executing.

- */ - @JsonSetter(value = "ended_at", nulls = Nulls.SKIP) - public Builder endedAt(Optional endedAt) { - this.endedAt = endedAt; - return this; - } - - public Builder endedAt(OffsetDateTime endedAt) { - this.endedAt = Optional.ofNullable(endedAt); - return this; - } - - public ActionExecutionResult build() { - return new ActionExecutionResult(actionName, error, startedAt, endedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionExecutionStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/ActionExecutionStatusEnum.java deleted file mode 100644 index 180a710c3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionExecutionStatusEnum.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ActionExecutionStatusEnum { - public static final ActionExecutionStatusEnum PARTIAL = new ActionExecutionStatusEnum(Value.PARTIAL, "partial"); - - public static final ActionExecutionStatusEnum UNSPECIFIED = - new ActionExecutionStatusEnum(Value.UNSPECIFIED, "unspecified"); - - public static final ActionExecutionStatusEnum FINAL = new ActionExecutionStatusEnum(Value.FINAL, "final"); - - public static final ActionExecutionStatusEnum PENDING = new ActionExecutionStatusEnum(Value.PENDING, "pending"); - - public static final ActionExecutionStatusEnum CANCELED = new ActionExecutionStatusEnum(Value.CANCELED, "canceled"); - - public static final ActionExecutionStatusEnum SUSPENDED = - new ActionExecutionStatusEnum(Value.SUSPENDED, "suspended"); - - private final Value value; - - private final String string; - - ActionExecutionStatusEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ActionExecutionStatusEnum - && this.string.equals(((ActionExecutionStatusEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PARTIAL: - return visitor.visitPartial(); - case UNSPECIFIED: - return visitor.visitUnspecified(); - case FINAL: - return visitor.visitFinal(); - case PENDING: - return visitor.visitPending(); - case CANCELED: - return visitor.visitCanceled(); - case SUSPENDED: - return visitor.visitSuspended(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ActionExecutionStatusEnum valueOf(String value) { - switch (value) { - case "partial": - return PARTIAL; - case "unspecified": - return UNSPECIFIED; - case "final": - return FINAL; - case "pending": - return PENDING; - case "canceled": - return CANCELED; - case "suspended": - return SUSPENDED; - default: - return new ActionExecutionStatusEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - UNSPECIFIED, - - PENDING, - - FINAL, - - PARTIAL, - - CANCELED, - - SUSPENDED, - - UNKNOWN - } - - public interface Visitor { - T visitUnspecified(); - - T visitPending(); - - T visitFinal(); - - T visitPartial(); - - T visitCanceled(); - - T visitSuspended(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionModuleAction.java b/src/main/java/com/auth0/client/mgmt/types/ActionModuleAction.java deleted file mode 100644 index 1ede76781..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionModuleAction.java +++ /dev/null @@ -1,231 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ActionModuleAction.Builder.class) -public final class ActionModuleAction { - private final Optional actionId; - - private final Optional actionName; - - private final Optional moduleVersionId; - - private final Optional moduleVersionNumber; - - private final Optional> supportedTriggers; - - private final Map additionalProperties; - - private ActionModuleAction( - Optional actionId, - Optional actionName, - Optional moduleVersionId, - Optional moduleVersionNumber, - Optional> supportedTriggers, - Map additionalProperties) { - this.actionId = actionId; - this.actionName = actionName; - this.moduleVersionId = moduleVersionId; - this.moduleVersionNumber = moduleVersionNumber; - this.supportedTriggers = supportedTriggers; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the action. - */ - @JsonProperty("action_id") - public Optional getActionId() { - return actionId; - } - - /** - * @return The name of the action. - */ - @JsonProperty("action_name") - public Optional getActionName() { - return actionName; - } - - /** - * @return The ID of the module version this action is using. - */ - @JsonProperty("module_version_id") - public Optional getModuleVersionId() { - return moduleVersionId; - } - - /** - * @return The version number of the module this action is using. - */ - @JsonProperty("module_version_number") - public Optional getModuleVersionNumber() { - return moduleVersionNumber; - } - - /** - * @return The triggers that this action supports. - */ - @JsonProperty("supported_triggers") - public Optional> getSupportedTriggers() { - return supportedTriggers; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionModuleAction && equalTo((ActionModuleAction) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionModuleAction other) { - return actionId.equals(other.actionId) - && actionName.equals(other.actionName) - && moduleVersionId.equals(other.moduleVersionId) - && moduleVersionNumber.equals(other.moduleVersionNumber) - && supportedTriggers.equals(other.supportedTriggers); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.actionId, this.actionName, this.moduleVersionId, this.moduleVersionNumber, this.supportedTriggers); - } - - @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 actionId = Optional.empty(); - - private Optional actionName = Optional.empty(); - - private Optional moduleVersionId = Optional.empty(); - - private Optional moduleVersionNumber = Optional.empty(); - - private Optional> supportedTriggers = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionModuleAction other) { - actionId(other.getActionId()); - actionName(other.getActionName()); - moduleVersionId(other.getModuleVersionId()); - moduleVersionNumber(other.getModuleVersionNumber()); - supportedTriggers(other.getSupportedTriggers()); - return this; - } - - /** - *

The unique ID of the action.

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

The name of the action.

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

The ID of the module version this action is using.

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

The version number of the module this action is using.

- */ - @JsonSetter(value = "module_version_number", nulls = Nulls.SKIP) - public Builder moduleVersionNumber(Optional moduleVersionNumber) { - this.moduleVersionNumber = moduleVersionNumber; - return this; - } - - public Builder moduleVersionNumber(Integer moduleVersionNumber) { - this.moduleVersionNumber = Optional.ofNullable(moduleVersionNumber); - return this; - } - - /** - *

The triggers that this action supports.

- */ - @JsonSetter(value = "supported_triggers", nulls = Nulls.SKIP) - public Builder supportedTriggers(Optional> supportedTriggers) { - this.supportedTriggers = supportedTriggers; - return this; - } - - public Builder supportedTriggers(List supportedTriggers) { - this.supportedTriggers = Optional.ofNullable(supportedTriggers); - return this; - } - - public ActionModuleAction build() { - return new ActionModuleAction( - actionId, - actionName, - moduleVersionId, - moduleVersionNumber, - supportedTriggers, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionModuleDependency.java b/src/main/java/com/auth0/client/mgmt/types/ActionModuleDependency.java deleted file mode 100644 index 27e89b890..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionModuleDependency.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ActionModuleDependency.Builder.class) -public final class ActionModuleDependency { - private final Optional name; - - private final Optional version; - - private final Map additionalProperties; - - private ActionModuleDependency( - Optional name, Optional version, Map additionalProperties) { - this.name = name; - this.version = version; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the npm dependency. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The version of the npm dependency. - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionModuleDependency && equalTo((ActionModuleDependency) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionModuleDependency other) { - return name.equals(other.name) && version.equals(other.version); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.version); - } - - @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 version = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionModuleDependency other) { - name(other.getName()); - version(other.getVersion()); - return this; - } - - /** - *

The name of the npm dependency.

- */ - @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 version of the npm dependency.

- */ - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public Builder version(Optional version) { - this.version = version; - return this; - } - - public Builder version(String version) { - this.version = Optional.ofNullable(version); - return this; - } - - public ActionModuleDependency build() { - return new ActionModuleDependency(name, version, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionModuleDependencyRequest.java b/src/main/java/com/auth0/client/mgmt/types/ActionModuleDependencyRequest.java deleted file mode 100644 index 75708a39a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionModuleDependencyRequest.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = ActionModuleDependencyRequest.Builder.class) -public final class ActionModuleDependencyRequest { - private final String name; - - private final String version; - - private final Map additionalProperties; - - private ActionModuleDependencyRequest(String name, String version, Map additionalProperties) { - this.name = name; - this.version = version; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the npm dependency. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return The version of the npm dependency. - */ - @JsonProperty("version") - public String getVersion() { - return version; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionModuleDependencyRequest && equalTo((ActionModuleDependencyRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionModuleDependencyRequest other) { - return name.equals(other.name) && version.equals(other.version); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.version); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

The name of the npm dependency.

- */ - VersionStage name(@NotNull String name); - - Builder from(ActionModuleDependencyRequest other); - } - - public interface VersionStage { - /** - *

The version of the npm dependency.

- */ - _FinalStage version(@NotNull String version); - } - - public interface _FinalStage { - ActionModuleDependencyRequest build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, VersionStage, _FinalStage { - private String name; - - private String version; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ActionModuleDependencyRequest other) { - name(other.getName()); - version(other.getVersion()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("name") - public VersionStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("version") - public _FinalStage version(@NotNull String version) { - this.version = Objects.requireNonNull(version, "version must not be null"); - return this; - } - - @java.lang.Override - public ActionModuleDependencyRequest build() { - return new ActionModuleDependencyRequest(name, version, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionModuleListItem.java b/src/main/java/com/auth0/client/mgmt/types/ActionModuleListItem.java deleted file mode 100644 index f36626cc8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionModuleListItem.java +++ /dev/null @@ -1,396 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = ActionModuleListItem.Builder.class) -public final class ActionModuleListItem { - private final Optional id; - - private final Optional name; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional> secrets; - - private final Optional actionsUsingModuleTotal; - - private final Optional allChangesPublished; - - private final Optional latestVersionNumber; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private ActionModuleListItem( - Optional id, - Optional name, - Optional code, - Optional> dependencies, - Optional> secrets, - Optional actionsUsingModuleTotal, - Optional allChangesPublished, - Optional latestVersionNumber, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.code = code; - this.dependencies = dependencies; - this.secrets = secrets; - this.actionsUsingModuleTotal = actionsUsingModuleTotal; - this.allChangesPublished = allChangesPublished; - this.latestVersionNumber = latestVersionNumber; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the module. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the module. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The source code from the module's draft version. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The npm dependencies from the module's draft version. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return The secrets from the module's draft version (names and timestamps only, values never returned). - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - /** - * @return The number of deployed actions using this module. - */ - @JsonProperty("actions_using_module_total") - public Optional getActionsUsingModuleTotal() { - return actionsUsingModuleTotal; - } - - /** - * @return Whether all draft changes have been published as a version. - */ - @JsonProperty("all_changes_published") - public Optional getAllChangesPublished() { - return allChangesPublished; - } - - /** - * @return The version number of the latest published version. Omitted if no versions have been published. - */ - @JsonProperty("latest_version_number") - public Optional getLatestVersionNumber() { - return latestVersionNumber; - } - - /** - * @return Timestamp when the module was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return Timestamp when the module was last updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionModuleListItem && equalTo((ActionModuleListItem) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionModuleListItem other) { - return id.equals(other.id) - && name.equals(other.name) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && secrets.equals(other.secrets) - && actionsUsingModuleTotal.equals(other.actionsUsingModuleTotal) - && allChangesPublished.equals(other.allChangesPublished) - && latestVersionNumber.equals(other.latestVersionNumber) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.code, - this.dependencies, - this.secrets, - this.actionsUsingModuleTotal, - this.allChangesPublished, - this.latestVersionNumber, - this.createdAt, - this.updatedAt); - } - - @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 code = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional actionsUsingModuleTotal = Optional.empty(); - - private Optional allChangesPublished = Optional.empty(); - - private Optional latestVersionNumber = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionModuleListItem other) { - id(other.getId()); - name(other.getName()); - code(other.getCode()); - dependencies(other.getDependencies()); - secrets(other.getSecrets()); - actionsUsingModuleTotal(other.getActionsUsingModuleTotal()); - allChangesPublished(other.getAllChangesPublished()); - latestVersionNumber(other.getLatestVersionNumber()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

The unique ID of the module.

- */ - @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 the module.

- */ - @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 source code from the module's draft version.

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

The npm dependencies from the module's draft version.

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

The secrets from the module's draft version (names and timestamps only, values never returned).

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

The number of deployed actions using this module.

- */ - @JsonSetter(value = "actions_using_module_total", nulls = Nulls.SKIP) - public Builder actionsUsingModuleTotal(Optional actionsUsingModuleTotal) { - this.actionsUsingModuleTotal = actionsUsingModuleTotal; - return this; - } - - public Builder actionsUsingModuleTotal(Integer actionsUsingModuleTotal) { - this.actionsUsingModuleTotal = Optional.ofNullable(actionsUsingModuleTotal); - return this; - } - - /** - *

Whether all draft changes have been published as a version.

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

The version number of the latest published version. Omitted if no versions have been published.

- */ - @JsonSetter(value = "latest_version_number", nulls = Nulls.SKIP) - public Builder latestVersionNumber(Optional latestVersionNumber) { - this.latestVersionNumber = latestVersionNumber; - return this; - } - - public Builder latestVersionNumber(Integer latestVersionNumber) { - this.latestVersionNumber = Optional.ofNullable(latestVersionNumber); - return this; - } - - /** - *

Timestamp when the module 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; - } - - /** - *

Timestamp when the module 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; - } - - public ActionModuleListItem build() { - return new ActionModuleListItem( - id, - name, - code, - dependencies, - secrets, - actionsUsingModuleTotal, - allChangesPublished, - latestVersionNumber, - createdAt, - updatedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionModuleReference.java b/src/main/java/com/auth0/client/mgmt/types/ActionModuleReference.java deleted file mode 100644 index 6f12cdfd3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionModuleReference.java +++ /dev/null @@ -1,194 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ActionModuleReference.Builder.class) -public final class ActionModuleReference { - private final Optional moduleId; - - private final Optional moduleName; - - private final Optional moduleVersionId; - - private final Optional moduleVersionNumber; - - private final Map additionalProperties; - - private ActionModuleReference( - Optional moduleId, - Optional moduleName, - Optional moduleVersionId, - Optional moduleVersionNumber, - Map additionalProperties) { - this.moduleId = moduleId; - this.moduleName = moduleName; - this.moduleVersionId = moduleVersionId; - this.moduleVersionNumber = moduleVersionNumber; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the module. - */ - @JsonProperty("module_id") - public Optional getModuleId() { - return moduleId; - } - - /** - * @return The name of the module. - */ - @JsonProperty("module_name") - public Optional getModuleName() { - return moduleName; - } - - /** - * @return The ID of the specific module version. - */ - @JsonProperty("module_version_id") - public Optional getModuleVersionId() { - return moduleVersionId; - } - - /** - * @return The version number of the module. - */ - @JsonProperty("module_version_number") - public Optional getModuleVersionNumber() { - return moduleVersionNumber; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionModuleReference && equalTo((ActionModuleReference) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionModuleReference other) { - return moduleId.equals(other.moduleId) - && moduleName.equals(other.moduleName) - && moduleVersionId.equals(other.moduleVersionId) - && moduleVersionNumber.equals(other.moduleVersionNumber); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.moduleId, this.moduleName, this.moduleVersionId, this.moduleVersionNumber); - } - - @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 moduleId = Optional.empty(); - - private Optional moduleName = Optional.empty(); - - private Optional moduleVersionId = Optional.empty(); - - private Optional moduleVersionNumber = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionModuleReference other) { - moduleId(other.getModuleId()); - moduleName(other.getModuleName()); - moduleVersionId(other.getModuleVersionId()); - moduleVersionNumber(other.getModuleVersionNumber()); - return this; - } - - /** - *

The unique ID of the module.

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

The name of the module.

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

The ID of the specific module version.

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

The version number of the module.

- */ - @JsonSetter(value = "module_version_number", nulls = Nulls.SKIP) - public Builder moduleVersionNumber(Optional moduleVersionNumber) { - this.moduleVersionNumber = moduleVersionNumber; - return this; - } - - public Builder moduleVersionNumber(Integer moduleVersionNumber) { - this.moduleVersionNumber = Optional.ofNullable(moduleVersionNumber); - return this; - } - - public ActionModuleReference build() { - return new ActionModuleReference( - moduleId, moduleName, moduleVersionId, moduleVersionNumber, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionModuleSecret.java b/src/main/java/com/auth0/client/mgmt/types/ActionModuleSecret.java deleted file mode 100644 index ee4bdcc2c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionModuleSecret.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ActionModuleSecret.Builder.class) -public final class ActionModuleSecret { - private final Optional name; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private ActionModuleSecret( - Optional name, Optional updatedAt, Map additionalProperties) { - this.name = name; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the secret. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The time when the secret was last updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionModuleSecret && equalTo((ActionModuleSecret) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionModuleSecret other) { - return name.equals(other.name) && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.updatedAt); - } - - @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 updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionModuleSecret other) { - name(other.getName()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

The name of the secret.

- */ - @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 time when the secret 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; - } - - public ActionModuleSecret build() { - return new ActionModuleSecret(name, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionModuleSecretRequest.java b/src/main/java/com/auth0/client/mgmt/types/ActionModuleSecretRequest.java deleted file mode 100644 index fa9fa3501..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionModuleSecretRequest.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = ActionModuleSecretRequest.Builder.class) -public final class ActionModuleSecretRequest { - private final String name; - - private final String value; - - private final Map additionalProperties; - - private ActionModuleSecretRequest(String name, String value, Map additionalProperties) { - this.name = name; - this.value = value; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the secret. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return The value of the secret. - */ - @JsonProperty("value") - public String getValue() { - return value; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionModuleSecretRequest && equalTo((ActionModuleSecretRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionModuleSecretRequest other) { - return name.equals(other.name) && value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.value); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

The name of the secret.

- */ - ValueStage name(@NotNull String name); - - Builder from(ActionModuleSecretRequest other); - } - - public interface ValueStage { - /** - *

The value of the secret.

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

The name of the secret.

- *

The name of the secret.

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

The value of the secret.

- *

The value of the secret.

- * @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 ActionModuleSecretRequest build() { - return new ActionModuleSecretRequest(name, value, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionModuleVersion.java b/src/main/java/com/auth0/client/mgmt/types/ActionModuleVersion.java deleted file mode 100644 index e66ba404e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionModuleVersion.java +++ /dev/null @@ -1,287 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = ActionModuleVersion.Builder.class) -public final class ActionModuleVersion { - private final Optional id; - - private final Optional moduleId; - - private final Optional versionNumber; - - private final Optional code; - - private final Optional> secrets; - - private final Optional> dependencies; - - private final Optional createdAt; - - private final Map additionalProperties; - - private ActionModuleVersion( - Optional id, - Optional moduleId, - Optional versionNumber, - Optional code, - Optional> secrets, - Optional> dependencies, - Optional createdAt, - Map additionalProperties) { - this.id = id; - this.moduleId = moduleId; - this.versionNumber = versionNumber; - this.code = code; - this.secrets = secrets; - this.dependencies = dependencies; - this.createdAt = createdAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID for this version. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The ID of the parent module. - */ - @JsonProperty("module_id") - public Optional getModuleId() { - return moduleId; - } - - /** - * @return The sequential version number. - */ - @JsonProperty("version_number") - public Optional getVersionNumber() { - return versionNumber; - } - - /** - * @return The exact source code that was published with this version. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return Secrets available to this version (name and updated_at only, values never returned). - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - /** - * @return Dependencies locked to this version. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return The timestamp when this version was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionModuleVersion && equalTo((ActionModuleVersion) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionModuleVersion other) { - return id.equals(other.id) - && moduleId.equals(other.moduleId) - && versionNumber.equals(other.versionNumber) - && code.equals(other.code) - && secrets.equals(other.secrets) - && dependencies.equals(other.dependencies) - && createdAt.equals(other.createdAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.moduleId, this.versionNumber, this.code, this.secrets, this.dependencies, this.createdAt); - } - - @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 moduleId = Optional.empty(); - - private Optional versionNumber = Optional.empty(); - - private Optional code = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionModuleVersion other) { - id(other.getId()); - moduleId(other.getModuleId()); - versionNumber(other.getVersionNumber()); - code(other.getCode()); - secrets(other.getSecrets()); - dependencies(other.getDependencies()); - createdAt(other.getCreatedAt()); - return this; - } - - /** - *

The unique ID for this version.

- */ - @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 ID of the parent module.

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

The sequential version number.

- */ - @JsonSetter(value = "version_number", nulls = Nulls.SKIP) - public Builder versionNumber(Optional versionNumber) { - this.versionNumber = versionNumber; - return this; - } - - public Builder versionNumber(Integer versionNumber) { - this.versionNumber = Optional.ofNullable(versionNumber); - return this; - } - - /** - *

The exact source code that was published with this version.

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

Secrets available to this version (name and updated_at only, values never returned).

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

Dependencies locked to this version.

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

The timestamp when this version 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; - } - - public ActionModuleVersion build() { - return new ActionModuleVersion( - id, moduleId, versionNumber, code, secrets, dependencies, createdAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionModuleVersionReference.java b/src/main/java/com/auth0/client/mgmt/types/ActionModuleVersionReference.java deleted file mode 100644 index 127927ec8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionModuleVersionReference.java +++ /dev/null @@ -1,256 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = ActionModuleVersionReference.Builder.class) -public final class ActionModuleVersionReference { - private final Optional id; - - private final Optional versionNumber; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional> secrets; - - private final Optional createdAt; - - private final Map additionalProperties; - - private ActionModuleVersionReference( - Optional id, - Optional versionNumber, - Optional code, - Optional> dependencies, - Optional> secrets, - Optional createdAt, - Map additionalProperties) { - this.id = id; - this.versionNumber = versionNumber; - this.code = code; - this.dependencies = dependencies; - this.secrets = secrets; - this.createdAt = createdAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the version. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The version number. - */ - @JsonProperty("version_number") - public Optional getVersionNumber() { - return versionNumber; - } - - /** - * @return The source code from this version. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The npm dependencies from this version. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return The secrets from this version (names and timestamps only, values never returned). - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - /** - * @return Timestamp when the version was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionModuleVersionReference && equalTo((ActionModuleVersionReference) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionModuleVersionReference other) { - return id.equals(other.id) - && versionNumber.equals(other.versionNumber) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && secrets.equals(other.secrets) - && createdAt.equals(other.createdAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.versionNumber, this.code, this.dependencies, this.secrets, this.createdAt); - } - - @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 versionNumber = Optional.empty(); - - private Optional code = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionModuleVersionReference other) { - id(other.getId()); - versionNumber(other.getVersionNumber()); - code(other.getCode()); - dependencies(other.getDependencies()); - secrets(other.getSecrets()); - createdAt(other.getCreatedAt()); - return this; - } - - /** - *

The unique ID of the version.

- */ - @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 version number.

- */ - @JsonSetter(value = "version_number", nulls = Nulls.SKIP) - public Builder versionNumber(Optional versionNumber) { - this.versionNumber = versionNumber; - return this; - } - - public Builder versionNumber(Integer versionNumber) { - this.versionNumber = Optional.ofNullable(versionNumber); - return this; - } - - /** - *

The source code from this version.

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

The npm dependencies from this version.

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

The secrets from this version (names and timestamps only, values never returned).

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

Timestamp when the version 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; - } - - public ActionModuleVersionReference build() { - return new ActionModuleVersionReference( - id, versionNumber, code, dependencies, secrets, createdAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionSecretRequest.java b/src/main/java/com/auth0/client/mgmt/types/ActionSecretRequest.java deleted file mode 100644 index 0e2f8be7c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionSecretRequest.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ActionSecretRequest.Builder.class) -public final class ActionSecretRequest { - private final Optional name; - - private final Optional value; - - private final Map additionalProperties; - - private ActionSecretRequest( - Optional name, Optional value, Map additionalProperties) { - this.name = name; - this.value = value; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the particular secret, e.g. API_KEY. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The value of the particular secret, e.g. secret123. A secret's value can only be set upon creation. A secret's value will never be returned by the API. - */ - @JsonProperty("value") - public Optional getValue() { - return value; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionSecretRequest && equalTo((ActionSecretRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionSecretRequest other) { - return name.equals(other.name) && value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.value); - } - - @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 value = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionSecretRequest other) { - name(other.getName()); - value(other.getValue()); - return this; - } - - /** - *

The name of the particular secret, e.g. API_KEY.

- */ - @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 value of the particular secret, e.g. secret123. A secret's value can only be set upon creation. A secret's value will never be returned by the API.

- */ - @JsonSetter(value = "value", nulls = Nulls.SKIP) - public Builder value(Optional value) { - this.value = value; - return this; - } - - public Builder value(String value) { - this.value = Optional.ofNullable(value); - return this; - } - - public ActionSecretRequest build() { - return new ActionSecretRequest(name, value, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionSecretResponse.java b/src/main/java/com/auth0/client/mgmt/types/ActionSecretResponse.java deleted file mode 100644 index a90411457..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionSecretResponse.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ActionSecretResponse.Builder.class) -public final class ActionSecretResponse { - private final Optional name; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private ActionSecretResponse( - Optional name, Optional updatedAt, Map additionalProperties) { - this.name = name; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the particular secret, e.g. API_KEY. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The time when the secret was last updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionSecretResponse && equalTo((ActionSecretResponse) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionSecretResponse other) { - return name.equals(other.name) && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.updatedAt); - } - - @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 updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionSecretResponse other) { - name(other.getName()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

The name of the particular secret, e.g. API_KEY.

- */ - @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 time when the secret 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; - } - - public ActionSecretResponse build() { - return new ActionSecretResponse(name, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionTrigger.java b/src/main/java/com/auth0/client/mgmt/types/ActionTrigger.java deleted file mode 100644 index f904a3396..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionTrigger.java +++ /dev/null @@ -1,367 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ActionTrigger.Builder.class) -public final class ActionTrigger { - private final String id; - - private final Optional version; - - private final Optional status; - - private final Optional> runtimes; - - private final Optional defaultRuntime; - - private final Optional> compatibleTriggers; - - private final Optional bindingPolicy; - - private final Map additionalProperties; - - private ActionTrigger( - String id, - Optional version, - Optional status, - Optional> runtimes, - Optional defaultRuntime, - Optional> compatibleTriggers, - Optional bindingPolicy, - Map additionalProperties) { - this.id = id; - this.version = version; - this.status = status; - this.runtimes = runtimes; - this.defaultRuntime = defaultRuntime; - this.compatibleTriggers = compatibleTriggers; - this.bindingPolicy = bindingPolicy; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return The version of a trigger. v1, v2, etc. - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - /** - * @return status points to the trigger status. - */ - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return runtimes supported by this trigger. - */ - @JsonProperty("runtimes") - public Optional> getRuntimes() { - return runtimes; - } - - /** - * @return Runtime that will be used when none is specified when creating an action. - */ - @JsonProperty("default_runtime") - public Optional getDefaultRuntime() { - return defaultRuntime; - } - - /** - * @return compatible_triggers informs which other trigger supports the same event and api. - */ - @JsonProperty("compatible_triggers") - public Optional> getCompatibleTriggers() { - return compatibleTriggers; - } - - @JsonProperty("binding_policy") - public Optional getBindingPolicy() { - return bindingPolicy; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionTrigger && equalTo((ActionTrigger) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionTrigger other) { - return id.equals(other.id) - && version.equals(other.version) - && status.equals(other.status) - && runtimes.equals(other.runtimes) - && defaultRuntime.equals(other.defaultRuntime) - && compatibleTriggers.equals(other.compatibleTriggers) - && bindingPolicy.equals(other.bindingPolicy); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.version, - this.status, - this.runtimes, - this.defaultRuntime, - this.compatibleTriggers, - this.bindingPolicy); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - _FinalStage id(@NotNull String id); - - Builder from(ActionTrigger other); - } - - public interface _FinalStage { - ActionTrigger build(); - - /** - *

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

- */ - _FinalStage version(Optional version); - - _FinalStage version(String version); - - /** - *

status points to the trigger status.

- */ - _FinalStage status(Optional status); - - _FinalStage status(String status); - - /** - *

runtimes supported by this trigger.

- */ - _FinalStage runtimes(Optional> runtimes); - - _FinalStage runtimes(List runtimes); - - /** - *

Runtime that will be used when none is specified when creating an action.

- */ - _FinalStage defaultRuntime(Optional defaultRuntime); - - _FinalStage defaultRuntime(String defaultRuntime); - - /** - *

compatible_triggers informs which other trigger supports the same event and api.

- */ - _FinalStage compatibleTriggers(Optional> compatibleTriggers); - - _FinalStage compatibleTriggers(List compatibleTriggers); - - _FinalStage bindingPolicy(Optional bindingPolicy); - - _FinalStage bindingPolicy(ActionBindingTypeEnum bindingPolicy); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, _FinalStage { - private String id; - - private Optional bindingPolicy = Optional.empty(); - - private Optional> compatibleTriggers = Optional.empty(); - - private Optional defaultRuntime = Optional.empty(); - - private Optional> runtimes = Optional.empty(); - - private Optional status = Optional.empty(); - - private Optional version = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ActionTrigger other) { - id(other.getId()); - version(other.getVersion()); - status(other.getStatus()); - runtimes(other.getRuntimes()); - defaultRuntime(other.getDefaultRuntime()); - compatibleTriggers(other.getCompatibleTriggers()); - bindingPolicy(other.getBindingPolicy()); - return this; - } - - @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 bindingPolicy(ActionBindingTypeEnum bindingPolicy) { - this.bindingPolicy = Optional.ofNullable(bindingPolicy); - return this; - } - - @java.lang.Override - @JsonSetter(value = "binding_policy", nulls = Nulls.SKIP) - public _FinalStage bindingPolicy(Optional bindingPolicy) { - this.bindingPolicy = bindingPolicy; - return this; - } - - /** - *

compatible_triggers informs which other trigger supports the same event and api.

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

compatible_triggers informs which other trigger supports the same event and api.

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

Runtime that will be used when none is specified when creating an action.

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

Runtime that will be used when none is specified when creating an action.

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

runtimes supported by this trigger.

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

runtimes supported by this trigger.

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

status points to the trigger status.

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

status points to the trigger status.

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

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

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

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

- */ - @java.lang.Override - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public _FinalStage version(Optional version) { - this.version = version; - return this; - } - - @java.lang.Override - public ActionTrigger build() { - return new ActionTrigger( - id, - version, - status, - runtimes, - defaultRuntime, - compatibleTriggers, - bindingPolicy, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionTriggerCompatibleTrigger.java b/src/main/java/com/auth0/client/mgmt/types/ActionTriggerCompatibleTrigger.java deleted file mode 100644 index bb8740e73..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionTriggerCompatibleTrigger.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = ActionTriggerCompatibleTrigger.Builder.class) -public final class ActionTriggerCompatibleTrigger { - private final String id; - - private final String version; - - private final Map additionalProperties; - - private ActionTriggerCompatibleTrigger(String id, String version, Map additionalProperties) { - this.id = id; - this.version = version; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return The version of a trigger. v1, v2, etc. - */ - @JsonProperty("version") - public String getVersion() { - return version; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionTriggerCompatibleTrigger && equalTo((ActionTriggerCompatibleTrigger) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionTriggerCompatibleTrigger other) { - return id.equals(other.id) && version.equals(other.version); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.version); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - VersionStage id(@NotNull String id); - - Builder from(ActionTriggerCompatibleTrigger other); - } - - public interface VersionStage { - /** - *

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

- */ - _FinalStage version(@NotNull String version); - } - - public interface _FinalStage { - ActionTriggerCompatibleTrigger build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, VersionStage, _FinalStage { - private String id; - - private String version; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ActionTriggerCompatibleTrigger other) { - id(other.getId()); - version(other.getVersion()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public VersionStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("version") - public _FinalStage version(@NotNull String version) { - this.version = Objects.requireNonNull(version, "version must not be null"); - return this; - } - - @java.lang.Override - public ActionTriggerCompatibleTrigger build() { - return new ActionTriggerCompatibleTrigger(id, version, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionVersion.java b/src/main/java/com/auth0/client/mgmt/types/ActionVersion.java deleted file mode 100644 index 8301f2ec8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionVersion.java +++ /dev/null @@ -1,576 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = ActionVersion.Builder.class) -public final class ActionVersion { - private final Optional id; - - private final Optional actionId; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional deployed; - - private final Optional runtime; - - private final Optional> secrets; - - private final Optional status; - - private final Optional number; - - private final Optional> errors; - - private final Optional action; - - private final Optional builtAt; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional> supportedTriggers; - - private final Optional> modules; - - private final Map additionalProperties; - - private ActionVersion( - Optional id, - Optional actionId, - Optional code, - Optional> dependencies, - Optional deployed, - Optional runtime, - Optional> secrets, - Optional status, - Optional number, - Optional> errors, - Optional action, - Optional builtAt, - Optional createdAt, - Optional updatedAt, - Optional> supportedTriggers, - Optional> modules, - Map additionalProperties) { - this.id = id; - this.actionId = actionId; - this.code = code; - this.dependencies = dependencies; - this.deployed = deployed; - this.runtime = runtime; - this.secrets = secrets; - this.status = status; - this.number = number; - this.errors = errors; - this.action = action; - this.builtAt = builtAt; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.supportedTriggers = supportedTriggers; - this.modules = modules; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique id of an action version. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The id of the action to which this version belongs. - */ - @JsonProperty("action_id") - public Optional getActionId() { - return actionId; - } - - /** - * @return The source code of this specific version of the action. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The list of third party npm modules, and their versions, that this specific version depends on. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return Indicates if this specific version is the currently one deployed. - */ - @JsonProperty("deployed") - public Optional getDeployed() { - return deployed; - } - - /** - * @return The Node runtime. For example: node22 - */ - @JsonProperty("runtime") - public Optional getRuntime() { - return runtime; - } - - /** - * @return The list of secrets that are included in an action or a version of an action. - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return The index of this version in list of versions for the action. - */ - @JsonProperty("number") - public Optional getNumber() { - return number; - } - - /** - * @return Any errors that occurred while the version was being built. - */ - @JsonProperty("errors") - public Optional> getErrors() { - return errors; - } - - @JsonProperty("action") - public Optional getAction() { - return action; - } - - /** - * @return The time when this version was built successfully. - */ - @JsonProperty("built_at") - public Optional getBuiltAt() { - return builtAt; - } - - /** - * @return The time when this version was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when a version was updated. Versions are never updated externally. Only Auth0 will update an action version as it is being built. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return The list of triggers that this version supports. At this time, a version can only target a single trigger at a time. - */ - @JsonProperty("supported_triggers") - public Optional> getSupportedTriggers() { - return supportedTriggers; - } - - /** - * @return The list of action modules and their versions used by this action version. - */ - @JsonProperty("modules") - public Optional> getModules() { - return modules; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionVersion && equalTo((ActionVersion) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionVersion other) { - return id.equals(other.id) - && actionId.equals(other.actionId) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && deployed.equals(other.deployed) - && runtime.equals(other.runtime) - && secrets.equals(other.secrets) - && status.equals(other.status) - && number.equals(other.number) - && errors.equals(other.errors) - && action.equals(other.action) - && builtAt.equals(other.builtAt) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && supportedTriggers.equals(other.supportedTriggers) - && modules.equals(other.modules); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.actionId, - this.code, - this.dependencies, - this.deployed, - this.runtime, - this.secrets, - this.status, - this.number, - this.errors, - this.action, - this.builtAt, - this.createdAt, - this.updatedAt, - this.supportedTriggers, - this.modules); - } - - @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 actionId = Optional.empty(); - - private Optional code = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional deployed = Optional.empty(); - - private Optional runtime = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional status = Optional.empty(); - - private Optional number = Optional.empty(); - - private Optional> errors = Optional.empty(); - - private Optional action = Optional.empty(); - - private Optional builtAt = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional> supportedTriggers = Optional.empty(); - - private Optional> modules = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionVersion other) { - id(other.getId()); - actionId(other.getActionId()); - code(other.getCode()); - dependencies(other.getDependencies()); - deployed(other.getDeployed()); - runtime(other.getRuntime()); - secrets(other.getSecrets()); - status(other.getStatus()); - number(other.getNumber()); - errors(other.getErrors()); - action(other.getAction()); - builtAt(other.getBuiltAt()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - supportedTriggers(other.getSupportedTriggers()); - modules(other.getModules()); - return this; - } - - /** - *

The unique id of an action version.

- */ - @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 id of the action to which this version belongs.

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

The source code of this specific version of the action.

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

The list of third party npm modules, and their versions, that this specific version depends on.

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

Indicates if this specific version is the currently one deployed.

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

The Node runtime. For example: node22

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

The list of secrets that are included in an action or a version of an action.

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

The index of this version in list of versions for the action.

- */ - @JsonSetter(value = "number", nulls = Nulls.SKIP) - public Builder number(Optional number) { - this.number = number; - return this; - } - - public Builder number(Double number) { - this.number = Optional.ofNullable(number); - return this; - } - - /** - *

Any errors that occurred while the version was being built.

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

The time when this version was built successfully.

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

The time when this version 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 time when a version was updated. Versions are never updated externally. Only Auth0 will update an action version as it is being built.

- */ - @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; - } - - /** - *

The list of triggers that this version supports. At this time, a version can only target a single trigger at a time.

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

The list of action modules and their versions used by this action version.

- */ - @JsonSetter(value = "modules", nulls = Nulls.SKIP) - public Builder modules(Optional> modules) { - this.modules = modules; - return this; - } - - public Builder modules(List modules) { - this.modules = Optional.ofNullable(modules); - return this; - } - - public ActionVersion build() { - return new ActionVersion( - id, - actionId, - code, - dependencies, - deployed, - runtime, - secrets, - status, - number, - errors, - action, - builtAt, - createdAt, - updatedAt, - supportedTriggers, - modules, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionVersionBuildStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/ActionVersionBuildStatusEnum.java deleted file mode 100644 index 6a9f5c51e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionVersionBuildStatusEnum.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ActionVersionBuildStatusEnum { - public static final ActionVersionBuildStatusEnum FAILED = new ActionVersionBuildStatusEnum(Value.FAILED, "failed"); - - public static final ActionVersionBuildStatusEnum PENDING = - new ActionVersionBuildStatusEnum(Value.PENDING, "pending"); - - public static final ActionVersionBuildStatusEnum BUILT = new ActionVersionBuildStatusEnum(Value.BUILT, "built"); - - public static final ActionVersionBuildStatusEnum BUILDING = - new ActionVersionBuildStatusEnum(Value.BUILDING, "building"); - - public static final ActionVersionBuildStatusEnum PACKAGED = - new ActionVersionBuildStatusEnum(Value.PACKAGED, "packaged"); - - public static final ActionVersionBuildStatusEnum RETRYING = - new ActionVersionBuildStatusEnum(Value.RETRYING, "retrying"); - - private final Value value; - - private final String string; - - ActionVersionBuildStatusEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ActionVersionBuildStatusEnum - && this.string.equals(((ActionVersionBuildStatusEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FAILED: - return visitor.visitFailed(); - case PENDING: - return visitor.visitPending(); - case BUILT: - return visitor.visitBuilt(); - case BUILDING: - return visitor.visitBuilding(); - case PACKAGED: - return visitor.visitPackaged(); - case RETRYING: - return visitor.visitRetrying(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ActionVersionBuildStatusEnum valueOf(String value) { - switch (value) { - case "failed": - return FAILED; - case "pending": - return PENDING; - case "built": - return BUILT; - case "building": - return BUILDING; - case "packaged": - return PACKAGED; - case "retrying": - return RETRYING; - default: - return new ActionVersionBuildStatusEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PENDING, - - BUILDING, - - PACKAGED, - - BUILT, - - RETRYING, - - FAILED, - - UNKNOWN - } - - public interface Visitor { - T visitPending(); - - T visitBuilding(); - - T visitPackaged(); - - T visitBuilt(); - - T visitRetrying(); - - T visitFailed(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ActionVersionDependency.java b/src/main/java/com/auth0/client/mgmt/types/ActionVersionDependency.java deleted file mode 100644 index d61c7e1bf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ActionVersionDependency.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ActionVersionDependency.Builder.class) -public final class ActionVersionDependency { - private final Optional name; - - private final Optional version; - - private final Optional registryUrl; - - private final Map additionalProperties; - - private ActionVersionDependency( - Optional name, - Optional version, - Optional registryUrl, - Map additionalProperties) { - this.name = name; - this.version = version; - this.registryUrl = registryUrl; - this.additionalProperties = additionalProperties; - } - - /** - * @return name is the name of the npm module, e.g. lodash - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return description is the version of the npm module, e.g. 4.17.1 - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - /** - * @return registry_url is an optional value used primarily for private npm registries. - */ - @JsonProperty("registry_url") - public Optional getRegistryUrl() { - return registryUrl; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ActionVersionDependency && equalTo((ActionVersionDependency) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ActionVersionDependency other) { - return name.equals(other.name) && version.equals(other.version) && registryUrl.equals(other.registryUrl); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.version, this.registryUrl); - } - - @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 version = Optional.empty(); - - private Optional registryUrl = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ActionVersionDependency other) { - name(other.getName()); - version(other.getVersion()); - registryUrl(other.getRegistryUrl()); - return this; - } - - /** - *

name is the name of the npm module, e.g. lodash

- */ - @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; - } - - /** - *

description is the version of the npm module, e.g. 4.17.1

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

registry_url is an optional value used primarily for private npm registries.

- */ - @JsonSetter(value = "registry_url", nulls = Nulls.SKIP) - public Builder registryUrl(Optional registryUrl) { - this.registryUrl = registryUrl; - return this; - } - - public Builder registryUrl(String registryUrl) { - this.registryUrl = Optional.ofNullable(registryUrl); - return this; - } - - public ActionVersionDependency build() { - return new ActionVersionDependency(name, version, registryUrl, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AculClientFilter.java b/src/main/java/com/auth0/client/mgmt/types/AculClientFilter.java deleted file mode 100644 index 28d882c43..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AculClientFilter.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = AculClientFilter.Deserializer.class) -public final class AculClientFilter { - private final Object value; - - private final int type; - - private AculClientFilter(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((AculClientFilterById) this.value); - } else if (this.type == 1) { - return visitor.visit((AculClientFilterByMetadata) 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 AculClientFilter && equalTo((AculClientFilter) other); - } - - private boolean equalTo(AculClientFilter 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 AculClientFilter of(AculClientFilterById value) { - return new AculClientFilter(value, 0); - } - - public static AculClientFilter of(AculClientFilterByMetadata value) { - return new AculClientFilter(value, 1); - } - - public interface Visitor { - T visit(AculClientFilterById value); - - T visit(AculClientFilterByMetadata value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(AculClientFilter.class); - } - - @java.lang.Override - public AculClientFilter deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculClientFilterById.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculClientFilterByMetadata.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AculClientFilterById.java b/src/main/java/com/auth0/client/mgmt/types/AculClientFilterById.java deleted file mode 100644 index ba38c87d2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AculClientFilterById.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = AculClientFilterById.Builder.class) -public final class AculClientFilterById { - private final String id; - - private final Map additionalProperties; - - private AculClientFilterById(String id, Map additionalProperties) { - this.id = id; - this.additionalProperties = additionalProperties; - } - - /** - * @return Client ID - */ - @JsonProperty("id") - public String getId() { - return id; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AculClientFilterById && equalTo((AculClientFilterById) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AculClientFilterById 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 { - /** - *

Client ID

- */ - _FinalStage id(@NotNull String id); - - Builder from(AculClientFilterById other); - } - - public interface _FinalStage { - AculClientFilterById build(); - } - - @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(AculClientFilterById other) { - id(other.getId()); - return this; - } - - /** - *

Client ID

- *

Client 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 AculClientFilterById build() { - return new AculClientFilterById(id, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AculClientFilterByMetadata.java b/src/main/java/com/auth0/client/mgmt/types/AculClientFilterByMetadata.java deleted file mode 100644 index cdd5fec22..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AculClientFilterByMetadata.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AculClientFilterByMetadata.Builder.class) -public final class AculClientFilterByMetadata { - private final Map metadata; - - private final Map additionalProperties; - - private AculClientFilterByMetadata(Map metadata, Map additionalProperties) { - this.metadata = metadata; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("metadata") - public Map getMetadata() { - return metadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AculClientFilterByMetadata && equalTo((AculClientFilterByMetadata) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AculClientFilterByMetadata other) { - return metadata.equals(other.metadata); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 Map metadata = new LinkedHashMap<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AculClientFilterByMetadata other) { - metadata(other.getMetadata()); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Map metadata) { - this.metadata.clear(); - if (metadata != null) { - this.metadata.putAll(metadata); - } - return this; - } - - public Builder putAllMetadata(Map metadata) { - if (metadata != null) { - this.metadata.putAll(metadata); - } - return this; - } - - public Builder metadata(String key, Object value) { - this.metadata.put(key, value); - return this; - } - - public AculClientFilterByMetadata build() { - return new AculClientFilterByMetadata(metadata, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AculConfigsItem.java b/src/main/java/com/auth0/client/mgmt/types/AculConfigsItem.java deleted file mode 100644 index 76a012d07..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AculConfigsItem.java +++ /dev/null @@ -1,495 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AculConfigsItem.Builder.class) -public final class AculConfigsItem { - private final PromptGroupNameEnum prompt; - - private final ScreenGroupNameEnum screen; - - private final Optional renderingMode; - - private final Optional> contextConfiguration; - - private final OptionalNullable defaultHeadTagsDisabled; - - private final OptionalNullable usePageTemplate; - - private final Optional> headTags; - - private final OptionalNullable filters; - - private final Map additionalProperties; - - private AculConfigsItem( - PromptGroupNameEnum prompt, - ScreenGroupNameEnum screen, - Optional renderingMode, - Optional> contextConfiguration, - OptionalNullable defaultHeadTagsDisabled, - OptionalNullable usePageTemplate, - Optional> headTags, - OptionalNullable filters, - Map additionalProperties) { - this.prompt = prompt; - this.screen = screen; - this.renderingMode = renderingMode; - this.contextConfiguration = contextConfiguration; - this.defaultHeadTagsDisabled = defaultHeadTagsDisabled; - this.usePageTemplate = usePageTemplate; - this.headTags = headTags; - this.filters = filters; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("prompt") - public PromptGroupNameEnum getPrompt() { - return prompt; - } - - @JsonProperty("screen") - public ScreenGroupNameEnum getScreen() { - return screen; - } - - @JsonProperty("rendering_mode") - public Optional getRenderingMode() { - return renderingMode; - } - - @JsonProperty("context_configuration") - public Optional> getContextConfiguration() { - return contextConfiguration; - } - - /** - * @return Override Universal Login default head tags - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("default_head_tags_disabled") - public OptionalNullable getDefaultHeadTagsDisabled() { - if (defaultHeadTagsDisabled == null) { - return OptionalNullable.absent(); - } - return defaultHeadTagsDisabled; - } - - /** - * @return Use page template with ACUL - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("use_page_template") - public OptionalNullable getUsePageTemplate() { - if (usePageTemplate == null) { - return OptionalNullable.absent(); - } - return usePageTemplate; - } - - /** - * @return An array of head tags - */ - @JsonProperty("head_tags") - public Optional> getHeadTags() { - return headTags; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("filters") - public OptionalNullable getFilters() { - if (filters == null) { - return OptionalNullable.absent(); - } - return filters; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("default_head_tags_disabled") - private OptionalNullable _getDefaultHeadTagsDisabled() { - return defaultHeadTagsDisabled; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("use_page_template") - private OptionalNullable _getUsePageTemplate() { - return usePageTemplate; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("filters") - private OptionalNullable _getFilters() { - return filters; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AculConfigsItem && equalTo((AculConfigsItem) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AculConfigsItem other) { - return prompt.equals(other.prompt) - && screen.equals(other.screen) - && renderingMode.equals(other.renderingMode) - && contextConfiguration.equals(other.contextConfiguration) - && defaultHeadTagsDisabled.equals(other.defaultHeadTagsDisabled) - && usePageTemplate.equals(other.usePageTemplate) - && headTags.equals(other.headTags) - && filters.equals(other.filters); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.prompt, - this.screen, - this.renderingMode, - this.contextConfiguration, - this.defaultHeadTagsDisabled, - this.usePageTemplate, - this.headTags, - this.filters); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static PromptStage builder() { - return new Builder(); - } - - public interface PromptStage { - ScreenStage prompt(@NotNull PromptGroupNameEnum prompt); - - Builder from(AculConfigsItem other); - } - - public interface ScreenStage { - _FinalStage screen(@NotNull ScreenGroupNameEnum screen); - } - - public interface _FinalStage { - AculConfigsItem build(); - - _FinalStage renderingMode(Optional renderingMode); - - _FinalStage renderingMode(AculRenderingModeEnum renderingMode); - - _FinalStage contextConfiguration(Optional> contextConfiguration); - - _FinalStage contextConfiguration(List contextConfiguration); - - /** - *

Override Universal Login default head tags

- */ - _FinalStage defaultHeadTagsDisabled(@Nullable OptionalNullable defaultHeadTagsDisabled); - - _FinalStage defaultHeadTagsDisabled(Boolean defaultHeadTagsDisabled); - - _FinalStage defaultHeadTagsDisabled(Optional defaultHeadTagsDisabled); - - _FinalStage defaultHeadTagsDisabled(com.auth0.client.mgmt.core.Nullable defaultHeadTagsDisabled); - - /** - *

Use page template with ACUL

- */ - _FinalStage usePageTemplate(@Nullable OptionalNullable usePageTemplate); - - _FinalStage usePageTemplate(Boolean usePageTemplate); - - _FinalStage usePageTemplate(Optional usePageTemplate); - - _FinalStage usePageTemplate(com.auth0.client.mgmt.core.Nullable usePageTemplate); - - /** - *

An array of head tags

- */ - _FinalStage headTags(Optional> headTags); - - _FinalStage headTags(List headTags); - - _FinalStage filters(@Nullable OptionalNullable filters); - - _FinalStage filters(AculFilters filters); - - _FinalStage filters(Optional filters); - - _FinalStage filters(com.auth0.client.mgmt.core.Nullable filters); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements PromptStage, ScreenStage, _FinalStage { - private PromptGroupNameEnum prompt; - - private ScreenGroupNameEnum screen; - - private OptionalNullable filters = OptionalNullable.absent(); - - private Optional> headTags = Optional.empty(); - - private OptionalNullable usePageTemplate = OptionalNullable.absent(); - - private OptionalNullable defaultHeadTagsDisabled = OptionalNullable.absent(); - - private Optional> contextConfiguration = Optional.empty(); - - private Optional renderingMode = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AculConfigsItem other) { - prompt(other.getPrompt()); - screen(other.getScreen()); - renderingMode(other.getRenderingMode()); - contextConfiguration(other.getContextConfiguration()); - defaultHeadTagsDisabled(other.getDefaultHeadTagsDisabled()); - usePageTemplate(other.getUsePageTemplate()); - headTags(other.getHeadTags()); - filters(other.getFilters()); - return this; - } - - @java.lang.Override - @JsonSetter("prompt") - public ScreenStage prompt(@NotNull PromptGroupNameEnum prompt) { - this.prompt = Objects.requireNonNull(prompt, "prompt must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("screen") - public _FinalStage screen(@NotNull ScreenGroupNameEnum screen) { - this.screen = Objects.requireNonNull(screen, "screen must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage filters(com.auth0.client.mgmt.core.Nullable filters) { - if (filters.isNull()) { - this.filters = OptionalNullable.ofNull(); - } else if (filters.isEmpty()) { - this.filters = OptionalNullable.absent(); - } else { - this.filters = OptionalNullable.of(filters.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage filters(Optional filters) { - if (filters.isPresent()) { - this.filters = OptionalNullable.of(filters.get()); - } else { - this.filters = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage filters(AculFilters filters) { - this.filters = OptionalNullable.of(filters); - return this; - } - - @java.lang.Override - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public _FinalStage filters(@Nullable OptionalNullable filters) { - this.filters = filters; - return this; - } - - /** - *

An array of head tags

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

An array of head tags

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

Use page template with ACUL

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

Use page template with ACUL

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

Use page template with ACUL

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

Use page template with ACUL

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

Override Universal Login default head tags

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

Override Universal Login default head tags

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

Override Universal Login default head tags

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

Override Universal Login default head tags

- */ - @java.lang.Override - @JsonSetter(value = "default_head_tags_disabled", nulls = Nulls.SKIP) - public _FinalStage defaultHeadTagsDisabled(@Nullable OptionalNullable defaultHeadTagsDisabled) { - this.defaultHeadTagsDisabled = defaultHeadTagsDisabled; - return this; - } - - @java.lang.Override - public _FinalStage contextConfiguration(List contextConfiguration) { - this.contextConfiguration = Optional.ofNullable(contextConfiguration); - return this; - } - - @java.lang.Override - @JsonSetter(value = "context_configuration", nulls = Nulls.SKIP) - public _FinalStage contextConfiguration(Optional> contextConfiguration) { - this.contextConfiguration = contextConfiguration; - return this; - } - - @java.lang.Override - public _FinalStage renderingMode(AculRenderingModeEnum renderingMode) { - this.renderingMode = Optional.ofNullable(renderingMode); - return this; - } - - @java.lang.Override - @JsonSetter(value = "rendering_mode", nulls = Nulls.SKIP) - public _FinalStage renderingMode(Optional renderingMode) { - this.renderingMode = renderingMode; - return this; - } - - @java.lang.Override - public AculConfigsItem build() { - return new AculConfigsItem( - prompt, - screen, - renderingMode, - contextConfiguration, - defaultHeadTagsDisabled, - usePageTemplate, - headTags, - filters, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AculContextConfigurationItem.java b/src/main/java/com/auth0/client/mgmt/types/AculContextConfigurationItem.java deleted file mode 100644 index c0fa83a3e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AculContextConfigurationItem.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = AculContextConfigurationItem.Deserializer.class) -public final class AculContextConfigurationItem { - private final Object value; - - private final int type; - - private AculContextConfigurationItem(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((AculContextEnum) this.value); - } else if (this.type == 1) { - return visitor.visit((String) 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 AculContextConfigurationItem && equalTo((AculContextConfigurationItem) other); - } - - private boolean equalTo(AculContextConfigurationItem 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 AculContextConfigurationItem of(AculContextEnum value) { - return new AculContextConfigurationItem(value, 0); - } - - public static AculContextConfigurationItem of(String value) { - return new AculContextConfigurationItem(value, 1); - } - - public interface Visitor { - T visit(AculContextEnum value); - - T visit(String value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(AculContextConfigurationItem.class); - } - - @java.lang.Override - public AculContextConfigurationItem deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculContextEnum.class)); - } 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/AculContextEnum.java b/src/main/java/com/auth0/client/mgmt/types/AculContextEnum.java deleted file mode 100644 index 172353a2c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AculContextEnum.java +++ /dev/null @@ -1,246 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AculContextEnum { - public static final AculContextEnum TENANT_FRIENDLY_NAME = - new AculContextEnum(Value.TENANT_FRIENDLY_NAME, "tenant.friendly_name"); - - 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"); - - public static final AculContextEnum ORGANIZATION_BRANDING = - new AculContextEnum(Value.ORGANIZATION_BRANDING, "organization.branding"); - - public static final AculContextEnum CLIENT_DESCRIPTION = - new AculContextEnum(Value.CLIENT_DESCRIPTION, "client.description"); - - public static final AculContextEnum SCREEN_TEXTS = new AculContextEnum(Value.SCREEN_TEXTS, "screen.texts"); - - public static final AculContextEnum BRANDING_SETTINGS = - new AculContextEnum(Value.BRANDING_SETTINGS, "branding.settings"); - - public static final AculContextEnum TRANSACTION_CUSTOM_DOMAIN_DOMAIN = - new AculContextEnum(Value.TRANSACTION_CUSTOM_DOMAIN_DOMAIN, "transaction.custom_domain.domain"); - - public static final AculContextEnum UNTRUSTED_DATA_SUBMITTED_FORM_DATA = - new AculContextEnum(Value.UNTRUSTED_DATA_SUBMITTED_FORM_DATA, "untrusted_data.submitted_form_data"); - - public static final AculContextEnum CLIENT_LOGO_URI = new AculContextEnum(Value.CLIENT_LOGO_URI, "client.logo_uri"); - - public static final AculContextEnum TENANT_ENABLED_LOCALES = - new AculContextEnum(Value.TENANT_ENABLED_LOCALES, "tenant.enabled_locales"); - - public static final AculContextEnum ORGANIZATION_DISPLAY_NAME = - new AculContextEnum(Value.ORGANIZATION_DISPLAY_NAME, "organization.display_name"); - - public static final AculContextEnum UNTRUSTED_DATA_AUTHORIZATION_PARAMS_LOGIN_HINT = new AculContextEnum( - Value.UNTRUSTED_DATA_AUTHORIZATION_PARAMS_LOGIN_HINT, "untrusted_data.authorization_params.login_hint"); - - public static final AculContextEnum USER_ORGANIZATIONS = - new AculContextEnum(Value.USER_ORGANIZATIONS, "user.organizations"); - - public static final AculContextEnum BRANDING_THEMES_DEFAULT = - new AculContextEnum(Value.BRANDING_THEMES_DEFAULT, "branding.themes.default"); - - public static final AculContextEnum TENANT_NAME = new AculContextEnum(Value.TENANT_NAME, "tenant.name"); - - 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 TENANT_LOGO_URL = new AculContextEnum(Value.TENANT_LOGO_URL, "tenant.logo_url"); - - private final Value value; - - private final String string; - - AculContextEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof AculContextEnum && this.string.equals(((AculContextEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TENANT_FRIENDLY_NAME: - return visitor.visitTenantFriendlyName(); - case UNTRUSTED_DATA_AUTHORIZATION_PARAMS_SCREEN_HINT: - return visitor.visitUntrustedDataAuthorizationParamsScreenHint(); - case ORGANIZATION_BRANDING: - return visitor.visitOrganizationBranding(); - case CLIENT_DESCRIPTION: - return visitor.visitClientDescription(); - case SCREEN_TEXTS: - return visitor.visitScreenTexts(); - case BRANDING_SETTINGS: - return visitor.visitBrandingSettings(); - case TRANSACTION_CUSTOM_DOMAIN_DOMAIN: - return visitor.visitTransactionCustomDomainDomain(); - case UNTRUSTED_DATA_SUBMITTED_FORM_DATA: - return visitor.visitUntrustedDataSubmittedFormData(); - case CLIENT_LOGO_URI: - return visitor.visitClientLogoUri(); - case TENANT_ENABLED_LOCALES: - return visitor.visitTenantEnabledLocales(); - case ORGANIZATION_DISPLAY_NAME: - return visitor.visitOrganizationDisplayName(); - case UNTRUSTED_DATA_AUTHORIZATION_PARAMS_LOGIN_HINT: - return visitor.visitUntrustedDataAuthorizationParamsLoginHint(); - case USER_ORGANIZATIONS: - return visitor.visitUserOrganizations(); - case BRANDING_THEMES_DEFAULT: - return visitor.visitBrandingThemesDefault(); - case TENANT_NAME: - return visitor.visitTenantName(); - case UNTRUSTED_DATA_AUTHORIZATION_PARAMS_UI_LOCALES: - return visitor.visitUntrustedDataAuthorizationParamsUiLocales(); - case TENANT_LOGO_URL: - return visitor.visitTenantLogoUrl(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AculContextEnum valueOf(String value) { - switch (value) { - case "tenant.friendly_name": - return TENANT_FRIENDLY_NAME; - case "untrusted_data.authorization_params.screen_hint": - return UNTRUSTED_DATA_AUTHORIZATION_PARAMS_SCREEN_HINT; - case "organization.branding": - return ORGANIZATION_BRANDING; - case "client.description": - return CLIENT_DESCRIPTION; - case "screen.texts": - return SCREEN_TEXTS; - case "branding.settings": - return BRANDING_SETTINGS; - case "transaction.custom_domain.domain": - return TRANSACTION_CUSTOM_DOMAIN_DOMAIN; - case "untrusted_data.submitted_form_data": - return UNTRUSTED_DATA_SUBMITTED_FORM_DATA; - case "client.logo_uri": - return CLIENT_LOGO_URI; - case "tenant.enabled_locales": - return TENANT_ENABLED_LOCALES; - case "organization.display_name": - return ORGANIZATION_DISPLAY_NAME; - case "untrusted_data.authorization_params.login_hint": - return UNTRUSTED_DATA_AUTHORIZATION_PARAMS_LOGIN_HINT; - case "user.organizations": - return USER_ORGANIZATIONS; - case "branding.themes.default": - return BRANDING_THEMES_DEFAULT; - case "tenant.name": - return TENANT_NAME; - case "untrusted_data.authorization_params.ui_locales": - return UNTRUSTED_DATA_AUTHORIZATION_PARAMS_UI_LOCALES; - case "tenant.logo_url": - return TENANT_LOGO_URL; - default: - return new AculContextEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - BRANDING_SETTINGS, - - BRANDING_THEMES_DEFAULT, - - CLIENT_LOGO_URI, - - CLIENT_DESCRIPTION, - - ORGANIZATION_DISPLAY_NAME, - - ORGANIZATION_BRANDING, - - SCREEN_TEXTS, - - TENANT_NAME, - - TENANT_FRIENDLY_NAME, - - TENANT_LOGO_URL, - - TENANT_ENABLED_LOCALES, - - UNTRUSTED_DATA_SUBMITTED_FORM_DATA, - - UNTRUSTED_DATA_AUTHORIZATION_PARAMS_LOGIN_HINT, - - UNTRUSTED_DATA_AUTHORIZATION_PARAMS_SCREEN_HINT, - - UNTRUSTED_DATA_AUTHORIZATION_PARAMS_UI_LOCALES, - - USER_ORGANIZATIONS, - - TRANSACTION_CUSTOM_DOMAIN_DOMAIN, - - UNKNOWN - } - - public interface Visitor { - T visitBrandingSettings(); - - T visitBrandingThemesDefault(); - - T visitClientLogoUri(); - - T visitClientDescription(); - - T visitOrganizationDisplayName(); - - T visitOrganizationBranding(); - - T visitScreenTexts(); - - T visitTenantName(); - - T visitTenantFriendlyName(); - - T visitTenantLogoUrl(); - - T visitTenantEnabledLocales(); - - T visitUntrustedDataSubmittedFormData(); - - T visitUntrustedDataAuthorizationParamsLoginHint(); - - T visitUntrustedDataAuthorizationParamsScreenHint(); - - T visitUntrustedDataAuthorizationParamsUiLocales(); - - T visitUserOrganizations(); - - T visitTransactionCustomDomainDomain(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AculDomainFilter.java b/src/main/java/com/auth0/client/mgmt/types/AculDomainFilter.java deleted file mode 100644 index 6847706ef..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AculDomainFilter.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = AculDomainFilter.Deserializer.class) -public final class AculDomainFilter { - private final Object value; - - private final int type; - - private AculDomainFilter(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((AculDomainFilterById) this.value); - } else if (this.type == 1) { - return visitor.visit((AculDomainFilterByMetadata) 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 AculDomainFilter && equalTo((AculDomainFilter) other); - } - - private boolean equalTo(AculDomainFilter 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 AculDomainFilter of(AculDomainFilterById value) { - return new AculDomainFilter(value, 0); - } - - public static AculDomainFilter of(AculDomainFilterByMetadata value) { - return new AculDomainFilter(value, 1); - } - - public interface Visitor { - T visit(AculDomainFilterById value); - - T visit(AculDomainFilterByMetadata value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(AculDomainFilter.class); - } - - @java.lang.Override - public AculDomainFilter deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculDomainFilterById.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculDomainFilterByMetadata.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AculDomainFilterById.java b/src/main/java/com/auth0/client/mgmt/types/AculDomainFilterById.java deleted file mode 100644 index 25f840446..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AculDomainFilterById.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = AculDomainFilterById.Builder.class) -public final class AculDomainFilterById { - private final String id; - - private final Map additionalProperties; - - private AculDomainFilterById(String id, Map additionalProperties) { - this.id = id; - this.additionalProperties = additionalProperties; - } - - /** - * @return Domain ID - */ - @JsonProperty("id") - public String getId() { - return id; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AculDomainFilterById && equalTo((AculDomainFilterById) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AculDomainFilterById 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 { - /** - *

Domain ID

- */ - _FinalStage id(@NotNull String id); - - Builder from(AculDomainFilterById other); - } - - public interface _FinalStage { - AculDomainFilterById build(); - } - - @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(AculDomainFilterById other) { - id(other.getId()); - return this; - } - - /** - *

Domain ID

- *

Domain 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 AculDomainFilterById build() { - return new AculDomainFilterById(id, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AculDomainFilterByMetadata.java b/src/main/java/com/auth0/client/mgmt/types/AculDomainFilterByMetadata.java deleted file mode 100644 index dc6d6b579..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AculDomainFilterByMetadata.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AculDomainFilterByMetadata.Builder.class) -public final class AculDomainFilterByMetadata { - private final Map metadata; - - private final Map additionalProperties; - - private AculDomainFilterByMetadata(Map metadata, Map additionalProperties) { - this.metadata = metadata; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("metadata") - public Map getMetadata() { - return metadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AculDomainFilterByMetadata && equalTo((AculDomainFilterByMetadata) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AculDomainFilterByMetadata other) { - return metadata.equals(other.metadata); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 Map metadata = new LinkedHashMap<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AculDomainFilterByMetadata other) { - metadata(other.getMetadata()); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Map metadata) { - this.metadata.clear(); - if (metadata != null) { - this.metadata.putAll(metadata); - } - return this; - } - - public Builder putAllMetadata(Map metadata) { - if (metadata != null) { - this.metadata.putAll(metadata); - } - return this; - } - - public Builder metadata(String key, Object value) { - this.metadata.put(key, value); - return this; - } - - public AculDomainFilterByMetadata build() { - return new AculDomainFilterByMetadata(metadata, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AculFilters.java b/src/main/java/com/auth0/client/mgmt/types/AculFilters.java deleted file mode 100644 index 17818338d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AculFilters.java +++ /dev/null @@ -1,188 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = AculFilters.Builder.class) -public final class AculFilters { - private final Optional matchType; - - private final Optional> clients; - - private final Optional> organizations; - - private final Optional> domains; - - private final Map additionalProperties; - - private AculFilters( - Optional matchType, - Optional> clients, - Optional> organizations, - Optional> domains, - Map additionalProperties) { - this.matchType = matchType; - this.clients = clients; - this.organizations = organizations; - this.domains = domains; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("match_type") - public Optional getMatchType() { - return matchType; - } - - /** - * @return Clients filter - */ - @JsonProperty("clients") - public Optional> getClients() { - return clients; - } - - /** - * @return Organizations filter - */ - @JsonProperty("organizations") - public Optional> getOrganizations() { - return organizations; - } - - /** - * @return Domains filter - */ - @JsonProperty("domains") - public Optional> getDomains() { - return domains; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AculFilters && equalTo((AculFilters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AculFilters other) { - return matchType.equals(other.matchType) - && clients.equals(other.clients) - && organizations.equals(other.organizations) - && domains.equals(other.domains); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.matchType, this.clients, this.organizations, this.domains); - } - - @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 matchType = Optional.empty(); - - private Optional> clients = Optional.empty(); - - private Optional> organizations = Optional.empty(); - - private Optional> domains = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AculFilters other) { - matchType(other.getMatchType()); - clients(other.getClients()); - organizations(other.getOrganizations()); - domains(other.getDomains()); - return this; - } - - @JsonSetter(value = "match_type", nulls = Nulls.SKIP) - public Builder matchType(Optional matchType) { - this.matchType = matchType; - return this; - } - - public Builder matchType(AculMatchTypeEnum matchType) { - this.matchType = Optional.ofNullable(matchType); - return this; - } - - /** - *

Clients filter

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

Organizations filter

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

Domains filter

- */ - @JsonSetter(value = "domains", nulls = Nulls.SKIP) - public Builder domains(Optional> domains) { - this.domains = domains; - return this; - } - - public Builder domains(List domains) { - this.domains = Optional.ofNullable(domains); - return this; - } - - public AculFilters build() { - return new AculFilters(matchType, clients, organizations, domains, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AculHeadTag.java b/src/main/java/com/auth0/client/mgmt/types/AculHeadTag.java deleted file mode 100644 index f7f55a362..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AculHeadTag.java +++ /dev/null @@ -1,149 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = AculHeadTag.Builder.class) -public final class AculHeadTag { - private final Optional tag; - - private final Optional> attributes; - - private final Optional content; - - private final Map additionalProperties; - - private AculHeadTag( - Optional tag, - Optional> attributes, - Optional content, - Map additionalProperties) { - this.tag = tag; - this.attributes = attributes; - this.content = content; - this.additionalProperties = additionalProperties; - } - - /** - * @return Any HTML element valid for use in the head tag - */ - @JsonProperty("tag") - public Optional getTag() { - return tag; - } - - @JsonProperty("attributes") - public Optional> getAttributes() { - return attributes; - } - - @JsonProperty("content") - public Optional getContent() { - return content; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AculHeadTag && equalTo((AculHeadTag) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AculHeadTag other) { - return tag.equals(other.tag) && attributes.equals(other.attributes) && content.equals(other.content); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.tag, this.attributes, this.content); - } - - @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 tag = Optional.empty(); - - private Optional> attributes = Optional.empty(); - - private Optional content = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AculHeadTag other) { - tag(other.getTag()); - attributes(other.getAttributes()); - content(other.getContent()); - return this; - } - - /** - *

Any HTML element valid for use in the head tag

- */ - @JsonSetter(value = "tag", nulls = Nulls.SKIP) - public Builder tag(Optional tag) { - this.tag = tag; - return this; - } - - public Builder tag(String tag) { - this.tag = Optional.ofNullable(tag); - 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; - } - - @JsonSetter(value = "content", nulls = Nulls.SKIP) - public Builder content(Optional content) { - this.content = content; - return this; - } - - public Builder content(String content) { - this.content = Optional.ofNullable(content); - return this; - } - - public AculHeadTag build() { - return new AculHeadTag(tag, attributes, content, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AculMatchTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/AculMatchTypeEnum.java deleted file mode 100644 index 2166f0615..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AculMatchTypeEnum.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AculMatchTypeEnum { - public static final AculMatchTypeEnum EXCLUDES_ANY = new AculMatchTypeEnum(Value.EXCLUDES_ANY, "excludes_any"); - - public static final AculMatchTypeEnum INCLUDES_ANY = new AculMatchTypeEnum(Value.INCLUDES_ANY, "includes_any"); - - private final Value value; - - private final String string; - - AculMatchTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof AculMatchTypeEnum && this.string.equals(((AculMatchTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EXCLUDES_ANY: - return visitor.visitExcludesAny(); - case INCLUDES_ANY: - return visitor.visitIncludesAny(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AculMatchTypeEnum valueOf(String value) { - switch (value) { - case "excludes_any": - return EXCLUDES_ANY; - case "includes_any": - return INCLUDES_ANY; - default: - return new AculMatchTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - INCLUDES_ANY, - - EXCLUDES_ANY, - - UNKNOWN - } - - public interface Visitor { - T visitIncludesAny(); - - T visitExcludesAny(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilter.java b/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilter.java deleted file mode 100644 index 141029bd8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilter.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = AculOrganizationFilter.Deserializer.class) -public final class AculOrganizationFilter { - private final Object value; - - private final int type; - - private AculOrganizationFilter(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((AculOrganizationFilterById) this.value); - } else if (this.type == 1) { - return visitor.visit((AculOrganizationFilterByMetadata) 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 AculOrganizationFilter && equalTo((AculOrganizationFilter) other); - } - - private boolean equalTo(AculOrganizationFilter 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 AculOrganizationFilter of(AculOrganizationFilterById value) { - return new AculOrganizationFilter(value, 0); - } - - public static AculOrganizationFilter of(AculOrganizationFilterByMetadata value) { - return new AculOrganizationFilter(value, 1); - } - - public interface Visitor { - T visit(AculOrganizationFilterById value); - - T visit(AculOrganizationFilterByMetadata value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(AculOrganizationFilter.class); - } - - @java.lang.Override - public AculOrganizationFilter deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculOrganizationFilterById.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, AculOrganizationFilterByMetadata.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilterById.java b/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilterById.java deleted file mode 100644 index 8463d0302..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilterById.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = AculOrganizationFilterById.Builder.class) -public final class AculOrganizationFilterById { - private final String id; - - private final Map additionalProperties; - - private AculOrganizationFilterById(String id, Map additionalProperties) { - this.id = id; - this.additionalProperties = additionalProperties; - } - - /** - * @return Organization ID - */ - @JsonProperty("id") - public String getId() { - return id; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AculOrganizationFilterById && equalTo((AculOrganizationFilterById) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AculOrganizationFilterById 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 { - /** - *

Organization ID

- */ - _FinalStage id(@NotNull String id); - - Builder from(AculOrganizationFilterById other); - } - - public interface _FinalStage { - AculOrganizationFilterById build(); - } - - @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(AculOrganizationFilterById other) { - id(other.getId()); - return this; - } - - /** - *

Organization ID

- *

Organization 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 AculOrganizationFilterById build() { - return new AculOrganizationFilterById(id, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilterByMetadata.java b/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilterByMetadata.java deleted file mode 100644 index 9f03d014e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AculOrganizationFilterByMetadata.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = AculOrganizationFilterByMetadata.Builder.class) -public final class AculOrganizationFilterByMetadata { - private final Map metadata; - - private final Map additionalProperties; - - private AculOrganizationFilterByMetadata(Map metadata, Map additionalProperties) { - this.metadata = metadata; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("metadata") - public Map getMetadata() { - return metadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AculOrganizationFilterByMetadata && equalTo((AculOrganizationFilterByMetadata) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AculOrganizationFilterByMetadata other) { - return metadata.equals(other.metadata); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 Map metadata = new LinkedHashMap<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AculOrganizationFilterByMetadata other) { - metadata(other.getMetadata()); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Map metadata) { - this.metadata.clear(); - if (metadata != null) { - this.metadata.putAll(metadata); - } - return this; - } - - public Builder putAllMetadata(Map metadata) { - if (metadata != null) { - this.metadata.putAll(metadata); - } - return this; - } - - public Builder metadata(String key, Object value) { - this.metadata.put(key, value); - return this; - } - - public AculOrganizationFilterByMetadata build() { - return new AculOrganizationFilterByMetadata(metadata, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AculRenderingModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/AculRenderingModeEnum.java deleted file mode 100644 index 4bd2304b5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AculRenderingModeEnum.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AculRenderingModeEnum { - public static final AculRenderingModeEnum ADVANCED = new AculRenderingModeEnum(Value.ADVANCED, "advanced"); - - public static final AculRenderingModeEnum STANDARD = new AculRenderingModeEnum(Value.STANDARD, "standard"); - - private final Value value; - - private final String string; - - AculRenderingModeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof AculRenderingModeEnum - && this.string.equals(((AculRenderingModeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ADVANCED: - return visitor.visitAdvanced(); - case STANDARD: - return visitor.visitStandard(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AculRenderingModeEnum valueOf(String value) { - switch (value) { - case "advanced": - return ADVANCED; - case "standard": - return STANDARD; - default: - return new AculRenderingModeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - ADVANCED, - - STANDARD, - - UNKNOWN - } - - public interface Visitor { - T visitAdvanced(); - - T visitStandard(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AddOrganizationConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/AddOrganizationConnectionResponseContent.java deleted file mode 100644 index b8d28eec8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AddOrganizationConnectionResponseContent.java +++ /dev/null @@ -1,229 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = AddOrganizationConnectionResponseContent.Builder.class) -public final class AddOrganizationConnectionResponseContent { - private final Optional connectionId; - - private final Optional assignMembershipOnLogin; - - private final Optional showAsButton; - - private final Optional isSignupEnabled; - - private final Optional connection; - - private final Map additionalProperties; - - private AddOrganizationConnectionResponseContent( - Optional connectionId, - Optional assignMembershipOnLogin, - Optional showAsButton, - Optional isSignupEnabled, - Optional connection, - Map additionalProperties) { - this.connectionId = connectionId; - this.assignMembershipOnLogin = assignMembershipOnLogin; - this.showAsButton = showAsButton; - this.isSignupEnabled = isSignupEnabled; - this.connection = connection; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the connection. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - /** - * @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. Default: true. - */ - @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. Default: false. - */ - @JsonProperty("is_signup_enabled") - public Optional getIsSignupEnabled() { - return isSignupEnabled; - } - - @JsonProperty("connection") - public Optional getConnection() { - return connection; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AddOrganizationConnectionResponseContent - && equalTo((AddOrganizationConnectionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AddOrganizationConnectionResponseContent other) { - return connectionId.equals(other.connectionId) - && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) - && showAsButton.equals(other.showAsButton) - && isSignupEnabled.equals(other.isSignupEnabled) - && connection.equals(other.connection); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.assignMembershipOnLogin, - this.showAsButton, - this.isSignupEnabled, - this.connection); - } - - @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 connectionId = Optional.empty(); - - private Optional assignMembershipOnLogin = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - private Optional isSignupEnabled = Optional.empty(); - - private Optional connection = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AddOrganizationConnectionResponseContent other) { - connectionId(other.getConnectionId()); - assignMembershipOnLogin(other.getAssignMembershipOnLogin()); - showAsButton(other.getShowAsButton()); - isSignupEnabled(other.getIsSignupEnabled()); - connection(other.getConnection()); - return this; - } - - /** - *

ID of the connection.

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - 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.

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

Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true.

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

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

- */ - @JsonSetter(value = "is_signup_enabled", nulls = Nulls.SKIP) - public Builder isSignupEnabled(Optional isSignupEnabled) { - this.isSignupEnabled = isSignupEnabled; - return this; - } - - public Builder isSignupEnabled(Boolean isSignupEnabled) { - this.isSignupEnabled = Optional.ofNullable(isSignupEnabled); - return this; - } - - @JsonSetter(value = "connection", nulls = Nulls.SKIP) - public Builder connection(Optional connection) { - this.connection = connection; - return this; - } - - public Builder connection(OrganizationConnectionInformation connection) { - this.connection = Optional.ofNullable(connection); - return this; - } - - public AddOrganizationConnectionResponseContent build() { - return new AddOrganizationConnectionResponseContent( - connectionId, - assignMembershipOnLogin, - showAsButton, - isSignupEnabled, - connection, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AssessorsTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/AssessorsTypeEnum.java deleted file mode 100644 index 19a3bf6ad..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AssessorsTypeEnum.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AssessorsTypeEnum { - public static final AssessorsTypeEnum NEW_DEVICE = new AssessorsTypeEnum(Value.NEW_DEVICE, "new-device"); - - private final Value value; - - private final String string; - - AssessorsTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof AssessorsTypeEnum && this.string.equals(((AssessorsTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case NEW_DEVICE: - return visitor.visitNewDevice(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AssessorsTypeEnum valueOf(String value) { - switch (value) { - case "new-device": - return NEW_DEVICE; - default: - return new AssessorsTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - NEW_DEVICE, - - UNKNOWN - } - - public interface Visitor { - T visitNewDevice(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AssociateOrganizationClientGrantResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/AssociateOrganizationClientGrantResponseContent.java deleted file mode 100644 index 170d20fbb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AssociateOrganizationClientGrantResponseContent.java +++ /dev/null @@ -1,251 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = AssociateOrganizationClientGrantResponseContent.Builder.class) -public final class AssociateOrganizationClientGrantResponseContent { - private final Optional id; - - private final Optional clientId; - - private final Optional audience; - - private final Optional> scope; - - private final Optional organizationUsage; - - private final Optional allowAnyOrganization; - - private final Map additionalProperties; - - private AssociateOrganizationClientGrantResponseContent( - Optional id, - Optional clientId, - Optional audience, - Optional> scope, - Optional organizationUsage, - Optional allowAnyOrganization, - Map additionalProperties) { - this.id = id; - this.clientId = clientId; - this.audience = audience; - this.scope = scope; - this.organizationUsage = organizationUsage; - this.allowAnyOrganization = allowAnyOrganization; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the client grant. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return ID of the client. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @return The audience (API identifier) of this client grant - */ - @JsonProperty("audience") - public Optional getAudience() { - return audience; - } - - /** - * @return Scopes allowed for this client grant. - */ - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonProperty("organization_usage") - public Optional getOrganizationUsage() { - return organizationUsage; - } - - /** - * @return If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations. - */ - @JsonProperty("allow_any_organization") - public Optional getAllowAnyOrganization() { - return allowAnyOrganization; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AssociateOrganizationClientGrantResponseContent - && equalTo((AssociateOrganizationClientGrantResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AssociateOrganizationClientGrantResponseContent other) { - return id.equals(other.id) - && clientId.equals(other.clientId) - && audience.equals(other.audience) - && scope.equals(other.scope) - && organizationUsage.equals(other.organizationUsage) - && allowAnyOrganization.equals(other.allowAnyOrganization); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.clientId, this.audience, this.scope, this.organizationUsage, this.allowAnyOrganization); - } - - @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 clientId = Optional.empty(); - - private Optional audience = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional organizationUsage = Optional.empty(); - - private Optional allowAnyOrganization = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AssociateOrganizationClientGrantResponseContent other) { - id(other.getId()); - clientId(other.getClientId()); - audience(other.getAudience()); - scope(other.getScope()); - organizationUsage(other.getOrganizationUsage()); - allowAnyOrganization(other.getAllowAnyOrganization()); - return this; - } - - /** - *

ID of the client grant.

- */ - @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; - } - - /** - *

ID of the 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 audience (API identifier) of this client grant

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

Scopes allowed for this client grant.

- */ - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "organization_usage", nulls = Nulls.SKIP) - public Builder organizationUsage(Optional organizationUsage) { - this.organizationUsage = organizationUsage; - return this; - } - - public Builder organizationUsage(OrganizationUsageEnum organizationUsage) { - this.organizationUsage = Optional.ofNullable(organizationUsage); - return this; - } - - /** - *

If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.

- */ - @JsonSetter(value = "allow_any_organization", nulls = Nulls.SKIP) - public Builder allowAnyOrganization(Optional allowAnyOrganization) { - this.allowAnyOrganization = allowAnyOrganization; - return this; - } - - public Builder allowAnyOrganization(Boolean allowAnyOrganization) { - this.allowAnyOrganization = Optional.ofNullable(allowAnyOrganization); - return this; - } - - public AssociateOrganizationClientGrantResponseContent build() { - return new AssociateOrganizationClientGrantResponseContent( - id, clientId, audience, scope, organizationUsage, allowAnyOrganization, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AsyncApprovalNotificationsChannelsEnum.java b/src/main/java/com/auth0/client/mgmt/types/AsyncApprovalNotificationsChannelsEnum.java deleted file mode 100644 index 84d74919d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AsyncApprovalNotificationsChannelsEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AsyncApprovalNotificationsChannelsEnum { - public static final AsyncApprovalNotificationsChannelsEnum EMAIL = - new AsyncApprovalNotificationsChannelsEnum(Value.EMAIL, "email"); - - public static final AsyncApprovalNotificationsChannelsEnum GUARDIAN_PUSH = - new AsyncApprovalNotificationsChannelsEnum(Value.GUARDIAN_PUSH, "guardian-push"); - - private final Value value; - - private final String string; - - AsyncApprovalNotificationsChannelsEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof AsyncApprovalNotificationsChannelsEnum - && this.string.equals(((AsyncApprovalNotificationsChannelsEnum) 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 GUARDIAN_PUSH: - return visitor.visitGuardianPush(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AsyncApprovalNotificationsChannelsEnum valueOf(String value) { - switch (value) { - case "email": - return EMAIL; - case "guardian-push": - return GUARDIAN_PUSH; - default: - return new AsyncApprovalNotificationsChannelsEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - GUARDIAN_PUSH, - - EMAIL, - - UNKNOWN - } - - public interface Visitor { - T visitGuardianPush(); - - T visitEmail(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaArkoseResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaArkoseResponseContent.java deleted file mode 100644 index e8b8ceee1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaArkoseResponseContent.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = AttackProtectionCaptchaArkoseResponseContent.Builder.class) -public final class AttackProtectionCaptchaArkoseResponseContent { - private final Optional siteKey; - - private final Optional failOpen; - - private final Optional clientSubdomain; - - private final Optional verifySubdomain; - - private final Map additionalProperties; - - private AttackProtectionCaptchaArkoseResponseContent( - Optional siteKey, - Optional failOpen, - Optional clientSubdomain, - Optional verifySubdomain, - Map additionalProperties) { - this.siteKey = siteKey; - this.failOpen = failOpen; - this.clientSubdomain = clientSubdomain; - this.verifySubdomain = verifySubdomain; - this.additionalProperties = additionalProperties; - } - - /** - * @return The site key for the Arkose captcha provider. - */ - @JsonProperty("site_key") - public Optional getSiteKey() { - return siteKey; - } - - /** - * @return Whether the captcha should fail open. - */ - @JsonProperty("fail_open") - public Optional getFailOpen() { - return failOpen; - } - - /** - * @return The subdomain used for client requests to the Arkose captcha provider. - */ - @JsonProperty("client_subdomain") - public Optional getClientSubdomain() { - return clientSubdomain; - } - - /** - * @return The subdomain used for server-side verification requests to the Arkose captcha provider. - */ - @JsonProperty("verify_subdomain") - public Optional getVerifySubdomain() { - return verifySubdomain; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AttackProtectionCaptchaArkoseResponseContent - && equalTo((AttackProtectionCaptchaArkoseResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AttackProtectionCaptchaArkoseResponseContent other) { - return siteKey.equals(other.siteKey) - && failOpen.equals(other.failOpen) - && clientSubdomain.equals(other.clientSubdomain) - && verifySubdomain.equals(other.verifySubdomain); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.siteKey, this.failOpen, this.clientSubdomain, this.verifySubdomain); - } - - @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 siteKey = Optional.empty(); - - private Optional failOpen = Optional.empty(); - - private Optional clientSubdomain = Optional.empty(); - - private Optional verifySubdomain = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AttackProtectionCaptchaArkoseResponseContent other) { - siteKey(other.getSiteKey()); - failOpen(other.getFailOpen()); - clientSubdomain(other.getClientSubdomain()); - verifySubdomain(other.getVerifySubdomain()); - return this; - } - - /** - *

The site key for the Arkose captcha provider.

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

Whether the captcha should fail open.

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

The subdomain used for client requests to the Arkose captcha provider.

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

The subdomain used for server-side verification requests to the Arkose captcha provider.

- */ - @JsonSetter(value = "verify_subdomain", nulls = Nulls.SKIP) - public Builder verifySubdomain(Optional verifySubdomain) { - this.verifySubdomain = verifySubdomain; - return this; - } - - public Builder verifySubdomain(String verifySubdomain) { - this.verifySubdomain = Optional.ofNullable(verifySubdomain); - return this; - } - - public AttackProtectionCaptchaArkoseResponseContent build() { - return new AttackProtectionCaptchaArkoseResponseContent( - siteKey, failOpen, clientSubdomain, verifySubdomain, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaAuthChallengeRequest.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaAuthChallengeRequest.java deleted file mode 100644 index 040e95363..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaAuthChallengeRequest.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = AttackProtectionCaptchaAuthChallengeRequest.Builder.class) -public final class AttackProtectionCaptchaAuthChallengeRequest { - private final boolean failOpen; - - private final Map additionalProperties; - - private AttackProtectionCaptchaAuthChallengeRequest(boolean failOpen, Map additionalProperties) { - this.failOpen = failOpen; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether the auth challenge should fail open. - */ - @JsonProperty("fail_open") - public boolean getFailOpen() { - return failOpen; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AttackProtectionCaptchaAuthChallengeRequest - && equalTo((AttackProtectionCaptchaAuthChallengeRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AttackProtectionCaptchaAuthChallengeRequest other) { - return failOpen == other.failOpen; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.failOpen); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FailOpenStage builder() { - return new Builder(); - } - - public interface FailOpenStage { - /** - *

Whether the auth challenge should fail open.

- */ - _FinalStage failOpen(boolean failOpen); - - Builder from(AttackProtectionCaptchaAuthChallengeRequest other); - } - - public interface _FinalStage { - AttackProtectionCaptchaAuthChallengeRequest build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements FailOpenStage, _FinalStage { - private boolean failOpen; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AttackProtectionCaptchaAuthChallengeRequest other) { - failOpen(other.getFailOpen()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("fail_open") - public _FinalStage failOpen(boolean failOpen) { - this.failOpen = failOpen; - return this; - } - - @java.lang.Override - public AttackProtectionCaptchaAuthChallengeRequest build() { - return new AttackProtectionCaptchaAuthChallengeRequest(failOpen, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaAuthChallengeResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaAuthChallengeResponseContent.java deleted file mode 100644 index cfd7fc991..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaAuthChallengeResponseContent.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = AttackProtectionCaptchaAuthChallengeResponseContent.Builder.class) -public final class AttackProtectionCaptchaAuthChallengeResponseContent { - private final Optional failOpen; - - private final Map additionalProperties; - - private AttackProtectionCaptchaAuthChallengeResponseContent( - Optional failOpen, Map additionalProperties) { - this.failOpen = failOpen; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether the auth challenge should fail open. - */ - @JsonProperty("fail_open") - public Optional getFailOpen() { - return failOpen; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AttackProtectionCaptchaAuthChallengeResponseContent - && equalTo((AttackProtectionCaptchaAuthChallengeResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AttackProtectionCaptchaAuthChallengeResponseContent other) { - return failOpen.equals(other.failOpen); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.failOpen); - } - - @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 failOpen = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AttackProtectionCaptchaAuthChallengeResponseContent other) { - failOpen(other.getFailOpen()); - return this; - } - - /** - *

Whether the auth challenge should fail open.

- */ - @JsonSetter(value = "fail_open", nulls = Nulls.SKIP) - public Builder failOpen(Optional failOpen) { - this.failOpen = failOpen; - return this; - } - - public Builder failOpen(Boolean failOpen) { - this.failOpen = Optional.ofNullable(failOpen); - return this; - } - - public AttackProtectionCaptchaAuthChallengeResponseContent build() { - return new AttackProtectionCaptchaAuthChallengeResponseContent(failOpen, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaFriendlyCaptchaResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaFriendlyCaptchaResponseContent.java deleted file mode 100644 index 1fe824f41..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaFriendlyCaptchaResponseContent.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = AttackProtectionCaptchaFriendlyCaptchaResponseContent.Builder.class) -public final class AttackProtectionCaptchaFriendlyCaptchaResponseContent { - private final Optional siteKey; - - private final Map additionalProperties; - - private AttackProtectionCaptchaFriendlyCaptchaResponseContent( - Optional siteKey, Map additionalProperties) { - this.siteKey = siteKey; - this.additionalProperties = additionalProperties; - } - - /** - * @return The site key for the Friendly Captcha provider. - */ - @JsonProperty("site_key") - public Optional getSiteKey() { - return siteKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AttackProtectionCaptchaFriendlyCaptchaResponseContent - && equalTo((AttackProtectionCaptchaFriendlyCaptchaResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AttackProtectionCaptchaFriendlyCaptchaResponseContent other) { - return siteKey.equals(other.siteKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.siteKey); - } - - @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 siteKey = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AttackProtectionCaptchaFriendlyCaptchaResponseContent other) { - siteKey(other.getSiteKey()); - return this; - } - - /** - *

The site key for the Friendly Captcha provider.

- */ - @JsonSetter(value = "site_key", nulls = Nulls.SKIP) - public Builder siteKey(Optional siteKey) { - this.siteKey = siteKey; - return this; - } - - public Builder siteKey(String siteKey) { - this.siteKey = Optional.ofNullable(siteKey); - return this; - } - - public AttackProtectionCaptchaFriendlyCaptchaResponseContent build() { - return new AttackProtectionCaptchaFriendlyCaptchaResponseContent(siteKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaHcaptchaResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaHcaptchaResponseContent.java deleted file mode 100644 index e77765a21..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaHcaptchaResponseContent.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = AttackProtectionCaptchaHcaptchaResponseContent.Builder.class) -public final class AttackProtectionCaptchaHcaptchaResponseContent { - private final Optional siteKey; - - private final Map additionalProperties; - - private AttackProtectionCaptchaHcaptchaResponseContent( - Optional siteKey, Map additionalProperties) { - this.siteKey = siteKey; - this.additionalProperties = additionalProperties; - } - - /** - * @return The site key for the hCaptcha provider. - */ - @JsonProperty("site_key") - public Optional getSiteKey() { - return siteKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AttackProtectionCaptchaHcaptchaResponseContent - && equalTo((AttackProtectionCaptchaHcaptchaResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AttackProtectionCaptchaHcaptchaResponseContent other) { - return siteKey.equals(other.siteKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.siteKey); - } - - @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 siteKey = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AttackProtectionCaptchaHcaptchaResponseContent other) { - siteKey(other.getSiteKey()); - return this; - } - - /** - *

The site key for the hCaptcha provider.

- */ - @JsonSetter(value = "site_key", nulls = Nulls.SKIP) - public Builder siteKey(Optional siteKey) { - this.siteKey = siteKey; - return this; - } - - public Builder siteKey(String siteKey) { - this.siteKey = Optional.ofNullable(siteKey); - return this; - } - - public AttackProtectionCaptchaHcaptchaResponseContent build() { - return new AttackProtectionCaptchaHcaptchaResponseContent(siteKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaProviderId.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaProviderId.java deleted file mode 100644 index d794d09e8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaProviderId.java +++ /dev/null @@ -1,141 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AttackProtectionCaptchaProviderId { - public static final AttackProtectionCaptchaProviderId RECAPTCHA_V2 = - new AttackProtectionCaptchaProviderId(Value.RECAPTCHA_V2, "recaptcha_v2"); - - public static final AttackProtectionCaptchaProviderId AUTH_CHALLENGE = - new AttackProtectionCaptchaProviderId(Value.AUTH_CHALLENGE, "auth_challenge"); - - public static final AttackProtectionCaptchaProviderId FRIENDLY_CAPTCHA = - new AttackProtectionCaptchaProviderId(Value.FRIENDLY_CAPTCHA, "friendly_captcha"); - - public static final AttackProtectionCaptchaProviderId ARKOSE = - new AttackProtectionCaptchaProviderId(Value.ARKOSE, "arkose"); - - public static final AttackProtectionCaptchaProviderId HCAPTCHA = - new AttackProtectionCaptchaProviderId(Value.HCAPTCHA, "hcaptcha"); - - public static final AttackProtectionCaptchaProviderId SIMPLE_CAPTCHA = - new AttackProtectionCaptchaProviderId(Value.SIMPLE_CAPTCHA, "simple_captcha"); - - public static final AttackProtectionCaptchaProviderId RECAPTCHA_ENTERPRISE = - new AttackProtectionCaptchaProviderId(Value.RECAPTCHA_ENTERPRISE, "recaptcha_enterprise"); - - private final Value value; - - private final String string; - - AttackProtectionCaptchaProviderId(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof AttackProtectionCaptchaProviderId - && this.string.equals(((AttackProtectionCaptchaProviderId) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case RECAPTCHA_V2: - return visitor.visitRecaptchaV2(); - case AUTH_CHALLENGE: - return visitor.visitAuthChallenge(); - case FRIENDLY_CAPTCHA: - return visitor.visitFriendlyCaptcha(); - case ARKOSE: - return visitor.visitArkose(); - case HCAPTCHA: - return visitor.visitHcaptcha(); - case SIMPLE_CAPTCHA: - return visitor.visitSimpleCaptcha(); - case RECAPTCHA_ENTERPRISE: - return visitor.visitRecaptchaEnterprise(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AttackProtectionCaptchaProviderId valueOf(String value) { - switch (value) { - case "recaptcha_v2": - return RECAPTCHA_V2; - case "auth_challenge": - return AUTH_CHALLENGE; - case "friendly_captcha": - return FRIENDLY_CAPTCHA; - case "arkose": - return ARKOSE; - case "hcaptcha": - return HCAPTCHA; - case "simple_captcha": - return SIMPLE_CAPTCHA; - case "recaptcha_enterprise": - return RECAPTCHA_ENTERPRISE; - default: - return new AttackProtectionCaptchaProviderId(Value.UNKNOWN, value); - } - } - - public enum Value { - ARKOSE, - - AUTH_CHALLENGE, - - FRIENDLY_CAPTCHA, - - HCAPTCHA, - - RECAPTCHA_V2, - - RECAPTCHA_ENTERPRISE, - - SIMPLE_CAPTCHA, - - UNKNOWN - } - - public interface Visitor { - T visitArkose(); - - T visitAuthChallenge(); - - T visitFriendlyCaptcha(); - - T visitHcaptcha(); - - T visitRecaptchaV2(); - - T visitRecaptchaEnterprise(); - - T visitSimpleCaptcha(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaRecaptchaEnterpriseResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaRecaptchaEnterpriseResponseContent.java deleted file mode 100644 index 0c0c64614..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaRecaptchaEnterpriseResponseContent.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = AttackProtectionCaptchaRecaptchaEnterpriseResponseContent.Builder.class) -public final class AttackProtectionCaptchaRecaptchaEnterpriseResponseContent { - private final Optional siteKey; - - private final Optional projectId; - - private final Map additionalProperties; - - private AttackProtectionCaptchaRecaptchaEnterpriseResponseContent( - Optional siteKey, Optional projectId, Map additionalProperties) { - this.siteKey = siteKey; - this.projectId = projectId; - this.additionalProperties = additionalProperties; - } - - /** - * @return The site key for the reCAPTCHA Enterprise provider. - */ - @JsonProperty("site_key") - public Optional getSiteKey() { - return siteKey; - } - - /** - * @return The project ID for the reCAPTCHA Enterprise provider. - */ - @JsonProperty("project_id") - public Optional getProjectId() { - return projectId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AttackProtectionCaptchaRecaptchaEnterpriseResponseContent - && equalTo((AttackProtectionCaptchaRecaptchaEnterpriseResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AttackProtectionCaptchaRecaptchaEnterpriseResponseContent other) { - return siteKey.equals(other.siteKey) && projectId.equals(other.projectId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.siteKey, this.projectId); - } - - @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 siteKey = Optional.empty(); - - private Optional projectId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AttackProtectionCaptchaRecaptchaEnterpriseResponseContent other) { - siteKey(other.getSiteKey()); - projectId(other.getProjectId()); - return this; - } - - /** - *

The site key for the reCAPTCHA Enterprise provider.

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

The project ID for the reCAPTCHA Enterprise provider.

- */ - @JsonSetter(value = "project_id", nulls = Nulls.SKIP) - public Builder projectId(Optional projectId) { - this.projectId = projectId; - return this; - } - - public Builder projectId(String projectId) { - this.projectId = Optional.ofNullable(projectId); - return this; - } - - public AttackProtectionCaptchaRecaptchaEnterpriseResponseContent build() { - return new AttackProtectionCaptchaRecaptchaEnterpriseResponseContent( - siteKey, projectId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaRecaptchaV2ResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaRecaptchaV2ResponseContent.java deleted file mode 100644 index 6291153df..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionCaptchaRecaptchaV2ResponseContent.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = AttackProtectionCaptchaRecaptchaV2ResponseContent.Builder.class) -public final class AttackProtectionCaptchaRecaptchaV2ResponseContent { - private final Optional siteKey; - - private final Map additionalProperties; - - private AttackProtectionCaptchaRecaptchaV2ResponseContent( - Optional siteKey, Map additionalProperties) { - this.siteKey = siteKey; - this.additionalProperties = additionalProperties; - } - - /** - * @return The site key for the reCAPTCHA v2 provider. - */ - @JsonProperty("site_key") - public Optional getSiteKey() { - return siteKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AttackProtectionCaptchaRecaptchaV2ResponseContent - && equalTo((AttackProtectionCaptchaRecaptchaV2ResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AttackProtectionCaptchaRecaptchaV2ResponseContent other) { - return siteKey.equals(other.siteKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.siteKey); - } - - @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 siteKey = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AttackProtectionCaptchaRecaptchaV2ResponseContent other) { - siteKey(other.getSiteKey()); - return this; - } - - /** - *

The site key for the reCAPTCHA v2 provider.

- */ - @JsonSetter(value = "site_key", nulls = Nulls.SKIP) - public Builder siteKey(Optional siteKey) { - this.siteKey = siteKey; - return this; - } - - public Builder siteKey(String siteKey) { - this.siteKey = Optional.ofNullable(siteKey); - return this; - } - - public AttackProtectionCaptchaRecaptchaV2ResponseContent build() { - return new AttackProtectionCaptchaRecaptchaV2ResponseContent(siteKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaArkose.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaArkose.java deleted file mode 100644 index 5de31a941..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaArkose.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = AttackProtectionUpdateCaptchaArkose.Builder.class) -public final class AttackProtectionUpdateCaptchaArkose { - private final String siteKey; - - private final String secret; - - private final Optional clientSubdomain; - - private final Optional verifySubdomain; - - private final Optional failOpen; - - private final Map additionalProperties; - - private AttackProtectionUpdateCaptchaArkose( - String siteKey, - String secret, - Optional clientSubdomain, - Optional verifySubdomain, - Optional failOpen, - Map additionalProperties) { - this.siteKey = siteKey; - this.secret = secret; - this.clientSubdomain = clientSubdomain; - this.verifySubdomain = verifySubdomain; - this.failOpen = failOpen; - this.additionalProperties = additionalProperties; - } - - /** - * @return The site key for the Arkose captcha provider. - */ - @JsonProperty("site_key") - public String getSiteKey() { - return siteKey; - } - - /** - * @return The secret key for the Arkose captcha provider. - */ - @JsonProperty("secret") - public String getSecret() { - return secret; - } - - /** - * @return The subdomain used for client requests to the Arkose captcha provider. - */ - @JsonProperty("client_subdomain") - public Optional getClientSubdomain() { - return clientSubdomain; - } - - /** - * @return The subdomain used for server-side verification requests to the Arkose captcha provider. - */ - @JsonProperty("verify_subdomain") - public Optional getVerifySubdomain() { - return verifySubdomain; - } - - /** - * @return Whether the captcha should fail open. - */ - @JsonProperty("fail_open") - public Optional getFailOpen() { - return failOpen; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AttackProtectionUpdateCaptchaArkose - && equalTo((AttackProtectionUpdateCaptchaArkose) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AttackProtectionUpdateCaptchaArkose other) { - return siteKey.equals(other.siteKey) - && secret.equals(other.secret) - && clientSubdomain.equals(other.clientSubdomain) - && verifySubdomain.equals(other.verifySubdomain) - && failOpen.equals(other.failOpen); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.siteKey, this.secret, this.clientSubdomain, this.verifySubdomain, this.failOpen); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static SiteKeyStage builder() { - return new Builder(); - } - - public interface SiteKeyStage { - /** - *

The site key for the Arkose captcha provider.

- */ - SecretStage siteKey(@NotNull String siteKey); - - Builder from(AttackProtectionUpdateCaptchaArkose other); - } - - public interface SecretStage { - /** - *

The secret key for the Arkose captcha provider.

- */ - _FinalStage secret(@NotNull String secret); - } - - public interface _FinalStage { - AttackProtectionUpdateCaptchaArkose build(); - - /** - *

The subdomain used for client requests to the Arkose captcha provider.

- */ - _FinalStage clientSubdomain(Optional clientSubdomain); - - _FinalStage clientSubdomain(String clientSubdomain); - - /** - *

The subdomain used for server-side verification requests to the Arkose captcha provider.

- */ - _FinalStage verifySubdomain(Optional verifySubdomain); - - _FinalStage verifySubdomain(String verifySubdomain); - - /** - *

Whether the captcha should fail open.

- */ - _FinalStage failOpen(Optional failOpen); - - _FinalStage failOpen(Boolean failOpen); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements SiteKeyStage, SecretStage, _FinalStage { - private String siteKey; - - private String secret; - - private Optional failOpen = Optional.empty(); - - private Optional verifySubdomain = Optional.empty(); - - private Optional clientSubdomain = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AttackProtectionUpdateCaptchaArkose other) { - siteKey(other.getSiteKey()); - secret(other.getSecret()); - clientSubdomain(other.getClientSubdomain()); - verifySubdomain(other.getVerifySubdomain()); - failOpen(other.getFailOpen()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("site_key") - public SecretStage siteKey(@NotNull String siteKey) { - this.siteKey = Objects.requireNonNull(siteKey, "siteKey must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("secret") - public _FinalStage secret(@NotNull String secret) { - this.secret = Objects.requireNonNull(secret, "secret must not be null"); - return this; - } - - /** - *

Whether the captcha should fail open.

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

Whether the captcha should fail open.

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

The subdomain used for server-side verification requests to the Arkose captcha provider.

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

The subdomain used for server-side verification requests to the Arkose captcha provider.

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

The subdomain used for client requests to the Arkose captcha provider.

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

The subdomain used for client requests to the Arkose captcha provider.

- */ - @java.lang.Override - @JsonSetter(value = "client_subdomain", nulls = Nulls.SKIP) - public _FinalStage clientSubdomain(Optional clientSubdomain) { - this.clientSubdomain = clientSubdomain; - return this; - } - - @java.lang.Override - public AttackProtectionUpdateCaptchaArkose build() { - return new AttackProtectionUpdateCaptchaArkose( - siteKey, secret, clientSubdomain, verifySubdomain, failOpen, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaFriendlyCaptcha.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaFriendlyCaptcha.java deleted file mode 100644 index f3d194749..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaFriendlyCaptcha.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = AttackProtectionUpdateCaptchaFriendlyCaptcha.Builder.class) -public final class AttackProtectionUpdateCaptchaFriendlyCaptcha { - private final String siteKey; - - private final String secret; - - private final Map additionalProperties; - - private AttackProtectionUpdateCaptchaFriendlyCaptcha( - String siteKey, String secret, Map additionalProperties) { - this.siteKey = siteKey; - this.secret = secret; - this.additionalProperties = additionalProperties; - } - - /** - * @return The site key for the Friendly Captcha provider. - */ - @JsonProperty("site_key") - public String getSiteKey() { - return siteKey; - } - - /** - * @return The secret key for the Friendly Captcha provider. - */ - @JsonProperty("secret") - public String getSecret() { - return secret; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AttackProtectionUpdateCaptchaFriendlyCaptcha - && equalTo((AttackProtectionUpdateCaptchaFriendlyCaptcha) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AttackProtectionUpdateCaptchaFriendlyCaptcha other) { - return siteKey.equals(other.siteKey) && secret.equals(other.secret); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.siteKey, this.secret); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static SiteKeyStage builder() { - return new Builder(); - } - - public interface SiteKeyStage { - /** - *

The site key for the Friendly Captcha provider.

- */ - SecretStage siteKey(@NotNull String siteKey); - - Builder from(AttackProtectionUpdateCaptchaFriendlyCaptcha other); - } - - public interface SecretStage { - /** - *

The secret key for the Friendly Captcha provider.

- */ - _FinalStage secret(@NotNull String secret); - } - - public interface _FinalStage { - AttackProtectionUpdateCaptchaFriendlyCaptcha build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements SiteKeyStage, SecretStage, _FinalStage { - private String siteKey; - - private String secret; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AttackProtectionUpdateCaptchaFriendlyCaptcha other) { - siteKey(other.getSiteKey()); - secret(other.getSecret()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("site_key") - public SecretStage siteKey(@NotNull String siteKey) { - this.siteKey = Objects.requireNonNull(siteKey, "siteKey must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("secret") - public _FinalStage secret(@NotNull String secret) { - this.secret = Objects.requireNonNull(secret, "secret must not be null"); - return this; - } - - @java.lang.Override - public AttackProtectionUpdateCaptchaFriendlyCaptcha build() { - return new AttackProtectionUpdateCaptchaFriendlyCaptcha(siteKey, secret, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaHcaptcha.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaHcaptcha.java deleted file mode 100644 index dbfc6c94a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaHcaptcha.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = AttackProtectionUpdateCaptchaHcaptcha.Builder.class) -public final class AttackProtectionUpdateCaptchaHcaptcha { - private final String siteKey; - - private final String secret; - - private final Map additionalProperties; - - private AttackProtectionUpdateCaptchaHcaptcha( - String siteKey, String secret, Map additionalProperties) { - this.siteKey = siteKey; - this.secret = secret; - this.additionalProperties = additionalProperties; - } - - /** - * @return The site key for the hCaptcha provider. - */ - @JsonProperty("site_key") - public String getSiteKey() { - return siteKey; - } - - /** - * @return The secret key for the hCaptcha provider. - */ - @JsonProperty("secret") - public String getSecret() { - return secret; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AttackProtectionUpdateCaptchaHcaptcha - && equalTo((AttackProtectionUpdateCaptchaHcaptcha) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AttackProtectionUpdateCaptchaHcaptcha other) { - return siteKey.equals(other.siteKey) && secret.equals(other.secret); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.siteKey, this.secret); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static SiteKeyStage builder() { - return new Builder(); - } - - public interface SiteKeyStage { - /** - *

The site key for the hCaptcha provider.

- */ - SecretStage siteKey(@NotNull String siteKey); - - Builder from(AttackProtectionUpdateCaptchaHcaptcha other); - } - - public interface SecretStage { - /** - *

The secret key for the hCaptcha provider.

- */ - _FinalStage secret(@NotNull String secret); - } - - public interface _FinalStage { - AttackProtectionUpdateCaptchaHcaptcha build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements SiteKeyStage, SecretStage, _FinalStage { - private String siteKey; - - private String secret; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AttackProtectionUpdateCaptchaHcaptcha other) { - siteKey(other.getSiteKey()); - secret(other.getSecret()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("site_key") - public SecretStage siteKey(@NotNull String siteKey) { - this.siteKey = Objects.requireNonNull(siteKey, "siteKey must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("secret") - public _FinalStage secret(@NotNull String secret) { - this.secret = Objects.requireNonNull(secret, "secret must not be null"); - return this; - } - - @java.lang.Override - public AttackProtectionUpdateCaptchaHcaptcha build() { - return new AttackProtectionUpdateCaptchaHcaptcha(siteKey, secret, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaRecaptchaEnterprise.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaRecaptchaEnterprise.java deleted file mode 100644 index b58eb78a7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaRecaptchaEnterprise.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = AttackProtectionUpdateCaptchaRecaptchaEnterprise.Builder.class) -public final class AttackProtectionUpdateCaptchaRecaptchaEnterprise { - private final String siteKey; - - private final String apiKey; - - private final String projectId; - - private final Map additionalProperties; - - private AttackProtectionUpdateCaptchaRecaptchaEnterprise( - String siteKey, String apiKey, String projectId, Map additionalProperties) { - this.siteKey = siteKey; - this.apiKey = apiKey; - this.projectId = projectId; - this.additionalProperties = additionalProperties; - } - - /** - * @return The site key for the reCAPTCHA Enterprise provider. - */ - @JsonProperty("site_key") - public String getSiteKey() { - return siteKey; - } - - /** - * @return The API key for the reCAPTCHA Enterprise provider. - */ - @JsonProperty("api_key") - public String getApiKey() { - return apiKey; - } - - /** - * @return The project ID for the reCAPTCHA Enterprise provider. - */ - @JsonProperty("project_id") - public String getProjectId() { - return projectId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AttackProtectionUpdateCaptchaRecaptchaEnterprise - && equalTo((AttackProtectionUpdateCaptchaRecaptchaEnterprise) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AttackProtectionUpdateCaptchaRecaptchaEnterprise other) { - return siteKey.equals(other.siteKey) && apiKey.equals(other.apiKey) && projectId.equals(other.projectId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.siteKey, this.apiKey, this.projectId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static SiteKeyStage builder() { - return new Builder(); - } - - public interface SiteKeyStage { - /** - *

The site key for the reCAPTCHA Enterprise provider.

- */ - ApiKeyStage siteKey(@NotNull String siteKey); - - Builder from(AttackProtectionUpdateCaptchaRecaptchaEnterprise other); - } - - public interface ApiKeyStage { - /** - *

The API key for the reCAPTCHA Enterprise provider.

- */ - ProjectIdStage apiKey(@NotNull String apiKey); - } - - public interface ProjectIdStage { - /** - *

The project ID for the reCAPTCHA Enterprise provider.

- */ - _FinalStage projectId(@NotNull String projectId); - } - - public interface _FinalStage { - AttackProtectionUpdateCaptchaRecaptchaEnterprise build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements SiteKeyStage, ApiKeyStage, ProjectIdStage, _FinalStage { - private String siteKey; - - private String apiKey; - - private String projectId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AttackProtectionUpdateCaptchaRecaptchaEnterprise other) { - siteKey(other.getSiteKey()); - apiKey(other.getApiKey()); - projectId(other.getProjectId()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("site_key") - public ApiKeyStage siteKey(@NotNull String siteKey) { - this.siteKey = Objects.requireNonNull(siteKey, "siteKey must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("api_key") - public ProjectIdStage apiKey(@NotNull String apiKey) { - this.apiKey = Objects.requireNonNull(apiKey, "apiKey must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("project_id") - public _FinalStage projectId(@NotNull String projectId) { - this.projectId = Objects.requireNonNull(projectId, "projectId must not be null"); - return this; - } - - @java.lang.Override - public AttackProtectionUpdateCaptchaRecaptchaEnterprise build() { - return new AttackProtectionUpdateCaptchaRecaptchaEnterprise( - siteKey, apiKey, projectId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaRecaptchaV2.java b/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaRecaptchaV2.java deleted file mode 100644 index 3fcc85181..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AttackProtectionUpdateCaptchaRecaptchaV2.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = AttackProtectionUpdateCaptchaRecaptchaV2.Builder.class) -public final class AttackProtectionUpdateCaptchaRecaptchaV2 { - private final String siteKey; - - private final String secret; - - private final Map additionalProperties; - - private AttackProtectionUpdateCaptchaRecaptchaV2( - String siteKey, String secret, Map additionalProperties) { - this.siteKey = siteKey; - this.secret = secret; - this.additionalProperties = additionalProperties; - } - - /** - * @return The site key for the reCAPTCHA v2 provider. - */ - @JsonProperty("site_key") - public String getSiteKey() { - return siteKey; - } - - /** - * @return The secret key for the reCAPTCHA v2 provider. - */ - @JsonProperty("secret") - public String getSecret() { - return secret; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AttackProtectionUpdateCaptchaRecaptchaV2 - && equalTo((AttackProtectionUpdateCaptchaRecaptchaV2) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AttackProtectionUpdateCaptchaRecaptchaV2 other) { - return siteKey.equals(other.siteKey) && secret.equals(other.secret); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.siteKey, this.secret); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static SiteKeyStage builder() { - return new Builder(); - } - - public interface SiteKeyStage { - /** - *

The site key for the reCAPTCHA v2 provider.

- */ - SecretStage siteKey(@NotNull String siteKey); - - Builder from(AttackProtectionUpdateCaptchaRecaptchaV2 other); - } - - public interface SecretStage { - /** - *

The secret key for the reCAPTCHA v2 provider.

- */ - _FinalStage secret(@NotNull String secret); - } - - public interface _FinalStage { - AttackProtectionUpdateCaptchaRecaptchaV2 build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements SiteKeyStage, SecretStage, _FinalStage { - private String siteKey; - - private String secret; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(AttackProtectionUpdateCaptchaRecaptchaV2 other) { - siteKey(other.getSiteKey()); - secret(other.getSecret()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("site_key") - public SecretStage siteKey(@NotNull String siteKey) { - this.siteKey = Objects.requireNonNull(siteKey, "siteKey must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("secret") - public _FinalStage secret(@NotNull String secret) { - this.secret = Objects.requireNonNull(secret, "secret must not be null"); - return this; - } - - @java.lang.Override - public AttackProtectionUpdateCaptchaRecaptchaV2 build() { - return new AttackProtectionUpdateCaptchaRecaptchaV2(siteKey, secret, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AuthenticationMethodTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/AuthenticationMethodTypeEnum.java deleted file mode 100644 index 57756fa60..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AuthenticationMethodTypeEnum.java +++ /dev/null @@ -1,181 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AuthenticationMethodTypeEnum { - public static final AuthenticationMethodTypeEnum TOTP = new AuthenticationMethodTypeEnum(Value.TOTP, "totp"); - - public static final AuthenticationMethodTypeEnum EMAIL = new AuthenticationMethodTypeEnum(Value.EMAIL, "email"); - - public static final AuthenticationMethodTypeEnum PASSKEY = - new AuthenticationMethodTypeEnum(Value.PASSKEY, "passkey"); - - public static final AuthenticationMethodTypeEnum PASSWORD = - new AuthenticationMethodTypeEnum(Value.PASSWORD, "password"); - - public static final AuthenticationMethodTypeEnum WEBAUTHN_PLATFORM = - new AuthenticationMethodTypeEnum(Value.WEBAUTHN_PLATFORM, "webauthn-platform"); - - public static final AuthenticationMethodTypeEnum GUARDIAN = - new AuthenticationMethodTypeEnum(Value.GUARDIAN, "guardian"); - - public static final AuthenticationMethodTypeEnum PHONE = new AuthenticationMethodTypeEnum(Value.PHONE, "phone"); - - public static final AuthenticationMethodTypeEnum EMAIL_VERIFICATION = - new AuthenticationMethodTypeEnum(Value.EMAIL_VERIFICATION, "email-verification"); - - public static final AuthenticationMethodTypeEnum PUSH = new AuthenticationMethodTypeEnum(Value.PUSH, "push"); - - public static final AuthenticationMethodTypeEnum WEBAUTHN_ROAMING = - new AuthenticationMethodTypeEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); - - public static final AuthenticationMethodTypeEnum RECOVERY_CODE = - new AuthenticationMethodTypeEnum(Value.RECOVERY_CODE, "recovery-code"); - - private final Value value; - - private final String string; - - AuthenticationMethodTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof AuthenticationMethodTypeEnum - && this.string.equals(((AuthenticationMethodTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TOTP: - return visitor.visitTotp(); - case EMAIL: - return visitor.visitEmail(); - case PASSKEY: - return visitor.visitPasskey(); - case PASSWORD: - return visitor.visitPassword(); - case WEBAUTHN_PLATFORM: - return visitor.visitWebauthnPlatform(); - case GUARDIAN: - return visitor.visitGuardian(); - case PHONE: - return visitor.visitPhone(); - case EMAIL_VERIFICATION: - return visitor.visitEmailVerification(); - case PUSH: - return visitor.visitPush(); - case WEBAUTHN_ROAMING: - return visitor.visitWebauthnRoaming(); - case RECOVERY_CODE: - return visitor.visitRecoveryCode(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AuthenticationMethodTypeEnum valueOf(String value) { - switch (value) { - case "totp": - return TOTP; - case "email": - return EMAIL; - case "passkey": - return PASSKEY; - case "password": - return PASSWORD; - case "webauthn-platform": - return WEBAUTHN_PLATFORM; - case "guardian": - return GUARDIAN; - case "phone": - return PHONE; - case "email-verification": - return EMAIL_VERIFICATION; - case "push": - return PUSH; - case "webauthn-roaming": - return WEBAUTHN_ROAMING; - case "recovery-code": - return RECOVERY_CODE; - default: - return new AuthenticationMethodTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - RECOVERY_CODE, - - TOTP, - - PUSH, - - PHONE, - - EMAIL, - - EMAIL_VERIFICATION, - - WEBAUTHN_ROAMING, - - WEBAUTHN_PLATFORM, - - GUARDIAN, - - PASSKEY, - - PASSWORD, - - UNKNOWN - } - - public interface Visitor { - T visitRecoveryCode(); - - T visitTotp(); - - T visitPush(); - - T visitPhone(); - - T visitEmail(); - - T visitEmailVerification(); - - T visitWebauthnRoaming(); - - T visitWebauthnPlatform(); - - T visitGuardian(); - - T visitPasskey(); - - T visitPassword(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/AuthenticationTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/AuthenticationTypeEnum.java deleted file mode 100644 index 432c4403f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/AuthenticationTypeEnum.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class AuthenticationTypeEnum { - public static final AuthenticationTypeEnum EMAIL = new AuthenticationTypeEnum(Value.EMAIL, "email"); - - public static final AuthenticationTypeEnum TOTP = new AuthenticationTypeEnum(Value.TOTP, "totp"); - - public static final AuthenticationTypeEnum PHONE = new AuthenticationTypeEnum(Value.PHONE, "phone"); - - private final Value value; - - private final String string; - - AuthenticationTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof AuthenticationTypeEnum - && this.string.equals(((AuthenticationTypeEnum) 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 TOTP: - return visitor.visitTotp(); - case PHONE: - return visitor.visitPhone(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static AuthenticationTypeEnum valueOf(String value) { - switch (value) { - case "email": - return EMAIL; - case "totp": - return TOTP; - case "phone": - return PHONE; - default: - return new AuthenticationTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PHONE, - - EMAIL, - - TOTP, - - UNKNOWN - } - - public interface Visitor { - T visitPhone(); - - T visitEmail(); - - T visitTotp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BotDetectionChallengePolicyPasswordFlowEnum.java b/src/main/java/com/auth0/client/mgmt/types/BotDetectionChallengePolicyPasswordFlowEnum.java deleted file mode 100644 index c7b28b0f0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BotDetectionChallengePolicyPasswordFlowEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BotDetectionChallengePolicyPasswordFlowEnum { - public static final BotDetectionChallengePolicyPasswordFlowEnum NEVER = - new BotDetectionChallengePolicyPasswordFlowEnum(Value.NEVER, "never"); - - public static final BotDetectionChallengePolicyPasswordFlowEnum WHEN_RISKY = - new BotDetectionChallengePolicyPasswordFlowEnum(Value.WHEN_RISKY, "when_risky"); - - public static final BotDetectionChallengePolicyPasswordFlowEnum ALWAYS = - new BotDetectionChallengePolicyPasswordFlowEnum(Value.ALWAYS, "always"); - - private final Value value; - - private final String string; - - BotDetectionChallengePolicyPasswordFlowEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BotDetectionChallengePolicyPasswordFlowEnum - && this.string.equals(((BotDetectionChallengePolicyPasswordFlowEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case NEVER: - return visitor.visitNever(); - case WHEN_RISKY: - return visitor.visitWhenRisky(); - case ALWAYS: - return visitor.visitAlways(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BotDetectionChallengePolicyPasswordFlowEnum valueOf(String value) { - switch (value) { - case "never": - return NEVER; - case "when_risky": - return WHEN_RISKY; - case "always": - return ALWAYS; - default: - return new BotDetectionChallengePolicyPasswordFlowEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - NEVER, - - WHEN_RISKY, - - ALWAYS, - - UNKNOWN - } - - public interface Visitor { - T visitNever(); - - T visitWhenRisky(); - - T visitAlways(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BotDetectionChallengePolicyPasswordResetFlowEnum.java b/src/main/java/com/auth0/client/mgmt/types/BotDetectionChallengePolicyPasswordResetFlowEnum.java deleted file mode 100644 index 2adda5d6a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BotDetectionChallengePolicyPasswordResetFlowEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BotDetectionChallengePolicyPasswordResetFlowEnum { - public static final BotDetectionChallengePolicyPasswordResetFlowEnum NEVER = - new BotDetectionChallengePolicyPasswordResetFlowEnum(Value.NEVER, "never"); - - public static final BotDetectionChallengePolicyPasswordResetFlowEnum WHEN_RISKY = - new BotDetectionChallengePolicyPasswordResetFlowEnum(Value.WHEN_RISKY, "when_risky"); - - public static final BotDetectionChallengePolicyPasswordResetFlowEnum ALWAYS = - new BotDetectionChallengePolicyPasswordResetFlowEnum(Value.ALWAYS, "always"); - - private final Value value; - - private final String string; - - BotDetectionChallengePolicyPasswordResetFlowEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BotDetectionChallengePolicyPasswordResetFlowEnum - && this.string.equals(((BotDetectionChallengePolicyPasswordResetFlowEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case NEVER: - return visitor.visitNever(); - case WHEN_RISKY: - return visitor.visitWhenRisky(); - case ALWAYS: - return visitor.visitAlways(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BotDetectionChallengePolicyPasswordResetFlowEnum valueOf(String value) { - switch (value) { - case "never": - return NEVER; - case "when_risky": - return WHEN_RISKY; - case "always": - return ALWAYS; - default: - return new BotDetectionChallengePolicyPasswordResetFlowEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - NEVER, - - WHEN_RISKY, - - ALWAYS, - - UNKNOWN - } - - public interface Visitor { - T visitNever(); - - T visitWhenRisky(); - - T visitAlways(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BotDetectionChallengePolicyPasswordlessFlowEnum.java b/src/main/java/com/auth0/client/mgmt/types/BotDetectionChallengePolicyPasswordlessFlowEnum.java deleted file mode 100644 index cdb4d2740..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BotDetectionChallengePolicyPasswordlessFlowEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BotDetectionChallengePolicyPasswordlessFlowEnum { - public static final BotDetectionChallengePolicyPasswordlessFlowEnum NEVER = - new BotDetectionChallengePolicyPasswordlessFlowEnum(Value.NEVER, "never"); - - public static final BotDetectionChallengePolicyPasswordlessFlowEnum WHEN_RISKY = - new BotDetectionChallengePolicyPasswordlessFlowEnum(Value.WHEN_RISKY, "when_risky"); - - public static final BotDetectionChallengePolicyPasswordlessFlowEnum ALWAYS = - new BotDetectionChallengePolicyPasswordlessFlowEnum(Value.ALWAYS, "always"); - - private final Value value; - - private final String string; - - BotDetectionChallengePolicyPasswordlessFlowEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BotDetectionChallengePolicyPasswordlessFlowEnum - && this.string.equals(((BotDetectionChallengePolicyPasswordlessFlowEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case NEVER: - return visitor.visitNever(); - case WHEN_RISKY: - return visitor.visitWhenRisky(); - case ALWAYS: - return visitor.visitAlways(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BotDetectionChallengePolicyPasswordlessFlowEnum valueOf(String value) { - switch (value) { - case "never": - return NEVER; - case "when_risky": - return WHEN_RISKY; - case "always": - return ALWAYS; - default: - return new BotDetectionChallengePolicyPasswordlessFlowEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - NEVER, - - WHEN_RISKY, - - ALWAYS, - - UNKNOWN - } - - public interface Visitor { - T visitNever(); - - T visitWhenRisky(); - - T visitAlways(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BotDetectionLevelEnum.java b/src/main/java/com/auth0/client/mgmt/types/BotDetectionLevelEnum.java deleted file mode 100644 index c2da1fff4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BotDetectionLevelEnum.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BotDetectionLevelEnum { - public static final BotDetectionLevelEnum MEDIUM = new BotDetectionLevelEnum(Value.MEDIUM, "medium"); - - public static final BotDetectionLevelEnum LOW = new BotDetectionLevelEnum(Value.LOW, "low"); - - public static final BotDetectionLevelEnum HIGH = new BotDetectionLevelEnum(Value.HIGH, "high"); - - private final Value value; - - private final String string; - - BotDetectionLevelEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BotDetectionLevelEnum - && this.string.equals(((BotDetectionLevelEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MEDIUM: - return visitor.visitMedium(); - case LOW: - return visitor.visitLow(); - case HIGH: - return visitor.visitHigh(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BotDetectionLevelEnum valueOf(String value) { - switch (value) { - case "medium": - return MEDIUM; - case "low": - return LOW; - case "high": - return HIGH; - default: - return new BotDetectionLevelEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - LOW, - - MEDIUM, - - HIGH, - - UNKNOWN - } - - public interface Visitor { - T visitLow(); - - T visitMedium(); - - T visitHigh(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingColors.java b/src/main/java/com/auth0/client/mgmt/types/BrandingColors.java deleted file mode 100644 index b8c8027b1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingColors.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = BrandingColors.Builder.class) -public final class BrandingColors { - private final Optional primary; - - private final Optional pageBackground; - - private final Map additionalProperties; - - private BrandingColors( - Optional primary, - Optional pageBackground, - Map additionalProperties) { - this.primary = primary; - this.pageBackground = pageBackground; - this.additionalProperties = additionalProperties; - } - - /** - * @return Accent color. - */ - @JsonProperty("primary") - public Optional getPrimary() { - return primary; - } - - @JsonProperty("page_background") - public Optional getPageBackground() { - return pageBackground; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BrandingColors && equalTo((BrandingColors) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BrandingColors 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(BrandingColors other) { - primary(other.getPrimary()); - pageBackground(other.getPageBackground()); - return this; - } - - /** - *

Accent color.

- */ - @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; - } - - @JsonSetter(value = "page_background", nulls = Nulls.SKIP) - public Builder pageBackground(Optional pageBackground) { - this.pageBackground = pageBackground; - return this; - } - - public Builder pageBackground(BrandingPageBackground pageBackground) { - this.pageBackground = Optional.ofNullable(pageBackground); - return this; - } - - public BrandingColors build() { - return new BrandingColors(primary, pageBackground, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingFont.java b/src/main/java/com/auth0/client/mgmt/types/BrandingFont.java deleted file mode 100644 index 4aae99c01..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingFont.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = BrandingFont.Builder.class) -public final class BrandingFont { - private final Optional url; - - private final Map additionalProperties; - - private BrandingFont(Optional url, Map additionalProperties) { - this.url = url; - this.additionalProperties = additionalProperties; - } - - /** - * @return URL for the custom font. The URL must point to a font file and not a stylesheet. Must use HTTPS. - */ - @JsonProperty("url") - public Optional getUrl() { - return url; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BrandingFont && equalTo((BrandingFont) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BrandingFont other) { - return url.equals(other.url); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.url); - } - - @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 url = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(BrandingFont other) { - url(other.getUrl()); - return this; - } - - /** - *

URL for the custom font. The URL must point to a font file and not a stylesheet. Must use HTTPS.

- */ - @JsonSetter(value = "url", nulls = Nulls.SKIP) - public Builder url(Optional url) { - this.url = url; - return this; - } - - public Builder url(String url) { - this.url = Optional.ofNullable(url); - return this; - } - - public BrandingFont build() { - return new BrandingFont(url, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingPageBackground.java b/src/main/java/com/auth0/client/mgmt/types/BrandingPageBackground.java deleted file mode 100644 index d8e3bf912..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingPageBackground.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.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.Map; -import java.util.Objects; - -@JsonDeserialize(using = BrandingPageBackground.Deserializer.class) -public final class BrandingPageBackground { - private final Object value; - - private final int type; - - private BrandingPageBackground(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.visitOptionalNullableString((OptionalNullable) this.value); - } else if (this.type == 1) { - return visitor.visitOptionalNullableMapOfStringToUnknown( - (OptionalNullable>) 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 BrandingPageBackground && equalTo((BrandingPageBackground) other); - } - - private boolean equalTo(BrandingPageBackground 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 BrandingPageBackground ofOptionalNullableString(OptionalNullable value) { - return new BrandingPageBackground(value, 0); - } - - public static BrandingPageBackground ofOptionalNullableMapOfStringToUnknown( - OptionalNullable> value) { - return new BrandingPageBackground(value, 1); - } - - public interface Visitor { - T visitOptionalNullableString(OptionalNullable value); - - T visitOptionalNullableMapOfStringToUnknown(OptionalNullable> value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(BrandingPageBackground.class); - } - - @java.lang.Override - public BrandingPageBackground deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return ofOptionalNullableString(ObjectMappers.JSON_MAPPER.convertValue( - value, new TypeReference>() {})); - } catch (RuntimeException e) { - } - try { - return ofOptionalNullableMapOfStringToUnknown(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/BrandingThemeBorders.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeBorders.java deleted file mode 100644 index ef00067ff..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeBorders.java +++ /dev/null @@ -1,402 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = BrandingThemeBorders.Builder.class) -public final class BrandingThemeBorders { - private final double buttonBorderRadius; - - private final double buttonBorderWeight; - - private final BrandingThemeBordersButtonsStyleEnum buttonsStyle; - - private final double inputBorderRadius; - - private final double inputBorderWeight; - - private final BrandingThemeBordersInputsStyleEnum inputsStyle; - - private final boolean showWidgetShadow; - - private final double widgetBorderWeight; - - private final double widgetCornerRadius; - - private final Map additionalProperties; - - private BrandingThemeBorders( - double buttonBorderRadius, - double buttonBorderWeight, - BrandingThemeBordersButtonsStyleEnum buttonsStyle, - double inputBorderRadius, - double inputBorderWeight, - BrandingThemeBordersInputsStyleEnum inputsStyle, - boolean showWidgetShadow, - double widgetBorderWeight, - double widgetCornerRadius, - Map additionalProperties) { - this.buttonBorderRadius = buttonBorderRadius; - this.buttonBorderWeight = buttonBorderWeight; - this.buttonsStyle = buttonsStyle; - this.inputBorderRadius = inputBorderRadius; - this.inputBorderWeight = inputBorderWeight; - this.inputsStyle = inputsStyle; - this.showWidgetShadow = showWidgetShadow; - this.widgetBorderWeight = widgetBorderWeight; - this.widgetCornerRadius = widgetCornerRadius; - this.additionalProperties = additionalProperties; - } - - /** - * @return Button border radius - */ - @JsonProperty("button_border_radius") - public double getButtonBorderRadius() { - return buttonBorderRadius; - } - - /** - * @return Button border weight - */ - @JsonProperty("button_border_weight") - public double getButtonBorderWeight() { - return buttonBorderWeight; - } - - @JsonProperty("buttons_style") - public BrandingThemeBordersButtonsStyleEnum getButtonsStyle() { - return buttonsStyle; - } - - /** - * @return Input border radius - */ - @JsonProperty("input_border_radius") - public double getInputBorderRadius() { - return inputBorderRadius; - } - - /** - * @return Input border weight - */ - @JsonProperty("input_border_weight") - public double getInputBorderWeight() { - return inputBorderWeight; - } - - @JsonProperty("inputs_style") - public BrandingThemeBordersInputsStyleEnum getInputsStyle() { - return inputsStyle; - } - - /** - * @return Show widget shadow - */ - @JsonProperty("show_widget_shadow") - public boolean getShowWidgetShadow() { - return showWidgetShadow; - } - - /** - * @return Widget border weight - */ - @JsonProperty("widget_border_weight") - public double getWidgetBorderWeight() { - return widgetBorderWeight; - } - - /** - * @return Widget corner radius - */ - @JsonProperty("widget_corner_radius") - public double getWidgetCornerRadius() { - return widgetCornerRadius; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BrandingThemeBorders && equalTo((BrandingThemeBorders) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BrandingThemeBorders other) { - return buttonBorderRadius == other.buttonBorderRadius - && buttonBorderWeight == other.buttonBorderWeight - && buttonsStyle.equals(other.buttonsStyle) - && inputBorderRadius == other.inputBorderRadius - && inputBorderWeight == other.inputBorderWeight - && inputsStyle.equals(other.inputsStyle) - && showWidgetShadow == other.showWidgetShadow - && widgetBorderWeight == other.widgetBorderWeight - && widgetCornerRadius == other.widgetCornerRadius; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.buttonBorderRadius, - this.buttonBorderWeight, - this.buttonsStyle, - this.inputBorderRadius, - this.inputBorderWeight, - this.inputsStyle, - this.showWidgetShadow, - this.widgetBorderWeight, - this.widgetCornerRadius); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ButtonBorderRadiusStage builder() { - return new Builder(); - } - - public interface ButtonBorderRadiusStage { - /** - *

Button border radius

- */ - ButtonBorderWeightStage buttonBorderRadius(double buttonBorderRadius); - - Builder from(BrandingThemeBorders other); - } - - public interface ButtonBorderWeightStage { - /** - *

Button border weight

- */ - ButtonsStyleStage buttonBorderWeight(double buttonBorderWeight); - } - - public interface ButtonsStyleStage { - InputBorderRadiusStage buttonsStyle(@NotNull BrandingThemeBordersButtonsStyleEnum buttonsStyle); - } - - public interface InputBorderRadiusStage { - /** - *

Input border radius

- */ - InputBorderWeightStage inputBorderRadius(double inputBorderRadius); - } - - public interface InputBorderWeightStage { - /** - *

Input border weight

- */ - InputsStyleStage inputBorderWeight(double inputBorderWeight); - } - - public interface InputsStyleStage { - ShowWidgetShadowStage inputsStyle(@NotNull BrandingThemeBordersInputsStyleEnum inputsStyle); - } - - public interface ShowWidgetShadowStage { - /** - *

Show widget shadow

- */ - WidgetBorderWeightStage showWidgetShadow(boolean showWidgetShadow); - } - - public interface WidgetBorderWeightStage { - /** - *

Widget border weight

- */ - WidgetCornerRadiusStage widgetBorderWeight(double widgetBorderWeight); - } - - public interface WidgetCornerRadiusStage { - /** - *

Widget corner radius

- */ - _FinalStage widgetCornerRadius(double widgetCornerRadius); - } - - public interface _FinalStage { - BrandingThemeBorders build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements ButtonBorderRadiusStage, - ButtonBorderWeightStage, - ButtonsStyleStage, - InputBorderRadiusStage, - InputBorderWeightStage, - InputsStyleStage, - ShowWidgetShadowStage, - WidgetBorderWeightStage, - WidgetCornerRadiusStage, - _FinalStage { - private double buttonBorderRadius; - - private double buttonBorderWeight; - - private BrandingThemeBordersButtonsStyleEnum buttonsStyle; - - private double inputBorderRadius; - - private double inputBorderWeight; - - private BrandingThemeBordersInputsStyleEnum inputsStyle; - - private boolean showWidgetShadow; - - private double widgetBorderWeight; - - private double widgetCornerRadius; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(BrandingThemeBorders other) { - buttonBorderRadius(other.getButtonBorderRadius()); - buttonBorderWeight(other.getButtonBorderWeight()); - buttonsStyle(other.getButtonsStyle()); - inputBorderRadius(other.getInputBorderRadius()); - inputBorderWeight(other.getInputBorderWeight()); - inputsStyle(other.getInputsStyle()); - showWidgetShadow(other.getShowWidgetShadow()); - widgetBorderWeight(other.getWidgetBorderWeight()); - widgetCornerRadius(other.getWidgetCornerRadius()); - return this; - } - - /** - *

Button border radius

- *

Button border radius

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("button_border_radius") - public ButtonBorderWeightStage buttonBorderRadius(double buttonBorderRadius) { - this.buttonBorderRadius = buttonBorderRadius; - return this; - } - - /** - *

Button border weight

- *

Button border weight

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("button_border_weight") - public ButtonsStyleStage buttonBorderWeight(double buttonBorderWeight) { - this.buttonBorderWeight = buttonBorderWeight; - return this; - } - - @java.lang.Override - @JsonSetter("buttons_style") - public InputBorderRadiusStage buttonsStyle(@NotNull BrandingThemeBordersButtonsStyleEnum buttonsStyle) { - this.buttonsStyle = Objects.requireNonNull(buttonsStyle, "buttonsStyle must not be null"); - return this; - } - - /** - *

Input border radius

- *

Input border radius

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("input_border_radius") - public InputBorderWeightStage inputBorderRadius(double inputBorderRadius) { - this.inputBorderRadius = inputBorderRadius; - return this; - } - - /** - *

Input border weight

- *

Input border weight

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("input_border_weight") - public InputsStyleStage inputBorderWeight(double inputBorderWeight) { - this.inputBorderWeight = inputBorderWeight; - return this; - } - - @java.lang.Override - @JsonSetter("inputs_style") - public ShowWidgetShadowStage inputsStyle(@NotNull BrandingThemeBordersInputsStyleEnum inputsStyle) { - this.inputsStyle = Objects.requireNonNull(inputsStyle, "inputsStyle must not be null"); - return this; - } - - /** - *

Show widget shadow

- *

Show widget shadow

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("show_widget_shadow") - public WidgetBorderWeightStage showWidgetShadow(boolean showWidgetShadow) { - this.showWidgetShadow = showWidgetShadow; - return this; - } - - /** - *

Widget border weight

- *

Widget border weight

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("widget_border_weight") - public WidgetCornerRadiusStage widgetBorderWeight(double widgetBorderWeight) { - this.widgetBorderWeight = widgetBorderWeight; - return this; - } - - /** - *

Widget corner radius

- *

Widget corner radius

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("widget_corner_radius") - public _FinalStage widgetCornerRadius(double widgetCornerRadius) { - this.widgetCornerRadius = widgetCornerRadius; - return this; - } - - @java.lang.Override - public BrandingThemeBorders build() { - return new BrandingThemeBorders( - buttonBorderRadius, - buttonBorderWeight, - buttonsStyle, - inputBorderRadius, - inputBorderWeight, - inputsStyle, - showWidgetShadow, - widgetBorderWeight, - widgetCornerRadius, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeBordersButtonsStyleEnum.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeBordersButtonsStyleEnum.java deleted file mode 100644 index 0b79c632a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeBordersButtonsStyleEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BrandingThemeBordersButtonsStyleEnum { - public static final BrandingThemeBordersButtonsStyleEnum SHARP = - new BrandingThemeBordersButtonsStyleEnum(Value.SHARP, "sharp"); - - public static final BrandingThemeBordersButtonsStyleEnum ROUNDED = - new BrandingThemeBordersButtonsStyleEnum(Value.ROUNDED, "rounded"); - - public static final BrandingThemeBordersButtonsStyleEnum PILL = - new BrandingThemeBordersButtonsStyleEnum(Value.PILL, "pill"); - - private final Value value; - - private final String string; - - BrandingThemeBordersButtonsStyleEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BrandingThemeBordersButtonsStyleEnum - && this.string.equals(((BrandingThemeBordersButtonsStyleEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SHARP: - return visitor.visitSharp(); - case ROUNDED: - return visitor.visitRounded(); - case PILL: - return visitor.visitPill(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BrandingThemeBordersButtonsStyleEnum valueOf(String value) { - switch (value) { - case "sharp": - return SHARP; - case "rounded": - return ROUNDED; - case "pill": - return PILL; - default: - return new BrandingThemeBordersButtonsStyleEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PILL, - - ROUNDED, - - SHARP, - - UNKNOWN - } - - public interface Visitor { - T visitPill(); - - T visitRounded(); - - T visitSharp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeBordersInputsStyleEnum.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeBordersInputsStyleEnum.java deleted file mode 100644 index f100e8fe6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeBordersInputsStyleEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BrandingThemeBordersInputsStyleEnum { - public static final BrandingThemeBordersInputsStyleEnum SHARP = - new BrandingThemeBordersInputsStyleEnum(Value.SHARP, "sharp"); - - public static final BrandingThemeBordersInputsStyleEnum ROUNDED = - new BrandingThemeBordersInputsStyleEnum(Value.ROUNDED, "rounded"); - - public static final BrandingThemeBordersInputsStyleEnum PILL = - new BrandingThemeBordersInputsStyleEnum(Value.PILL, "pill"); - - private final Value value; - - private final String string; - - BrandingThemeBordersInputsStyleEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BrandingThemeBordersInputsStyleEnum - && this.string.equals(((BrandingThemeBordersInputsStyleEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SHARP: - return visitor.visitSharp(); - case ROUNDED: - return visitor.visitRounded(); - case PILL: - return visitor.visitPill(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BrandingThemeBordersInputsStyleEnum valueOf(String value) { - switch (value) { - case "sharp": - return SHARP; - case "rounded": - return ROUNDED; - case "pill": - return PILL; - default: - return new BrandingThemeBordersInputsStyleEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PILL, - - ROUNDED, - - SHARP, - - UNKNOWN - } - - public interface Visitor { - T visitPill(); - - T visitRounded(); - - T visitSharp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeColors.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeColors.java deleted file mode 100644 index 141a2ce34..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeColors.java +++ /dev/null @@ -1,863 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = BrandingThemeColors.Builder.class) -public final class BrandingThemeColors { - private final Optional baseFocusColor; - - private final Optional baseHoverColor; - - private final String bodyText; - - private final Optional captchaWidgetTheme; - - private final String error; - - private final String header; - - private final String icons; - - private final String inputBackground; - - private final String inputBorder; - - private final String inputFilledText; - - private final String inputLabelsPlaceholders; - - private final String linksFocusedComponents; - - private final String primaryButton; - - private final String primaryButtonLabel; - - private final Optional readOnlyBackground; - - private final String secondaryButtonBorder; - - private final String secondaryButtonLabel; - - private final String success; - - private final String widgetBackground; - - private final String widgetBorder; - - private final Map additionalProperties; - - private BrandingThemeColors( - Optional baseFocusColor, - Optional baseHoverColor, - String bodyText, - Optional captchaWidgetTheme, - String error, - String header, - String icons, - String inputBackground, - String inputBorder, - String inputFilledText, - String inputLabelsPlaceholders, - String linksFocusedComponents, - String primaryButton, - String primaryButtonLabel, - Optional readOnlyBackground, - String secondaryButtonBorder, - String secondaryButtonLabel, - String success, - String widgetBackground, - String widgetBorder, - Map additionalProperties) { - this.baseFocusColor = baseFocusColor; - this.baseHoverColor = baseHoverColor; - this.bodyText = bodyText; - this.captchaWidgetTheme = captchaWidgetTheme; - this.error = error; - this.header = header; - this.icons = icons; - this.inputBackground = inputBackground; - this.inputBorder = inputBorder; - this.inputFilledText = inputFilledText; - this.inputLabelsPlaceholders = inputLabelsPlaceholders; - this.linksFocusedComponents = linksFocusedComponents; - this.primaryButton = primaryButton; - this.primaryButtonLabel = primaryButtonLabel; - this.readOnlyBackground = readOnlyBackground; - this.secondaryButtonBorder = secondaryButtonBorder; - this.secondaryButtonLabel = secondaryButtonLabel; - this.success = success; - this.widgetBackground = widgetBackground; - this.widgetBorder = widgetBorder; - this.additionalProperties = additionalProperties; - } - - /** - * @return Base Focus Color - */ - @JsonProperty("base_focus_color") - public Optional getBaseFocusColor() { - return baseFocusColor; - } - - /** - * @return Base Hover Color - */ - @JsonProperty("base_hover_color") - public Optional getBaseHoverColor() { - return baseHoverColor; - } - - /** - * @return Body text - */ - @JsonProperty("body_text") - public String getBodyText() { - return bodyText; - } - - @JsonProperty("captcha_widget_theme") - public Optional getCaptchaWidgetTheme() { - return captchaWidgetTheme; - } - - /** - * @return Error - */ - @JsonProperty("error") - public String getError() { - return error; - } - - /** - * @return Header - */ - @JsonProperty("header") - public String getHeader() { - return header; - } - - /** - * @return Icons - */ - @JsonProperty("icons") - public String getIcons() { - return icons; - } - - /** - * @return Input background - */ - @JsonProperty("input_background") - public String getInputBackground() { - return inputBackground; - } - - /** - * @return Input border - */ - @JsonProperty("input_border") - public String getInputBorder() { - return inputBorder; - } - - /** - * @return Input filled text - */ - @JsonProperty("input_filled_text") - public String getInputFilledText() { - return inputFilledText; - } - - /** - * @return Input labels & placeholders - */ - @JsonProperty("input_labels_placeholders") - public String getInputLabelsPlaceholders() { - return inputLabelsPlaceholders; - } - - /** - * @return Links & focused components - */ - @JsonProperty("links_focused_components") - public String getLinksFocusedComponents() { - return linksFocusedComponents; - } - - /** - * @return Primary button - */ - @JsonProperty("primary_button") - public String getPrimaryButton() { - return primaryButton; - } - - /** - * @return Primary button label - */ - @JsonProperty("primary_button_label") - public String getPrimaryButtonLabel() { - return primaryButtonLabel; - } - - /** - * @return Read only background - */ - @JsonProperty("read_only_background") - public Optional getReadOnlyBackground() { - return readOnlyBackground; - } - - /** - * @return Secondary button border - */ - @JsonProperty("secondary_button_border") - public String getSecondaryButtonBorder() { - return secondaryButtonBorder; - } - - /** - * @return Secondary button label - */ - @JsonProperty("secondary_button_label") - public String getSecondaryButtonLabel() { - return secondaryButtonLabel; - } - - /** - * @return Success - */ - @JsonProperty("success") - public String getSuccess() { - return success; - } - - /** - * @return Widget background - */ - @JsonProperty("widget_background") - public String getWidgetBackground() { - return widgetBackground; - } - - /** - * @return Widget border - */ - @JsonProperty("widget_border") - public String getWidgetBorder() { - return widgetBorder; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BrandingThemeColors && equalTo((BrandingThemeColors) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BrandingThemeColors other) { - return baseFocusColor.equals(other.baseFocusColor) - && baseHoverColor.equals(other.baseHoverColor) - && bodyText.equals(other.bodyText) - && captchaWidgetTheme.equals(other.captchaWidgetTheme) - && error.equals(other.error) - && header.equals(other.header) - && icons.equals(other.icons) - && inputBackground.equals(other.inputBackground) - && inputBorder.equals(other.inputBorder) - && inputFilledText.equals(other.inputFilledText) - && inputLabelsPlaceholders.equals(other.inputLabelsPlaceholders) - && linksFocusedComponents.equals(other.linksFocusedComponents) - && primaryButton.equals(other.primaryButton) - && primaryButtonLabel.equals(other.primaryButtonLabel) - && readOnlyBackground.equals(other.readOnlyBackground) - && secondaryButtonBorder.equals(other.secondaryButtonBorder) - && secondaryButtonLabel.equals(other.secondaryButtonLabel) - && success.equals(other.success) - && widgetBackground.equals(other.widgetBackground) - && widgetBorder.equals(other.widgetBorder); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.baseFocusColor, - this.baseHoverColor, - this.bodyText, - this.captchaWidgetTheme, - this.error, - this.header, - this.icons, - this.inputBackground, - this.inputBorder, - this.inputFilledText, - this.inputLabelsPlaceholders, - this.linksFocusedComponents, - this.primaryButton, - this.primaryButtonLabel, - this.readOnlyBackground, - this.secondaryButtonBorder, - this.secondaryButtonLabel, - this.success, - this.widgetBackground, - this.widgetBorder); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BodyTextStage builder() { - return new Builder(); - } - - public interface BodyTextStage { - /** - *

Body text

- */ - ErrorStage bodyText(@NotNull String bodyText); - - Builder from(BrandingThemeColors other); - } - - public interface ErrorStage { - /** - *

Error

- */ - HeaderStage error(@NotNull String error); - } - - public interface HeaderStage { - /** - *

Header

- */ - IconsStage header(@NotNull String header); - } - - public interface IconsStage { - /** - *

Icons

- */ - InputBackgroundStage icons(@NotNull String icons); - } - - public interface InputBackgroundStage { - /** - *

Input background

- */ - InputBorderStage inputBackground(@NotNull String inputBackground); - } - - public interface InputBorderStage { - /** - *

Input border

- */ - InputFilledTextStage inputBorder(@NotNull String inputBorder); - } - - public interface InputFilledTextStage { - /** - *

Input filled text

- */ - InputLabelsPlaceholdersStage inputFilledText(@NotNull String inputFilledText); - } - - public interface InputLabelsPlaceholdersStage { - /** - *

Input labels & placeholders

- */ - LinksFocusedComponentsStage inputLabelsPlaceholders(@NotNull String inputLabelsPlaceholders); - } - - public interface LinksFocusedComponentsStage { - /** - *

Links & focused components

- */ - PrimaryButtonStage linksFocusedComponents(@NotNull String linksFocusedComponents); - } - - public interface PrimaryButtonStage { - /** - *

Primary button

- */ - PrimaryButtonLabelStage primaryButton(@NotNull String primaryButton); - } - - public interface PrimaryButtonLabelStage { - /** - *

Primary button label

- */ - SecondaryButtonBorderStage primaryButtonLabel(@NotNull String primaryButtonLabel); - } - - public interface SecondaryButtonBorderStage { - /** - *

Secondary button border

- */ - SecondaryButtonLabelStage secondaryButtonBorder(@NotNull String secondaryButtonBorder); - } - - public interface SecondaryButtonLabelStage { - /** - *

Secondary button label

- */ - SuccessStage secondaryButtonLabel(@NotNull String secondaryButtonLabel); - } - - public interface SuccessStage { - /** - *

Success

- */ - WidgetBackgroundStage success(@NotNull String success); - } - - public interface WidgetBackgroundStage { - /** - *

Widget background

- */ - WidgetBorderStage widgetBackground(@NotNull String widgetBackground); - } - - public interface WidgetBorderStage { - /** - *

Widget border

- */ - _FinalStage widgetBorder(@NotNull String widgetBorder); - } - - public interface _FinalStage { - BrandingThemeColors build(); - - /** - *

Base Focus Color

- */ - _FinalStage baseFocusColor(Optional baseFocusColor); - - _FinalStage baseFocusColor(String baseFocusColor); - - /** - *

Base Hover Color

- */ - _FinalStage baseHoverColor(Optional baseHoverColor); - - _FinalStage baseHoverColor(String baseHoverColor); - - _FinalStage captchaWidgetTheme(Optional captchaWidgetTheme); - - _FinalStage captchaWidgetTheme(BrandingThemeColorsCaptchaWidgetThemeEnum captchaWidgetTheme); - - /** - *

Read only background

- */ - _FinalStage readOnlyBackground(Optional readOnlyBackground); - - _FinalStage readOnlyBackground(String readOnlyBackground); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements BodyTextStage, - ErrorStage, - HeaderStage, - IconsStage, - InputBackgroundStage, - InputBorderStage, - InputFilledTextStage, - InputLabelsPlaceholdersStage, - LinksFocusedComponentsStage, - PrimaryButtonStage, - PrimaryButtonLabelStage, - SecondaryButtonBorderStage, - SecondaryButtonLabelStage, - SuccessStage, - WidgetBackgroundStage, - WidgetBorderStage, - _FinalStage { - private String bodyText; - - private String error; - - private String header; - - private String icons; - - private String inputBackground; - - private String inputBorder; - - private String inputFilledText; - - private String inputLabelsPlaceholders; - - private String linksFocusedComponents; - - private String primaryButton; - - private String primaryButtonLabel; - - private String secondaryButtonBorder; - - private String secondaryButtonLabel; - - private String success; - - private String widgetBackground; - - private String widgetBorder; - - private Optional readOnlyBackground = Optional.empty(); - - private Optional captchaWidgetTheme = Optional.empty(); - - private Optional baseHoverColor = Optional.empty(); - - private Optional baseFocusColor = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(BrandingThemeColors other) { - baseFocusColor(other.getBaseFocusColor()); - baseHoverColor(other.getBaseHoverColor()); - bodyText(other.getBodyText()); - captchaWidgetTheme(other.getCaptchaWidgetTheme()); - error(other.getError()); - header(other.getHeader()); - icons(other.getIcons()); - inputBackground(other.getInputBackground()); - inputBorder(other.getInputBorder()); - inputFilledText(other.getInputFilledText()); - inputLabelsPlaceholders(other.getInputLabelsPlaceholders()); - linksFocusedComponents(other.getLinksFocusedComponents()); - primaryButton(other.getPrimaryButton()); - primaryButtonLabel(other.getPrimaryButtonLabel()); - readOnlyBackground(other.getReadOnlyBackground()); - secondaryButtonBorder(other.getSecondaryButtonBorder()); - secondaryButtonLabel(other.getSecondaryButtonLabel()); - success(other.getSuccess()); - widgetBackground(other.getWidgetBackground()); - widgetBorder(other.getWidgetBorder()); - return this; - } - - /** - *

Body text

- *

Body text

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

Error

- *

Error

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

Header

- *

Header

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

Icons

- *

Icons

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

Input background

- *

Input background

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

Input border

- *

Input border

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

Input filled text

- *

Input filled text

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

Input labels & placeholders

- *

Input labels & placeholders

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

Links & focused components

- *

Links & focused components

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

Primary button

- *

Primary button

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

Primary button label

- *

Primary button label

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

Secondary button border

- *

Secondary button border

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

Secondary button label

- *

Secondary button label

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

Success

- *

Success

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

Widget background

- *

Widget background

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

Widget border

- *

Widget border

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

Read only background

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

Read only background

- */ - @java.lang.Override - @JsonSetter(value = "read_only_background", nulls = Nulls.SKIP) - public _FinalStage readOnlyBackground(Optional readOnlyBackground) { - this.readOnlyBackground = readOnlyBackground; - return this; - } - - @java.lang.Override - public _FinalStage captchaWidgetTheme(BrandingThemeColorsCaptchaWidgetThemeEnum captchaWidgetTheme) { - this.captchaWidgetTheme = Optional.ofNullable(captchaWidgetTheme); - return this; - } - - @java.lang.Override - @JsonSetter(value = "captcha_widget_theme", nulls = Nulls.SKIP) - public _FinalStage captchaWidgetTheme(Optional captchaWidgetTheme) { - this.captchaWidgetTheme = captchaWidgetTheme; - return this; - } - - /** - *

Base Hover Color

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

Base Hover Color

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

Base Focus Color

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

Base Focus Color

- */ - @java.lang.Override - @JsonSetter(value = "base_focus_color", nulls = Nulls.SKIP) - public _FinalStage baseFocusColor(Optional baseFocusColor) { - this.baseFocusColor = baseFocusColor; - return this; - } - - @java.lang.Override - public BrandingThemeColors build() { - return new BrandingThemeColors( - baseFocusColor, - baseHoverColor, - bodyText, - captchaWidgetTheme, - error, - header, - icons, - inputBackground, - inputBorder, - inputFilledText, - inputLabelsPlaceholders, - linksFocusedComponents, - primaryButton, - primaryButtonLabel, - readOnlyBackground, - secondaryButtonBorder, - secondaryButtonLabel, - success, - widgetBackground, - widgetBorder, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeColorsCaptchaWidgetThemeEnum.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeColorsCaptchaWidgetThemeEnum.java deleted file mode 100644 index 2fe77ddab..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeColorsCaptchaWidgetThemeEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BrandingThemeColorsCaptchaWidgetThemeEnum { - public static final BrandingThemeColorsCaptchaWidgetThemeEnum AUTO = - new BrandingThemeColorsCaptchaWidgetThemeEnum(Value.AUTO, "auto"); - - public static final BrandingThemeColorsCaptchaWidgetThemeEnum LIGHT = - new BrandingThemeColorsCaptchaWidgetThemeEnum(Value.LIGHT, "light"); - - public static final BrandingThemeColorsCaptchaWidgetThemeEnum DARK = - new BrandingThemeColorsCaptchaWidgetThemeEnum(Value.DARK, "dark"); - - private final Value value; - - private final String string; - - BrandingThemeColorsCaptchaWidgetThemeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BrandingThemeColorsCaptchaWidgetThemeEnum - && this.string.equals(((BrandingThemeColorsCaptchaWidgetThemeEnum) 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 LIGHT: - return visitor.visitLight(); - case DARK: - return visitor.visitDark(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BrandingThemeColorsCaptchaWidgetThemeEnum valueOf(String value) { - switch (value) { - case "auto": - return AUTO; - case "light": - return LIGHT; - case "dark": - return DARK; - default: - return new BrandingThemeColorsCaptchaWidgetThemeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AUTO, - - DARK, - - LIGHT, - - UNKNOWN - } - - public interface Visitor { - T visitAuto(); - - T visitDark(); - - T visitLight(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontBodyText.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontBodyText.java deleted file mode 100644 index 8f8c99d0d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontBodyText.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = BrandingThemeFontBodyText.Builder.class) -public final class BrandingThemeFontBodyText { - private final boolean bold; - - private final double size; - - private final Map additionalProperties; - - private BrandingThemeFontBodyText(boolean bold, double size, Map additionalProperties) { - this.bold = bold; - this.size = size; - this.additionalProperties = additionalProperties; - } - - /** - * @return Body text bold - */ - @JsonProperty("bold") - public boolean getBold() { - return bold; - } - - /** - * @return Body text size - */ - @JsonProperty("size") - public double getSize() { - return size; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BrandingThemeFontBodyText && equalTo((BrandingThemeFontBodyText) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BrandingThemeFontBodyText other) { - return bold == other.bold && size == other.size; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.bold, this.size); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BoldStage builder() { - return new Builder(); - } - - public interface BoldStage { - /** - *

Body text bold

- */ - SizeStage bold(boolean bold); - - Builder from(BrandingThemeFontBodyText other); - } - - public interface SizeStage { - /** - *

Body text size

- */ - _FinalStage size(double size); - } - - public interface _FinalStage { - BrandingThemeFontBodyText build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BoldStage, SizeStage, _FinalStage { - private boolean bold; - - private double size; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(BrandingThemeFontBodyText other) { - bold(other.getBold()); - size(other.getSize()); - return this; - } - - /** - *

Body text bold

- *

Body text bold

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

Body text size

- *

Body text size

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("size") - public _FinalStage size(double size) { - this.size = size; - return this; - } - - @java.lang.Override - public BrandingThemeFontBodyText build() { - return new BrandingThemeFontBodyText(bold, size, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontButtonsText.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontButtonsText.java deleted file mode 100644 index 71b1c2355..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontButtonsText.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = BrandingThemeFontButtonsText.Builder.class) -public final class BrandingThemeFontButtonsText { - private final boolean bold; - - private final double size; - - private final Map additionalProperties; - - private BrandingThemeFontButtonsText(boolean bold, double size, Map additionalProperties) { - this.bold = bold; - this.size = size; - this.additionalProperties = additionalProperties; - } - - /** - * @return Buttons text bold - */ - @JsonProperty("bold") - public boolean getBold() { - return bold; - } - - /** - * @return Buttons text size - */ - @JsonProperty("size") - public double getSize() { - return size; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BrandingThemeFontButtonsText && equalTo((BrandingThemeFontButtonsText) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BrandingThemeFontButtonsText other) { - return bold == other.bold && size == other.size; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.bold, this.size); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BoldStage builder() { - return new Builder(); - } - - public interface BoldStage { - /** - *

Buttons text bold

- */ - SizeStage bold(boolean bold); - - Builder from(BrandingThemeFontButtonsText other); - } - - public interface SizeStage { - /** - *

Buttons text size

- */ - _FinalStage size(double size); - } - - public interface _FinalStage { - BrandingThemeFontButtonsText build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BoldStage, SizeStage, _FinalStage { - private boolean bold; - - private double size; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(BrandingThemeFontButtonsText other) { - bold(other.getBold()); - size(other.getSize()); - return this; - } - - /** - *

Buttons text bold

- *

Buttons text bold

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

Buttons text size

- *

Buttons text size

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("size") - public _FinalStage size(double size) { - this.size = size; - return this; - } - - @java.lang.Override - public BrandingThemeFontButtonsText build() { - return new BrandingThemeFontButtonsText(bold, size, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontInputLabels.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontInputLabels.java deleted file mode 100644 index b29399903..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontInputLabels.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = BrandingThemeFontInputLabels.Builder.class) -public final class BrandingThemeFontInputLabels { - private final boolean bold; - - private final double size; - - private final Map additionalProperties; - - private BrandingThemeFontInputLabels(boolean bold, double size, Map additionalProperties) { - this.bold = bold; - this.size = size; - this.additionalProperties = additionalProperties; - } - - /** - * @return Input Labels bold - */ - @JsonProperty("bold") - public boolean getBold() { - return bold; - } - - /** - * @return Input Labels size - */ - @JsonProperty("size") - public double getSize() { - return size; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BrandingThemeFontInputLabels && equalTo((BrandingThemeFontInputLabels) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BrandingThemeFontInputLabels other) { - return bold == other.bold && size == other.size; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.bold, this.size); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BoldStage builder() { - return new Builder(); - } - - public interface BoldStage { - /** - *

Input Labels bold

- */ - SizeStage bold(boolean bold); - - Builder from(BrandingThemeFontInputLabels other); - } - - public interface SizeStage { - /** - *

Input Labels size

- */ - _FinalStage size(double size); - } - - public interface _FinalStage { - BrandingThemeFontInputLabels build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BoldStage, SizeStage, _FinalStage { - private boolean bold; - - private double size; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(BrandingThemeFontInputLabels other) { - bold(other.getBold()); - size(other.getSize()); - return this; - } - - /** - *

Input Labels bold

- *

Input Labels bold

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

Input Labels size

- *

Input Labels size

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("size") - public _FinalStage size(double size) { - this.size = size; - return this; - } - - @java.lang.Override - public BrandingThemeFontInputLabels build() { - return new BrandingThemeFontInputLabels(bold, size, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontLinks.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontLinks.java deleted file mode 100644 index 2d0535c8f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontLinks.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = BrandingThemeFontLinks.Builder.class) -public final class BrandingThemeFontLinks { - private final boolean bold; - - private final double size; - - private final Map additionalProperties; - - private BrandingThemeFontLinks(boolean bold, double size, Map additionalProperties) { - this.bold = bold; - this.size = size; - this.additionalProperties = additionalProperties; - } - - /** - * @return Links bold - */ - @JsonProperty("bold") - public boolean getBold() { - return bold; - } - - /** - * @return Links size - */ - @JsonProperty("size") - public double getSize() { - return size; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BrandingThemeFontLinks && equalTo((BrandingThemeFontLinks) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BrandingThemeFontLinks other) { - return bold == other.bold && size == other.size; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.bold, this.size); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BoldStage builder() { - return new Builder(); - } - - public interface BoldStage { - /** - *

Links bold

- */ - SizeStage bold(boolean bold); - - Builder from(BrandingThemeFontLinks other); - } - - public interface SizeStage { - /** - *

Links size

- */ - _FinalStage size(double size); - } - - public interface _FinalStage { - BrandingThemeFontLinks build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BoldStage, SizeStage, _FinalStage { - private boolean bold; - - private double size; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(BrandingThemeFontLinks other) { - bold(other.getBold()); - size(other.getSize()); - return this; - } - - /** - *

Links bold

- *

Links bold

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

Links size

- *

Links size

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("size") - public _FinalStage size(double size) { - this.size = size; - return this; - } - - @java.lang.Override - public BrandingThemeFontLinks build() { - return new BrandingThemeFontLinks(bold, size, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontLinksStyleEnum.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontLinksStyleEnum.java deleted file mode 100644 index ff7178577..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontLinksStyleEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BrandingThemeFontLinksStyleEnum { - public static final BrandingThemeFontLinksStyleEnum NORMAL = - new BrandingThemeFontLinksStyleEnum(Value.NORMAL, "normal"); - - public static final BrandingThemeFontLinksStyleEnum UNDERLINED = - new BrandingThemeFontLinksStyleEnum(Value.UNDERLINED, "underlined"); - - private final Value value; - - private final String string; - - BrandingThemeFontLinksStyleEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BrandingThemeFontLinksStyleEnum - && this.string.equals(((BrandingThemeFontLinksStyleEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case NORMAL: - return visitor.visitNormal(); - case UNDERLINED: - return visitor.visitUnderlined(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BrandingThemeFontLinksStyleEnum valueOf(String value) { - switch (value) { - case "normal": - return NORMAL; - case "underlined": - return UNDERLINED; - default: - return new BrandingThemeFontLinksStyleEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - NORMAL, - - UNDERLINED, - - UNKNOWN - } - - public interface Visitor { - T visitNormal(); - - T visitUnderlined(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontSubtitle.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontSubtitle.java deleted file mode 100644 index a665fc7d0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontSubtitle.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = BrandingThemeFontSubtitle.Builder.class) -public final class BrandingThemeFontSubtitle { - private final boolean bold; - - private final double size; - - private final Map additionalProperties; - - private BrandingThemeFontSubtitle(boolean bold, double size, Map additionalProperties) { - this.bold = bold; - this.size = size; - this.additionalProperties = additionalProperties; - } - - /** - * @return Subtitle bold - */ - @JsonProperty("bold") - public boolean getBold() { - return bold; - } - - /** - * @return Subtitle size - */ - @JsonProperty("size") - public double getSize() { - return size; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BrandingThemeFontSubtitle && equalTo((BrandingThemeFontSubtitle) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BrandingThemeFontSubtitle other) { - return bold == other.bold && size == other.size; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.bold, this.size); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BoldStage builder() { - return new Builder(); - } - - public interface BoldStage { - /** - *

Subtitle bold

- */ - SizeStage bold(boolean bold); - - Builder from(BrandingThemeFontSubtitle other); - } - - public interface SizeStage { - /** - *

Subtitle size

- */ - _FinalStage size(double size); - } - - public interface _FinalStage { - BrandingThemeFontSubtitle build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BoldStage, SizeStage, _FinalStage { - private boolean bold; - - private double size; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(BrandingThemeFontSubtitle other) { - bold(other.getBold()); - size(other.getSize()); - return this; - } - - /** - *

Subtitle bold

- *

Subtitle bold

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

Subtitle size

- *

Subtitle size

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("size") - public _FinalStage size(double size) { - this.size = size; - return this; - } - - @java.lang.Override - public BrandingThemeFontSubtitle build() { - return new BrandingThemeFontSubtitle(bold, size, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontTitle.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontTitle.java deleted file mode 100644 index 3e39a7c76..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFontTitle.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = BrandingThemeFontTitle.Builder.class) -public final class BrandingThemeFontTitle { - private final boolean bold; - - private final double size; - - private final Map additionalProperties; - - private BrandingThemeFontTitle(boolean bold, double size, Map additionalProperties) { - this.bold = bold; - this.size = size; - this.additionalProperties = additionalProperties; - } - - /** - * @return Title bold - */ - @JsonProperty("bold") - public boolean getBold() { - return bold; - } - - /** - * @return Title size - */ - @JsonProperty("size") - public double getSize() { - return size; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BrandingThemeFontTitle && equalTo((BrandingThemeFontTitle) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BrandingThemeFontTitle other) { - return bold == other.bold && size == other.size; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.bold, this.size); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BoldStage builder() { - return new Builder(); - } - - public interface BoldStage { - /** - *

Title bold

- */ - SizeStage bold(boolean bold); - - Builder from(BrandingThemeFontTitle other); - } - - public interface SizeStage { - /** - *

Title size

- */ - _FinalStage size(double size); - } - - public interface _FinalStage { - BrandingThemeFontTitle build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BoldStage, SizeStage, _FinalStage { - private boolean bold; - - private double size; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(BrandingThemeFontTitle other) { - bold(other.getBold()); - size(other.getSize()); - return this; - } - - /** - *

Title bold

- *

Title bold

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

Title size

- *

Title size

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("size") - public _FinalStage size(double size) { - this.size = size; - return this; - } - - @java.lang.Override - public BrandingThemeFontTitle build() { - return new BrandingThemeFontTitle(bold, size, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFonts.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFonts.java deleted file mode 100644 index 675546673..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeFonts.java +++ /dev/null @@ -1,347 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = BrandingThemeFonts.Builder.class) -public final class BrandingThemeFonts { - private final BrandingThemeFontBodyText bodyText; - - private final BrandingThemeFontButtonsText buttonsText; - - private final String fontUrl; - - private final BrandingThemeFontInputLabels inputLabels; - - private final BrandingThemeFontLinks links; - - private final BrandingThemeFontLinksStyleEnum linksStyle; - - private final double referenceTextSize; - - private final BrandingThemeFontSubtitle subtitle; - - private final BrandingThemeFontTitle title; - - private final Map additionalProperties; - - private BrandingThemeFonts( - BrandingThemeFontBodyText bodyText, - BrandingThemeFontButtonsText buttonsText, - String fontUrl, - BrandingThemeFontInputLabels inputLabels, - BrandingThemeFontLinks links, - BrandingThemeFontLinksStyleEnum linksStyle, - double referenceTextSize, - BrandingThemeFontSubtitle subtitle, - BrandingThemeFontTitle title, - Map additionalProperties) { - this.bodyText = bodyText; - this.buttonsText = buttonsText; - this.fontUrl = fontUrl; - this.inputLabels = inputLabels; - this.links = links; - this.linksStyle = linksStyle; - this.referenceTextSize = referenceTextSize; - this.subtitle = subtitle; - this.title = title; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("body_text") - public BrandingThemeFontBodyText getBodyText() { - return bodyText; - } - - @JsonProperty("buttons_text") - public BrandingThemeFontButtonsText getButtonsText() { - return buttonsText; - } - - /** - * @return Font URL - */ - @JsonProperty("font_url") - public String getFontUrl() { - return fontUrl; - } - - @JsonProperty("input_labels") - public BrandingThemeFontInputLabels getInputLabels() { - return inputLabels; - } - - @JsonProperty("links") - public BrandingThemeFontLinks getLinks() { - return links; - } - - @JsonProperty("links_style") - public BrandingThemeFontLinksStyleEnum getLinksStyle() { - return linksStyle; - } - - /** - * @return Reference text size - */ - @JsonProperty("reference_text_size") - public double getReferenceTextSize() { - return referenceTextSize; - } - - @JsonProperty("subtitle") - public BrandingThemeFontSubtitle getSubtitle() { - return subtitle; - } - - @JsonProperty("title") - public BrandingThemeFontTitle getTitle() { - return title; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BrandingThemeFonts && equalTo((BrandingThemeFonts) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BrandingThemeFonts other) { - return bodyText.equals(other.bodyText) - && buttonsText.equals(other.buttonsText) - && fontUrl.equals(other.fontUrl) - && inputLabels.equals(other.inputLabels) - && links.equals(other.links) - && linksStyle.equals(other.linksStyle) - && referenceTextSize == other.referenceTextSize - && subtitle.equals(other.subtitle) - && title.equals(other.title); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.bodyText, - this.buttonsText, - this.fontUrl, - this.inputLabels, - this.links, - this.linksStyle, - this.referenceTextSize, - this.subtitle, - this.title); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BodyTextStage builder() { - return new Builder(); - } - - public interface BodyTextStage { - ButtonsTextStage bodyText(@NotNull BrandingThemeFontBodyText bodyText); - - Builder from(BrandingThemeFonts other); - } - - public interface ButtonsTextStage { - FontUrlStage buttonsText(@NotNull BrandingThemeFontButtonsText buttonsText); - } - - public interface FontUrlStage { - /** - *

Font URL

- */ - InputLabelsStage fontUrl(@NotNull String fontUrl); - } - - public interface InputLabelsStage { - LinksStage inputLabels(@NotNull BrandingThemeFontInputLabels inputLabels); - } - - public interface LinksStage { - LinksStyleStage links(@NotNull BrandingThemeFontLinks links); - } - - public interface LinksStyleStage { - ReferenceTextSizeStage linksStyle(@NotNull BrandingThemeFontLinksStyleEnum linksStyle); - } - - public interface ReferenceTextSizeStage { - /** - *

Reference text size

- */ - SubtitleStage referenceTextSize(double referenceTextSize); - } - - public interface SubtitleStage { - TitleStage subtitle(@NotNull BrandingThemeFontSubtitle subtitle); - } - - public interface TitleStage { - _FinalStage title(@NotNull BrandingThemeFontTitle title); - } - - public interface _FinalStage { - BrandingThemeFonts build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements BodyTextStage, - ButtonsTextStage, - FontUrlStage, - InputLabelsStage, - LinksStage, - LinksStyleStage, - ReferenceTextSizeStage, - SubtitleStage, - TitleStage, - _FinalStage { - private BrandingThemeFontBodyText bodyText; - - private BrandingThemeFontButtonsText buttonsText; - - private String fontUrl; - - private BrandingThemeFontInputLabels inputLabels; - - private BrandingThemeFontLinks links; - - private BrandingThemeFontLinksStyleEnum linksStyle; - - private double referenceTextSize; - - private BrandingThemeFontSubtitle subtitle; - - private BrandingThemeFontTitle title; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(BrandingThemeFonts other) { - bodyText(other.getBodyText()); - buttonsText(other.getButtonsText()); - fontUrl(other.getFontUrl()); - inputLabels(other.getInputLabels()); - links(other.getLinks()); - linksStyle(other.getLinksStyle()); - referenceTextSize(other.getReferenceTextSize()); - subtitle(other.getSubtitle()); - title(other.getTitle()); - return this; - } - - @java.lang.Override - @JsonSetter("body_text") - public ButtonsTextStage bodyText(@NotNull BrandingThemeFontBodyText bodyText) { - this.bodyText = Objects.requireNonNull(bodyText, "bodyText must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("buttons_text") - public FontUrlStage buttonsText(@NotNull BrandingThemeFontButtonsText buttonsText) { - this.buttonsText = Objects.requireNonNull(buttonsText, "buttonsText must not be null"); - return this; - } - - /** - *

Font URL

- *

Font URL

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("font_url") - public InputLabelsStage fontUrl(@NotNull String fontUrl) { - this.fontUrl = Objects.requireNonNull(fontUrl, "fontUrl must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("input_labels") - public LinksStage inputLabels(@NotNull BrandingThemeFontInputLabels inputLabels) { - this.inputLabels = Objects.requireNonNull(inputLabels, "inputLabels must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("links") - public LinksStyleStage links(@NotNull BrandingThemeFontLinks links) { - this.links = Objects.requireNonNull(links, "links must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("links_style") - public ReferenceTextSizeStage linksStyle(@NotNull BrandingThemeFontLinksStyleEnum linksStyle) { - this.linksStyle = Objects.requireNonNull(linksStyle, "linksStyle must not be null"); - return this; - } - - /** - *

Reference text size

- *

Reference text size

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("reference_text_size") - public SubtitleStage referenceTextSize(double referenceTextSize) { - this.referenceTextSize = referenceTextSize; - return this; - } - - @java.lang.Override - @JsonSetter("subtitle") - public TitleStage subtitle(@NotNull BrandingThemeFontSubtitle subtitle) { - this.subtitle = Objects.requireNonNull(subtitle, "subtitle must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("title") - public _FinalStage title(@NotNull BrandingThemeFontTitle title) { - this.title = Objects.requireNonNull(title, "title must not be null"); - return this; - } - - @java.lang.Override - public BrandingThemeFonts build() { - return new BrandingThemeFonts( - bodyText, - buttonsText, - fontUrl, - inputLabels, - links, - linksStyle, - referenceTextSize, - subtitle, - title, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemePageBackground.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemePageBackground.java deleted file mode 100644 index d3f95c3c6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemePageBackground.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = BrandingThemePageBackground.Builder.class) -public final class BrandingThemePageBackground { - private final String backgroundColor; - - private final String backgroundImageUrl; - - private final BrandingThemePageBackgroundPageLayoutEnum pageLayout; - - private final Map additionalProperties; - - private BrandingThemePageBackground( - String backgroundColor, - String backgroundImageUrl, - BrandingThemePageBackgroundPageLayoutEnum pageLayout, - Map additionalProperties) { - this.backgroundColor = backgroundColor; - this.backgroundImageUrl = backgroundImageUrl; - this.pageLayout = pageLayout; - this.additionalProperties = additionalProperties; - } - - /** - * @return Background color - */ - @JsonProperty("background_color") - public String getBackgroundColor() { - return backgroundColor; - } - - /** - * @return Background image url - */ - @JsonProperty("background_image_url") - public String getBackgroundImageUrl() { - return backgroundImageUrl; - } - - @JsonProperty("page_layout") - public BrandingThemePageBackgroundPageLayoutEnum getPageLayout() { - return pageLayout; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BrandingThemePageBackground && equalTo((BrandingThemePageBackground) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BrandingThemePageBackground other) { - return backgroundColor.equals(other.backgroundColor) - && backgroundImageUrl.equals(other.backgroundImageUrl) - && pageLayout.equals(other.pageLayout); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.backgroundColor, this.backgroundImageUrl, this.pageLayout); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BackgroundColorStage builder() { - return new Builder(); - } - - public interface BackgroundColorStage { - /** - *

Background color

- */ - BackgroundImageUrlStage backgroundColor(@NotNull String backgroundColor); - - Builder from(BrandingThemePageBackground other); - } - - public interface BackgroundImageUrlStage { - /** - *

Background image url

- */ - PageLayoutStage backgroundImageUrl(@NotNull String backgroundImageUrl); - } - - public interface PageLayoutStage { - _FinalStage pageLayout(@NotNull BrandingThemePageBackgroundPageLayoutEnum pageLayout); - } - - public interface _FinalStage { - BrandingThemePageBackground build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements BackgroundColorStage, BackgroundImageUrlStage, PageLayoutStage, _FinalStage { - private String backgroundColor; - - private String backgroundImageUrl; - - private BrandingThemePageBackgroundPageLayoutEnum pageLayout; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(BrandingThemePageBackground other) { - backgroundColor(other.getBackgroundColor()); - backgroundImageUrl(other.getBackgroundImageUrl()); - pageLayout(other.getPageLayout()); - return this; - } - - /** - *

Background color

- *

Background color

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

Background image url

- *

Background image url

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("background_image_url") - public PageLayoutStage backgroundImageUrl(@NotNull String backgroundImageUrl) { - this.backgroundImageUrl = Objects.requireNonNull(backgroundImageUrl, "backgroundImageUrl must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("page_layout") - public _FinalStage pageLayout(@NotNull BrandingThemePageBackgroundPageLayoutEnum pageLayout) { - this.pageLayout = Objects.requireNonNull(pageLayout, "pageLayout must not be null"); - return this; - } - - @java.lang.Override - public BrandingThemePageBackground build() { - return new BrandingThemePageBackground( - backgroundColor, backgroundImageUrl, pageLayout, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemePageBackgroundPageLayoutEnum.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemePageBackgroundPageLayoutEnum.java deleted file mode 100644 index ac0e87288..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemePageBackgroundPageLayoutEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BrandingThemePageBackgroundPageLayoutEnum { - public static final BrandingThemePageBackgroundPageLayoutEnum LEFT = - new BrandingThemePageBackgroundPageLayoutEnum(Value.LEFT, "left"); - - public static final BrandingThemePageBackgroundPageLayoutEnum RIGHT = - new BrandingThemePageBackgroundPageLayoutEnum(Value.RIGHT, "right"); - - public static final BrandingThemePageBackgroundPageLayoutEnum CENTER = - new BrandingThemePageBackgroundPageLayoutEnum(Value.CENTER, "center"); - - private final Value value; - - private final String string; - - BrandingThemePageBackgroundPageLayoutEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BrandingThemePageBackgroundPageLayoutEnum - && this.string.equals(((BrandingThemePageBackgroundPageLayoutEnum) 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 BrandingThemePageBackgroundPageLayoutEnum valueOf(String value) { - switch (value) { - case "left": - return LEFT; - case "right": - return RIGHT; - case "center": - return CENTER; - default: - return new BrandingThemePageBackgroundPageLayoutEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - CENTER, - - LEFT, - - RIGHT, - - UNKNOWN - } - - public interface Visitor { - T visitCenter(); - - T visitLeft(); - - T visitRight(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeWidget.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeWidget.java deleted file mode 100644 index 199927eab..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeWidget.java +++ /dev/null @@ -1,234 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = BrandingThemeWidget.Builder.class) -public final class BrandingThemeWidget { - private final BrandingThemeWidgetHeaderTextAlignmentEnum headerTextAlignment; - - private final double logoHeight; - - private final BrandingThemeWidgetLogoPositionEnum logoPosition; - - private final String logoUrl; - - private final BrandingThemeWidgetSocialButtonsLayoutEnum socialButtonsLayout; - - private final Map additionalProperties; - - private BrandingThemeWidget( - BrandingThemeWidgetHeaderTextAlignmentEnum headerTextAlignment, - double logoHeight, - BrandingThemeWidgetLogoPositionEnum logoPosition, - String logoUrl, - BrandingThemeWidgetSocialButtonsLayoutEnum socialButtonsLayout, - Map additionalProperties) { - this.headerTextAlignment = headerTextAlignment; - this.logoHeight = logoHeight; - this.logoPosition = logoPosition; - this.logoUrl = logoUrl; - this.socialButtonsLayout = socialButtonsLayout; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("header_text_alignment") - public BrandingThemeWidgetHeaderTextAlignmentEnum getHeaderTextAlignment() { - return headerTextAlignment; - } - - /** - * @return Logo height - */ - @JsonProperty("logo_height") - public double getLogoHeight() { - return logoHeight; - } - - @JsonProperty("logo_position") - public BrandingThemeWidgetLogoPositionEnum getLogoPosition() { - return logoPosition; - } - - /** - * @return Logo url - */ - @JsonProperty("logo_url") - public String getLogoUrl() { - return logoUrl; - } - - @JsonProperty("social_buttons_layout") - public BrandingThemeWidgetSocialButtonsLayoutEnum getSocialButtonsLayout() { - return socialButtonsLayout; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BrandingThemeWidget && equalTo((BrandingThemeWidget) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BrandingThemeWidget other) { - return headerTextAlignment.equals(other.headerTextAlignment) - && logoHeight == other.logoHeight - && logoPosition.equals(other.logoPosition) - && logoUrl.equals(other.logoUrl) - && socialButtonsLayout.equals(other.socialButtonsLayout); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.headerTextAlignment, this.logoHeight, this.logoPosition, this.logoUrl, this.socialButtonsLayout); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static HeaderTextAlignmentStage builder() { - return new Builder(); - } - - public interface HeaderTextAlignmentStage { - LogoHeightStage headerTextAlignment(@NotNull BrandingThemeWidgetHeaderTextAlignmentEnum headerTextAlignment); - - Builder from(BrandingThemeWidget other); - } - - public interface LogoHeightStage { - /** - *

Logo height

- */ - LogoPositionStage logoHeight(double logoHeight); - } - - public interface LogoPositionStage { - LogoUrlStage logoPosition(@NotNull BrandingThemeWidgetLogoPositionEnum logoPosition); - } - - public interface LogoUrlStage { - /** - *

Logo url

- */ - SocialButtonsLayoutStage logoUrl(@NotNull String logoUrl); - } - - public interface SocialButtonsLayoutStage { - _FinalStage socialButtonsLayout(@NotNull BrandingThemeWidgetSocialButtonsLayoutEnum socialButtonsLayout); - } - - public interface _FinalStage { - BrandingThemeWidget build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements HeaderTextAlignmentStage, - LogoHeightStage, - LogoPositionStage, - LogoUrlStage, - SocialButtonsLayoutStage, - _FinalStage { - private BrandingThemeWidgetHeaderTextAlignmentEnum headerTextAlignment; - - private double logoHeight; - - private BrandingThemeWidgetLogoPositionEnum logoPosition; - - private String logoUrl; - - private BrandingThemeWidgetSocialButtonsLayoutEnum socialButtonsLayout; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(BrandingThemeWidget other) { - headerTextAlignment(other.getHeaderTextAlignment()); - logoHeight(other.getLogoHeight()); - logoPosition(other.getLogoPosition()); - logoUrl(other.getLogoUrl()); - socialButtonsLayout(other.getSocialButtonsLayout()); - return this; - } - - @java.lang.Override - @JsonSetter("header_text_alignment") - public LogoHeightStage headerTextAlignment( - @NotNull BrandingThemeWidgetHeaderTextAlignmentEnum headerTextAlignment) { - this.headerTextAlignment = - Objects.requireNonNull(headerTextAlignment, "headerTextAlignment must not be null"); - return this; - } - - /** - *

Logo height

- *

Logo height

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("logo_height") - public LogoPositionStage logoHeight(double logoHeight) { - this.logoHeight = logoHeight; - return this; - } - - @java.lang.Override - @JsonSetter("logo_position") - public LogoUrlStage logoPosition(@NotNull BrandingThemeWidgetLogoPositionEnum logoPosition) { - this.logoPosition = Objects.requireNonNull(logoPosition, "logoPosition must not be null"); - return this; - } - - /** - *

Logo url

- *

Logo url

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("logo_url") - public SocialButtonsLayoutStage logoUrl(@NotNull String logoUrl) { - this.logoUrl = Objects.requireNonNull(logoUrl, "logoUrl must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("social_buttons_layout") - public _FinalStage socialButtonsLayout( - @NotNull BrandingThemeWidgetSocialButtonsLayoutEnum socialButtonsLayout) { - this.socialButtonsLayout = - Objects.requireNonNull(socialButtonsLayout, "socialButtonsLayout must not be null"); - return this; - } - - @java.lang.Override - public BrandingThemeWidget build() { - return new BrandingThemeWidget( - headerTextAlignment, logoHeight, logoPosition, logoUrl, socialButtonsLayout, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeWidgetHeaderTextAlignmentEnum.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeWidgetHeaderTextAlignmentEnum.java deleted file mode 100644 index 10afdefac..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeWidgetHeaderTextAlignmentEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BrandingThemeWidgetHeaderTextAlignmentEnum { - public static final BrandingThemeWidgetHeaderTextAlignmentEnum LEFT = - new BrandingThemeWidgetHeaderTextAlignmentEnum(Value.LEFT, "left"); - - public static final BrandingThemeWidgetHeaderTextAlignmentEnum RIGHT = - new BrandingThemeWidgetHeaderTextAlignmentEnum(Value.RIGHT, "right"); - - public static final BrandingThemeWidgetHeaderTextAlignmentEnum CENTER = - new BrandingThemeWidgetHeaderTextAlignmentEnum(Value.CENTER, "center"); - - private final Value value; - - private final String string; - - BrandingThemeWidgetHeaderTextAlignmentEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BrandingThemeWidgetHeaderTextAlignmentEnum - && this.string.equals(((BrandingThemeWidgetHeaderTextAlignmentEnum) 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 BrandingThemeWidgetHeaderTextAlignmentEnum valueOf(String value) { - switch (value) { - case "left": - return LEFT; - case "right": - return RIGHT; - case "center": - return CENTER; - default: - return new BrandingThemeWidgetHeaderTextAlignmentEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - CENTER, - - LEFT, - - RIGHT, - - UNKNOWN - } - - public interface Visitor { - T visitCenter(); - - T visitLeft(); - - T visitRight(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeWidgetLogoPositionEnum.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeWidgetLogoPositionEnum.java deleted file mode 100644 index bb576015f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeWidgetLogoPositionEnum.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BrandingThemeWidgetLogoPositionEnum { - public static final BrandingThemeWidgetLogoPositionEnum LEFT = - new BrandingThemeWidgetLogoPositionEnum(Value.LEFT, "left"); - - public static final BrandingThemeWidgetLogoPositionEnum RIGHT = - new BrandingThemeWidgetLogoPositionEnum(Value.RIGHT, "right"); - - public static final BrandingThemeWidgetLogoPositionEnum CENTER = - new BrandingThemeWidgetLogoPositionEnum(Value.CENTER, "center"); - - public static final BrandingThemeWidgetLogoPositionEnum NONE = - new BrandingThemeWidgetLogoPositionEnum(Value.NONE, "none"); - - private final Value value; - - private final String string; - - BrandingThemeWidgetLogoPositionEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BrandingThemeWidgetLogoPositionEnum - && this.string.equals(((BrandingThemeWidgetLogoPositionEnum) 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 NONE: - return visitor.visitNone(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BrandingThemeWidgetLogoPositionEnum valueOf(String value) { - switch (value) { - case "left": - return LEFT; - case "right": - return RIGHT; - case "center": - return CENTER; - case "none": - return NONE; - default: - return new BrandingThemeWidgetLogoPositionEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - CENTER, - - LEFT, - - NONE, - - RIGHT, - - UNKNOWN - } - - public interface Visitor { - T visitCenter(); - - T visitLeft(); - - T visitNone(); - - T visitRight(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeWidgetSocialButtonsLayoutEnum.java b/src/main/java/com/auth0/client/mgmt/types/BrandingThemeWidgetSocialButtonsLayoutEnum.java deleted file mode 100644 index 376714c06..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BrandingThemeWidgetSocialButtonsLayoutEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BrandingThemeWidgetSocialButtonsLayoutEnum { - public static final BrandingThemeWidgetSocialButtonsLayoutEnum BOTTOM = - new BrandingThemeWidgetSocialButtonsLayoutEnum(Value.BOTTOM, "bottom"); - - public static final BrandingThemeWidgetSocialButtonsLayoutEnum TOP = - new BrandingThemeWidgetSocialButtonsLayoutEnum(Value.TOP, "top"); - - private final Value value; - - private final String string; - - BrandingThemeWidgetSocialButtonsLayoutEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BrandingThemeWidgetSocialButtonsLayoutEnum - && this.string.equals(((BrandingThemeWidgetSocialButtonsLayoutEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case BOTTOM: - return visitor.visitBottom(); - case TOP: - return visitor.visitTop(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BrandingThemeWidgetSocialButtonsLayoutEnum valueOf(String value) { - switch (value) { - case "bottom": - return BOTTOM; - case "top": - return TOP; - default: - return new BrandingThemeWidgetSocialButtonsLayoutEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - BOTTOM, - - TOP, - - UNKNOWN - } - - public interface Visitor { - T visitBottom(); - - T visitTop(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionAdminNotificationFrequencyEnum.java b/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionAdminNotificationFrequencyEnum.java deleted file mode 100644 index 2ad53e7c4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionAdminNotificationFrequencyEnum.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BreachedPasswordDetectionAdminNotificationFrequencyEnum { - public static final BreachedPasswordDetectionAdminNotificationFrequencyEnum IMMEDIATELY = - new BreachedPasswordDetectionAdminNotificationFrequencyEnum(Value.IMMEDIATELY, "immediately"); - - public static final BreachedPasswordDetectionAdminNotificationFrequencyEnum MONTHLY = - new BreachedPasswordDetectionAdminNotificationFrequencyEnum(Value.MONTHLY, "monthly"); - - public static final BreachedPasswordDetectionAdminNotificationFrequencyEnum DAILY = - new BreachedPasswordDetectionAdminNotificationFrequencyEnum(Value.DAILY, "daily"); - - public static final BreachedPasswordDetectionAdminNotificationFrequencyEnum WEEKLY = - new BreachedPasswordDetectionAdminNotificationFrequencyEnum(Value.WEEKLY, "weekly"); - - private final Value value; - - private final String string; - - BreachedPasswordDetectionAdminNotificationFrequencyEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BreachedPasswordDetectionAdminNotificationFrequencyEnum - && this.string.equals( - ((BreachedPasswordDetectionAdminNotificationFrequencyEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case IMMEDIATELY: - return visitor.visitImmediately(); - case MONTHLY: - return visitor.visitMonthly(); - case DAILY: - return visitor.visitDaily(); - case WEEKLY: - return visitor.visitWeekly(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BreachedPasswordDetectionAdminNotificationFrequencyEnum valueOf(String value) { - switch (value) { - case "immediately": - return IMMEDIATELY; - case "monthly": - return MONTHLY; - case "daily": - return DAILY; - case "weekly": - return WEEKLY; - default: - return new BreachedPasswordDetectionAdminNotificationFrequencyEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - IMMEDIATELY, - - DAILY, - - WEEKLY, - - MONTHLY, - - UNKNOWN - } - - public interface Visitor { - T visitImmediately(); - - T visitDaily(); - - T visitWeekly(); - - T visitMonthly(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionMethodEnum.java deleted file mode 100644 index ba87e9cc5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionMethodEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BreachedPasswordDetectionMethodEnum { - public static final BreachedPasswordDetectionMethodEnum STANDARD = - new BreachedPasswordDetectionMethodEnum(Value.STANDARD, "standard"); - - public static final BreachedPasswordDetectionMethodEnum ENHANCED = - new BreachedPasswordDetectionMethodEnum(Value.ENHANCED, "enhanced"); - - private final Value value; - - private final String string; - - BreachedPasswordDetectionMethodEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BreachedPasswordDetectionMethodEnum - && this.string.equals(((BreachedPasswordDetectionMethodEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case STANDARD: - return visitor.visitStandard(); - case ENHANCED: - return visitor.visitEnhanced(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BreachedPasswordDetectionMethodEnum valueOf(String value) { - switch (value) { - case "standard": - return STANDARD; - case "enhanced": - return ENHANCED; - default: - return new BreachedPasswordDetectionMethodEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - STANDARD, - - ENHANCED, - - UNKNOWN - } - - public interface Visitor { - T visitStandard(); - - T visitEnhanced(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionPreChangePasswordShieldsEnum.java b/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionPreChangePasswordShieldsEnum.java deleted file mode 100644 index cdb88a9fa..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionPreChangePasswordShieldsEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BreachedPasswordDetectionPreChangePasswordShieldsEnum { - public static final BreachedPasswordDetectionPreChangePasswordShieldsEnum BLOCK = - new BreachedPasswordDetectionPreChangePasswordShieldsEnum(Value.BLOCK, "block"); - - public static final BreachedPasswordDetectionPreChangePasswordShieldsEnum ADMIN_NOTIFICATION = - new BreachedPasswordDetectionPreChangePasswordShieldsEnum(Value.ADMIN_NOTIFICATION, "admin_notification"); - - private final Value value; - - private final String string; - - BreachedPasswordDetectionPreChangePasswordShieldsEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BreachedPasswordDetectionPreChangePasswordShieldsEnum - && this.string.equals(((BreachedPasswordDetectionPreChangePasswordShieldsEnum) 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 ADMIN_NOTIFICATION: - return visitor.visitAdminNotification(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BreachedPasswordDetectionPreChangePasswordShieldsEnum valueOf(String value) { - switch (value) { - case "block": - return BLOCK; - case "admin_notification": - return ADMIN_NOTIFICATION; - default: - return new BreachedPasswordDetectionPreChangePasswordShieldsEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - BLOCK, - - ADMIN_NOTIFICATION, - - UNKNOWN - } - - public interface Visitor { - T visitBlock(); - - T visitAdminNotification(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionPreChangePasswordStage.java b/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionPreChangePasswordStage.java deleted file mode 100644 index e53ada446..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionPreChangePasswordStage.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = BreachedPasswordDetectionPreChangePasswordStage.Builder.class) -public final class BreachedPasswordDetectionPreChangePasswordStage { - private final Optional> shields; - - private final Map additionalProperties; - - private BreachedPasswordDetectionPreChangePasswordStage( - Optional> shields, - Map additionalProperties) { - this.shields = shields; - this.additionalProperties = additionalProperties; - } - - /** - * @return Action to take when a breached password is detected during a password reset. - * Possible values: <code>block</code>, <code>admin_notification</code>. - */ - @JsonProperty("shields") - public Optional> getShields() { - return shields; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BreachedPasswordDetectionPreChangePasswordStage - && equalTo((BreachedPasswordDetectionPreChangePasswordStage) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BreachedPasswordDetectionPreChangePasswordStage other) { - return shields.equals(other.shields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.shields); - } - - @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> shields = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(BreachedPasswordDetectionPreChangePasswordStage other) { - shields(other.getShields()); - return this; - } - - /** - *

Action to take when a breached password is detected during a password reset. - * Possible values: <code>block</code>, <code>admin_notification</code>.

- */ - @JsonSetter(value = "shields", nulls = Nulls.SKIP) - public Builder shields(Optional> shields) { - this.shields = shields; - return this; - } - - public Builder shields(List shields) { - this.shields = Optional.ofNullable(shields); - return this; - } - - public BreachedPasswordDetectionPreChangePasswordStage build() { - return new BreachedPasswordDetectionPreChangePasswordStage(shields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionPreUserRegistrationShieldsEnum.java b/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionPreUserRegistrationShieldsEnum.java deleted file mode 100644 index 8cf2aa464..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionPreUserRegistrationShieldsEnum.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BreachedPasswordDetectionPreUserRegistrationShieldsEnum { - public static final BreachedPasswordDetectionPreUserRegistrationShieldsEnum BLOCK = - new BreachedPasswordDetectionPreUserRegistrationShieldsEnum(Value.BLOCK, "block"); - - public static final BreachedPasswordDetectionPreUserRegistrationShieldsEnum ADMIN_NOTIFICATION = - new BreachedPasswordDetectionPreUserRegistrationShieldsEnum(Value.ADMIN_NOTIFICATION, "admin_notification"); - - private final Value value; - - private final String string; - - BreachedPasswordDetectionPreUserRegistrationShieldsEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BreachedPasswordDetectionPreUserRegistrationShieldsEnum - && this.string.equals( - ((BreachedPasswordDetectionPreUserRegistrationShieldsEnum) 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 ADMIN_NOTIFICATION: - return visitor.visitAdminNotification(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BreachedPasswordDetectionPreUserRegistrationShieldsEnum valueOf(String value) { - switch (value) { - case "block": - return BLOCK; - case "admin_notification": - return ADMIN_NOTIFICATION; - default: - return new BreachedPasswordDetectionPreUserRegistrationShieldsEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - BLOCK, - - ADMIN_NOTIFICATION, - - UNKNOWN - } - - public interface Visitor { - T visitBlock(); - - T visitAdminNotification(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionPreUserRegistrationStage.java b/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionPreUserRegistrationStage.java deleted file mode 100644 index 27b56006d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionPreUserRegistrationStage.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = BreachedPasswordDetectionPreUserRegistrationStage.Builder.class) -public final class BreachedPasswordDetectionPreUserRegistrationStage { - private final Optional> shields; - - private final Map additionalProperties; - - private BreachedPasswordDetectionPreUserRegistrationStage( - Optional> shields, - Map additionalProperties) { - this.shields = shields; - this.additionalProperties = additionalProperties; - } - - /** - * @return Action to take when a breached password is detected during a signup. - * Possible values: <code>block</code>, <code>admin_notification</code>. - */ - @JsonProperty("shields") - public Optional> getShields() { - return shields; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BreachedPasswordDetectionPreUserRegistrationStage - && equalTo((BreachedPasswordDetectionPreUserRegistrationStage) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BreachedPasswordDetectionPreUserRegistrationStage other) { - return shields.equals(other.shields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.shields); - } - - @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> shields = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(BreachedPasswordDetectionPreUserRegistrationStage other) { - shields(other.getShields()); - return this; - } - - /** - *

Action to take when a breached password is detected during a signup. - * Possible values: <code>block</code>, <code>admin_notification</code>.

- */ - @JsonSetter(value = "shields", nulls = Nulls.SKIP) - public Builder shields(Optional> shields) { - this.shields = shields; - return this; - } - - public Builder shields(List shields) { - this.shields = Optional.ofNullable(shields); - return this; - } - - public BreachedPasswordDetectionPreUserRegistrationStage build() { - return new BreachedPasswordDetectionPreUserRegistrationStage(shields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionShieldsEnum.java b/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionShieldsEnum.java deleted file mode 100644 index 4b24df30e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionShieldsEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BreachedPasswordDetectionShieldsEnum { - public static final BreachedPasswordDetectionShieldsEnum BLOCK = - new BreachedPasswordDetectionShieldsEnum(Value.BLOCK, "block"); - - public static final BreachedPasswordDetectionShieldsEnum USER_NOTIFICATION = - new BreachedPasswordDetectionShieldsEnum(Value.USER_NOTIFICATION, "user_notification"); - - public static final BreachedPasswordDetectionShieldsEnum ADMIN_NOTIFICATION = - new BreachedPasswordDetectionShieldsEnum(Value.ADMIN_NOTIFICATION, "admin_notification"); - - private final Value value; - - private final String string; - - BreachedPasswordDetectionShieldsEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BreachedPasswordDetectionShieldsEnum - && this.string.equals(((BreachedPasswordDetectionShieldsEnum) 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 USER_NOTIFICATION: - return visitor.visitUserNotification(); - case ADMIN_NOTIFICATION: - return visitor.visitAdminNotification(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BreachedPasswordDetectionShieldsEnum valueOf(String value) { - switch (value) { - case "block": - return BLOCK; - case "user_notification": - return USER_NOTIFICATION; - case "admin_notification": - return ADMIN_NOTIFICATION; - default: - return new BreachedPasswordDetectionShieldsEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - BLOCK, - - USER_NOTIFICATION, - - ADMIN_NOTIFICATION, - - UNKNOWN - } - - public interface Visitor { - T visitBlock(); - - T visitUserNotification(); - - T visitAdminNotification(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionStage.java b/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionStage.java deleted file mode 100644 index c8fae44dc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BreachedPasswordDetectionStage.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = BreachedPasswordDetectionStage.Builder.class) -public final class BreachedPasswordDetectionStage { - private final Optional preUserRegistration; - - private final Optional preChangePassword; - - private final Map additionalProperties; - - private BreachedPasswordDetectionStage( - Optional preUserRegistration, - Optional preChangePassword, - Map additionalProperties) { - this.preUserRegistration = preUserRegistration; - this.preChangePassword = preChangePassword; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("pre-user-registration") - public Optional getPreUserRegistration() { - return preUserRegistration; - } - - @JsonProperty("pre-change-password") - public Optional getPreChangePassword() { - return preChangePassword; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BreachedPasswordDetectionStage && equalTo((BreachedPasswordDetectionStage) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BreachedPasswordDetectionStage other) { - return preUserRegistration.equals(other.preUserRegistration) - && preChangePassword.equals(other.preChangePassword); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.preUserRegistration, this.preChangePassword); - } - - @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 preUserRegistration = Optional.empty(); - - private Optional preChangePassword = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(BreachedPasswordDetectionStage other) { - preUserRegistration(other.getPreUserRegistration()); - preChangePassword(other.getPreChangePassword()); - return this; - } - - @JsonSetter(value = "pre-user-registration", nulls = Nulls.SKIP) - public Builder preUserRegistration( - Optional preUserRegistration) { - this.preUserRegistration = preUserRegistration; - return this; - } - - public Builder preUserRegistration(BreachedPasswordDetectionPreUserRegistrationStage preUserRegistration) { - this.preUserRegistration = Optional.ofNullable(preUserRegistration); - return this; - } - - @JsonSetter(value = "pre-change-password", nulls = Nulls.SKIP) - public Builder preChangePassword(Optional preChangePassword) { - this.preChangePassword = preChangePassword; - return this; - } - - public Builder preChangePassword(BreachedPasswordDetectionPreChangePasswordStage preChangePassword) { - this.preChangePassword = Optional.ofNullable(preChangePassword); - return this; - } - - public BreachedPasswordDetectionStage build() { - return new BreachedPasswordDetectionStage(preUserRegistration, preChangePassword, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BruteForceProtectionModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/BruteForceProtectionModeEnum.java deleted file mode 100644 index c1b9251f4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BruteForceProtectionModeEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BruteForceProtectionModeEnum { - public static final BruteForceProtectionModeEnum COUNT_PER_IDENTIFIER = - new BruteForceProtectionModeEnum(Value.COUNT_PER_IDENTIFIER, "count_per_identifier"); - - public static final BruteForceProtectionModeEnum COUNT_PER_IDENTIFIER_AND_IP = - new BruteForceProtectionModeEnum(Value.COUNT_PER_IDENTIFIER_AND_IP, "count_per_identifier_and_ip"); - - private final Value value; - - private final String string; - - BruteForceProtectionModeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BruteForceProtectionModeEnum - && this.string.equals(((BruteForceProtectionModeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case COUNT_PER_IDENTIFIER: - return visitor.visitCountPerIdentifier(); - case COUNT_PER_IDENTIFIER_AND_IP: - return visitor.visitCountPerIdentifierAndIp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BruteForceProtectionModeEnum valueOf(String value) { - switch (value) { - case "count_per_identifier": - return COUNT_PER_IDENTIFIER; - case "count_per_identifier_and_ip": - return COUNT_PER_IDENTIFIER_AND_IP; - default: - return new BruteForceProtectionModeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - COUNT_PER_IDENTIFIER_AND_IP, - - COUNT_PER_IDENTIFIER, - - UNKNOWN - } - - public interface Visitor { - T visitCountPerIdentifierAndIp(); - - T visitCountPerIdentifier(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BruteForceProtectionShieldsEnum.java b/src/main/java/com/auth0/client/mgmt/types/BruteForceProtectionShieldsEnum.java deleted file mode 100644 index 021cf2597..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BruteForceProtectionShieldsEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class BruteForceProtectionShieldsEnum { - public static final BruteForceProtectionShieldsEnum BLOCK = - new BruteForceProtectionShieldsEnum(Value.BLOCK, "block"); - - public static final BruteForceProtectionShieldsEnum USER_NOTIFICATION = - new BruteForceProtectionShieldsEnum(Value.USER_NOTIFICATION, "user_notification"); - - private final Value value; - - private final String string; - - BruteForceProtectionShieldsEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof BruteForceProtectionShieldsEnum - && this.string.equals(((BruteForceProtectionShieldsEnum) 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 USER_NOTIFICATION: - return visitor.visitUserNotification(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static BruteForceProtectionShieldsEnum valueOf(String value) { - switch (value) { - case "block": - return BLOCK; - case "user_notification": - return USER_NOTIFICATION; - default: - return new BruteForceProtectionShieldsEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - BLOCK, - - USER_NOTIFICATION, - - UNKNOWN - } - - public interface Visitor { - T visitBlock(); - - T visitUserNotification(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/BulkUpdateAculResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/BulkUpdateAculResponseContent.java deleted file mode 100644 index 26fc7d811..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/BulkUpdateAculResponseContent.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = BulkUpdateAculResponseContent.Builder.class) -public final class BulkUpdateAculResponseContent { - private final List configs; - - private final Map additionalProperties; - - private BulkUpdateAculResponseContent(List configs, Map additionalProperties) { - this.configs = configs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("configs") - public List getConfigs() { - return configs; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof BulkUpdateAculResponseContent && equalTo((BulkUpdateAculResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(BulkUpdateAculResponseContent other) { - return configs.equals(other.configs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.configs); - } - - @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 configs = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(BulkUpdateAculResponseContent other) { - configs(other.getConfigs()); - return this; - } - - @JsonSetter(value = "configs", nulls = Nulls.SKIP) - public Builder configs(List configs) { - this.configs.clear(); - if (configs != null) { - this.configs.addAll(configs); - } - return this; - } - - public Builder addConfigs(AculConfigsItem configs) { - this.configs.add(configs); - return this; - } - - public Builder addAllConfigs(List configs) { - if (configs != null) { - this.configs.addAll(configs); - } - return this; - } - - public BulkUpdateAculResponseContent build() { - return new BulkUpdateAculResponseContent(configs, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CertificateSubjectDnCredential.java b/src/main/java/com/auth0/client/mgmt/types/CertificateSubjectDnCredential.java deleted file mode 100644 index a69434be9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CertificateSubjectDnCredential.java +++ /dev/null @@ -1,235 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CertificateSubjectDnCredential.Builder.class) -public final class CertificateSubjectDnCredential { - private final CertificateSubjectDnCredentialTypeEnum credentialType; - - private final Optional name; - - private final Optional subjectDn; - - private final Optional pem; - - private final Map additionalProperties; - - private CertificateSubjectDnCredential( - CertificateSubjectDnCredentialTypeEnum credentialType, - Optional name, - Optional subjectDn, - Optional pem, - Map additionalProperties) { - this.credentialType = credentialType; - this.name = name; - this.subjectDn = subjectDn; - this.pem = pem; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("credential_type") - public CertificateSubjectDnCredentialTypeEnum getCredentialType() { - return credentialType; - } - - /** - * @return Friendly name for a credential. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Subject Distinguished Name. Mutually exclusive with pem property. Applies to cert_subject_dn credential type. - */ - @JsonProperty("subject_dn") - public Optional getSubjectDn() { - return subjectDn; - } - - /** - * @return PEM-formatted X509 certificate. Must be JSON escaped. Mutually exclusive with subject_dn property. - */ - @JsonProperty("pem") - public Optional getPem() { - return pem; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CertificateSubjectDnCredential && equalTo((CertificateSubjectDnCredential) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CertificateSubjectDnCredential other) { - return credentialType.equals(other.credentialType) - && name.equals(other.name) - && subjectDn.equals(other.subjectDn) - && pem.equals(other.pem); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.credentialType, this.name, this.subjectDn, this.pem); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static CredentialTypeStage builder() { - return new Builder(); - } - - public interface CredentialTypeStage { - _FinalStage credentialType(@NotNull CertificateSubjectDnCredentialTypeEnum credentialType); - - Builder from(CertificateSubjectDnCredential other); - } - - public interface _FinalStage { - CertificateSubjectDnCredential build(); - - /** - *

Friendly name for a credential.

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

Subject Distinguished Name. Mutually exclusive with pem property. Applies to cert_subject_dn credential type.

- */ - _FinalStage subjectDn(Optional subjectDn); - - _FinalStage subjectDn(String subjectDn); - - /** - *

PEM-formatted X509 certificate. Must be JSON escaped. Mutually exclusive with subject_dn property.

- */ - _FinalStage pem(Optional pem); - - _FinalStage pem(String pem); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements CredentialTypeStage, _FinalStage { - private CertificateSubjectDnCredentialTypeEnum credentialType; - - private Optional pem = Optional.empty(); - - private Optional subjectDn = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CertificateSubjectDnCredential other) { - credentialType(other.getCredentialType()); - name(other.getName()); - subjectDn(other.getSubjectDn()); - pem(other.getPem()); - return this; - } - - @java.lang.Override - @JsonSetter("credential_type") - public _FinalStage credentialType(@NotNull CertificateSubjectDnCredentialTypeEnum credentialType) { - this.credentialType = Objects.requireNonNull(credentialType, "credentialType must not be null"); - return this; - } - - /** - *

PEM-formatted X509 certificate. Must be JSON escaped. Mutually exclusive with subject_dn property.

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

PEM-formatted X509 certificate. Must be JSON escaped. Mutually exclusive with subject_dn property.

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

Subject Distinguished Name. Mutually exclusive with pem property. Applies to cert_subject_dn credential type.

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

Subject Distinguished Name. Mutually exclusive with pem property. Applies to cert_subject_dn credential type.

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

Friendly name for a credential.

- * @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; - } - - /** - *

Friendly name for a credential.

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CertificateSubjectDnCredential build() { - return new CertificateSubjectDnCredential(credentialType, name, subjectDn, pem, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CertificateSubjectDnCredentialTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/CertificateSubjectDnCredentialTypeEnum.java deleted file mode 100644 index bd33257c3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CertificateSubjectDnCredentialTypeEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CertificateSubjectDnCredentialTypeEnum { - public static final CertificateSubjectDnCredentialTypeEnum CERT_SUBJECT_DN = - new CertificateSubjectDnCredentialTypeEnum(Value.CERT_SUBJECT_DN, "cert_subject_dn"); - - private final Value value; - - private final String string; - - CertificateSubjectDnCredentialTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CertificateSubjectDnCredentialTypeEnum - && this.string.equals(((CertificateSubjectDnCredentialTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CERT_SUBJECT_DN: - return visitor.visitCertSubjectDn(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CertificateSubjectDnCredentialTypeEnum valueOf(String value) { - switch (value) { - case "cert_subject_dn": - return CERT_SUBJECT_DN; - default: - return new CertificateSubjectDnCredentialTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - CERT_SUBJECT_DN, - - UNKNOWN - } - - public interface Visitor { - T visitCertSubjectDn(); - - 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 deleted file mode 100644 index d210bbfd7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ChangePasswordTicketIdentity.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ChangePasswordTicketIdentity.Builder.class) -public final class ChangePasswordTicketIdentity { - private final String userId; - - private final IdentityProviderOnlyAuth0Enum provider; - - private final Optional connectionId; - - private final Map additionalProperties; - - private ChangePasswordTicketIdentity( - String userId, - IdentityProviderOnlyAuth0Enum provider, - Optional connectionId, - Map additionalProperties) { - this.userId = userId; - this.provider = provider; - this.connectionId = connectionId; - this.additionalProperties = additionalProperties; - } - - /** - * @return user_id of the identity. - */ - @JsonProperty("user_id") - public String getUserId() { - return userId; - } - - @JsonProperty("provider") - public IdentityProviderOnlyAuth0Enum getProvider() { - return provider; - } - - /** - * @return connection_id of the identity. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ChangePasswordTicketIdentity && equalTo((ChangePasswordTicketIdentity) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ChangePasswordTicketIdentity other) { - return userId.equals(other.userId) - && provider.equals(other.provider) - && connectionId.equals(other.connectionId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.userId, this.provider, this.connectionId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static UserIdStage builder() { - return new Builder(); - } - - public interface UserIdStage { - /** - *

user_id of the identity.

- */ - ProviderStage userId(@NotNull String userId); - - Builder from(ChangePasswordTicketIdentity other); - } - - public interface ProviderStage { - _FinalStage provider(@NotNull IdentityProviderOnlyAuth0Enum provider); - } - - public interface _FinalStage { - ChangePasswordTicketIdentity build(); - - /** - *

connection_id of the identity.

- */ - _FinalStage connectionId(Optional connectionId); - - _FinalStage connectionId(String connectionId); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements UserIdStage, ProviderStage, _FinalStage { - private String userId; - - private IdentityProviderOnlyAuth0Enum provider; - - private Optional connectionId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ChangePasswordTicketIdentity other) { - userId(other.getUserId()); - provider(other.getProvider()); - connectionId(other.getConnectionId()); - return this; - } - - /** - *

user_id of the identity.

- *

user_id of the identity.

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

connection_id of the identity.

- * @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; - } - - /** - *

connection_id of the identity.

- */ - @java.lang.Override - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public _FinalStage connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - @java.lang.Override - public ChangePasswordTicketIdentity build() { - return new ChangePasswordTicketIdentity(userId, provider, connectionId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ChangePasswordTicketRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/ChangePasswordTicketRequestContent.java deleted file mode 100644 index bb8767ea5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ChangePasswordTicketRequestContent.java +++ /dev/null @@ -1,389 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ChangePasswordTicketRequestContent.Builder.class) -public final class ChangePasswordTicketRequestContent { - private final Optional resultUrl; - - private final Optional userId; - - private final Optional clientId; - - private final Optional organizationId; - - private final Optional connectionId; - - private final Optional email; - - private final Optional ttlSec; - - private final Optional markEmailAsVerified; - - private final Optional includeEmailInRedirect; - - private final Optional identity; - - private final Map additionalProperties; - - private ChangePasswordTicketRequestContent( - Optional resultUrl, - Optional userId, - Optional clientId, - Optional organizationId, - Optional connectionId, - Optional email, - Optional ttlSec, - Optional markEmailAsVerified, - Optional includeEmailInRedirect, - Optional identity, - Map additionalProperties) { - this.resultUrl = resultUrl; - this.userId = userId; - this.clientId = clientId; - this.organizationId = organizationId; - this.connectionId = connectionId; - this.email = email; - this.ttlSec = ttlSec; - this.markEmailAsVerified = markEmailAsVerified; - this.includeEmailInRedirect = includeEmailInRedirect; - this.identity = identity; - this.additionalProperties = additionalProperties; - } - - /** - * @return URL the user will be redirected to in the classic Universal Login experience once the ticket is used. Cannot be specified when using client_id or organization_id. - */ - @JsonProperty("result_url") - public Optional getResultUrl() { - return resultUrl; - } - - /** - * @return user_id of for whom the ticket should be created. - */ - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - /** - * @return ID of the client (application). If provided for tenants using the New Universal Login experience, the email template and UI displays application details, and the user is prompted to redirect to the application's <a target='' href='https://auth0.com/docs/authenticate/login/auth0-universal-login/configure-default-login-routes#completing-the-password-reset-flow'>default login route</a> after the ticket is used. client_id is required to use the <a target='' href='https://auth0.com/docs/customize/actions/flows-and-triggers/post-change-password-flow'>Password Reset Post Challenge</a> trigger. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @return (Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters. - */ - @JsonProperty("organization_id") - public Optional getOrganizationId() { - return organizationId; - } - - /** - * @return ID of the connection. If provided, allows the user to be specified using email instead of user_id. If you set this value, you must also send the email parameter. You cannot send user_id when specifying a connection_id. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - /** - * @return Email address of the user for whom the tickets should be created. Requires the connection_id parameter. Cannot be specified when using user_id. - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - /** - * @return Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days). - */ - @JsonProperty("ttl_sec") - public Optional getTtlSec() { - return ttlSec; - } - - /** - * @return Whether to set the email_verified attribute to true (true) or whether it should not be updated (false). - */ - @JsonProperty("mark_email_as_verified") - public Optional getMarkEmailAsVerified() { - return markEmailAsVerified; - } - - /** - * @return Whether to include the email address as part of the returnUrl in the reset_email (true), or not (false). - */ - @JsonProperty("includeEmailInRedirect") - public Optional getIncludeEmailInRedirect() { - return includeEmailInRedirect; - } - - @JsonProperty("identity") - public Optional getIdentity() { - return identity; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ChangePasswordTicketRequestContent - && equalTo((ChangePasswordTicketRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ChangePasswordTicketRequestContent other) { - return resultUrl.equals(other.resultUrl) - && userId.equals(other.userId) - && clientId.equals(other.clientId) - && organizationId.equals(other.organizationId) - && connectionId.equals(other.connectionId) - && email.equals(other.email) - && ttlSec.equals(other.ttlSec) - && markEmailAsVerified.equals(other.markEmailAsVerified) - && includeEmailInRedirect.equals(other.includeEmailInRedirect) - && identity.equals(other.identity); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.resultUrl, - this.userId, - this.clientId, - this.organizationId, - this.connectionId, - this.email, - this.ttlSec, - this.markEmailAsVerified, - this.includeEmailInRedirect, - this.identity); - } - - @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 resultUrl = Optional.empty(); - - private Optional userId = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional organizationId = Optional.empty(); - - private Optional connectionId = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional ttlSec = Optional.empty(); - - private Optional markEmailAsVerified = Optional.empty(); - - private Optional includeEmailInRedirect = Optional.empty(); - - private Optional identity = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ChangePasswordTicketRequestContent other) { - resultUrl(other.getResultUrl()); - userId(other.getUserId()); - clientId(other.getClientId()); - organizationId(other.getOrganizationId()); - connectionId(other.getConnectionId()); - email(other.getEmail()); - ttlSec(other.getTtlSec()); - markEmailAsVerified(other.getMarkEmailAsVerified()); - includeEmailInRedirect(other.getIncludeEmailInRedirect()); - identity(other.getIdentity()); - return this; - } - - /** - *

URL the user will be redirected to in the classic Universal Login experience once the ticket is used. Cannot be specified when using client_id or organization_id.

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

user_id of for whom the ticket should be created.

- */ - @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; - } - - /** - *

ID of the client (application). If provided for tenants using the New Universal Login experience, the email template and UI displays application details, and the user is prompted to redirect to the application's <a target='' href='https://auth0.com/docs/authenticate/login/auth0-universal-login/configure-default-login-routes#completing-the-password-reset-flow'>default login route</a> after the ticket is used. client_id is required to use the <a target='' href='https://auth0.com/docs/customize/actions/flows-and-triggers/post-change-password-flow'>Password Reset Post Challenge</a> trigger.

- */ - @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; - } - - /** - *

(Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters.

- */ - @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; - } - - /** - *

ID of the connection. If provided, allows the user to be specified using email instead of user_id. If you set this value, you must also send the email parameter. You cannot send user_id when specifying a connection_id.

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

Email address of the user for whom the tickets should be created. Requires the connection_id parameter. Cannot be specified when using user_id.

- */ - @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; - } - - /** - *

Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days).

- */ - @JsonSetter(value = "ttl_sec", nulls = Nulls.SKIP) - public Builder ttlSec(Optional ttlSec) { - this.ttlSec = ttlSec; - return this; - } - - public Builder ttlSec(Integer ttlSec) { - this.ttlSec = Optional.ofNullable(ttlSec); - return this; - } - - /** - *

Whether to set the email_verified attribute to true (true) or whether it should not be updated (false).

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

Whether to include the email address as part of the returnUrl in the reset_email (true), or not (false).

- */ - @JsonSetter(value = "includeEmailInRedirect", nulls = Nulls.SKIP) - public Builder includeEmailInRedirect(Optional includeEmailInRedirect) { - this.includeEmailInRedirect = includeEmailInRedirect; - return this; - } - - public Builder includeEmailInRedirect(Boolean includeEmailInRedirect) { - this.includeEmailInRedirect = Optional.ofNullable(includeEmailInRedirect); - return this; - } - - @JsonSetter(value = "identity", nulls = Nulls.SKIP) - public Builder identity(Optional identity) { - this.identity = identity; - return this; - } - - public Builder identity(ChangePasswordTicketIdentity identity) { - this.identity = Optional.ofNullable(identity); - return this; - } - - public ChangePasswordTicketRequestContent build() { - return new ChangePasswordTicketRequestContent( - resultUrl, - userId, - clientId, - organizationId, - connectionId, - email, - ttlSec, - markEmailAsVerified, - includeEmailInRedirect, - identity, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ChangePasswordTicketResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ChangePasswordTicketResponseContent.java deleted file mode 100644 index c9075bfd5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ChangePasswordTicketResponseContent.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = ChangePasswordTicketResponseContent.Builder.class) -public final class ChangePasswordTicketResponseContent { - private final String ticket; - - private final Map additionalProperties; - - private ChangePasswordTicketResponseContent(String ticket, Map additionalProperties) { - this.ticket = ticket; - this.additionalProperties = additionalProperties; - } - - /** - * @return URL representing the ticket. - */ - @JsonProperty("ticket") - public String getTicket() { - return ticket; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ChangePasswordTicketResponseContent - && equalTo((ChangePasswordTicketResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ChangePasswordTicketResponseContent other) { - return ticket.equals(other.ticket); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.ticket); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TicketStage builder() { - return new Builder(); - } - - public interface TicketStage { - /** - *

URL representing the ticket.

- */ - _FinalStage ticket(@NotNull String ticket); - - Builder from(ChangePasswordTicketResponseContent other); - } - - public interface _FinalStage { - ChangePasswordTicketResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TicketStage, _FinalStage { - private String ticket; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ChangePasswordTicketResponseContent other) { - ticket(other.getTicket()); - return this; - } - - /** - *

URL representing the ticket.

- *

URL representing the ticket.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("ticket") - public _FinalStage ticket(@NotNull String ticket) { - this.ticket = Objects.requireNonNull(ticket, "ticket must not be null"); - return this; - } - - @java.lang.Override - public ChangePasswordTicketResponseContent build() { - return new ChangePasswordTicketResponseContent(ticket, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/Client.java b/src/main/java/com/auth0/client/mgmt/types/Client.java deleted file mode 100644 index 4c1bf94ba..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/Client.java +++ /dev/null @@ -1,1876 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = Client.Builder.class) -public final class Client { - private final Optional clientId; - - private final Optional tenant; - - private final Optional name; - - private final Optional description; - - private final Optional global; - - private final Optional clientSecret; - - 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> signingKeys; - - private final OptionalNullable encryptionKey; - - 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 addons; - - private final Optional tokenEndpointAuthMethod; - - private final Optional isTokenEndpointIpHeaderTrusted; - - private final Optional> clientMetadata; - - private final Optional mobile; - - private final Optional initiateLoginUri; - - 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 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 resourceServerIdentifier; - - private final Optional> asyncApprovalNotificationChannels; - - private final Map additionalProperties; - - private Client( - Optional clientId, - Optional tenant, - Optional name, - Optional description, - Optional global, - Optional clientSecret, - 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> signingKeys, - OptionalNullable encryptionKey, - Optional sso, - Optional ssoDisabled, - Optional crossOriginAuthentication, - Optional crossOriginLoc, - Optional customLoginPageOn, - Optional customLoginPage, - Optional customLoginPagePreview, - Optional formTemplate, - Optional addons, - Optional tokenEndpointAuthMethod, - Optional isTokenEndpointIpHeaderTrusted, - Optional> clientMetadata, - Optional mobile, - Optional initiateLoginUri, - OptionalNullable refreshToken, - OptionalNullable defaultOrganization, - Optional organizationUsage, - Optional organizationRequireBehavior, - Optional> organizationDiscoveryMethods, - OptionalNullable clientAuthenticationMethods, - Optional requirePushedAuthorizationRequests, - Optional requireProofOfPossession, - Optional signedRequestObject, - OptionalNullable complianceLevel, - Optional skipNonVerifiableCallbackUriConfirmationPrompt, - Optional tokenExchange, - OptionalNullable parRequestExpiry, - Optional tokenQuota, - Optional expressConfiguration, - Optional resourceServerIdentifier, - Optional> asyncApprovalNotificationChannels, - Map additionalProperties) { - this.clientId = clientId; - this.tenant = tenant; - this.name = name; - this.description = description; - this.global = global; - this.clientSecret = clientSecret; - 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.signingKeys = signingKeys; - this.encryptionKey = encryptionKey; - 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.addons = addons; - this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; - this.isTokenEndpointIpHeaderTrusted = isTokenEndpointIpHeaderTrusted; - this.clientMetadata = clientMetadata; - this.mobile = mobile; - this.initiateLoginUri = initiateLoginUri; - 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.complianceLevel = complianceLevel; - this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; - this.tokenExchange = tokenExchange; - this.parRequestExpiry = parRequestExpiry; - this.tokenQuota = tokenQuota; - this.expressConfiguration = expressConfiguration; - this.resourceServerIdentifier = resourceServerIdentifier; - this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of this client. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @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; - } - - /** - * @return Client secret (which you must not make public). - */ - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @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 <a href='https://auth0.com/docs/api-auth/tutorials/adoption'>strict OIDC specifications</a> (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 <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>. - */ - @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; - } - - @JsonProperty("signing_keys") - public Optional> getSigningKeys() { - return signingKeys; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("encryption_key") - public OptionalNullable getEncryptionKey() { - if (encryptionKey == null) { - return OptionalNullable.absent(); - } - return encryptionKey; - } - - /** - * @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("addons") - public Optional getAddons() { - return addons; - } - - @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; - } - - @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; - } - - @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; - } - - /** - * @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; - } - - @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("encryption_key") - private OptionalNullable _getEncryptionKey() { - return encryptionKey; - } - - @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 Client && equalTo((Client) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(Client other) { - return clientId.equals(other.clientId) - && tenant.equals(other.tenant) - && name.equals(other.name) - && description.equals(other.description) - && global.equals(other.global) - && clientSecret.equals(other.clientSecret) - && 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) - && signingKeys.equals(other.signingKeys) - && encryptionKey.equals(other.encryptionKey) - && 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) - && addons.equals(other.addons) - && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) - && isTokenEndpointIpHeaderTrusted.equals(other.isTokenEndpointIpHeaderTrusted) - && clientMetadata.equals(other.clientMetadata) - && mobile.equals(other.mobile) - && initiateLoginUri.equals(other.initiateLoginUri) - && 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) - && complianceLevel.equals(other.complianceLevel) - && skipNonVerifiableCallbackUriConfirmationPrompt.equals( - other.skipNonVerifiableCallbackUriConfirmationPrompt) - && tokenExchange.equals(other.tokenExchange) - && parRequestExpiry.equals(other.parRequestExpiry) - && tokenQuota.equals(other.tokenQuota) - && expressConfiguration.equals(other.expressConfiguration) - && resourceServerIdentifier.equals(other.resourceServerIdentifier) - && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.tenant, - this.name, - this.description, - this.global, - this.clientSecret, - 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.signingKeys, - this.encryptionKey, - this.sso, - this.ssoDisabled, - this.crossOriginAuthentication, - this.crossOriginLoc, - this.customLoginPageOn, - this.customLoginPage, - this.customLoginPagePreview, - this.formTemplate, - this.addons, - this.tokenEndpointAuthMethod, - this.isTokenEndpointIpHeaderTrusted, - this.clientMetadata, - this.mobile, - this.initiateLoginUri, - this.refreshToken, - this.defaultOrganization, - this.organizationUsage, - this.organizationRequireBehavior, - this.organizationDiscoveryMethods, - this.clientAuthenticationMethods, - this.requirePushedAuthorizationRequests, - this.requireProofOfPossession, - this.signedRequestObject, - this.complianceLevel, - this.skipNonVerifiableCallbackUriConfirmationPrompt, - this.tokenExchange, - this.parRequestExpiry, - this.tokenQuota, - this.expressConfiguration, - this.resourceServerIdentifier, - this.asyncApprovalNotificationChannels); - } - - @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 tenant = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional description = Optional.empty(); - - private Optional global = Optional.empty(); - - private Optional clientSecret = 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> signingKeys = Optional.empty(); - - private OptionalNullable encryptionKey = OptionalNullable.absent(); - - 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 addons = 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 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 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 resourceServerIdentifier = Optional.empty(); - - private Optional> asyncApprovalNotificationChannels = - Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(Client other) { - clientId(other.getClientId()); - tenant(other.getTenant()); - name(other.getName()); - description(other.getDescription()); - global(other.getGlobal()); - clientSecret(other.getClientSecret()); - 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()); - signingKeys(other.getSigningKeys()); - encryptionKey(other.getEncryptionKey()); - sso(other.getSso()); - ssoDisabled(other.getSsoDisabled()); - crossOriginAuthentication(other.getCrossOriginAuthentication()); - crossOriginLoc(other.getCrossOriginLoc()); - customLoginPageOn(other.getCustomLoginPageOn()); - customLoginPage(other.getCustomLoginPage()); - customLoginPagePreview(other.getCustomLoginPagePreview()); - formTemplate(other.getFormTemplate()); - addons(other.getAddons()); - tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); - isTokenEndpointIpHeaderTrusted(other.getIsTokenEndpointIpHeaderTrusted()); - clientMetadata(other.getClientMetadata()); - mobile(other.getMobile()); - initiateLoginUri(other.getInitiateLoginUri()); - 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()); - complianceLevel(other.getComplianceLevel()); - skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); - tokenExchange(other.getTokenExchange()); - parRequestExpiry(other.getParRequestExpiry()); - tokenQuota(other.getTokenQuota()); - expressConfiguration(other.getExpressConfiguration()); - resourceServerIdentifier(other.getResourceServerIdentifier()); - asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); - 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; - } - - /** - *

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; - } - - /** - *

Client secret (which you must not make public).

- */ - @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 = "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 <a href='https://auth0.com/docs/api-auth/tutorials/adoption'>strict OIDC specifications</a> (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 <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>.

- */ - @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; - } - - @JsonSetter(value = "signing_keys", nulls = Nulls.SKIP) - public Builder signingKeys(Optional> signingKeys) { - this.signingKeys = signingKeys; - return this; - } - - public Builder signingKeys(List signingKeys) { - this.signingKeys = Optional.ofNullable(signingKeys); - return this; - } - - @JsonSetter(value = "encryption_key", nulls = Nulls.SKIP) - public Builder encryptionKey(@Nullable OptionalNullable encryptionKey) { - this.encryptionKey = encryptionKey; - return this; - } - - public Builder encryptionKey(ClientEncryptionKey encryptionKey) { - this.encryptionKey = OptionalNullable.of(encryptionKey); - return this; - } - - public Builder encryptionKey(Optional encryptionKey) { - if (encryptionKey.isPresent()) { - this.encryptionKey = OptionalNullable.of(encryptionKey.get()); - } else { - this.encryptionKey = OptionalNullable.absent(); - } - return this; - } - - public Builder encryptionKey(com.auth0.client.mgmt.core.Nullable encryptionKey) { - if (encryptionKey.isNull()) { - this.encryptionKey = OptionalNullable.ofNull(); - } else if (encryptionKey.isEmpty()) { - this.encryptionKey = OptionalNullable.absent(); - } else { - this.encryptionKey = OptionalNullable.of(encryptionKey.get()); - } - 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 = "addons", nulls = Nulls.SKIP) - public Builder addons(Optional addons) { - this.addons = addons; - return this; - } - - public Builder addons(ClientAddons addons) { - this.addons = Optional.ofNullable(addons); - 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 = "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 = "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; - } - - /** - *

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; - } - - public Client build() { - return new Client( - clientId, - tenant, - name, - description, - global, - clientSecret, - appType, - logoUri, - isFirstParty, - oidcConformant, - callbacks, - allowedOrigins, - webOrigins, - clientAliases, - allowedClients, - allowedLogoutUrls, - sessionTransfer, - oidcLogout, - grantTypes, - jwtConfiguration, - signingKeys, - encryptionKey, - sso, - ssoDisabled, - crossOriginAuthentication, - crossOriginLoc, - customLoginPageOn, - customLoginPage, - customLoginPagePreview, - formTemplate, - addons, - tokenEndpointAuthMethod, - isTokenEndpointIpHeaderTrusted, - clientMetadata, - mobile, - initiateLoginUri, - refreshToken, - defaultOrganization, - organizationUsage, - organizationRequireBehavior, - organizationDiscoveryMethods, - clientAuthenticationMethods, - requirePushedAuthorizationRequests, - requireProofOfPossession, - signedRequestObject, - complianceLevel, - skipNonVerifiableCallbackUriConfirmationPrompt, - tokenExchange, - parRequestExpiry, - tokenQuota, - expressConfiguration, - resourceServerIdentifier, - asyncApprovalNotificationChannels, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonAws.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonAws.java deleted file mode 100644 index 828f875ff..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonAws.java +++ /dev/null @@ -1,163 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonAws.Builder.class) -public final class ClientAddonAws { - private final Optional principal; - - private final Optional role; - - private final Optional lifetimeInSeconds; - - private final Map additionalProperties; - - private ClientAddonAws( - Optional principal, - Optional role, - Optional lifetimeInSeconds, - Map additionalProperties) { - this.principal = principal; - this.role = role; - this.lifetimeInSeconds = lifetimeInSeconds; - this.additionalProperties = additionalProperties; - } - - /** - * @return AWS principal ARN, e.g. arn:aws:iam::010616021751:saml-provider/idpname - */ - @JsonProperty("principal") - public Optional getPrincipal() { - return principal; - } - - /** - * @return AWS role ARN, e.g. arn:aws:iam::010616021751:role/foo - */ - @JsonProperty("role") - public Optional getRole() { - return role; - } - - /** - * @return AWS token lifetime in seconds - */ - @JsonProperty("lifetime_in_seconds") - public Optional getLifetimeInSeconds() { - return lifetimeInSeconds; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonAws && equalTo((ClientAddonAws) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonAws other) { - return principal.equals(other.principal) - && role.equals(other.role) - && lifetimeInSeconds.equals(other.lifetimeInSeconds); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.principal, this.role, this.lifetimeInSeconds); - } - - @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 principal = Optional.empty(); - - private Optional role = Optional.empty(); - - private Optional lifetimeInSeconds = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonAws other) { - principal(other.getPrincipal()); - role(other.getRole()); - lifetimeInSeconds(other.getLifetimeInSeconds()); - return this; - } - - /** - *

AWS principal ARN, e.g. arn:aws:iam::010616021751:saml-provider/idpname

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

AWS role ARN, e.g. arn:aws:iam::010616021751:role/foo

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

AWS token lifetime in seconds

- */ - @JsonSetter(value = "lifetime_in_seconds", nulls = Nulls.SKIP) - public Builder lifetimeInSeconds(Optional lifetimeInSeconds) { - this.lifetimeInSeconds = lifetimeInSeconds; - return this; - } - - public Builder lifetimeInSeconds(Integer lifetimeInSeconds) { - this.lifetimeInSeconds = Optional.ofNullable(lifetimeInSeconds); - return this; - } - - public ClientAddonAws build() { - return new ClientAddonAws(principal, role, lifetimeInSeconds, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonAzureBlob.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonAzureBlob.java deleted file mode 100644 index c194cdf5d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonAzureBlob.java +++ /dev/null @@ -1,490 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonAzureBlob.Builder.class) -public final class ClientAddonAzureBlob { - private final Optional accountName; - - private final Optional storageAccessKey; - - private final Optional containerName; - - private final Optional blobName; - - private final Optional expiration; - - private final Optional signedIdentifier; - - private final Optional blobRead; - - private final Optional blobWrite; - - private final Optional blobDelete; - - private final Optional containerRead; - - private final Optional containerWrite; - - private final Optional containerDelete; - - private final Optional containerList; - - private final Map additionalProperties; - - private ClientAddonAzureBlob( - Optional accountName, - Optional storageAccessKey, - Optional containerName, - Optional blobName, - Optional expiration, - Optional signedIdentifier, - Optional blobRead, - Optional blobWrite, - Optional blobDelete, - Optional containerRead, - Optional containerWrite, - Optional containerDelete, - Optional containerList, - Map additionalProperties) { - this.accountName = accountName; - this.storageAccessKey = storageAccessKey; - this.containerName = containerName; - this.blobName = blobName; - this.expiration = expiration; - this.signedIdentifier = signedIdentifier; - this.blobRead = blobRead; - this.blobWrite = blobWrite; - this.blobDelete = blobDelete; - this.containerRead = containerRead; - this.containerWrite = containerWrite; - this.containerDelete = containerDelete; - this.containerList = containerList; - this.additionalProperties = additionalProperties; - } - - /** - * @return Your Azure storage account name. Usually first segment in your Azure storage URL. e.g. https://acme-org.blob.core.windows.net would be the account name acme-org. - */ - @JsonProperty("accountName") - public Optional getAccountName() { - return accountName; - } - - /** - * @return Access key associated with this storage account. - */ - @JsonProperty("storageAccessKey") - public Optional getStorageAccessKey() { - return storageAccessKey; - } - - /** - * @return Container to request a token for. e.g. my-container. - */ - @JsonProperty("containerName") - public Optional getContainerName() { - return containerName; - } - - /** - * @return Entity to request a token for. e.g. my-blob. If blank the computed SAS will apply to the entire storage container. - */ - @JsonProperty("blobName") - public Optional getBlobName() { - return blobName; - } - - /** - * @return Expiration in minutes for the generated token (default of 5 minutes). - */ - @JsonProperty("expiration") - public Optional getExpiration() { - return expiration; - } - - /** - * @return Shared access policy identifier defined in your storage account resource. - */ - @JsonProperty("signedIdentifier") - public Optional getSignedIdentifier() { - return signedIdentifier; - } - - /** - * @return Indicates if the issued token has permission to read the content, properties, metadata and block list. Use the blob as the source of a copy operation. - */ - @JsonProperty("blob_read") - public Optional getBlobRead() { - return blobRead; - } - - /** - * @return Indicates if the issued token has permission to create or write content, properties, metadata, or block list. Snapshot or lease the blob. Resize the blob (page blob only). Use the blob as the destination of a copy operation within the same account. - */ - @JsonProperty("blob_write") - public Optional getBlobWrite() { - return blobWrite; - } - - /** - * @return Indicates if the issued token has permission to delete the blob. - */ - @JsonProperty("blob_delete") - public Optional getBlobDelete() { - return blobDelete; - } - - /** - * @return Indicates if the issued token has permission to read the content, properties, metadata or block list of any blob in the container. Use any blob in the container as the source of a copy operation - */ - @JsonProperty("container_read") - public Optional getContainerRead() { - return containerRead; - } - - /** - * @return Indicates that for any blob in the container if the issued token has permission to create or write content, properties, metadata, or block list. Snapshot or lease the blob. Resize the blob (page blob only). Use the blob as the destination of a copy operation within the same account. - */ - @JsonProperty("container_write") - public Optional getContainerWrite() { - return containerWrite; - } - - /** - * @return Indicates if issued token has permission to delete any blob in the container. - */ - @JsonProperty("container_delete") - public Optional getContainerDelete() { - return containerDelete; - } - - /** - * @return Indicates if the issued token has permission to list blobs in the container. - */ - @JsonProperty("container_list") - public Optional getContainerList() { - return containerList; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonAzureBlob && equalTo((ClientAddonAzureBlob) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonAzureBlob other) { - return accountName.equals(other.accountName) - && storageAccessKey.equals(other.storageAccessKey) - && containerName.equals(other.containerName) - && blobName.equals(other.blobName) - && expiration.equals(other.expiration) - && signedIdentifier.equals(other.signedIdentifier) - && blobRead.equals(other.blobRead) - && blobWrite.equals(other.blobWrite) - && blobDelete.equals(other.blobDelete) - && containerRead.equals(other.containerRead) - && containerWrite.equals(other.containerWrite) - && containerDelete.equals(other.containerDelete) - && containerList.equals(other.containerList); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.accountName, - this.storageAccessKey, - this.containerName, - this.blobName, - this.expiration, - this.signedIdentifier, - this.blobRead, - this.blobWrite, - this.blobDelete, - this.containerRead, - this.containerWrite, - this.containerDelete, - this.containerList); - } - - @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 accountName = Optional.empty(); - - private Optional storageAccessKey = Optional.empty(); - - private Optional containerName = Optional.empty(); - - private Optional blobName = Optional.empty(); - - private Optional expiration = Optional.empty(); - - private Optional signedIdentifier = Optional.empty(); - - private Optional blobRead = Optional.empty(); - - private Optional blobWrite = Optional.empty(); - - private Optional blobDelete = Optional.empty(); - - private Optional containerRead = Optional.empty(); - - private Optional containerWrite = Optional.empty(); - - private Optional containerDelete = Optional.empty(); - - private Optional containerList = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonAzureBlob other) { - accountName(other.getAccountName()); - storageAccessKey(other.getStorageAccessKey()); - containerName(other.getContainerName()); - blobName(other.getBlobName()); - expiration(other.getExpiration()); - signedIdentifier(other.getSignedIdentifier()); - blobRead(other.getBlobRead()); - blobWrite(other.getBlobWrite()); - blobDelete(other.getBlobDelete()); - containerRead(other.getContainerRead()); - containerWrite(other.getContainerWrite()); - containerDelete(other.getContainerDelete()); - containerList(other.getContainerList()); - return this; - } - - /** - *

Your Azure storage account name. Usually first segment in your Azure storage URL. e.g. https://acme-org.blob.core.windows.net would be the account name acme-org.

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

Access key associated with this storage account.

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

Container to request a token for. e.g. my-container.

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

Entity to request a token for. e.g. my-blob. If blank the computed SAS will apply to the entire storage container.

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

Expiration in minutes for the generated token (default of 5 minutes).

- */ - @JsonSetter(value = "expiration", nulls = Nulls.SKIP) - public Builder expiration(Optional expiration) { - this.expiration = expiration; - return this; - } - - public Builder expiration(Integer expiration) { - this.expiration = Optional.ofNullable(expiration); - return this; - } - - /** - *

Shared access policy identifier defined in your storage account resource.

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

Indicates if the issued token has permission to read the content, properties, metadata and block list. Use the blob as the source of a copy operation.

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

Indicates if the issued token has permission to create or write content, properties, metadata, or block list. Snapshot or lease the blob. Resize the blob (page blob only). Use the blob as the destination of a copy operation within the same account.

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

Indicates if the issued token has permission to delete the blob.

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

Indicates if the issued token has permission to read the content, properties, metadata or block list of any blob in the container. Use any blob in the container as the source of a copy operation

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

Indicates that for any blob in the container if the issued token has permission to create or write content, properties, metadata, or block list. Snapshot or lease the blob. Resize the blob (page blob only). Use the blob as the destination of a copy operation within the same account.

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

Indicates if issued token has permission to delete any blob in the container.

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

Indicates if the issued token has permission to list blobs in the container.

- */ - @JsonSetter(value = "container_list", nulls = Nulls.SKIP) - public Builder containerList(Optional containerList) { - this.containerList = containerList; - return this; - } - - public Builder containerList(Boolean containerList) { - this.containerList = Optional.ofNullable(containerList); - return this; - } - - public ClientAddonAzureBlob build() { - return new ClientAddonAzureBlob( - accountName, - storageAccessKey, - containerName, - blobName, - expiration, - signedIdentifier, - blobRead, - blobWrite, - blobDelete, - containerRead, - containerWrite, - containerDelete, - containerList, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonAzureSb.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonAzureSb.java deleted file mode 100644 index c1cc286e7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonAzureSb.java +++ /dev/null @@ -1,223 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonAzureSb.Builder.class) -public final class ClientAddonAzureSb { - private final Optional namespace; - - private final Optional sasKeyName; - - private final Optional sasKey; - - private final Optional entityPath; - - private final Optional expiration; - - private final Map additionalProperties; - - private ClientAddonAzureSb( - Optional namespace, - Optional sasKeyName, - Optional sasKey, - Optional entityPath, - Optional expiration, - Map additionalProperties) { - this.namespace = namespace; - this.sasKeyName = sasKeyName; - this.sasKey = sasKey; - this.entityPath = entityPath; - this.expiration = expiration; - this.additionalProperties = additionalProperties; - } - - /** - * @return Your Azure Service Bus namespace. Usually the first segment of your Service Bus URL (e.g. https://acme-org.servicebus.windows.net would be acme-org). - */ - @JsonProperty("namespace") - public Optional getNamespace() { - return namespace; - } - - /** - * @return Your shared access policy name defined in your Service Bus entity. - */ - @JsonProperty("sasKeyName") - public Optional getSasKeyName() { - return sasKeyName; - } - - /** - * @return Primary Key associated with your shared access policy. - */ - @JsonProperty("sasKey") - public Optional getSasKey() { - return sasKey; - } - - /** - * @return Entity you want to request a token for. e.g. my-queue.' - */ - @JsonProperty("entityPath") - public Optional getEntityPath() { - return entityPath; - } - - /** - * @return Optional expiration in minutes for the generated token. Defaults to 5 minutes. - */ - @JsonProperty("expiration") - public Optional getExpiration() { - return expiration; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonAzureSb && equalTo((ClientAddonAzureSb) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonAzureSb other) { - return namespace.equals(other.namespace) - && sasKeyName.equals(other.sasKeyName) - && sasKey.equals(other.sasKey) - && entityPath.equals(other.entityPath) - && expiration.equals(other.expiration); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.namespace, this.sasKeyName, this.sasKey, this.entityPath, this.expiration); - } - - @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 namespace = Optional.empty(); - - private Optional sasKeyName = Optional.empty(); - - private Optional sasKey = Optional.empty(); - - private Optional entityPath = Optional.empty(); - - private Optional expiration = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonAzureSb other) { - namespace(other.getNamespace()); - sasKeyName(other.getSasKeyName()); - sasKey(other.getSasKey()); - entityPath(other.getEntityPath()); - expiration(other.getExpiration()); - return this; - } - - /** - *

Your Azure Service Bus namespace. Usually the first segment of your Service Bus URL (e.g. https://acme-org.servicebus.windows.net would be acme-org).

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

Your shared access policy name defined in your Service Bus entity.

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

Primary Key associated with your shared access policy.

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

Entity you want to request a token for. e.g. my-queue.'

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

Optional expiration in minutes for the generated token. Defaults to 5 minutes.

- */ - @JsonSetter(value = "expiration", nulls = Nulls.SKIP) - public Builder expiration(Optional expiration) { - this.expiration = expiration; - return this; - } - - public Builder expiration(Integer expiration) { - this.expiration = Optional.ofNullable(expiration); - return this; - } - - public ClientAddonAzureSb build() { - return new ClientAddonAzureSb(namespace, sasKeyName, sasKey, entityPath, expiration, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonEchoSign.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonEchoSign.java deleted file mode 100644 index d014bbe1d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonEchoSign.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonEchoSign.Builder.class) -public final class ClientAddonEchoSign { - private final Optional domain; - - private final Map additionalProperties; - - private ClientAddonEchoSign(Optional domain, Map additionalProperties) { - this.domain = domain; - this.additionalProperties = additionalProperties; - } - - /** - * @return Your custom domain found in your EchoSign URL. e.g. https://acme-org.echosign.com would be acme-org. - */ - @JsonProperty("domain") - public Optional getDomain() { - return domain; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonEchoSign && equalTo((ClientAddonEchoSign) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonEchoSign other) { - return domain.equals(other.domain); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.domain); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional domain = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonEchoSign other) { - domain(other.getDomain()); - return this; - } - - /** - *

Your custom domain found in your EchoSign URL. e.g. https://acme-org.echosign.com would be acme-org.

- */ - @JsonSetter(value = "domain", nulls = Nulls.SKIP) - public Builder domain(Optional domain) { - this.domain = domain; - return this; - } - - public Builder domain(String domain) { - this.domain = Optional.ofNullable(domain); - return this; - } - - public ClientAddonEchoSign build() { - return new ClientAddonEchoSign(domain, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonEgnyte.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonEgnyte.java deleted file mode 100644 index 9388bb1b4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonEgnyte.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonEgnyte.Builder.class) -public final class ClientAddonEgnyte { - private final Optional domain; - - private final Map additionalProperties; - - private ClientAddonEgnyte(Optional domain, Map additionalProperties) { - this.domain = domain; - this.additionalProperties = additionalProperties; - } - - /** - * @return Your custom domain found in your Egnyte URL. e.g. https://acme-org.egnyte.com would be acme-org. - */ - @JsonProperty("domain") - public Optional getDomain() { - return domain; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonEgnyte && equalTo((ClientAddonEgnyte) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonEgnyte other) { - return domain.equals(other.domain); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.domain); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional domain = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonEgnyte other) { - domain(other.getDomain()); - return this; - } - - /** - *

Your custom domain found in your Egnyte URL. e.g. https://acme-org.egnyte.com would be acme-org.

- */ - @JsonSetter(value = "domain", nulls = Nulls.SKIP) - public Builder domain(Optional domain) { - this.domain = domain; - return this; - } - - public Builder domain(String domain) { - this.domain = Optional.ofNullable(domain); - return this; - } - - public ClientAddonEgnyte build() { - return new ClientAddonEgnyte(domain, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonFirebase.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonFirebase.java deleted file mode 100644 index 12fa19d6b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonFirebase.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonFirebase.Builder.class) -public final class ClientAddonFirebase { - private final Optional secret; - - private final Optional privateKeyId; - - private final Optional privateKey; - - private final Optional clientEmail; - - private final Optional lifetimeInSeconds; - - private final Map additionalProperties; - - private ClientAddonFirebase( - Optional secret, - Optional privateKeyId, - Optional privateKey, - Optional clientEmail, - Optional lifetimeInSeconds, - Map additionalProperties) { - this.secret = secret; - this.privateKeyId = privateKeyId; - this.privateKey = privateKey; - this.clientEmail = clientEmail; - this.lifetimeInSeconds = lifetimeInSeconds; - this.additionalProperties = additionalProperties; - } - - /** - * @return Google Firebase Secret. (SDK 2 only). - */ - @JsonProperty("secret") - public Optional getSecret() { - return secret; - } - - /** - * @return Optional ID of the private key to obtain kid header in the issued token (SDK v3+ tokens only). - */ - @JsonProperty("private_key_id") - public Optional getPrivateKeyId() { - return privateKeyId; - } - - /** - * @return Private Key for signing the token (SDK v3+ tokens only). - */ - @JsonProperty("private_key") - public Optional getPrivateKey() { - return privateKey; - } - - /** - * @return ID of the Service Account you have created (shown as client_email in the generated JSON file, SDK v3+ tokens only). - */ - @JsonProperty("client_email") - public Optional getClientEmail() { - return clientEmail; - } - - /** - * @return Optional expiration in seconds for the generated token. Defaults to 3600 seconds (SDK v3+ tokens only). - */ - @JsonProperty("lifetime_in_seconds") - public Optional getLifetimeInSeconds() { - return lifetimeInSeconds; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonFirebase && equalTo((ClientAddonFirebase) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonFirebase other) { - return secret.equals(other.secret) - && privateKeyId.equals(other.privateKeyId) - && privateKey.equals(other.privateKey) - && clientEmail.equals(other.clientEmail) - && lifetimeInSeconds.equals(other.lifetimeInSeconds); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.secret, this.privateKeyId, this.privateKey, this.clientEmail, this.lifetimeInSeconds); - } - - @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 secret = Optional.empty(); - - private Optional privateKeyId = Optional.empty(); - - private Optional privateKey = Optional.empty(); - - private Optional clientEmail = Optional.empty(); - - private Optional lifetimeInSeconds = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonFirebase other) { - secret(other.getSecret()); - privateKeyId(other.getPrivateKeyId()); - privateKey(other.getPrivateKey()); - clientEmail(other.getClientEmail()); - lifetimeInSeconds(other.getLifetimeInSeconds()); - return this; - } - - /** - *

Google Firebase Secret. (SDK 2 only).

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

Optional ID of the private key to obtain kid header in the issued token (SDK v3+ tokens only).

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

Private Key for signing the token (SDK v3+ tokens only).

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

ID of the Service Account you have created (shown as client_email in the generated JSON file, SDK v3+ tokens only).

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

Optional expiration in seconds for the generated token. Defaults to 3600 seconds (SDK v3+ tokens only).

- */ - @JsonSetter(value = "lifetime_in_seconds", nulls = Nulls.SKIP) - public Builder lifetimeInSeconds(Optional lifetimeInSeconds) { - this.lifetimeInSeconds = lifetimeInSeconds; - return this; - } - - public Builder lifetimeInSeconds(Integer lifetimeInSeconds) { - this.lifetimeInSeconds = Optional.ofNullable(lifetimeInSeconds); - return this; - } - - public ClientAddonFirebase build() { - return new ClientAddonFirebase( - secret, privateKeyId, privateKey, clientEmail, lifetimeInSeconds, 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 deleted file mode 100644 index afd68b398..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonLayer.java +++ /dev/null @@ -1,273 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonLayer.Builder.class) -public final class ClientAddonLayer { - private final String providerId; - - private final String keyId; - - private final String privateKey; - - private final Optional principal; - - private final Optional expiration; - - private final Map additionalProperties; - - private ClientAddonLayer( - String providerId, - String keyId, - String privateKey, - Optional principal, - Optional expiration, - Map additionalProperties) { - this.providerId = providerId; - this.keyId = keyId; - this.privateKey = privateKey; - this.principal = principal; - this.expiration = expiration; - this.additionalProperties = additionalProperties; - } - - /** - * @return Provider ID of your Layer account - */ - @JsonProperty("providerId") - public String getProviderId() { - return providerId; - } - - /** - * @return Authentication Key identifier used to sign the Layer token. - */ - @JsonProperty("keyId") - public String getKeyId() { - return keyId; - } - - /** - * @return Private key for signing the Layer token. - */ - @JsonProperty("privateKey") - public String getPrivateKey() { - return privateKey; - } - - /** - * @return Name of the property used as the unique user id in Layer. If not specified user_id is used. - */ - @JsonProperty("principal") - public Optional getPrincipal() { - return principal; - } - - /** - * @return Optional expiration in minutes for the generated token. Defaults to 5 minutes. - */ - @JsonProperty("expiration") - public Optional getExpiration() { - return expiration; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonLayer && equalTo((ClientAddonLayer) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonLayer other) { - return providerId.equals(other.providerId) - && keyId.equals(other.keyId) - && privateKey.equals(other.privateKey) - && principal.equals(other.principal) - && expiration.equals(other.expiration); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.providerId, this.keyId, this.privateKey, this.principal, this.expiration); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ProviderIdStage builder() { - return new Builder(); - } - - public interface ProviderIdStage { - /** - *

Provider ID of your Layer account

- */ - KeyIdStage providerId(@NotNull String providerId); - - Builder from(ClientAddonLayer other); - } - - public interface KeyIdStage { - /** - *

Authentication Key identifier used to sign the Layer token.

- */ - PrivateKeyStage keyId(@NotNull String keyId); - } - - public interface PrivateKeyStage { - /** - *

Private key for signing the Layer token.

- */ - _FinalStage privateKey(@NotNull String privateKey); - } - - public interface _FinalStage { - ClientAddonLayer build(); - - /** - *

Name of the property used as the unique user id in Layer. If not specified user_id is used.

- */ - _FinalStage principal(Optional principal); - - _FinalStage principal(String principal); - - /** - *

Optional expiration in minutes for the generated token. Defaults to 5 minutes.

- */ - _FinalStage expiration(Optional expiration); - - _FinalStage expiration(Integer expiration); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ProviderIdStage, KeyIdStage, PrivateKeyStage, _FinalStage { - private String providerId; - - private String keyId; - - private String privateKey; - - private Optional expiration = Optional.empty(); - - private Optional principal = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ClientAddonLayer other) { - providerId(other.getProviderId()); - keyId(other.getKeyId()); - privateKey(other.getPrivateKey()); - principal(other.getPrincipal()); - expiration(other.getExpiration()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("providerId") - public KeyIdStage providerId(@NotNull String providerId) { - this.providerId = Objects.requireNonNull(providerId, "providerId must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("keyId") - public PrivateKeyStage keyId(@NotNull String keyId) { - this.keyId = Objects.requireNonNull(keyId, "keyId must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("privateKey") - public _FinalStage privateKey(@NotNull String privateKey) { - this.privateKey = Objects.requireNonNull(privateKey, "privateKey must not be null"); - return this; - } - - /** - *

Optional expiration in minutes for the generated token. Defaults to 5 minutes.

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

Optional expiration in minutes for the generated token. Defaults to 5 minutes.

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

Name of the property used as the unique user id in Layer. If not specified user_id is used.

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

Name of the property used as the unique user id in Layer. If not specified user_id is used.

- */ - @java.lang.Override - @JsonSetter(value = "principal", nulls = Nulls.SKIP) - public _FinalStage principal(Optional principal) { - this.principal = principal; - return this; - } - - @java.lang.Override - public ClientAddonLayer build() { - return new ClientAddonLayer(providerId, keyId, privateKey, principal, expiration, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonMscrm.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonMscrm.java deleted file mode 100644 index b611cd19e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonMscrm.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = ClientAddonMscrm.Builder.class) -public final class ClientAddonMscrm { - private final String url; - - private final Map additionalProperties; - - private ClientAddonMscrm(String url, Map additionalProperties) { - this.url = url; - this.additionalProperties = additionalProperties; - } - - /** - * @return Microsoft Dynamics CRM application URL. - */ - @JsonProperty("url") - public String getUrl() { - return url; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonMscrm && equalTo((ClientAddonMscrm) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonMscrm other) { - return url.equals(other.url); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.url); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static UrlStage builder() { - return new Builder(); - } - - public interface UrlStage { - /** - *

Microsoft Dynamics CRM application URL.

- */ - _FinalStage url(@NotNull String url); - - Builder from(ClientAddonMscrm other); - } - - public interface _FinalStage { - ClientAddonMscrm build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements UrlStage, _FinalStage { - private String url; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ClientAddonMscrm other) { - url(other.getUrl()); - return this; - } - - /** - *

Microsoft Dynamics CRM application URL.

- *

Microsoft Dynamics CRM application URL.

- * @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; - } - - @java.lang.Override - public ClientAddonMscrm build() { - return new ClientAddonMscrm(url, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonNewRelic.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonNewRelic.java deleted file mode 100644 index 0d939500d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonNewRelic.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonNewRelic.Builder.class) -public final class ClientAddonNewRelic { - private final Optional account; - - private final Map additionalProperties; - - private ClientAddonNewRelic(Optional account, Map additionalProperties) { - this.account = account; - this.additionalProperties = additionalProperties; - } - - /** - * @return Your New Relic Account ID found in your New Relic URL after the /accounts/ path. e.g. https://rpm.newrelic.com/accounts/123456/query would be 123456. - */ - @JsonProperty("account") - public Optional getAccount() { - return account; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonNewRelic && equalTo((ClientAddonNewRelic) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonNewRelic other) { - return account.equals(other.account); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.account); - } - - @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 account = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonNewRelic other) { - account(other.getAccount()); - return this; - } - - /** - *

Your New Relic Account ID found in your New Relic URL after the /accounts/ path. e.g. https://rpm.newrelic.com/accounts/123456/query would be 123456.

- */ - @JsonSetter(value = "account", nulls = Nulls.SKIP) - public Builder account(Optional account) { - this.account = account; - return this; - } - - public Builder account(String account) { - this.account = Optional.ofNullable(account); - return this; - } - - public ClientAddonNewRelic build() { - return new ClientAddonNewRelic(account, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonOag.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonOag.java deleted file mode 100644 index 5e4fdd6e2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonOag.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.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 = ClientAddonOag.Builder.class) -public final class ClientAddonOag { - private final Map additionalProperties; - - private ClientAddonOag(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonOag; - } - - @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(ClientAddonOag other) { - return this; - } - - public ClientAddonOag build() { - return new ClientAddonOag(additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonOffice365.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonOffice365.java deleted file mode 100644 index e88081415..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonOffice365.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonOffice365.Builder.class) -public final class ClientAddonOffice365 { - private final Optional domain; - - private final Optional connection; - - private final Map additionalProperties; - - private ClientAddonOffice365( - Optional domain, Optional connection, Map additionalProperties) { - this.domain = domain; - this.connection = connection; - this.additionalProperties = additionalProperties; - } - - /** - * @return Your Office 365 domain name. e.g. acme-org.com. - */ - @JsonProperty("domain") - public Optional getDomain() { - return domain; - } - - /** - * @return Optional Auth0 database connection for testing an already-configured Office 365 tenant. - */ - @JsonProperty("connection") - public Optional getConnection() { - return connection; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonOffice365 && equalTo((ClientAddonOffice365) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonOffice365 other) { - return domain.equals(other.domain) && connection.equals(other.connection); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.domain, this.connection); - } - - @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 domain = Optional.empty(); - - private Optional connection = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonOffice365 other) { - domain(other.getDomain()); - connection(other.getConnection()); - return this; - } - - /** - *

Your Office 365 domain name. e.g. acme-org.com.

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

Optional Auth0 database connection for testing an already-configured Office 365 tenant.

- */ - @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; - } - - public ClientAddonOffice365 build() { - return new ClientAddonOffice365(domain, connection, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonRms.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonRms.java deleted file mode 100644 index 64ed5c72a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonRms.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = ClientAddonRms.Builder.class) -public final class ClientAddonRms { - private final String url; - - private final Map additionalProperties; - - private ClientAddonRms(String url, Map additionalProperties) { - this.url = url; - this.additionalProperties = additionalProperties; - } - - /** - * @return URL of your Rights Management Server. It can be internal or external, but users will have to be able to reach it. - */ - @JsonProperty("url") - public String getUrl() { - return url; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonRms && equalTo((ClientAddonRms) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonRms other) { - return url.equals(other.url); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.url); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static UrlStage builder() { - return new Builder(); - } - - public interface UrlStage { - /** - *

URL of your Rights Management Server. It can be internal or external, but users will have to be able to reach it.

- */ - _FinalStage url(@NotNull String url); - - Builder from(ClientAddonRms other); - } - - public interface _FinalStage { - ClientAddonRms build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements UrlStage, _FinalStage { - private String url; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ClientAddonRms other) { - url(other.getUrl()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("url") - public _FinalStage url(@NotNull String url) { - this.url = Objects.requireNonNull(url, "url must not be null"); - return this; - } - - @java.lang.Override - public ClientAddonRms build() { - return new ClientAddonRms(url, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSalesforce.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonSalesforce.java deleted file mode 100644 index 466a4b580..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSalesforce.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonSalesforce.Builder.class) -public final class ClientAddonSalesforce { - private final Optional entityId; - - private final Map additionalProperties; - - private ClientAddonSalesforce(Optional entityId, Map additionalProperties) { - this.entityId = entityId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Arbitrary logical URL that identifies the Saleforce resource. e.g. https://acme-org.com. - */ - @JsonProperty("entity_id") - public Optional getEntityId() { - return entityId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonSalesforce && equalTo((ClientAddonSalesforce) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonSalesforce other) { - return entityId.equals(other.entityId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.entityId); - } - - @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 entityId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonSalesforce other) { - entityId(other.getEntityId()); - return this; - } - - /** - *

Arbitrary logical URL that identifies the Saleforce resource. e.g. https://acme-org.com.

- */ - @JsonSetter(value = "entity_id", 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; - } - - public ClientAddonSalesforce build() { - return new ClientAddonSalesforce(entityId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSalesforceApi.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonSalesforceApi.java deleted file mode 100644 index ad2557fff..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSalesforceApi.java +++ /dev/null @@ -1,194 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonSalesforceApi.Builder.class) -public final class ClientAddonSalesforceApi { - private final Optional clientid; - - private final Optional principal; - - private final Optional communityName; - - private final Optional communityUrlSection; - - private final Map additionalProperties; - - private ClientAddonSalesforceApi( - Optional clientid, - Optional principal, - Optional communityName, - Optional communityUrlSection, - Map additionalProperties) { - this.clientid = clientid; - this.principal = principal; - this.communityName = communityName; - this.communityUrlSection = communityUrlSection; - this.additionalProperties = additionalProperties; - } - - /** - * @return Consumer Key assigned by Salesforce to the Connected App. - */ - @JsonProperty("clientid") - public Optional getClientid() { - return clientid; - } - - /** - * @return Name of the property in the user object that maps to a Salesforce username. e.g. email. - */ - @JsonProperty("principal") - public Optional getPrincipal() { - return principal; - } - - /** - * @return Community name. - */ - @JsonProperty("communityName") - public Optional getCommunityName() { - return communityName; - } - - /** - * @return Community url section. - */ - @JsonProperty("community_url_section") - public Optional getCommunityUrlSection() { - return communityUrlSection; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonSalesforceApi && equalTo((ClientAddonSalesforceApi) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonSalesforceApi other) { - return clientid.equals(other.clientid) - && principal.equals(other.principal) - && communityName.equals(other.communityName) - && communityUrlSection.equals(other.communityUrlSection); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.clientid, this.principal, this.communityName, this.communityUrlSection); - } - - @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 principal = Optional.empty(); - - private Optional communityName = Optional.empty(); - - private Optional communityUrlSection = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonSalesforceApi other) { - clientid(other.getClientid()); - principal(other.getPrincipal()); - communityName(other.getCommunityName()); - communityUrlSection(other.getCommunityUrlSection()); - return this; - } - - /** - *

Consumer Key assigned by Salesforce to the Connected App.

- */ - @JsonSetter(value = "clientid", 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; - } - - /** - *

Name of the property in the user object that maps to a Salesforce username. e.g. email.

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

Community name.

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

Community url section.

- */ - @JsonSetter(value = "community_url_section", nulls = Nulls.SKIP) - public Builder communityUrlSection(Optional communityUrlSection) { - this.communityUrlSection = communityUrlSection; - return this; - } - - public Builder communityUrlSection(String communityUrlSection) { - this.communityUrlSection = Optional.ofNullable(communityUrlSection); - return this; - } - - public ClientAddonSalesforceApi build() { - return new ClientAddonSalesforceApi( - clientid, principal, communityName, communityUrlSection, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSalesforceSandboxApi.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonSalesforceSandboxApi.java deleted file mode 100644 index 1f331b506..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSalesforceSandboxApi.java +++ /dev/null @@ -1,194 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonSalesforceSandboxApi.Builder.class) -public final class ClientAddonSalesforceSandboxApi { - private final Optional clientid; - - private final Optional principal; - - private final Optional communityName; - - private final Optional communityUrlSection; - - private final Map additionalProperties; - - private ClientAddonSalesforceSandboxApi( - Optional clientid, - Optional principal, - Optional communityName, - Optional communityUrlSection, - Map additionalProperties) { - this.clientid = clientid; - this.principal = principal; - this.communityName = communityName; - this.communityUrlSection = communityUrlSection; - this.additionalProperties = additionalProperties; - } - - /** - * @return Consumer Key assigned by Salesforce to the Connected App. - */ - @JsonProperty("clientid") - public Optional getClientid() { - return clientid; - } - - /** - * @return Name of the property in the user object that maps to a Salesforce username. e.g. email. - */ - @JsonProperty("principal") - public Optional getPrincipal() { - return principal; - } - - /** - * @return Community name. - */ - @JsonProperty("communityName") - public Optional getCommunityName() { - return communityName; - } - - /** - * @return Community url section. - */ - @JsonProperty("community_url_section") - public Optional getCommunityUrlSection() { - return communityUrlSection; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonSalesforceSandboxApi && equalTo((ClientAddonSalesforceSandboxApi) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonSalesforceSandboxApi other) { - return clientid.equals(other.clientid) - && principal.equals(other.principal) - && communityName.equals(other.communityName) - && communityUrlSection.equals(other.communityUrlSection); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.clientid, this.principal, this.communityName, this.communityUrlSection); - } - - @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 principal = Optional.empty(); - - private Optional communityName = Optional.empty(); - - private Optional communityUrlSection = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonSalesforceSandboxApi other) { - clientid(other.getClientid()); - principal(other.getPrincipal()); - communityName(other.getCommunityName()); - communityUrlSection(other.getCommunityUrlSection()); - return this; - } - - /** - *

Consumer Key assigned by Salesforce to the Connected App.

- */ - @JsonSetter(value = "clientid", 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; - } - - /** - *

Name of the property in the user object that maps to a Salesforce username. e.g. email.

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

Community name.

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

Community url section.

- */ - @JsonSetter(value = "community_url_section", nulls = Nulls.SKIP) - public Builder communityUrlSection(Optional communityUrlSection) { - this.communityUrlSection = communityUrlSection; - return this; - } - - public Builder communityUrlSection(String communityUrlSection) { - this.communityUrlSection = Optional.ofNullable(communityUrlSection); - return this; - } - - public ClientAddonSalesforceSandboxApi build() { - return new ClientAddonSalesforceSandboxApi( - clientid, principal, communityName, communityUrlSection, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSaml.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonSaml.java deleted file mode 100644 index 819d7512f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSaml.java +++ /dev/null @@ -1,491 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonSaml.Builder.class) -public final class ClientAddonSaml { - private final Optional> mappings; - - private final Optional audience; - - private final Optional recipient; - - private final Optional createUpnClaim; - - private final Optional mapUnknownClaimsAsIs; - - private final Optional passthroughClaimsWithNoMapping; - - private final Optional mapIdentities; - - private final Optional signatureAlgorithm; - - private final Optional digestAlgorithm; - - private final Optional issuer; - - private final Optional destination; - - private final Optional lifetimeInSeconds; - - private final Optional signResponse; - - private final Optional nameIdentifierFormat; - - private final Optional> nameIdentifierProbes; - - private final Optional authnContextClassRef; - - private final Map additionalProperties; - - private ClientAddonSaml( - Optional> mappings, - Optional audience, - Optional recipient, - Optional createUpnClaim, - Optional mapUnknownClaimsAsIs, - Optional passthroughClaimsWithNoMapping, - Optional mapIdentities, - Optional signatureAlgorithm, - Optional digestAlgorithm, - Optional issuer, - Optional destination, - Optional lifetimeInSeconds, - Optional signResponse, - Optional nameIdentifierFormat, - Optional> nameIdentifierProbes, - Optional authnContextClassRef, - Map additionalProperties) { - this.mappings = mappings; - this.audience = audience; - this.recipient = recipient; - this.createUpnClaim = createUpnClaim; - this.mapUnknownClaimsAsIs = mapUnknownClaimsAsIs; - this.passthroughClaimsWithNoMapping = passthroughClaimsWithNoMapping; - this.mapIdentities = mapIdentities; - this.signatureAlgorithm = signatureAlgorithm; - this.digestAlgorithm = digestAlgorithm; - this.issuer = issuer; - this.destination = destination; - this.lifetimeInSeconds = lifetimeInSeconds; - this.signResponse = signResponse; - this.nameIdentifierFormat = nameIdentifierFormat; - this.nameIdentifierProbes = nameIdentifierProbes; - this.authnContextClassRef = authnContextClassRef; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("mappings") - public Optional> getMappings() { - return mappings; - } - - @JsonProperty("audience") - public Optional getAudience() { - return audience; - } - - @JsonProperty("recipient") - public Optional getRecipient() { - return recipient; - } - - @JsonProperty("createUpnClaim") - public Optional getCreateUpnClaim() { - return createUpnClaim; - } - - @JsonProperty("mapUnknownClaimsAsIs") - public Optional getMapUnknownClaimsAsIs() { - return mapUnknownClaimsAsIs; - } - - @JsonProperty("passthroughClaimsWithNoMapping") - public Optional getPassthroughClaimsWithNoMapping() { - return passthroughClaimsWithNoMapping; - } - - @JsonProperty("mapIdentities") - public Optional getMapIdentities() { - return mapIdentities; - } - - @JsonProperty("signatureAlgorithm") - public Optional getSignatureAlgorithm() { - return signatureAlgorithm; - } - - @JsonProperty("digestAlgorithm") - public Optional getDigestAlgorithm() { - return digestAlgorithm; - } - - @JsonProperty("issuer") - public Optional getIssuer() { - return issuer; - } - - @JsonProperty("destination") - public Optional getDestination() { - return destination; - } - - @JsonProperty("lifetimeInSeconds") - public Optional getLifetimeInSeconds() { - return lifetimeInSeconds; - } - - @JsonProperty("signResponse") - public Optional getSignResponse() { - return signResponse; - } - - @JsonProperty("nameIdentifierFormat") - public Optional getNameIdentifierFormat() { - return nameIdentifierFormat; - } - - @JsonProperty("nameIdentifierProbes") - public Optional> getNameIdentifierProbes() { - return nameIdentifierProbes; - } - - @JsonProperty("authnContextClassRef") - public Optional getAuthnContextClassRef() { - return authnContextClassRef; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonSaml && equalTo((ClientAddonSaml) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonSaml other) { - return mappings.equals(other.mappings) - && audience.equals(other.audience) - && recipient.equals(other.recipient) - && createUpnClaim.equals(other.createUpnClaim) - && mapUnknownClaimsAsIs.equals(other.mapUnknownClaimsAsIs) - && passthroughClaimsWithNoMapping.equals(other.passthroughClaimsWithNoMapping) - && mapIdentities.equals(other.mapIdentities) - && signatureAlgorithm.equals(other.signatureAlgorithm) - && digestAlgorithm.equals(other.digestAlgorithm) - && issuer.equals(other.issuer) - && destination.equals(other.destination) - && lifetimeInSeconds.equals(other.lifetimeInSeconds) - && signResponse.equals(other.signResponse) - && nameIdentifierFormat.equals(other.nameIdentifierFormat) - && nameIdentifierProbes.equals(other.nameIdentifierProbes) - && authnContextClassRef.equals(other.authnContextClassRef); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.mappings, - this.audience, - this.recipient, - this.createUpnClaim, - this.mapUnknownClaimsAsIs, - this.passthroughClaimsWithNoMapping, - this.mapIdentities, - this.signatureAlgorithm, - this.digestAlgorithm, - this.issuer, - this.destination, - this.lifetimeInSeconds, - this.signResponse, - this.nameIdentifierFormat, - this.nameIdentifierProbes, - this.authnContextClassRef); - } - - @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> mappings = Optional.empty(); - - private Optional audience = Optional.empty(); - - private Optional recipient = Optional.empty(); - - private Optional createUpnClaim = Optional.empty(); - - private Optional mapUnknownClaimsAsIs = Optional.empty(); - - private Optional passthroughClaimsWithNoMapping = Optional.empty(); - - private Optional mapIdentities = Optional.empty(); - - private Optional signatureAlgorithm = Optional.empty(); - - private Optional digestAlgorithm = Optional.empty(); - - private Optional issuer = Optional.empty(); - - private Optional destination = Optional.empty(); - - private Optional lifetimeInSeconds = Optional.empty(); - - private Optional signResponse = Optional.empty(); - - private Optional nameIdentifierFormat = Optional.empty(); - - private Optional> nameIdentifierProbes = Optional.empty(); - - private Optional authnContextClassRef = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonSaml other) { - mappings(other.getMappings()); - audience(other.getAudience()); - recipient(other.getRecipient()); - createUpnClaim(other.getCreateUpnClaim()); - mapUnknownClaimsAsIs(other.getMapUnknownClaimsAsIs()); - passthroughClaimsWithNoMapping(other.getPassthroughClaimsWithNoMapping()); - mapIdentities(other.getMapIdentities()); - signatureAlgorithm(other.getSignatureAlgorithm()); - digestAlgorithm(other.getDigestAlgorithm()); - issuer(other.getIssuer()); - destination(other.getDestination()); - lifetimeInSeconds(other.getLifetimeInSeconds()); - signResponse(other.getSignResponse()); - nameIdentifierFormat(other.getNameIdentifierFormat()); - nameIdentifierProbes(other.getNameIdentifierProbes()); - authnContextClassRef(other.getAuthnContextClassRef()); - return this; - } - - @JsonSetter(value = "mappings", nulls = Nulls.SKIP) - public Builder mappings(Optional> mappings) { - this.mappings = mappings; - return this; - } - - public Builder mappings(Map mappings) { - this.mappings = Optional.ofNullable(mappings); - return this; - } - - @JsonSetter(value = "audience", nulls = Nulls.SKIP) - public Builder audience(Optional audience) { - this.audience = audience; - return this; - } - - public Builder audience(String audience) { - this.audience = Optional.ofNullable(audience); - return this; - } - - @JsonSetter(value = "recipient", nulls = Nulls.SKIP) - public Builder recipient(Optional recipient) { - this.recipient = recipient; - return this; - } - - public Builder recipient(String recipient) { - this.recipient = Optional.ofNullable(recipient); - return this; - } - - @JsonSetter(value = "createUpnClaim", nulls = Nulls.SKIP) - public Builder createUpnClaim(Optional createUpnClaim) { - this.createUpnClaim = createUpnClaim; - return this; - } - - public Builder createUpnClaim(Boolean createUpnClaim) { - this.createUpnClaim = Optional.ofNullable(createUpnClaim); - return this; - } - - @JsonSetter(value = "mapUnknownClaimsAsIs", nulls = Nulls.SKIP) - public Builder mapUnknownClaimsAsIs(Optional mapUnknownClaimsAsIs) { - this.mapUnknownClaimsAsIs = mapUnknownClaimsAsIs; - return this; - } - - public Builder mapUnknownClaimsAsIs(Boolean mapUnknownClaimsAsIs) { - this.mapUnknownClaimsAsIs = Optional.ofNullable(mapUnknownClaimsAsIs); - return this; - } - - @JsonSetter(value = "passthroughClaimsWithNoMapping", nulls = Nulls.SKIP) - public Builder passthroughClaimsWithNoMapping(Optional passthroughClaimsWithNoMapping) { - this.passthroughClaimsWithNoMapping = passthroughClaimsWithNoMapping; - return this; - } - - public Builder passthroughClaimsWithNoMapping(Boolean passthroughClaimsWithNoMapping) { - this.passthroughClaimsWithNoMapping = Optional.ofNullable(passthroughClaimsWithNoMapping); - return this; - } - - @JsonSetter(value = "mapIdentities", nulls = Nulls.SKIP) - public Builder mapIdentities(Optional mapIdentities) { - this.mapIdentities = mapIdentities; - return this; - } - - public Builder mapIdentities(Boolean mapIdentities) { - this.mapIdentities = Optional.ofNullable(mapIdentities); - return this; - } - - @JsonSetter(value = "signatureAlgorithm", nulls = Nulls.SKIP) - public Builder signatureAlgorithm(Optional signatureAlgorithm) { - this.signatureAlgorithm = signatureAlgorithm; - return this; - } - - public Builder signatureAlgorithm(String signatureAlgorithm) { - this.signatureAlgorithm = Optional.ofNullable(signatureAlgorithm); - return this; - } - - @JsonSetter(value = "digestAlgorithm", nulls = Nulls.SKIP) - public Builder digestAlgorithm(Optional digestAlgorithm) { - this.digestAlgorithm = digestAlgorithm; - return this; - } - - public Builder digestAlgorithm(String digestAlgorithm) { - this.digestAlgorithm = Optional.ofNullable(digestAlgorithm); - return this; - } - - @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; - } - - @JsonSetter(value = "destination", nulls = Nulls.SKIP) - public Builder destination(Optional destination) { - this.destination = destination; - return this; - } - - public Builder destination(String destination) { - this.destination = Optional.ofNullable(destination); - return this; - } - - @JsonSetter(value = "lifetimeInSeconds", nulls = Nulls.SKIP) - public Builder lifetimeInSeconds(Optional lifetimeInSeconds) { - this.lifetimeInSeconds = lifetimeInSeconds; - return this; - } - - public Builder lifetimeInSeconds(Integer lifetimeInSeconds) { - this.lifetimeInSeconds = Optional.ofNullable(lifetimeInSeconds); - return this; - } - - @JsonSetter(value = "signResponse", nulls = Nulls.SKIP) - public Builder signResponse(Optional signResponse) { - this.signResponse = signResponse; - return this; - } - - public Builder signResponse(Boolean signResponse) { - this.signResponse = Optional.ofNullable(signResponse); - return this; - } - - @JsonSetter(value = "nameIdentifierFormat", nulls = Nulls.SKIP) - public Builder nameIdentifierFormat(Optional nameIdentifierFormat) { - this.nameIdentifierFormat = nameIdentifierFormat; - return this; - } - - public Builder nameIdentifierFormat(String nameIdentifierFormat) { - this.nameIdentifierFormat = Optional.ofNullable(nameIdentifierFormat); - return this; - } - - @JsonSetter(value = "nameIdentifierProbes", nulls = Nulls.SKIP) - public Builder nameIdentifierProbes(Optional> nameIdentifierProbes) { - this.nameIdentifierProbes = nameIdentifierProbes; - return this; - } - - public Builder nameIdentifierProbes(List nameIdentifierProbes) { - this.nameIdentifierProbes = Optional.ofNullable(nameIdentifierProbes); - return this; - } - - @JsonSetter(value = "authnContextClassRef", nulls = Nulls.SKIP) - public Builder authnContextClassRef(Optional authnContextClassRef) { - this.authnContextClassRef = authnContextClassRef; - return this; - } - - public Builder authnContextClassRef(String authnContextClassRef) { - this.authnContextClassRef = Optional.ofNullable(authnContextClassRef); - return this; - } - - public ClientAddonSaml build() { - return new ClientAddonSaml( - mappings, - audience, - recipient, - createUpnClaim, - mapUnknownClaimsAsIs, - passthroughClaimsWithNoMapping, - mapIdentities, - signatureAlgorithm, - digestAlgorithm, - issuer, - destination, - lifetimeInSeconds, - signResponse, - nameIdentifierFormat, - nameIdentifierProbes, - authnContextClassRef, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSapapi.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonSapapi.java deleted file mode 100644 index 22970031e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSapapi.java +++ /dev/null @@ -1,266 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonSapapi.Builder.class) -public final class ClientAddonSapapi { - private final Optional clientid; - - private final Optional usernameAttribute; - - private final Optional tokenEndpointUrl; - - private final Optional scope; - - private final Optional servicePassword; - - private final Optional nameIdentifierFormat; - - private final Map additionalProperties; - - private ClientAddonSapapi( - Optional clientid, - Optional usernameAttribute, - Optional tokenEndpointUrl, - Optional scope, - Optional servicePassword, - Optional nameIdentifierFormat, - Map additionalProperties) { - this.clientid = clientid; - this.usernameAttribute = usernameAttribute; - this.tokenEndpointUrl = tokenEndpointUrl; - this.scope = scope; - this.servicePassword = servicePassword; - this.nameIdentifierFormat = nameIdentifierFormat; - this.additionalProperties = additionalProperties; - } - - /** - * @return If activated in the OAuth 2.0 client configuration (transaction SOAUTH2) the SAML attribute client_id must be set and equal the client_id form parameter of the access token request. - */ - @JsonProperty("clientid") - public Optional getClientid() { - return clientid; - } - - /** - * @return Name of the property in the user object that maps to a SAP username. e.g. email. - */ - @JsonProperty("usernameAttribute") - public Optional getUsernameAttribute() { - return usernameAttribute; - } - - /** - * @return Your SAP OData server OAuth2 token endpoint URL. - */ - @JsonProperty("tokenEndpointUrl") - public Optional getTokenEndpointUrl() { - return tokenEndpointUrl; - } - - /** - * @return Requested scope for SAP APIs. - */ - @JsonProperty("scope") - public Optional getScope() { - return scope; - } - - /** - * @return Service account password to use to authenticate API calls to the token endpoint. - */ - @JsonProperty("servicePassword") - public Optional getServicePassword() { - return servicePassword; - } - - /** - * @return NameID element of the Subject which can be used to express the user's identity. Defaults to urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified. - */ - @JsonProperty("nameIdentifierFormat") - public Optional getNameIdentifierFormat() { - return nameIdentifierFormat; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonSapapi && equalTo((ClientAddonSapapi) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonSapapi other) { - return clientid.equals(other.clientid) - && usernameAttribute.equals(other.usernameAttribute) - && tokenEndpointUrl.equals(other.tokenEndpointUrl) - && scope.equals(other.scope) - && servicePassword.equals(other.servicePassword) - && nameIdentifierFormat.equals(other.nameIdentifierFormat); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientid, - this.usernameAttribute, - this.tokenEndpointUrl, - this.scope, - this.servicePassword, - this.nameIdentifierFormat); - } - - @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 usernameAttribute = Optional.empty(); - - private Optional tokenEndpointUrl = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional servicePassword = Optional.empty(); - - private Optional nameIdentifierFormat = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonSapapi other) { - clientid(other.getClientid()); - usernameAttribute(other.getUsernameAttribute()); - tokenEndpointUrl(other.getTokenEndpointUrl()); - scope(other.getScope()); - servicePassword(other.getServicePassword()); - nameIdentifierFormat(other.getNameIdentifierFormat()); - return this; - } - - /** - *

If activated in the OAuth 2.0 client configuration (transaction SOAUTH2) the SAML attribute client_id must be set and equal the client_id form parameter of the access token request.

- */ - @JsonSetter(value = "clientid", 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; - } - - /** - *

Name of the property in the user object that maps to a SAP username. e.g. email.

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

Your SAP OData server OAuth2 token endpoint URL.

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

Requested scope for SAP APIs.

- */ - @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; - } - - /** - *

Service account password to use to authenticate API calls to the token endpoint.

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

NameID element of the Subject which can be used to express the user's identity. Defaults to urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified.

- */ - @JsonSetter(value = "nameIdentifierFormat", nulls = Nulls.SKIP) - public Builder nameIdentifierFormat(Optional nameIdentifierFormat) { - this.nameIdentifierFormat = nameIdentifierFormat; - return this; - } - - public Builder nameIdentifierFormat(String nameIdentifierFormat) { - this.nameIdentifierFormat = Optional.ofNullable(nameIdentifierFormat); - return this; - } - - public ClientAddonSapapi build() { - return new ClientAddonSapapi( - clientid, - usernameAttribute, - tokenEndpointUrl, - scope, - servicePassword, - nameIdentifierFormat, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSentry.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonSentry.java deleted file mode 100644 index 074a04fe4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSentry.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonSentry.Builder.class) -public final class ClientAddonSentry { - private final Optional orgSlug; - - private final Optional baseUrl; - - private final Map additionalProperties; - - private ClientAddonSentry( - Optional orgSlug, Optional baseUrl, Map additionalProperties) { - this.orgSlug = orgSlug; - this.baseUrl = baseUrl; - this.additionalProperties = additionalProperties; - } - - /** - * @return Generated slug for your Sentry organization. Found in your Sentry URL. e.g. https://sentry.acme.com/acme-org/ would be acme-org. - */ - @JsonProperty("org_slug") - public Optional getOrgSlug() { - return orgSlug; - } - - /** - * @return URL prefix only if running Sentry Community Edition, otherwise leave should be blank. - */ - @JsonProperty("base_url") - public Optional getBaseUrl() { - return baseUrl; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonSentry && equalTo((ClientAddonSentry) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonSentry other) { - return orgSlug.equals(other.orgSlug) && baseUrl.equals(other.baseUrl); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.orgSlug, this.baseUrl); - } - - @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 orgSlug = Optional.empty(); - - private Optional baseUrl = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonSentry other) { - orgSlug(other.getOrgSlug()); - baseUrl(other.getBaseUrl()); - return this; - } - - /** - *

Generated slug for your Sentry organization. Found in your Sentry URL. e.g. https://sentry.acme.com/acme-org/ would be acme-org.

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

URL prefix only if running Sentry Community Edition, otherwise leave should be blank.

- */ - @JsonSetter(value = "base_url", nulls = Nulls.SKIP) - public Builder baseUrl(Optional baseUrl) { - this.baseUrl = baseUrl; - return this; - } - - public Builder baseUrl(String baseUrl) { - this.baseUrl = Optional.ofNullable(baseUrl); - return this; - } - - public ClientAddonSentry build() { - return new ClientAddonSentry(orgSlug, baseUrl, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSharePoint.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonSharePoint.java deleted file mode 100644 index 721234415..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSharePoint.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonSharePoint.Builder.class) -public final class ClientAddonSharePoint { - private final Optional url; - - private final Optional externalUrl; - - private final Map additionalProperties; - - private ClientAddonSharePoint( - Optional url, - Optional externalUrl, - Map additionalProperties) { - this.url = url; - this.externalUrl = externalUrl; - this.additionalProperties = additionalProperties; - } - - /** - * @return Internal SharePoint application URL. - */ - @JsonProperty("url") - public Optional getUrl() { - return url; - } - - @JsonProperty("external_url") - public Optional getExternalUrl() { - return externalUrl; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonSharePoint && equalTo((ClientAddonSharePoint) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonSharePoint other) { - return url.equals(other.url) && externalUrl.equals(other.externalUrl); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.url, this.externalUrl); - } - - @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 url = Optional.empty(); - - private Optional externalUrl = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonSharePoint other) { - url(other.getUrl()); - externalUrl(other.getExternalUrl()); - return this; - } - - /** - *

Internal SharePoint application URL.

- */ - @JsonSetter(value = "url", nulls = Nulls.SKIP) - public Builder url(Optional url) { - this.url = url; - return this; - } - - public Builder url(String url) { - this.url = Optional.ofNullable(url); - return this; - } - - @JsonSetter(value = "external_url", nulls = Nulls.SKIP) - public Builder externalUrl(Optional externalUrl) { - this.externalUrl = externalUrl; - return this; - } - - public Builder externalUrl(ClientAddonSharePointExternalUrl externalUrl) { - this.externalUrl = Optional.ofNullable(externalUrl); - return this; - } - - public ClientAddonSharePoint build() { - return new ClientAddonSharePoint(url, externalUrl, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSharePointExternalUrl.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonSharePointExternalUrl.java deleted file mode 100644 index 10ef211d9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSharePointExternalUrl.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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.Objects; - -@JsonDeserialize(using = ClientAddonSharePointExternalUrl.Deserializer.class) -public final class ClientAddonSharePointExternalUrl { - private final Object value; - - private final int type; - - private ClientAddonSharePointExternalUrl(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((String) 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 ClientAddonSharePointExternalUrl && equalTo((ClientAddonSharePointExternalUrl) other); - } - - private boolean equalTo(ClientAddonSharePointExternalUrl 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 ClientAddonSharePointExternalUrl of(List value) { - return new ClientAddonSharePointExternalUrl(value, 0); - } - - public static ClientAddonSharePointExternalUrl of(String value) { - return new ClientAddonSharePointExternalUrl(value, 1); - } - - public interface Visitor { - T visit(List value); - - T visit(String value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(ClientAddonSharePointExternalUrl.class); - } - - @java.lang.Override - public ClientAddonSharePointExternalUrl 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) { - } - 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/ClientAddonSlack.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonSlack.java deleted file mode 100644 index 281cdedb7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSlack.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = ClientAddonSlack.Builder.class) -public final class ClientAddonSlack { - private final String team; - - private final Map additionalProperties; - - private ClientAddonSlack(String team, Map additionalProperties) { - this.team = team; - this.additionalProperties = additionalProperties; - } - - /** - * @return Slack team name. - */ - @JsonProperty("team") - public String getTeam() { - return team; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonSlack && equalTo((ClientAddonSlack) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonSlack other) { - return team.equals(other.team); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.team); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TeamStage builder() { - return new Builder(); - } - - public interface TeamStage { - /** - *

Slack team name.

- */ - _FinalStage team(@NotNull String team); - - Builder from(ClientAddonSlack other); - } - - public interface _FinalStage { - ClientAddonSlack build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TeamStage, _FinalStage { - private String team; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ClientAddonSlack other) { - team(other.getTeam()); - return this; - } - - /** - *

Slack team name.

- *

Slack team name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("team") - public _FinalStage team(@NotNull String team) { - this.team = Objects.requireNonNull(team, "team must not be null"); - return this; - } - - @java.lang.Override - public ClientAddonSlack build() { - return new ClientAddonSlack(team, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSpringCm.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonSpringCm.java deleted file mode 100644 index 006352f1a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSpringCm.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonSpringCm.Builder.class) -public final class ClientAddonSpringCm { - private final Optional acsurl; - - private final Map additionalProperties; - - private ClientAddonSpringCm(Optional acsurl, Map additionalProperties) { - this.acsurl = acsurl; - this.additionalProperties = additionalProperties; - } - - /** - * @return SpringCM ACS URL, e.g. https://na11.springcm.com/atlas/sso/SSOEndpoint.ashx. - */ - @JsonProperty("acsurl") - public Optional getAcsurl() { - return acsurl; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonSpringCm && equalTo((ClientAddonSpringCm) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonSpringCm other) { - return acsurl.equals(other.acsurl); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.acsurl); - } - - @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 acsurl = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonSpringCm other) { - acsurl(other.getAcsurl()); - return this; - } - - /** - *

SpringCM ACS URL, e.g. https://na11.springcm.com/atlas/sso/SSOEndpoint.ashx.

- */ - @JsonSetter(value = "acsurl", nulls = Nulls.SKIP) - public Builder acsurl(Optional acsurl) { - this.acsurl = acsurl; - return this; - } - - public Builder acsurl(String acsurl) { - this.acsurl = Optional.ofNullable(acsurl); - return this; - } - - public ClientAddonSpringCm build() { - return new ClientAddonSpringCm(acsurl, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSsoIntegration.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonSsoIntegration.java deleted file mode 100644 index 41c6a40e5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonSsoIntegration.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonSsoIntegration.Builder.class) -public final class ClientAddonSsoIntegration { - private final Optional name; - - private final Optional version; - - private final Map additionalProperties; - - private ClientAddonSsoIntegration( - Optional name, Optional version, Map additionalProperties) { - this.name = name; - this.version = version; - this.additionalProperties = additionalProperties; - } - - /** - * @return SSO integration name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return SSO integration version installed - */ - @JsonProperty("version") - public Optional getVersion() { - return version; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonSsoIntegration && equalTo((ClientAddonSsoIntegration) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonSsoIntegration other) { - return name.equals(other.name) && version.equals(other.version); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.version); - } - - @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 version = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonSsoIntegration other) { - name(other.getName()); - version(other.getVersion()); - return this; - } - - /** - *

SSO integration name

- */ - @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; - } - - /** - *

SSO integration version installed

- */ - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public Builder version(Optional version) { - this.version = version; - return this; - } - - public Builder version(String version) { - this.version = Optional.ofNullable(version); - return this; - } - - public ClientAddonSsoIntegration build() { - return new ClientAddonSsoIntegration(name, version, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonWams.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonWams.java deleted file mode 100644 index f42f26c3c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonWams.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonWams.Builder.class) -public final class ClientAddonWams { - private final Optional masterkey; - - private final Map additionalProperties; - - private ClientAddonWams(Optional masterkey, Map additionalProperties) { - this.masterkey = masterkey; - this.additionalProperties = additionalProperties; - } - - /** - * @return Your master key for Windows Azure Mobile Services. - */ - @JsonProperty("masterkey") - public Optional getMasterkey() { - return masterkey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonWams && equalTo((ClientAddonWams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonWams other) { - return masterkey.equals(other.masterkey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.masterkey); - } - - @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 masterkey = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonWams other) { - masterkey(other.getMasterkey()); - return this; - } - - /** - *

Your master key for Windows Azure Mobile Services.

- */ - @JsonSetter(value = "masterkey", nulls = Nulls.SKIP) - public Builder masterkey(Optional masterkey) { - this.masterkey = masterkey; - return this; - } - - public Builder masterkey(String masterkey) { - this.masterkey = Optional.ofNullable(masterkey); - return this; - } - - public ClientAddonWams build() { - return new ClientAddonWams(masterkey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonZendesk.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonZendesk.java deleted file mode 100644 index 820a210e3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonZendesk.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonZendesk.Builder.class) -public final class ClientAddonZendesk { - private final Optional accountName; - - private final Map additionalProperties; - - private ClientAddonZendesk(Optional accountName, Map additionalProperties) { - this.accountName = accountName; - this.additionalProperties = additionalProperties; - } - - /** - * @return Zendesk account name usually first segment in your Zendesk URL. e.g. https://acme-org.zendesk.com would be acme-org. - */ - @JsonProperty("accountName") - public Optional getAccountName() { - return accountName; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonZendesk && equalTo((ClientAddonZendesk) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonZendesk other) { - return accountName.equals(other.accountName); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.accountName); - } - - @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 accountName = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonZendesk other) { - accountName(other.getAccountName()); - return this; - } - - /** - *

Zendesk account name usually first segment in your Zendesk URL. e.g. https://acme-org.zendesk.com would be acme-org.

- */ - @JsonSetter(value = "accountName", nulls = Nulls.SKIP) - public Builder accountName(Optional accountName) { - this.accountName = accountName; - return this; - } - - public Builder accountName(String accountName) { - this.accountName = Optional.ofNullable(accountName); - return this; - } - - public ClientAddonZendesk build() { - return new ClientAddonZendesk(accountName, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddonZoom.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddonZoom.java deleted file mode 100644 index b7227fb21..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddonZoom.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAddonZoom.Builder.class) -public final class ClientAddonZoom { - private final Optional account; - - private final Map additionalProperties; - - private ClientAddonZoom(Optional account, Map additionalProperties) { - this.account = account; - this.additionalProperties = additionalProperties; - } - - /** - * @return Zoom account name usually first segment of your Zoom URL, e.g. https://acme-org.zoom.us would be acme-org. - */ - @JsonProperty("account") - public Optional getAccount() { - return account; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddonZoom && equalTo((ClientAddonZoom) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddonZoom other) { - return account.equals(other.account); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.account); - } - - @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 account = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddonZoom other) { - account(other.getAccount()); - return this; - } - - /** - *

Zoom account name usually first segment of your Zoom URL, e.g. https://acme-org.zoom.us would be acme-org.

- */ - @JsonSetter(value = "account", nulls = Nulls.SKIP) - public Builder account(Optional account) { - this.account = account; - return this; - } - - public Builder account(String account) { - this.account = Optional.ofNullable(account); - return this; - } - - public ClientAddonZoom build() { - return new ClientAddonZoom(account, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAddons.java b/src/main/java/com/auth0/client/mgmt/types/ClientAddons.java deleted file mode 100644 index ef0a3f3cb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAddons.java +++ /dev/null @@ -1,887 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ClientAddons.Builder.class) -public final class ClientAddons { - private final Optional aws; - - private final Optional azureBlob; - - private final Optional azureSb; - - private final Optional rms; - - private final Optional mscrm; - - private final Optional slack; - - private final Optional sentry; - - private final Optional> box; - - private final Optional> cloudbees; - - private final Optional> concur; - - private final Optional> dropbox; - - private final Optional echosign; - - private final Optional egnyte; - - private final Optional firebase; - - private final Optional newrelic; - - private final Optional office365; - - private final Optional salesforce; - - private final Optional salesforceApi; - - private final Optional salesforceSandboxApi; - - private final Optional samlp; - - private final Optional layer; - - private final Optional sapApi; - - private final Optional sharepoint; - - private final Optional springcm; - - private final Optional wams; - - private final Optional> wsfed; - - private final Optional zendesk; - - private final Optional zoom; - - private final Optional ssoIntegration; - - private final OptionalNullable oag; - - private final Map additionalProperties; - - private ClientAddons( - Optional aws, - Optional azureBlob, - Optional azureSb, - Optional rms, - Optional mscrm, - Optional slack, - Optional sentry, - Optional> box, - Optional> cloudbees, - Optional> concur, - Optional> dropbox, - Optional echosign, - Optional egnyte, - Optional firebase, - Optional newrelic, - Optional office365, - Optional salesforce, - Optional salesforceApi, - Optional salesforceSandboxApi, - Optional samlp, - Optional layer, - Optional sapApi, - Optional sharepoint, - Optional springcm, - Optional wams, - Optional> wsfed, - Optional zendesk, - Optional zoom, - Optional ssoIntegration, - OptionalNullable oag, - Map additionalProperties) { - this.aws = aws; - this.azureBlob = azureBlob; - this.azureSb = azureSb; - this.rms = rms; - this.mscrm = mscrm; - this.slack = slack; - this.sentry = sentry; - this.box = box; - this.cloudbees = cloudbees; - this.concur = concur; - this.dropbox = dropbox; - this.echosign = echosign; - this.egnyte = egnyte; - this.firebase = firebase; - this.newrelic = newrelic; - this.office365 = office365; - this.salesforce = salesforce; - this.salesforceApi = salesforceApi; - this.salesforceSandboxApi = salesforceSandboxApi; - this.samlp = samlp; - this.layer = layer; - this.sapApi = sapApi; - this.sharepoint = sharepoint; - this.springcm = springcm; - this.wams = wams; - this.wsfed = wsfed; - this.zendesk = zendesk; - this.zoom = zoom; - this.ssoIntegration = ssoIntegration; - this.oag = oag; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("aws") - public Optional getAws() { - return aws; - } - - @JsonProperty("azure_blob") - public Optional getAzureBlob() { - return azureBlob; - } - - @JsonProperty("azure_sb") - public Optional getAzureSb() { - return azureSb; - } - - @JsonProperty("rms") - public Optional getRms() { - return rms; - } - - @JsonProperty("mscrm") - public Optional getMscrm() { - return mscrm; - } - - @JsonProperty("slack") - public Optional getSlack() { - return slack; - } - - @JsonProperty("sentry") - public Optional getSentry() { - return sentry; - } - - @JsonProperty("box") - public Optional> getBox() { - return box; - } - - @JsonProperty("cloudbees") - public Optional> getCloudbees() { - return cloudbees; - } - - @JsonProperty("concur") - public Optional> getConcur() { - return concur; - } - - @JsonProperty("dropbox") - public Optional> getDropbox() { - return dropbox; - } - - @JsonProperty("echosign") - public Optional getEchosign() { - return echosign; - } - - @JsonProperty("egnyte") - public Optional getEgnyte() { - return egnyte; - } - - @JsonProperty("firebase") - public Optional getFirebase() { - return firebase; - } - - @JsonProperty("newrelic") - public Optional getNewrelic() { - return newrelic; - } - - @JsonProperty("office365") - public Optional getOffice365() { - return office365; - } - - @JsonProperty("salesforce") - public Optional getSalesforce() { - return salesforce; - } - - @JsonProperty("salesforce_api") - public Optional getSalesforceApi() { - return salesforceApi; - } - - @JsonProperty("salesforce_sandbox_api") - public Optional getSalesforceSandboxApi() { - return salesforceSandboxApi; - } - - @JsonProperty("samlp") - public Optional getSamlp() { - return samlp; - } - - @JsonProperty("layer") - public Optional getLayer() { - return layer; - } - - @JsonProperty("sap_api") - public Optional getSapApi() { - return sapApi; - } - - @JsonProperty("sharepoint") - public Optional getSharepoint() { - return sharepoint; - } - - @JsonProperty("springcm") - public Optional getSpringcm() { - return springcm; - } - - @JsonProperty("wams") - public Optional getWams() { - return wams; - } - - @JsonProperty("wsfed") - public Optional> getWsfed() { - return wsfed; - } - - @JsonProperty("zendesk") - public Optional getZendesk() { - return zendesk; - } - - @JsonProperty("zoom") - public Optional getZoom() { - return zoom; - } - - @JsonProperty("sso_integration") - public Optional getSsoIntegration() { - return ssoIntegration; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("oag") - public OptionalNullable getOag() { - if (oag == null) { - return OptionalNullable.absent(); - } - return oag; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("oag") - private OptionalNullable _getOag() { - return oag; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAddons && equalTo((ClientAddons) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAddons other) { - return aws.equals(other.aws) - && azureBlob.equals(other.azureBlob) - && azureSb.equals(other.azureSb) - && rms.equals(other.rms) - && mscrm.equals(other.mscrm) - && slack.equals(other.slack) - && sentry.equals(other.sentry) - && box.equals(other.box) - && cloudbees.equals(other.cloudbees) - && concur.equals(other.concur) - && dropbox.equals(other.dropbox) - && echosign.equals(other.echosign) - && egnyte.equals(other.egnyte) - && firebase.equals(other.firebase) - && newrelic.equals(other.newrelic) - && office365.equals(other.office365) - && salesforce.equals(other.salesforce) - && salesforceApi.equals(other.salesforceApi) - && salesforceSandboxApi.equals(other.salesforceSandboxApi) - && samlp.equals(other.samlp) - && layer.equals(other.layer) - && sapApi.equals(other.sapApi) - && sharepoint.equals(other.sharepoint) - && springcm.equals(other.springcm) - && wams.equals(other.wams) - && wsfed.equals(other.wsfed) - && zendesk.equals(other.zendesk) - && zoom.equals(other.zoom) - && ssoIntegration.equals(other.ssoIntegration) - && oag.equals(other.oag); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.aws, - this.azureBlob, - this.azureSb, - this.rms, - this.mscrm, - this.slack, - this.sentry, - this.box, - this.cloudbees, - this.concur, - this.dropbox, - this.echosign, - this.egnyte, - this.firebase, - this.newrelic, - this.office365, - this.salesforce, - this.salesforceApi, - this.salesforceSandboxApi, - this.samlp, - this.layer, - this.sapApi, - this.sharepoint, - this.springcm, - this.wams, - this.wsfed, - this.zendesk, - this.zoom, - this.ssoIntegration, - this.oag); - } - - @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 aws = Optional.empty(); - - private Optional azureBlob = Optional.empty(); - - private Optional azureSb = Optional.empty(); - - private Optional rms = Optional.empty(); - - private Optional mscrm = Optional.empty(); - - private Optional slack = Optional.empty(); - - private Optional sentry = Optional.empty(); - - private Optional> box = Optional.empty(); - - private Optional> cloudbees = Optional.empty(); - - private Optional> concur = Optional.empty(); - - private Optional> dropbox = Optional.empty(); - - private Optional echosign = Optional.empty(); - - private Optional egnyte = Optional.empty(); - - private Optional firebase = Optional.empty(); - - private Optional newrelic = Optional.empty(); - - private Optional office365 = Optional.empty(); - - private Optional salesforce = Optional.empty(); - - private Optional salesforceApi = Optional.empty(); - - private Optional salesforceSandboxApi = Optional.empty(); - - private Optional samlp = Optional.empty(); - - private Optional layer = Optional.empty(); - - private Optional sapApi = Optional.empty(); - - private Optional sharepoint = Optional.empty(); - - private Optional springcm = Optional.empty(); - - private Optional wams = Optional.empty(); - - private Optional> wsfed = Optional.empty(); - - private Optional zendesk = Optional.empty(); - - private Optional zoom = Optional.empty(); - - private Optional ssoIntegration = Optional.empty(); - - private OptionalNullable oag = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAddons other) { - aws(other.getAws()); - azureBlob(other.getAzureBlob()); - azureSb(other.getAzureSb()); - rms(other.getRms()); - mscrm(other.getMscrm()); - slack(other.getSlack()); - sentry(other.getSentry()); - box(other.getBox()); - cloudbees(other.getCloudbees()); - concur(other.getConcur()); - dropbox(other.getDropbox()); - echosign(other.getEchosign()); - egnyte(other.getEgnyte()); - firebase(other.getFirebase()); - newrelic(other.getNewrelic()); - office365(other.getOffice365()); - salesforce(other.getSalesforce()); - salesforceApi(other.getSalesforceApi()); - salesforceSandboxApi(other.getSalesforceSandboxApi()); - samlp(other.getSamlp()); - layer(other.getLayer()); - sapApi(other.getSapApi()); - sharepoint(other.getSharepoint()); - springcm(other.getSpringcm()); - wams(other.getWams()); - wsfed(other.getWsfed()); - zendesk(other.getZendesk()); - zoom(other.getZoom()); - ssoIntegration(other.getSsoIntegration()); - oag(other.getOag()); - return this; - } - - @JsonSetter(value = "aws", nulls = Nulls.SKIP) - public Builder aws(Optional aws) { - this.aws = aws; - return this; - } - - public Builder aws(ClientAddonAws aws) { - this.aws = Optional.ofNullable(aws); - return this; - } - - @JsonSetter(value = "azure_blob", nulls = Nulls.SKIP) - public Builder azureBlob(Optional azureBlob) { - this.azureBlob = azureBlob; - return this; - } - - public Builder azureBlob(ClientAddonAzureBlob azureBlob) { - this.azureBlob = Optional.ofNullable(azureBlob); - return this; - } - - @JsonSetter(value = "azure_sb", nulls = Nulls.SKIP) - public Builder azureSb(Optional azureSb) { - this.azureSb = azureSb; - return this; - } - - public Builder azureSb(ClientAddonAzureSb azureSb) { - this.azureSb = Optional.ofNullable(azureSb); - return this; - } - - @JsonSetter(value = "rms", nulls = Nulls.SKIP) - public Builder rms(Optional rms) { - this.rms = rms; - return this; - } - - public Builder rms(ClientAddonRms rms) { - this.rms = Optional.ofNullable(rms); - return this; - } - - @JsonSetter(value = "mscrm", nulls = Nulls.SKIP) - public Builder mscrm(Optional mscrm) { - this.mscrm = mscrm; - return this; - } - - public Builder mscrm(ClientAddonMscrm mscrm) { - this.mscrm = Optional.ofNullable(mscrm); - return this; - } - - @JsonSetter(value = "slack", nulls = Nulls.SKIP) - public Builder slack(Optional slack) { - this.slack = slack; - return this; - } - - public Builder slack(ClientAddonSlack slack) { - this.slack = Optional.ofNullable(slack); - return this; - } - - @JsonSetter(value = "sentry", nulls = Nulls.SKIP) - public Builder sentry(Optional sentry) { - this.sentry = sentry; - return this; - } - - public Builder sentry(ClientAddonSentry sentry) { - this.sentry = Optional.ofNullable(sentry); - return this; - } - - @JsonSetter(value = "box", nulls = Nulls.SKIP) - public Builder box(Optional> box) { - this.box = box; - return this; - } - - public Builder box(Map box) { - this.box = Optional.ofNullable(box); - return this; - } - - @JsonSetter(value = "cloudbees", nulls = Nulls.SKIP) - public Builder cloudbees(Optional> cloudbees) { - this.cloudbees = cloudbees; - return this; - } - - public Builder cloudbees(Map cloudbees) { - this.cloudbees = Optional.ofNullable(cloudbees); - return this; - } - - @JsonSetter(value = "concur", nulls = Nulls.SKIP) - public Builder concur(Optional> concur) { - this.concur = concur; - return this; - } - - public Builder concur(Map concur) { - this.concur = Optional.ofNullable(concur); - return this; - } - - @JsonSetter(value = "dropbox", nulls = Nulls.SKIP) - public Builder dropbox(Optional> dropbox) { - this.dropbox = dropbox; - return this; - } - - public Builder dropbox(Map dropbox) { - this.dropbox = Optional.ofNullable(dropbox); - return this; - } - - @JsonSetter(value = "echosign", nulls = Nulls.SKIP) - public Builder echosign(Optional echosign) { - this.echosign = echosign; - return this; - } - - public Builder echosign(ClientAddonEchoSign echosign) { - this.echosign = Optional.ofNullable(echosign); - return this; - } - - @JsonSetter(value = "egnyte", nulls = Nulls.SKIP) - public Builder egnyte(Optional egnyte) { - this.egnyte = egnyte; - return this; - } - - public Builder egnyte(ClientAddonEgnyte egnyte) { - this.egnyte = Optional.ofNullable(egnyte); - return this; - } - - @JsonSetter(value = "firebase", nulls = Nulls.SKIP) - public Builder firebase(Optional firebase) { - this.firebase = firebase; - return this; - } - - public Builder firebase(ClientAddonFirebase firebase) { - this.firebase = Optional.ofNullable(firebase); - return this; - } - - @JsonSetter(value = "newrelic", nulls = Nulls.SKIP) - public Builder newrelic(Optional newrelic) { - this.newrelic = newrelic; - return this; - } - - public Builder newrelic(ClientAddonNewRelic newrelic) { - this.newrelic = Optional.ofNullable(newrelic); - return this; - } - - @JsonSetter(value = "office365", nulls = Nulls.SKIP) - public Builder office365(Optional office365) { - this.office365 = office365; - return this; - } - - public Builder office365(ClientAddonOffice365 office365) { - this.office365 = Optional.ofNullable(office365); - return this; - } - - @JsonSetter(value = "salesforce", nulls = Nulls.SKIP) - public Builder salesforce(Optional salesforce) { - this.salesforce = salesforce; - return this; - } - - public Builder salesforce(ClientAddonSalesforce salesforce) { - this.salesforce = Optional.ofNullable(salesforce); - return this; - } - - @JsonSetter(value = "salesforce_api", nulls = Nulls.SKIP) - public Builder salesforceApi(Optional salesforceApi) { - this.salesforceApi = salesforceApi; - return this; - } - - public Builder salesforceApi(ClientAddonSalesforceApi salesforceApi) { - this.salesforceApi = Optional.ofNullable(salesforceApi); - return this; - } - - @JsonSetter(value = "salesforce_sandbox_api", nulls = Nulls.SKIP) - public Builder salesforceSandboxApi(Optional salesforceSandboxApi) { - this.salesforceSandboxApi = salesforceSandboxApi; - return this; - } - - public Builder salesforceSandboxApi(ClientAddonSalesforceSandboxApi salesforceSandboxApi) { - this.salesforceSandboxApi = Optional.ofNullable(salesforceSandboxApi); - return this; - } - - @JsonSetter(value = "samlp", nulls = Nulls.SKIP) - public Builder samlp(Optional samlp) { - this.samlp = samlp; - return this; - } - - public Builder samlp(ClientAddonSaml samlp) { - this.samlp = Optional.ofNullable(samlp); - return this; - } - - @JsonSetter(value = "layer", nulls = Nulls.SKIP) - public Builder layer(Optional layer) { - this.layer = layer; - return this; - } - - public Builder layer(ClientAddonLayer layer) { - this.layer = Optional.ofNullable(layer); - return this; - } - - @JsonSetter(value = "sap_api", nulls = Nulls.SKIP) - public Builder sapApi(Optional sapApi) { - this.sapApi = sapApi; - return this; - } - - public Builder sapApi(ClientAddonSapapi sapApi) { - this.sapApi = Optional.ofNullable(sapApi); - return this; - } - - @JsonSetter(value = "sharepoint", nulls = Nulls.SKIP) - public Builder sharepoint(Optional sharepoint) { - this.sharepoint = sharepoint; - return this; - } - - public Builder sharepoint(ClientAddonSharePoint sharepoint) { - this.sharepoint = Optional.ofNullable(sharepoint); - return this; - } - - @JsonSetter(value = "springcm", nulls = Nulls.SKIP) - public Builder springcm(Optional springcm) { - this.springcm = springcm; - return this; - } - - public Builder springcm(ClientAddonSpringCm springcm) { - this.springcm = Optional.ofNullable(springcm); - return this; - } - - @JsonSetter(value = "wams", nulls = Nulls.SKIP) - public Builder wams(Optional wams) { - this.wams = wams; - return this; - } - - public Builder wams(ClientAddonWams wams) { - this.wams = Optional.ofNullable(wams); - return this; - } - - @JsonSetter(value = "wsfed", nulls = Nulls.SKIP) - public Builder wsfed(Optional> wsfed) { - this.wsfed = wsfed; - return this; - } - - public Builder wsfed(Map wsfed) { - this.wsfed = Optional.ofNullable(wsfed); - return this; - } - - @JsonSetter(value = "zendesk", nulls = Nulls.SKIP) - public Builder zendesk(Optional zendesk) { - this.zendesk = zendesk; - return this; - } - - public Builder zendesk(ClientAddonZendesk zendesk) { - this.zendesk = Optional.ofNullable(zendesk); - return this; - } - - @JsonSetter(value = "zoom", nulls = Nulls.SKIP) - public Builder zoom(Optional zoom) { - this.zoom = zoom; - return this; - } - - public Builder zoom(ClientAddonZoom zoom) { - this.zoom = Optional.ofNullable(zoom); - return this; - } - - @JsonSetter(value = "sso_integration", nulls = Nulls.SKIP) - public Builder ssoIntegration(Optional ssoIntegration) { - this.ssoIntegration = ssoIntegration; - return this; - } - - public Builder ssoIntegration(ClientAddonSsoIntegration ssoIntegration) { - this.ssoIntegration = Optional.ofNullable(ssoIntegration); - return this; - } - - @JsonSetter(value = "oag", nulls = Nulls.SKIP) - public Builder oag(@Nullable OptionalNullable oag) { - this.oag = oag; - return this; - } - - public Builder oag(ClientAddonOag oag) { - this.oag = OptionalNullable.of(oag); - return this; - } - - public Builder oag(Optional oag) { - if (oag.isPresent()) { - this.oag = OptionalNullable.of(oag.get()); - } else { - this.oag = OptionalNullable.absent(); - } - return this; - } - - public Builder oag(com.auth0.client.mgmt.core.Nullable oag) { - if (oag.isNull()) { - this.oag = OptionalNullable.ofNull(); - } else if (oag.isEmpty()) { - this.oag = OptionalNullable.absent(); - } else { - this.oag = OptionalNullable.of(oag.get()); - } - return this; - } - - public ClientAddons build() { - return new ClientAddons( - aws, - azureBlob, - azureSb, - rms, - mscrm, - slack, - sentry, - box, - cloudbees, - concur, - dropbox, - echosign, - egnyte, - firebase, - newrelic, - office365, - salesforce, - salesforceApi, - salesforceSandboxApi, - samlp, - layer, - sapApi, - sharepoint, - springcm, - wams, - wsfed, - zendesk, - zoom, - ssoIntegration, - oag, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAppTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientAppTypeEnum.java deleted file mode 100644 index 7a4ebeb98..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAppTypeEnum.java +++ /dev/null @@ -1,317 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientAppTypeEnum { - public static final ClientAppTypeEnum DROPBOX = new ClientAppTypeEnum(Value.DROPBOX, "dropbox"); - - public static final ClientAppTypeEnum REGULAR_WEB = new ClientAppTypeEnum(Value.REGULAR_WEB, "regular_web"); - - public static final ClientAppTypeEnum NEWRELIC = new ClientAppTypeEnum(Value.NEWRELIC, "newrelic"); - - public static final ClientAppTypeEnum NATIVE = new ClientAppTypeEnum(Value.NATIVE, "native"); - - public static final ClientAppTypeEnum SPA = new ClientAppTypeEnum(Value.SPA, "spa"); - - public static final ClientAppTypeEnum SPRINGCM = new ClientAppTypeEnum(Value.SPRINGCM, "springcm"); - - public static final ClientAppTypeEnum SHAREPOINT = new ClientAppTypeEnum(Value.SHAREPOINT, "sharepoint"); - - public static final ClientAppTypeEnum EGNYTE = new ClientAppTypeEnum(Value.EGNYTE, "egnyte"); - - public static final ClientAppTypeEnum ZENDESK = new ClientAppTypeEnum(Value.ZENDESK, "zendesk"); - - public static final ClientAppTypeEnum NON_INTERACTIVE = - new ClientAppTypeEnum(Value.NON_INTERACTIVE, "non_interactive"); - - public static final ClientAppTypeEnum SLACK = new ClientAppTypeEnum(Value.SLACK, "slack"); - - public static final ClientAppTypeEnum SENTRY = new ClientAppTypeEnum(Value.SENTRY, "sentry"); - - public static final ClientAppTypeEnum EXPRESS_CONFIGURATION = - new ClientAppTypeEnum(Value.EXPRESS_CONFIGURATION, "express_configuration"); - - public static final ClientAppTypeEnum SSO_INTEGRATION = - new ClientAppTypeEnum(Value.SSO_INTEGRATION, "sso_integration"); - - public static final ClientAppTypeEnum ECHOSIGN = new ClientAppTypeEnum(Value.ECHOSIGN, "echosign"); - - public static final ClientAppTypeEnum BOX = new ClientAppTypeEnum(Value.BOX, "box"); - - public static final ClientAppTypeEnum RMS = new ClientAppTypeEnum(Value.RMS, "rms"); - - public static final ClientAppTypeEnum CLOUDBEES = new ClientAppTypeEnum(Value.CLOUDBEES, "cloudbees"); - - public static final ClientAppTypeEnum SALESFORCE = new ClientAppTypeEnum(Value.SALESFORCE, "salesforce"); - - public static final ClientAppTypeEnum CONCUR = new ClientAppTypeEnum(Value.CONCUR, "concur"); - - public static final ClientAppTypeEnum RESOURCE_SERVER = - new ClientAppTypeEnum(Value.RESOURCE_SERVER, "resource_server"); - - public static final ClientAppTypeEnum ZOOM = new ClientAppTypeEnum(Value.ZOOM, "zoom"); - - public static final ClientAppTypeEnum MSCRM = new ClientAppTypeEnum(Value.MSCRM, "mscrm"); - - public static final ClientAppTypeEnum OAG = new ClientAppTypeEnum(Value.OAG, "oag"); - - public static final ClientAppTypeEnum OFFICE365 = new ClientAppTypeEnum(Value.OFFICE365, "office365"); - - private final Value value; - - private final String string; - - ClientAppTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientAppTypeEnum && this.string.equals(((ClientAppTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DROPBOX: - return visitor.visitDropbox(); - case REGULAR_WEB: - return visitor.visitRegularWeb(); - case NEWRELIC: - return visitor.visitNewrelic(); - case NATIVE: - return visitor.visitNative(); - case SPA: - return visitor.visitSpa(); - case SPRINGCM: - return visitor.visitSpringcm(); - case SHAREPOINT: - return visitor.visitSharepoint(); - case EGNYTE: - return visitor.visitEgnyte(); - case ZENDESK: - return visitor.visitZendesk(); - case NON_INTERACTIVE: - return visitor.visitNonInteractive(); - case SLACK: - return visitor.visitSlack(); - case SENTRY: - return visitor.visitSentry(); - case EXPRESS_CONFIGURATION: - return visitor.visitExpressConfiguration(); - case SSO_INTEGRATION: - return visitor.visitSsoIntegration(); - case ECHOSIGN: - return visitor.visitEchosign(); - case BOX: - return visitor.visitBox(); - case RMS: - return visitor.visitRms(); - case CLOUDBEES: - return visitor.visitCloudbees(); - case SALESFORCE: - return visitor.visitSalesforce(); - case CONCUR: - return visitor.visitConcur(); - case RESOURCE_SERVER: - return visitor.visitResourceServer(); - case ZOOM: - return visitor.visitZoom(); - case MSCRM: - return visitor.visitMscrm(); - case OAG: - return visitor.visitOag(); - case OFFICE365: - return visitor.visitOffice365(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ClientAppTypeEnum valueOf(String value) { - switch (value) { - case "dropbox": - return DROPBOX; - case "regular_web": - return REGULAR_WEB; - case "newrelic": - return NEWRELIC; - case "native": - return NATIVE; - case "spa": - return SPA; - case "springcm": - return SPRINGCM; - case "sharepoint": - return SHAREPOINT; - case "egnyte": - return EGNYTE; - case "zendesk": - return ZENDESK; - case "non_interactive": - return NON_INTERACTIVE; - case "slack": - return SLACK; - case "sentry": - return SENTRY; - case "express_configuration": - return EXPRESS_CONFIGURATION; - case "sso_integration": - return SSO_INTEGRATION; - case "echosign": - return ECHOSIGN; - case "box": - return BOX; - case "rms": - return RMS; - case "cloudbees": - return CLOUDBEES; - case "salesforce": - return SALESFORCE; - case "concur": - return CONCUR; - case "resource_server": - return RESOURCE_SERVER; - case "zoom": - return ZOOM; - case "mscrm": - return MSCRM; - case "oag": - return OAG; - case "office365": - return OFFICE365; - default: - return new ClientAppTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - NATIVE, - - SPA, - - REGULAR_WEB, - - NON_INTERACTIVE, - - RESOURCE_SERVER, - - EXPRESS_CONFIGURATION, - - RMS, - - BOX, - - CLOUDBEES, - - CONCUR, - - DROPBOX, - - MSCRM, - - ECHOSIGN, - - EGNYTE, - - NEWRELIC, - - OFFICE365, - - SALESFORCE, - - SENTRY, - - SHAREPOINT, - - SLACK, - - SPRINGCM, - - ZENDESK, - - ZOOM, - - SSO_INTEGRATION, - - OAG, - - UNKNOWN - } - - public interface Visitor { - T visitNative(); - - T visitSpa(); - - T visitRegularWeb(); - - T visitNonInteractive(); - - T visitResourceServer(); - - T visitExpressConfiguration(); - - T visitRms(); - - T visitBox(); - - T visitCloudbees(); - - T visitConcur(); - - T visitDropbox(); - - T visitMscrm(); - - T visitEchosign(); - - T visitEgnyte(); - - T visitNewrelic(); - - T visitOffice365(); - - T visitSalesforce(); - - T visitSentry(); - - T visitSharepoint(); - - T visitSlack(); - - T visitSpringcm(); - - T visitZendesk(); - - T visitZoom(); - - T visitSsoIntegration(); - - T visitOag(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAuthenticationMethod.java b/src/main/java/com/auth0/client/mgmt/types/ClientAuthenticationMethod.java deleted file mode 100644 index f7e74c5af..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAuthenticationMethod.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientAuthenticationMethod.Builder.class) -public final class ClientAuthenticationMethod { - private final Optional privateKeyJwt; - - private final Optional tlsClientAuth; - - private final Optional selfSignedTlsClientAuth; - - private final Map additionalProperties; - - private ClientAuthenticationMethod( - Optional privateKeyJwt, - Optional tlsClientAuth, - Optional selfSignedTlsClientAuth, - Map additionalProperties) { - this.privateKeyJwt = privateKeyJwt; - this.tlsClientAuth = tlsClientAuth; - this.selfSignedTlsClientAuth = selfSignedTlsClientAuth; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("private_key_jwt") - public Optional getPrivateKeyJwt() { - return privateKeyJwt; - } - - @JsonProperty("tls_client_auth") - public Optional getTlsClientAuth() { - return tlsClientAuth; - } - - @JsonProperty("self_signed_tls_client_auth") - public Optional getSelfSignedTlsClientAuth() { - return selfSignedTlsClientAuth; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAuthenticationMethod && equalTo((ClientAuthenticationMethod) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAuthenticationMethod other) { - return privateKeyJwt.equals(other.privateKeyJwt) - && tlsClientAuth.equals(other.tlsClientAuth) - && selfSignedTlsClientAuth.equals(other.selfSignedTlsClientAuth); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.privateKeyJwt, this.tlsClientAuth, this.selfSignedTlsClientAuth); - } - - @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 privateKeyJwt = Optional.empty(); - - private Optional tlsClientAuth = Optional.empty(); - - private Optional selfSignedTlsClientAuth = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAuthenticationMethod other) { - privateKeyJwt(other.getPrivateKeyJwt()); - tlsClientAuth(other.getTlsClientAuth()); - selfSignedTlsClientAuth(other.getSelfSignedTlsClientAuth()); - return this; - } - - @JsonSetter(value = "private_key_jwt", nulls = Nulls.SKIP) - public Builder privateKeyJwt(Optional privateKeyJwt) { - this.privateKeyJwt = privateKeyJwt; - return this; - } - - public Builder privateKeyJwt(ClientAuthenticationMethodPrivateKeyJwt privateKeyJwt) { - this.privateKeyJwt = Optional.ofNullable(privateKeyJwt); - return this; - } - - @JsonSetter(value = "tls_client_auth", nulls = Nulls.SKIP) - public Builder tlsClientAuth(Optional tlsClientAuth) { - this.tlsClientAuth = tlsClientAuth; - return this; - } - - public Builder tlsClientAuth(ClientAuthenticationMethodTlsClientAuth tlsClientAuth) { - this.tlsClientAuth = Optional.ofNullable(tlsClientAuth); - return this; - } - - @JsonSetter(value = "self_signed_tls_client_auth", nulls = Nulls.SKIP) - public Builder selfSignedTlsClientAuth( - Optional selfSignedTlsClientAuth) { - this.selfSignedTlsClientAuth = selfSignedTlsClientAuth; - return this; - } - - public Builder selfSignedTlsClientAuth( - ClientAuthenticationMethodSelfSignedTlsClientAuth selfSignedTlsClientAuth) { - this.selfSignedTlsClientAuth = Optional.ofNullable(selfSignedTlsClientAuth); - return this; - } - - public ClientAuthenticationMethod build() { - return new ClientAuthenticationMethod( - privateKeyJwt, tlsClientAuth, selfSignedTlsClientAuth, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAuthenticationMethodPrivateKeyJwt.java b/src/main/java/com/auth0/client/mgmt/types/ClientAuthenticationMethodPrivateKeyJwt.java deleted file mode 100644 index 2b6facd10..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAuthenticationMethodPrivateKeyJwt.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = ClientAuthenticationMethodPrivateKeyJwt.Builder.class) -public final class ClientAuthenticationMethodPrivateKeyJwt { - private final List credentials; - - private final Map additionalProperties; - - private ClientAuthenticationMethodPrivateKeyJwt( - List credentials, Map additionalProperties) { - this.credentials = credentials; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("credentials") - public List getCredentials() { - return credentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAuthenticationMethodPrivateKeyJwt - && equalTo((ClientAuthenticationMethodPrivateKeyJwt) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAuthenticationMethodPrivateKeyJwt other) { - return credentials.equals(other.credentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.credentials); - } - - @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 credentials = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAuthenticationMethodPrivateKeyJwt other) { - credentials(other.getCredentials()); - return this; - } - - @JsonSetter(value = "credentials", nulls = Nulls.SKIP) - public Builder credentials(List credentials) { - this.credentials.clear(); - if (credentials != null) { - this.credentials.addAll(credentials); - } - return this; - } - - public Builder addCredentials(CredentialId credentials) { - this.credentials.add(credentials); - return this; - } - - public Builder addAllCredentials(List credentials) { - if (credentials != null) { - this.credentials.addAll(credentials); - } - return this; - } - - public ClientAuthenticationMethodPrivateKeyJwt build() { - return new ClientAuthenticationMethodPrivateKeyJwt(credentials, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAuthenticationMethodSelfSignedTlsClientAuth.java b/src/main/java/com/auth0/client/mgmt/types/ClientAuthenticationMethodSelfSignedTlsClientAuth.java deleted file mode 100644 index a62ae6994..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAuthenticationMethodSelfSignedTlsClientAuth.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = ClientAuthenticationMethodSelfSignedTlsClientAuth.Builder.class) -public final class ClientAuthenticationMethodSelfSignedTlsClientAuth { - private final List credentials; - - private final Map additionalProperties; - - private ClientAuthenticationMethodSelfSignedTlsClientAuth( - List credentials, Map additionalProperties) { - this.credentials = credentials; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("credentials") - public List getCredentials() { - return credentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAuthenticationMethodSelfSignedTlsClientAuth - && equalTo((ClientAuthenticationMethodSelfSignedTlsClientAuth) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAuthenticationMethodSelfSignedTlsClientAuth other) { - return credentials.equals(other.credentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.credentials); - } - - @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 credentials = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAuthenticationMethodSelfSignedTlsClientAuth other) { - credentials(other.getCredentials()); - return this; - } - - @JsonSetter(value = "credentials", nulls = Nulls.SKIP) - public Builder credentials(List credentials) { - this.credentials.clear(); - if (credentials != null) { - this.credentials.addAll(credentials); - } - return this; - } - - public Builder addCredentials(CredentialId credentials) { - this.credentials.add(credentials); - return this; - } - - public Builder addAllCredentials(List credentials) { - if (credentials != null) { - this.credentials.addAll(credentials); - } - return this; - } - - public ClientAuthenticationMethodSelfSignedTlsClientAuth build() { - return new ClientAuthenticationMethodSelfSignedTlsClientAuth(credentials, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientAuthenticationMethodTlsClientAuth.java b/src/main/java/com/auth0/client/mgmt/types/ClientAuthenticationMethodTlsClientAuth.java deleted file mode 100644 index ad24c5dc2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientAuthenticationMethodTlsClientAuth.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = ClientAuthenticationMethodTlsClientAuth.Builder.class) -public final class ClientAuthenticationMethodTlsClientAuth { - private final List credentials; - - private final Map additionalProperties; - - private ClientAuthenticationMethodTlsClientAuth( - List credentials, Map additionalProperties) { - this.credentials = credentials; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("credentials") - public List getCredentials() { - return credentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientAuthenticationMethodTlsClientAuth - && equalTo((ClientAuthenticationMethodTlsClientAuth) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientAuthenticationMethodTlsClientAuth other) { - return credentials.equals(other.credentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.credentials); - } - - @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 credentials = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientAuthenticationMethodTlsClientAuth other) { - credentials(other.getCredentials()); - return this; - } - - @JsonSetter(value = "credentials", nulls = Nulls.SKIP) - public Builder credentials(List credentials) { - this.credentials.clear(); - if (credentials != null) { - this.credentials.addAll(credentials); - } - return this; - } - - public Builder addCredentials(CredentialId credentials) { - this.credentials.add(credentials); - return this; - } - - public Builder addAllCredentials(List credentials) { - if (credentials != null) { - this.credentials.addAll(credentials); - } - return this; - } - - public ClientAuthenticationMethodTlsClientAuth build() { - return new ClientAuthenticationMethodTlsClientAuth(credentials, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientComplianceLevelEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientComplianceLevelEnum.java deleted file mode 100644 index 92861c601..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientComplianceLevelEnum.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientComplianceLevelEnum { - public static final ClientComplianceLevelEnum FAPI1ADV_MTLS_PAR = - new ClientComplianceLevelEnum(Value.FAPI1ADV_MTLS_PAR, "fapi1_adv_mtls_par"); - - public static final ClientComplianceLevelEnum FAPI2SP_PKJ_MTLS = - new ClientComplianceLevelEnum(Value.FAPI2SP_PKJ_MTLS, "fapi2_sp_pkj_mtls"); - - public static final ClientComplianceLevelEnum FAPI2SP_MTLS_MTLS = - new ClientComplianceLevelEnum(Value.FAPI2SP_MTLS_MTLS, "fapi2_sp_mtls_mtls"); - - public static final ClientComplianceLevelEnum NONE = new ClientComplianceLevelEnum(Value.NONE, "none"); - - public static final ClientComplianceLevelEnum FAPI1ADV_PKJ_PAR = - new ClientComplianceLevelEnum(Value.FAPI1ADV_PKJ_PAR, "fapi1_adv_pkj_par"); - - private final Value value; - - private final String string; - - ClientComplianceLevelEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientComplianceLevelEnum - && this.string.equals(((ClientComplianceLevelEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FAPI1ADV_MTLS_PAR: - return visitor.visitFapi1AdvMtlsPar(); - case FAPI2SP_PKJ_MTLS: - return visitor.visitFapi2SpPkjMtls(); - case FAPI2SP_MTLS_MTLS: - return visitor.visitFapi2SpMtlsMtls(); - case NONE: - return visitor.visitNone(); - case FAPI1ADV_PKJ_PAR: - return visitor.visitFapi1AdvPkjPar(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ClientComplianceLevelEnum valueOf(String value) { - switch (value) { - case "fapi1_adv_mtls_par": - return FAPI1ADV_MTLS_PAR; - case "fapi2_sp_pkj_mtls": - return FAPI2SP_PKJ_MTLS; - case "fapi2_sp_mtls_mtls": - return FAPI2SP_MTLS_MTLS; - case "none": - return NONE; - case "fapi1_adv_pkj_par": - return FAPI1ADV_PKJ_PAR; - default: - return new ClientComplianceLevelEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - NONE, - - FAPI1ADV_PKJ_PAR, - - FAPI1ADV_MTLS_PAR, - - FAPI2SP_PKJ_MTLS, - - FAPI2SP_MTLS_MTLS, - - UNKNOWN - } - - public interface Visitor { - T visitNone(); - - T visitFapi1AdvPkjPar(); - - T visitFapi1AdvMtlsPar(); - - T visitFapi2SpPkjMtls(); - - T visitFapi2SpMtlsMtls(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientCreateAuthenticationMethod.java b/src/main/java/com/auth0/client/mgmt/types/ClientCreateAuthenticationMethod.java deleted file mode 100644 index cc952dc1f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientCreateAuthenticationMethod.java +++ /dev/null @@ -1,149 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientCreateAuthenticationMethod.Builder.class) -public final class ClientCreateAuthenticationMethod { - private final Optional privateKeyJwt; - - private final Optional tlsClientAuth; - - private final Optional selfSignedTlsClientAuth; - - private final Map additionalProperties; - - private ClientCreateAuthenticationMethod( - Optional privateKeyJwt, - Optional tlsClientAuth, - Optional selfSignedTlsClientAuth, - Map additionalProperties) { - this.privateKeyJwt = privateKeyJwt; - this.tlsClientAuth = tlsClientAuth; - this.selfSignedTlsClientAuth = selfSignedTlsClientAuth; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("private_key_jwt") - public Optional getPrivateKeyJwt() { - return privateKeyJwt; - } - - @JsonProperty("tls_client_auth") - public Optional getTlsClientAuth() { - return tlsClientAuth; - } - - @JsonProperty("self_signed_tls_client_auth") - public Optional getSelfSignedTlsClientAuth() { - return selfSignedTlsClientAuth; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientCreateAuthenticationMethod && equalTo((ClientCreateAuthenticationMethod) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientCreateAuthenticationMethod other) { - return privateKeyJwt.equals(other.privateKeyJwt) - && tlsClientAuth.equals(other.tlsClientAuth) - && selfSignedTlsClientAuth.equals(other.selfSignedTlsClientAuth); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.privateKeyJwt, this.tlsClientAuth, this.selfSignedTlsClientAuth); - } - - @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 privateKeyJwt = Optional.empty(); - - private Optional tlsClientAuth = Optional.empty(); - - private Optional selfSignedTlsClientAuth = - Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientCreateAuthenticationMethod other) { - privateKeyJwt(other.getPrivateKeyJwt()); - tlsClientAuth(other.getTlsClientAuth()); - selfSignedTlsClientAuth(other.getSelfSignedTlsClientAuth()); - return this; - } - - @JsonSetter(value = "private_key_jwt", nulls = Nulls.SKIP) - public Builder privateKeyJwt(Optional privateKeyJwt) { - this.privateKeyJwt = privateKeyJwt; - return this; - } - - public Builder privateKeyJwt(ClientCreateAuthenticationMethodPrivateKeyJwt privateKeyJwt) { - this.privateKeyJwt = Optional.ofNullable(privateKeyJwt); - return this; - } - - @JsonSetter(value = "tls_client_auth", nulls = Nulls.SKIP) - public Builder tlsClientAuth(Optional tlsClientAuth) { - this.tlsClientAuth = tlsClientAuth; - return this; - } - - public Builder tlsClientAuth(ClientCreateAuthenticationMethodTlsClientAuth tlsClientAuth) { - this.tlsClientAuth = Optional.ofNullable(tlsClientAuth); - return this; - } - - @JsonSetter(value = "self_signed_tls_client_auth", nulls = Nulls.SKIP) - public Builder selfSignedTlsClientAuth( - Optional selfSignedTlsClientAuth) { - this.selfSignedTlsClientAuth = selfSignedTlsClientAuth; - return this; - } - - public Builder selfSignedTlsClientAuth( - CreateClientAuthenticationMethodSelfSignedTlsClientAuth selfSignedTlsClientAuth) { - this.selfSignedTlsClientAuth = Optional.ofNullable(selfSignedTlsClientAuth); - return this; - } - - public ClientCreateAuthenticationMethod build() { - return new ClientCreateAuthenticationMethod( - privateKeyJwt, tlsClientAuth, selfSignedTlsClientAuth, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientCreateAuthenticationMethodPrivateKeyJwt.java b/src/main/java/com/auth0/client/mgmt/types/ClientCreateAuthenticationMethodPrivateKeyJwt.java deleted file mode 100644 index c06ecd0e4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientCreateAuthenticationMethodPrivateKeyJwt.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = ClientCreateAuthenticationMethodPrivateKeyJwt.Builder.class) -public final class ClientCreateAuthenticationMethodPrivateKeyJwt { - private final List credentials; - - private final Map additionalProperties; - - private ClientCreateAuthenticationMethodPrivateKeyJwt( - List credentials, Map additionalProperties) { - this.credentials = credentials; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("credentials") - public List getCredentials() { - return credentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientCreateAuthenticationMethodPrivateKeyJwt - && equalTo((ClientCreateAuthenticationMethodPrivateKeyJwt) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientCreateAuthenticationMethodPrivateKeyJwt other) { - return credentials.equals(other.credentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.credentials); - } - - @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 credentials = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientCreateAuthenticationMethodPrivateKeyJwt other) { - credentials(other.getCredentials()); - return this; - } - - @JsonSetter(value = "credentials", nulls = Nulls.SKIP) - public Builder credentials(List credentials) { - this.credentials.clear(); - if (credentials != null) { - this.credentials.addAll(credentials); - } - return this; - } - - public Builder addCredentials(PublicKeyCredential credentials) { - this.credentials.add(credentials); - return this; - } - - public Builder addAllCredentials(List credentials) { - if (credentials != null) { - this.credentials.addAll(credentials); - } - return this; - } - - public ClientCreateAuthenticationMethodPrivateKeyJwt build() { - return new ClientCreateAuthenticationMethodPrivateKeyJwt(credentials, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientCreateAuthenticationMethodTlsClientAuth.java b/src/main/java/com/auth0/client/mgmt/types/ClientCreateAuthenticationMethodTlsClientAuth.java deleted file mode 100644 index 01c250372..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientCreateAuthenticationMethodTlsClientAuth.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = ClientCreateAuthenticationMethodTlsClientAuth.Builder.class) -public final class ClientCreateAuthenticationMethodTlsClientAuth { - private final List credentials; - - private final Map additionalProperties; - - private ClientCreateAuthenticationMethodTlsClientAuth( - List credentials, Map additionalProperties) { - this.credentials = credentials; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("credentials") - public List getCredentials() { - return credentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientCreateAuthenticationMethodTlsClientAuth - && equalTo((ClientCreateAuthenticationMethodTlsClientAuth) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientCreateAuthenticationMethodTlsClientAuth other) { - return credentials.equals(other.credentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.credentials); - } - - @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 credentials = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientCreateAuthenticationMethodTlsClientAuth other) { - credentials(other.getCredentials()); - return this; - } - - @JsonSetter(value = "credentials", nulls = Nulls.SKIP) - public Builder credentials(List credentials) { - this.credentials.clear(); - if (credentials != null) { - this.credentials.addAll(credentials); - } - return this; - } - - public Builder addCredentials(CertificateSubjectDnCredential credentials) { - this.credentials.add(credentials); - return this; - } - - public Builder addAllCredentials(List credentials) { - if (credentials != null) { - this.credentials.addAll(credentials); - } - return this; - } - - public ClientCreateAuthenticationMethodTlsClientAuth build() { - return new ClientCreateAuthenticationMethodTlsClientAuth(credentials, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientCredential.java b/src/main/java/com/auth0/client/mgmt/types/ClientCredential.java deleted file mode 100644 index 342b3fcfe..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientCredential.java +++ /dev/null @@ -1,383 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ClientCredential.Builder.class) -public final class ClientCredential { - private final Optional id; - - private final Optional name; - - private final Optional kid; - - private final Optional alg; - - private final Optional credentialType; - - private final Optional subjectDn; - - private final Optional thumbprintSha256; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional expiresAt; - - private final Map additionalProperties; - - private ClientCredential( - Optional id, - Optional name, - Optional kid, - Optional alg, - Optional credentialType, - Optional subjectDn, - Optional thumbprintSha256, - Optional createdAt, - Optional updatedAt, - Optional expiresAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.kid = kid; - this.alg = alg; - this.credentialType = credentialType; - this.subjectDn = subjectDn; - this.thumbprintSha256 = thumbprintSha256; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.expiresAt = expiresAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the credential. Generated on creation. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name given to the credential by the user. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The key identifier of the credential, generated on creation. - */ - @JsonProperty("kid") - public Optional getKid() { - return kid; - } - - @JsonProperty("alg") - public Optional getAlg() { - return alg; - } - - @JsonProperty("credential_type") - public Optional getCredentialType() { - return credentialType; - } - - /** - * @return The X509 certificate's Subject Distinguished Name - */ - @JsonProperty("subject_dn") - public Optional getSubjectDn() { - return subjectDn; - } - - /** - * @return The X509 certificate's SHA256 thumbprint - */ - @JsonProperty("thumbprint_sha256") - public Optional getThumbprintSha256() { - return thumbprintSha256; - } - - /** - * @return The ISO 8601 formatted date the credential was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The ISO 8601 formatted date the credential was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return The ISO 8601 formatted date representing the expiration of the credential. - */ - @JsonProperty("expires_at") - public Optional getExpiresAt() { - return expiresAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientCredential && equalTo((ClientCredential) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientCredential other) { - return id.equals(other.id) - && name.equals(other.name) - && kid.equals(other.kid) - && alg.equals(other.alg) - && credentialType.equals(other.credentialType) - && subjectDn.equals(other.subjectDn) - && thumbprintSha256.equals(other.thumbprintSha256) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && expiresAt.equals(other.expiresAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.kid, - this.alg, - this.credentialType, - this.subjectDn, - this.thumbprintSha256, - this.createdAt, - this.updatedAt, - this.expiresAt); - } - - @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 kid = Optional.empty(); - - private Optional alg = Optional.empty(); - - private Optional credentialType = Optional.empty(); - - private Optional subjectDn = Optional.empty(); - - private Optional thumbprintSha256 = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional expiresAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientCredential other) { - id(other.getId()); - name(other.getName()); - kid(other.getKid()); - alg(other.getAlg()); - credentialType(other.getCredentialType()); - subjectDn(other.getSubjectDn()); - thumbprintSha256(other.getThumbprintSha256()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - expiresAt(other.getExpiresAt()); - return this; - } - - /** - *

ID of the credential. Generated on creation.

- */ - @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 given to the credential by the 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; - } - - /** - *

The key identifier of the credential, generated on creation.

- */ - @JsonSetter(value = "kid", nulls = Nulls.SKIP) - public Builder kid(Optional kid) { - this.kid = kid; - return this; - } - - public Builder kid(String kid) { - this.kid = Optional.ofNullable(kid); - return this; - } - - @JsonSetter(value = "alg", nulls = Nulls.SKIP) - public Builder alg(Optional alg) { - this.alg = alg; - return this; - } - - public Builder alg(ClientCredentialAlgorithmEnum alg) { - this.alg = Optional.ofNullable(alg); - return this; - } - - @JsonSetter(value = "credential_type", nulls = Nulls.SKIP) - public Builder credentialType(Optional credentialType) { - this.credentialType = credentialType; - return this; - } - - public Builder credentialType(ClientCredentialTypeEnum credentialType) { - this.credentialType = Optional.ofNullable(credentialType); - return this; - } - - /** - *

The X509 certificate's Subject Distinguished Name

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

The X509 certificate's SHA256 thumbprint

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

The ISO 8601 formatted date the credential 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 formatted date the credential was 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; - } - - /** - *

The ISO 8601 formatted date representing the expiration of the credential.

- */ - @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - public Builder expiresAt(OffsetDateTime expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); - return this; - } - - public ClientCredential build() { - return new ClientCredential( - id, - name, - kid, - alg, - credentialType, - subjectDn, - thumbprintSha256, - createdAt, - updatedAt, - expiresAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientCredentialAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientCredentialAlgorithmEnum.java deleted file mode 100644 index 93630fa34..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientCredentialAlgorithmEnum.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientCredentialAlgorithmEnum { - public static final ClientCredentialAlgorithmEnum PS256 = new ClientCredentialAlgorithmEnum(Value.PS256, "PS256"); - - public static final ClientCredentialAlgorithmEnum RS256 = new ClientCredentialAlgorithmEnum(Value.RS256, "RS256"); - - public static final ClientCredentialAlgorithmEnum RS384 = new ClientCredentialAlgorithmEnum(Value.RS384, "RS384"); - - private final Value value; - - private final String string; - - ClientCredentialAlgorithmEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientCredentialAlgorithmEnum - && this.string.equals(((ClientCredentialAlgorithmEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PS256: - return visitor.visitPs256(); - case RS256: - return visitor.visitRs256(); - case RS384: - return visitor.visitRs384(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ClientCredentialAlgorithmEnum valueOf(String value) { - switch (value) { - case "PS256": - return PS256; - case "RS256": - return RS256; - case "RS384": - return RS384; - default: - return new ClientCredentialAlgorithmEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - RS256, - - RS384, - - PS256, - - UNKNOWN - } - - public interface Visitor { - T visitRs256(); - - T visitRs384(); - - T visitPs256(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientCredentialTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientCredentialTypeEnum.java deleted file mode 100644 index ab30a486b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientCredentialTypeEnum.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientCredentialTypeEnum { - public static final ClientCredentialTypeEnum CERT_SUBJECT_DN = - new ClientCredentialTypeEnum(Value.CERT_SUBJECT_DN, "cert_subject_dn"); - - public static final ClientCredentialTypeEnum PUBLIC_KEY = - new ClientCredentialTypeEnum(Value.PUBLIC_KEY, "public_key"); - - public static final ClientCredentialTypeEnum X509CERT = new ClientCredentialTypeEnum(Value.X509CERT, "x509_cert"); - - private final Value value; - - private final String string; - - ClientCredentialTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientCredentialTypeEnum - && this.string.equals(((ClientCredentialTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CERT_SUBJECT_DN: - return visitor.visitCertSubjectDn(); - case PUBLIC_KEY: - return visitor.visitPublicKey(); - case X509CERT: - return visitor.visitX509Cert(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ClientCredentialTypeEnum valueOf(String value) { - switch (value) { - case "cert_subject_dn": - return CERT_SUBJECT_DN; - case "public_key": - return PUBLIC_KEY; - case "x509_cert": - return X509CERT; - default: - return new ClientCredentialTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PUBLIC_KEY, - - CERT_SUBJECT_DN, - - X509CERT, - - UNKNOWN - } - - public interface Visitor { - T visitPublicKey(); - - T visitCertSubjectDn(); - - T visitX509Cert(); - - 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 deleted file mode 100644 index e1dd5e2b4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientDefaultOrganization.java +++ /dev/null @@ -1,177 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = ClientDefaultOrganization.Builder.class) -public final class ClientDefaultOrganization { - private final String organizationId; - - private final List flows; - - private final Map additionalProperties; - - private ClientDefaultOrganization( - String organizationId, - List flows, - Map additionalProperties) { - this.organizationId = organizationId; - this.flows = flows; - this.additionalProperties = additionalProperties; - } - - /** - * @return The default Organization ID to be used - */ - @JsonProperty("organization_id") - public String getOrganizationId() { - return organizationId; - } - - /** - * @return The default Organization usage - */ - @JsonProperty("flows") - public List getFlows() { - return flows; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientDefaultOrganization && equalTo((ClientDefaultOrganization) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientDefaultOrganization other) { - return organizationId.equals(other.organizationId) && flows.equals(other.flows); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.organizationId, this.flows); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static OrganizationIdStage builder() { - return new Builder(); - } - - public interface OrganizationIdStage { - /** - *

The default Organization ID to be used

- */ - _FinalStage organizationId(@NotNull String organizationId); - - Builder from(ClientDefaultOrganization other); - } - - public interface _FinalStage { - ClientDefaultOrganization build(); - - /** - *

The default Organization usage

- */ - _FinalStage flows(List flows); - - _FinalStage addFlows(ClientDefaultOrganizationFlowsEnum flows); - - _FinalStage addAllFlows(List flows); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements OrganizationIdStage, _FinalStage { - private String organizationId; - - private List flows = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ClientDefaultOrganization other) { - organizationId(other.getOrganizationId()); - flows(other.getFlows()); - return this; - } - - /** - *

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. - */ - @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 default Organization usage

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

The default Organization usage

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addFlows(ClientDefaultOrganizationFlowsEnum flows) { - this.flows.add(flows); - return this; - } - - /** - *

The default Organization usage

- */ - @java.lang.Override - @JsonSetter(value = "flows", nulls = Nulls.SKIP) - public _FinalStage flows(List flows) { - this.flows.clear(); - if (flows != null) { - this.flows.addAll(flows); - } - return this; - } - - @java.lang.Override - public ClientDefaultOrganization build() { - return new ClientDefaultOrganization(organizationId, flows, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientDefaultOrganizationFlowsEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientDefaultOrganizationFlowsEnum.java deleted file mode 100644 index 89bf49f82..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientDefaultOrganizationFlowsEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientDefaultOrganizationFlowsEnum { - public static final ClientDefaultOrganizationFlowsEnum CLIENT_CREDENTIALS = - new ClientDefaultOrganizationFlowsEnum(Value.CLIENT_CREDENTIALS, "client_credentials"); - - private final Value value; - - private final String string; - - ClientDefaultOrganizationFlowsEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientDefaultOrganizationFlowsEnum - && this.string.equals(((ClientDefaultOrganizationFlowsEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CLIENT_CREDENTIALS: - return visitor.visitClientCredentials(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ClientDefaultOrganizationFlowsEnum valueOf(String value) { - switch (value) { - case "client_credentials": - return CLIENT_CREDENTIALS; - default: - return new ClientDefaultOrganizationFlowsEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - CLIENT_CREDENTIALS, - - UNKNOWN - } - - public interface Visitor { - T visitClientCredentials(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientEncryptionKey.java b/src/main/java/com/auth0/client/mgmt/types/ClientEncryptionKey.java deleted file mode 100644 index e50045c53..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientEncryptionKey.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientEncryptionKey.Builder.class) -public final class ClientEncryptionKey { - private final Optional pub; - - private final Optional cert; - - private final Optional subject; - - private final Map additionalProperties; - - private ClientEncryptionKey( - Optional pub, - Optional cert, - Optional subject, - Map additionalProperties) { - this.pub = pub; - this.cert = cert; - this.subject = subject; - this.additionalProperties = additionalProperties; - } - - /** - * @return Encryption Public RSA Key. - */ - @JsonProperty("pub") - public Optional getPub() { - return pub; - } - - /** - * @return Encryption certificate for public key in X.509 (.CER) format. - */ - @JsonProperty("cert") - public Optional getCert() { - return cert; - } - - /** - * @return Encryption certificate name for this certificate in the format /CN={domain}. - */ - @JsonProperty("subject") - public Optional getSubject() { - return subject; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientEncryptionKey && equalTo((ClientEncryptionKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientEncryptionKey other) { - return pub.equals(other.pub) && cert.equals(other.cert) && subject.equals(other.subject); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.pub, this.cert, this.subject); - } - - @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 pub = Optional.empty(); - - private Optional cert = Optional.empty(); - - private Optional subject = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientEncryptionKey other) { - pub(other.getPub()); - cert(other.getCert()); - subject(other.getSubject()); - return this; - } - - /** - *

Encryption Public RSA Key.

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

Encryption certificate for public key in X.509 (.CER) format.

- */ - @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; - } - - /** - *

Encryption certificate name for this certificate in the format /CN={domain}.

- */ - @JsonSetter(value = "subject", nulls = Nulls.SKIP) - public Builder subject(Optional subject) { - this.subject = subject; - return this; - } - - public Builder subject(String subject) { - this.subject = Optional.ofNullable(subject); - return this; - } - - public ClientEncryptionKey build() { - return new ClientEncryptionKey(pub, cert, subject, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientGrantOrganizationNullableUsageEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientGrantOrganizationNullableUsageEnum.java deleted file mode 100644 index fc5c9c0ca..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientGrantOrganizationNullableUsageEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientGrantOrganizationNullableUsageEnum { - public static final ClientGrantOrganizationNullableUsageEnum ALLOW = - new ClientGrantOrganizationNullableUsageEnum(Value.ALLOW, "allow"); - - public static final ClientGrantOrganizationNullableUsageEnum REQUIRE = - new ClientGrantOrganizationNullableUsageEnum(Value.REQUIRE, "require"); - - public static final ClientGrantOrganizationNullableUsageEnum DENY = - new ClientGrantOrganizationNullableUsageEnum(Value.DENY, "deny"); - - private final Value value; - - private final String string; - - ClientGrantOrganizationNullableUsageEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientGrantOrganizationNullableUsageEnum - && this.string.equals(((ClientGrantOrganizationNullableUsageEnum) 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 ClientGrantOrganizationNullableUsageEnum valueOf(String value) { - switch (value) { - case "allow": - return ALLOW; - case "require": - return REQUIRE; - case "deny": - return DENY; - default: - return new ClientGrantOrganizationNullableUsageEnum(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/ClientGrantOrganizationUsageEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientGrantOrganizationUsageEnum.java deleted file mode 100644 index c8b268c8d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientGrantOrganizationUsageEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientGrantOrganizationUsageEnum { - public static final ClientGrantOrganizationUsageEnum ALLOW = - new ClientGrantOrganizationUsageEnum(Value.ALLOW, "allow"); - - public static final ClientGrantOrganizationUsageEnum REQUIRE = - new ClientGrantOrganizationUsageEnum(Value.REQUIRE, "require"); - - public static final ClientGrantOrganizationUsageEnum DENY = - new ClientGrantOrganizationUsageEnum(Value.DENY, "deny"); - - private final Value value; - - private final String string; - - ClientGrantOrganizationUsageEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientGrantOrganizationUsageEnum - && this.string.equals(((ClientGrantOrganizationUsageEnum) 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 ClientGrantOrganizationUsageEnum valueOf(String value) { - switch (value) { - case "allow": - return ALLOW; - case "require": - return REQUIRE; - case "deny": - return DENY; - default: - return new ClientGrantOrganizationUsageEnum(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/ClientGrantResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ClientGrantResponseContent.java deleted file mode 100644 index 5c51f9553..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientGrantResponseContent.java +++ /dev/null @@ -1,383 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientGrantResponseContent.Builder.class) -public final class ClientGrantResponseContent { - private final Optional id; - - private final Optional clientId; - - private final Optional audience; - - private final Optional> scope; - - private final Optional organizationUsage; - - private final Optional allowAnyOrganization; - - private final Optional isSystem; - - private final Optional subjectType; - - private final Optional> authorizationDetailsTypes; - - private final Optional allowAllScopes; - - private final Map additionalProperties; - - private ClientGrantResponseContent( - Optional id, - Optional clientId, - Optional audience, - Optional> scope, - Optional organizationUsage, - Optional allowAnyOrganization, - Optional isSystem, - Optional subjectType, - Optional> authorizationDetailsTypes, - Optional allowAllScopes, - Map additionalProperties) { - this.id = id; - this.clientId = clientId; - this.audience = audience; - this.scope = scope; - this.organizationUsage = organizationUsage; - this.allowAnyOrganization = allowAnyOrganization; - this.isSystem = isSystem; - this.subjectType = subjectType; - this.authorizationDetailsTypes = authorizationDetailsTypes; - this.allowAllScopes = allowAllScopes; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the client grant. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return ID of the client. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @return The audience (API identifier) of this client grant. - */ - @JsonProperty("audience") - public Optional getAudience() { - return audience; - } - - /** - * @return Scopes allowed for this client grant. - */ - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonProperty("organization_usage") - public Optional getOrganizationUsage() { - return organizationUsage; - } - - /** - * @return If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations. - */ - @JsonProperty("allow_any_organization") - public Optional getAllowAnyOrganization() { - return allowAnyOrganization; - } - - /** - * @return If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly. - */ - @JsonProperty("is_system") - public Optional getIsSystem() { - return isSystem; - } - - @JsonProperty("subject_type") - public Optional getSubjectType() { - return subjectType; - } - - /** - * @return Types of authorization_details allowed for this client grant. - */ - @JsonProperty("authorization_details_types") - public Optional> getAuthorizationDetailsTypes() { - return authorizationDetailsTypes; - } - - /** - * @return If enabled, all scopes configured on the resource server are allowed for this grant. - */ - @JsonProperty("allow_all_scopes") - public Optional getAllowAllScopes() { - return allowAllScopes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientGrantResponseContent && equalTo((ClientGrantResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientGrantResponseContent other) { - return id.equals(other.id) - && clientId.equals(other.clientId) - && audience.equals(other.audience) - && scope.equals(other.scope) - && organizationUsage.equals(other.organizationUsage) - && allowAnyOrganization.equals(other.allowAnyOrganization) - && isSystem.equals(other.isSystem) - && subjectType.equals(other.subjectType) - && authorizationDetailsTypes.equals(other.authorizationDetailsTypes) - && allowAllScopes.equals(other.allowAllScopes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.clientId, - this.audience, - this.scope, - this.organizationUsage, - this.allowAnyOrganization, - this.isSystem, - this.subjectType, - this.authorizationDetailsTypes, - this.allowAllScopes); - } - - @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 clientId = Optional.empty(); - - private Optional audience = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional organizationUsage = Optional.empty(); - - private Optional allowAnyOrganization = Optional.empty(); - - private Optional isSystem = Optional.empty(); - - private Optional subjectType = Optional.empty(); - - private Optional> authorizationDetailsTypes = Optional.empty(); - - private Optional allowAllScopes = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientGrantResponseContent other) { - id(other.getId()); - clientId(other.getClientId()); - audience(other.getAudience()); - scope(other.getScope()); - organizationUsage(other.getOrganizationUsage()); - allowAnyOrganization(other.getAllowAnyOrganization()); - isSystem(other.getIsSystem()); - subjectType(other.getSubjectType()); - authorizationDetailsTypes(other.getAuthorizationDetailsTypes()); - allowAllScopes(other.getAllowAllScopes()); - return this; - } - - /** - *

ID of the client grant.

- */ - @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; - } - - /** - *

ID of the 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 audience (API identifier) of this client grant.

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

Scopes allowed for this client grant.

- */ - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "organization_usage", nulls = Nulls.SKIP) - public Builder organizationUsage(Optional organizationUsage) { - this.organizationUsage = organizationUsage; - return this; - } - - public Builder organizationUsage(ClientGrantOrganizationUsageEnum organizationUsage) { - this.organizationUsage = Optional.ofNullable(organizationUsage); - return this; - } - - /** - *

If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.

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

If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly.

- */ - @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; - } - - @JsonSetter(value = "subject_type", nulls = Nulls.SKIP) - public Builder subjectType(Optional subjectType) { - this.subjectType = subjectType; - return this; - } - - public Builder subjectType(ClientGrantSubjectTypeEnum subjectType) { - this.subjectType = Optional.ofNullable(subjectType); - return this; - } - - /** - *

Types of authorization_details allowed for this client grant.

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

If enabled, all scopes configured on the resource server are allowed for this grant.

- */ - @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; - } - - public ClientGrantResponseContent build() { - return new ClientGrantResponseContent( - id, - clientId, - audience, - scope, - organizationUsage, - allowAnyOrganization, - isSystem, - subjectType, - authorizationDetailsTypes, - allowAllScopes, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientGrantSubjectTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientGrantSubjectTypeEnum.java deleted file mode 100644 index 7ea37cc47..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientGrantSubjectTypeEnum.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientGrantSubjectTypeEnum { - public static final ClientGrantSubjectTypeEnum USER = new ClientGrantSubjectTypeEnum(Value.USER, "user"); - - public static final ClientGrantSubjectTypeEnum CLIENT = new ClientGrantSubjectTypeEnum(Value.CLIENT, "client"); - - private final Value value; - - private final String string; - - ClientGrantSubjectTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientGrantSubjectTypeEnum - && this.string.equals(((ClientGrantSubjectTypeEnum) 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 CLIENT: - return visitor.visitClient(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ClientGrantSubjectTypeEnum valueOf(String value) { - switch (value) { - case "user": - return USER; - case "client": - return CLIENT; - default: - return new ClientGrantSubjectTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - CLIENT, - - USER, - - UNKNOWN - } - - public interface Visitor { - T visitClient(); - - T visitUser(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientJwtConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ClientJwtConfiguration.java deleted file mode 100644 index 8659fa47a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientJwtConfiguration.java +++ /dev/null @@ -1,181 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientJwtConfiguration.Builder.class) -public final class ClientJwtConfiguration { - private final Optional lifetimeInSeconds; - - private final Optional secretEncoded; - - private final Optional> scopes; - - private final Optional alg; - - private final Map additionalProperties; - - private ClientJwtConfiguration( - Optional lifetimeInSeconds, - Optional secretEncoded, - Optional> scopes, - Optional alg, - Map additionalProperties) { - this.lifetimeInSeconds = lifetimeInSeconds; - this.secretEncoded = secretEncoded; - this.scopes = scopes; - this.alg = alg; - this.additionalProperties = additionalProperties; - } - - /** - * @return Number of seconds the JWT will be valid for (affects exp claim). - */ - @JsonProperty("lifetime_in_seconds") - public Optional getLifetimeInSeconds() { - return lifetimeInSeconds; - } - - /** - * @return Whether the client secret is base64 encoded (true) or unencoded (false). - */ - @JsonProperty("secret_encoded") - public Optional getSecretEncoded() { - return secretEncoded; - } - - @JsonProperty("scopes") - public Optional> getScopes() { - return scopes; - } - - @JsonProperty("alg") - public Optional getAlg() { - return alg; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientJwtConfiguration && equalTo((ClientJwtConfiguration) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientJwtConfiguration other) { - return lifetimeInSeconds.equals(other.lifetimeInSeconds) - && secretEncoded.equals(other.secretEncoded) - && scopes.equals(other.scopes) - && alg.equals(other.alg); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.lifetimeInSeconds, this.secretEncoded, this.scopes, this.alg); - } - - @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 lifetimeInSeconds = Optional.empty(); - - private Optional secretEncoded = Optional.empty(); - - private Optional> scopes = Optional.empty(); - - private Optional alg = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientJwtConfiguration other) { - lifetimeInSeconds(other.getLifetimeInSeconds()); - secretEncoded(other.getSecretEncoded()); - scopes(other.getScopes()); - alg(other.getAlg()); - return this; - } - - /** - *

Number of seconds the JWT will be valid for (affects exp claim).

- */ - @JsonSetter(value = "lifetime_in_seconds", nulls = Nulls.SKIP) - public Builder lifetimeInSeconds(Optional lifetimeInSeconds) { - this.lifetimeInSeconds = lifetimeInSeconds; - return this; - } - - public Builder lifetimeInSeconds(Integer lifetimeInSeconds) { - this.lifetimeInSeconds = Optional.ofNullable(lifetimeInSeconds); - return this; - } - - /** - *

Whether the client secret is base64 encoded (true) or unencoded (false).

- */ - @JsonSetter(value = "secret_encoded", nulls = Nulls.SKIP) - public Builder secretEncoded(Optional secretEncoded) { - this.secretEncoded = secretEncoded; - return this; - } - - public Builder secretEncoded(Boolean secretEncoded) { - this.secretEncoded = Optional.ofNullable(secretEncoded); - return this; - } - - @JsonSetter(value = "scopes", nulls = Nulls.SKIP) - public Builder scopes(Optional> scopes) { - this.scopes = scopes; - return this; - } - - public Builder scopes(Map scopes) { - this.scopes = Optional.ofNullable(scopes); - return this; - } - - @JsonSetter(value = "alg", nulls = Nulls.SKIP) - public Builder alg(Optional alg) { - this.alg = alg; - return this; - } - - public Builder alg(SigningAlgorithmEnum alg) { - this.alg = Optional.ofNullable(alg); - return this; - } - - public ClientJwtConfiguration build() { - return new ClientJwtConfiguration(lifetimeInSeconds, secretEncoded, scopes, alg, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientMobile.java b/src/main/java/com/auth0/client/mgmt/types/ClientMobile.java deleted file mode 100644 index a62211571..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientMobile.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientMobile.Builder.class) -public final class ClientMobile { - private final Optional android; - - private final Optional ios; - - private final Map additionalProperties; - - private ClientMobile( - Optional android, - Optional ios, - Map additionalProperties) { - this.android = android; - this.ios = ios; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("android") - public Optional getAndroid() { - return android; - } - - @JsonProperty("ios") - public Optional getIos() { - return ios; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientMobile && equalTo((ClientMobile) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientMobile other) { - return android.equals(other.android) && ios.equals(other.ios); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.android, this.ios); - } - - @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 android = Optional.empty(); - - private Optional ios = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientMobile other) { - android(other.getAndroid()); - ios(other.getIos()); - return this; - } - - @JsonSetter(value = "android", nulls = Nulls.SKIP) - public Builder android(Optional android) { - this.android = android; - return this; - } - - public Builder android(ClientMobileAndroid android) { - this.android = Optional.ofNullable(android); - return this; - } - - @JsonSetter(value = "ios", nulls = Nulls.SKIP) - public Builder ios(Optional ios) { - this.ios = ios; - return this; - } - - public Builder ios(ClientMobileiOs ios) { - this.ios = Optional.ofNullable(ios); - return this; - } - - public ClientMobile build() { - return new ClientMobile(android, ios, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientMobileAndroid.java b/src/main/java/com/auth0/client/mgmt/types/ClientMobileAndroid.java deleted file mode 100644 index 94c21d350..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientMobileAndroid.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientMobileAndroid.Builder.class) -public final class ClientMobileAndroid { - private final Optional appPackageName; - - private final Optional> sha256CertFingerprints; - - private final Map additionalProperties; - - private ClientMobileAndroid( - Optional appPackageName, - Optional> sha256CertFingerprints, - Map additionalProperties) { - this.appPackageName = appPackageName; - this.sha256CertFingerprints = sha256CertFingerprints; - this.additionalProperties = additionalProperties; - } - - /** - * @return App package name found in AndroidManifest.xml. - */ - @JsonProperty("app_package_name") - public Optional getAppPackageName() { - return appPackageName; - } - - /** - * @return SHA256 fingerprints of the app's signing certificate. Multiple fingerprints can be used to support different versions of your app, such as debug and production builds. - */ - @JsonProperty("sha256_cert_fingerprints") - public Optional> getSha256CertFingerprints() { - return sha256CertFingerprints; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientMobileAndroid && equalTo((ClientMobileAndroid) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientMobileAndroid other) { - return appPackageName.equals(other.appPackageName) - && sha256CertFingerprints.equals(other.sha256CertFingerprints); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.appPackageName, this.sha256CertFingerprints); - } - - @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 appPackageName = Optional.empty(); - - private Optional> sha256CertFingerprints = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientMobileAndroid other) { - appPackageName(other.getAppPackageName()); - sha256CertFingerprints(other.getSha256CertFingerprints()); - return this; - } - - /** - *

App package name found in AndroidManifest.xml.

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

SHA256 fingerprints of the app's signing certificate. Multiple fingerprints can be used to support different versions of your app, such as debug and production builds.

- */ - @JsonSetter(value = "sha256_cert_fingerprints", nulls = Nulls.SKIP) - public Builder sha256CertFingerprints(Optional> sha256CertFingerprints) { - this.sha256CertFingerprints = sha256CertFingerprints; - return this; - } - - public Builder sha256CertFingerprints(List sha256CertFingerprints) { - this.sha256CertFingerprints = Optional.ofNullable(sha256CertFingerprints); - return this; - } - - public ClientMobileAndroid build() { - return new ClientMobileAndroid(appPackageName, sha256CertFingerprints, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientMobileiOs.java b/src/main/java/com/auth0/client/mgmt/types/ClientMobileiOs.java deleted file mode 100644 index f8de2b1f8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientMobileiOs.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientMobileiOs.Builder.class) -public final class ClientMobileiOs { - private final Optional teamId; - - private final Optional appBundleIdentifier; - - private final Map additionalProperties; - - private ClientMobileiOs( - Optional teamId, Optional appBundleIdentifier, Map additionalProperties) { - this.teamId = teamId; - this.appBundleIdentifier = appBundleIdentifier; - this.additionalProperties = additionalProperties; - } - - /** - * @return Identifier assigned to the Apple account that signs and uploads the app to the store. - */ - @JsonProperty("team_id") - public Optional getTeamId() { - return teamId; - } - - /** - * @return Assigned by developer to the app as its unique identifier inside the store. Usually this is a reverse domain plus the app name, e.g. com.you.MyApp. - */ - @JsonProperty("app_bundle_identifier") - public Optional getAppBundleIdentifier() { - return appBundleIdentifier; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientMobileiOs && equalTo((ClientMobileiOs) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientMobileiOs other) { - return teamId.equals(other.teamId) && appBundleIdentifier.equals(other.appBundleIdentifier); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.teamId, this.appBundleIdentifier); - } - - @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 teamId = Optional.empty(); - - private Optional appBundleIdentifier = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientMobileiOs other) { - teamId(other.getTeamId()); - appBundleIdentifier(other.getAppBundleIdentifier()); - return this; - } - - /** - *

Identifier assigned to the Apple account that signs and uploads the app to the store.

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

Assigned by developer to the app as its unique identifier inside the store. Usually this is a reverse domain plus the app name, e.g. com.you.MyApp.

- */ - @JsonSetter(value = "app_bundle_identifier", nulls = Nulls.SKIP) - public Builder appBundleIdentifier(Optional appBundleIdentifier) { - this.appBundleIdentifier = appBundleIdentifier; - return this; - } - - public Builder appBundleIdentifier(String appBundleIdentifier) { - this.appBundleIdentifier = Optional.ofNullable(appBundleIdentifier); - return this; - } - - public ClientMobileiOs build() { - return new ClientMobileiOs(teamId, appBundleIdentifier, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutInitiators.java b/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutInitiators.java deleted file mode 100644 index 1b2dcd6dc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutInitiators.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientOidcBackchannelLogoutInitiators.Builder.class) -public final class ClientOidcBackchannelLogoutInitiators { - private final Optional mode; - - private final Optional> selectedInitiators; - - private final Map additionalProperties; - - private ClientOidcBackchannelLogoutInitiators( - Optional mode, - Optional> selectedInitiators, - Map additionalProperties) { - this.mode = mode; - this.selectedInitiators = selectedInitiators; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("mode") - public Optional getMode() { - return mode; - } - - @JsonProperty("selected_initiators") - public Optional> getSelectedInitiators() { - return selectedInitiators; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientOidcBackchannelLogoutInitiators - && equalTo((ClientOidcBackchannelLogoutInitiators) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientOidcBackchannelLogoutInitiators other) { - return mode.equals(other.mode) && selectedInitiators.equals(other.selectedInitiators); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.mode, this.selectedInitiators); - } - - @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 mode = Optional.empty(); - - private Optional> selectedInitiators = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientOidcBackchannelLogoutInitiators other) { - mode(other.getMode()); - selectedInitiators(other.getSelectedInitiators()); - return this; - } - - @JsonSetter(value = "mode", nulls = Nulls.SKIP) - public Builder mode(Optional mode) { - this.mode = mode; - return this; - } - - public Builder mode(ClientOidcBackchannelLogoutInitiatorsModeEnum mode) { - this.mode = Optional.ofNullable(mode); - return this; - } - - @JsonSetter(value = "selected_initiators", nulls = Nulls.SKIP) - public Builder selectedInitiators( - Optional> selectedInitiators) { - this.selectedInitiators = selectedInitiators; - return this; - } - - public Builder selectedInitiators(List selectedInitiators) { - this.selectedInitiators = Optional.ofNullable(selectedInitiators); - return this; - } - - public ClientOidcBackchannelLogoutInitiators build() { - return new ClientOidcBackchannelLogoutInitiators(mode, selectedInitiators, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutInitiatorsEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutInitiatorsEnum.java deleted file mode 100644 index 06bdb72fb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutInitiatorsEnum.java +++ /dev/null @@ -1,163 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientOidcBackchannelLogoutInitiatorsEnum { - public static final ClientOidcBackchannelLogoutInitiatorsEnum EMAIL_IDENTIFIER_CHANGED = - new ClientOidcBackchannelLogoutInitiatorsEnum(Value.EMAIL_IDENTIFIER_CHANGED, "email-identifier-changed"); - - public static final ClientOidcBackchannelLogoutInitiatorsEnum MFA_PHONE_UNENROLLED = - new ClientOidcBackchannelLogoutInitiatorsEnum(Value.MFA_PHONE_UNENROLLED, "mfa-phone-unenrolled"); - - public static final ClientOidcBackchannelLogoutInitiatorsEnum ACCOUNT_DELETED = - new ClientOidcBackchannelLogoutInitiatorsEnum(Value.ACCOUNT_DELETED, "account-deleted"); - - public static final ClientOidcBackchannelLogoutInitiatorsEnum SESSION_EXPIRED = - new ClientOidcBackchannelLogoutInitiatorsEnum(Value.SESSION_EXPIRED, "session-expired"); - - public static final ClientOidcBackchannelLogoutInitiatorsEnum ACCOUNT_DEACTIVATED = - new ClientOidcBackchannelLogoutInitiatorsEnum(Value.ACCOUNT_DEACTIVATED, "account-deactivated"); - - public static final ClientOidcBackchannelLogoutInitiatorsEnum PASSWORD_CHANGED = - new ClientOidcBackchannelLogoutInitiatorsEnum(Value.PASSWORD_CHANGED, "password-changed"); - - public static final ClientOidcBackchannelLogoutInitiatorsEnum RP_LOGOUT = - new ClientOidcBackchannelLogoutInitiatorsEnum(Value.RP_LOGOUT, "rp-logout"); - - public static final ClientOidcBackchannelLogoutInitiatorsEnum IDP_LOGOUT = - new ClientOidcBackchannelLogoutInitiatorsEnum(Value.IDP_LOGOUT, "idp-logout"); - - public static final ClientOidcBackchannelLogoutInitiatorsEnum SESSION_REVOKED = - new ClientOidcBackchannelLogoutInitiatorsEnum(Value.SESSION_REVOKED, "session-revoked"); - - private final Value value; - - private final String string; - - ClientOidcBackchannelLogoutInitiatorsEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientOidcBackchannelLogoutInitiatorsEnum - && this.string.equals(((ClientOidcBackchannelLogoutInitiatorsEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EMAIL_IDENTIFIER_CHANGED: - return visitor.visitEmailIdentifierChanged(); - case MFA_PHONE_UNENROLLED: - return visitor.visitMfaPhoneUnenrolled(); - case ACCOUNT_DELETED: - return visitor.visitAccountDeleted(); - case SESSION_EXPIRED: - return visitor.visitSessionExpired(); - case ACCOUNT_DEACTIVATED: - return visitor.visitAccountDeactivated(); - case PASSWORD_CHANGED: - return visitor.visitPasswordChanged(); - case RP_LOGOUT: - return visitor.visitRpLogout(); - case IDP_LOGOUT: - return visitor.visitIdpLogout(); - case SESSION_REVOKED: - return visitor.visitSessionRevoked(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ClientOidcBackchannelLogoutInitiatorsEnum valueOf(String value) { - switch (value) { - case "email-identifier-changed": - return EMAIL_IDENTIFIER_CHANGED; - case "mfa-phone-unenrolled": - return MFA_PHONE_UNENROLLED; - case "account-deleted": - return ACCOUNT_DELETED; - case "session-expired": - return SESSION_EXPIRED; - case "account-deactivated": - return ACCOUNT_DEACTIVATED; - case "password-changed": - return PASSWORD_CHANGED; - case "rp-logout": - return RP_LOGOUT; - case "idp-logout": - return IDP_LOGOUT; - case "session-revoked": - return SESSION_REVOKED; - default: - return new ClientOidcBackchannelLogoutInitiatorsEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - RP_LOGOUT, - - IDP_LOGOUT, - - PASSWORD_CHANGED, - - SESSION_EXPIRED, - - SESSION_REVOKED, - - ACCOUNT_DELETED, - - EMAIL_IDENTIFIER_CHANGED, - - MFA_PHONE_UNENROLLED, - - ACCOUNT_DEACTIVATED, - - UNKNOWN - } - - public interface Visitor { - T visitRpLogout(); - - T visitIdpLogout(); - - T visitPasswordChanged(); - - T visitSessionExpired(); - - T visitSessionRevoked(); - - T visitAccountDeleted(); - - T visitEmailIdentifierChanged(); - - T visitMfaPhoneUnenrolled(); - - T visitAccountDeactivated(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutInitiatorsModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutInitiatorsModeEnum.java deleted file mode 100644 index 37f9ae572..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutInitiatorsModeEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientOidcBackchannelLogoutInitiatorsModeEnum { - public static final ClientOidcBackchannelLogoutInitiatorsModeEnum ALL = - new ClientOidcBackchannelLogoutInitiatorsModeEnum(Value.ALL, "all"); - - public static final ClientOidcBackchannelLogoutInitiatorsModeEnum CUSTOM = - new ClientOidcBackchannelLogoutInitiatorsModeEnum(Value.CUSTOM, "custom"); - - private final Value value; - - private final String string; - - ClientOidcBackchannelLogoutInitiatorsModeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientOidcBackchannelLogoutInitiatorsModeEnum - && this.string.equals(((ClientOidcBackchannelLogoutInitiatorsModeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ALL: - return visitor.visitAll(); - case CUSTOM: - return visitor.visitCustom(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ClientOidcBackchannelLogoutInitiatorsModeEnum valueOf(String value) { - switch (value) { - case "all": - return ALL; - case "custom": - return CUSTOM; - default: - return new ClientOidcBackchannelLogoutInitiatorsModeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - CUSTOM, - - ALL, - - UNKNOWN - } - - public interface Visitor { - T visitCustom(); - - T visitAll(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutSessionMetadata.java b/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutSessionMetadata.java deleted file mode 100644 index 4e15d3014..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutSessionMetadata.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientOidcBackchannelLogoutSessionMetadata.Builder.class) -public final class ClientOidcBackchannelLogoutSessionMetadata { - private final Optional include; - - private final Map additionalProperties; - - private ClientOidcBackchannelLogoutSessionMetadata( - Optional include, Map additionalProperties) { - this.include = include; - this.additionalProperties = additionalProperties; - } - - /** - * @return The include property determines whether session metadata is included in the logout token. - */ - @JsonProperty("include") - public Optional getInclude() { - return include; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientOidcBackchannelLogoutSessionMetadata - && equalTo((ClientOidcBackchannelLogoutSessionMetadata) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientOidcBackchannelLogoutSessionMetadata other) { - return include.equals(other.include); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.include); - } - - @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 include = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientOidcBackchannelLogoutSessionMetadata other) { - include(other.getInclude()); - return this; - } - - /** - *

The include property determines whether session metadata is included in the logout token.

- */ - @JsonSetter(value = "include", nulls = Nulls.SKIP) - public Builder include(Optional include) { - this.include = include; - return this; - } - - public Builder include(Boolean include) { - this.include = Optional.ofNullable(include); - return this; - } - - public ClientOidcBackchannelLogoutSessionMetadata build() { - return new ClientOidcBackchannelLogoutSessionMetadata(include, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutSettings.java b/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutSettings.java deleted file mode 100644 index 634e3fdf9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientOidcBackchannelLogoutSettings.java +++ /dev/null @@ -1,199 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ClientOidcBackchannelLogoutSettings.Builder.class) -public final class ClientOidcBackchannelLogoutSettings { - private final Optional> backchannelLogoutUrls; - - private final Optional backchannelLogoutInitiators; - - private final OptionalNullable backchannelLogoutSessionMetadata; - - private final Map additionalProperties; - - private ClientOidcBackchannelLogoutSettings( - Optional> backchannelLogoutUrls, - Optional backchannelLogoutInitiators, - OptionalNullable backchannelLogoutSessionMetadata, - Map additionalProperties) { - this.backchannelLogoutUrls = backchannelLogoutUrls; - this.backchannelLogoutInitiators = backchannelLogoutInitiators; - this.backchannelLogoutSessionMetadata = backchannelLogoutSessionMetadata; - this.additionalProperties = additionalProperties; - } - - /** - * @return Comma-separated list of URLs that are valid to call back from Auth0 for OIDC backchannel logout. Currently only one URL is allowed. - */ - @JsonProperty("backchannel_logout_urls") - public Optional> getBackchannelLogoutUrls() { - return backchannelLogoutUrls; - } - - @JsonProperty("backchannel_logout_initiators") - public Optional getBackchannelLogoutInitiators() { - return backchannelLogoutInitiators; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("backchannel_logout_session_metadata") - public OptionalNullable getBackchannelLogoutSessionMetadata() { - if (backchannelLogoutSessionMetadata == null) { - return OptionalNullable.absent(); - } - return backchannelLogoutSessionMetadata; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("backchannel_logout_session_metadata") - private OptionalNullable _getBackchannelLogoutSessionMetadata() { - return backchannelLogoutSessionMetadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientOidcBackchannelLogoutSettings - && equalTo((ClientOidcBackchannelLogoutSettings) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientOidcBackchannelLogoutSettings other) { - return backchannelLogoutUrls.equals(other.backchannelLogoutUrls) - && backchannelLogoutInitiators.equals(other.backchannelLogoutInitiators) - && backchannelLogoutSessionMetadata.equals(other.backchannelLogoutSessionMetadata); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.backchannelLogoutUrls, this.backchannelLogoutInitiators, this.backchannelLogoutSessionMetadata); - } - - @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> backchannelLogoutUrls = Optional.empty(); - - private Optional backchannelLogoutInitiators = Optional.empty(); - - private OptionalNullable backchannelLogoutSessionMetadata = - OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientOidcBackchannelLogoutSettings other) { - backchannelLogoutUrls(other.getBackchannelLogoutUrls()); - backchannelLogoutInitiators(other.getBackchannelLogoutInitiators()); - backchannelLogoutSessionMetadata(other.getBackchannelLogoutSessionMetadata()); - return this; - } - - /** - *

Comma-separated list of URLs that are valid to call back from Auth0 for OIDC backchannel logout. Currently only one URL is allowed.

- */ - @JsonSetter(value = "backchannel_logout_urls", nulls = Nulls.SKIP) - public Builder backchannelLogoutUrls(Optional> backchannelLogoutUrls) { - this.backchannelLogoutUrls = backchannelLogoutUrls; - return this; - } - - public Builder backchannelLogoutUrls(List backchannelLogoutUrls) { - this.backchannelLogoutUrls = Optional.ofNullable(backchannelLogoutUrls); - return this; - } - - @JsonSetter(value = "backchannel_logout_initiators", nulls = Nulls.SKIP) - public Builder backchannelLogoutInitiators( - Optional backchannelLogoutInitiators) { - this.backchannelLogoutInitiators = backchannelLogoutInitiators; - return this; - } - - public Builder backchannelLogoutInitiators(ClientOidcBackchannelLogoutInitiators backchannelLogoutInitiators) { - this.backchannelLogoutInitiators = Optional.ofNullable(backchannelLogoutInitiators); - return this; - } - - @JsonSetter(value = "backchannel_logout_session_metadata", nulls = Nulls.SKIP) - public Builder backchannelLogoutSessionMetadata( - @Nullable - OptionalNullable backchannelLogoutSessionMetadata) { - this.backchannelLogoutSessionMetadata = backchannelLogoutSessionMetadata; - return this; - } - - public Builder backchannelLogoutSessionMetadata( - ClientOidcBackchannelLogoutSessionMetadata backchannelLogoutSessionMetadata) { - this.backchannelLogoutSessionMetadata = OptionalNullable.of(backchannelLogoutSessionMetadata); - return this; - } - - public Builder backchannelLogoutSessionMetadata( - Optional backchannelLogoutSessionMetadata) { - if (backchannelLogoutSessionMetadata.isPresent()) { - this.backchannelLogoutSessionMetadata = OptionalNullable.of(backchannelLogoutSessionMetadata.get()); - } else { - this.backchannelLogoutSessionMetadata = OptionalNullable.absent(); - } - return this; - } - - public Builder backchannelLogoutSessionMetadata( - com.auth0.client.mgmt.core.Nullable - backchannelLogoutSessionMetadata) { - if (backchannelLogoutSessionMetadata.isNull()) { - this.backchannelLogoutSessionMetadata = OptionalNullable.ofNull(); - } else if (backchannelLogoutSessionMetadata.isEmpty()) { - this.backchannelLogoutSessionMetadata = OptionalNullable.absent(); - } else { - this.backchannelLogoutSessionMetadata = OptionalNullable.of(backchannelLogoutSessionMetadata.get()); - } - return this; - } - - public ClientOidcBackchannelLogoutSettings build() { - return new ClientOidcBackchannelLogoutSettings( - backchannelLogoutUrls, - backchannelLogoutInitiators, - backchannelLogoutSessionMetadata, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientOrganizationDiscoveryEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientOrganizationDiscoveryEnum.java deleted file mode 100644 index 23b1ec9d1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientOrganizationDiscoveryEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientOrganizationDiscoveryEnum { - public static final ClientOrganizationDiscoveryEnum EMAIL = - new ClientOrganizationDiscoveryEnum(Value.EMAIL, "email"); - - public static final ClientOrganizationDiscoveryEnum ORGANIZATION_NAME = - new ClientOrganizationDiscoveryEnum(Value.ORGANIZATION_NAME, "organization_name"); - - private final Value value; - - private final String string; - - ClientOrganizationDiscoveryEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientOrganizationDiscoveryEnum - && this.string.equals(((ClientOrganizationDiscoveryEnum) 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 ClientOrganizationDiscoveryEnum valueOf(String value) { - switch (value) { - case "email": - return EMAIL; - case "organization_name": - return ORGANIZATION_NAME; - default: - return new ClientOrganizationDiscoveryEnum(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/ClientOrganizationRequireBehaviorEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientOrganizationRequireBehaviorEnum.java deleted file mode 100644 index 6d1316e7a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientOrganizationRequireBehaviorEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientOrganizationRequireBehaviorEnum { - public static final ClientOrganizationRequireBehaviorEnum POST_LOGIN_PROMPT = - new ClientOrganizationRequireBehaviorEnum(Value.POST_LOGIN_PROMPT, "post_login_prompt"); - - public static final ClientOrganizationRequireBehaviorEnum PRE_LOGIN_PROMPT = - new ClientOrganizationRequireBehaviorEnum(Value.PRE_LOGIN_PROMPT, "pre_login_prompt"); - - public static final ClientOrganizationRequireBehaviorEnum NO_PROMPT = - new ClientOrganizationRequireBehaviorEnum(Value.NO_PROMPT, "no_prompt"); - - private final Value value; - - private final String string; - - ClientOrganizationRequireBehaviorEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientOrganizationRequireBehaviorEnum - && this.string.equals(((ClientOrganizationRequireBehaviorEnum) 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 ClientOrganizationRequireBehaviorEnum 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 ClientOrganizationRequireBehaviorEnum(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/ClientOrganizationRequireBehaviorPatchEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientOrganizationRequireBehaviorPatchEnum.java deleted file mode 100644 index da61ba589..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientOrganizationRequireBehaviorPatchEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientOrganizationRequireBehaviorPatchEnum { - public static final ClientOrganizationRequireBehaviorPatchEnum POST_LOGIN_PROMPT = - new ClientOrganizationRequireBehaviorPatchEnum(Value.POST_LOGIN_PROMPT, "post_login_prompt"); - - public static final ClientOrganizationRequireBehaviorPatchEnum PRE_LOGIN_PROMPT = - new ClientOrganizationRequireBehaviorPatchEnum(Value.PRE_LOGIN_PROMPT, "pre_login_prompt"); - - public static final ClientOrganizationRequireBehaviorPatchEnum NO_PROMPT = - new ClientOrganizationRequireBehaviorPatchEnum(Value.NO_PROMPT, "no_prompt"); - - private final Value value; - - private final String string; - - ClientOrganizationRequireBehaviorPatchEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientOrganizationRequireBehaviorPatchEnum - && this.string.equals(((ClientOrganizationRequireBehaviorPatchEnum) 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 ClientOrganizationRequireBehaviorPatchEnum 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 ClientOrganizationRequireBehaviorPatchEnum(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/ClientOrganizationUsageEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientOrganizationUsageEnum.java deleted file mode 100644 index 9acde5a7b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientOrganizationUsageEnum.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientOrganizationUsageEnum { - public static final ClientOrganizationUsageEnum ALLOW = new ClientOrganizationUsageEnum(Value.ALLOW, "allow"); - - public static final ClientOrganizationUsageEnum REQUIRE = new ClientOrganizationUsageEnum(Value.REQUIRE, "require"); - - public static final ClientOrganizationUsageEnum DENY = new ClientOrganizationUsageEnum(Value.DENY, "deny"); - - private final Value value; - - private final String string; - - ClientOrganizationUsageEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientOrganizationUsageEnum - && this.string.equals(((ClientOrganizationUsageEnum) 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 ClientOrganizationUsageEnum valueOf(String value) { - switch (value) { - case "allow": - return ALLOW; - case "require": - return REQUIRE; - case "deny": - return DENY; - default: - return new ClientOrganizationUsageEnum(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/ClientOrganizationUsagePatchEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientOrganizationUsagePatchEnum.java deleted file mode 100644 index 912b7a224..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientOrganizationUsagePatchEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientOrganizationUsagePatchEnum { - public static final ClientOrganizationUsagePatchEnum ALLOW = - new ClientOrganizationUsagePatchEnum(Value.ALLOW, "allow"); - - public static final ClientOrganizationUsagePatchEnum REQUIRE = - new ClientOrganizationUsagePatchEnum(Value.REQUIRE, "require"); - - public static final ClientOrganizationUsagePatchEnum DENY = - new ClientOrganizationUsagePatchEnum(Value.DENY, "deny"); - - private final Value value; - - private final String string; - - ClientOrganizationUsagePatchEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientOrganizationUsagePatchEnum - && this.string.equals(((ClientOrganizationUsagePatchEnum) 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 ClientOrganizationUsagePatchEnum valueOf(String value) { - switch (value) { - case "allow": - return ALLOW; - case "require": - return REQUIRE; - case "deny": - return DENY; - default: - return new ClientOrganizationUsagePatchEnum(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/ClientRefreshTokenConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ClientRefreshTokenConfiguration.java deleted file mode 100644 index 817423d69..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientRefreshTokenConfiguration.java +++ /dev/null @@ -1,406 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientRefreshTokenConfiguration.Builder.class) -public final class ClientRefreshTokenConfiguration { - private final RefreshTokenRotationTypeEnum rotationType; - - private final RefreshTokenExpirationTypeEnum expirationType; - - private final Optional leeway; - - private final Optional tokenLifetime; - - private final Optional infiniteTokenLifetime; - - private final Optional idleTokenLifetime; - - private final Optional infiniteIdleTokenLifetime; - - private final Optional> policies; - - private final Map additionalProperties; - - private ClientRefreshTokenConfiguration( - RefreshTokenRotationTypeEnum rotationType, - RefreshTokenExpirationTypeEnum expirationType, - Optional leeway, - Optional tokenLifetime, - Optional infiniteTokenLifetime, - Optional idleTokenLifetime, - Optional infiniteIdleTokenLifetime, - Optional> policies, - Map additionalProperties) { - this.rotationType = rotationType; - this.expirationType = expirationType; - this.leeway = leeway; - this.tokenLifetime = tokenLifetime; - this.infiniteTokenLifetime = infiniteTokenLifetime; - this.idleTokenLifetime = idleTokenLifetime; - this.infiniteIdleTokenLifetime = infiniteIdleTokenLifetime; - this.policies = policies; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("rotation_type") - public RefreshTokenRotationTypeEnum getRotationType() { - return rotationType; - } - - @JsonProperty("expiration_type") - public RefreshTokenExpirationTypeEnum getExpirationType() { - return expirationType; - } - - /** - * @return Period in seconds where the previous refresh token can be exchanged without triggering breach detection - */ - @JsonProperty("leeway") - public Optional getLeeway() { - return leeway; - } - - /** - * @return Period (in seconds) for which refresh tokens will remain valid - */ - @JsonProperty("token_lifetime") - public Optional getTokenLifetime() { - return tokenLifetime; - } - - /** - * @return Prevents tokens from having a set lifetime when true (takes precedence over token_lifetime values) - */ - @JsonProperty("infinite_token_lifetime") - public Optional getInfiniteTokenLifetime() { - return infiniteTokenLifetime; - } - - /** - * @return Period (in seconds) for which refresh tokens will remain valid without use - */ - @JsonProperty("idle_token_lifetime") - public Optional getIdleTokenLifetime() { - return idleTokenLifetime; - } - - /** - * @return Prevents tokens from expiring without use when true (takes precedence over idle_token_lifetime values) - */ - @JsonProperty("infinite_idle_token_lifetime") - public Optional getInfiniteIdleTokenLifetime() { - return infiniteIdleTokenLifetime; - } - - /** - * @return A collection of policies governing multi-resource refresh token exchange (MRRT), defining how refresh tokens can be used across different resource servers - */ - @JsonProperty("policies") - public Optional> getPolicies() { - return policies; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientRefreshTokenConfiguration && equalTo((ClientRefreshTokenConfiguration) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientRefreshTokenConfiguration other) { - return rotationType.equals(other.rotationType) - && expirationType.equals(other.expirationType) - && leeway.equals(other.leeway) - && tokenLifetime.equals(other.tokenLifetime) - && infiniteTokenLifetime.equals(other.infiniteTokenLifetime) - && idleTokenLifetime.equals(other.idleTokenLifetime) - && infiniteIdleTokenLifetime.equals(other.infiniteIdleTokenLifetime) - && policies.equals(other.policies); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.rotationType, - this.expirationType, - this.leeway, - this.tokenLifetime, - this.infiniteTokenLifetime, - this.idleTokenLifetime, - this.infiniteIdleTokenLifetime, - this.policies); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static RotationTypeStage builder() { - return new Builder(); - } - - public interface RotationTypeStage { - ExpirationTypeStage rotationType(@NotNull RefreshTokenRotationTypeEnum rotationType); - - Builder from(ClientRefreshTokenConfiguration other); - } - - public interface ExpirationTypeStage { - _FinalStage expirationType(@NotNull RefreshTokenExpirationTypeEnum expirationType); - } - - public interface _FinalStage { - ClientRefreshTokenConfiguration build(); - - /** - *

Period in seconds where the previous refresh token can be exchanged without triggering breach detection

- */ - _FinalStage leeway(Optional leeway); - - _FinalStage leeway(Integer leeway); - - /** - *

Period (in seconds) for which refresh tokens will remain valid

- */ - _FinalStage tokenLifetime(Optional tokenLifetime); - - _FinalStage tokenLifetime(Integer tokenLifetime); - - /** - *

Prevents tokens from having a set lifetime when true (takes precedence over token_lifetime values)

- */ - _FinalStage infiniteTokenLifetime(Optional infiniteTokenLifetime); - - _FinalStage infiniteTokenLifetime(Boolean infiniteTokenLifetime); - - /** - *

Period (in seconds) for which refresh tokens will remain valid without use

- */ - _FinalStage idleTokenLifetime(Optional idleTokenLifetime); - - _FinalStage idleTokenLifetime(Integer idleTokenLifetime); - - /** - *

Prevents tokens from expiring without use when true (takes precedence over idle_token_lifetime values)

- */ - _FinalStage infiniteIdleTokenLifetime(Optional infiniteIdleTokenLifetime); - - _FinalStage infiniteIdleTokenLifetime(Boolean infiniteIdleTokenLifetime); - - /** - *

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

- */ - _FinalStage policies(Optional> policies); - - _FinalStage policies(List policies); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements RotationTypeStage, ExpirationTypeStage, _FinalStage { - private RefreshTokenRotationTypeEnum rotationType; - - private RefreshTokenExpirationTypeEnum expirationType; - - private Optional> policies = Optional.empty(); - - private Optional infiniteIdleTokenLifetime = Optional.empty(); - - private Optional idleTokenLifetime = Optional.empty(); - - private Optional infiniteTokenLifetime = Optional.empty(); - - private Optional tokenLifetime = Optional.empty(); - - private Optional leeway = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ClientRefreshTokenConfiguration other) { - rotationType(other.getRotationType()); - expirationType(other.getExpirationType()); - leeway(other.getLeeway()); - tokenLifetime(other.getTokenLifetime()); - infiniteTokenLifetime(other.getInfiniteTokenLifetime()); - idleTokenLifetime(other.getIdleTokenLifetime()); - infiniteIdleTokenLifetime(other.getInfiniteIdleTokenLifetime()); - policies(other.getPolicies()); - return this; - } - - @java.lang.Override - @JsonSetter("rotation_type") - public ExpirationTypeStage rotationType(@NotNull RefreshTokenRotationTypeEnum rotationType) { - this.rotationType = Objects.requireNonNull(rotationType, "rotationType must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("expiration_type") - public _FinalStage expirationType(@NotNull RefreshTokenExpirationTypeEnum expirationType) { - this.expirationType = Objects.requireNonNull(expirationType, "expirationType must not be null"); - return this; - } - - /** - *

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

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

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

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

Prevents tokens from expiring without use when true (takes precedence over idle_token_lifetime values)

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

Prevents tokens from expiring without use when true (takes precedence over idle_token_lifetime values)

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

Period (in seconds) for which refresh tokens will remain valid without use

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

Period (in seconds) for which refresh tokens will remain valid without use

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

Prevents tokens from having a set lifetime when true (takes precedence over token_lifetime values)

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

Prevents tokens from having a set lifetime when true (takes precedence over token_lifetime values)

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

Period (in seconds) for which refresh tokens will remain valid

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

Period (in seconds) for which refresh tokens will remain valid

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

Period in seconds where the previous refresh token can be exchanged without triggering breach detection

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

Period in seconds where the previous refresh token can be exchanged without triggering breach detection

- */ - @java.lang.Override - @JsonSetter(value = "leeway", nulls = Nulls.SKIP) - public _FinalStage leeway(Optional leeway) { - this.leeway = leeway; - return this; - } - - @java.lang.Override - public ClientRefreshTokenConfiguration build() { - return new ClientRefreshTokenConfiguration( - rotationType, - expirationType, - leeway, - tokenLifetime, - infiniteTokenLifetime, - idleTokenLifetime, - infiniteIdleTokenLifetime, - policies, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientRefreshTokenPolicy.java b/src/main/java/com/auth0/client/mgmt/types/ClientRefreshTokenPolicy.java deleted file mode 100644 index 990636950..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientRefreshTokenPolicy.java +++ /dev/null @@ -1,174 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = ClientRefreshTokenPolicy.Builder.class) -public final class ClientRefreshTokenPolicy { - private final String audience; - - private final List scope; - - private final Map additionalProperties; - - private ClientRefreshTokenPolicy(String audience, List scope, Map additionalProperties) { - this.audience = audience; - this.scope = scope; - this.additionalProperties = additionalProperties; - } - - /** - * @return The identifier of the resource server to which the Multi Resource Refresh Token Policy applies - */ - @JsonProperty("audience") - public String getAudience() { - return audience; - } - - /** - * @return The resource server permissions granted under the Multi Resource Refresh Token Policy, defining the context in which an access token can be used - */ - @JsonProperty("scope") - public List getScope() { - return scope; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientRefreshTokenPolicy && equalTo((ClientRefreshTokenPolicy) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientRefreshTokenPolicy other) { - return audience.equals(other.audience) && scope.equals(other.scope); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.audience, this.scope); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static AudienceStage builder() { - return new Builder(); - } - - public interface AudienceStage { - /** - *

The identifier of the resource server to which the Multi Resource Refresh Token Policy applies

- */ - _FinalStage audience(@NotNull String audience); - - Builder from(ClientRefreshTokenPolicy other); - } - - public interface _FinalStage { - ClientRefreshTokenPolicy build(); - - /** - *

The resource server permissions granted under the Multi Resource Refresh Token Policy, defining the context in which an access token can be used

- */ - _FinalStage scope(List scope); - - _FinalStage addScope(String scope); - - _FinalStage addAllScope(List scope); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements AudienceStage, _FinalStage { - private String audience; - - private List scope = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ClientRefreshTokenPolicy other) { - audience(other.getAudience()); - scope(other.getScope()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("audience") - public _FinalStage audience(@NotNull String audience) { - this.audience = Objects.requireNonNull(audience, "audience must not be null"); - return this; - } - - /** - *

The resource server permissions granted under the Multi Resource Refresh Token Policy, defining the context in which an access token can be used

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

The resource server permissions granted under the Multi Resource Refresh Token Policy, defining the context in which an access token can be used

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

The resource server permissions granted under the Multi Resource Refresh Token Policy, defining the context in which an access token can be used

- */ - @java.lang.Override - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public _FinalStage scope(List scope) { - this.scope.clear(); - if (scope != null) { - this.scope.addAll(scope); - } - return this; - } - - @java.lang.Override - public ClientRefreshTokenPolicy build() { - return new ClientRefreshTokenPolicy(audience, scope, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferAllowedAuthenticationMethodsEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferAllowedAuthenticationMethodsEnum.java deleted file mode 100644 index edb3e0e5d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferAllowedAuthenticationMethodsEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientSessionTransferAllowedAuthenticationMethodsEnum { - public static final ClientSessionTransferAllowedAuthenticationMethodsEnum QUERY = - new ClientSessionTransferAllowedAuthenticationMethodsEnum(Value.QUERY, "query"); - - public static final ClientSessionTransferAllowedAuthenticationMethodsEnum COOKIE = - new ClientSessionTransferAllowedAuthenticationMethodsEnum(Value.COOKIE, "cookie"); - - private final Value value; - - private final String string; - - ClientSessionTransferAllowedAuthenticationMethodsEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientSessionTransferAllowedAuthenticationMethodsEnum - && this.string.equals(((ClientSessionTransferAllowedAuthenticationMethodsEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case QUERY: - return visitor.visitQuery(); - case COOKIE: - return visitor.visitCookie(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ClientSessionTransferAllowedAuthenticationMethodsEnum valueOf(String value) { - switch (value) { - case "query": - return QUERY; - case "cookie": - return COOKIE; - default: - return new ClientSessionTransferAllowedAuthenticationMethodsEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - COOKIE, - - QUERY, - - UNKNOWN - } - - public interface Visitor { - T visitCookie(); - - T visitQuery(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferConfiguration.java deleted file mode 100644 index bde9fc310..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferConfiguration.java +++ /dev/null @@ -1,265 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientSessionTransferConfiguration.Builder.class) -public final class ClientSessionTransferConfiguration { - private final Optional canCreateSessionTransferToken; - - private final Optional enforceCascadeRevocation; - - private final Optional> allowedAuthenticationMethods; - - private final Optional enforceDeviceBinding; - - private final Optional allowRefreshToken; - - private final Optional enforceOnlineRefreshTokens; - - private final Map additionalProperties; - - private ClientSessionTransferConfiguration( - Optional canCreateSessionTransferToken, - Optional enforceCascadeRevocation, - Optional> allowedAuthenticationMethods, - Optional enforceDeviceBinding, - Optional allowRefreshToken, - Optional enforceOnlineRefreshTokens, - Map additionalProperties) { - this.canCreateSessionTransferToken = canCreateSessionTransferToken; - this.enforceCascadeRevocation = enforceCascadeRevocation; - this.allowedAuthenticationMethods = allowedAuthenticationMethods; - this.enforceDeviceBinding = enforceDeviceBinding; - this.allowRefreshToken = allowRefreshToken; - this.enforceOnlineRefreshTokens = enforceOnlineRefreshTokens; - this.additionalProperties = additionalProperties; - } - - /** - * @return Indicates whether an app can issue a Session Transfer Token through Token Exchange. If set to 'false', the app will not be able to issue a Session Transfer Token. Usually configured in the native application. Default value is false. - */ - @JsonProperty("can_create_session_transfer_token") - public Optional getCanCreateSessionTransferToken() { - return canCreateSessionTransferToken; - } - - /** - * @return Indicates whether revoking the parent Refresh Token that initiated a Native to Web flow and was used to issue a Session Transfer Token should trigger a cascade revocation affecting its dependent child entities. Usually configured in the native application. Default value is true, applicable only in Native to Web SSO context. - */ - @JsonProperty("enforce_cascade_revocation") - public Optional getEnforceCascadeRevocation() { - return enforceCascadeRevocation; - } - - /** - * @return Indicates whether an app can create a session from a Session Transfer Token received via indicated methods. Can include cookie and/or query. Usually configured in the web application. Default value is an empty array []. - */ - @JsonProperty("allowed_authentication_methods") - public Optional> getAllowedAuthenticationMethods() { - return allowedAuthenticationMethods; - } - - @JsonProperty("enforce_device_binding") - public Optional getEnforceDeviceBinding() { - return enforceDeviceBinding; - } - - /** - * @return Indicates whether Refresh Tokens are allowed to be issued when authenticating with a Session Transfer Token. Usually configured in the web application. Default value is false. - */ - @JsonProperty("allow_refresh_token") - public Optional getAllowRefreshToken() { - return allowRefreshToken; - } - - /** - * @return Indicates whether Refresh Tokens created during a Native to Web session are tied to that session's lifetime. This determines if such refresh tokens should be automatically revoked when their corresponding sessions are. Usually configured in the web application. Default value is true, applicable only in Native to Web SSO context. - */ - @JsonProperty("enforce_online_refresh_tokens") - public Optional getEnforceOnlineRefreshTokens() { - return enforceOnlineRefreshTokens; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientSessionTransferConfiguration - && equalTo((ClientSessionTransferConfiguration) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientSessionTransferConfiguration other) { - return canCreateSessionTransferToken.equals(other.canCreateSessionTransferToken) - && enforceCascadeRevocation.equals(other.enforceCascadeRevocation) - && allowedAuthenticationMethods.equals(other.allowedAuthenticationMethods) - && enforceDeviceBinding.equals(other.enforceDeviceBinding) - && allowRefreshToken.equals(other.allowRefreshToken) - && enforceOnlineRefreshTokens.equals(other.enforceOnlineRefreshTokens); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.canCreateSessionTransferToken, - this.enforceCascadeRevocation, - this.allowedAuthenticationMethods, - this.enforceDeviceBinding, - this.allowRefreshToken, - this.enforceOnlineRefreshTokens); - } - - @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 canCreateSessionTransferToken = Optional.empty(); - - private Optional enforceCascadeRevocation = Optional.empty(); - - private Optional> allowedAuthenticationMethods = - Optional.empty(); - - private Optional enforceDeviceBinding = Optional.empty(); - - private Optional allowRefreshToken = Optional.empty(); - - private Optional enforceOnlineRefreshTokens = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientSessionTransferConfiguration other) { - canCreateSessionTransferToken(other.getCanCreateSessionTransferToken()); - enforceCascadeRevocation(other.getEnforceCascadeRevocation()); - allowedAuthenticationMethods(other.getAllowedAuthenticationMethods()); - enforceDeviceBinding(other.getEnforceDeviceBinding()); - allowRefreshToken(other.getAllowRefreshToken()); - enforceOnlineRefreshTokens(other.getEnforceOnlineRefreshTokens()); - return this; - } - - /** - *

Indicates whether an app can issue a Session Transfer Token through Token Exchange. If set to 'false', the app will not be able to issue a Session Transfer Token. Usually configured in the native application. Default value is false.

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

Indicates whether revoking the parent Refresh Token that initiated a Native to Web flow and was used to issue a Session Transfer Token should trigger a cascade revocation affecting its dependent child entities. Usually configured in the native application. Default value is true, applicable only in Native to Web SSO context.

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

Indicates whether an app can create a session from a Session Transfer Token received via indicated methods. Can include cookie and/or query. Usually configured in the web application. Default value is an empty array [].

- */ - @JsonSetter(value = "allowed_authentication_methods", nulls = Nulls.SKIP) - public Builder allowedAuthenticationMethods( - Optional> allowedAuthenticationMethods) { - this.allowedAuthenticationMethods = allowedAuthenticationMethods; - return this; - } - - public Builder allowedAuthenticationMethods( - List allowedAuthenticationMethods) { - this.allowedAuthenticationMethods = Optional.ofNullable(allowedAuthenticationMethods); - return this; - } - - @JsonSetter(value = "enforce_device_binding", nulls = Nulls.SKIP) - public Builder enforceDeviceBinding(Optional enforceDeviceBinding) { - this.enforceDeviceBinding = enforceDeviceBinding; - return this; - } - - public Builder enforceDeviceBinding(ClientSessionTransferDeviceBindingEnum enforceDeviceBinding) { - this.enforceDeviceBinding = Optional.ofNullable(enforceDeviceBinding); - return this; - } - - /** - *

Indicates whether Refresh Tokens are allowed to be issued when authenticating with a Session Transfer Token. Usually configured in the web application. Default value is false.

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

Indicates whether Refresh Tokens created during a Native to Web session are tied to that session's lifetime. This determines if such refresh tokens should be automatically revoked when their corresponding sessions are. Usually configured in the web application. Default value is true, applicable only in Native to Web SSO context.

- */ - @JsonSetter(value = "enforce_online_refresh_tokens", nulls = Nulls.SKIP) - public Builder enforceOnlineRefreshTokens(Optional enforceOnlineRefreshTokens) { - this.enforceOnlineRefreshTokens = enforceOnlineRefreshTokens; - return this; - } - - public Builder enforceOnlineRefreshTokens(Boolean enforceOnlineRefreshTokens) { - this.enforceOnlineRefreshTokens = Optional.ofNullable(enforceOnlineRefreshTokens); - return this; - } - - public ClientSessionTransferConfiguration build() { - return new ClientSessionTransferConfiguration( - canCreateSessionTransferToken, - enforceCascadeRevocation, - allowedAuthenticationMethods, - enforceDeviceBinding, - allowRefreshToken, - enforceOnlineRefreshTokens, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDeviceBindingEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDeviceBindingEnum.java deleted file mode 100644 index bb2238bb7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientSessionTransferDeviceBindingEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientSessionTransferDeviceBindingEnum { - public static final ClientSessionTransferDeviceBindingEnum ASN = - new ClientSessionTransferDeviceBindingEnum(Value.ASN, "asn"); - - public static final ClientSessionTransferDeviceBindingEnum NONE = - new ClientSessionTransferDeviceBindingEnum(Value.NONE, "none"); - - public static final ClientSessionTransferDeviceBindingEnum IP = - new ClientSessionTransferDeviceBindingEnum(Value.IP, "ip"); - - private final Value value; - - private final String string; - - ClientSessionTransferDeviceBindingEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientSessionTransferDeviceBindingEnum - && this.string.equals(((ClientSessionTransferDeviceBindingEnum) 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 NONE: - return visitor.visitNone(); - case IP: - return visitor.visitIp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ClientSessionTransferDeviceBindingEnum valueOf(String value) { - switch (value) { - case "asn": - return ASN; - case "none": - return NONE; - case "ip": - return IP; - default: - return new ClientSessionTransferDeviceBindingEnum(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/ClientSignedRequestObjectWithCredentialId.java b/src/main/java/com/auth0/client/mgmt/types/ClientSignedRequestObjectWithCredentialId.java deleted file mode 100644 index 4a7ed6e2b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientSignedRequestObjectWithCredentialId.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientSignedRequestObjectWithCredentialId.Builder.class) -public final class ClientSignedRequestObjectWithCredentialId { - private final Optional required; - - private final Optional> credentials; - - private final Map additionalProperties; - - private ClientSignedRequestObjectWithCredentialId( - Optional required, - Optional> credentials, - Map additionalProperties) { - this.required = required; - this.credentials = credentials; - this.additionalProperties = additionalProperties; - } - - /** - * @return Indicates whether the JAR requests are mandatory - */ - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("credentials") - public Optional> getCredentials() { - return credentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientSignedRequestObjectWithCredentialId - && equalTo((ClientSignedRequestObjectWithCredentialId) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientSignedRequestObjectWithCredentialId other) { - return required.equals(other.required) && credentials.equals(other.credentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.required, this.credentials); - } - - @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 required = Optional.empty(); - - private Optional> credentials = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientSignedRequestObjectWithCredentialId other) { - required(other.getRequired()); - credentials(other.getCredentials()); - return this; - } - - /** - *

Indicates whether the JAR requests are mandatory

- */ - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public Builder required(Optional required) { - this.required = required; - return this; - } - - public Builder required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @JsonSetter(value = "credentials", nulls = Nulls.SKIP) - public Builder credentials(Optional> credentials) { - this.credentials = credentials; - return this; - } - - public Builder credentials(List credentials) { - this.credentials = Optional.ofNullable(credentials); - return this; - } - - public ClientSignedRequestObjectWithCredentialId build() { - return new ClientSignedRequestObjectWithCredentialId(required, credentials, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientSignedRequestObjectWithPublicKey.java b/src/main/java/com/auth0/client/mgmt/types/ClientSignedRequestObjectWithPublicKey.java deleted file mode 100644 index d95362a49..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientSignedRequestObjectWithPublicKey.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientSignedRequestObjectWithPublicKey.Builder.class) -public final class ClientSignedRequestObjectWithPublicKey { - private final Optional required; - - private final Optional> credentials; - - private final Map additionalProperties; - - private ClientSignedRequestObjectWithPublicKey( - Optional required, - Optional> credentials, - Map additionalProperties) { - this.required = required; - this.credentials = credentials; - this.additionalProperties = additionalProperties; - } - - /** - * @return Indicates whether the JAR requests are mandatory - */ - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("credentials") - public Optional> getCredentials() { - return credentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientSignedRequestObjectWithPublicKey - && equalTo((ClientSignedRequestObjectWithPublicKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientSignedRequestObjectWithPublicKey other) { - return required.equals(other.required) && credentials.equals(other.credentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.required, this.credentials); - } - - @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 required = Optional.empty(); - - private Optional> credentials = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientSignedRequestObjectWithPublicKey other) { - required(other.getRequired()); - credentials(other.getCredentials()); - return this; - } - - /** - *

Indicates whether the JAR requests are mandatory

- */ - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public Builder required(Optional required) { - this.required = required; - return this; - } - - public Builder required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @JsonSetter(value = "credentials", nulls = Nulls.SKIP) - public Builder credentials(Optional> credentials) { - this.credentials = credentials; - return this; - } - - public Builder credentials(List credentials) { - this.credentials = Optional.ofNullable(credentials); - return this; - } - - public ClientSignedRequestObjectWithPublicKey build() { - return new ClientSignedRequestObjectWithPublicKey(required, credentials, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientSigningKey.java b/src/main/java/com/auth0/client/mgmt/types/ClientSigningKey.java deleted file mode 100644 index 7b78cfcfc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientSigningKey.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientSigningKey.Builder.class) -public final class ClientSigningKey { - private final Optional pkcs7; - - private final Optional cert; - - private final Optional subject; - - private final Map additionalProperties; - - private ClientSigningKey( - Optional pkcs7, - Optional cert, - Optional subject, - Map additionalProperties) { - this.pkcs7 = pkcs7; - this.cert = cert; - this.subject = subject; - this.additionalProperties = additionalProperties; - } - - /** - * @return Signing certificate public key and chain in PKCS#7 (.P7B) format. - */ - @JsonProperty("pkcs7") - public Optional getPkcs7() { - return pkcs7; - } - - /** - * @return Signing certificate public key in X.509 (.CER) format. - */ - @JsonProperty("cert") - public Optional getCert() { - return cert; - } - - /** - * @return Subject name for this certificate in the format /CN={domain}. - */ - @JsonProperty("subject") - public Optional getSubject() { - return subject; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientSigningKey && equalTo((ClientSigningKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientSigningKey other) { - return pkcs7.equals(other.pkcs7) && cert.equals(other.cert) && subject.equals(other.subject); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.pkcs7, this.cert, this.subject); - } - - @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 pkcs7 = Optional.empty(); - - private Optional cert = Optional.empty(); - - private Optional subject = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientSigningKey other) { - pkcs7(other.getPkcs7()); - cert(other.getCert()); - subject(other.getSubject()); - return this; - } - - /** - *

Signing certificate public key and chain in PKCS#7 (.P7B) format.

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

Signing certificate public key in X.509 (.CER) format.

- */ - @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; - } - - /** - *

Subject name for this certificate in the format /CN={domain}.

- */ - @JsonSetter(value = "subject", nulls = Nulls.SKIP) - public Builder subject(Optional subject) { - this.subject = subject; - return this; - } - - public Builder subject(String subject) { - this.subject = Optional.ofNullable(subject); - return this; - } - - public ClientSigningKey build() { - return new ClientSigningKey(pkcs7, cert, subject, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientTokenEndpointAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientTokenEndpointAuthMethodEnum.java deleted file mode 100644 index 7b1d0adb1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientTokenEndpointAuthMethodEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientTokenEndpointAuthMethodEnum { - public static final ClientTokenEndpointAuthMethodEnum CLIENT_SECRET_BASIC = - new ClientTokenEndpointAuthMethodEnum(Value.CLIENT_SECRET_BASIC, "client_secret_basic"); - - public static final ClientTokenEndpointAuthMethodEnum CLIENT_SECRET_POST = - new ClientTokenEndpointAuthMethodEnum(Value.CLIENT_SECRET_POST, "client_secret_post"); - - public static final ClientTokenEndpointAuthMethodEnum NONE = - new ClientTokenEndpointAuthMethodEnum(Value.NONE, "none"); - - private final Value value; - - private final String string; - - ClientTokenEndpointAuthMethodEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientTokenEndpointAuthMethodEnum - && this.string.equals(((ClientTokenEndpointAuthMethodEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CLIENT_SECRET_BASIC: - return visitor.visitClientSecretBasic(); - case CLIENT_SECRET_POST: - return visitor.visitClientSecretPost(); - case NONE: - return visitor.visitNone(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ClientTokenEndpointAuthMethodEnum valueOf(String value) { - switch (value) { - case "client_secret_basic": - return CLIENT_SECRET_BASIC; - case "client_secret_post": - return CLIENT_SECRET_POST; - case "none": - return NONE; - default: - return new ClientTokenEndpointAuthMethodEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - NONE, - - CLIENT_SECRET_POST, - - CLIENT_SECRET_BASIC, - - UNKNOWN - } - - public interface Visitor { - T visitNone(); - - T visitClientSecretPost(); - - T visitClientSecretBasic(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientTokenEndpointAuthMethodOrNullEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientTokenEndpointAuthMethodOrNullEnum.java deleted file mode 100644 index 22e9d1ba4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientTokenEndpointAuthMethodOrNullEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientTokenEndpointAuthMethodOrNullEnum { - public static final ClientTokenEndpointAuthMethodOrNullEnum CLIENT_SECRET_BASIC = - new ClientTokenEndpointAuthMethodOrNullEnum(Value.CLIENT_SECRET_BASIC, "client_secret_basic"); - - public static final ClientTokenEndpointAuthMethodOrNullEnum CLIENT_SECRET_POST = - new ClientTokenEndpointAuthMethodOrNullEnum(Value.CLIENT_SECRET_POST, "client_secret_post"); - - public static final ClientTokenEndpointAuthMethodOrNullEnum NONE = - new ClientTokenEndpointAuthMethodOrNullEnum(Value.NONE, "none"); - - private final Value value; - - private final String string; - - ClientTokenEndpointAuthMethodOrNullEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientTokenEndpointAuthMethodOrNullEnum - && this.string.equals(((ClientTokenEndpointAuthMethodOrNullEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CLIENT_SECRET_BASIC: - return visitor.visitClientSecretBasic(); - case CLIENT_SECRET_POST: - return visitor.visitClientSecretPost(); - case NONE: - return visitor.visitNone(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ClientTokenEndpointAuthMethodOrNullEnum valueOf(String value) { - switch (value) { - case "client_secret_basic": - return CLIENT_SECRET_BASIC; - case "client_secret_post": - return CLIENT_SECRET_POST; - case "none": - return NONE; - default: - return new ClientTokenEndpointAuthMethodOrNullEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - NONE, - - CLIENT_SECRET_POST, - - CLIENT_SECRET_BASIC, - - UNKNOWN - } - - public interface Visitor { - T visitNone(); - - T visitClientSecretPost(); - - T visitClientSecretBasic(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientTokenExchangeConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ClientTokenExchangeConfiguration.java deleted file mode 100644 index 81d6cb9bb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientTokenExchangeConfiguration.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientTokenExchangeConfiguration.Builder.class) -public final class ClientTokenExchangeConfiguration { - private final Optional> allowAnyProfileOfType; - - private final Map additionalProperties; - - private ClientTokenExchangeConfiguration( - Optional> allowAnyProfileOfType, - Map additionalProperties) { - this.allowAnyProfileOfType = allowAnyProfileOfType; - this.additionalProperties = additionalProperties; - } - - /** - * @return List the enabled token exchange types for this client. - */ - @JsonProperty("allow_any_profile_of_type") - public Optional> getAllowAnyProfileOfType() { - return allowAnyProfileOfType; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientTokenExchangeConfiguration && equalTo((ClientTokenExchangeConfiguration) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientTokenExchangeConfiguration other) { - return allowAnyProfileOfType.equals(other.allowAnyProfileOfType); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.allowAnyProfileOfType); - } - - @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> allowAnyProfileOfType = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientTokenExchangeConfiguration other) { - allowAnyProfileOfType(other.getAllowAnyProfileOfType()); - return this; - } - - /** - *

List the enabled token exchange types for this client.

- */ - @JsonSetter(value = "allow_any_profile_of_type", nulls = Nulls.SKIP) - public Builder allowAnyProfileOfType(Optional> allowAnyProfileOfType) { - this.allowAnyProfileOfType = allowAnyProfileOfType; - return this; - } - - public Builder allowAnyProfileOfType(List allowAnyProfileOfType) { - this.allowAnyProfileOfType = Optional.ofNullable(allowAnyProfileOfType); - return this; - } - - public ClientTokenExchangeConfiguration build() { - return new ClientTokenExchangeConfiguration(allowAnyProfileOfType, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientTokenExchangeConfigurationOrNull.java b/src/main/java/com/auth0/client/mgmt/types/ClientTokenExchangeConfigurationOrNull.java deleted file mode 100644 index 092762e4d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientTokenExchangeConfigurationOrNull.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ClientTokenExchangeConfigurationOrNull.Builder.class) -public final class ClientTokenExchangeConfigurationOrNull { - private final Optional> allowAnyProfileOfType; - - private final Map additionalProperties; - - private ClientTokenExchangeConfigurationOrNull( - Optional> allowAnyProfileOfType, - Map additionalProperties) { - this.allowAnyProfileOfType = allowAnyProfileOfType; - this.additionalProperties = additionalProperties; - } - - /** - * @return List the enabled token exchange types for this client. - */ - @JsonProperty("allow_any_profile_of_type") - public Optional> getAllowAnyProfileOfType() { - return allowAnyProfileOfType; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClientTokenExchangeConfigurationOrNull - && equalTo((ClientTokenExchangeConfigurationOrNull) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClientTokenExchangeConfigurationOrNull other) { - return allowAnyProfileOfType.equals(other.allowAnyProfileOfType); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.allowAnyProfileOfType); - } - - @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> allowAnyProfileOfType = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ClientTokenExchangeConfigurationOrNull other) { - allowAnyProfileOfType(other.getAllowAnyProfileOfType()); - return this; - } - - /** - *

List the enabled token exchange types for this client.

- */ - @JsonSetter(value = "allow_any_profile_of_type", nulls = Nulls.SKIP) - public Builder allowAnyProfileOfType(Optional> allowAnyProfileOfType) { - this.allowAnyProfileOfType = allowAnyProfileOfType; - return this; - } - - public Builder allowAnyProfileOfType(List allowAnyProfileOfType) { - this.allowAnyProfileOfType = Optional.ofNullable(allowAnyProfileOfType); - return this; - } - - public ClientTokenExchangeConfigurationOrNull build() { - return new ClientTokenExchangeConfigurationOrNull(allowAnyProfileOfType, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ClientTokenExchangeTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ClientTokenExchangeTypeEnum.java deleted file mode 100644 index 214095ec1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ClientTokenExchangeTypeEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ClientTokenExchangeTypeEnum { - public static final ClientTokenExchangeTypeEnum CUSTOM_AUTHENTICATION = - new ClientTokenExchangeTypeEnum(Value.CUSTOM_AUTHENTICATION, "custom_authentication"); - - private final Value value; - - private final String string; - - ClientTokenExchangeTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ClientTokenExchangeTypeEnum - && this.string.equals(((ClientTokenExchangeTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CUSTOM_AUTHENTICATION: - return visitor.visitCustomAuthentication(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ClientTokenExchangeTypeEnum valueOf(String value) { - switch (value) { - case "custom_authentication": - return CUSTOM_AUTHENTICATION; - default: - return new ClientTokenExchangeTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - CUSTOM_AUTHENTICATION, - - UNKNOWN - } - - public interface Visitor { - T visitCustomAuthentication(); - - 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 deleted file mode 100644 index 621f2fb49..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectedAccount.java +++ /dev/null @@ -1,393 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = ConnectedAccount.Builder.class) -public final class ConnectedAccount { - private final String id; - - private final String connection; - - private final String connectionId; - - private final String strategy; - - private final ConnectedAccountAccessTypeEnum accessType; - - private final Optional> scopes; - - private final OffsetDateTime createdAt; - - private final Optional expiresAt; - - private final Map additionalProperties; - - private ConnectedAccount( - String id, - String connection, - String connectionId, - String strategy, - ConnectedAccountAccessTypeEnum accessType, - Optional> scopes, - OffsetDateTime createdAt, - Optional expiresAt, - Map additionalProperties) { - this.id = id; - this.connection = connection; - this.connectionId = connectionId; - this.strategy = strategy; - this.accessType = accessType; - this.scopes = scopes; - this.createdAt = createdAt; - this.expiresAt = expiresAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique identifier for the connected account. - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return The name of the connection associated with the account. - */ - @JsonProperty("connection") - public String getConnection() { - return connection; - } - - /** - * @return The unique identifier of the connection associated with the account. - */ - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - /** - * @return The authentication strategy used by the connection. - */ - @JsonProperty("strategy") - public String getStrategy() { - return strategy; - } - - @JsonProperty("access_type") - public ConnectedAccountAccessTypeEnum getAccessType() { - return accessType; - } - - /** - * @return The scopes granted for this connected account. - */ - @JsonProperty("scopes") - public Optional> getScopes() { - return scopes; - } - - /** - * @return ISO 8601 timestamp when the connected account was created. - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return ISO 8601 timestamp when the connected account expires. - */ - @JsonProperty("expires_at") - public Optional getExpiresAt() { - return expiresAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectedAccount && equalTo((ConnectedAccount) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectedAccount other) { - return id.equals(other.id) - && connection.equals(other.connection) - && connectionId.equals(other.connectionId) - && strategy.equals(other.strategy) - && accessType.equals(other.accessType) - && scopes.equals(other.scopes) - && createdAt.equals(other.createdAt) - && expiresAt.equals(other.expiresAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.connection, - this.connectionId, - this.strategy, - this.accessType, - this.scopes, - this.createdAt, - this.expiresAt); - } - - @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 connected account.

- */ - ConnectionStage id(@NotNull String id); - - Builder from(ConnectedAccount other); - } - - public interface ConnectionStage { - /** - *

The name of the connection associated with the account.

- */ - ConnectionIdStage connection(@NotNull String connection); - } - - public interface ConnectionIdStage { - /** - *

The unique identifier of the connection associated with the account.

- */ - StrategyStage connectionId(@NotNull String connectionId); - } - - public interface StrategyStage { - /** - *

The authentication strategy used by the connection.

- */ - AccessTypeStage strategy(@NotNull String strategy); - } - - public interface AccessTypeStage { - CreatedAtStage accessType(@NotNull ConnectedAccountAccessTypeEnum accessType); - } - - public interface CreatedAtStage { - /** - *

ISO 8601 timestamp when the connected account was created.

- */ - _FinalStage createdAt(@NotNull OffsetDateTime createdAt); - } - - public interface _FinalStage { - ConnectedAccount build(); - - /** - *

The scopes granted for this connected account.

- */ - _FinalStage scopes(Optional> scopes); - - _FinalStage scopes(List scopes); - - /** - *

ISO 8601 timestamp when the connected account expires.

- */ - _FinalStage expiresAt(Optional expiresAt); - - _FinalStage expiresAt(OffsetDateTime expiresAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements IdStage, - ConnectionStage, - ConnectionIdStage, - StrategyStage, - AccessTypeStage, - CreatedAtStage, - _FinalStage { - private String id; - - private String connection; - - private String connectionId; - - private String strategy; - - private ConnectedAccountAccessTypeEnum accessType; - - private OffsetDateTime createdAt; - - private Optional expiresAt = Optional.empty(); - - private Optional> scopes = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectedAccount other) { - id(other.getId()); - connection(other.getConnection()); - connectionId(other.getConnectionId()); - strategy(other.getStrategy()); - accessType(other.getAccessType()); - scopes(other.getScopes()); - createdAt(other.getCreatedAt()); - expiresAt(other.getExpiresAt()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("id") - public ConnectionStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("connection") - public ConnectionIdStage connection(@NotNull String connection) { - this.connection = Objects.requireNonNull(connection, "connection must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("connection_id") - public StrategyStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("strategy") - public AccessTypeStage strategy(@NotNull String strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("access_type") - public CreatedAtStage accessType(@NotNull ConnectedAccountAccessTypeEnum accessType) { - this.accessType = Objects.requireNonNull(accessType, "accessType must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("created_at") - public _FinalStage createdAt(@NotNull OffsetDateTime createdAt) { - this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); - return this; - } - - /** - *

ISO 8601 timestamp when the connected account expires.

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

ISO 8601 timestamp when the connected account expires.

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

The scopes granted for this connected account.

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

The scopes granted for this connected account.

- */ - @java.lang.Override - @JsonSetter(value = "scopes", nulls = Nulls.SKIP) - public _FinalStage scopes(Optional> scopes) { - this.scopes = scopes; - return this; - } - - @java.lang.Override - public ConnectedAccount build() { - return new ConnectedAccount( - id, - connection, - connectionId, - strategy, - accessType, - scopes, - createdAt, - expiresAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectedAccountAccessTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectedAccountAccessTypeEnum.java deleted file mode 100644 index fc83ea6ee..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectedAccountAccessTypeEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectedAccountAccessTypeEnum { - public static final ConnectedAccountAccessTypeEnum OFFLINE = - new ConnectedAccountAccessTypeEnum(Value.OFFLINE, "offline"); - - private final Value value; - - private final String string; - - ConnectedAccountAccessTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectedAccountAccessTypeEnum - && this.string.equals(((ConnectedAccountAccessTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case OFFLINE: - return visitor.visitOffline(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectedAccountAccessTypeEnum valueOf(String value) { - switch (value) { - case "offline": - return OFFLINE; - default: - return new ConnectedAccountAccessTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - OFFLINE, - - UNKNOWN - } - - public interface Visitor { - T visitOffline(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionApiBehaviorEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionApiBehaviorEnum.java deleted file mode 100644 index 38b1c0d58..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionApiBehaviorEnum.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionApiBehaviorEnum { - public static final ConnectionApiBehaviorEnum REQUIRED = new ConnectionApiBehaviorEnum(Value.REQUIRED, "required"); - - public static final ConnectionApiBehaviorEnum OPTIONAL = new ConnectionApiBehaviorEnum(Value.OPTIONAL, "optional"); - - private final Value value; - - private final String string; - - ConnectionApiBehaviorEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionApiBehaviorEnum - && this.string.equals(((ConnectionApiBehaviorEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case REQUIRED: - return visitor.visitRequired(); - case OPTIONAL: - return visitor.visitOptional(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionApiBehaviorEnum valueOf(String value) { - switch (value) { - case "required": - return REQUIRED; - case "optional": - return OPTIONAL; - default: - return new ConnectionApiBehaviorEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - REQUIRED, - - OPTIONAL, - - UNKNOWN - } - - public interface Visitor { - T visitRequired(); - - T visitOptional(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionAttributeIdentifier.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionAttributeIdentifier.java deleted file mode 100644 index c3273681f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionAttributeIdentifier.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionAttributeIdentifier.Builder.class) -public final class ConnectionAttributeIdentifier { - private final Optional active; - - private final Optional defaultMethod; - - private final Map additionalProperties; - - private ConnectionAttributeIdentifier( - 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 ConnectionAttributeIdentifier && equalTo((ConnectionAttributeIdentifier) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionAttributeIdentifier 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(ConnectionAttributeIdentifier 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(DefaultMethodEmailIdentifierEnum defaultMethod) { - this.defaultMethod = Optional.ofNullable(defaultMethod); - return this; - } - - public ConnectionAttributeIdentifier build() { - return new ConnectionAttributeIdentifier(active, defaultMethod, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionAttributeMapOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionAttributeMapOidc.java deleted file mode 100644 index 9b0c0d7d4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionAttributeMapOidc.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionAttributeMapOidc.Builder.class) -public final class ConnectionAttributeMapOidc { - private final Optional> attributes; - - private final Optional mappingMode; - - private final Optional userinfoScope; - - private final Map additionalProperties; - - private ConnectionAttributeMapOidc( - Optional> attributes, - Optional mappingMode, - Optional userinfoScope, - Map additionalProperties) { - this.attributes = attributes; - this.mappingMode = mappingMode; - this.userinfoScope = userinfoScope; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("attributes") - public Optional> getAttributes() { - return attributes; - } - - @JsonProperty("mapping_mode") - public Optional getMappingMode() { - return mappingMode; - } - - @JsonProperty("userinfo_scope") - public Optional getUserinfoScope() { - return userinfoScope; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionAttributeMapOidc && equalTo((ConnectionAttributeMapOidc) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionAttributeMapOidc other) { - return attributes.equals(other.attributes) - && mappingMode.equals(other.mappingMode) - && userinfoScope.equals(other.userinfoScope); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.attributes, this.mappingMode, this.userinfoScope); - } - - @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 mappingMode = Optional.empty(); - - private Optional userinfoScope = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionAttributeMapOidc other) { - attributes(other.getAttributes()); - mappingMode(other.getMappingMode()); - userinfoScope(other.getUserinfoScope()); - 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; - } - - @JsonSetter(value = "mapping_mode", nulls = Nulls.SKIP) - public Builder mappingMode(Optional mappingMode) { - this.mappingMode = mappingMode; - return this; - } - - public Builder mappingMode(ConnectionMappingModeEnumOidc mappingMode) { - this.mappingMode = Optional.ofNullable(mappingMode); - return this; - } - - @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; - } - - public ConnectionAttributeMapOidc build() { - return new ConnectionAttributeMapOidc(attributes, mappingMode, userinfoScope, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionAttributeMapOkta.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionAttributeMapOkta.java deleted file mode 100644 index 20f165084..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionAttributeMapOkta.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionAttributeMapOkta.Builder.class) -public final class ConnectionAttributeMapOkta { - private final Optional> attributes; - - private final Optional mappingMode; - - private final Optional userinfoScope; - - private final Map additionalProperties; - - private ConnectionAttributeMapOkta( - Optional> attributes, - Optional mappingMode, - Optional userinfoScope, - Map additionalProperties) { - this.attributes = attributes; - this.mappingMode = mappingMode; - this.userinfoScope = userinfoScope; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("attributes") - public Optional> getAttributes() { - return attributes; - } - - @JsonProperty("mapping_mode") - public Optional getMappingMode() { - return mappingMode; - } - - @JsonProperty("userinfo_scope") - public Optional getUserinfoScope() { - return userinfoScope; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionAttributeMapOkta && equalTo((ConnectionAttributeMapOkta) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionAttributeMapOkta other) { - return attributes.equals(other.attributes) - && mappingMode.equals(other.mappingMode) - && userinfoScope.equals(other.userinfoScope); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.attributes, this.mappingMode, this.userinfoScope); - } - - @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 mappingMode = Optional.empty(); - - private Optional userinfoScope = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionAttributeMapOkta other) { - attributes(other.getAttributes()); - mappingMode(other.getMappingMode()); - userinfoScope(other.getUserinfoScope()); - 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; - } - - @JsonSetter(value = "mapping_mode", nulls = Nulls.SKIP) - public Builder mappingMode(Optional mappingMode) { - this.mappingMode = mappingMode; - return this; - } - - public Builder mappingMode(ConnectionMappingModeEnumOkta mappingMode) { - this.mappingMode = Optional.ofNullable(mappingMode); - return this; - } - - @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; - } - - public ConnectionAttributeMapOkta build() { - return new ConnectionAttributeMapOkta(attributes, mappingMode, userinfoScope, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionAttributes.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionAttributes.java deleted file mode 100644 index 7d4ac34b4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionAttributes.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionAttributes.Builder.class) -public final class ConnectionAttributes { - private final Optional email; - - private final Optional phoneNumber; - - private final Optional username; - - private final Map additionalProperties; - - private ConnectionAttributes( - Optional email, - Optional phoneNumber, - Optional username, - Map additionalProperties) { - this.email = email; - this.phoneNumber = phoneNumber; - this.username = username; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - @JsonProperty("phone_number") - public Optional getPhoneNumber() { - return phoneNumber; - } - - @JsonProperty("username") - public Optional getUsername() { - return username; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionAttributes && equalTo((ConnectionAttributes) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionAttributes other) { - return email.equals(other.email) && phoneNumber.equals(other.phoneNumber) && username.equals(other.username); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.email, this.phoneNumber, this.username); - } - - @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 phoneNumber = Optional.empty(); - - private Optional username = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionAttributes other) { - email(other.getEmail()); - phoneNumber(other.getPhoneNumber()); - username(other.getUsername()); - return this; - } - - @JsonSetter(value = "email", nulls = Nulls.SKIP) - public Builder email(Optional email) { - this.email = email; - return this; - } - - public Builder email(EmailAttribute email) { - this.email = Optional.ofNullable(email); - return this; - } - - @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) - public Builder phoneNumber(Optional phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - public Builder phoneNumber(PhoneAttribute phoneNumber) { - this.phoneNumber = Optional.ofNullable(phoneNumber); - return this; - } - - @JsonSetter(value = "username", nulls = Nulls.SKIP) - public Builder username(Optional username) { - this.username = username; - return this; - } - - public Builder username(UsernameAttribute username) { - this.username = Optional.ofNullable(username); - return this; - } - - public ConnectionAttributes build() { - return new ConnectionAttributes(email, phoneNumber, username, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionAuthenticationMethods.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionAuthenticationMethods.java deleted file mode 100644 index 74b0dbb1f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionAuthenticationMethods.java +++ /dev/null @@ -1,169 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionAuthenticationMethods.Builder.class) -public final class ConnectionAuthenticationMethods { - private final Optional password; - - private final Optional passkey; - - private final Optional emailOtp; - - private final Optional phoneOtp; - - private final Map additionalProperties; - - private ConnectionAuthenticationMethods( - Optional password, - Optional passkey, - Optional emailOtp, - Optional phoneOtp, - Map additionalProperties) { - this.password = password; - this.passkey = passkey; - this.emailOtp = emailOtp; - this.phoneOtp = phoneOtp; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("password") - public Optional getPassword() { - return password; - } - - @JsonProperty("passkey") - public Optional getPasskey() { - return passkey; - } - - @JsonProperty("email_otp") - public Optional getEmailOtp() { - return emailOtp; - } - - @JsonProperty("phone_otp") - public Optional getPhoneOtp() { - return phoneOtp; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionAuthenticationMethods && equalTo((ConnectionAuthenticationMethods) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionAuthenticationMethods other) { - return password.equals(other.password) - && passkey.equals(other.passkey) - && emailOtp.equals(other.emailOtp) - && phoneOtp.equals(other.phoneOtp); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.password, this.passkey, this.emailOtp, this.phoneOtp); - } - - @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 password = Optional.empty(); - - private Optional passkey = Optional.empty(); - - private Optional emailOtp = Optional.empty(); - - private Optional phoneOtp = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionAuthenticationMethods other) { - password(other.getPassword()); - passkey(other.getPasskey()); - emailOtp(other.getEmailOtp()); - phoneOtp(other.getPhoneOtp()); - return this; - } - - @JsonSetter(value = "password", nulls = Nulls.SKIP) - public Builder password(Optional password) { - this.password = password; - return this; - } - - public Builder password(ConnectionPasswordAuthenticationMethod password) { - this.password = Optional.ofNullable(password); - return this; - } - - @JsonSetter(value = "passkey", nulls = Nulls.SKIP) - public Builder passkey(Optional passkey) { - this.passkey = passkey; - return this; - } - - public Builder passkey(ConnectionPasskeyAuthenticationMethod passkey) { - this.passkey = Optional.ofNullable(passkey); - return this; - } - - @JsonSetter(value = "email_otp", nulls = Nulls.SKIP) - public Builder emailOtp(Optional emailOtp) { - this.emailOtp = emailOtp; - return this; - } - - public Builder emailOtp(ConnectionEmailOtpAuthenticationMethod emailOtp) { - this.emailOtp = Optional.ofNullable(emailOtp); - return this; - } - - @JsonSetter(value = "phone_otp", nulls = Nulls.SKIP) - public Builder phoneOtp(Optional phoneOtp) { - this.phoneOtp = phoneOtp; - return this; - } - - public Builder phoneOtp(ConnectionPhoneOtpAuthenticationMethod phoneOtp) { - this.phoneOtp = Optional.ofNullable(phoneOtp); - return this; - } - - public ConnectionAuthenticationMethods build() { - return new ConnectionAuthenticationMethods(password, passkey, emailOtp, phoneOtp, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionAuthenticationPurpose.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionAuthenticationPurpose.java deleted file mode 100644 index 780caa1f2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionAuthenticationPurpose.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = ConnectionAuthenticationPurpose.Builder.class) -public final class ConnectionAuthenticationPurpose { - private final boolean active; - - private final Map additionalProperties; - - private ConnectionAuthenticationPurpose(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 ConnectionAuthenticationPurpose && equalTo((ConnectionAuthenticationPurpose) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionAuthenticationPurpose 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(ConnectionAuthenticationPurpose other); - } - - public interface _FinalStage { - ConnectionAuthenticationPurpose build(); - } - - @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(ConnectionAuthenticationPurpose 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 ConnectionAuthenticationPurpose build() { - return new ConnectionAuthenticationPurpose(active, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionCommon.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionCommon.java deleted file mode 100644 index c745a892f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionCommon.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionCommon.Builder.class) -public final class ConnectionCommon implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Map additionalProperties; - - private ConnectionCommon( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionCommon && equalTo((ConnectionCommon) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionCommon other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.displayName, this.enabledClients, this.isDomainConnection, 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 displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionCommon other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - public ConnectionCommon build() { - return new ConnectionCommon( - displayName, enabledClients, isDomainConnection, metadata, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectedAccountsPurpose.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectedAccountsPurpose.java deleted file mode 100644 index 40dc2a411..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectedAccountsPurpose.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionConnectedAccountsPurpose.Builder.class) -public final class ConnectionConnectedAccountsPurpose { - private final boolean active; - - private final Optional crossAppAccess; - - private final Map additionalProperties; - - private ConnectionConnectedAccountsPurpose( - 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 ConnectionConnectedAccountsPurpose - && equalTo((ConnectionConnectedAccountsPurpose) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionConnectedAccountsPurpose 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(ConnectionConnectedAccountsPurpose other); - } - - public interface _FinalStage { - ConnectionConnectedAccountsPurpose build(); - - _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(ConnectionConnectedAccountsPurpose 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 ConnectionConnectedAccountsPurpose build() { - return new ConnectionConnectedAccountsPurpose(active, crossAppAccess, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectedAccountsPurposeXaa.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectedAccountsPurposeXaa.java deleted file mode 100644 index 50fb17cf6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectedAccountsPurposeXaa.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionConnectedAccountsPurposeXaa.Builder.class) -public final class ConnectionConnectedAccountsPurposeXaa { - private final Optional crossAppAccess; - - private final boolean active; - - private final Map additionalProperties; - - private ConnectionConnectedAccountsPurposeXaa( - Optional crossAppAccess, boolean active, Map additionalProperties) { - this.crossAppAccess = crossAppAccess; - this.active = active; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("cross_app_access") - public Optional getCrossAppAccess() { - return crossAppAccess; - } - - @JsonProperty("active") - public boolean getActive() { - return active; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionConnectedAccountsPurposeXaa - && equalTo((ConnectionConnectedAccountsPurposeXaa) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionConnectedAccountsPurposeXaa other) { - return crossAppAccess.equals(other.crossAppAccess) && active == other.active; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.crossAppAccess, 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(ConnectionConnectedAccountsPurposeXaa other); - } - - public interface _FinalStage { - ConnectionConnectedAccountsPurposeXaa build(); - - _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(ConnectionConnectedAccountsPurposeXaa other) { - crossAppAccess(other.getCrossAppAccess()); - active(other.getActive()); - 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 ConnectionConnectedAccountsPurposeXaa build() { - return new ConnectionConnectedAccountsPurposeXaa(crossAppAccess, active, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectionSettings.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectionSettings.java deleted file mode 100644 index 65743c84c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectionSettings.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionConnectionSettings.Builder.class) -public final class ConnectionConnectionSettings { - private final Optional pkce; - - private final Map additionalProperties; - - private ConnectionConnectionSettings( - 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 ConnectionConnectionSettings && equalTo((ConnectionConnectionSettings) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionConnectionSettings 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(ConnectionConnectionSettings 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(ConnectionConnectionSettingsPkceEnum pkce) { - this.pkce = Optional.ofNullable(pkce); - return this; - } - - public ConnectionConnectionSettings build() { - return new ConnectionConnectionSettings(pkce, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectionSettingsPkceEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectionSettingsPkceEnum.java deleted file mode 100644 index b9fd8ca29..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionConnectionSettingsPkceEnum.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionConnectionSettingsPkceEnum { - public static final ConnectionConnectionSettingsPkceEnum AUTO = - new ConnectionConnectionSettingsPkceEnum(Value.AUTO, "auto"); - - public static final ConnectionConnectionSettingsPkceEnum S256 = - new ConnectionConnectionSettingsPkceEnum(Value.S256, "S256"); - - public static final ConnectionConnectionSettingsPkceEnum DISABLED = - new ConnectionConnectionSettingsPkceEnum(Value.DISABLED, "disabled"); - - public static final ConnectionConnectionSettingsPkceEnum PLAIN = - new ConnectionConnectionSettingsPkceEnum(Value.PLAIN, "plain"); - - private final Value value; - - private final String string; - - ConnectionConnectionSettingsPkceEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionConnectionSettingsPkceEnum - && this.string.equals(((ConnectionConnectionSettingsPkceEnum) 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 S256: - return visitor.visitS256(); - case DISABLED: - return visitor.visitDisabled(); - case PLAIN: - return visitor.visitPlain(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionConnectionSettingsPkceEnum valueOf(String value) { - switch (value) { - case "auto": - return AUTO; - case "S256": - return S256; - case "disabled": - return DISABLED; - case "plain": - return PLAIN; - default: - return new ConnectionConnectionSettingsPkceEnum(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/ConnectionCustomScripts.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionCustomScripts.java deleted file mode 100644 index db2a3e6c5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionCustomScripts.java +++ /dev/null @@ -1,308 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionCustomScripts.Builder.class) -public final class ConnectionCustomScripts { - private final Optional login; - - private final Optional getUser; - - private final Optional delete; - - private final Optional changePassword; - - private final Optional verify; - - private final Optional create; - - private final Optional changeUsername; - - private final Optional changeEmail; - - private final Optional changePhoneNumber; - - private final Map additionalProperties; - - private ConnectionCustomScripts( - Optional login, - Optional getUser, - Optional delete, - Optional changePassword, - Optional verify, - Optional create, - Optional changeUsername, - Optional changeEmail, - Optional changePhoneNumber, - Map additionalProperties) { - this.login = login; - this.getUser = getUser; - this.delete = delete; - this.changePassword = changePassword; - this.verify = verify; - this.create = create; - this.changeUsername = changeUsername; - this.changeEmail = changeEmail; - this.changePhoneNumber = changePhoneNumber; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("login") - public Optional getLogin() { - return login; - } - - @JsonProperty("get_user") - public Optional getGetUser() { - return getUser; - } - - @JsonProperty("delete") - public Optional getDelete() { - return delete; - } - - @JsonProperty("change_password") - public Optional getChangePassword() { - return changePassword; - } - - @JsonProperty("verify") - public Optional getVerify() { - return verify; - } - - @JsonProperty("create") - public Optional getCreate() { - return create; - } - - @JsonProperty("change_username") - public Optional getChangeUsername() { - return changeUsername; - } - - @JsonProperty("change_email") - public Optional getChangeEmail() { - return changeEmail; - } - - @JsonProperty("change_phone_number") - public Optional getChangePhoneNumber() { - return changePhoneNumber; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionCustomScripts && equalTo((ConnectionCustomScripts) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionCustomScripts other) { - return login.equals(other.login) - && getUser.equals(other.getUser) - && delete.equals(other.delete) - && changePassword.equals(other.changePassword) - && verify.equals(other.verify) - && create.equals(other.create) - && changeUsername.equals(other.changeUsername) - && changeEmail.equals(other.changeEmail) - && changePhoneNumber.equals(other.changePhoneNumber); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.login, - this.getUser, - this.delete, - this.changePassword, - this.verify, - this.create, - this.changeUsername, - this.changeEmail, - this.changePhoneNumber); - } - - @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 login = Optional.empty(); - - private Optional getUser = Optional.empty(); - - private Optional delete = Optional.empty(); - - private Optional changePassword = Optional.empty(); - - private Optional verify = Optional.empty(); - - private Optional create = Optional.empty(); - - private Optional changeUsername = Optional.empty(); - - private Optional changeEmail = Optional.empty(); - - private Optional changePhoneNumber = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionCustomScripts other) { - login(other.getLogin()); - getUser(other.getGetUser()); - delete(other.getDelete()); - changePassword(other.getChangePassword()); - verify(other.getVerify()); - create(other.getCreate()); - changeUsername(other.getChangeUsername()); - changeEmail(other.getChangeEmail()); - changePhoneNumber(other.getChangePhoneNumber()); - return this; - } - - @JsonSetter(value = "login", nulls = Nulls.SKIP) - public Builder login(Optional login) { - this.login = login; - return this; - } - - public Builder login(String login) { - this.login = Optional.ofNullable(login); - return this; - } - - @JsonSetter(value = "get_user", nulls = Nulls.SKIP) - public Builder getUser(Optional getUser) { - this.getUser = getUser; - return this; - } - - public Builder getUser(String getUser) { - this.getUser = Optional.ofNullable(getUser); - return this; - } - - @JsonSetter(value = "delete", nulls = Nulls.SKIP) - public Builder delete(Optional delete) { - this.delete = delete; - return this; - } - - public Builder delete(String delete) { - this.delete = Optional.ofNullable(delete); - return this; - } - - @JsonSetter(value = "change_password", nulls = Nulls.SKIP) - public Builder changePassword(Optional changePassword) { - this.changePassword = changePassword; - return this; - } - - public Builder changePassword(String changePassword) { - this.changePassword = Optional.ofNullable(changePassword); - return this; - } - - @JsonSetter(value = "verify", nulls = Nulls.SKIP) - public Builder verify(Optional verify) { - this.verify = verify; - return this; - } - - public Builder verify(String verify) { - this.verify = Optional.ofNullable(verify); - return this; - } - - @JsonSetter(value = "create", nulls = Nulls.SKIP) - public Builder create(Optional create) { - this.create = create; - return this; - } - - public Builder create(String create) { - this.create = Optional.ofNullable(create); - return this; - } - - @JsonSetter(value = "change_username", nulls = Nulls.SKIP) - public Builder changeUsername(Optional changeUsername) { - this.changeUsername = changeUsername; - return this; - } - - public Builder changeUsername(String changeUsername) { - this.changeUsername = Optional.ofNullable(changeUsername); - return this; - } - - @JsonSetter(value = "change_email", nulls = Nulls.SKIP) - public Builder changeEmail(Optional changeEmail) { - this.changeEmail = changeEmail; - return this; - } - - public Builder changeEmail(String changeEmail) { - this.changeEmail = Optional.ofNullable(changeEmail); - return this; - } - - @JsonSetter(value = "change_phone_number", nulls = Nulls.SKIP) - public Builder changePhoneNumber(Optional changePhoneNumber) { - this.changePhoneNumber = changePhoneNumber; - return this; - } - - public Builder changePhoneNumber(String changePhoneNumber) { - this.changePhoneNumber = Optional.ofNullable(changePhoneNumber); - return this; - } - - public ConnectionCustomScripts build() { - return new ConnectionCustomScripts( - login, - getUser, - delete, - changePassword, - verify, - create, - changeUsername, - changeEmail, - changePhoneNumber, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionDecryptionKeySaml.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionDecryptionKeySaml.java deleted file mode 100644 index a1d233912..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionDecryptionKeySaml.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = ConnectionDecryptionKeySaml.Deserializer.class) -public final class ConnectionDecryptionKeySaml { - private final Object value; - - private final int type; - - private ConnectionDecryptionKeySaml(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((ConnectionDecryptionKeySamlCert) this.value); - } else if (this.type == 1) { - return visitor.visit((String) 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 ConnectionDecryptionKeySaml && equalTo((ConnectionDecryptionKeySaml) other); - } - - private boolean equalTo(ConnectionDecryptionKeySaml 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 ConnectionDecryptionKeySaml of(ConnectionDecryptionKeySamlCert value) { - return new ConnectionDecryptionKeySaml(value, 0); - } - - public static ConnectionDecryptionKeySaml of(String value) { - return new ConnectionDecryptionKeySaml(value, 1); - } - - public interface Visitor { - T visit(ConnectionDecryptionKeySamlCert value); - - T visit(String value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(ConnectionDecryptionKeySaml.class); - } - - @java.lang.Override - public ConnectionDecryptionKeySaml deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, ConnectionDecryptionKeySamlCert.class)); - } 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/ConnectionDecryptionKeySamlCert.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionDecryptionKeySamlCert.java deleted file mode 100644 index ca1faddf7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionDecryptionKeySamlCert.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionDecryptionKeySamlCert.Builder.class) -public final class ConnectionDecryptionKeySamlCert { - private final Optional cert; - - private final Optional key; - - private final Map additionalProperties; - - private ConnectionDecryptionKeySamlCert( - Optional cert, Optional key, Map additionalProperties) { - this.cert = cert; - this.key = key; - this.additionalProperties = additionalProperties; - } - - /** - * @return Base64-encoded X.509 certificate in PEM format. - */ - @JsonProperty("cert") - public Optional getCert() { - return cert; - } - - /** - * @return Private key in PEM format. - */ - @JsonProperty("key") - public Optional getKey() { - return key; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionDecryptionKeySamlCert && equalTo((ConnectionDecryptionKeySamlCert) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionDecryptionKeySamlCert other) { - return cert.equals(other.cert) && key.equals(other.key); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.cert, this.key); - } - - @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 cert = Optional.empty(); - - private Optional key = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionDecryptionKeySamlCert other) { - cert(other.getCert()); - key(other.getKey()); - return this; - } - - /** - *

Base64-encoded X.509 certificate in PEM format.

- */ - @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; - } - - /** - *

Private key in PEM format.

- */ - @JsonSetter(value = "key", nulls = Nulls.SKIP) - public Builder key(Optional key) { - this.key = key; - return this; - } - - public Builder key(String key) { - this.key = Optional.ofNullable(key); - return this; - } - - public ConnectionDecryptionKeySamlCert build() { - return new ConnectionDecryptionKeySamlCert(cert, key, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionDigestAlgorithmEnumSaml.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionDigestAlgorithmEnumSaml.java deleted file mode 100644 index 79e032675..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionDigestAlgorithmEnumSaml.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionDigestAlgorithmEnumSaml { - public static final ConnectionDigestAlgorithmEnumSaml SHA256 = - new ConnectionDigestAlgorithmEnumSaml(Value.SHA256, "sha256"); - - public static final ConnectionDigestAlgorithmEnumSaml SHA1 = - new ConnectionDigestAlgorithmEnumSaml(Value.SHA1, "sha1"); - - private final Value value; - - private final String string; - - ConnectionDigestAlgorithmEnumSaml(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionDigestAlgorithmEnumSaml - && this.string.equals(((ConnectionDigestAlgorithmEnumSaml) 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 ConnectionDigestAlgorithmEnumSaml valueOf(String value) { - switch (value) { - case "sha256": - return SHA256; - case "sha1": - return SHA1; - default: - return new ConnectionDigestAlgorithmEnumSaml(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/ConnectionEmailEmail.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionEmailEmail.java deleted file mode 100644 index be0ddbebc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionEmailEmail.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionEmailEmail.Builder.class) -public final class ConnectionEmailEmail { - private final Optional body; - - private final Optional from; - - private final Optional subject; - - private final Optional syntax; - - private final Map additionalProperties; - - private ConnectionEmailEmail( - Optional body, - Optional from, - Optional subject, - Optional syntax, - Map additionalProperties) { - this.body = body; - this.from = from; - this.subject = subject; - this.syntax = syntax; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("body") - public Optional getBody() { - return body; - } - - @JsonProperty("from") - public Optional getFrom() { - return from; - } - - @JsonProperty("subject") - public Optional getSubject() { - return subject; - } - - /** - * @return Email template syntax type - */ - @JsonProperty("syntax") - public Optional getSyntax() { - return syntax; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionEmailEmail && equalTo((ConnectionEmailEmail) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionEmailEmail other) { - return body.equals(other.body) - && from.equals(other.from) - && subject.equals(other.subject) - && syntax.equals(other.syntax); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.body, this.from, this.subject, this.syntax); - } - - @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 body = Optional.empty(); - - private Optional from = Optional.empty(); - - private Optional subject = Optional.empty(); - - private Optional syntax = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionEmailEmail other) { - body(other.getBody()); - from(other.getFrom()); - subject(other.getSubject()); - syntax(other.getSyntax()); - return this; - } - - @JsonSetter(value = "body", nulls = Nulls.SKIP) - public Builder body(Optional body) { - this.body = body; - return this; - } - - public Builder body(String body) { - this.body = Optional.ofNullable(body); - return this; - } - - @JsonSetter(value = "from", nulls = Nulls.SKIP) - public Builder from(Optional from) { - this.from = from; - return this; - } - - public Builder from(String from) { - this.from = Optional.ofNullable(from); - return this; - } - - @JsonSetter(value = "subject", nulls = Nulls.SKIP) - public Builder subject(Optional subject) { - this.subject = subject; - return this; - } - - public Builder subject(String subject) { - this.subject = Optional.ofNullable(subject); - return this; - } - - /** - *

Email template syntax type

- */ - @JsonSetter(value = "syntax", nulls = Nulls.SKIP) - public Builder syntax(Optional syntax) { - this.syntax = syntax; - return this; - } - - public Builder syntax(ConnectionEmailEmailSyntax syntax) { - this.syntax = Optional.ofNullable(syntax); - return this; - } - - public ConnectionEmailEmail build() { - return new ConnectionEmailEmail(body, from, subject, syntax, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionEmailEmailSyntax.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionEmailEmailSyntax.java deleted file mode 100644 index 85affdb09..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionEmailEmailSyntax.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionEmailEmailSyntax { - public static final ConnectionEmailEmailSyntax LIQUID = new ConnectionEmailEmailSyntax(Value.LIQUID, "liquid"); - - private final Value value; - - private final String string; - - ConnectionEmailEmailSyntax(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionEmailEmailSyntax - && this.string.equals(((ConnectionEmailEmailSyntax) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case LIQUID: - return visitor.visitLiquid(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionEmailEmailSyntax valueOf(String value) { - switch (value) { - case "liquid": - return LIQUID; - default: - return new ConnectionEmailEmailSyntax(Value.UNKNOWN, value); - } - } - - public enum Value { - LIQUID, - - UNKNOWN - } - - public interface Visitor { - T visitLiquid(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionEmailOtpAuthenticationMethod.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionEmailOtpAuthenticationMethod.java deleted file mode 100644 index 2ff774eec..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionEmailOtpAuthenticationMethod.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionEmailOtpAuthenticationMethod.Builder.class) -public final class ConnectionEmailOtpAuthenticationMethod { - private final Optional enabled; - - private final Map additionalProperties; - - private ConnectionEmailOtpAuthenticationMethod( - Optional enabled, Map additionalProperties) { - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Determines whether email OTP is enabled - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionEmailOtpAuthenticationMethod - && equalTo((ConnectionEmailOtpAuthenticationMethod) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionEmailOtpAuthenticationMethod other) { - return enabled.equals(other.enabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 enabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionEmailOtpAuthenticationMethod other) { - enabled(other.getEnabled()); - return this; - } - - /** - *

Determines whether email OTP is enabled

- */ - @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 ConnectionEmailOtpAuthenticationMethod build() { - return new ConnectionEmailOtpAuthenticationMethod(enabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionEnabledClient.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionEnabledClient.java deleted file mode 100644 index a2c363c11..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionEnabledClient.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = ConnectionEnabledClient.Builder.class) -public final class ConnectionEnabledClient { - private final String clientId; - - private final Map additionalProperties; - - private ConnectionEnabledClient(String clientId, Map additionalProperties) { - this.clientId = clientId; - this.additionalProperties = additionalProperties; - } - - /** - * @return The client id - */ - @JsonProperty("client_id") - public String getClientId() { - return clientId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionEnabledClient && equalTo((ConnectionEnabledClient) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionEnabledClient other) { - return clientId.equals(other.clientId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.clientId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ClientIdStage builder() { - return new Builder(); - } - - public interface ClientIdStage { - /** - *

The client id

- */ - _FinalStage clientId(@NotNull String clientId); - - Builder from(ConnectionEnabledClient other); - } - - public interface _FinalStage { - ConnectionEnabledClient build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ClientIdStage, _FinalStage { - private String clientId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionEnabledClient other) { - clientId(other.getClientId()); - return this; - } - - /** - *

The client id

- *

The client id

- * @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 ConnectionEnabledClient build() { - return new ConnectionEnabledClient(clientId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionFederatedConnectionsAccessTokens.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionFederatedConnectionsAccessTokens.java deleted file mode 100644 index b7d58d326..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionFederatedConnectionsAccessTokens.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionFederatedConnectionsAccessTokens.Builder.class) -public final class ConnectionFederatedConnectionsAccessTokens { - private final Optional active; - - private final Map additionalProperties; - - private ConnectionFederatedConnectionsAccessTokens( - Optional active, Map additionalProperties) { - this.active = active; - this.additionalProperties = additionalProperties; - } - - /** - * @return Enables refresh tokens and access tokens collection for federated connections - */ - @JsonProperty("active") - public Optional getActive() { - return active; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionFederatedConnectionsAccessTokens - && equalTo((ConnectionFederatedConnectionsAccessTokens) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionFederatedConnectionsAccessTokens other) { - return active.equals(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 Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional active = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionFederatedConnectionsAccessTokens other) { - active(other.getActive()); - return this; - } - - /** - *

Enables refresh tokens and access tokens collection for federated connections

- */ - @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; - } - - public ConnectionFederatedConnectionsAccessTokens build() { - return new ConnectionFederatedConnectionsAccessTokens(active, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionFieldsMapSamlValue.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionFieldsMapSamlValue.java deleted file mode 100644 index c9d8f3d8a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionFieldsMapSamlValue.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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.Objects; - -@JsonDeserialize(using = ConnectionFieldsMapSamlValue.Deserializer.class) -public final class ConnectionFieldsMapSamlValue { - private final Object value; - - private final int type; - - private ConnectionFieldsMapSamlValue(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((List) 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 ConnectionFieldsMapSamlValue && equalTo((ConnectionFieldsMapSamlValue) other); - } - - private boolean equalTo(ConnectionFieldsMapSamlValue 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 ConnectionFieldsMapSamlValue of(String value) { - return new ConnectionFieldsMapSamlValue(value, 0); - } - - public static ConnectionFieldsMapSamlValue of(List value) { - return new ConnectionFieldsMapSamlValue(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(List value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(ConnectionFieldsMapSamlValue.class); - } - - @java.lang.Override - public ConnectionFieldsMapSamlValue deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.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/ConnectionForList.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionForList.java deleted file mode 100644 index bd9961eae..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionForList.java +++ /dev/null @@ -1,404 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionForList.Builder.class) -public final class ConnectionForList { - private final Optional name; - - private final Optional displayName; - - private final Optional> options; - - private final Optional id; - - private final Optional strategy; - - private final Optional> realms; - - private final Optional isDomainConnection; - - private final Optional showAsButton; - - private final Optional>> metadata; - - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Map additionalProperties; - - private ConnectionForList( - Optional name, - Optional displayName, - Optional> options, - Optional id, - Optional strategy, - Optional> realms, - Optional isDomainConnection, - Optional showAsButton, - Optional>> metadata, - Optional authentication, - Optional connectedAccounts, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.options = options; - this.id = id; - this.strategy = strategy; - this.realms = realms; - this.isDomainConnection = isDomainConnection; - this.showAsButton = showAsButton; - this.metadata = metadata; - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the connection - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Connection name used in login screen - */ - @JsonProperty("display_name") - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - - /** - * @return The connection's identifier - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The type of the connection, related to the identity provider - */ - @JsonProperty("strategy") - public Optional getStrategy() { - return strategy; - } - - /** - * @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; - } - - /** - * @return True if the connection is domain level - */ - @JsonProperty("is_domain_connection") - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - /** - * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. - */ - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @JsonProperty("metadata") - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("authentication") - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionForList && equalTo((ConnectionForList) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionForList other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && options.equals(other.options) - && id.equals(other.id) - && strategy.equals(other.strategy) - && realms.equals(other.realms) - && isDomainConnection.equals(other.isDomainConnection) - && showAsButton.equals(other.showAsButton) - && metadata.equals(other.metadata) - && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.options, - this.id, - this.strategy, - this.realms, - this.isDomainConnection, - this.showAsButton, - this.metadata, - this.authentication, - this.connectedAccounts); - } - - @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 displayName = Optional.empty(); - - private Optional> options = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional strategy = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionForList other) { - name(other.getName()); - displayName(other.getDisplayName()); - options(other.getOptions()); - id(other.getId()); - strategy(other.getStrategy()); - realms(other.getRealms()); - isDomainConnection(other.getIsDomainConnection()); - showAsButton(other.getShowAsButton()); - metadata(other.getMetadata()); - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - return this; - } - - /** - *

The name of the connection

- */ - @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; - } - - /** - *

Connection name used in login screen

- */ - @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 = "options", nulls = Nulls.SKIP) - public Builder options(Optional> options) { - this.options = options; - return this; - } - - public Builder options(Map options) { - this.options = Optional.ofNullable(options); - return this; - } - - /** - *

The connection's 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 type of the connection, related to the identity provider

- */ - @JsonSetter(value = "strategy", nulls = Nulls.SKIP) - public Builder strategy(Optional strategy) { - this.strategy = strategy; - return this; - } - - public Builder strategy(String strategy) { - this.strategy = Optional.ofNullable(strategy); - 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.

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

True if the connection is domain level

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

Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD.

- */ - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public Builder authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - public Builder authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public Builder connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - public Builder connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - public ConnectionForList build() { - return new ConnectionForList( - name, - displayName, - options, - id, - strategy, - realms, - isDomainConnection, - showAsButton, - metadata, - authentication, - connectedAccounts, - 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 deleted file mode 100644 index 918f3e7ab..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionForOrganization.java +++ /dev/null @@ -1,247 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionForOrganization.Builder.class) -public final class ConnectionForOrganization { - private final String connectionId; - - private final Optional assignMembershipOnLogin; - - private final Optional showAsButton; - - private final Optional isSignupEnabled; - - private final Map additionalProperties; - - private ConnectionForOrganization( - String connectionId, - Optional assignMembershipOnLogin, - Optional showAsButton, - Optional isSignupEnabled, - Map additionalProperties) { - this.connectionId = connectionId; - this.assignMembershipOnLogin = assignMembershipOnLogin; - this.showAsButton = showAsButton; - this.isSignupEnabled = isSignupEnabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the connection. - */ - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - /** - * @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. Default: true. - */ - @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. Default: false. - */ - @JsonProperty("is_signup_enabled") - public Optional getIsSignupEnabled() { - return isSignupEnabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionForOrganization && equalTo((ConnectionForOrganization) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionForOrganization other) { - return connectionId.equals(other.connectionId) - && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) - && showAsButton.equals(other.showAsButton) - && isSignupEnabled.equals(other.isSignupEnabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.assignMembershipOnLogin, this.showAsButton, this.isSignupEnabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - /** - *

ID of the connection.

- */ - _FinalStage connectionId(@NotNull String connectionId); - - Builder from(ConnectionForOrganization other); - } - - public interface _FinalStage { - ConnectionForOrganization build(); - - /** - *

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. Default: true.

- */ - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - - /** - *

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

- */ - _FinalStage isSignupEnabled(Optional isSignupEnabled); - - _FinalStage isSignupEnabled(Boolean isSignupEnabled); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, _FinalStage { - private String connectionId; - - 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(ConnectionForOrganization other) { - connectionId(other.getConnectionId()); - assignMembershipOnLogin(other.getAssignMembershipOnLogin()); - showAsButton(other.getShowAsButton()); - isSignupEnabled(other.getIsSignupEnabled()); - return this; - } - - /** - *

ID of the connection.

- *

ID of the connection.

- * @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; - } - - /** - *

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

- * @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. Default: false.

- */ - @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. Default: true.

- * @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. Default: true.

- */ - @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 ConnectionForOrganization build() { - return new ConnectionForOrganization( - connectionId, assignMembershipOnLogin, showAsButton, isSignupEnabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionGatewayAuthentication.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionGatewayAuthentication.java deleted file mode 100644 index cdde507d1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionGatewayAuthentication.java +++ /dev/null @@ -1,274 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionGatewayAuthentication.Builder.class) -public final class ConnectionGatewayAuthentication { - private final String method; - - private final Optional subject; - - private final String audience; - - private final String secret; - - private final Optional secretBase64Encoded; - - private final Map additionalProperties; - - private ConnectionGatewayAuthentication( - String method, - Optional subject, - String audience, - String secret, - Optional secretBase64Encoded, - Map additionalProperties) { - this.method = method; - this.subject = subject; - this.audience = audience; - this.secret = secret; - this.secretBase64Encoded = secretBase64Encoded; - this.additionalProperties = additionalProperties; - } - - /** - * @return The Authorization header type. - */ - @JsonProperty("method") - public String getMethod() { - return method; - } - - /** - * @return The subject to be added to the JWT payload. - */ - @JsonProperty("subject") - public Optional getSubject() { - return subject; - } - - /** - * @return The audience to be added to the JWT payload. - */ - @JsonProperty("audience") - public String getAudience() { - return audience; - } - - /** - * @return The secret to be used for signing tokens. - */ - @JsonProperty("secret") - public String getSecret() { - return secret; - } - - /** - * @return Set to true if the provided secret is base64 encoded. - */ - @JsonProperty("secret_base64_encoded") - public Optional getSecretBase64Encoded() { - return secretBase64Encoded; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionGatewayAuthentication && equalTo((ConnectionGatewayAuthentication) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionGatewayAuthentication other) { - return method.equals(other.method) - && subject.equals(other.subject) - && audience.equals(other.audience) - && secret.equals(other.secret) - && secretBase64Encoded.equals(other.secretBase64Encoded); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.method, this.subject, this.audience, this.secret, this.secretBase64Encoded); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static MethodStage builder() { - return new Builder(); - } - - public interface MethodStage { - /** - *

The Authorization header type.

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

The audience to be added to the JWT payload.

- */ - SecretStage audience(@NotNull String audience); - } - - public interface SecretStage { - /** - *

The secret to be used for signing tokens.

- */ - _FinalStage secret(@NotNull String secret); - } - - public interface _FinalStage { - ConnectionGatewayAuthentication build(); - - /** - *

The subject to be added to the JWT payload.

- */ - _FinalStage subject(Optional subject); - - _FinalStage subject(String subject); - - /** - *

Set to true if the provided secret is base64 encoded.

- */ - _FinalStage secretBase64Encoded(Optional secretBase64Encoded); - - _FinalStage secretBase64Encoded(Boolean secretBase64Encoded); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements MethodStage, AudienceStage, SecretStage, _FinalStage { - private String method; - - private String audience; - - private String secret; - - private Optional secretBase64Encoded = Optional.empty(); - - private Optional subject = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionGatewayAuthentication other) { - method(other.getMethod()); - subject(other.getSubject()); - audience(other.getAudience()); - secret(other.getSecret()); - secretBase64Encoded(other.getSecretBase64Encoded()); - return this; - } - - /** - *

The Authorization header type.

- *

The Authorization header type.

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

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. - */ - @java.lang.Override - @JsonSetter("audience") - public SecretStage audience(@NotNull String audience) { - this.audience = Objects.requireNonNull(audience, "audience must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("secret") - public _FinalStage secret(@NotNull String secret) { - this.secret = Objects.requireNonNull(secret, "secret must not be null"); - return this; - } - - /** - *

Set to true if the provided secret is base64 encoded.

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

Set to true if the provided secret is base64 encoded.

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

The subject to be added to the JWT payload.

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

The subject to be added to the JWT payload.

- */ - @java.lang.Override - @JsonSetter(value = "subject", nulls = Nulls.SKIP) - public _FinalStage subject(Optional subject) { - this.subject = subject; - return this; - } - - @java.lang.Override - public ConnectionGatewayAuthentication build() { - return new ConnectionGatewayAuthentication( - method, subject, audience, secret, secretBase64Encoded, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionGatewayAuthenticationSms.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionGatewayAuthenticationSms.java deleted file mode 100644 index 8948dfba8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionGatewayAuthenticationSms.java +++ /dev/null @@ -1,240 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionGatewayAuthenticationSms.Builder.class) -public final class ConnectionGatewayAuthenticationSms { - private final String audience; - - private final String method; - - private final String secret; - - private final Optional secretBase64Encoded; - - private final Optional subject; - - private final Map additionalProperties; - - private ConnectionGatewayAuthenticationSms( - String audience, - String method, - String secret, - Optional secretBase64Encoded, - Optional subject, - Map additionalProperties) { - this.audience = audience; - this.method = method; - this.secret = secret; - this.secretBase64Encoded = secretBase64Encoded; - this.subject = subject; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("audience") - public String getAudience() { - return audience; - } - - @JsonProperty("method") - public String getMethod() { - return method; - } - - /** - * @return The secret used to sign the JSON Web Token sent to the SMS gateway - */ - @JsonProperty("secret") - public String getSecret() { - return secret; - } - - /** - * @return Set to true if the secret is base64-url-encoded - */ - @JsonProperty("secret_base64_encoded") - public Optional getSecretBase64Encoded() { - return secretBase64Encoded; - } - - @JsonProperty("subject") - public Optional getSubject() { - return subject; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionGatewayAuthenticationSms - && equalTo((ConnectionGatewayAuthenticationSms) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionGatewayAuthenticationSms other) { - return audience.equals(other.audience) - && method.equals(other.method) - && secret.equals(other.secret) - && secretBase64Encoded.equals(other.secretBase64Encoded) - && subject.equals(other.subject); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.audience, this.method, this.secret, this.secretBase64Encoded, this.subject); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static AudienceStage builder() { - return new Builder(); - } - - public interface AudienceStage { - MethodStage audience(@NotNull String audience); - - Builder from(ConnectionGatewayAuthenticationSms other); - } - - public interface MethodStage { - SecretStage method(@NotNull String method); - } - - public interface SecretStage { - /** - *

The secret used to sign the JSON Web Token sent to the SMS gateway

- */ - _FinalStage secret(@NotNull String secret); - } - - public interface _FinalStage { - ConnectionGatewayAuthenticationSms build(); - - /** - *

Set to true if the secret is base64-url-encoded

- */ - _FinalStage secretBase64Encoded(Optional secretBase64Encoded); - - _FinalStage secretBase64Encoded(Boolean secretBase64Encoded); - - _FinalStage subject(Optional subject); - - _FinalStage subject(String subject); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements AudienceStage, MethodStage, SecretStage, _FinalStage { - private String audience; - - private String method; - - private String secret; - - private Optional subject = Optional.empty(); - - private Optional secretBase64Encoded = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionGatewayAuthenticationSms other) { - audience(other.getAudience()); - method(other.getMethod()); - secret(other.getSecret()); - secretBase64Encoded(other.getSecretBase64Encoded()); - subject(other.getSubject()); - return this; - } - - @java.lang.Override - @JsonSetter("audience") - public MethodStage audience(@NotNull String audience) { - this.audience = Objects.requireNonNull(audience, "audience must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("method") - public SecretStage method(@NotNull String method) { - this.method = Objects.requireNonNull(method, "method must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("secret") - public _FinalStage secret(@NotNull String secret) { - this.secret = Objects.requireNonNull(secret, "secret must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage subject(String 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; - } - - /** - *

Set to true if the secret is base64-url-encoded

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

Set to true if the secret is base64-url-encoded

- */ - @java.lang.Override - @JsonSetter(value = "secret_base64_encoded", nulls = Nulls.SKIP) - public _FinalStage secretBase64Encoded(Optional secretBase64Encoded) { - this.secretBase64Encoded = secretBase64Encoded; - return this; - } - - @java.lang.Override - public ConnectionGatewayAuthenticationSms build() { - return new ConnectionGatewayAuthenticationSms( - audience, method, secret, secretBase64Encoded, subject, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionIdTokenSignedResponseAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionIdTokenSignedResponseAlgEnum.java deleted file mode 100644 index 2aea939e9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionIdTokenSignedResponseAlgEnum.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionIdTokenSignedResponseAlgEnum { - public static final ConnectionIdTokenSignedResponseAlgEnum RS512 = - new ConnectionIdTokenSignedResponseAlgEnum(Value.RS512, "RS512"); - - public static final ConnectionIdTokenSignedResponseAlgEnum PS256 = - new ConnectionIdTokenSignedResponseAlgEnum(Value.PS256, "PS256"); - - public static final ConnectionIdTokenSignedResponseAlgEnum ES256 = - new ConnectionIdTokenSignedResponseAlgEnum(Value.ES256, "ES256"); - - public static final ConnectionIdTokenSignedResponseAlgEnum RS256 = - new ConnectionIdTokenSignedResponseAlgEnum(Value.RS256, "RS256"); - - private final Value value; - - private final String string; - - ConnectionIdTokenSignedResponseAlgEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionIdTokenSignedResponseAlgEnum - && this.string.equals(((ConnectionIdTokenSignedResponseAlgEnum) 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 PS256: - return visitor.visitPs256(); - case ES256: - return visitor.visitEs256(); - case RS256: - return visitor.visitRs256(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionIdTokenSignedResponseAlgEnum valueOf(String value) { - switch (value) { - case "RS512": - return RS512; - case "PS256": - return PS256; - case "ES256": - return ES256; - case "RS256": - return RS256; - default: - return new ConnectionIdTokenSignedResponseAlgEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - RS256, - - RS512, - - PS256, - - ES256, - - UNKNOWN - } - - public interface Visitor { - T visitRs256(); - - T visitRs512(); - - T visitPs256(); - - T visitEs256(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentifierPrecedenceEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentifierPrecedenceEnum.java deleted file mode 100644 index a84b60bf2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentifierPrecedenceEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionIdentifierPrecedenceEnum { - public static final ConnectionIdentifierPrecedenceEnum EMAIL = - new ConnectionIdentifierPrecedenceEnum(Value.EMAIL, "email"); - - public static final ConnectionIdentifierPrecedenceEnum PHONE_NUMBER = - new ConnectionIdentifierPrecedenceEnum(Value.PHONE_NUMBER, "phone_number"); - - public static final ConnectionIdentifierPrecedenceEnum USERNAME = - new ConnectionIdentifierPrecedenceEnum(Value.USERNAME, "username"); - - private final Value value; - - private final String string; - - ConnectionIdentifierPrecedenceEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionIdentifierPrecedenceEnum - && this.string.equals(((ConnectionIdentifierPrecedenceEnum) 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_NUMBER: - return visitor.visitPhoneNumber(); - case USERNAME: - return visitor.visitUsername(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionIdentifierPrecedenceEnum valueOf(String value) { - switch (value) { - case "email": - return EMAIL; - case "phone_number": - return PHONE_NUMBER; - case "username": - return USERNAME; - default: - return new ConnectionIdentifierPrecedenceEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - EMAIL, - - PHONE_NUMBER, - - USERNAME, - - UNKNOWN - } - - public interface Visitor { - T visitEmail(); - - T visitPhoneNumber(); - - T visitUsername(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityApiEnumAzureAd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityApiEnumAzureAd.java deleted file mode 100644 index e9e06e00e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityApiEnumAzureAd.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionIdentityApiEnumAzureAd { - public static final ConnectionIdentityApiEnumAzureAd AZURE_ACTIVE_DIRECTORY_V10 = - new ConnectionIdentityApiEnumAzureAd(Value.AZURE_ACTIVE_DIRECTORY_V10, "azure-active-directory-v1.0"); - - public static final ConnectionIdentityApiEnumAzureAd MICROSOFT_IDENTITY_PLATFORM_V20 = - new ConnectionIdentityApiEnumAzureAd( - Value.MICROSOFT_IDENTITY_PLATFORM_V20, "microsoft-identity-platform-v2.0"); - - private final Value value; - - private final String string; - - ConnectionIdentityApiEnumAzureAd(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionIdentityApiEnumAzureAd - && this.string.equals(((ConnectionIdentityApiEnumAzureAd) 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 ConnectionIdentityApiEnumAzureAd 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 ConnectionIdentityApiEnumAzureAd(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/ConnectionIdentityProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityProviderEnum.java deleted file mode 100644 index cefd9fdc0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionIdentityProviderEnum.java +++ /dev/null @@ -1,726 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionIdentityProviderEnum { - public static final ConnectionIdentityProviderEnum SHOP = new ConnectionIdentityProviderEnum(Value.SHOP, "shop"); - - public static final ConnectionIdentityProviderEnum AUTH0OIDC = - new ConnectionIdentityProviderEnum(Value.AUTH0OIDC, "auth0-oidc"); - - public static final ConnectionIdentityProviderEnum DWOLLA = - new ConnectionIdentityProviderEnum(Value.DWOLLA, "dwolla"); - - public static final ConnectionIdentityProviderEnum FLICKR = - new ConnectionIdentityProviderEnum(Value.FLICKR, "flickr"); - - public static final ConnectionIdentityProviderEnum OKTA = new ConnectionIdentityProviderEnum(Value.OKTA, "okta"); - - public static final ConnectionIdentityProviderEnum PLANNINGCENTER = - new ConnectionIdentityProviderEnum(Value.PLANNINGCENTER, "planningcenter"); - - public static final ConnectionIdentityProviderEnum GOOGLE_OAUTH2 = - new ConnectionIdentityProviderEnum(Value.GOOGLE_OAUTH2, "google-oauth2"); - - public static final ConnectionIdentityProviderEnum AUTH0 = new ConnectionIdentityProviderEnum(Value.AUTH0, "auth0"); - - public static final ConnectionIdentityProviderEnum EXACT = new ConnectionIdentityProviderEnum(Value.EXACT, "exact"); - - public static final ConnectionIdentityProviderEnum WORDPRESS = - new ConnectionIdentityProviderEnum(Value.WORDPRESS, "wordpress"); - - public static final ConnectionIdentityProviderEnum FITBIT = - new ConnectionIdentityProviderEnum(Value.FITBIT, "fitbit"); - - public static final ConnectionIdentityProviderEnum EVERNOTE = - new ConnectionIdentityProviderEnum(Value.EVERNOTE, "evernote"); - - public static final ConnectionIdentityProviderEnum SHAREPOINT = - new ConnectionIdentityProviderEnum(Value.SHAREPOINT, "sharepoint"); - - public static final ConnectionIdentityProviderEnum SHOPIFY = - new ConnectionIdentityProviderEnum(Value.SHOPIFY, "shopify"); - - public static final ConnectionIdentityProviderEnum SALESFORCE_SANDBOX = - new ConnectionIdentityProviderEnum(Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); - - public static final ConnectionIdentityProviderEnum MIICARD = - new ConnectionIdentityProviderEnum(Value.MIICARD, "miicard"); - - public static final ConnectionIdentityProviderEnum FACEBOOK = - new ConnectionIdentityProviderEnum(Value.FACEBOOK, "facebook"); - - public static final ConnectionIdentityProviderEnum OAUTH1 = - new ConnectionIdentityProviderEnum(Value.OAUTH1, "oauth1"); - - public static final ConnectionIdentityProviderEnum APPLE = new ConnectionIdentityProviderEnum(Value.APPLE, "apple"); - - public static final ConnectionIdentityProviderEnum UNTAPPD = - new ConnectionIdentityProviderEnum(Value.UNTAPPD, "untappd"); - - public static final ConnectionIdentityProviderEnum AMAZON = - new ConnectionIdentityProviderEnum(Value.AMAZON, "amazon"); - - public static final ConnectionIdentityProviderEnum LINE = new ConnectionIdentityProviderEnum(Value.LINE, "line"); - - public static final ConnectionIdentityProviderEnum BITBUCKET = - new ConnectionIdentityProviderEnum(Value.BITBUCKET, "bitbucket"); - - public static final ConnectionIdentityProviderEnum GITHUB = - new ConnectionIdentityProviderEnum(Value.GITHUB, "github"); - - public static final ConnectionIdentityProviderEnum SALESFORCE = - new ConnectionIdentityProviderEnum(Value.SALESFORCE, "salesforce"); - - public static final ConnectionIdentityProviderEnum OFFICE365 = - new ConnectionIdentityProviderEnum(Value.OFFICE365, "office365"); - - public static final ConnectionIdentityProviderEnum SMS = new ConnectionIdentityProviderEnum(Value.SMS, "sms"); - - public static final ConnectionIdentityProviderEnum AOL = new ConnectionIdentityProviderEnum(Value.AOL, "aol"); - - public static final ConnectionIdentityProviderEnum TWITTER = - new ConnectionIdentityProviderEnum(Value.TWITTER, "twitter"); - - public static final ConnectionIdentityProviderEnum WINDOWSLIVE = - new ConnectionIdentityProviderEnum(Value.WINDOWSLIVE, "windowslive"); - - public static final ConnectionIdentityProviderEnum YANDEX = - new ConnectionIdentityProviderEnum(Value.YANDEX, "yandex"); - - public static final ConnectionIdentityProviderEnum AD = new ConnectionIdentityProviderEnum(Value.AD, "ad"); - - public static final ConnectionIdentityProviderEnum BAIDU = new ConnectionIdentityProviderEnum(Value.BAIDU, "baidu"); - - public static final ConnectionIdentityProviderEnum BITLY = new ConnectionIdentityProviderEnum(Value.BITLY, "bitly"); - - public static final ConnectionIdentityProviderEnum PAYPAL_SANDBOX = - new ConnectionIdentityProviderEnum(Value.PAYPAL_SANDBOX, "paypal-sandbox"); - - public static final ConnectionIdentityProviderEnum RENREN = - new ConnectionIdentityProviderEnum(Value.RENREN, "renren"); - - public static final ConnectionIdentityProviderEnum SAMLP = new ConnectionIdentityProviderEnum(Value.SAMLP, "samlp"); - - public static final ConnectionIdentityProviderEnum DROPBOX = - new ConnectionIdentityProviderEnum(Value.DROPBOX, "dropbox"); - - public static final ConnectionIdentityProviderEnum VKONTAKTE = - new ConnectionIdentityProviderEnum(Value.VKONTAKTE, "vkontakte"); - - public static final ConnectionIdentityProviderEnum PINGFEDERATE = - new ConnectionIdentityProviderEnum(Value.PINGFEDERATE, "pingfederate"); - - public static final ConnectionIdentityProviderEnum INSTAGRAM = - new ConnectionIdentityProviderEnum(Value.INSTAGRAM, "instagram"); - - public static final ConnectionIdentityProviderEnum THIRTYSEVENSIGNALS = - new ConnectionIdentityProviderEnum(Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); - - public static final ConnectionIdentityProviderEnum WAAD = new ConnectionIdentityProviderEnum(Value.WAAD, "waad"); - - public static final ConnectionIdentityProviderEnum THECITY_SANDBOX = - new ConnectionIdentityProviderEnum(Value.THECITY_SANDBOX, "thecity-sandbox"); - - public static final ConnectionIdentityProviderEnum OIDC = new ConnectionIdentityProviderEnum(Value.OIDC, "oidc"); - - public static final ConnectionIdentityProviderEnum YAMMER = - new ConnectionIdentityProviderEnum(Value.YAMMER, "yammer"); - - public static final ConnectionIdentityProviderEnum EVERNOTE_SANDBOX = - new ConnectionIdentityProviderEnum(Value.EVERNOTE_SANDBOX, "evernote-sandbox"); - - public static final ConnectionIdentityProviderEnum SALESFORCE_COMMUNITY = - new ConnectionIdentityProviderEnum(Value.SALESFORCE_COMMUNITY, "salesforce-community"); - - public static final ConnectionIdentityProviderEnum DACCOUNT = - new ConnectionIdentityProviderEnum(Value.DACCOUNT, "daccount"); - - public static final ConnectionIdentityProviderEnum SOUNDCLOUD = - new ConnectionIdentityProviderEnum(Value.SOUNDCLOUD, "soundcloud"); - - public static final ConnectionIdentityProviderEnum OAUTH2 = - new ConnectionIdentityProviderEnum(Value.OAUTH2, "oauth2"); - - public static final ConnectionIdentityProviderEnum BOX = new ConnectionIdentityProviderEnum(Value.BOX, "box"); - - public static final ConnectionIdentityProviderEnum IP = new ConnectionIdentityProviderEnum(Value.IP, "ip"); - - public static final ConnectionIdentityProviderEnum ADFS = new ConnectionIdentityProviderEnum(Value.ADFS, "adfs"); - - public static final ConnectionIdentityProviderEnum EMAIL = new ConnectionIdentityProviderEnum(Value.EMAIL, "email"); - - public static final ConnectionIdentityProviderEnum CUSTOM = - new ConnectionIdentityProviderEnum(Value.CUSTOM, "custom"); - - public static final ConnectionIdentityProviderEnum YAHOO = new ConnectionIdentityProviderEnum(Value.YAHOO, "yahoo"); - - public static final ConnectionIdentityProviderEnum WEIBO = new ConnectionIdentityProviderEnum(Value.WEIBO, "weibo"); - - public static final ConnectionIdentityProviderEnum GOOGLE_APPS = - new ConnectionIdentityProviderEnum(Value.GOOGLE_APPS, "google-apps"); - - public static final ConnectionIdentityProviderEnum PAYPAL = - new ConnectionIdentityProviderEnum(Value.PAYPAL, "paypal"); - - public static final ConnectionIdentityProviderEnum LINKEDIN = - new ConnectionIdentityProviderEnum(Value.LINKEDIN, "linkedin"); - - public static final ConnectionIdentityProviderEnum THECITY = - new ConnectionIdentityProviderEnum(Value.THECITY, "thecity"); - - private final Value value; - - private final String string; - - ConnectionIdentityProviderEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionIdentityProviderEnum - && this.string.equals(((ConnectionIdentityProviderEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SHOP: - return visitor.visitShop(); - case AUTH0OIDC: - return visitor.visitAuth0Oidc(); - case DWOLLA: - return visitor.visitDwolla(); - case FLICKR: - return visitor.visitFlickr(); - case OKTA: - return visitor.visitOkta(); - case PLANNINGCENTER: - return visitor.visitPlanningcenter(); - case GOOGLE_OAUTH2: - return visitor.visitGoogleOauth2(); - case AUTH0: - return visitor.visitAuth0(); - case EXACT: - return visitor.visitExact(); - case WORDPRESS: - return visitor.visitWordpress(); - case FITBIT: - return visitor.visitFitbit(); - case EVERNOTE: - return visitor.visitEvernote(); - case SHAREPOINT: - return visitor.visitSharepoint(); - case SHOPIFY: - return visitor.visitShopify(); - case SALESFORCE_SANDBOX: - return visitor.visitSalesforceSandbox(); - case MIICARD: - return visitor.visitMiicard(); - case FACEBOOK: - return visitor.visitFacebook(); - case OAUTH1: - return visitor.visitOauth1(); - case APPLE: - return visitor.visitApple(); - case UNTAPPD: - return visitor.visitUntappd(); - case AMAZON: - return visitor.visitAmazon(); - case LINE: - return visitor.visitLine(); - case BITBUCKET: - return visitor.visitBitbucket(); - case GITHUB: - return visitor.visitGithub(); - case SALESFORCE: - return visitor.visitSalesforce(); - case OFFICE365: - return visitor.visitOffice365(); - case SMS: - return visitor.visitSms(); - case AOL: - return visitor.visitAol(); - case TWITTER: - return visitor.visitTwitter(); - case WINDOWSLIVE: - return visitor.visitWindowslive(); - case YANDEX: - return visitor.visitYandex(); - case AD: - return visitor.visitAd(); - case BAIDU: - return visitor.visitBaidu(); - case BITLY: - return visitor.visitBitly(); - case PAYPAL_SANDBOX: - return visitor.visitPaypalSandbox(); - case RENREN: - return visitor.visitRenren(); - case SAMLP: - return visitor.visitSamlp(); - case DROPBOX: - return visitor.visitDropbox(); - case VKONTAKTE: - return visitor.visitVkontakte(); - case PINGFEDERATE: - return visitor.visitPingfederate(); - case INSTAGRAM: - return visitor.visitInstagram(); - case THIRTYSEVENSIGNALS: - return visitor.visitThirtysevensignals(); - case WAAD: - return visitor.visitWaad(); - case THECITY_SANDBOX: - return visitor.visitThecitySandbox(); - case OIDC: - return visitor.visitOidc(); - case YAMMER: - return visitor.visitYammer(); - case EVERNOTE_SANDBOX: - return visitor.visitEvernoteSandbox(); - case SALESFORCE_COMMUNITY: - return visitor.visitSalesforceCommunity(); - case DACCOUNT: - return visitor.visitDaccount(); - case SOUNDCLOUD: - return visitor.visitSoundcloud(); - case OAUTH2: - return visitor.visitOauth2(); - case BOX: - return visitor.visitBox(); - case IP: - return visitor.visitIp(); - case ADFS: - return visitor.visitAdfs(); - case EMAIL: - return visitor.visitEmail(); - case CUSTOM: - return visitor.visitCustom(); - case YAHOO: - return visitor.visitYahoo(); - case WEIBO: - return visitor.visitWeibo(); - case GOOGLE_APPS: - return visitor.visitGoogleApps(); - case PAYPAL: - return visitor.visitPaypal(); - case LINKEDIN: - return visitor.visitLinkedin(); - case THECITY: - return visitor.visitThecity(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionIdentityProviderEnum valueOf(String value) { - switch (value) { - case "shop": - return SHOP; - case "auth0-oidc": - return AUTH0OIDC; - case "dwolla": - return DWOLLA; - case "flickr": - return FLICKR; - case "okta": - return OKTA; - case "planningcenter": - return PLANNINGCENTER; - case "google-oauth2": - return GOOGLE_OAUTH2; - case "auth0": - return AUTH0; - case "exact": - return EXACT; - case "wordpress": - return WORDPRESS; - case "fitbit": - return FITBIT; - case "evernote": - return EVERNOTE; - case "sharepoint": - return SHAREPOINT; - case "shopify": - return SHOPIFY; - case "salesforce-sandbox": - return SALESFORCE_SANDBOX; - case "miicard": - return MIICARD; - case "facebook": - return FACEBOOK; - case "oauth1": - return OAUTH1; - case "apple": - return APPLE; - case "untappd": - return UNTAPPD; - case "amazon": - return AMAZON; - case "line": - return LINE; - case "bitbucket": - return BITBUCKET; - case "github": - return GITHUB; - case "salesforce": - return SALESFORCE; - case "office365": - return OFFICE365; - case "sms": - return SMS; - case "aol": - return AOL; - case "twitter": - return TWITTER; - case "windowslive": - return WINDOWSLIVE; - case "yandex": - return YANDEX; - case "ad": - return AD; - case "baidu": - return BAIDU; - case "bitly": - return BITLY; - case "paypal-sandbox": - return PAYPAL_SANDBOX; - case "renren": - return RENREN; - case "samlp": - return SAMLP; - case "dropbox": - return DROPBOX; - case "vkontakte": - return VKONTAKTE; - case "pingfederate": - return PINGFEDERATE; - case "instagram": - return INSTAGRAM; - case "thirtysevensignals": - return THIRTYSEVENSIGNALS; - case "waad": - return WAAD; - case "thecity-sandbox": - return THECITY_SANDBOX; - case "oidc": - return OIDC; - case "yammer": - return YAMMER; - case "evernote-sandbox": - return EVERNOTE_SANDBOX; - case "salesforce-community": - return SALESFORCE_COMMUNITY; - case "daccount": - return DACCOUNT; - case "soundcloud": - return SOUNDCLOUD; - case "oauth2": - return OAUTH2; - case "box": - return BOX; - case "ip": - return IP; - case "adfs": - return ADFS; - case "email": - return EMAIL; - case "custom": - return CUSTOM; - case "yahoo": - return YAHOO; - case "weibo": - return WEIBO; - case "google-apps": - return GOOGLE_APPS; - case "paypal": - return PAYPAL; - case "linkedin": - return LINKEDIN; - case "thecity": - return THECITY; - default: - return new ConnectionIdentityProviderEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AD, - - ADFS, - - AMAZON, - - APPLE, - - DROPBOX, - - BITBUCKET, - - AOL, - - AUTH0OIDC, - - AUTH0, - - BAIDU, - - BITLY, - - BOX, - - CUSTOM, - - DACCOUNT, - - DWOLLA, - - EMAIL, - - EVERNOTE_SANDBOX, - - EVERNOTE, - - EXACT, - - FACEBOOK, - - FITBIT, - - FLICKR, - - GITHUB, - - GOOGLE_APPS, - - GOOGLE_OAUTH2, - - INSTAGRAM, - - IP, - - LINE, - - LINKEDIN, - - MIICARD, - - OAUTH1, - - OAUTH2, - - OFFICE365, - - OIDC, - - OKTA, - - PAYPAL, - - PAYPAL_SANDBOX, - - PINGFEDERATE, - - PLANNINGCENTER, - - RENREN, - - SALESFORCE_COMMUNITY, - - SALESFORCE_SANDBOX, - - SALESFORCE, - - SAMLP, - - SHAREPOINT, - - SHOPIFY, - - SHOP, - - SMS, - - SOUNDCLOUD, - - THECITY_SANDBOX, - - THECITY, - - THIRTYSEVENSIGNALS, - - TWITTER, - - UNTAPPD, - - VKONTAKTE, - - WAAD, - - WEIBO, - - WINDOWSLIVE, - - WORDPRESS, - - YAHOO, - - YAMMER, - - YANDEX, - - UNKNOWN - } - - public interface Visitor { - T visitAd(); - - T visitAdfs(); - - T visitAmazon(); - - T visitApple(); - - T visitDropbox(); - - T visitBitbucket(); - - T visitAol(); - - T visitAuth0Oidc(); - - T visitAuth0(); - - T visitBaidu(); - - T visitBitly(); - - T visitBox(); - - T visitCustom(); - - T visitDaccount(); - - T visitDwolla(); - - T visitEmail(); - - T visitEvernoteSandbox(); - - T visitEvernote(); - - T visitExact(); - - T visitFacebook(); - - T visitFitbit(); - - T visitFlickr(); - - T visitGithub(); - - T visitGoogleApps(); - - T visitGoogleOauth2(); - - T visitInstagram(); - - T visitIp(); - - T visitLine(); - - T visitLinkedin(); - - T visitMiicard(); - - T visitOauth1(); - - T visitOauth2(); - - T visitOffice365(); - - T visitOidc(); - - T visitOkta(); - - T visitPaypal(); - - T visitPaypalSandbox(); - - T visitPingfederate(); - - T visitPlanningcenter(); - - T visitRenren(); - - T visitSalesforceCommunity(); - - T visitSalesforceSandbox(); - - T visitSalesforce(); - - T visitSamlp(); - - T visitSharepoint(); - - T visitShopify(); - - T visitShop(); - - T visitSms(); - - T visitSoundcloud(); - - T visitThecitySandbox(); - - T visitThecity(); - - T visitThirtysevensignals(); - - T visitTwitter(); - - T visitUntappd(); - - T visitVkontakte(); - - T visitWaad(); - - T visitWeibo(); - - T visitWindowslive(); - - T visitWordpress(); - - T visitYahoo(); - - T visitYammer(); - - T visitYandex(); - - 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 deleted file mode 100644 index 5a806f424..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionKey.java +++ /dev/null @@ -1,565 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionKey.Builder.class) -public final class ConnectionKey { - private final String kid; - - private final String cert; - - private final Optional pkcs; - - private final Optional current; - - private final Optional next; - - private final Optional previous; - - private final Optional currentSince; - - private final String fingerprint; - - private final String thumbprint; - - private final Optional algorithm; - - private final Optional keyUse; - - private final Optional subjectDn; - - private final Map additionalProperties; - - private ConnectionKey( - String kid, - String cert, - Optional pkcs, - Optional current, - Optional next, - Optional previous, - Optional currentSince, - String fingerprint, - String thumbprint, - Optional algorithm, - Optional keyUse, - Optional subjectDn, - Map additionalProperties) { - this.kid = kid; - this.cert = cert; - this.pkcs = pkcs; - this.current = current; - this.next = next; - this.previous = previous; - this.currentSince = currentSince; - this.fingerprint = fingerprint; - this.thumbprint = thumbprint; - this.algorithm = algorithm; - this.keyUse = keyUse; - this.subjectDn = subjectDn; - this.additionalProperties = additionalProperties; - } - - /** - * @return The key id of the signing key - */ - @JsonProperty("kid") - public String getKid() { - return kid; - } - - /** - * @return The public certificate of the signing key - */ - @JsonProperty("cert") - public String getCert() { - return cert; - } - - /** - * @return The public certificate of the signing key in pkcs7 format - */ - @JsonProperty("pkcs") - public Optional getPkcs() { - return pkcs; - } - - /** - * @return True if the key is the the current key - */ - @JsonProperty("current") - public Optional getCurrent() { - return current; - } - - /** - * @return True if the key is the the next key - */ - @JsonProperty("next") - public Optional getNext() { - return next; - } - - /** - * @return True if the key is the the previous key - */ - @JsonProperty("previous") - public Optional getPrevious() { - return previous; - } - - /** - * @return The date and time when the key became the current key - */ - @JsonProperty("current_since") - public Optional getCurrentSince() { - return currentSince; - } - - /** - * @return The cert fingerprint - */ - @JsonProperty("fingerprint") - public String getFingerprint() { - return fingerprint; - } - - /** - * @return The cert thumbprint - */ - @JsonProperty("thumbprint") - public String getThumbprint() { - return thumbprint; - } - - /** - * @return Signing key algorithm - */ - @JsonProperty("algorithm") - public Optional getAlgorithm() { - return algorithm; - } - - @JsonProperty("key_use") - public Optional getKeyUse() { - return keyUse; - } - - @JsonProperty("subject_dn") - public Optional getSubjectDn() { - return subjectDn; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionKey && equalTo((ConnectionKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionKey other) { - return kid.equals(other.kid) - && cert.equals(other.cert) - && pkcs.equals(other.pkcs) - && current.equals(other.current) - && next.equals(other.next) - && previous.equals(other.previous) - && currentSince.equals(other.currentSince) - && fingerprint.equals(other.fingerprint) - && thumbprint.equals(other.thumbprint) - && algorithm.equals(other.algorithm) - && keyUse.equals(other.keyUse) - && subjectDn.equals(other.subjectDn); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.kid, - this.cert, - this.pkcs, - this.current, - this.next, - this.previous, - this.currentSince, - this.fingerprint, - this.thumbprint, - this.algorithm, - this.keyUse, - this.subjectDn); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static KidStage builder() { - return new Builder(); - } - - public interface KidStage { - /** - *

The key id of the signing key

- */ - CertStage kid(@NotNull String kid); - - Builder from(ConnectionKey other); - } - - public interface CertStage { - /** - *

The public certificate of the signing key

- */ - FingerprintStage cert(@NotNull String cert); - } - - public interface FingerprintStage { - /** - *

The cert fingerprint

- */ - ThumbprintStage fingerprint(@NotNull String fingerprint); - } - - public interface ThumbprintStage { - /** - *

The cert thumbprint

- */ - _FinalStage thumbprint(@NotNull String thumbprint); - } - - public interface _FinalStage { - ConnectionKey build(); - - /** - *

The public certificate of the signing key in pkcs7 format

- */ - _FinalStage pkcs(Optional pkcs); - - _FinalStage pkcs(String pkcs); - - /** - *

True if the key is the the current key

- */ - _FinalStage current(Optional current); - - _FinalStage current(Boolean current); - - /** - *

True if the key is the the next key

- */ - _FinalStage next(Optional next); - - _FinalStage next(Boolean next); - - /** - *

True if the key is the the previous key

- */ - _FinalStage previous(Optional previous); - - _FinalStage previous(Boolean previous); - - /** - *

The date and time when the key became the current key

- */ - _FinalStage currentSince(Optional currentSince); - - _FinalStage currentSince(String currentSince); - - /** - *

Signing key algorithm

- */ - _FinalStage algorithm(Optional algorithm); - - _FinalStage algorithm(String algorithm); - - _FinalStage keyUse(Optional keyUse); - - _FinalStage keyUse(ConnectionKeyUseEnum keyUse); - - _FinalStage subjectDn(Optional subjectDn); - - _FinalStage subjectDn(String subjectDn); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements KidStage, CertStage, FingerprintStage, ThumbprintStage, _FinalStage { - private String kid; - - private String cert; - - private String fingerprint; - - private String thumbprint; - - private Optional subjectDn = Optional.empty(); - - private Optional keyUse = Optional.empty(); - - private Optional algorithm = Optional.empty(); - - private Optional currentSince = Optional.empty(); - - private Optional previous = Optional.empty(); - - private Optional next = Optional.empty(); - - private Optional current = Optional.empty(); - - private Optional pkcs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionKey other) { - kid(other.getKid()); - cert(other.getCert()); - pkcs(other.getPkcs()); - current(other.getCurrent()); - next(other.getNext()); - previous(other.getPrevious()); - currentSince(other.getCurrentSince()); - fingerprint(other.getFingerprint()); - thumbprint(other.getThumbprint()); - algorithm(other.getAlgorithm()); - keyUse(other.getKeyUse()); - subjectDn(other.getSubjectDn()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("kid") - public CertStage kid(@NotNull String kid) { - this.kid = Objects.requireNonNull(kid, "kid must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("cert") - public FingerprintStage cert(@NotNull String cert) { - this.cert = Objects.requireNonNull(cert, "cert must not be null"); - return this; - } - - /** - *

The cert fingerprint

- *

The cert fingerprint

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

The cert thumbprint

- *

The cert thumbprint

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("thumbprint") - public _FinalStage thumbprint(@NotNull String thumbprint) { - this.thumbprint = Objects.requireNonNull(thumbprint, "thumbprint must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage subjectDn(String subjectDn) { - this.subjectDn = Optional.ofNullable(subjectDn); - return this; - } - - @java.lang.Override - @JsonSetter(value = "subject_dn", nulls = Nulls.SKIP) - public _FinalStage subjectDn(Optional subjectDn) { - this.subjectDn = subjectDn; - return this; - } - - @java.lang.Override - public _FinalStage keyUse(ConnectionKeyUseEnum keyUse) { - this.keyUse = Optional.ofNullable(keyUse); - return this; - } - - @java.lang.Override - @JsonSetter(value = "key_use", nulls = Nulls.SKIP) - public _FinalStage keyUse(Optional keyUse) { - this.keyUse = keyUse; - return this; - } - - /** - *

Signing key algorithm

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

Signing key algorithm

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

The date and time when the key became the current key

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

The date and time when the key became the current key

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

True if the key is the the previous key

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

True if the key is the the previous key

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

True if the key is the the next key

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

True if the key is the the next key

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

True if the key is the the current key

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

True if the key is the the current key

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

The public certificate of the signing key in pkcs7 format

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

The public certificate of the signing key in pkcs7 format

- */ - @java.lang.Override - @JsonSetter(value = "pkcs", nulls = Nulls.SKIP) - public _FinalStage pkcs(Optional pkcs) { - this.pkcs = pkcs; - return this; - } - - @java.lang.Override - public ConnectionKey build() { - return new ConnectionKey( - kid, - cert, - pkcs, - current, - next, - previous, - currentSince, - fingerprint, - thumbprint, - algorithm, - keyUse, - subjectDn, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionKeyUseEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionKeyUseEnum.java deleted file mode 100644 index 25c229547..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionKeyUseEnum.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionKeyUseEnum { - public static final ConnectionKeyUseEnum SIGNING = new ConnectionKeyUseEnum(Value.SIGNING, "signing"); - - public static final ConnectionKeyUseEnum ENCRYPTION = new ConnectionKeyUseEnum(Value.ENCRYPTION, "encryption"); - - private final Value value; - - private final String string; - - ConnectionKeyUseEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionKeyUseEnum && this.string.equals(((ConnectionKeyUseEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SIGNING: - return visitor.visitSigning(); - case ENCRYPTION: - return visitor.visitEncryption(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionKeyUseEnum valueOf(String value) { - switch (value) { - case "signing": - return SIGNING; - case "encryption": - return ENCRYPTION; - default: - return new ConnectionKeyUseEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - ENCRYPTION, - - SIGNING, - - UNKNOWN - } - - public interface Visitor { - T visitEncryption(); - - T visitSigning(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionMappingModeEnumOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionMappingModeEnumOidc.java deleted file mode 100644 index 1ce75c8f4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionMappingModeEnumOidc.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionMappingModeEnumOidc { - public static final ConnectionMappingModeEnumOidc USE_MAP = - new ConnectionMappingModeEnumOidc(Value.USE_MAP, "use_map"); - - public static final ConnectionMappingModeEnumOidc BIND_ALL = - new ConnectionMappingModeEnumOidc(Value.BIND_ALL, "bind_all"); - - private final Value value; - - private final String string; - - ConnectionMappingModeEnumOidc(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionMappingModeEnumOidc - && this.string.equals(((ConnectionMappingModeEnumOidc) 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 BIND_ALL: - return visitor.visitBindAll(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionMappingModeEnumOidc valueOf(String value) { - switch (value) { - case "use_map": - return USE_MAP; - case "bind_all": - return BIND_ALL; - default: - return new ConnectionMappingModeEnumOidc(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/ConnectionMappingModeEnumOkta.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionMappingModeEnumOkta.java deleted file mode 100644 index e1323c7e7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionMappingModeEnumOkta.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionMappingModeEnumOkta { - public static final ConnectionMappingModeEnumOkta USE_MAP = - new ConnectionMappingModeEnumOkta(Value.USE_MAP, "use_map"); - - public static final ConnectionMappingModeEnumOkta BASIC_PROFILE = - new ConnectionMappingModeEnumOkta(Value.BASIC_PROFILE, "basic_profile"); - - private final Value value; - - private final String string; - - ConnectionMappingModeEnumOkta(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionMappingModeEnumOkta - && this.string.equals(((ConnectionMappingModeEnumOkta) 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 ConnectionMappingModeEnumOkta valueOf(String value) { - switch (value) { - case "use_map": - return USE_MAP; - case "basic_profile": - return BASIC_PROFILE; - default: - return new ConnectionMappingModeEnumOkta(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/ConnectionMfa.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionMfa.java deleted file mode 100644 index 5b3239148..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionMfa.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionMfa.Builder.class) -public final class ConnectionMfa { - private final Optional active; - - private final Optional returnEnrollSettings; - - private final Map additionalProperties; - - private ConnectionMfa( - Optional active, - Optional returnEnrollSettings, - Map additionalProperties) { - this.active = active; - this.returnEnrollSettings = returnEnrollSettings; - this.additionalProperties = additionalProperties; - } - - /** - * @return Indicates whether MFA is active for this connection - */ - @JsonProperty("active") - public Optional getActive() { - return active; - } - - /** - * @return Indicates whether to return MFA enrollment settings - */ - @JsonProperty("return_enroll_settings") - public Optional getReturnEnrollSettings() { - return returnEnrollSettings; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionMfa && equalTo((ConnectionMfa) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionMfa other) { - return active.equals(other.active) && returnEnrollSettings.equals(other.returnEnrollSettings); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.active, this.returnEnrollSettings); - } - - @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 returnEnrollSettings = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionMfa other) { - active(other.getActive()); - returnEnrollSettings(other.getReturnEnrollSettings()); - return this; - } - - /** - *

Indicates whether MFA is active for this connection

- */ - @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; - } - - /** - *

Indicates whether to return MFA enrollment settings

- */ - @JsonSetter(value = "return_enroll_settings", nulls = Nulls.SKIP) - public Builder returnEnrollSettings(Optional returnEnrollSettings) { - this.returnEnrollSettings = returnEnrollSettings; - return this; - } - - public Builder returnEnrollSettings(Boolean returnEnrollSettings) { - this.returnEnrollSettings = Optional.ofNullable(returnEnrollSettings); - return this; - } - - public ConnectionMfa build() { - return new ConnectionMfa(active, returnEnrollSettings, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAd.java deleted file mode 100644 index 5cbb7e82e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAd.java +++ /dev/null @@ -1,612 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsAd.Builder.class) -public final class ConnectionOptionsAd implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - 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 setUserRootAttributes; - - private final Optional signInEndpoint; - - private final Optional tenantDomain; - - private final Optional> thumbprints; - - private final OptionalNullable>> - upstreamParams; - - private final Map additionalProperties; - - private ConnectionOptionsAd( - Optional> nonPersistentAttrs, - 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 setUserRootAttributes, - Optional signInEndpoint, - Optional tenantDomain, - Optional> thumbprints, - OptionalNullable>> upstreamParams, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - 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.setUserRootAttributes = setUserRootAttributes; - this.signInEndpoint = signInEndpoint; - this.tenantDomain = tenantDomain; - this.thumbprints = thumbprints; - this.upstreamParams = upstreamParams; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("agentIP") - public Optional getAgentIp() { - return agentIp; - } - - @JsonProperty("agentMode") - public Optional getAgentMode() { - return agentMode; - } - - @JsonProperty("agentVersion") - public Optional getAgentVersion() { - return agentVersion; - } - - @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; - } - - @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; - } - - @JsonProperty("domain_aliases") - public Optional> getDomainAliases() { - return domainAliases; - } - - @JsonProperty("icon_url") - public Optional getIconUrl() { - return iconUrl; - } - - @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; - } - - @JsonProperty("set_user_root_attributes") - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonProperty("signInEndpoint") - public Optional getSignInEndpoint() { - return signInEndpoint; - } - - @JsonProperty("tenant_domain") - public Optional getTenantDomain() { - return tenantDomain; - } - - @JsonProperty("thumbprints") - public Optional> getThumbprints() { - return thumbprints; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsAd && equalTo((ConnectionOptionsAd) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsAd other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && 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) - && 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.nonPersistentAttrs, - 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.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> nonPersistentAttrs = Optional.empty(); - - 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 setUserRootAttributes = Optional.empty(); - - private Optional signInEndpoint = Optional.empty(); - - private Optional tenantDomain = Optional.empty(); - - private Optional> thumbprints = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsAd other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - 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()); - setUserRootAttributes(other.getSetUserRootAttributes()); - signInEndpoint(other.getSignInEndpoint()); - tenantDomain(other.getTenantDomain()); - thumbprints(other.getThumbprints()); - upstreamParams(other.getUpstreamParams()); - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @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; - } - - @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; - } - - @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; - } - - @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; - } - - @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; - } - - @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; - } - - @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 = "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; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "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; - } - - @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; - } - - @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( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - public ConnectionOptionsAd build() { - return new ConnectionOptionsAd( - nonPersistentAttrs, - agentIp, - agentMode, - agentVersion, - bruteForceProtection, - certAuth, - certs, - disableCache, - disableSelfServiceChangePassword, - domainAliases, - iconUrl, - ips, - kerberos, - setUserRootAttributes, - signInEndpoint, - tenantDomain, - thumbprints, - 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 deleted file mode 100644 index f5a6c212d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAdfs.java +++ /dev/null @@ -1,505 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsAdfs.Builder.class) -public final class ConnectionOptionsAdfs implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional adfsServer; - - private final Optional> domainAliases; - - private final Optional entityId; - - private final Optional fedMetadataXml; - - private final Optional iconUrl; - - 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 OptionalNullable>> - upstreamParams; - - private final Optional userIdAttribute; - - private final Map additionalProperties; - - private ConnectionOptionsAdfs( - Optional> nonPersistentAttrs, - Optional adfsServer, - Optional> domainAliases, - Optional entityId, - Optional fedMetadataXml, - Optional iconUrl, - Optional> prevThumbprints, - Optional setUserRootAttributes, - Optional shouldTrustEmailVerifiedConnection, - Optional signInEndpoint, - Optional tenantDomain, - Optional> thumbprints, - OptionalNullable>> upstreamParams, - Optional userIdAttribute, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.adfsServer = adfsServer; - this.domainAliases = domainAliases; - this.entityId = entityId; - this.fedMetadataXml = fedMetadataXml; - this.iconUrl = iconUrl; - 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; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - /** - * @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; - } - - @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; - } - - @JsonProperty("fedMetadataXml") - public Optional getFedMetadataXml() { - return fedMetadataXml; - } - - @JsonProperty("icon_url") - public Optional getIconUrl() { - return iconUrl; - } - - @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; - } - - @JsonProperty("signInEndpoint") - public Optional getSignInEndpoint() { - return signInEndpoint; - } - - @JsonProperty("tenant_domain") - public Optional getTenantDomain() { - return tenantDomain; - } - - @JsonProperty("thumbprints") - public Optional> getThumbprints() { - return thumbprints; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - 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; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsAdfs && equalTo((ConnectionOptionsAdfs) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsAdfs other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && adfsServer.equals(other.adfsServer) - && domainAliases.equals(other.domainAliases) - && entityId.equals(other.entityId) - && fedMetadataXml.equals(other.fedMetadataXml) - && iconUrl.equals(other.iconUrl) - && 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.nonPersistentAttrs, - this.adfsServer, - this.domainAliases, - this.entityId, - this.fedMetadataXml, - this.iconUrl, - 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> nonPersistentAttrs = Optional.empty(); - - private Optional adfsServer = Optional.empty(); - - private Optional> domainAliases = Optional.empty(); - - private Optional entityId = Optional.empty(); - - private Optional fedMetadataXml = Optional.empty(); - - private Optional iconUrl = 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 OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional userIdAttribute = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsAdfs other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - adfsServer(other.getAdfsServer()); - domainAliases(other.getDomainAliases()); - entityId(other.getEntityId()); - fedMetadataXml(other.getFedMetadataXml()); - iconUrl(other.getIconUrl()); - 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; - } - - @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; - } - - /** - *

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; - } - - @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; - } - - @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; - } - - @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 = "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(ConnectionSetUserRootAttributesEnum 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( - ConnectionShouldTrustEmailVerifiedConnectionEnum shouldTrustEmailVerifiedConnection) { - this.shouldTrustEmailVerifiedConnection = Optional.ofNullable(shouldTrustEmailVerifiedConnection); - return this; - } - - @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; - } - - @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; - } - - @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( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - /** - *

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 ConnectionOptionsAdfs build() { - return new ConnectionOptionsAdfs( - nonPersistentAttrs, - adfsServer, - domainAliases, - entityId, - fedMetadataXml, - iconUrl, - prevThumbprints, - setUserRootAttributes, - shouldTrustEmailVerifiedConnection, - signInEndpoint, - tenantDomain, - thumbprints, - upstreamParams, - userIdAttribute, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAmazon.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAmazon.java deleted file mode 100644 index b1f28e716..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAmazon.java +++ /dev/null @@ -1,366 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsAmazon.Builder.class) -public final class ConnectionOptionsAmazon implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional> freeformScopes; - - private final Optional postalCode; - - private final Optional profile; - - private final Optional> scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Map additionalProperties; - - private ConnectionOptionsAmazon( - Optional> nonPersistentAttrs, - Optional clientId, - Optional clientSecret, - Optional> freeformScopes, - Optional postalCode, - Optional profile, - Optional> scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.freeformScopes = freeformScopes; - this.postalCode = postalCode; - this.profile = profile; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("freeform_scopes") - public Optional> getFreeformScopes() { - return freeformScopes; - } - - /** - * @return When enabled, requests the user's postal code from Amazon during authentication. This adds the 'postal_code' scope to the authorization request. - */ - @JsonProperty("postal_code") - public Optional getPostalCode() { - return postalCode; - } - - /** - * @return When enabled, requests the user's basic profile information (name, email, user ID) from Amazon during authentication. This scope is always enabled for Amazon connections. - */ - @JsonProperty("profile") - public Optional getProfile() { - return profile; - } - - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsAmazon && equalTo((ConnectionOptionsAmazon) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsAmazon other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && freeformScopes.equals(other.freeformScopes) - && postalCode.equals(other.postalCode) - && profile.equals(other.profile) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.nonPersistentAttrs, - this.clientId, - this.clientSecret, - this.freeformScopes, - this.postalCode, - this.profile, - this.scope, - this.setUserRootAttributes, - 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> nonPersistentAttrs = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional> freeformScopes = Optional.empty(); - - private Optional postalCode = Optional.empty(); - - private Optional profile = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsAmazon other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - freeformScopes(other.getFreeformScopes()); - postalCode(other.getPostalCode()); - profile(other.getProfile()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @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 = "freeform_scopes", nulls = Nulls.SKIP) - public Builder freeformScopes(Optional> freeformScopes) { - this.freeformScopes = freeformScopes; - return this; - } - - public Builder freeformScopes(List freeformScopes) { - this.freeformScopes = Optional.ofNullable(freeformScopes); - return this; - } - - /** - *

When enabled, requests the user's postal code from Amazon during authentication. This adds the 'postal_code' scope to the authorization request.

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

When enabled, requests the user's basic profile information (name, email, user ID) from Amazon during authentication. This scope is always enabled for Amazon connections.

- */ - @JsonSetter(value = "profile", nulls = Nulls.SKIP) - public Builder profile(Optional profile) { - this.profile = profile; - return this; - } - - public Builder profile(Boolean profile) { - this.profile = Optional.ofNullable(profile); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - public ConnectionOptionsAmazon build() { - return new ConnectionOptionsAmazon( - nonPersistentAttrs, - clientId, - clientSecret, - freeformScopes, - postalCode, - profile, - scope, - setUserRootAttributes, - upstreamParams, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAol.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAol.java deleted file mode 100644 index ade31883a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAol.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsAol.Builder.class) -public final class ConnectionOptionsAol implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsAol( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsAol && equalTo((ConnectionOptionsAol) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsAol other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsAol other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsAol build() { - return new ConnectionOptionsAol( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsApple.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsApple.java deleted file mode 100644 index 71f6dd6fe..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsApple.java +++ /dev/null @@ -1,574 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsApple.Builder.class) -public final class ConnectionOptionsApple implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final OptionalNullable appSecret; - - private final OptionalNullable clientId; - - private final Optional email; - - private final Optional> freeformScopes; - - private final OptionalNullable kid; - - private final Optional name; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable teamId; - - private final OptionalNullable>> - upstreamParams; - - private final Map additionalProperties; - - private ConnectionOptionsApple( - Optional> nonPersistentAttrs, - OptionalNullable appSecret, - OptionalNullable clientId, - Optional email, - Optional> freeformScopes, - OptionalNullable kid, - Optional name, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable teamId, - OptionalNullable>> upstreamParams, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.appSecret = appSecret; - this.clientId = clientId; - this.email = email; - this.freeformScopes = freeformScopes; - this.kid = kid; - this.name = name; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.teamId = teamId; - this.upstreamParams = upstreamParams; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - /** - * @return Apple App Secret (must be a PEM) - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("app_secret") - public OptionalNullable getAppSecret() { - if (appSecret == null) { - return OptionalNullable.absent(); - } - return appSecret; - } - - /** - * @return Apple Services ID - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("client_id") - public OptionalNullable getClientId() { - if (clientId == null) { - return OptionalNullable.absent(); - } - return clientId; - } - - /** - * @return User has the option to obfuscate the email with Apple's relay service - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - /** - * @return Array of freeform scopes - */ - @JsonProperty("freeform_scopes") - public Optional> getFreeformScopes() { - return freeformScopes; - } - - /** - * @return Apple Key ID - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("kid") - public OptionalNullable getKid() { - if (kid == null) { - return OptionalNullable.absent(); - } - return kid; - } - - /** - * @return Whether to request name from Apple - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Space separated list of scopes - */ - @JsonProperty("scope") - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - /** - * @return Apple Team ID - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("team_id") - public OptionalNullable getTeamId() { - if (teamId == null) { - return OptionalNullable.absent(); - } - return teamId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("app_secret") - private OptionalNullable _getAppSecret() { - return appSecret; - } - - @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("kid") - private OptionalNullable _getKid() { - return kid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("team_id") - private OptionalNullable _getTeamId() { - return teamId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsApple && equalTo((ConnectionOptionsApple) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsApple other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && appSecret.equals(other.appSecret) - && clientId.equals(other.clientId) - && email.equals(other.email) - && freeformScopes.equals(other.freeformScopes) - && kid.equals(other.kid) - && name.equals(other.name) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && teamId.equals(other.teamId) - && upstreamParams.equals(other.upstreamParams); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.nonPersistentAttrs, - this.appSecret, - this.clientId, - this.email, - this.freeformScopes, - this.kid, - this.name, - this.scope, - this.setUserRootAttributes, - this.teamId, - 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> nonPersistentAttrs = Optional.empty(); - - private OptionalNullable appSecret = OptionalNullable.absent(); - - private OptionalNullable clientId = OptionalNullable.absent(); - - private Optional email = Optional.empty(); - - private Optional> freeformScopes = Optional.empty(); - - private OptionalNullable kid = OptionalNullable.absent(); - - private Optional name = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable teamId = OptionalNullable.absent(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsApple other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - appSecret(other.getAppSecret()); - clientId(other.getClientId()); - email(other.getEmail()); - freeformScopes(other.getFreeformScopes()); - kid(other.getKid()); - name(other.getName()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - teamId(other.getTeamId()); - upstreamParams(other.getUpstreamParams()); - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - /** - *

Apple App Secret (must be a PEM)

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

Apple Services ID

- */ - @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; - } - - /** - *

User has the option to obfuscate the email with Apple's relay service

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

Array of freeform scopes

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

Apple Key ID

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

Whether to request name from Apple

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

Space separated list of scopes

- */ - @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 = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - /** - *

Apple Team ID

- */ - @JsonSetter(value = "team_id", nulls = Nulls.SKIP) - public Builder teamId(@Nullable OptionalNullable teamId) { - this.teamId = teamId; - return this; - } - - public Builder teamId(String teamId) { - this.teamId = OptionalNullable.of(teamId); - return this; - } - - public Builder teamId(Optional teamId) { - if (teamId.isPresent()) { - this.teamId = OptionalNullable.of(teamId.get()); - } else { - this.teamId = OptionalNullable.absent(); - } - return this; - } - - public Builder teamId(com.auth0.client.mgmt.core.Nullable teamId) { - if (teamId.isNull()) { - this.teamId = OptionalNullable.ofNull(); - } else if (teamId.isEmpty()) { - this.teamId = OptionalNullable.absent(); - } else { - this.teamId = OptionalNullable.of(teamId.get()); - } - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - public ConnectionOptionsApple build() { - return new ConnectionOptionsApple( - nonPersistentAttrs, - appSecret, - clientId, - email, - freeformScopes, - kid, - name, - scope, - setUserRootAttributes, - teamId, - upstreamParams, - 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 deleted file mode 100644 index b78eb6e8e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAuth0.java +++ /dev/null @@ -1,905 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsAuth0.Builder.class) -public final class ConnectionOptionsAuth0 implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional attributes; - - private final OptionalNullable authenticationMethods; - - private final Optional bruteForceProtection; - - private final Optional> configuration; - - private final Optional customScripts; - - private final Optional disableSelfServiceChangePassword; - - private final Optional disableSignup; - - private final Optional enableScriptContext; - - private final Optional enabledDatabaseCustomization; - - private final Optional importMode; - - private final Optional mfa; - - private final OptionalNullable passkeyOptions; - - private final OptionalNullable passwordPolicy; - - private final OptionalNullable passwordComplexityOptions; - - private final OptionalNullable passwordDictionary; - - private final OptionalNullable passwordHistory; - - private final OptionalNullable passwordNoPersonalInfo; - - private final Optional> precedence; - - private final Optional realmFallback; - - private final Optional requiresUsername; - - private final OptionalNullable validation; - - private final Map additionalProperties; - - private ConnectionOptionsAuth0( - Optional> nonPersistentAttrs, - Optional attributes, - OptionalNullable authenticationMethods, - Optional bruteForceProtection, - Optional> configuration, - Optional customScripts, - Optional disableSelfServiceChangePassword, - Optional disableSignup, - Optional enableScriptContext, - Optional enabledDatabaseCustomization, - Optional importMode, - Optional mfa, - OptionalNullable passkeyOptions, - OptionalNullable passwordPolicy, - OptionalNullable passwordComplexityOptions, - OptionalNullable passwordDictionary, - OptionalNullable passwordHistory, - OptionalNullable passwordNoPersonalInfo, - Optional> precedence, - Optional realmFallback, - Optional requiresUsername, - OptionalNullable validation, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.attributes = attributes; - this.authenticationMethods = authenticationMethods; - this.bruteForceProtection = bruteForceProtection; - this.configuration = configuration; - this.customScripts = customScripts; - this.disableSelfServiceChangePassword = disableSelfServiceChangePassword; - this.disableSignup = disableSignup; - this.enableScriptContext = enableScriptContext; - this.enabledDatabaseCustomization = enabledDatabaseCustomization; - this.importMode = importMode; - this.mfa = mfa; - this.passkeyOptions = passkeyOptions; - this.passwordPolicy = passwordPolicy; - this.passwordComplexityOptions = passwordComplexityOptions; - this.passwordDictionary = passwordDictionary; - this.passwordHistory = passwordHistory; - this.passwordNoPersonalInfo = passwordNoPersonalInfo; - this.precedence = precedence; - this.realmFallback = realmFallback; - this.requiresUsername = requiresUsername; - this.validation = validation; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("attributes") - public Optional getAttributes() { - return attributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("authentication_methods") - public OptionalNullable getAuthenticationMethods() { - if (authenticationMethods == null) { - return OptionalNullable.absent(); - } - return authenticationMethods; - } - - @JsonProperty("brute_force_protection") - public Optional getBruteForceProtection() { - return bruteForceProtection; - } - - @JsonProperty("configuration") - public Optional> getConfiguration() { - return configuration; - } - - @JsonProperty("customScripts") - public Optional getCustomScripts() { - return customScripts; - } - - @JsonProperty("disable_self_service_change_password") - public Optional getDisableSelfServiceChangePassword() { - return disableSelfServiceChangePassword; - } - - @JsonProperty("disable_signup") - public Optional getDisableSignup() { - return disableSignup; - } - - @JsonProperty("enable_script_context") - public Optional getEnableScriptContext() { - return enableScriptContext; - } - - @JsonProperty("enabledDatabaseCustomization") - public Optional getEnabledDatabaseCustomization() { - return enabledDatabaseCustomization; - } - - @JsonProperty("import_mode") - public Optional getImportMode() { - return importMode; - } - - @JsonProperty("mfa") - public Optional getMfa() { - return mfa; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("passkey_options") - public OptionalNullable getPasskeyOptions() { - if (passkeyOptions == null) { - return OptionalNullable.absent(); - } - return passkeyOptions; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("passwordPolicy") - public OptionalNullable getPasswordPolicy() { - if (passwordPolicy == null) { - return OptionalNullable.absent(); - } - return passwordPolicy; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_complexity_options") - public OptionalNullable getPasswordComplexityOptions() { - if (passwordComplexityOptions == null) { - return OptionalNullable.absent(); - } - return passwordComplexityOptions; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_dictionary") - public OptionalNullable getPasswordDictionary() { - if (passwordDictionary == null) { - return OptionalNullable.absent(); - } - return passwordDictionary; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_history") - public OptionalNullable getPasswordHistory() { - if (passwordHistory == null) { - return OptionalNullable.absent(); - } - return passwordHistory; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_no_personal_info") - public OptionalNullable getPasswordNoPersonalInfo() { - if (passwordNoPersonalInfo == null) { - return OptionalNullable.absent(); - } - return passwordNoPersonalInfo; - } - - @JsonProperty("precedence") - public Optional> getPrecedence() { - return precedence; - } - - @JsonProperty("realm_fallback") - public Optional getRealmFallback() { - return realmFallback; - } - - @JsonProperty("requires_username") - public Optional getRequiresUsername() { - return requiresUsername; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("validation") - public OptionalNullable getValidation() { - if (validation == null) { - return OptionalNullable.absent(); - } - return validation; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("authentication_methods") - private OptionalNullable _getAuthenticationMethods() { - return authenticationMethods; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("passkey_options") - private OptionalNullable _getPasskeyOptions() { - return passkeyOptions; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("passwordPolicy") - private OptionalNullable _getPasswordPolicy() { - return passwordPolicy; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_complexity_options") - private OptionalNullable _getPasswordComplexityOptions() { - return passwordComplexityOptions; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_dictionary") - private OptionalNullable _getPasswordDictionary() { - return passwordDictionary; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_history") - private OptionalNullable _getPasswordHistory() { - return passwordHistory; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_no_personal_info") - private OptionalNullable _getPasswordNoPersonalInfo() { - return passwordNoPersonalInfo; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("validation") - private OptionalNullable _getValidation() { - return validation; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsAuth0 && equalTo((ConnectionOptionsAuth0) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsAuth0 other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && attributes.equals(other.attributes) - && authenticationMethods.equals(other.authenticationMethods) - && bruteForceProtection.equals(other.bruteForceProtection) - && configuration.equals(other.configuration) - && customScripts.equals(other.customScripts) - && disableSelfServiceChangePassword.equals(other.disableSelfServiceChangePassword) - && disableSignup.equals(other.disableSignup) - && enableScriptContext.equals(other.enableScriptContext) - && enabledDatabaseCustomization.equals(other.enabledDatabaseCustomization) - && importMode.equals(other.importMode) - && mfa.equals(other.mfa) - && passkeyOptions.equals(other.passkeyOptions) - && passwordPolicy.equals(other.passwordPolicy) - && passwordComplexityOptions.equals(other.passwordComplexityOptions) - && passwordDictionary.equals(other.passwordDictionary) - && passwordHistory.equals(other.passwordHistory) - && passwordNoPersonalInfo.equals(other.passwordNoPersonalInfo) - && precedence.equals(other.precedence) - && realmFallback.equals(other.realmFallback) - && requiresUsername.equals(other.requiresUsername) - && validation.equals(other.validation); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.nonPersistentAttrs, - this.attributes, - this.authenticationMethods, - this.bruteForceProtection, - this.configuration, - this.customScripts, - this.disableSelfServiceChangePassword, - this.disableSignup, - this.enableScriptContext, - this.enabledDatabaseCustomization, - this.importMode, - this.mfa, - this.passkeyOptions, - this.passwordPolicy, - this.passwordComplexityOptions, - this.passwordDictionary, - this.passwordHistory, - this.passwordNoPersonalInfo, - this.precedence, - this.realmFallback, - this.requiresUsername, - this.validation); - } - - @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> nonPersistentAttrs = Optional.empty(); - - private Optional attributes = Optional.empty(); - - private OptionalNullable authenticationMethods = OptionalNullable.absent(); - - private Optional bruteForceProtection = Optional.empty(); - - private Optional> configuration = Optional.empty(); - - private Optional customScripts = Optional.empty(); - - private Optional disableSelfServiceChangePassword = Optional.empty(); - - private Optional disableSignup = Optional.empty(); - - private Optional enableScriptContext = Optional.empty(); - - private Optional enabledDatabaseCustomization = Optional.empty(); - - private Optional importMode = Optional.empty(); - - private Optional mfa = Optional.empty(); - - private OptionalNullable passkeyOptions = OptionalNullable.absent(); - - private OptionalNullable passwordPolicy = OptionalNullable.absent(); - - private OptionalNullable passwordComplexityOptions = - OptionalNullable.absent(); - - private OptionalNullable passwordDictionary = OptionalNullable.absent(); - - private OptionalNullable passwordHistory = OptionalNullable.absent(); - - private OptionalNullable passwordNoPersonalInfo = - OptionalNullable.absent(); - - private Optional> precedence = Optional.empty(); - - private Optional realmFallback = Optional.empty(); - - private Optional requiresUsername = Optional.empty(); - - private OptionalNullable validation = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsAuth0 other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - attributes(other.getAttributes()); - authenticationMethods(other.getAuthenticationMethods()); - bruteForceProtection(other.getBruteForceProtection()); - configuration(other.getConfiguration()); - customScripts(other.getCustomScripts()); - disableSelfServiceChangePassword(other.getDisableSelfServiceChangePassword()); - disableSignup(other.getDisableSignup()); - enableScriptContext(other.getEnableScriptContext()); - enabledDatabaseCustomization(other.getEnabledDatabaseCustomization()); - importMode(other.getImportMode()); - mfa(other.getMfa()); - passkeyOptions(other.getPasskeyOptions()); - passwordPolicy(other.getPasswordPolicy()); - passwordComplexityOptions(other.getPasswordComplexityOptions()); - passwordDictionary(other.getPasswordDictionary()); - passwordHistory(other.getPasswordHistory()); - passwordNoPersonalInfo(other.getPasswordNoPersonalInfo()); - precedence(other.getPrecedence()); - realmFallback(other.getRealmFallback()); - requiresUsername(other.getRequiresUsername()); - validation(other.getValidation()); - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @JsonSetter(value = "attributes", nulls = Nulls.SKIP) - public Builder attributes(Optional attributes) { - this.attributes = attributes; - return this; - } - - public Builder attributes(ConnectionAttributes attributes) { - this.attributes = Optional.ofNullable(attributes); - return this; - } - - @JsonSetter(value = "authentication_methods", nulls = Nulls.SKIP) - public Builder authenticationMethods( - @Nullable OptionalNullable authenticationMethods) { - this.authenticationMethods = authenticationMethods; - return this; - } - - public Builder authenticationMethods(ConnectionAuthenticationMethods authenticationMethods) { - this.authenticationMethods = OptionalNullable.of(authenticationMethods); - return this; - } - - public Builder authenticationMethods(Optional authenticationMethods) { - if (authenticationMethods.isPresent()) { - this.authenticationMethods = OptionalNullable.of(authenticationMethods.get()); - } else { - this.authenticationMethods = OptionalNullable.absent(); - } - return this; - } - - public Builder authenticationMethods( - com.auth0.client.mgmt.core.Nullable authenticationMethods) { - if (authenticationMethods.isNull()) { - this.authenticationMethods = OptionalNullable.ofNull(); - } else if (authenticationMethods.isEmpty()) { - this.authenticationMethods = OptionalNullable.absent(); - } else { - this.authenticationMethods = OptionalNullable.of(authenticationMethods.get()); - } - return this; - } - - @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; - } - - @JsonSetter(value = "configuration", nulls = Nulls.SKIP) - public Builder configuration(Optional> configuration) { - this.configuration = configuration; - return this; - } - - public Builder configuration(Map configuration) { - this.configuration = Optional.ofNullable(configuration); - return this; - } - - @JsonSetter(value = "customScripts", nulls = Nulls.SKIP) - public Builder customScripts(Optional customScripts) { - this.customScripts = customScripts; - return this; - } - - public Builder customScripts(ConnectionCustomScripts customScripts) { - this.customScripts = Optional.ofNullable(customScripts); - return this; - } - - @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; - } - - @JsonSetter(value = "disable_signup", nulls = Nulls.SKIP) - public Builder disableSignup(Optional disableSignup) { - this.disableSignup = disableSignup; - return this; - } - - public Builder disableSignup(Boolean disableSignup) { - this.disableSignup = Optional.ofNullable(disableSignup); - return this; - } - - @JsonSetter(value = "enable_script_context", nulls = Nulls.SKIP) - public Builder enableScriptContext(Optional enableScriptContext) { - this.enableScriptContext = enableScriptContext; - return this; - } - - public Builder enableScriptContext(Boolean enableScriptContext) { - this.enableScriptContext = Optional.ofNullable(enableScriptContext); - return this; - } - - @JsonSetter(value = "enabledDatabaseCustomization", nulls = Nulls.SKIP) - public Builder enabledDatabaseCustomization(Optional enabledDatabaseCustomization) { - this.enabledDatabaseCustomization = enabledDatabaseCustomization; - return this; - } - - public Builder enabledDatabaseCustomization(Boolean enabledDatabaseCustomization) { - this.enabledDatabaseCustomization = Optional.ofNullable(enabledDatabaseCustomization); - return this; - } - - @JsonSetter(value = "import_mode", nulls = Nulls.SKIP) - public Builder importMode(Optional importMode) { - this.importMode = importMode; - return this; - } - - public Builder importMode(Boolean importMode) { - this.importMode = Optional.ofNullable(importMode); - return this; - } - - @JsonSetter(value = "mfa", nulls = Nulls.SKIP) - public Builder mfa(Optional mfa) { - this.mfa = mfa; - return this; - } - - public Builder mfa(ConnectionMfa mfa) { - this.mfa = Optional.ofNullable(mfa); - return this; - } - - @JsonSetter(value = "passkey_options", nulls = Nulls.SKIP) - public Builder passkeyOptions(@Nullable OptionalNullable passkeyOptions) { - this.passkeyOptions = passkeyOptions; - return this; - } - - public Builder passkeyOptions(ConnectionPasskeyOptions passkeyOptions) { - this.passkeyOptions = OptionalNullable.of(passkeyOptions); - return this; - } - - public Builder passkeyOptions(Optional passkeyOptions) { - if (passkeyOptions.isPresent()) { - this.passkeyOptions = OptionalNullable.of(passkeyOptions.get()); - } else { - this.passkeyOptions = OptionalNullable.absent(); - } - return this; - } - - public Builder passkeyOptions(com.auth0.client.mgmt.core.Nullable passkeyOptions) { - if (passkeyOptions.isNull()) { - this.passkeyOptions = OptionalNullable.ofNull(); - } else if (passkeyOptions.isEmpty()) { - this.passkeyOptions = OptionalNullable.absent(); - } else { - this.passkeyOptions = OptionalNullable.of(passkeyOptions.get()); - } - return this; - } - - @JsonSetter(value = "passwordPolicy", nulls = Nulls.SKIP) - public Builder passwordPolicy(@Nullable OptionalNullable passwordPolicy) { - this.passwordPolicy = passwordPolicy; - return this; - } - - public Builder passwordPolicy(ConnectionPasswordPolicyEnum passwordPolicy) { - this.passwordPolicy = OptionalNullable.of(passwordPolicy); - return this; - } - - public Builder passwordPolicy(Optional passwordPolicy) { - if (passwordPolicy.isPresent()) { - this.passwordPolicy = OptionalNullable.of(passwordPolicy.get()); - } else { - this.passwordPolicy = OptionalNullable.absent(); - } - return this; - } - - public Builder passwordPolicy( - com.auth0.client.mgmt.core.Nullable passwordPolicy) { - if (passwordPolicy.isNull()) { - this.passwordPolicy = OptionalNullable.ofNull(); - } else if (passwordPolicy.isEmpty()) { - this.passwordPolicy = OptionalNullable.absent(); - } else { - this.passwordPolicy = OptionalNullable.of(passwordPolicy.get()); - } - return this; - } - - @JsonSetter(value = "password_complexity_options", nulls = Nulls.SKIP) - public Builder passwordComplexityOptions( - @Nullable OptionalNullable passwordComplexityOptions) { - this.passwordComplexityOptions = passwordComplexityOptions; - return this; - } - - public Builder passwordComplexityOptions(ConnectionPasswordComplexityOptions passwordComplexityOptions) { - this.passwordComplexityOptions = OptionalNullable.of(passwordComplexityOptions); - return this; - } - - public Builder passwordComplexityOptions( - Optional passwordComplexityOptions) { - if (passwordComplexityOptions.isPresent()) { - this.passwordComplexityOptions = OptionalNullable.of(passwordComplexityOptions.get()); - } else { - this.passwordComplexityOptions = OptionalNullable.absent(); - } - return this; - } - - public Builder passwordComplexityOptions( - com.auth0.client.mgmt.core.Nullable passwordComplexityOptions) { - if (passwordComplexityOptions.isNull()) { - this.passwordComplexityOptions = OptionalNullable.ofNull(); - } else if (passwordComplexityOptions.isEmpty()) { - this.passwordComplexityOptions = OptionalNullable.absent(); - } else { - this.passwordComplexityOptions = OptionalNullable.of(passwordComplexityOptions.get()); - } - return this; - } - - @JsonSetter(value = "password_dictionary", nulls = Nulls.SKIP) - public Builder passwordDictionary( - @Nullable OptionalNullable passwordDictionary) { - this.passwordDictionary = passwordDictionary; - return this; - } - - public Builder passwordDictionary(ConnectionPasswordDictionaryOptions passwordDictionary) { - this.passwordDictionary = OptionalNullable.of(passwordDictionary); - return this; - } - - public Builder passwordDictionary(Optional passwordDictionary) { - if (passwordDictionary.isPresent()) { - this.passwordDictionary = OptionalNullable.of(passwordDictionary.get()); - } else { - this.passwordDictionary = OptionalNullable.absent(); - } - return this; - } - - public Builder passwordDictionary( - com.auth0.client.mgmt.core.Nullable passwordDictionary) { - if (passwordDictionary.isNull()) { - this.passwordDictionary = OptionalNullable.ofNull(); - } else if (passwordDictionary.isEmpty()) { - this.passwordDictionary = OptionalNullable.absent(); - } else { - this.passwordDictionary = OptionalNullable.of(passwordDictionary.get()); - } - return this; - } - - @JsonSetter(value = "password_history", nulls = Nulls.SKIP) - public Builder passwordHistory(@Nullable OptionalNullable passwordHistory) { - this.passwordHistory = passwordHistory; - return this; - } - - public Builder passwordHistory(ConnectionPasswordHistoryOptions passwordHistory) { - this.passwordHistory = OptionalNullable.of(passwordHistory); - return this; - } - - public Builder passwordHistory(Optional passwordHistory) { - if (passwordHistory.isPresent()) { - this.passwordHistory = OptionalNullable.of(passwordHistory.get()); - } else { - this.passwordHistory = OptionalNullable.absent(); - } - return this; - } - - public Builder passwordHistory( - com.auth0.client.mgmt.core.Nullable passwordHistory) { - if (passwordHistory.isNull()) { - this.passwordHistory = OptionalNullable.ofNull(); - } else if (passwordHistory.isEmpty()) { - this.passwordHistory = OptionalNullable.absent(); - } else { - this.passwordHistory = OptionalNullable.of(passwordHistory.get()); - } - return this; - } - - @JsonSetter(value = "password_no_personal_info", nulls = Nulls.SKIP) - public Builder passwordNoPersonalInfo( - @Nullable OptionalNullable passwordNoPersonalInfo) { - this.passwordNoPersonalInfo = passwordNoPersonalInfo; - return this; - } - - public Builder passwordNoPersonalInfo(ConnectionPasswordNoPersonalInfoOptions passwordNoPersonalInfo) { - this.passwordNoPersonalInfo = OptionalNullable.of(passwordNoPersonalInfo); - return this; - } - - public Builder passwordNoPersonalInfo( - Optional passwordNoPersonalInfo) { - if (passwordNoPersonalInfo.isPresent()) { - this.passwordNoPersonalInfo = OptionalNullable.of(passwordNoPersonalInfo.get()); - } else { - this.passwordNoPersonalInfo = OptionalNullable.absent(); - } - return this; - } - - public Builder passwordNoPersonalInfo( - com.auth0.client.mgmt.core.Nullable passwordNoPersonalInfo) { - if (passwordNoPersonalInfo.isNull()) { - this.passwordNoPersonalInfo = OptionalNullable.ofNull(); - } else if (passwordNoPersonalInfo.isEmpty()) { - this.passwordNoPersonalInfo = OptionalNullable.absent(); - } else { - this.passwordNoPersonalInfo = OptionalNullable.of(passwordNoPersonalInfo.get()); - } - return this; - } - - @JsonSetter(value = "precedence", nulls = Nulls.SKIP) - public Builder precedence(Optional> precedence) { - this.precedence = precedence; - return this; - } - - public Builder precedence(List precedence) { - this.precedence = Optional.ofNullable(precedence); - return this; - } - - @JsonSetter(value = "realm_fallback", nulls = Nulls.SKIP) - public Builder realmFallback(Optional realmFallback) { - this.realmFallback = realmFallback; - return this; - } - - public Builder realmFallback(Boolean realmFallback) { - this.realmFallback = Optional.ofNullable(realmFallback); - return this; - } - - @JsonSetter(value = "requires_username", nulls = Nulls.SKIP) - public Builder requiresUsername(Optional requiresUsername) { - this.requiresUsername = requiresUsername; - return this; - } - - public Builder requiresUsername(Boolean requiresUsername) { - this.requiresUsername = Optional.ofNullable(requiresUsername); - return this; - } - - @JsonSetter(value = "validation", nulls = Nulls.SKIP) - public Builder validation(@Nullable OptionalNullable validation) { - this.validation = validation; - return this; - } - - public Builder validation(ConnectionValidationOptions validation) { - this.validation = OptionalNullable.of(validation); - return this; - } - - public Builder validation(Optional validation) { - if (validation.isPresent()) { - this.validation = OptionalNullable.of(validation.get()); - } else { - this.validation = OptionalNullable.absent(); - } - return this; - } - - public Builder validation(com.auth0.client.mgmt.core.Nullable validation) { - if (validation.isNull()) { - this.validation = OptionalNullable.ofNull(); - } else if (validation.isEmpty()) { - this.validation = OptionalNullable.absent(); - } else { - this.validation = OptionalNullable.of(validation.get()); - } - return this; - } - - public ConnectionOptionsAuth0 build() { - return new ConnectionOptionsAuth0( - nonPersistentAttrs, - attributes, - authenticationMethods, - bruteForceProtection, - configuration, - customScripts, - disableSelfServiceChangePassword, - disableSignup, - enableScriptContext, - enabledDatabaseCustomization, - importMode, - mfa, - passkeyOptions, - passwordPolicy, - passwordComplexityOptions, - passwordDictionary, - passwordHistory, - passwordNoPersonalInfo, - precedence, - realmFallback, - requiresUsername, - validation, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAuth0Oidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAuth0Oidc.java deleted file mode 100644 index 2b356a55f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAuth0Oidc.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionOptionsAuth0Oidc.Builder.class) -public final class ConnectionOptionsAuth0Oidc { - private final Optional clientId; - - private final Optional clientSecret; - - private final Map additionalProperties; - - private ConnectionOptionsAuth0Oidc( - Optional clientId, Optional clientSecret, Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsAuth0Oidc && equalTo((ConnectionOptionsAuth0Oidc) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsAuth0Oidc other) { - return clientId.equals(other.clientId) && clientSecret.equals(other.clientSecret); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.clientId, this.clientSecret); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsAuth0Oidc other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - 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; - } - - public ConnectionOptionsAuth0Oidc build() { - return new ConnectionOptionsAuth0Oidc(clientId, clientSecret, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAzureAd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAzureAd.java deleted file mode 100644 index eaee6daa2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAzureAd.java +++ /dev/null @@ -1,2186 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsAzureAd.Builder.class) -public final class ConnectionOptionsAzureAd implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional apiEnableUsers; - - private final Optional appDomain; - - private final Optional appId; - - private final Optional basicProfile; - - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional> domainAliases; - - private final Optional extAccessToken; - - private final Optional extAccountEnabled; - - private final Optional extAdmin; - - private final Optional extAgreedTerms; - - private final Optional extAssignedLicenses; - - private final Optional extAssignedPlans; - - private final Optional extAzureId; - - private final Optional extCity; - - private final Optional extCountry; - - private final Optional extDepartment; - - private final Optional extDirSyncEnabled; - - private final Optional extEmail; - - private final Optional extExpiresIn; - - private final Optional extFamilyName; - - private final Optional extFax; - - private final Optional extGivenName; - - private final Optional extGroupIds; - - private final Optional extGroups; - - private final Optional extIsSuspended; - - private final Optional extJobTitle; - - private final Optional extLastSync; - - private final Optional extMobile; - - private final Optional extName; - - private final Optional extNestedGroups; - - private final Optional extNickname; - - private final Optional extOid; - - private final Optional extPhone; - - private final Optional extPhysicalDeliveryOfficeName; - - private final Optional extPostalCode; - - private final Optional extPreferredLanguage; - - private final Optional extProfile; - - private final Optional extProvisionedPlans; - - private final Optional extProvisioningErrors; - - private final Optional extProxyAddresses; - - private final Optional extPuid; - - private final Optional extRefreshToken; - - private final Optional extRoles; - - private final Optional extState; - - private final Optional extStreet; - - private final Optional extTelephoneNumber; - - private final Optional extTenantid; - - private final Optional extUpn; - - private final Optional extUsageLocation; - - private final Optional extUserId; - - private final OptionalNullable federatedConnectionsAccessTokens; - - private final Optional granted; - - private final Optional iconUrl; - - private final Optional identityApi; - - private final Optional maxGroupsToRetrieve; - - 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 OptionalNullable>> - upstreamParams; - - private final Optional useWsfed; - - private final Optional useCommonEndpoint; - - private final Optional useridAttribute; - - private final Optional waadProtocol; - - private final Map additionalProperties; - - private ConnectionOptionsAzureAd( - Optional> nonPersistentAttrs, - Optional apiEnableUsers, - Optional appDomain, - Optional appId, - Optional basicProfile, - Optional clientId, - Optional clientSecret, - Optional> domainAliases, - Optional extAccessToken, - Optional extAccountEnabled, - Optional extAdmin, - Optional extAgreedTerms, - Optional extAssignedLicenses, - Optional extAssignedPlans, - Optional extAzureId, - Optional extCity, - Optional extCountry, - Optional extDepartment, - Optional extDirSyncEnabled, - Optional extEmail, - Optional extExpiresIn, - Optional extFamilyName, - Optional extFax, - Optional extGivenName, - Optional extGroupIds, - Optional extGroups, - Optional extIsSuspended, - Optional extJobTitle, - Optional extLastSync, - Optional extMobile, - Optional extName, - Optional extNestedGroups, - Optional extNickname, - Optional extOid, - Optional extPhone, - Optional extPhysicalDeliveryOfficeName, - Optional extPostalCode, - Optional extPreferredLanguage, - Optional extProfile, - Optional extProvisionedPlans, - Optional extProvisioningErrors, - Optional extProxyAddresses, - Optional extPuid, - Optional extRefreshToken, - Optional extRoles, - Optional extState, - Optional extStreet, - Optional extTelephoneNumber, - Optional extTenantid, - Optional extUpn, - Optional extUsageLocation, - Optional extUserId, - OptionalNullable federatedConnectionsAccessTokens, - Optional granted, - Optional iconUrl, - Optional identityApi, - Optional maxGroupsToRetrieve, - Optional> scope, - Optional setUserRootAttributes, - Optional shouldTrustEmailVerifiedConnection, - Optional tenantDomain, - Optional tenantId, - Optional> thumbprints, - OptionalNullable>> upstreamParams, - Optional useWsfed, - Optional useCommonEndpoint, - Optional useridAttribute, - Optional waadProtocol, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.apiEnableUsers = apiEnableUsers; - this.appDomain = appDomain; - this.appId = appId; - this.basicProfile = basicProfile; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.domainAliases = domainAliases; - this.extAccessToken = extAccessToken; - this.extAccountEnabled = extAccountEnabled; - this.extAdmin = extAdmin; - this.extAgreedTerms = extAgreedTerms; - this.extAssignedLicenses = extAssignedLicenses; - this.extAssignedPlans = extAssignedPlans; - this.extAzureId = extAzureId; - this.extCity = extCity; - this.extCountry = extCountry; - this.extDepartment = extDepartment; - this.extDirSyncEnabled = extDirSyncEnabled; - this.extEmail = extEmail; - this.extExpiresIn = extExpiresIn; - this.extFamilyName = extFamilyName; - this.extFax = extFax; - this.extGivenName = extGivenName; - this.extGroupIds = extGroupIds; - this.extGroups = extGroups; - this.extIsSuspended = extIsSuspended; - this.extJobTitle = extJobTitle; - this.extLastSync = extLastSync; - this.extMobile = extMobile; - this.extName = extName; - this.extNestedGroups = extNestedGroups; - this.extNickname = extNickname; - this.extOid = extOid; - this.extPhone = extPhone; - this.extPhysicalDeliveryOfficeName = extPhysicalDeliveryOfficeName; - this.extPostalCode = extPostalCode; - this.extPreferredLanguage = extPreferredLanguage; - this.extProfile = extProfile; - this.extProvisionedPlans = extProvisionedPlans; - this.extProvisioningErrors = extProvisioningErrors; - this.extProxyAddresses = extProxyAddresses; - this.extPuid = extPuid; - this.extRefreshToken = extRefreshToken; - this.extRoles = extRoles; - this.extState = extState; - this.extStreet = extStreet; - this.extTelephoneNumber = extTelephoneNumber; - this.extTenantid = extTenantid; - this.extUpn = extUpn; - this.extUsageLocation = extUsageLocation; - this.extUserId = extUserId; - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; - this.granted = granted; - this.iconUrl = iconUrl; - this.identityApi = identityApi; - this.maxGroupsToRetrieve = maxGroupsToRetrieve; - 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; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - /** - * @return Enable users API - */ - @JsonProperty("api_enable_users") - public Optional getApiEnableUsers() { - return apiEnableUsers; - } - - @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; - } - - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("domain_aliases") - public Optional> getDomainAliases() { - return domainAliases; - } - - /** - * @return When false, prevents storing the user's Azure AD access token in the Auth0 user profile. When true (default), the access token is persisted for API access. - */ - @JsonProperty("ext_access_token") - public Optional getExtAccessToken() { - return extAccessToken; - } - - /** - * @return When false, prevents storing whether the user's Azure AD account is enabled. When true (default), the account enabled status is persisted in the user profile. - */ - @JsonProperty("ext_account_enabled") - public Optional getExtAccountEnabled() { - return extAccountEnabled; - } - - @JsonProperty("ext_admin") - public Optional getExtAdmin() { - return extAdmin; - } - - @JsonProperty("ext_agreed_terms") - public Optional getExtAgreedTerms() { - return extAgreedTerms; - } - - /** - * @return When false, prevents storing the list of Microsoft 365/Office 365 licenses assigned to the user. When true (default), license information is persisted in the user profile. - */ - @JsonProperty("ext_assigned_licenses") - public Optional getExtAssignedLicenses() { - return extAssignedLicenses; - } - - @JsonProperty("ext_assigned_plans") - public Optional getExtAssignedPlans() { - return extAssignedPlans; - } - - /** - * @return When false, prevents storing the user's Azure ID identifier. When true (default), the Azure ID is persisted. Note: 'oid' (Object ID) is the recommended unique identifier for single-tenant connections. - */ - @JsonProperty("ext_azure_id") - public Optional getExtAzureId() { - return extAzureId; - } - - /** - * @return When false, prevents storing the user's city from Azure AD. When true (default), city information is persisted in the user profile. - */ - @JsonProperty("ext_city") - public Optional getExtCity() { - return extCity; - } - - /** - * @return When false, prevents storing the user's country from Azure AD. When true (default), country information is persisted in the user profile. - */ - @JsonProperty("ext_country") - public Optional getExtCountry() { - return extCountry; - } - - /** - * @return When false, prevents storing the user's department from Azure AD. When true (default), department information is persisted in the user profile. - */ - @JsonProperty("ext_department") - public Optional getExtDepartment() { - return extDepartment; - } - - /** - * @return When false, prevents storing whether directory synchronization is enabled for the user. When true (default), directory sync status is persisted in the user profile. - */ - @JsonProperty("ext_dir_sync_enabled") - public Optional getExtDirSyncEnabled() { - return extDirSyncEnabled; - } - - /** - * @return When false, prevents storing the user's email address from Azure AD. When true (default), email is persisted in the user profile. - */ - @JsonProperty("ext_email") - public Optional getExtEmail() { - return extEmail; - } - - /** - * @return When false, prevents storing the token expiration time (in seconds). When true (default), expiration information is persisted in the user profile. - */ - @JsonProperty("ext_expires_in") - public Optional getExtExpiresIn() { - return extExpiresIn; - } - - /** - * @return When false, prevents storing the user's family name (last name) from Azure AD. When true (default), family name is persisted in the user profile. - */ - @JsonProperty("ext_family_name") - public Optional getExtFamilyName() { - return extFamilyName; - } - - /** - * @return When false, prevents storing the user's fax number from Azure AD. When true (default), fax information is persisted in the user profile. - */ - @JsonProperty("ext_fax") - public Optional getExtFax() { - return extFax; - } - - /** - * @return When false, prevents storing the user's given name (first name) from Azure AD. When true (default), given name is persisted in the user profile. - */ - @JsonProperty("ext_given_name") - public Optional getExtGivenName() { - return extGivenName; - } - - /** - * @return When false, prevents storing the list of Azure AD group IDs the user is a member of. When true (default), group membership IDs are persisted. See ext_groups for retrieving group details. - */ - @JsonProperty("ext_group_ids") - public Optional getExtGroupIds() { - return extGroupIds; - } - - @JsonProperty("ext_groups") - public Optional getExtGroups() { - return extGroups; - } - - @JsonProperty("ext_is_suspended") - public Optional getExtIsSuspended() { - return extIsSuspended; - } - - /** - * @return When false, prevents storing the user's job title from Azure AD. When true (default), job title information is persisted in the user profile. - */ - @JsonProperty("ext_job_title") - public Optional getExtJobTitle() { - return extJobTitle; - } - - /** - * @return When false, prevents storing the timestamp of the last directory synchronization. When true (default), the last sync date is persisted in the user profile. - */ - @JsonProperty("ext_last_sync") - public Optional getExtLastSync() { - return extLastSync; - } - - /** - * @return When false, prevents storing the user's mobile phone number from Azure AD. When true (default), mobile number is persisted in the user profile. - */ - @JsonProperty("ext_mobile") - public Optional getExtMobile() { - return extMobile; - } - - /** - * @return When false, prevents storing the user's full name from Azure AD. When true (default), full name is persisted in the user profile. - */ - @JsonProperty("ext_name") - public Optional getExtName() { - return extName; - } - - /** - * @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 false, prevents storing the user's nickname or display name from Azure AD. When true (default), nickname is persisted in the user profile. - */ - @JsonProperty("ext_nickname") - public Optional getExtNickname() { - return extNickname; - } - - /** - * @return When false, prevents storing the user's Object ID (oid) from Azure AD. When true (default), the oid is persisted. Note: 'oid' is the recommended unique identifier for single-tenant connections and required for SCIM. - */ - @JsonProperty("ext_oid") - public Optional getExtOid() { - return extOid; - } - - /** - * @return When false, prevents storing the user's phone number from Azure AD. When true (default), phone number is persisted in the user profile. - */ - @JsonProperty("ext_phone") - public Optional getExtPhone() { - return extPhone; - } - - /** - * @return When false, prevents storing the user's office location from Azure AD. When true (default), office location is persisted in the user profile. - */ - @JsonProperty("ext_physical_delivery_office_name") - public Optional getExtPhysicalDeliveryOfficeName() { - return extPhysicalDeliveryOfficeName; - } - - /** - * @return When false, prevents storing the user's postal code from Azure AD. When true (default), postal code is persisted in the user profile. - */ - @JsonProperty("ext_postal_code") - public Optional getExtPostalCode() { - return extPostalCode; - } - - /** - * @return When false, prevents storing the user's preferred language from Azure AD. When true (default), language preference is persisted in the user profile. - */ - @JsonProperty("ext_preferred_language") - public Optional getExtPreferredLanguage() { - return extPreferredLanguage; - } - - @JsonProperty("ext_profile") - public Optional getExtProfile() { - return extProfile; - } - - /** - * @return When false, prevents storing the list of service plans provisioned to the user. When true (default), provisioned plans are persisted in the user profile. - */ - @JsonProperty("ext_provisioned_plans") - public Optional getExtProvisionedPlans() { - return extProvisionedPlans; - } - - /** - * @return When false, prevents storing provisioning errors that occurred during synchronization. When true (default), error information is persisted. Useful for troubleshooting sync issues. - */ - @JsonProperty("ext_provisioning_errors") - public Optional getExtProvisioningErrors() { - return extProvisioningErrors; - } - - /** - * @return When false, prevents storing all proxy email addresses (email aliases) for the user. When true (default), proxy addresses are persisted in the user profile. - */ - @JsonProperty("ext_proxy_addresses") - public Optional getExtProxyAddresses() { - return extProxyAddresses; - } - - /** - * @return When false, prevents storing the user's Passport User ID (puid). When true (default), puid is persisted in the user profile. Legacy attribute. - */ - @JsonProperty("ext_puid") - public Optional getExtPuid() { - return extPuid; - } - - /** - * @return When false, prevents storing the Azure AD refresh token. When true (default), the refresh token is persisted for offline access. Required for token refresh in long-lived applications. - */ - @JsonProperty("ext_refresh_token") - public Optional getExtRefreshToken() { - return extRefreshToken; - } - - /** - * @return When false, prevents storing Azure AD application roles assigned to the user. When true (default), role information is persisted. Useful for RBAC in applications. - */ - @JsonProperty("ext_roles") - public Optional getExtRoles() { - return extRoles; - } - - /** - * @return When false, prevents storing the user's state (province/region) from Azure AD. When true (default), state information is persisted in the user profile. - */ - @JsonProperty("ext_state") - public Optional getExtState() { - return extState; - } - - /** - * @return When false, prevents storing the user's street address from Azure AD. When true (default), street address is persisted in the user profile. - */ - @JsonProperty("ext_street") - public Optional getExtStreet() { - return extStreet; - } - - /** - * @return When false, prevents storing the user's telephone number from Azure AD. When true (default), telephone number is persisted in the user profile. - */ - @JsonProperty("ext_telephoneNumber") - public Optional getExtTelephoneNumber() { - return extTelephoneNumber; - } - - /** - * @return When false, prevents storing the user's Azure AD tenant ID. When true (default), tenant ID is persisted. Useful for identifying which Azure AD organization the user belongs to. - */ - @JsonProperty("ext_tenantid") - public Optional getExtTenantid() { - return extTenantid; - } - - /** - * @return When false, prevents storing the user's User Principal Name (UPN) from Azure AD. When true (default), UPN is persisted. UPN is the user's logon name (e.g., user@contoso.com). - */ - @JsonProperty("ext_upn") - public Optional getExtUpn() { - return extUpn; - } - - /** - * @return When false, prevents storing the user's usage location for license assignment. When true (default), usage location is persisted in the user profile. - */ - @JsonProperty("ext_usage_location") - public Optional getExtUsageLocation() { - return extUsageLocation; - } - - /** - * @return When false, prevents storing an alternative user ID. When true (default), this user ID is persisted in the user profile. - */ - @JsonProperty("ext_user_id") - 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. - */ - @JsonProperty("granted") - public Optional getGranted() { - return granted; - } - - @JsonProperty("icon_url") - public Optional getIconUrl() { - return iconUrl; - } - - @JsonProperty("identity_api") - public Optional getIdentityApi() { - return identityApi; - } - - @JsonProperty("max_groups_to_retrieve") - public Optional getMaxGroupsToRetrieve() { - return maxGroupsToRetrieve; - } - - @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; - } - - @JsonProperty("tenantId") - public Optional getTenantId() { - return tenantId; - } - - @JsonProperty("thumbprints") - public Optional> getThumbprints() { - return thumbprints; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - 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; - } - - @JsonProperty("useCommonEndpoint") - public Optional getUseCommonEndpoint() { - return useCommonEndpoint; - } - - @JsonProperty("userid_attribute") - public Optional getUseridAttribute() { - return useridAttribute; - } - - @JsonProperty("waad_protocol") - 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>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsAzureAd && equalTo((ConnectionOptionsAzureAd) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsAzureAd other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && apiEnableUsers.equals(other.apiEnableUsers) - && appDomain.equals(other.appDomain) - && appId.equals(other.appId) - && basicProfile.equals(other.basicProfile) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && domainAliases.equals(other.domainAliases) - && extAccessToken.equals(other.extAccessToken) - && extAccountEnabled.equals(other.extAccountEnabled) - && extAdmin.equals(other.extAdmin) - && extAgreedTerms.equals(other.extAgreedTerms) - && extAssignedLicenses.equals(other.extAssignedLicenses) - && extAssignedPlans.equals(other.extAssignedPlans) - && extAzureId.equals(other.extAzureId) - && extCity.equals(other.extCity) - && extCountry.equals(other.extCountry) - && extDepartment.equals(other.extDepartment) - && extDirSyncEnabled.equals(other.extDirSyncEnabled) - && extEmail.equals(other.extEmail) - && extExpiresIn.equals(other.extExpiresIn) - && extFamilyName.equals(other.extFamilyName) - && extFax.equals(other.extFax) - && extGivenName.equals(other.extGivenName) - && extGroupIds.equals(other.extGroupIds) - && extGroups.equals(other.extGroups) - && extIsSuspended.equals(other.extIsSuspended) - && extJobTitle.equals(other.extJobTitle) - && extLastSync.equals(other.extLastSync) - && extMobile.equals(other.extMobile) - && extName.equals(other.extName) - && extNestedGroups.equals(other.extNestedGroups) - && extNickname.equals(other.extNickname) - && extOid.equals(other.extOid) - && extPhone.equals(other.extPhone) - && extPhysicalDeliveryOfficeName.equals(other.extPhysicalDeliveryOfficeName) - && extPostalCode.equals(other.extPostalCode) - && extPreferredLanguage.equals(other.extPreferredLanguage) - && extProfile.equals(other.extProfile) - && extProvisionedPlans.equals(other.extProvisionedPlans) - && extProvisioningErrors.equals(other.extProvisioningErrors) - && extProxyAddresses.equals(other.extProxyAddresses) - && extPuid.equals(other.extPuid) - && extRefreshToken.equals(other.extRefreshToken) - && extRoles.equals(other.extRoles) - && extState.equals(other.extState) - && extStreet.equals(other.extStreet) - && extTelephoneNumber.equals(other.extTelephoneNumber) - && extTenantid.equals(other.extTenantid) - && 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) - && maxGroupsToRetrieve.equals(other.maxGroupsToRetrieve) - && 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.nonPersistentAttrs, - this.apiEnableUsers, - this.appDomain, - this.appId, - this.basicProfile, - this.clientId, - this.clientSecret, - this.domainAliases, - this.extAccessToken, - this.extAccountEnabled, - this.extAdmin, - this.extAgreedTerms, - this.extAssignedLicenses, - this.extAssignedPlans, - this.extAzureId, - this.extCity, - this.extCountry, - this.extDepartment, - this.extDirSyncEnabled, - this.extEmail, - this.extExpiresIn, - this.extFamilyName, - this.extFax, - this.extGivenName, - this.extGroupIds, - this.extGroups, - this.extIsSuspended, - this.extJobTitle, - this.extLastSync, - this.extMobile, - this.extName, - this.extNestedGroups, - this.extNickname, - this.extOid, - this.extPhone, - this.extPhysicalDeliveryOfficeName, - this.extPostalCode, - this.extPreferredLanguage, - this.extProfile, - this.extProvisionedPlans, - this.extProvisioningErrors, - this.extProxyAddresses, - this.extPuid, - this.extRefreshToken, - this.extRoles, - this.extState, - this.extStreet, - this.extTelephoneNumber, - this.extTenantid, - this.extUpn, - this.extUsageLocation, - this.extUserId, - this.federatedConnectionsAccessTokens, - this.granted, - this.iconUrl, - this.identityApi, - this.maxGroupsToRetrieve, - 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 Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional> nonPersistentAttrs = Optional.empty(); - - private Optional apiEnableUsers = Optional.empty(); - - private Optional appDomain = Optional.empty(); - - private Optional appId = Optional.empty(); - - private Optional basicProfile = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional> domainAliases = Optional.empty(); - - private Optional extAccessToken = Optional.empty(); - - private Optional extAccountEnabled = Optional.empty(); - - private Optional extAdmin = Optional.empty(); - - private Optional extAgreedTerms = Optional.empty(); - - private Optional extAssignedLicenses = Optional.empty(); - - private Optional extAssignedPlans = Optional.empty(); - - private Optional extAzureId = Optional.empty(); - - private Optional extCity = Optional.empty(); - - private Optional extCountry = Optional.empty(); - - private Optional extDepartment = Optional.empty(); - - private Optional extDirSyncEnabled = Optional.empty(); - - private Optional extEmail = Optional.empty(); - - private Optional extExpiresIn = Optional.empty(); - - private Optional extFamilyName = Optional.empty(); - - private Optional extFax = Optional.empty(); - - private Optional extGivenName = Optional.empty(); - - private Optional extGroupIds = Optional.empty(); - - private Optional extGroups = Optional.empty(); - - private Optional extIsSuspended = Optional.empty(); - - private Optional extJobTitle = Optional.empty(); - - private Optional extLastSync = Optional.empty(); - - private Optional extMobile = Optional.empty(); - - private Optional extName = Optional.empty(); - - private Optional extNestedGroups = Optional.empty(); - - private Optional extNickname = Optional.empty(); - - private Optional extOid = Optional.empty(); - - private Optional extPhone = Optional.empty(); - - private Optional extPhysicalDeliveryOfficeName = Optional.empty(); - - private Optional extPostalCode = Optional.empty(); - - private Optional extPreferredLanguage = Optional.empty(); - - private Optional extProfile = Optional.empty(); - - private Optional extProvisionedPlans = Optional.empty(); - - private Optional extProvisioningErrors = Optional.empty(); - - private Optional extProxyAddresses = Optional.empty(); - - private Optional extPuid = Optional.empty(); - - private Optional extRefreshToken = Optional.empty(); - - private Optional extRoles = Optional.empty(); - - private Optional extState = Optional.empty(); - - private Optional extStreet = Optional.empty(); - - private Optional extTelephoneNumber = Optional.empty(); - - private Optional extTenantid = Optional.empty(); - - private Optional extUpn = Optional.empty(); - - private Optional extUsageLocation = Optional.empty(); - - private Optional extUserId = Optional.empty(); - - private OptionalNullable federatedConnectionsAccessTokens = - OptionalNullable.absent(); - - private Optional granted = Optional.empty(); - - private Optional iconUrl = Optional.empty(); - - private Optional identityApi = Optional.empty(); - - private Optional maxGroupsToRetrieve = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private Optional shouldTrustEmailVerifiedConnection = - Optional.empty(); - - private Optional tenantDomain = Optional.empty(); - - private Optional tenantId = Optional.empty(); - - private Optional> thumbprints = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional useWsfed = Optional.empty(); - - private Optional useCommonEndpoint = Optional.empty(); - - private Optional useridAttribute = Optional.empty(); - - private Optional waadProtocol = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsAzureAd other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - apiEnableUsers(other.getApiEnableUsers()); - appDomain(other.getAppDomain()); - appId(other.getAppId()); - basicProfile(other.getBasicProfile()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - domainAliases(other.getDomainAliases()); - extAccessToken(other.getExtAccessToken()); - extAccountEnabled(other.getExtAccountEnabled()); - extAdmin(other.getExtAdmin()); - extAgreedTerms(other.getExtAgreedTerms()); - extAssignedLicenses(other.getExtAssignedLicenses()); - extAssignedPlans(other.getExtAssignedPlans()); - extAzureId(other.getExtAzureId()); - extCity(other.getExtCity()); - extCountry(other.getExtCountry()); - extDepartment(other.getExtDepartment()); - extDirSyncEnabled(other.getExtDirSyncEnabled()); - extEmail(other.getExtEmail()); - extExpiresIn(other.getExtExpiresIn()); - extFamilyName(other.getExtFamilyName()); - extFax(other.getExtFax()); - extGivenName(other.getExtGivenName()); - extGroupIds(other.getExtGroupIds()); - extGroups(other.getExtGroups()); - extIsSuspended(other.getExtIsSuspended()); - extJobTitle(other.getExtJobTitle()); - extLastSync(other.getExtLastSync()); - extMobile(other.getExtMobile()); - extName(other.getExtName()); - extNestedGroups(other.getExtNestedGroups()); - extNickname(other.getExtNickname()); - extOid(other.getExtOid()); - extPhone(other.getExtPhone()); - extPhysicalDeliveryOfficeName(other.getExtPhysicalDeliveryOfficeName()); - extPostalCode(other.getExtPostalCode()); - extPreferredLanguage(other.getExtPreferredLanguage()); - extProfile(other.getExtProfile()); - extProvisionedPlans(other.getExtProvisionedPlans()); - extProvisioningErrors(other.getExtProvisioningErrors()); - extProxyAddresses(other.getExtProxyAddresses()); - extPuid(other.getExtPuid()); - extRefreshToken(other.getExtRefreshToken()); - extRoles(other.getExtRoles()); - extState(other.getExtState()); - extStreet(other.getExtStreet()); - extTelephoneNumber(other.getExtTelephoneNumber()); - extTenantid(other.getExtTenantid()); - extUpn(other.getExtUpn()); - extUsageLocation(other.getExtUsageLocation()); - extUserId(other.getExtUserId()); - federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); - granted(other.getGranted()); - iconUrl(other.getIconUrl()); - identityApi(other.getIdentityApi()); - maxGroupsToRetrieve(other.getMaxGroupsToRetrieve()); - 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; - } - - @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; - } - - /** - *

Enable users API

- */ - @JsonSetter(value = "api_enable_users", nulls = Nulls.SKIP) - public Builder apiEnableUsers(Optional apiEnableUsers) { - this.apiEnableUsers = apiEnableUsers; - return this; - } - - public Builder apiEnableUsers(Boolean apiEnableUsers) { - this.apiEnableUsers = Optional.ofNullable(apiEnableUsers); - return this; - } - - @JsonSetter(value = "app_domain", nulls = Nulls.SKIP) - public Builder appDomain(Optional appDomain) { - this.appDomain = appDomain; - return this; - } - - public Builder appDomain(String appDomain) { - this.appDomain = Optional.ofNullable(appDomain); - 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.

- */ - @JsonSetter(value = "app_id", nulls = Nulls.SKIP) - public Builder appId(Optional appId) { - this.appId = appId; - return this; - } - - public Builder appId(String appId) { - this.appId = Optional.ofNullable(appId); - 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.

- */ - @JsonSetter(value = "basic_profile", nulls = Nulls.SKIP) - public Builder basicProfile(Optional basicProfile) { - this.basicProfile = basicProfile; - return this; - } - - public Builder basicProfile(Boolean basicProfile) { - this.basicProfile = Optional.ofNullable(basicProfile); - 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 = "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; - } - - /** - *

When false, prevents storing the user's Azure AD access token in the Auth0 user profile. When true (default), the access token is persisted for API access.

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

When false, prevents storing whether the user's Azure AD account is enabled. When true (default), the account enabled status is persisted in the user profile.

- */ - @JsonSetter(value = "ext_account_enabled", nulls = Nulls.SKIP) - public Builder extAccountEnabled(Optional extAccountEnabled) { - this.extAccountEnabled = extAccountEnabled; - return this; - } - - public Builder extAccountEnabled(Boolean extAccountEnabled) { - this.extAccountEnabled = Optional.ofNullable(extAccountEnabled); - return this; - } - - @JsonSetter(value = "ext_admin", nulls = Nulls.SKIP) - public Builder extAdmin(Optional extAdmin) { - this.extAdmin = extAdmin; - return this; - } - - public Builder extAdmin(Boolean extAdmin) { - this.extAdmin = Optional.ofNullable(extAdmin); - return this; - } - - @JsonSetter(value = "ext_agreed_terms", nulls = Nulls.SKIP) - public Builder extAgreedTerms(Optional extAgreedTerms) { - this.extAgreedTerms = extAgreedTerms; - return this; - } - - public Builder extAgreedTerms(Boolean extAgreedTerms) { - this.extAgreedTerms = Optional.ofNullable(extAgreedTerms); - return this; - } - - /** - *

When false, prevents storing the list of Microsoft 365/Office 365 licenses assigned to the user. When true (default), license information is persisted in the user profile.

- */ - @JsonSetter(value = "ext_assigned_licenses", nulls = Nulls.SKIP) - public Builder extAssignedLicenses(Optional extAssignedLicenses) { - this.extAssignedLicenses = extAssignedLicenses; - return this; - } - - public Builder extAssignedLicenses(Boolean extAssignedLicenses) { - this.extAssignedLicenses = Optional.ofNullable(extAssignedLicenses); - return this; - } - - @JsonSetter(value = "ext_assigned_plans", nulls = Nulls.SKIP) - public Builder extAssignedPlans(Optional extAssignedPlans) { - this.extAssignedPlans = extAssignedPlans; - return this; - } - - public Builder extAssignedPlans(Boolean extAssignedPlans) { - this.extAssignedPlans = Optional.ofNullable(extAssignedPlans); - return this; - } - - /** - *

When false, prevents storing the user's Azure ID identifier. When true (default), the Azure ID is persisted. Note: 'oid' (Object ID) is the recommended unique identifier for single-tenant connections.

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

When false, prevents storing the user's city from Azure AD. When true (default), city information is persisted in the user profile.

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

When false, prevents storing the user's country from Azure AD. When true (default), country information is persisted in the user profile.

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

When false, prevents storing the user's department from Azure AD. When true (default), department information is persisted in the user profile.

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

When false, prevents storing whether directory synchronization is enabled for the user. When true (default), directory sync status is persisted in the user profile.

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

When false, prevents storing the user's email address from Azure AD. When true (default), email is persisted in the user profile.

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

When false, prevents storing the token expiration time (in seconds). When true (default), expiration information is persisted in the user profile.

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

When false, prevents storing the user's family name (last name) from Azure AD. When true (default), family name is persisted in the user profile.

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

When false, prevents storing the user's fax number from Azure AD. When true (default), fax information is persisted in the user profile.

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

When false, prevents storing the user's given name (first name) from Azure AD. When true (default), given name is persisted in the user profile.

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

When false, prevents storing the list of Azure AD group IDs the user is a member of. When true (default), group membership IDs are persisted. See ext_groups for retrieving group details.

- */ - @JsonSetter(value = "ext_group_ids", nulls = Nulls.SKIP) - public Builder extGroupIds(Optional extGroupIds) { - this.extGroupIds = extGroupIds; - return this; - } - - public Builder extGroupIds(Boolean extGroupIds) { - this.extGroupIds = Optional.ofNullable(extGroupIds); - return this; - } - - @JsonSetter(value = "ext_groups", nulls = Nulls.SKIP) - public Builder extGroups(Optional extGroups) { - this.extGroups = extGroups; - return this; - } - - public Builder extGroups(Boolean extGroups) { - this.extGroups = Optional.ofNullable(extGroups); - return this; - } - - @JsonSetter(value = "ext_is_suspended", nulls = Nulls.SKIP) - public Builder extIsSuspended(Optional extIsSuspended) { - this.extIsSuspended = extIsSuspended; - return this; - } - - public Builder extIsSuspended(Boolean extIsSuspended) { - this.extIsSuspended = Optional.ofNullable(extIsSuspended); - return this; - } - - /** - *

When false, prevents storing the user's job title from Azure AD. When true (default), job title information is persisted in the user profile.

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

When false, prevents storing the timestamp of the last directory synchronization. When true (default), the last sync date is persisted in the user profile.

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

When false, prevents storing the user's mobile phone number from Azure AD. When true (default), mobile number is persisted in the user profile.

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

When false, prevents storing the user's full name from Azure AD. When true (default), full name is persisted in the user profile.

- */ - @JsonSetter(value = "ext_name", nulls = Nulls.SKIP) - public Builder extName(Optional extName) { - this.extName = extName; - return this; - } - - public Builder extName(Boolean extName) { - this.extName = Optional.ofNullable(extName); - 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.

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

When false, prevents storing the user's nickname or display name from Azure AD. When true (default), nickname is persisted in the user profile.

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

When false, prevents storing the user's Object ID (oid) from Azure AD. When true (default), the oid is persisted. Note: 'oid' is the recommended unique identifier for single-tenant connections and required for SCIM.

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

When false, prevents storing the user's phone number from Azure AD. When true (default), phone number is persisted in the user profile.

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

When false, prevents storing the user's office location from Azure AD. When true (default), office location is persisted in the user profile.

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

When false, prevents storing the user's postal code from Azure AD. When true (default), postal code is persisted in the user profile.

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

When false, prevents storing the user's preferred language from Azure AD. When true (default), language preference is persisted in the user profile.

- */ - @JsonSetter(value = "ext_preferred_language", nulls = Nulls.SKIP) - public Builder extPreferredLanguage(Optional extPreferredLanguage) { - this.extPreferredLanguage = extPreferredLanguage; - return this; - } - - public Builder extPreferredLanguage(Boolean extPreferredLanguage) { - this.extPreferredLanguage = Optional.ofNullable(extPreferredLanguage); - return this; - } - - @JsonSetter(value = "ext_profile", nulls = Nulls.SKIP) - public Builder extProfile(Optional extProfile) { - this.extProfile = extProfile; - return this; - } - - public Builder extProfile(Boolean extProfile) { - this.extProfile = Optional.ofNullable(extProfile); - return this; - } - - /** - *

When false, prevents storing the list of service plans provisioned to the user. When true (default), provisioned plans are persisted in the user profile.

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

When false, prevents storing provisioning errors that occurred during synchronization. When true (default), error information is persisted. Useful for troubleshooting sync issues.

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

When false, prevents storing all proxy email addresses (email aliases) for the user. When true (default), proxy addresses are persisted in the user profile.

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

When false, prevents storing the user's Passport User ID (puid). When true (default), puid is persisted in the user profile. Legacy attribute.

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

When false, prevents storing the Azure AD refresh token. When true (default), the refresh token is persisted for offline access. Required for token refresh in long-lived applications.

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

When false, prevents storing Azure AD application roles assigned to the user. When true (default), role information is persisted. Useful for RBAC in applications.

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

When false, prevents storing the user's state (province/region) from Azure AD. When true (default), state information is persisted in the user profile.

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

When false, prevents storing the user's street address from Azure AD. When true (default), street address is persisted in the user profile.

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

When false, prevents storing the user's telephone number from Azure AD. When true (default), telephone number is persisted in the user profile.

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

When false, prevents storing the user's Azure AD tenant ID. When true (default), tenant ID is persisted. Useful for identifying which Azure AD organization the user belongs to.

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

When false, prevents storing the user's User Principal Name (UPN) from Azure AD. When true (default), UPN is persisted. UPN is the user's logon name (e.g., user@contoso.com).

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

When false, prevents storing the user's usage location for license assignment. When true (default), usage location is persisted in the user profile.

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

When false, prevents storing an alternative user ID. When true (default), this user ID is persisted in the user profile.

- */ - @JsonSetter(value = "ext_user_id", nulls = Nulls.SKIP) - public Builder extUserId(Optional extUserId) { - this.extUserId = extUserId; - return this; - } - - public Builder extUserId(Boolean extUserId) { - this.extUserId = Optional.ofNullable(extUserId); - 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; - } - - /** - *

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.

- */ - @JsonSetter(value = "granted", nulls = Nulls.SKIP) - public Builder granted(Optional granted) { - this.granted = granted; - return this; - } - - public Builder granted(Boolean granted) { - this.granted = Optional.ofNullable(granted); - return this; - } - - @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 = "identity_api", nulls = Nulls.SKIP) - public Builder identityApi(Optional identityApi) { - this.identityApi = identityApi; - return this; - } - - public Builder identityApi(ConnectionIdentityApiEnumAzureAd identityApi) { - this.identityApi = Optional.ofNullable(identityApi); - return this; - } - - @JsonSetter(value = "max_groups_to_retrieve", nulls = Nulls.SKIP) - public Builder maxGroupsToRetrieve(Optional maxGroupsToRetrieve) { - this.maxGroupsToRetrieve = maxGroupsToRetrieve; - return this; - } - - public Builder maxGroupsToRetrieve(String maxGroupsToRetrieve) { - this.maxGroupsToRetrieve = Optional.ofNullable(maxGroupsToRetrieve); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "should_trust_email_verified_connection", nulls = Nulls.SKIP) - public Builder shouldTrustEmailVerifiedConnection( - Optional shouldTrustEmailVerifiedConnection) { - this.shouldTrustEmailVerifiedConnection = shouldTrustEmailVerifiedConnection; - return this; - } - - public Builder shouldTrustEmailVerifiedConnection( - ConnectionShouldTrustEmailVerifiedConnectionEnum shouldTrustEmailVerifiedConnection) { - this.shouldTrustEmailVerifiedConnection = Optional.ofNullable(shouldTrustEmailVerifiedConnection); - return this; - } - - @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; - } - - @JsonSetter(value = "tenantId", nulls = Nulls.SKIP) - public Builder tenantId(Optional tenantId) { - this.tenantId = tenantId; - return this; - } - - public Builder tenantId(String tenantId) { - this.tenantId = Optional.ofNullable(tenantId); - 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 = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - /** - *

Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect.

- */ - @JsonSetter(value = "use_wsfed", nulls = Nulls.SKIP) - public Builder useWsfed(Optional useWsfed) { - this.useWsfed = useWsfed; - return this; - } - - public Builder useWsfed(Boolean useWsfed) { - this.useWsfed = Optional.ofNullable(useWsfed); - return this; - } - - @JsonSetter(value = "useCommonEndpoint", nulls = Nulls.SKIP) - public Builder useCommonEndpoint(Optional useCommonEndpoint) { - this.useCommonEndpoint = useCommonEndpoint; - return this; - } - - public Builder useCommonEndpoint(Boolean useCommonEndpoint) { - this.useCommonEndpoint = Optional.ofNullable(useCommonEndpoint); - return this; - } - - @JsonSetter(value = "userid_attribute", nulls = Nulls.SKIP) - public Builder useridAttribute(Optional useridAttribute) { - this.useridAttribute = useridAttribute; - return this; - } - - public Builder useridAttribute(ConnectionUseridAttributeEnumAzureAd useridAttribute) { - this.useridAttribute = Optional.ofNullable(useridAttribute); - return this; - } - - @JsonSetter(value = "waad_protocol", nulls = Nulls.SKIP) - public Builder waadProtocol(Optional waadProtocol) { - this.waadProtocol = waadProtocol; - return this; - } - - public Builder waadProtocol(ConnectionWaadProtocolEnumAzureAd waadProtocol) { - this.waadProtocol = Optional.ofNullable(waadProtocol); - return this; - } - - public ConnectionOptionsAzureAd build() { - return new ConnectionOptionsAzureAd( - nonPersistentAttrs, - apiEnableUsers, - appDomain, - appId, - basicProfile, - clientId, - clientSecret, - domainAliases, - extAccessToken, - extAccountEnabled, - extAdmin, - extAgreedTerms, - extAssignedLicenses, - extAssignedPlans, - extAzureId, - extCity, - extCountry, - extDepartment, - extDirSyncEnabled, - extEmail, - extExpiresIn, - extFamilyName, - extFax, - extGivenName, - extGroupIds, - extGroups, - extIsSuspended, - extJobTitle, - extLastSync, - extMobile, - extName, - extNestedGroups, - extNickname, - extOid, - extPhone, - extPhysicalDeliveryOfficeName, - extPostalCode, - extPreferredLanguage, - extProfile, - extProvisionedPlans, - extProvisioningErrors, - extProxyAddresses, - extPuid, - extRefreshToken, - extRoles, - extState, - extStreet, - extTelephoneNumber, - extTenantid, - extUpn, - extUsageLocation, - extUserId, - federatedConnectionsAccessTokens, - granted, - iconUrl, - identityApi, - maxGroupsToRetrieve, - scope, - setUserRootAttributes, - shouldTrustEmailVerifiedConnection, - tenantDomain, - tenantId, - thumbprints, - upstreamParams, - useWsfed, - useCommonEndpoint, - useridAttribute, - waadProtocol, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsBaidu.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsBaidu.java deleted file mode 100644 index 8718f8934..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsBaidu.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsBaidu.Builder.class) -public final class ConnectionOptionsBaidu implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsBaidu( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsBaidu && equalTo((ConnectionOptionsBaidu) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsBaidu other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsBaidu other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsBaidu build() { - return new ConnectionOptionsBaidu( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsBitbucket.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsBitbucket.java deleted file mode 100644 index 916730ebb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsBitbucket.java +++ /dev/null @@ -1,258 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionOptionsBitbucket.Builder.class) -public final class ConnectionOptionsBitbucket implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional> freeformScopes; - - private final Optional profile; - - private final Optional> scope; - - private final Optional setUserRootAttributes; - - private final Map additionalProperties; - - private ConnectionOptionsBitbucket( - Optional> nonPersistentAttrs, - Optional clientId, - Optional clientSecret, - Optional> freeformScopes, - Optional profile, - Optional> scope, - Optional setUserRootAttributes, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.freeformScopes = freeformScopes; - this.profile = profile; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("freeform_scopes") - public Optional> getFreeformScopes() { - return freeformScopes; - } - - @JsonProperty("profile") - public Optional getProfile() { - return profile; - } - - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsBitbucket && equalTo((ConnectionOptionsBitbucket) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsBitbucket other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && freeformScopes.equals(other.freeformScopes) - && profile.equals(other.profile) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.nonPersistentAttrs, - this.clientId, - this.clientSecret, - this.freeformScopes, - this.profile, - this.scope, - this.setUserRootAttributes); - } - - @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> nonPersistentAttrs = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional> freeformScopes = Optional.empty(); - - private Optional profile = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsBitbucket other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - freeformScopes(other.getFreeformScopes()); - profile(other.getProfile()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @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 = "freeform_scopes", nulls = Nulls.SKIP) - public Builder freeformScopes(Optional> freeformScopes) { - this.freeformScopes = freeformScopes; - return this; - } - - public Builder freeformScopes(List freeformScopes) { - this.freeformScopes = Optional.ofNullable(freeformScopes); - return this; - } - - @JsonSetter(value = "profile", nulls = Nulls.SKIP) - public Builder profile(Optional profile) { - this.profile = profile; - return this; - } - - public Builder profile(Boolean profile) { - this.profile = Optional.ofNullable(profile); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - public ConnectionOptionsBitbucket build() { - return new ConnectionOptionsBitbucket( - nonPersistentAttrs, - clientId, - clientSecret, - freeformScopes, - profile, - scope, - setUserRootAttributes, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsBitly.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsBitly.java deleted file mode 100644 index 38e53048e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsBitly.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsBitly.Builder.class) -public final class ConnectionOptionsBitly implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsBitly( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsBitly && equalTo((ConnectionOptionsBitly) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsBitly other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsBitly other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsBitly build() { - return new ConnectionOptionsBitly( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsBox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsBox.java deleted file mode 100644 index 1af07dd26..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsBox.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsBox.Builder.class) -public final class ConnectionOptionsBox implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsBox( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsBox && equalTo((ConnectionOptionsBox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsBox other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsBox other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsBox build() { - return new ConnectionOptionsBox( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommon.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommon.java deleted file mode 100644 index f021d5065..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommon.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionOptionsCommon.Builder.class) -public final class ConnectionOptionsCommon implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsCommon( - Optional> nonPersistentAttrs, Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsCommon && equalTo((ConnectionOptionsCommon) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsCommon other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsCommon other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsCommon build() { - return new ConnectionOptionsCommon(nonPersistentAttrs, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java deleted file mode 100644 index 50b8d828b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonOidc.java +++ /dev/null @@ -1,979 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsCommonOidc.Builder.class) -public final class ConnectionOptionsCommonOidc implements IConnectionOptionsCommonOidc { - private final Optional authorizationEndpoint; - - private final String clientId; - - private final Optional clientSecret; - - private final Optional connectionSettings; - - private final OptionalNullable federatedConnectionsAccessTokens; - - private final Optional> domainAliases; - - private final Optional iconUrl; - - private final OptionalNullable> idTokenSignedResponseAlgs; - - private final Optional issuer; - - private final Optional jwksUri; - - private final Optional oidcMetadata; - - private final Optional scope; - - private final Optional sendBackChannelNonce; - - private final Optional setUserRootAttributes; - - private final Optional tenantDomain; - - private final Optional tokenEndpoint; - - private final OptionalNullable tokenEndpointAuthMethod; - - private final OptionalNullable tokenEndpointAuthSigningAlg; - - private final OptionalNullable>> - upstreamParams; - - private final Optional userinfoEndpoint; - - private final Map additionalProperties; - - private ConnectionOptionsCommonOidc( - Optional authorizationEndpoint, - String clientId, - Optional clientSecret, - Optional connectionSettings, - OptionalNullable federatedConnectionsAccessTokens, - Optional> domainAliases, - Optional iconUrl, - OptionalNullable> idTokenSignedResponseAlgs, - Optional issuer, - Optional jwksUri, - Optional oidcMetadata, - Optional scope, - Optional sendBackChannelNonce, - Optional setUserRootAttributes, - Optional tenantDomain, - Optional tokenEndpoint, - OptionalNullable tokenEndpointAuthMethod, - OptionalNullable tokenEndpointAuthSigningAlg, - OptionalNullable>> upstreamParams, - Optional userinfoEndpoint, - Map additionalProperties) { - this.authorizationEndpoint = authorizationEndpoint; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.connectionSettings = connectionSettings; - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; - this.domainAliases = domainAliases; - this.iconUrl = iconUrl; - this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; - this.issuer = issuer; - this.jwksUri = jwksUri; - this.oidcMetadata = oidcMetadata; - this.scope = scope; - this.sendBackChannelNonce = sendBackChannelNonce; - this.setUserRootAttributes = setUserRootAttributes; - this.tenantDomain = tenantDomain; - this.tokenEndpoint = tokenEndpoint; - this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; - this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; - this.upstreamParams = upstreamParams; - this.userinfoEndpoint = userinfoEndpoint; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authorization_endpoint") - @java.lang.Override - public Optional getAuthorizationEndpoint() { - return authorizationEndpoint; - } - - @JsonProperty("client_id") - @java.lang.Override - public String getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("connection_settings") - @java.lang.Override - public Optional getConnectionSettings() { - return connectionSettings; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") - @java.lang.Override - public OptionalNullable getFederatedConnectionsAccessTokens() { - if (federatedConnectionsAccessTokens == null) { - return OptionalNullable.absent(); - } - return federatedConnectionsAccessTokens; - } - - @JsonProperty("domain_aliases") - @java.lang.Override - public Optional> getDomainAliases() { - return domainAliases; - } - - @JsonProperty("icon_url") - @java.lang.Override - public Optional getIconUrl() { - return iconUrl; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("id_token_signed_response_algs") - @java.lang.Override - public OptionalNullable> getIdTokenSignedResponseAlgs() { - if (idTokenSignedResponseAlgs == null) { - return OptionalNullable.absent(); - } - return idTokenSignedResponseAlgs; - } - - @JsonProperty("issuer") - @java.lang.Override - public Optional getIssuer() { - return issuer; - } - - @JsonProperty("jwks_uri") - @java.lang.Override - public Optional getJwksUri() { - return jwksUri; - } - - @JsonProperty("oidc_metadata") - @java.lang.Override - public Optional getOidcMetadata() { - return oidcMetadata; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("send_back_channel_nonce") - @java.lang.Override - public Optional getSendBackChannelNonce() { - return sendBackChannelNonce; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonProperty("tenant_domain") - @java.lang.Override - public Optional getTenantDomain() { - return tenantDomain; - } - - @JsonProperty("token_endpoint") - @java.lang.Override - public Optional getTokenEndpoint() { - return tokenEndpoint; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("token_endpoint_auth_method") - @java.lang.Override - 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") - @java.lang.Override - public OptionalNullable getTokenEndpointAuthSigningAlg() { - if (tokenEndpointAuthSigningAlg == null) { - return OptionalNullable.absent(); - } - return tokenEndpointAuthSigningAlg; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("userinfo_endpoint") - @java.lang.Override - public Optional getUserinfoEndpoint() { - return userinfoEndpoint; - } - - @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() { - return idTokenSignedResponseAlgs; - } - - @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; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsCommonOidc && equalTo((ConnectionOptionsCommonOidc) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsCommonOidc other) { - return authorizationEndpoint.equals(other.authorizationEndpoint) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && connectionSettings.equals(other.connectionSettings) - && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) - && domainAliases.equals(other.domainAliases) - && iconUrl.equals(other.iconUrl) - && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) - && issuer.equals(other.issuer) - && jwksUri.equals(other.jwksUri) - && oidcMetadata.equals(other.oidcMetadata) - && 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) - && upstreamParams.equals(other.upstreamParams) - && userinfoEndpoint.equals(other.userinfoEndpoint); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authorizationEndpoint, - this.clientId, - this.clientSecret, - this.connectionSettings, - this.federatedConnectionsAccessTokens, - this.domainAliases, - this.iconUrl, - this.idTokenSignedResponseAlgs, - this.issuer, - this.jwksUri, - this.oidcMetadata, - this.scope, - this.sendBackChannelNonce, - this.setUserRootAttributes, - this.tenantDomain, - this.tokenEndpoint, - this.tokenEndpointAuthMethod, - this.tokenEndpointAuthSigningAlg, - this.upstreamParams, - this.userinfoEndpoint); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ClientIdStage builder() { - return new Builder(); - } - - public interface ClientIdStage { - _FinalStage clientId(@NotNull String clientId); - - Builder from(ConnectionOptionsCommonOidc other); - } - - public interface _FinalStage { - ConnectionOptionsCommonOidc build(); - - _FinalStage authorizationEndpoint(Optional authorizationEndpoint); - - _FinalStage authorizationEndpoint(String authorizationEndpoint); - - _FinalStage clientSecret(Optional clientSecret); - - _FinalStage clientSecret(String clientSecret); - - _FinalStage connectionSettings(Optional connectionSettings); - - _FinalStage connectionSettings(ConnectionConnectionSettings connectionSettings); - - _FinalStage federatedConnectionsAccessTokens( - @Nullable - OptionalNullable federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - ConnectionFederatedConnectionsAccessTokens federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - Optional federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - com.auth0.client.mgmt.core.Nullable - federatedConnectionsAccessTokens); - - _FinalStage domainAliases(Optional> domainAliases); - - _FinalStage domainAliases(List domainAliases); - - _FinalStage iconUrl(Optional iconUrl); - - _FinalStage iconUrl(String iconUrl); - - _FinalStage idTokenSignedResponseAlgs( - @Nullable OptionalNullable> idTokenSignedResponseAlgs); - - _FinalStage idTokenSignedResponseAlgs(List idTokenSignedResponseAlgs); - - _FinalStage idTokenSignedResponseAlgs( - Optional> idTokenSignedResponseAlgs); - - _FinalStage idTokenSignedResponseAlgs( - com.auth0.client.mgmt.core.Nullable> - idTokenSignedResponseAlgs); - - _FinalStage issuer(Optional issuer); - - _FinalStage issuer(String issuer); - - _FinalStage jwksUri(Optional jwksUri); - - _FinalStage jwksUri(String jwksUri); - - _FinalStage oidcMetadata(Optional oidcMetadata); - - _FinalStage oidcMetadata(ConnectionOptionsOidcMetadata oidcMetadata); - - _FinalStage scope(Optional scope); - - _FinalStage scope(String scope); - - _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce); - - _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce); - - _FinalStage setUserRootAttributes(Optional setUserRootAttributes); - - _FinalStage setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes); - - _FinalStage tenantDomain(Optional tenantDomain); - - _FinalStage tenantDomain(String tenantDomain); - - _FinalStage tokenEndpoint(Optional tokenEndpoint); - - _FinalStage tokenEndpoint(String tokenEndpoint); - - _FinalStage tokenEndpointAuthMethod( - @Nullable OptionalNullable tokenEndpointAuthMethod); - - _FinalStage tokenEndpointAuthMethod(ConnectionTokenEndpointAuthMethodEnum tokenEndpointAuthMethod); - - _FinalStage tokenEndpointAuthMethod(Optional tokenEndpointAuthMethod); - - _FinalStage tokenEndpointAuthMethod( - com.auth0.client.mgmt.core.Nullable tokenEndpointAuthMethod); - - _FinalStage tokenEndpointAuthSigningAlg( - @Nullable OptionalNullable tokenEndpointAuthSigningAlg); - - _FinalStage tokenEndpointAuthSigningAlg(ConnectionTokenEndpointAuthSigningAlgEnum tokenEndpointAuthSigningAlg); - - _FinalStage tokenEndpointAuthSigningAlg( - Optional tokenEndpointAuthSigningAlg); - - _FinalStage tokenEndpointAuthSigningAlg( - com.auth0.client.mgmt.core.Nullable - tokenEndpointAuthSigningAlg); - - _FinalStage upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams); - - _FinalStage upstreamParams( - Map> upstreamParams); - - _FinalStage upstreamParams( - Optional>> upstreamParams); - - _FinalStage upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams); - - _FinalStage userinfoEndpoint(Optional userinfoEndpoint); - - _FinalStage userinfoEndpoint(String userinfoEndpoint); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ClientIdStage, _FinalStage { - private String clientId; - - private Optional userinfoEndpoint = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private OptionalNullable tokenEndpointAuthSigningAlg = - OptionalNullable.absent(); - - private OptionalNullable tokenEndpointAuthMethod = - OptionalNullable.absent(); - - 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 oidcMetadata = Optional.empty(); - - private Optional jwksUri = Optional.empty(); - - private Optional issuer = Optional.empty(); - - private OptionalNullable> idTokenSignedResponseAlgs = - OptionalNullable.absent(); - - private Optional iconUrl = Optional.empty(); - - private Optional> domainAliases = Optional.empty(); - - private OptionalNullable federatedConnectionsAccessTokens = - OptionalNullable.absent(); - - private Optional connectionSettings = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional authorizationEndpoint = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionOptionsCommonOidc other) { - authorizationEndpoint(other.getAuthorizationEndpoint()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - connectionSettings(other.getConnectionSettings()); - federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); - domainAliases(other.getDomainAliases()); - iconUrl(other.getIconUrl()); - idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); - issuer(other.getIssuer()); - jwksUri(other.getJwksUri()); - oidcMetadata(other.getOidcMetadata()); - scope(other.getScope()); - sendBackChannelNonce(other.getSendBackChannelNonce()); - setUserRootAttributes(other.getSetUserRootAttributes()); - tenantDomain(other.getTenantDomain()); - tokenEndpoint(other.getTokenEndpoint()); - tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); - tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); - upstreamParams(other.getUpstreamParams()); - userinfoEndpoint(other.getUserinfoEndpoint()); - 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 _FinalStage userinfoEndpoint(String userinfoEndpoint) { - this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) - public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { - this.userinfoEndpoint = userinfoEndpoint; - return this; - } - - @java.lang.Override - public _FinalStage upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - @java.lang.Override - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public _FinalStage upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - @java.lang.Override - public _FinalStage 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; - } - - @java.lang.Override - public _FinalStage tokenEndpointAuthSigningAlg( - Optional tokenEndpointAuthSigningAlg) { - if (tokenEndpointAuthSigningAlg.isPresent()) { - this.tokenEndpointAuthSigningAlg = OptionalNullable.of(tokenEndpointAuthSigningAlg.get()); - } else { - this.tokenEndpointAuthSigningAlg = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage tokenEndpointAuthSigningAlg( - ConnectionTokenEndpointAuthSigningAlgEnum tokenEndpointAuthSigningAlg) { - this.tokenEndpointAuthSigningAlg = OptionalNullable.of(tokenEndpointAuthSigningAlg); - return this; - } - - @java.lang.Override - @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) - public _FinalStage tokenEndpointAuthSigningAlg( - @Nullable OptionalNullable tokenEndpointAuthSigningAlg) { - this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; - return this; - } - - @java.lang.Override - public _FinalStage 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; - } - - @java.lang.Override - public _FinalStage tokenEndpointAuthMethod( - Optional tokenEndpointAuthMethod) { - if (tokenEndpointAuthMethod.isPresent()) { - this.tokenEndpointAuthMethod = OptionalNullable.of(tokenEndpointAuthMethod.get()); - } else { - this.tokenEndpointAuthMethod = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage tokenEndpointAuthMethod(ConnectionTokenEndpointAuthMethodEnum tokenEndpointAuthMethod) { - this.tokenEndpointAuthMethod = OptionalNullable.of(tokenEndpointAuthMethod); - return this; - } - - @java.lang.Override - @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) - public _FinalStage tokenEndpointAuthMethod( - @Nullable OptionalNullable tokenEndpointAuthMethod) { - this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; - return this; - } - - @java.lang.Override - public _FinalStage tokenEndpoint(String tokenEndpoint) { - this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) - public _FinalStage tokenEndpoint(Optional tokenEndpoint) { - this.tokenEndpoint = tokenEndpoint; - 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 setUserRootAttributes(ConnectionSetUserRootAttributesEnum 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 sendBackChannelNonce(Boolean sendBackChannelNonce) { - this.sendBackChannelNonce = Optional.ofNullable(sendBackChannelNonce); - return this; - } - - @java.lang.Override - @JsonSetter(value = "send_back_channel_nonce", nulls = Nulls.SKIP) - public _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce) { - this.sendBackChannelNonce = sendBackChannelNonce; - return this; - } - - @java.lang.Override - public _FinalStage scope(String scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @java.lang.Override - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public _FinalStage scope(Optional scope) { - this.scope = scope; - return this; - } - - @java.lang.Override - public _FinalStage oidcMetadata(ConnectionOptionsOidcMetadata 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; - } - - @java.lang.Override - public _FinalStage jwksUri(String jwksUri) { - this.jwksUri = Optional.ofNullable(jwksUri); - return this; - } - - @java.lang.Override - @JsonSetter(value = "jwks_uri", nulls = Nulls.SKIP) - public _FinalStage jwksUri(Optional jwksUri) { - this.jwksUri = jwksUri; - return this; - } - - @java.lang.Override - public _FinalStage issuer(String issuer) { - this.issuer = Optional.ofNullable(issuer); - return this; - } - - @java.lang.Override - @JsonSetter(value = "issuer", nulls = Nulls.SKIP) - public _FinalStage issuer(Optional issuer) { - this.issuer = issuer; - return this; - } - - @java.lang.Override - public _FinalStage idTokenSignedResponseAlgs( - com.auth0.client.mgmt.core.Nullable> - idTokenSignedResponseAlgs) { - if (idTokenSignedResponseAlgs.isNull()) { - this.idTokenSignedResponseAlgs = OptionalNullable.ofNull(); - } else if (idTokenSignedResponseAlgs.isEmpty()) { - this.idTokenSignedResponseAlgs = OptionalNullable.absent(); - } else { - this.idTokenSignedResponseAlgs = OptionalNullable.of(idTokenSignedResponseAlgs.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage idTokenSignedResponseAlgs( - Optional> idTokenSignedResponseAlgs) { - if (idTokenSignedResponseAlgs.isPresent()) { - this.idTokenSignedResponseAlgs = OptionalNullable.of(idTokenSignedResponseAlgs.get()); - } else { - this.idTokenSignedResponseAlgs = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage idTokenSignedResponseAlgs( - List idTokenSignedResponseAlgs) { - this.idTokenSignedResponseAlgs = OptionalNullable.of(idTokenSignedResponseAlgs); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) - public _FinalStage idTokenSignedResponseAlgs( - @Nullable OptionalNullable> idTokenSignedResponseAlgs) { - this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; - return this; - } - - @java.lang.Override - public _FinalStage iconUrl(String iconUrl) { - this.iconUrl = Optional.ofNullable(iconUrl); - return this; - } - - @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 domainAliases(List domainAliases) { - this.domainAliases = Optional.ofNullable(domainAliases); - return this; - } - - @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 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 connectionSettings(ConnectionConnectionSettings 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; - } - - @java.lang.Override - public _FinalStage clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @java.lang.Override - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public _FinalStage clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - @java.lang.Override - public _FinalStage authorizationEndpoint(String authorizationEndpoint) { - this.authorizationEndpoint = Optional.ofNullable(authorizationEndpoint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authorization_endpoint", nulls = Nulls.SKIP) - public _FinalStage authorizationEndpoint(Optional authorizationEndpoint) { - this.authorizationEndpoint = authorizationEndpoint; - return this; - } - - @java.lang.Override - public ConnectionOptionsCommonOidc build() { - return new ConnectionOptionsCommonOidc( - authorizationEndpoint, - clientId, - clientSecret, - connectionSettings, - federatedConnectionsAccessTokens, - domainAliases, - iconUrl, - idTokenSignedResponseAlgs, - issuer, - jwksUri, - oidcMetadata, - scope, - sendBackChannelNonce, - setUserRootAttributes, - tenantDomain, - tokenEndpoint, - tokenEndpointAuthMethod, - tokenEndpointAuthSigningAlg, - upstreamParams, - userinfoEndpoint, - 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 deleted file mode 100644 index b25819e86..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsCommonSaml.java +++ /dev/null @@ -1,524 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsCommonSaml.Builder.class) -public final class ConnectionOptionsCommonSaml implements IConnectionOptionsCommonSaml { - private final Optional cert; - - private final Optional decryptionKey; - - private final Optional digestAlgorithm; - - private final Optional> domainAliases; - - private final Optional entityId; - - private final Optional iconUrl; - - private final Optional idpinitiated; - - private final Optional protocolBinding; - - private final Optional setUserRootAttributes; - - private final Optional signInEndpoint; - - private final Optional signSamlRequest; - - private final Optional signatureAlgorithm; - - private final Optional tenantDomain; - - private final Optional> thumbprints; - - private final OptionalNullable>> - upstreamParams; - - private final Map additionalProperties; - - private ConnectionOptionsCommonSaml( - Optional cert, - Optional decryptionKey, - Optional digestAlgorithm, - Optional> domainAliases, - Optional entityId, - Optional iconUrl, - Optional idpinitiated, - Optional protocolBinding, - Optional setUserRootAttributes, - Optional signInEndpoint, - Optional signSamlRequest, - Optional signatureAlgorithm, - Optional tenantDomain, - Optional> thumbprints, - OptionalNullable>> upstreamParams, - Map additionalProperties) { - this.cert = cert; - this.decryptionKey = decryptionKey; - this.digestAlgorithm = digestAlgorithm; - this.domainAliases = domainAliases; - this.entityId = entityId; - this.iconUrl = iconUrl; - this.idpinitiated = idpinitiated; - this.protocolBinding = protocolBinding; - this.setUserRootAttributes = setUserRootAttributes; - this.signInEndpoint = signInEndpoint; - this.signSamlRequest = signSamlRequest; - this.signatureAlgorithm = signatureAlgorithm; - this.tenantDomain = tenantDomain; - this.thumbprints = thumbprints; - this.upstreamParams = upstreamParams; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("cert") - @java.lang.Override - public Optional getCert() { - return cert; - } - - @JsonProperty("decryptionKey") - @java.lang.Override - public Optional getDecryptionKey() { - return decryptionKey; - } - - @JsonProperty("digestAlgorithm") - @java.lang.Override - public Optional getDigestAlgorithm() { - return digestAlgorithm; - } - - @JsonProperty("domain_aliases") - @java.lang.Override - public Optional> getDomainAliases() { - return domainAliases; - } - - @JsonProperty("entityId") - @java.lang.Override - public Optional getEntityId() { - return entityId; - } - - @JsonProperty("icon_url") - @java.lang.Override - public Optional getIconUrl() { - return iconUrl; - } - - @JsonProperty("idpinitiated") - @java.lang.Override - public Optional getIdpinitiated() { - return idpinitiated; - } - - @JsonProperty("protocolBinding") - @java.lang.Override - public Optional getProtocolBinding() { - return protocolBinding; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonProperty("signInEndpoint") - @java.lang.Override - public Optional getSignInEndpoint() { - return signInEndpoint; - } - - @JsonProperty("signSAMLRequest") - @java.lang.Override - public Optional getSignSamlRequest() { - return signSamlRequest; - } - - @JsonProperty("signatureAlgorithm") - @java.lang.Override - public Optional getSignatureAlgorithm() { - return signatureAlgorithm; - } - - @JsonProperty("tenant_domain") - @java.lang.Override - public Optional getTenantDomain() { - return tenantDomain; - } - - @JsonProperty("thumbprints") - @java.lang.Override - public Optional> getThumbprints() { - return thumbprints; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsCommonSaml && equalTo((ConnectionOptionsCommonSaml) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsCommonSaml other) { - return cert.equals(other.cert) - && decryptionKey.equals(other.decryptionKey) - && digestAlgorithm.equals(other.digestAlgorithm) - && domainAliases.equals(other.domainAliases) - && entityId.equals(other.entityId) - && iconUrl.equals(other.iconUrl) - && idpinitiated.equals(other.idpinitiated) - && protocolBinding.equals(other.protocolBinding) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && signInEndpoint.equals(other.signInEndpoint) - && signSamlRequest.equals(other.signSamlRequest) - && signatureAlgorithm.equals(other.signatureAlgorithm) - && tenantDomain.equals(other.tenantDomain) - && thumbprints.equals(other.thumbprints) - && upstreamParams.equals(other.upstreamParams); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.cert, - this.decryptionKey, - this.digestAlgorithm, - this.domainAliases, - this.entityId, - this.iconUrl, - this.idpinitiated, - this.protocolBinding, - this.setUserRootAttributes, - this.signInEndpoint, - this.signSamlRequest, - this.signatureAlgorithm, - 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 cert = Optional.empty(); - - private Optional decryptionKey = Optional.empty(); - - private Optional digestAlgorithm = Optional.empty(); - - private Optional> domainAliases = Optional.empty(); - - private Optional entityId = Optional.empty(); - - private Optional iconUrl = Optional.empty(); - - private Optional idpinitiated = Optional.empty(); - - private Optional protocolBinding = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private Optional signInEndpoint = Optional.empty(); - - private Optional signSamlRequest = Optional.empty(); - - private Optional signatureAlgorithm = Optional.empty(); - - private Optional tenantDomain = Optional.empty(); - - private Optional> thumbprints = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsCommonSaml other) { - cert(other.getCert()); - decryptionKey(other.getDecryptionKey()); - digestAlgorithm(other.getDigestAlgorithm()); - domainAliases(other.getDomainAliases()); - entityId(other.getEntityId()); - iconUrl(other.getIconUrl()); - idpinitiated(other.getIdpinitiated()); - protocolBinding(other.getProtocolBinding()); - setUserRootAttributes(other.getSetUserRootAttributes()); - signInEndpoint(other.getSignInEndpoint()); - signSamlRequest(other.getSignSamlRequest()); - signatureAlgorithm(other.getSignatureAlgorithm()); - tenantDomain(other.getTenantDomain()); - thumbprints(other.getThumbprints()); - upstreamParams(other.getUpstreamParams()); - return this; - } - - @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; - } - - @JsonSetter(value = "decryptionKey", nulls = Nulls.SKIP) - public Builder decryptionKey(Optional decryptionKey) { - this.decryptionKey = decryptionKey; - return this; - } - - public Builder decryptionKey(ConnectionDecryptionKeySaml decryptionKey) { - this.decryptionKey = Optional.ofNullable(decryptionKey); - return this; - } - - @JsonSetter(value = "digestAlgorithm", nulls = Nulls.SKIP) - public Builder digestAlgorithm(Optional digestAlgorithm) { - this.digestAlgorithm = digestAlgorithm; - return this; - } - - public Builder digestAlgorithm(ConnectionDigestAlgorithmEnumSaml digestAlgorithm) { - this.digestAlgorithm = Optional.ofNullable(digestAlgorithm); - return this; - } - - @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; - } - - @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; - } - - @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(ConnectionOptionsIdpinitiatedSaml idpinitiated) { - this.idpinitiated = Optional.ofNullable(idpinitiated); - return this; - } - - @JsonSetter(value = "protocolBinding", nulls = Nulls.SKIP) - public Builder protocolBinding(Optional protocolBinding) { - this.protocolBinding = protocolBinding; - return this; - } - - public Builder protocolBinding(ConnectionProtocolBindingEnumSaml 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(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @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; - } - - @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 = "signatureAlgorithm", nulls = Nulls.SKIP) - public Builder signatureAlgorithm(Optional signatureAlgorithm) { - this.signatureAlgorithm = signatureAlgorithm; - return this; - } - - public Builder signatureAlgorithm(ConnectionSignatureAlgorithmEnumSaml signatureAlgorithm) { - this.signatureAlgorithm = Optional.ofNullable(signatureAlgorithm); - return this; - } - - @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; - } - - @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( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - public ConnectionOptionsCommonSaml build() { - return new ConnectionOptionsCommonSaml( - cert, - decryptionKey, - digestAlgorithm, - domainAliases, - entityId, - iconUrl, - idpinitiated, - protocolBinding, - setUserRootAttributes, - signInEndpoint, - signSamlRequest, - signatureAlgorithm, - tenantDomain, - thumbprints, - upstreamParams, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsDaccount.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsDaccount.java deleted file mode 100644 index 6e6ace975..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsDaccount.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsDaccount.Builder.class) -public final class ConnectionOptionsDaccount implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsDaccount( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsDaccount && equalTo((ConnectionOptionsDaccount) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsDaccount other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsDaccount other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsDaccount build() { - return new ConnectionOptionsDaccount( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsDropbox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsDropbox.java deleted file mode 100644 index d9ef5edc2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsDropbox.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsDropbox.Builder.class) -public final class ConnectionOptionsDropbox implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsDropbox( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsDropbox && equalTo((ConnectionOptionsDropbox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsDropbox other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsDropbox other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsDropbox build() { - return new ConnectionOptionsDropbox( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsDwolla.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsDwolla.java deleted file mode 100644 index ee49cbde2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsDwolla.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsDwolla.Builder.class) -public final class ConnectionOptionsDwolla implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsDwolla( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsDwolla && equalTo((ConnectionOptionsDwolla) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsDwolla other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsDwolla other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsDwolla build() { - return new ConnectionOptionsDwolla( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - 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 deleted file mode 100644 index eb400e446..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsEmail.java +++ /dev/null @@ -1,302 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionOptionsEmail.Builder.class) -public final class ConnectionOptionsEmail implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional authParams; - - private final boolean bruteForceProtection; - - private final Optional disableSignup; - - private final ConnectionEmailEmail email; - - private final String name; - - private final Optional totp; - - private final Map additionalProperties; - - private ConnectionOptionsEmail( - Optional> nonPersistentAttrs, - Optional authParams, - boolean bruteForceProtection, - Optional disableSignup, - ConnectionEmailEmail email, - String name, - Optional totp, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.authParams = authParams; - this.bruteForceProtection = bruteForceProtection; - this.disableSignup = disableSignup; - this.email = email; - this.name = name; - this.totp = totp; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("authParams") - public Optional getAuthParams() { - return authParams; - } - - @JsonProperty("brute_force_protection") - public boolean getBruteForceProtection() { - return bruteForceProtection; - } - - @JsonProperty("disable_signup") - public Optional getDisableSignup() { - return disableSignup; - } - - @JsonProperty("email") - public ConnectionEmailEmail getEmail() { - return email; - } - - /** - * @return Connection name - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("totp") - public Optional getTotp() { - return totp; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsEmail && equalTo((ConnectionOptionsEmail) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsEmail other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && authParams.equals(other.authParams) - && bruteForceProtection == other.bruteForceProtection - && disableSignup.equals(other.disableSignup) - && email.equals(other.email) - && name.equals(other.name) - && totp.equals(other.totp); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.nonPersistentAttrs, - this.authParams, - this.bruteForceProtection, - this.disableSignup, - this.email, - this.name, - this.totp); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BruteForceProtectionStage builder() { - return new Builder(); - } - - public interface BruteForceProtectionStage { - EmailStage bruteForceProtection(boolean bruteForceProtection); - - Builder from(ConnectionOptionsEmail other); - } - - public interface EmailStage { - NameStage email(@NotNull ConnectionEmailEmail email); - } - - public interface NameStage { - /** - *

Connection name

- */ - _FinalStage name(@NotNull String name); - } - - public interface _FinalStage { - ConnectionOptionsEmail build(); - - _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); - - _FinalStage nonPersistentAttrs(List nonPersistentAttrs); - - _FinalStage authParams(Optional authParams); - - _FinalStage authParams(String authParams); - - _FinalStage disableSignup(Optional disableSignup); - - _FinalStage disableSignup(Boolean disableSignup); - - _FinalStage totp(Optional totp); - - _FinalStage totp(ConnectionTotpEmail totp); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements BruteForceProtectionStage, EmailStage, NameStage, _FinalStage { - private boolean bruteForceProtection; - - private ConnectionEmailEmail email; - - private String name; - - private Optional totp = Optional.empty(); - - private Optional disableSignup = Optional.empty(); - - private Optional authParams = Optional.empty(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionOptionsEmail other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - authParams(other.getAuthParams()); - bruteForceProtection(other.getBruteForceProtection()); - disableSignup(other.getDisableSignup()); - email(other.getEmail()); - name(other.getName()); - totp(other.getTotp()); - return this; - } - - @java.lang.Override - @JsonSetter("brute_force_protection") - public EmailStage bruteForceProtection(boolean bruteForceProtection) { - this.bruteForceProtection = bruteForceProtection; - return this; - } - - @java.lang.Override - @JsonSetter("email") - public NameStage email(@NotNull ConnectionEmailEmail email) { - this.email = Objects.requireNonNull(email, "email must not be null"); - return this; - } - - /** - *

Connection name

- *

Connection name

- * @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 totp(ConnectionTotpEmail totp) { - this.totp = Optional.ofNullable(totp); - return this; - } - - @java.lang.Override - @JsonSetter(value = "totp", nulls = Nulls.SKIP) - public _FinalStage totp(Optional totp) { - this.totp = totp; - return this; - } - - @java.lang.Override - public _FinalStage disableSignup(Boolean disableSignup) { - this.disableSignup = Optional.ofNullable(disableSignup); - return this; - } - - @java.lang.Override - @JsonSetter(value = "disable_signup", nulls = Nulls.SKIP) - public _FinalStage disableSignup(Optional disableSignup) { - this.disableSignup = disableSignup; - return this; - } - - @java.lang.Override - public _FinalStage authParams(String authParams) { - this.authParams = Optional.ofNullable(authParams); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authParams", nulls = Nulls.SKIP) - public _FinalStage authParams(Optional authParams) { - this.authParams = authParams; - return this; - } - - @java.lang.Override - public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @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 ConnectionOptionsEmail build() { - return new ConnectionOptionsEmail( - nonPersistentAttrs, - authParams, - bruteForceProtection, - disableSignup, - email, - name, - totp, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsEvernote.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsEvernote.java deleted file mode 100644 index 2d2992be6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsEvernote.java +++ /dev/null @@ -1,266 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsEvernote.Builder.class) -public final class ConnectionOptionsEvernote implements IConnectionOptionsOAuth1Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsEvernote( - Optional clientId, - Optional clientSecret, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - /** - * @return OAuth 1.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. - */ - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - /** - * @return OAuth 1.0 client secret issued by the identity provider during application registration. Used to authenticate your Auth0 connection when signing requests and exchanging request tokens and verifiers for access tokens. May be null for public clients. - */ - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsEvernote && equalTo((ConnectionOptionsEvernote) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsEvernote other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsEvernote other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - /** - *

OAuth 1.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

- */ - @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; - } - - /** - *

OAuth 1.0 client secret issued by the identity provider during application registration. Used to authenticate your Auth0 connection when signing requests and exchanging request tokens and verifiers for access tokens. May be null for public clients.

- */ - @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 = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsEvernote build() { - return new ConnectionOptionsEvernote( - clientId, - clientSecret, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsExact.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsExact.java deleted file mode 100644 index d9a8b6bee..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsExact.java +++ /dev/null @@ -1,308 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsExact.Builder.class) -public final class ConnectionOptionsExact implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional baseUrl; - - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional profile; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Map additionalProperties; - - private ConnectionOptionsExact( - Optional> nonPersistentAttrs, - Optional baseUrl, - Optional clientId, - Optional clientSecret, - Optional profile, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.baseUrl = baseUrl; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.profile = profile; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("baseUrl") - public Optional getBaseUrl() { - return baseUrl; - } - - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - /** - * @return Enables retrieval of basic profile attributes from Exact Online including name, username, picture, email, gender, and language. - */ - @JsonProperty("profile") - public Optional getProfile() { - return profile; - } - - @JsonProperty("set_user_root_attributes") - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsExact && equalTo((ConnectionOptionsExact) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsExact other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && baseUrl.equals(other.baseUrl) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && profile.equals(other.profile) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.nonPersistentAttrs, - this.baseUrl, - this.clientId, - this.clientSecret, - this.profile, - this.setUserRootAttributes, - 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> nonPersistentAttrs = Optional.empty(); - - private Optional baseUrl = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional profile = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsExact other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - baseUrl(other.getBaseUrl()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - profile(other.getProfile()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @JsonSetter(value = "baseUrl", nulls = Nulls.SKIP) - public Builder baseUrl(Optional baseUrl) { - this.baseUrl = baseUrl; - return this; - } - - public Builder baseUrl(String baseUrl) { - this.baseUrl = Optional.ofNullable(baseUrl); - 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; - } - - /** - *

Enables retrieval of basic profile attributes from Exact Online including name, username, picture, email, gender, and language.

- */ - @JsonSetter(value = "profile", nulls = Nulls.SKIP) - public Builder profile(Optional profile) { - this.profile = profile; - return this; - } - - public Builder profile(Boolean profile) { - this.profile = Optional.ofNullable(profile); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - public ConnectionOptionsExact build() { - return new ConnectionOptionsExact( - nonPersistentAttrs, - baseUrl, - clientId, - clientSecret, - profile, - setUserRootAttributes, - upstreamParams, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsFacebook.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsFacebook.java deleted file mode 100644 index cd581604a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsFacebook.java +++ /dev/null @@ -1,1570 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionOptionsFacebook.Builder.class) -public final class ConnectionOptionsFacebook implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional> freeformScopes; - - private final Optional> upstreamParams; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final Optional adsManagement; - - private final Optional adsRead; - - private final Optional allowContextProfileField; - - private final Optional businessManagement; - - private final Optional email; - - private final Optional groupsAccessMemberInfo; - - private final Optional leadsRetrieval; - - private final Optional manageNotifications; - - private final Optional managePages; - - private final Optional pagesManageCta; - - private final Optional pagesManageInstantArticles; - - private final Optional pagesMessaging; - - private final Optional pagesMessagingPhoneNumber; - - private final Optional pagesMessagingSubscriptions; - - private final Optional pagesShowList; - - private final Optional publicProfile; - - private final Optional publishActions; - - private final Optional publishPages; - - private final Optional publishToGroups; - - private final Optional publishVideo; - - private final Optional readAudienceNetworkInsights; - - private final Optional readInsights; - - private final Optional readMailbox; - - private final Optional readPageMailboxes; - - private final Optional readStream; - - private final Optional userAgeRange; - - private final Optional userBirthday; - - private final Optional userEvents; - - private final Optional userFriends; - - private final Optional userGender; - - private final Optional userGroups; - - private final Optional userHometown; - - private final Optional userLikes; - - private final Optional userLink; - - private final Optional userLocation; - - private final Optional userManagedGroups; - - private final Optional userPhotos; - - private final Optional userPosts; - - private final Optional userStatus; - - private final Optional userTaggedPlaces; - - private final Optional userVideos; - - private final Map additionalProperties; - - private ConnectionOptionsFacebook( - Optional> nonPersistentAttrs, - Optional clientId, - Optional clientSecret, - Optional> freeformScopes, - Optional> upstreamParams, - Optional scope, - Optional setUserRootAttributes, - Optional adsManagement, - Optional adsRead, - Optional allowContextProfileField, - Optional businessManagement, - Optional email, - Optional groupsAccessMemberInfo, - Optional leadsRetrieval, - Optional manageNotifications, - Optional managePages, - Optional pagesManageCta, - Optional pagesManageInstantArticles, - Optional pagesMessaging, - Optional pagesMessagingPhoneNumber, - Optional pagesMessagingSubscriptions, - Optional pagesShowList, - Optional publicProfile, - Optional publishActions, - Optional publishPages, - Optional publishToGroups, - Optional publishVideo, - Optional readAudienceNetworkInsights, - Optional readInsights, - Optional readMailbox, - Optional readPageMailboxes, - Optional readStream, - Optional userAgeRange, - Optional userBirthday, - Optional userEvents, - Optional userFriends, - Optional userGender, - Optional userGroups, - Optional userHometown, - Optional userLikes, - Optional userLink, - Optional userLocation, - Optional userManagedGroups, - Optional userPhotos, - Optional userPosts, - Optional userStatus, - Optional userTaggedPlaces, - Optional userVideos, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.freeformScopes = freeformScopes; - this.upstreamParams = upstreamParams; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.adsManagement = adsManagement; - this.adsRead = adsRead; - this.allowContextProfileField = allowContextProfileField; - this.businessManagement = businessManagement; - this.email = email; - this.groupsAccessMemberInfo = groupsAccessMemberInfo; - this.leadsRetrieval = leadsRetrieval; - this.manageNotifications = manageNotifications; - this.managePages = managePages; - this.pagesManageCta = pagesManageCta; - this.pagesManageInstantArticles = pagesManageInstantArticles; - this.pagesMessaging = pagesMessaging; - this.pagesMessagingPhoneNumber = pagesMessagingPhoneNumber; - this.pagesMessagingSubscriptions = pagesMessagingSubscriptions; - this.pagesShowList = pagesShowList; - this.publicProfile = publicProfile; - this.publishActions = publishActions; - this.publishPages = publishPages; - this.publishToGroups = publishToGroups; - this.publishVideo = publishVideo; - this.readAudienceNetworkInsights = readAudienceNetworkInsights; - this.readInsights = readInsights; - this.readMailbox = readMailbox; - this.readPageMailboxes = readPageMailboxes; - this.readStream = readStream; - this.userAgeRange = userAgeRange; - this.userBirthday = userBirthday; - this.userEvents = userEvents; - this.userFriends = userFriends; - this.userGender = userGender; - this.userGroups = userGroups; - this.userHometown = userHometown; - this.userLikes = userLikes; - this.userLink = userLink; - this.userLocation = userLocation; - this.userManagedGroups = userManagedGroups; - this.userPhotos = userPhotos; - this.userPosts = userPosts; - this.userStatus = userStatus; - this.userTaggedPlaces = userTaggedPlaces; - this.userVideos = userVideos; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("freeform_scopes") - public Optional> getFreeformScopes() { - return freeformScopes; - } - - @JsonProperty("upstream_params") - public Optional> getUpstreamParams() { - return upstreamParams; - } - - @JsonProperty("scope") - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - /** - * @return Grants permission to both read and manage ads for ad accounts you own or have been granted access to by the owner. By default, your app may only access ad accounts owned by admins of the app when in developer mode. - */ - @JsonProperty("ads_management") - public Optional getAdsManagement() { - return adsManagement; - } - - /** - * @return Grants access to the Ads Insights API to pull ads report information for ad accounts you own or have been granted access to by the owner of other ad accounts. - */ - @JsonProperty("ads_read") - public Optional getAdsRead() { - return adsRead; - } - - /** - * @return Provides access to a social context. Deprecated on April 30th, 2019. - */ - @JsonProperty("allow_context_profile_field") - public Optional getAllowContextProfileField() { - return allowContextProfileField; - } - - /** - * @return Grants permission to read and write with the Business Manager API. - */ - @JsonProperty("business_management") - public Optional getBusinessManagement() { - return businessManagement; - } - - /** - * @return Grants permission to access a person's primary email address. - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - /** - * @return Grants permission to publicly available group member information. - */ - @JsonProperty("groups_access_member_info") - public Optional getGroupsAccessMemberInfo() { - return groupsAccessMemberInfo; - } - - /** - * @return Grants permission to retrieve all the information captured within a lead. - */ - @JsonProperty("leads_retrieval") - public Optional getLeadsRetrieval() { - return leadsRetrieval; - } - - /** - * @return Enables your app to read a person's notifications and mark them as read. This permission does not let you send notifications to a person. Deprecated in Graph API v2.3. - */ - @JsonProperty("manage_notifications") - public Optional getManageNotifications() { - return manageNotifications; - } - - /** - * @return Grants permission to retrieve Page Access Tokens for the Pages and Apps that the person administers. Apps need both manage_pages and publish_pages to be able to publish as a Page. - */ - @JsonProperty("manage_pages") - public Optional getManagePages() { - return managePages; - } - - /** - * @return Allows the app to perform POST and DELETE operations on endpoints used for managing a Page's Call To Action buttons. - */ - @JsonProperty("pages_manage_cta") - public Optional getPagesManageCta() { - return pagesManageCta; - } - - /** - * @return Grants permission to manage Instant Articles on behalf of Facebook Pages administered by people using your app. - */ - @JsonProperty("pages_manage_instant_articles") - public Optional getPagesManageInstantArticles() { - return pagesManageInstantArticles; - } - - /** - * @return Grants permission to send and receive messages through a Facebook Page. - */ - @JsonProperty("pages_messaging") - public Optional getPagesMessaging() { - return pagesMessaging; - } - - /** - * @return Grants permission to use the phone number messaging feature. - */ - @JsonProperty("pages_messaging_phone_number") - public Optional getPagesMessagingPhoneNumber() { - return pagesMessagingPhoneNumber; - } - - /** - * @return Grants permission to send messages using Facebook Pages at any time after the first user interaction. Your app may only send advertising or promotional content through sponsored messages or within 24 hours of user interaction. - */ - @JsonProperty("pages_messaging_subscriptions") - public Optional getPagesMessagingSubscriptions() { - return pagesMessagingSubscriptions; - } - - /** - * @return Grants access to show the list of the Pages that a person manages. - */ - @JsonProperty("pages_show_list") - public Optional getPagesShowList() { - return pagesShowList; - } - - /** - * @return Provides access to a user's public profile information including id, first_name, last_name, middle_name, name, name_format, picture, and short_name. This is the most basic permission and is required by Facebook. - */ - @JsonProperty("public_profile") - public Optional getPublicProfile() { - return publicProfile; - } - - /** - * @return Allows your app to publish to the Open Graph using Built-in Actions, Achievements, Scores, or Custom Actions. Deprecated on August 1st, 2018. - */ - @JsonProperty("publish_actions") - public Optional getPublishActions() { - return publishActions; - } - - /** - * @return Grants permission to publish posts, comments, and like Pages managed by a person using your app. Your app must also have manage_pages to publish as a Page. - */ - @JsonProperty("publish_pages") - public Optional getPublishPages() { - return publishPages; - } - - /** - * @return Grants permission to post content into a group on behalf of a user who has granted the app this permission. - */ - @JsonProperty("publish_to_groups") - public Optional getPublishToGroups() { - return publishToGroups; - } - - /** - * @return Grants permission to publish live videos to the app User's timeline. - */ - @JsonProperty("publish_video") - public Optional getPublishVideo() { - return publishVideo; - } - - /** - * @return Grants read-only access to the Audience Network Insights data for Apps the person owns. - */ - @JsonProperty("read_audience_network_insights") - public Optional getReadAudienceNetworkInsights() { - return readAudienceNetworkInsights; - } - - /** - * @return Grants read-only access to the Insights data for Pages, Apps, and web domains the person owns. - */ - @JsonProperty("read_insights") - public Optional getReadInsights() { - return readInsights; - } - - /** - * @return Provides the ability to read the messages in a person's Facebook Inbox through the inbox edge and the thread node. Deprecated in Graph API v2.3. - */ - @JsonProperty("read_mailbox") - public Optional getReadMailbox() { - return readMailbox; - } - - /** - * @return Grants permission to read from the Page Inboxes of the Pages managed by a person. This permission is often used alongside the manage_pages permission. - */ - @JsonProperty("read_page_mailboxes") - public Optional getReadPageMailboxes() { - return readPageMailboxes; - } - - /** - * @return Provides access to read the posts in a person's News Feed, or the posts on their Profile. Deprecated in Graph API v2.3. - */ - @JsonProperty("read_stream") - public Optional getReadStream() { - return readStream; - } - - /** - * @return Grants permission to access a person's age range. - */ - @JsonProperty("user_age_range") - public Optional getUserAgeRange() { - return userAgeRange; - } - - /** - * @return Grants permission to access a person's birthday. - */ - @JsonProperty("user_birthday") - public Optional getUserBirthday() { - return userBirthday; - } - - /** - * @return Grants read-only access to the Events a person is a host of or has RSVPed to. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook. - */ - @JsonProperty("user_events") - public Optional getUserEvents() { - return userEvents; - } - - /** - * @return Grants permission to access a list of friends that also use said app. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook. - */ - @JsonProperty("user_friends") - public Optional getUserFriends() { - return userFriends; - } - - /** - * @return Grants permission to access a person's gender. - */ - @JsonProperty("user_gender") - public Optional getUserGender() { - return userGender; - } - - /** - * @return Enables your app to read the Groups a person is a member of through the groups edge on the User object. Deprecated in Graph API v2.3. - */ - @JsonProperty("user_groups") - public Optional getUserGroups() { - return userGroups; - } - - /** - * @return Grants permission to access a person's hometown location set in their User Profile. - */ - @JsonProperty("user_hometown") - public Optional getUserHometown() { - return userHometown; - } - - /** - * @return Grants permission to access the list of all Facebook Pages that a person has liked. - */ - @JsonProperty("user_likes") - public Optional getUserLikes() { - return userLikes; - } - - /** - * @return Grants permission to access the Facebook Profile URL of the user of your app. - */ - @JsonProperty("user_link") - public Optional getUserLink() { - return userLink; - } - - /** - * @return Provides access to a person's current city through the location field on the User object. The current city is set by a person on their Profile. - */ - @JsonProperty("user_location") - public Optional getUserLocation() { - return userLocation; - } - - /** - * @return Enables your app to read the Groups a person is an admin of through the groups edge on the User object. Deprecated in Graph API v3.0. - */ - @JsonProperty("user_managed_groups") - public Optional getUserManagedGroups() { - return userManagedGroups; - } - - /** - * @return Provides access to the photos a person has uploaded or been tagged in. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook. - */ - @JsonProperty("user_photos") - public Optional getUserPhotos() { - return userPhotos; - } - - /** - * @return Provides access to the posts on a person's Timeline including their own posts, posts they are tagged in, and posts other people make on their Timeline. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook. - */ - @JsonProperty("user_posts") - public Optional getUserPosts() { - return userPosts; - } - - /** - * @return Provides access to a person's statuses. These are posts on Facebook which don't include links, videos or photos. Deprecated in Graph API v2.3. - */ - @JsonProperty("user_status") - public Optional getUserStatus() { - return userStatus; - } - - /** - * @return Provides access to the Places a person has been tagged at in photos, videos, statuses and links. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook. - */ - @JsonProperty("user_tagged_places") - public Optional getUserTaggedPlaces() { - return userTaggedPlaces; - } - - /** - * @return Provides access to the videos a person has uploaded or been tagged in. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook. - */ - @JsonProperty("user_videos") - public Optional getUserVideos() { - return userVideos; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsFacebook && equalTo((ConnectionOptionsFacebook) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsFacebook other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && freeformScopes.equals(other.freeformScopes) - && upstreamParams.equals(other.upstreamParams) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && adsManagement.equals(other.adsManagement) - && adsRead.equals(other.adsRead) - && allowContextProfileField.equals(other.allowContextProfileField) - && businessManagement.equals(other.businessManagement) - && email.equals(other.email) - && groupsAccessMemberInfo.equals(other.groupsAccessMemberInfo) - && leadsRetrieval.equals(other.leadsRetrieval) - && manageNotifications.equals(other.manageNotifications) - && managePages.equals(other.managePages) - && pagesManageCta.equals(other.pagesManageCta) - && pagesManageInstantArticles.equals(other.pagesManageInstantArticles) - && pagesMessaging.equals(other.pagesMessaging) - && pagesMessagingPhoneNumber.equals(other.pagesMessagingPhoneNumber) - && pagesMessagingSubscriptions.equals(other.pagesMessagingSubscriptions) - && pagesShowList.equals(other.pagesShowList) - && publicProfile.equals(other.publicProfile) - && publishActions.equals(other.publishActions) - && publishPages.equals(other.publishPages) - && publishToGroups.equals(other.publishToGroups) - && publishVideo.equals(other.publishVideo) - && readAudienceNetworkInsights.equals(other.readAudienceNetworkInsights) - && readInsights.equals(other.readInsights) - && readMailbox.equals(other.readMailbox) - && readPageMailboxes.equals(other.readPageMailboxes) - && readStream.equals(other.readStream) - && userAgeRange.equals(other.userAgeRange) - && userBirthday.equals(other.userBirthday) - && userEvents.equals(other.userEvents) - && userFriends.equals(other.userFriends) - && userGender.equals(other.userGender) - && userGroups.equals(other.userGroups) - && userHometown.equals(other.userHometown) - && userLikes.equals(other.userLikes) - && userLink.equals(other.userLink) - && userLocation.equals(other.userLocation) - && userManagedGroups.equals(other.userManagedGroups) - && userPhotos.equals(other.userPhotos) - && userPosts.equals(other.userPosts) - && userStatus.equals(other.userStatus) - && userTaggedPlaces.equals(other.userTaggedPlaces) - && userVideos.equals(other.userVideos); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.nonPersistentAttrs, - this.clientId, - this.clientSecret, - this.freeformScopes, - this.upstreamParams, - this.scope, - this.setUserRootAttributes, - this.adsManagement, - this.adsRead, - this.allowContextProfileField, - this.businessManagement, - this.email, - this.groupsAccessMemberInfo, - this.leadsRetrieval, - this.manageNotifications, - this.managePages, - this.pagesManageCta, - this.pagesManageInstantArticles, - this.pagesMessaging, - this.pagesMessagingPhoneNumber, - this.pagesMessagingSubscriptions, - this.pagesShowList, - this.publicProfile, - this.publishActions, - this.publishPages, - this.publishToGroups, - this.publishVideo, - this.readAudienceNetworkInsights, - this.readInsights, - this.readMailbox, - this.readPageMailboxes, - this.readStream, - this.userAgeRange, - this.userBirthday, - this.userEvents, - this.userFriends, - this.userGender, - this.userGroups, - this.userHometown, - this.userLikes, - this.userLink, - this.userLocation, - this.userManagedGroups, - this.userPhotos, - this.userPosts, - this.userStatus, - this.userTaggedPlaces, - this.userVideos); - } - - @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> nonPersistentAttrs = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional> freeformScopes = Optional.empty(); - - private Optional> upstreamParams = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private Optional adsManagement = Optional.empty(); - - private Optional adsRead = Optional.empty(); - - private Optional allowContextProfileField = Optional.empty(); - - private Optional businessManagement = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional groupsAccessMemberInfo = Optional.empty(); - - private Optional leadsRetrieval = Optional.empty(); - - private Optional manageNotifications = Optional.empty(); - - private Optional managePages = Optional.empty(); - - private Optional pagesManageCta = Optional.empty(); - - private Optional pagesManageInstantArticles = Optional.empty(); - - private Optional pagesMessaging = Optional.empty(); - - private Optional pagesMessagingPhoneNumber = Optional.empty(); - - private Optional pagesMessagingSubscriptions = Optional.empty(); - - private Optional pagesShowList = Optional.empty(); - - private Optional publicProfile = Optional.empty(); - - private Optional publishActions = Optional.empty(); - - private Optional publishPages = Optional.empty(); - - private Optional publishToGroups = Optional.empty(); - - private Optional publishVideo = Optional.empty(); - - private Optional readAudienceNetworkInsights = Optional.empty(); - - private Optional readInsights = Optional.empty(); - - private Optional readMailbox = Optional.empty(); - - private Optional readPageMailboxes = Optional.empty(); - - private Optional readStream = Optional.empty(); - - private Optional userAgeRange = Optional.empty(); - - private Optional userBirthday = Optional.empty(); - - private Optional userEvents = Optional.empty(); - - private Optional userFriends = Optional.empty(); - - private Optional userGender = Optional.empty(); - - private Optional userGroups = Optional.empty(); - - private Optional userHometown = Optional.empty(); - - private Optional userLikes = Optional.empty(); - - private Optional userLink = Optional.empty(); - - private Optional userLocation = Optional.empty(); - - private Optional userManagedGroups = Optional.empty(); - - private Optional userPhotos = Optional.empty(); - - private Optional userPosts = Optional.empty(); - - private Optional userStatus = Optional.empty(); - - private Optional userTaggedPlaces = Optional.empty(); - - private Optional userVideos = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsFacebook other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - freeformScopes(other.getFreeformScopes()); - upstreamParams(other.getUpstreamParams()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - adsManagement(other.getAdsManagement()); - adsRead(other.getAdsRead()); - allowContextProfileField(other.getAllowContextProfileField()); - businessManagement(other.getBusinessManagement()); - email(other.getEmail()); - groupsAccessMemberInfo(other.getGroupsAccessMemberInfo()); - leadsRetrieval(other.getLeadsRetrieval()); - manageNotifications(other.getManageNotifications()); - managePages(other.getManagePages()); - pagesManageCta(other.getPagesManageCta()); - pagesManageInstantArticles(other.getPagesManageInstantArticles()); - pagesMessaging(other.getPagesMessaging()); - pagesMessagingPhoneNumber(other.getPagesMessagingPhoneNumber()); - pagesMessagingSubscriptions(other.getPagesMessagingSubscriptions()); - pagesShowList(other.getPagesShowList()); - publicProfile(other.getPublicProfile()); - publishActions(other.getPublishActions()); - publishPages(other.getPublishPages()); - publishToGroups(other.getPublishToGroups()); - publishVideo(other.getPublishVideo()); - readAudienceNetworkInsights(other.getReadAudienceNetworkInsights()); - readInsights(other.getReadInsights()); - readMailbox(other.getReadMailbox()); - readPageMailboxes(other.getReadPageMailboxes()); - readStream(other.getReadStream()); - userAgeRange(other.getUserAgeRange()); - userBirthday(other.getUserBirthday()); - userEvents(other.getUserEvents()); - userFriends(other.getUserFriends()); - userGender(other.getUserGender()); - userGroups(other.getUserGroups()); - userHometown(other.getUserHometown()); - userLikes(other.getUserLikes()); - userLink(other.getUserLink()); - userLocation(other.getUserLocation()); - userManagedGroups(other.getUserManagedGroups()); - userPhotos(other.getUserPhotos()); - userPosts(other.getUserPosts()); - userStatus(other.getUserStatus()); - userTaggedPlaces(other.getUserTaggedPlaces()); - userVideos(other.getUserVideos()); - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @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 = "freeform_scopes", nulls = Nulls.SKIP) - public Builder freeformScopes(Optional> freeformScopes) { - this.freeformScopes = freeformScopes; - return this; - } - - public Builder freeformScopes(List freeformScopes) { - this.freeformScopes = Optional.ofNullable(freeformScopes); - 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; - } - - @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 = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - /** - *

Grants permission to both read and manage ads for ad accounts you own or have been granted access to by the owner. By default, your app may only access ad accounts owned by admins of the app when in developer mode.

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

Grants access to the Ads Insights API to pull ads report information for ad accounts you own or have been granted access to by the owner of other ad accounts.

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

Provides access to a social context. Deprecated on April 30th, 2019.

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

Grants permission to read and write with the Business Manager API.

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

Grants permission to access a person's primary email address.

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

Grants permission to publicly available group member information.

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

Grants permission to retrieve all the information captured within a lead.

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

Enables your app to read a person's notifications and mark them as read. This permission does not let you send notifications to a person. Deprecated in Graph API v2.3.

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

Grants permission to retrieve Page Access Tokens for the Pages and Apps that the person administers. Apps need both manage_pages and publish_pages to be able to publish as a Page.

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

Allows the app to perform POST and DELETE operations on endpoints used for managing a Page's Call To Action buttons.

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

Grants permission to manage Instant Articles on behalf of Facebook Pages administered by people using your app.

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

Grants permission to send and receive messages through a Facebook Page.

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

Grants permission to use the phone number messaging feature.

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

Grants permission to send messages using Facebook Pages at any time after the first user interaction. Your app may only send advertising or promotional content through sponsored messages or within 24 hours of user interaction.

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

Grants access to show the list of the Pages that a person manages.

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

Provides access to a user's public profile information including id, first_name, last_name, middle_name, name, name_format, picture, and short_name. This is the most basic permission and is required by Facebook.

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

Allows your app to publish to the Open Graph using Built-in Actions, Achievements, Scores, or Custom Actions. Deprecated on August 1st, 2018.

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

Grants permission to publish posts, comments, and like Pages managed by a person using your app. Your app must also have manage_pages to publish as a Page.

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

Grants permission to post content into a group on behalf of a user who has granted the app this permission.

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

Grants permission to publish live videos to the app User's timeline.

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

Grants read-only access to the Audience Network Insights data for Apps the person owns.

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

Grants read-only access to the Insights data for Pages, Apps, and web domains the person owns.

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

Provides the ability to read the messages in a person's Facebook Inbox through the inbox edge and the thread node. Deprecated in Graph API v2.3.

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

Grants permission to read from the Page Inboxes of the Pages managed by a person. This permission is often used alongside the manage_pages permission.

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

Provides access to read the posts in a person's News Feed, or the posts on their Profile. Deprecated in Graph API v2.3.

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

Grants permission to access a person's age range.

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

Grants permission to access a person's birthday.

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

Grants read-only access to the Events a person is a host of or has RSVPed to. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook.

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

Grants permission to access a list of friends that also use said app. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook.

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

Grants permission to access a person's gender.

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

Enables your app to read the Groups a person is a member of through the groups edge on the User object. Deprecated in Graph API v2.3.

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

Grants permission to access a person's hometown location set in their User Profile.

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

Grants permission to access the list of all Facebook Pages that a person has liked.

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

Grants permission to access the Facebook Profile URL of the user of your app.

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

Provides access to a person's current city through the location field on the User object. The current city is set by a person on their Profile.

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

Enables your app to read the Groups a person is an admin of through the groups edge on the User object. Deprecated in Graph API v3.0.

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

Provides access to the photos a person has uploaded or been tagged in. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook.

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

Provides access to the posts on a person's Timeline including their own posts, posts they are tagged in, and posts other people make on their Timeline. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook.

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

Provides access to a person's statuses. These are posts on Facebook which don't include links, videos or photos. Deprecated in Graph API v2.3.

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

Provides access to the Places a person has been tagged at in photos, videos, statuses and links. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook.

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

Provides access to the videos a person has uploaded or been tagged in. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook.

- */ - @JsonSetter(value = "user_videos", nulls = Nulls.SKIP) - public Builder userVideos(Optional userVideos) { - this.userVideos = userVideos; - return this; - } - - public Builder userVideos(Boolean userVideos) { - this.userVideos = Optional.ofNullable(userVideos); - return this; - } - - public ConnectionOptionsFacebook build() { - return new ConnectionOptionsFacebook( - nonPersistentAttrs, - clientId, - clientSecret, - freeformScopes, - upstreamParams, - scope, - setUserRootAttributes, - adsManagement, - adsRead, - allowContextProfileField, - businessManagement, - email, - groupsAccessMemberInfo, - leadsRetrieval, - manageNotifications, - managePages, - pagesManageCta, - pagesManageInstantArticles, - pagesMessaging, - pagesMessagingPhoneNumber, - pagesMessagingSubscriptions, - pagesShowList, - publicProfile, - publishActions, - publishPages, - publishToGroups, - publishVideo, - readAudienceNetworkInsights, - readInsights, - readMailbox, - readPageMailboxes, - readStream, - userAgeRange, - userBirthday, - userEvents, - userFriends, - userGender, - userGroups, - userHometown, - userLikes, - userLink, - userLocation, - userManagedGroups, - userPhotos, - userPosts, - userStatus, - userTaggedPlaces, - userVideos, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsFitbit.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsFitbit.java deleted file mode 100644 index aba4fc169..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsFitbit.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsFitbit.Builder.class) -public final class ConnectionOptionsFitbit implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsFitbit( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsFitbit && equalTo((ConnectionOptionsFitbit) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsFitbit other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsFitbit other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsFitbit build() { - return new ConnectionOptionsFitbit( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsFlickr.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsFlickr.java deleted file mode 100644 index b30caa662..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsFlickr.java +++ /dev/null @@ -1,266 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsFlickr.Builder.class) -public final class ConnectionOptionsFlickr implements IConnectionOptionsOAuth1Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsFlickr( - Optional clientId, - Optional clientSecret, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - /** - * @return OAuth 1.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. - */ - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - /** - * @return OAuth 1.0 client secret issued by the identity provider during application registration. Used to authenticate your Auth0 connection when signing requests and exchanging request tokens and verifiers for access tokens. May be null for public clients. - */ - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsFlickr && equalTo((ConnectionOptionsFlickr) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsFlickr other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsFlickr other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - /** - *

OAuth 1.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

- */ - @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; - } - - /** - *

OAuth 1.0 client secret issued by the identity provider during application registration. Used to authenticate your Auth0 connection when signing requests and exchanging request tokens and verifiers for access tokens. May be null for public clients.

- */ - @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 = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsFlickr build() { - return new ConnectionOptionsFlickr( - clientId, - clientSecret, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGitHub.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGitHub.java deleted file mode 100644 index 53a18344e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGitHub.java +++ /dev/null @@ -1,942 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsGitHub.Builder.class) -public final class ConnectionOptionsGitHub implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional> freeformScopes; - - private final Optional> scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional adminOrg; - - private final Optional adminPublicKey; - - private final Optional adminRepoHook; - - private final Optional deleteRepo; - - private final Optional email; - - private final Optional follow; - - private final Optional gist; - - private final Optional notifications; - - private final Optional profile; - - private final Optional publicRepo; - - private final Optional readOrg; - - private final Optional readPublicKey; - - private final Optional readRepoHook; - - private final Optional readUser; - - private final Optional repo; - - private final Optional repoDeployment; - - private final Optional repoStatus; - - private final Optional writeOrg; - - private final Optional writePublicKey; - - private final Optional writeRepoHook; - - private final Map additionalProperties; - - private ConnectionOptionsGitHub( - Optional> nonPersistentAttrs, - Optional clientId, - Optional clientSecret, - Optional> freeformScopes, - Optional> scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional adminOrg, - Optional adminPublicKey, - Optional adminRepoHook, - Optional deleteRepo, - Optional email, - Optional follow, - Optional gist, - Optional notifications, - Optional profile, - Optional publicRepo, - Optional readOrg, - Optional readPublicKey, - Optional readRepoHook, - Optional readUser, - Optional repo, - Optional repoDeployment, - Optional repoStatus, - Optional writeOrg, - Optional writePublicKey, - Optional writeRepoHook, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.freeformScopes = freeformScopes; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.adminOrg = adminOrg; - this.adminPublicKey = adminPublicKey; - this.adminRepoHook = adminRepoHook; - this.deleteRepo = deleteRepo; - this.email = email; - this.follow = follow; - this.gist = gist; - this.notifications = notifications; - this.profile = profile; - this.publicRepo = publicRepo; - this.readOrg = readOrg; - this.readPublicKey = readPublicKey; - this.readRepoHook = readRepoHook; - this.readUser = readUser; - this.repo = repo; - this.repoDeployment = repoDeployment; - this.repoStatus = repoStatus; - this.writeOrg = writeOrg; - this.writePublicKey = writePublicKey; - this.writeRepoHook = writeRepoHook; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("freeform_scopes") - public Optional> getFreeformScopes() { - return freeformScopes; - } - - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - /** - * @return Requests the GitHub admin:org scope so Auth0 can fully manage organizations, teams, and memberships on behalf of the user. - */ - @JsonProperty("admin_org") - public Optional getAdminOrg() { - return adminOrg; - } - - /** - * @return Requests the admin:public_key scope to allow creating, updating, and deleting the user's SSH public keys. - */ - @JsonProperty("admin_public_key") - public Optional getAdminPublicKey() { - return adminPublicKey; - } - - /** - * @return Requests the admin:repo_hook scope so Auth0 can read, write, ping, and delete repository webhooks. - */ - @JsonProperty("admin_repo_hook") - public Optional getAdminRepoHook() { - return adminRepoHook; - } - - /** - * @return Requests the delete_repo scope so the user can remove repositories they administer while signing in through Auth0. - */ - @JsonProperty("delete_repo") - public Optional getDeleteRepo() { - return deleteRepo; - } - - /** - * @return Requests the user:email scope so Auth0 pulls addresses from GitHub's /user/emails endpoint and populates the profile. - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - /** - * @return Requests the user:follow scope to allow following or unfollowing GitHub users for the signed-in account. - */ - @JsonProperty("follow") - public Optional getFollow() { - return follow; - } - - /** - * @return Requests the gist scope so the application can create or update gists on behalf of the user. - */ - @JsonProperty("gist") - public Optional getGist() { - return gist; - } - - /** - * @return Requests the notifications scope to read GitHub inbox notifications; repo also implicitly grants this access. - */ - @JsonProperty("notifications") - public Optional getNotifications() { - return notifications; - } - - /** - * @return Controls the GitHub read:user call that returns the user's basic profile (name, avatar, profile URL) and is on by default for successful logins. - */ - @JsonProperty("profile") - public Optional getProfile() { - return profile; - } - - /** - * @return Requests the public_repo scope for read and write operations on public repositories, deployments, and statuses. - */ - @JsonProperty("public_repo") - public Optional getPublicRepo() { - return publicRepo; - } - - /** - * @return Requests the read:org scope so Auth0 can view organizations, teams, and membership lists without making changes. - */ - @JsonProperty("read_org") - public Optional getReadOrg() { - return readOrg; - } - - /** - * @return Requests the read:public_key scope so Auth0 can list and inspect the user's SSH public keys. - */ - @JsonProperty("read_public_key") - public Optional getReadPublicKey() { - return readPublicKey; - } - - /** - * @return Requests the read:repo_hook scope to read and ping repository webhooks. - */ - @JsonProperty("read_repo_hook") - public Optional getReadRepoHook() { - return readRepoHook; - } - - /** - * @return Requests the read:user scope to load extended profile information, implicitly covering user:email and user:follow. - */ - @JsonProperty("read_user") - public Optional getReadUser() { - return readUser; - } - - /** - * @return Requests the repo scope for read and write access to both public and private repositories, deployments, and statuses. - */ - @JsonProperty("repo") - public Optional getRepo() { - return repo; - } - - /** - * @return Requests the repo_deployment scope in order to read and write deployment statuses for repositories. - */ - @JsonProperty("repo_deployment") - public Optional getRepoDeployment() { - return repoDeployment; - } - - /** - * @return Requests the repo:status scope to manage commit statuses on public and private repositories. - */ - @JsonProperty("repo_status") - public Optional getRepoStatus() { - return repoStatus; - } - - /** - * @return Requests the write:org scope so Auth0 can change whether organization memberships are publicized. - */ - @JsonProperty("write_org") - public Optional getWriteOrg() { - return writeOrg; - } - - /** - * @return Requests the write:public_key scope to create or update SSH public keys for the user. - */ - @JsonProperty("write_public_key") - public Optional getWritePublicKey() { - return writePublicKey; - } - - /** - * @return Requests the write:repo_hook scope so Auth0 can read, create, update, and ping repository webhooks. - */ - @JsonProperty("write_repo_hook") - public Optional getWriteRepoHook() { - return writeRepoHook; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsGitHub && equalTo((ConnectionOptionsGitHub) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsGitHub other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && freeformScopes.equals(other.freeformScopes) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && adminOrg.equals(other.adminOrg) - && adminPublicKey.equals(other.adminPublicKey) - && adminRepoHook.equals(other.adminRepoHook) - && deleteRepo.equals(other.deleteRepo) - && email.equals(other.email) - && follow.equals(other.follow) - && gist.equals(other.gist) - && notifications.equals(other.notifications) - && profile.equals(other.profile) - && publicRepo.equals(other.publicRepo) - && readOrg.equals(other.readOrg) - && readPublicKey.equals(other.readPublicKey) - && readRepoHook.equals(other.readRepoHook) - && readUser.equals(other.readUser) - && repo.equals(other.repo) - && repoDeployment.equals(other.repoDeployment) - && repoStatus.equals(other.repoStatus) - && writeOrg.equals(other.writeOrg) - && writePublicKey.equals(other.writePublicKey) - && writeRepoHook.equals(other.writeRepoHook); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.nonPersistentAttrs, - this.clientId, - this.clientSecret, - this.freeformScopes, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.adminOrg, - this.adminPublicKey, - this.adminRepoHook, - this.deleteRepo, - this.email, - this.follow, - this.gist, - this.notifications, - this.profile, - this.publicRepo, - this.readOrg, - this.readPublicKey, - this.readRepoHook, - this.readUser, - this.repo, - this.repoDeployment, - this.repoStatus, - this.writeOrg, - this.writePublicKey, - this.writeRepoHook); - } - - @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> nonPersistentAttrs = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional> freeformScopes = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional adminOrg = Optional.empty(); - - private Optional adminPublicKey = Optional.empty(); - - private Optional adminRepoHook = Optional.empty(); - - private Optional deleteRepo = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional follow = Optional.empty(); - - private Optional gist = Optional.empty(); - - private Optional notifications = Optional.empty(); - - private Optional profile = Optional.empty(); - - private Optional publicRepo = Optional.empty(); - - private Optional readOrg = Optional.empty(); - - private Optional readPublicKey = Optional.empty(); - - private Optional readRepoHook = Optional.empty(); - - private Optional readUser = Optional.empty(); - - private Optional repo = Optional.empty(); - - private Optional repoDeployment = Optional.empty(); - - private Optional repoStatus = Optional.empty(); - - private Optional writeOrg = Optional.empty(); - - private Optional writePublicKey = Optional.empty(); - - private Optional writeRepoHook = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsGitHub other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - freeformScopes(other.getFreeformScopes()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - adminOrg(other.getAdminOrg()); - adminPublicKey(other.getAdminPublicKey()); - adminRepoHook(other.getAdminRepoHook()); - deleteRepo(other.getDeleteRepo()); - email(other.getEmail()); - follow(other.getFollow()); - gist(other.getGist()); - notifications(other.getNotifications()); - profile(other.getProfile()); - publicRepo(other.getPublicRepo()); - readOrg(other.getReadOrg()); - readPublicKey(other.getReadPublicKey()); - readRepoHook(other.getReadRepoHook()); - readUser(other.getReadUser()); - repo(other.getRepo()); - repoDeployment(other.getRepoDeployment()); - repoStatus(other.getRepoStatus()); - writeOrg(other.getWriteOrg()); - writePublicKey(other.getWritePublicKey()); - writeRepoHook(other.getWriteRepoHook()); - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @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 = "freeform_scopes", nulls = Nulls.SKIP) - public Builder freeformScopes(Optional> freeformScopes) { - this.freeformScopes = freeformScopes; - return this; - } - - public Builder freeformScopes(List freeformScopes) { - this.freeformScopes = Optional.ofNullable(freeformScopes); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - /** - *

Requests the GitHub admin:org scope so Auth0 can fully manage organizations, teams, and memberships on behalf of the user.

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

Requests the admin:public_key scope to allow creating, updating, and deleting the user's SSH public keys.

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

Requests the admin:repo_hook scope so Auth0 can read, write, ping, and delete repository webhooks.

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

Requests the delete_repo scope so the user can remove repositories they administer while signing in through Auth0.

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

Requests the user:email scope so Auth0 pulls addresses from GitHub's /user/emails endpoint and populates the profile.

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

Requests the user:follow scope to allow following or unfollowing GitHub users for the signed-in account.

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

Requests the gist scope so the application can create or update gists on behalf of the user.

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

Requests the notifications scope to read GitHub inbox notifications; repo also implicitly grants this access.

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

Controls the GitHub read:user call that returns the user's basic profile (name, avatar, profile URL) and is on by default for successful logins.

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

Requests the public_repo scope for read and write operations on public repositories, deployments, and statuses.

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

Requests the read:org scope so Auth0 can view organizations, teams, and membership lists without making changes.

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

Requests the read:public_key scope so Auth0 can list and inspect the user's SSH public keys.

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

Requests the read:repo_hook scope to read and ping repository webhooks.

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

Requests the read:user scope to load extended profile information, implicitly covering user:email and user:follow.

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

Requests the repo scope for read and write access to both public and private repositories, deployments, and statuses.

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

Requests the repo_deployment scope in order to read and write deployment statuses for repositories.

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

Requests the repo:status scope to manage commit statuses on public and private repositories.

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

Requests the write:org scope so Auth0 can change whether organization memberships are publicized.

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

Requests the write:public_key scope to create or update SSH public keys for the user.

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

Requests the write:repo_hook scope so Auth0 can read, create, update, and ping repository webhooks.

- */ - @JsonSetter(value = "write_repo_hook", nulls = Nulls.SKIP) - public Builder writeRepoHook(Optional writeRepoHook) { - this.writeRepoHook = writeRepoHook; - return this; - } - - public Builder writeRepoHook(Boolean writeRepoHook) { - this.writeRepoHook = Optional.ofNullable(writeRepoHook); - return this; - } - - public ConnectionOptionsGitHub build() { - return new ConnectionOptionsGitHub( - nonPersistentAttrs, - clientId, - clientSecret, - freeformScopes, - scope, - setUserRootAttributes, - upstreamParams, - adminOrg, - adminPublicKey, - adminRepoHook, - deleteRepo, - email, - follow, - gist, - notifications, - profile, - publicRepo, - readOrg, - readPublicKey, - readRepoHook, - readUser, - repo, - repoDeployment, - repoStatus, - writeOrg, - writePublicKey, - writeRepoHook, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGoogleApps.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGoogleApps.java deleted file mode 100644 index eada7fef5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGoogleApps.java +++ /dev/null @@ -1,1052 +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.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 = ConnectionOptionsGoogleApps.Builder.class) -public final class ConnectionOptionsGoogleApps implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional adminAccessToken; - - private final Optional adminAccessTokenExpiresin; - - private final Optional adminRefreshToken; - - private final Optional allowSettingLoginScopes; - - private final Optional apiEnableUsers; - - private final String clientId; - - private final Optional clientSecret; - - 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 OptionalNullable federatedConnectionsAccessTokens; - - private final Optional handleLoginFromSocial; - - private final Optional iconUrl; - - private final Optional mapUserIdToId; - - private final Optional profile; - - private final Optional> scope; - - private final Optional setUserRootAttributes; - - private final Optional tenantDomain; - - private final OptionalNullable>> - upstreamParams; - - private final Map additionalProperties; - - private ConnectionOptionsGoogleApps( - Optional> nonPersistentAttrs, - Optional adminAccessToken, - Optional adminAccessTokenExpiresin, - Optional adminRefreshToken, - Optional allowSettingLoginScopes, - Optional apiEnableUsers, - String clientId, - Optional clientSecret, - Optional domain, - Optional> domainAliases, - Optional email, - Optional extAgreedTerms, - Optional extGroups, - Optional extGroupsExtended, - Optional extIsAdmin, - Optional extIsSuspended, - OptionalNullable federatedConnectionsAccessTokens, - Optional handleLoginFromSocial, - Optional iconUrl, - Optional mapUserIdToId, - Optional profile, - Optional> scope, - Optional setUserRootAttributes, - Optional tenantDomain, - OptionalNullable>> upstreamParams, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.adminAccessToken = adminAccessToken; - this.adminAccessTokenExpiresin = adminAccessTokenExpiresin; - this.adminRefreshToken = adminRefreshToken; - this.allowSettingLoginScopes = allowSettingLoginScopes; - this.apiEnableUsers = apiEnableUsers; - this.clientId = clientId; - this.clientSecret = clientSecret; - 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.profile = profile; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.tenantDomain = tenantDomain; - this.upstreamParams = upstreamParams; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("admin_access_token") - public Optional getAdminAccessToken() { - return adminAccessToken; - } - - @JsonProperty("admin_access_token_expiresin") - public Optional getAdminAccessTokenExpiresin() { - return adminAccessTokenExpiresin; - } - - @JsonProperty("admin_refresh_token") - public Optional getAdminRefreshToken() { - return adminRefreshToken; - } - - /** - * @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; - } - - @JsonProperty("api_enable_users") - public Optional getApiEnableUsers() { - return apiEnableUsers; - } - - @JsonProperty("client_id") - public String getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("domain") - public Optional getDomain() { - return domain; - } - - @JsonProperty("domain_aliases") - public Optional> getDomainAliases() { - return domainAliases; - } - - /** - * @return Whether the OAuth flow requests the email scope. - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - @JsonProperty("ext_agreed_terms") - public Optional getExtAgreedTerms() { - return extAgreedTerms; - } - - @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; - } - - @JsonProperty("ext_is_admin") - public Optional getExtIsAdmin() { - return extIsAdmin; - } - - @JsonProperty("ext_is_suspended") - 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; - } - - @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 Whether the OAuth flow requests the profile scope. - */ - @JsonProperty("profile") - public Optional getProfile() { - return profile; - } - - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonProperty("tenant_domain") - public Optional getTenantDomain() { - return tenantDomain; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @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>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsGoogleApps && equalTo((ConnectionOptionsGoogleApps) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsGoogleApps other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && adminAccessToken.equals(other.adminAccessToken) - && adminAccessTokenExpiresin.equals(other.adminAccessTokenExpiresin) - && adminRefreshToken.equals(other.adminRefreshToken) - && allowSettingLoginScopes.equals(other.allowSettingLoginScopes) - && apiEnableUsers.equals(other.apiEnableUsers) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && 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) - && 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.nonPersistentAttrs, - this.adminAccessToken, - this.adminAccessTokenExpiresin, - this.adminRefreshToken, - this.allowSettingLoginScopes, - this.apiEnableUsers, - this.clientId, - this.clientSecret, - 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.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 { - _FinalStage clientId(@NotNull String clientId); - - Builder from(ConnectionOptionsGoogleApps other); - } - - public interface _FinalStage { - ConnectionOptionsGoogleApps build(); - - _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); - - _FinalStage nonPersistentAttrs(List nonPersistentAttrs); - - _FinalStage adminAccessToken(Optional adminAccessToken); - - _FinalStage adminAccessToken(String adminAccessToken); - - _FinalStage adminAccessTokenExpiresin(Optional adminAccessTokenExpiresin); - - _FinalStage adminAccessTokenExpiresin(OffsetDateTime adminAccessTokenExpiresin); - - _FinalStage adminRefreshToken(Optional adminRefreshToken); - - _FinalStage adminRefreshToken(String adminRefreshToken); - - /** - *

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); - - _FinalStage apiEnableUsers(Optional apiEnableUsers); - - _FinalStage apiEnableUsers(Boolean apiEnableUsers); - - _FinalStage clientSecret(Optional clientSecret); - - _FinalStage clientSecret(String clientSecret); - - _FinalStage domain(Optional domain); - - _FinalStage domain(String domain); - - _FinalStage domainAliases(Optional> domainAliases); - - _FinalStage domainAliases(List domainAliases); - - /** - *

Whether the OAuth flow requests the email scope.

- */ - _FinalStage email(Optional email); - - _FinalStage email(Boolean email); - - _FinalStage extAgreedTerms(Optional extAgreedTerms); - - _FinalStage extAgreedTerms(Boolean extAgreedTerms); - - _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); - - _FinalStage extIsAdmin(Optional extIsAdmin); - - _FinalStage extIsAdmin(Boolean extIsAdmin); - - _FinalStage extIsSuspended(Optional extIsSuspended); - - _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); - - _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); - - /** - *

Whether the OAuth flow requests the profile scope.

- */ - _FinalStage profile(Optional profile); - - _FinalStage profile(Boolean profile); - - _FinalStage scope(Optional> scope); - - _FinalStage scope(List scope); - - _FinalStage setUserRootAttributes(Optional setUserRootAttributes); - - _FinalStage setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes); - - _FinalStage tenantDomain(Optional tenantDomain); - - _FinalStage tenantDomain(String tenantDomain); - - _FinalStage upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams); - - _FinalStage upstreamParams( - Map> upstreamParams); - - _FinalStage upstreamParams( - Optional>> upstreamParams); - - _FinalStage upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ClientIdStage, _FinalStage { - private String clientId; - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional tenantDomain = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional profile = Optional.empty(); - - private Optional mapUserIdToId = Optional.empty(); - - private Optional iconUrl = Optional.empty(); - - private Optional handleLoginFromSocial = Optional.empty(); - - private OptionalNullable federatedConnectionsAccessTokens = - OptionalNullable.absent(); - - 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 clientSecret = Optional.empty(); - - private Optional apiEnableUsers = Optional.empty(); - - private Optional allowSettingLoginScopes = Optional.empty(); - - private Optional adminRefreshToken = Optional.empty(); - - private Optional adminAccessTokenExpiresin = Optional.empty(); - - private Optional adminAccessToken = Optional.empty(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionOptionsGoogleApps other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - adminAccessToken(other.getAdminAccessToken()); - adminAccessTokenExpiresin(other.getAdminAccessTokenExpiresin()); - adminRefreshToken(other.getAdminRefreshToken()); - allowSettingLoginScopes(other.getAllowSettingLoginScopes()); - apiEnableUsers(other.getApiEnableUsers()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - 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()); - profile(other.getProfile()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - tenantDomain(other.getTenantDomain()); - upstreamParams(other.getUpstreamParams()); - 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 _FinalStage upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - @java.lang.Override - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public _FinalStage upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - 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 setUserRootAttributes(ConnectionSetUserRootAttributesEnum 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 scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @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; - } - - /** - *

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; - } - - @java.lang.Override - public _FinalStage iconUrl(String iconUrl) { - this.iconUrl = Optional.ofNullable(iconUrl); - return this; - } - - @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 handleLoginFromSocial(Boolean handleLoginFromSocial) { - this.handleLoginFromSocial = Optional.ofNullable(handleLoginFromSocial); - return this; - } - - @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( - 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); - return this; - } - - @java.lang.Override - @JsonSetter(value = "ext_is_suspended", nulls = Nulls.SKIP) - public _FinalStage extIsSuspended(Optional extIsSuspended) { - this.extIsSuspended = extIsSuspended; - return this; - } - - @java.lang.Override - public _FinalStage extIsAdmin(Boolean extIsAdmin) { - this.extIsAdmin = Optional.ofNullable(extIsAdmin); - return this; - } - - @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; - } - - @java.lang.Override - public _FinalStage extGroups(Boolean extGroups) { - this.extGroups = Optional.ofNullable(extGroups); - return this; - } - - @java.lang.Override - @JsonSetter(value = "ext_groups", nulls = Nulls.SKIP) - public _FinalStage extGroups(Optional extGroups) { - this.extGroups = extGroups; - return this; - } - - @java.lang.Override - public _FinalStage extAgreedTerms(Boolean extAgreedTerms) { - this.extAgreedTerms = Optional.ofNullable(extAgreedTerms); - return this; - } - - @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; - } - - @java.lang.Override - public _FinalStage domainAliases(List domainAliases) { - this.domainAliases = Optional.ofNullable(domainAliases); - return this; - } - - @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 domain(String domain) { - this.domain = Optional.ofNullable(domain); - return this; - } - - @java.lang.Override - @JsonSetter(value = "domain", nulls = Nulls.SKIP) - public _FinalStage domain(Optional domain) { - this.domain = domain; - return this; - } - - @java.lang.Override - public _FinalStage clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @java.lang.Override - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public _FinalStage clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - @java.lang.Override - public _FinalStage apiEnableUsers(Boolean apiEnableUsers) { - this.apiEnableUsers = Optional.ofNullable(apiEnableUsers); - return this; - } - - @java.lang.Override - @JsonSetter(value = "api_enable_users", nulls = Nulls.SKIP) - public _FinalStage apiEnableUsers(Optional apiEnableUsers) { - this.apiEnableUsers = apiEnableUsers; - 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; - } - - @java.lang.Override - public _FinalStage adminRefreshToken(String adminRefreshToken) { - this.adminRefreshToken = Optional.ofNullable(adminRefreshToken); - return this; - } - - @java.lang.Override - @JsonSetter(value = "admin_refresh_token", nulls = Nulls.SKIP) - public _FinalStage adminRefreshToken(Optional adminRefreshToken) { - this.adminRefreshToken = adminRefreshToken; - return this; - } - - @java.lang.Override - public _FinalStage adminAccessTokenExpiresin(OffsetDateTime adminAccessTokenExpiresin) { - this.adminAccessTokenExpiresin = Optional.ofNullable(adminAccessTokenExpiresin); - return this; - } - - @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 _FinalStage adminAccessToken(String adminAccessToken) { - this.adminAccessToken = Optional.ofNullable(adminAccessToken); - return this; - } - - @java.lang.Override - @JsonSetter(value = "admin_access_token", nulls = Nulls.SKIP) - public _FinalStage adminAccessToken(Optional adminAccessToken) { - this.adminAccessToken = adminAccessToken; - return this; - } - - @java.lang.Override - public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @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 ConnectionOptionsGoogleApps build() { - return new ConnectionOptionsGoogleApps( - nonPersistentAttrs, - adminAccessToken, - adminAccessTokenExpiresin, - adminRefreshToken, - allowSettingLoginScopes, - apiEnableUsers, - clientId, - clientSecret, - domain, - domainAliases, - email, - extAgreedTerms, - extGroups, - extGroupsExtended, - extIsAdmin, - extIsSuspended, - federatedConnectionsAccessTokens, - handleLoginFromSocial, - iconUrl, - mapUserIdToId, - profile, - scope, - setUserRootAttributes, - tenantDomain, - upstreamParams, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGoogleOAuth2.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGoogleOAuth2.java deleted file mode 100644 index ed9c68116..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGoogleOAuth2.java +++ /dev/null @@ -1,2434 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsGoogleOAuth2.Builder.class) -public final class ConnectionOptionsGoogleOAuth2 implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional> allowedAudiences; - - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional> freeformScopes; - - private final Optional iconUrl; - - private final Optional> scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional adsenseManagement; - - private final Optional analytics; - - private final Optional blogger; - - private final Optional calendar; - - private final Optional calendarAddonsExecute; - - private final Optional calendarEvents; - - private final Optional calendarEventsReadonly; - - private final Optional calendarSettingsReadonly; - - private final Optional chromeWebStore; - - private final Optional contacts; - - private final Optional contactsNew; - - private final Optional contactsOtherReadonly; - - private final Optional contactsReadonly; - - private final Optional contentApiForShopping; - - private final Optional coordinate; - - private final Optional coordinateReadonly; - - private final Optional directoryReadonly; - - private final Optional documentList; - - private final Optional drive; - - private final Optional driveActivity; - - private final Optional driveActivityReadonly; - - private final Optional driveAppdata; - - private final Optional driveAppsReadonly; - - private final Optional driveFile; - - private final Optional driveMetadata; - - private final Optional driveMetadataReadonly; - - private final Optional drivePhotosReadonly; - - private final Optional driveReadonly; - - private final Optional driveScripts; - - private final Optional email; - - private final Optional gmail; - - private final Optional gmailCompose; - - private final Optional gmailInsert; - - private final Optional gmailLabels; - - private final Optional gmailMetadata; - - private final Optional gmailModify; - - private final Optional gmailNew; - - private final Optional gmailReadonly; - - private final Optional gmailSend; - - private final Optional gmailSettingsBasic; - - private final Optional gmailSettingsSharing; - - private final Optional googleAffiliateNetwork; - - private final Optional googleBooks; - - private final Optional googleCloudStorage; - - private final Optional googleDrive; - - private final Optional googleDriveFiles; - - private final Optional googlePlus; - - private final Optional latitudeBest; - - private final Optional latitudeCity; - - private final Optional moderator; - - private final Optional offlineAccess; - - private final Optional orkut; - - private final Optional picasaWeb; - - private final Optional profile; - - private final Optional sites; - - private final Optional tasks; - - private final Optional tasksReadonly; - - private final Optional urlShortener; - - private final Optional webmasterTools; - - private final Optional youtube; - - private final Optional youtubeChannelmembershipsCreator; - - private final Optional youtubeNew; - - private final Optional youtubeReadonly; - - private final Optional youtubeUpload; - - private final Optional youtubepartner; - - private final Map additionalProperties; - - private ConnectionOptionsGoogleOAuth2( - Optional> nonPersistentAttrs, - Optional> allowedAudiences, - Optional clientId, - Optional clientSecret, - Optional> freeformScopes, - Optional iconUrl, - Optional> scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional adsenseManagement, - Optional analytics, - Optional blogger, - Optional calendar, - Optional calendarAddonsExecute, - Optional calendarEvents, - Optional calendarEventsReadonly, - Optional calendarSettingsReadonly, - Optional chromeWebStore, - Optional contacts, - Optional contactsNew, - Optional contactsOtherReadonly, - Optional contactsReadonly, - Optional contentApiForShopping, - Optional coordinate, - Optional coordinateReadonly, - Optional directoryReadonly, - Optional documentList, - Optional drive, - Optional driveActivity, - Optional driveActivityReadonly, - Optional driveAppdata, - Optional driveAppsReadonly, - Optional driveFile, - Optional driveMetadata, - Optional driveMetadataReadonly, - Optional drivePhotosReadonly, - Optional driveReadonly, - Optional driveScripts, - Optional email, - Optional gmail, - Optional gmailCompose, - Optional gmailInsert, - Optional gmailLabels, - Optional gmailMetadata, - Optional gmailModify, - Optional gmailNew, - Optional gmailReadonly, - Optional gmailSend, - Optional gmailSettingsBasic, - Optional gmailSettingsSharing, - Optional googleAffiliateNetwork, - Optional googleBooks, - Optional googleCloudStorage, - Optional googleDrive, - Optional googleDriveFiles, - Optional googlePlus, - Optional latitudeBest, - Optional latitudeCity, - Optional moderator, - Optional offlineAccess, - Optional orkut, - Optional picasaWeb, - Optional profile, - Optional sites, - Optional tasks, - Optional tasksReadonly, - Optional urlShortener, - Optional webmasterTools, - Optional youtube, - Optional youtubeChannelmembershipsCreator, - Optional youtubeNew, - Optional youtubeReadonly, - Optional youtubeUpload, - Optional youtubepartner, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.allowedAudiences = allowedAudiences; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.freeformScopes = freeformScopes; - this.iconUrl = iconUrl; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.adsenseManagement = adsenseManagement; - this.analytics = analytics; - this.blogger = blogger; - this.calendar = calendar; - this.calendarAddonsExecute = calendarAddonsExecute; - this.calendarEvents = calendarEvents; - this.calendarEventsReadonly = calendarEventsReadonly; - this.calendarSettingsReadonly = calendarSettingsReadonly; - this.chromeWebStore = chromeWebStore; - this.contacts = contacts; - this.contactsNew = contactsNew; - this.contactsOtherReadonly = contactsOtherReadonly; - this.contactsReadonly = contactsReadonly; - this.contentApiForShopping = contentApiForShopping; - this.coordinate = coordinate; - this.coordinateReadonly = coordinateReadonly; - this.directoryReadonly = directoryReadonly; - this.documentList = documentList; - this.drive = drive; - this.driveActivity = driveActivity; - this.driveActivityReadonly = driveActivityReadonly; - this.driveAppdata = driveAppdata; - this.driveAppsReadonly = driveAppsReadonly; - this.driveFile = driveFile; - this.driveMetadata = driveMetadata; - this.driveMetadataReadonly = driveMetadataReadonly; - this.drivePhotosReadonly = drivePhotosReadonly; - this.driveReadonly = driveReadonly; - this.driveScripts = driveScripts; - this.email = email; - this.gmail = gmail; - this.gmailCompose = gmailCompose; - this.gmailInsert = gmailInsert; - this.gmailLabels = gmailLabels; - this.gmailMetadata = gmailMetadata; - this.gmailModify = gmailModify; - this.gmailNew = gmailNew; - this.gmailReadonly = gmailReadonly; - this.gmailSend = gmailSend; - this.gmailSettingsBasic = gmailSettingsBasic; - this.gmailSettingsSharing = gmailSettingsSharing; - this.googleAffiliateNetwork = googleAffiliateNetwork; - this.googleBooks = googleBooks; - this.googleCloudStorage = googleCloudStorage; - this.googleDrive = googleDrive; - this.googleDriveFiles = googleDriveFiles; - this.googlePlus = googlePlus; - this.latitudeBest = latitudeBest; - this.latitudeCity = latitudeCity; - this.moderator = moderator; - this.offlineAccess = offlineAccess; - this.orkut = orkut; - this.picasaWeb = picasaWeb; - this.profile = profile; - this.sites = sites; - this.tasks = tasks; - this.tasksReadonly = tasksReadonly; - this.urlShortener = urlShortener; - this.webmasterTools = webmasterTools; - this.youtube = youtube; - this.youtubeChannelmembershipsCreator = youtubeChannelmembershipsCreator; - this.youtubeNew = youtubeNew; - this.youtubeReadonly = youtubeReadonly; - this.youtubeUpload = youtubeUpload; - this.youtubepartner = youtubepartner; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("allowed_audiences") - public Optional> getAllowedAudiences() { - return allowedAudiences; - } - - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("freeform_scopes") - public Optional> getFreeformScopes() { - return freeformScopes; - } - - @JsonProperty("icon_url") - public Optional getIconUrl() { - return iconUrl; - } - - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - /** - * @return View and manage user's ad applications, ad units, and channels in AdSense - */ - @JsonProperty("adsense_management") - public Optional getAdsenseManagement() { - return adsenseManagement; - } - - /** - * @return View user's configuration information and reports - */ - @JsonProperty("analytics") - public Optional getAnalytics() { - return analytics; - } - - /** - * @return View and manage user's posts and blogs on Blogger and Blogger comments - */ - @JsonProperty("blogger") - public Optional getBlogger() { - return blogger; - } - - /** - * @return See, edit, share, and permanently delete all the calendars you can access using Google Calendar - */ - @JsonProperty("calendar") - public Optional getCalendar() { - return calendar; - } - - /** - * @return Run as a Calendar add-on - */ - @JsonProperty("calendar_addons_execute") - public Optional getCalendarAddonsExecute() { - return calendarAddonsExecute; - } - - /** - * @return View and edit events on all your calendars - */ - @JsonProperty("calendar_events") - public Optional getCalendarEvents() { - return calendarEvents; - } - - /** - * @return View events on all your calendars - */ - @JsonProperty("calendar_events_readonly") - public Optional getCalendarEventsReadonly() { - return calendarEventsReadonly; - } - - /** - * @return View your Calendar settings - */ - @JsonProperty("calendar_settings_readonly") - public Optional getCalendarSettingsReadonly() { - return calendarSettingsReadonly; - } - - /** - * @return Read access to user's chrome web store - */ - @JsonProperty("chrome_web_store") - public Optional getChromeWebStore() { - return chromeWebStore; - } - - /** - * @return Full access to the authenticated user's contacts - */ - @JsonProperty("contacts") - public Optional getContacts() { - return contacts; - } - - /** - * @return Full access to the authenticated user's contacts - */ - @JsonProperty("contacts_new") - public Optional getContactsNew() { - return contactsNew; - } - - /** - * @return Read-only access to the authenticated user's 'Other contacts' - */ - @JsonProperty("contacts_other_readonly") - public Optional getContactsOtherReadonly() { - return contactsOtherReadonly; - } - - /** - * @return Read-only access to the authenticated user's contacts - */ - @JsonProperty("contacts_readonly") - public Optional getContactsReadonly() { - return contactsReadonly; - } - - /** - * @return View and manage user's products, feeds, and subaccounts - */ - @JsonProperty("content_api_for_shopping") - public Optional getContentApiForShopping() { - return contentApiForShopping; - } - - /** - * @return Grants read and write access to the Coordinate API - */ - @JsonProperty("coordinate") - public Optional getCoordinate() { - return coordinate; - } - - /** - * @return Grants read access to the Coordinate API - */ - @JsonProperty("coordinate_readonly") - public Optional getCoordinateReadonly() { - return coordinateReadonly; - } - - /** - * @return Read-only access to the authenticated user's corporate directory (if applicable) - */ - @JsonProperty("directory_readonly") - public Optional getDirectoryReadonly() { - return directoryReadonly; - } - - /** - * @return Access to Google Docs document list feed - */ - @JsonProperty("document_list") - public Optional getDocumentList() { - return documentList; - } - - /** - * @return Full access to all files and folders in the user's Google Drive - */ - @JsonProperty("drive") - public Optional getDrive() { - return drive; - } - - /** - * @return View and add to the activity record of files in your Drive - */ - @JsonProperty("drive_activity") - public Optional getDriveActivity() { - return driveActivity; - } - - /** - * @return View the activity record of files in your Drive - */ - @JsonProperty("drive_activity_readonly") - public Optional getDriveActivityReadonly() { - return driveActivityReadonly; - } - - /** - * @return Access to the application's configuration data in the user's Google Drive - */ - @JsonProperty("drive_appdata") - public Optional getDriveAppdata() { - return driveAppdata; - } - - /** - * @return View apps authorized to access your Drive - */ - @JsonProperty("drive_apps_readonly") - public Optional getDriveAppsReadonly() { - return driveAppsReadonly; - } - - /** - * @return Access to files created or opened by the app - */ - @JsonProperty("drive_file") - public Optional getDriveFile() { - return driveFile; - } - - /** - * @return Access to file metadata, including listing files and folders - */ - @JsonProperty("drive_metadata") - public Optional getDriveMetadata() { - return driveMetadata; - } - - /** - * @return Read-only access to file metadata - */ - @JsonProperty("drive_metadata_readonly") - public Optional getDriveMetadataReadonly() { - return driveMetadataReadonly; - } - - /** - * @return Read-only access to the user's Google Photos - */ - @JsonProperty("drive_photos_readonly") - public Optional getDrivePhotosReadonly() { - return drivePhotosReadonly; - } - - /** - * @return Read-only access to all files and folders in the user's Google Drive - */ - @JsonProperty("drive_readonly") - public Optional getDriveReadonly() { - return driveReadonly; - } - - /** - * @return Modify the behavior of Google Apps Scripts - */ - @JsonProperty("drive_scripts") - public Optional getDriveScripts() { - return driveScripts; - } - - /** - * @return Email and verified email flag - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - /** - * @return Full access to the account's mailboxes, including permanent deletion of threads and messages - */ - @JsonProperty("gmail") - public Optional getGmail() { - return gmail; - } - - /** - * @return Read all resources and their metadata—no write operations - */ - @JsonProperty("gmail_compose") - public Optional getGmailCompose() { - return gmailCompose; - } - - /** - * @return Insert and import messages only - */ - @JsonProperty("gmail_insert") - public Optional getGmailInsert() { - return gmailInsert; - } - - /** - * @return Create, read, update, and delete labels only - */ - @JsonProperty("gmail_labels") - public Optional getGmailLabels() { - return gmailLabels; - } - - /** - * @return Read resources metadata including labels, history records, and email message headers, but not the message body or attachments - */ - @JsonProperty("gmail_metadata") - public Optional getGmailMetadata() { - return gmailMetadata; - } - - /** - * @return All read/write operations except immediate, permanent deletion of threads and messages, bypassing Trash - */ - @JsonProperty("gmail_modify") - public Optional getGmailModify() { - return gmailModify; - } - - /** - * @return Full access to the account's mailboxes, including permanent deletion of threads and messages - */ - @JsonProperty("gmail_new") - public Optional getGmailNew() { - return gmailNew; - } - - /** - * @return Read all resources and their metadata—no write operations - */ - @JsonProperty("gmail_readonly") - public Optional getGmailReadonly() { - return gmailReadonly; - } - - /** - * @return Send messages only. No read or modify privileges on mailbox - */ - @JsonProperty("gmail_send") - public Optional getGmailSend() { - return gmailSend; - } - - /** - * @return Manage basic mail settings - */ - @JsonProperty("gmail_settings_basic") - public Optional getGmailSettingsBasic() { - return gmailSettingsBasic; - } - - /** - * @return Manage sensitive mail settings, including forwarding rules and aliases. Note: Operations guarded by this scope are restricted to administrative use only - */ - @JsonProperty("gmail_settings_sharing") - public Optional getGmailSettingsSharing() { - return gmailSettingsSharing; - } - - /** - * @return View and manage user's publisher data in the Google Affiliate Network - */ - @JsonProperty("google_affiliate_network") - public Optional getGoogleAffiliateNetwork() { - return googleAffiliateNetwork; - } - - /** - * @return View and manage user's books and library in Google Books - */ - @JsonProperty("google_books") - public Optional getGoogleBooks() { - return googleBooks; - } - - /** - * @return View and manage user's data stored in Google Cloud Storage - */ - @JsonProperty("google_cloud_storage") - public Optional getGoogleCloudStorage() { - return googleCloudStorage; - } - - /** - * @return Full access to all files and folders in the user's Google Drive - */ - @JsonProperty("google_drive") - public Optional getGoogleDrive() { - return googleDrive; - } - - /** - * @return Access to files created or opened by the app - */ - @JsonProperty("google_drive_files") - public Optional getGoogleDriveFiles() { - return googleDriveFiles; - } - - /** - * @return Associate user with its public Google profile - */ - @JsonProperty("google_plus") - public Optional getGooglePlus() { - return googlePlus; - } - - /** - * @return View and manage user's best-available current location and location history in Google Latitude - */ - @JsonProperty("latitude_best") - public Optional getLatitudeBest() { - return latitudeBest; - } - - /** - * @return View and manage user's city-level current location and location history in Google Latitude - */ - @JsonProperty("latitude_city") - public Optional getLatitudeCity() { - return latitudeCity; - } - - /** - * @return View and manage user's votes, topics, and submissions - */ - @JsonProperty("moderator") - public Optional getModerator() { - return moderator; - } - - /** - * @return Request a refresh token when the user authorizes your application - */ - @JsonProperty("offline_access") - public Optional getOfflineAccess() { - return offlineAccess; - } - - /** - * @return View and manage user's friends, applications and profile and status - */ - @JsonProperty("orkut") - public Optional getOrkut() { - return orkut; - } - - /** - * @return View and manage user's Google photos, videos, photo and video tags and comments - */ - @JsonProperty("picasa_web") - public Optional getPicasaWeb() { - return picasaWeb; - } - - /** - * @return Name, public profile URL, photo, country, language, and timezone - */ - @JsonProperty("profile") - public Optional getProfile() { - return profile; - } - - /** - * @return View and manage user's sites on Google Sites - */ - @JsonProperty("sites") - public Optional getSites() { - return sites; - } - - /** - * @return Full access to create, edit, organize, and delete all your tasks - */ - @JsonProperty("tasks") - public Optional getTasks() { - return tasks; - } - - /** - * @return Read-only access to view your tasks and task lists - */ - @JsonProperty("tasks_readonly") - public Optional getTasksReadonly() { - return tasksReadonly; - } - - /** - * @return View, manage and view statistics user's short URLs - */ - @JsonProperty("url_shortener") - public Optional getUrlShortener() { - return urlShortener; - } - - /** - * @return View and manage user's sites and messages, view keywords - */ - @JsonProperty("webmaster_tools") - public Optional getWebmasterTools() { - return webmasterTools; - } - - /** - * @return Manage your YouTube account - */ - @JsonProperty("youtube") - public Optional getYoutube() { - return youtube; - } - - /** - * @return See a list of your current active channel members, their current level, and when they became a member - */ - @JsonProperty("youtube_channelmemberships_creator") - public Optional getYoutubeChannelmembershipsCreator() { - return youtubeChannelmembershipsCreator; - } - - /** - * @return Manage your YouTube account - */ - @JsonProperty("youtube_new") - public Optional getYoutubeNew() { - return youtubeNew; - } - - /** - * @return View your YouTube account - */ - @JsonProperty("youtube_readonly") - public Optional getYoutubeReadonly() { - return youtubeReadonly; - } - - /** - * @return Manage your YouTube videos - */ - @JsonProperty("youtube_upload") - public Optional getYoutubeUpload() { - return youtubeUpload; - } - - /** - * @return View and manage your assets and associated content on YouTube - */ - @JsonProperty("youtubepartner") - public Optional getYoutubepartner() { - return youtubepartner; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsGoogleOAuth2 && equalTo((ConnectionOptionsGoogleOAuth2) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsGoogleOAuth2 other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && allowedAudiences.equals(other.allowedAudiences) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && freeformScopes.equals(other.freeformScopes) - && iconUrl.equals(other.iconUrl) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && adsenseManagement.equals(other.adsenseManagement) - && analytics.equals(other.analytics) - && blogger.equals(other.blogger) - && calendar.equals(other.calendar) - && calendarAddonsExecute.equals(other.calendarAddonsExecute) - && calendarEvents.equals(other.calendarEvents) - && calendarEventsReadonly.equals(other.calendarEventsReadonly) - && calendarSettingsReadonly.equals(other.calendarSettingsReadonly) - && chromeWebStore.equals(other.chromeWebStore) - && contacts.equals(other.contacts) - && contactsNew.equals(other.contactsNew) - && contactsOtherReadonly.equals(other.contactsOtherReadonly) - && contactsReadonly.equals(other.contactsReadonly) - && contentApiForShopping.equals(other.contentApiForShopping) - && coordinate.equals(other.coordinate) - && coordinateReadonly.equals(other.coordinateReadonly) - && directoryReadonly.equals(other.directoryReadonly) - && documentList.equals(other.documentList) - && drive.equals(other.drive) - && driveActivity.equals(other.driveActivity) - && driveActivityReadonly.equals(other.driveActivityReadonly) - && driveAppdata.equals(other.driveAppdata) - && driveAppsReadonly.equals(other.driveAppsReadonly) - && driveFile.equals(other.driveFile) - && driveMetadata.equals(other.driveMetadata) - && driveMetadataReadonly.equals(other.driveMetadataReadonly) - && drivePhotosReadonly.equals(other.drivePhotosReadonly) - && driveReadonly.equals(other.driveReadonly) - && driveScripts.equals(other.driveScripts) - && email.equals(other.email) - && gmail.equals(other.gmail) - && gmailCompose.equals(other.gmailCompose) - && gmailInsert.equals(other.gmailInsert) - && gmailLabels.equals(other.gmailLabels) - && gmailMetadata.equals(other.gmailMetadata) - && gmailModify.equals(other.gmailModify) - && gmailNew.equals(other.gmailNew) - && gmailReadonly.equals(other.gmailReadonly) - && gmailSend.equals(other.gmailSend) - && gmailSettingsBasic.equals(other.gmailSettingsBasic) - && gmailSettingsSharing.equals(other.gmailSettingsSharing) - && googleAffiliateNetwork.equals(other.googleAffiliateNetwork) - && googleBooks.equals(other.googleBooks) - && googleCloudStorage.equals(other.googleCloudStorage) - && googleDrive.equals(other.googleDrive) - && googleDriveFiles.equals(other.googleDriveFiles) - && googlePlus.equals(other.googlePlus) - && latitudeBest.equals(other.latitudeBest) - && latitudeCity.equals(other.latitudeCity) - && moderator.equals(other.moderator) - && offlineAccess.equals(other.offlineAccess) - && orkut.equals(other.orkut) - && picasaWeb.equals(other.picasaWeb) - && profile.equals(other.profile) - && sites.equals(other.sites) - && tasks.equals(other.tasks) - && tasksReadonly.equals(other.tasksReadonly) - && urlShortener.equals(other.urlShortener) - && webmasterTools.equals(other.webmasterTools) - && youtube.equals(other.youtube) - && youtubeChannelmembershipsCreator.equals(other.youtubeChannelmembershipsCreator) - && youtubeNew.equals(other.youtubeNew) - && youtubeReadonly.equals(other.youtubeReadonly) - && youtubeUpload.equals(other.youtubeUpload) - && youtubepartner.equals(other.youtubepartner); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.nonPersistentAttrs, - this.allowedAudiences, - this.clientId, - this.clientSecret, - this.freeformScopes, - this.iconUrl, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.adsenseManagement, - this.analytics, - this.blogger, - this.calendar, - this.calendarAddonsExecute, - this.calendarEvents, - this.calendarEventsReadonly, - this.calendarSettingsReadonly, - this.chromeWebStore, - this.contacts, - this.contactsNew, - this.contactsOtherReadonly, - this.contactsReadonly, - this.contentApiForShopping, - this.coordinate, - this.coordinateReadonly, - this.directoryReadonly, - this.documentList, - this.drive, - this.driveActivity, - this.driveActivityReadonly, - this.driveAppdata, - this.driveAppsReadonly, - this.driveFile, - this.driveMetadata, - this.driveMetadataReadonly, - this.drivePhotosReadonly, - this.driveReadonly, - this.driveScripts, - this.email, - this.gmail, - this.gmailCompose, - this.gmailInsert, - this.gmailLabels, - this.gmailMetadata, - this.gmailModify, - this.gmailNew, - this.gmailReadonly, - this.gmailSend, - this.gmailSettingsBasic, - this.gmailSettingsSharing, - this.googleAffiliateNetwork, - this.googleBooks, - this.googleCloudStorage, - this.googleDrive, - this.googleDriveFiles, - this.googlePlus, - this.latitudeBest, - this.latitudeCity, - this.moderator, - this.offlineAccess, - this.orkut, - this.picasaWeb, - this.profile, - this.sites, - this.tasks, - this.tasksReadonly, - this.urlShortener, - this.webmasterTools, - this.youtube, - this.youtubeChannelmembershipsCreator, - this.youtubeNew, - this.youtubeReadonly, - this.youtubeUpload, - this.youtubepartner); - } - - @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> nonPersistentAttrs = Optional.empty(); - - private Optional> allowedAudiences = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional> freeformScopes = Optional.empty(); - - private Optional iconUrl = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional adsenseManagement = Optional.empty(); - - private Optional analytics = Optional.empty(); - - private Optional blogger = Optional.empty(); - - private Optional calendar = Optional.empty(); - - private Optional calendarAddonsExecute = Optional.empty(); - - private Optional calendarEvents = Optional.empty(); - - private Optional calendarEventsReadonly = Optional.empty(); - - private Optional calendarSettingsReadonly = Optional.empty(); - - private Optional chromeWebStore = Optional.empty(); - - private Optional contacts = Optional.empty(); - - private Optional contactsNew = Optional.empty(); - - private Optional contactsOtherReadonly = Optional.empty(); - - private Optional contactsReadonly = Optional.empty(); - - private Optional contentApiForShopping = Optional.empty(); - - private Optional coordinate = Optional.empty(); - - private Optional coordinateReadonly = Optional.empty(); - - private Optional directoryReadonly = Optional.empty(); - - private Optional documentList = Optional.empty(); - - private Optional drive = Optional.empty(); - - private Optional driveActivity = Optional.empty(); - - private Optional driveActivityReadonly = Optional.empty(); - - private Optional driveAppdata = Optional.empty(); - - private Optional driveAppsReadonly = Optional.empty(); - - private Optional driveFile = Optional.empty(); - - private Optional driveMetadata = Optional.empty(); - - private Optional driveMetadataReadonly = Optional.empty(); - - private Optional drivePhotosReadonly = Optional.empty(); - - private Optional driveReadonly = Optional.empty(); - - private Optional driveScripts = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional gmail = Optional.empty(); - - private Optional gmailCompose = Optional.empty(); - - private Optional gmailInsert = Optional.empty(); - - private Optional gmailLabels = Optional.empty(); - - private Optional gmailMetadata = Optional.empty(); - - private Optional gmailModify = Optional.empty(); - - private Optional gmailNew = Optional.empty(); - - private Optional gmailReadonly = Optional.empty(); - - private Optional gmailSend = Optional.empty(); - - private Optional gmailSettingsBasic = Optional.empty(); - - private Optional gmailSettingsSharing = Optional.empty(); - - private Optional googleAffiliateNetwork = Optional.empty(); - - private Optional googleBooks = Optional.empty(); - - private Optional googleCloudStorage = Optional.empty(); - - private Optional googleDrive = Optional.empty(); - - private Optional googleDriveFiles = Optional.empty(); - - private Optional googlePlus = Optional.empty(); - - private Optional latitudeBest = Optional.empty(); - - private Optional latitudeCity = Optional.empty(); - - private Optional moderator = Optional.empty(); - - private Optional offlineAccess = Optional.empty(); - - private Optional orkut = Optional.empty(); - - private Optional picasaWeb = Optional.empty(); - - private Optional profile = Optional.empty(); - - private Optional sites = Optional.empty(); - - private Optional tasks = Optional.empty(); - - private Optional tasksReadonly = Optional.empty(); - - private Optional urlShortener = Optional.empty(); - - private Optional webmasterTools = Optional.empty(); - - private Optional youtube = Optional.empty(); - - private Optional youtubeChannelmembershipsCreator = Optional.empty(); - - private Optional youtubeNew = Optional.empty(); - - private Optional youtubeReadonly = Optional.empty(); - - private Optional youtubeUpload = Optional.empty(); - - private Optional youtubepartner = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsGoogleOAuth2 other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - allowedAudiences(other.getAllowedAudiences()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - freeformScopes(other.getFreeformScopes()); - iconUrl(other.getIconUrl()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - adsenseManagement(other.getAdsenseManagement()); - analytics(other.getAnalytics()); - blogger(other.getBlogger()); - calendar(other.getCalendar()); - calendarAddonsExecute(other.getCalendarAddonsExecute()); - calendarEvents(other.getCalendarEvents()); - calendarEventsReadonly(other.getCalendarEventsReadonly()); - calendarSettingsReadonly(other.getCalendarSettingsReadonly()); - chromeWebStore(other.getChromeWebStore()); - contacts(other.getContacts()); - contactsNew(other.getContactsNew()); - contactsOtherReadonly(other.getContactsOtherReadonly()); - contactsReadonly(other.getContactsReadonly()); - contentApiForShopping(other.getContentApiForShopping()); - coordinate(other.getCoordinate()); - coordinateReadonly(other.getCoordinateReadonly()); - directoryReadonly(other.getDirectoryReadonly()); - documentList(other.getDocumentList()); - drive(other.getDrive()); - driveActivity(other.getDriveActivity()); - driveActivityReadonly(other.getDriveActivityReadonly()); - driveAppdata(other.getDriveAppdata()); - driveAppsReadonly(other.getDriveAppsReadonly()); - driveFile(other.getDriveFile()); - driveMetadata(other.getDriveMetadata()); - driveMetadataReadonly(other.getDriveMetadataReadonly()); - drivePhotosReadonly(other.getDrivePhotosReadonly()); - driveReadonly(other.getDriveReadonly()); - driveScripts(other.getDriveScripts()); - email(other.getEmail()); - gmail(other.getGmail()); - gmailCompose(other.getGmailCompose()); - gmailInsert(other.getGmailInsert()); - gmailLabels(other.getGmailLabels()); - gmailMetadata(other.getGmailMetadata()); - gmailModify(other.getGmailModify()); - gmailNew(other.getGmailNew()); - gmailReadonly(other.getGmailReadonly()); - gmailSend(other.getGmailSend()); - gmailSettingsBasic(other.getGmailSettingsBasic()); - gmailSettingsSharing(other.getGmailSettingsSharing()); - googleAffiliateNetwork(other.getGoogleAffiliateNetwork()); - googleBooks(other.getGoogleBooks()); - googleCloudStorage(other.getGoogleCloudStorage()); - googleDrive(other.getGoogleDrive()); - googleDriveFiles(other.getGoogleDriveFiles()); - googlePlus(other.getGooglePlus()); - latitudeBest(other.getLatitudeBest()); - latitudeCity(other.getLatitudeCity()); - moderator(other.getModerator()); - offlineAccess(other.getOfflineAccess()); - orkut(other.getOrkut()); - picasaWeb(other.getPicasaWeb()); - profile(other.getProfile()); - sites(other.getSites()); - tasks(other.getTasks()); - tasksReadonly(other.getTasksReadonly()); - urlShortener(other.getUrlShortener()); - webmasterTools(other.getWebmasterTools()); - youtube(other.getYoutube()); - youtubeChannelmembershipsCreator(other.getYoutubeChannelmembershipsCreator()); - youtubeNew(other.getYoutubeNew()); - youtubeReadonly(other.getYoutubeReadonly()); - youtubeUpload(other.getYoutubeUpload()); - youtubepartner(other.getYoutubepartner()); - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @JsonSetter(value = "allowed_audiences", nulls = Nulls.SKIP) - public Builder allowedAudiences(Optional> allowedAudiences) { - this.allowedAudiences = allowedAudiences; - return this; - } - - public Builder allowedAudiences(List allowedAudiences) { - this.allowedAudiences = Optional.ofNullable(allowedAudiences); - 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 = "freeform_scopes", nulls = Nulls.SKIP) - public Builder freeformScopes(Optional> freeformScopes) { - this.freeformScopes = freeformScopes; - return this; - } - - public Builder freeformScopes(List freeformScopes) { - this.freeformScopes = Optional.ofNullable(freeformScopes); - return this; - } - - @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 = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - /** - *

View and manage user's ad applications, ad units, and channels in AdSense

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

View user's configuration information and reports

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

View and manage user's posts and blogs on Blogger and Blogger comments

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

See, edit, share, and permanently delete all the calendars you can access using Google Calendar

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

Run as a Calendar add-on

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

View and edit events on all your calendars

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

View events on all your calendars

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

View your Calendar settings

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

Read access to user's chrome web store

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

Full access to the authenticated user's contacts

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

Full access to the authenticated user's contacts

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

Read-only access to the authenticated user's 'Other contacts'

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

Read-only access to the authenticated user's contacts

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

View and manage user's products, feeds, and subaccounts

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

Grants read and write access to the Coordinate API

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

Grants read access to the Coordinate API

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

Read-only access to the authenticated user's corporate directory (if applicable)

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

Access to Google Docs document list feed

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

Full access to all files and folders in the user's Google Drive

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

View and add to the activity record of files in your Drive

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

View the activity record of files in your Drive

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

Access to the application's configuration data in the user's Google Drive

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

View apps authorized to access your Drive

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

Access to files created or opened by the app

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

Access to file metadata, including listing files and folders

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

Read-only access to file metadata

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

Read-only access to the user's Google Photos

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

Read-only access to all files and folders in the user's Google Drive

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

Modify the behavior of Google Apps Scripts

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

Email and verified email flag

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

Full access to the account's mailboxes, including permanent deletion of threads and messages

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

Read all resources and their metadata—no write operations

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

Insert and import messages only

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

Create, read, update, and delete labels only

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

Read resources metadata including labels, history records, and email message headers, but not the message body or attachments

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

All read/write operations except immediate, permanent deletion of threads and messages, bypassing Trash

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

Full access to the account's mailboxes, including permanent deletion of threads and messages

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

Read all resources and their metadata—no write operations

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

Send messages only. No read or modify privileges on mailbox

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

Manage basic mail settings

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

Manage sensitive mail settings, including forwarding rules and aliases. Note: Operations guarded by this scope are restricted to administrative use only

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

View and manage user's publisher data in the Google Affiliate Network

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

View and manage user's books and library in Google Books

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

View and manage user's data stored in Google Cloud Storage

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

Full access to all files and folders in the user's Google Drive

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

Access to files created or opened by the app

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

Associate user with its public Google profile

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

View and manage user's best-available current location and location history in Google Latitude

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

View and manage user's city-level current location and location history in Google Latitude

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

View and manage user's votes, topics, and submissions

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

Request a refresh token when the user authorizes your application

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

View and manage user's friends, applications and profile and status

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

View and manage user's Google photos, videos, photo and video tags and comments

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

Name, public profile URL, photo, country, language, and timezone

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

View and manage user's sites on Google Sites

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

Full access to create, edit, organize, and delete all your tasks

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

Read-only access to view your tasks and task lists

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

View, manage and view statistics user's short URLs

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

View and manage user's sites and messages, view keywords

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

Manage your YouTube account

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

See a list of your current active channel members, their current level, and when they became a member

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

Manage your YouTube account

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

View your YouTube account

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

Manage your YouTube videos

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

View and manage your assets and associated content on YouTube

- */ - @JsonSetter(value = "youtubepartner", nulls = Nulls.SKIP) - public Builder youtubepartner(Optional youtubepartner) { - this.youtubepartner = youtubepartner; - return this; - } - - public Builder youtubepartner(Boolean youtubepartner) { - this.youtubepartner = Optional.ofNullable(youtubepartner); - return this; - } - - public ConnectionOptionsGoogleOAuth2 build() { - return new ConnectionOptionsGoogleOAuth2( - nonPersistentAttrs, - allowedAudiences, - clientId, - clientSecret, - freeformScopes, - iconUrl, - scope, - setUserRootAttributes, - upstreamParams, - adsenseManagement, - analytics, - blogger, - calendar, - calendarAddonsExecute, - calendarEvents, - calendarEventsReadonly, - calendarSettingsReadonly, - chromeWebStore, - contacts, - contactsNew, - contactsOtherReadonly, - contactsReadonly, - contentApiForShopping, - coordinate, - coordinateReadonly, - directoryReadonly, - documentList, - drive, - driveActivity, - driveActivityReadonly, - driveAppdata, - driveAppsReadonly, - driveFile, - driveMetadata, - driveMetadataReadonly, - drivePhotosReadonly, - driveReadonly, - driveScripts, - email, - gmail, - gmailCompose, - gmailInsert, - gmailLabels, - gmailMetadata, - gmailModify, - gmailNew, - gmailReadonly, - gmailSend, - gmailSettingsBasic, - gmailSettingsSharing, - googleAffiliateNetwork, - googleBooks, - googleCloudStorage, - googleDrive, - googleDriveFiles, - googlePlus, - latitudeBest, - latitudeCity, - moderator, - offlineAccess, - orkut, - picasaWeb, - profile, - sites, - tasks, - tasksReadonly, - urlShortener, - webmasterTools, - youtube, - youtubeChannelmembershipsCreator, - youtubeNew, - youtubeReadonly, - youtubeUpload, - youtubepartner, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsIdpInitiatedClientProtocolEnumSaml.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsIdpInitiatedClientProtocolEnumSaml.java deleted file mode 100644 index 2f751a39b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsIdpInitiatedClientProtocolEnumSaml.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionOptionsIdpInitiatedClientProtocolEnumSaml { - public static final ConnectionOptionsIdpInitiatedClientProtocolEnumSaml WSFED = - new ConnectionOptionsIdpInitiatedClientProtocolEnumSaml(Value.WSFED, "wsfed"); - - public static final ConnectionOptionsIdpInitiatedClientProtocolEnumSaml SAMLP = - new ConnectionOptionsIdpInitiatedClientProtocolEnumSaml(Value.SAMLP, "samlp"); - - public static final ConnectionOptionsIdpInitiatedClientProtocolEnumSaml OIDC = - new ConnectionOptionsIdpInitiatedClientProtocolEnumSaml(Value.OIDC, "oidc"); - - private final Value value; - - private final String string; - - ConnectionOptionsIdpInitiatedClientProtocolEnumSaml(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionOptionsIdpInitiatedClientProtocolEnumSaml - && this.string.equals(((ConnectionOptionsIdpInitiatedClientProtocolEnumSaml) 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 ConnectionOptionsIdpInitiatedClientProtocolEnumSaml valueOf(String value) { - switch (value) { - case "wsfed": - return WSFED; - case "samlp": - return SAMLP; - case "oidc": - return OIDC; - default: - return new ConnectionOptionsIdpInitiatedClientProtocolEnumSaml(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/ConnectionOptionsIdpinitiatedSaml.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsIdpinitiatedSaml.java deleted file mode 100644 index a3515ba5d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsIdpinitiatedSaml.java +++ /dev/null @@ -1,188 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionOptionsIdpinitiatedSaml.Builder.class) -public final class ConnectionOptionsIdpinitiatedSaml { - private final Optional clientAuthorizequery; - - private final Optional clientId; - - private final Optional clientProtocol; - - private final Optional enabled; - - private final Map additionalProperties; - - private ConnectionOptionsIdpinitiatedSaml( - 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 ConnectionOptionsIdpinitiatedSaml && equalTo((ConnectionOptionsIdpinitiatedSaml) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsIdpinitiatedSaml 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(ConnectionOptionsIdpinitiatedSaml 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(ConnectionOptionsIdpInitiatedClientProtocolEnumSaml 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 ConnectionOptionsIdpinitiatedSaml build() { - return new ConnectionOptionsIdpinitiatedSaml( - clientAuthorizequery, clientId, clientProtocol, enabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsInstagram.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsInstagram.java deleted file mode 100644 index 8d04b9c8f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsInstagram.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsInstagram.Builder.class) -public final class ConnectionOptionsInstagram implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsInstagram( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsInstagram && equalTo((ConnectionOptionsInstagram) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsInstagram other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsInstagram other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsInstagram build() { - return new ConnectionOptionsInstagram( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsLine.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsLine.java deleted file mode 100644 index d5d5dfba3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsLine.java +++ /dev/null @@ -1,366 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsLine.Builder.class) -public final class ConnectionOptionsLine implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional> freeformScopes; - - private final Optional> scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional email; - - private final Optional profile; - - private final Map additionalProperties; - - private ConnectionOptionsLine( - Optional> nonPersistentAttrs, - Optional clientId, - Optional clientSecret, - Optional> freeformScopes, - Optional> scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional email, - Optional profile, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.freeformScopes = freeformScopes; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.email = email; - this.profile = profile; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("freeform_scopes") - public Optional> getFreeformScopes() { - return freeformScopes; - } - - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - /** - * @return Permission to request the user's email address from LINE. When enabled, adds the 'email' scope to OAuth requests. Note: LINE requires special approval to access user email addresses. - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - /** - * @return Permission to request the user's basic profile information from LINE. When enabled, adds the 'profile' scope to OAuth requests. LINE requires this scope to retrieve user display name, profile picture, and status message. - */ - @JsonProperty("profile") - public Optional getProfile() { - return profile; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsLine && equalTo((ConnectionOptionsLine) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsLine other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && freeformScopes.equals(other.freeformScopes) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && email.equals(other.email) - && profile.equals(other.profile); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.nonPersistentAttrs, - this.clientId, - this.clientSecret, - this.freeformScopes, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.email, - this.profile); - } - - @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> nonPersistentAttrs = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional> freeformScopes = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional email = Optional.empty(); - - private Optional profile = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsLine other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - freeformScopes(other.getFreeformScopes()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - email(other.getEmail()); - profile(other.getProfile()); - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @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 = "freeform_scopes", nulls = Nulls.SKIP) - public Builder freeformScopes(Optional> freeformScopes) { - this.freeformScopes = freeformScopes; - return this; - } - - public Builder freeformScopes(List freeformScopes) { - this.freeformScopes = Optional.ofNullable(freeformScopes); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - /** - *

Permission to request the user's email address from LINE. When enabled, adds the 'email' scope to OAuth requests. Note: LINE requires special approval to access user email addresses.

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

Permission to request the user's basic profile information from LINE. When enabled, adds the 'profile' scope to OAuth requests. LINE requires this scope to retrieve user display name, profile picture, and status message.

- */ - @JsonSetter(value = "profile", nulls = Nulls.SKIP) - public Builder profile(Optional profile) { - this.profile = profile; - return this; - } - - public Builder profile(Boolean profile) { - this.profile = Optional.ofNullable(profile); - return this; - } - - public ConnectionOptionsLine build() { - return new ConnectionOptionsLine( - nonPersistentAttrs, - clientId, - clientSecret, - freeformScopes, - scope, - setUserRootAttributes, - upstreamParams, - email, - profile, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsLinkedin.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsLinkedin.java deleted file mode 100644 index 5eada7d3e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsLinkedin.java +++ /dev/null @@ -1,403 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsLinkedin.Builder.class) -public final class ConnectionOptionsLinkedin implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Optional strategyVersion; - - private final Optional basicProfile; - - private final Optional email; - - private final Optional profile; - - private final Map additionalProperties; - - private ConnectionOptionsLinkedin( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Optional strategyVersion, - Optional basicProfile, - Optional email, - Optional profile, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.strategyVersion = strategyVersion; - this.basicProfile = basicProfile; - this.email = email; - this.profile = profile; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("strategy_version") - public Optional getStrategyVersion() { - return strategyVersion; - } - - /** - * @return When enabled, requests the basic_profile scope from LinkedIn to access basic profile information. - */ - @JsonProperty("basic_profile") - public Optional getBasicProfile() { - return basicProfile; - } - - /** - * @return When enabled, requests the email scope from LinkedIn to access the user's email address. - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - /** - * @return When enabled, requests the profile scope from LinkedIn to access profile information. - */ - @JsonProperty("profile") - public Optional getProfile() { - return profile; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsLinkedin && equalTo((ConnectionOptionsLinkedin) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsLinkedin other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs) - && strategyVersion.equals(other.strategyVersion) - && basicProfile.equals(other.basicProfile) - && email.equals(other.email) - && profile.equals(other.profile); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs, - this.strategyVersion, - this.basicProfile, - this.email, - this.profile); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - private Optional strategyVersion = Optional.empty(); - - private Optional basicProfile = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional profile = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsLinkedin other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - strategyVersion(other.getStrategyVersion()); - basicProfile(other.getBasicProfile()); - email(other.getEmail()); - profile(other.getProfile()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @JsonSetter(value = "strategy_version", nulls = Nulls.SKIP) - public Builder strategyVersion(Optional strategyVersion) { - this.strategyVersion = strategyVersion; - return this; - } - - public Builder strategyVersion(Integer strategyVersion) { - this.strategyVersion = Optional.ofNullable(strategyVersion); - return this; - } - - /** - *

When enabled, requests the basic_profile scope from LinkedIn to access basic profile information.

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

When enabled, requests the email scope from LinkedIn to access the user's email address.

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

When enabled, requests the profile scope from LinkedIn to access profile information.

- */ - @JsonSetter(value = "profile", nulls = Nulls.SKIP) - public Builder profile(Optional profile) { - this.profile = profile; - return this; - } - - public Builder profile(Boolean profile) { - this.profile = Optional.ofNullable(profile); - return this; - } - - public ConnectionOptionsLinkedin build() { - return new ConnectionOptionsLinkedin( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - strategyVersion, - basicProfile, - email, - profile, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsMiicard.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsMiicard.java deleted file mode 100644 index 4dd9ec882..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsMiicard.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsMiicard.Builder.class) -public final class ConnectionOptionsMiicard implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsMiicard( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsMiicard && equalTo((ConnectionOptionsMiicard) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsMiicard other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsMiicard other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsMiicard build() { - return new ConnectionOptionsMiicard( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOAuth1.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOAuth1.java deleted file mode 100644 index 7b8548d4b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOAuth1.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionOptionsOAuth1.Builder.class) -public final class ConnectionOptionsOAuth1 { - private final Optional clientId; - - private final Optional clientSecret; - - private final Map additionalProperties; - - private ConnectionOptionsOAuth1( - Optional clientId, Optional clientSecret, Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsOAuth1 && equalTo((ConnectionOptionsOAuth1) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsOAuth1 other) { - return clientId.equals(other.clientId) && clientSecret.equals(other.clientSecret); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.clientId, this.clientSecret); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsOAuth1 other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - 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; - } - - public ConnectionOptionsOAuth1 build() { - return new ConnectionOptionsOAuth1(clientId, clientSecret, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOAuth1Common.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOAuth1Common.java deleted file mode 100644 index 22da68341..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOAuth1Common.java +++ /dev/null @@ -1,266 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsOAuth1Common.Builder.class) -public final class ConnectionOptionsOAuth1Common implements IConnectionOptionsOAuth1Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsOAuth1Common( - Optional clientId, - Optional clientSecret, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - /** - * @return OAuth 1.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider. - */ - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - /** - * @return OAuth 1.0 client secret issued by the identity provider during application registration. Used to authenticate your Auth0 connection when signing requests and exchanging request tokens and verifiers for access tokens. May be null for public clients. - */ - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsOAuth1Common && equalTo((ConnectionOptionsOAuth1Common) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsOAuth1Common other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsOAuth1Common other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - /** - *

OAuth 1.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.

- */ - @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; - } - - /** - *

OAuth 1.0 client secret issued by the identity provider during application registration. Used to authenticate your Auth0 connection when signing requests and exchanging request tokens and verifiers for access tokens. May be null for public clients.

- */ - @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 = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsOAuth1Common build() { - return new ConnectionOptionsOAuth1Common( - clientId, - clientSecret, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOAuth2.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOAuth2.java deleted file mode 100644 index 11a71bece..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOAuth2.java +++ /dev/null @@ -1,574 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsOAuth2.Builder.class) -public final class ConnectionOptionsOAuth2 implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional> authParams; - - private final Optional> authParamsMap; - - private final Optional authorizationUrl; - - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional> customHeaders; - - private final Optional> fieldsMap; - - private final Optional iconUrl; - - private final Optional logoutUrl; - - private final Optional pkceEnabled; - - private final Optional scope; - - private final Optional scripts; - - private final Optional setUserRootAttributes; - - private final Optional tokenUrl; - - private final OptionalNullable>> - upstreamParams; - - private final Optional useOauthSpecScope; - - private final Map additionalProperties; - - private ConnectionOptionsOAuth2( - Optional> nonPersistentAttrs, - Optional> authParams, - Optional> authParamsMap, - Optional authorizationUrl, - Optional clientId, - Optional clientSecret, - Optional> customHeaders, - Optional> fieldsMap, - Optional iconUrl, - Optional logoutUrl, - Optional pkceEnabled, - Optional scope, - Optional scripts, - Optional setUserRootAttributes, - Optional tokenUrl, - OptionalNullable>> upstreamParams, - Optional useOauthSpecScope, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.authParams = authParams; - this.authParamsMap = authParamsMap; - this.authorizationUrl = authorizationUrl; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.customHeaders = customHeaders; - this.fieldsMap = fieldsMap; - this.iconUrl = iconUrl; - this.logoutUrl = logoutUrl; - this.pkceEnabled = pkceEnabled; - this.scope = scope; - this.scripts = scripts; - this.setUserRootAttributes = setUserRootAttributes; - this.tokenUrl = tokenUrl; - this.upstreamParams = upstreamParams; - this.useOauthSpecScope = useOauthSpecScope; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("authParams") - public Optional> getAuthParams() { - return authParams; - } - - @JsonProperty("authParamsMap") - public Optional> getAuthParamsMap() { - return authParamsMap; - } - - @JsonProperty("authorizationURL") - public Optional getAuthorizationUrl() { - return authorizationUrl; - } - - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("customHeaders") - public Optional> getCustomHeaders() { - return customHeaders; - } - - @JsonProperty("fieldsMap") - public Optional> getFieldsMap() { - return fieldsMap; - } - - @JsonProperty("icon_url") - public Optional getIconUrl() { - return iconUrl; - } - - @JsonProperty("logoutUrl") - public Optional getLogoutUrl() { - return logoutUrl; - } - - /** - * @return When true, enables Proof Key for Code Exchange (PKCE) for the authorization code flow. PKCE provides additional security by preventing authorization code interception attacks. - */ - @JsonProperty("pkce_enabled") - public Optional getPkceEnabled() { - return pkceEnabled; - } - - @JsonProperty("scope") - public Optional getScope() { - return scope; - } - - @JsonProperty("scripts") - public Optional getScripts() { - return scripts; - } - - @JsonProperty("set_user_root_attributes") - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonProperty("tokenURL") - public Optional getTokenUrl() { - return tokenUrl; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - 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; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsOAuth2 && equalTo((ConnectionOptionsOAuth2) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsOAuth2 other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && authParams.equals(other.authParams) - && authParamsMap.equals(other.authParamsMap) - && authorizationUrl.equals(other.authorizationUrl) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && customHeaders.equals(other.customHeaders) - && fieldsMap.equals(other.fieldsMap) - && iconUrl.equals(other.iconUrl) - && logoutUrl.equals(other.logoutUrl) - && pkceEnabled.equals(other.pkceEnabled) - && scope.equals(other.scope) - && scripts.equals(other.scripts) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && tokenUrl.equals(other.tokenUrl) - && upstreamParams.equals(other.upstreamParams) - && useOauthSpecScope.equals(other.useOauthSpecScope); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.nonPersistentAttrs, - this.authParams, - this.authParamsMap, - this.authorizationUrl, - this.clientId, - this.clientSecret, - this.customHeaders, - this.fieldsMap, - this.iconUrl, - this.logoutUrl, - this.pkceEnabled, - this.scope, - this.scripts, - this.setUserRootAttributes, - this.tokenUrl, - this.upstreamParams, - this.useOauthSpecScope); - } - - @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> nonPersistentAttrs = Optional.empty(); - - private Optional> authParams = Optional.empty(); - - private Optional> authParamsMap = Optional.empty(); - - private Optional authorizationUrl = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional> customHeaders = Optional.empty(); - - private Optional> fieldsMap = Optional.empty(); - - private Optional iconUrl = Optional.empty(); - - private Optional logoutUrl = Optional.empty(); - - private Optional pkceEnabled = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional scripts = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private Optional tokenUrl = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional useOauthSpecScope = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsOAuth2 other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - authParams(other.getAuthParams()); - authParamsMap(other.getAuthParamsMap()); - authorizationUrl(other.getAuthorizationUrl()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - customHeaders(other.getCustomHeaders()); - fieldsMap(other.getFieldsMap()); - iconUrl(other.getIconUrl()); - logoutUrl(other.getLogoutUrl()); - pkceEnabled(other.getPkceEnabled()); - scope(other.getScope()); - scripts(other.getScripts()); - setUserRootAttributes(other.getSetUserRootAttributes()); - tokenUrl(other.getTokenUrl()); - upstreamParams(other.getUpstreamParams()); - useOauthSpecScope(other.getUseOauthSpecScope()); - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @JsonSetter(value = "authParams", nulls = Nulls.SKIP) - public Builder authParams(Optional> authParams) { - this.authParams = authParams; - return this; - } - - public Builder authParams(Map authParams) { - this.authParams = Optional.ofNullable(authParams); - return this; - } - - @JsonSetter(value = "authParamsMap", nulls = Nulls.SKIP) - public Builder authParamsMap(Optional> authParamsMap) { - this.authParamsMap = authParamsMap; - return this; - } - - public Builder authParamsMap(Map authParamsMap) { - this.authParamsMap = Optional.ofNullable(authParamsMap); - return this; - } - - @JsonSetter(value = "authorizationURL", nulls = Nulls.SKIP) - public Builder authorizationUrl(Optional authorizationUrl) { - this.authorizationUrl = authorizationUrl; - return this; - } - - public Builder authorizationUrl(String authorizationUrl) { - this.authorizationUrl = Optional.ofNullable(authorizationUrl); - 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 = "customHeaders", nulls = Nulls.SKIP) - public Builder customHeaders(Optional> customHeaders) { - this.customHeaders = customHeaders; - return this; - } - - public Builder customHeaders(Map customHeaders) { - this.customHeaders = Optional.ofNullable(customHeaders); - 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; - } - - @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 = "logoutUrl", nulls = Nulls.SKIP) - public Builder logoutUrl(Optional logoutUrl) { - this.logoutUrl = logoutUrl; - return this; - } - - public Builder logoutUrl(String logoutUrl) { - this.logoutUrl = Optional.ofNullable(logoutUrl); - return this; - } - - /** - *

When true, enables Proof Key for Code Exchange (PKCE) for the authorization code flow. PKCE provides additional security by preventing authorization code interception attacks.

- */ - @JsonSetter(value = "pkce_enabled", nulls = Nulls.SKIP) - public Builder pkceEnabled(Optional pkceEnabled) { - this.pkceEnabled = pkceEnabled; - return this; - } - - public Builder pkceEnabled(Boolean pkceEnabled) { - this.pkceEnabled = Optional.ofNullable(pkceEnabled); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "scripts", nulls = Nulls.SKIP) - public Builder scripts(Optional scripts) { - this.scripts = scripts; - return this; - } - - public Builder scripts(ConnectionScriptsOAuth2 scripts) { - this.scripts = Optional.ofNullable(scripts); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "tokenURL", nulls = Nulls.SKIP) - public Builder tokenUrl(Optional tokenUrl) { - this.tokenUrl = tokenUrl; - return this; - } - - public Builder tokenUrl(String tokenUrl) { - this.tokenUrl = Optional.ofNullable(tokenUrl); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - /** - *

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

- */ - @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; - } - - public ConnectionOptionsOAuth2 build() { - return new ConnectionOptionsOAuth2( - nonPersistentAttrs, - authParams, - authParamsMap, - authorizationUrl, - clientId, - clientSecret, - customHeaders, - fieldsMap, - iconUrl, - logoutUrl, - pkceEnabled, - scope, - scripts, - setUserRootAttributes, - tokenUrl, - upstreamParams, - useOauthSpecScope, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOAuth2Common.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOAuth2Common.java deleted file mode 100644 index 541d9f7a0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOAuth2Common.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsOAuth2Common.Builder.class) -public final class ConnectionOptionsOAuth2Common implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsOAuth2Common( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsOAuth2Common && equalTo((ConnectionOptionsOAuth2Common) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsOAuth2Common other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsOAuth2Common other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsOAuth2Common build() { - return new ConnectionOptionsOAuth2Common( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOffice365.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOffice365.java deleted file mode 100644 index b6d9bf4e6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOffice365.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionOptionsOffice365.Builder.class) -public final class ConnectionOptionsOffice365 { - private final Optional clientId; - - private final Optional clientSecret; - - private final Map additionalProperties; - - private ConnectionOptionsOffice365( - Optional clientId, Optional clientSecret, Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsOffice365 && equalTo((ConnectionOptionsOffice365) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsOffice365 other) { - return clientId.equals(other.clientId) && clientSecret.equals(other.clientSecret); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.clientId, this.clientSecret); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsOffice365 other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - 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; - } - - public ConnectionOptionsOffice365 build() { - return new ConnectionOptionsOffice365(clientId, clientSecret, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java deleted file mode 100644 index d2cc00011..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidc.java +++ /dev/null @@ -1,1108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsOidc.Builder.class) -public final class ConnectionOptionsOidc implements IConnectionOptionsCommonOidc, IConnectionOptionsCommon { - private final Optional authorizationEndpoint; - - private final String clientId; - - private final Optional clientSecret; - - private final Optional connectionSettings; - - private final OptionalNullable federatedConnectionsAccessTokens; - - private final Optional> domainAliases; - - private final Optional iconUrl; - - private final OptionalNullable> idTokenSignedResponseAlgs; - - private final Optional issuer; - - private final Optional jwksUri; - - private final Optional oidcMetadata; - - private final Optional scope; - - private final Optional sendBackChannelNonce; - - private final Optional setUserRootAttributes; - - private final Optional tenantDomain; - - private final Optional tokenEndpoint; - - private final OptionalNullable tokenEndpointAuthMethod; - - private final OptionalNullable tokenEndpointAuthSigningAlg; - - private final OptionalNullable>> - upstreamParams; - - private final Optional userinfoEndpoint; - - private final Optional> nonPersistentAttrs; - - private final Optional attributeMap; - - private final Optional discoveryUrl; - - private final Optional type; - - private final Map additionalProperties; - - private ConnectionOptionsOidc( - Optional authorizationEndpoint, - String clientId, - Optional clientSecret, - Optional connectionSettings, - OptionalNullable federatedConnectionsAccessTokens, - Optional> domainAliases, - Optional iconUrl, - OptionalNullable> idTokenSignedResponseAlgs, - Optional issuer, - Optional jwksUri, - Optional oidcMetadata, - Optional scope, - Optional sendBackChannelNonce, - Optional setUserRootAttributes, - Optional tenantDomain, - Optional tokenEndpoint, - OptionalNullable tokenEndpointAuthMethod, - OptionalNullable tokenEndpointAuthSigningAlg, - OptionalNullable>> upstreamParams, - Optional userinfoEndpoint, - Optional> nonPersistentAttrs, - Optional attributeMap, - Optional discoveryUrl, - Optional type, - Map additionalProperties) { - this.authorizationEndpoint = authorizationEndpoint; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.connectionSettings = connectionSettings; - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; - this.domainAliases = domainAliases; - this.iconUrl = iconUrl; - this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; - this.issuer = issuer; - this.jwksUri = jwksUri; - this.oidcMetadata = oidcMetadata; - this.scope = scope; - this.sendBackChannelNonce = sendBackChannelNonce; - this.setUserRootAttributes = setUserRootAttributes; - this.tenantDomain = tenantDomain; - this.tokenEndpoint = tokenEndpoint; - this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; - this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; - this.upstreamParams = upstreamParams; - this.userinfoEndpoint = userinfoEndpoint; - this.nonPersistentAttrs = nonPersistentAttrs; - this.attributeMap = attributeMap; - this.discoveryUrl = discoveryUrl; - this.type = type; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authorization_endpoint") - @java.lang.Override - public Optional getAuthorizationEndpoint() { - return authorizationEndpoint; - } - - @JsonProperty("client_id") - @java.lang.Override - public String getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("connection_settings") - @java.lang.Override - public Optional getConnectionSettings() { - return connectionSettings; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") - @java.lang.Override - public OptionalNullable getFederatedConnectionsAccessTokens() { - if (federatedConnectionsAccessTokens == null) { - return OptionalNullable.absent(); - } - return federatedConnectionsAccessTokens; - } - - @JsonProperty("domain_aliases") - @java.lang.Override - public Optional> getDomainAliases() { - return domainAliases; - } - - @JsonProperty("icon_url") - @java.lang.Override - public Optional getIconUrl() { - return iconUrl; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("id_token_signed_response_algs") - @java.lang.Override - public OptionalNullable> getIdTokenSignedResponseAlgs() { - if (idTokenSignedResponseAlgs == null) { - return OptionalNullable.absent(); - } - return idTokenSignedResponseAlgs; - } - - @JsonProperty("issuer") - @java.lang.Override - public Optional getIssuer() { - return issuer; - } - - @JsonProperty("jwks_uri") - @java.lang.Override - public Optional getJwksUri() { - return jwksUri; - } - - @JsonProperty("oidc_metadata") - @java.lang.Override - public Optional getOidcMetadata() { - return oidcMetadata; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("send_back_channel_nonce") - @java.lang.Override - public Optional getSendBackChannelNonce() { - return sendBackChannelNonce; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonProperty("tenant_domain") - @java.lang.Override - public Optional getTenantDomain() { - return tenantDomain; - } - - @JsonProperty("token_endpoint") - @java.lang.Override - public Optional getTokenEndpoint() { - return tokenEndpoint; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("token_endpoint_auth_method") - @java.lang.Override - 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") - @java.lang.Override - public OptionalNullable getTokenEndpointAuthSigningAlg() { - if (tokenEndpointAuthSigningAlg == null) { - return OptionalNullable.absent(); - } - return tokenEndpointAuthSigningAlg; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("userinfo_endpoint") - @java.lang.Override - public Optional getUserinfoEndpoint() { - return userinfoEndpoint; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("attribute_map") - public Optional getAttributeMap() { - return attributeMap; - } - - @JsonProperty("discovery_url") - public Optional getDiscoveryUrl() { - return discoveryUrl; - } - - @JsonProperty("type") - 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() { - return idTokenSignedResponseAlgs; - } - - @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; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsOidc && equalTo((ConnectionOptionsOidc) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsOidc other) { - return authorizationEndpoint.equals(other.authorizationEndpoint) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && connectionSettings.equals(other.connectionSettings) - && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) - && domainAliases.equals(other.domainAliases) - && iconUrl.equals(other.iconUrl) - && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) - && issuer.equals(other.issuer) - && jwksUri.equals(other.jwksUri) - && oidcMetadata.equals(other.oidcMetadata) - && 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) - && upstreamParams.equals(other.upstreamParams) - && userinfoEndpoint.equals(other.userinfoEndpoint) - && nonPersistentAttrs.equals(other.nonPersistentAttrs) - && 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.clientSecret, - this.connectionSettings, - this.federatedConnectionsAccessTokens, - this.domainAliases, - this.iconUrl, - this.idTokenSignedResponseAlgs, - this.issuer, - this.jwksUri, - this.oidcMetadata, - this.scope, - this.sendBackChannelNonce, - this.setUserRootAttributes, - this.tenantDomain, - this.tokenEndpoint, - this.tokenEndpointAuthMethod, - this.tokenEndpointAuthSigningAlg, - this.upstreamParams, - this.userinfoEndpoint, - this.nonPersistentAttrs, - 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 { - _FinalStage clientId(@NotNull String clientId); - - Builder from(ConnectionOptionsOidc other); - } - - public interface _FinalStage { - ConnectionOptionsOidc build(); - - _FinalStage authorizationEndpoint(Optional authorizationEndpoint); - - _FinalStage authorizationEndpoint(String authorizationEndpoint); - - _FinalStage clientSecret(Optional clientSecret); - - _FinalStage clientSecret(String clientSecret); - - _FinalStage connectionSettings(Optional connectionSettings); - - _FinalStage connectionSettings(ConnectionConnectionSettings connectionSettings); - - _FinalStage federatedConnectionsAccessTokens( - @Nullable - OptionalNullable federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - ConnectionFederatedConnectionsAccessTokens federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - Optional federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - com.auth0.client.mgmt.core.Nullable - federatedConnectionsAccessTokens); - - _FinalStage domainAliases(Optional> domainAliases); - - _FinalStage domainAliases(List domainAliases); - - _FinalStage iconUrl(Optional iconUrl); - - _FinalStage iconUrl(String iconUrl); - - _FinalStage idTokenSignedResponseAlgs( - @Nullable OptionalNullable> idTokenSignedResponseAlgs); - - _FinalStage idTokenSignedResponseAlgs(List idTokenSignedResponseAlgs); - - _FinalStage idTokenSignedResponseAlgs( - Optional> idTokenSignedResponseAlgs); - - _FinalStage idTokenSignedResponseAlgs( - com.auth0.client.mgmt.core.Nullable> - idTokenSignedResponseAlgs); - - _FinalStage issuer(Optional issuer); - - _FinalStage issuer(String issuer); - - _FinalStage jwksUri(Optional jwksUri); - - _FinalStage jwksUri(String jwksUri); - - _FinalStage oidcMetadata(Optional oidcMetadata); - - _FinalStage oidcMetadata(ConnectionOptionsOidcMetadata oidcMetadata); - - _FinalStage scope(Optional scope); - - _FinalStage scope(String scope); - - _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce); - - _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce); - - _FinalStage setUserRootAttributes(Optional setUserRootAttributes); - - _FinalStage setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes); - - _FinalStage tenantDomain(Optional tenantDomain); - - _FinalStage tenantDomain(String tenantDomain); - - _FinalStage tokenEndpoint(Optional tokenEndpoint); - - _FinalStage tokenEndpoint(String tokenEndpoint); - - _FinalStage tokenEndpointAuthMethod( - @Nullable OptionalNullable tokenEndpointAuthMethod); - - _FinalStage tokenEndpointAuthMethod(ConnectionTokenEndpointAuthMethodEnum tokenEndpointAuthMethod); - - _FinalStage tokenEndpointAuthMethod(Optional tokenEndpointAuthMethod); - - _FinalStage tokenEndpointAuthMethod( - com.auth0.client.mgmt.core.Nullable tokenEndpointAuthMethod); - - _FinalStage tokenEndpointAuthSigningAlg( - @Nullable OptionalNullable tokenEndpointAuthSigningAlg); - - _FinalStage tokenEndpointAuthSigningAlg(ConnectionTokenEndpointAuthSigningAlgEnum tokenEndpointAuthSigningAlg); - - _FinalStage tokenEndpointAuthSigningAlg( - Optional tokenEndpointAuthSigningAlg); - - _FinalStage tokenEndpointAuthSigningAlg( - com.auth0.client.mgmt.core.Nullable - tokenEndpointAuthSigningAlg); - - _FinalStage upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams); - - _FinalStage upstreamParams( - Map> upstreamParams); - - _FinalStage upstreamParams( - Optional>> upstreamParams); - - _FinalStage upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams); - - _FinalStage userinfoEndpoint(Optional userinfoEndpoint); - - _FinalStage userinfoEndpoint(String userinfoEndpoint); - - _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); - - _FinalStage nonPersistentAttrs(List nonPersistentAttrs); - - _FinalStage attributeMap(Optional attributeMap); - - _FinalStage attributeMap(ConnectionAttributeMapOidc attributeMap); - - _FinalStage discoveryUrl(Optional discoveryUrl); - - _FinalStage discoveryUrl(String discoveryUrl); - - _FinalStage type(Optional type); - - _FinalStage type(ConnectionTypeEnumOidc 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> nonPersistentAttrs = Optional.empty(); - - private Optional userinfoEndpoint = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private OptionalNullable tokenEndpointAuthSigningAlg = - OptionalNullable.absent(); - - private OptionalNullable tokenEndpointAuthMethod = - OptionalNullable.absent(); - - 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 oidcMetadata = Optional.empty(); - - private Optional jwksUri = Optional.empty(); - - private Optional issuer = Optional.empty(); - - private OptionalNullable> idTokenSignedResponseAlgs = - OptionalNullable.absent(); - - private Optional iconUrl = Optional.empty(); - - private Optional> domainAliases = Optional.empty(); - - private OptionalNullable federatedConnectionsAccessTokens = - OptionalNullable.absent(); - - private Optional connectionSettings = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional authorizationEndpoint = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionOptionsOidc other) { - authorizationEndpoint(other.getAuthorizationEndpoint()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - connectionSettings(other.getConnectionSettings()); - federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); - domainAliases(other.getDomainAliases()); - iconUrl(other.getIconUrl()); - idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); - issuer(other.getIssuer()); - jwksUri(other.getJwksUri()); - oidcMetadata(other.getOidcMetadata()); - scope(other.getScope()); - sendBackChannelNonce(other.getSendBackChannelNonce()); - setUserRootAttributes(other.getSetUserRootAttributes()); - tenantDomain(other.getTenantDomain()); - tokenEndpoint(other.getTokenEndpoint()); - tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); - tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); - upstreamParams(other.getUpstreamParams()); - userinfoEndpoint(other.getUserinfoEndpoint()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - attributeMap(other.getAttributeMap()); - discoveryUrl(other.getDiscoveryUrl()); - type(other.getType()); - 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 _FinalStage type(ConnectionTypeEnumOidc 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; - } - - @java.lang.Override - public _FinalStage discoveryUrl(String discoveryUrl) { - this.discoveryUrl = Optional.ofNullable(discoveryUrl); - return this; - } - - @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(ConnectionAttributeMapOidc 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; - } - - @java.lang.Override - public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @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 userinfoEndpoint(String userinfoEndpoint) { - this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) - public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { - this.userinfoEndpoint = userinfoEndpoint; - return this; - } - - @java.lang.Override - public _FinalStage upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - @java.lang.Override - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public _FinalStage upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - @java.lang.Override - public _FinalStage 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; - } - - @java.lang.Override - public _FinalStage tokenEndpointAuthSigningAlg( - Optional tokenEndpointAuthSigningAlg) { - if (tokenEndpointAuthSigningAlg.isPresent()) { - this.tokenEndpointAuthSigningAlg = OptionalNullable.of(tokenEndpointAuthSigningAlg.get()); - } else { - this.tokenEndpointAuthSigningAlg = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage tokenEndpointAuthSigningAlg( - ConnectionTokenEndpointAuthSigningAlgEnum tokenEndpointAuthSigningAlg) { - this.tokenEndpointAuthSigningAlg = OptionalNullable.of(tokenEndpointAuthSigningAlg); - return this; - } - - @java.lang.Override - @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) - public _FinalStage tokenEndpointAuthSigningAlg( - @Nullable OptionalNullable tokenEndpointAuthSigningAlg) { - this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; - return this; - } - - @java.lang.Override - public _FinalStage 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; - } - - @java.lang.Override - public _FinalStage tokenEndpointAuthMethod( - Optional tokenEndpointAuthMethod) { - if (tokenEndpointAuthMethod.isPresent()) { - this.tokenEndpointAuthMethod = OptionalNullable.of(tokenEndpointAuthMethod.get()); - } else { - this.tokenEndpointAuthMethod = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage tokenEndpointAuthMethod(ConnectionTokenEndpointAuthMethodEnum tokenEndpointAuthMethod) { - this.tokenEndpointAuthMethod = OptionalNullable.of(tokenEndpointAuthMethod); - return this; - } - - @java.lang.Override - @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) - public _FinalStage tokenEndpointAuthMethod( - @Nullable OptionalNullable tokenEndpointAuthMethod) { - this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; - return this; - } - - @java.lang.Override - public _FinalStage tokenEndpoint(String tokenEndpoint) { - this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) - public _FinalStage tokenEndpoint(Optional tokenEndpoint) { - this.tokenEndpoint = tokenEndpoint; - 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 setUserRootAttributes(ConnectionSetUserRootAttributesEnum 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 sendBackChannelNonce(Boolean sendBackChannelNonce) { - this.sendBackChannelNonce = Optional.ofNullable(sendBackChannelNonce); - return this; - } - - @java.lang.Override - @JsonSetter(value = "send_back_channel_nonce", nulls = Nulls.SKIP) - public _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce) { - this.sendBackChannelNonce = sendBackChannelNonce; - return this; - } - - @java.lang.Override - public _FinalStage scope(String scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @java.lang.Override - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public _FinalStage scope(Optional scope) { - this.scope = scope; - return this; - } - - @java.lang.Override - public _FinalStage oidcMetadata(ConnectionOptionsOidcMetadata 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; - } - - @java.lang.Override - public _FinalStage jwksUri(String jwksUri) { - this.jwksUri = Optional.ofNullable(jwksUri); - return this; - } - - @java.lang.Override - @JsonSetter(value = "jwks_uri", nulls = Nulls.SKIP) - public _FinalStage jwksUri(Optional jwksUri) { - this.jwksUri = jwksUri; - return this; - } - - @java.lang.Override - public _FinalStage issuer(String issuer) { - this.issuer = Optional.ofNullable(issuer); - return this; - } - - @java.lang.Override - @JsonSetter(value = "issuer", nulls = Nulls.SKIP) - public _FinalStage issuer(Optional issuer) { - this.issuer = issuer; - return this; - } - - @java.lang.Override - public _FinalStage idTokenSignedResponseAlgs( - com.auth0.client.mgmt.core.Nullable> - idTokenSignedResponseAlgs) { - if (idTokenSignedResponseAlgs.isNull()) { - this.idTokenSignedResponseAlgs = OptionalNullable.ofNull(); - } else if (idTokenSignedResponseAlgs.isEmpty()) { - this.idTokenSignedResponseAlgs = OptionalNullable.absent(); - } else { - this.idTokenSignedResponseAlgs = OptionalNullable.of(idTokenSignedResponseAlgs.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage idTokenSignedResponseAlgs( - Optional> idTokenSignedResponseAlgs) { - if (idTokenSignedResponseAlgs.isPresent()) { - this.idTokenSignedResponseAlgs = OptionalNullable.of(idTokenSignedResponseAlgs.get()); - } else { - this.idTokenSignedResponseAlgs = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage idTokenSignedResponseAlgs( - List idTokenSignedResponseAlgs) { - this.idTokenSignedResponseAlgs = OptionalNullable.of(idTokenSignedResponseAlgs); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) - public _FinalStage idTokenSignedResponseAlgs( - @Nullable OptionalNullable> idTokenSignedResponseAlgs) { - this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; - return this; - } - - @java.lang.Override - public _FinalStage iconUrl(String iconUrl) { - this.iconUrl = Optional.ofNullable(iconUrl); - return this; - } - - @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 domainAliases(List domainAliases) { - this.domainAliases = Optional.ofNullable(domainAliases); - return this; - } - - @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 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 connectionSettings(ConnectionConnectionSettings 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; - } - - @java.lang.Override - public _FinalStage clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @java.lang.Override - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public _FinalStage clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - @java.lang.Override - public _FinalStage authorizationEndpoint(String authorizationEndpoint) { - this.authorizationEndpoint = Optional.ofNullable(authorizationEndpoint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authorization_endpoint", nulls = Nulls.SKIP) - public _FinalStage authorizationEndpoint(Optional authorizationEndpoint) { - this.authorizationEndpoint = authorizationEndpoint; - return this; - } - - @java.lang.Override - public ConnectionOptionsOidc build() { - return new ConnectionOptionsOidc( - authorizationEndpoint, - clientId, - clientSecret, - connectionSettings, - federatedConnectionsAccessTokens, - domainAliases, - iconUrl, - idTokenSignedResponseAlgs, - issuer, - jwksUri, - oidcMetadata, - scope, - sendBackChannelNonce, - setUserRootAttributes, - tenantDomain, - tokenEndpoint, - tokenEndpointAuthMethod, - tokenEndpointAuthSigningAlg, - upstreamParams, - userinfoEndpoint, - nonPersistentAttrs, - attributeMap, - discoveryUrl, - type, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidcMetadata.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidcMetadata.java deleted file mode 100644 index dcd3525f6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOidcMetadata.java +++ /dev/null @@ -1,1290 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.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 = ConnectionOptionsOidcMetadata.Builder.class) -public final class ConnectionOptionsOidcMetadata { - 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> displayValuesSupported; - - 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 OptionalNullable> 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 ConnectionOptionsOidcMetadata( - Optional> acrValuesSupported, - String authorizationEndpoint, - Optional> claimTypesSupported, - Optional> claimsLocalesSupported, - Optional claimsParameterSupported, - Optional> claimsSupported, - Optional> displayValuesSupported, - 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, - OptionalNullable> 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.displayValuesSupported = displayValuesSupported; - 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; - } - - @JsonProperty("acr_values_supported") - public Optional> getAcrValuesSupported() { - return acrValuesSupported; - } - - @JsonProperty("authorization_endpoint") - public String getAuthorizationEndpoint() { - return authorizationEndpoint; - } - - @JsonProperty("claim_types_supported") - public Optional> getClaimTypesSupported() { - return claimTypesSupported; - } - - @JsonProperty("claims_locales_supported") - public Optional> getClaimsLocalesSupported() { - return claimsLocalesSupported; - } - - @JsonProperty("claims_parameter_supported") - public Optional getClaimsParameterSupported() { - return claimsParameterSupported; - } - - @JsonProperty("claims_supported") - public Optional> getClaimsSupported() { - return claimsSupported; - } - - @JsonProperty("display_values_supported") - public Optional> getDisplayValuesSupported() { - return displayValuesSupported; - } - - @JsonProperty("end_session_endpoint") - public Optional getEndSessionEndpoint() { - return endSessionEndpoint; - } - - @JsonProperty("grant_types_supported") - public Optional> getGrantTypesSupported() { - return grantTypesSupported; - } - - @JsonProperty("id_token_encryption_alg_values_supported") - public Optional> getIdTokenEncryptionAlgValuesSupported() { - return idTokenEncryptionAlgValuesSupported; - } - - @JsonProperty("id_token_encryption_enc_values_supported") - public Optional> getIdTokenEncryptionEncValuesSupported() { - return idTokenEncryptionEncValuesSupported; - } - - @JsonProperty("id_token_signing_alg_values_supported") - public List getIdTokenSigningAlgValuesSupported() { - return idTokenSigningAlgValuesSupported; - } - - @JsonProperty("issuer") - public String getIssuer() { - return issuer; - } - - @JsonProperty("jwks_uri") - public String getJwksUri() { - return jwksUri; - } - - @JsonProperty("op_policy_uri") - public Optional getOpPolicyUri() { - return opPolicyUri; - } - - @JsonProperty("op_tos_uri") - public Optional getOpTosUri() { - return opTosUri; - } - - @JsonProperty("registration_endpoint") - public Optional getRegistrationEndpoint() { - return registrationEndpoint; - } - - @JsonProperty("request_object_encryption_alg_values_supported") - public Optional> getRequestObjectEncryptionAlgValuesSupported() { - return requestObjectEncryptionAlgValuesSupported; - } - - @JsonProperty("request_object_encryption_enc_values_supported") - public Optional> getRequestObjectEncryptionEncValuesSupported() { - return requestObjectEncryptionEncValuesSupported; - } - - @JsonProperty("request_object_signing_alg_values_supported") - public Optional> getRequestObjectSigningAlgValuesSupported() { - return requestObjectSigningAlgValuesSupported; - } - - @JsonProperty("request_parameter_supported") - public Optional getRequestParameterSupported() { - return requestParameterSupported; - } - - @JsonProperty("request_uri_parameter_supported") - public Optional getRequestUriParameterSupported() { - return requestUriParameterSupported; - } - - @JsonProperty("require_request_uri_registration") - public Optional getRequireRequestUriRegistration() { - return requireRequestUriRegistration; - } - - @JsonProperty("response_modes_supported") - public Optional> getResponseModesSupported() { - return responseModesSupported; - } - - @JsonProperty("response_types_supported") - public Optional> getResponseTypesSupported() { - return responseTypesSupported; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("scopes_supported") - public OptionalNullable> getScopesSupported() { - if (scopesSupported == null) { - return OptionalNullable.absent(); - } - return scopesSupported; - } - - @JsonProperty("service_documentation") - public Optional getServiceDocumentation() { - return serviceDocumentation; - } - - @JsonProperty("subject_types_supported") - public Optional> getSubjectTypesSupported() { - return subjectTypesSupported; - } - - @JsonProperty("token_endpoint") - public Optional getTokenEndpoint() { - return tokenEndpoint; - } - - @JsonProperty("token_endpoint_auth_methods_supported") - public Optional> getTokenEndpointAuthMethodsSupported() { - return tokenEndpointAuthMethodsSupported; - } - - @JsonProperty("token_endpoint_auth_signing_alg_values_supported") - public Optional> getTokenEndpointAuthSigningAlgValuesSupported() { - return tokenEndpointAuthSigningAlgValuesSupported; - } - - @JsonProperty("ui_locales_supported") - public Optional> getUiLocalesSupported() { - return uiLocalesSupported; - } - - @JsonProperty("userinfo_encryption_alg_values_supported") - public Optional> getUserinfoEncryptionAlgValuesSupported() { - return userinfoEncryptionAlgValuesSupported; - } - - @JsonProperty("userinfo_encryption_enc_values_supported") - public Optional> getUserinfoEncryptionEncValuesSupported() { - return userinfoEncryptionEncValuesSupported; - } - - @JsonProperty("userinfo_endpoint") - public Optional getUserinfoEndpoint() { - return userinfoEndpoint; - } - - @JsonProperty("userinfo_signing_alg_values_supported") - public Optional> getUserinfoSigningAlgValuesSupported() { - return userinfoSigningAlgValuesSupported; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("scopes_supported") - private OptionalNullable> _getScopesSupported() { - return scopesSupported; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsOidcMetadata && equalTo((ConnectionOptionsOidcMetadata) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsOidcMetadata 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) - && displayValuesSupported.equals(other.displayValuesSupported) - && 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.displayValuesSupported, - 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 { - IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint); - - Builder from(ConnectionOptionsOidcMetadata other); - } - - public interface IssuerStage { - JwksUriStage issuer(@NotNull String issuer); - } - - public interface JwksUriStage { - _FinalStage jwksUri(@NotNull String jwksUri); - } - - public interface _FinalStage { - ConnectionOptionsOidcMetadata build(); - - _FinalStage acrValuesSupported(Optional> acrValuesSupported); - - _FinalStage acrValuesSupported(List acrValuesSupported); - - _FinalStage claimTypesSupported(Optional> claimTypesSupported); - - _FinalStage claimTypesSupported(List claimTypesSupported); - - _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported); - - _FinalStage claimsLocalesSupported(List claimsLocalesSupported); - - _FinalStage claimsParameterSupported(Optional claimsParameterSupported); - - _FinalStage claimsParameterSupported(Boolean claimsParameterSupported); - - _FinalStage claimsSupported(Optional> claimsSupported); - - _FinalStage claimsSupported(List claimsSupported); - - _FinalStage displayValuesSupported(Optional> displayValuesSupported); - - _FinalStage displayValuesSupported(List displayValuesSupported); - - _FinalStage endSessionEndpoint(Optional endSessionEndpoint); - - _FinalStage endSessionEndpoint(String endSessionEndpoint); - - _FinalStage grantTypesSupported(Optional> grantTypesSupported); - - _FinalStage grantTypesSupported(List grantTypesSupported); - - _FinalStage idTokenEncryptionAlgValuesSupported(Optional> idTokenEncryptionAlgValuesSupported); - - _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported); - - _FinalStage idTokenEncryptionEncValuesSupported(Optional> idTokenEncryptionEncValuesSupported); - - _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported); - - _FinalStage idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); - - _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported); - - _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported); - - _FinalStage opPolicyUri(Optional opPolicyUri); - - _FinalStage opPolicyUri(String opPolicyUri); - - _FinalStage opTosUri(Optional opTosUri); - - _FinalStage opTosUri(String opTosUri); - - _FinalStage registrationEndpoint(Optional registrationEndpoint); - - _FinalStage registrationEndpoint(String registrationEndpoint); - - _FinalStage requestObjectEncryptionAlgValuesSupported( - Optional> requestObjectEncryptionAlgValuesSupported); - - _FinalStage requestObjectEncryptionAlgValuesSupported(List requestObjectEncryptionAlgValuesSupported); - - _FinalStage requestObjectEncryptionEncValuesSupported( - Optional> requestObjectEncryptionEncValuesSupported); - - _FinalStage requestObjectEncryptionEncValuesSupported(List requestObjectEncryptionEncValuesSupported); - - _FinalStage requestObjectSigningAlgValuesSupported( - Optional> requestObjectSigningAlgValuesSupported); - - _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported); - - _FinalStage requestParameterSupported(Optional requestParameterSupported); - - _FinalStage requestParameterSupported(Boolean requestParameterSupported); - - _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported); - - _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported); - - _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration); - - _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration); - - _FinalStage responseModesSupported(Optional> responseModesSupported); - - _FinalStage responseModesSupported(List responseModesSupported); - - _FinalStage responseTypesSupported(Optional> responseTypesSupported); - - _FinalStage responseTypesSupported(List responseTypesSupported); - - _FinalStage scopesSupported(@Nullable OptionalNullable> scopesSupported); - - _FinalStage scopesSupported(List scopesSupported); - - _FinalStage scopesSupported(Optional> scopesSupported); - - _FinalStage scopesSupported(com.auth0.client.mgmt.core.Nullable> scopesSupported); - - _FinalStage serviceDocumentation(Optional serviceDocumentation); - - _FinalStage serviceDocumentation(String serviceDocumentation); - - _FinalStage subjectTypesSupported(Optional> subjectTypesSupported); - - _FinalStage subjectTypesSupported(List subjectTypesSupported); - - _FinalStage tokenEndpoint(Optional tokenEndpoint); - - _FinalStage tokenEndpoint(String tokenEndpoint); - - _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported); - - _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported); - - _FinalStage tokenEndpointAuthSigningAlgValuesSupported( - Optional> tokenEndpointAuthSigningAlgValuesSupported); - - _FinalStage tokenEndpointAuthSigningAlgValuesSupported(List tokenEndpointAuthSigningAlgValuesSupported); - - _FinalStage uiLocalesSupported(Optional> uiLocalesSupported); - - _FinalStage uiLocalesSupported(List uiLocalesSupported); - - _FinalStage userinfoEncryptionAlgValuesSupported(Optional> userinfoEncryptionAlgValuesSupported); - - _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported); - - _FinalStage userinfoEncryptionEncValuesSupported(Optional> userinfoEncryptionEncValuesSupported); - - _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported); - - _FinalStage userinfoEndpoint(Optional userinfoEndpoint); - - _FinalStage userinfoEndpoint(String userinfoEndpoint); - - _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 OptionalNullable> scopesSupported = OptionalNullable.absent(); - - 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> displayValuesSupported = 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(ConnectionOptionsOidcMetadata other) { - acrValuesSupported(other.getAcrValuesSupported()); - authorizationEndpoint(other.getAuthorizationEndpoint()); - claimTypesSupported(other.getClaimTypesSupported()); - claimsLocalesSupported(other.getClaimsLocalesSupported()); - claimsParameterSupported(other.getClaimsParameterSupported()); - claimsSupported(other.getClaimsSupported()); - displayValuesSupported(other.getDisplayValuesSupported()); - 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; - } - - @java.lang.Override - @JsonSetter("authorization_endpoint") - public IssuerStage authorizationEndpoint(@NotNull String authorizationEndpoint) { - this.authorizationEndpoint = - Objects.requireNonNull(authorizationEndpoint, "authorizationEndpoint must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("issuer") - public JwksUriStage issuer(@NotNull String issuer) { - this.issuer = Objects.requireNonNull(issuer, "issuer must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("jwks_uri") - public _FinalStage jwksUri(@NotNull String jwksUri) { - this.jwksUri = Objects.requireNonNull(jwksUri, "jwksUri must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { - this.userinfoSigningAlgValuesSupported = Optional.ofNullable(userinfoSigningAlgValuesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "userinfo_signing_alg_values_supported", nulls = Nulls.SKIP) - public _FinalStage userinfoSigningAlgValuesSupported(Optional> userinfoSigningAlgValuesSupported) { - this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; - return this; - } - - @java.lang.Override - public _FinalStage userinfoEndpoint(String userinfoEndpoint) { - this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) - public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { - this.userinfoEndpoint = userinfoEndpoint; - return this; - } - - @java.lang.Override - public _FinalStage userinfoEncryptionEncValuesSupported(List userinfoEncryptionEncValuesSupported) { - this.userinfoEncryptionEncValuesSupported = Optional.ofNullable(userinfoEncryptionEncValuesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "userinfo_encryption_enc_values_supported", nulls = Nulls.SKIP) - public _FinalStage userinfoEncryptionEncValuesSupported( - Optional> userinfoEncryptionEncValuesSupported) { - this.userinfoEncryptionEncValuesSupported = userinfoEncryptionEncValuesSupported; - return this; - } - - @java.lang.Override - public _FinalStage userinfoEncryptionAlgValuesSupported(List userinfoEncryptionAlgValuesSupported) { - this.userinfoEncryptionAlgValuesSupported = Optional.ofNullable(userinfoEncryptionAlgValuesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "userinfo_encryption_alg_values_supported", nulls = Nulls.SKIP) - public _FinalStage userinfoEncryptionAlgValuesSupported( - Optional> userinfoEncryptionAlgValuesSupported) { - this.userinfoEncryptionAlgValuesSupported = userinfoEncryptionAlgValuesSupported; - return this; - } - - @java.lang.Override - public _FinalStage uiLocalesSupported(List uiLocalesSupported) { - this.uiLocalesSupported = Optional.ofNullable(uiLocalesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "ui_locales_supported", nulls = Nulls.SKIP) - public _FinalStage uiLocalesSupported(Optional> uiLocalesSupported) { - this.uiLocalesSupported = uiLocalesSupported; - return this; - } - - @java.lang.Override - public _FinalStage tokenEndpointAuthSigningAlgValuesSupported( - List tokenEndpointAuthSigningAlgValuesSupported) { - this.tokenEndpointAuthSigningAlgValuesSupported = - Optional.ofNullable(tokenEndpointAuthSigningAlgValuesSupported); - return this; - } - - @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; - } - - @java.lang.Override - public _FinalStage tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { - this.tokenEndpointAuthMethodsSupported = Optional.ofNullable(tokenEndpointAuthMethodsSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "token_endpoint_auth_methods_supported", nulls = Nulls.SKIP) - public _FinalStage tokenEndpointAuthMethodsSupported(Optional> tokenEndpointAuthMethodsSupported) { - this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; - return this; - } - - @java.lang.Override - public _FinalStage tokenEndpoint(String tokenEndpoint) { - this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) - public _FinalStage tokenEndpoint(Optional tokenEndpoint) { - this.tokenEndpoint = tokenEndpoint; - return this; - } - - @java.lang.Override - public _FinalStage subjectTypesSupported(List subjectTypesSupported) { - this.subjectTypesSupported = Optional.ofNullable(subjectTypesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "subject_types_supported", nulls = Nulls.SKIP) - public _FinalStage subjectTypesSupported(Optional> subjectTypesSupported) { - this.subjectTypesSupported = subjectTypesSupported; - return this; - } - - @java.lang.Override - public _FinalStage serviceDocumentation(String serviceDocumentation) { - this.serviceDocumentation = Optional.ofNullable(serviceDocumentation); - return this; - } - - @java.lang.Override - @JsonSetter(value = "service_documentation", nulls = Nulls.SKIP) - public _FinalStage serviceDocumentation(Optional serviceDocumentation) { - this.serviceDocumentation = serviceDocumentation; - return this; - } - - @java.lang.Override - public _FinalStage 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; - } - - @java.lang.Override - public _FinalStage scopesSupported(Optional> scopesSupported) { - if (scopesSupported.isPresent()) { - this.scopesSupported = OptionalNullable.of(scopesSupported.get()); - } else { - this.scopesSupported = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage scopesSupported(List scopesSupported) { - this.scopesSupported = OptionalNullable.of(scopesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "scopes_supported", nulls = Nulls.SKIP) - public _FinalStage scopesSupported(@Nullable OptionalNullable> scopesSupported) { - this.scopesSupported = scopesSupported; - return this; - } - - @java.lang.Override - public _FinalStage responseTypesSupported(List responseTypesSupported) { - this.responseTypesSupported = Optional.ofNullable(responseTypesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "response_types_supported", nulls = Nulls.SKIP) - public _FinalStage responseTypesSupported(Optional> responseTypesSupported) { - this.responseTypesSupported = responseTypesSupported; - return this; - } - - @java.lang.Override - public _FinalStage responseModesSupported(List responseModesSupported) { - this.responseModesSupported = Optional.ofNullable(responseModesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "response_modes_supported", nulls = Nulls.SKIP) - public _FinalStage responseModesSupported(Optional> responseModesSupported) { - this.responseModesSupported = responseModesSupported; - return this; - } - - @java.lang.Override - public _FinalStage requireRequestUriRegistration(Boolean requireRequestUriRegistration) { - this.requireRequestUriRegistration = Optional.ofNullable(requireRequestUriRegistration); - return this; - } - - @java.lang.Override - @JsonSetter(value = "require_request_uri_registration", nulls = Nulls.SKIP) - public _FinalStage requireRequestUriRegistration(Optional requireRequestUriRegistration) { - this.requireRequestUriRegistration = requireRequestUriRegistration; - return this; - } - - @java.lang.Override - public _FinalStage requestUriParameterSupported(Boolean requestUriParameterSupported) { - this.requestUriParameterSupported = Optional.ofNullable(requestUriParameterSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "request_uri_parameter_supported", nulls = Nulls.SKIP) - public _FinalStage requestUriParameterSupported(Optional requestUriParameterSupported) { - this.requestUriParameterSupported = requestUriParameterSupported; - return this; - } - - @java.lang.Override - public _FinalStage requestParameterSupported(Boolean requestParameterSupported) { - this.requestParameterSupported = Optional.ofNullable(requestParameterSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "request_parameter_supported", nulls = Nulls.SKIP) - public _FinalStage requestParameterSupported(Optional requestParameterSupported) { - this.requestParameterSupported = requestParameterSupported; - return this; - } - - @java.lang.Override - public _FinalStage requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { - this.requestObjectSigningAlgValuesSupported = Optional.ofNullable(requestObjectSigningAlgValuesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "request_object_signing_alg_values_supported", nulls = Nulls.SKIP) - public _FinalStage requestObjectSigningAlgValuesSupported( - Optional> requestObjectSigningAlgValuesSupported) { - this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; - return this; - } - - @java.lang.Override - public _FinalStage requestObjectEncryptionEncValuesSupported( - List requestObjectEncryptionEncValuesSupported) { - this.requestObjectEncryptionEncValuesSupported = - Optional.ofNullable(requestObjectEncryptionEncValuesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "request_object_encryption_enc_values_supported", nulls = Nulls.SKIP) - public _FinalStage requestObjectEncryptionEncValuesSupported( - Optional> requestObjectEncryptionEncValuesSupported) { - this.requestObjectEncryptionEncValuesSupported = requestObjectEncryptionEncValuesSupported; - return this; - } - - @java.lang.Override - public _FinalStage requestObjectEncryptionAlgValuesSupported( - List requestObjectEncryptionAlgValuesSupported) { - this.requestObjectEncryptionAlgValuesSupported = - Optional.ofNullable(requestObjectEncryptionAlgValuesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "request_object_encryption_alg_values_supported", nulls = Nulls.SKIP) - public _FinalStage requestObjectEncryptionAlgValuesSupported( - Optional> requestObjectEncryptionAlgValuesSupported) { - this.requestObjectEncryptionAlgValuesSupported = requestObjectEncryptionAlgValuesSupported; - return this; - } - - @java.lang.Override - public _FinalStage registrationEndpoint(String registrationEndpoint) { - this.registrationEndpoint = Optional.ofNullable(registrationEndpoint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "registration_endpoint", nulls = Nulls.SKIP) - public _FinalStage registrationEndpoint(Optional registrationEndpoint) { - this.registrationEndpoint = registrationEndpoint; - return this; - } - - @java.lang.Override - public _FinalStage opTosUri(String opTosUri) { - this.opTosUri = Optional.ofNullable(opTosUri); - return this; - } - - @java.lang.Override - @JsonSetter(value = "op_tos_uri", nulls = Nulls.SKIP) - public _FinalStage opTosUri(Optional opTosUri) { - this.opTosUri = opTosUri; - return this; - } - - @java.lang.Override - public _FinalStage opPolicyUri(String opPolicyUri) { - this.opPolicyUri = Optional.ofNullable(opPolicyUri); - return this; - } - - @java.lang.Override - @JsonSetter(value = "op_policy_uri", nulls = Nulls.SKIP) - public _FinalStage opPolicyUri(Optional opPolicyUri) { - this.opPolicyUri = opPolicyUri; - return this; - } - - @java.lang.Override - public _FinalStage addAllIdTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { - if (idTokenSigningAlgValuesSupported != null) { - this.idTokenSigningAlgValuesSupported.addAll(idTokenSigningAlgValuesSupported); - } - return this; - } - - @java.lang.Override - public _FinalStage addIdTokenSigningAlgValuesSupported(String idTokenSigningAlgValuesSupported) { - this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupported); - return this; - } - - @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; - } - - @java.lang.Override - public _FinalStage idTokenEncryptionEncValuesSupported(List idTokenEncryptionEncValuesSupported) { - this.idTokenEncryptionEncValuesSupported = Optional.ofNullable(idTokenEncryptionEncValuesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id_token_encryption_enc_values_supported", nulls = Nulls.SKIP) - public _FinalStage idTokenEncryptionEncValuesSupported( - Optional> idTokenEncryptionEncValuesSupported) { - this.idTokenEncryptionEncValuesSupported = idTokenEncryptionEncValuesSupported; - return this; - } - - @java.lang.Override - public _FinalStage idTokenEncryptionAlgValuesSupported(List idTokenEncryptionAlgValuesSupported) { - this.idTokenEncryptionAlgValuesSupported = Optional.ofNullable(idTokenEncryptionAlgValuesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id_token_encryption_alg_values_supported", nulls = Nulls.SKIP) - public _FinalStage idTokenEncryptionAlgValuesSupported( - Optional> idTokenEncryptionAlgValuesSupported) { - this.idTokenEncryptionAlgValuesSupported = idTokenEncryptionAlgValuesSupported; - return this; - } - - @java.lang.Override - public _FinalStage grantTypesSupported(List grantTypesSupported) { - this.grantTypesSupported = Optional.ofNullable(grantTypesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "grant_types_supported", nulls = Nulls.SKIP) - public _FinalStage grantTypesSupported(Optional> grantTypesSupported) { - this.grantTypesSupported = grantTypesSupported; - return this; - } - - @java.lang.Override - public _FinalStage endSessionEndpoint(String endSessionEndpoint) { - this.endSessionEndpoint = Optional.ofNullable(endSessionEndpoint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "end_session_endpoint", nulls = Nulls.SKIP) - public _FinalStage endSessionEndpoint(Optional endSessionEndpoint) { - this.endSessionEndpoint = endSessionEndpoint; - return this; - } - - @java.lang.Override - public _FinalStage displayValuesSupported(List displayValuesSupported) { - this.displayValuesSupported = Optional.ofNullable(displayValuesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_values_supported", nulls = Nulls.SKIP) - public _FinalStage displayValuesSupported(Optional> displayValuesSupported) { - this.displayValuesSupported = displayValuesSupported; - return this; - } - - @java.lang.Override - public _FinalStage claimsSupported(List claimsSupported) { - this.claimsSupported = Optional.ofNullable(claimsSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "claims_supported", nulls = Nulls.SKIP) - public _FinalStage claimsSupported(Optional> claimsSupported) { - this.claimsSupported = claimsSupported; - return this; - } - - @java.lang.Override - public _FinalStage claimsParameterSupported(Boolean claimsParameterSupported) { - this.claimsParameterSupported = Optional.ofNullable(claimsParameterSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "claims_parameter_supported", nulls = Nulls.SKIP) - public _FinalStage claimsParameterSupported(Optional claimsParameterSupported) { - this.claimsParameterSupported = claimsParameterSupported; - return this; - } - - @java.lang.Override - public _FinalStage claimsLocalesSupported(List claimsLocalesSupported) { - this.claimsLocalesSupported = Optional.ofNullable(claimsLocalesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "claims_locales_supported", nulls = Nulls.SKIP) - public _FinalStage claimsLocalesSupported(Optional> claimsLocalesSupported) { - this.claimsLocalesSupported = claimsLocalesSupported; - return this; - } - - @java.lang.Override - public _FinalStage claimTypesSupported(List claimTypesSupported) { - this.claimTypesSupported = Optional.ofNullable(claimTypesSupported); - return this; - } - - @java.lang.Override - @JsonSetter(value = "claim_types_supported", nulls = Nulls.SKIP) - public _FinalStage claimTypesSupported(Optional> claimTypesSupported) { - this.claimTypesSupported = claimTypesSupported; - return this; - } - - @java.lang.Override - public _FinalStage acrValuesSupported(List acrValuesSupported) { - this.acrValuesSupported = Optional.ofNullable(acrValuesSupported); - return this; - } - - @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 ConnectionOptionsOidcMetadata build() { - return new ConnectionOptionsOidcMetadata( - acrValuesSupported, - authorizationEndpoint, - claimTypesSupported, - claimsLocalesSupported, - claimsParameterSupported, - claimsSupported, - displayValuesSupported, - 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); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOkta.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOkta.java deleted file mode 100644 index f772f4dec..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsOkta.java +++ /dev/null @@ -1,1108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsOkta.Builder.class) -public final class ConnectionOptionsOkta implements IConnectionOptionsCommon, IConnectionOptionsCommonOidc { - private final Optional> nonPersistentAttrs; - - private final Optional authorizationEndpoint; - - private final String clientId; - - private final Optional clientSecret; - - private final Optional connectionSettings; - - private final OptionalNullable federatedConnectionsAccessTokens; - - private final Optional> domainAliases; - - private final Optional iconUrl; - - private final OptionalNullable> idTokenSignedResponseAlgs; - - private final Optional issuer; - - private final Optional jwksUri; - - private final Optional oidcMetadata; - - private final Optional scope; - - private final Optional sendBackChannelNonce; - - private final Optional setUserRootAttributes; - - private final Optional tenantDomain; - - private final Optional tokenEndpoint; - - private final OptionalNullable tokenEndpointAuthMethod; - - private final OptionalNullable tokenEndpointAuthSigningAlg; - - private final OptionalNullable>> - upstreamParams; - - private final Optional userinfoEndpoint; - - private final Optional attributeMap; - - private final Optional domain; - - private final Optional type; - - private final Map additionalProperties; - - private ConnectionOptionsOkta( - Optional> nonPersistentAttrs, - Optional authorizationEndpoint, - String clientId, - Optional clientSecret, - Optional connectionSettings, - OptionalNullable federatedConnectionsAccessTokens, - Optional> domainAliases, - Optional iconUrl, - OptionalNullable> idTokenSignedResponseAlgs, - Optional issuer, - Optional jwksUri, - Optional oidcMetadata, - Optional scope, - Optional sendBackChannelNonce, - Optional setUserRootAttributes, - Optional tenantDomain, - Optional tokenEndpoint, - OptionalNullable tokenEndpointAuthMethod, - OptionalNullable tokenEndpointAuthSigningAlg, - OptionalNullable>> upstreamParams, - Optional userinfoEndpoint, - Optional attributeMap, - Optional domain, - Optional type, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.authorizationEndpoint = authorizationEndpoint; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.connectionSettings = connectionSettings; - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; - this.domainAliases = domainAliases; - this.iconUrl = iconUrl; - this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; - this.issuer = issuer; - this.jwksUri = jwksUri; - this.oidcMetadata = oidcMetadata; - this.scope = scope; - this.sendBackChannelNonce = sendBackChannelNonce; - this.setUserRootAttributes = setUserRootAttributes; - this.tenantDomain = tenantDomain; - this.tokenEndpoint = tokenEndpoint; - this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; - this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; - this.upstreamParams = upstreamParams; - this.userinfoEndpoint = userinfoEndpoint; - this.attributeMap = attributeMap; - this.domain = domain; - this.type = type; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("authorization_endpoint") - @java.lang.Override - public Optional getAuthorizationEndpoint() { - return authorizationEndpoint; - } - - @JsonProperty("client_id") - @java.lang.Override - public String getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("connection_settings") - @java.lang.Override - public Optional getConnectionSettings() { - return connectionSettings; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") - @java.lang.Override - public OptionalNullable getFederatedConnectionsAccessTokens() { - if (federatedConnectionsAccessTokens == null) { - return OptionalNullable.absent(); - } - return federatedConnectionsAccessTokens; - } - - @JsonProperty("domain_aliases") - @java.lang.Override - public Optional> getDomainAliases() { - return domainAliases; - } - - @JsonProperty("icon_url") - @java.lang.Override - public Optional getIconUrl() { - return iconUrl; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("id_token_signed_response_algs") - @java.lang.Override - public OptionalNullable> getIdTokenSignedResponseAlgs() { - if (idTokenSignedResponseAlgs == null) { - return OptionalNullable.absent(); - } - return idTokenSignedResponseAlgs; - } - - @JsonProperty("issuer") - @java.lang.Override - public Optional getIssuer() { - return issuer; - } - - @JsonProperty("jwks_uri") - @java.lang.Override - public Optional getJwksUri() { - return jwksUri; - } - - @JsonProperty("oidc_metadata") - @java.lang.Override - public Optional getOidcMetadata() { - return oidcMetadata; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("send_back_channel_nonce") - @java.lang.Override - public Optional getSendBackChannelNonce() { - return sendBackChannelNonce; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonProperty("tenant_domain") - @java.lang.Override - public Optional getTenantDomain() { - return tenantDomain; - } - - @JsonProperty("token_endpoint") - @java.lang.Override - public Optional getTokenEndpoint() { - return tokenEndpoint; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("token_endpoint_auth_method") - @java.lang.Override - 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") - @java.lang.Override - public OptionalNullable getTokenEndpointAuthSigningAlg() { - if (tokenEndpointAuthSigningAlg == null) { - return OptionalNullable.absent(); - } - return tokenEndpointAuthSigningAlg; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("userinfo_endpoint") - @java.lang.Override - public Optional getUserinfoEndpoint() { - return userinfoEndpoint; - } - - @JsonProperty("attribute_map") - public Optional getAttributeMap() { - return attributeMap; - } - - @JsonProperty("domain") - public Optional getDomain() { - return domain; - } - - @JsonProperty("type") - 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() { - return idTokenSignedResponseAlgs; - } - - @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; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsOkta && equalTo((ConnectionOptionsOkta) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsOkta other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && authorizationEndpoint.equals(other.authorizationEndpoint) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && connectionSettings.equals(other.connectionSettings) - && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens) - && domainAliases.equals(other.domainAliases) - && iconUrl.equals(other.iconUrl) - && idTokenSignedResponseAlgs.equals(other.idTokenSignedResponseAlgs) - && issuer.equals(other.issuer) - && jwksUri.equals(other.jwksUri) - && oidcMetadata.equals(other.oidcMetadata) - && 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) - && upstreamParams.equals(other.upstreamParams) - && 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.nonPersistentAttrs, - this.authorizationEndpoint, - this.clientId, - this.clientSecret, - this.connectionSettings, - this.federatedConnectionsAccessTokens, - this.domainAliases, - this.iconUrl, - this.idTokenSignedResponseAlgs, - this.issuer, - this.jwksUri, - this.oidcMetadata, - this.scope, - this.sendBackChannelNonce, - this.setUserRootAttributes, - this.tenantDomain, - this.tokenEndpoint, - this.tokenEndpointAuthMethod, - this.tokenEndpointAuthSigningAlg, - this.upstreamParams, - 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 { - _FinalStage clientId(@NotNull String clientId); - - Builder from(ConnectionOptionsOkta other); - } - - public interface _FinalStage { - ConnectionOptionsOkta build(); - - _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); - - _FinalStage nonPersistentAttrs(List nonPersistentAttrs); - - _FinalStage authorizationEndpoint(Optional authorizationEndpoint); - - _FinalStage authorizationEndpoint(String authorizationEndpoint); - - _FinalStage clientSecret(Optional clientSecret); - - _FinalStage clientSecret(String clientSecret); - - _FinalStage connectionSettings(Optional connectionSettings); - - _FinalStage connectionSettings(ConnectionConnectionSettings connectionSettings); - - _FinalStage federatedConnectionsAccessTokens( - @Nullable - OptionalNullable federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - ConnectionFederatedConnectionsAccessTokens federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - Optional federatedConnectionsAccessTokens); - - _FinalStage federatedConnectionsAccessTokens( - com.auth0.client.mgmt.core.Nullable - federatedConnectionsAccessTokens); - - _FinalStage domainAliases(Optional> domainAliases); - - _FinalStage domainAliases(List domainAliases); - - _FinalStage iconUrl(Optional iconUrl); - - _FinalStage iconUrl(String iconUrl); - - _FinalStage idTokenSignedResponseAlgs( - @Nullable OptionalNullable> idTokenSignedResponseAlgs); - - _FinalStage idTokenSignedResponseAlgs(List idTokenSignedResponseAlgs); - - _FinalStage idTokenSignedResponseAlgs( - Optional> idTokenSignedResponseAlgs); - - _FinalStage idTokenSignedResponseAlgs( - com.auth0.client.mgmt.core.Nullable> - idTokenSignedResponseAlgs); - - _FinalStage issuer(Optional issuer); - - _FinalStage issuer(String issuer); - - _FinalStage jwksUri(Optional jwksUri); - - _FinalStage jwksUri(String jwksUri); - - _FinalStage oidcMetadata(Optional oidcMetadata); - - _FinalStage oidcMetadata(ConnectionOptionsOidcMetadata oidcMetadata); - - _FinalStage scope(Optional scope); - - _FinalStage scope(String scope); - - _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce); - - _FinalStage sendBackChannelNonce(Boolean sendBackChannelNonce); - - _FinalStage setUserRootAttributes(Optional setUserRootAttributes); - - _FinalStage setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes); - - _FinalStage tenantDomain(Optional tenantDomain); - - _FinalStage tenantDomain(String tenantDomain); - - _FinalStage tokenEndpoint(Optional tokenEndpoint); - - _FinalStage tokenEndpoint(String tokenEndpoint); - - _FinalStage tokenEndpointAuthMethod( - @Nullable OptionalNullable tokenEndpointAuthMethod); - - _FinalStage tokenEndpointAuthMethod(ConnectionTokenEndpointAuthMethodEnum tokenEndpointAuthMethod); - - _FinalStage tokenEndpointAuthMethod(Optional tokenEndpointAuthMethod); - - _FinalStage tokenEndpointAuthMethod( - com.auth0.client.mgmt.core.Nullable tokenEndpointAuthMethod); - - _FinalStage tokenEndpointAuthSigningAlg( - @Nullable OptionalNullable tokenEndpointAuthSigningAlg); - - _FinalStage tokenEndpointAuthSigningAlg(ConnectionTokenEndpointAuthSigningAlgEnum tokenEndpointAuthSigningAlg); - - _FinalStage tokenEndpointAuthSigningAlg( - Optional tokenEndpointAuthSigningAlg); - - _FinalStage tokenEndpointAuthSigningAlg( - com.auth0.client.mgmt.core.Nullable - tokenEndpointAuthSigningAlg); - - _FinalStage upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams); - - _FinalStage upstreamParams( - Map> upstreamParams); - - _FinalStage upstreamParams( - Optional>> upstreamParams); - - _FinalStage upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams); - - _FinalStage userinfoEndpoint(Optional userinfoEndpoint); - - _FinalStage userinfoEndpoint(String userinfoEndpoint); - - _FinalStage attributeMap(Optional attributeMap); - - _FinalStage attributeMap(ConnectionAttributeMapOkta attributeMap); - - _FinalStage domain(Optional domain); - - _FinalStage domain(String domain); - - _FinalStage type(Optional type); - - _FinalStage type(ConnectionTypeEnumOkta 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 OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private OptionalNullable tokenEndpointAuthSigningAlg = - OptionalNullable.absent(); - - private OptionalNullable tokenEndpointAuthMethod = - OptionalNullable.absent(); - - 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 oidcMetadata = Optional.empty(); - - private Optional jwksUri = Optional.empty(); - - private Optional issuer = Optional.empty(); - - private OptionalNullable> idTokenSignedResponseAlgs = - OptionalNullable.absent(); - - private Optional iconUrl = Optional.empty(); - - private Optional> domainAliases = Optional.empty(); - - private OptionalNullable federatedConnectionsAccessTokens = - OptionalNullable.absent(); - - private Optional connectionSettings = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional authorizationEndpoint = Optional.empty(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionOptionsOkta other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - authorizationEndpoint(other.getAuthorizationEndpoint()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - connectionSettings(other.getConnectionSettings()); - federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); - domainAliases(other.getDomainAliases()); - iconUrl(other.getIconUrl()); - idTokenSignedResponseAlgs(other.getIdTokenSignedResponseAlgs()); - issuer(other.getIssuer()); - jwksUri(other.getJwksUri()); - oidcMetadata(other.getOidcMetadata()); - scope(other.getScope()); - sendBackChannelNonce(other.getSendBackChannelNonce()); - setUserRootAttributes(other.getSetUserRootAttributes()); - tenantDomain(other.getTenantDomain()); - tokenEndpoint(other.getTokenEndpoint()); - tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); - tokenEndpointAuthSigningAlg(other.getTokenEndpointAuthSigningAlg()); - upstreamParams(other.getUpstreamParams()); - userinfoEndpoint(other.getUserinfoEndpoint()); - attributeMap(other.getAttributeMap()); - domain(other.getDomain()); - type(other.getType()); - 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 _FinalStage type(ConnectionTypeEnumOkta 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; - } - - @java.lang.Override - public _FinalStage domain(String domain) { - this.domain = Optional.ofNullable(domain); - return this; - } - - @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(ConnectionAttributeMapOkta 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; - } - - @java.lang.Override - public _FinalStage userinfoEndpoint(String userinfoEndpoint) { - this.userinfoEndpoint = Optional.ofNullable(userinfoEndpoint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "userinfo_endpoint", nulls = Nulls.SKIP) - public _FinalStage userinfoEndpoint(Optional userinfoEndpoint) { - this.userinfoEndpoint = userinfoEndpoint; - return this; - } - - @java.lang.Override - public _FinalStage upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - @java.lang.Override - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public _FinalStage upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - @java.lang.Override - public _FinalStage 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; - } - - @java.lang.Override - public _FinalStage tokenEndpointAuthSigningAlg( - Optional tokenEndpointAuthSigningAlg) { - if (tokenEndpointAuthSigningAlg.isPresent()) { - this.tokenEndpointAuthSigningAlg = OptionalNullable.of(tokenEndpointAuthSigningAlg.get()); - } else { - this.tokenEndpointAuthSigningAlg = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage tokenEndpointAuthSigningAlg( - ConnectionTokenEndpointAuthSigningAlgEnum tokenEndpointAuthSigningAlg) { - this.tokenEndpointAuthSigningAlg = OptionalNullable.of(tokenEndpointAuthSigningAlg); - return this; - } - - @java.lang.Override - @JsonSetter(value = "token_endpoint_auth_signing_alg", nulls = Nulls.SKIP) - public _FinalStage tokenEndpointAuthSigningAlg( - @Nullable OptionalNullable tokenEndpointAuthSigningAlg) { - this.tokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; - return this; - } - - @java.lang.Override - public _FinalStage 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; - } - - @java.lang.Override - public _FinalStage tokenEndpointAuthMethod( - Optional tokenEndpointAuthMethod) { - if (tokenEndpointAuthMethod.isPresent()) { - this.tokenEndpointAuthMethod = OptionalNullable.of(tokenEndpointAuthMethod.get()); - } else { - this.tokenEndpointAuthMethod = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage tokenEndpointAuthMethod(ConnectionTokenEndpointAuthMethodEnum tokenEndpointAuthMethod) { - this.tokenEndpointAuthMethod = OptionalNullable.of(tokenEndpointAuthMethod); - return this; - } - - @java.lang.Override - @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) - public _FinalStage tokenEndpointAuthMethod( - @Nullable OptionalNullable tokenEndpointAuthMethod) { - this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; - return this; - } - - @java.lang.Override - public _FinalStage tokenEndpoint(String tokenEndpoint) { - this.tokenEndpoint = Optional.ofNullable(tokenEndpoint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "token_endpoint", nulls = Nulls.SKIP) - public _FinalStage tokenEndpoint(Optional tokenEndpoint) { - this.tokenEndpoint = tokenEndpoint; - 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 setUserRootAttributes(ConnectionSetUserRootAttributesEnum 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 sendBackChannelNonce(Boolean sendBackChannelNonce) { - this.sendBackChannelNonce = Optional.ofNullable(sendBackChannelNonce); - return this; - } - - @java.lang.Override - @JsonSetter(value = "send_back_channel_nonce", nulls = Nulls.SKIP) - public _FinalStage sendBackChannelNonce(Optional sendBackChannelNonce) { - this.sendBackChannelNonce = sendBackChannelNonce; - return this; - } - - @java.lang.Override - public _FinalStage scope(String scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @java.lang.Override - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public _FinalStage scope(Optional scope) { - this.scope = scope; - return this; - } - - @java.lang.Override - public _FinalStage oidcMetadata(ConnectionOptionsOidcMetadata 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; - } - - @java.lang.Override - public _FinalStage jwksUri(String jwksUri) { - this.jwksUri = Optional.ofNullable(jwksUri); - return this; - } - - @java.lang.Override - @JsonSetter(value = "jwks_uri", nulls = Nulls.SKIP) - public _FinalStage jwksUri(Optional jwksUri) { - this.jwksUri = jwksUri; - return this; - } - - @java.lang.Override - public _FinalStage issuer(String issuer) { - this.issuer = Optional.ofNullable(issuer); - return this; - } - - @java.lang.Override - @JsonSetter(value = "issuer", nulls = Nulls.SKIP) - public _FinalStage issuer(Optional issuer) { - this.issuer = issuer; - return this; - } - - @java.lang.Override - public _FinalStage idTokenSignedResponseAlgs( - com.auth0.client.mgmt.core.Nullable> - idTokenSignedResponseAlgs) { - if (idTokenSignedResponseAlgs.isNull()) { - this.idTokenSignedResponseAlgs = OptionalNullable.ofNull(); - } else if (idTokenSignedResponseAlgs.isEmpty()) { - this.idTokenSignedResponseAlgs = OptionalNullable.absent(); - } else { - this.idTokenSignedResponseAlgs = OptionalNullable.of(idTokenSignedResponseAlgs.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage idTokenSignedResponseAlgs( - Optional> idTokenSignedResponseAlgs) { - if (idTokenSignedResponseAlgs.isPresent()) { - this.idTokenSignedResponseAlgs = OptionalNullable.of(idTokenSignedResponseAlgs.get()); - } else { - this.idTokenSignedResponseAlgs = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage idTokenSignedResponseAlgs( - List idTokenSignedResponseAlgs) { - this.idTokenSignedResponseAlgs = OptionalNullable.of(idTokenSignedResponseAlgs); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id_token_signed_response_algs", nulls = Nulls.SKIP) - public _FinalStage idTokenSignedResponseAlgs( - @Nullable OptionalNullable> idTokenSignedResponseAlgs) { - this.idTokenSignedResponseAlgs = idTokenSignedResponseAlgs; - return this; - } - - @java.lang.Override - public _FinalStage iconUrl(String iconUrl) { - this.iconUrl = Optional.ofNullable(iconUrl); - return this; - } - - @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 domainAliases(List domainAliases) { - this.domainAliases = Optional.ofNullable(domainAliases); - return this; - } - - @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 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 connectionSettings(ConnectionConnectionSettings 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; - } - - @java.lang.Override - public _FinalStage clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @java.lang.Override - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public _FinalStage clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - @java.lang.Override - public _FinalStage authorizationEndpoint(String authorizationEndpoint) { - this.authorizationEndpoint = Optional.ofNullable(authorizationEndpoint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authorization_endpoint", nulls = Nulls.SKIP) - public _FinalStage authorizationEndpoint(Optional authorizationEndpoint) { - this.authorizationEndpoint = authorizationEndpoint; - return this; - } - - @java.lang.Override - public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @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 ConnectionOptionsOkta build() { - return new ConnectionOptionsOkta( - nonPersistentAttrs, - authorizationEndpoint, - clientId, - clientSecret, - connectionSettings, - federatedConnectionsAccessTokens, - domainAliases, - iconUrl, - idTokenSignedResponseAlgs, - issuer, - jwksUri, - oidcMetadata, - scope, - sendBackChannelNonce, - setUserRootAttributes, - tenantDomain, - tokenEndpoint, - tokenEndpointAuthMethod, - tokenEndpointAuthSigningAlg, - upstreamParams, - userinfoEndpoint, - attributeMap, - domain, - type, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPaypal.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPaypal.java deleted file mode 100644 index 44937f7ad..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPaypal.java +++ /dev/null @@ -1,360 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionOptionsPaypal.Builder.class) -public final class ConnectionOptionsPaypal implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional> freeformScopes; - - private final Optional> scope; - - private final Optional setUserRootAttributes; - - private final Optional address; - - private final Optional email; - - private final Optional phone; - - private final Optional profile; - - private final Map additionalProperties; - - private ConnectionOptionsPaypal( - Optional> nonPersistentAttrs, - Optional clientId, - Optional clientSecret, - Optional> freeformScopes, - Optional> scope, - Optional setUserRootAttributes, - Optional address, - Optional email, - Optional phone, - Optional profile, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.freeformScopes = freeformScopes; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.address = address; - this.email = email; - this.phone = phone; - this.profile = profile; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("freeform_scopes") - public Optional> getFreeformScopes() { - return freeformScopes; - } - - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - /** - * @return When enabled, requests the 'address' scope from PayPal to access the user's address information. - */ - @JsonProperty("address") - public Optional getAddress() { - return address; - } - - /** - * @return When enabled, requests the 'email' scope from PayPal to access the user's email address. - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - /** - * @return When enabled, requests the 'phone' scope from PayPal to access the user's phone number. - */ - @JsonProperty("phone") - public Optional getPhone() { - return phone; - } - - /** - * @return When enabled, requests the 'profile' scope from PayPal to access basic profile information including first name, last name, date of birth, time zone, locale, and language. This scope is always enabled by the system. - */ - @JsonProperty("profile") - public Optional getProfile() { - return profile; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsPaypal && equalTo((ConnectionOptionsPaypal) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsPaypal other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && freeformScopes.equals(other.freeformScopes) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && address.equals(other.address) - && email.equals(other.email) - && phone.equals(other.phone) - && profile.equals(other.profile); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.nonPersistentAttrs, - this.clientId, - this.clientSecret, - this.freeformScopes, - this.scope, - this.setUserRootAttributes, - this.address, - this.email, - this.phone, - this.profile); - } - - @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> nonPersistentAttrs = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional> freeformScopes = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private Optional address = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional phone = Optional.empty(); - - private Optional profile = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsPaypal other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - freeformScopes(other.getFreeformScopes()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - address(other.getAddress()); - email(other.getEmail()); - phone(other.getPhone()); - profile(other.getProfile()); - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @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 = "freeform_scopes", nulls = Nulls.SKIP) - public Builder freeformScopes(Optional> freeformScopes) { - this.freeformScopes = freeformScopes; - return this; - } - - public Builder freeformScopes(List freeformScopes) { - this.freeformScopes = Optional.ofNullable(freeformScopes); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - /** - *

When enabled, requests the 'address' scope from PayPal to access the user's address information.

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

When enabled, requests the 'email' scope from PayPal to access the user's email address.

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

When enabled, requests the 'phone' scope from PayPal to access the user's phone number.

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

When enabled, requests the 'profile' scope from PayPal to access basic profile information including first name, last name, date of birth, time zone, locale, and language. This scope is always enabled by the system.

- */ - @JsonSetter(value = "profile", nulls = Nulls.SKIP) - public Builder profile(Optional profile) { - this.profile = profile; - return this; - } - - public Builder profile(Boolean profile) { - this.profile = Optional.ofNullable(profile); - return this; - } - - public ConnectionOptionsPaypal build() { - return new ConnectionOptionsPaypal( - nonPersistentAttrs, - clientId, - clientSecret, - freeformScopes, - scope, - setUserRootAttributes, - address, - email, - phone, - profile, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPingFederate.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPingFederate.java deleted file mode 100644 index e93fffb1b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPingFederate.java +++ /dev/null @@ -1,729 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsPingFederate.Builder.class) -public final class ConnectionOptionsPingFederate implements IConnectionOptionsCommonSaml, IConnectionOptionsCommon { - private final Optional cert; - - private final Optional decryptionKey; - - private final Optional digestAlgorithm; - - private final Optional> domainAliases; - - private final Optional entityId; - - private final Optional iconUrl; - - private final Optional idpinitiated; - - private final Optional protocolBinding; - - private final Optional setUserRootAttributes; - - private final Optional signInEndpoint; - - private final Optional signSamlRequest; - - private final Optional signatureAlgorithm; - - private final Optional tenantDomain; - - private final Optional> thumbprints; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final String pingFederateBaseUrl; - - private final Optional signingCert; - - private final Map additionalProperties; - - private ConnectionOptionsPingFederate( - Optional cert, - Optional decryptionKey, - Optional digestAlgorithm, - Optional> domainAliases, - Optional entityId, - Optional iconUrl, - Optional idpinitiated, - Optional protocolBinding, - Optional setUserRootAttributes, - Optional signInEndpoint, - Optional signSamlRequest, - Optional signatureAlgorithm, - Optional tenantDomain, - Optional> thumbprints, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - String pingFederateBaseUrl, - Optional signingCert, - Map additionalProperties) { - this.cert = cert; - this.decryptionKey = decryptionKey; - this.digestAlgorithm = digestAlgorithm; - this.domainAliases = domainAliases; - this.entityId = entityId; - this.iconUrl = iconUrl; - this.idpinitiated = idpinitiated; - this.protocolBinding = protocolBinding; - this.setUserRootAttributes = setUserRootAttributes; - this.signInEndpoint = signInEndpoint; - this.signSamlRequest = signSamlRequest; - this.signatureAlgorithm = signatureAlgorithm; - this.tenantDomain = tenantDomain; - this.thumbprints = thumbprints; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.pingFederateBaseUrl = pingFederateBaseUrl; - this.signingCert = signingCert; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("cert") - @java.lang.Override - public Optional getCert() { - return cert; - } - - @JsonProperty("decryptionKey") - @java.lang.Override - public Optional getDecryptionKey() { - return decryptionKey; - } - - @JsonProperty("digestAlgorithm") - @java.lang.Override - public Optional getDigestAlgorithm() { - return digestAlgorithm; - } - - @JsonProperty("domain_aliases") - @java.lang.Override - public Optional> getDomainAliases() { - return domainAliases; - } - - @JsonProperty("entityId") - @java.lang.Override - public Optional getEntityId() { - return entityId; - } - - @JsonProperty("icon_url") - @java.lang.Override - public Optional getIconUrl() { - return iconUrl; - } - - @JsonProperty("idpinitiated") - @java.lang.Override - public Optional getIdpinitiated() { - return idpinitiated; - } - - @JsonProperty("protocolBinding") - @java.lang.Override - public Optional getProtocolBinding() { - return protocolBinding; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonProperty("signInEndpoint") - @java.lang.Override - public Optional getSignInEndpoint() { - return signInEndpoint; - } - - @JsonProperty("signSAMLRequest") - @java.lang.Override - public Optional getSignSamlRequest() { - return signSamlRequest; - } - - @JsonProperty("signatureAlgorithm") - @java.lang.Override - public Optional getSignatureAlgorithm() { - return signatureAlgorithm; - } - - @JsonProperty("tenant_domain") - @java.lang.Override - public Optional getTenantDomain() { - return tenantDomain; - } - - @JsonProperty("thumbprints") - @java.lang.Override - public Optional> getThumbprints() { - return thumbprints; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("pingFederateBaseUrl") - public String getPingFederateBaseUrl() { - return pingFederateBaseUrl; - } - - @JsonProperty("signingCert") - public Optional getSigningCert() { - return signingCert; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsPingFederate && equalTo((ConnectionOptionsPingFederate) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsPingFederate other) { - return cert.equals(other.cert) - && decryptionKey.equals(other.decryptionKey) - && digestAlgorithm.equals(other.digestAlgorithm) - && domainAliases.equals(other.domainAliases) - && entityId.equals(other.entityId) - && iconUrl.equals(other.iconUrl) - && idpinitiated.equals(other.idpinitiated) - && protocolBinding.equals(other.protocolBinding) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && signInEndpoint.equals(other.signInEndpoint) - && signSamlRequest.equals(other.signSamlRequest) - && signatureAlgorithm.equals(other.signatureAlgorithm) - && tenantDomain.equals(other.tenantDomain) - && thumbprints.equals(other.thumbprints) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs) - && pingFederateBaseUrl.equals(other.pingFederateBaseUrl) - && signingCert.equals(other.signingCert); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.cert, - this.decryptionKey, - this.digestAlgorithm, - this.domainAliases, - this.entityId, - this.iconUrl, - this.idpinitiated, - this.protocolBinding, - this.setUserRootAttributes, - this.signInEndpoint, - this.signSamlRequest, - this.signatureAlgorithm, - this.tenantDomain, - this.thumbprints, - this.upstreamParams, - this.nonPersistentAttrs, - this.pingFederateBaseUrl, - this.signingCert); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static PingFederateBaseUrlStage builder() { - return new Builder(); - } - - public interface PingFederateBaseUrlStage { - _FinalStage pingFederateBaseUrl(@NotNull String pingFederateBaseUrl); - - Builder from(ConnectionOptionsPingFederate other); - } - - public interface _FinalStage { - ConnectionOptionsPingFederate build(); - - _FinalStage cert(Optional cert); - - _FinalStage cert(String cert); - - _FinalStage decryptionKey(Optional decryptionKey); - - _FinalStage decryptionKey(ConnectionDecryptionKeySaml decryptionKey); - - _FinalStage digestAlgorithm(Optional digestAlgorithm); - - _FinalStage digestAlgorithm(ConnectionDigestAlgorithmEnumSaml digestAlgorithm); - - _FinalStage domainAliases(Optional> domainAliases); - - _FinalStage domainAliases(List domainAliases); - - _FinalStage entityId(Optional entityId); - - _FinalStage entityId(String entityId); - - _FinalStage iconUrl(Optional iconUrl); - - _FinalStage iconUrl(String iconUrl); - - _FinalStage idpinitiated(Optional idpinitiated); - - _FinalStage idpinitiated(ConnectionOptionsIdpinitiatedSaml idpinitiated); - - _FinalStage protocolBinding(Optional protocolBinding); - - _FinalStage protocolBinding(ConnectionProtocolBindingEnumSaml protocolBinding); - - _FinalStage setUserRootAttributes(Optional setUserRootAttributes); - - _FinalStage setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes); - - _FinalStage signInEndpoint(Optional signInEndpoint); - - _FinalStage signInEndpoint(String signInEndpoint); - - _FinalStage signSamlRequest(Optional signSamlRequest); - - _FinalStage signSamlRequest(Boolean signSamlRequest); - - _FinalStage signatureAlgorithm(Optional signatureAlgorithm); - - _FinalStage signatureAlgorithm(ConnectionSignatureAlgorithmEnumSaml signatureAlgorithm); - - _FinalStage tenantDomain(Optional tenantDomain); - - _FinalStage tenantDomain(String tenantDomain); - - _FinalStage thumbprints(Optional> thumbprints); - - _FinalStage thumbprints(List thumbprints); - - _FinalStage upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams); - - _FinalStage upstreamParams( - Map> upstreamParams); - - _FinalStage upstreamParams( - Optional>> upstreamParams); - - _FinalStage upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams); - - _FinalStage nonPersistentAttrs(Optional> nonPersistentAttrs); - - _FinalStage nonPersistentAttrs(List nonPersistentAttrs); - - _FinalStage signingCert(Optional signingCert); - - _FinalStage signingCert(String signingCert); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements PingFederateBaseUrlStage, _FinalStage { - private String pingFederateBaseUrl; - - private Optional signingCert = Optional.empty(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> thumbprints = Optional.empty(); - - private Optional tenantDomain = Optional.empty(); - - private Optional signatureAlgorithm = Optional.empty(); - - private Optional signSamlRequest = Optional.empty(); - - private Optional signInEndpoint = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private Optional protocolBinding = Optional.empty(); - - private Optional idpinitiated = Optional.empty(); - - private Optional iconUrl = Optional.empty(); - - private Optional entityId = Optional.empty(); - - private Optional> domainAliases = Optional.empty(); - - private Optional digestAlgorithm = Optional.empty(); - - private Optional decryptionKey = Optional.empty(); - - private Optional cert = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionOptionsPingFederate other) { - cert(other.getCert()); - decryptionKey(other.getDecryptionKey()); - digestAlgorithm(other.getDigestAlgorithm()); - domainAliases(other.getDomainAliases()); - entityId(other.getEntityId()); - iconUrl(other.getIconUrl()); - idpinitiated(other.getIdpinitiated()); - protocolBinding(other.getProtocolBinding()); - setUserRootAttributes(other.getSetUserRootAttributes()); - signInEndpoint(other.getSignInEndpoint()); - signSamlRequest(other.getSignSamlRequest()); - signatureAlgorithm(other.getSignatureAlgorithm()); - tenantDomain(other.getTenantDomain()); - thumbprints(other.getThumbprints()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - pingFederateBaseUrl(other.getPingFederateBaseUrl()); - signingCert(other.getSigningCert()); - return this; - } - - @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 signingCert(String signingCert) { - this.signingCert = Optional.ofNullable(signingCert); - return this; - } - - @java.lang.Override - @JsonSetter(value = "signingCert", nulls = Nulls.SKIP) - public _FinalStage signingCert(Optional signingCert) { - this.signingCert = signingCert; - return this; - } - - @java.lang.Override - public _FinalStage nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @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 upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - @java.lang.Override - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public _FinalStage upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - @java.lang.Override - public _FinalStage thumbprints(List thumbprints) { - this.thumbprints = Optional.ofNullable(thumbprints); - return this; - } - - @java.lang.Override - @JsonSetter(value = "thumbprints", nulls = Nulls.SKIP) - public _FinalStage thumbprints(Optional> thumbprints) { - this.thumbprints = thumbprints; - 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 signatureAlgorithm(ConnectionSignatureAlgorithmEnumSaml 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 signSamlRequest(Boolean signSamlRequest) { - this.signSamlRequest = Optional.ofNullable(signSamlRequest); - return this; - } - - @java.lang.Override - @JsonSetter(value = "signSAMLRequest", nulls = Nulls.SKIP) - public _FinalStage signSamlRequest(Optional signSamlRequest) { - this.signSamlRequest = signSamlRequest; - return this; - } - - @java.lang.Override - public _FinalStage signInEndpoint(String signInEndpoint) { - this.signInEndpoint = Optional.ofNullable(signInEndpoint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "signInEndpoint", nulls = Nulls.SKIP) - public _FinalStage signInEndpoint(Optional signInEndpoint) { - this.signInEndpoint = signInEndpoint; - return this; - } - - @java.lang.Override - public _FinalStage setUserRootAttributes(ConnectionSetUserRootAttributesEnum 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(ConnectionProtocolBindingEnumSaml 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; - } - - @java.lang.Override - public _FinalStage idpinitiated(ConnectionOptionsIdpinitiatedSaml 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; - } - - @java.lang.Override - public _FinalStage iconUrl(String iconUrl) { - this.iconUrl = Optional.ofNullable(iconUrl); - return this; - } - - @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 entityId(String entityId) { - this.entityId = Optional.ofNullable(entityId); - return this; - } - - @java.lang.Override - @JsonSetter(value = "entityId", nulls = Nulls.SKIP) - public _FinalStage entityId(Optional entityId) { - this.entityId = entityId; - return this; - } - - @java.lang.Override - public _FinalStage domainAliases(List domainAliases) { - this.domainAliases = Optional.ofNullable(domainAliases); - return this; - } - - @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(ConnectionDigestAlgorithmEnumSaml 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; - } - - @java.lang.Override - public _FinalStage decryptionKey(ConnectionDecryptionKeySaml decryptionKey) { - this.decryptionKey = Optional.ofNullable(decryptionKey); - return this; - } - - @java.lang.Override - @JsonSetter(value = "decryptionKey", nulls = Nulls.SKIP) - public _FinalStage decryptionKey(Optional decryptionKey) { - this.decryptionKey = decryptionKey; - return this; - } - - @java.lang.Override - public _FinalStage cert(String cert) { - this.cert = Optional.ofNullable(cert); - return this; - } - - @java.lang.Override - @JsonSetter(value = "cert", nulls = Nulls.SKIP) - public _FinalStage cert(Optional cert) { - this.cert = cert; - return this; - } - - @java.lang.Override - public ConnectionOptionsPingFederate build() { - return new ConnectionOptionsPingFederate( - cert, - decryptionKey, - digestAlgorithm, - domainAliases, - entityId, - iconUrl, - idpinitiated, - protocolBinding, - setUserRootAttributes, - signInEndpoint, - signSamlRequest, - signatureAlgorithm, - tenantDomain, - thumbprints, - upstreamParams, - nonPersistentAttrs, - pingFederateBaseUrl, - signingCert, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPlanningCenter.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPlanningCenter.java deleted file mode 100644 index c2b0d70f1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsPlanningCenter.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsPlanningCenter.Builder.class) -public final class ConnectionOptionsPlanningCenter implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsPlanningCenter( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsPlanningCenter && equalTo((ConnectionOptionsPlanningCenter) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsPlanningCenter other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsPlanningCenter other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsPlanningCenter build() { - return new ConnectionOptionsPlanningCenter( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsProtocolEnumTwitter.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsProtocolEnumTwitter.java deleted file mode 100644 index 45bcb8921..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsProtocolEnumTwitter.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionOptionsProtocolEnumTwitter { - public static final ConnectionOptionsProtocolEnumTwitter OAUTH1 = - new ConnectionOptionsProtocolEnumTwitter(Value.OAUTH1, "oauth1"); - - public static final ConnectionOptionsProtocolEnumTwitter OAUTH2 = - new ConnectionOptionsProtocolEnumTwitter(Value.OAUTH2, "oauth2"); - - private final Value value; - - private final String string; - - ConnectionOptionsProtocolEnumTwitter(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionOptionsProtocolEnumTwitter - && this.string.equals(((ConnectionOptionsProtocolEnumTwitter) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case OAUTH1: - return visitor.visitOauth1(); - case OAUTH2: - return visitor.visitOauth2(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionOptionsProtocolEnumTwitter valueOf(String value) { - switch (value) { - case "oauth1": - return OAUTH1; - case "oauth2": - return OAUTH2; - default: - return new ConnectionOptionsProtocolEnumTwitter(Value.UNKNOWN, value); - } - } - - public enum Value { - OAUTH1, - - OAUTH2, - - UNKNOWN - } - - public interface Visitor { - T visitOauth1(); - - T visitOauth2(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsRenren.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsRenren.java deleted file mode 100644 index 4f6d6a68a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsRenren.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsRenren.Builder.class) -public final class ConnectionOptionsRenren implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsRenren( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsRenren && equalTo((ConnectionOptionsRenren) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsRenren other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsRenren other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsRenren build() { - return new ConnectionOptionsRenren( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSalesforce.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSalesforce.java deleted file mode 100644 index 5d925c0de..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSalesforce.java +++ /dev/null @@ -1,341 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsSalesforce.Builder.class) -public final class ConnectionOptionsSalesforce implements IConnectionOptionsSalesforce, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional> freeformScopes; - - private final Optional profile; - - private final Optional> scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsSalesforce( - Optional clientId, - Optional clientSecret, - Optional> freeformScopes, - Optional profile, - Optional> scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.freeformScopes = freeformScopes; - this.profile = profile; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("freeform_scopes") - @java.lang.Override - public Optional> getFreeformScopes() { - return freeformScopes; - } - - /** - * @return When enabled, requests the Salesforce profile scope to retrieve basic user information including user_id, organization_id, username, display_name, email, status, photos, and URLs. - */ - @JsonProperty("profile") - @java.lang.Override - public Optional getProfile() { - return profile; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional> getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsSalesforce && equalTo((ConnectionOptionsSalesforce) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsSalesforce other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && freeformScopes.equals(other.freeformScopes) - && profile.equals(other.profile) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.freeformScopes, - this.profile, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional> freeformScopes = Optional.empty(); - - private Optional profile = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsSalesforce other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - freeformScopes(other.getFreeformScopes()); - profile(other.getProfile()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "freeform_scopes", nulls = Nulls.SKIP) - public Builder freeformScopes(Optional> freeformScopes) { - this.freeformScopes = freeformScopes; - return this; - } - - public Builder freeformScopes(List freeformScopes) { - this.freeformScopes = Optional.ofNullable(freeformScopes); - return this; - } - - /** - *

When enabled, requests the Salesforce profile scope to retrieve basic user information including user_id, organization_id, username, display_name, email, status, photos, and URLs.

- */ - @JsonSetter(value = "profile", nulls = Nulls.SKIP) - public Builder profile(Optional profile) { - this.profile = profile; - return this; - } - - public Builder profile(Boolean profile) { - this.profile = Optional.ofNullable(profile); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsSalesforce build() { - return new ConnectionOptionsSalesforce( - clientId, - clientSecret, - freeformScopes, - profile, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSalesforceCommunity.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSalesforceCommunity.java deleted file mode 100644 index eb176e917..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSalesforceCommunity.java +++ /dev/null @@ -1,369 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsSalesforceCommunity.Builder.class) -public final class ConnectionOptionsSalesforceCommunity - implements IConnectionOptionsSalesforce, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional> freeformScopes; - - private final Optional profile; - - private final Optional> scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Optional communityBaseUrl; - - private final Map additionalProperties; - - private ConnectionOptionsSalesforceCommunity( - Optional clientId, - Optional clientSecret, - Optional> freeformScopes, - Optional profile, - Optional> scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Optional communityBaseUrl, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.freeformScopes = freeformScopes; - this.profile = profile; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.communityBaseUrl = communityBaseUrl; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("freeform_scopes") - @java.lang.Override - public Optional> getFreeformScopes() { - return freeformScopes; - } - - /** - * @return When enabled, requests the Salesforce profile scope to retrieve basic user information including user_id, organization_id, username, display_name, email, status, photos, and URLs. - */ - @JsonProperty("profile") - @java.lang.Override - public Optional getProfile() { - return profile; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional> getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("community_base_url") - public Optional getCommunityBaseUrl() { - return communityBaseUrl; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsSalesforceCommunity - && equalTo((ConnectionOptionsSalesforceCommunity) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsSalesforceCommunity other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && freeformScopes.equals(other.freeformScopes) - && profile.equals(other.profile) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs) - && communityBaseUrl.equals(other.communityBaseUrl); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.freeformScopes, - this.profile, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs, - this.communityBaseUrl); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional> freeformScopes = Optional.empty(); - - private Optional profile = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - private Optional communityBaseUrl = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsSalesforceCommunity other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - freeformScopes(other.getFreeformScopes()); - profile(other.getProfile()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - communityBaseUrl(other.getCommunityBaseUrl()); - 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 = "freeform_scopes", nulls = Nulls.SKIP) - public Builder freeformScopes(Optional> freeformScopes) { - this.freeformScopes = freeformScopes; - return this; - } - - public Builder freeformScopes(List freeformScopes) { - this.freeformScopes = Optional.ofNullable(freeformScopes); - return this; - } - - /** - *

When enabled, requests the Salesforce profile scope to retrieve basic user information including user_id, organization_id, username, display_name, email, status, photos, and URLs.

- */ - @JsonSetter(value = "profile", nulls = Nulls.SKIP) - public Builder profile(Optional profile) { - this.profile = profile; - return this; - } - - public Builder profile(Boolean profile) { - this.profile = Optional.ofNullable(profile); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @JsonSetter(value = "community_base_url", nulls = Nulls.SKIP) - public Builder communityBaseUrl(Optional communityBaseUrl) { - this.communityBaseUrl = communityBaseUrl; - return this; - } - - public Builder communityBaseUrl(String communityBaseUrl) { - this.communityBaseUrl = Optional.ofNullable(communityBaseUrl); - return this; - } - - public ConnectionOptionsSalesforceCommunity build() { - return new ConnectionOptionsSalesforceCommunity( - clientId, - clientSecret, - freeformScopes, - profile, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - communityBaseUrl, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSaml.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSaml.java deleted file mode 100644 index 5450fc46f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSaml.java +++ /dev/null @@ -1,947 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsSaml.Builder.class) -public final class ConnectionOptionsSaml implements IConnectionOptionsCommonSaml, IConnectionOptionsCommon { - private final Optional cert; - - private final Optional decryptionKey; - - private final Optional digestAlgorithm; - - private final Optional> domainAliases; - - private final Optional entityId; - - private final Optional iconUrl; - - private final Optional idpinitiated; - - private final Optional protocolBinding; - - private final Optional setUserRootAttributes; - - private final Optional signInEndpoint; - - private final Optional signSamlRequest; - - private final Optional signatureAlgorithm; - - private final Optional tenantDomain; - - private final Optional> thumbprints; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Optional debug; - - private final Optional deflate; - - private final Optional destinationUrl; - - private final Optional disableSignout; - - private final Optional> fieldsMap; - - private final Optional globalTokenRevocationJwtIss; - - private final Optional globalTokenRevocationJwtSub; - - private final Optional metadataUrl; - - private final Optional metadataXml; - - private final Optional recipientUrl; - - private final Optional requestTemplate; - - private final Optional signingCert; - - private final Optional signingKey; - - private final Optional signOutEndpoint; - - private final Optional userIdAttribute; - - private final Map additionalProperties; - - private ConnectionOptionsSaml( - Optional cert, - Optional decryptionKey, - Optional digestAlgorithm, - Optional> domainAliases, - Optional entityId, - Optional iconUrl, - Optional idpinitiated, - Optional protocolBinding, - Optional setUserRootAttributes, - Optional signInEndpoint, - Optional signSamlRequest, - Optional signatureAlgorithm, - Optional tenantDomain, - Optional> thumbprints, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Optional debug, - Optional deflate, - Optional destinationUrl, - Optional disableSignout, - Optional> fieldsMap, - Optional globalTokenRevocationJwtIss, - Optional globalTokenRevocationJwtSub, - Optional metadataUrl, - Optional metadataXml, - Optional recipientUrl, - Optional requestTemplate, - Optional signingCert, - Optional signingKey, - Optional signOutEndpoint, - Optional userIdAttribute, - Map additionalProperties) { - this.cert = cert; - this.decryptionKey = decryptionKey; - this.digestAlgorithm = digestAlgorithm; - this.domainAliases = domainAliases; - this.entityId = entityId; - this.iconUrl = iconUrl; - this.idpinitiated = idpinitiated; - this.protocolBinding = protocolBinding; - this.setUserRootAttributes = setUserRootAttributes; - this.signInEndpoint = signInEndpoint; - this.signSamlRequest = signSamlRequest; - this.signatureAlgorithm = signatureAlgorithm; - this.tenantDomain = tenantDomain; - this.thumbprints = thumbprints; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.debug = debug; - this.deflate = deflate; - this.destinationUrl = destinationUrl; - this.disableSignout = disableSignout; - this.fieldsMap = fieldsMap; - this.globalTokenRevocationJwtIss = globalTokenRevocationJwtIss; - this.globalTokenRevocationJwtSub = globalTokenRevocationJwtSub; - this.metadataUrl = metadataUrl; - this.metadataXml = metadataXml; - this.recipientUrl = recipientUrl; - this.requestTemplate = requestTemplate; - this.signingCert = signingCert; - this.signingKey = signingKey; - this.signOutEndpoint = signOutEndpoint; - this.userIdAttribute = userIdAttribute; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("cert") - @java.lang.Override - public Optional getCert() { - return cert; - } - - @JsonProperty("decryptionKey") - @java.lang.Override - public Optional getDecryptionKey() { - return decryptionKey; - } - - @JsonProperty("digestAlgorithm") - @java.lang.Override - public Optional getDigestAlgorithm() { - return digestAlgorithm; - } - - @JsonProperty("domain_aliases") - @java.lang.Override - public Optional> getDomainAliases() { - return domainAliases; - } - - @JsonProperty("entityId") - @java.lang.Override - public Optional getEntityId() { - return entityId; - } - - @JsonProperty("icon_url") - @java.lang.Override - public Optional getIconUrl() { - return iconUrl; - } - - @JsonProperty("idpinitiated") - @java.lang.Override - public Optional getIdpinitiated() { - return idpinitiated; - } - - @JsonProperty("protocolBinding") - @java.lang.Override - public Optional getProtocolBinding() { - return protocolBinding; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonProperty("signInEndpoint") - @java.lang.Override - public Optional getSignInEndpoint() { - return signInEndpoint; - } - - @JsonProperty("signSAMLRequest") - @java.lang.Override - public Optional getSignSamlRequest() { - return signSamlRequest; - } - - @JsonProperty("signatureAlgorithm") - @java.lang.Override - public Optional getSignatureAlgorithm() { - return signatureAlgorithm; - } - - @JsonProperty("tenant_domain") - @java.lang.Override - public Optional getTenantDomain() { - return tenantDomain; - } - - @JsonProperty("thumbprints") - @java.lang.Override - public Optional> getThumbprints() { - return thumbprints; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("debug") - public Optional getDebug() { - return debug; - } - - @JsonProperty("deflate") - public Optional getDeflate() { - return deflate; - } - - @JsonProperty("destinationUrl") - public Optional getDestinationUrl() { - return destinationUrl; - } - - /** - * @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; - } - - @JsonProperty("fieldsMap") - public Optional> getFieldsMap() { - return fieldsMap; - } - - @JsonProperty("global_token_revocation_jwt_iss") - public Optional getGlobalTokenRevocationJwtIss() { - return globalTokenRevocationJwtIss; - } - - @JsonProperty("global_token_revocation_jwt_sub") - public Optional getGlobalTokenRevocationJwtSub() { - return globalTokenRevocationJwtSub; - } - - @JsonProperty("metadataUrl") - public Optional getMetadataUrl() { - return metadataUrl; - } - - @JsonProperty("metadataXml") - public Optional getMetadataXml() { - return metadataXml; - } - - @JsonProperty("recipientUrl") - public Optional getRecipientUrl() { - return recipientUrl; - } - - @JsonProperty("requestTemplate") - public Optional getRequestTemplate() { - return requestTemplate; - } - - @JsonProperty("signingCert") - public Optional getSigningCert() { - return signingCert; - } - - @JsonProperty("signing_key") - public Optional getSigningKey() { - return signingKey; - } - - @JsonProperty("signOutEndpoint") - public Optional getSignOutEndpoint() { - return signOutEndpoint; - } - - @JsonProperty("user_id_attribute") - public Optional getUserIdAttribute() { - return userIdAttribute; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsSaml && equalTo((ConnectionOptionsSaml) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsSaml other) { - return cert.equals(other.cert) - && decryptionKey.equals(other.decryptionKey) - && digestAlgorithm.equals(other.digestAlgorithm) - && domainAliases.equals(other.domainAliases) - && entityId.equals(other.entityId) - && iconUrl.equals(other.iconUrl) - && idpinitiated.equals(other.idpinitiated) - && protocolBinding.equals(other.protocolBinding) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && signInEndpoint.equals(other.signInEndpoint) - && signSamlRequest.equals(other.signSamlRequest) - && signatureAlgorithm.equals(other.signatureAlgorithm) - && tenantDomain.equals(other.tenantDomain) - && thumbprints.equals(other.thumbprints) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs) - && debug.equals(other.debug) - && deflate.equals(other.deflate) - && destinationUrl.equals(other.destinationUrl) - && disableSignout.equals(other.disableSignout) - && fieldsMap.equals(other.fieldsMap) - && globalTokenRevocationJwtIss.equals(other.globalTokenRevocationJwtIss) - && globalTokenRevocationJwtSub.equals(other.globalTokenRevocationJwtSub) - && metadataUrl.equals(other.metadataUrl) - && metadataXml.equals(other.metadataXml) - && recipientUrl.equals(other.recipientUrl) - && requestTemplate.equals(other.requestTemplate) - && signingCert.equals(other.signingCert) - && signingKey.equals(other.signingKey) - && signOutEndpoint.equals(other.signOutEndpoint) - && userIdAttribute.equals(other.userIdAttribute); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.cert, - this.decryptionKey, - this.digestAlgorithm, - this.domainAliases, - this.entityId, - this.iconUrl, - this.idpinitiated, - this.protocolBinding, - this.setUserRootAttributes, - this.signInEndpoint, - this.signSamlRequest, - this.signatureAlgorithm, - this.tenantDomain, - this.thumbprints, - this.upstreamParams, - this.nonPersistentAttrs, - this.debug, - this.deflate, - this.destinationUrl, - this.disableSignout, - this.fieldsMap, - this.globalTokenRevocationJwtIss, - this.globalTokenRevocationJwtSub, - this.metadataUrl, - this.metadataXml, - this.recipientUrl, - this.requestTemplate, - this.signingCert, - this.signingKey, - 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 cert = Optional.empty(); - - private Optional decryptionKey = Optional.empty(); - - private Optional digestAlgorithm = Optional.empty(); - - private Optional> domainAliases = Optional.empty(); - - private Optional entityId = Optional.empty(); - - private Optional iconUrl = Optional.empty(); - - private Optional idpinitiated = Optional.empty(); - - private Optional protocolBinding = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private Optional signInEndpoint = Optional.empty(); - - private Optional signSamlRequest = Optional.empty(); - - private Optional signatureAlgorithm = Optional.empty(); - - private Optional tenantDomain = Optional.empty(); - - private Optional> thumbprints = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - private Optional debug = Optional.empty(); - - private Optional deflate = Optional.empty(); - - private Optional destinationUrl = Optional.empty(); - - private Optional disableSignout = Optional.empty(); - - private Optional> fieldsMap = Optional.empty(); - - private Optional globalTokenRevocationJwtIss = Optional.empty(); - - private Optional globalTokenRevocationJwtSub = Optional.empty(); - - private Optional metadataUrl = Optional.empty(); - - private Optional metadataXml = Optional.empty(); - - private Optional recipientUrl = Optional.empty(); - - private Optional requestTemplate = Optional.empty(); - - private Optional signingCert = Optional.empty(); - - private Optional signingKey = Optional.empty(); - - private Optional signOutEndpoint = Optional.empty(); - - private Optional userIdAttribute = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsSaml other) { - cert(other.getCert()); - decryptionKey(other.getDecryptionKey()); - digestAlgorithm(other.getDigestAlgorithm()); - domainAliases(other.getDomainAliases()); - entityId(other.getEntityId()); - iconUrl(other.getIconUrl()); - idpinitiated(other.getIdpinitiated()); - protocolBinding(other.getProtocolBinding()); - setUserRootAttributes(other.getSetUserRootAttributes()); - signInEndpoint(other.getSignInEndpoint()); - signSamlRequest(other.getSignSamlRequest()); - signatureAlgorithm(other.getSignatureAlgorithm()); - tenantDomain(other.getTenantDomain()); - thumbprints(other.getThumbprints()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - debug(other.getDebug()); - deflate(other.getDeflate()); - destinationUrl(other.getDestinationUrl()); - disableSignout(other.getDisableSignout()); - fieldsMap(other.getFieldsMap()); - globalTokenRevocationJwtIss(other.getGlobalTokenRevocationJwtIss()); - globalTokenRevocationJwtSub(other.getGlobalTokenRevocationJwtSub()); - metadataUrl(other.getMetadataUrl()); - metadataXml(other.getMetadataXml()); - recipientUrl(other.getRecipientUrl()); - requestTemplate(other.getRequestTemplate()); - signingCert(other.getSigningCert()); - signingKey(other.getSigningKey()); - signOutEndpoint(other.getSignOutEndpoint()); - userIdAttribute(other.getUserIdAttribute()); - return this; - } - - @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; - } - - @JsonSetter(value = "decryptionKey", nulls = Nulls.SKIP) - public Builder decryptionKey(Optional decryptionKey) { - this.decryptionKey = decryptionKey; - return this; - } - - public Builder decryptionKey(ConnectionDecryptionKeySaml decryptionKey) { - this.decryptionKey = Optional.ofNullable(decryptionKey); - return this; - } - - @JsonSetter(value = "digestAlgorithm", nulls = Nulls.SKIP) - public Builder digestAlgorithm(Optional digestAlgorithm) { - this.digestAlgorithm = digestAlgorithm; - return this; - } - - public Builder digestAlgorithm(ConnectionDigestAlgorithmEnumSaml digestAlgorithm) { - this.digestAlgorithm = Optional.ofNullable(digestAlgorithm); - return this; - } - - @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; - } - - @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; - } - - @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(ConnectionOptionsIdpinitiatedSaml idpinitiated) { - this.idpinitiated = Optional.ofNullable(idpinitiated); - return this; - } - - @JsonSetter(value = "protocolBinding", nulls = Nulls.SKIP) - public Builder protocolBinding(Optional protocolBinding) { - this.protocolBinding = protocolBinding; - return this; - } - - public Builder protocolBinding(ConnectionProtocolBindingEnumSaml 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(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @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; - } - - @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 = "signatureAlgorithm", nulls = Nulls.SKIP) - public Builder signatureAlgorithm(Optional signatureAlgorithm) { - this.signatureAlgorithm = signatureAlgorithm; - return this; - } - - public Builder signatureAlgorithm(ConnectionSignatureAlgorithmEnumSaml signatureAlgorithm) { - this.signatureAlgorithm = Optional.ofNullable(signatureAlgorithm); - return this; - } - - @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; - } - - @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( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @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; - } - - @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; - } - - @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 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; - } - - @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; - } - - @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; - } - - @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; - } - - @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 = "metadataXml", nulls = Nulls.SKIP) - public Builder metadataXml(Optional metadataXml) { - this.metadataXml = metadataXml; - return this; - } - - public Builder metadataXml(String metadataXml) { - this.metadataXml = Optional.ofNullable(metadataXml); - return this; - } - - @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; - } - - @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; - } - - @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; - } - - @JsonSetter(value = "signing_key", nulls = Nulls.SKIP) - public Builder signingKey(Optional signingKey) { - this.signingKey = signingKey; - return this; - } - - public Builder signingKey(ConnectionSigningKeySaml signingKey) { - this.signingKey = Optional.ofNullable(signingKey); - return this; - } - - @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; - } - - @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 ConnectionOptionsSaml build() { - return new ConnectionOptionsSaml( - cert, - decryptionKey, - digestAlgorithm, - domainAliases, - entityId, - iconUrl, - idpinitiated, - protocolBinding, - setUserRootAttributes, - signInEndpoint, - signSamlRequest, - signatureAlgorithm, - tenantDomain, - thumbprints, - upstreamParams, - nonPersistentAttrs, - debug, - deflate, - destinationUrl, - disableSignout, - fieldsMap, - globalTokenRevocationJwtIss, - globalTokenRevocationJwtSub, - metadataUrl, - metadataXml, - recipientUrl, - requestTemplate, - signingCert, - signingKey, - signOutEndpoint, - userIdAttribute, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSharepoint.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSharepoint.java deleted file mode 100644 index 5ed1f11d7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSharepoint.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsSharepoint.Builder.class) -public final class ConnectionOptionsSharepoint implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsSharepoint( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsSharepoint && equalTo((ConnectionOptionsSharepoint) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsSharepoint other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsSharepoint other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsSharepoint build() { - return new ConnectionOptionsSharepoint( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsShop.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsShop.java deleted file mode 100644 index 65ed38125..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsShop.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsShop.Builder.class) -public final class ConnectionOptionsShop implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsShop( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsShop && equalTo((ConnectionOptionsShop) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsShop other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsShop other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsShop build() { - return new ConnectionOptionsShop( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsShopify.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsShopify.java deleted file mode 100644 index 94692b0c9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsShopify.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsShopify.Builder.class) -public final class ConnectionOptionsShopify implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsShopify( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsShopify && equalTo((ConnectionOptionsShopify) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsShopify other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsShopify other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsShopify build() { - return new ConnectionOptionsShopify( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSms.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSms.java deleted file mode 100644 index baaf180d3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSms.java +++ /dev/null @@ -1,513 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsSms.Builder.class) -public final class ConnectionOptionsSms implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional bruteForceProtection; - - private final Optional disableSignup; - - private final Optional forwardReqInfo; - - private final Optional from; - - private final OptionalNullable gatewayAuthentication; - - private final Optional gatewayUrl; - - private final Optional messagingServiceSid; - - private final Optional name; - - private final Optional provider; - - private final Optional syntax; - - private final Optional template; - - private final Optional totp; - - private final Optional twilioSid; - - private final Optional twilioToken; - - private final Map additionalProperties; - - private ConnectionOptionsSms( - Optional> nonPersistentAttrs, - Optional bruteForceProtection, - Optional disableSignup, - Optional forwardReqInfo, - Optional from, - OptionalNullable gatewayAuthentication, - Optional gatewayUrl, - Optional messagingServiceSid, - Optional name, - Optional provider, - Optional syntax, - Optional template, - Optional totp, - Optional twilioSid, - Optional twilioToken, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.bruteForceProtection = bruteForceProtection; - this.disableSignup = disableSignup; - this.forwardReqInfo = forwardReqInfo; - this.from = from; - this.gatewayAuthentication = gatewayAuthentication; - this.gatewayUrl = gatewayUrl; - this.messagingServiceSid = messagingServiceSid; - this.name = name; - this.provider = provider; - this.syntax = syntax; - this.template = template; - this.totp = totp; - this.twilioSid = twilioSid; - this.twilioToken = twilioToken; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - /** - * @return Whether brute force protection is enabled - */ - @JsonProperty("brute_force_protection") - public Optional getBruteForceProtection() { - return bruteForceProtection; - } - - @JsonProperty("disable_signup") - public Optional getDisableSignup() { - return disableSignup; - } - - @JsonProperty("forward_req_info") - public Optional getForwardReqInfo() { - return forwardReqInfo; - } - - @JsonProperty("from") - public Optional getFrom() { - return from; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("gateway_authentication") - public OptionalNullable getGatewayAuthentication() { - if (gatewayAuthentication == null) { - return OptionalNullable.absent(); - } - return gatewayAuthentication; - } - - @JsonProperty("gateway_url") - public Optional getGatewayUrl() { - return gatewayUrl; - } - - @JsonProperty("messaging_service_sid") - public Optional getMessagingServiceSid() { - return messagingServiceSid; - } - - /** - * @return Connection name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("provider") - public Optional getProvider() { - return provider; - } - - @JsonProperty("syntax") - public Optional getSyntax() { - return syntax; - } - - @JsonProperty("template") - public Optional getTemplate() { - return template; - } - - @JsonProperty("totp") - public Optional getTotp() { - return totp; - } - - @JsonProperty("twilio_sid") - public Optional getTwilioSid() { - return twilioSid; - } - - @JsonProperty("twilio_token") - public Optional getTwilioToken() { - return twilioToken; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("gateway_authentication") - private OptionalNullable _getGatewayAuthentication() { - return gatewayAuthentication; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsSms && equalTo((ConnectionOptionsSms) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsSms other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && bruteForceProtection.equals(other.bruteForceProtection) - && disableSignup.equals(other.disableSignup) - && forwardReqInfo.equals(other.forwardReqInfo) - && from.equals(other.from) - && gatewayAuthentication.equals(other.gatewayAuthentication) - && gatewayUrl.equals(other.gatewayUrl) - && messagingServiceSid.equals(other.messagingServiceSid) - && name.equals(other.name) - && provider.equals(other.provider) - && syntax.equals(other.syntax) - && template.equals(other.template) - && totp.equals(other.totp) - && twilioSid.equals(other.twilioSid) - && twilioToken.equals(other.twilioToken); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.nonPersistentAttrs, - this.bruteForceProtection, - this.disableSignup, - this.forwardReqInfo, - this.from, - this.gatewayAuthentication, - this.gatewayUrl, - this.messagingServiceSid, - this.name, - this.provider, - this.syntax, - this.template, - this.totp, - this.twilioSid, - this.twilioToken); - } - - @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> nonPersistentAttrs = Optional.empty(); - - private Optional bruteForceProtection = Optional.empty(); - - private Optional disableSignup = Optional.empty(); - - private Optional forwardReqInfo = Optional.empty(); - - private Optional from = Optional.empty(); - - private OptionalNullable gatewayAuthentication = OptionalNullable.absent(); - - private Optional gatewayUrl = Optional.empty(); - - private Optional messagingServiceSid = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional provider = Optional.empty(); - - private Optional syntax = Optional.empty(); - - private Optional template = Optional.empty(); - - private Optional totp = Optional.empty(); - - private Optional twilioSid = Optional.empty(); - - private Optional twilioToken = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsSms other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - bruteForceProtection(other.getBruteForceProtection()); - disableSignup(other.getDisableSignup()); - forwardReqInfo(other.getForwardReqInfo()); - from(other.getFrom()); - gatewayAuthentication(other.getGatewayAuthentication()); - gatewayUrl(other.getGatewayUrl()); - messagingServiceSid(other.getMessagingServiceSid()); - name(other.getName()); - provider(other.getProvider()); - syntax(other.getSyntax()); - template(other.getTemplate()); - totp(other.getTotp()); - twilioSid(other.getTwilioSid()); - twilioToken(other.getTwilioToken()); - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - /** - *

Whether brute force protection is enabled

- */ - @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; - } - - @JsonSetter(value = "disable_signup", nulls = Nulls.SKIP) - public Builder disableSignup(Optional disableSignup) { - this.disableSignup = disableSignup; - return this; - } - - public Builder disableSignup(Boolean disableSignup) { - this.disableSignup = Optional.ofNullable(disableSignup); - return this; - } - - @JsonSetter(value = "forward_req_info", nulls = Nulls.SKIP) - public Builder forwardReqInfo(Optional forwardReqInfo) { - this.forwardReqInfo = forwardReqInfo; - return this; - } - - public Builder forwardReqInfo(Boolean forwardReqInfo) { - this.forwardReqInfo = Optional.ofNullable(forwardReqInfo); - return this; - } - - @JsonSetter(value = "from", nulls = Nulls.SKIP) - public Builder from(Optional from) { - this.from = from; - return this; - } - - public Builder from(String from) { - this.from = Optional.ofNullable(from); - return this; - } - - @JsonSetter(value = "gateway_authentication", nulls = Nulls.SKIP) - public Builder gatewayAuthentication( - @Nullable OptionalNullable gatewayAuthentication) { - this.gatewayAuthentication = gatewayAuthentication; - return this; - } - - public Builder gatewayAuthentication(ConnectionGatewayAuthenticationSms gatewayAuthentication) { - this.gatewayAuthentication = OptionalNullable.of(gatewayAuthentication); - return this; - } - - public Builder gatewayAuthentication(Optional gatewayAuthentication) { - if (gatewayAuthentication.isPresent()) { - this.gatewayAuthentication = OptionalNullable.of(gatewayAuthentication.get()); - } else { - this.gatewayAuthentication = OptionalNullable.absent(); - } - return this; - } - - public Builder gatewayAuthentication( - com.auth0.client.mgmt.core.Nullable gatewayAuthentication) { - if (gatewayAuthentication.isNull()) { - this.gatewayAuthentication = OptionalNullable.ofNull(); - } else if (gatewayAuthentication.isEmpty()) { - this.gatewayAuthentication = OptionalNullable.absent(); - } else { - this.gatewayAuthentication = OptionalNullable.of(gatewayAuthentication.get()); - } - return this; - } - - @JsonSetter(value = "gateway_url", nulls = Nulls.SKIP) - public Builder gatewayUrl(Optional gatewayUrl) { - this.gatewayUrl = gatewayUrl; - return this; - } - - public Builder gatewayUrl(String gatewayUrl) { - this.gatewayUrl = Optional.ofNullable(gatewayUrl); - return this; - } - - @JsonSetter(value = "messaging_service_sid", nulls = Nulls.SKIP) - public Builder messagingServiceSid(Optional messagingServiceSid) { - this.messagingServiceSid = messagingServiceSid; - return this; - } - - public Builder messagingServiceSid(String messagingServiceSid) { - this.messagingServiceSid = Optional.ofNullable(messagingServiceSid); - return this; - } - - /** - *

Connection name

- */ - @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 = "provider", nulls = Nulls.SKIP) - public Builder provider(Optional provider) { - this.provider = provider; - return this; - } - - public Builder provider(ConnectionProviderEnumSms provider) { - this.provider = Optional.ofNullable(provider); - return this; - } - - @JsonSetter(value = "syntax", nulls = Nulls.SKIP) - public Builder syntax(Optional syntax) { - this.syntax = syntax; - return this; - } - - public Builder syntax(ConnectionTemplateSyntaxEnumSms syntax) { - this.syntax = Optional.ofNullable(syntax); - return this; - } - - @JsonSetter(value = "template", nulls = Nulls.SKIP) - public Builder template(Optional template) { - this.template = template; - return this; - } - - public Builder template(String template) { - this.template = Optional.ofNullable(template); - return this; - } - - @JsonSetter(value = "totp", nulls = Nulls.SKIP) - public Builder totp(Optional totp) { - this.totp = totp; - return this; - } - - public Builder totp(ConnectionTotpSms totp) { - this.totp = Optional.ofNullable(totp); - return this; - } - - @JsonSetter(value = "twilio_sid", nulls = Nulls.SKIP) - public Builder twilioSid(Optional twilioSid) { - this.twilioSid = twilioSid; - return this; - } - - public Builder twilioSid(String twilioSid) { - this.twilioSid = Optional.ofNullable(twilioSid); - return this; - } - - @JsonSetter(value = "twilio_token", nulls = Nulls.SKIP) - public Builder twilioToken(Optional twilioToken) { - this.twilioToken = twilioToken; - return this; - } - - public Builder twilioToken(String twilioToken) { - this.twilioToken = Optional.ofNullable(twilioToken); - return this; - } - - public ConnectionOptionsSms build() { - return new ConnectionOptionsSms( - nonPersistentAttrs, - bruteForceProtection, - disableSignup, - forwardReqInfo, - from, - gatewayAuthentication, - gatewayUrl, - messagingServiceSid, - name, - provider, - syntax, - template, - totp, - twilioSid, - twilioToken, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSoundcloud.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSoundcloud.java deleted file mode 100644 index bb529d7d6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsSoundcloud.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsSoundcloud.Builder.class) -public final class ConnectionOptionsSoundcloud implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsSoundcloud( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsSoundcloud && equalTo((ConnectionOptionsSoundcloud) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsSoundcloud other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsSoundcloud other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsSoundcloud build() { - return new ConnectionOptionsSoundcloud( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsThirtySevenSignals.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsThirtySevenSignals.java deleted file mode 100644 index 2dff3c33c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsThirtySevenSignals.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsThirtySevenSignals.Builder.class) -public final class ConnectionOptionsThirtySevenSignals - implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsThirtySevenSignals( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsThirtySevenSignals - && equalTo((ConnectionOptionsThirtySevenSignals) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsThirtySevenSignals other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsThirtySevenSignals other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsThirtySevenSignals build() { - return new ConnectionOptionsThirtySevenSignals( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsTwitter.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsTwitter.java deleted file mode 100644 index ae1903e20..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsTwitter.java +++ /dev/null @@ -1,456 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsTwitter.Builder.class) -public final class ConnectionOptionsTwitter implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional> freeformScopes; - - private final Optional protocol; - - private final Optional> scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional offlineAccess; - - private final Optional profile; - - private final Optional tweetRead; - - private final Optional usersRead; - - private final Map additionalProperties; - - private ConnectionOptionsTwitter( - Optional> nonPersistentAttrs, - Optional clientId, - Optional clientSecret, - Optional> freeformScopes, - Optional protocol, - Optional> scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional offlineAccess, - Optional profile, - Optional tweetRead, - Optional usersRead, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.freeformScopes = freeformScopes; - this.protocol = protocol; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.offlineAccess = offlineAccess; - this.profile = profile; - this.tweetRead = tweetRead; - this.usersRead = usersRead; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("freeform_scopes") - public Optional> getFreeformScopes() { - return freeformScopes; - } - - @JsonProperty("protocol") - public Optional getProtocol() { - return protocol; - } - - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - /** - * @return Request long-lived refresh tokens so your app can act on behalf of users even when they’re not actively signed in. Typical Twitter use case: keeping a background service synced without forcing users to reauthorize every session. - */ - @JsonProperty("offline_access") - public Optional getOfflineAccess() { - return offlineAccess; - } - - /** - * @return Pull account profile metadata such as display name, bio, location, and URL so downstream apps can prefill or personalize user experiences. - */ - @JsonProperty("profile") - public Optional getProfile() { - return profile; - } - - /** - * @return Allow the application to read a user’s public and protected Tweets—required for timelines, analytics, or moderation workflows. - */ - @JsonProperty("tweet_read") - public Optional getTweetRead() { - return tweetRead; - } - - /** - * @return Read non-Tweet user information (e.g., followers/following, account settings) to power relationship graphs or audience insights. - */ - @JsonProperty("users_read") - public Optional getUsersRead() { - return usersRead; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsTwitter && equalTo((ConnectionOptionsTwitter) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsTwitter other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && freeformScopes.equals(other.freeformScopes) - && protocol.equals(other.protocol) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && offlineAccess.equals(other.offlineAccess) - && profile.equals(other.profile) - && tweetRead.equals(other.tweetRead) - && usersRead.equals(other.usersRead); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.nonPersistentAttrs, - this.clientId, - this.clientSecret, - this.freeformScopes, - this.protocol, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.offlineAccess, - this.profile, - this.tweetRead, - this.usersRead); - } - - @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> nonPersistentAttrs = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional> freeformScopes = Optional.empty(); - - private Optional protocol = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional offlineAccess = Optional.empty(); - - private Optional profile = Optional.empty(); - - private Optional tweetRead = Optional.empty(); - - private Optional usersRead = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsTwitter other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - freeformScopes(other.getFreeformScopes()); - protocol(other.getProtocol()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - offlineAccess(other.getOfflineAccess()); - profile(other.getProfile()); - tweetRead(other.getTweetRead()); - usersRead(other.getUsersRead()); - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @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 = "freeform_scopes", nulls = Nulls.SKIP) - public Builder freeformScopes(Optional> freeformScopes) { - this.freeformScopes = freeformScopes; - return this; - } - - public Builder freeformScopes(List freeformScopes) { - this.freeformScopes = Optional.ofNullable(freeformScopes); - return this; - } - - @JsonSetter(value = "protocol", nulls = Nulls.SKIP) - public Builder protocol(Optional protocol) { - this.protocol = protocol; - return this; - } - - public Builder protocol(ConnectionOptionsProtocolEnumTwitter protocol) { - this.protocol = Optional.ofNullable(protocol); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - /** - *

Request long-lived refresh tokens so your app can act on behalf of users even when they’re not actively signed in. Typical Twitter use case: keeping a background service synced without forcing users to reauthorize every session.

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

Pull account profile metadata such as display name, bio, location, and URL so downstream apps can prefill or personalize user experiences.

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

Allow the application to read a user’s public and protected Tweets—required for timelines, analytics, or moderation workflows.

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

Read non-Tweet user information (e.g., followers/following, account settings) to power relationship graphs or audience insights.

- */ - @JsonSetter(value = "users_read", nulls = Nulls.SKIP) - public Builder usersRead(Optional usersRead) { - this.usersRead = usersRead; - return this; - } - - public Builder usersRead(Boolean usersRead) { - this.usersRead = Optional.ofNullable(usersRead); - return this; - } - - public ConnectionOptionsTwitter build() { - return new ConnectionOptionsTwitter( - nonPersistentAttrs, - clientId, - clientSecret, - freeformScopes, - protocol, - scope, - setUserRootAttributes, - upstreamParams, - offlineAccess, - profile, - tweetRead, - usersRead, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsUntappd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsUntappd.java deleted file mode 100644 index 734ce3bb3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsUntappd.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsUntappd.Builder.class) -public final class ConnectionOptionsUntappd implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsUntappd( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsUntappd && equalTo((ConnectionOptionsUntappd) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsUntappd other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsUntappd other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsUntappd build() { - return new ConnectionOptionsUntappd( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsVkontakte.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsVkontakte.java deleted file mode 100644 index bb488e449..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsVkontakte.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsVkontakte.Builder.class) -public final class ConnectionOptionsVkontakte implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsVkontakte( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsVkontakte && equalTo((ConnectionOptionsVkontakte) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsVkontakte other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsVkontakte other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsVkontakte build() { - return new ConnectionOptionsVkontakte( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsWeibo.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsWeibo.java deleted file mode 100644 index 986606658..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsWeibo.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsWeibo.Builder.class) -public final class ConnectionOptionsWeibo implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsWeibo( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsWeibo && equalTo((ConnectionOptionsWeibo) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsWeibo other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsWeibo other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsWeibo build() { - return new ConnectionOptionsWeibo( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsWindowsLive.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsWindowsLive.java deleted file mode 100644 index c469f9517..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsWindowsLive.java +++ /dev/null @@ -1,2184 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsWindowsLive.Builder.class) -public final class ConnectionOptionsWindowsLive implements IConnectionOptionsCommon { - private final Optional> nonPersistentAttrs; - - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional> freeformScopes; - - private final Optional> scope; - - private final Optional setUserRootAttributes; - - private final Optional strategyVersion; - - private final OptionalNullable>> - upstreamParams; - - private final Optional applications; - - private final Optional applicationsCreate; - - private final Optional basic; - - private final Optional birthday; - - private final Optional calendars; - - private final Optional calendarsUpdate; - - private final Optional contactsBirthday; - - private final Optional contactsCalendars; - - private final Optional contactsCreate; - - private final Optional contactsPhotos; - - private final Optional contactsSkydrive; - - private final Optional directoryAccessasuserAll; - - private final Optional directoryReadAll; - - private final Optional directoryReadwriteAll; - - private final Optional emails; - - private final Optional eventsCreate; - - private final Optional graphCalendars; - - private final Optional graphCalendarsUpdate; - - private final Optional graphContacts; - - private final Optional graphContactsUpdate; - - private final Optional graphDevice; - - private final Optional graphDeviceCommand; - - private final Optional graphEmails; - - private final Optional graphEmailsUpdate; - - private final Optional graphFiles; - - private final Optional graphFilesAll; - - private final Optional graphFilesAllUpdate; - - private final Optional graphFilesUpdate; - - private final Optional graphNotes; - - private final Optional graphNotesCreate; - - private final Optional graphNotesUpdate; - - private final Optional graphTasks; - - private final Optional graphTasksUpdate; - - private final Optional graphUser; - - private final Optional graphUserActivity; - - private final Optional graphUserUpdate; - - private final Optional groupReadAll; - - private final Optional groupReadwriteAll; - - private final Optional mailReadwriteAll; - - private final Optional mailSend; - - private final Optional messenger; - - private final Optional offlineAccess; - - private final Optional phoneNumbers; - - private final Optional photos; - - private final Optional postalAddresses; - - private final Optional rolemanagementReadAll; - - private final Optional rolemanagementReadwriteDirectory; - - private final Optional share; - - private final Optional signin; - - private final Optional sitesReadAll; - - private final Optional sitesReadwriteAll; - - private final Optional skydrive; - - private final Optional skydriveUpdate; - - private final Optional teamReadbasicAll; - - private final Optional teamReadwriteAll; - - private final Optional userReadAll; - - private final Optional userReadbasicAll; - - private final Optional workProfile; - - private final Map additionalProperties; - - private ConnectionOptionsWindowsLive( - Optional> nonPersistentAttrs, - Optional clientId, - Optional clientSecret, - Optional> freeformScopes, - Optional> scope, - Optional setUserRootAttributes, - Optional strategyVersion, - OptionalNullable>> upstreamParams, - Optional applications, - Optional applicationsCreate, - Optional basic, - Optional birthday, - Optional calendars, - Optional calendarsUpdate, - Optional contactsBirthday, - Optional contactsCalendars, - Optional contactsCreate, - Optional contactsPhotos, - Optional contactsSkydrive, - Optional directoryAccessasuserAll, - Optional directoryReadAll, - Optional directoryReadwriteAll, - Optional emails, - Optional eventsCreate, - Optional graphCalendars, - Optional graphCalendarsUpdate, - Optional graphContacts, - Optional graphContactsUpdate, - Optional graphDevice, - Optional graphDeviceCommand, - Optional graphEmails, - Optional graphEmailsUpdate, - Optional graphFiles, - Optional graphFilesAll, - Optional graphFilesAllUpdate, - Optional graphFilesUpdate, - Optional graphNotes, - Optional graphNotesCreate, - Optional graphNotesUpdate, - Optional graphTasks, - Optional graphTasksUpdate, - Optional graphUser, - Optional graphUserActivity, - Optional graphUserUpdate, - Optional groupReadAll, - Optional groupReadwriteAll, - Optional mailReadwriteAll, - Optional mailSend, - Optional messenger, - Optional offlineAccess, - Optional phoneNumbers, - Optional photos, - Optional postalAddresses, - Optional rolemanagementReadAll, - Optional rolemanagementReadwriteDirectory, - Optional share, - Optional signin, - Optional sitesReadAll, - Optional sitesReadwriteAll, - Optional skydrive, - Optional skydriveUpdate, - Optional teamReadbasicAll, - Optional teamReadwriteAll, - Optional userReadAll, - Optional userReadbasicAll, - Optional workProfile, - Map additionalProperties) { - this.nonPersistentAttrs = nonPersistentAttrs; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.freeformScopes = freeformScopes; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.strategyVersion = strategyVersion; - this.upstreamParams = upstreamParams; - this.applications = applications; - this.applicationsCreate = applicationsCreate; - this.basic = basic; - this.birthday = birthday; - this.calendars = calendars; - this.calendarsUpdate = calendarsUpdate; - this.contactsBirthday = contactsBirthday; - this.contactsCalendars = contactsCalendars; - this.contactsCreate = contactsCreate; - this.contactsPhotos = contactsPhotos; - this.contactsSkydrive = contactsSkydrive; - this.directoryAccessasuserAll = directoryAccessasuserAll; - this.directoryReadAll = directoryReadAll; - this.directoryReadwriteAll = directoryReadwriteAll; - this.emails = emails; - this.eventsCreate = eventsCreate; - this.graphCalendars = graphCalendars; - this.graphCalendarsUpdate = graphCalendarsUpdate; - this.graphContacts = graphContacts; - this.graphContactsUpdate = graphContactsUpdate; - this.graphDevice = graphDevice; - this.graphDeviceCommand = graphDeviceCommand; - this.graphEmails = graphEmails; - this.graphEmailsUpdate = graphEmailsUpdate; - this.graphFiles = graphFiles; - this.graphFilesAll = graphFilesAll; - this.graphFilesAllUpdate = graphFilesAllUpdate; - this.graphFilesUpdate = graphFilesUpdate; - this.graphNotes = graphNotes; - this.graphNotesCreate = graphNotesCreate; - this.graphNotesUpdate = graphNotesUpdate; - this.graphTasks = graphTasks; - this.graphTasksUpdate = graphTasksUpdate; - this.graphUser = graphUser; - this.graphUserActivity = graphUserActivity; - this.graphUserUpdate = graphUserUpdate; - this.groupReadAll = groupReadAll; - this.groupReadwriteAll = groupReadwriteAll; - this.mailReadwriteAll = mailReadwriteAll; - this.mailSend = mailSend; - this.messenger = messenger; - this.offlineAccess = offlineAccess; - this.phoneNumbers = phoneNumbers; - this.photos = photos; - this.postalAddresses = postalAddresses; - this.rolemanagementReadAll = rolemanagementReadAll; - this.rolemanagementReadwriteDirectory = rolemanagementReadwriteDirectory; - this.share = share; - this.signin = signin; - this.sitesReadAll = sitesReadAll; - this.sitesReadwriteAll = sitesReadwriteAll; - this.skydrive = skydrive; - this.skydriveUpdate = skydriveUpdate; - this.teamReadbasicAll = teamReadbasicAll; - this.teamReadwriteAll = teamReadwriteAll; - this.userReadAll = userReadAll; - this.userReadbasicAll = userReadbasicAll; - this.workProfile = workProfile; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("freeform_scopes") - public Optional> getFreeformScopes() { - return freeformScopes; - } - - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonProperty("strategy_version") - public Optional getStrategyVersion() { - return strategyVersion; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - /** - * @return When enabled, requests access to user's applications. - */ - @JsonProperty("applications") - public Optional getApplications() { - return applications; - } - - /** - * @return When enabled, requests permission to create applications. - */ - @JsonProperty("applications_create") - public Optional getApplicationsCreate() { - return applicationsCreate; - } - - /** - * @return When enabled, requests read access to user's basic profile information and contacts list. - */ - @JsonProperty("basic") - public Optional getBasic() { - return basic; - } - - /** - * @return When enabled, requests read access to user's birth day, month, and year. - */ - @JsonProperty("birthday") - public Optional getBirthday() { - return birthday; - } - - /** - * @return When enabled, requests read access to user's calendars and events. - */ - @JsonProperty("calendars") - public Optional getCalendars() { - return calendars; - } - - /** - * @return When enabled, requests read and write access to user's calendars and events. - */ - @JsonProperty("calendars_update") - public Optional getCalendarsUpdate() { - return calendarsUpdate; - } - - /** - * @return When enabled, requests read access to contacts' birth day and birth month. - */ - @JsonProperty("contacts_birthday") - public Optional getContactsBirthday() { - return contactsBirthday; - } - - /** - * @return When enabled, requests read access to user's calendars and shared calendars/events from others. - */ - @JsonProperty("contacts_calendars") - public Optional getContactsCalendars() { - return contactsCalendars; - } - - /** - * @return When enabled, requests permission to create new contacts in user's address book. - */ - @JsonProperty("contacts_create") - public Optional getContactsCreate() { - return contactsCreate; - } - - /** - * @return When enabled, requests read access to user's and shared albums, photos, videos, and audio. - */ - @JsonProperty("contacts_photos") - public Optional getContactsPhotos() { - return contactsPhotos; - } - - /** - * @return When enabled, requests read access to OneDrive files shared by other users. - */ - @JsonProperty("contacts_skydrive") - public Optional getContactsSkydrive() { - return contactsSkydrive; - } - - /** - * @return When enabled, allows the app to have the same access to information in the directory as the signed-in user. - */ - @JsonProperty("directory_accessasuser_all") - public Optional getDirectoryAccessasuserAll() { - return directoryAccessasuserAll; - } - - /** - * @return When enabled, allows the app to read data in your organization's directory, such as users, groups, and apps. - */ - @JsonProperty("directory_read_all") - public Optional getDirectoryReadAll() { - return directoryReadAll; - } - - /** - * @return When enabled, allows the app to read and write data in your organization's directory, such as users and groups. - */ - @JsonProperty("directory_readwrite_all") - public Optional getDirectoryReadwriteAll() { - return directoryReadwriteAll; - } - - /** - * @return When enabled, requests read access to personal, preferred, and business email addresses. - */ - @JsonProperty("emails") - public Optional getEmails() { - return emails; - } - - /** - * @return When enabled, requests permission to create events on user's default calendar. - */ - @JsonProperty("events_create") - public Optional getEventsCreate() { - return eventsCreate; - } - - /** - * @return When enabled, requests permission to read the user's calendars. - */ - @JsonProperty("graph_calendars") - public Optional getGraphCalendars() { - return graphCalendars; - } - - /** - * @return When enabled, requests permission to read and write the user's calendars. - */ - @JsonProperty("graph_calendars_update") - public Optional getGraphCalendarsUpdate() { - return graphCalendarsUpdate; - } - - /** - * @return When enabled, requests permission to read the user's contacts. - */ - @JsonProperty("graph_contacts") - public Optional getGraphContacts() { - return graphContacts; - } - - /** - * @return When enabled, requests permission to read and write the user's contacts. - */ - @JsonProperty("graph_contacts_update") - public Optional getGraphContactsUpdate() { - return graphContactsUpdate; - } - - /** - * @return When enabled, requests permission to read the user's device information. - */ - @JsonProperty("graph_device") - public Optional getGraphDevice() { - return graphDevice; - } - - /** - * @return When enabled, requests permission to send commands to the user's devices. - */ - @JsonProperty("graph_device_command") - public Optional getGraphDeviceCommand() { - return graphDeviceCommand; - } - - /** - * @return When enabled, requests permission to read the user's emails. - */ - @JsonProperty("graph_emails") - public Optional getGraphEmails() { - return graphEmails; - } - - /** - * @return When enabled, requests permission to read and write the user's emails. - */ - @JsonProperty("graph_emails_update") - public Optional getGraphEmailsUpdate() { - return graphEmailsUpdate; - } - - /** - * @return When enabled, requests permission to read the user's files. - */ - @JsonProperty("graph_files") - public Optional getGraphFiles() { - return graphFiles; - } - - /** - * @return When enabled, requests permission to read all files the user has access to. - */ - @JsonProperty("graph_files_all") - public Optional getGraphFilesAll() { - return graphFilesAll; - } - - /** - * @return When enabled, requests permission to read and write all files the user has access to. - */ - @JsonProperty("graph_files_all_update") - public Optional getGraphFilesAllUpdate() { - return graphFilesAllUpdate; - } - - /** - * @return When enabled, requests permission to read and write the user's files. - */ - @JsonProperty("graph_files_update") - public Optional getGraphFilesUpdate() { - return graphFilesUpdate; - } - - /** - * @return When enabled, requests permission to read the user's OneNote notebooks. - */ - @JsonProperty("graph_notes") - public Optional getGraphNotes() { - return graphNotes; - } - - /** - * @return When enabled, requests permission to create new OneNote notebooks. - */ - @JsonProperty("graph_notes_create") - public Optional getGraphNotesCreate() { - return graphNotesCreate; - } - - /** - * @return When enabled, requests permission to read and write the user's OneNote notebooks. - */ - @JsonProperty("graph_notes_update") - public Optional getGraphNotesUpdate() { - return graphNotesUpdate; - } - - /** - * @return When enabled, requests permission to read the user's tasks. - */ - @JsonProperty("graph_tasks") - public Optional getGraphTasks() { - return graphTasks; - } - - /** - * @return When enabled, requests permission to read and write the user's tasks. - */ - @JsonProperty("graph_tasks_update") - public Optional getGraphTasksUpdate() { - return graphTasksUpdate; - } - - /** - * @return When enabled, requests permission to read the user's profile. - */ - @JsonProperty("graph_user") - public Optional getGraphUser() { - return graphUser; - } - - /** - * @return When enabled, requests permission to read the user's activity history. - */ - @JsonProperty("graph_user_activity") - public Optional getGraphUserActivity() { - return graphUserActivity; - } - - /** - * @return When enabled, requests permission to read and write the user's profile. - */ - @JsonProperty("graph_user_update") - public Optional getGraphUserUpdate() { - return graphUserUpdate; - } - - /** - * @return When enabled, allows the app to read all group properties and memberships. - */ - @JsonProperty("group_read_all") - public Optional getGroupReadAll() { - return groupReadAll; - } - - /** - * @return When enabled, allows the app to create groups, read all group properties and memberships, update group properties and memberships, and delete groups. - */ - @JsonProperty("group_readwrite_all") - public Optional getGroupReadwriteAll() { - return groupReadwriteAll; - } - - /** - * @return When enabled, allows the app to create, read, update, and delete all mail in all mailboxes. - */ - @JsonProperty("mail_readwrite_all") - public Optional getMailReadwriteAll() { - return mailReadwriteAll; - } - - /** - * @return When enabled, allows the app to send mail as users in the organization. - */ - @JsonProperty("mail_send") - public Optional getMailSend() { - return mailSend; - } - - /** - * @return When enabled, requests access to user's Windows Live Messenger data. - */ - @JsonProperty("messenger") - public Optional getMessenger() { - return messenger; - } - - /** - * @return When enabled, requests a refresh token for offline access. - */ - @JsonProperty("offline_access") - public Optional getOfflineAccess() { - return offlineAccess; - } - - /** - * @return When enabled, requests read access to personal, business, and mobile phone numbers. - */ - @JsonProperty("phone_numbers") - public Optional getPhoneNumbers() { - return phoneNumbers; - } - - /** - * @return When enabled, requests read access to user's photos, videos, audio, and albums. - */ - @JsonProperty("photos") - public Optional getPhotos() { - return photos; - } - - /** - * @return When enabled, requests read access to personal and business postal addresses. - */ - @JsonProperty("postal_addresses") - public Optional getPostalAddresses() { - return postalAddresses; - } - - /** - * @return When enabled, allows the app to read the role-based access control (RBAC) settings for your company's directory. - */ - @JsonProperty("rolemanagement_read_all") - public Optional getRolemanagementReadAll() { - return rolemanagementReadAll; - } - - /** - * @return When enabled, allows the app to read and write the role-based access control (RBAC) settings for your company's directory. - */ - @JsonProperty("rolemanagement_readwrite_directory") - public Optional getRolemanagementReadwriteDirectory() { - return rolemanagementReadwriteDirectory; - } - - /** - * @return When enabled, requests permission to share content with other users. - */ - @JsonProperty("share") - public Optional getShare() { - return share; - } - - /** - * @return When enabled, provides single sign-in behavior for users already signed into their Microsoft account. - */ - @JsonProperty("signin") - public Optional getSignin() { - return signin; - } - - /** - * @return When enabled, allows the app to read documents and list items in all SharePoint site collections. - */ - @JsonProperty("sites_read_all") - public Optional getSitesReadAll() { - return sitesReadAll; - } - - /** - * @return When enabled, allows the app to create, read, update, and delete documents and list items in all SharePoint site collections. - */ - @JsonProperty("sites_readwrite_all") - public Optional getSitesReadwriteAll() { - return sitesReadwriteAll; - } - - /** - * @return When enabled, requests read access to user's files stored on OneDrive. - */ - @JsonProperty("skydrive") - public Optional getSkydrive() { - return skydrive; - } - - /** - * @return When enabled, requests read and write access to user's OneDrive files. - */ - @JsonProperty("skydrive_update") - public Optional getSkydriveUpdate() { - return skydriveUpdate; - } - - /** - * @return When enabled, allows the app to read the names and descriptions of all teams. - */ - @JsonProperty("team_readbasic_all") - public Optional getTeamReadbasicAll() { - return teamReadbasicAll; - } - - /** - * @return When enabled, allows the app to read and write all teams' information and change team membership. - */ - @JsonProperty("team_readwrite_all") - public Optional getTeamReadwriteAll() { - return teamReadwriteAll; - } - - /** - * @return When enabled, allows the app to read the full set of profile properties, reports, and managers of all users. - */ - @JsonProperty("user_read_all") - public Optional getUserReadAll() { - return userReadAll; - } - - /** - * @return When enabled, allows the app to read a basic set of profile properties of all users in the directory. - */ - @JsonProperty("user_readbasic_all") - public Optional getUserReadbasicAll() { - return userReadbasicAll; - } - - /** - * @return When enabled, requests read access to employer and work position information. - */ - @JsonProperty("work_profile") - public Optional getWorkProfile() { - return workProfile; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsWindowsLive && equalTo((ConnectionOptionsWindowsLive) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsWindowsLive other) { - return nonPersistentAttrs.equals(other.nonPersistentAttrs) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && freeformScopes.equals(other.freeformScopes) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && strategyVersion.equals(other.strategyVersion) - && upstreamParams.equals(other.upstreamParams) - && applications.equals(other.applications) - && applicationsCreate.equals(other.applicationsCreate) - && basic.equals(other.basic) - && birthday.equals(other.birthday) - && calendars.equals(other.calendars) - && calendarsUpdate.equals(other.calendarsUpdate) - && contactsBirthday.equals(other.contactsBirthday) - && contactsCalendars.equals(other.contactsCalendars) - && contactsCreate.equals(other.contactsCreate) - && contactsPhotos.equals(other.contactsPhotos) - && contactsSkydrive.equals(other.contactsSkydrive) - && directoryAccessasuserAll.equals(other.directoryAccessasuserAll) - && directoryReadAll.equals(other.directoryReadAll) - && directoryReadwriteAll.equals(other.directoryReadwriteAll) - && emails.equals(other.emails) - && eventsCreate.equals(other.eventsCreate) - && graphCalendars.equals(other.graphCalendars) - && graphCalendarsUpdate.equals(other.graphCalendarsUpdate) - && graphContacts.equals(other.graphContacts) - && graphContactsUpdate.equals(other.graphContactsUpdate) - && graphDevice.equals(other.graphDevice) - && graphDeviceCommand.equals(other.graphDeviceCommand) - && graphEmails.equals(other.graphEmails) - && graphEmailsUpdate.equals(other.graphEmailsUpdate) - && graphFiles.equals(other.graphFiles) - && graphFilesAll.equals(other.graphFilesAll) - && graphFilesAllUpdate.equals(other.graphFilesAllUpdate) - && graphFilesUpdate.equals(other.graphFilesUpdate) - && graphNotes.equals(other.graphNotes) - && graphNotesCreate.equals(other.graphNotesCreate) - && graphNotesUpdate.equals(other.graphNotesUpdate) - && graphTasks.equals(other.graphTasks) - && graphTasksUpdate.equals(other.graphTasksUpdate) - && graphUser.equals(other.graphUser) - && graphUserActivity.equals(other.graphUserActivity) - && graphUserUpdate.equals(other.graphUserUpdate) - && groupReadAll.equals(other.groupReadAll) - && groupReadwriteAll.equals(other.groupReadwriteAll) - && mailReadwriteAll.equals(other.mailReadwriteAll) - && mailSend.equals(other.mailSend) - && messenger.equals(other.messenger) - && offlineAccess.equals(other.offlineAccess) - && phoneNumbers.equals(other.phoneNumbers) - && photos.equals(other.photos) - && postalAddresses.equals(other.postalAddresses) - && rolemanagementReadAll.equals(other.rolemanagementReadAll) - && rolemanagementReadwriteDirectory.equals(other.rolemanagementReadwriteDirectory) - && share.equals(other.share) - && signin.equals(other.signin) - && sitesReadAll.equals(other.sitesReadAll) - && sitesReadwriteAll.equals(other.sitesReadwriteAll) - && skydrive.equals(other.skydrive) - && skydriveUpdate.equals(other.skydriveUpdate) - && teamReadbasicAll.equals(other.teamReadbasicAll) - && teamReadwriteAll.equals(other.teamReadwriteAll) - && userReadAll.equals(other.userReadAll) - && userReadbasicAll.equals(other.userReadbasicAll) - && workProfile.equals(other.workProfile); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.nonPersistentAttrs, - this.clientId, - this.clientSecret, - this.freeformScopes, - this.scope, - this.setUserRootAttributes, - this.strategyVersion, - this.upstreamParams, - this.applications, - this.applicationsCreate, - this.basic, - this.birthday, - this.calendars, - this.calendarsUpdate, - this.contactsBirthday, - this.contactsCalendars, - this.contactsCreate, - this.contactsPhotos, - this.contactsSkydrive, - this.directoryAccessasuserAll, - this.directoryReadAll, - this.directoryReadwriteAll, - this.emails, - this.eventsCreate, - this.graphCalendars, - this.graphCalendarsUpdate, - this.graphContacts, - this.graphContactsUpdate, - this.graphDevice, - this.graphDeviceCommand, - this.graphEmails, - this.graphEmailsUpdate, - this.graphFiles, - this.graphFilesAll, - this.graphFilesAllUpdate, - this.graphFilesUpdate, - this.graphNotes, - this.graphNotesCreate, - this.graphNotesUpdate, - this.graphTasks, - this.graphTasksUpdate, - this.graphUser, - this.graphUserActivity, - this.graphUserUpdate, - this.groupReadAll, - this.groupReadwriteAll, - this.mailReadwriteAll, - this.mailSend, - this.messenger, - this.offlineAccess, - this.phoneNumbers, - this.photos, - this.postalAddresses, - this.rolemanagementReadAll, - this.rolemanagementReadwriteDirectory, - this.share, - this.signin, - this.sitesReadAll, - this.sitesReadwriteAll, - this.skydrive, - this.skydriveUpdate, - this.teamReadbasicAll, - this.teamReadwriteAll, - this.userReadAll, - this.userReadbasicAll, - this.workProfile); - } - - @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> nonPersistentAttrs = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional> freeformScopes = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private Optional strategyVersion = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional applications = Optional.empty(); - - private Optional applicationsCreate = Optional.empty(); - - private Optional basic = Optional.empty(); - - private Optional birthday = Optional.empty(); - - private Optional calendars = Optional.empty(); - - private Optional calendarsUpdate = Optional.empty(); - - private Optional contactsBirthday = Optional.empty(); - - private Optional contactsCalendars = Optional.empty(); - - private Optional contactsCreate = Optional.empty(); - - private Optional contactsPhotos = Optional.empty(); - - private Optional contactsSkydrive = Optional.empty(); - - private Optional directoryAccessasuserAll = Optional.empty(); - - private Optional directoryReadAll = Optional.empty(); - - private Optional directoryReadwriteAll = Optional.empty(); - - private Optional emails = Optional.empty(); - - private Optional eventsCreate = Optional.empty(); - - private Optional graphCalendars = Optional.empty(); - - private Optional graphCalendarsUpdate = Optional.empty(); - - private Optional graphContacts = Optional.empty(); - - private Optional graphContactsUpdate = Optional.empty(); - - private Optional graphDevice = Optional.empty(); - - private Optional graphDeviceCommand = Optional.empty(); - - private Optional graphEmails = Optional.empty(); - - private Optional graphEmailsUpdate = Optional.empty(); - - private Optional graphFiles = Optional.empty(); - - private Optional graphFilesAll = Optional.empty(); - - private Optional graphFilesAllUpdate = Optional.empty(); - - private Optional graphFilesUpdate = Optional.empty(); - - private Optional graphNotes = Optional.empty(); - - private Optional graphNotesCreate = Optional.empty(); - - private Optional graphNotesUpdate = Optional.empty(); - - private Optional graphTasks = Optional.empty(); - - private Optional graphTasksUpdate = Optional.empty(); - - private Optional graphUser = Optional.empty(); - - private Optional graphUserActivity = Optional.empty(); - - private Optional graphUserUpdate = Optional.empty(); - - private Optional groupReadAll = Optional.empty(); - - private Optional groupReadwriteAll = Optional.empty(); - - private Optional mailReadwriteAll = Optional.empty(); - - private Optional mailSend = Optional.empty(); - - private Optional messenger = Optional.empty(); - - private Optional offlineAccess = Optional.empty(); - - private Optional phoneNumbers = Optional.empty(); - - private Optional photos = Optional.empty(); - - private Optional postalAddresses = Optional.empty(); - - private Optional rolemanagementReadAll = Optional.empty(); - - private Optional rolemanagementReadwriteDirectory = Optional.empty(); - - private Optional share = Optional.empty(); - - private Optional signin = Optional.empty(); - - private Optional sitesReadAll = Optional.empty(); - - private Optional sitesReadwriteAll = Optional.empty(); - - private Optional skydrive = Optional.empty(); - - private Optional skydriveUpdate = Optional.empty(); - - private Optional teamReadbasicAll = Optional.empty(); - - private Optional teamReadwriteAll = Optional.empty(); - - private Optional userReadAll = Optional.empty(); - - private Optional userReadbasicAll = Optional.empty(); - - private Optional workProfile = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsWindowsLive other) { - nonPersistentAttrs(other.getNonPersistentAttrs()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - freeformScopes(other.getFreeformScopes()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - strategyVersion(other.getStrategyVersion()); - upstreamParams(other.getUpstreamParams()); - applications(other.getApplications()); - applicationsCreate(other.getApplicationsCreate()); - basic(other.getBasic()); - birthday(other.getBirthday()); - calendars(other.getCalendars()); - calendarsUpdate(other.getCalendarsUpdate()); - contactsBirthday(other.getContactsBirthday()); - contactsCalendars(other.getContactsCalendars()); - contactsCreate(other.getContactsCreate()); - contactsPhotos(other.getContactsPhotos()); - contactsSkydrive(other.getContactsSkydrive()); - directoryAccessasuserAll(other.getDirectoryAccessasuserAll()); - directoryReadAll(other.getDirectoryReadAll()); - directoryReadwriteAll(other.getDirectoryReadwriteAll()); - emails(other.getEmails()); - eventsCreate(other.getEventsCreate()); - graphCalendars(other.getGraphCalendars()); - graphCalendarsUpdate(other.getGraphCalendarsUpdate()); - graphContacts(other.getGraphContacts()); - graphContactsUpdate(other.getGraphContactsUpdate()); - graphDevice(other.getGraphDevice()); - graphDeviceCommand(other.getGraphDeviceCommand()); - graphEmails(other.getGraphEmails()); - graphEmailsUpdate(other.getGraphEmailsUpdate()); - graphFiles(other.getGraphFiles()); - graphFilesAll(other.getGraphFilesAll()); - graphFilesAllUpdate(other.getGraphFilesAllUpdate()); - graphFilesUpdate(other.getGraphFilesUpdate()); - graphNotes(other.getGraphNotes()); - graphNotesCreate(other.getGraphNotesCreate()); - graphNotesUpdate(other.getGraphNotesUpdate()); - graphTasks(other.getGraphTasks()); - graphTasksUpdate(other.getGraphTasksUpdate()); - graphUser(other.getGraphUser()); - graphUserActivity(other.getGraphUserActivity()); - graphUserUpdate(other.getGraphUserUpdate()); - groupReadAll(other.getGroupReadAll()); - groupReadwriteAll(other.getGroupReadwriteAll()); - mailReadwriteAll(other.getMailReadwriteAll()); - mailSend(other.getMailSend()); - messenger(other.getMessenger()); - offlineAccess(other.getOfflineAccess()); - phoneNumbers(other.getPhoneNumbers()); - photos(other.getPhotos()); - postalAddresses(other.getPostalAddresses()); - rolemanagementReadAll(other.getRolemanagementReadAll()); - rolemanagementReadwriteDirectory(other.getRolemanagementReadwriteDirectory()); - share(other.getShare()); - signin(other.getSignin()); - sitesReadAll(other.getSitesReadAll()); - sitesReadwriteAll(other.getSitesReadwriteAll()); - skydrive(other.getSkydrive()); - skydriveUpdate(other.getSkydriveUpdate()); - teamReadbasicAll(other.getTeamReadbasicAll()); - teamReadwriteAll(other.getTeamReadwriteAll()); - userReadAll(other.getUserReadAll()); - userReadbasicAll(other.getUserReadbasicAll()); - workProfile(other.getWorkProfile()); - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - @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 = "freeform_scopes", nulls = Nulls.SKIP) - public Builder freeformScopes(Optional> freeformScopes) { - this.freeformScopes = freeformScopes; - return this; - } - - public Builder freeformScopes(List freeformScopes) { - this.freeformScopes = Optional.ofNullable(freeformScopes); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "strategy_version", nulls = Nulls.SKIP) - public Builder strategyVersion(Optional strategyVersion) { - this.strategyVersion = strategyVersion; - return this; - } - - public Builder strategyVersion(Integer strategyVersion) { - this.strategyVersion = Optional.ofNullable(strategyVersion); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - /** - *

When enabled, requests access to user's applications.

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

When enabled, requests permission to create applications.

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

When enabled, requests read access to user's basic profile information and contacts list.

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

When enabled, requests read access to user's birth day, month, and year.

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

When enabled, requests read access to user's calendars and events.

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

When enabled, requests read and write access to user's calendars and events.

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

When enabled, requests read access to contacts' birth day and birth month.

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

When enabled, requests read access to user's calendars and shared calendars/events from others.

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

When enabled, requests permission to create new contacts in user's address book.

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

When enabled, requests read access to user's and shared albums, photos, videos, and audio.

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

When enabled, requests read access to OneDrive files shared by other users.

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

When enabled, allows the app to have the same access to information in the directory as the signed-in user.

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

When enabled, allows the app to read data in your organization's directory, such as users, groups, and apps.

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

When enabled, allows the app to read and write data in your organization's directory, such as users and groups.

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

When enabled, requests read access to personal, preferred, and business email addresses.

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

When enabled, requests permission to create events on user's default calendar.

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

When enabled, requests permission to read the user's calendars.

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

When enabled, requests permission to read and write the user's calendars.

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

When enabled, requests permission to read the user's contacts.

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

When enabled, requests permission to read and write the user's contacts.

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

When enabled, requests permission to read the user's device information.

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

When enabled, requests permission to send commands to the user's devices.

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

When enabled, requests permission to read the user's emails.

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

When enabled, requests permission to read and write the user's emails.

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

When enabled, requests permission to read the user's files.

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

When enabled, requests permission to read all files the user has access to.

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

When enabled, requests permission to read and write all files the user has access to.

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

When enabled, requests permission to read and write the user's files.

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

When enabled, requests permission to read the user's OneNote notebooks.

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

When enabled, requests permission to create new OneNote notebooks.

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

When enabled, requests permission to read and write the user's OneNote notebooks.

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

When enabled, requests permission to read the user's tasks.

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

When enabled, requests permission to read and write the user's tasks.

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

When enabled, requests permission to read the user's profile.

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

When enabled, requests permission to read the user's activity history.

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

When enabled, requests permission to read and write the user's profile.

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

When enabled, allows the app to read all group properties and memberships.

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

When enabled, allows the app to create groups, read all group properties and memberships, update group properties and memberships, and delete groups.

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

When enabled, allows the app to create, read, update, and delete all mail in all mailboxes.

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

When enabled, allows the app to send mail as users in the organization.

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

When enabled, requests access to user's Windows Live Messenger data.

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

When enabled, requests a refresh token for offline access.

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

When enabled, requests read access to personal, business, and mobile phone numbers.

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

When enabled, requests read access to user's photos, videos, audio, and albums.

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

When enabled, requests read access to personal and business postal addresses.

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

When enabled, allows the app to read the role-based access control (RBAC) settings for your company's directory.

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

When enabled, allows the app to read and write the role-based access control (RBAC) settings for your company's directory.

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

When enabled, requests permission to share content with other users.

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

When enabled, provides single sign-in behavior for users already signed into their Microsoft account.

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

When enabled, allows the app to read documents and list items in all SharePoint site collections.

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

When enabled, allows the app to create, read, update, and delete documents and list items in all SharePoint site collections.

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

When enabled, requests read access to user's files stored on OneDrive.

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

When enabled, requests read and write access to user's OneDrive files.

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

When enabled, allows the app to read the names and descriptions of all teams.

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

When enabled, allows the app to read and write all teams' information and change team membership.

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

When enabled, allows the app to read the full set of profile properties, reports, and managers of all users.

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

When enabled, allows the app to read a basic set of profile properties of all users in the directory.

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

When enabled, requests read access to employer and work position information.

- */ - @JsonSetter(value = "work_profile", nulls = Nulls.SKIP) - public Builder workProfile(Optional workProfile) { - this.workProfile = workProfile; - return this; - } - - public Builder workProfile(Boolean workProfile) { - this.workProfile = Optional.ofNullable(workProfile); - return this; - } - - public ConnectionOptionsWindowsLive build() { - return new ConnectionOptionsWindowsLive( - nonPersistentAttrs, - clientId, - clientSecret, - freeformScopes, - scope, - setUserRootAttributes, - strategyVersion, - upstreamParams, - applications, - applicationsCreate, - basic, - birthday, - calendars, - calendarsUpdate, - contactsBirthday, - contactsCalendars, - contactsCreate, - contactsPhotos, - contactsSkydrive, - directoryAccessasuserAll, - directoryReadAll, - directoryReadwriteAll, - emails, - eventsCreate, - graphCalendars, - graphCalendarsUpdate, - graphContacts, - graphContactsUpdate, - graphDevice, - graphDeviceCommand, - graphEmails, - graphEmailsUpdate, - graphFiles, - graphFilesAll, - graphFilesAllUpdate, - graphFilesUpdate, - graphNotes, - graphNotesCreate, - graphNotesUpdate, - graphTasks, - graphTasksUpdate, - graphUser, - graphUserActivity, - graphUserUpdate, - groupReadAll, - groupReadwriteAll, - mailReadwriteAll, - mailSend, - messenger, - offlineAccess, - phoneNumbers, - photos, - postalAddresses, - rolemanagementReadAll, - rolemanagementReadwriteDirectory, - share, - signin, - sitesReadAll, - sitesReadwriteAll, - skydrive, - skydriveUpdate, - teamReadbasicAll, - teamReadwriteAll, - userReadAll, - userReadbasicAll, - workProfile, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsWordpress.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsWordpress.java deleted file mode 100644 index fe267e8a4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsWordpress.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsWordpress.Builder.class) -public final class ConnectionOptionsWordpress implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsWordpress( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsWordpress && equalTo((ConnectionOptionsWordpress) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsWordpress other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsWordpress other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsWordpress build() { - return new ConnectionOptionsWordpress( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsYahoo.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsYahoo.java deleted file mode 100644 index 2379ac84c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsYahoo.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsYahoo.Builder.class) -public final class ConnectionOptionsYahoo implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsYahoo( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsYahoo && equalTo((ConnectionOptionsYahoo) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsYahoo other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsYahoo other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsYahoo build() { - return new ConnectionOptionsYahoo( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsYammer.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsYammer.java deleted file mode 100644 index 370a37372..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsYammer.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsYammer.Builder.class) -public final class ConnectionOptionsYammer implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsYammer( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsYammer && equalTo((ConnectionOptionsYammer) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsYammer other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsYammer other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsYammer build() { - return new ConnectionOptionsYammer( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsYandex.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsYandex.java deleted file mode 100644 index adb5f64b0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsYandex.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionOptionsYandex.Builder.class) -public final class ConnectionOptionsYandex implements IConnectionOptionsOAuth2Common, IConnectionOptionsCommon { - private final Optional clientId; - - private final Optional clientSecret; - - private final Optional scope; - - private final Optional setUserRootAttributes; - - private final OptionalNullable>> - upstreamParams; - - private final Optional> nonPersistentAttrs; - - private final Map additionalProperties; - - private ConnectionOptionsYandex( - Optional clientId, - Optional clientSecret, - Optional scope, - Optional setUserRootAttributes, - OptionalNullable>> upstreamParams, - Optional> nonPersistentAttrs, - Map additionalProperties) { - this.clientId = clientId; - this.clientSecret = clientSecret; - this.scope = scope; - this.setUserRootAttributes = setUserRootAttributes; - this.upstreamParams = upstreamParams; - this.nonPersistentAttrs = nonPersistentAttrs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_id") - @java.lang.Override - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - @java.lang.Override - public Optional getClientSecret() { - return clientSecret; - } - - @JsonProperty("scope") - @java.lang.Override - public Optional getScope() { - return scope; - } - - @JsonProperty("set_user_root_attributes") - @java.lang.Override - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - @java.lang.Override - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("non_persistent_attrs") - @java.lang.Override - public Optional> getNonPersistentAttrs() { - return nonPersistentAttrs; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionOptionsYandex && equalTo((ConnectionOptionsYandex) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionOptionsYandex other) { - return clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && scope.equals(other.scope) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && upstreamParams.equals(other.upstreamParams) - && nonPersistentAttrs.equals(other.nonPersistentAttrs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.clientSecret, - this.scope, - this.setUserRootAttributes, - this.upstreamParams, - this.nonPersistentAttrs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionOptionsYandex other) { - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - scope(other.getScope()); - setUserRootAttributes(other.getSetUserRootAttributes()); - upstreamParams(other.getUpstreamParams()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - return this; - } - - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - public Builder clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - @JsonSetter(value = "client_secret", nulls = Nulls.SKIP) - public Builder clientSecret(Optional clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - public Builder clientSecret(String clientSecret) { - this.clientSecret = Optional.ofNullable(clientSecret); - return this; - } - - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional scope) { - this.scope = scope; - return this; - } - - public Builder scope(ConnectionScopeOAuth2 scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "non_persistent_attrs", nulls = Nulls.SKIP) - public Builder nonPersistentAttrs(Optional> nonPersistentAttrs) { - this.nonPersistentAttrs = nonPersistentAttrs; - return this; - } - - public Builder nonPersistentAttrs(List nonPersistentAttrs) { - this.nonPersistentAttrs = Optional.ofNullable(nonPersistentAttrs); - return this; - } - - public ConnectionOptionsYandex build() { - return new ConnectionOptionsYandex( - clientId, - clientSecret, - scope, - setUserRootAttributes, - upstreamParams, - nonPersistentAttrs, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasskeyAuthenticationMethod.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionPasskeyAuthenticationMethod.java deleted file mode 100644 index 21fd81bb8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasskeyAuthenticationMethod.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionPasskeyAuthenticationMethod.Builder.class) -public final class ConnectionPasskeyAuthenticationMethod { - private final Optional enabled; - - private final Map additionalProperties; - - private ConnectionPasskeyAuthenticationMethod(Optional enabled, Map additionalProperties) { - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Determines whether passkeys are enabled - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionPasskeyAuthenticationMethod - && equalTo((ConnectionPasskeyAuthenticationMethod) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionPasskeyAuthenticationMethod other) { - return enabled.equals(other.enabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 enabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionPasskeyAuthenticationMethod other) { - enabled(other.getEnabled()); - return this; - } - - /** - *

Determines whether passkeys are enabled

- */ - @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 ConnectionPasskeyAuthenticationMethod build() { - return new ConnectionPasskeyAuthenticationMethod(enabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasskeyChallengeUiEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionPasskeyChallengeUiEnum.java deleted file mode 100644 index 231afea06..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasskeyChallengeUiEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionPasskeyChallengeUiEnum { - public static final ConnectionPasskeyChallengeUiEnum AUTOFILL = - new ConnectionPasskeyChallengeUiEnum(Value.AUTOFILL, "autofill"); - - public static final ConnectionPasskeyChallengeUiEnum BOTH = - new ConnectionPasskeyChallengeUiEnum(Value.BOTH, "both"); - - public static final ConnectionPasskeyChallengeUiEnum BUTTON = - new ConnectionPasskeyChallengeUiEnum(Value.BUTTON, "button"); - - private final Value value; - - private final String string; - - ConnectionPasskeyChallengeUiEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionPasskeyChallengeUiEnum - && this.string.equals(((ConnectionPasskeyChallengeUiEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AUTOFILL: - return visitor.visitAutofill(); - case BOTH: - return visitor.visitBoth(); - case BUTTON: - return visitor.visitButton(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionPasskeyChallengeUiEnum valueOf(String value) { - switch (value) { - case "autofill": - return AUTOFILL; - case "both": - return BOTH; - case "button": - return BUTTON; - default: - return new ConnectionPasskeyChallengeUiEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - BOTH, - - AUTOFILL, - - BUTTON, - - UNKNOWN - } - - public interface Visitor { - T visitBoth(); - - T visitAutofill(); - - T visitButton(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasskeyOptions.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionPasskeyOptions.java deleted file mode 100644 index 11308fbe0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasskeyOptions.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionPasskeyOptions.Builder.class) -public final class ConnectionPasskeyOptions { - private final Optional challengeUi; - - private final Optional progressiveEnrollmentEnabled; - - private final Optional localEnrollmentEnabled; - - private final Map additionalProperties; - - private ConnectionPasskeyOptions( - Optional challengeUi, - Optional progressiveEnrollmentEnabled, - Optional localEnrollmentEnabled, - Map additionalProperties) { - this.challengeUi = challengeUi; - this.progressiveEnrollmentEnabled = progressiveEnrollmentEnabled; - this.localEnrollmentEnabled = localEnrollmentEnabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("challenge_ui") - public Optional getChallengeUi() { - return challengeUi; - } - - /** - * @return Enables or disables progressive enrollment of passkeys for the connection. - */ - @JsonProperty("progressive_enrollment_enabled") - public Optional getProgressiveEnrollmentEnabled() { - return progressiveEnrollmentEnabled; - } - - /** - * @return Enables or disables enrollment prompt for local passkey when user authenticates using a cross-device passkey for the connection. - */ - @JsonProperty("local_enrollment_enabled") - public Optional getLocalEnrollmentEnabled() { - return localEnrollmentEnabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionPasskeyOptions && equalTo((ConnectionPasskeyOptions) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionPasskeyOptions other) { - return challengeUi.equals(other.challengeUi) - && progressiveEnrollmentEnabled.equals(other.progressiveEnrollmentEnabled) - && localEnrollmentEnabled.equals(other.localEnrollmentEnabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.challengeUi, this.progressiveEnrollmentEnabled, this.localEnrollmentEnabled); - } - - @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 challengeUi = Optional.empty(); - - private Optional progressiveEnrollmentEnabled = Optional.empty(); - - private Optional localEnrollmentEnabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionPasskeyOptions other) { - challengeUi(other.getChallengeUi()); - progressiveEnrollmentEnabled(other.getProgressiveEnrollmentEnabled()); - localEnrollmentEnabled(other.getLocalEnrollmentEnabled()); - return this; - } - - @JsonSetter(value = "challenge_ui", nulls = Nulls.SKIP) - public Builder challengeUi(Optional challengeUi) { - this.challengeUi = challengeUi; - return this; - } - - public Builder challengeUi(ConnectionPasskeyChallengeUiEnum challengeUi) { - this.challengeUi = Optional.ofNullable(challengeUi); - return this; - } - - /** - *

Enables or disables progressive enrollment of passkeys for the connection.

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

Enables or disables enrollment prompt for local passkey when user authenticates using a cross-device passkey for the connection.

- */ - @JsonSetter(value = "local_enrollment_enabled", nulls = Nulls.SKIP) - public Builder localEnrollmentEnabled(Optional localEnrollmentEnabled) { - this.localEnrollmentEnabled = localEnrollmentEnabled; - return this; - } - - public Builder localEnrollmentEnabled(Boolean localEnrollmentEnabled) { - this.localEnrollmentEnabled = Optional.ofNullable(localEnrollmentEnabled); - return this; - } - - public ConnectionPasskeyOptions build() { - return new ConnectionPasskeyOptions( - challengeUi, progressiveEnrollmentEnabled, localEnrollmentEnabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordAuthenticationMethod.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordAuthenticationMethod.java deleted file mode 100644 index 67a8c5fdc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordAuthenticationMethod.java +++ /dev/null @@ -1,153 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionPasswordAuthenticationMethod.Builder.class) -public final class ConnectionPasswordAuthenticationMethod { - private final Optional enabled; - - private final Optional apiBehavior; - - private final Optional signupBehavior; - - private final Map additionalProperties; - - private ConnectionPasswordAuthenticationMethod( - Optional enabled, - Optional apiBehavior, - Optional signupBehavior, - Map additionalProperties) { - this.enabled = enabled; - this.apiBehavior = apiBehavior; - this.signupBehavior = signupBehavior; - this.additionalProperties = additionalProperties; - } - - /** - * @return Determines whether passwords are enabled - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - @JsonProperty("api_behavior") - public Optional getApiBehavior() { - return apiBehavior; - } - - @JsonProperty("signup_behavior") - public Optional getSignupBehavior() { - return signupBehavior; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionPasswordAuthenticationMethod - && equalTo((ConnectionPasswordAuthenticationMethod) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionPasswordAuthenticationMethod other) { - return enabled.equals(other.enabled) - && apiBehavior.equals(other.apiBehavior) - && signupBehavior.equals(other.signupBehavior); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled, this.apiBehavior, this.signupBehavior); - } - - @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 enabled = Optional.empty(); - - private Optional apiBehavior = Optional.empty(); - - private Optional signupBehavior = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionPasswordAuthenticationMethod other) { - enabled(other.getEnabled()); - apiBehavior(other.getApiBehavior()); - signupBehavior(other.getSignupBehavior()); - return this; - } - - /** - *

Determines whether passwords are enabled

- */ - @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; - } - - @JsonSetter(value = "api_behavior", nulls = Nulls.SKIP) - public Builder apiBehavior(Optional apiBehavior) { - this.apiBehavior = apiBehavior; - return this; - } - - public Builder apiBehavior(ConnectionApiBehaviorEnum apiBehavior) { - this.apiBehavior = Optional.ofNullable(apiBehavior); - return this; - } - - @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 ConnectionPasswordAuthenticationMethod build() { - return new ConnectionPasswordAuthenticationMethod( - enabled, apiBehavior, signupBehavior, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordComplexityOptions.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordComplexityOptions.java deleted file mode 100644 index f2734810c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordComplexityOptions.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionPasswordComplexityOptions.Builder.class) -public final class ConnectionPasswordComplexityOptions { - private final Optional minLength; - - private final Map additionalProperties; - - private ConnectionPasswordComplexityOptions(Optional minLength, Map additionalProperties) { - this.minLength = minLength; - this.additionalProperties = additionalProperties; - } - - /** - * @return Minimum password length - */ - @JsonProperty("min_length") - public Optional getMinLength() { - return minLength; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionPasswordComplexityOptions - && equalTo((ConnectionPasswordComplexityOptions) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionPasswordComplexityOptions other) { - return minLength.equals(other.minLength); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.minLength); - } - - @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 minLength = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionPasswordComplexityOptions other) { - minLength(other.getMinLength()); - return this; - } - - /** - *

Minimum password length

- */ - @JsonSetter(value = "min_length", nulls = Nulls.SKIP) - public Builder minLength(Optional minLength) { - this.minLength = minLength; - return this; - } - - public Builder minLength(Integer minLength) { - this.minLength = Optional.ofNullable(minLength); - return this; - } - - public ConnectionPasswordComplexityOptions build() { - return new ConnectionPasswordComplexityOptions(minLength, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordDictionaryOptions.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordDictionaryOptions.java deleted file mode 100644 index 1abe74805..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordDictionaryOptions.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionPasswordDictionaryOptions.Builder.class) -public final class ConnectionPasswordDictionaryOptions { - private final boolean enable; - - private final Optional> dictionary; - - private final Map additionalProperties; - - private ConnectionPasswordDictionaryOptions( - boolean enable, Optional> dictionary, Map additionalProperties) { - this.enable = enable; - this.dictionary = dictionary; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("enable") - public boolean getEnable() { - return enable; - } - - /** - * @return Custom Password Dictionary. An array of up to 200 entries. - */ - @JsonProperty("dictionary") - public Optional> getDictionary() { - return dictionary; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionPasswordDictionaryOptions - && equalTo((ConnectionPasswordDictionaryOptions) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionPasswordDictionaryOptions other) { - return enable == other.enable && dictionary.equals(other.dictionary); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enable, this.dictionary); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EnableStage builder() { - return new Builder(); - } - - public interface EnableStage { - _FinalStage enable(boolean enable); - - Builder from(ConnectionPasswordDictionaryOptions other); - } - - public interface _FinalStage { - ConnectionPasswordDictionaryOptions build(); - - /** - *

Custom Password Dictionary. An array of up to 200 entries.

- */ - _FinalStage dictionary(Optional> dictionary); - - _FinalStage dictionary(List dictionary); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EnableStage, _FinalStage { - private boolean enable; - - private Optional> dictionary = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionPasswordDictionaryOptions other) { - enable(other.getEnable()); - dictionary(other.getDictionary()); - return this; - } - - @java.lang.Override - @JsonSetter("enable") - public _FinalStage enable(boolean enable) { - this.enable = enable; - return this; - } - - /** - *

Custom Password Dictionary. An array of up to 200 entries.

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

Custom Password Dictionary. An array of up to 200 entries.

- */ - @java.lang.Override - @JsonSetter(value = "dictionary", nulls = Nulls.SKIP) - public _FinalStage dictionary(Optional> dictionary) { - this.dictionary = dictionary; - return this; - } - - @java.lang.Override - public ConnectionPasswordDictionaryOptions build() { - return new ConnectionPasswordDictionaryOptions(enable, dictionary, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordHistoryOptions.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordHistoryOptions.java deleted file mode 100644 index a5ea8bb03..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordHistoryOptions.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionPasswordHistoryOptions.Builder.class) -public final class ConnectionPasswordHistoryOptions { - private final boolean enable; - - private final Optional size; - - private final Map additionalProperties; - - private ConnectionPasswordHistoryOptions( - boolean enable, Optional size, Map additionalProperties) { - this.enable = enable; - this.size = size; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("enable") - public boolean getEnable() { - return enable; - } - - @JsonProperty("size") - public Optional getSize() { - return size; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionPasswordHistoryOptions && equalTo((ConnectionPasswordHistoryOptions) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionPasswordHistoryOptions other) { - return enable == other.enable && size.equals(other.size); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enable, this.size); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EnableStage builder() { - return new Builder(); - } - - public interface EnableStage { - _FinalStage enable(boolean enable); - - Builder from(ConnectionPasswordHistoryOptions other); - } - - public interface _FinalStage { - ConnectionPasswordHistoryOptions build(); - - _FinalStage size(Optional size); - - _FinalStage size(Integer size); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EnableStage, _FinalStage { - private boolean enable; - - private Optional size = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionPasswordHistoryOptions other) { - enable(other.getEnable()); - size(other.getSize()); - return this; - } - - @java.lang.Override - @JsonSetter("enable") - public _FinalStage enable(boolean enable) { - this.enable = enable; - return this; - } - - @java.lang.Override - public _FinalStage size(Integer size) { - this.size = Optional.ofNullable(size); - return this; - } - - @java.lang.Override - @JsonSetter(value = "size", nulls = Nulls.SKIP) - public _FinalStage size(Optional size) { - this.size = size; - return this; - } - - @java.lang.Override - public ConnectionPasswordHistoryOptions build() { - return new ConnectionPasswordHistoryOptions(enable, size, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordNoPersonalInfoOptions.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordNoPersonalInfoOptions.java deleted file mode 100644 index ea52d475b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordNoPersonalInfoOptions.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = ConnectionPasswordNoPersonalInfoOptions.Builder.class) -public final class ConnectionPasswordNoPersonalInfoOptions { - private final boolean enable; - - private final Map additionalProperties; - - private ConnectionPasswordNoPersonalInfoOptions(boolean enable, Map additionalProperties) { - this.enable = enable; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("enable") - public boolean getEnable() { - return enable; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionPasswordNoPersonalInfoOptions - && equalTo((ConnectionPasswordNoPersonalInfoOptions) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionPasswordNoPersonalInfoOptions other) { - return enable == other.enable; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enable); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EnableStage builder() { - return new Builder(); - } - - public interface EnableStage { - _FinalStage enable(boolean enable); - - Builder from(ConnectionPasswordNoPersonalInfoOptions other); - } - - public interface _FinalStage { - ConnectionPasswordNoPersonalInfoOptions build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EnableStage, _FinalStage { - private boolean enable; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionPasswordNoPersonalInfoOptions other) { - enable(other.getEnable()); - return this; - } - - @java.lang.Override - @JsonSetter("enable") - public _FinalStage enable(boolean enable) { - this.enable = enable; - return this; - } - - @java.lang.Override - public ConnectionPasswordNoPersonalInfoOptions build() { - return new ConnectionPasswordNoPersonalInfoOptions(enable, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordPolicyEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordPolicyEnum.java deleted file mode 100644 index c9d9a7fbf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPasswordPolicyEnum.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionPasswordPolicyEnum { - public static final ConnectionPasswordPolicyEnum FAIR = new ConnectionPasswordPolicyEnum(Value.FAIR, "fair"); - - public static final ConnectionPasswordPolicyEnum LOW = new ConnectionPasswordPolicyEnum(Value.LOW, "low"); - - public static final ConnectionPasswordPolicyEnum EXCELLENT = - new ConnectionPasswordPolicyEnum(Value.EXCELLENT, "excellent"); - - public static final ConnectionPasswordPolicyEnum GOOD = new ConnectionPasswordPolicyEnum(Value.GOOD, "good"); - - public static final ConnectionPasswordPolicyEnum NONE = new ConnectionPasswordPolicyEnum(Value.NONE, "none"); - - private final Value value; - - private final String string; - - ConnectionPasswordPolicyEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionPasswordPolicyEnum - && this.string.equals(((ConnectionPasswordPolicyEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FAIR: - return visitor.visitFair(); - case LOW: - return visitor.visitLow(); - case EXCELLENT: - return visitor.visitExcellent(); - case GOOD: - return visitor.visitGood(); - case NONE: - return visitor.visitNone(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionPasswordPolicyEnum valueOf(String value) { - switch (value) { - case "fair": - return FAIR; - case "low": - return LOW; - case "excellent": - return EXCELLENT; - case "good": - return GOOD; - case "none": - return NONE; - default: - return new ConnectionPasswordPolicyEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - NONE, - - LOW, - - FAIR, - - GOOD, - - EXCELLENT, - - UNKNOWN - } - - public interface Visitor { - T visitNone(); - - T visitLow(); - - T visitFair(); - - T visitGood(); - - T visitExcellent(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionPhoneOtpAuthenticationMethod.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionPhoneOtpAuthenticationMethod.java deleted file mode 100644 index 34048fa9d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPhoneOtpAuthenticationMethod.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionPhoneOtpAuthenticationMethod.Builder.class) -public final class ConnectionPhoneOtpAuthenticationMethod { - private final Optional enabled; - - private final Map additionalProperties; - - private ConnectionPhoneOtpAuthenticationMethod( - Optional enabled, Map additionalProperties) { - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Determines whether phone OTP is enabled - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionPhoneOtpAuthenticationMethod - && equalTo((ConnectionPhoneOtpAuthenticationMethod) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionPhoneOtpAuthenticationMethod other) { - return enabled.equals(other.enabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 enabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionPhoneOtpAuthenticationMethod other) { - enabled(other.getEnabled()); - return this; - } - - /** - *

Determines whether phone OTP is enabled

- */ - @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 ConnectionPhoneOtpAuthenticationMethod build() { - return new ConnectionPhoneOtpAuthenticationMethod(enabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfile.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfile.java deleted file mode 100644 index 0185bb7ac..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfile.java +++ /dev/null @@ -1,257 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionProfile.Builder.class) -public final class ConnectionProfile { - private final Optional id; - - private final Optional name; - - private final Optional organization; - - private final Optional connectionNamePrefixTemplate; - - private final Optional> enabledFeatures; - - private final Optional connectionConfig; - - private final Optional strategyOverrides; - - private final Map additionalProperties; - - private ConnectionProfile( - Optional id, - Optional name, - Optional organization, - Optional connectionNamePrefixTemplate, - Optional> enabledFeatures, - Optional connectionConfig, - Optional strategyOverrides, - Map additionalProperties) { - this.id = id; - this.name = name; - this.organization = organization; - this.connectionNamePrefixTemplate = connectionNamePrefixTemplate; - this.enabledFeatures = enabledFeatures; - this.connectionConfig = connectionConfig; - this.strategyOverrides = strategyOverrides; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("organization") - public Optional getOrganization() { - return organization; - } - - @JsonProperty("connection_name_prefix_template") - public Optional getConnectionNamePrefixTemplate() { - return connectionNamePrefixTemplate; - } - - @JsonProperty("enabled_features") - public Optional> getEnabledFeatures() { - return enabledFeatures; - } - - @JsonProperty("connection_config") - public Optional getConnectionConfig() { - return connectionConfig; - } - - @JsonProperty("strategy_overrides") - public Optional getStrategyOverrides() { - return strategyOverrides; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionProfile && equalTo((ConnectionProfile) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionProfile other) { - return id.equals(other.id) - && name.equals(other.name) - && organization.equals(other.organization) - && connectionNamePrefixTemplate.equals(other.connectionNamePrefixTemplate) - && enabledFeatures.equals(other.enabledFeatures) - && connectionConfig.equals(other.connectionConfig) - && strategyOverrides.equals(other.strategyOverrides); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.organization, - this.connectionNamePrefixTemplate, - this.enabledFeatures, - this.connectionConfig, - this.strategyOverrides); - } - - @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 organization = Optional.empty(); - - private Optional connectionNamePrefixTemplate = Optional.empty(); - - private Optional> enabledFeatures = Optional.empty(); - - private Optional connectionConfig = Optional.empty(); - - private Optional strategyOverrides = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionProfile other) { - id(other.getId()); - name(other.getName()); - organization(other.getOrganization()); - connectionNamePrefixTemplate(other.getConnectionNamePrefixTemplate()); - enabledFeatures(other.getEnabledFeatures()); - connectionConfig(other.getConnectionConfig()); - strategyOverrides(other.getStrategyOverrides()); - 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 = "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 = "organization", nulls = Nulls.SKIP) - public Builder organization(Optional organization) { - this.organization = organization; - return this; - } - - public Builder organization(ConnectionProfileOrganization organization) { - this.organization = Optional.ofNullable(organization); - return this; - } - - @JsonSetter(value = "connection_name_prefix_template", nulls = Nulls.SKIP) - public Builder connectionNamePrefixTemplate(Optional connectionNamePrefixTemplate) { - this.connectionNamePrefixTemplate = connectionNamePrefixTemplate; - return this; - } - - public Builder connectionNamePrefixTemplate(String connectionNamePrefixTemplate) { - this.connectionNamePrefixTemplate = Optional.ofNullable(connectionNamePrefixTemplate); - return this; - } - - @JsonSetter(value = "enabled_features", nulls = Nulls.SKIP) - public Builder enabledFeatures(Optional> enabledFeatures) { - this.enabledFeatures = enabledFeatures; - return this; - } - - public Builder enabledFeatures(List enabledFeatures) { - this.enabledFeatures = Optional.ofNullable(enabledFeatures); - return this; - } - - @JsonSetter(value = "connection_config", nulls = Nulls.SKIP) - public Builder connectionConfig(Optional connectionConfig) { - this.connectionConfig = connectionConfig; - return this; - } - - public Builder connectionConfig(ConnectionProfileConfig connectionConfig) { - this.connectionConfig = Optional.ofNullable(connectionConfig); - return this; - } - - @JsonSetter(value = "strategy_overrides", nulls = Nulls.SKIP) - public Builder strategyOverrides(Optional strategyOverrides) { - this.strategyOverrides = strategyOverrides; - return this; - } - - public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOverrides) { - this.strategyOverrides = Optional.ofNullable(strategyOverrides); - return this; - } - - public ConnectionProfile build() { - return new ConnectionProfile( - id, - name, - organization, - connectionNamePrefixTemplate, - enabledFeatures, - connectionConfig, - strategyOverrides, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileConfig.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileConfig.java deleted file mode 100644 index 68d2ff0e7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileConfig.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.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 = ConnectionProfileConfig.Builder.class) -public final class ConnectionProfileConfig { - private final Map additionalProperties; - - private ConnectionProfileConfig(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionProfileConfig; - } - - @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(ConnectionProfileConfig other) { - return this; - } - - public ConnectionProfileConfig build() { - return new ConnectionProfileConfig(additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganization.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganization.java deleted file mode 100644 index 1a3018acb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganization.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionProfileOrganization.Builder.class) -public final class ConnectionProfileOrganization { - private final Optional showAsButton; - - private final Optional assignMembershipOnLogin; - - private final Map additionalProperties; - - private ConnectionProfileOrganization( - Optional showAsButton, - Optional assignMembershipOnLogin, - Map additionalProperties) { - this.showAsButton = showAsButton; - this.assignMembershipOnLogin = assignMembershipOnLogin; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @JsonProperty("assign_membership_on_login") - public Optional getAssignMembershipOnLogin() { - return assignMembershipOnLogin; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionProfileOrganization && equalTo((ConnectionProfileOrganization) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionProfileOrganization other) { - return showAsButton.equals(other.showAsButton) && assignMembershipOnLogin.equals(other.assignMembershipOnLogin); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.showAsButton, this.assignMembershipOnLogin); - } - - @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 showAsButton = Optional.empty(); - - private Optional assignMembershipOnLogin = - Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionProfileOrganization other) { - showAsButton(other.getShowAsButton()); - assignMembershipOnLogin(other.getAssignMembershipOnLogin()); - return this; - } - - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(ConnectionProfileOrganizationShowAsButtonEnum showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @JsonSetter(value = "assign_membership_on_login", nulls = Nulls.SKIP) - public Builder assignMembershipOnLogin( - Optional assignMembershipOnLogin) { - this.assignMembershipOnLogin = assignMembershipOnLogin; - return this; - } - - public Builder assignMembershipOnLogin( - ConnectionProfileOrganizationAssignMembershipOnLoginEnum assignMembershipOnLogin) { - this.assignMembershipOnLogin = Optional.ofNullable(assignMembershipOnLogin); - return this; - } - - public ConnectionProfileOrganization build() { - return new ConnectionProfileOrganization(showAsButton, assignMembershipOnLogin, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganizationAssignMembershipOnLoginEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganizationAssignMembershipOnLoginEnum.java deleted file mode 100644 index f6c9714dc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganizationAssignMembershipOnLoginEnum.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionProfileOrganizationAssignMembershipOnLoginEnum { - public static final ConnectionProfileOrganizationAssignMembershipOnLoginEnum REQUIRED = - new ConnectionProfileOrganizationAssignMembershipOnLoginEnum(Value.REQUIRED, "required"); - - public static final ConnectionProfileOrganizationAssignMembershipOnLoginEnum NONE = - new ConnectionProfileOrganizationAssignMembershipOnLoginEnum(Value.NONE, "none"); - - public static final ConnectionProfileOrganizationAssignMembershipOnLoginEnum OPTIONAL = - new ConnectionProfileOrganizationAssignMembershipOnLoginEnum(Value.OPTIONAL, "optional"); - - private final Value value; - - private final String string; - - ConnectionProfileOrganizationAssignMembershipOnLoginEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionProfileOrganizationAssignMembershipOnLoginEnum - && this.string.equals( - ((ConnectionProfileOrganizationAssignMembershipOnLoginEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case REQUIRED: - return visitor.visitRequired(); - case NONE: - return visitor.visitNone(); - case OPTIONAL: - return visitor.visitOptional(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionProfileOrganizationAssignMembershipOnLoginEnum valueOf(String value) { - switch (value) { - case "required": - return REQUIRED; - case "none": - return NONE; - case "optional": - return OPTIONAL; - default: - return new ConnectionProfileOrganizationAssignMembershipOnLoginEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - NONE, - - OPTIONAL, - - REQUIRED, - - UNKNOWN - } - - public interface Visitor { - T visitNone(); - - T visitOptional(); - - T visitRequired(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganizationShowAsButtonEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganizationShowAsButtonEnum.java deleted file mode 100644 index 0eabb579d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileOrganizationShowAsButtonEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionProfileOrganizationShowAsButtonEnum { - public static final ConnectionProfileOrganizationShowAsButtonEnum REQUIRED = - new ConnectionProfileOrganizationShowAsButtonEnum(Value.REQUIRED, "required"); - - public static final ConnectionProfileOrganizationShowAsButtonEnum NONE = - new ConnectionProfileOrganizationShowAsButtonEnum(Value.NONE, "none"); - - public static final ConnectionProfileOrganizationShowAsButtonEnum OPTIONAL = - new ConnectionProfileOrganizationShowAsButtonEnum(Value.OPTIONAL, "optional"); - - private final Value value; - - private final String string; - - ConnectionProfileOrganizationShowAsButtonEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionProfileOrganizationShowAsButtonEnum - && this.string.equals(((ConnectionProfileOrganizationShowAsButtonEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case REQUIRED: - return visitor.visitRequired(); - case NONE: - return visitor.visitNone(); - case OPTIONAL: - return visitor.visitOptional(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionProfileOrganizationShowAsButtonEnum valueOf(String value) { - switch (value) { - case "required": - return REQUIRED; - case "none": - return NONE; - case "optional": - return OPTIONAL; - default: - return new ConnectionProfileOrganizationShowAsButtonEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - NONE, - - OPTIONAL, - - REQUIRED, - - UNKNOWN - } - - public interface Visitor { - T visitNone(); - - T visitOptional(); - - T visitRequired(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileStrategyOverride.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileStrategyOverride.java deleted file mode 100644 index 0cc11dd51..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileStrategyOverride.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionProfileStrategyOverride.Builder.class) -public final class ConnectionProfileStrategyOverride { - private final Optional> enabledFeatures; - - private final Optional connectionConfig; - - private final Map additionalProperties; - - private ConnectionProfileStrategyOverride( - Optional> enabledFeatures, - Optional connectionConfig, - Map additionalProperties) { - this.enabledFeatures = enabledFeatures; - this.connectionConfig = connectionConfig; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("enabled_features") - public Optional> getEnabledFeatures() { - return enabledFeatures; - } - - @JsonProperty("connection_config") - public Optional getConnectionConfig() { - return connectionConfig; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionProfileStrategyOverride && equalTo((ConnectionProfileStrategyOverride) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionProfileStrategyOverride other) { - return enabledFeatures.equals(other.enabledFeatures) && connectionConfig.equals(other.connectionConfig); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabledFeatures, this.connectionConfig); - } - - @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> enabledFeatures = Optional.empty(); - - private Optional connectionConfig = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionProfileStrategyOverride other) { - enabledFeatures(other.getEnabledFeatures()); - connectionConfig(other.getConnectionConfig()); - return this; - } - - @JsonSetter(value = "enabled_features", nulls = Nulls.SKIP) - public Builder enabledFeatures(Optional> enabledFeatures) { - this.enabledFeatures = enabledFeatures; - return this; - } - - public Builder enabledFeatures(List enabledFeatures) { - this.enabledFeatures = Optional.ofNullable(enabledFeatures); - return this; - } - - @JsonSetter(value = "connection_config", nulls = Nulls.SKIP) - public Builder connectionConfig(Optional connectionConfig) { - this.connectionConfig = connectionConfig; - return this; - } - - public Builder connectionConfig(ConnectionProfileStrategyOverridesConnectionConfig connectionConfig) { - this.connectionConfig = Optional.ofNullable(connectionConfig); - return this; - } - - public ConnectionProfileStrategyOverride build() { - return new ConnectionProfileStrategyOverride(enabledFeatures, connectionConfig, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileStrategyOverrides.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileStrategyOverrides.java deleted file mode 100644 index 8dea364b1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileStrategyOverrides.java +++ /dev/null @@ -1,268 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionProfileStrategyOverrides.Builder.class) -public final class ConnectionProfileStrategyOverrides { - private final Optional pingfederate; - - private final Optional ad; - - private final Optional adfs; - - private final Optional waad; - - private final Optional googleApps; - - private final Optional okta; - - private final Optional oidc; - - private final Optional samlp; - - private final Map additionalProperties; - - private ConnectionProfileStrategyOverrides( - Optional pingfederate, - Optional ad, - Optional adfs, - Optional waad, - Optional googleApps, - Optional okta, - Optional oidc, - Optional samlp, - Map additionalProperties) { - this.pingfederate = pingfederate; - this.ad = ad; - this.adfs = adfs; - this.waad = waad; - this.googleApps = googleApps; - this.okta = okta; - this.oidc = oidc; - this.samlp = samlp; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("pingfederate") - public Optional getPingfederate() { - return pingfederate; - } - - @JsonProperty("ad") - public Optional getAd() { - return ad; - } - - @JsonProperty("adfs") - public Optional getAdfs() { - return adfs; - } - - @JsonProperty("waad") - public Optional getWaad() { - return waad; - } - - @JsonProperty("google-apps") - public Optional getGoogleApps() { - return googleApps; - } - - @JsonProperty("okta") - public Optional getOkta() { - return okta; - } - - @JsonProperty("oidc") - public Optional getOidc() { - return oidc; - } - - @JsonProperty("samlp") - public Optional getSamlp() { - return samlp; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionProfileStrategyOverrides - && equalTo((ConnectionProfileStrategyOverrides) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionProfileStrategyOverrides other) { - return pingfederate.equals(other.pingfederate) - && ad.equals(other.ad) - && adfs.equals(other.adfs) - && waad.equals(other.waad) - && googleApps.equals(other.googleApps) - && okta.equals(other.okta) - && oidc.equals(other.oidc) - && samlp.equals(other.samlp); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.pingfederate, this.ad, this.adfs, this.waad, this.googleApps, this.okta, this.oidc, this.samlp); - } - - @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 pingfederate = Optional.empty(); - - private Optional ad = Optional.empty(); - - private Optional adfs = Optional.empty(); - - private Optional waad = Optional.empty(); - - private Optional googleApps = Optional.empty(); - - private Optional okta = Optional.empty(); - - private Optional oidc = Optional.empty(); - - private Optional samlp = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionProfileStrategyOverrides other) { - pingfederate(other.getPingfederate()); - ad(other.getAd()); - adfs(other.getAdfs()); - waad(other.getWaad()); - googleApps(other.getGoogleApps()); - okta(other.getOkta()); - oidc(other.getOidc()); - samlp(other.getSamlp()); - return this; - } - - @JsonSetter(value = "pingfederate", nulls = Nulls.SKIP) - public Builder pingfederate(Optional pingfederate) { - this.pingfederate = pingfederate; - return this; - } - - public Builder pingfederate(ConnectionProfileStrategyOverride pingfederate) { - this.pingfederate = Optional.ofNullable(pingfederate); - return this; - } - - @JsonSetter(value = "ad", nulls = Nulls.SKIP) - public Builder ad(Optional ad) { - this.ad = ad; - return this; - } - - public Builder ad(ConnectionProfileStrategyOverride ad) { - this.ad = Optional.ofNullable(ad); - return this; - } - - @JsonSetter(value = "adfs", nulls = Nulls.SKIP) - public Builder adfs(Optional adfs) { - this.adfs = adfs; - return this; - } - - public Builder adfs(ConnectionProfileStrategyOverride adfs) { - this.adfs = Optional.ofNullable(adfs); - return this; - } - - @JsonSetter(value = "waad", nulls = Nulls.SKIP) - public Builder waad(Optional waad) { - this.waad = waad; - return this; - } - - public Builder waad(ConnectionProfileStrategyOverride waad) { - this.waad = Optional.ofNullable(waad); - return this; - } - - @JsonSetter(value = "google-apps", nulls = Nulls.SKIP) - public Builder googleApps(Optional googleApps) { - this.googleApps = googleApps; - return this; - } - - public Builder googleApps(ConnectionProfileStrategyOverride googleApps) { - this.googleApps = Optional.ofNullable(googleApps); - return this; - } - - @JsonSetter(value = "okta", nulls = Nulls.SKIP) - public Builder okta(Optional okta) { - this.okta = okta; - return this; - } - - public Builder okta(ConnectionProfileStrategyOverride okta) { - this.okta = Optional.ofNullable(okta); - return this; - } - - @JsonSetter(value = "oidc", nulls = Nulls.SKIP) - public Builder oidc(Optional oidc) { - this.oidc = oidc; - return this; - } - - public Builder oidc(ConnectionProfileStrategyOverride oidc) { - this.oidc = Optional.ofNullable(oidc); - return this; - } - - @JsonSetter(value = "samlp", nulls = Nulls.SKIP) - public Builder samlp(Optional samlp) { - this.samlp = samlp; - return this; - } - - public Builder samlp(ConnectionProfileStrategyOverride samlp) { - this.samlp = Optional.ofNullable(samlp); - return this; - } - - public ConnectionProfileStrategyOverrides build() { - return new ConnectionProfileStrategyOverrides( - pingfederate, ad, adfs, waad, googleApps, okta, oidc, samlp, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileStrategyOverridesConnectionConfig.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileStrategyOverridesConnectionConfig.java deleted file mode 100644 index 9bd05af6c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileStrategyOverridesConnectionConfig.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.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 = ConnectionProfileStrategyOverridesConnectionConfig.Builder.class) -public final class ConnectionProfileStrategyOverridesConnectionConfig { - private final Map additionalProperties; - - private ConnectionProfileStrategyOverridesConnectionConfig(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionProfileStrategyOverridesConnectionConfig; - } - - @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(ConnectionProfileStrategyOverridesConnectionConfig other) { - return this; - } - - public ConnectionProfileStrategyOverridesConnectionConfig build() { - return new ConnectionProfileStrategyOverridesConnectionConfig(additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileTemplate.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileTemplate.java deleted file mode 100644 index 473f874b4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileTemplate.java +++ /dev/null @@ -1,231 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionProfileTemplate.Builder.class) -public final class ConnectionProfileTemplate { - private final Optional name; - - private final Optional organization; - - private final Optional connectionNamePrefixTemplate; - - private final Optional> enabledFeatures; - - private final Optional connectionConfig; - - private final Optional strategyOverrides; - - private final Map additionalProperties; - - private ConnectionProfileTemplate( - Optional name, - Optional organization, - Optional connectionNamePrefixTemplate, - Optional> enabledFeatures, - Optional connectionConfig, - Optional strategyOverrides, - Map additionalProperties) { - this.name = name; - this.organization = organization; - this.connectionNamePrefixTemplate = connectionNamePrefixTemplate; - this.enabledFeatures = enabledFeatures; - this.connectionConfig = connectionConfig; - this.strategyOverrides = strategyOverrides; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("organization") - public Optional getOrganization() { - return organization; - } - - @JsonProperty("connection_name_prefix_template") - public Optional getConnectionNamePrefixTemplate() { - return connectionNamePrefixTemplate; - } - - @JsonProperty("enabled_features") - public Optional> getEnabledFeatures() { - return enabledFeatures; - } - - @JsonProperty("connection_config") - public Optional getConnectionConfig() { - return connectionConfig; - } - - @JsonProperty("strategy_overrides") - public Optional getStrategyOverrides() { - return strategyOverrides; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionProfileTemplate && equalTo((ConnectionProfileTemplate) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionProfileTemplate other) { - return name.equals(other.name) - && organization.equals(other.organization) - && connectionNamePrefixTemplate.equals(other.connectionNamePrefixTemplate) - && enabledFeatures.equals(other.enabledFeatures) - && connectionConfig.equals(other.connectionConfig) - && strategyOverrides.equals(other.strategyOverrides); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.organization, - this.connectionNamePrefixTemplate, - this.enabledFeatures, - this.connectionConfig, - this.strategyOverrides); - } - - @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 organization = Optional.empty(); - - private Optional connectionNamePrefixTemplate = Optional.empty(); - - private Optional> enabledFeatures = Optional.empty(); - - private Optional connectionConfig = Optional.empty(); - - private Optional strategyOverrides = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionProfileTemplate other) { - name(other.getName()); - organization(other.getOrganization()); - connectionNamePrefixTemplate(other.getConnectionNamePrefixTemplate()); - enabledFeatures(other.getEnabledFeatures()); - connectionConfig(other.getConnectionConfig()); - strategyOverrides(other.getStrategyOverrides()); - 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 = "organization", nulls = Nulls.SKIP) - public Builder organization(Optional organization) { - this.organization = organization; - return this; - } - - public Builder organization(ConnectionProfileOrganization organization) { - this.organization = Optional.ofNullable(organization); - return this; - } - - @JsonSetter(value = "connection_name_prefix_template", nulls = Nulls.SKIP) - public Builder connectionNamePrefixTemplate(Optional connectionNamePrefixTemplate) { - this.connectionNamePrefixTemplate = connectionNamePrefixTemplate; - return this; - } - - public Builder connectionNamePrefixTemplate(String connectionNamePrefixTemplate) { - this.connectionNamePrefixTemplate = Optional.ofNullable(connectionNamePrefixTemplate); - return this; - } - - @JsonSetter(value = "enabled_features", nulls = Nulls.SKIP) - public Builder enabledFeatures(Optional> enabledFeatures) { - this.enabledFeatures = enabledFeatures; - return this; - } - - public Builder enabledFeatures(List enabledFeatures) { - this.enabledFeatures = Optional.ofNullable(enabledFeatures); - return this; - } - - @JsonSetter(value = "connection_config", nulls = Nulls.SKIP) - public Builder connectionConfig(Optional connectionConfig) { - this.connectionConfig = connectionConfig; - return this; - } - - public Builder connectionConfig(ConnectionProfileConfig connectionConfig) { - this.connectionConfig = Optional.ofNullable(connectionConfig); - return this; - } - - @JsonSetter(value = "strategy_overrides", nulls = Nulls.SKIP) - public Builder strategyOverrides(Optional strategyOverrides) { - this.strategyOverrides = strategyOverrides; - return this; - } - - public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOverrides) { - this.strategyOverrides = Optional.ofNullable(strategyOverrides); - return this; - } - - public ConnectionProfileTemplate build() { - return new ConnectionProfileTemplate( - name, - organization, - connectionNamePrefixTemplate, - enabledFeatures, - connectionConfig, - strategyOverrides, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileTemplateItem.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileTemplateItem.java deleted file mode 100644 index 26b89761c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProfileTemplateItem.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionProfileTemplateItem.Builder.class) -public final class ConnectionProfileTemplateItem { - private final Optional id; - - private final Optional displayName; - - private final Optional template; - - private final Map additionalProperties; - - private ConnectionProfileTemplateItem( - Optional id, - Optional displayName, - Optional template, - Map additionalProperties) { - this.id = id; - this.displayName = displayName; - this.template = template; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the template. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The user-friendly name of the template displayed in the UI. - */ - @JsonProperty("display_name") - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("template") - public Optional getTemplate() { - return template; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionProfileTemplateItem && equalTo((ConnectionProfileTemplateItem) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionProfileTemplateItem other) { - return id.equals(other.id) && displayName.equals(other.displayName) && template.equals(other.template); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.displayName, this.template); - } - - @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 displayName = Optional.empty(); - - private Optional template = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionProfileTemplateItem other) { - id(other.getId()); - displayName(other.getDisplayName()); - template(other.getTemplate()); - return this; - } - - /** - *

The id of the template.

- */ - @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 user-friendly name of the template displayed in the UI.

- */ - @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 = "template", nulls = Nulls.SKIP) - public Builder template(Optional template) { - this.template = template; - return this; - } - - public Builder template(ConnectionProfileTemplate template) { - this.template = Optional.ofNullable(template); - return this; - } - - public ConnectionProfileTemplateItem build() { - return new ConnectionProfileTemplateItem(id, displayName, template, 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 deleted file mode 100644 index e0951ed4a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPropertiesOptions.java +++ /dev/null @@ -1,1200 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionPropertiesOptions.Builder.class) -public final class ConnectionPropertiesOptions { - private final OptionalNullable validation; - - private final Optional> nonPersistentAttrs; - - private final Optional> precedence; - - private final Optional attributes; - - private final Optional enableScriptContext; - - private final Optional enabledDatabaseCustomization; - - private final Optional importMode; - - private final Optional customScripts; - - private final OptionalNullable authenticationMethods; - - private final OptionalNullable passkeyOptions; - - private final OptionalNullable passwordPolicy; - - private final OptionalNullable passwordComplexityOptions; - - private final OptionalNullable passwordHistory; - - private final OptionalNullable passwordNoPersonalInfo; - - private final OptionalNullable passwordDictionary; - - private final Optional apiEnableUsers; - - private final Optional basicProfile; - - private final Optional extAdmin; - - private final Optional extIsSuspended; - - private final Optional extAgreedTerms; - - private final Optional extGroups; - - private final Optional extAssignedPlans; - - private final Optional extProfile; - - private final Optional disableSelfServiceChangePassword; - - private final OptionalNullable>> - upstreamParams; - - private final Optional setUserRootAttributes; - - private final OptionalNullable gatewayAuthentication; - - private final OptionalNullable federatedConnectionsAccessTokens; - - private final Map additionalProperties; - - private ConnectionPropertiesOptions( - OptionalNullable validation, - Optional> nonPersistentAttrs, - Optional> precedence, - Optional attributes, - Optional enableScriptContext, - Optional enabledDatabaseCustomization, - Optional importMode, - Optional customScripts, - OptionalNullable authenticationMethods, - OptionalNullable passkeyOptions, - OptionalNullable passwordPolicy, - OptionalNullable passwordComplexityOptions, - OptionalNullable passwordHistory, - OptionalNullable passwordNoPersonalInfo, - OptionalNullable passwordDictionary, - Optional apiEnableUsers, - Optional basicProfile, - Optional extAdmin, - Optional extIsSuspended, - Optional extAgreedTerms, - Optional extGroups, - Optional extAssignedPlans, - Optional extProfile, - Optional disableSelfServiceChangePassword, - OptionalNullable>> upstreamParams, - Optional setUserRootAttributes, - OptionalNullable gatewayAuthentication, - OptionalNullable federatedConnectionsAccessTokens, - Map additionalProperties) { - this.validation = validation; - this.nonPersistentAttrs = nonPersistentAttrs; - this.precedence = precedence; - this.attributes = attributes; - this.enableScriptContext = enableScriptContext; - this.enabledDatabaseCustomization = enabledDatabaseCustomization; - this.importMode = importMode; - this.customScripts = customScripts; - this.authenticationMethods = authenticationMethods; - this.passkeyOptions = passkeyOptions; - this.passwordPolicy = passwordPolicy; - this.passwordComplexityOptions = passwordComplexityOptions; - this.passwordHistory = passwordHistory; - this.passwordNoPersonalInfo = passwordNoPersonalInfo; - this.passwordDictionary = passwordDictionary; - this.apiEnableUsers = apiEnableUsers; - this.basicProfile = basicProfile; - this.extAdmin = extAdmin; - this.extIsSuspended = extIsSuspended; - this.extAgreedTerms = extAgreedTerms; - this.extGroups = extGroups; - this.extAssignedPlans = extAssignedPlans; - this.extProfile = extProfile; - this.disableSelfServiceChangePassword = disableSelfServiceChangePassword; - this.upstreamParams = upstreamParams; - this.setUserRootAttributes = setUserRootAttributes; - this.gatewayAuthentication = gatewayAuthentication; - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("validation") - public OptionalNullable getValidation() { - if (validation == null) { - return OptionalNullable.absent(); - } - return validation; - } - - /** - * @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 Order of precedence for attribute types. If the property is not specified, the default precedence of attributes will be used. - */ - @JsonProperty("precedence") - public Optional> getPrecedence() { - return precedence; - } - - @JsonProperty("attributes") - public Optional getAttributes() { - return attributes; - } - - /** - * @return Set to true to inject context into custom DB scripts (warning: cannot be disabled once enabled) - */ - @JsonProperty("enable_script_context") - public Optional getEnableScriptContext() { - return enableScriptContext; - } - - /** - * @return Set to true to use a legacy user store - */ - @JsonProperty("enabledDatabaseCustomization") - public Optional getEnabledDatabaseCustomization() { - return enabledDatabaseCustomization; - } - - /** - * @return Enable this if you have a legacy user store and you want to gradually migrate those users to the Auth0 user store - */ - @JsonProperty("import_mode") - public Optional getImportMode() { - return importMode; - } - - @JsonProperty("customScripts") - public Optional getCustomScripts() { - return customScripts; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("authentication_methods") - public OptionalNullable getAuthenticationMethods() { - if (authenticationMethods == null) { - return OptionalNullable.absent(); - } - return authenticationMethods; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("passkey_options") - public OptionalNullable getPasskeyOptions() { - if (passkeyOptions == null) { - return OptionalNullable.absent(); - } - return passkeyOptions; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("passwordPolicy") - public OptionalNullable getPasswordPolicy() { - if (passwordPolicy == null) { - return OptionalNullable.absent(); - } - return passwordPolicy; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_complexity_options") - public OptionalNullable getPasswordComplexityOptions() { - if (passwordComplexityOptions == null) { - return OptionalNullable.absent(); - } - return passwordComplexityOptions; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_history") - public OptionalNullable getPasswordHistory() { - if (passwordHistory == null) { - return OptionalNullable.absent(); - } - return passwordHistory; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_no_personal_info") - public OptionalNullable getPasswordNoPersonalInfo() { - if (passwordNoPersonalInfo == null) { - return OptionalNullable.absent(); - } - return passwordNoPersonalInfo; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_dictionary") - public OptionalNullable getPasswordDictionary() { - if (passwordDictionary == null) { - return OptionalNullable.absent(); - } - return passwordDictionary; - } - - @JsonProperty("api_enable_users") - public Optional getApiEnableUsers() { - return apiEnableUsers; - } - - @JsonProperty("basic_profile") - public Optional getBasicProfile() { - return basicProfile; - } - - @JsonProperty("ext_admin") - public Optional getExtAdmin() { - return extAdmin; - } - - @JsonProperty("ext_is_suspended") - public Optional getExtIsSuspended() { - return extIsSuspended; - } - - @JsonProperty("ext_agreed_terms") - public Optional getExtAgreedTerms() { - return extAgreedTerms; - } - - @JsonProperty("ext_groups") - public Optional getExtGroups() { - return extGroups; - } - - @JsonProperty("ext_assigned_plans") - public Optional getExtAssignedPlans() { - return extAssignedPlans; - } - - @JsonProperty("ext_profile") - public Optional getExtProfile() { - return extProfile; - } - - @JsonProperty("disable_self_service_change_password") - public Optional getDisableSelfServiceChangePassword() { - return disableSelfServiceChangePassword; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("set_user_root_attributes") - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("gateway_authentication") - public OptionalNullable getGatewayAuthentication() { - if (gatewayAuthentication == null) { - return OptionalNullable.absent(); - } - 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; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("validation") - private OptionalNullable _getValidation() { - return validation; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("authentication_methods") - private OptionalNullable _getAuthenticationMethods() { - return authenticationMethods; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("passkey_options") - private OptionalNullable _getPasskeyOptions() { - return passkeyOptions; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("passwordPolicy") - private OptionalNullable _getPasswordPolicy() { - return passwordPolicy; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_complexity_options") - private OptionalNullable _getPasswordComplexityOptions() { - return passwordComplexityOptions; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_history") - private OptionalNullable _getPasswordHistory() { - return passwordHistory; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_no_personal_info") - private OptionalNullable _getPasswordNoPersonalInfo() { - return passwordNoPersonalInfo; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_dictionary") - private OptionalNullable _getPasswordDictionary() { - return passwordDictionary; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("gateway_authentication") - private OptionalNullable _getGatewayAuthentication() { - return gatewayAuthentication; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") - private OptionalNullable _getFederatedConnectionsAccessTokens() { - return federatedConnectionsAccessTokens; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionPropertiesOptions && equalTo((ConnectionPropertiesOptions) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionPropertiesOptions other) { - return validation.equals(other.validation) - && nonPersistentAttrs.equals(other.nonPersistentAttrs) - && precedence.equals(other.precedence) - && attributes.equals(other.attributes) - && enableScriptContext.equals(other.enableScriptContext) - && enabledDatabaseCustomization.equals(other.enabledDatabaseCustomization) - && importMode.equals(other.importMode) - && customScripts.equals(other.customScripts) - && authenticationMethods.equals(other.authenticationMethods) - && passkeyOptions.equals(other.passkeyOptions) - && passwordPolicy.equals(other.passwordPolicy) - && passwordComplexityOptions.equals(other.passwordComplexityOptions) - && passwordHistory.equals(other.passwordHistory) - && passwordNoPersonalInfo.equals(other.passwordNoPersonalInfo) - && passwordDictionary.equals(other.passwordDictionary) - && apiEnableUsers.equals(other.apiEnableUsers) - && basicProfile.equals(other.basicProfile) - && extAdmin.equals(other.extAdmin) - && extIsSuspended.equals(other.extIsSuspended) - && extAgreedTerms.equals(other.extAgreedTerms) - && extGroups.equals(other.extGroups) - && extAssignedPlans.equals(other.extAssignedPlans) - && extProfile.equals(other.extProfile) - && disableSelfServiceChangePassword.equals(other.disableSelfServiceChangePassword) - && upstreamParams.equals(other.upstreamParams) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && gatewayAuthentication.equals(other.gatewayAuthentication) - && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.validation, - this.nonPersistentAttrs, - this.precedence, - this.attributes, - this.enableScriptContext, - this.enabledDatabaseCustomization, - this.importMode, - this.customScripts, - this.authenticationMethods, - this.passkeyOptions, - this.passwordPolicy, - this.passwordComplexityOptions, - this.passwordHistory, - this.passwordNoPersonalInfo, - this.passwordDictionary, - this.apiEnableUsers, - this.basicProfile, - this.extAdmin, - this.extIsSuspended, - this.extAgreedTerms, - this.extGroups, - this.extAssignedPlans, - this.extProfile, - this.disableSelfServiceChangePassword, - this.upstreamParams, - this.setUserRootAttributes, - this.gatewayAuthentication, - this.federatedConnectionsAccessTokens); - } - - @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 validation = OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - private Optional> precedence = Optional.empty(); - - private Optional attributes = Optional.empty(); - - private Optional enableScriptContext = Optional.empty(); - - private Optional enabledDatabaseCustomization = Optional.empty(); - - private Optional importMode = Optional.empty(); - - private Optional customScripts = Optional.empty(); - - private OptionalNullable authenticationMethods = OptionalNullable.absent(); - - private OptionalNullable passkeyOptions = OptionalNullable.absent(); - - private OptionalNullable passwordPolicy = OptionalNullable.absent(); - - private OptionalNullable passwordComplexityOptions = - OptionalNullable.absent(); - - private OptionalNullable passwordHistory = OptionalNullable.absent(); - - private OptionalNullable passwordNoPersonalInfo = - OptionalNullable.absent(); - - private OptionalNullable passwordDictionary = OptionalNullable.absent(); - - private Optional apiEnableUsers = Optional.empty(); - - private Optional basicProfile = Optional.empty(); - - private Optional extAdmin = Optional.empty(); - - private Optional extIsSuspended = Optional.empty(); - - private Optional extAgreedTerms = Optional.empty(); - - private Optional extGroups = Optional.empty(); - - private Optional extAssignedPlans = Optional.empty(); - - private Optional extProfile = Optional.empty(); - - private Optional disableSelfServiceChangePassword = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable gatewayAuthentication = OptionalNullable.absent(); - - private OptionalNullable federatedConnectionsAccessTokens = - OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionPropertiesOptions other) { - validation(other.getValidation()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - precedence(other.getPrecedence()); - attributes(other.getAttributes()); - enableScriptContext(other.getEnableScriptContext()); - enabledDatabaseCustomization(other.getEnabledDatabaseCustomization()); - importMode(other.getImportMode()); - customScripts(other.getCustomScripts()); - authenticationMethods(other.getAuthenticationMethods()); - passkeyOptions(other.getPasskeyOptions()); - passwordPolicy(other.getPasswordPolicy()); - passwordComplexityOptions(other.getPasswordComplexityOptions()); - passwordHistory(other.getPasswordHistory()); - passwordNoPersonalInfo(other.getPasswordNoPersonalInfo()); - passwordDictionary(other.getPasswordDictionary()); - apiEnableUsers(other.getApiEnableUsers()); - basicProfile(other.getBasicProfile()); - extAdmin(other.getExtAdmin()); - extIsSuspended(other.getExtIsSuspended()); - extAgreedTerms(other.getExtAgreedTerms()); - extGroups(other.getExtGroups()); - extAssignedPlans(other.getExtAssignedPlans()); - extProfile(other.getExtProfile()); - disableSelfServiceChangePassword(other.getDisableSelfServiceChangePassword()); - upstreamParams(other.getUpstreamParams()); - setUserRootAttributes(other.getSetUserRootAttributes()); - gatewayAuthentication(other.getGatewayAuthentication()); - federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); - return this; - } - - @JsonSetter(value = "validation", nulls = Nulls.SKIP) - public Builder validation(@Nullable OptionalNullable validation) { - this.validation = validation; - return this; - } - - public Builder validation(ConnectionValidationOptions validation) { - this.validation = OptionalNullable.of(validation); - return this; - } - - public Builder validation(Optional validation) { - if (validation.isPresent()) { - this.validation = OptionalNullable.of(validation.get()); - } else { - this.validation = OptionalNullable.absent(); - } - return this; - } - - public Builder validation(com.auth0.client.mgmt.core.Nullable validation) { - if (validation.isNull()) { - this.validation = OptionalNullable.ofNull(); - } else if (validation.isEmpty()) { - this.validation = OptionalNullable.absent(); - } else { - this.validation = OptionalNullable.of(validation.get()); - } - 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; - } - - /** - *

Order of precedence for attribute types. If the property is not specified, the default precedence of attributes will be used.

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

Set to true to inject context into custom DB scripts (warning: cannot be disabled once enabled)

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

Set to true to use a legacy user store

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

Enable this if you have a legacy user store and you want to gradually migrate those users to the Auth0 user store

- */ - @JsonSetter(value = "import_mode", nulls = Nulls.SKIP) - public Builder importMode(Optional importMode) { - this.importMode = importMode; - return this; - } - - public Builder importMode(Boolean importMode) { - this.importMode = Optional.ofNullable(importMode); - return this; - } - - @JsonSetter(value = "customScripts", nulls = Nulls.SKIP) - public Builder customScripts(Optional customScripts) { - this.customScripts = customScripts; - return this; - } - - public Builder customScripts(ConnectionCustomScripts customScripts) { - this.customScripts = Optional.ofNullable(customScripts); - return this; - } - - @JsonSetter(value = "authentication_methods", nulls = Nulls.SKIP) - public Builder authenticationMethods( - @Nullable OptionalNullable authenticationMethods) { - this.authenticationMethods = authenticationMethods; - return this; - } - - public Builder authenticationMethods(ConnectionAuthenticationMethods authenticationMethods) { - this.authenticationMethods = OptionalNullable.of(authenticationMethods); - return this; - } - - public Builder authenticationMethods(Optional authenticationMethods) { - if (authenticationMethods.isPresent()) { - this.authenticationMethods = OptionalNullable.of(authenticationMethods.get()); - } else { - this.authenticationMethods = OptionalNullable.absent(); - } - return this; - } - - public Builder authenticationMethods( - com.auth0.client.mgmt.core.Nullable authenticationMethods) { - if (authenticationMethods.isNull()) { - this.authenticationMethods = OptionalNullable.ofNull(); - } else if (authenticationMethods.isEmpty()) { - this.authenticationMethods = OptionalNullable.absent(); - } else { - this.authenticationMethods = OptionalNullable.of(authenticationMethods.get()); - } - return this; - } - - @JsonSetter(value = "passkey_options", nulls = Nulls.SKIP) - public Builder passkeyOptions(@Nullable OptionalNullable passkeyOptions) { - this.passkeyOptions = passkeyOptions; - return this; - } - - public Builder passkeyOptions(ConnectionPasskeyOptions passkeyOptions) { - this.passkeyOptions = OptionalNullable.of(passkeyOptions); - return this; - } - - public Builder passkeyOptions(Optional passkeyOptions) { - if (passkeyOptions.isPresent()) { - this.passkeyOptions = OptionalNullable.of(passkeyOptions.get()); - } else { - this.passkeyOptions = OptionalNullable.absent(); - } - return this; - } - - public Builder passkeyOptions(com.auth0.client.mgmt.core.Nullable passkeyOptions) { - if (passkeyOptions.isNull()) { - this.passkeyOptions = OptionalNullable.ofNull(); - } else if (passkeyOptions.isEmpty()) { - this.passkeyOptions = OptionalNullable.absent(); - } else { - this.passkeyOptions = OptionalNullable.of(passkeyOptions.get()); - } - return this; - } - - @JsonSetter(value = "passwordPolicy", nulls = Nulls.SKIP) - public Builder passwordPolicy(@Nullable OptionalNullable passwordPolicy) { - this.passwordPolicy = passwordPolicy; - return this; - } - - public Builder passwordPolicy(ConnectionPasswordPolicyEnum passwordPolicy) { - this.passwordPolicy = OptionalNullable.of(passwordPolicy); - return this; - } - - public Builder passwordPolicy(Optional passwordPolicy) { - if (passwordPolicy.isPresent()) { - this.passwordPolicy = OptionalNullable.of(passwordPolicy.get()); - } else { - this.passwordPolicy = OptionalNullable.absent(); - } - return this; - } - - public Builder passwordPolicy( - com.auth0.client.mgmt.core.Nullable passwordPolicy) { - if (passwordPolicy.isNull()) { - this.passwordPolicy = OptionalNullable.ofNull(); - } else if (passwordPolicy.isEmpty()) { - this.passwordPolicy = OptionalNullable.absent(); - } else { - this.passwordPolicy = OptionalNullable.of(passwordPolicy.get()); - } - return this; - } - - @JsonSetter(value = "password_complexity_options", nulls = Nulls.SKIP) - public Builder passwordComplexityOptions( - @Nullable OptionalNullable passwordComplexityOptions) { - this.passwordComplexityOptions = passwordComplexityOptions; - return this; - } - - public Builder passwordComplexityOptions(ConnectionPasswordComplexityOptions passwordComplexityOptions) { - this.passwordComplexityOptions = OptionalNullable.of(passwordComplexityOptions); - return this; - } - - public Builder passwordComplexityOptions( - Optional passwordComplexityOptions) { - if (passwordComplexityOptions.isPresent()) { - this.passwordComplexityOptions = OptionalNullable.of(passwordComplexityOptions.get()); - } else { - this.passwordComplexityOptions = OptionalNullable.absent(); - } - return this; - } - - public Builder passwordComplexityOptions( - com.auth0.client.mgmt.core.Nullable passwordComplexityOptions) { - if (passwordComplexityOptions.isNull()) { - this.passwordComplexityOptions = OptionalNullable.ofNull(); - } else if (passwordComplexityOptions.isEmpty()) { - this.passwordComplexityOptions = OptionalNullable.absent(); - } else { - this.passwordComplexityOptions = OptionalNullable.of(passwordComplexityOptions.get()); - } - return this; - } - - @JsonSetter(value = "password_history", nulls = Nulls.SKIP) - public Builder passwordHistory(@Nullable OptionalNullable passwordHistory) { - this.passwordHistory = passwordHistory; - return this; - } - - public Builder passwordHistory(ConnectionPasswordHistoryOptions passwordHistory) { - this.passwordHistory = OptionalNullable.of(passwordHistory); - return this; - } - - public Builder passwordHistory(Optional passwordHistory) { - if (passwordHistory.isPresent()) { - this.passwordHistory = OptionalNullable.of(passwordHistory.get()); - } else { - this.passwordHistory = OptionalNullable.absent(); - } - return this; - } - - public Builder passwordHistory( - com.auth0.client.mgmt.core.Nullable passwordHistory) { - if (passwordHistory.isNull()) { - this.passwordHistory = OptionalNullable.ofNull(); - } else if (passwordHistory.isEmpty()) { - this.passwordHistory = OptionalNullable.absent(); - } else { - this.passwordHistory = OptionalNullable.of(passwordHistory.get()); - } - return this; - } - - @JsonSetter(value = "password_no_personal_info", nulls = Nulls.SKIP) - public Builder passwordNoPersonalInfo( - @Nullable OptionalNullable passwordNoPersonalInfo) { - this.passwordNoPersonalInfo = passwordNoPersonalInfo; - return this; - } - - public Builder passwordNoPersonalInfo(ConnectionPasswordNoPersonalInfoOptions passwordNoPersonalInfo) { - this.passwordNoPersonalInfo = OptionalNullable.of(passwordNoPersonalInfo); - return this; - } - - public Builder passwordNoPersonalInfo( - Optional passwordNoPersonalInfo) { - if (passwordNoPersonalInfo.isPresent()) { - this.passwordNoPersonalInfo = OptionalNullable.of(passwordNoPersonalInfo.get()); - } else { - this.passwordNoPersonalInfo = OptionalNullable.absent(); - } - return this; - } - - public Builder passwordNoPersonalInfo( - com.auth0.client.mgmt.core.Nullable passwordNoPersonalInfo) { - if (passwordNoPersonalInfo.isNull()) { - this.passwordNoPersonalInfo = OptionalNullable.ofNull(); - } else if (passwordNoPersonalInfo.isEmpty()) { - this.passwordNoPersonalInfo = OptionalNullable.absent(); - } else { - this.passwordNoPersonalInfo = OptionalNullable.of(passwordNoPersonalInfo.get()); - } - return this; - } - - @JsonSetter(value = "password_dictionary", nulls = Nulls.SKIP) - public Builder passwordDictionary( - @Nullable OptionalNullable passwordDictionary) { - this.passwordDictionary = passwordDictionary; - return this; - } - - public Builder passwordDictionary(ConnectionPasswordDictionaryOptions passwordDictionary) { - this.passwordDictionary = OptionalNullable.of(passwordDictionary); - return this; - } - - public Builder passwordDictionary(Optional passwordDictionary) { - if (passwordDictionary.isPresent()) { - this.passwordDictionary = OptionalNullable.of(passwordDictionary.get()); - } else { - this.passwordDictionary = OptionalNullable.absent(); - } - return this; - } - - public Builder passwordDictionary( - com.auth0.client.mgmt.core.Nullable passwordDictionary) { - if (passwordDictionary.isNull()) { - this.passwordDictionary = OptionalNullable.ofNull(); - } else if (passwordDictionary.isEmpty()) { - this.passwordDictionary = OptionalNullable.absent(); - } else { - this.passwordDictionary = OptionalNullable.of(passwordDictionary.get()); - } - return this; - } - - @JsonSetter(value = "api_enable_users", nulls = Nulls.SKIP) - public Builder apiEnableUsers(Optional apiEnableUsers) { - this.apiEnableUsers = apiEnableUsers; - return this; - } - - public Builder apiEnableUsers(Boolean apiEnableUsers) { - this.apiEnableUsers = Optional.ofNullable(apiEnableUsers); - return this; - } - - @JsonSetter(value = "basic_profile", nulls = Nulls.SKIP) - public Builder basicProfile(Optional basicProfile) { - this.basicProfile = basicProfile; - return this; - } - - public Builder basicProfile(Boolean basicProfile) { - this.basicProfile = Optional.ofNullable(basicProfile); - return this; - } - - @JsonSetter(value = "ext_admin", nulls = Nulls.SKIP) - public Builder extAdmin(Optional extAdmin) { - this.extAdmin = extAdmin; - return this; - } - - public Builder extAdmin(Boolean extAdmin) { - this.extAdmin = Optional.ofNullable(extAdmin); - return this; - } - - @JsonSetter(value = "ext_is_suspended", nulls = Nulls.SKIP) - public Builder extIsSuspended(Optional extIsSuspended) { - this.extIsSuspended = extIsSuspended; - return this; - } - - public Builder extIsSuspended(Boolean extIsSuspended) { - this.extIsSuspended = Optional.ofNullable(extIsSuspended); - return this; - } - - @JsonSetter(value = "ext_agreed_terms", nulls = Nulls.SKIP) - public Builder extAgreedTerms(Optional extAgreedTerms) { - this.extAgreedTerms = extAgreedTerms; - return this; - } - - public Builder extAgreedTerms(Boolean extAgreedTerms) { - this.extAgreedTerms = Optional.ofNullable(extAgreedTerms); - return this; - } - - @JsonSetter(value = "ext_groups", nulls = Nulls.SKIP) - public Builder extGroups(Optional extGroups) { - this.extGroups = extGroups; - return this; - } - - public Builder extGroups(Boolean extGroups) { - this.extGroups = Optional.ofNullable(extGroups); - return this; - } - - @JsonSetter(value = "ext_assigned_plans", nulls = Nulls.SKIP) - public Builder extAssignedPlans(Optional extAssignedPlans) { - this.extAssignedPlans = extAssignedPlans; - return this; - } - - public Builder extAssignedPlans(Boolean extAssignedPlans) { - this.extAssignedPlans = Optional.ofNullable(extAssignedPlans); - return this; - } - - @JsonSetter(value = "ext_profile", nulls = Nulls.SKIP) - public Builder extProfile(Optional extProfile) { - this.extProfile = extProfile; - return this; - } - - public Builder extProfile(Boolean extProfile) { - this.extProfile = Optional.ofNullable(extProfile); - return this; - } - - @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; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "gateway_authentication", nulls = Nulls.SKIP) - public Builder gatewayAuthentication( - @Nullable OptionalNullable gatewayAuthentication) { - this.gatewayAuthentication = gatewayAuthentication; - return this; - } - - public Builder gatewayAuthentication(ConnectionGatewayAuthentication gatewayAuthentication) { - this.gatewayAuthentication = OptionalNullable.of(gatewayAuthentication); - return this; - } - - public Builder gatewayAuthentication(Optional gatewayAuthentication) { - if (gatewayAuthentication.isPresent()) { - this.gatewayAuthentication = OptionalNullable.of(gatewayAuthentication.get()); - } else { - this.gatewayAuthentication = OptionalNullable.absent(); - } - return this; - } - - public Builder gatewayAuthentication( - com.auth0.client.mgmt.core.Nullable gatewayAuthentication) { - if (gatewayAuthentication.isNull()) { - this.gatewayAuthentication = OptionalNullable.ofNull(); - } else if (gatewayAuthentication.isEmpty()) { - this.gatewayAuthentication = OptionalNullable.absent(); - } else { - this.gatewayAuthentication = OptionalNullable.of(gatewayAuthentication.get()); - } - 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; - } - - public ConnectionPropertiesOptions build() { - return new ConnectionPropertiesOptions( - validation, - nonPersistentAttrs, - precedence, - attributes, - enableScriptContext, - enabledDatabaseCustomization, - importMode, - customScripts, - authenticationMethods, - passkeyOptions, - passwordPolicy, - passwordComplexityOptions, - passwordHistory, - passwordNoPersonalInfo, - passwordDictionary, - apiEnableUsers, - basicProfile, - extAdmin, - extIsSuspended, - extAgreedTerms, - extGroups, - extAssignedPlans, - extProfile, - disableSelfServiceChangePassword, - upstreamParams, - setUserRootAttributes, - gatewayAuthentication, - federatedConnectionsAccessTokens, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionProtocolBindingEnumSaml.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProtocolBindingEnumSaml.java deleted file mode 100644 index 6556f8a4b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProtocolBindingEnumSaml.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionProtocolBindingEnumSaml { - public static final ConnectionProtocolBindingEnumSaml URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT = - new ConnectionProtocolBindingEnumSaml( - Value.URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_REDIRECT, - "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"); - - public static final ConnectionProtocolBindingEnumSaml URN_OASIS_NAMES_TC_SAML20BINDINGS_HTTP_POST = - new ConnectionProtocolBindingEnumSaml( - 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; - - ConnectionProtocolBindingEnumSaml(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionProtocolBindingEnumSaml - && this.string.equals(((ConnectionProtocolBindingEnumSaml) 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 ConnectionProtocolBindingEnumSaml 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 ConnectionProtocolBindingEnumSaml(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/ConnectionProviderEnumSms.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionProviderEnumSms.java deleted file mode 100644 index 946b7c406..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionProviderEnumSms.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionProviderEnumSms { - public static final ConnectionProviderEnumSms SMS_GATEWAY = - new ConnectionProviderEnumSms(Value.SMS_GATEWAY, "sms_gateway"); - - public static final ConnectionProviderEnumSms TWILIO = new ConnectionProviderEnumSms(Value.TWILIO, "twilio"); - - private final Value value; - - private final String string; - - ConnectionProviderEnumSms(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionProviderEnumSms - && this.string.equals(((ConnectionProviderEnumSms) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SMS_GATEWAY: - return visitor.visitSmsGateway(); - case TWILIO: - return visitor.visitTwilio(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionProviderEnumSms valueOf(String value) { - switch (value) { - case "sms_gateway": - return SMS_GATEWAY; - case "twilio": - return TWILIO; - default: - return new ConnectionProviderEnumSms(Value.UNKNOWN, value); - } - } - - public enum Value { - SMS_GATEWAY, - - TWILIO, - - UNKNOWN - } - - public interface Visitor { - T visitSmsGateway(); - - T visitTwilio(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionPurposes.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionPurposes.java deleted file mode 100644 index 671e6777d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionPurposes.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionPurposes.Builder.class) -public final class ConnectionPurposes implements IConnectionPurposes { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Map additionalProperties; - - private ConnectionPurposes( - Optional authentication, - Optional connectedAccounts, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionPurposes && equalTo((ConnectionPurposes) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionPurposes other) { - return authentication.equals(other.authentication) && connectedAccounts.equals(other.connectedAccounts); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.authentication, this.connectedAccounts); - } - - @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 authentication = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionPurposes other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - return this; - } - - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public Builder authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - public Builder authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public Builder connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - public Builder connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - public ConnectionPurposes build() { - return new ConnectionPurposes(authentication, connectedAccounts, 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 deleted file mode 100644 index 9cd04eecc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseCommon.java +++ /dev/null @@ -1,259 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseCommon.Builder.class) -public final class ConnectionResponseCommon - implements IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Map additionalProperties; - - private ConnectionResponseCommon( - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Map additionalProperties) { - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseCommon && equalTo((ConnectionResponseCommon) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseCommon other) { - return id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - 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 id = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionResponseCommon other) { - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - 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 = "realms", nulls = Nulls.SKIP) - public Builder realms(Optional> realms) { - this.realms = realms; - return this; - } - - public Builder realms(List realms) { - this.realms = Optional.ofNullable(realms); - 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 = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - public ConnectionResponseCommon build() { - return new ConnectionResponseCommon( - id, realms, name, displayName, enabledClients, isDomainConnection, metadata, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAd.java deleted file mode 100644 index 9a9e1c71c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAd.java +++ /dev/null @@ -1,473 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentAd.Builder.class) -public final class ConnectionResponseContentAd - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentAdStrategy strategy; - - private final Optional options; - - private final Optional provisioningTicketUrl; - - private final Map additionalProperties; - - private ConnectionResponseContentAd( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentAdStrategy strategy, - Optional options, - Optional provisioningTicketUrl, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.provisioningTicketUrl = provisioningTicketUrl; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentAdStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("provisioning_ticket_url") - public Optional getProvisioningTicketUrl() { - return provisioningTicketUrl; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentAd && equalTo((ConnectionResponseContentAd) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentAd other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && provisioningTicketUrl.equals(other.provisioningTicketUrl); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.provisioningTicketUrl); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentAdStrategy strategy); - - Builder from(ConnectionResponseContentAd other); - } - - public interface _FinalStage { - ConnectionResponseContentAd build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsAd options); - - _FinalStage provisioningTicketUrl(Optional provisioningTicketUrl); - - _FinalStage provisioningTicketUrl(String provisioningTicketUrl); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentAdStrategy strategy; - - private Optional provisioningTicketUrl = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentAd other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - provisioningTicketUrl(other.getProvisioningTicketUrl()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentAdStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage provisioningTicketUrl(String provisioningTicketUrl) { - this.provisioningTicketUrl = Optional.ofNullable(provisioningTicketUrl); - return this; - } - - @java.lang.Override - @JsonSetter(value = "provisioning_ticket_url", nulls = Nulls.SKIP) - public _FinalStage provisioningTicketUrl(Optional provisioningTicketUrl) { - this.provisioningTicketUrl = provisioningTicketUrl; - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsAd options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentAd build() { - return new ConnectionResponseContentAd( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - provisioningTicketUrl, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAdStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAdStrategy.java deleted file mode 100644 index c64622de6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAdStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentAdStrategy { - public static final ConnectionResponseContentAdStrategy AD = - new ConnectionResponseContentAdStrategy(Value.AD, "ad"); - - private final Value value; - - private final String string; - - ConnectionResponseContentAdStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentAdStrategy - && this.string.equals(((ConnectionResponseContentAdStrategy) 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 ConnectionResponseContentAdStrategy valueOf(String value) { - switch (value) { - case "ad": - return AD; - default: - return new ConnectionResponseContentAdStrategy(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/ConnectionResponseContentAdfs.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAdfs.java deleted file mode 100644 index 06b59a184..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAdfs.java +++ /dev/null @@ -1,505 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentAdfs.Builder.class) -public final class ConnectionResponseContentAdfs - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentAdfsStrategy strategy; - - private final Optional options; - - private final Optional provisioningTicketUrl; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private ConnectionResponseContentAdfs( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentAdfsStrategy strategy, - Optional options, - Optional provisioningTicketUrl, - Optional showAsButton, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.provisioningTicketUrl = provisioningTicketUrl; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentAdfsStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("provisioning_ticket_url") - public Optional getProvisioningTicketUrl() { - return provisioningTicketUrl; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentAdfs && equalTo((ConnectionResponseContentAdfs) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentAdfs other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && provisioningTicketUrl.equals(other.provisioningTicketUrl) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.provisioningTicketUrl, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentAdfsStrategy strategy); - - Builder from(ConnectionResponseContentAdfs other); - } - - public interface _FinalStage { - ConnectionResponseContentAdfs build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsAdfs options); - - _FinalStage provisioningTicketUrl(Optional provisioningTicketUrl); - - _FinalStage provisioningTicketUrl(String provisioningTicketUrl); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentAdfsStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional provisioningTicketUrl = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentAdfs other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - provisioningTicketUrl(other.getProvisioningTicketUrl()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentAdfsStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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 provisioningTicketUrl(String provisioningTicketUrl) { - this.provisioningTicketUrl = Optional.ofNullable(provisioningTicketUrl); - return this; - } - - @java.lang.Override - @JsonSetter(value = "provisioning_ticket_url", nulls = Nulls.SKIP) - public _FinalStage provisioningTicketUrl(Optional provisioningTicketUrl) { - this.provisioningTicketUrl = provisioningTicketUrl; - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsAdfs options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentAdfs build() { - return new ConnectionResponseContentAdfs( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - provisioningTicketUrl, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAdfsStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAdfsStrategy.java deleted file mode 100644 index f75c80fd4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAdfsStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentAdfsStrategy { - public static final ConnectionResponseContentAdfsStrategy ADFS = - new ConnectionResponseContentAdfsStrategy(Value.ADFS, "adfs"); - - private final Value value; - - private final String string; - - ConnectionResponseContentAdfsStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentAdfsStrategy - && this.string.equals(((ConnectionResponseContentAdfsStrategy) 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 ConnectionResponseContentAdfsStrategy valueOf(String value) { - switch (value) { - case "adfs": - return ADFS; - default: - return new ConnectionResponseContentAdfsStrategy(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/ConnectionResponseContentAmazon.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAmazon.java deleted file mode 100644 index 3a215ad33..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAmazon.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentAmazon.Builder.class) -public final class ConnectionResponseContentAmazon - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentAmazonStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentAmazon( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentAmazonStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentAmazonStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentAmazon && equalTo((ConnectionResponseContentAmazon) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentAmazon other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentAmazonStrategy strategy); - - Builder from(ConnectionResponseContentAmazon other); - } - - public interface _FinalStage { - ConnectionResponseContentAmazon build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsAmazon options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentAmazonStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentAmazon other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentAmazonStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsAmazon options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentAmazon build() { - return new ConnectionResponseContentAmazon( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAmazonStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAmazonStrategy.java deleted file mode 100644 index b845249e2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAmazonStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentAmazonStrategy { - public static final ConnectionResponseContentAmazonStrategy AMAZON = - new ConnectionResponseContentAmazonStrategy(Value.AMAZON, "amazon"); - - private final Value value; - - private final String string; - - ConnectionResponseContentAmazonStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentAmazonStrategy - && this.string.equals(((ConnectionResponseContentAmazonStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AMAZON: - return visitor.visitAmazon(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentAmazonStrategy valueOf(String value) { - switch (value) { - case "amazon": - return AMAZON; - default: - return new ConnectionResponseContentAmazonStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - AMAZON, - - UNKNOWN - } - - public interface Visitor { - T visitAmazon(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAol.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAol.java deleted file mode 100644 index 7575922f8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAol.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentAol.Builder.class) -public final class ConnectionResponseContentAol - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentAolStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentAol( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentAolStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentAolStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentAol && equalTo((ConnectionResponseContentAol) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentAol other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentAolStrategy strategy); - - Builder from(ConnectionResponseContentAol other); - } - - public interface _FinalStage { - ConnectionResponseContentAol build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsAol options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentAolStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentAol other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentAolStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsAol options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentAol build() { - return new ConnectionResponseContentAol( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAolStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAolStrategy.java deleted file mode 100644 index 8e59dd6e5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAolStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentAolStrategy { - public static final ConnectionResponseContentAolStrategy AOL = - new ConnectionResponseContentAolStrategy(Value.AOL, "aol"); - - private final Value value; - - private final String string; - - ConnectionResponseContentAolStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentAolStrategy - && this.string.equals(((ConnectionResponseContentAolStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AOL: - return visitor.visitAol(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentAolStrategy valueOf(String value) { - switch (value) { - case "aol": - return AOL; - default: - return new ConnectionResponseContentAolStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - AOL, - - UNKNOWN - } - - public interface Visitor { - T visitAol(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentApple.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentApple.java deleted file mode 100644 index 2d61b6c89..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentApple.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentApple.Builder.class) -public final class ConnectionResponseContentApple - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentAppleStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentApple( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentAppleStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentAppleStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentApple && equalTo((ConnectionResponseContentApple) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentApple other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentAppleStrategy strategy); - - Builder from(ConnectionResponseContentApple other); - } - - public interface _FinalStage { - ConnectionResponseContentApple build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsApple options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentAppleStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentApple other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentAppleStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsApple options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentApple build() { - return new ConnectionResponseContentApple( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAppleStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAppleStrategy.java deleted file mode 100644 index 3ad1470ef..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAppleStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentAppleStrategy { - public static final ConnectionResponseContentAppleStrategy APPLE = - new ConnectionResponseContentAppleStrategy(Value.APPLE, "apple"); - - private final Value value; - - private final String string; - - ConnectionResponseContentAppleStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentAppleStrategy - && this.string.equals(((ConnectionResponseContentAppleStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case APPLE: - return visitor.visitApple(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentAppleStrategy valueOf(String value) { - switch (value) { - case "apple": - return APPLE; - default: - return new ConnectionResponseContentAppleStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - APPLE, - - UNKNOWN - } - - public interface Visitor { - T visitApple(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0.java deleted file mode 100644 index 98a73dc2a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentAuth0.Builder.class) -public final class ConnectionResponseContentAuth0 - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentAuth0Strategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentAuth0( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentAuth0Strategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentAuth0Strategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentAuth0 && equalTo((ConnectionResponseContentAuth0) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentAuth0 other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentAuth0Strategy strategy); - - Builder from(ConnectionResponseContentAuth0 other); - } - - public interface _FinalStage { - ConnectionResponseContentAuth0 build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsAuth0 options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentAuth0Strategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentAuth0 other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentAuth0Strategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsAuth0 options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentAuth0 build() { - return new ConnectionResponseContentAuth0( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0Oidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0Oidc.java deleted file mode 100644 index 3dcb96997..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0Oidc.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentAuth0Oidc.Builder.class) -public final class ConnectionResponseContentAuth0Oidc - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentAuth0OidcStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentAuth0Oidc( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentAuth0OidcStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentAuth0OidcStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentAuth0Oidc - && equalTo((ConnectionResponseContentAuth0Oidc) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentAuth0Oidc other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentAuth0OidcStrategy strategy); - - Builder from(ConnectionResponseContentAuth0Oidc other); - } - - public interface _FinalStage { - ConnectionResponseContentAuth0Oidc build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsAuth0Oidc options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentAuth0OidcStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentAuth0Oidc other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentAuth0OidcStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsAuth0Oidc options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentAuth0Oidc build() { - return new ConnectionResponseContentAuth0Oidc( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0OidcStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0OidcStrategy.java deleted file mode 100644 index d340ae29a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0OidcStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentAuth0OidcStrategy { - public static final ConnectionResponseContentAuth0OidcStrategy AUTH0OIDC = - new ConnectionResponseContentAuth0OidcStrategy(Value.AUTH0OIDC, "auth0-oidc"); - - private final Value value; - - private final String string; - - ConnectionResponseContentAuth0OidcStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentAuth0OidcStrategy - && this.string.equals(((ConnectionResponseContentAuth0OidcStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AUTH0OIDC: - return visitor.visitAuth0Oidc(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentAuth0OidcStrategy valueOf(String value) { - switch (value) { - case "auth0-oidc": - return AUTH0OIDC; - default: - return new ConnectionResponseContentAuth0OidcStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - AUTH0OIDC, - - UNKNOWN - } - - public interface Visitor { - T visitAuth0Oidc(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0Strategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0Strategy.java deleted file mode 100644 index c81ae9882..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAuth0Strategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentAuth0Strategy { - public static final ConnectionResponseContentAuth0Strategy AUTH0 = - new ConnectionResponseContentAuth0Strategy(Value.AUTH0, "auth0"); - - private final Value value; - - private final String string; - - ConnectionResponseContentAuth0Strategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentAuth0Strategy - && this.string.equals(((ConnectionResponseContentAuth0Strategy) 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 ConnectionResponseContentAuth0Strategy valueOf(String value) { - switch (value) { - case "auth0": - return AUTH0; - default: - return new ConnectionResponseContentAuth0Strategy(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/ConnectionResponseContentAzureAd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAzureAd.java deleted file mode 100644 index f7e9325d0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAzureAd.java +++ /dev/null @@ -1,505 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentAzureAd.Builder.class) -public final class ConnectionResponseContentAzureAd - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentAzureAdStrategy strategy; - - private final Optional options; - - private final Optional provisioningTicketUrl; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private ConnectionResponseContentAzureAd( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentAzureAdStrategy strategy, - Optional options, - Optional provisioningTicketUrl, - Optional showAsButton, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.provisioningTicketUrl = provisioningTicketUrl; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentAzureAdStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("provisioning_ticket_url") - public Optional getProvisioningTicketUrl() { - return provisioningTicketUrl; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentAzureAd && equalTo((ConnectionResponseContentAzureAd) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentAzureAd other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && provisioningTicketUrl.equals(other.provisioningTicketUrl) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.provisioningTicketUrl, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentAzureAdStrategy strategy); - - Builder from(ConnectionResponseContentAzureAd other); - } - - public interface _FinalStage { - ConnectionResponseContentAzureAd build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsAzureAd options); - - _FinalStage provisioningTicketUrl(Optional provisioningTicketUrl); - - _FinalStage provisioningTicketUrl(String provisioningTicketUrl); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentAzureAdStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional provisioningTicketUrl = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentAzureAd other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - provisioningTicketUrl(other.getProvisioningTicketUrl()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentAzureAdStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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 provisioningTicketUrl(String provisioningTicketUrl) { - this.provisioningTicketUrl = Optional.ofNullable(provisioningTicketUrl); - return this; - } - - @java.lang.Override - @JsonSetter(value = "provisioning_ticket_url", nulls = Nulls.SKIP) - public _FinalStage provisioningTicketUrl(Optional provisioningTicketUrl) { - this.provisioningTicketUrl = provisioningTicketUrl; - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsAzureAd options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentAzureAd build() { - return new ConnectionResponseContentAzureAd( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - provisioningTicketUrl, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAzureAdStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAzureAdStrategy.java deleted file mode 100644 index 54202d864..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentAzureAdStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentAzureAdStrategy { - public static final ConnectionResponseContentAzureAdStrategy WAAD = - new ConnectionResponseContentAzureAdStrategy(Value.WAAD, "waad"); - - private final Value value; - - private final String string; - - ConnectionResponseContentAzureAdStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentAzureAdStrategy - && this.string.equals(((ConnectionResponseContentAzureAdStrategy) 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 ConnectionResponseContentAzureAdStrategy valueOf(String value) { - switch (value) { - case "waad": - return WAAD; - default: - return new ConnectionResponseContentAzureAdStrategy(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/ConnectionResponseContentBaidu.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBaidu.java deleted file mode 100644 index 85a912478..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBaidu.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentBaidu.Builder.class) -public final class ConnectionResponseContentBaidu - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentBaiduStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentBaidu( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentBaiduStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentBaiduStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentBaidu && equalTo((ConnectionResponseContentBaidu) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentBaidu other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentBaiduStrategy strategy); - - Builder from(ConnectionResponseContentBaidu other); - } - - public interface _FinalStage { - ConnectionResponseContentBaidu build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsBaidu options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentBaiduStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentBaidu other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentBaiduStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsBaidu options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentBaidu build() { - return new ConnectionResponseContentBaidu( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBaiduStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBaiduStrategy.java deleted file mode 100644 index e2b48964a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBaiduStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentBaiduStrategy { - public static final ConnectionResponseContentBaiduStrategy BAIDU = - new ConnectionResponseContentBaiduStrategy(Value.BAIDU, "baidu"); - - private final Value value; - - private final String string; - - ConnectionResponseContentBaiduStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentBaiduStrategy - && this.string.equals(((ConnectionResponseContentBaiduStrategy) 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 UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentBaiduStrategy valueOf(String value) { - switch (value) { - case "baidu": - return BAIDU; - default: - return new ConnectionResponseContentBaiduStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - BAIDU, - - UNKNOWN - } - - public interface Visitor { - T visitBaidu(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitbucket.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitbucket.java deleted file mode 100644 index 962bded66..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitbucket.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentBitbucket.Builder.class) -public final class ConnectionResponseContentBitbucket - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentBitbucketStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentBitbucket( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentBitbucketStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentBitbucketStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentBitbucket - && equalTo((ConnectionResponseContentBitbucket) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentBitbucket other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentBitbucketStrategy strategy); - - Builder from(ConnectionResponseContentBitbucket other); - } - - public interface _FinalStage { - ConnectionResponseContentBitbucket build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsBitbucket options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentBitbucketStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentBitbucket other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentBitbucketStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsBitbucket options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentBitbucket build() { - return new ConnectionResponseContentBitbucket( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitbucketStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitbucketStrategy.java deleted file mode 100644 index c959eaba1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitbucketStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentBitbucketStrategy { - public static final ConnectionResponseContentBitbucketStrategy BITBUCKET = - new ConnectionResponseContentBitbucketStrategy(Value.BITBUCKET, "bitbucket"); - - private final Value value; - - private final String string; - - ConnectionResponseContentBitbucketStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentBitbucketStrategy - && this.string.equals(((ConnectionResponseContentBitbucketStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case BITBUCKET: - return visitor.visitBitbucket(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentBitbucketStrategy valueOf(String value) { - switch (value) { - case "bitbucket": - return BITBUCKET; - default: - return new ConnectionResponseContentBitbucketStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - BITBUCKET, - - UNKNOWN - } - - public interface Visitor { - T visitBitbucket(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitly.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitly.java deleted file mode 100644 index a23068c2c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitly.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentBitly.Builder.class) -public final class ConnectionResponseContentBitly - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentBitlyStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentBitly( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentBitlyStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentBitlyStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentBitly && equalTo((ConnectionResponseContentBitly) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentBitly other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentBitlyStrategy strategy); - - Builder from(ConnectionResponseContentBitly other); - } - - public interface _FinalStage { - ConnectionResponseContentBitly build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsBitly options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentBitlyStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentBitly other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentBitlyStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsBitly options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentBitly build() { - return new ConnectionResponseContentBitly( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitlyStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitlyStrategy.java deleted file mode 100644 index dda890fa0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBitlyStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentBitlyStrategy { - public static final ConnectionResponseContentBitlyStrategy BITLY = - new ConnectionResponseContentBitlyStrategy(Value.BITLY, "bitly"); - - private final Value value; - - private final String string; - - ConnectionResponseContentBitlyStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentBitlyStrategy - && this.string.equals(((ConnectionResponseContentBitlyStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case BITLY: - return visitor.visitBitly(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentBitlyStrategy valueOf(String value) { - switch (value) { - case "bitly": - return BITLY; - default: - return new ConnectionResponseContentBitlyStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - BITLY, - - UNKNOWN - } - - public interface Visitor { - T visitBitly(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBox.java deleted file mode 100644 index 3e9bd1ad3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBox.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentBox.Builder.class) -public final class ConnectionResponseContentBox - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentBoxStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentBox( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentBoxStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentBoxStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentBox && equalTo((ConnectionResponseContentBox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentBox other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentBoxStrategy strategy); - - Builder from(ConnectionResponseContentBox other); - } - - public interface _FinalStage { - ConnectionResponseContentBox build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsBox options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentBoxStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentBox other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentBoxStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsBox options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentBox build() { - return new ConnectionResponseContentBox( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBoxStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBoxStrategy.java deleted file mode 100644 index 109adf3ab..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentBoxStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentBoxStrategy { - public static final ConnectionResponseContentBoxStrategy BOX = - new ConnectionResponseContentBoxStrategy(Value.BOX, "box"); - - private final Value value; - - private final String string; - - ConnectionResponseContentBoxStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentBoxStrategy - && this.string.equals(((ConnectionResponseContentBoxStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case BOX: - return visitor.visitBox(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentBoxStrategy valueOf(String value) { - switch (value) { - case "box": - return BOX; - default: - return new ConnectionResponseContentBoxStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - BOX, - - UNKNOWN - } - - public interface Visitor { - T visitBox(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentCustom.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentCustom.java deleted file mode 100644 index 03edbe793..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentCustom.java +++ /dev/null @@ -1,473 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentCustom.Builder.class) -public final class ConnectionResponseContentCustom - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentCustomStrategy strategy; - - private final Optional> options; - - private final Optional provisioningTicketUrl; - - private final Map additionalProperties; - - private ConnectionResponseContentCustom( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentCustomStrategy strategy, - Optional> options, - Optional provisioningTicketUrl, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.provisioningTicketUrl = provisioningTicketUrl; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentCustomStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - - @JsonProperty("provisioning_ticket_url") - public Optional getProvisioningTicketUrl() { - return provisioningTicketUrl; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentCustom && equalTo((ConnectionResponseContentCustom) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentCustom other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && provisioningTicketUrl.equals(other.provisioningTicketUrl); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.provisioningTicketUrl); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentCustomStrategy strategy); - - Builder from(ConnectionResponseContentCustom other); - } - - public interface _FinalStage { - ConnectionResponseContentCustom build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional> options); - - _FinalStage options(Map options); - - _FinalStage provisioningTicketUrl(Optional provisioningTicketUrl); - - _FinalStage provisioningTicketUrl(String provisioningTicketUrl); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentCustomStrategy strategy; - - private Optional provisioningTicketUrl = Optional.empty(); - - private Optional> options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentCustom other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - provisioningTicketUrl(other.getProvisioningTicketUrl()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentCustomStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage provisioningTicketUrl(String provisioningTicketUrl) { - this.provisioningTicketUrl = Optional.ofNullable(provisioningTicketUrl); - return this; - } - - @java.lang.Override - @JsonSetter(value = "provisioning_ticket_url", nulls = Nulls.SKIP) - public _FinalStage provisioningTicketUrl(Optional provisioningTicketUrl) { - this.provisioningTicketUrl = provisioningTicketUrl; - return this; - } - - @java.lang.Override - public _FinalStage options(Map options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional> options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentCustom build() { - return new ConnectionResponseContentCustom( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - provisioningTicketUrl, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentCustomStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentCustomStrategy.java deleted file mode 100644 index 619783ed0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentCustomStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentCustomStrategy { - public static final ConnectionResponseContentCustomStrategy CUSTOM = - new ConnectionResponseContentCustomStrategy(Value.CUSTOM, "custom"); - - private final Value value; - - private final String string; - - ConnectionResponseContentCustomStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentCustomStrategy - && this.string.equals(((ConnectionResponseContentCustomStrategy) 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 ConnectionResponseContentCustomStrategy valueOf(String value) { - switch (value) { - case "custom": - return CUSTOM; - default: - return new ConnectionResponseContentCustomStrategy(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/ConnectionResponseContentDaccount.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDaccount.java deleted file mode 100644 index c07c1b26f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDaccount.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentDaccount.Builder.class) -public final class ConnectionResponseContentDaccount - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentDaccountStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentDaccount( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentDaccountStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentDaccountStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentDaccount && equalTo((ConnectionResponseContentDaccount) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentDaccount other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentDaccountStrategy strategy); - - Builder from(ConnectionResponseContentDaccount other); - } - - public interface _FinalStage { - ConnectionResponseContentDaccount build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsDaccount options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentDaccountStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentDaccount other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentDaccountStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsDaccount options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentDaccount build() { - return new ConnectionResponseContentDaccount( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDaccountStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDaccountStrategy.java deleted file mode 100644 index 24f71fd8a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDaccountStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentDaccountStrategy { - public static final ConnectionResponseContentDaccountStrategy DACCOUNT = - new ConnectionResponseContentDaccountStrategy(Value.DACCOUNT, "daccount"); - - private final Value value; - - private final String string; - - ConnectionResponseContentDaccountStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentDaccountStrategy - && this.string.equals(((ConnectionResponseContentDaccountStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DACCOUNT: - return visitor.visitDaccount(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentDaccountStrategy valueOf(String value) { - switch (value) { - case "daccount": - return DACCOUNT; - default: - return new ConnectionResponseContentDaccountStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - DACCOUNT, - - UNKNOWN - } - - public interface Visitor { - T visitDaccount(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDropbox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDropbox.java deleted file mode 100644 index 814b959dd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDropbox.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentDropbox.Builder.class) -public final class ConnectionResponseContentDropbox - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentDropboxStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentDropbox( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentDropboxStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentDropboxStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentDropbox && equalTo((ConnectionResponseContentDropbox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentDropbox other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentDropboxStrategy strategy); - - Builder from(ConnectionResponseContentDropbox other); - } - - public interface _FinalStage { - ConnectionResponseContentDropbox build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsDropbox options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentDropboxStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentDropbox other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentDropboxStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsDropbox options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentDropbox build() { - return new ConnectionResponseContentDropbox( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDropboxStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDropboxStrategy.java deleted file mode 100644 index 1ec2d2460..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDropboxStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentDropboxStrategy { - public static final ConnectionResponseContentDropboxStrategy DROPBOX = - new ConnectionResponseContentDropboxStrategy(Value.DROPBOX, "dropbox"); - - private final Value value; - - private final String string; - - ConnectionResponseContentDropboxStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentDropboxStrategy - && this.string.equals(((ConnectionResponseContentDropboxStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DROPBOX: - return visitor.visitDropbox(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentDropboxStrategy valueOf(String value) { - switch (value) { - case "dropbox": - return DROPBOX; - default: - return new ConnectionResponseContentDropboxStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - DROPBOX, - - UNKNOWN - } - - public interface Visitor { - T visitDropbox(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDwolla.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDwolla.java deleted file mode 100644 index 61378ce7f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDwolla.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentDwolla.Builder.class) -public final class ConnectionResponseContentDwolla - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentDwollaStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentDwolla( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentDwollaStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentDwollaStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentDwolla && equalTo((ConnectionResponseContentDwolla) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentDwolla other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentDwollaStrategy strategy); - - Builder from(ConnectionResponseContentDwolla other); - } - - public interface _FinalStage { - ConnectionResponseContentDwolla build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsDwolla options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentDwollaStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentDwolla other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentDwollaStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsDwolla options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentDwolla build() { - return new ConnectionResponseContentDwolla( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDwollaStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDwollaStrategy.java deleted file mode 100644 index 27ade776f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentDwollaStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentDwollaStrategy { - public static final ConnectionResponseContentDwollaStrategy DWOLLA = - new ConnectionResponseContentDwollaStrategy(Value.DWOLLA, "dwolla"); - - private final Value value; - - private final String string; - - ConnectionResponseContentDwollaStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentDwollaStrategy - && this.string.equals(((ConnectionResponseContentDwollaStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DWOLLA: - return visitor.visitDwolla(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentDwollaStrategy valueOf(String value) { - switch (value) { - case "dwolla": - return DWOLLA; - default: - return new ConnectionResponseContentDwollaStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - DWOLLA, - - UNKNOWN - } - - public interface Visitor { - T visitDwolla(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEmail.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEmail.java deleted file mode 100644 index 2e1571017..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEmail.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentEmail.Builder.class) -public final class ConnectionResponseContentEmail - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentEmailStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentEmail( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentEmailStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentEmailStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentEmail && equalTo((ConnectionResponseContentEmail) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentEmail other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentEmailStrategy strategy); - - Builder from(ConnectionResponseContentEmail other); - } - - public interface _FinalStage { - ConnectionResponseContentEmail build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsEmail options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentEmailStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentEmail other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentEmailStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsEmail options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentEmail build() { - return new ConnectionResponseContentEmail( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEmailStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEmailStrategy.java deleted file mode 100644 index 37694a4d3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEmailStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentEmailStrategy { - public static final ConnectionResponseContentEmailStrategy EMAIL = - new ConnectionResponseContentEmailStrategy(Value.EMAIL, "email"); - - private final Value value; - - private final String string; - - ConnectionResponseContentEmailStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentEmailStrategy - && this.string.equals(((ConnectionResponseContentEmailStrategy) 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 UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentEmailStrategy valueOf(String value) { - switch (value) { - case "email": - return EMAIL; - default: - return new ConnectionResponseContentEmailStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - EMAIL, - - UNKNOWN - } - - public interface Visitor { - T visitEmail(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernote.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernote.java deleted file mode 100644 index a2911edcd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernote.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentEvernote.Builder.class) -public final class ConnectionResponseContentEvernote - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentEvernoteStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentEvernote( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentEvernoteStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentEvernoteStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentEvernote && equalTo((ConnectionResponseContentEvernote) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentEvernote other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentEvernoteStrategy strategy); - - Builder from(ConnectionResponseContentEvernote other); - } - - public interface _FinalStage { - ConnectionResponseContentEvernote build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsEvernote options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentEvernoteStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentEvernote other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentEvernoteStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsEvernote options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentEvernote build() { - return new ConnectionResponseContentEvernote( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteSandbox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteSandbox.java deleted file mode 100644 index 8f471983e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteSandbox.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentEvernoteSandbox.Builder.class) -public final class ConnectionResponseContentEvernoteSandbox - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentEvernoteSandboxStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentEvernoteSandbox( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentEvernoteSandboxStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentEvernoteSandboxStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentEvernoteSandbox - && equalTo((ConnectionResponseContentEvernoteSandbox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentEvernoteSandbox other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentEvernoteSandboxStrategy strategy); - - Builder from(ConnectionResponseContentEvernoteSandbox other); - } - - public interface _FinalStage { - ConnectionResponseContentEvernoteSandbox build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsEvernote options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentEvernoteSandboxStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentEvernoteSandbox other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentEvernoteSandboxStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsEvernote options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentEvernoteSandbox build() { - return new ConnectionResponseContentEvernoteSandbox( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteSandboxStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteSandboxStrategy.java deleted file mode 100644 index 5c11fbbaa..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteSandboxStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentEvernoteSandboxStrategy { - public static final ConnectionResponseContentEvernoteSandboxStrategy EVERNOTE_SANDBOX = - new ConnectionResponseContentEvernoteSandboxStrategy(Value.EVERNOTE_SANDBOX, "evernote-sandbox"); - - private final Value value; - - private final String string; - - ConnectionResponseContentEvernoteSandboxStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentEvernoteSandboxStrategy - && this.string.equals(((ConnectionResponseContentEvernoteSandboxStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EVERNOTE_SANDBOX: - return visitor.visitEvernoteSandbox(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentEvernoteSandboxStrategy valueOf(String value) { - switch (value) { - case "evernote-sandbox": - return EVERNOTE_SANDBOX; - default: - return new ConnectionResponseContentEvernoteSandboxStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - EVERNOTE_SANDBOX, - - UNKNOWN - } - - public interface Visitor { - T visitEvernoteSandbox(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteStrategy.java deleted file mode 100644 index 5e899e467..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentEvernoteStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentEvernoteStrategy { - public static final ConnectionResponseContentEvernoteStrategy EVERNOTE = - new ConnectionResponseContentEvernoteStrategy(Value.EVERNOTE, "evernote"); - - private final Value value; - - private final String string; - - ConnectionResponseContentEvernoteStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentEvernoteStrategy - && this.string.equals(((ConnectionResponseContentEvernoteStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EVERNOTE: - return visitor.visitEvernote(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentEvernoteStrategy valueOf(String value) { - switch (value) { - case "evernote": - return EVERNOTE; - default: - return new ConnectionResponseContentEvernoteStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - EVERNOTE, - - UNKNOWN - } - - public interface Visitor { - T visitEvernote(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentExact.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentExact.java deleted file mode 100644 index 1ddfcb109..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentExact.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentExact.Builder.class) -public final class ConnectionResponseContentExact - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentExactStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentExact( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentExactStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentExactStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentExact && equalTo((ConnectionResponseContentExact) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentExact other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentExactStrategy strategy); - - Builder from(ConnectionResponseContentExact other); - } - - public interface _FinalStage { - ConnectionResponseContentExact build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsExact options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentExactStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentExact other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentExactStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsExact options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentExact build() { - return new ConnectionResponseContentExact( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentExactStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentExactStrategy.java deleted file mode 100644 index 3bb9dfed5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentExactStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentExactStrategy { - public static final ConnectionResponseContentExactStrategy EXACT = - new ConnectionResponseContentExactStrategy(Value.EXACT, "exact"); - - private final Value value; - - private final String string; - - ConnectionResponseContentExactStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentExactStrategy - && this.string.equals(((ConnectionResponseContentExactStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EXACT: - return visitor.visitExact(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentExactStrategy valueOf(String value) { - switch (value) { - case "exact": - return EXACT; - default: - return new ConnectionResponseContentExactStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - EXACT, - - UNKNOWN - } - - public interface Visitor { - T visitExact(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFacebook.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFacebook.java deleted file mode 100644 index ad37e856d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFacebook.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentFacebook.Builder.class) -public final class ConnectionResponseContentFacebook - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentFacebookStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentFacebook( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentFacebookStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentFacebookStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentFacebook && equalTo((ConnectionResponseContentFacebook) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentFacebook other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentFacebookStrategy strategy); - - Builder from(ConnectionResponseContentFacebook other); - } - - public interface _FinalStage { - ConnectionResponseContentFacebook build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsFacebook options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentFacebookStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentFacebook other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentFacebookStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsFacebook options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentFacebook build() { - return new ConnectionResponseContentFacebook( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFacebookStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFacebookStrategy.java deleted file mode 100644 index 0f00968c5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFacebookStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentFacebookStrategy { - public static final ConnectionResponseContentFacebookStrategy FACEBOOK = - new ConnectionResponseContentFacebookStrategy(Value.FACEBOOK, "facebook"); - - private final Value value; - - private final String string; - - ConnectionResponseContentFacebookStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentFacebookStrategy - && this.string.equals(((ConnectionResponseContentFacebookStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FACEBOOK: - return visitor.visitFacebook(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentFacebookStrategy valueOf(String value) { - switch (value) { - case "facebook": - return FACEBOOK; - default: - return new ConnectionResponseContentFacebookStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - FACEBOOK, - - UNKNOWN - } - - public interface Visitor { - T visitFacebook(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFitbit.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFitbit.java deleted file mode 100644 index b4a5f4570..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFitbit.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentFitbit.Builder.class) -public final class ConnectionResponseContentFitbit - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentFitbitStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentFitbit( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentFitbitStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentFitbitStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentFitbit && equalTo((ConnectionResponseContentFitbit) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentFitbit other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentFitbitStrategy strategy); - - Builder from(ConnectionResponseContentFitbit other); - } - - public interface _FinalStage { - ConnectionResponseContentFitbit build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsFitbit options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentFitbitStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentFitbit other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentFitbitStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsFitbit options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentFitbit build() { - return new ConnectionResponseContentFitbit( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFitbitStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFitbitStrategy.java deleted file mode 100644 index 9e17b76e9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFitbitStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentFitbitStrategy { - public static final ConnectionResponseContentFitbitStrategy FITBIT = - new ConnectionResponseContentFitbitStrategy(Value.FITBIT, "fitbit"); - - private final Value value; - - private final String string; - - ConnectionResponseContentFitbitStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentFitbitStrategy - && this.string.equals(((ConnectionResponseContentFitbitStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FITBIT: - return visitor.visitFitbit(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentFitbitStrategy valueOf(String value) { - switch (value) { - case "fitbit": - return FITBIT; - default: - return new ConnectionResponseContentFitbitStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - FITBIT, - - UNKNOWN - } - - public interface Visitor { - T visitFitbit(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFlickr.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFlickr.java deleted file mode 100644 index 96a248100..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFlickr.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentFlickr.Builder.class) -public final class ConnectionResponseContentFlickr - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentFlickrStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentFlickr( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentFlickrStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentFlickrStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentFlickr && equalTo((ConnectionResponseContentFlickr) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentFlickr other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentFlickrStrategy strategy); - - Builder from(ConnectionResponseContentFlickr other); - } - - public interface _FinalStage { - ConnectionResponseContentFlickr build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsFlickr options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentFlickrStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentFlickr other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentFlickrStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsFlickr options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentFlickr build() { - return new ConnectionResponseContentFlickr( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFlickrStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFlickrStrategy.java deleted file mode 100644 index 56fa474f7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentFlickrStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentFlickrStrategy { - public static final ConnectionResponseContentFlickrStrategy FLICKR = - new ConnectionResponseContentFlickrStrategy(Value.FLICKR, "flickr"); - - private final Value value; - - private final String string; - - ConnectionResponseContentFlickrStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentFlickrStrategy - && this.string.equals(((ConnectionResponseContentFlickrStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FLICKR: - return visitor.visitFlickr(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentFlickrStrategy valueOf(String value) { - switch (value) { - case "flickr": - return FLICKR; - default: - return new ConnectionResponseContentFlickrStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - FLICKR, - - UNKNOWN - } - - public interface Visitor { - T visitFlickr(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGitHub.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGitHub.java deleted file mode 100644 index 1d371be0c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGitHub.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentGitHub.Builder.class) -public final class ConnectionResponseContentGitHub - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentGitHubStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentGitHub( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentGitHubStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentGitHubStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentGitHub && equalTo((ConnectionResponseContentGitHub) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentGitHub other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentGitHubStrategy strategy); - - Builder from(ConnectionResponseContentGitHub other); - } - - public interface _FinalStage { - ConnectionResponseContentGitHub build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsGitHub options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentGitHubStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentGitHub other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentGitHubStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsGitHub options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentGitHub build() { - return new ConnectionResponseContentGitHub( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGitHubStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGitHubStrategy.java deleted file mode 100644 index 246b18c2b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGitHubStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentGitHubStrategy { - public static final ConnectionResponseContentGitHubStrategy GITHUB = - new ConnectionResponseContentGitHubStrategy(Value.GITHUB, "github"); - - private final Value value; - - private final String string; - - ConnectionResponseContentGitHubStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentGitHubStrategy - && this.string.equals(((ConnectionResponseContentGitHubStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GITHUB: - return visitor.visitGithub(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentGitHubStrategy valueOf(String value) { - switch (value) { - case "github": - return GITHUB; - default: - return new ConnectionResponseContentGitHubStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - GITHUB, - - UNKNOWN - } - - public interface Visitor { - T visitGithub(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleApps.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleApps.java deleted file mode 100644 index 990b7816a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleApps.java +++ /dev/null @@ -1,506 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentGoogleApps.Builder.class) -public final class ConnectionResponseContentGoogleApps - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentGoogleAppsStrategy strategy; - - private final Optional options; - - private final Optional provisioningTicketUrl; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private ConnectionResponseContentGoogleApps( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentGoogleAppsStrategy strategy, - Optional options, - Optional provisioningTicketUrl, - Optional showAsButton, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.provisioningTicketUrl = provisioningTicketUrl; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentGoogleAppsStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("provisioning_ticket_url") - public Optional getProvisioningTicketUrl() { - return provisioningTicketUrl; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentGoogleApps - && equalTo((ConnectionResponseContentGoogleApps) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentGoogleApps other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && provisioningTicketUrl.equals(other.provisioningTicketUrl) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.provisioningTicketUrl, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentGoogleAppsStrategy strategy); - - Builder from(ConnectionResponseContentGoogleApps other); - } - - public interface _FinalStage { - ConnectionResponseContentGoogleApps build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsGoogleApps options); - - _FinalStage provisioningTicketUrl(Optional provisioningTicketUrl); - - _FinalStage provisioningTicketUrl(String provisioningTicketUrl); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentGoogleAppsStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional provisioningTicketUrl = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentGoogleApps other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - provisioningTicketUrl(other.getProvisioningTicketUrl()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentGoogleAppsStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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 provisioningTicketUrl(String provisioningTicketUrl) { - this.provisioningTicketUrl = Optional.ofNullable(provisioningTicketUrl); - return this; - } - - @java.lang.Override - @JsonSetter(value = "provisioning_ticket_url", nulls = Nulls.SKIP) - public _FinalStage provisioningTicketUrl(Optional provisioningTicketUrl) { - this.provisioningTicketUrl = provisioningTicketUrl; - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsGoogleApps options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentGoogleApps build() { - return new ConnectionResponseContentGoogleApps( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - provisioningTicketUrl, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleAppsStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleAppsStrategy.java deleted file mode 100644 index ef54d6687..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleAppsStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentGoogleAppsStrategy { - public static final ConnectionResponseContentGoogleAppsStrategy GOOGLE_APPS = - new ConnectionResponseContentGoogleAppsStrategy(Value.GOOGLE_APPS, "google-apps"); - - private final Value value; - - private final String string; - - ConnectionResponseContentGoogleAppsStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentGoogleAppsStrategy - && this.string.equals(((ConnectionResponseContentGoogleAppsStrategy) 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 ConnectionResponseContentGoogleAppsStrategy valueOf(String value) { - switch (value) { - case "google-apps": - return GOOGLE_APPS; - default: - return new ConnectionResponseContentGoogleAppsStrategy(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/ConnectionResponseContentGoogleOAuth2.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleOAuth2.java deleted file mode 100644 index b3295dc8d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleOAuth2.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentGoogleOAuth2.Builder.class) -public final class ConnectionResponseContentGoogleOAuth2 - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentGoogleOAuth2Strategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentGoogleOAuth2( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentGoogleOAuth2Strategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentGoogleOAuth2Strategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentGoogleOAuth2 - && equalTo((ConnectionResponseContentGoogleOAuth2) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentGoogleOAuth2 other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentGoogleOAuth2Strategy strategy); - - Builder from(ConnectionResponseContentGoogleOAuth2 other); - } - - public interface _FinalStage { - ConnectionResponseContentGoogleOAuth2 build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsGoogleOAuth2 options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentGoogleOAuth2Strategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentGoogleOAuth2 other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentGoogleOAuth2Strategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsGoogleOAuth2 options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentGoogleOAuth2 build() { - return new ConnectionResponseContentGoogleOAuth2( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleOAuth2Strategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleOAuth2Strategy.java deleted file mode 100644 index fbb660152..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentGoogleOAuth2Strategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentGoogleOAuth2Strategy { - public static final ConnectionResponseContentGoogleOAuth2Strategy GOOGLE_OAUTH2 = - new ConnectionResponseContentGoogleOAuth2Strategy(Value.GOOGLE_OAUTH2, "google-oauth2"); - - private final Value value; - - private final String string; - - ConnectionResponseContentGoogleOAuth2Strategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentGoogleOAuth2Strategy - && this.string.equals(((ConnectionResponseContentGoogleOAuth2Strategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GOOGLE_OAUTH2: - return visitor.visitGoogleOauth2(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentGoogleOAuth2Strategy valueOf(String value) { - switch (value) { - case "google-oauth2": - return GOOGLE_OAUTH2; - default: - return new ConnectionResponseContentGoogleOAuth2Strategy(Value.UNKNOWN, value); - } - } - - public enum Value { - GOOGLE_OAUTH2, - - UNKNOWN - } - - public interface Visitor { - T visitGoogleOauth2(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentInstagram.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentInstagram.java deleted file mode 100644 index 085393621..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentInstagram.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentInstagram.Builder.class) -public final class ConnectionResponseContentInstagram - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentInstagramStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentInstagram( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentInstagramStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentInstagramStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentInstagram - && equalTo((ConnectionResponseContentInstagram) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentInstagram other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentInstagramStrategy strategy); - - Builder from(ConnectionResponseContentInstagram other); - } - - public interface _FinalStage { - ConnectionResponseContentInstagram build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsInstagram options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentInstagramStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentInstagram other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentInstagramStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsInstagram options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentInstagram build() { - return new ConnectionResponseContentInstagram( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentInstagramStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentInstagramStrategy.java deleted file mode 100644 index 6a4846232..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentInstagramStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentInstagramStrategy { - public static final ConnectionResponseContentInstagramStrategy INSTAGRAM = - new ConnectionResponseContentInstagramStrategy(Value.INSTAGRAM, "instagram"); - - private final Value value; - - private final String string; - - ConnectionResponseContentInstagramStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentInstagramStrategy - && this.string.equals(((ConnectionResponseContentInstagramStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case INSTAGRAM: - return visitor.visitInstagram(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentInstagramStrategy valueOf(String value) { - switch (value) { - case "instagram": - return INSTAGRAM; - default: - return new ConnectionResponseContentInstagramStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - INSTAGRAM, - - UNKNOWN - } - - public interface Visitor { - T visitInstagram(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentIp.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentIp.java deleted file mode 100644 index 07e7d4c9e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentIp.java +++ /dev/null @@ -1,473 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentIp.Builder.class) -public final class ConnectionResponseContentIp - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentIpStrategy strategy; - - private final Optional> options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private ConnectionResponseContentIp( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentIpStrategy strategy, - Optional> options, - Optional showAsButton, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentIpStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentIp && equalTo((ConnectionResponseContentIp) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentIp other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentIpStrategy strategy); - - Builder from(ConnectionResponseContentIp other); - } - - public interface _FinalStage { - ConnectionResponseContentIp build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional> options); - - _FinalStage options(Map options); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentIpStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional> options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentIp other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentIpStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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(Map options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional> options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentIp build() { - return new ConnectionResponseContentIp( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentIpStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentIpStrategy.java deleted file mode 100644 index 041832cb9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentIpStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentIpStrategy { - public static final ConnectionResponseContentIpStrategy IP = - new ConnectionResponseContentIpStrategy(Value.IP, "ip"); - - private final Value value; - - private final String string; - - ConnectionResponseContentIpStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentIpStrategy - && this.string.equals(((ConnectionResponseContentIpStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case IP: - return visitor.visitIp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentIpStrategy valueOf(String value) { - switch (value) { - case "ip": - return IP; - default: - return new ConnectionResponseContentIpStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - IP, - - UNKNOWN - } - - public interface Visitor { - T visitIp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLine.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLine.java deleted file mode 100644 index e851f1c2c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLine.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentLine.Builder.class) -public final class ConnectionResponseContentLine - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentLineStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentLine( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentLineStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentLineStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentLine && equalTo((ConnectionResponseContentLine) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentLine other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentLineStrategy strategy); - - Builder from(ConnectionResponseContentLine other); - } - - public interface _FinalStage { - ConnectionResponseContentLine build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsLine options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentLineStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentLine other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentLineStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsLine options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentLine build() { - return new ConnectionResponseContentLine( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLineStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLineStrategy.java deleted file mode 100644 index a4d27d893..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLineStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentLineStrategy { - public static final ConnectionResponseContentLineStrategy LINE = - new ConnectionResponseContentLineStrategy(Value.LINE, "line"); - - private final Value value; - - private final String string; - - ConnectionResponseContentLineStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentLineStrategy - && this.string.equals(((ConnectionResponseContentLineStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case LINE: - return visitor.visitLine(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentLineStrategy valueOf(String value) { - switch (value) { - case "line": - return LINE; - default: - return new ConnectionResponseContentLineStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - LINE, - - UNKNOWN - } - - public interface Visitor { - T visitLine(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLinkedin.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLinkedin.java deleted file mode 100644 index 2b760c285..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLinkedin.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentLinkedin.Builder.class) -public final class ConnectionResponseContentLinkedin - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentLinkedinStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentLinkedin( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentLinkedinStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentLinkedinStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentLinkedin && equalTo((ConnectionResponseContentLinkedin) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentLinkedin other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentLinkedinStrategy strategy); - - Builder from(ConnectionResponseContentLinkedin other); - } - - public interface _FinalStage { - ConnectionResponseContentLinkedin build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsLinkedin options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentLinkedinStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentLinkedin other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentLinkedinStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsLinkedin options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentLinkedin build() { - return new ConnectionResponseContentLinkedin( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLinkedinStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLinkedinStrategy.java deleted file mode 100644 index 83d5d65b0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentLinkedinStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentLinkedinStrategy { - public static final ConnectionResponseContentLinkedinStrategy LINKEDIN = - new ConnectionResponseContentLinkedinStrategy(Value.LINKEDIN, "linkedin"); - - private final Value value; - - private final String string; - - ConnectionResponseContentLinkedinStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentLinkedinStrategy - && this.string.equals(((ConnectionResponseContentLinkedinStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case LINKEDIN: - return visitor.visitLinkedin(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentLinkedinStrategy valueOf(String value) { - switch (value) { - case "linkedin": - return LINKEDIN; - default: - return new ConnectionResponseContentLinkedinStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - LINKEDIN, - - UNKNOWN - } - - public interface Visitor { - T visitLinkedin(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentMiicard.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentMiicard.java deleted file mode 100644 index 77630d7f7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentMiicard.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentMiicard.Builder.class) -public final class ConnectionResponseContentMiicard - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentMiicardStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentMiicard( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentMiicardStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentMiicardStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentMiicard && equalTo((ConnectionResponseContentMiicard) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentMiicard other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentMiicardStrategy strategy); - - Builder from(ConnectionResponseContentMiicard other); - } - - public interface _FinalStage { - ConnectionResponseContentMiicard build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsMiicard options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentMiicardStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentMiicard other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentMiicardStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsMiicard options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentMiicard build() { - return new ConnectionResponseContentMiicard( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentMiicardStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentMiicardStrategy.java deleted file mode 100644 index 089da133b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentMiicardStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentMiicardStrategy { - public static final ConnectionResponseContentMiicardStrategy MIICARD = - new ConnectionResponseContentMiicardStrategy(Value.MIICARD, "miicard"); - - private final Value value; - - private final String string; - - ConnectionResponseContentMiicardStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentMiicardStrategy - && this.string.equals(((ConnectionResponseContentMiicardStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MIICARD: - return visitor.visitMiicard(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentMiicardStrategy valueOf(String value) { - switch (value) { - case "miicard": - return MIICARD; - default: - return new ConnectionResponseContentMiicardStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - MIICARD, - - UNKNOWN - } - - public interface Visitor { - T visitMiicard(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth1.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth1.java deleted file mode 100644 index 81ea328f5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth1.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentOAuth1.Builder.class) -public final class ConnectionResponseContentOAuth1 - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentOAuth1Strategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentOAuth1( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentOAuth1Strategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentOAuth1Strategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentOAuth1 && equalTo((ConnectionResponseContentOAuth1) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentOAuth1 other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentOAuth1Strategy strategy); - - Builder from(ConnectionResponseContentOAuth1 other); - } - - public interface _FinalStage { - ConnectionResponseContentOAuth1 build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsOAuth1 options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentOAuth1Strategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentOAuth1 other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentOAuth1Strategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsOAuth1 options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentOAuth1 build() { - return new ConnectionResponseContentOAuth1( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth1Strategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth1Strategy.java deleted file mode 100644 index 0f0f77aa8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth1Strategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentOAuth1Strategy { - public static final ConnectionResponseContentOAuth1Strategy OAUTH1 = - new ConnectionResponseContentOAuth1Strategy(Value.OAUTH1, "oauth1"); - - private final Value value; - - private final String string; - - ConnectionResponseContentOAuth1Strategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentOAuth1Strategy - && this.string.equals(((ConnectionResponseContentOAuth1Strategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case OAUTH1: - return visitor.visitOauth1(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentOAuth1Strategy valueOf(String value) { - switch (value) { - case "oauth1": - return OAUTH1; - default: - return new ConnectionResponseContentOAuth1Strategy(Value.UNKNOWN, value); - } - } - - public enum Value { - OAUTH1, - - UNKNOWN - } - - public interface Visitor { - T visitOauth1(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth2.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth2.java deleted file mode 100644 index 40d3ef24d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth2.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentOAuth2.Builder.class) -public final class ConnectionResponseContentOAuth2 - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentOAuth2Strategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentOAuth2( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentOAuth2Strategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentOAuth2Strategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentOAuth2 && equalTo((ConnectionResponseContentOAuth2) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentOAuth2 other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentOAuth2Strategy strategy); - - Builder from(ConnectionResponseContentOAuth2 other); - } - - public interface _FinalStage { - ConnectionResponseContentOAuth2 build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsOAuth2 options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentOAuth2Strategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentOAuth2 other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentOAuth2Strategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsOAuth2 options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentOAuth2 build() { - return new ConnectionResponseContentOAuth2( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth2Strategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth2Strategy.java deleted file mode 100644 index c8af9bc98..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOAuth2Strategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentOAuth2Strategy { - public static final ConnectionResponseContentOAuth2Strategy OAUTH2 = - new ConnectionResponseContentOAuth2Strategy(Value.OAUTH2, "oauth2"); - - private final Value value; - - private final String string; - - ConnectionResponseContentOAuth2Strategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentOAuth2Strategy - && this.string.equals(((ConnectionResponseContentOAuth2Strategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case OAUTH2: - return visitor.visitOauth2(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentOAuth2Strategy valueOf(String value) { - switch (value) { - case "oauth2": - return OAUTH2; - default: - return new ConnectionResponseContentOAuth2Strategy(Value.UNKNOWN, value); - } - } - - public enum Value { - OAUTH2, - - UNKNOWN - } - - public interface Visitor { - T visitOauth2(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOffice365.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOffice365.java deleted file mode 100644 index c298b75b2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOffice365.java +++ /dev/null @@ -1,506 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentOffice365.Builder.class) -public final class ConnectionResponseContentOffice365 - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentOffice365Strategy strategy; - - private final Optional options; - - private final Optional provisioningTicketUrl; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private ConnectionResponseContentOffice365( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentOffice365Strategy strategy, - Optional options, - Optional provisioningTicketUrl, - Optional showAsButton, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.provisioningTicketUrl = provisioningTicketUrl; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentOffice365Strategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("provisioning_ticket_url") - public Optional getProvisioningTicketUrl() { - return provisioningTicketUrl; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentOffice365 - && equalTo((ConnectionResponseContentOffice365) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentOffice365 other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && provisioningTicketUrl.equals(other.provisioningTicketUrl) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.provisioningTicketUrl, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentOffice365Strategy strategy); - - Builder from(ConnectionResponseContentOffice365 other); - } - - public interface _FinalStage { - ConnectionResponseContentOffice365 build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsOffice365 options); - - _FinalStage provisioningTicketUrl(Optional provisioningTicketUrl); - - _FinalStage provisioningTicketUrl(String provisioningTicketUrl); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentOffice365Strategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional provisioningTicketUrl = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentOffice365 other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - provisioningTicketUrl(other.getProvisioningTicketUrl()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentOffice365Strategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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 provisioningTicketUrl(String provisioningTicketUrl) { - this.provisioningTicketUrl = Optional.ofNullable(provisioningTicketUrl); - return this; - } - - @java.lang.Override - @JsonSetter(value = "provisioning_ticket_url", nulls = Nulls.SKIP) - public _FinalStage provisioningTicketUrl(Optional provisioningTicketUrl) { - this.provisioningTicketUrl = provisioningTicketUrl; - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsOffice365 options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentOffice365 build() { - return new ConnectionResponseContentOffice365( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - provisioningTicketUrl, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOffice365Strategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOffice365Strategy.java deleted file mode 100644 index f33a729a5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOffice365Strategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentOffice365Strategy { - public static final ConnectionResponseContentOffice365Strategy OFFICE365 = - new ConnectionResponseContentOffice365Strategy(Value.OFFICE365, "office365"); - - private final Value value; - - private final String string; - - ConnectionResponseContentOffice365Strategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentOffice365Strategy - && this.string.equals(((ConnectionResponseContentOffice365Strategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case OFFICE365: - return visitor.visitOffice365(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentOffice365Strategy valueOf(String value) { - switch (value) { - case "office365": - return OFFICE365; - default: - return new ConnectionResponseContentOffice365Strategy(Value.UNKNOWN, value); - } - } - - public enum Value { - OFFICE365, - - UNKNOWN - } - - public interface Visitor { - T visitOffice365(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidc.java deleted file mode 100644 index 213b36705..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidc.java +++ /dev/null @@ -1,471 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentOidc.Builder.class) -public final class ConnectionResponseContentOidc - implements IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentOidcStrategy strategy; - - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private ConnectionResponseContentOidc( - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentOidcStrategy strategy, - Optional authentication, - Optional connectedAccounts, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentOidcStrategy getStrategy() { - return strategy; - } - - @JsonProperty("authentication") - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentOidc && equalTo((ConnectionResponseContentOidc) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentOidc other) { - return id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.authentication, - this.connectedAccounts, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentOidcStrategy strategy); - - Builder from(ConnectionResponseContentOidc other); - } - - public interface _FinalStage { - ConnectionResponseContentOidc build(); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurposeXaa connectedAccounts); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsOidc options); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentOidcStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentOidc other) { - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentOidcStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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(ConnectionOptionsOidc 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(ConnectionConnectedAccountsPurposeXaa connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public ConnectionResponseContentOidc build() { - return new ConnectionResponseContentOidc( - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - authentication, - connectedAccounts, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidcStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidcStrategy.java deleted file mode 100644 index 3209b1883..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOidcStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentOidcStrategy { - public static final ConnectionResponseContentOidcStrategy OIDC = - new ConnectionResponseContentOidcStrategy(Value.OIDC, "oidc"); - - private final Value value; - - private final String string; - - ConnectionResponseContentOidcStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentOidcStrategy - && this.string.equals(((ConnectionResponseContentOidcStrategy) 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 ConnectionResponseContentOidcStrategy valueOf(String value) { - switch (value) { - case "oidc": - return OIDC; - default: - return new ConnectionResponseContentOidcStrategy(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/ConnectionResponseContentOkta.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOkta.java deleted file mode 100644 index f3dbb50df..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOkta.java +++ /dev/null @@ -1,473 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentOkta.Builder.class) -public final class ConnectionResponseContentOkta - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentOktaStrategy strategy; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private ConnectionResponseContentOkta( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentOktaStrategy strategy, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentOktaStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentOkta && equalTo((ConnectionResponseContentOkta) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentOkta other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentOktaStrategy strategy); - - Builder from(ConnectionResponseContentOkta other); - } - - public interface _FinalStage { - ConnectionResponseContentOkta build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsOkta options); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentOktaStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentOkta other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentOktaStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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(ConnectionOptionsOkta options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentOkta build() { - return new ConnectionResponseContentOkta( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOktaStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOktaStrategy.java deleted file mode 100644 index 0068d7b8f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentOktaStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentOktaStrategy { - public static final ConnectionResponseContentOktaStrategy OKTA = - new ConnectionResponseContentOktaStrategy(Value.OKTA, "okta"); - - private final Value value; - - private final String string; - - ConnectionResponseContentOktaStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentOktaStrategy - && this.string.equals(((ConnectionResponseContentOktaStrategy) 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 ConnectionResponseContentOktaStrategy valueOf(String value) { - switch (value) { - case "okta": - return OKTA; - default: - return new ConnectionResponseContentOktaStrategy(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/ConnectionResponseContentPaypal.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypal.java deleted file mode 100644 index dca2392d3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypal.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentPaypal.Builder.class) -public final class ConnectionResponseContentPaypal - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentPaypalStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentPaypal( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentPaypalStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentPaypalStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentPaypal && equalTo((ConnectionResponseContentPaypal) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentPaypal other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentPaypalStrategy strategy); - - Builder from(ConnectionResponseContentPaypal other); - } - - public interface _FinalStage { - ConnectionResponseContentPaypal build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsPaypal options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentPaypalStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentPaypal other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentPaypalStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsPaypal options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentPaypal build() { - return new ConnectionResponseContentPaypal( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalSandbox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalSandbox.java deleted file mode 100644 index 32efe8dd3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalSandbox.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentPaypalSandbox.Builder.class) -public final class ConnectionResponseContentPaypalSandbox - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentPaypalSandboxStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentPaypalSandbox( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentPaypalSandboxStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentPaypalSandboxStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentPaypalSandbox - && equalTo((ConnectionResponseContentPaypalSandbox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentPaypalSandbox other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentPaypalSandboxStrategy strategy); - - Builder from(ConnectionResponseContentPaypalSandbox other); - } - - public interface _FinalStage { - ConnectionResponseContentPaypalSandbox build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsPaypal options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentPaypalSandboxStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentPaypalSandbox other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentPaypalSandboxStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsPaypal options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentPaypalSandbox build() { - return new ConnectionResponseContentPaypalSandbox( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalSandboxStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalSandboxStrategy.java deleted file mode 100644 index 8d1fae066..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalSandboxStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentPaypalSandboxStrategy { - public static final ConnectionResponseContentPaypalSandboxStrategy PAYPAL_SANDBOX = - new ConnectionResponseContentPaypalSandboxStrategy(Value.PAYPAL_SANDBOX, "paypal-sandbox"); - - private final Value value; - - private final String string; - - ConnectionResponseContentPaypalSandboxStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentPaypalSandboxStrategy - && this.string.equals(((ConnectionResponseContentPaypalSandboxStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PAYPAL_SANDBOX: - return visitor.visitPaypalSandbox(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentPaypalSandboxStrategy valueOf(String value) { - switch (value) { - case "paypal-sandbox": - return PAYPAL_SANDBOX; - default: - return new ConnectionResponseContentPaypalSandboxStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - PAYPAL_SANDBOX, - - UNKNOWN - } - - public interface Visitor { - T visitPaypalSandbox(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalStrategy.java deleted file mode 100644 index e37baba0d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPaypalStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentPaypalStrategy { - public static final ConnectionResponseContentPaypalStrategy PAYPAL = - new ConnectionResponseContentPaypalStrategy(Value.PAYPAL, "paypal"); - - private final Value value; - - private final String string; - - ConnectionResponseContentPaypalStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentPaypalStrategy - && this.string.equals(((ConnectionResponseContentPaypalStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PAYPAL: - return visitor.visitPaypal(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentPaypalStrategy valueOf(String value) { - switch (value) { - case "paypal": - return PAYPAL; - default: - return new ConnectionResponseContentPaypalStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - PAYPAL, - - UNKNOWN - } - - public interface Visitor { - T visitPaypal(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPingFederate.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPingFederate.java deleted file mode 100644 index e91c635e2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPingFederate.java +++ /dev/null @@ -1,506 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentPingFederate.Builder.class) -public final class ConnectionResponseContentPingFederate - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentPingFederateStrategy strategy; - - private final Optional options; - - private final Optional provisioningTicketUrl; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private ConnectionResponseContentPingFederate( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentPingFederateStrategy strategy, - Optional options, - Optional provisioningTicketUrl, - Optional showAsButton, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.provisioningTicketUrl = provisioningTicketUrl; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentPingFederateStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("provisioning_ticket_url") - public Optional getProvisioningTicketUrl() { - return provisioningTicketUrl; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentPingFederate - && equalTo((ConnectionResponseContentPingFederate) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentPingFederate other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && provisioningTicketUrl.equals(other.provisioningTicketUrl) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.provisioningTicketUrl, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentPingFederateStrategy strategy); - - Builder from(ConnectionResponseContentPingFederate other); - } - - public interface _FinalStage { - ConnectionResponseContentPingFederate build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsPingFederate options); - - _FinalStage provisioningTicketUrl(Optional provisioningTicketUrl); - - _FinalStage provisioningTicketUrl(String provisioningTicketUrl); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentPingFederateStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional provisioningTicketUrl = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentPingFederate other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - provisioningTicketUrl(other.getProvisioningTicketUrl()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentPingFederateStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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 provisioningTicketUrl(String provisioningTicketUrl) { - this.provisioningTicketUrl = Optional.ofNullable(provisioningTicketUrl); - return this; - } - - @java.lang.Override - @JsonSetter(value = "provisioning_ticket_url", nulls = Nulls.SKIP) - public _FinalStage provisioningTicketUrl(Optional provisioningTicketUrl) { - this.provisioningTicketUrl = provisioningTicketUrl; - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsPingFederate options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentPingFederate build() { - return new ConnectionResponseContentPingFederate( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - provisioningTicketUrl, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPingFederateStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPingFederateStrategy.java deleted file mode 100644 index 476e92cc3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPingFederateStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentPingFederateStrategy { - public static final ConnectionResponseContentPingFederateStrategy PINGFEDERATE = - new ConnectionResponseContentPingFederateStrategy(Value.PINGFEDERATE, "pingfederate"); - - private final Value value; - - private final String string; - - ConnectionResponseContentPingFederateStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentPingFederateStrategy - && this.string.equals(((ConnectionResponseContentPingFederateStrategy) 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 ConnectionResponseContentPingFederateStrategy valueOf(String value) { - switch (value) { - case "pingfederate": - return PINGFEDERATE; - default: - return new ConnectionResponseContentPingFederateStrategy(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/ConnectionResponseContentPlanningCenter.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPlanningCenter.java deleted file mode 100644 index 918391278..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPlanningCenter.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentPlanningCenter.Builder.class) -public final class ConnectionResponseContentPlanningCenter - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentPlanningCenterStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentPlanningCenter( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentPlanningCenterStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentPlanningCenterStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentPlanningCenter - && equalTo((ConnectionResponseContentPlanningCenter) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentPlanningCenter other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentPlanningCenterStrategy strategy); - - Builder from(ConnectionResponseContentPlanningCenter other); - } - - public interface _FinalStage { - ConnectionResponseContentPlanningCenter build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsPlanningCenter options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentPlanningCenterStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentPlanningCenter other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentPlanningCenterStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsPlanningCenter options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentPlanningCenter build() { - return new ConnectionResponseContentPlanningCenter( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPlanningCenterStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPlanningCenterStrategy.java deleted file mode 100644 index 91f2662ea..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentPlanningCenterStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentPlanningCenterStrategy { - public static final ConnectionResponseContentPlanningCenterStrategy PLANNINGCENTER = - new ConnectionResponseContentPlanningCenterStrategy(Value.PLANNINGCENTER, "planningcenter"); - - private final Value value; - - private final String string; - - ConnectionResponseContentPlanningCenterStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentPlanningCenterStrategy - && this.string.equals(((ConnectionResponseContentPlanningCenterStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PLANNINGCENTER: - return visitor.visitPlanningcenter(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentPlanningCenterStrategy valueOf(String value) { - switch (value) { - case "planningcenter": - return PLANNINGCENTER; - default: - return new ConnectionResponseContentPlanningCenterStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - PLANNINGCENTER, - - UNKNOWN - } - - public interface Visitor { - T visitPlanningcenter(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentRenren.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentRenren.java deleted file mode 100644 index 3702feba8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentRenren.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentRenren.Builder.class) -public final class ConnectionResponseContentRenren - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentRenrenStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentRenren( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentRenrenStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentRenrenStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentRenren && equalTo((ConnectionResponseContentRenren) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentRenren other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentRenrenStrategy strategy); - - Builder from(ConnectionResponseContentRenren other); - } - - public interface _FinalStage { - ConnectionResponseContentRenren build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsRenren options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentRenrenStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentRenren other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentRenrenStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsRenren options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentRenren build() { - return new ConnectionResponseContentRenren( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentRenrenStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentRenrenStrategy.java deleted file mode 100644 index 619cf9962..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentRenrenStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentRenrenStrategy { - public static final ConnectionResponseContentRenrenStrategy RENREN = - new ConnectionResponseContentRenrenStrategy(Value.RENREN, "renren"); - - private final Value value; - - private final String string; - - ConnectionResponseContentRenrenStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentRenrenStrategy - && this.string.equals(((ConnectionResponseContentRenrenStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case RENREN: - return visitor.visitRenren(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentRenrenStrategy valueOf(String value) { - switch (value) { - case "renren": - return RENREN; - default: - return new ConnectionResponseContentRenrenStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - RENREN, - - UNKNOWN - } - - public interface Visitor { - T visitRenren(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforce.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforce.java deleted file mode 100644 index 7bfd74097..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforce.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentSalesforce.Builder.class) -public final class ConnectionResponseContentSalesforce - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentSalesforceStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentSalesforce( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentSalesforceStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentSalesforceStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentSalesforce - && equalTo((ConnectionResponseContentSalesforce) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentSalesforce other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentSalesforceStrategy strategy); - - Builder from(ConnectionResponseContentSalesforce other); - } - - public interface _FinalStage { - ConnectionResponseContentSalesforce build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsSalesforce options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentSalesforceStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentSalesforce other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentSalesforceStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsSalesforce options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentSalesforce build() { - return new ConnectionResponseContentSalesforce( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceCommunity.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceCommunity.java deleted file mode 100644 index 4f6022039..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceCommunity.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentSalesforceCommunity.Builder.class) -public final class ConnectionResponseContentSalesforceCommunity - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentSalesforceCommunityStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentSalesforceCommunity( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentSalesforceCommunityStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentSalesforceCommunityStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentSalesforceCommunity - && equalTo((ConnectionResponseContentSalesforceCommunity) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentSalesforceCommunity other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentSalesforceCommunityStrategy strategy); - - Builder from(ConnectionResponseContentSalesforceCommunity other); - } - - public interface _FinalStage { - ConnectionResponseContentSalesforceCommunity build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsSalesforceCommunity options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentSalesforceCommunityStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentSalesforceCommunity other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentSalesforceCommunityStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsSalesforceCommunity options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentSalesforceCommunity build() { - return new ConnectionResponseContentSalesforceCommunity( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceCommunityStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceCommunityStrategy.java deleted file mode 100644 index d6a101c2a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceCommunityStrategy.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentSalesforceCommunityStrategy { - public static final ConnectionResponseContentSalesforceCommunityStrategy SALESFORCE_COMMUNITY = - new ConnectionResponseContentSalesforceCommunityStrategy( - Value.SALESFORCE_COMMUNITY, "salesforce-community"); - - private final Value value; - - private final String string; - - ConnectionResponseContentSalesforceCommunityStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentSalesforceCommunityStrategy - && this.string.equals(((ConnectionResponseContentSalesforceCommunityStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SALESFORCE_COMMUNITY: - return visitor.visitSalesforceCommunity(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentSalesforceCommunityStrategy valueOf(String value) { - switch (value) { - case "salesforce-community": - return SALESFORCE_COMMUNITY; - default: - return new ConnectionResponseContentSalesforceCommunityStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - SALESFORCE_COMMUNITY, - - UNKNOWN - } - - public interface Visitor { - T visitSalesforceCommunity(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceSandbox.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceSandbox.java deleted file mode 100644 index 852ced464..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceSandbox.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentSalesforceSandbox.Builder.class) -public final class ConnectionResponseContentSalesforceSandbox - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentSalesforceSandboxStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentSalesforceSandbox( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentSalesforceSandboxStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentSalesforceSandboxStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentSalesforceSandbox - && equalTo((ConnectionResponseContentSalesforceSandbox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentSalesforceSandbox other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentSalesforceSandboxStrategy strategy); - - Builder from(ConnectionResponseContentSalesforceSandbox other); - } - - public interface _FinalStage { - ConnectionResponseContentSalesforceSandbox build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsSalesforce options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentSalesforceSandboxStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentSalesforceSandbox other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentSalesforceSandboxStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsSalesforce options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentSalesforceSandbox build() { - return new ConnectionResponseContentSalesforceSandbox( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceSandboxStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceSandboxStrategy.java deleted file mode 100644 index ea7e0fade..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceSandboxStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentSalesforceSandboxStrategy { - public static final ConnectionResponseContentSalesforceSandboxStrategy SALESFORCE_SANDBOX = - new ConnectionResponseContentSalesforceSandboxStrategy(Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); - - private final Value value; - - private final String string; - - ConnectionResponseContentSalesforceSandboxStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentSalesforceSandboxStrategy - && this.string.equals(((ConnectionResponseContentSalesforceSandboxStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SALESFORCE_SANDBOX: - return visitor.visitSalesforceSandbox(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentSalesforceSandboxStrategy valueOf(String value) { - switch (value) { - case "salesforce-sandbox": - return SALESFORCE_SANDBOX; - default: - return new ConnectionResponseContentSalesforceSandboxStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - SALESFORCE_SANDBOX, - - UNKNOWN - } - - public interface Visitor { - T visitSalesforceSandbox(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceStrategy.java deleted file mode 100644 index f672764f2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSalesforceStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentSalesforceStrategy { - public static final ConnectionResponseContentSalesforceStrategy SALESFORCE = - new ConnectionResponseContentSalesforceStrategy(Value.SALESFORCE, "salesforce"); - - private final Value value; - - private final String string; - - ConnectionResponseContentSalesforceStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentSalesforceStrategy - && this.string.equals(((ConnectionResponseContentSalesforceStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SALESFORCE: - return visitor.visitSalesforce(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentSalesforceStrategy valueOf(String value) { - switch (value) { - case "salesforce": - return SALESFORCE; - default: - return new ConnectionResponseContentSalesforceStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - SALESFORCE, - - UNKNOWN - } - - public interface Visitor { - T visitSalesforce(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSaml.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSaml.java deleted file mode 100644 index 74adce3b4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSaml.java +++ /dev/null @@ -1,505 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentSaml.Builder.class) -public final class ConnectionResponseContentSaml - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentSamlStrategy strategy; - - private final Optional options; - - private final Optional provisioningTicketUrl; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private ConnectionResponseContentSaml( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentSamlStrategy strategy, - Optional options, - Optional provisioningTicketUrl, - Optional showAsButton, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.provisioningTicketUrl = provisioningTicketUrl; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentSamlStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("provisioning_ticket_url") - public Optional getProvisioningTicketUrl() { - return provisioningTicketUrl; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentSaml && equalTo((ConnectionResponseContentSaml) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentSaml other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && provisioningTicketUrl.equals(other.provisioningTicketUrl) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.provisioningTicketUrl, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentSamlStrategy strategy); - - Builder from(ConnectionResponseContentSaml other); - } - - public interface _FinalStage { - ConnectionResponseContentSaml build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsSaml options); - - _FinalStage provisioningTicketUrl(Optional provisioningTicketUrl); - - _FinalStage provisioningTicketUrl(String provisioningTicketUrl); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentSamlStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional provisioningTicketUrl = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentSaml other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - provisioningTicketUrl(other.getProvisioningTicketUrl()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentSamlStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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 provisioningTicketUrl(String provisioningTicketUrl) { - this.provisioningTicketUrl = Optional.ofNullable(provisioningTicketUrl); - return this; - } - - @java.lang.Override - @JsonSetter(value = "provisioning_ticket_url", nulls = Nulls.SKIP) - public _FinalStage provisioningTicketUrl(Optional provisioningTicketUrl) { - this.provisioningTicketUrl = provisioningTicketUrl; - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsSaml options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentSaml build() { - return new ConnectionResponseContentSaml( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - provisioningTicketUrl, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSamlStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSamlStrategy.java deleted file mode 100644 index 916524b00..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSamlStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentSamlStrategy { - public static final ConnectionResponseContentSamlStrategy SAMLP = - new ConnectionResponseContentSamlStrategy(Value.SAMLP, "samlp"); - - private final Value value; - - private final String string; - - ConnectionResponseContentSamlStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentSamlStrategy - && this.string.equals(((ConnectionResponseContentSamlStrategy) 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 ConnectionResponseContentSamlStrategy valueOf(String value) { - switch (value) { - case "samlp": - return SAMLP; - default: - return new ConnectionResponseContentSamlStrategy(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/ConnectionResponseContentSharepoint.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSharepoint.java deleted file mode 100644 index c78d68092..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSharepoint.java +++ /dev/null @@ -1,474 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentSharepoint.Builder.class) -public final class ConnectionResponseContentSharepoint - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentSharepointStrategy strategy; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private ConnectionResponseContentSharepoint( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentSharepointStrategy strategy, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentSharepointStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentSharepoint - && equalTo((ConnectionResponseContentSharepoint) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentSharepoint other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentSharepointStrategy strategy); - - Builder from(ConnectionResponseContentSharepoint other); - } - - public interface _FinalStage { - ConnectionResponseContentSharepoint build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsSharepoint options); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentSharepointStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentSharepoint other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentSharepointStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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(ConnectionOptionsSharepoint options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentSharepoint build() { - return new ConnectionResponseContentSharepoint( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSharepointStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSharepointStrategy.java deleted file mode 100644 index dabfec20f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSharepointStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentSharepointStrategy { - public static final ConnectionResponseContentSharepointStrategy SHAREPOINT = - new ConnectionResponseContentSharepointStrategy(Value.SHAREPOINT, "sharepoint"); - - private final Value value; - - private final String string; - - ConnectionResponseContentSharepointStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentSharepointStrategy - && this.string.equals(((ConnectionResponseContentSharepointStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SHAREPOINT: - return visitor.visitSharepoint(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentSharepointStrategy valueOf(String value) { - switch (value) { - case "sharepoint": - return SHAREPOINT; - default: - return new ConnectionResponseContentSharepointStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - SHAREPOINT, - - UNKNOWN - } - - public interface Visitor { - T visitSharepoint(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShop.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShop.java deleted file mode 100644 index 7106337f5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShop.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentShop.Builder.class) -public final class ConnectionResponseContentShop - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentShopStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentShop( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentShopStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentShopStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentShop && equalTo((ConnectionResponseContentShop) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentShop other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentShopStrategy strategy); - - Builder from(ConnectionResponseContentShop other); - } - - public interface _FinalStage { - ConnectionResponseContentShop build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsShop options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentShopStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentShop other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentShopStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsShop options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentShop build() { - return new ConnectionResponseContentShop( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopStrategy.java deleted file mode 100644 index c2a393b6b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentShopStrategy { - public static final ConnectionResponseContentShopStrategy SHOP = - new ConnectionResponseContentShopStrategy(Value.SHOP, "shop"); - - private final Value value; - - private final String string; - - ConnectionResponseContentShopStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentShopStrategy - && this.string.equals(((ConnectionResponseContentShopStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SHOP: - return visitor.visitShop(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentShopStrategy valueOf(String value) { - switch (value) { - case "shop": - return SHOP; - default: - return new ConnectionResponseContentShopStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - SHOP, - - UNKNOWN - } - - public interface Visitor { - T visitShop(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopify.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopify.java deleted file mode 100644 index f96c0ef12..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopify.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentShopify.Builder.class) -public final class ConnectionResponseContentShopify - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentShopifyStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentShopify( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentShopifyStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentShopifyStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentShopify && equalTo((ConnectionResponseContentShopify) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentShopify other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentShopifyStrategy strategy); - - Builder from(ConnectionResponseContentShopify other); - } - - public interface _FinalStage { - ConnectionResponseContentShopify build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsShopify options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentShopifyStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentShopify other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentShopifyStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsShopify options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentShopify build() { - return new ConnectionResponseContentShopify( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopifyStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopifyStrategy.java deleted file mode 100644 index 0dc23a111..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentShopifyStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentShopifyStrategy { - public static final ConnectionResponseContentShopifyStrategy SHOPIFY = - new ConnectionResponseContentShopifyStrategy(Value.SHOPIFY, "shopify"); - - private final Value value; - - private final String string; - - ConnectionResponseContentShopifyStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentShopifyStrategy - && this.string.equals(((ConnectionResponseContentShopifyStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SHOPIFY: - return visitor.visitShopify(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentShopifyStrategy valueOf(String value) { - switch (value) { - case "shopify": - return SHOPIFY; - default: - return new ConnectionResponseContentShopifyStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - SHOPIFY, - - UNKNOWN - } - - public interface Visitor { - T visitShopify(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSms.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSms.java deleted file mode 100644 index 28a062520..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSms.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentSms.Builder.class) -public final class ConnectionResponseContentSms - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentSmsStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentSms( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentSmsStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentSmsStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentSms && equalTo((ConnectionResponseContentSms) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentSms other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentSmsStrategy strategy); - - Builder from(ConnectionResponseContentSms other); - } - - public interface _FinalStage { - ConnectionResponseContentSms build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsSms options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentSmsStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentSms other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentSmsStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsSms options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentSms build() { - return new ConnectionResponseContentSms( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSmsStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSmsStrategy.java deleted file mode 100644 index 4ac53d0f3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSmsStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentSmsStrategy { - public static final ConnectionResponseContentSmsStrategy SMS = - new ConnectionResponseContentSmsStrategy(Value.SMS, "sms"); - - private final Value value; - - private final String string; - - ConnectionResponseContentSmsStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentSmsStrategy - && this.string.equals(((ConnectionResponseContentSmsStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SMS: - return visitor.visitSms(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentSmsStrategy valueOf(String value) { - switch (value) { - case "sms": - return SMS; - default: - return new ConnectionResponseContentSmsStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - SMS, - - UNKNOWN - } - - public interface Visitor { - T visitSms(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSoundcloud.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSoundcloud.java deleted file mode 100644 index 3bfb9338f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSoundcloud.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentSoundcloud.Builder.class) -public final class ConnectionResponseContentSoundcloud - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentSoundcloudStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentSoundcloud( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentSoundcloudStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentSoundcloudStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentSoundcloud - && equalTo((ConnectionResponseContentSoundcloud) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentSoundcloud other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentSoundcloudStrategy strategy); - - Builder from(ConnectionResponseContentSoundcloud other); - } - - public interface _FinalStage { - ConnectionResponseContentSoundcloud build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsSoundcloud options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentSoundcloudStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentSoundcloud other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentSoundcloudStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsSoundcloud options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentSoundcloud build() { - return new ConnectionResponseContentSoundcloud( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSoundcloudStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSoundcloudStrategy.java deleted file mode 100644 index 52dfab05c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSoundcloudStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentSoundcloudStrategy { - public static final ConnectionResponseContentSoundcloudStrategy SOUNDCLOUD = - new ConnectionResponseContentSoundcloudStrategy(Value.SOUNDCLOUD, "soundcloud"); - - private final Value value; - - private final String string; - - ConnectionResponseContentSoundcloudStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentSoundcloudStrategy - && this.string.equals(((ConnectionResponseContentSoundcloudStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SOUNDCLOUD: - return visitor.visitSoundcloud(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentSoundcloudStrategy valueOf(String value) { - switch (value) { - case "soundcloud": - return SOUNDCLOUD; - default: - return new ConnectionResponseContentSoundcloudStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - SOUNDCLOUD, - - UNKNOWN - } - - public interface Visitor { - T visitSoundcloud(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentThirtySevenSignals.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentThirtySevenSignals.java deleted file mode 100644 index 4b603dba0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentThirtySevenSignals.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentThirtySevenSignals.Builder.class) -public final class ConnectionResponseContentThirtySevenSignals - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentThirtySevenSignalsStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentThirtySevenSignals( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentThirtySevenSignalsStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentThirtySevenSignalsStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentThirtySevenSignals - && equalTo((ConnectionResponseContentThirtySevenSignals) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentThirtySevenSignals other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentThirtySevenSignalsStrategy strategy); - - Builder from(ConnectionResponseContentThirtySevenSignals other); - } - - public interface _FinalStage { - ConnectionResponseContentThirtySevenSignals build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsThirtySevenSignals options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentThirtySevenSignalsStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentThirtySevenSignals other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentThirtySevenSignalsStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsThirtySevenSignals options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentThirtySevenSignals build() { - return new ConnectionResponseContentThirtySevenSignals( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentThirtySevenSignalsStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentThirtySevenSignalsStrategy.java deleted file mode 100644 index 32dd42ef1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentThirtySevenSignalsStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentThirtySevenSignalsStrategy { - public static final ConnectionResponseContentThirtySevenSignalsStrategy THIRTYSEVENSIGNALS = - new ConnectionResponseContentThirtySevenSignalsStrategy(Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); - - private final Value value; - - private final String string; - - ConnectionResponseContentThirtySevenSignalsStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentThirtySevenSignalsStrategy - && this.string.equals(((ConnectionResponseContentThirtySevenSignalsStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case THIRTYSEVENSIGNALS: - return visitor.visitThirtysevensignals(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentThirtySevenSignalsStrategy valueOf(String value) { - switch (value) { - case "thirtysevensignals": - return THIRTYSEVENSIGNALS; - default: - return new ConnectionResponseContentThirtySevenSignalsStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - THIRTYSEVENSIGNALS, - - UNKNOWN - } - - public interface Visitor { - T visitThirtysevensignals(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentTwitter.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentTwitter.java deleted file mode 100644 index c7251e84d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentTwitter.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentTwitter.Builder.class) -public final class ConnectionResponseContentTwitter - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentTwitterStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentTwitter( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentTwitterStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentTwitterStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentTwitter && equalTo((ConnectionResponseContentTwitter) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentTwitter other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentTwitterStrategy strategy); - - Builder from(ConnectionResponseContentTwitter other); - } - - public interface _FinalStage { - ConnectionResponseContentTwitter build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsTwitter options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentTwitterStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentTwitter other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentTwitterStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsTwitter options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentTwitter build() { - return new ConnectionResponseContentTwitter( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentTwitterStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentTwitterStrategy.java deleted file mode 100644 index 59f9c0df9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentTwitterStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentTwitterStrategy { - public static final ConnectionResponseContentTwitterStrategy TWITTER = - new ConnectionResponseContentTwitterStrategy(Value.TWITTER, "twitter"); - - private final Value value; - - private final String string; - - ConnectionResponseContentTwitterStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentTwitterStrategy - && this.string.equals(((ConnectionResponseContentTwitterStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TWITTER: - return visitor.visitTwitter(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentTwitterStrategy valueOf(String value) { - switch (value) { - case "twitter": - return TWITTER; - default: - return new ConnectionResponseContentTwitterStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - TWITTER, - - UNKNOWN - } - - public interface Visitor { - T visitTwitter(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentUntappd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentUntappd.java deleted file mode 100644 index 3bc77460b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentUntappd.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentUntappd.Builder.class) -public final class ConnectionResponseContentUntappd - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentUntappdStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentUntappd( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentUntappdStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentUntappdStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentUntappd && equalTo((ConnectionResponseContentUntappd) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentUntappd other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentUntappdStrategy strategy); - - Builder from(ConnectionResponseContentUntappd other); - } - - public interface _FinalStage { - ConnectionResponseContentUntappd build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsUntappd options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentUntappdStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentUntappd other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentUntappdStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsUntappd options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentUntappd build() { - return new ConnectionResponseContentUntappd( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentUntappdStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentUntappdStrategy.java deleted file mode 100644 index 2da1e6b14..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentUntappdStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentUntappdStrategy { - public static final ConnectionResponseContentUntappdStrategy UNTAPPD = - new ConnectionResponseContentUntappdStrategy(Value.UNTAPPD, "untappd"); - - private final Value value; - - private final String string; - - ConnectionResponseContentUntappdStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentUntappdStrategy - && this.string.equals(((ConnectionResponseContentUntappdStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case UNTAPPD: - return visitor.visitUntappd(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentUntappdStrategy valueOf(String value) { - switch (value) { - case "untappd": - return UNTAPPD; - default: - return new ConnectionResponseContentUntappdStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - UNTAPPD, - - UNKNOWN - } - - public interface Visitor { - T visitUntappd(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentVkontakte.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentVkontakte.java deleted file mode 100644 index c7cdc2b95..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentVkontakte.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentVkontakte.Builder.class) -public final class ConnectionResponseContentVkontakte - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentVkontakteStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentVkontakte( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentVkontakteStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentVkontakteStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentVkontakte - && equalTo((ConnectionResponseContentVkontakte) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentVkontakte other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentVkontakteStrategy strategy); - - Builder from(ConnectionResponseContentVkontakte other); - } - - public interface _FinalStage { - ConnectionResponseContentVkontakte build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsVkontakte options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentVkontakteStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentVkontakte other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentVkontakteStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsVkontakte options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentVkontakte build() { - return new ConnectionResponseContentVkontakte( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentVkontakteStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentVkontakteStrategy.java deleted file mode 100644 index 89e67bf86..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentVkontakteStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentVkontakteStrategy { - public static final ConnectionResponseContentVkontakteStrategy VKONTAKTE = - new ConnectionResponseContentVkontakteStrategy(Value.VKONTAKTE, "vkontakte"); - - private final Value value; - - private final String string; - - ConnectionResponseContentVkontakteStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentVkontakteStrategy - && this.string.equals(((ConnectionResponseContentVkontakteStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case VKONTAKTE: - return visitor.visitVkontakte(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentVkontakteStrategy valueOf(String value) { - switch (value) { - case "vkontakte": - return VKONTAKTE; - default: - return new ConnectionResponseContentVkontakteStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - VKONTAKTE, - - UNKNOWN - } - - public interface Visitor { - T visitVkontakte(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWeibo.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWeibo.java deleted file mode 100644 index 0d3dbbee4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWeibo.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentWeibo.Builder.class) -public final class ConnectionResponseContentWeibo - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentWeiboStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentWeibo( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentWeiboStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentWeiboStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentWeibo && equalTo((ConnectionResponseContentWeibo) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentWeibo other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentWeiboStrategy strategy); - - Builder from(ConnectionResponseContentWeibo other); - } - - public interface _FinalStage { - ConnectionResponseContentWeibo build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsWeibo options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentWeiboStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentWeibo other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentWeiboStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsWeibo options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentWeibo build() { - return new ConnectionResponseContentWeibo( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWeiboStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWeiboStrategy.java deleted file mode 100644 index e150ecc8f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWeiboStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentWeiboStrategy { - public static final ConnectionResponseContentWeiboStrategy WEIBO = - new ConnectionResponseContentWeiboStrategy(Value.WEIBO, "weibo"); - - private final Value value; - - private final String string; - - ConnectionResponseContentWeiboStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentWeiboStrategy - && this.string.equals(((ConnectionResponseContentWeiboStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case WEIBO: - return visitor.visitWeibo(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentWeiboStrategy valueOf(String value) { - switch (value) { - case "weibo": - return WEIBO; - default: - return new ConnectionResponseContentWeiboStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - WEIBO, - - UNKNOWN - } - - public interface Visitor { - T visitWeibo(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWindowsLive.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWindowsLive.java deleted file mode 100644 index 88b41a5b9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWindowsLive.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentWindowsLive.Builder.class) -public final class ConnectionResponseContentWindowsLive - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentWindowsLiveStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentWindowsLive( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentWindowsLiveStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentWindowsLiveStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentWindowsLive - && equalTo((ConnectionResponseContentWindowsLive) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentWindowsLive other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentWindowsLiveStrategy strategy); - - Builder from(ConnectionResponseContentWindowsLive other); - } - - public interface _FinalStage { - ConnectionResponseContentWindowsLive build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsWindowsLive options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentWindowsLiveStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentWindowsLive other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentWindowsLiveStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsWindowsLive options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentWindowsLive build() { - return new ConnectionResponseContentWindowsLive( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWindowsLiveStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWindowsLiveStrategy.java deleted file mode 100644 index 138d17524..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWindowsLiveStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentWindowsLiveStrategy { - public static final ConnectionResponseContentWindowsLiveStrategy WINDOWSLIVE = - new ConnectionResponseContentWindowsLiveStrategy(Value.WINDOWSLIVE, "windowslive"); - - private final Value value; - - private final String string; - - ConnectionResponseContentWindowsLiveStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentWindowsLiveStrategy - && this.string.equals(((ConnectionResponseContentWindowsLiveStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case WINDOWSLIVE: - return visitor.visitWindowslive(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentWindowsLiveStrategy valueOf(String value) { - switch (value) { - case "windowslive": - return WINDOWSLIVE; - default: - return new ConnectionResponseContentWindowsLiveStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - WINDOWSLIVE, - - UNKNOWN - } - - public interface Visitor { - T visitWindowslive(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWordpress.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWordpress.java deleted file mode 100644 index f051f3f15..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWordpress.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentWordpress.Builder.class) -public final class ConnectionResponseContentWordpress - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentWordpressStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentWordpress( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentWordpressStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentWordpressStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentWordpress - && equalTo((ConnectionResponseContentWordpress) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentWordpress other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentWordpressStrategy strategy); - - Builder from(ConnectionResponseContentWordpress other); - } - - public interface _FinalStage { - ConnectionResponseContentWordpress build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsWordpress options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentWordpressStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentWordpress other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentWordpressStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsWordpress options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentWordpress build() { - return new ConnectionResponseContentWordpress( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWordpressStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWordpressStrategy.java deleted file mode 100644 index 531aba355..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentWordpressStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentWordpressStrategy { - public static final ConnectionResponseContentWordpressStrategy WORDPRESS = - new ConnectionResponseContentWordpressStrategy(Value.WORDPRESS, "wordpress"); - - private final Value value; - - private final String string; - - ConnectionResponseContentWordpressStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentWordpressStrategy - && this.string.equals(((ConnectionResponseContentWordpressStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case WORDPRESS: - return visitor.visitWordpress(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentWordpressStrategy valueOf(String value) { - switch (value) { - case "wordpress": - return WORDPRESS; - default: - return new ConnectionResponseContentWordpressStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - WORDPRESS, - - UNKNOWN - } - - public interface Visitor { - T visitWordpress(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYahoo.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYahoo.java deleted file mode 100644 index 0cdc4af23..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYahoo.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentYahoo.Builder.class) -public final class ConnectionResponseContentYahoo - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentYahooStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentYahoo( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentYahooStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentYahooStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentYahoo && equalTo((ConnectionResponseContentYahoo) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentYahoo other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentYahooStrategy strategy); - - Builder from(ConnectionResponseContentYahoo other); - } - - public interface _FinalStage { - ConnectionResponseContentYahoo build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsYahoo options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentYahooStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentYahoo other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentYahooStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsYahoo options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentYahoo build() { - return new ConnectionResponseContentYahoo( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYahooStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYahooStrategy.java deleted file mode 100644 index 0e233188c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYahooStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentYahooStrategy { - public static final ConnectionResponseContentYahooStrategy YAHOO = - new ConnectionResponseContentYahooStrategy(Value.YAHOO, "yahoo"); - - private final Value value; - - private final String string; - - ConnectionResponseContentYahooStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentYahooStrategy - && this.string.equals(((ConnectionResponseContentYahooStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case YAHOO: - return visitor.visitYahoo(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentYahooStrategy valueOf(String value) { - switch (value) { - case "yahoo": - return YAHOO; - default: - return new ConnectionResponseContentYahooStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - YAHOO, - - UNKNOWN - } - - public interface Visitor { - T visitYahoo(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYammer.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYammer.java deleted file mode 100644 index e2e8fdccf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYammer.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentYammer.Builder.class) -public final class ConnectionResponseContentYammer - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentYammerStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentYammer( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentYammerStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentYammerStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentYammer && equalTo((ConnectionResponseContentYammer) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentYammer other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentYammerStrategy strategy); - - Builder from(ConnectionResponseContentYammer other); - } - - public interface _FinalStage { - ConnectionResponseContentYammer build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsYammer options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentYammerStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentYammer other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentYammerStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsYammer options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentYammer build() { - return new ConnectionResponseContentYammer( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYammerStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYammerStrategy.java deleted file mode 100644 index 32c5a53b9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYammerStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentYammerStrategy { - public static final ConnectionResponseContentYammerStrategy YAMMER = - new ConnectionResponseContentYammerStrategy(Value.YAMMER, "yammer"); - - private final Value value; - - private final String string; - - ConnectionResponseContentYammerStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentYammerStrategy - && this.string.equals(((ConnectionResponseContentYammerStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case YAMMER: - return visitor.visitYammer(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentYammerStrategy valueOf(String value) { - switch (value) { - case "yammer": - return YAMMER; - default: - return new ConnectionResponseContentYammerStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - YAMMER, - - UNKNOWN - } - - public interface Visitor { - T visitYammer(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYandex.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYandex.java deleted file mode 100644 index e78cc9143..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYandex.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionResponseContentYandex.Builder.class) -public final class ConnectionResponseContentYandex - implements IConnectionPurposes, IConnectionResponseCommon, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional id; - - private final Optional> realms; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final ConnectionResponseContentYandexStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private ConnectionResponseContentYandex( - Optional authentication, - Optional connectedAccounts, - Optional id, - Optional> realms, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - ConnectionResponseContentYandexStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.id = id; - this.realms = realms; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - @JsonProperty("realms") - @java.lang.Override - public Optional> getRealms() { - return realms; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public ConnectionResponseContentYandexStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionResponseContentYandex && equalTo((ConnectionResponseContentYandex) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionResponseContentYandex other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && id.equals(other.id) - && realms.equals(other.realms) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.id, - this.realms, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionResponseContentYandexStrategy strategy); - - Builder from(ConnectionResponseContentYandex other); - } - - public interface _FinalStage { - ConnectionResponseContentYandex build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsYandex options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private ConnectionResponseContentYandexStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionResponseContentYandex other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - id(other.getId()); - realms(other.getRealms()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull ConnectionResponseContentYandexStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsYandex options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public ConnectionResponseContentYandex build() { - return new ConnectionResponseContentYandex( - authentication, - connectedAccounts, - id, - realms, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYandexStrategy.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYandexStrategy.java deleted file mode 100644 index bac9136b7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentYandexStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionResponseContentYandexStrategy { - public static final ConnectionResponseContentYandexStrategy YANDEX = - new ConnectionResponseContentYandexStrategy(Value.YANDEX, "yandex"); - - private final Value value; - - private final String string; - - ConnectionResponseContentYandexStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionResponseContentYandexStrategy - && this.string.equals(((ConnectionResponseContentYandexStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case YANDEX: - return visitor.visitYandex(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionResponseContentYandexStrategy valueOf(String value) { - switch (value) { - case "yandex": - return YANDEX; - default: - return new ConnectionResponseContentYandexStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - YANDEX, - - UNKNOWN - } - - public interface Visitor { - T visitYandex(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionScopeOAuth2.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionScopeOAuth2.java deleted file mode 100644 index 22d0680ad..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionScopeOAuth2.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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.Objects; - -@JsonDeserialize(using = ConnectionScopeOAuth2.Deserializer.class) -public final class ConnectionScopeOAuth2 { - private final Object value; - - private final int type; - - private ConnectionScopeOAuth2(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((List) 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 ConnectionScopeOAuth2 && equalTo((ConnectionScopeOAuth2) other); - } - - private boolean equalTo(ConnectionScopeOAuth2 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 ConnectionScopeOAuth2 of(String value) { - return new ConnectionScopeOAuth2(value, 0); - } - - public static ConnectionScopeOAuth2 of(List value) { - return new ConnectionScopeOAuth2(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(List value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(ConnectionScopeOAuth2.class); - } - - @java.lang.Override - public ConnectionScopeOAuth2 deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.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/ConnectionScriptsOAuth2.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionScriptsOAuth2.java deleted file mode 100644 index 417044e5d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionScriptsOAuth2.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionScriptsOAuth2.Builder.class) -public final class ConnectionScriptsOAuth2 { - private final Optional fetchUserProfile; - - private final Optional getLogoutUrl; - - private final Map additionalProperties; - - private ConnectionScriptsOAuth2( - Optional fetchUserProfile, - Optional getLogoutUrl, - Map additionalProperties) { - this.fetchUserProfile = fetchUserProfile; - this.getLogoutUrl = getLogoutUrl; - this.additionalProperties = additionalProperties; - } - - /** - * @return Custom JavaScript function to retrieve and transform user profile data from the identity provider. Called with the access token and token exchange response. Must return a user profile object. Executed in a sandboxed environment. If not provided, an empty profile object is used. - */ - @JsonProperty("fetchUserProfile") - public Optional getFetchUserProfile() { - return fetchUserProfile; - } - - /** - * @return Custom JavaScript function to dynamically construct the logout URL for the identity provider. Called with the request query parameters and must invoke a callback with the logout URL. Only used if 'logoutUrl' is not configured. Executed in a sandboxed environment. - */ - @JsonProperty("getLogoutUrl") - public Optional getGetLogoutUrl() { - return getLogoutUrl; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionScriptsOAuth2 && equalTo((ConnectionScriptsOAuth2) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionScriptsOAuth2 other) { - return fetchUserProfile.equals(other.fetchUserProfile) && getLogoutUrl.equals(other.getLogoutUrl); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.fetchUserProfile, this.getLogoutUrl); - } - - @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 fetchUserProfile = Optional.empty(); - - private Optional getLogoutUrl = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionScriptsOAuth2 other) { - fetchUserProfile(other.getFetchUserProfile()); - getLogoutUrl(other.getGetLogoutUrl()); - return this; - } - - /** - *

Custom JavaScript function to retrieve and transform user profile data from the identity provider. Called with the access token and token exchange response. Must return a user profile object. Executed in a sandboxed environment. If not provided, an empty profile object is used.

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

Custom JavaScript function to dynamically construct the logout URL for the identity provider. Called with the request query parameters and must invoke a callback with the logout URL. Only used if 'logoutUrl' is not configured. Executed in a sandboxed environment.

- */ - @JsonSetter(value = "getLogoutUrl", nulls = Nulls.SKIP) - public Builder getLogoutUrl(Optional getLogoutUrl) { - this.getLogoutUrl = getLogoutUrl; - return this; - } - - public Builder getLogoutUrl(String getLogoutUrl) { - this.getLogoutUrl = Optional.ofNullable(getLogoutUrl); - return this; - } - - public ConnectionScriptsOAuth2 build() { - return new ConnectionScriptsOAuth2(fetchUserProfile, getLogoutUrl, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionSetUserRootAttributesEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionSetUserRootAttributesEnum.java deleted file mode 100644 index 71cb22fa1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionSetUserRootAttributesEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionSetUserRootAttributesEnum { - public static final ConnectionSetUserRootAttributesEnum NEVER_ON_LOGIN = - new ConnectionSetUserRootAttributesEnum(Value.NEVER_ON_LOGIN, "never_on_login"); - - public static final ConnectionSetUserRootAttributesEnum ON_EACH_LOGIN = - new ConnectionSetUserRootAttributesEnum(Value.ON_EACH_LOGIN, "on_each_login"); - - public static final ConnectionSetUserRootAttributesEnum ON_FIRST_LOGIN = - new ConnectionSetUserRootAttributesEnum(Value.ON_FIRST_LOGIN, "on_first_login"); - - private final Value value; - - private final String string; - - ConnectionSetUserRootAttributesEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionSetUserRootAttributesEnum - && this.string.equals(((ConnectionSetUserRootAttributesEnum) 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 ConnectionSetUserRootAttributesEnum 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 ConnectionSetUserRootAttributesEnum(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/ConnectionShouldTrustEmailVerifiedConnectionEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionShouldTrustEmailVerifiedConnectionEnum.java deleted file mode 100644 index 4c926026a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionShouldTrustEmailVerifiedConnectionEnum.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionShouldTrustEmailVerifiedConnectionEnum { - public static final ConnectionShouldTrustEmailVerifiedConnectionEnum ALWAYS_SET_EMAILS_AS_VERIFIED = - new ConnectionShouldTrustEmailVerifiedConnectionEnum( - Value.ALWAYS_SET_EMAILS_AS_VERIFIED, "always_set_emails_as_verified"); - - public static final ConnectionShouldTrustEmailVerifiedConnectionEnum NEVER_SET_EMAILS_AS_VERIFIED = - new ConnectionShouldTrustEmailVerifiedConnectionEnum( - Value.NEVER_SET_EMAILS_AS_VERIFIED, "never_set_emails_as_verified"); - - private final Value value; - - private final String string; - - ConnectionShouldTrustEmailVerifiedConnectionEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionShouldTrustEmailVerifiedConnectionEnum - && this.string.equals(((ConnectionShouldTrustEmailVerifiedConnectionEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ALWAYS_SET_EMAILS_AS_VERIFIED: - return visitor.visitAlwaysSetEmailsAsVerified(); - case NEVER_SET_EMAILS_AS_VERIFIED: - return visitor.visitNeverSetEmailsAsVerified(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionShouldTrustEmailVerifiedConnectionEnum valueOf(String value) { - switch (value) { - case "always_set_emails_as_verified": - return ALWAYS_SET_EMAILS_AS_VERIFIED; - case "never_set_emails_as_verified": - return NEVER_SET_EMAILS_AS_VERIFIED; - default: - return new ConnectionShouldTrustEmailVerifiedConnectionEnum(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/ConnectionSignatureAlgorithmEnumSaml.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionSignatureAlgorithmEnumSaml.java deleted file mode 100644 index c7b590f14..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionSignatureAlgorithmEnumSaml.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionSignatureAlgorithmEnumSaml { - public static final ConnectionSignatureAlgorithmEnumSaml RSA_SHA1 = - new ConnectionSignatureAlgorithmEnumSaml(Value.RSA_SHA1, "rsa-sha1"); - - public static final ConnectionSignatureAlgorithmEnumSaml RSA_SHA256 = - new ConnectionSignatureAlgorithmEnumSaml(Value.RSA_SHA256, "rsa-sha256"); - - private final Value value; - - private final String string; - - ConnectionSignatureAlgorithmEnumSaml(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionSignatureAlgorithmEnumSaml - && this.string.equals(((ConnectionSignatureAlgorithmEnumSaml) 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 ConnectionSignatureAlgorithmEnumSaml valueOf(String value) { - switch (value) { - case "rsa-sha1": - return RSA_SHA1; - case "rsa-sha256": - return RSA_SHA256; - default: - return new ConnectionSignatureAlgorithmEnumSaml(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/ConnectionSigningKeySaml.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionSigningKeySaml.java deleted file mode 100644 index e7a208f70..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionSigningKeySaml.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionSigningKeySaml.Builder.class) -public final class ConnectionSigningKeySaml { - private final Optional cert; - - private final Optional key; - - private final Map additionalProperties; - - private ConnectionSigningKeySaml( - Optional cert, Optional key, Map additionalProperties) { - this.cert = cert; - this.key = key; - this.additionalProperties = additionalProperties; - } - - /** - * @return Base64-encoded X.509 certificate in PEM format used by Auth0 to sign SAML requests and logout messages. - */ - @JsonProperty("cert") - public Optional getCert() { - return cert; - } - - /** - * @return Private key in PEM format used by Auth0 to sign SAML requests and logout messages. - */ - @JsonProperty("key") - public Optional getKey() { - return key; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionSigningKeySaml && equalTo((ConnectionSigningKeySaml) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionSigningKeySaml other) { - return cert.equals(other.cert) && key.equals(other.key); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.cert, this.key); - } - - @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 cert = Optional.empty(); - - private Optional key = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionSigningKeySaml other) { - cert(other.getCert()); - key(other.getKey()); - return this; - } - - /** - *

Base64-encoded X.509 certificate in PEM format used by Auth0 to sign SAML requests and logout messages.

- */ - @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; - } - - /** - *

Private key in PEM format used by Auth0 to sign SAML requests and logout messages.

- */ - @JsonSetter(value = "key", nulls = Nulls.SKIP) - public Builder key(Optional key) { - this.key = key; - return this; - } - - public Builder key(String key) { - this.key = Optional.ofNullable(key); - return this; - } - - public ConnectionSigningKeySaml build() { - return new ConnectionSigningKeySaml(cert, key, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionSignupBehaviorEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionSignupBehaviorEnum.java deleted file mode 100644 index c755f3d0b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionSignupBehaviorEnum.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionSignupBehaviorEnum { - public static final ConnectionSignupBehaviorEnum ALLOW = new ConnectionSignupBehaviorEnum(Value.ALLOW, "allow"); - - public static final ConnectionSignupBehaviorEnum BLOCK = new ConnectionSignupBehaviorEnum(Value.BLOCK, "block"); - - private final Value value; - - private final String string; - - ConnectionSignupBehaviorEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionSignupBehaviorEnum - && this.string.equals(((ConnectionSignupBehaviorEnum) 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 ConnectionSignupBehaviorEnum valueOf(String value) { - switch (value) { - case "allow": - return ALLOW; - case "block": - return BLOCK; - default: - return new ConnectionSignupBehaviorEnum(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/ConnectionStrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionStrategyEnum.java deleted file mode 100644 index a69407be8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionStrategyEnum.java +++ /dev/null @@ -1,706 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionStrategyEnum { - public static final ConnectionStrategyEnum SHOP = new ConnectionStrategyEnum(Value.SHOP, "shop"); - - public static final ConnectionStrategyEnum AUTH0OIDC = new ConnectionStrategyEnum(Value.AUTH0OIDC, "auth0-oidc"); - - public static final ConnectionStrategyEnum DWOLLA = new ConnectionStrategyEnum(Value.DWOLLA, "dwolla"); - - public static final ConnectionStrategyEnum FLICKR = new ConnectionStrategyEnum(Value.FLICKR, "flickr"); - - public static final ConnectionStrategyEnum OKTA = new ConnectionStrategyEnum(Value.OKTA, "okta"); - - public static final ConnectionStrategyEnum PLANNINGCENTER = - new ConnectionStrategyEnum(Value.PLANNINGCENTER, "planningcenter"); - - public static final ConnectionStrategyEnum GOOGLE_OAUTH2 = - new ConnectionStrategyEnum(Value.GOOGLE_OAUTH2, "google-oauth2"); - - public static final ConnectionStrategyEnum AUTH0 = new ConnectionStrategyEnum(Value.AUTH0, "auth0"); - - public static final ConnectionStrategyEnum EXACT = new ConnectionStrategyEnum(Value.EXACT, "exact"); - - public static final ConnectionStrategyEnum WORDPRESS = new ConnectionStrategyEnum(Value.WORDPRESS, "wordpress"); - - public static final ConnectionStrategyEnum FITBIT = new ConnectionStrategyEnum(Value.FITBIT, "fitbit"); - - public static final ConnectionStrategyEnum EVERNOTE = new ConnectionStrategyEnum(Value.EVERNOTE, "evernote"); - - public static final ConnectionStrategyEnum SHAREPOINT = new ConnectionStrategyEnum(Value.SHAREPOINT, "sharepoint"); - - public static final ConnectionStrategyEnum SHOPIFY = new ConnectionStrategyEnum(Value.SHOPIFY, "shopify"); - - public static final ConnectionStrategyEnum SALESFORCE_SANDBOX = - new ConnectionStrategyEnum(Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); - - public static final ConnectionStrategyEnum MIICARD = new ConnectionStrategyEnum(Value.MIICARD, "miicard"); - - public static final ConnectionStrategyEnum FACEBOOK = new ConnectionStrategyEnum(Value.FACEBOOK, "facebook"); - - public static final ConnectionStrategyEnum OAUTH1 = new ConnectionStrategyEnum(Value.OAUTH1, "oauth1"); - - public static final ConnectionStrategyEnum APPLE = new ConnectionStrategyEnum(Value.APPLE, "apple"); - - public static final ConnectionStrategyEnum UNTAPPD = new ConnectionStrategyEnum(Value.UNTAPPD, "untappd"); - - public static final ConnectionStrategyEnum AMAZON = new ConnectionStrategyEnum(Value.AMAZON, "amazon"); - - public static final ConnectionStrategyEnum LINE = new ConnectionStrategyEnum(Value.LINE, "line"); - - public static final ConnectionStrategyEnum BITBUCKET = new ConnectionStrategyEnum(Value.BITBUCKET, "bitbucket"); - - public static final ConnectionStrategyEnum GITHUB = new ConnectionStrategyEnum(Value.GITHUB, "github"); - - public static final ConnectionStrategyEnum SALESFORCE = new ConnectionStrategyEnum(Value.SALESFORCE, "salesforce"); - - public static final ConnectionStrategyEnum OFFICE365 = new ConnectionStrategyEnum(Value.OFFICE365, "office365"); - - public static final ConnectionStrategyEnum SMS = new ConnectionStrategyEnum(Value.SMS, "sms"); - - public static final ConnectionStrategyEnum AOL = new ConnectionStrategyEnum(Value.AOL, "aol"); - - public static final ConnectionStrategyEnum TWITTER = new ConnectionStrategyEnum(Value.TWITTER, "twitter"); - - public static final ConnectionStrategyEnum WINDOWSLIVE = - new ConnectionStrategyEnum(Value.WINDOWSLIVE, "windowslive"); - - public static final ConnectionStrategyEnum YANDEX = new ConnectionStrategyEnum(Value.YANDEX, "yandex"); - - public static final ConnectionStrategyEnum AD = new ConnectionStrategyEnum(Value.AD, "ad"); - - public static final ConnectionStrategyEnum BAIDU = new ConnectionStrategyEnum(Value.BAIDU, "baidu"); - - public static final ConnectionStrategyEnum BITLY = new ConnectionStrategyEnum(Value.BITLY, "bitly"); - - public static final ConnectionStrategyEnum PAYPAL_SANDBOX = - new ConnectionStrategyEnum(Value.PAYPAL_SANDBOX, "paypal-sandbox"); - - public static final ConnectionStrategyEnum RENREN = new ConnectionStrategyEnum(Value.RENREN, "renren"); - - public static final ConnectionStrategyEnum SAMLP = new ConnectionStrategyEnum(Value.SAMLP, "samlp"); - - public static final ConnectionStrategyEnum DROPBOX = new ConnectionStrategyEnum(Value.DROPBOX, "dropbox"); - - public static final ConnectionStrategyEnum VKONTAKTE = new ConnectionStrategyEnum(Value.VKONTAKTE, "vkontakte"); - - public static final ConnectionStrategyEnum AUTH0ADLDAP = - new ConnectionStrategyEnum(Value.AUTH0ADLDAP, "auth0-adldap"); - - public static final ConnectionStrategyEnum PINGFEDERATE = - new ConnectionStrategyEnum(Value.PINGFEDERATE, "pingfederate"); - - public static final ConnectionStrategyEnum INSTAGRAM = new ConnectionStrategyEnum(Value.INSTAGRAM, "instagram"); - - public static final ConnectionStrategyEnum THIRTYSEVENSIGNALS = - new ConnectionStrategyEnum(Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); - - public static final ConnectionStrategyEnum WAAD = new ConnectionStrategyEnum(Value.WAAD, "waad"); - - public static final ConnectionStrategyEnum THECITY_SANDBOX = - new ConnectionStrategyEnum(Value.THECITY_SANDBOX, "thecity-sandbox"); - - public static final ConnectionStrategyEnum OIDC = new ConnectionStrategyEnum(Value.OIDC, "oidc"); - - public static final ConnectionStrategyEnum YAMMER = new ConnectionStrategyEnum(Value.YAMMER, "yammer"); - - public static final ConnectionStrategyEnum EVERNOTE_SANDBOX = - new ConnectionStrategyEnum(Value.EVERNOTE_SANDBOX, "evernote-sandbox"); - - public static final ConnectionStrategyEnum SALESFORCE_COMMUNITY = - new ConnectionStrategyEnum(Value.SALESFORCE_COMMUNITY, "salesforce-community"); - - public static final ConnectionStrategyEnum DACCOUNT = new ConnectionStrategyEnum(Value.DACCOUNT, "daccount"); - - public static final ConnectionStrategyEnum SOUNDCLOUD = new ConnectionStrategyEnum(Value.SOUNDCLOUD, "soundcloud"); - - public static final ConnectionStrategyEnum OAUTH2 = new ConnectionStrategyEnum(Value.OAUTH2, "oauth2"); - - public static final ConnectionStrategyEnum BOX = new ConnectionStrategyEnum(Value.BOX, "box"); - - public static final ConnectionStrategyEnum IP = new ConnectionStrategyEnum(Value.IP, "ip"); - - public static final ConnectionStrategyEnum ADFS = new ConnectionStrategyEnum(Value.ADFS, "adfs"); - - public static final ConnectionStrategyEnum EMAIL = new ConnectionStrategyEnum(Value.EMAIL, "email"); - - public static final ConnectionStrategyEnum CUSTOM = new ConnectionStrategyEnum(Value.CUSTOM, "custom"); - - public static final ConnectionStrategyEnum YAHOO = new ConnectionStrategyEnum(Value.YAHOO, "yahoo"); - - public static final ConnectionStrategyEnum WEIBO = new ConnectionStrategyEnum(Value.WEIBO, "weibo"); - - public static final ConnectionStrategyEnum GOOGLE_APPS = - new ConnectionStrategyEnum(Value.GOOGLE_APPS, "google-apps"); - - public static final ConnectionStrategyEnum PAYPAL = new ConnectionStrategyEnum(Value.PAYPAL, "paypal"); - - public static final ConnectionStrategyEnum LINKEDIN = new ConnectionStrategyEnum(Value.LINKEDIN, "linkedin"); - - public static final ConnectionStrategyEnum THECITY = new ConnectionStrategyEnum(Value.THECITY, "thecity"); - - private final Value value; - - private final String string; - - ConnectionStrategyEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionStrategyEnum - && this.string.equals(((ConnectionStrategyEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SHOP: - return visitor.visitShop(); - case AUTH0OIDC: - return visitor.visitAuth0Oidc(); - case DWOLLA: - return visitor.visitDwolla(); - case FLICKR: - return visitor.visitFlickr(); - case OKTA: - return visitor.visitOkta(); - case PLANNINGCENTER: - return visitor.visitPlanningcenter(); - case GOOGLE_OAUTH2: - return visitor.visitGoogleOauth2(); - case AUTH0: - return visitor.visitAuth0(); - case EXACT: - return visitor.visitExact(); - case WORDPRESS: - return visitor.visitWordpress(); - case FITBIT: - return visitor.visitFitbit(); - case EVERNOTE: - return visitor.visitEvernote(); - case SHAREPOINT: - return visitor.visitSharepoint(); - case SHOPIFY: - return visitor.visitShopify(); - case SALESFORCE_SANDBOX: - return visitor.visitSalesforceSandbox(); - case MIICARD: - return visitor.visitMiicard(); - case FACEBOOK: - return visitor.visitFacebook(); - case OAUTH1: - return visitor.visitOauth1(); - case APPLE: - return visitor.visitApple(); - case UNTAPPD: - return visitor.visitUntappd(); - case AMAZON: - return visitor.visitAmazon(); - case LINE: - return visitor.visitLine(); - case BITBUCKET: - return visitor.visitBitbucket(); - case GITHUB: - return visitor.visitGithub(); - case SALESFORCE: - return visitor.visitSalesforce(); - case OFFICE365: - return visitor.visitOffice365(); - case SMS: - return visitor.visitSms(); - case AOL: - return visitor.visitAol(); - case TWITTER: - return visitor.visitTwitter(); - case WINDOWSLIVE: - return visitor.visitWindowslive(); - case YANDEX: - return visitor.visitYandex(); - case AD: - return visitor.visitAd(); - case BAIDU: - return visitor.visitBaidu(); - case BITLY: - return visitor.visitBitly(); - case PAYPAL_SANDBOX: - return visitor.visitPaypalSandbox(); - case RENREN: - return visitor.visitRenren(); - case SAMLP: - return visitor.visitSamlp(); - case DROPBOX: - return visitor.visitDropbox(); - case VKONTAKTE: - return visitor.visitVkontakte(); - case AUTH0ADLDAP: - return visitor.visitAuth0Adldap(); - case PINGFEDERATE: - return visitor.visitPingfederate(); - case INSTAGRAM: - return visitor.visitInstagram(); - case THIRTYSEVENSIGNALS: - return visitor.visitThirtysevensignals(); - case WAAD: - return visitor.visitWaad(); - case THECITY_SANDBOX: - return visitor.visitThecitySandbox(); - case OIDC: - return visitor.visitOidc(); - case YAMMER: - return visitor.visitYammer(); - case EVERNOTE_SANDBOX: - return visitor.visitEvernoteSandbox(); - case SALESFORCE_COMMUNITY: - return visitor.visitSalesforceCommunity(); - case DACCOUNT: - return visitor.visitDaccount(); - case SOUNDCLOUD: - return visitor.visitSoundcloud(); - case OAUTH2: - return visitor.visitOauth2(); - case BOX: - return visitor.visitBox(); - case IP: - return visitor.visitIp(); - case ADFS: - return visitor.visitAdfs(); - case EMAIL: - return visitor.visitEmail(); - case CUSTOM: - return visitor.visitCustom(); - case YAHOO: - return visitor.visitYahoo(); - case WEIBO: - return visitor.visitWeibo(); - case GOOGLE_APPS: - return visitor.visitGoogleApps(); - case PAYPAL: - return visitor.visitPaypal(); - case LINKEDIN: - return visitor.visitLinkedin(); - case THECITY: - return visitor.visitThecity(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionStrategyEnum valueOf(String value) { - switch (value) { - case "shop": - return SHOP; - case "auth0-oidc": - return AUTH0OIDC; - case "dwolla": - return DWOLLA; - case "flickr": - return FLICKR; - case "okta": - return OKTA; - case "planningcenter": - return PLANNINGCENTER; - case "google-oauth2": - return GOOGLE_OAUTH2; - case "auth0": - return AUTH0; - case "exact": - return EXACT; - case "wordpress": - return WORDPRESS; - case "fitbit": - return FITBIT; - case "evernote": - return EVERNOTE; - case "sharepoint": - return SHAREPOINT; - case "shopify": - return SHOPIFY; - case "salesforce-sandbox": - return SALESFORCE_SANDBOX; - case "miicard": - return MIICARD; - case "facebook": - return FACEBOOK; - case "oauth1": - return OAUTH1; - case "apple": - return APPLE; - case "untappd": - return UNTAPPD; - case "amazon": - return AMAZON; - case "line": - return LINE; - case "bitbucket": - return BITBUCKET; - case "github": - return GITHUB; - case "salesforce": - return SALESFORCE; - case "office365": - return OFFICE365; - case "sms": - return SMS; - case "aol": - return AOL; - case "twitter": - return TWITTER; - case "windowslive": - return WINDOWSLIVE; - case "yandex": - return YANDEX; - case "ad": - return AD; - case "baidu": - return BAIDU; - case "bitly": - return BITLY; - case "paypal-sandbox": - return PAYPAL_SANDBOX; - case "renren": - return RENREN; - case "samlp": - return SAMLP; - case "dropbox": - return DROPBOX; - case "vkontakte": - return VKONTAKTE; - case "auth0-adldap": - return AUTH0ADLDAP; - case "pingfederate": - return PINGFEDERATE; - case "instagram": - return INSTAGRAM; - case "thirtysevensignals": - return THIRTYSEVENSIGNALS; - case "waad": - return WAAD; - case "thecity-sandbox": - return THECITY_SANDBOX; - case "oidc": - return OIDC; - case "yammer": - return YAMMER; - case "evernote-sandbox": - return EVERNOTE_SANDBOX; - case "salesforce-community": - return SALESFORCE_COMMUNITY; - case "daccount": - return DACCOUNT; - case "soundcloud": - return SOUNDCLOUD; - case "oauth2": - return OAUTH2; - case "box": - return BOX; - case "ip": - return IP; - case "adfs": - return ADFS; - case "email": - return EMAIL; - case "custom": - return CUSTOM; - case "yahoo": - return YAHOO; - case "weibo": - return WEIBO; - case "google-apps": - return GOOGLE_APPS; - case "paypal": - return PAYPAL; - case "linkedin": - return LINKEDIN; - case "thecity": - return THECITY; - default: - return new ConnectionStrategyEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AD, - - ADFS, - - AMAZON, - - APPLE, - - DROPBOX, - - BITBUCKET, - - AOL, - - AUTH0OIDC, - - AUTH0, - - BAIDU, - - BITLY, - - BOX, - - CUSTOM, - - DACCOUNT, - - DWOLLA, - - EMAIL, - - EVERNOTE_SANDBOX, - - EVERNOTE, - - EXACT, - - FACEBOOK, - - FITBIT, - - FLICKR, - - GITHUB, - - GOOGLE_APPS, - - GOOGLE_OAUTH2, - - INSTAGRAM, - - IP, - - LINE, - - LINKEDIN, - - MIICARD, - - OAUTH1, - - OAUTH2, - - OFFICE365, - - OIDC, - - OKTA, - - PAYPAL, - - PAYPAL_SANDBOX, - - PINGFEDERATE, - - PLANNINGCENTER, - - RENREN, - - SALESFORCE_COMMUNITY, - - SALESFORCE_SANDBOX, - - SALESFORCE, - - SAMLP, - - SHAREPOINT, - - SHOPIFY, - - SHOP, - - SMS, - - SOUNDCLOUD, - - THECITY_SANDBOX, - - THECITY, - - THIRTYSEVENSIGNALS, - - TWITTER, - - UNTAPPD, - - VKONTAKTE, - - WAAD, - - WEIBO, - - WINDOWSLIVE, - - WORDPRESS, - - YAHOO, - - YAMMER, - - YANDEX, - - AUTH0ADLDAP, - - UNKNOWN - } - - public interface Visitor { - T visitAd(); - - T visitAdfs(); - - T visitAmazon(); - - T visitApple(); - - T visitDropbox(); - - T visitBitbucket(); - - T visitAol(); - - T visitAuth0Oidc(); - - T visitAuth0(); - - T visitBaidu(); - - T visitBitly(); - - T visitBox(); - - T visitCustom(); - - T visitDaccount(); - - T visitDwolla(); - - T visitEmail(); - - T visitEvernoteSandbox(); - - T visitEvernote(); - - T visitExact(); - - T visitFacebook(); - - T visitFitbit(); - - T visitFlickr(); - - T visitGithub(); - - T visitGoogleApps(); - - T visitGoogleOauth2(); - - T visitInstagram(); - - T visitIp(); - - T visitLine(); - - T visitLinkedin(); - - T visitMiicard(); - - T visitOauth1(); - - T visitOauth2(); - - T visitOffice365(); - - T visitOidc(); - - T visitOkta(); - - T visitPaypal(); - - T visitPaypalSandbox(); - - T visitPingfederate(); - - T visitPlanningcenter(); - - T visitRenren(); - - T visitSalesforceCommunity(); - - T visitSalesforceSandbox(); - - T visitSalesforce(); - - T visitSamlp(); - - T visitSharepoint(); - - T visitShopify(); - - T visitShop(); - - T visitSms(); - - T visitSoundcloud(); - - T visitThecitySandbox(); - - T visitThecity(); - - T visitThirtysevensignals(); - - T visitTwitter(); - - T visitUntappd(); - - T visitVkontakte(); - - T visitWaad(); - - T visitWeibo(); - - T visitWindowslive(); - - T visitWordpress(); - - T visitYahoo(); - - T visitYammer(); - - T visitYandex(); - - T visitAuth0Adldap(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionTemplateSyntaxEnumSms.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionTemplateSyntaxEnumSms.java deleted file mode 100644 index c466ff653..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionTemplateSyntaxEnumSms.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionTemplateSyntaxEnumSms { - public static final ConnectionTemplateSyntaxEnumSms MD_WITH_MACROS = - new ConnectionTemplateSyntaxEnumSms(Value.MD_WITH_MACROS, "md_with_macros"); - - public static final ConnectionTemplateSyntaxEnumSms LIQUID = - new ConnectionTemplateSyntaxEnumSms(Value.LIQUID, "liquid"); - - private final Value value; - - private final String string; - - ConnectionTemplateSyntaxEnumSms(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionTemplateSyntaxEnumSms - && this.string.equals(((ConnectionTemplateSyntaxEnumSms) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MD_WITH_MACROS: - return visitor.visitMdWithMacros(); - case LIQUID: - return visitor.visitLiquid(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionTemplateSyntaxEnumSms valueOf(String value) { - switch (value) { - case "md_with_macros": - return MD_WITH_MACROS; - case "liquid": - return LIQUID; - default: - return new ConnectionTemplateSyntaxEnumSms(Value.UNKNOWN, value); - } - } - - public enum Value { - LIQUID, - - MD_WITH_MACROS, - - UNKNOWN - } - - public interface Visitor { - T visitLiquid(); - - T visitMdWithMacros(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionTokenEndpointAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionTokenEndpointAuthMethodEnum.java deleted file mode 100644 index 4a9b37b16..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionTokenEndpointAuthMethodEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionTokenEndpointAuthMethodEnum { - public static final ConnectionTokenEndpointAuthMethodEnum PRIVATE_KEY_JWT = - new ConnectionTokenEndpointAuthMethodEnum(Value.PRIVATE_KEY_JWT, "private_key_jwt"); - - public static final ConnectionTokenEndpointAuthMethodEnum CLIENT_SECRET_POST = - new ConnectionTokenEndpointAuthMethodEnum(Value.CLIENT_SECRET_POST, "client_secret_post"); - - private final Value value; - - private final String string; - - ConnectionTokenEndpointAuthMethodEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionTokenEndpointAuthMethodEnum - && this.string.equals(((ConnectionTokenEndpointAuthMethodEnum) 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 ConnectionTokenEndpointAuthMethodEnum valueOf(String value) { - switch (value) { - case "private_key_jwt": - return PRIVATE_KEY_JWT; - case "client_secret_post": - return CLIENT_SECRET_POST; - default: - return new ConnectionTokenEndpointAuthMethodEnum(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/ConnectionTokenEndpointAuthSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionTokenEndpointAuthSigningAlgEnum.java deleted file mode 100644 index eb8565203..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionTokenEndpointAuthSigningAlgEnum.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionTokenEndpointAuthSigningAlgEnum { - public static final ConnectionTokenEndpointAuthSigningAlgEnum RS512 = - new ConnectionTokenEndpointAuthSigningAlgEnum(Value.RS512, "RS512"); - - public static final ConnectionTokenEndpointAuthSigningAlgEnum ES256 = - new ConnectionTokenEndpointAuthSigningAlgEnum(Value.ES256, "ES256"); - - public static final ConnectionTokenEndpointAuthSigningAlgEnum PS256 = - new ConnectionTokenEndpointAuthSigningAlgEnum(Value.PS256, "PS256"); - - public static final ConnectionTokenEndpointAuthSigningAlgEnum RS256 = - new ConnectionTokenEndpointAuthSigningAlgEnum(Value.RS256, "RS256"); - - private final Value value; - - private final String string; - - ConnectionTokenEndpointAuthSigningAlgEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionTokenEndpointAuthSigningAlgEnum - && this.string.equals(((ConnectionTokenEndpointAuthSigningAlgEnum) 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 ES256: - return visitor.visitEs256(); - case PS256: - return visitor.visitPs256(); - case RS256: - return visitor.visitRs256(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionTokenEndpointAuthSigningAlgEnum valueOf(String value) { - switch (value) { - case "RS512": - return RS512; - case "ES256": - return ES256; - case "PS256": - return PS256; - case "RS256": - return RS256; - default: - return new ConnectionTokenEndpointAuthSigningAlgEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - ES256, - - PS256, - - RS256, - - RS512, - - UNKNOWN - } - - public interface Visitor { - T visitEs256(); - - T visitPs256(); - - T visitRs256(); - - T visitRs512(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionTotpEmail.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionTotpEmail.java deleted file mode 100644 index 5e6f892c7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionTotpEmail.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionTotpEmail.Builder.class) -public final class ConnectionTotpEmail { - private final Optional length; - - private final Optional timeStep; - - private final Map additionalProperties; - - private ConnectionTotpEmail( - Optional length, Optional timeStep, Map additionalProperties) { - this.length = length; - this.timeStep = timeStep; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("length") - public Optional getLength() { - return length; - } - - @JsonProperty("time_step") - public Optional getTimeStep() { - return timeStep; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionTotpEmail && equalTo((ConnectionTotpEmail) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionTotpEmail other) { - return length.equals(other.length) && timeStep.equals(other.timeStep); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.length, this.timeStep); - } - - @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 length = Optional.empty(); - - private Optional timeStep = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionTotpEmail other) { - length(other.getLength()); - timeStep(other.getTimeStep()); - return this; - } - - @JsonSetter(value = "length", nulls = Nulls.SKIP) - public Builder length(Optional length) { - this.length = length; - return this; - } - - public Builder length(Integer length) { - this.length = Optional.ofNullable(length); - return this; - } - - @JsonSetter(value = "time_step", nulls = Nulls.SKIP) - public Builder timeStep(Optional timeStep) { - this.timeStep = timeStep; - return this; - } - - public Builder timeStep(Integer timeStep) { - this.timeStep = Optional.ofNullable(timeStep); - return this; - } - - public ConnectionTotpEmail build() { - return new ConnectionTotpEmail(length, timeStep, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionTotpSms.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionTotpSms.java deleted file mode 100644 index f036250df..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionTotpSms.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionTotpSms.Builder.class) -public final class ConnectionTotpSms { - private final Optional length; - - private final Optional timeStep; - - private final Map additionalProperties; - - private ConnectionTotpSms( - Optional length, Optional timeStep, Map additionalProperties) { - this.length = length; - this.timeStep = timeStep; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("length") - public Optional getLength() { - return length; - } - - @JsonProperty("time_step") - public Optional getTimeStep() { - return timeStep; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionTotpSms && equalTo((ConnectionTotpSms) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionTotpSms other) { - return length.equals(other.length) && timeStep.equals(other.timeStep); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.length, this.timeStep); - } - - @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 length = Optional.empty(); - - private Optional timeStep = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionTotpSms other) { - length(other.getLength()); - timeStep(other.getTimeStep()); - return this; - } - - @JsonSetter(value = "length", nulls = Nulls.SKIP) - public Builder length(Optional length) { - this.length = length; - return this; - } - - public Builder length(Integer length) { - this.length = Optional.ofNullable(length); - return this; - } - - @JsonSetter(value = "time_step", nulls = Nulls.SKIP) - public Builder timeStep(Optional timeStep) { - this.timeStep = timeStep; - return this; - } - - public Builder timeStep(Integer timeStep) { - this.timeStep = Optional.ofNullable(timeStep); - return this; - } - - public ConnectionTotpSms build() { - return new ConnectionTotpSms(length, timeStep, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionTypeEnumOidc.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionTypeEnumOidc.java deleted file mode 100644 index 0c2352588..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionTypeEnumOidc.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionTypeEnumOidc { - public static final ConnectionTypeEnumOidc FRONT_CHANNEL = - new ConnectionTypeEnumOidc(Value.FRONT_CHANNEL, "front_channel"); - - public static final ConnectionTypeEnumOidc BACK_CHANNEL = - new ConnectionTypeEnumOidc(Value.BACK_CHANNEL, "back_channel"); - - private final Value value; - - private final String string; - - ConnectionTypeEnumOidc(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionTypeEnumOidc - && this.string.equals(((ConnectionTypeEnumOidc) 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 ConnectionTypeEnumOidc valueOf(String value) { - switch (value) { - case "front_channel": - return FRONT_CHANNEL; - case "back_channel": - return BACK_CHANNEL; - default: - return new ConnectionTypeEnumOidc(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/ConnectionTypeEnumOkta.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionTypeEnumOkta.java deleted file mode 100644 index 2d3507b6c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionTypeEnumOkta.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionTypeEnumOkta { - public static final ConnectionTypeEnumOkta BACK_CHANNEL = - new ConnectionTypeEnumOkta(Value.BACK_CHANNEL, "back_channel"); - - private final Value value; - - private final String string; - - ConnectionTypeEnumOkta(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionTypeEnumOkta - && this.string.equals(((ConnectionTypeEnumOkta) 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 ConnectionTypeEnumOkta valueOf(String value) { - switch (value) { - case "back_channel": - return BACK_CHANNEL; - default: - return new ConnectionTypeEnumOkta(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/ConnectionUpstreamAdditionalProperties.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionUpstreamAdditionalProperties.java deleted file mode 100644 index 9d239a0fd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionUpstreamAdditionalProperties.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = ConnectionUpstreamAdditionalProperties.Deserializer.class) -public final class ConnectionUpstreamAdditionalProperties { - private final Object value; - - private final int type; - - private ConnectionUpstreamAdditionalProperties(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((ConnectionUpstreamAlias) this.value); - } else if (this.type == 1) { - return visitor.visit((ConnectionUpstreamValue) 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 ConnectionUpstreamAdditionalProperties - && equalTo((ConnectionUpstreamAdditionalProperties) other); - } - - private boolean equalTo(ConnectionUpstreamAdditionalProperties 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 ConnectionUpstreamAdditionalProperties of(ConnectionUpstreamAlias value) { - return new ConnectionUpstreamAdditionalProperties(value, 0); - } - - public static ConnectionUpstreamAdditionalProperties of(ConnectionUpstreamValue value) { - return new ConnectionUpstreamAdditionalProperties(value, 1); - } - - public interface Visitor { - T visit(ConnectionUpstreamAlias value); - - T visit(ConnectionUpstreamValue value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(ConnectionUpstreamAdditionalProperties.class); - } - - @java.lang.Override - public ConnectionUpstreamAdditionalProperties deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, ConnectionUpstreamAlias.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, ConnectionUpstreamValue.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionUpstreamAlias.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionUpstreamAlias.java deleted file mode 100644 index 44bda0cb8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionUpstreamAlias.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionUpstreamAlias.Builder.class) -public final class ConnectionUpstreamAlias { - private final Optional alias; - - private final Map additionalProperties; - - private ConnectionUpstreamAlias( - Optional alias, Map additionalProperties) { - this.alias = alias; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionUpstreamAlias && equalTo((ConnectionUpstreamAlias) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionUpstreamAlias other) { - return alias.equals(other.alias); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.alias); - } - - @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 alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionUpstreamAlias other) { - alias(other.getAlias()); - return this; - } - - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public Builder alias(Optional alias) { - this.alias = alias; - return this; - } - - public Builder alias(ConnectionUpstreamAliasEnum alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - public ConnectionUpstreamAlias build() { - return new ConnectionUpstreamAlias(alias, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionUpstreamAliasEnum.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionUpstreamAliasEnum.java deleted file mode 100644 index 0b0c55d13..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionUpstreamAliasEnum.java +++ /dev/null @@ -1,193 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionUpstreamAliasEnum { - public static final ConnectionUpstreamAliasEnum ACR_VALUES = - new ConnectionUpstreamAliasEnum(Value.ACR_VALUES, "acr_values"); - - public static final ConnectionUpstreamAliasEnum AUDIENCE = - new ConnectionUpstreamAliasEnum(Value.AUDIENCE, "audience"); - - public static final ConnectionUpstreamAliasEnum LOGIN_HINT = - new ConnectionUpstreamAliasEnum(Value.LOGIN_HINT, "login_hint"); - - public static final ConnectionUpstreamAliasEnum RESPONSE_TYPE = - new ConnectionUpstreamAliasEnum(Value.RESPONSE_TYPE, "response_type"); - - public static final ConnectionUpstreamAliasEnum CLIENT_ID = - new ConnectionUpstreamAliasEnum(Value.CLIENT_ID, "client_id"); - - public static final ConnectionUpstreamAliasEnum UI_LOCALES = - new ConnectionUpstreamAliasEnum(Value.UI_LOCALES, "ui_locales"); - - public static final ConnectionUpstreamAliasEnum ID_TOKEN_HINT = - new ConnectionUpstreamAliasEnum(Value.ID_TOKEN_HINT, "id_token_hint"); - - public static final ConnectionUpstreamAliasEnum DISPLAY = new ConnectionUpstreamAliasEnum(Value.DISPLAY, "display"); - - public static final ConnectionUpstreamAliasEnum PROMPT = new ConnectionUpstreamAliasEnum(Value.PROMPT, "prompt"); - - public static final ConnectionUpstreamAliasEnum MAX_AGE = new ConnectionUpstreamAliasEnum(Value.MAX_AGE, "max_age"); - - public static final ConnectionUpstreamAliasEnum RESOURCE = - new ConnectionUpstreamAliasEnum(Value.RESOURCE, "resource"); - - public static final ConnectionUpstreamAliasEnum RESPONSE_MODE = - new ConnectionUpstreamAliasEnum(Value.RESPONSE_MODE, "response_mode"); - - private final Value value; - - private final String string; - - ConnectionUpstreamAliasEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionUpstreamAliasEnum - && this.string.equals(((ConnectionUpstreamAliasEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ACR_VALUES: - return visitor.visitAcrValues(); - case AUDIENCE: - return visitor.visitAudience(); - case LOGIN_HINT: - return visitor.visitLoginHint(); - case RESPONSE_TYPE: - return visitor.visitResponseType(); - case CLIENT_ID: - return visitor.visitClientId(); - case UI_LOCALES: - return visitor.visitUiLocales(); - case ID_TOKEN_HINT: - return visitor.visitIdTokenHint(); - case DISPLAY: - return visitor.visitDisplay(); - case PROMPT: - return visitor.visitPrompt(); - case MAX_AGE: - return visitor.visitMaxAge(); - case RESOURCE: - return visitor.visitResource(); - case RESPONSE_MODE: - return visitor.visitResponseMode(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ConnectionUpstreamAliasEnum valueOf(String value) { - switch (value) { - case "acr_values": - return ACR_VALUES; - case "audience": - return AUDIENCE; - case "login_hint": - return LOGIN_HINT; - case "response_type": - return RESPONSE_TYPE; - case "client_id": - return CLIENT_ID; - case "ui_locales": - return UI_LOCALES; - case "id_token_hint": - return ID_TOKEN_HINT; - case "display": - return DISPLAY; - case "prompt": - return PROMPT; - case "max_age": - return MAX_AGE; - case "resource": - return RESOURCE; - case "response_mode": - return RESPONSE_MODE; - default: - return new ConnectionUpstreamAliasEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - ACR_VALUES, - - AUDIENCE, - - CLIENT_ID, - - DISPLAY, - - ID_TOKEN_HINT, - - LOGIN_HINT, - - MAX_AGE, - - PROMPT, - - RESOURCE, - - RESPONSE_MODE, - - RESPONSE_TYPE, - - UI_LOCALES, - - UNKNOWN - } - - public interface Visitor { - T visitAcrValues(); - - T visitAudience(); - - T visitClientId(); - - T visitDisplay(); - - T visitIdTokenHint(); - - T visitLoginHint(); - - T visitMaxAge(); - - T visitPrompt(); - - T visitResource(); - - T visitResponseMode(); - - T visitResponseType(); - - T visitUiLocales(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionUpstreamValue.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionUpstreamValue.java deleted file mode 100644 index 61954ddb6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionUpstreamValue.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ConnectionUpstreamValue.Builder.class) -public final class ConnectionUpstreamValue { - private final Optional value; - - private final Map additionalProperties; - - private ConnectionUpstreamValue(Optional value, Map additionalProperties) { - this.value = value; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("value") - public Optional getValue() { - return value; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionUpstreamValue && equalTo((ConnectionUpstreamValue) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionUpstreamValue other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @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 value = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionUpstreamValue other) { - value(other.getValue()); - return this; - } - - @JsonSetter(value = "value", nulls = Nulls.SKIP) - public Builder value(Optional value) { - this.value = value; - return this; - } - - public Builder value(String value) { - this.value = Optional.ofNullable(value); - return this; - } - - public ConnectionUpstreamValue build() { - return new ConnectionUpstreamValue(value, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionUseridAttributeEnumAzureAd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionUseridAttributeEnumAzureAd.java deleted file mode 100644 index 6c871a228..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionUseridAttributeEnumAzureAd.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionUseridAttributeEnumAzureAd { - public static final ConnectionUseridAttributeEnumAzureAd SUB = - new ConnectionUseridAttributeEnumAzureAd(Value.SUB, "sub"); - - public static final ConnectionUseridAttributeEnumAzureAd OID = - new ConnectionUseridAttributeEnumAzureAd(Value.OID, "oid"); - - private final Value value; - - private final String string; - - ConnectionUseridAttributeEnumAzureAd(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionUseridAttributeEnumAzureAd - && this.string.equals(((ConnectionUseridAttributeEnumAzureAd) 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 ConnectionUseridAttributeEnumAzureAd valueOf(String value) { - switch (value) { - case "sub": - return SUB; - case "oid": - return OID; - default: - return new ConnectionUseridAttributeEnumAzureAd(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/ConnectionUsernameValidationOptions.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionUsernameValidationOptions.java deleted file mode 100644 index 07586413b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionUsernameValidationOptions.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = ConnectionUsernameValidationOptions.Builder.class) -public final class ConnectionUsernameValidationOptions { - private final int min; - - private final int max; - - private final Map additionalProperties; - - private ConnectionUsernameValidationOptions(int min, int max, Map additionalProperties) { - this.min = min; - this.max = max; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("min") - public int getMin() { - return min; - } - - @JsonProperty("max") - public int getMax() { - return max; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionUsernameValidationOptions - && equalTo((ConnectionUsernameValidationOptions) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionUsernameValidationOptions other) { - return min == other.min && max == other.max; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.min, this.max); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static MinStage builder() { - return new Builder(); - } - - public interface MinStage { - MaxStage min(int min); - - Builder from(ConnectionUsernameValidationOptions other); - } - - public interface MaxStage { - _FinalStage max(int max); - } - - public interface _FinalStage { - ConnectionUsernameValidationOptions build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements MinStage, MaxStage, _FinalStage { - private int min; - - private int max; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ConnectionUsernameValidationOptions other) { - min(other.getMin()); - max(other.getMax()); - return this; - } - - @java.lang.Override - @JsonSetter("min") - public MaxStage min(int min) { - this.min = min; - return this; - } - - @java.lang.Override - @JsonSetter("max") - public _FinalStage max(int max) { - this.max = max; - return this; - } - - @java.lang.Override - public ConnectionUsernameValidationOptions build() { - return new ConnectionUsernameValidationOptions(min, max, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionValidationOptions.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionValidationOptions.java deleted file mode 100644 index e95610f27..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionValidationOptions.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ConnectionValidationOptions.Builder.class) -public final class ConnectionValidationOptions { - private final OptionalNullable username; - - private final Map additionalProperties; - - private ConnectionValidationOptions( - OptionalNullable username, Map additionalProperties) { - this.username = username; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("username") - public OptionalNullable getUsername() { - if (username == null) { - return OptionalNullable.absent(); - } - return username; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("username") - private OptionalNullable _getUsername() { - return username; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ConnectionValidationOptions && equalTo((ConnectionValidationOptions) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ConnectionValidationOptions other) { - return username.equals(other.username); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.username); - } - - @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 username = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ConnectionValidationOptions other) { - username(other.getUsername()); - return this; - } - - @JsonSetter(value = "username", nulls = Nulls.SKIP) - public Builder username(@Nullable OptionalNullable username) { - this.username = username; - return this; - } - - public Builder username(ConnectionUsernameValidationOptions username) { - this.username = OptionalNullable.of(username); - return this; - } - - public Builder username(Optional username) { - if (username.isPresent()) { - this.username = OptionalNullable.of(username.get()); - } else { - this.username = OptionalNullable.absent(); - } - return this; - } - - public Builder username(com.auth0.client.mgmt.core.Nullable username) { - if (username.isNull()) { - this.username = OptionalNullable.ofNull(); - } else if (username.isEmpty()) { - this.username = OptionalNullable.absent(); - } else { - this.username = OptionalNullable.of(username.get()); - } - return this; - } - - public ConnectionValidationOptions build() { - return new ConnectionValidationOptions(username, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ConnectionWaadProtocolEnumAzureAd.java b/src/main/java/com/auth0/client/mgmt/types/ConnectionWaadProtocolEnumAzureAd.java deleted file mode 100644 index e154b74eb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ConnectionWaadProtocolEnumAzureAd.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ConnectionWaadProtocolEnumAzureAd { - public static final ConnectionWaadProtocolEnumAzureAd OPENID_CONNECT = - new ConnectionWaadProtocolEnumAzureAd(Value.OPENID_CONNECT, "openid-connect"); - - public static final ConnectionWaadProtocolEnumAzureAd WS_FEDERATION = - new ConnectionWaadProtocolEnumAzureAd(Value.WS_FEDERATION, "ws-federation"); - - private final Value value; - - private final String string; - - ConnectionWaadProtocolEnumAzureAd(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ConnectionWaadProtocolEnumAzureAd - && this.string.equals(((ConnectionWaadProtocolEnumAzureAd) 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 ConnectionWaadProtocolEnumAzureAd valueOf(String value) { - switch (value) { - case "openid-connect": - return OPENID_CONNECT; - case "ws-federation": - return WS_FEDERATION; - default: - return new ConnectionWaadProtocolEnumAzureAd(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/CreateActionModuleResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateActionModuleResponseContent.java deleted file mode 100644 index 2594ce75d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateActionModuleResponseContent.java +++ /dev/null @@ -1,422 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = CreateActionModuleResponseContent.Builder.class) -public final class CreateActionModuleResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional> secrets; - - private final Optional actionsUsingModuleTotal; - - private final Optional allChangesPublished; - - private final Optional latestVersionNumber; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional latestVersion; - - private final Map additionalProperties; - - private CreateActionModuleResponseContent( - Optional id, - Optional name, - Optional code, - Optional> dependencies, - Optional> secrets, - Optional actionsUsingModuleTotal, - Optional allChangesPublished, - Optional latestVersionNumber, - Optional createdAt, - Optional updatedAt, - Optional latestVersion, - Map additionalProperties) { - this.id = id; - this.name = name; - this.code = code; - this.dependencies = dependencies; - this.secrets = secrets; - this.actionsUsingModuleTotal = actionsUsingModuleTotal; - this.allChangesPublished = allChangesPublished; - this.latestVersionNumber = latestVersionNumber; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.latestVersion = latestVersion; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the module. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the module. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The source code from the module's draft version. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The npm dependencies from the module's draft version. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return The secrets from the module's draft version (names and timestamps only, values never returned). - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - /** - * @return The number of deployed actions using this module. - */ - @JsonProperty("actions_using_module_total") - public Optional getActionsUsingModuleTotal() { - return actionsUsingModuleTotal; - } - - /** - * @return Whether all draft changes have been published as a version. - */ - @JsonProperty("all_changes_published") - public Optional getAllChangesPublished() { - return allChangesPublished; - } - - /** - * @return The version number of the latest published version. Omitted if no versions have been published. - */ - @JsonProperty("latest_version_number") - public Optional getLatestVersionNumber() { - return latestVersionNumber; - } - - /** - * @return Timestamp when the module was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return Timestamp when the module was last updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("latest_version") - public Optional getLatestVersion() { - return latestVersion; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateActionModuleResponseContent && equalTo((CreateActionModuleResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateActionModuleResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && secrets.equals(other.secrets) - && actionsUsingModuleTotal.equals(other.actionsUsingModuleTotal) - && allChangesPublished.equals(other.allChangesPublished) - && latestVersionNumber.equals(other.latestVersionNumber) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && latestVersion.equals(other.latestVersion); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.code, - this.dependencies, - this.secrets, - this.actionsUsingModuleTotal, - this.allChangesPublished, - this.latestVersionNumber, - this.createdAt, - this.updatedAt, - this.latestVersion); - } - - @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 code = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional actionsUsingModuleTotal = Optional.empty(); - - private Optional allChangesPublished = Optional.empty(); - - private Optional latestVersionNumber = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional latestVersion = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateActionModuleResponseContent other) { - id(other.getId()); - name(other.getName()); - code(other.getCode()); - dependencies(other.getDependencies()); - secrets(other.getSecrets()); - actionsUsingModuleTotal(other.getActionsUsingModuleTotal()); - allChangesPublished(other.getAllChangesPublished()); - latestVersionNumber(other.getLatestVersionNumber()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - latestVersion(other.getLatestVersion()); - return this; - } - - /** - *

The unique ID of the module.

- */ - @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 the module.

- */ - @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 source code from the module's draft version.

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

The npm dependencies from the module's draft version.

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

The secrets from the module's draft version (names and timestamps only, values never returned).

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

The number of deployed actions using this module.

- */ - @JsonSetter(value = "actions_using_module_total", nulls = Nulls.SKIP) - public Builder actionsUsingModuleTotal(Optional actionsUsingModuleTotal) { - this.actionsUsingModuleTotal = actionsUsingModuleTotal; - return this; - } - - public Builder actionsUsingModuleTotal(Integer actionsUsingModuleTotal) { - this.actionsUsingModuleTotal = Optional.ofNullable(actionsUsingModuleTotal); - return this; - } - - /** - *

Whether all draft changes have been published as a version.

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

The version number of the latest published version. Omitted if no versions have been published.

- */ - @JsonSetter(value = "latest_version_number", nulls = Nulls.SKIP) - public Builder latestVersionNumber(Optional latestVersionNumber) { - this.latestVersionNumber = latestVersionNumber; - return this; - } - - public Builder latestVersionNumber(Integer latestVersionNumber) { - this.latestVersionNumber = Optional.ofNullable(latestVersionNumber); - return this; - } - - /** - *

Timestamp when the module 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; - } - - /** - *

Timestamp when the module 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; - } - - @JsonSetter(value = "latest_version", nulls = Nulls.SKIP) - public Builder latestVersion(Optional latestVersion) { - this.latestVersion = latestVersion; - return this; - } - - public Builder latestVersion(ActionModuleVersionReference latestVersion) { - this.latestVersion = Optional.ofNullable(latestVersion); - return this; - } - - public CreateActionModuleResponseContent build() { - return new CreateActionModuleResponseContent( - id, - name, - code, - dependencies, - secrets, - actionsUsingModuleTotal, - allChangesPublished, - latestVersionNumber, - createdAt, - updatedAt, - latestVersion, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateActionModuleVersionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateActionModuleVersionResponseContent.java deleted file mode 100644 index 99fb1fd5d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateActionModuleVersionResponseContent.java +++ /dev/null @@ -1,288 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = CreateActionModuleVersionResponseContent.Builder.class) -public final class CreateActionModuleVersionResponseContent { - private final Optional id; - - private final Optional moduleId; - - private final Optional versionNumber; - - private final Optional code; - - private final Optional> secrets; - - private final Optional> dependencies; - - private final Optional createdAt; - - private final Map additionalProperties; - - private CreateActionModuleVersionResponseContent( - Optional id, - Optional moduleId, - Optional versionNumber, - Optional code, - Optional> secrets, - Optional> dependencies, - Optional createdAt, - Map additionalProperties) { - this.id = id; - this.moduleId = moduleId; - this.versionNumber = versionNumber; - this.code = code; - this.secrets = secrets; - this.dependencies = dependencies; - this.createdAt = createdAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID for this version. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The ID of the parent module. - */ - @JsonProperty("module_id") - public Optional getModuleId() { - return moduleId; - } - - /** - * @return The sequential version number. - */ - @JsonProperty("version_number") - public Optional getVersionNumber() { - return versionNumber; - } - - /** - * @return The exact source code that was published with this version. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return Secrets available to this version (name and updated_at only, values never returned). - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - /** - * @return Dependencies locked to this version. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return The timestamp when this version was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateActionModuleVersionResponseContent - && equalTo((CreateActionModuleVersionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateActionModuleVersionResponseContent other) { - return id.equals(other.id) - && moduleId.equals(other.moduleId) - && versionNumber.equals(other.versionNumber) - && code.equals(other.code) - && secrets.equals(other.secrets) - && dependencies.equals(other.dependencies) - && createdAt.equals(other.createdAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.moduleId, this.versionNumber, this.code, this.secrets, this.dependencies, this.createdAt); - } - - @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 moduleId = Optional.empty(); - - private Optional versionNumber = Optional.empty(); - - private Optional code = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateActionModuleVersionResponseContent other) { - id(other.getId()); - moduleId(other.getModuleId()); - versionNumber(other.getVersionNumber()); - code(other.getCode()); - secrets(other.getSecrets()); - dependencies(other.getDependencies()); - createdAt(other.getCreatedAt()); - return this; - } - - /** - *

The unique ID for this version.

- */ - @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 ID of the parent module.

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

The sequential version number.

- */ - @JsonSetter(value = "version_number", nulls = Nulls.SKIP) - public Builder versionNumber(Optional versionNumber) { - this.versionNumber = versionNumber; - return this; - } - - public Builder versionNumber(Integer versionNumber) { - this.versionNumber = Optional.ofNullable(versionNumber); - return this; - } - - /** - *

The exact source code that was published with this version.

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

Secrets available to this version (name and updated_at only, values never returned).

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

Dependencies locked to this version.

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

The timestamp when this version 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; - } - - public CreateActionModuleVersionResponseContent build() { - return new CreateActionModuleVersionResponseContent( - id, moduleId, versionNumber, code, secrets, dependencies, createdAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateActionRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateActionRequestContent.java deleted file mode 100644 index 3a2f144cb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateActionRequestContent.java +++ /dev/null @@ -1,454 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = CreateActionRequestContent.Builder.class) -public final class CreateActionRequestContent { - private final String name; - - private final List supportedTriggers; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional runtime; - - private final Optional> secrets; - - private final Optional> modules; - - private final Optional deploy; - - private final Map additionalProperties; - - private CreateActionRequestContent( - String name, - List supportedTriggers, - Optional code, - Optional> dependencies, - Optional runtime, - Optional> secrets, - Optional> modules, - Optional deploy, - Map additionalProperties) { - this.name = name; - this.supportedTriggers = supportedTriggers; - this.code = code; - this.dependencies = dependencies; - this.runtime = runtime; - this.secrets = secrets; - this.modules = modules; - this.deploy = deploy; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of an action. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return The list of triggers that this action supports. At this time, an action can only target a single trigger at a time. - */ - @JsonProperty("supported_triggers") - public List getSupportedTriggers() { - return supportedTriggers; - } - - /** - * @return The source code of the action. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The list of third party npm modules, and their versions, that this action depends on. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return The Node runtime. For example: node22, defaults to node22 - */ - @JsonProperty("runtime") - public Optional getRuntime() { - return runtime; - } - - /** - * @return The list of secrets that are included in an action or a version of an action. - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - /** - * @return The list of action modules and their versions used by this action. - */ - @JsonProperty("modules") - public Optional> getModules() { - return modules; - } - - /** - * @return True if the action should be deployed after creation. - */ - @JsonProperty("deploy") - public Optional getDeploy() { - return deploy; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateActionRequestContent && equalTo((CreateActionRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateActionRequestContent other) { - return name.equals(other.name) - && supportedTriggers.equals(other.supportedTriggers) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && runtime.equals(other.runtime) - && secrets.equals(other.secrets) - && modules.equals(other.modules) - && deploy.equals(other.deploy); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.supportedTriggers, - this.code, - this.dependencies, - this.runtime, - this.secrets, - this.modules, - this.deploy); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

The name of an action.

- */ - _FinalStage name(@NotNull String name); - - Builder from(CreateActionRequestContent other); - } - - public interface _FinalStage { - CreateActionRequestContent build(); - - /** - *

The list of triggers that this action supports. At this time, an action can only target a single trigger at a time.

- */ - _FinalStage supportedTriggers(List supportedTriggers); - - _FinalStage addSupportedTriggers(ActionTrigger supportedTriggers); - - _FinalStage addAllSupportedTriggers(List supportedTriggers); - - /** - *

The source code of the action.

- */ - _FinalStage code(Optional code); - - _FinalStage code(String code); - - /** - *

The list of third party npm modules, and their versions, that this action depends on.

- */ - _FinalStage dependencies(Optional> dependencies); - - _FinalStage dependencies(List dependencies); - - /** - *

The Node runtime. For example: node22, defaults to node22

- */ - _FinalStage runtime(Optional runtime); - - _FinalStage runtime(String runtime); - - /** - *

The list of secrets that are included in an action or a version of an action.

- */ - _FinalStage secrets(Optional> secrets); - - _FinalStage secrets(List secrets); - - /** - *

The list of action modules and their versions used by this action.

- */ - _FinalStage modules(Optional> modules); - - _FinalStage modules(List modules); - - /** - *

True if the action should be deployed after creation.

- */ - _FinalStage deploy(Optional deploy); - - _FinalStage deploy(Boolean deploy); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; - - private Optional deploy = Optional.empty(); - - private Optional> modules = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional runtime = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional code = Optional.empty(); - - private List supportedTriggers = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateActionRequestContent other) { - name(other.getName()); - supportedTriggers(other.getSupportedTriggers()); - code(other.getCode()); - dependencies(other.getDependencies()); - runtime(other.getRuntime()); - secrets(other.getSecrets()); - modules(other.getModules()); - deploy(other.getDeploy()); - return this; - } - - /** - *

The name of an action.

- *

The name of an action.

- * @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; - } - - /** - *

True if the action should be deployed after creation.

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

True if the action should be deployed after creation.

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

The list of action modules and their versions used by this action.

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

The list of action modules and their versions used by this action.

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

The list of secrets that are included in an action or a version of an action.

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

The list of secrets that are included in an action or a version of an action.

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

The Node runtime. For example: node22, defaults to node22

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

The Node runtime. For example: node22, defaults to node22

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

The list of third party npm modules, and their versions, that this action depends on.

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

The list of third party npm modules, and their versions, that this action depends on.

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

The source code of the action.

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

The source code of the action.

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

The list of triggers that this action supports. At this time, an action can only target a single trigger at a time.

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

The list of triggers that this action supports. At this time, an action can only target a single trigger at a time.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addSupportedTriggers(ActionTrigger supportedTriggers) { - this.supportedTriggers.add(supportedTriggers); - return this; - } - - /** - *

The list of triggers that this action supports. At this time, an action can only target a single trigger at a time.

- */ - @java.lang.Override - @JsonSetter(value = "supported_triggers", nulls = Nulls.SKIP) - public _FinalStage supportedTriggers(List supportedTriggers) { - this.supportedTriggers.clear(); - if (supportedTriggers != null) { - this.supportedTriggers.addAll(supportedTriggers); - } - return this; - } - - @java.lang.Override - public CreateActionRequestContent build() { - return new CreateActionRequestContent( - name, - supportedTriggers, - code, - dependencies, - runtime, - secrets, - modules, - deploy, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateActionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateActionResponseContent.java deleted file mode 100644 index 288a82079..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateActionResponseContent.java +++ /dev/null @@ -1,602 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = CreateActionResponseContent.Builder.class) -public final class CreateActionResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional> supportedTriggers; - - private final Optional allChangesDeployed; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional runtime; - - private final Optional> secrets; - - private final Optional deployedVersion; - - private final Optional installedIntegrationId; - - private final Optional integration; - - private final Optional status; - - private final Optional builtAt; - - private final Optional deploy; - - private final Optional> modules; - - private final Map additionalProperties; - - private CreateActionResponseContent( - Optional id, - Optional name, - Optional> supportedTriggers, - Optional allChangesDeployed, - Optional createdAt, - Optional updatedAt, - Optional code, - Optional> dependencies, - Optional runtime, - Optional> secrets, - Optional deployedVersion, - Optional installedIntegrationId, - Optional integration, - Optional status, - Optional builtAt, - Optional deploy, - Optional> modules, - Map additionalProperties) { - this.id = id; - this.name = name; - this.supportedTriggers = supportedTriggers; - this.allChangesDeployed = allChangesDeployed; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.code = code; - this.dependencies = dependencies; - this.runtime = runtime; - this.secrets = secrets; - this.deployedVersion = deployedVersion; - this.installedIntegrationId = installedIntegrationId; - this.integration = integration; - this.status = status; - this.builtAt = builtAt; - this.deploy = deploy; - this.modules = modules; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the action. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of an action. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The list of triggers that this action supports. At this time, an action can only target a single trigger at a time. - */ - @JsonProperty("supported_triggers") - public Optional> getSupportedTriggers() { - return supportedTriggers; - } - - /** - * @return True if all of an Action's contents have been deployed. - */ - @JsonProperty("all_changes_deployed") - public Optional getAllChangesDeployed() { - return allChangesDeployed; - } - - /** - * @return The time when this action was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when this action was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return The source code of the action. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The list of third party npm modules, and their versions, that this action depends on. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return The Node runtime. For example: node22, defaults to node22 - */ - @JsonProperty("runtime") - public Optional getRuntime() { - return runtime; - } - - /** - * @return The list of secrets that are included in an action or a version of an action. - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - @JsonProperty("deployed_version") - public Optional getDeployedVersion() { - return deployedVersion; - } - - /** - * @return installed_integration_id is the fk reference to the InstalledIntegration entity. - */ - @JsonProperty("installed_integration_id") - public Optional getInstalledIntegrationId() { - return installedIntegrationId; - } - - @JsonProperty("integration") - public Optional getIntegration() { - return integration; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return The time when this action was built successfully. - */ - @JsonProperty("built_at") - public Optional getBuiltAt() { - return builtAt; - } - - /** - * @return True if the action should be deployed after creation. - */ - @JsonProperty("deploy") - public Optional getDeploy() { - return deploy; - } - - /** - * @return The list of action modules and their versions used by this action. - */ - @JsonProperty("modules") - public Optional> getModules() { - return modules; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateActionResponseContent && equalTo((CreateActionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateActionResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && supportedTriggers.equals(other.supportedTriggers) - && allChangesDeployed.equals(other.allChangesDeployed) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && runtime.equals(other.runtime) - && secrets.equals(other.secrets) - && deployedVersion.equals(other.deployedVersion) - && installedIntegrationId.equals(other.installedIntegrationId) - && integration.equals(other.integration) - && status.equals(other.status) - && builtAt.equals(other.builtAt) - && deploy.equals(other.deploy) - && modules.equals(other.modules); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.supportedTriggers, - this.allChangesDeployed, - this.createdAt, - this.updatedAt, - this.code, - this.dependencies, - this.runtime, - this.secrets, - this.deployedVersion, - this.installedIntegrationId, - this.integration, - this.status, - this.builtAt, - this.deploy, - this.modules); - } - - @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> supportedTriggers = Optional.empty(); - - private Optional allChangesDeployed = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional code = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional runtime = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional deployedVersion = Optional.empty(); - - private Optional installedIntegrationId = Optional.empty(); - - private Optional integration = Optional.empty(); - - private Optional status = Optional.empty(); - - private Optional builtAt = Optional.empty(); - - private Optional deploy = Optional.empty(); - - private Optional> modules = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateActionResponseContent other) { - id(other.getId()); - name(other.getName()); - supportedTriggers(other.getSupportedTriggers()); - allChangesDeployed(other.getAllChangesDeployed()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - code(other.getCode()); - dependencies(other.getDependencies()); - runtime(other.getRuntime()); - secrets(other.getSecrets()); - deployedVersion(other.getDeployedVersion()); - installedIntegrationId(other.getInstalledIntegrationId()); - integration(other.getIntegration()); - status(other.getStatus()); - builtAt(other.getBuiltAt()); - deploy(other.getDeploy()); - modules(other.getModules()); - return this; - } - - /** - *

The unique ID of the action.

- */ - @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 an action.

- */ - @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 list of triggers that this action supports. At this time, an action can only target a single trigger at a time.

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

True if all of an Action's contents have been deployed.

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

The time when this action 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 time when this action was 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; - } - - /** - *

The source code of the action.

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

The list of third party npm modules, and their versions, that this action depends on.

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

The Node runtime. For example: node22, defaults to node22

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

The list of secrets that are included in an action or a version of an action.

- */ - @JsonSetter(value = "secrets", nulls = Nulls.SKIP) - public Builder secrets(Optional> secrets) { - this.secrets = secrets; - return this; - } - - public Builder secrets(List secrets) { - this.secrets = Optional.ofNullable(secrets); - return this; - } - - @JsonSetter(value = "deployed_version", nulls = Nulls.SKIP) - public Builder deployedVersion(Optional deployedVersion) { - this.deployedVersion = deployedVersion; - return this; - } - - public Builder deployedVersion(ActionDeployedVersion deployedVersion) { - this.deployedVersion = Optional.ofNullable(deployedVersion); - return this; - } - - /** - *

installed_integration_id is the fk reference to the InstalledIntegration entity.

- */ - @JsonSetter(value = "installed_integration_id", nulls = Nulls.SKIP) - public Builder installedIntegrationId(Optional installedIntegrationId) { - this.installedIntegrationId = installedIntegrationId; - return this; - } - - public Builder installedIntegrationId(String installedIntegrationId) { - this.installedIntegrationId = Optional.ofNullable(installedIntegrationId); - return this; - } - - @JsonSetter(value = "integration", nulls = Nulls.SKIP) - public Builder integration(Optional integration) { - this.integration = integration; - return this; - } - - public Builder integration(Integration integration) { - this.integration = Optional.ofNullable(integration); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(ActionBuildStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - /** - *

The time when this action was built successfully.

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

True if the action should be deployed after creation.

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

The list of action modules and their versions used by this action.

- */ - @JsonSetter(value = "modules", nulls = Nulls.SKIP) - public Builder modules(Optional> modules) { - this.modules = modules; - return this; - } - - public Builder modules(List modules) { - this.modules = Optional.ofNullable(modules); - return this; - } - - public CreateActionResponseContent build() { - return new CreateActionResponseContent( - id, - name, - supportedTriggers, - allChangesDeployed, - createdAt, - updatedAt, - code, - dependencies, - runtime, - secrets, - deployedVersion, - installedIntegrationId, - integration, - status, - builtAt, - deploy, - modules, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateBrandingPhoneProviderResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateBrandingPhoneProviderResponseContent.java deleted file mode 100644 index 8c57882a9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateBrandingPhoneProviderResponseContent.java +++ /dev/null @@ -1,379 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = CreateBrandingPhoneProviderResponseContent.Builder.class) -public final class CreateBrandingPhoneProviderResponseContent { - private final Optional id; - - private final Optional tenant; - - private final PhoneProviderNameEnum name; - - private final Optional channel; - - private final Optional disabled; - - private final Optional configuration; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private CreateBrandingPhoneProviderResponseContent( - Optional id, - Optional tenant, - PhoneProviderNameEnum name, - Optional channel, - Optional disabled, - Optional configuration, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.tenant = tenant; - this.name = name; - this.channel = channel; - this.disabled = disabled; - this.configuration = configuration; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the tenant - */ - @JsonProperty("tenant") - public Optional getTenant() { - return tenant; - } - - @JsonProperty("name") - public PhoneProviderNameEnum getName() { - return name; - } - - @JsonProperty("channel") - public Optional getChannel() { - return channel; - } - - /** - * @return Whether the provider is enabled (false) or disabled (true). - */ - @JsonProperty("disabled") - public Optional getDisabled() { - return disabled; - } - - @JsonProperty("configuration") - public Optional getConfiguration() { - return configuration; - } - - /** - * @return The provider's creation date and time in ISO 8601 format - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The date and time of the last update to the provider in ISO 8601 format - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateBrandingPhoneProviderResponseContent - && equalTo((CreateBrandingPhoneProviderResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateBrandingPhoneProviderResponseContent other) { - return id.equals(other.id) - && tenant.equals(other.tenant) - && name.equals(other.name) - && channel.equals(other.channel) - && disabled.equals(other.disabled) - && configuration.equals(other.configuration) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.tenant, - this.name, - this.channel, - this.disabled, - this.configuration, - this.createdAt, - this.updatedAt); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - _FinalStage name(@NotNull PhoneProviderNameEnum name); - - Builder from(CreateBrandingPhoneProviderResponseContent other); - } - - public interface _FinalStage { - CreateBrandingPhoneProviderResponseContent build(); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - /** - *

The name of the tenant

- */ - _FinalStage tenant(Optional tenant); - - _FinalStage tenant(String tenant); - - _FinalStage channel(Optional channel); - - _FinalStage channel(PhoneProviderChannelEnum channel); - - /** - *

Whether the provider is enabled (false) or disabled (true).

- */ - _FinalStage disabled(Optional disabled); - - _FinalStage disabled(Boolean disabled); - - _FinalStage configuration(Optional configuration); - - _FinalStage configuration(PhoneProviderConfiguration configuration); - - /** - *

The provider's creation date and time in ISO 8601 format

- */ - _FinalStage createdAt(Optional createdAt); - - _FinalStage createdAt(OffsetDateTime createdAt); - - /** - *

The date and time of the last update to the provider in ISO 8601 format

- */ - _FinalStage updatedAt(Optional updatedAt); - - _FinalStage updatedAt(OffsetDateTime updatedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private PhoneProviderNameEnum name; - - private Optional updatedAt = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional configuration = Optional.empty(); - - private Optional disabled = Optional.empty(); - - private Optional channel = Optional.empty(); - - private Optional tenant = Optional.empty(); - - private Optional id = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateBrandingPhoneProviderResponseContent other) { - id(other.getId()); - tenant(other.getTenant()); - name(other.getName()); - channel(other.getChannel()); - disabled(other.getDisabled()); - configuration(other.getConfiguration()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public _FinalStage name(@NotNull PhoneProviderNameEnum name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - /** - *

The date and time of the last update to the provider in ISO 8601 format

- * @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; - } - - /** - *

The date and time of the last update to the provider in ISO 8601 format

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

The provider's creation date and time in ISO 8601 format

- * @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; - } - - /** - *

The provider's creation date and time in ISO 8601 format

- */ - @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 configuration(PhoneProviderConfiguration configuration) { - this.configuration = Optional.ofNullable(configuration); - return this; - } - - @java.lang.Override - @JsonSetter(value = "configuration", nulls = Nulls.SKIP) - public _FinalStage configuration(Optional configuration) { - this.configuration = configuration; - return this; - } - - /** - *

Whether the provider is enabled (false) or disabled (true).

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

Whether the provider is enabled (false) or disabled (true).

- */ - @java.lang.Override - @JsonSetter(value = "disabled", nulls = Nulls.SKIP) - public _FinalStage disabled(Optional disabled) { - this.disabled = disabled; - return this; - } - - @java.lang.Override - public _FinalStage channel(PhoneProviderChannelEnum channel) { - this.channel = Optional.ofNullable(channel); - return this; - } - - @java.lang.Override - @JsonSetter(value = "channel", nulls = Nulls.SKIP) - public _FinalStage channel(Optional channel) { - this.channel = channel; - return this; - } - - /** - *

The name of the tenant

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

The name of the tenant

- */ - @java.lang.Override - @JsonSetter(value = "tenant", nulls = Nulls.SKIP) - public _FinalStage tenant(Optional tenant) { - this.tenant = tenant; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public CreateBrandingPhoneProviderResponseContent build() { - return new CreateBrandingPhoneProviderResponseContent( - id, tenant, name, channel, disabled, configuration, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateBrandingThemeResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateBrandingThemeResponseContent.java deleted file mode 100644 index 10eca3e8f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateBrandingThemeResponseContent.java +++ /dev/null @@ -1,287 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateBrandingThemeResponseContent.Builder.class) -public final class CreateBrandingThemeResponseContent { - private final BrandingThemeBorders borders; - - private final BrandingThemeColors colors; - - private final String displayName; - - private final BrandingThemeFonts fonts; - - private final BrandingThemePageBackground pageBackground; - - private final String themeId; - - private final BrandingThemeWidget widget; - - private final Map additionalProperties; - - private CreateBrandingThemeResponseContent( - BrandingThemeBorders borders, - BrandingThemeColors colors, - String displayName, - BrandingThemeFonts fonts, - BrandingThemePageBackground pageBackground, - String themeId, - BrandingThemeWidget widget, - Map additionalProperties) { - this.borders = borders; - this.colors = colors; - this.displayName = displayName; - this.fonts = fonts; - this.pageBackground = pageBackground; - this.themeId = themeId; - this.widget = widget; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("borders") - public BrandingThemeBorders getBorders() { - return borders; - } - - @JsonProperty("colors") - public BrandingThemeColors getColors() { - return colors; - } - - /** - * @return Display Name - */ - @JsonProperty("displayName") - public String getDisplayName() { - return displayName; - } - - @JsonProperty("fonts") - public BrandingThemeFonts getFonts() { - return fonts; - } - - @JsonProperty("page_background") - public BrandingThemePageBackground getPageBackground() { - return pageBackground; - } - - /** - * @return Theme Id - */ - @JsonProperty("themeId") - public String getThemeId() { - return themeId; - } - - @JsonProperty("widget") - public BrandingThemeWidget getWidget() { - return widget; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateBrandingThemeResponseContent - && equalTo((CreateBrandingThemeResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateBrandingThemeResponseContent other) { - return borders.equals(other.borders) - && colors.equals(other.colors) - && displayName.equals(other.displayName) - && fonts.equals(other.fonts) - && pageBackground.equals(other.pageBackground) - && themeId.equals(other.themeId) - && widget.equals(other.widget); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.borders, - this.colors, - this.displayName, - this.fonts, - this.pageBackground, - this.themeId, - this.widget); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BordersStage builder() { - return new Builder(); - } - - public interface BordersStage { - ColorsStage borders(@NotNull BrandingThemeBorders borders); - - Builder from(CreateBrandingThemeResponseContent other); - } - - public interface ColorsStage { - DisplayNameStage colors(@NotNull BrandingThemeColors colors); - } - - public interface DisplayNameStage { - /** - *

Display Name

- */ - FontsStage displayName(@NotNull String displayName); - } - - public interface FontsStage { - PageBackgroundStage fonts(@NotNull BrandingThemeFonts fonts); - } - - public interface PageBackgroundStage { - ThemeIdStage pageBackground(@NotNull BrandingThemePageBackground pageBackground); - } - - public interface ThemeIdStage { - /** - *

Theme Id

- */ - WidgetStage themeId(@NotNull String themeId); - } - - public interface WidgetStage { - _FinalStage widget(@NotNull BrandingThemeWidget widget); - } - - public interface _FinalStage { - CreateBrandingThemeResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements BordersStage, - ColorsStage, - DisplayNameStage, - FontsStage, - PageBackgroundStage, - ThemeIdStage, - WidgetStage, - _FinalStage { - private BrandingThemeBorders borders; - - private BrandingThemeColors colors; - - private String displayName; - - private BrandingThemeFonts fonts; - - private BrandingThemePageBackground pageBackground; - - private String themeId; - - private BrandingThemeWidget widget; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateBrandingThemeResponseContent other) { - borders(other.getBorders()); - colors(other.getColors()); - displayName(other.getDisplayName()); - fonts(other.getFonts()); - pageBackground(other.getPageBackground()); - themeId(other.getThemeId()); - widget(other.getWidget()); - return this; - } - - @java.lang.Override - @JsonSetter("borders") - public ColorsStage borders(@NotNull BrandingThemeBorders borders) { - this.borders = Objects.requireNonNull(borders, "borders must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("colors") - public DisplayNameStage colors(@NotNull BrandingThemeColors colors) { - this.colors = Objects.requireNonNull(colors, "colors must not be null"); - return this; - } - - /** - *

Display Name

- *

Display Name

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("displayName") - public FontsStage displayName(@NotNull String displayName) { - this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("fonts") - public PageBackgroundStage fonts(@NotNull BrandingThemeFonts fonts) { - this.fonts = Objects.requireNonNull(fonts, "fonts must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("page_background") - public ThemeIdStage pageBackground(@NotNull BrandingThemePageBackground pageBackground) { - this.pageBackground = Objects.requireNonNull(pageBackground, "pageBackground must not be null"); - return this; - } - - /** - *

Theme Id

- *

Theme Id

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("themeId") - public WidgetStage themeId(@NotNull String themeId) { - this.themeId = Objects.requireNonNull(themeId, "themeId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("widget") - public _FinalStage widget(@NotNull BrandingThemeWidget widget) { - this.widget = Objects.requireNonNull(widget, "widget must not be null"); - return this; - } - - @java.lang.Override - public CreateBrandingThemeResponseContent build() { - return new CreateBrandingThemeResponseContent( - borders, colors, displayName, fonts, pageBackground, themeId, widget, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateClientAuthenticationMethodSelfSignedTlsClientAuth.java b/src/main/java/com/auth0/client/mgmt/types/CreateClientAuthenticationMethodSelfSignedTlsClientAuth.java deleted file mode 100644 index a3df1c27b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateClientAuthenticationMethodSelfSignedTlsClientAuth.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = CreateClientAuthenticationMethodSelfSignedTlsClientAuth.Builder.class) -public final class CreateClientAuthenticationMethodSelfSignedTlsClientAuth { - private final List credentials; - - private final Map additionalProperties; - - private CreateClientAuthenticationMethodSelfSignedTlsClientAuth( - List credentials, Map additionalProperties) { - this.credentials = credentials; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("credentials") - public List getCredentials() { - return credentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateClientAuthenticationMethodSelfSignedTlsClientAuth - && equalTo((CreateClientAuthenticationMethodSelfSignedTlsClientAuth) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateClientAuthenticationMethodSelfSignedTlsClientAuth other) { - return credentials.equals(other.credentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.credentials); - } - - @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 credentials = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateClientAuthenticationMethodSelfSignedTlsClientAuth other) { - credentials(other.getCredentials()); - return this; - } - - @JsonSetter(value = "credentials", nulls = Nulls.SKIP) - public Builder credentials(List credentials) { - this.credentials.clear(); - if (credentials != null) { - this.credentials.addAll(credentials); - } - return this; - } - - public Builder addCredentials(X509CertificateCredential credentials) { - this.credentials.add(credentials); - return this; - } - - public Builder addAllCredentials(List credentials) { - if (credentials != null) { - this.credentials.addAll(credentials); - } - return this; - } - - public CreateClientAuthenticationMethodSelfSignedTlsClientAuth build() { - return new CreateClientAuthenticationMethodSelfSignedTlsClientAuth(credentials, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantRequestContent.java deleted file mode 100644 index 536a09ebf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantRequestContent.java +++ /dev/null @@ -1,402 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateClientGrantRequestContent.Builder.class) -public final class CreateClientGrantRequestContent { - private final String clientId; - - private final String audience; - - private final Optional organizationUsage; - - private final Optional allowAnyOrganization; - - private final Optional> scope; - - private final Optional subjectType; - - private final Optional> authorizationDetailsTypes; - - private final Optional allowAllScopes; - - private final Map additionalProperties; - - private CreateClientGrantRequestContent( - String clientId, - String audience, - Optional organizationUsage, - Optional allowAnyOrganization, - Optional> scope, - Optional subjectType, - Optional> authorizationDetailsTypes, - Optional allowAllScopes, - Map additionalProperties) { - this.clientId = clientId; - this.audience = audience; - this.organizationUsage = organizationUsage; - this.allowAnyOrganization = allowAnyOrganization; - this.scope = scope; - this.subjectType = subjectType; - this.authorizationDetailsTypes = authorizationDetailsTypes; - this.allowAllScopes = allowAllScopes; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the client. - */ - @JsonProperty("client_id") - public String getClientId() { - return clientId; - } - - /** - * @return The audience (API identifier) of this client grant - */ - @JsonProperty("audience") - public String getAudience() { - return audience; - } - - @JsonProperty("organization_usage") - public Optional getOrganizationUsage() { - return organizationUsage; - } - - /** - * @return If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations. - */ - @JsonProperty("allow_any_organization") - public Optional getAllowAnyOrganization() { - return allowAnyOrganization; - } - - /** - * @return Scopes allowed for this client grant. - */ - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonProperty("subject_type") - public Optional getSubjectType() { - return subjectType; - } - - /** - * @return Types of authorization_details allowed for this client grant. - */ - @JsonProperty("authorization_details_types") - public Optional> getAuthorizationDetailsTypes() { - return authorizationDetailsTypes; - } - - /** - * @return If enabled, all scopes configured on the resource server are allowed for this grant. - */ - @JsonProperty("allow_all_scopes") - public Optional getAllowAllScopes() { - return allowAllScopes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateClientGrantRequestContent && equalTo((CreateClientGrantRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateClientGrantRequestContent other) { - return clientId.equals(other.clientId) - && audience.equals(other.audience) - && organizationUsage.equals(other.organizationUsage) - && allowAnyOrganization.equals(other.allowAnyOrganization) - && scope.equals(other.scope) - && subjectType.equals(other.subjectType) - && authorizationDetailsTypes.equals(other.authorizationDetailsTypes) - && allowAllScopes.equals(other.allowAllScopes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.audience, - this.organizationUsage, - this.allowAnyOrganization, - this.scope, - this.subjectType, - this.authorizationDetailsTypes, - this.allowAllScopes); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ClientIdStage builder() { - return new Builder(); - } - - public interface ClientIdStage { - /** - *

ID of the client.

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

The audience (API identifier) of this client grant

- */ - _FinalStage audience(@NotNull String audience); - } - - public interface _FinalStage { - CreateClientGrantRequestContent build(); - - _FinalStage organizationUsage(Optional organizationUsage); - - _FinalStage organizationUsage(ClientGrantOrganizationUsageEnum organizationUsage); - - /** - *

If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.

- */ - _FinalStage allowAnyOrganization(Optional allowAnyOrganization); - - _FinalStage allowAnyOrganization(Boolean allowAnyOrganization); - - /** - *

Scopes allowed for this client grant.

- */ - _FinalStage scope(Optional> scope); - - _FinalStage scope(List scope); - - _FinalStage subjectType(Optional subjectType); - - _FinalStage subjectType(ClientGrantSubjectTypeEnum subjectType); - - /** - *

Types of authorization_details allowed for this client grant.

- */ - _FinalStage authorizationDetailsTypes(Optional> authorizationDetailsTypes); - - _FinalStage authorizationDetailsTypes(List authorizationDetailsTypes); - - /** - *

If enabled, all scopes configured on the resource server are allowed for this grant.

- */ - _FinalStage allowAllScopes(Optional allowAllScopes); - - _FinalStage allowAllScopes(Boolean allowAllScopes); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ClientIdStage, AudienceStage, _FinalStage { - private String clientId; - - private String audience; - - private Optional allowAllScopes = Optional.empty(); - - private Optional> authorizationDetailsTypes = Optional.empty(); - - private Optional subjectType = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional allowAnyOrganization = Optional.empty(); - - private Optional organizationUsage = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateClientGrantRequestContent other) { - clientId(other.getClientId()); - audience(other.getAudience()); - organizationUsage(other.getOrganizationUsage()); - allowAnyOrganization(other.getAllowAnyOrganization()); - scope(other.getScope()); - subjectType(other.getSubjectType()); - authorizationDetailsTypes(other.getAuthorizationDetailsTypes()); - allowAllScopes(other.getAllowAllScopes()); - return this; - } - - /** - *

ID of the client.

- *

ID of the client.

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

The audience (API identifier) of this client grant

- *

The audience (API identifier) of this client grant

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

If enabled, all scopes configured on the resource server are allowed for this grant.

- * @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; - } - - /** - *

If enabled, all scopes configured on the resource server are allowed for this grant.

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

Types of authorization_details allowed for this client grant.

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

Types of authorization_details allowed for this client grant.

- */ - @java.lang.Override - @JsonSetter(value = "authorization_details_types", nulls = Nulls.SKIP) - public _FinalStage authorizationDetailsTypes(Optional> authorizationDetailsTypes) { - this.authorizationDetailsTypes = authorizationDetailsTypes; - return this; - } - - @java.lang.Override - public _FinalStage subjectType(ClientGrantSubjectTypeEnum subjectType) { - this.subjectType = Optional.ofNullable(subjectType); - return this; - } - - @java.lang.Override - @JsonSetter(value = "subject_type", nulls = Nulls.SKIP) - public _FinalStage subjectType(Optional subjectType) { - this.subjectType = subjectType; - return this; - } - - /** - *

Scopes allowed for this client grant.

- * @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; - } - - /** - *

Scopes allowed for this client grant.

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

If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.

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

If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.

- */ - @java.lang.Override - @JsonSetter(value = "allow_any_organization", nulls = Nulls.SKIP) - public _FinalStage allowAnyOrganization(Optional allowAnyOrganization) { - this.allowAnyOrganization = allowAnyOrganization; - return this; - } - - @java.lang.Override - public _FinalStage organizationUsage(ClientGrantOrganizationUsageEnum organizationUsage) { - this.organizationUsage = Optional.ofNullable(organizationUsage); - return this; - } - - @java.lang.Override - @JsonSetter(value = "organization_usage", nulls = Nulls.SKIP) - public _FinalStage organizationUsage(Optional organizationUsage) { - this.organizationUsage = organizationUsage; - return this; - } - - @java.lang.Override - public CreateClientGrantRequestContent build() { - return new CreateClientGrantRequestContent( - clientId, - audience, - organizationUsage, - allowAnyOrganization, - scope, - subjectType, - authorizationDetailsTypes, - allowAllScopes, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantResponseContent.java deleted file mode 100644 index ff9754892..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateClientGrantResponseContent.java +++ /dev/null @@ -1,383 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateClientGrantResponseContent.Builder.class) -public final class CreateClientGrantResponseContent { - private final Optional id; - - private final Optional clientId; - - private final Optional audience; - - private final Optional> scope; - - private final Optional organizationUsage; - - private final Optional allowAnyOrganization; - - private final Optional isSystem; - - private final Optional subjectType; - - private final Optional> authorizationDetailsTypes; - - private final Optional allowAllScopes; - - private final Map additionalProperties; - - private CreateClientGrantResponseContent( - Optional id, - Optional clientId, - Optional audience, - Optional> scope, - Optional organizationUsage, - Optional allowAnyOrganization, - Optional isSystem, - Optional subjectType, - Optional> authorizationDetailsTypes, - Optional allowAllScopes, - Map additionalProperties) { - this.id = id; - this.clientId = clientId; - this.audience = audience; - this.scope = scope; - this.organizationUsage = organizationUsage; - this.allowAnyOrganization = allowAnyOrganization; - this.isSystem = isSystem; - this.subjectType = subjectType; - this.authorizationDetailsTypes = authorizationDetailsTypes; - this.allowAllScopes = allowAllScopes; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the client grant. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return ID of the client. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @return The audience (API identifier) of this client grant. - */ - @JsonProperty("audience") - public Optional getAudience() { - return audience; - } - - /** - * @return Scopes allowed for this client grant. - */ - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonProperty("organization_usage") - public Optional getOrganizationUsage() { - return organizationUsage; - } - - /** - * @return If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations. - */ - @JsonProperty("allow_any_organization") - public Optional getAllowAnyOrganization() { - return allowAnyOrganization; - } - - /** - * @return If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly. - */ - @JsonProperty("is_system") - public Optional getIsSystem() { - return isSystem; - } - - @JsonProperty("subject_type") - public Optional getSubjectType() { - return subjectType; - } - - /** - * @return Types of authorization_details allowed for this client grant. - */ - @JsonProperty("authorization_details_types") - public Optional> getAuthorizationDetailsTypes() { - return authorizationDetailsTypes; - } - - /** - * @return If enabled, all scopes configured on the resource server are allowed for this grant. - */ - @JsonProperty("allow_all_scopes") - public Optional getAllowAllScopes() { - return allowAllScopes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateClientGrantResponseContent && equalTo((CreateClientGrantResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateClientGrantResponseContent other) { - return id.equals(other.id) - && clientId.equals(other.clientId) - && audience.equals(other.audience) - && scope.equals(other.scope) - && organizationUsage.equals(other.organizationUsage) - && allowAnyOrganization.equals(other.allowAnyOrganization) - && isSystem.equals(other.isSystem) - && subjectType.equals(other.subjectType) - && authorizationDetailsTypes.equals(other.authorizationDetailsTypes) - && allowAllScopes.equals(other.allowAllScopes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.clientId, - this.audience, - this.scope, - this.organizationUsage, - this.allowAnyOrganization, - this.isSystem, - this.subjectType, - this.authorizationDetailsTypes, - this.allowAllScopes); - } - - @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 clientId = Optional.empty(); - - private Optional audience = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional organizationUsage = Optional.empty(); - - private Optional allowAnyOrganization = Optional.empty(); - - private Optional isSystem = Optional.empty(); - - private Optional subjectType = Optional.empty(); - - private Optional> authorizationDetailsTypes = Optional.empty(); - - private Optional allowAllScopes = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateClientGrantResponseContent other) { - id(other.getId()); - clientId(other.getClientId()); - audience(other.getAudience()); - scope(other.getScope()); - organizationUsage(other.getOrganizationUsage()); - allowAnyOrganization(other.getAllowAnyOrganization()); - isSystem(other.getIsSystem()); - subjectType(other.getSubjectType()); - authorizationDetailsTypes(other.getAuthorizationDetailsTypes()); - allowAllScopes(other.getAllowAllScopes()); - return this; - } - - /** - *

ID of the client grant.

- */ - @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; - } - - /** - *

ID of the 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 audience (API identifier) of this client grant.

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

Scopes allowed for this client grant.

- */ - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "organization_usage", nulls = Nulls.SKIP) - public Builder organizationUsage(Optional organizationUsage) { - this.organizationUsage = organizationUsage; - return this; - } - - public Builder organizationUsage(ClientGrantOrganizationUsageEnum organizationUsage) { - this.organizationUsage = Optional.ofNullable(organizationUsage); - return this; - } - - /** - *

If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.

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

If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly.

- */ - @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; - } - - @JsonSetter(value = "subject_type", nulls = Nulls.SKIP) - public Builder subjectType(Optional subjectType) { - this.subjectType = subjectType; - return this; - } - - public Builder subjectType(ClientGrantSubjectTypeEnum subjectType) { - this.subjectType = Optional.ofNullable(subjectType); - return this; - } - - /** - *

Types of authorization_details allowed for this client grant.

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

If enabled, all scopes configured on the resource server are allowed for this grant.

- */ - @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; - } - - public CreateClientGrantResponseContent build() { - return new CreateClientGrantResponseContent( - id, - clientId, - audience, - scope, - organizationUsage, - allowAnyOrganization, - isSystem, - subjectType, - authorizationDetailsTypes, - allowAllScopes, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateClientRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateClientRequestContent.java deleted file mode 100644 index 989e3151c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateClientRequestContent.java +++ /dev/null @@ -1,2302 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateClientRequestContent.Builder.class) -public final class CreateClientRequestContent { - private final String name; - - private final Optional description; - - private final Optional logoUri; - - private final Optional> callbacks; - - private final Optional oidcLogout; - - private final Optional oidcBackchannelLogout; - - private final OptionalNullable sessionTransfer; - - private final Optional> allowedOrigins; - - private final Optional> webOrigins; - - private final Optional> clientAliases; - - private final Optional> allowedClients; - - private final Optional> allowedLogoutUrls; - - private final Optional> grantTypes; - - private final Optional tokenEndpointAuthMethod; - - private final Optional isTokenEndpointIpHeaderTrusted; - - private final Optional appType; - - private final Optional isFirstParty; - - private final Optional oidcConformant; - - private final Optional jwtConfiguration; - - private final OptionalNullable encryptionKey; - - private final Optional sso; - - private final Optional crossOriginAuthentication; - - private final Optional crossOriginLoc; - - private final Optional ssoDisabled; - - private final Optional customLoginPageOn; - - private final Optional customLoginPage; - - private final Optional customLoginPagePreview; - - private final Optional formTemplate; - - private final Optional addons; - - private final Optional> clientMetadata; - - private final Optional mobile; - - private final Optional initiateLoginUri; - - private final Optional nativeSocialLogin; - - private final OptionalNullable refreshToken; - - private final OptionalNullable defaultOrganization; - - private final Optional organizationUsage; - - private final Optional organizationRequireBehavior; - - private final Optional> organizationDiscoveryMethods; - - private final Optional clientAuthenticationMethods; - - private final Optional requirePushedAuthorizationRequests; - - private final Optional requireProofOfPossession; - - private final Optional signedRequestObject; - - private final OptionalNullable complianceLevel; - - private final Optional skipNonVerifiableCallbackUriConfirmationPrompt; - - private final Optional tokenExchange; - - private final OptionalNullable parRequestExpiry; - - private final Optional tokenQuota; - - private final Optional resourceServerIdentifier; - - private final Optional expressConfiguration; - - private final Optional> asyncApprovalNotificationChannels; - - private final Map additionalProperties; - - private CreateClientRequestContent( - String name, - Optional description, - Optional logoUri, - Optional> callbacks, - Optional oidcLogout, - Optional oidcBackchannelLogout, - OptionalNullable sessionTransfer, - Optional> allowedOrigins, - Optional> webOrigins, - Optional> clientAliases, - Optional> allowedClients, - Optional> allowedLogoutUrls, - Optional> grantTypes, - Optional tokenEndpointAuthMethod, - Optional isTokenEndpointIpHeaderTrusted, - Optional appType, - Optional isFirstParty, - Optional oidcConformant, - Optional jwtConfiguration, - OptionalNullable encryptionKey, - Optional sso, - Optional crossOriginAuthentication, - Optional crossOriginLoc, - Optional ssoDisabled, - Optional customLoginPageOn, - Optional customLoginPage, - Optional customLoginPagePreview, - Optional formTemplate, - Optional addons, - Optional> clientMetadata, - Optional mobile, - Optional initiateLoginUri, - Optional nativeSocialLogin, - OptionalNullable refreshToken, - OptionalNullable defaultOrganization, - Optional organizationUsage, - Optional organizationRequireBehavior, - Optional> organizationDiscoveryMethods, - Optional clientAuthenticationMethods, - Optional requirePushedAuthorizationRequests, - Optional requireProofOfPossession, - Optional signedRequestObject, - OptionalNullable complianceLevel, - Optional skipNonVerifiableCallbackUriConfirmationPrompt, - Optional tokenExchange, - OptionalNullable parRequestExpiry, - Optional tokenQuota, - Optional resourceServerIdentifier, - Optional expressConfiguration, - Optional> asyncApprovalNotificationChannels, - Map additionalProperties) { - this.name = name; - this.description = description; - this.logoUri = logoUri; - this.callbacks = callbacks; - this.oidcLogout = oidcLogout; - this.oidcBackchannelLogout = oidcBackchannelLogout; - this.sessionTransfer = sessionTransfer; - this.allowedOrigins = allowedOrigins; - this.webOrigins = webOrigins; - this.clientAliases = clientAliases; - this.allowedClients = allowedClients; - this.allowedLogoutUrls = allowedLogoutUrls; - this.grantTypes = grantTypes; - this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; - this.isTokenEndpointIpHeaderTrusted = isTokenEndpointIpHeaderTrusted; - this.appType = appType; - this.isFirstParty = isFirstParty; - this.oidcConformant = oidcConformant; - this.jwtConfiguration = jwtConfiguration; - this.encryptionKey = encryptionKey; - this.sso = sso; - this.crossOriginAuthentication = crossOriginAuthentication; - this.crossOriginLoc = crossOriginLoc; - this.ssoDisabled = ssoDisabled; - this.customLoginPageOn = customLoginPageOn; - this.customLoginPage = customLoginPage; - this.customLoginPagePreview = customLoginPagePreview; - this.formTemplate = formTemplate; - this.addons = addons; - this.clientMetadata = clientMetadata; - this.mobile = mobile; - this.initiateLoginUri = initiateLoginUri; - this.nativeSocialLogin = nativeSocialLogin; - 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.complianceLevel = complianceLevel; - this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; - this.tokenExchange = tokenExchange; - this.parRequestExpiry = parRequestExpiry; - this.tokenQuota = tokenQuota; - this.resourceServerIdentifier = resourceServerIdentifier; - this.expressConfiguration = expressConfiguration; - this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of this client (min length: 1 character, does not allow < or >). - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return Free text description of this client (max length: 140 characters). - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - /** - * @return URL of the logo to display for this client. Recommended size is 150x150 pixels. - */ - @JsonProperty("logo_uri") - public Optional getLogoUri() { - return logoUri; - } - - /** - * @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; - } - - @JsonProperty("oidc_logout") - public Optional getOidcLogout() { - return oidcLogout; - } - - @JsonProperty("oidc_backchannel_logout") - public Optional getOidcBackchannelLogout() { - return oidcBackchannelLogout; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_transfer") - public OptionalNullable getSessionTransfer() { - if (sessionTransfer == null) { - return OptionalNullable.absent(); - } - return sessionTransfer; - } - - /** - * @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 <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>. - */ - @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; - } - - /** - * @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("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("app_type") - public Optional getAppType() { - return appType; - } - - /** - * @return Whether this client a first party client or not - */ - @JsonProperty("is_first_party") - public Optional getIsFirstParty() { - return isFirstParty; - } - - /** - * @return Whether this client conforms to <a href='https://auth0.com/docs/api-auth/tutorials/adoption'>strict OIDC specifications</a> (true) or uses legacy features (false). - */ - @JsonProperty("oidc_conformant") - public Optional getOidcConformant() { - return oidcConformant; - } - - @JsonProperty("jwt_configuration") - public Optional getJwtConfiguration() { - return jwtConfiguration; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("encryption_key") - public OptionalNullable getEncryptionKey() { - if (encryptionKey == null) { - return OptionalNullable.absent(); - } - return encryptionKey; - } - - /** - * @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 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 <code>true</code> to disable Single Sign On, <code>false</code> otherwise (default: <code>false</code>) - */ - @JsonProperty("sso_disabled") - public Optional getSsoDisabled() { - return ssoDisabled; - } - - /** - * @return <code>true</code> if the custom login page is to be used, <code>false</code> otherwise. Defaults to <code>true</code> - */ - @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("addons") - public Optional getAddons() { - return addons; - } - - @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; - } - - @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; - } - - @JsonProperty("client_authentication_methods") - public Optional getClientAuthenticationMethods() { - 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; - } - - @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; - } - - /** - * @return The identifier of the resource server that this client is linked to. - */ - @JsonProperty("resource_server_identifier") - public Optional getResourceServerIdentifier() { - return resourceServerIdentifier; - } - - @JsonProperty("express_configuration") - public Optional getExpressConfiguration() { - return expressConfiguration; - } - - @JsonProperty("async_approval_notification_channels") - public Optional> getAsyncApprovalNotificationChannels() { - return asyncApprovalNotificationChannels; - } - - @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("encryption_key") - private OptionalNullable _getEncryptionKey() { - return encryptionKey; - } - - @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("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 CreateClientRequestContent && equalTo((CreateClientRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateClientRequestContent other) { - return name.equals(other.name) - && description.equals(other.description) - && logoUri.equals(other.logoUri) - && callbacks.equals(other.callbacks) - && oidcLogout.equals(other.oidcLogout) - && oidcBackchannelLogout.equals(other.oidcBackchannelLogout) - && sessionTransfer.equals(other.sessionTransfer) - && allowedOrigins.equals(other.allowedOrigins) - && webOrigins.equals(other.webOrigins) - && clientAliases.equals(other.clientAliases) - && allowedClients.equals(other.allowedClients) - && allowedLogoutUrls.equals(other.allowedLogoutUrls) - && grantTypes.equals(other.grantTypes) - && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) - && isTokenEndpointIpHeaderTrusted.equals(other.isTokenEndpointIpHeaderTrusted) - && appType.equals(other.appType) - && isFirstParty.equals(other.isFirstParty) - && oidcConformant.equals(other.oidcConformant) - && jwtConfiguration.equals(other.jwtConfiguration) - && encryptionKey.equals(other.encryptionKey) - && sso.equals(other.sso) - && crossOriginAuthentication.equals(other.crossOriginAuthentication) - && crossOriginLoc.equals(other.crossOriginLoc) - && ssoDisabled.equals(other.ssoDisabled) - && customLoginPageOn.equals(other.customLoginPageOn) - && customLoginPage.equals(other.customLoginPage) - && customLoginPagePreview.equals(other.customLoginPagePreview) - && formTemplate.equals(other.formTemplate) - && addons.equals(other.addons) - && clientMetadata.equals(other.clientMetadata) - && mobile.equals(other.mobile) - && initiateLoginUri.equals(other.initiateLoginUri) - && nativeSocialLogin.equals(other.nativeSocialLogin) - && 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) - && complianceLevel.equals(other.complianceLevel) - && skipNonVerifiableCallbackUriConfirmationPrompt.equals( - other.skipNonVerifiableCallbackUriConfirmationPrompt) - && tokenExchange.equals(other.tokenExchange) - && parRequestExpiry.equals(other.parRequestExpiry) - && tokenQuota.equals(other.tokenQuota) - && resourceServerIdentifier.equals(other.resourceServerIdentifier) - && expressConfiguration.equals(other.expressConfiguration) - && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.description, - this.logoUri, - this.callbacks, - this.oidcLogout, - this.oidcBackchannelLogout, - this.sessionTransfer, - this.allowedOrigins, - this.webOrigins, - this.clientAliases, - this.allowedClients, - this.allowedLogoutUrls, - this.grantTypes, - this.tokenEndpointAuthMethod, - this.isTokenEndpointIpHeaderTrusted, - this.appType, - this.isFirstParty, - this.oidcConformant, - this.jwtConfiguration, - this.encryptionKey, - this.sso, - this.crossOriginAuthentication, - this.crossOriginLoc, - this.ssoDisabled, - this.customLoginPageOn, - this.customLoginPage, - this.customLoginPagePreview, - this.formTemplate, - this.addons, - this.clientMetadata, - this.mobile, - this.initiateLoginUri, - this.nativeSocialLogin, - this.refreshToken, - this.defaultOrganization, - this.organizationUsage, - this.organizationRequireBehavior, - this.organizationDiscoveryMethods, - this.clientAuthenticationMethods, - this.requirePushedAuthorizationRequests, - this.requireProofOfPossession, - this.signedRequestObject, - this.complianceLevel, - this.skipNonVerifiableCallbackUriConfirmationPrompt, - this.tokenExchange, - this.parRequestExpiry, - this.tokenQuota, - this.resourceServerIdentifier, - this.expressConfiguration, - this.asyncApprovalNotificationChannels); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Name of this client (min length: 1 character, does not allow < or >).

- */ - _FinalStage name(@NotNull String name); - - Builder from(CreateClientRequestContent other); - } - - public interface _FinalStage { - CreateClientRequestContent build(); - - /** - *

Free text description of this client (max length: 140 characters).

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

URL of the logo to display for this client. Recommended size is 150x150 pixels.

- */ - _FinalStage logoUri(Optional logoUri); - - _FinalStage logoUri(String logoUri); - - /** - *

Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication.

- */ - _FinalStage callbacks(Optional> callbacks); - - _FinalStage callbacks(List callbacks); - - _FinalStage oidcLogout(Optional oidcLogout); - - _FinalStage oidcLogout(ClientOidcBackchannelLogoutSettings oidcLogout); - - _FinalStage oidcBackchannelLogout(Optional oidcBackchannelLogout); - - _FinalStage oidcBackchannelLogout(ClientOidcBackchannelLogoutSettings oidcBackchannelLogout); - - _FinalStage sessionTransfer(@Nullable OptionalNullable sessionTransfer); - - _FinalStage sessionTransfer(ClientSessionTransferConfiguration sessionTransfer); - - _FinalStage sessionTransfer(Optional sessionTransfer); - - _FinalStage sessionTransfer( - com.auth0.client.mgmt.core.Nullable sessionTransfer); - - /** - *

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.

- */ - _FinalStage allowedOrigins(Optional> allowedOrigins); - - _FinalStage allowedOrigins(List allowedOrigins); - - /** - *

Comma-separated list of allowed origins for use with <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>.

- */ - _FinalStage webOrigins(Optional> webOrigins); - - _FinalStage webOrigins(List webOrigins); - - /** - *

List of audiences/realms for SAML protocol. Used by the wsfed addon.

- */ - _FinalStage clientAliases(Optional> clientAliases); - - _FinalStage clientAliases(List clientAliases); - - /** - *

List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed.

- */ - _FinalStage allowedClients(Optional> allowedClients); - - _FinalStage allowedClients(List allowedClients); - - /** - *

Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains.

- */ - _FinalStage allowedLogoutUrls(Optional> allowedLogoutUrls); - - _FinalStage allowedLogoutUrls(List allowedLogoutUrls); - - /** - *

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.

- */ - _FinalStage grantTypes(Optional> grantTypes); - - _FinalStage grantTypes(List grantTypes); - - _FinalStage tokenEndpointAuthMethod(Optional tokenEndpointAuthMethod); - - _FinalStage tokenEndpointAuthMethod(ClientTokenEndpointAuthMethodEnum tokenEndpointAuthMethod); - - /** - *

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.

- */ - _FinalStage isTokenEndpointIpHeaderTrusted(Optional isTokenEndpointIpHeaderTrusted); - - _FinalStage isTokenEndpointIpHeaderTrusted(Boolean isTokenEndpointIpHeaderTrusted); - - _FinalStage appType(Optional appType); - - _FinalStage appType(ClientAppTypeEnum appType); - - /** - *

Whether this client a first party client or not

- */ - _FinalStage isFirstParty(Optional isFirstParty); - - _FinalStage isFirstParty(Boolean isFirstParty); - - /** - *

Whether this client conforms to <a href='https://auth0.com/docs/api-auth/tutorials/adoption'>strict OIDC specifications</a> (true) or uses legacy features (false).

- */ - _FinalStage oidcConformant(Optional oidcConformant); - - _FinalStage oidcConformant(Boolean oidcConformant); - - _FinalStage jwtConfiguration(Optional jwtConfiguration); - - _FinalStage jwtConfiguration(ClientJwtConfiguration jwtConfiguration); - - _FinalStage encryptionKey(@Nullable OptionalNullable encryptionKey); - - _FinalStage encryptionKey(ClientEncryptionKey encryptionKey); - - _FinalStage encryptionKey(Optional encryptionKey); - - _FinalStage encryptionKey(com.auth0.client.mgmt.core.Nullable encryptionKey); - - /** - *

Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false).

- */ - _FinalStage sso(Optional sso); - - _FinalStage sso(Boolean sso); - - /** - *

Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false).

- */ - _FinalStage crossOriginAuthentication(Optional crossOriginAuthentication); - - _FinalStage crossOriginAuthentication(Boolean crossOriginAuthentication); - - /** - *

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.

- */ - _FinalStage crossOriginLoc(Optional crossOriginLoc); - - _FinalStage crossOriginLoc(String crossOriginLoc); - - /** - *

<code>true</code> to disable Single Sign On, <code>false</code> otherwise (default: <code>false</code>)

- */ - _FinalStage ssoDisabled(Optional ssoDisabled); - - _FinalStage ssoDisabled(Boolean ssoDisabled); - - /** - *

<code>true</code> if the custom login page is to be used, <code>false</code> otherwise. Defaults to <code>true</code>

- */ - _FinalStage customLoginPageOn(Optional customLoginPageOn); - - _FinalStage customLoginPageOn(Boolean customLoginPageOn); - - /** - *

The content (HTML, CSS, JS) of the custom login page.

- */ - _FinalStage customLoginPage(Optional customLoginPage); - - _FinalStage customLoginPage(String customLoginPage); - - /** - *

The content (HTML, CSS, JS) of the custom login page. (Used on Previews)

- */ - _FinalStage customLoginPagePreview(Optional customLoginPagePreview); - - _FinalStage customLoginPagePreview(String customLoginPagePreview); - - /** - *

HTML form template to be used for WS-Federation.

- */ - _FinalStage formTemplate(Optional formTemplate); - - _FinalStage formTemplate(String formTemplate); - - _FinalStage addons(Optional addons); - - _FinalStage addons(ClientAddons addons); - - _FinalStage clientMetadata(Optional> clientMetadata); - - _FinalStage clientMetadata(Map clientMetadata); - - _FinalStage mobile(Optional mobile); - - _FinalStage mobile(ClientMobile mobile); - - /** - *

Initiate login uri, must be https

- */ - _FinalStage initiateLoginUri(Optional initiateLoginUri); - - _FinalStage initiateLoginUri(String initiateLoginUri); - - _FinalStage nativeSocialLogin(Optional nativeSocialLogin); - - _FinalStage nativeSocialLogin(NativeSocialLogin nativeSocialLogin); - - _FinalStage refreshToken(@Nullable OptionalNullable refreshToken); - - _FinalStage refreshToken(ClientRefreshTokenConfiguration refreshToken); - - _FinalStage refreshToken(Optional refreshToken); - - _FinalStage refreshToken(com.auth0.client.mgmt.core.Nullable refreshToken); - - _FinalStage defaultOrganization(@Nullable OptionalNullable defaultOrganization); - - _FinalStage defaultOrganization(ClientDefaultOrganization defaultOrganization); - - _FinalStage defaultOrganization(Optional defaultOrganization); - - _FinalStage defaultOrganization( - com.auth0.client.mgmt.core.Nullable defaultOrganization); - - _FinalStage organizationUsage(Optional organizationUsage); - - _FinalStage organizationUsage(ClientOrganizationUsageEnum organizationUsage); - - _FinalStage organizationRequireBehavior( - Optional organizationRequireBehavior); - - _FinalStage organizationRequireBehavior(ClientOrganizationRequireBehaviorEnum organizationRequireBehavior); - - /** - *

Defines the available methods for organization discovery during the pre_login_prompt. Users can discover their organization either by email, organization_name or both.

- */ - _FinalStage organizationDiscoveryMethods( - Optional> organizationDiscoveryMethods); - - _FinalStage organizationDiscoveryMethods(List organizationDiscoveryMethods); - - _FinalStage clientAuthenticationMethods(Optional clientAuthenticationMethods); - - _FinalStage clientAuthenticationMethods(ClientCreateAuthenticationMethod clientAuthenticationMethods); - - /** - *

Makes the use of Pushed Authorization Requests mandatory for this client

- */ - _FinalStage requirePushedAuthorizationRequests(Optional requirePushedAuthorizationRequests); - - _FinalStage requirePushedAuthorizationRequests(Boolean requirePushedAuthorizationRequests); - - /** - *

Makes the use of Proof-of-Possession mandatory for this client

- */ - _FinalStage requireProofOfPossession(Optional requireProofOfPossession); - - _FinalStage requireProofOfPossession(Boolean requireProofOfPossession); - - _FinalStage signedRequestObject(Optional signedRequestObject); - - _FinalStage signedRequestObject(ClientSignedRequestObjectWithPublicKey signedRequestObject); - - _FinalStage complianceLevel(@Nullable OptionalNullable complianceLevel); - - _FinalStage complianceLevel(ClientComplianceLevelEnum complianceLevel); - - _FinalStage complianceLevel(Optional complianceLevel); - - _FinalStage complianceLevel(com.auth0.client.mgmt.core.Nullable complianceLevel); - - /** - *

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.

- */ - _FinalStage skipNonVerifiableCallbackUriConfirmationPrompt( - Optional skipNonVerifiableCallbackUriConfirmationPrompt); - - _FinalStage skipNonVerifiableCallbackUriConfirmationPrompt( - Boolean skipNonVerifiableCallbackUriConfirmationPrompt); - - _FinalStage tokenExchange(Optional tokenExchange); - - _FinalStage tokenExchange(ClientTokenExchangeConfiguration tokenExchange); - - /** - *

Specifies how long, in seconds, a Pushed Authorization Request URI remains valid

- */ - _FinalStage parRequestExpiry(@Nullable OptionalNullable parRequestExpiry); - - _FinalStage parRequestExpiry(Integer parRequestExpiry); - - _FinalStage parRequestExpiry(Optional parRequestExpiry); - - _FinalStage parRequestExpiry(com.auth0.client.mgmt.core.Nullable parRequestExpiry); - - _FinalStage tokenQuota(Optional tokenQuota); - - _FinalStage tokenQuota(CreateTokenQuota tokenQuota); - - /** - *

The identifier of the resource server that this client is linked to.

- */ - _FinalStage resourceServerIdentifier(Optional resourceServerIdentifier); - - _FinalStage resourceServerIdentifier(String resourceServerIdentifier); - - _FinalStage expressConfiguration(Optional expressConfiguration); - - _FinalStage expressConfiguration(ExpressConfiguration expressConfiguration); - - _FinalStage asyncApprovalNotificationChannels( - Optional> asyncApprovalNotificationChannels); - - _FinalStage asyncApprovalNotificationChannels( - List asyncApprovalNotificationChannels); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; - - private Optional> asyncApprovalNotificationChannels = - Optional.empty(); - - private Optional expressConfiguration = Optional.empty(); - - private Optional resourceServerIdentifier = Optional.empty(); - - private Optional tokenQuota = Optional.empty(); - - private OptionalNullable parRequestExpiry = OptionalNullable.absent(); - - private Optional tokenExchange = Optional.empty(); - - private Optional skipNonVerifiableCallbackUriConfirmationPrompt = Optional.empty(); - - private OptionalNullable complianceLevel = OptionalNullable.absent(); - - private Optional signedRequestObject = Optional.empty(); - - private Optional requireProofOfPossession = Optional.empty(); - - private Optional requirePushedAuthorizationRequests = Optional.empty(); - - private Optional clientAuthenticationMethods = Optional.empty(); - - private Optional> organizationDiscoveryMethods = Optional.empty(); - - private Optional organizationRequireBehavior = Optional.empty(); - - private Optional organizationUsage = Optional.empty(); - - private OptionalNullable defaultOrganization = OptionalNullable.absent(); - - private OptionalNullable refreshToken = OptionalNullable.absent(); - - private Optional nativeSocialLogin = Optional.empty(); - - private Optional initiateLoginUri = Optional.empty(); - - private Optional mobile = Optional.empty(); - - private Optional> clientMetadata = Optional.empty(); - - private Optional addons = Optional.empty(); - - private Optional formTemplate = Optional.empty(); - - private Optional customLoginPagePreview = Optional.empty(); - - private Optional customLoginPage = Optional.empty(); - - private Optional customLoginPageOn = Optional.empty(); - - private Optional ssoDisabled = Optional.empty(); - - private Optional crossOriginLoc = Optional.empty(); - - private Optional crossOriginAuthentication = Optional.empty(); - - private Optional sso = Optional.empty(); - - private OptionalNullable encryptionKey = OptionalNullable.absent(); - - private Optional jwtConfiguration = Optional.empty(); - - private Optional oidcConformant = Optional.empty(); - - private Optional isFirstParty = Optional.empty(); - - private Optional appType = Optional.empty(); - - private Optional isTokenEndpointIpHeaderTrusted = Optional.empty(); - - private Optional tokenEndpointAuthMethod = Optional.empty(); - - private Optional> grantTypes = Optional.empty(); - - private Optional> allowedLogoutUrls = Optional.empty(); - - private Optional> allowedClients = Optional.empty(); - - private Optional> clientAliases = Optional.empty(); - - private Optional> webOrigins = Optional.empty(); - - private Optional> allowedOrigins = Optional.empty(); - - private OptionalNullable sessionTransfer = OptionalNullable.absent(); - - private Optional oidcBackchannelLogout = Optional.empty(); - - private Optional oidcLogout = Optional.empty(); - - private Optional> callbacks = Optional.empty(); - - private Optional logoUri = Optional.empty(); - - private Optional description = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateClientRequestContent other) { - name(other.getName()); - description(other.getDescription()); - logoUri(other.getLogoUri()); - callbacks(other.getCallbacks()); - oidcLogout(other.getOidcLogout()); - oidcBackchannelLogout(other.getOidcBackchannelLogout()); - sessionTransfer(other.getSessionTransfer()); - allowedOrigins(other.getAllowedOrigins()); - webOrigins(other.getWebOrigins()); - clientAliases(other.getClientAliases()); - allowedClients(other.getAllowedClients()); - allowedLogoutUrls(other.getAllowedLogoutUrls()); - grantTypes(other.getGrantTypes()); - tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); - isTokenEndpointIpHeaderTrusted(other.getIsTokenEndpointIpHeaderTrusted()); - appType(other.getAppType()); - isFirstParty(other.getIsFirstParty()); - oidcConformant(other.getOidcConformant()); - jwtConfiguration(other.getJwtConfiguration()); - encryptionKey(other.getEncryptionKey()); - sso(other.getSso()); - crossOriginAuthentication(other.getCrossOriginAuthentication()); - crossOriginLoc(other.getCrossOriginLoc()); - ssoDisabled(other.getSsoDisabled()); - customLoginPageOn(other.getCustomLoginPageOn()); - customLoginPage(other.getCustomLoginPage()); - customLoginPagePreview(other.getCustomLoginPagePreview()); - formTemplate(other.getFormTemplate()); - addons(other.getAddons()); - clientMetadata(other.getClientMetadata()); - mobile(other.getMobile()); - initiateLoginUri(other.getInitiateLoginUri()); - nativeSocialLogin(other.getNativeSocialLogin()); - 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()); - complianceLevel(other.getComplianceLevel()); - skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); - tokenExchange(other.getTokenExchange()); - parRequestExpiry(other.getParRequestExpiry()); - tokenQuota(other.getTokenQuota()); - resourceServerIdentifier(other.getResourceServerIdentifier()); - expressConfiguration(other.getExpressConfiguration()); - asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); - 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. - */ - @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 asyncApprovalNotificationChannels( - List asyncApprovalNotificationChannels) { - this.asyncApprovalNotificationChannels = Optional.ofNullable(asyncApprovalNotificationChannels); - return this; - } - - @java.lang.Override - @JsonSetter(value = "async_approval_notification_channels", nulls = Nulls.SKIP) - public _FinalStage asyncApprovalNotificationChannels( - Optional> asyncApprovalNotificationChannels) { - this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; - return this; - } - - @java.lang.Override - public _FinalStage expressConfiguration(ExpressConfiguration expressConfiguration) { - this.expressConfiguration = Optional.ofNullable(expressConfiguration); - return this; - } - - @java.lang.Override - @JsonSetter(value = "express_configuration", nulls = Nulls.SKIP) - public _FinalStage expressConfiguration(Optional expressConfiguration) { - this.expressConfiguration = expressConfiguration; - 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. - */ - @java.lang.Override - public _FinalStage resourceServerIdentifier(String resourceServerIdentifier) { - this.resourceServerIdentifier = Optional.ofNullable(resourceServerIdentifier); - return this; - } - - /** - *

The identifier of the resource server that this client is linked to.

- */ - @java.lang.Override - @JsonSetter(value = "resource_server_identifier", nulls = Nulls.SKIP) - public _FinalStage resourceServerIdentifier(Optional resourceServerIdentifier) { - this.resourceServerIdentifier = resourceServerIdentifier; - return this; - } - - @java.lang.Override - public _FinalStage tokenQuota(CreateTokenQuota tokenQuota) { - this.tokenQuota = Optional.ofNullable(tokenQuota); - return this; - } - - @java.lang.Override - @JsonSetter(value = "token_quota", nulls = Nulls.SKIP) - public _FinalStage tokenQuota(Optional tokenQuota) { - this.tokenQuota = tokenQuota; - return this; - } - - /** - *

Specifies how long, in seconds, a Pushed Authorization Request URI remains valid

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage 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; - } - - /** - *

Specifies how long, in seconds, a Pushed Authorization Request URI remains valid

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

Specifies how long, in seconds, a Pushed Authorization Request URI remains valid

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

Specifies how long, in seconds, a Pushed Authorization Request URI remains valid

- */ - @java.lang.Override - @JsonSetter(value = "par_request_expiry", nulls = Nulls.SKIP) - public _FinalStage parRequestExpiry(@Nullable OptionalNullable parRequestExpiry) { - this.parRequestExpiry = parRequestExpiry; - return this; - } - - @java.lang.Override - public _FinalStage tokenExchange(ClientTokenExchangeConfiguration tokenExchange) { - this.tokenExchange = Optional.ofNullable(tokenExchange); - return this; - } - - @java.lang.Override - @JsonSetter(value = "token_exchange", nulls = Nulls.SKIP) - public _FinalStage tokenExchange(Optional tokenExchange) { - this.tokenExchange = tokenExchange; - 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.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage skipNonVerifiableCallbackUriConfirmationPrompt( - Boolean skipNonVerifiableCallbackUriConfirmationPrompt) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = - Optional.ofNullable(skipNonVerifiableCallbackUriConfirmationPrompt); - 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.

- */ - @java.lang.Override - @JsonSetter(value = "skip_non_verifiable_callback_uri_confirmation_prompt", nulls = Nulls.SKIP) - public _FinalStage skipNonVerifiableCallbackUriConfirmationPrompt( - Optional skipNonVerifiableCallbackUriConfirmationPrompt) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; - return this; - } - - @java.lang.Override - public _FinalStage 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; - } - - @java.lang.Override - public _FinalStage complianceLevel(Optional complianceLevel) { - if (complianceLevel.isPresent()) { - this.complianceLevel = OptionalNullable.of(complianceLevel.get()); - } else { - this.complianceLevel = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage complianceLevel(ClientComplianceLevelEnum complianceLevel) { - this.complianceLevel = OptionalNullable.of(complianceLevel); - return this; - } - - @java.lang.Override - @JsonSetter(value = "compliance_level", nulls = Nulls.SKIP) - public _FinalStage complianceLevel(@Nullable OptionalNullable complianceLevel) { - this.complianceLevel = complianceLevel; - return this; - } - - @java.lang.Override - public _FinalStage signedRequestObject(ClientSignedRequestObjectWithPublicKey signedRequestObject) { - this.signedRequestObject = Optional.ofNullable(signedRequestObject); - return this; - } - - @java.lang.Override - @JsonSetter(value = "signed_request_object", nulls = Nulls.SKIP) - public _FinalStage signedRequestObject(Optional signedRequestObject) { - this.signedRequestObject = signedRequestObject; - return this; - } - - /** - *

Makes the use of Proof-of-Possession mandatory for this client

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

Makes the use of Proof-of-Possession mandatory for this client

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

Makes the use of Pushed Authorization Requests mandatory for this client

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

Makes the use of Pushed Authorization Requests mandatory for this client

- */ - @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 clientAuthenticationMethods(ClientCreateAuthenticationMethod clientAuthenticationMethods) { - this.clientAuthenticationMethods = Optional.ofNullable(clientAuthenticationMethods); - return this; - } - - @java.lang.Override - @JsonSetter(value = "client_authentication_methods", nulls = Nulls.SKIP) - public _FinalStage clientAuthenticationMethods( - Optional clientAuthenticationMethods) { - this.clientAuthenticationMethods = clientAuthenticationMethods; - 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.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage organizationDiscoveryMethods( - List organizationDiscoveryMethods) { - this.organizationDiscoveryMethods = Optional.ofNullable(organizationDiscoveryMethods); - 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.

- */ - @java.lang.Override - @JsonSetter(value = "organization_discovery_methods", nulls = Nulls.SKIP) - public _FinalStage organizationDiscoveryMethods( - Optional> organizationDiscoveryMethods) { - this.organizationDiscoveryMethods = organizationDiscoveryMethods; - return this; - } - - @java.lang.Override - public _FinalStage organizationRequireBehavior( - ClientOrganizationRequireBehaviorEnum organizationRequireBehavior) { - this.organizationRequireBehavior = Optional.ofNullable(organizationRequireBehavior); - return this; - } - - @java.lang.Override - @JsonSetter(value = "organization_require_behavior", nulls = Nulls.SKIP) - public _FinalStage organizationRequireBehavior( - Optional organizationRequireBehavior) { - this.organizationRequireBehavior = organizationRequireBehavior; - return this; - } - - @java.lang.Override - public _FinalStage organizationUsage(ClientOrganizationUsageEnum organizationUsage) { - this.organizationUsage = Optional.ofNullable(organizationUsage); - return this; - } - - @java.lang.Override - @JsonSetter(value = "organization_usage", nulls = Nulls.SKIP) - public _FinalStage organizationUsage(Optional organizationUsage) { - this.organizationUsage = organizationUsage; - return this; - } - - @java.lang.Override - public _FinalStage 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; - } - - @java.lang.Override - public _FinalStage defaultOrganization(Optional defaultOrganization) { - if (defaultOrganization.isPresent()) { - this.defaultOrganization = OptionalNullable.of(defaultOrganization.get()); - } else { - this.defaultOrganization = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage defaultOrganization(ClientDefaultOrganization defaultOrganization) { - this.defaultOrganization = OptionalNullable.of(defaultOrganization); - return this; - } - - @java.lang.Override - @JsonSetter(value = "default_organization", nulls = Nulls.SKIP) - public _FinalStage defaultOrganization( - @Nullable OptionalNullable defaultOrganization) { - this.defaultOrganization = defaultOrganization; - return this; - } - - @java.lang.Override - public _FinalStage 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; - } - - @java.lang.Override - public _FinalStage refreshToken(Optional refreshToken) { - if (refreshToken.isPresent()) { - this.refreshToken = OptionalNullable.of(refreshToken.get()); - } else { - this.refreshToken = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage refreshToken(ClientRefreshTokenConfiguration refreshToken) { - this.refreshToken = OptionalNullable.of(refreshToken); - return this; - } - - @java.lang.Override - @JsonSetter(value = "refresh_token", nulls = Nulls.SKIP) - public _FinalStage refreshToken(@Nullable OptionalNullable refreshToken) { - this.refreshToken = refreshToken; - return this; - } - - @java.lang.Override - public _FinalStage nativeSocialLogin(NativeSocialLogin nativeSocialLogin) { - this.nativeSocialLogin = Optional.ofNullable(nativeSocialLogin); - return this; - } - - @java.lang.Override - @JsonSetter(value = "native_social_login", nulls = Nulls.SKIP) - public _FinalStage nativeSocialLogin(Optional nativeSocialLogin) { - this.nativeSocialLogin = nativeSocialLogin; - return this; - } - - /** - *

Initiate login uri, must be https

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

Initiate login uri, must be https

- */ - @java.lang.Override - @JsonSetter(value = "initiate_login_uri", nulls = Nulls.SKIP) - public _FinalStage initiateLoginUri(Optional initiateLoginUri) { - this.initiateLoginUri = initiateLoginUri; - return this; - } - - @java.lang.Override - public _FinalStage mobile(ClientMobile mobile) { - this.mobile = Optional.ofNullable(mobile); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mobile", nulls = Nulls.SKIP) - public _FinalStage mobile(Optional mobile) { - this.mobile = mobile; - return this; - } - - @java.lang.Override - public _FinalStage clientMetadata(Map clientMetadata) { - this.clientMetadata = Optional.ofNullable(clientMetadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "client_metadata", nulls = Nulls.SKIP) - public _FinalStage clientMetadata(Optional> clientMetadata) { - this.clientMetadata = clientMetadata; - return this; - } - - @java.lang.Override - public _FinalStage addons(ClientAddons addons) { - this.addons = Optional.ofNullable(addons); - return this; - } - - @java.lang.Override - @JsonSetter(value = "addons", nulls = Nulls.SKIP) - public _FinalStage addons(Optional addons) { - this.addons = addons; - return this; - } - - /** - *

HTML form template to be used for WS-Federation.

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

HTML form template to be used for WS-Federation.

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

The content (HTML, CSS, JS) of the custom login page. (Used on Previews)

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

The content (HTML, CSS, JS) of the custom login page. (Used on Previews)

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

The content (HTML, CSS, JS) of the custom login page.

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

The content (HTML, CSS, JS) of the custom login page.

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

<code>true</code> if the custom login page is to be used, <code>false</code> otherwise. Defaults to <code>true</code>

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

<code>true</code> if the custom login page is to be used, <code>false</code> otherwise. Defaults to <code>true</code>

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

<code>true</code> to disable Single Sign On, <code>false</code> otherwise (default: <code>false</code>)

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

<code>true</code> to disable Single Sign On, <code>false</code> otherwise (default: <code>false</code>)

- */ - @java.lang.Override - @JsonSetter(value = "sso_disabled", nulls = Nulls.SKIP) - public _FinalStage ssoDisabled(Optional ssoDisabled) { - this.ssoDisabled = ssoDisabled; - 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.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage crossOriginLoc(String crossOriginLoc) { - this.crossOriginLoc = Optional.ofNullable(crossOriginLoc); - 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.

- */ - @java.lang.Override - @JsonSetter(value = "cross_origin_loc", nulls = Nulls.SKIP) - public _FinalStage crossOriginLoc(Optional crossOriginLoc) { - this.crossOriginLoc = crossOriginLoc; - 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).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage crossOriginAuthentication(Boolean crossOriginAuthentication) { - this.crossOriginAuthentication = Optional.ofNullable(crossOriginAuthentication); - 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).

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

Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false).

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

Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false).

- */ - @java.lang.Override - @JsonSetter(value = "sso", nulls = Nulls.SKIP) - public _FinalStage sso(Optional sso) { - this.sso = sso; - return this; - } - - @java.lang.Override - public _FinalStage encryptionKey(com.auth0.client.mgmt.core.Nullable encryptionKey) { - if (encryptionKey.isNull()) { - this.encryptionKey = OptionalNullable.ofNull(); - } else if (encryptionKey.isEmpty()) { - this.encryptionKey = OptionalNullable.absent(); - } else { - this.encryptionKey = OptionalNullable.of(encryptionKey.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage encryptionKey(Optional encryptionKey) { - if (encryptionKey.isPresent()) { - this.encryptionKey = OptionalNullable.of(encryptionKey.get()); - } else { - this.encryptionKey = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage encryptionKey(ClientEncryptionKey encryptionKey) { - this.encryptionKey = OptionalNullable.of(encryptionKey); - return this; - } - - @java.lang.Override - @JsonSetter(value = "encryption_key", nulls = Nulls.SKIP) - public _FinalStage encryptionKey(@Nullable OptionalNullable encryptionKey) { - this.encryptionKey = encryptionKey; - return this; - } - - @java.lang.Override - public _FinalStage jwtConfiguration(ClientJwtConfiguration jwtConfiguration) { - this.jwtConfiguration = Optional.ofNullable(jwtConfiguration); - return this; - } - - @java.lang.Override - @JsonSetter(value = "jwt_configuration", nulls = Nulls.SKIP) - public _FinalStage jwtConfiguration(Optional jwtConfiguration) { - this.jwtConfiguration = jwtConfiguration; - return this; - } - - /** - *

Whether this client conforms to <a href='https://auth0.com/docs/api-auth/tutorials/adoption'>strict OIDC specifications</a> (true) or uses legacy features (false).

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

Whether this client conforms to <a href='https://auth0.com/docs/api-auth/tutorials/adoption'>strict OIDC specifications</a> (true) or uses legacy features (false).

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

Whether this client a first party client or not

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

Whether this client a first party client or not

- */ - @java.lang.Override - @JsonSetter(value = "is_first_party", nulls = Nulls.SKIP) - public _FinalStage isFirstParty(Optional isFirstParty) { - this.isFirstParty = isFirstParty; - return this; - } - - @java.lang.Override - public _FinalStage appType(ClientAppTypeEnum appType) { - this.appType = Optional.ofNullable(appType); - return this; - } - - @java.lang.Override - @JsonSetter(value = "app_type", nulls = Nulls.SKIP) - public _FinalStage appType(Optional appType) { - this.appType = appType; - 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.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage isTokenEndpointIpHeaderTrusted(Boolean isTokenEndpointIpHeaderTrusted) { - this.isTokenEndpointIpHeaderTrusted = Optional.ofNullable(isTokenEndpointIpHeaderTrusted); - 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.

- */ - @java.lang.Override - @JsonSetter(value = "is_token_endpoint_ip_header_trusted", nulls = Nulls.SKIP) - public _FinalStage isTokenEndpointIpHeaderTrusted(Optional isTokenEndpointIpHeaderTrusted) { - this.isTokenEndpointIpHeaderTrusted = isTokenEndpointIpHeaderTrusted; - return this; - } - - @java.lang.Override - public _FinalStage tokenEndpointAuthMethod(ClientTokenEndpointAuthMethodEnum 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; - } - - /** - *

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.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage grantTypes(List grantTypes) { - this.grantTypes = Optional.ofNullable(grantTypes); - 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.

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

Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains.

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

Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains.

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

List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed.

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

List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed.

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

List of audiences/realms for SAML protocol. Used by the wsfed addon.

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

List of audiences/realms for SAML protocol. Used by the wsfed addon.

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

Comma-separated list of allowed origins for use with <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>.

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

Comma-separated list of allowed origins for use with <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>.

- */ - @java.lang.Override - @JsonSetter(value = "web_origins", nulls = Nulls.SKIP) - public _FinalStage webOrigins(Optional> webOrigins) { - this.webOrigins = webOrigins; - 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.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage allowedOrigins(List allowedOrigins) { - this.allowedOrigins = Optional.ofNullable(allowedOrigins); - 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.

- */ - @java.lang.Override - @JsonSetter(value = "allowed_origins", nulls = Nulls.SKIP) - public _FinalStage allowedOrigins(Optional> allowedOrigins) { - this.allowedOrigins = allowedOrigins; - return this; - } - - @java.lang.Override - public _FinalStage 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; - } - - @java.lang.Override - public _FinalStage sessionTransfer(Optional sessionTransfer) { - if (sessionTransfer.isPresent()) { - this.sessionTransfer = OptionalNullable.of(sessionTransfer.get()); - } else { - this.sessionTransfer = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage sessionTransfer(ClientSessionTransferConfiguration sessionTransfer) { - this.sessionTransfer = OptionalNullable.of(sessionTransfer); - return this; - } - - @java.lang.Override - @JsonSetter(value = "session_transfer", nulls = Nulls.SKIP) - public _FinalStage sessionTransfer( - @Nullable OptionalNullable sessionTransfer) { - this.sessionTransfer = sessionTransfer; - return this; - } - - @java.lang.Override - public _FinalStage oidcBackchannelLogout(ClientOidcBackchannelLogoutSettings oidcBackchannelLogout) { - this.oidcBackchannelLogout = Optional.ofNullable(oidcBackchannelLogout); - return this; - } - - @java.lang.Override - @JsonSetter(value = "oidc_backchannel_logout", nulls = Nulls.SKIP) - public _FinalStage oidcBackchannelLogout(Optional oidcBackchannelLogout) { - this.oidcBackchannelLogout = oidcBackchannelLogout; - return this; - } - - @java.lang.Override - public _FinalStage oidcLogout(ClientOidcBackchannelLogoutSettings oidcLogout) { - this.oidcLogout = Optional.ofNullable(oidcLogout); - return this; - } - - @java.lang.Override - @JsonSetter(value = "oidc_logout", nulls = Nulls.SKIP) - public _FinalStage oidcLogout(Optional oidcLogout) { - this.oidcLogout = oidcLogout; - return this; - } - - /** - *

Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication.

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

Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication.

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

URL of the logo to display for this client. Recommended size is 150x150 pixels.

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

URL of the logo to display for this client. Recommended size is 150x150 pixels.

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

Free text description of this client (max length: 140 characters).

- * @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; - } - - /** - *

Free text description of this client (max length: 140 characters).

- */ - @java.lang.Override - @JsonSetter(value = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; - return this; - } - - @java.lang.Override - public CreateClientRequestContent build() { - return new CreateClientRequestContent( - name, - description, - logoUri, - callbacks, - oidcLogout, - oidcBackchannelLogout, - sessionTransfer, - allowedOrigins, - webOrigins, - clientAliases, - allowedClients, - allowedLogoutUrls, - grantTypes, - tokenEndpointAuthMethod, - isTokenEndpointIpHeaderTrusted, - appType, - isFirstParty, - oidcConformant, - jwtConfiguration, - encryptionKey, - sso, - crossOriginAuthentication, - crossOriginLoc, - ssoDisabled, - customLoginPageOn, - customLoginPage, - customLoginPagePreview, - formTemplate, - addons, - clientMetadata, - mobile, - initiateLoginUri, - nativeSocialLogin, - refreshToken, - defaultOrganization, - organizationUsage, - organizationRequireBehavior, - organizationDiscoveryMethods, - clientAuthenticationMethods, - requirePushedAuthorizationRequests, - requireProofOfPossession, - signedRequestObject, - complianceLevel, - skipNonVerifiableCallbackUriConfirmationPrompt, - tokenExchange, - parRequestExpiry, - tokenQuota, - resourceServerIdentifier, - expressConfiguration, - asyncApprovalNotificationChannels, - 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 deleted file mode 100644 index 043fc6235..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java +++ /dev/null @@ -1,1876 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateClientResponseContent.Builder.class) -public final class CreateClientResponseContent { - private final Optional clientId; - - private final Optional tenant; - - private final Optional name; - - private final Optional description; - - private final Optional global; - - private final Optional clientSecret; - - 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> signingKeys; - - private final OptionalNullable encryptionKey; - - 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 addons; - - private final Optional tokenEndpointAuthMethod; - - private final Optional isTokenEndpointIpHeaderTrusted; - - private final Optional> clientMetadata; - - private final Optional mobile; - - private final Optional initiateLoginUri; - - 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 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 resourceServerIdentifier; - - private final Optional> asyncApprovalNotificationChannels; - - private final Map additionalProperties; - - private CreateClientResponseContent( - Optional clientId, - Optional tenant, - Optional name, - Optional description, - Optional global, - Optional clientSecret, - 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> signingKeys, - OptionalNullable encryptionKey, - Optional sso, - Optional ssoDisabled, - Optional crossOriginAuthentication, - Optional crossOriginLoc, - Optional customLoginPageOn, - Optional customLoginPage, - Optional customLoginPagePreview, - Optional formTemplate, - Optional addons, - Optional tokenEndpointAuthMethod, - Optional isTokenEndpointIpHeaderTrusted, - Optional> clientMetadata, - Optional mobile, - Optional initiateLoginUri, - OptionalNullable refreshToken, - OptionalNullable defaultOrganization, - Optional organizationUsage, - Optional organizationRequireBehavior, - Optional> organizationDiscoveryMethods, - OptionalNullable clientAuthenticationMethods, - Optional requirePushedAuthorizationRequests, - Optional requireProofOfPossession, - Optional signedRequestObject, - OptionalNullable complianceLevel, - Optional skipNonVerifiableCallbackUriConfirmationPrompt, - Optional tokenExchange, - OptionalNullable parRequestExpiry, - Optional tokenQuota, - Optional expressConfiguration, - Optional resourceServerIdentifier, - Optional> asyncApprovalNotificationChannels, - Map additionalProperties) { - this.clientId = clientId; - this.tenant = tenant; - this.name = name; - this.description = description; - this.global = global; - this.clientSecret = clientSecret; - 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.signingKeys = signingKeys; - this.encryptionKey = encryptionKey; - 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.addons = addons; - this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; - this.isTokenEndpointIpHeaderTrusted = isTokenEndpointIpHeaderTrusted; - this.clientMetadata = clientMetadata; - this.mobile = mobile; - this.initiateLoginUri = initiateLoginUri; - 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.complianceLevel = complianceLevel; - this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; - this.tokenExchange = tokenExchange; - this.parRequestExpiry = parRequestExpiry; - this.tokenQuota = tokenQuota; - this.expressConfiguration = expressConfiguration; - this.resourceServerIdentifier = resourceServerIdentifier; - this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of this client. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @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; - } - - /** - * @return Client secret (which you must not make public). - */ - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @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 <a href='https://auth0.com/docs/api-auth/tutorials/adoption'>strict OIDC specifications</a> (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 <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>. - */ - @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; - } - - @JsonProperty("signing_keys") - public Optional> getSigningKeys() { - return signingKeys; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("encryption_key") - public OptionalNullable getEncryptionKey() { - if (encryptionKey == null) { - return OptionalNullable.absent(); - } - return encryptionKey; - } - - /** - * @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("addons") - public Optional getAddons() { - return addons; - } - - @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; - } - - @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; - } - - @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; - } - - /** - * @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; - } - - @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("encryption_key") - private OptionalNullable _getEncryptionKey() { - return encryptionKey; - } - - @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 CreateClientResponseContent && equalTo((CreateClientResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateClientResponseContent other) { - return clientId.equals(other.clientId) - && tenant.equals(other.tenant) - && name.equals(other.name) - && description.equals(other.description) - && global.equals(other.global) - && clientSecret.equals(other.clientSecret) - && 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) - && signingKeys.equals(other.signingKeys) - && encryptionKey.equals(other.encryptionKey) - && 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) - && addons.equals(other.addons) - && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) - && isTokenEndpointIpHeaderTrusted.equals(other.isTokenEndpointIpHeaderTrusted) - && clientMetadata.equals(other.clientMetadata) - && mobile.equals(other.mobile) - && initiateLoginUri.equals(other.initiateLoginUri) - && 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) - && complianceLevel.equals(other.complianceLevel) - && skipNonVerifiableCallbackUriConfirmationPrompt.equals( - other.skipNonVerifiableCallbackUriConfirmationPrompt) - && tokenExchange.equals(other.tokenExchange) - && parRequestExpiry.equals(other.parRequestExpiry) - && tokenQuota.equals(other.tokenQuota) - && expressConfiguration.equals(other.expressConfiguration) - && resourceServerIdentifier.equals(other.resourceServerIdentifier) - && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.tenant, - this.name, - this.description, - this.global, - this.clientSecret, - 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.signingKeys, - this.encryptionKey, - this.sso, - this.ssoDisabled, - this.crossOriginAuthentication, - this.crossOriginLoc, - this.customLoginPageOn, - this.customLoginPage, - this.customLoginPagePreview, - this.formTemplate, - this.addons, - this.tokenEndpointAuthMethod, - this.isTokenEndpointIpHeaderTrusted, - this.clientMetadata, - this.mobile, - this.initiateLoginUri, - this.refreshToken, - this.defaultOrganization, - this.organizationUsage, - this.organizationRequireBehavior, - this.organizationDiscoveryMethods, - this.clientAuthenticationMethods, - this.requirePushedAuthorizationRequests, - this.requireProofOfPossession, - this.signedRequestObject, - this.complianceLevel, - this.skipNonVerifiableCallbackUriConfirmationPrompt, - this.tokenExchange, - this.parRequestExpiry, - this.tokenQuota, - this.expressConfiguration, - this.resourceServerIdentifier, - this.asyncApprovalNotificationChannels); - } - - @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 tenant = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional description = Optional.empty(); - - private Optional global = Optional.empty(); - - private Optional clientSecret = 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> signingKeys = Optional.empty(); - - private OptionalNullable encryptionKey = OptionalNullable.absent(); - - 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 addons = 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 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 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 resourceServerIdentifier = Optional.empty(); - - private Optional> asyncApprovalNotificationChannels = - Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateClientResponseContent other) { - clientId(other.getClientId()); - tenant(other.getTenant()); - name(other.getName()); - description(other.getDescription()); - global(other.getGlobal()); - clientSecret(other.getClientSecret()); - 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()); - signingKeys(other.getSigningKeys()); - encryptionKey(other.getEncryptionKey()); - sso(other.getSso()); - ssoDisabled(other.getSsoDisabled()); - crossOriginAuthentication(other.getCrossOriginAuthentication()); - crossOriginLoc(other.getCrossOriginLoc()); - customLoginPageOn(other.getCustomLoginPageOn()); - customLoginPage(other.getCustomLoginPage()); - customLoginPagePreview(other.getCustomLoginPagePreview()); - formTemplate(other.getFormTemplate()); - addons(other.getAddons()); - tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); - isTokenEndpointIpHeaderTrusted(other.getIsTokenEndpointIpHeaderTrusted()); - clientMetadata(other.getClientMetadata()); - mobile(other.getMobile()); - initiateLoginUri(other.getInitiateLoginUri()); - 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()); - complianceLevel(other.getComplianceLevel()); - skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); - tokenExchange(other.getTokenExchange()); - parRequestExpiry(other.getParRequestExpiry()); - tokenQuota(other.getTokenQuota()); - expressConfiguration(other.getExpressConfiguration()); - resourceServerIdentifier(other.getResourceServerIdentifier()); - asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); - 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; - } - - /** - *

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; - } - - /** - *

Client secret (which you must not make public).

- */ - @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 = "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 <a href='https://auth0.com/docs/api-auth/tutorials/adoption'>strict OIDC specifications</a> (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 <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>.

- */ - @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; - } - - @JsonSetter(value = "signing_keys", nulls = Nulls.SKIP) - public Builder signingKeys(Optional> signingKeys) { - this.signingKeys = signingKeys; - return this; - } - - public Builder signingKeys(List signingKeys) { - this.signingKeys = Optional.ofNullable(signingKeys); - return this; - } - - @JsonSetter(value = "encryption_key", nulls = Nulls.SKIP) - public Builder encryptionKey(@Nullable OptionalNullable encryptionKey) { - this.encryptionKey = encryptionKey; - return this; - } - - public Builder encryptionKey(ClientEncryptionKey encryptionKey) { - this.encryptionKey = OptionalNullable.of(encryptionKey); - return this; - } - - public Builder encryptionKey(Optional encryptionKey) { - if (encryptionKey.isPresent()) { - this.encryptionKey = OptionalNullable.of(encryptionKey.get()); - } else { - this.encryptionKey = OptionalNullable.absent(); - } - return this; - } - - public Builder encryptionKey(com.auth0.client.mgmt.core.Nullable encryptionKey) { - if (encryptionKey.isNull()) { - this.encryptionKey = OptionalNullable.ofNull(); - } else if (encryptionKey.isEmpty()) { - this.encryptionKey = OptionalNullable.absent(); - } else { - this.encryptionKey = OptionalNullable.of(encryptionKey.get()); - } - 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 = "addons", nulls = Nulls.SKIP) - public Builder addons(Optional addons) { - this.addons = addons; - return this; - } - - public Builder addons(ClientAddons addons) { - this.addons = Optional.ofNullable(addons); - 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 = "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 = "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; - } - - /** - *

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; - } - - public CreateClientResponseContent build() { - return new CreateClientResponseContent( - clientId, - tenant, - name, - description, - global, - clientSecret, - appType, - logoUri, - isFirstParty, - oidcConformant, - callbacks, - allowedOrigins, - webOrigins, - clientAliases, - allowedClients, - allowedLogoutUrls, - sessionTransfer, - oidcLogout, - grantTypes, - jwtConfiguration, - signingKeys, - encryptionKey, - sso, - ssoDisabled, - crossOriginAuthentication, - crossOriginLoc, - customLoginPageOn, - customLoginPage, - customLoginPagePreview, - formTemplate, - addons, - tokenEndpointAuthMethod, - isTokenEndpointIpHeaderTrusted, - clientMetadata, - mobile, - initiateLoginUri, - refreshToken, - defaultOrganization, - organizationUsage, - organizationRequireBehavior, - organizationDiscoveryMethods, - clientAuthenticationMethods, - requirePushedAuthorizationRequests, - requireProofOfPossession, - signedRequestObject, - complianceLevel, - skipNonVerifiableCallbackUriConfirmationPrompt, - tokenExchange, - parRequestExpiry, - tokenQuota, - expressConfiguration, - resourceServerIdentifier, - asyncApprovalNotificationChannels, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionCommon.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionCommon.java deleted file mode 100644 index 59edb6be9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionCommon.java +++ /dev/null @@ -1,201 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionCommon.Builder.class) -public final class CreateConnectionCommon implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Map additionalProperties; - - private CreateConnectionCommon( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionCommon && equalTo((CreateConnectionCommon) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionCommon other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.displayName, this.enabledClients, this.isDomainConnection, 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 Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateConnectionCommon other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - 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 = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - public CreateConnectionCommon build() { - return new CreateConnectionCommon( - name, displayName, enabledClients, isDomainConnection, metadata, 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 deleted file mode 100644 index 186bed14e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionProfileRequestContent.java +++ /dev/null @@ -1,271 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateConnectionProfileRequestContent.Builder.class) -public final class CreateConnectionProfileRequestContent { - private final String name; - - private final Optional organization; - - private final Optional connectionNamePrefixTemplate; - - private final Optional> enabledFeatures; - - private final Optional connectionConfig; - - private final Optional strategyOverrides; - - private final Map additionalProperties; - - private CreateConnectionProfileRequestContent( - String name, - Optional organization, - Optional connectionNamePrefixTemplate, - Optional> enabledFeatures, - Optional connectionConfig, - Optional strategyOverrides, - Map additionalProperties) { - this.name = name; - this.organization = organization; - this.connectionNamePrefixTemplate = connectionNamePrefixTemplate; - this.enabledFeatures = enabledFeatures; - this.connectionConfig = connectionConfig; - this.strategyOverrides = strategyOverrides; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("organization") - public Optional getOrganization() { - return organization; - } - - @JsonProperty("connection_name_prefix_template") - public Optional getConnectionNamePrefixTemplate() { - return connectionNamePrefixTemplate; - } - - @JsonProperty("enabled_features") - public Optional> getEnabledFeatures() { - return enabledFeatures; - } - - @JsonProperty("connection_config") - public Optional getConnectionConfig() { - return connectionConfig; - } - - @JsonProperty("strategy_overrides") - public Optional getStrategyOverrides() { - return strategyOverrides; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionProfileRequestContent - && equalTo((CreateConnectionProfileRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionProfileRequestContent other) { - return name.equals(other.name) - && organization.equals(other.organization) - && connectionNamePrefixTemplate.equals(other.connectionNamePrefixTemplate) - && enabledFeatures.equals(other.enabledFeatures) - && connectionConfig.equals(other.connectionConfig) - && strategyOverrides.equals(other.strategyOverrides); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.organization, - this.connectionNamePrefixTemplate, - this.enabledFeatures, - this.connectionConfig, - this.strategyOverrides); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - _FinalStage name(@NotNull String name); - - Builder from(CreateConnectionProfileRequestContent other); - } - - public interface _FinalStage { - CreateConnectionProfileRequestContent build(); - - _FinalStage organization(Optional organization); - - _FinalStage organization(ConnectionProfileOrganization organization); - - _FinalStage connectionNamePrefixTemplate(Optional connectionNamePrefixTemplate); - - _FinalStage connectionNamePrefixTemplate(String connectionNamePrefixTemplate); - - _FinalStage enabledFeatures(Optional> enabledFeatures); - - _FinalStage enabledFeatures(List enabledFeatures); - - _FinalStage connectionConfig(Optional connectionConfig); - - _FinalStage connectionConfig(ConnectionProfileConfig connectionConfig); - - _FinalStage strategyOverrides(Optional strategyOverrides); - - _FinalStage strategyOverrides(ConnectionProfileStrategyOverrides strategyOverrides); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; - - private Optional strategyOverrides = Optional.empty(); - - private Optional connectionConfig = Optional.empty(); - - private Optional> enabledFeatures = Optional.empty(); - - private Optional connectionNamePrefixTemplate = Optional.empty(); - - private Optional organization = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionProfileRequestContent other) { - name(other.getName()); - organization(other.getOrganization()); - connectionNamePrefixTemplate(other.getConnectionNamePrefixTemplate()); - enabledFeatures(other.getEnabledFeatures()); - connectionConfig(other.getConnectionConfig()); - strategyOverrides(other.getStrategyOverrides()); - return this; - } - - @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 strategyOverrides(ConnectionProfileStrategyOverrides strategyOverrides) { - this.strategyOverrides = Optional.ofNullable(strategyOverrides); - return this; - } - - @java.lang.Override - @JsonSetter(value = "strategy_overrides", nulls = Nulls.SKIP) - public _FinalStage strategyOverrides(Optional strategyOverrides) { - this.strategyOverrides = strategyOverrides; - return this; - } - - @java.lang.Override - public _FinalStage connectionConfig(ConnectionProfileConfig connectionConfig) { - this.connectionConfig = Optional.ofNullable(connectionConfig); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connection_config", nulls = Nulls.SKIP) - public _FinalStage connectionConfig(Optional connectionConfig) { - this.connectionConfig = connectionConfig; - return this; - } - - @java.lang.Override - public _FinalStage enabledFeatures(List enabledFeatures) { - this.enabledFeatures = Optional.ofNullable(enabledFeatures); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_features", nulls = Nulls.SKIP) - public _FinalStage enabledFeatures(Optional> enabledFeatures) { - this.enabledFeatures = enabledFeatures; - return this; - } - - @java.lang.Override - public _FinalStage connectionNamePrefixTemplate(String connectionNamePrefixTemplate) { - this.connectionNamePrefixTemplate = Optional.ofNullable(connectionNamePrefixTemplate); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connection_name_prefix_template", nulls = Nulls.SKIP) - public _FinalStage connectionNamePrefixTemplate(Optional connectionNamePrefixTemplate) { - this.connectionNamePrefixTemplate = connectionNamePrefixTemplate; - return this; - } - - @java.lang.Override - public _FinalStage organization(ConnectionProfileOrganization organization) { - this.organization = Optional.ofNullable(organization); - return this; - } - - @java.lang.Override - @JsonSetter(value = "organization", nulls = Nulls.SKIP) - public _FinalStage organization(Optional organization) { - this.organization = organization; - return this; - } - - @java.lang.Override - public CreateConnectionProfileRequestContent build() { - return new CreateConnectionProfileRequestContent( - name, - organization, - connectionNamePrefixTemplate, - enabledFeatures, - connectionConfig, - strategyOverrides, - 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 deleted file mode 100644 index 814a7bba4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionProfileResponseContent.java +++ /dev/null @@ -1,258 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateConnectionProfileResponseContent.Builder.class) -public final class CreateConnectionProfileResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional organization; - - private final Optional connectionNamePrefixTemplate; - - private final Optional> enabledFeatures; - - private final Optional connectionConfig; - - private final Optional strategyOverrides; - - private final Map additionalProperties; - - private CreateConnectionProfileResponseContent( - Optional id, - Optional name, - Optional organization, - Optional connectionNamePrefixTemplate, - Optional> enabledFeatures, - Optional connectionConfig, - Optional strategyOverrides, - Map additionalProperties) { - this.id = id; - this.name = name; - this.organization = organization; - this.connectionNamePrefixTemplate = connectionNamePrefixTemplate; - this.enabledFeatures = enabledFeatures; - this.connectionConfig = connectionConfig; - this.strategyOverrides = strategyOverrides; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("organization") - public Optional getOrganization() { - return organization; - } - - @JsonProperty("connection_name_prefix_template") - public Optional getConnectionNamePrefixTemplate() { - return connectionNamePrefixTemplate; - } - - @JsonProperty("enabled_features") - public Optional> getEnabledFeatures() { - return enabledFeatures; - } - - @JsonProperty("connection_config") - public Optional getConnectionConfig() { - return connectionConfig; - } - - @JsonProperty("strategy_overrides") - public Optional getStrategyOverrides() { - return strategyOverrides; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionProfileResponseContent - && equalTo((CreateConnectionProfileResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionProfileResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && organization.equals(other.organization) - && connectionNamePrefixTemplate.equals(other.connectionNamePrefixTemplate) - && enabledFeatures.equals(other.enabledFeatures) - && connectionConfig.equals(other.connectionConfig) - && strategyOverrides.equals(other.strategyOverrides); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.organization, - this.connectionNamePrefixTemplate, - this.enabledFeatures, - this.connectionConfig, - this.strategyOverrides); - } - - @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 organization = Optional.empty(); - - private Optional connectionNamePrefixTemplate = Optional.empty(); - - private Optional> enabledFeatures = Optional.empty(); - - private Optional connectionConfig = Optional.empty(); - - private Optional strategyOverrides = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateConnectionProfileResponseContent other) { - id(other.getId()); - name(other.getName()); - organization(other.getOrganization()); - connectionNamePrefixTemplate(other.getConnectionNamePrefixTemplate()); - enabledFeatures(other.getEnabledFeatures()); - connectionConfig(other.getConnectionConfig()); - strategyOverrides(other.getStrategyOverrides()); - 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 = "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 = "organization", nulls = Nulls.SKIP) - public Builder organization(Optional organization) { - this.organization = organization; - return this; - } - - public Builder organization(ConnectionProfileOrganization organization) { - this.organization = Optional.ofNullable(organization); - return this; - } - - @JsonSetter(value = "connection_name_prefix_template", nulls = Nulls.SKIP) - public Builder connectionNamePrefixTemplate(Optional connectionNamePrefixTemplate) { - this.connectionNamePrefixTemplate = connectionNamePrefixTemplate; - return this; - } - - public Builder connectionNamePrefixTemplate(String connectionNamePrefixTemplate) { - this.connectionNamePrefixTemplate = Optional.ofNullable(connectionNamePrefixTemplate); - return this; - } - - @JsonSetter(value = "enabled_features", nulls = Nulls.SKIP) - public Builder enabledFeatures(Optional> enabledFeatures) { - this.enabledFeatures = enabledFeatures; - return this; - } - - public Builder enabledFeatures(List enabledFeatures) { - this.enabledFeatures = Optional.ofNullable(enabledFeatures); - return this; - } - - @JsonSetter(value = "connection_config", nulls = Nulls.SKIP) - public Builder connectionConfig(Optional connectionConfig) { - this.connectionConfig = connectionConfig; - return this; - } - - public Builder connectionConfig(ConnectionProfileConfig connectionConfig) { - this.connectionConfig = Optional.ofNullable(connectionConfig); - return this; - } - - @JsonSetter(value = "strategy_overrides", nulls = Nulls.SKIP) - public Builder strategyOverrides(Optional strategyOverrides) { - this.strategyOverrides = strategyOverrides; - return this; - } - - public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOverrides) { - this.strategyOverrides = Optional.ofNullable(strategyOverrides); - return this; - } - - public CreateConnectionProfileResponseContent build() { - return new CreateConnectionProfileResponseContent( - id, - name, - organization, - connectionNamePrefixTemplate, - enabledFeatures, - connectionConfig, - strategyOverrides, - 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 deleted file mode 100644 index 153b6ba81..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContent.java +++ /dev/null @@ -1,501 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContent.Builder.class) -public final class CreateConnectionRequestContent { - private final String name; - - private final Optional displayName; - - private final ConnectionIdentityProviderEnum strategy; - - private final Optional options; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional showAsButton; - - private final Optional> realms; - - private final Optional>> metadata; - - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Map additionalProperties; - - private CreateConnectionRequestContent( - String name, - Optional displayName, - ConnectionIdentityProviderEnum strategy, - Optional options, - Optional> enabledClients, - Optional isDomainConnection, - Optional showAsButton, - Optional> realms, - Optional>> metadata, - Optional authentication, - Optional connectedAccounts, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.strategy = strategy; - this.options = options; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.showAsButton = showAsButton; - this.realms = realms; - this.metadata = metadata; - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.additionalProperties = additionalProperties; - } - - /** - * @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 Connection name used in the new universal login experience - */ - @JsonProperty("display_name") - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("strategy") - public ConnectionIdentityProviderEnum getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - /** - * @return DEPRECATED property. 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 <code>true</code> promotes to a domain-level connection so that third-party applications can use it. <code>false</code> does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to <code>false</code>.) - */ - @JsonProperty("is_domain_connection") - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - /** - * @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 <code>false</code>.) - */ - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - /** - * @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("metadata") - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("authentication") - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContent && equalTo((CreateConnectionRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContent other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && strategy.equals(other.strategy) - && options.equals(other.options) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && showAsButton.equals(other.showAsButton) - && realms.equals(other.realms) - && metadata.equals(other.metadata) - && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.strategy, - this.options, - this.enabledClients, - this.isDomainConnection, - this.showAsButton, - this.realms, - this.metadata, - this.authentication, - this.connectedAccounts); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - 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); - - Builder from(CreateConnectionRequestContent other); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull ConnectionIdentityProviderEnum strategy); - } - - public interface _FinalStage { - CreateConnectionRequestContent build(); - - /** - *

Connection name used in the new universal login experience

- */ - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionPropertiesOptions options); - - /** - *

DEPRECATED property. 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); - - /** - *

<code>true</code> promotes to a domain-level connection so that third-party applications can use it. <code>false</code> does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to <code>false</code>.)

- */ - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - /** - *

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 <code>false</code>.)

- */ - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - - /** - *

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 metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, StrategyStage, _FinalStage { - private String name; - - private ConnectionIdentityProviderEnum strategy; - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional displayName = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContent other) { - name(other.getName()); - displayName(other.getDisplayName()); - strategy(other.getStrategy()); - options(other.getOptions()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - showAsButton(other.getShowAsButton()); - realms(other.getRealms()); - metadata(other.getMetadata()); - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - 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. - */ - @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 ConnectionIdentityProviderEnum strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public _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; - } - - /** - *

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; - } - - /** - *

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 <code>false</code>.)

- * @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 <code>false</code>.)

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

<code>true</code> promotes to a domain-level connection so that third-party applications can use it. <code>false</code> does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to <code>false</code>.)

- * @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; - } - - /** - *

<code>true</code> promotes to a domain-level connection so that third-party applications can use it. <code>false</code> does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to <code>false</code>.)

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

DEPRECATED property. 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; - } - - /** - *

DEPRECATED property. 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; - } - - @java.lang.Override - public _FinalStage options(ConnectionPropertiesOptions 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; - } - - /** - *

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 CreateConnectionRequestContent build() { - return new CreateConnectionRequestContent( - name, - displayName, - strategy, - options, - enabledClients, - isDomainConnection, - showAsButton, - realms, - metadata, - authentication, - connectedAccounts, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAd.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAd.java deleted file mode 100644 index a39e1f8b3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAd.java +++ /dev/null @@ -1,308 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentAd.Builder.class) -public final class CreateConnectionRequestContentAd implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentAdStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentAd( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentAdStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentAdStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentAd && equalTo((CreateConnectionRequestContentAd) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentAd other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentAdStrategy strategy); - - Builder from(CreateConnectionRequestContentAd other); - } - - public interface _FinalStage { - CreateConnectionRequestContentAd build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsAd options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentAdStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentAd other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentAdStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsAd options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentAd build() { - return new CreateConnectionRequestContentAd( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAdStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAdStrategy.java deleted file mode 100644 index 734b75566..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAdStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentAdStrategy { - public static final CreateConnectionRequestContentAdStrategy AD = - new CreateConnectionRequestContentAdStrategy(Value.AD, "ad"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentAdStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentAdStrategy - && this.string.equals(((CreateConnectionRequestContentAdStrategy) 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 CreateConnectionRequestContentAdStrategy valueOf(String value) { - switch (value) { - case "ad": - return AD; - default: - return new CreateConnectionRequestContentAdStrategy(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/CreateConnectionRequestContentAdfs.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAdfs.java deleted file mode 100644 index 29a9fad1c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAdfs.java +++ /dev/null @@ -1,341 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentAdfs.Builder.class) -public final class CreateConnectionRequestContentAdfs implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentAdfsStrategy strategy; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private CreateConnectionRequestContentAdfs( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentAdfsStrategy strategy, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentAdfsStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentAdfs - && equalTo((CreateConnectionRequestContentAdfs) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentAdfs other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentAdfsStrategy strategy); - - Builder from(CreateConnectionRequestContentAdfs other); - } - - public interface _FinalStage { - CreateConnectionRequestContentAdfs build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsAdfs options); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentAdfsStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentAdfs other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentAdfsStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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(ConnectionOptionsAdfs options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentAdfs build() { - return new CreateConnectionRequestContentAdfs( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAdfsStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAdfsStrategy.java deleted file mode 100644 index 87ad923ca..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAdfsStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentAdfsStrategy { - public static final CreateConnectionRequestContentAdfsStrategy ADFS = - new CreateConnectionRequestContentAdfsStrategy(Value.ADFS, "adfs"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentAdfsStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentAdfsStrategy - && this.string.equals(((CreateConnectionRequestContentAdfsStrategy) 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 CreateConnectionRequestContentAdfsStrategy valueOf(String value) { - switch (value) { - case "adfs": - return ADFS; - default: - return new CreateConnectionRequestContentAdfsStrategy(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/CreateConnectionRequestContentAmazon.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAmazon.java deleted file mode 100644 index 985b365c5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAmazon.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentAmazon.Builder.class) -public final class CreateConnectionRequestContentAmazon implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentAmazonStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentAmazon( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentAmazonStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentAmazonStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentAmazon - && equalTo((CreateConnectionRequestContentAmazon) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentAmazon other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentAmazonStrategy strategy); - - Builder from(CreateConnectionRequestContentAmazon other); - } - - public interface _FinalStage { - CreateConnectionRequestContentAmazon build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsAmazon options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentAmazonStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentAmazon other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentAmazonStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsAmazon options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentAmazon build() { - return new CreateConnectionRequestContentAmazon( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAmazonStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAmazonStrategy.java deleted file mode 100644 index 445aeab62..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAmazonStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentAmazonStrategy { - public static final CreateConnectionRequestContentAmazonStrategy AMAZON = - new CreateConnectionRequestContentAmazonStrategy(Value.AMAZON, "amazon"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentAmazonStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentAmazonStrategy - && this.string.equals(((CreateConnectionRequestContentAmazonStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AMAZON: - return visitor.visitAmazon(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentAmazonStrategy valueOf(String value) { - switch (value) { - case "amazon": - return AMAZON; - default: - return new CreateConnectionRequestContentAmazonStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - AMAZON, - - UNKNOWN - } - - public interface Visitor { - T visitAmazon(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAol.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAol.java deleted file mode 100644 index ad89a2c25..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAol.java +++ /dev/null @@ -1,308 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentAol.Builder.class) -public final class CreateConnectionRequestContentAol implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentAolStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentAol( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentAolStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentAolStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentAol && equalTo((CreateConnectionRequestContentAol) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentAol other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentAolStrategy strategy); - - Builder from(CreateConnectionRequestContentAol other); - } - - public interface _FinalStage { - CreateConnectionRequestContentAol build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsAol options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentAolStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentAol other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentAolStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsAol options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentAol build() { - return new CreateConnectionRequestContentAol( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAolStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAolStrategy.java deleted file mode 100644 index 730b9ef1f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAolStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentAolStrategy { - public static final CreateConnectionRequestContentAolStrategy AOL = - new CreateConnectionRequestContentAolStrategy(Value.AOL, "aol"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentAolStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentAolStrategy - && this.string.equals(((CreateConnectionRequestContentAolStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AOL: - return visitor.visitAol(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentAolStrategy valueOf(String value) { - switch (value) { - case "aol": - return AOL; - default: - return new CreateConnectionRequestContentAolStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - AOL, - - UNKNOWN - } - - public interface Visitor { - T visitAol(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentApple.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentApple.java deleted file mode 100644 index 39ddcecb3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentApple.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentApple.Builder.class) -public final class CreateConnectionRequestContentApple implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentAppleStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentApple( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentAppleStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentAppleStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentApple - && equalTo((CreateConnectionRequestContentApple) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentApple other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentAppleStrategy strategy); - - Builder from(CreateConnectionRequestContentApple other); - } - - public interface _FinalStage { - CreateConnectionRequestContentApple build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsApple options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentAppleStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentApple other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentAppleStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsApple options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentApple build() { - return new CreateConnectionRequestContentApple( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAppleStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAppleStrategy.java deleted file mode 100644 index 702054994..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAppleStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentAppleStrategy { - public static final CreateConnectionRequestContentAppleStrategy APPLE = - new CreateConnectionRequestContentAppleStrategy(Value.APPLE, "apple"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentAppleStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentAppleStrategy - && this.string.equals(((CreateConnectionRequestContentAppleStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case APPLE: - return visitor.visitApple(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentAppleStrategy valueOf(String value) { - switch (value) { - case "apple": - return APPLE; - default: - return new CreateConnectionRequestContentAppleStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - APPLE, - - UNKNOWN - } - - public interface Visitor { - T visitApple(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0.java deleted file mode 100644 index d46c7d774..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0.java +++ /dev/null @@ -1,341 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentAuth0.Builder.class) -public final class CreateConnectionRequestContentAuth0 implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentAuth0Strategy strategy; - - private final Optional options; - - private final Optional> realms; - - private final Map additionalProperties; - - private CreateConnectionRequestContentAuth0( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentAuth0Strategy strategy, - Optional options, - Optional> realms, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.realms = realms; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentAuth0Strategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("realms") - public Optional> getRealms() { - return realms; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentAuth0 - && equalTo((CreateConnectionRequestContentAuth0) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentAuth0 other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && realms.equals(other.realms); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.realms); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentAuth0Strategy strategy); - - Builder from(CreateConnectionRequestContentAuth0 other); - } - - public interface _FinalStage { - CreateConnectionRequestContentAuth0 build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsAuth0 options); - - _FinalStage realms(Optional> realms); - - _FinalStage realms(List realms); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentAuth0Strategy strategy; - - private Optional> realms = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentAuth0 other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - realms(other.getRealms()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentAuth0Strategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @java.lang.Override - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public _FinalStage realms(Optional> realms) { - this.realms = realms; - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsAuth0 options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentAuth0 build() { - return new CreateConnectionRequestContentAuth0( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - realms, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0Oidc.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0Oidc.java deleted file mode 100644 index 215a4e013..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0Oidc.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentAuth0Oidc.Builder.class) -public final class CreateConnectionRequestContentAuth0Oidc implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentAuth0OidcStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentAuth0Oidc( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentAuth0OidcStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentAuth0OidcStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentAuth0Oidc - && equalTo((CreateConnectionRequestContentAuth0Oidc) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentAuth0Oidc other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentAuth0OidcStrategy strategy); - - Builder from(CreateConnectionRequestContentAuth0Oidc other); - } - - public interface _FinalStage { - CreateConnectionRequestContentAuth0Oidc build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsAuth0Oidc options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentAuth0OidcStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentAuth0Oidc other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentAuth0OidcStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsAuth0Oidc options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentAuth0Oidc build() { - return new CreateConnectionRequestContentAuth0Oidc( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0OidcStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0OidcStrategy.java deleted file mode 100644 index fc675a98c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0OidcStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentAuth0OidcStrategy { - public static final CreateConnectionRequestContentAuth0OidcStrategy AUTH0OIDC = - new CreateConnectionRequestContentAuth0OidcStrategy(Value.AUTH0OIDC, "auth0-oidc"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentAuth0OidcStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentAuth0OidcStrategy - && this.string.equals(((CreateConnectionRequestContentAuth0OidcStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AUTH0OIDC: - return visitor.visitAuth0Oidc(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentAuth0OidcStrategy valueOf(String value) { - switch (value) { - case "auth0-oidc": - return AUTH0OIDC; - default: - return new CreateConnectionRequestContentAuth0OidcStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - AUTH0OIDC, - - UNKNOWN - } - - public interface Visitor { - T visitAuth0Oidc(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0Strategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0Strategy.java deleted file mode 100644 index beac6abff..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAuth0Strategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentAuth0Strategy { - public static final CreateConnectionRequestContentAuth0Strategy AUTH0 = - new CreateConnectionRequestContentAuth0Strategy(Value.AUTH0, "auth0"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentAuth0Strategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentAuth0Strategy - && this.string.equals(((CreateConnectionRequestContentAuth0Strategy) 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 CreateConnectionRequestContentAuth0Strategy valueOf(String value) { - switch (value) { - case "auth0": - return AUTH0; - default: - return new CreateConnectionRequestContentAuth0Strategy(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/CreateConnectionRequestContentAzureAd.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAzureAd.java deleted file mode 100644 index c707c5182..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAzureAd.java +++ /dev/null @@ -1,341 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentAzureAd.Builder.class) -public final class CreateConnectionRequestContentAzureAd implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentAzureAdStrategy strategy; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private CreateConnectionRequestContentAzureAd( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentAzureAdStrategy strategy, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentAzureAdStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentAzureAd - && equalTo((CreateConnectionRequestContentAzureAd) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentAzureAd other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentAzureAdStrategy strategy); - - Builder from(CreateConnectionRequestContentAzureAd other); - } - - public interface _FinalStage { - CreateConnectionRequestContentAzureAd build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsAzureAd options); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentAzureAdStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentAzureAd other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentAzureAdStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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(ConnectionOptionsAzureAd options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentAzureAd build() { - return new CreateConnectionRequestContentAzureAd( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAzureAdStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAzureAdStrategy.java deleted file mode 100644 index 0163c7015..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentAzureAdStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentAzureAdStrategy { - public static final CreateConnectionRequestContentAzureAdStrategy WAAD = - new CreateConnectionRequestContentAzureAdStrategy(Value.WAAD, "waad"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentAzureAdStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentAzureAdStrategy - && this.string.equals(((CreateConnectionRequestContentAzureAdStrategy) 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 CreateConnectionRequestContentAzureAdStrategy valueOf(String value) { - switch (value) { - case "waad": - return WAAD; - default: - return new CreateConnectionRequestContentAzureAdStrategy(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/CreateConnectionRequestContentBaidu.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBaidu.java deleted file mode 100644 index 6b26ee9c2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBaidu.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentBaidu.Builder.class) -public final class CreateConnectionRequestContentBaidu implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentBaiduStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentBaidu( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentBaiduStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentBaiduStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentBaidu - && equalTo((CreateConnectionRequestContentBaidu) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentBaidu other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentBaiduStrategy strategy); - - Builder from(CreateConnectionRequestContentBaidu other); - } - - public interface _FinalStage { - CreateConnectionRequestContentBaidu build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsBaidu options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentBaiduStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentBaidu other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentBaiduStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsBaidu options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentBaidu build() { - return new CreateConnectionRequestContentBaidu( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBaiduStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBaiduStrategy.java deleted file mode 100644 index cfc3b6cc3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBaiduStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentBaiduStrategy { - public static final CreateConnectionRequestContentBaiduStrategy BAIDU = - new CreateConnectionRequestContentBaiduStrategy(Value.BAIDU, "baidu"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentBaiduStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentBaiduStrategy - && this.string.equals(((CreateConnectionRequestContentBaiduStrategy) 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 UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentBaiduStrategy valueOf(String value) { - switch (value) { - case "baidu": - return BAIDU; - default: - return new CreateConnectionRequestContentBaiduStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - BAIDU, - - UNKNOWN - } - - public interface Visitor { - T visitBaidu(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitbucket.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitbucket.java deleted file mode 100644 index 8ab2c41f8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitbucket.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentBitbucket.Builder.class) -public final class CreateConnectionRequestContentBitbucket implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentBitbucketStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentBitbucket( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentBitbucketStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentBitbucketStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentBitbucket - && equalTo((CreateConnectionRequestContentBitbucket) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentBitbucket other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentBitbucketStrategy strategy); - - Builder from(CreateConnectionRequestContentBitbucket other); - } - - public interface _FinalStage { - CreateConnectionRequestContentBitbucket build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsBitbucket options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentBitbucketStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentBitbucket other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentBitbucketStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsBitbucket options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentBitbucket build() { - return new CreateConnectionRequestContentBitbucket( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitbucketStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitbucketStrategy.java deleted file mode 100644 index 73721c52e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitbucketStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentBitbucketStrategy { - public static final CreateConnectionRequestContentBitbucketStrategy BITBUCKET = - new CreateConnectionRequestContentBitbucketStrategy(Value.BITBUCKET, "bitbucket"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentBitbucketStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentBitbucketStrategy - && this.string.equals(((CreateConnectionRequestContentBitbucketStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case BITBUCKET: - return visitor.visitBitbucket(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentBitbucketStrategy valueOf(String value) { - switch (value) { - case "bitbucket": - return BITBUCKET; - default: - return new CreateConnectionRequestContentBitbucketStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - BITBUCKET, - - UNKNOWN - } - - public interface Visitor { - T visitBitbucket(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitly.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitly.java deleted file mode 100644 index a8c54a013..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitly.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentBitly.Builder.class) -public final class CreateConnectionRequestContentBitly implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentBitlyStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentBitly( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentBitlyStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentBitlyStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentBitly - && equalTo((CreateConnectionRequestContentBitly) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentBitly other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentBitlyStrategy strategy); - - Builder from(CreateConnectionRequestContentBitly other); - } - - public interface _FinalStage { - CreateConnectionRequestContentBitly build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsBitly options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentBitlyStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentBitly other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentBitlyStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsBitly options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentBitly build() { - return new CreateConnectionRequestContentBitly( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitlyStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitlyStrategy.java deleted file mode 100644 index b07a1f482..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBitlyStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentBitlyStrategy { - public static final CreateConnectionRequestContentBitlyStrategy BITLY = - new CreateConnectionRequestContentBitlyStrategy(Value.BITLY, "bitly"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentBitlyStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentBitlyStrategy - && this.string.equals(((CreateConnectionRequestContentBitlyStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case BITLY: - return visitor.visitBitly(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentBitlyStrategy valueOf(String value) { - switch (value) { - case "bitly": - return BITLY; - default: - return new CreateConnectionRequestContentBitlyStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - BITLY, - - UNKNOWN - } - - public interface Visitor { - T visitBitly(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBox.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBox.java deleted file mode 100644 index ec8c18d27..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBox.java +++ /dev/null @@ -1,375 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentBox.Builder.class) -public final class CreateConnectionRequestContentBox - implements IConnectionPurposes, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentBoxStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentBox( - Optional authentication, - Optional connectedAccounts, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentBoxStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentBoxStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentBox && equalTo((CreateConnectionRequestContentBox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentBox other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentBoxStrategy strategy); - - Builder from(CreateConnectionRequestContentBox other); - } - - public interface _FinalStage { - CreateConnectionRequestContentBox build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsBox options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentBoxStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentBox other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentBoxStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsBox options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentBox build() { - return new CreateConnectionRequestContentBox( - authentication, - connectedAccounts, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBoxStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBoxStrategy.java deleted file mode 100644 index 7b7e016ce..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentBoxStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentBoxStrategy { - public static final CreateConnectionRequestContentBoxStrategy BOX = - new CreateConnectionRequestContentBoxStrategy(Value.BOX, "box"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentBoxStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentBoxStrategy - && this.string.equals(((CreateConnectionRequestContentBoxStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case BOX: - return visitor.visitBox(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentBoxStrategy valueOf(String value) { - switch (value) { - case "box": - return BOX; - default: - return new CreateConnectionRequestContentBoxStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - BOX, - - UNKNOWN - } - - public interface Visitor { - T visitBox(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentCustom.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentCustom.java deleted file mode 100644 index 69fbc0718..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentCustom.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentCustom.Builder.class) -public final class CreateConnectionRequestContentCustom implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentCustomStrategy strategy; - - private final Optional> options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentCustom( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentCustomStrategy strategy, - Optional> options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentCustomStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentCustom - && equalTo((CreateConnectionRequestContentCustom) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentCustom other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentCustomStrategy strategy); - - Builder from(CreateConnectionRequestContentCustom other); - } - - public interface _FinalStage { - CreateConnectionRequestContentCustom build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional> options); - - _FinalStage options(Map options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentCustomStrategy strategy; - - private Optional> options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentCustom other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentCustomStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(Map options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional> options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentCustom build() { - return new CreateConnectionRequestContentCustom( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentCustomStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentCustomStrategy.java deleted file mode 100644 index 1ae1e7e72..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentCustomStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentCustomStrategy { - public static final CreateConnectionRequestContentCustomStrategy CUSTOM = - new CreateConnectionRequestContentCustomStrategy(Value.CUSTOM, "custom"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentCustomStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentCustomStrategy - && this.string.equals(((CreateConnectionRequestContentCustomStrategy) 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 CreateConnectionRequestContentCustomStrategy valueOf(String value) { - switch (value) { - case "custom": - return CUSTOM; - default: - return new CreateConnectionRequestContentCustomStrategy(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/CreateConnectionRequestContentDaccount.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDaccount.java deleted file mode 100644 index e1cf23cd4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDaccount.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentDaccount.Builder.class) -public final class CreateConnectionRequestContentDaccount implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentDaccountStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentDaccount( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentDaccountStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentDaccountStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentDaccount - && equalTo((CreateConnectionRequestContentDaccount) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentDaccount other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentDaccountStrategy strategy); - - Builder from(CreateConnectionRequestContentDaccount other); - } - - public interface _FinalStage { - CreateConnectionRequestContentDaccount build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsDaccount options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentDaccountStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentDaccount other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentDaccountStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsDaccount options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentDaccount build() { - return new CreateConnectionRequestContentDaccount( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDaccountStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDaccountStrategy.java deleted file mode 100644 index 95fb744e5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDaccountStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentDaccountStrategy { - public static final CreateConnectionRequestContentDaccountStrategy DACCOUNT = - new CreateConnectionRequestContentDaccountStrategy(Value.DACCOUNT, "daccount"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentDaccountStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentDaccountStrategy - && this.string.equals(((CreateConnectionRequestContentDaccountStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DACCOUNT: - return visitor.visitDaccount(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentDaccountStrategy valueOf(String value) { - switch (value) { - case "daccount": - return DACCOUNT; - default: - return new CreateConnectionRequestContentDaccountStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - DACCOUNT, - - UNKNOWN - } - - public interface Visitor { - T visitDaccount(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDropbox.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDropbox.java deleted file mode 100644 index e18596dbd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDropbox.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentDropbox.Builder.class) -public final class CreateConnectionRequestContentDropbox implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentDropboxStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentDropbox( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentDropboxStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentDropboxStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentDropbox - && equalTo((CreateConnectionRequestContentDropbox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentDropbox other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentDropboxStrategy strategy); - - Builder from(CreateConnectionRequestContentDropbox other); - } - - public interface _FinalStage { - CreateConnectionRequestContentDropbox build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsDropbox options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentDropboxStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentDropbox other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentDropboxStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsDropbox options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentDropbox build() { - return new CreateConnectionRequestContentDropbox( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDropboxStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDropboxStrategy.java deleted file mode 100644 index 37b50d81f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDropboxStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentDropboxStrategy { - public static final CreateConnectionRequestContentDropboxStrategy DROPBOX = - new CreateConnectionRequestContentDropboxStrategy(Value.DROPBOX, "dropbox"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentDropboxStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentDropboxStrategy - && this.string.equals(((CreateConnectionRequestContentDropboxStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DROPBOX: - return visitor.visitDropbox(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentDropboxStrategy valueOf(String value) { - switch (value) { - case "dropbox": - return DROPBOX; - default: - return new CreateConnectionRequestContentDropboxStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - DROPBOX, - - UNKNOWN - } - - public interface Visitor { - T visitDropbox(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDwolla.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDwolla.java deleted file mode 100644 index ffc50c511..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDwolla.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentDwolla.Builder.class) -public final class CreateConnectionRequestContentDwolla implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentDwollaStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentDwolla( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentDwollaStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentDwollaStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentDwolla - && equalTo((CreateConnectionRequestContentDwolla) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentDwolla other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentDwollaStrategy strategy); - - Builder from(CreateConnectionRequestContentDwolla other); - } - - public interface _FinalStage { - CreateConnectionRequestContentDwolla build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsDwolla options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentDwollaStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentDwolla other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentDwollaStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsDwolla options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentDwolla build() { - return new CreateConnectionRequestContentDwolla( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDwollaStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDwollaStrategy.java deleted file mode 100644 index 3137325c1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentDwollaStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentDwollaStrategy { - public static final CreateConnectionRequestContentDwollaStrategy DWOLLA = - new CreateConnectionRequestContentDwollaStrategy(Value.DWOLLA, "dwolla"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentDwollaStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentDwollaStrategy - && this.string.equals(((CreateConnectionRequestContentDwollaStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DWOLLA: - return visitor.visitDwolla(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentDwollaStrategy valueOf(String value) { - switch (value) { - case "dwolla": - return DWOLLA; - default: - return new CreateConnectionRequestContentDwollaStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - DWOLLA, - - UNKNOWN - } - - public interface Visitor { - T visitDwolla(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEmail.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEmail.java deleted file mode 100644 index 6df993349..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEmail.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentEmail.Builder.class) -public final class CreateConnectionRequestContentEmail implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentEmailStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentEmail( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentEmailStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentEmailStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentEmail - && equalTo((CreateConnectionRequestContentEmail) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentEmail other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentEmailStrategy strategy); - - Builder from(CreateConnectionRequestContentEmail other); - } - - public interface _FinalStage { - CreateConnectionRequestContentEmail build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsEmail options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentEmailStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentEmail other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentEmailStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsEmail options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentEmail build() { - return new CreateConnectionRequestContentEmail( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEmailStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEmailStrategy.java deleted file mode 100644 index cb0fd24a7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEmailStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentEmailStrategy { - public static final CreateConnectionRequestContentEmailStrategy EMAIL = - new CreateConnectionRequestContentEmailStrategy(Value.EMAIL, "email"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentEmailStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentEmailStrategy - && this.string.equals(((CreateConnectionRequestContentEmailStrategy) 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 UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentEmailStrategy valueOf(String value) { - switch (value) { - case "email": - return EMAIL; - default: - return new CreateConnectionRequestContentEmailStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - EMAIL, - - UNKNOWN - } - - public interface Visitor { - T visitEmail(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernote.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernote.java deleted file mode 100644 index 33345f068..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernote.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentEvernote.Builder.class) -public final class CreateConnectionRequestContentEvernote implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentEvernoteStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentEvernote( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentEvernoteStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentEvernoteStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentEvernote - && equalTo((CreateConnectionRequestContentEvernote) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentEvernote other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentEvernoteStrategy strategy); - - Builder from(CreateConnectionRequestContentEvernote other); - } - - public interface _FinalStage { - CreateConnectionRequestContentEvernote build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsEvernote options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentEvernoteStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentEvernote other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentEvernoteStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsEvernote options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentEvernote build() { - return new CreateConnectionRequestContentEvernote( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernoteSandbox.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernoteSandbox.java deleted file mode 100644 index c37610a42..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernoteSandbox.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentEvernoteSandbox.Builder.class) -public final class CreateConnectionRequestContentEvernoteSandbox implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentEvernoteSandboxStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentEvernoteSandbox( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentEvernoteSandboxStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentEvernoteSandboxStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentEvernoteSandbox - && equalTo((CreateConnectionRequestContentEvernoteSandbox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentEvernoteSandbox other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentEvernoteSandboxStrategy strategy); - - Builder from(CreateConnectionRequestContentEvernoteSandbox other); - } - - public interface _FinalStage { - CreateConnectionRequestContentEvernoteSandbox build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsEvernote options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentEvernoteSandboxStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentEvernoteSandbox other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentEvernoteSandboxStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsEvernote options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentEvernoteSandbox build() { - return new CreateConnectionRequestContentEvernoteSandbox( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernoteSandboxStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernoteSandboxStrategy.java deleted file mode 100644 index 1ab86c311..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernoteSandboxStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentEvernoteSandboxStrategy { - public static final CreateConnectionRequestContentEvernoteSandboxStrategy EVERNOTE_SANDBOX = - new CreateConnectionRequestContentEvernoteSandboxStrategy(Value.EVERNOTE_SANDBOX, "evernote-sandbox"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentEvernoteSandboxStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentEvernoteSandboxStrategy - && this.string.equals(((CreateConnectionRequestContentEvernoteSandboxStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EVERNOTE_SANDBOX: - return visitor.visitEvernoteSandbox(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentEvernoteSandboxStrategy valueOf(String value) { - switch (value) { - case "evernote-sandbox": - return EVERNOTE_SANDBOX; - default: - return new CreateConnectionRequestContentEvernoteSandboxStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - EVERNOTE_SANDBOX, - - UNKNOWN - } - - public interface Visitor { - T visitEvernoteSandbox(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernoteStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernoteStrategy.java deleted file mode 100644 index 2de7ed5b2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentEvernoteStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentEvernoteStrategy { - public static final CreateConnectionRequestContentEvernoteStrategy EVERNOTE = - new CreateConnectionRequestContentEvernoteStrategy(Value.EVERNOTE, "evernote"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentEvernoteStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentEvernoteStrategy - && this.string.equals(((CreateConnectionRequestContentEvernoteStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EVERNOTE: - return visitor.visitEvernote(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentEvernoteStrategy valueOf(String value) { - switch (value) { - case "evernote": - return EVERNOTE; - default: - return new CreateConnectionRequestContentEvernoteStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - EVERNOTE, - - UNKNOWN - } - - public interface Visitor { - T visitEvernote(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentExact.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentExact.java deleted file mode 100644 index b386a3dc4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentExact.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentExact.Builder.class) -public final class CreateConnectionRequestContentExact implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentExactStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentExact( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentExactStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentExactStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentExact - && equalTo((CreateConnectionRequestContentExact) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentExact other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentExactStrategy strategy); - - Builder from(CreateConnectionRequestContentExact other); - } - - public interface _FinalStage { - CreateConnectionRequestContentExact build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsExact options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentExactStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentExact other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentExactStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsExact options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentExact build() { - return new CreateConnectionRequestContentExact( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentExactStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentExactStrategy.java deleted file mode 100644 index 04dd46fec..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentExactStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentExactStrategy { - public static final CreateConnectionRequestContentExactStrategy EXACT = - new CreateConnectionRequestContentExactStrategy(Value.EXACT, "exact"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentExactStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentExactStrategy - && this.string.equals(((CreateConnectionRequestContentExactStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EXACT: - return visitor.visitExact(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentExactStrategy valueOf(String value) { - switch (value) { - case "exact": - return EXACT; - default: - return new CreateConnectionRequestContentExactStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - EXACT, - - UNKNOWN - } - - public interface Visitor { - T visitExact(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFacebook.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFacebook.java deleted file mode 100644 index a565efdca..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFacebook.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentFacebook.Builder.class) -public final class CreateConnectionRequestContentFacebook implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentFacebookStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentFacebook( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentFacebookStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentFacebookStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentFacebook - && equalTo((CreateConnectionRequestContentFacebook) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentFacebook other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentFacebookStrategy strategy); - - Builder from(CreateConnectionRequestContentFacebook other); - } - - public interface _FinalStage { - CreateConnectionRequestContentFacebook build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsFacebook options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentFacebookStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentFacebook other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentFacebookStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsFacebook options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentFacebook build() { - return new CreateConnectionRequestContentFacebook( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFacebookStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFacebookStrategy.java deleted file mode 100644 index 6a26d1cdd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFacebookStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentFacebookStrategy { - public static final CreateConnectionRequestContentFacebookStrategy FACEBOOK = - new CreateConnectionRequestContentFacebookStrategy(Value.FACEBOOK, "facebook"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentFacebookStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentFacebookStrategy - && this.string.equals(((CreateConnectionRequestContentFacebookStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FACEBOOK: - return visitor.visitFacebook(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentFacebookStrategy valueOf(String value) { - switch (value) { - case "facebook": - return FACEBOOK; - default: - return new CreateConnectionRequestContentFacebookStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - FACEBOOK, - - UNKNOWN - } - - public interface Visitor { - T visitFacebook(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFitbit.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFitbit.java deleted file mode 100644 index 12ee25644..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFitbit.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentFitbit.Builder.class) -public final class CreateConnectionRequestContentFitbit implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentFitbitStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentFitbit( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentFitbitStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentFitbitStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentFitbit - && equalTo((CreateConnectionRequestContentFitbit) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentFitbit other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentFitbitStrategy strategy); - - Builder from(CreateConnectionRequestContentFitbit other); - } - - public interface _FinalStage { - CreateConnectionRequestContentFitbit build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsFitbit options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentFitbitStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentFitbit other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentFitbitStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsFitbit options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentFitbit build() { - return new CreateConnectionRequestContentFitbit( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFitbitStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFitbitStrategy.java deleted file mode 100644 index ec9e943b5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFitbitStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentFitbitStrategy { - public static final CreateConnectionRequestContentFitbitStrategy FITBIT = - new CreateConnectionRequestContentFitbitStrategy(Value.FITBIT, "fitbit"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentFitbitStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentFitbitStrategy - && this.string.equals(((CreateConnectionRequestContentFitbitStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FITBIT: - return visitor.visitFitbit(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentFitbitStrategy valueOf(String value) { - switch (value) { - case "fitbit": - return FITBIT; - default: - return new CreateConnectionRequestContentFitbitStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - FITBIT, - - UNKNOWN - } - - public interface Visitor { - T visitFitbit(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFlickr.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFlickr.java deleted file mode 100644 index 184dd135a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFlickr.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentFlickr.Builder.class) -public final class CreateConnectionRequestContentFlickr implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentFlickrStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentFlickr( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentFlickrStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentFlickrStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentFlickr - && equalTo((CreateConnectionRequestContentFlickr) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentFlickr other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentFlickrStrategy strategy); - - Builder from(CreateConnectionRequestContentFlickr other); - } - - public interface _FinalStage { - CreateConnectionRequestContentFlickr build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsFlickr options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentFlickrStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentFlickr other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentFlickrStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsFlickr options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentFlickr build() { - return new CreateConnectionRequestContentFlickr( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFlickrStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFlickrStrategy.java deleted file mode 100644 index 28c502003..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentFlickrStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentFlickrStrategy { - public static final CreateConnectionRequestContentFlickrStrategy FLICKR = - new CreateConnectionRequestContentFlickrStrategy(Value.FLICKR, "flickr"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentFlickrStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentFlickrStrategy - && this.string.equals(((CreateConnectionRequestContentFlickrStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FLICKR: - return visitor.visitFlickr(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentFlickrStrategy valueOf(String value) { - switch (value) { - case "flickr": - return FLICKR; - default: - return new CreateConnectionRequestContentFlickrStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - FLICKR, - - UNKNOWN - } - - public interface Visitor { - T visitFlickr(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGitHub.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGitHub.java deleted file mode 100644 index 7d377cb58..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGitHub.java +++ /dev/null @@ -1,376 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentGitHub.Builder.class) -public final class CreateConnectionRequestContentGitHub - implements IConnectionPurposes, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentGitHubStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentGitHub( - Optional authentication, - Optional connectedAccounts, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentGitHubStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentGitHubStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentGitHub - && equalTo((CreateConnectionRequestContentGitHub) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentGitHub other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentGitHubStrategy strategy); - - Builder from(CreateConnectionRequestContentGitHub other); - } - - public interface _FinalStage { - CreateConnectionRequestContentGitHub build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsGitHub options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentGitHubStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentGitHub other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentGitHubStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsGitHub options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentGitHub build() { - return new CreateConnectionRequestContentGitHub( - authentication, - connectedAccounts, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGitHubStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGitHubStrategy.java deleted file mode 100644 index c4dfb43e2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGitHubStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentGitHubStrategy { - public static final CreateConnectionRequestContentGitHubStrategy GITHUB = - new CreateConnectionRequestContentGitHubStrategy(Value.GITHUB, "github"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentGitHubStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentGitHubStrategy - && this.string.equals(((CreateConnectionRequestContentGitHubStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GITHUB: - return visitor.visitGithub(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentGitHubStrategy valueOf(String value) { - switch (value) { - case "github": - return GITHUB; - default: - return new CreateConnectionRequestContentGitHubStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - GITHUB, - - UNKNOWN - } - - public interface Visitor { - T visitGithub(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleApps.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleApps.java deleted file mode 100644 index a9d097917..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleApps.java +++ /dev/null @@ -1,341 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentGoogleApps.Builder.class) -public final class CreateConnectionRequestContentGoogleApps implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentGoogleAppsStrategy strategy; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private CreateConnectionRequestContentGoogleApps( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentGoogleAppsStrategy strategy, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentGoogleAppsStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentGoogleApps - && equalTo((CreateConnectionRequestContentGoogleApps) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentGoogleApps other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentGoogleAppsStrategy strategy); - - Builder from(CreateConnectionRequestContentGoogleApps other); - } - - public interface _FinalStage { - CreateConnectionRequestContentGoogleApps build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsGoogleApps options); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentGoogleAppsStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentGoogleApps other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentGoogleAppsStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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(ConnectionOptionsGoogleApps options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentGoogleApps build() { - return new CreateConnectionRequestContentGoogleApps( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleAppsStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleAppsStrategy.java deleted file mode 100644 index 1f7ed900c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleAppsStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentGoogleAppsStrategy { - public static final CreateConnectionRequestContentGoogleAppsStrategy GOOGLE_APPS = - new CreateConnectionRequestContentGoogleAppsStrategy(Value.GOOGLE_APPS, "google-apps"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentGoogleAppsStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentGoogleAppsStrategy - && this.string.equals(((CreateConnectionRequestContentGoogleAppsStrategy) 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 CreateConnectionRequestContentGoogleAppsStrategy valueOf(String value) { - switch (value) { - case "google-apps": - return GOOGLE_APPS; - default: - return new CreateConnectionRequestContentGoogleAppsStrategy(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/CreateConnectionRequestContentGoogleOAuth2.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleOAuth2.java deleted file mode 100644 index a98522f26..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleOAuth2.java +++ /dev/null @@ -1,376 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentGoogleOAuth2.Builder.class) -public final class CreateConnectionRequestContentGoogleOAuth2 - implements IConnectionPurposes, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentGoogleOAuth2Strategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentGoogleOAuth2( - Optional authentication, - Optional connectedAccounts, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentGoogleOAuth2Strategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentGoogleOAuth2Strategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentGoogleOAuth2 - && equalTo((CreateConnectionRequestContentGoogleOAuth2) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentGoogleOAuth2 other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentGoogleOAuth2Strategy strategy); - - Builder from(CreateConnectionRequestContentGoogleOAuth2 other); - } - - public interface _FinalStage { - CreateConnectionRequestContentGoogleOAuth2 build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsGoogleOAuth2 options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentGoogleOAuth2Strategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentGoogleOAuth2 other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentGoogleOAuth2Strategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsGoogleOAuth2 options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentGoogleOAuth2 build() { - return new CreateConnectionRequestContentGoogleOAuth2( - authentication, - connectedAccounts, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleOAuth2Strategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleOAuth2Strategy.java deleted file mode 100644 index 1485c1717..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentGoogleOAuth2Strategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentGoogleOAuth2Strategy { - public static final CreateConnectionRequestContentGoogleOAuth2Strategy GOOGLE_OAUTH2 = - new CreateConnectionRequestContentGoogleOAuth2Strategy(Value.GOOGLE_OAUTH2, "google-oauth2"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentGoogleOAuth2Strategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentGoogleOAuth2Strategy - && this.string.equals(((CreateConnectionRequestContentGoogleOAuth2Strategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GOOGLE_OAUTH2: - return visitor.visitGoogleOauth2(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentGoogleOAuth2Strategy valueOf(String value) { - switch (value) { - case "google-oauth2": - return GOOGLE_OAUTH2; - default: - return new CreateConnectionRequestContentGoogleOAuth2Strategy(Value.UNKNOWN, value); - } - } - - public enum Value { - GOOGLE_OAUTH2, - - UNKNOWN - } - - public interface Visitor { - T visitGoogleOauth2(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentInstagram.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentInstagram.java deleted file mode 100644 index c379d8906..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentInstagram.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentInstagram.Builder.class) -public final class CreateConnectionRequestContentInstagram implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentInstagramStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentInstagram( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentInstagramStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentInstagramStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentInstagram - && equalTo((CreateConnectionRequestContentInstagram) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentInstagram other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentInstagramStrategy strategy); - - Builder from(CreateConnectionRequestContentInstagram other); - } - - public interface _FinalStage { - CreateConnectionRequestContentInstagram build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsInstagram options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentInstagramStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentInstagram other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentInstagramStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsInstagram options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentInstagram build() { - return new CreateConnectionRequestContentInstagram( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentInstagramStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentInstagramStrategy.java deleted file mode 100644 index 9be47cfea..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentInstagramStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentInstagramStrategy { - public static final CreateConnectionRequestContentInstagramStrategy INSTAGRAM = - new CreateConnectionRequestContentInstagramStrategy(Value.INSTAGRAM, "instagram"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentInstagramStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentInstagramStrategy - && this.string.equals(((CreateConnectionRequestContentInstagramStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case INSTAGRAM: - return visitor.visitInstagram(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentInstagramStrategy valueOf(String value) { - switch (value) { - case "instagram": - return INSTAGRAM; - default: - return new CreateConnectionRequestContentInstagramStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - INSTAGRAM, - - UNKNOWN - } - - public interface Visitor { - T visitInstagram(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentIp.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentIp.java deleted file mode 100644 index f284b1ad3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentIp.java +++ /dev/null @@ -1,340 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentIp.Builder.class) -public final class CreateConnectionRequestContentIp implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentIpStrategy strategy; - - private final Optional> options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private CreateConnectionRequestContentIp( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentIpStrategy strategy, - Optional> options, - Optional showAsButton, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentIpStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentIp && equalTo((CreateConnectionRequestContentIp) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentIp other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentIpStrategy strategy); - - Builder from(CreateConnectionRequestContentIp other); - } - - public interface _FinalStage { - CreateConnectionRequestContentIp build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional> options); - - _FinalStage options(Map options); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentIpStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional> options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentIp other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentIpStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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(Map options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional> options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentIp build() { - return new CreateConnectionRequestContentIp( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentIpStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentIpStrategy.java deleted file mode 100644 index 05a8e8272..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentIpStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentIpStrategy { - public static final CreateConnectionRequestContentIpStrategy IP = - new CreateConnectionRequestContentIpStrategy(Value.IP, "ip"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentIpStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentIpStrategy - && this.string.equals(((CreateConnectionRequestContentIpStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case IP: - return visitor.visitIp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentIpStrategy valueOf(String value) { - switch (value) { - case "ip": - return IP; - default: - return new CreateConnectionRequestContentIpStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - IP, - - UNKNOWN - } - - public interface Visitor { - T visitIp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLine.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLine.java deleted file mode 100644 index 0f274f572..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLine.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentLine.Builder.class) -public final class CreateConnectionRequestContentLine implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentLineStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentLine( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentLineStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentLineStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentLine - && equalTo((CreateConnectionRequestContentLine) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentLine other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentLineStrategy strategy); - - Builder from(CreateConnectionRequestContentLine other); - } - - public interface _FinalStage { - CreateConnectionRequestContentLine build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsLine options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentLineStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentLine other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentLineStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsLine options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentLine build() { - return new CreateConnectionRequestContentLine( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLineStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLineStrategy.java deleted file mode 100644 index 0c7a53faa..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLineStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentLineStrategy { - public static final CreateConnectionRequestContentLineStrategy LINE = - new CreateConnectionRequestContentLineStrategy(Value.LINE, "line"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentLineStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentLineStrategy - && this.string.equals(((CreateConnectionRequestContentLineStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case LINE: - return visitor.visitLine(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentLineStrategy valueOf(String value) { - switch (value) { - case "line": - return LINE; - default: - return new CreateConnectionRequestContentLineStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - LINE, - - UNKNOWN - } - - public interface Visitor { - T visitLine(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLinkedin.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLinkedin.java deleted file mode 100644 index 51d626324..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLinkedin.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentLinkedin.Builder.class) -public final class CreateConnectionRequestContentLinkedin implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentLinkedinStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentLinkedin( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentLinkedinStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentLinkedinStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentLinkedin - && equalTo((CreateConnectionRequestContentLinkedin) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentLinkedin other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentLinkedinStrategy strategy); - - Builder from(CreateConnectionRequestContentLinkedin other); - } - - public interface _FinalStage { - CreateConnectionRequestContentLinkedin build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsLinkedin options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentLinkedinStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentLinkedin other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentLinkedinStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsLinkedin options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentLinkedin build() { - return new CreateConnectionRequestContentLinkedin( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLinkedinStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLinkedinStrategy.java deleted file mode 100644 index f624ec1de..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentLinkedinStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentLinkedinStrategy { - public static final CreateConnectionRequestContentLinkedinStrategy LINKEDIN = - new CreateConnectionRequestContentLinkedinStrategy(Value.LINKEDIN, "linkedin"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentLinkedinStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentLinkedinStrategy - && this.string.equals(((CreateConnectionRequestContentLinkedinStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case LINKEDIN: - return visitor.visitLinkedin(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentLinkedinStrategy valueOf(String value) { - switch (value) { - case "linkedin": - return LINKEDIN; - default: - return new CreateConnectionRequestContentLinkedinStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - LINKEDIN, - - UNKNOWN - } - - public interface Visitor { - T visitLinkedin(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentMiicard.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentMiicard.java deleted file mode 100644 index 4ca4cf2c2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentMiicard.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentMiicard.Builder.class) -public final class CreateConnectionRequestContentMiicard implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentMiicardStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentMiicard( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentMiicardStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentMiicardStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentMiicard - && equalTo((CreateConnectionRequestContentMiicard) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentMiicard other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentMiicardStrategy strategy); - - Builder from(CreateConnectionRequestContentMiicard other); - } - - public interface _FinalStage { - CreateConnectionRequestContentMiicard build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsMiicard options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentMiicardStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentMiicard other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentMiicardStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsMiicard options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentMiicard build() { - return new CreateConnectionRequestContentMiicard( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentMiicardStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentMiicardStrategy.java deleted file mode 100644 index 606bb060c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentMiicardStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentMiicardStrategy { - public static final CreateConnectionRequestContentMiicardStrategy MIICARD = - new CreateConnectionRequestContentMiicardStrategy(Value.MIICARD, "miicard"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentMiicardStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentMiicardStrategy - && this.string.equals(((CreateConnectionRequestContentMiicardStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MIICARD: - return visitor.visitMiicard(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentMiicardStrategy valueOf(String value) { - switch (value) { - case "miicard": - return MIICARD; - default: - return new CreateConnectionRequestContentMiicardStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - MIICARD, - - UNKNOWN - } - - public interface Visitor { - T visitMiicard(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth1.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth1.java deleted file mode 100644 index 38faf9147..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth1.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentOAuth1.Builder.class) -public final class CreateConnectionRequestContentOAuth1 implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentOAuth1Strategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentOAuth1( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentOAuth1Strategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentOAuth1Strategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentOAuth1 - && equalTo((CreateConnectionRequestContentOAuth1) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentOAuth1 other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentOAuth1Strategy strategy); - - Builder from(CreateConnectionRequestContentOAuth1 other); - } - - public interface _FinalStage { - CreateConnectionRequestContentOAuth1 build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsOAuth1 options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentOAuth1Strategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentOAuth1 other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentOAuth1Strategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsOAuth1 options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentOAuth1 build() { - return new CreateConnectionRequestContentOAuth1( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth1Strategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth1Strategy.java deleted file mode 100644 index 8931f0ed8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth1Strategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentOAuth1Strategy { - public static final CreateConnectionRequestContentOAuth1Strategy OAUTH1 = - new CreateConnectionRequestContentOAuth1Strategy(Value.OAUTH1, "oauth1"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentOAuth1Strategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentOAuth1Strategy - && this.string.equals(((CreateConnectionRequestContentOAuth1Strategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case OAUTH1: - return visitor.visitOauth1(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentOAuth1Strategy valueOf(String value) { - switch (value) { - case "oauth1": - return OAUTH1; - default: - return new CreateConnectionRequestContentOAuth1Strategy(Value.UNKNOWN, value); - } - } - - public enum Value { - OAUTH1, - - UNKNOWN - } - - public interface Visitor { - T visitOauth1(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth2.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth2.java deleted file mode 100644 index c2f3f7c23..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth2.java +++ /dev/null @@ -1,376 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentOAuth2.Builder.class) -public final class CreateConnectionRequestContentOAuth2 - implements IConnectionPurposes, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentOAuth2Strategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentOAuth2( - Optional authentication, - Optional connectedAccounts, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentOAuth2Strategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentOAuth2Strategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentOAuth2 - && equalTo((CreateConnectionRequestContentOAuth2) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentOAuth2 other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentOAuth2Strategy strategy); - - Builder from(CreateConnectionRequestContentOAuth2 other); - } - - public interface _FinalStage { - CreateConnectionRequestContentOAuth2 build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsOAuth2 options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentOAuth2Strategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentOAuth2 other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentOAuth2Strategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsOAuth2 options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentOAuth2 build() { - return new CreateConnectionRequestContentOAuth2( - authentication, - connectedAccounts, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth2Strategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth2Strategy.java deleted file mode 100644 index a34fb62d5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOAuth2Strategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentOAuth2Strategy { - public static final CreateConnectionRequestContentOAuth2Strategy OAUTH2 = - new CreateConnectionRequestContentOAuth2Strategy(Value.OAUTH2, "oauth2"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentOAuth2Strategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentOAuth2Strategy - && this.string.equals(((CreateConnectionRequestContentOAuth2Strategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case OAUTH2: - return visitor.visitOauth2(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentOAuth2Strategy valueOf(String value) { - switch (value) { - case "oauth2": - return OAUTH2; - default: - return new CreateConnectionRequestContentOAuth2Strategy(Value.UNKNOWN, value); - } - } - - public enum Value { - OAUTH2, - - UNKNOWN - } - - public interface Visitor { - T visitOauth2(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOffice365.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOffice365.java deleted file mode 100644 index 71f320c16..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOffice365.java +++ /dev/null @@ -1,341 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentOffice365.Builder.class) -public final class CreateConnectionRequestContentOffice365 implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentOffice365Strategy strategy; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private CreateConnectionRequestContentOffice365( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentOffice365Strategy strategy, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentOffice365Strategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentOffice365 - && equalTo((CreateConnectionRequestContentOffice365) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentOffice365 other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentOffice365Strategy strategy); - - Builder from(CreateConnectionRequestContentOffice365 other); - } - - public interface _FinalStage { - CreateConnectionRequestContentOffice365 build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsOffice365 options); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentOffice365Strategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentOffice365 other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentOffice365Strategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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(ConnectionOptionsOffice365 options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentOffice365 build() { - return new CreateConnectionRequestContentOffice365( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOffice365Strategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOffice365Strategy.java deleted file mode 100644 index e2da987e8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOffice365Strategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentOffice365Strategy { - public static final CreateConnectionRequestContentOffice365Strategy OFFICE365 = - new CreateConnectionRequestContentOffice365Strategy(Value.OFFICE365, "office365"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentOffice365Strategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentOffice365Strategy - && this.string.equals(((CreateConnectionRequestContentOffice365Strategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case OFFICE365: - return visitor.visitOffice365(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentOffice365Strategy valueOf(String value) { - switch (value) { - case "office365": - return OFFICE365; - default: - return new CreateConnectionRequestContentOffice365Strategy(Value.UNKNOWN, value); - } - } - - public enum Value { - OFFICE365, - - UNKNOWN - } - - public interface Visitor { - T visitOffice365(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidc.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidc.java deleted file mode 100644 index 8b12c9206..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidc.java +++ /dev/null @@ -1,405 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentOidc.Builder.class) -public final class CreateConnectionRequestContentOidc implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentOidcStrategy strategy; - - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private CreateConnectionRequestContentOidc( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentOidcStrategy strategy, - Optional authentication, - Optional connectedAccounts, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentOidcStrategy getStrategy() { - return strategy; - } - - @JsonProperty("authentication") - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentOidc - && equalTo((CreateConnectionRequestContentOidc) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentOidc other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.authentication, - this.connectedAccounts, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentOidcStrategy strategy); - - Builder from(CreateConnectionRequestContentOidc other); - } - - public interface _FinalStage { - CreateConnectionRequestContentOidc build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurposeXaa connectedAccounts); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsOidc options); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentOidcStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentOidc other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentOidcStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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(ConnectionOptionsOidc 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(ConnectionConnectedAccountsPurposeXaa connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentOidc build() { - return new CreateConnectionRequestContentOidc( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - authentication, - connectedAccounts, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidcStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidcStrategy.java deleted file mode 100644 index c8e7ae18c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOidcStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentOidcStrategy { - public static final CreateConnectionRequestContentOidcStrategy OIDC = - new CreateConnectionRequestContentOidcStrategy(Value.OIDC, "oidc"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentOidcStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentOidcStrategy - && this.string.equals(((CreateConnectionRequestContentOidcStrategy) 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 CreateConnectionRequestContentOidcStrategy valueOf(String value) { - switch (value) { - case "oidc": - return OIDC; - default: - return new CreateConnectionRequestContentOidcStrategy(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/CreateConnectionRequestContentOkta.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOkta.java deleted file mode 100644 index 46145dc3e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOkta.java +++ /dev/null @@ -1,341 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentOkta.Builder.class) -public final class CreateConnectionRequestContentOkta implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentOktaStrategy strategy; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private CreateConnectionRequestContentOkta( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentOktaStrategy strategy, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentOktaStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentOkta - && equalTo((CreateConnectionRequestContentOkta) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentOkta other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentOktaStrategy strategy); - - Builder from(CreateConnectionRequestContentOkta other); - } - - public interface _FinalStage { - CreateConnectionRequestContentOkta build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsOkta options); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentOktaStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentOkta other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentOktaStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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(ConnectionOptionsOkta options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentOkta build() { - return new CreateConnectionRequestContentOkta( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOktaStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOktaStrategy.java deleted file mode 100644 index 736508a1a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentOktaStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentOktaStrategy { - public static final CreateConnectionRequestContentOktaStrategy OKTA = - new CreateConnectionRequestContentOktaStrategy(Value.OKTA, "okta"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentOktaStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentOktaStrategy - && this.string.equals(((CreateConnectionRequestContentOktaStrategy) 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 CreateConnectionRequestContentOktaStrategy valueOf(String value) { - switch (value) { - case "okta": - return OKTA; - default: - return new CreateConnectionRequestContentOktaStrategy(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/CreateConnectionRequestContentPaypal.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypal.java deleted file mode 100644 index 08b5d4c78..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypal.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentPaypal.Builder.class) -public final class CreateConnectionRequestContentPaypal implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentPaypalStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentPaypal( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentPaypalStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentPaypalStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentPaypal - && equalTo((CreateConnectionRequestContentPaypal) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentPaypal other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentPaypalStrategy strategy); - - Builder from(CreateConnectionRequestContentPaypal other); - } - - public interface _FinalStage { - CreateConnectionRequestContentPaypal build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsPaypal options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentPaypalStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentPaypal other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentPaypalStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsPaypal options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentPaypal build() { - return new CreateConnectionRequestContentPaypal( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypalSandbox.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypalSandbox.java deleted file mode 100644 index 63e767dcf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypalSandbox.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentPaypalSandbox.Builder.class) -public final class CreateConnectionRequestContentPaypalSandbox implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentPaypalSandboxStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentPaypalSandbox( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentPaypalSandboxStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentPaypalSandboxStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentPaypalSandbox - && equalTo((CreateConnectionRequestContentPaypalSandbox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentPaypalSandbox other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentPaypalSandboxStrategy strategy); - - Builder from(CreateConnectionRequestContentPaypalSandbox other); - } - - public interface _FinalStage { - CreateConnectionRequestContentPaypalSandbox build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsPaypal options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentPaypalSandboxStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentPaypalSandbox other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentPaypalSandboxStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsPaypal options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentPaypalSandbox build() { - return new CreateConnectionRequestContentPaypalSandbox( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypalSandboxStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypalSandboxStrategy.java deleted file mode 100644 index cc0ead0cc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypalSandboxStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentPaypalSandboxStrategy { - public static final CreateConnectionRequestContentPaypalSandboxStrategy PAYPAL_SANDBOX = - new CreateConnectionRequestContentPaypalSandboxStrategy(Value.PAYPAL_SANDBOX, "paypal-sandbox"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentPaypalSandboxStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentPaypalSandboxStrategy - && this.string.equals(((CreateConnectionRequestContentPaypalSandboxStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PAYPAL_SANDBOX: - return visitor.visitPaypalSandbox(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentPaypalSandboxStrategy valueOf(String value) { - switch (value) { - case "paypal-sandbox": - return PAYPAL_SANDBOX; - default: - return new CreateConnectionRequestContentPaypalSandboxStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - PAYPAL_SANDBOX, - - UNKNOWN - } - - public interface Visitor { - T visitPaypalSandbox(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypalStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypalStrategy.java deleted file mode 100644 index 4d0b5cb75..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPaypalStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentPaypalStrategy { - public static final CreateConnectionRequestContentPaypalStrategy PAYPAL = - new CreateConnectionRequestContentPaypalStrategy(Value.PAYPAL, "paypal"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentPaypalStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentPaypalStrategy - && this.string.equals(((CreateConnectionRequestContentPaypalStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PAYPAL: - return visitor.visitPaypal(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentPaypalStrategy valueOf(String value) { - switch (value) { - case "paypal": - return PAYPAL; - default: - return new CreateConnectionRequestContentPaypalStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - PAYPAL, - - UNKNOWN - } - - public interface Visitor { - T visitPaypal(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPingFederate.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPingFederate.java deleted file mode 100644 index b4db01e8f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPingFederate.java +++ /dev/null @@ -1,341 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentPingFederate.Builder.class) -public final class CreateConnectionRequestContentPingFederate implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentPingFederateStrategy strategy; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private CreateConnectionRequestContentPingFederate( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentPingFederateStrategy strategy, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentPingFederateStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentPingFederate - && equalTo((CreateConnectionRequestContentPingFederate) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentPingFederate other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentPingFederateStrategy strategy); - - Builder from(CreateConnectionRequestContentPingFederate other); - } - - public interface _FinalStage { - CreateConnectionRequestContentPingFederate build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsPingFederate options); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentPingFederateStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentPingFederate other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentPingFederateStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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(ConnectionOptionsPingFederate options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentPingFederate build() { - return new CreateConnectionRequestContentPingFederate( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPingFederateStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPingFederateStrategy.java deleted file mode 100644 index 5ca362338..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPingFederateStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentPingFederateStrategy { - public static final CreateConnectionRequestContentPingFederateStrategy PINGFEDERATE = - new CreateConnectionRequestContentPingFederateStrategy(Value.PINGFEDERATE, "pingfederate"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentPingFederateStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentPingFederateStrategy - && this.string.equals(((CreateConnectionRequestContentPingFederateStrategy) 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 CreateConnectionRequestContentPingFederateStrategy valueOf(String value) { - switch (value) { - case "pingfederate": - return PINGFEDERATE; - default: - return new CreateConnectionRequestContentPingFederateStrategy(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/CreateConnectionRequestContentPlanningCenter.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPlanningCenter.java deleted file mode 100644 index e395eeb35..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPlanningCenter.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentPlanningCenter.Builder.class) -public final class CreateConnectionRequestContentPlanningCenter implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentPlanningCenterStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentPlanningCenter( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentPlanningCenterStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentPlanningCenterStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentPlanningCenter - && equalTo((CreateConnectionRequestContentPlanningCenter) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentPlanningCenter other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentPlanningCenterStrategy strategy); - - Builder from(CreateConnectionRequestContentPlanningCenter other); - } - - public interface _FinalStage { - CreateConnectionRequestContentPlanningCenter build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsPlanningCenter options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentPlanningCenterStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentPlanningCenter other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentPlanningCenterStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsPlanningCenter options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentPlanningCenter build() { - return new CreateConnectionRequestContentPlanningCenter( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPlanningCenterStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPlanningCenterStrategy.java deleted file mode 100644 index 73c2ec657..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentPlanningCenterStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentPlanningCenterStrategy { - public static final CreateConnectionRequestContentPlanningCenterStrategy PLANNINGCENTER = - new CreateConnectionRequestContentPlanningCenterStrategy(Value.PLANNINGCENTER, "planningcenter"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentPlanningCenterStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentPlanningCenterStrategy - && this.string.equals(((CreateConnectionRequestContentPlanningCenterStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PLANNINGCENTER: - return visitor.visitPlanningcenter(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentPlanningCenterStrategy valueOf(String value) { - switch (value) { - case "planningcenter": - return PLANNINGCENTER; - default: - return new CreateConnectionRequestContentPlanningCenterStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - PLANNINGCENTER, - - UNKNOWN - } - - public interface Visitor { - T visitPlanningcenter(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentRenren.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentRenren.java deleted file mode 100644 index 48c2259f8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentRenren.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentRenren.Builder.class) -public final class CreateConnectionRequestContentRenren implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentRenrenStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentRenren( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentRenrenStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentRenrenStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentRenren - && equalTo((CreateConnectionRequestContentRenren) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentRenren other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentRenrenStrategy strategy); - - Builder from(CreateConnectionRequestContentRenren other); - } - - public interface _FinalStage { - CreateConnectionRequestContentRenren build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsRenren options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentRenrenStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentRenren other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentRenrenStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsRenren options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentRenren build() { - return new CreateConnectionRequestContentRenren( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentRenrenStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentRenrenStrategy.java deleted file mode 100644 index bbca7fd25..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentRenrenStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentRenrenStrategy { - public static final CreateConnectionRequestContentRenrenStrategy RENREN = - new CreateConnectionRequestContentRenrenStrategy(Value.RENREN, "renren"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentRenrenStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentRenrenStrategy - && this.string.equals(((CreateConnectionRequestContentRenrenStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case RENREN: - return visitor.visitRenren(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentRenrenStrategy valueOf(String value) { - switch (value) { - case "renren": - return RENREN; - default: - return new CreateConnectionRequestContentRenrenStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - RENREN, - - UNKNOWN - } - - public interface Visitor { - T visitRenren(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforce.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforce.java deleted file mode 100644 index af2ee2fba..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforce.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentSalesforce.Builder.class) -public final class CreateConnectionRequestContentSalesforce implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentSalesforceStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentSalesforce( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentSalesforceStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentSalesforceStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentSalesforce - && equalTo((CreateConnectionRequestContentSalesforce) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentSalesforce other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentSalesforceStrategy strategy); - - Builder from(CreateConnectionRequestContentSalesforce other); - } - - public interface _FinalStage { - CreateConnectionRequestContentSalesforce build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsSalesforce options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentSalesforceStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentSalesforce other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentSalesforceStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsSalesforce options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentSalesforce build() { - return new CreateConnectionRequestContentSalesforce( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceCommunity.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceCommunity.java deleted file mode 100644 index 8d5db0969..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceCommunity.java +++ /dev/null @@ -1,310 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentSalesforceCommunity.Builder.class) -public final class CreateConnectionRequestContentSalesforceCommunity - implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentSalesforceCommunityStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentSalesforceCommunity( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentSalesforceCommunityStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentSalesforceCommunityStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentSalesforceCommunity - && equalTo((CreateConnectionRequestContentSalesforceCommunity) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentSalesforceCommunity other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentSalesforceCommunityStrategy strategy); - - Builder from(CreateConnectionRequestContentSalesforceCommunity other); - } - - public interface _FinalStage { - CreateConnectionRequestContentSalesforceCommunity build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsSalesforceCommunity options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentSalesforceCommunityStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentSalesforceCommunity other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentSalesforceCommunityStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsSalesforceCommunity options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentSalesforceCommunity build() { - return new CreateConnectionRequestContentSalesforceCommunity( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceCommunityStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceCommunityStrategy.java deleted file mode 100644 index 9b4cfd912..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceCommunityStrategy.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentSalesforceCommunityStrategy { - public static final CreateConnectionRequestContentSalesforceCommunityStrategy SALESFORCE_COMMUNITY = - new CreateConnectionRequestContentSalesforceCommunityStrategy( - Value.SALESFORCE_COMMUNITY, "salesforce-community"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentSalesforceCommunityStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentSalesforceCommunityStrategy - && this.string.equals( - ((CreateConnectionRequestContentSalesforceCommunityStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SALESFORCE_COMMUNITY: - return visitor.visitSalesforceCommunity(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentSalesforceCommunityStrategy valueOf(String value) { - switch (value) { - case "salesforce-community": - return SALESFORCE_COMMUNITY; - default: - return new CreateConnectionRequestContentSalesforceCommunityStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - SALESFORCE_COMMUNITY, - - UNKNOWN - } - - public interface Visitor { - T visitSalesforceCommunity(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceSandbox.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceSandbox.java deleted file mode 100644 index 397d81978..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceSandbox.java +++ /dev/null @@ -1,310 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentSalesforceSandbox.Builder.class) -public final class CreateConnectionRequestContentSalesforceSandbox - implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentSalesforceSandboxStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentSalesforceSandbox( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentSalesforceSandboxStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentSalesforceSandboxStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentSalesforceSandbox - && equalTo((CreateConnectionRequestContentSalesforceSandbox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentSalesforceSandbox other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentSalesforceSandboxStrategy strategy); - - Builder from(CreateConnectionRequestContentSalesforceSandbox other); - } - - public interface _FinalStage { - CreateConnectionRequestContentSalesforceSandbox build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsSalesforce options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentSalesforceSandboxStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentSalesforceSandbox other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentSalesforceSandboxStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsSalesforce options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentSalesforceSandbox build() { - return new CreateConnectionRequestContentSalesforceSandbox( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceSandboxStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceSandboxStrategy.java deleted file mode 100644 index 619b72242..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceSandboxStrategy.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentSalesforceSandboxStrategy { - public static final CreateConnectionRequestContentSalesforceSandboxStrategy SALESFORCE_SANDBOX = - new CreateConnectionRequestContentSalesforceSandboxStrategy(Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentSalesforceSandboxStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentSalesforceSandboxStrategy - && this.string.equals( - ((CreateConnectionRequestContentSalesforceSandboxStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SALESFORCE_SANDBOX: - return visitor.visitSalesforceSandbox(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentSalesforceSandboxStrategy valueOf(String value) { - switch (value) { - case "salesforce-sandbox": - return SALESFORCE_SANDBOX; - default: - return new CreateConnectionRequestContentSalesforceSandboxStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - SALESFORCE_SANDBOX, - - UNKNOWN - } - - public interface Visitor { - T visitSalesforceSandbox(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceStrategy.java deleted file mode 100644 index 3727fb806..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSalesforceStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentSalesforceStrategy { - public static final CreateConnectionRequestContentSalesforceStrategy SALESFORCE = - new CreateConnectionRequestContentSalesforceStrategy(Value.SALESFORCE, "salesforce"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentSalesforceStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentSalesforceStrategy - && this.string.equals(((CreateConnectionRequestContentSalesforceStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SALESFORCE: - return visitor.visitSalesforce(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentSalesforceStrategy valueOf(String value) { - switch (value) { - case "salesforce": - return SALESFORCE; - default: - return new CreateConnectionRequestContentSalesforceStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - SALESFORCE, - - UNKNOWN - } - - public interface Visitor { - T visitSalesforce(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSaml.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSaml.java deleted file mode 100644 index d9c3b581f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSaml.java +++ /dev/null @@ -1,341 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentSaml.Builder.class) -public final class CreateConnectionRequestContentSaml implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentSamlStrategy strategy; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private CreateConnectionRequestContentSaml( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentSamlStrategy strategy, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentSamlStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentSaml - && equalTo((CreateConnectionRequestContentSaml) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentSaml other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentSamlStrategy strategy); - - Builder from(CreateConnectionRequestContentSaml other); - } - - public interface _FinalStage { - CreateConnectionRequestContentSaml build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsSaml options); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentSamlStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentSaml other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentSamlStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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(ConnectionOptionsSaml options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentSaml build() { - return new CreateConnectionRequestContentSaml( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSamlStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSamlStrategy.java deleted file mode 100644 index 931a84b5b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSamlStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentSamlStrategy { - public static final CreateConnectionRequestContentSamlStrategy SAMLP = - new CreateConnectionRequestContentSamlStrategy(Value.SAMLP, "samlp"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentSamlStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentSamlStrategy - && this.string.equals(((CreateConnectionRequestContentSamlStrategy) 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 CreateConnectionRequestContentSamlStrategy valueOf(String value) { - switch (value) { - case "samlp": - return SAMLP; - default: - return new CreateConnectionRequestContentSamlStrategy(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/CreateConnectionRequestContentSharepoint.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSharepoint.java deleted file mode 100644 index 37163ff30..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSharepoint.java +++ /dev/null @@ -1,341 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentSharepoint.Builder.class) -public final class CreateConnectionRequestContentSharepoint implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentSharepointStrategy strategy; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private CreateConnectionRequestContentSharepoint( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentSharepointStrategy strategy, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentSharepointStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentSharepoint - && equalTo((CreateConnectionRequestContentSharepoint) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentSharepoint other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentSharepointStrategy strategy); - - Builder from(CreateConnectionRequestContentSharepoint other); - } - - public interface _FinalStage { - CreateConnectionRequestContentSharepoint build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsSharepoint options); - - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentSharepointStrategy strategy; - - private Optional showAsButton = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentSharepoint other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentSharepointStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @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(ConnectionOptionsSharepoint options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentSharepoint build() { - return new CreateConnectionRequestContentSharepoint( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSharepointStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSharepointStrategy.java deleted file mode 100644 index 4f2cbd681..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSharepointStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentSharepointStrategy { - public static final CreateConnectionRequestContentSharepointStrategy SHAREPOINT = - new CreateConnectionRequestContentSharepointStrategy(Value.SHAREPOINT, "sharepoint"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentSharepointStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentSharepointStrategy - && this.string.equals(((CreateConnectionRequestContentSharepointStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SHAREPOINT: - return visitor.visitSharepoint(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentSharepointStrategy valueOf(String value) { - switch (value) { - case "sharepoint": - return SHAREPOINT; - default: - return new CreateConnectionRequestContentSharepointStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - SHAREPOINT, - - UNKNOWN - } - - public interface Visitor { - T visitSharepoint(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShop.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShop.java deleted file mode 100644 index 5c84a7e1f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShop.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentShop.Builder.class) -public final class CreateConnectionRequestContentShop implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentShopStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentShop( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentShopStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentShopStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentShop - && equalTo((CreateConnectionRequestContentShop) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentShop other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentShopStrategy strategy); - - Builder from(CreateConnectionRequestContentShop other); - } - - public interface _FinalStage { - CreateConnectionRequestContentShop build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsShop options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentShopStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentShop other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentShopStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsShop options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentShop build() { - return new CreateConnectionRequestContentShop( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShopStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShopStrategy.java deleted file mode 100644 index ffa0eeb5a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShopStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentShopStrategy { - public static final CreateConnectionRequestContentShopStrategy SHOP = - new CreateConnectionRequestContentShopStrategy(Value.SHOP, "shop"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentShopStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentShopStrategy - && this.string.equals(((CreateConnectionRequestContentShopStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SHOP: - return visitor.visitShop(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentShopStrategy valueOf(String value) { - switch (value) { - case "shop": - return SHOP; - default: - return new CreateConnectionRequestContentShopStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - SHOP, - - UNKNOWN - } - - public interface Visitor { - T visitShop(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShopify.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShopify.java deleted file mode 100644 index c1fd8d825..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShopify.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentShopify.Builder.class) -public final class CreateConnectionRequestContentShopify implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentShopifyStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentShopify( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentShopifyStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentShopifyStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentShopify - && equalTo((CreateConnectionRequestContentShopify) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentShopify other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentShopifyStrategy strategy); - - Builder from(CreateConnectionRequestContentShopify other); - } - - public interface _FinalStage { - CreateConnectionRequestContentShopify build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsShopify options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentShopifyStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentShopify other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentShopifyStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsShopify options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentShopify build() { - return new CreateConnectionRequestContentShopify( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShopifyStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShopifyStrategy.java deleted file mode 100644 index c277b49f8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentShopifyStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentShopifyStrategy { - public static final CreateConnectionRequestContentShopifyStrategy SHOPIFY = - new CreateConnectionRequestContentShopifyStrategy(Value.SHOPIFY, "shopify"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentShopifyStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentShopifyStrategy - && this.string.equals(((CreateConnectionRequestContentShopifyStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SHOPIFY: - return visitor.visitShopify(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentShopifyStrategy valueOf(String value) { - switch (value) { - case "shopify": - return SHOPIFY; - default: - return new CreateConnectionRequestContentShopifyStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - SHOPIFY, - - UNKNOWN - } - - public interface Visitor { - T visitShopify(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSms.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSms.java deleted file mode 100644 index 6d62e3f7d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSms.java +++ /dev/null @@ -1,308 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentSms.Builder.class) -public final class CreateConnectionRequestContentSms implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentSmsStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentSms( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentSmsStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentSmsStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentSms && equalTo((CreateConnectionRequestContentSms) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentSms other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentSmsStrategy strategy); - - Builder from(CreateConnectionRequestContentSms other); - } - - public interface _FinalStage { - CreateConnectionRequestContentSms build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsSms options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentSmsStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentSms other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentSmsStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsSms options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentSms build() { - return new CreateConnectionRequestContentSms( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSmsStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSmsStrategy.java deleted file mode 100644 index 220cb5f24..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSmsStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentSmsStrategy { - public static final CreateConnectionRequestContentSmsStrategy SMS = - new CreateConnectionRequestContentSmsStrategy(Value.SMS, "sms"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentSmsStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentSmsStrategy - && this.string.equals(((CreateConnectionRequestContentSmsStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SMS: - return visitor.visitSms(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentSmsStrategy valueOf(String value) { - switch (value) { - case "sms": - return SMS; - default: - return new CreateConnectionRequestContentSmsStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - SMS, - - UNKNOWN - } - - public interface Visitor { - T visitSms(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSoundcloud.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSoundcloud.java deleted file mode 100644 index 6a02a3393..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSoundcloud.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentSoundcloud.Builder.class) -public final class CreateConnectionRequestContentSoundcloud implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentSoundcloudStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentSoundcloud( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentSoundcloudStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentSoundcloudStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentSoundcloud - && equalTo((CreateConnectionRequestContentSoundcloud) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentSoundcloud other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentSoundcloudStrategy strategy); - - Builder from(CreateConnectionRequestContentSoundcloud other); - } - - public interface _FinalStage { - CreateConnectionRequestContentSoundcloud build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsSoundcloud options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentSoundcloudStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentSoundcloud other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentSoundcloudStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsSoundcloud options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentSoundcloud build() { - return new CreateConnectionRequestContentSoundcloud( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSoundcloudStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSoundcloudStrategy.java deleted file mode 100644 index 8ba0fe7bd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentSoundcloudStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentSoundcloudStrategy { - public static final CreateConnectionRequestContentSoundcloudStrategy SOUNDCLOUD = - new CreateConnectionRequestContentSoundcloudStrategy(Value.SOUNDCLOUD, "soundcloud"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentSoundcloudStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentSoundcloudStrategy - && this.string.equals(((CreateConnectionRequestContentSoundcloudStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SOUNDCLOUD: - return visitor.visitSoundcloud(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentSoundcloudStrategy valueOf(String value) { - switch (value) { - case "soundcloud": - return SOUNDCLOUD; - default: - return new CreateConnectionRequestContentSoundcloudStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - SOUNDCLOUD, - - UNKNOWN - } - - public interface Visitor { - T visitSoundcloud(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentThirtySevenSignals.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentThirtySevenSignals.java deleted file mode 100644 index bca038c6b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentThirtySevenSignals.java +++ /dev/null @@ -1,310 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentThirtySevenSignals.Builder.class) -public final class CreateConnectionRequestContentThirtySevenSignals - implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentThirtySevenSignalsStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentThirtySevenSignals( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentThirtySevenSignalsStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentThirtySevenSignalsStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentThirtySevenSignals - && equalTo((CreateConnectionRequestContentThirtySevenSignals) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentThirtySevenSignals other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentThirtySevenSignalsStrategy strategy); - - Builder from(CreateConnectionRequestContentThirtySevenSignals other); - } - - public interface _FinalStage { - CreateConnectionRequestContentThirtySevenSignals build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsThirtySevenSignals options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentThirtySevenSignalsStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentThirtySevenSignals other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentThirtySevenSignalsStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsThirtySevenSignals options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentThirtySevenSignals build() { - return new CreateConnectionRequestContentThirtySevenSignals( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentThirtySevenSignalsStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentThirtySevenSignalsStrategy.java deleted file mode 100644 index 8cb4ecdce..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentThirtySevenSignalsStrategy.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentThirtySevenSignalsStrategy { - public static final CreateConnectionRequestContentThirtySevenSignalsStrategy THIRTYSEVENSIGNALS = - new CreateConnectionRequestContentThirtySevenSignalsStrategy( - Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentThirtySevenSignalsStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentThirtySevenSignalsStrategy - && this.string.equals( - ((CreateConnectionRequestContentThirtySevenSignalsStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case THIRTYSEVENSIGNALS: - return visitor.visitThirtysevensignals(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentThirtySevenSignalsStrategy valueOf(String value) { - switch (value) { - case "thirtysevensignals": - return THIRTYSEVENSIGNALS; - default: - return new CreateConnectionRequestContentThirtySevenSignalsStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - THIRTYSEVENSIGNALS, - - UNKNOWN - } - - public interface Visitor { - T visitThirtysevensignals(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentTwitter.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentTwitter.java deleted file mode 100644 index 8a1d4df97..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentTwitter.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentTwitter.Builder.class) -public final class CreateConnectionRequestContentTwitter implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentTwitterStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentTwitter( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentTwitterStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentTwitterStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentTwitter - && equalTo((CreateConnectionRequestContentTwitter) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentTwitter other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentTwitterStrategy strategy); - - Builder from(CreateConnectionRequestContentTwitter other); - } - - public interface _FinalStage { - CreateConnectionRequestContentTwitter build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsTwitter options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentTwitterStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentTwitter other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentTwitterStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsTwitter options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentTwitter build() { - return new CreateConnectionRequestContentTwitter( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentTwitterStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentTwitterStrategy.java deleted file mode 100644 index 25493f2fe..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentTwitterStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentTwitterStrategy { - public static final CreateConnectionRequestContentTwitterStrategy TWITTER = - new CreateConnectionRequestContentTwitterStrategy(Value.TWITTER, "twitter"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentTwitterStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentTwitterStrategy - && this.string.equals(((CreateConnectionRequestContentTwitterStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TWITTER: - return visitor.visitTwitter(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentTwitterStrategy valueOf(String value) { - switch (value) { - case "twitter": - return TWITTER; - default: - return new CreateConnectionRequestContentTwitterStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - TWITTER, - - UNKNOWN - } - - public interface Visitor { - T visitTwitter(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentUntappd.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentUntappd.java deleted file mode 100644 index af702ef02..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentUntappd.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentUntappd.Builder.class) -public final class CreateConnectionRequestContentUntappd implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentUntappdStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentUntappd( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentUntappdStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentUntappdStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentUntappd - && equalTo((CreateConnectionRequestContentUntappd) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentUntappd other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentUntappdStrategy strategy); - - Builder from(CreateConnectionRequestContentUntappd other); - } - - public interface _FinalStage { - CreateConnectionRequestContentUntappd build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsUntappd options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentUntappdStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentUntappd other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentUntappdStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsUntappd options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentUntappd build() { - return new CreateConnectionRequestContentUntappd( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentUntappdStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentUntappdStrategy.java deleted file mode 100644 index 1c30e6553..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentUntappdStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentUntappdStrategy { - public static final CreateConnectionRequestContentUntappdStrategy UNTAPPD = - new CreateConnectionRequestContentUntappdStrategy(Value.UNTAPPD, "untappd"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentUntappdStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentUntappdStrategy - && this.string.equals(((CreateConnectionRequestContentUntappdStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case UNTAPPD: - return visitor.visitUntappd(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentUntappdStrategy valueOf(String value) { - switch (value) { - case "untappd": - return UNTAPPD; - default: - return new CreateConnectionRequestContentUntappdStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - UNTAPPD, - - UNKNOWN - } - - public interface Visitor { - T visitUntappd(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentVkontakte.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentVkontakte.java deleted file mode 100644 index 7546ab15a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentVkontakte.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentVkontakte.Builder.class) -public final class CreateConnectionRequestContentVkontakte implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentVkontakteStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentVkontakte( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentVkontakteStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentVkontakteStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentVkontakte - && equalTo((CreateConnectionRequestContentVkontakte) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentVkontakte other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentVkontakteStrategy strategy); - - Builder from(CreateConnectionRequestContentVkontakte other); - } - - public interface _FinalStage { - CreateConnectionRequestContentVkontakte build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsVkontakte options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentVkontakteStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentVkontakte other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentVkontakteStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsVkontakte options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentVkontakte build() { - return new CreateConnectionRequestContentVkontakte( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentVkontakteStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentVkontakteStrategy.java deleted file mode 100644 index 3f89af19f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentVkontakteStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentVkontakteStrategy { - public static final CreateConnectionRequestContentVkontakteStrategy VKONTAKTE = - new CreateConnectionRequestContentVkontakteStrategy(Value.VKONTAKTE, "vkontakte"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentVkontakteStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentVkontakteStrategy - && this.string.equals(((CreateConnectionRequestContentVkontakteStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case VKONTAKTE: - return visitor.visitVkontakte(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentVkontakteStrategy valueOf(String value) { - switch (value) { - case "vkontakte": - return VKONTAKTE; - default: - return new CreateConnectionRequestContentVkontakteStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - VKONTAKTE, - - UNKNOWN - } - - public interface Visitor { - T visitVkontakte(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWeibo.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWeibo.java deleted file mode 100644 index e069036b3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWeibo.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentWeibo.Builder.class) -public final class CreateConnectionRequestContentWeibo implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentWeiboStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentWeibo( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentWeiboStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentWeiboStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentWeibo - && equalTo((CreateConnectionRequestContentWeibo) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentWeibo other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentWeiboStrategy strategy); - - Builder from(CreateConnectionRequestContentWeibo other); - } - - public interface _FinalStage { - CreateConnectionRequestContentWeibo build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsWeibo options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentWeiboStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentWeibo other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentWeiboStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsWeibo options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentWeibo build() { - return new CreateConnectionRequestContentWeibo( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWeiboStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWeiboStrategy.java deleted file mode 100644 index 95105cbe6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWeiboStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentWeiboStrategy { - public static final CreateConnectionRequestContentWeiboStrategy WEIBO = - new CreateConnectionRequestContentWeiboStrategy(Value.WEIBO, "weibo"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentWeiboStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentWeiboStrategy - && this.string.equals(((CreateConnectionRequestContentWeiboStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case WEIBO: - return visitor.visitWeibo(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentWeiboStrategy valueOf(String value) { - switch (value) { - case "weibo": - return WEIBO; - default: - return new CreateConnectionRequestContentWeiboStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - WEIBO, - - UNKNOWN - } - - public interface Visitor { - T visitWeibo(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWindowsLive.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWindowsLive.java deleted file mode 100644 index fcd4cb155..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWindowsLive.java +++ /dev/null @@ -1,376 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentWindowsLive.Builder.class) -public final class CreateConnectionRequestContentWindowsLive - implements IConnectionPurposes, ICreateConnectionCommon, IConnectionCommon { - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentWindowsLiveStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentWindowsLive( - Optional authentication, - Optional connectedAccounts, - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentWindowsLiveStrategy strategy, - Optional options, - Map additionalProperties) { - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentWindowsLiveStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentWindowsLive - && equalTo((CreateConnectionRequestContentWindowsLive) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentWindowsLive other) { - return authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.authentication, - this.connectedAccounts, - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentWindowsLiveStrategy strategy); - - Builder from(CreateConnectionRequestContentWindowsLive other); - } - - public interface _FinalStage { - CreateConnectionRequestContentWindowsLive build(); - - _FinalStage authentication(Optional authentication); - - _FinalStage authentication(ConnectionAuthenticationPurpose authentication); - - _FinalStage connectedAccounts(Optional connectedAccounts); - - _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsWindowsLive options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentWindowsLiveStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional authentication = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentWindowsLive other) { - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentWindowsLiveStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsWindowsLive options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public _FinalStage connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - @java.lang.Override - public _FinalStage authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public _FinalStage authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentWindowsLive build() { - return new CreateConnectionRequestContentWindowsLive( - authentication, - connectedAccounts, - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWindowsLiveStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWindowsLiveStrategy.java deleted file mode 100644 index d38e2a8d9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWindowsLiveStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentWindowsLiveStrategy { - public static final CreateConnectionRequestContentWindowsLiveStrategy WINDOWSLIVE = - new CreateConnectionRequestContentWindowsLiveStrategy(Value.WINDOWSLIVE, "windowslive"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentWindowsLiveStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentWindowsLiveStrategy - && this.string.equals(((CreateConnectionRequestContentWindowsLiveStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case WINDOWSLIVE: - return visitor.visitWindowslive(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentWindowsLiveStrategy valueOf(String value) { - switch (value) { - case "windowslive": - return WINDOWSLIVE; - default: - return new CreateConnectionRequestContentWindowsLiveStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - WINDOWSLIVE, - - UNKNOWN - } - - public interface Visitor { - T visitWindowslive(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWordpress.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWordpress.java deleted file mode 100644 index 64ba24f7f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWordpress.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentWordpress.Builder.class) -public final class CreateConnectionRequestContentWordpress implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentWordpressStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentWordpress( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentWordpressStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentWordpressStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentWordpress - && equalTo((CreateConnectionRequestContentWordpress) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentWordpress other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentWordpressStrategy strategy); - - Builder from(CreateConnectionRequestContentWordpress other); - } - - public interface _FinalStage { - CreateConnectionRequestContentWordpress build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsWordpress options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentWordpressStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentWordpress other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentWordpressStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsWordpress options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentWordpress build() { - return new CreateConnectionRequestContentWordpress( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWordpressStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWordpressStrategy.java deleted file mode 100644 index c494d5dac..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentWordpressStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentWordpressStrategy { - public static final CreateConnectionRequestContentWordpressStrategy WORDPRESS = - new CreateConnectionRequestContentWordpressStrategy(Value.WORDPRESS, "wordpress"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentWordpressStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentWordpressStrategy - && this.string.equals(((CreateConnectionRequestContentWordpressStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case WORDPRESS: - return visitor.visitWordpress(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentWordpressStrategy valueOf(String value) { - switch (value) { - case "wordpress": - return WORDPRESS; - default: - return new CreateConnectionRequestContentWordpressStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - WORDPRESS, - - UNKNOWN - } - - public interface Visitor { - T visitWordpress(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYahoo.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYahoo.java deleted file mode 100644 index 5f87e25d5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYahoo.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentYahoo.Builder.class) -public final class CreateConnectionRequestContentYahoo implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentYahooStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentYahoo( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentYahooStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentYahooStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentYahoo - && equalTo((CreateConnectionRequestContentYahoo) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentYahoo other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentYahooStrategy strategy); - - Builder from(CreateConnectionRequestContentYahoo other); - } - - public interface _FinalStage { - CreateConnectionRequestContentYahoo build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsYahoo options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentYahooStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentYahoo other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentYahooStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsYahoo options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentYahoo build() { - return new CreateConnectionRequestContentYahoo( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYahooStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYahooStrategy.java deleted file mode 100644 index 450d38c76..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYahooStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentYahooStrategy { - public static final CreateConnectionRequestContentYahooStrategy YAHOO = - new CreateConnectionRequestContentYahooStrategy(Value.YAHOO, "yahoo"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentYahooStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentYahooStrategy - && this.string.equals(((CreateConnectionRequestContentYahooStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case YAHOO: - return visitor.visitYahoo(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentYahooStrategy valueOf(String value) { - switch (value) { - case "yahoo": - return YAHOO; - default: - return new CreateConnectionRequestContentYahooStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - YAHOO, - - UNKNOWN - } - - public interface Visitor { - T visitYahoo(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYammer.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYammer.java deleted file mode 100644 index 4aa12f7d4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYammer.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentYammer.Builder.class) -public final class CreateConnectionRequestContentYammer implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentYammerStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentYammer( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentYammerStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentYammerStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentYammer - && equalTo((CreateConnectionRequestContentYammer) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentYammer other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentYammerStrategy strategy); - - Builder from(CreateConnectionRequestContentYammer other); - } - - public interface _FinalStage { - CreateConnectionRequestContentYammer build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsYammer options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentYammerStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentYammer other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentYammerStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsYammer options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentYammer build() { - return new CreateConnectionRequestContentYammer( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYammerStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYammerStrategy.java deleted file mode 100644 index 1f73ca49d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYammerStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentYammerStrategy { - public static final CreateConnectionRequestContentYammerStrategy YAMMER = - new CreateConnectionRequestContentYammerStrategy(Value.YAMMER, "yammer"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentYammerStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentYammerStrategy - && this.string.equals(((CreateConnectionRequestContentYammerStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case YAMMER: - return visitor.visitYammer(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentYammerStrategy valueOf(String value) { - switch (value) { - case "yammer": - return YAMMER; - default: - return new CreateConnectionRequestContentYammerStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - YAMMER, - - UNKNOWN - } - - public interface Visitor { - T visitYammer(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYandex.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYandex.java deleted file mode 100644 index e031dddef..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYandex.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionRequestContentYandex.Builder.class) -public final class CreateConnectionRequestContentYandex implements ICreateConnectionCommon, IConnectionCommon { - private final Optional name; - - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final CreateConnectionRequestContentYandexStrategy strategy; - - private final Optional options; - - private final Map additionalProperties; - - private CreateConnectionRequestContentYandex( - Optional name, - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - CreateConnectionRequestContentYandexStrategy strategy, - Optional options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.strategy = strategy; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("strategy") - public CreateConnectionRequestContentYandexStrategy getStrategy() { - return strategy; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionRequestContentYandex - && equalTo((CreateConnectionRequestContentYandex) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionRequestContentYandex other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && strategy.equals(other.strategy) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.strategy, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StrategyStage builder() { - return new Builder(); - } - - public interface StrategyStage { - _FinalStage strategy(@NotNull CreateConnectionRequestContentYandexStrategy strategy); - - Builder from(CreateConnectionRequestContentYandex other); - } - - public interface _FinalStage { - CreateConnectionRequestContentYandex build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage enabledClients(Optional> enabledClients); - - _FinalStage enabledClients(List enabledClients); - - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(Optional options); - - _FinalStage options(ConnectionOptionsYandex options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StrategyStage, _FinalStage { - private CreateConnectionRequestContentYandexStrategy strategy; - - private Optional options = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateConnectionRequestContentYandex other) { - name(other.getName()); - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - strategy(other.getStrategy()); - options(other.getOptions()); - return this; - } - - @java.lang.Override - @JsonSetter("strategy") - public _FinalStage strategy(@NotNull CreateConnectionRequestContentYandexStrategy strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage options(ConnectionOptionsYandex options) { - this.options = Optional.ofNullable(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(Optional options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - @java.lang.Override - public _FinalStage enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public _FinalStage enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - @java.lang.Override - public _FinalStage displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateConnectionRequestContentYandex build() { - return new CreateConnectionRequestContentYandex( - name, - displayName, - enabledClients, - isDomainConnection, - metadata, - strategy, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYandexStrategy.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYandexStrategy.java deleted file mode 100644 index a10821ed4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionRequestContentYandexStrategy.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateConnectionRequestContentYandexStrategy { - public static final CreateConnectionRequestContentYandexStrategy YANDEX = - new CreateConnectionRequestContentYandexStrategy(Value.YANDEX, "yandex"); - - private final Value value; - - private final String string; - - CreateConnectionRequestContentYandexStrategy(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateConnectionRequestContentYandexStrategy - && this.string.equals(((CreateConnectionRequestContentYandexStrategy) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case YANDEX: - return visitor.visitYandex(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateConnectionRequestContentYandexStrategy valueOf(String value) { - switch (value) { - case "yandex": - return YANDEX; - default: - return new CreateConnectionRequestContentYandexStrategy(Value.UNKNOWN, value); - } - } - - public enum Value { - YANDEX, - - UNKNOWN - } - - public interface Visitor { - T visitYandex(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateConnectionResponseContent.java deleted file mode 100644 index 5a82d2dc3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateConnectionResponseContent.java +++ /dev/null @@ -1,436 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateConnectionResponseContent.Builder.class) -public final class CreateConnectionResponseContent { - private final Optional name; - - private final Optional displayName; - - private final Optional> options; - - private final Optional id; - - private final Optional strategy; - - private final Optional> realms; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional showAsButton; - - private final Optional>> metadata; - - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Map additionalProperties; - - private CreateConnectionResponseContent( - Optional name, - Optional displayName, - Optional> options, - Optional id, - Optional strategy, - Optional> realms, - Optional> enabledClients, - Optional isDomainConnection, - Optional showAsButton, - Optional>> metadata, - Optional authentication, - Optional connectedAccounts, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.options = options; - this.id = id; - this.strategy = strategy; - this.realms = realms; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.showAsButton = showAsButton; - this.metadata = metadata; - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the connection - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Connection name used in login screen - */ - @JsonProperty("display_name") - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - - /** - * @return The connection's identifier - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The type of the connection, related to the identity provider - */ - @JsonProperty("strategy") - public Optional getStrategy() { - return strategy; - } - - /** - * @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; - } - - /** - * @return DEPRECATED property. Use the GET /connections/:id/clients endpoint to get the ids of the clients for which the connection is enabled - */ - @JsonProperty("enabled_clients") - public Optional> getEnabledClients() { - return enabledClients; - } - - /** - * @return True if the connection is domain level - */ - @JsonProperty("is_domain_connection") - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - /** - * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. - */ - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @JsonProperty("metadata") - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("authentication") - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateConnectionResponseContent && equalTo((CreateConnectionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateConnectionResponseContent other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && options.equals(other.options) - && id.equals(other.id) - && strategy.equals(other.strategy) - && realms.equals(other.realms) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && showAsButton.equals(other.showAsButton) - && metadata.equals(other.metadata) - && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.options, - this.id, - this.strategy, - this.realms, - this.enabledClients, - this.isDomainConnection, - this.showAsButton, - this.metadata, - this.authentication, - this.connectedAccounts); - } - - @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 displayName = Optional.empty(); - - private Optional> options = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional strategy = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateConnectionResponseContent other) { - name(other.getName()); - displayName(other.getDisplayName()); - options(other.getOptions()); - id(other.getId()); - strategy(other.getStrategy()); - realms(other.getRealms()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - showAsButton(other.getShowAsButton()); - metadata(other.getMetadata()); - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - return this; - } - - /** - *

The name of the connection

- */ - @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; - } - - /** - *

Connection name used in login screen

- */ - @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 = "options", nulls = Nulls.SKIP) - public Builder options(Optional> options) { - this.options = options; - return this; - } - - public Builder options(Map options) { - this.options = Optional.ofNullable(options); - return this; - } - - /** - *

The connection's 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 type of the connection, related to the identity provider

- */ - @JsonSetter(value = "strategy", nulls = Nulls.SKIP) - public Builder strategy(Optional strategy) { - this.strategy = strategy; - return this; - } - - public Builder strategy(String strategy) { - this.strategy = Optional.ofNullable(strategy); - 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.

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

DEPRECATED property. Use the GET /connections/:id/clients endpoint to get the ids of the clients for which the connection is enabled

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

True if the connection is domain level

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

Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD.

- */ - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public Builder authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - public Builder authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public Builder connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - public Builder connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - public CreateConnectionResponseContent build() { - return new CreateConnectionResponseContent( - name, - displayName, - options, - id, - strategy, - realms, - enabledClients, - isDomainConnection, - showAsButton, - metadata, - authentication, - connectedAccounts, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateCustomDomainRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateCustomDomainRequestContent.java deleted file mode 100644 index 55bfe702c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateCustomDomainRequestContent.java +++ /dev/null @@ -1,350 +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.Nullable; -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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateCustomDomainRequestContent.Builder.class) -public final class CreateCustomDomainRequestContent { - private final String domain; - - private final CustomDomainProvisioningTypeEnum type; - - private final Optional verificationMethod; - - private final Optional tlsPolicy; - - private final OptionalNullable customClientIpHeader; - - private final Optional>> domainMetadata; - - private final Optional relyingPartyIdentifier; - - private final Map additionalProperties; - - private CreateCustomDomainRequestContent( - String domain, - CustomDomainProvisioningTypeEnum type, - Optional verificationMethod, - Optional tlsPolicy, - OptionalNullable customClientIpHeader, - Optional>> domainMetadata, - Optional relyingPartyIdentifier, - Map additionalProperties) { - this.domain = domain; - this.type = type; - this.verificationMethod = verificationMethod; - this.tlsPolicy = tlsPolicy; - this.customClientIpHeader = customClientIpHeader; - this.domainMetadata = domainMetadata; - this.relyingPartyIdentifier = relyingPartyIdentifier; - this.additionalProperties = additionalProperties; - } - - /** - * @return Domain name. - */ - @JsonProperty("domain") - public String getDomain() { - return domain; - } - - @JsonProperty("type") - public CustomDomainProvisioningTypeEnum getType() { - return type; - } - - @JsonProperty("verification_method") - public Optional getVerificationMethod() { - return verificationMethod; - } - - @JsonProperty("tls_policy") - public Optional getTlsPolicy() { - return tlsPolicy; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_client_ip_header") - public OptionalNullable getCustomClientIpHeader() { - return customClientIpHeader; - } - - @JsonProperty("domain_metadata") - public Optional>> getDomainMetadata() { - return domainMetadata; - } - - /** - * @return Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not provided, the full domain will be used. - */ - @JsonProperty("relying_party_identifier") - public Optional getRelyingPartyIdentifier() { - return relyingPartyIdentifier; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateCustomDomainRequestContent && equalTo((CreateCustomDomainRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateCustomDomainRequestContent other) { - return domain.equals(other.domain) - && type.equals(other.type) - && verificationMethod.equals(other.verificationMethod) - && tlsPolicy.equals(other.tlsPolicy) - && customClientIpHeader.equals(other.customClientIpHeader) - && domainMetadata.equals(other.domainMetadata) - && relyingPartyIdentifier.equals(other.relyingPartyIdentifier); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.domain, - this.type, - this.verificationMethod, - this.tlsPolicy, - this.customClientIpHeader, - this.domainMetadata, - this.relyingPartyIdentifier); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static DomainStage builder() { - return new Builder(); - } - - public interface DomainStage { - /** - *

Domain name.

- */ - TypeStage domain(@NotNull String domain); - - Builder from(CreateCustomDomainRequestContent other); - } - - public interface TypeStage { - _FinalStage type(@NotNull CustomDomainProvisioningTypeEnum type); - } - - public interface _FinalStage { - CreateCustomDomainRequestContent build(); - - _FinalStage verificationMethod(Optional verificationMethod); - - _FinalStage verificationMethod(CustomDomainVerificationMethodEnum verificationMethod); - - _FinalStage tlsPolicy(Optional tlsPolicy); - - _FinalStage tlsPolicy(CustomDomainTlsPolicyEnum tlsPolicy); - - _FinalStage customClientIpHeader(OptionalNullable customClientIpHeader); - - _FinalStage customClientIpHeader(CustomDomainCustomClientIpHeaderEnum customClientIpHeader); - - _FinalStage customClientIpHeader(Optional customClientIpHeader); - - _FinalStage customClientIpHeader(Nullable customClientIpHeader); - - _FinalStage domainMetadata(Optional>> domainMetadata); - - _FinalStage domainMetadata(Map> domainMetadata); - - /** - *

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

- */ - _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier); - - _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements DomainStage, TypeStage, _FinalStage { - private String domain; - - private CustomDomainProvisioningTypeEnum type; - - private Optional relyingPartyIdentifier = Optional.empty(); - - private Optional>> domainMetadata = Optional.empty(); - - private OptionalNullable customClientIpHeader = OptionalNullable.absent(); - - private Optional tlsPolicy = Optional.empty(); - - private Optional verificationMethod = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateCustomDomainRequestContent other) { - domain(other.getDomain()); - type(other.getType()); - verificationMethod(other.getVerificationMethod()); - tlsPolicy(other.getTlsPolicy()); - customClientIpHeader(other.getCustomClientIpHeader()); - domainMetadata(other.getDomainMetadata()); - relyingPartyIdentifier(other.getRelyingPartyIdentifier()); - return this; - } - - /** - *

Domain name.

- *

Domain name.

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

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

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

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

- */ - @java.lang.Override - @JsonSetter(value = "relying_party_identifier", nulls = Nulls.SKIP) - public _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier) { - this.relyingPartyIdentifier = relyingPartyIdentifier; - return this; - } - - @java.lang.Override - public _FinalStage domainMetadata(Map> domainMetadata) { - this.domainMetadata = Optional.ofNullable(domainMetadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "domain_metadata", nulls = Nulls.SKIP) - public _FinalStage domainMetadata(Optional>> domainMetadata) { - this.domainMetadata = domainMetadata; - return this; - } - - @java.lang.Override - public _FinalStage customClientIpHeader(Nullable customClientIpHeader) { - if (customClientIpHeader.isNull()) { - this.customClientIpHeader = OptionalNullable.ofNull(); - } else if (customClientIpHeader.isEmpty()) { - this.customClientIpHeader = OptionalNullable.absent(); - } else { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage customClientIpHeader(Optional customClientIpHeader) { - if (customClientIpHeader.isPresent()) { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader.get()); - } else { - this.customClientIpHeader = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage customClientIpHeader(CustomDomainCustomClientIpHeaderEnum customClientIpHeader) { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader); - return this; - } - - @java.lang.Override - @JsonSetter(value = "custom_client_ip_header", nulls = Nulls.SKIP) - public _FinalStage customClientIpHeader( - OptionalNullable customClientIpHeader) { - this.customClientIpHeader = customClientIpHeader; - return this; - } - - @java.lang.Override - public _FinalStage tlsPolicy(CustomDomainTlsPolicyEnum tlsPolicy) { - this.tlsPolicy = Optional.ofNullable(tlsPolicy); - return this; - } - - @java.lang.Override - @JsonSetter(value = "tls_policy", nulls = Nulls.SKIP) - public _FinalStage tlsPolicy(Optional tlsPolicy) { - this.tlsPolicy = tlsPolicy; - return this; - } - - @java.lang.Override - public _FinalStage verificationMethod(CustomDomainVerificationMethodEnum verificationMethod) { - this.verificationMethod = Optional.ofNullable(verificationMethod); - return this; - } - - @java.lang.Override - @JsonSetter(value = "verification_method", nulls = Nulls.SKIP) - public _FinalStage verificationMethod(Optional verificationMethod) { - this.verificationMethod = verificationMethod; - return this; - } - - @java.lang.Override - public CreateCustomDomainRequestContent build() { - return new CreateCustomDomainRequestContent( - domain, - type, - verificationMethod, - tlsPolicy, - customClientIpHeader, - domainMetadata, - relyingPartyIdentifier, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateCustomDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateCustomDomainResponseContent.java deleted file mode 100644 index fbb92a45c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateCustomDomainResponseContent.java +++ /dev/null @@ -1,570 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.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 = CreateCustomDomainResponseContent.Builder.class) -public final class CreateCustomDomainResponseContent { - private final String customDomainId; - - private final String domain; - - private final boolean primary; - - private final Optional isDefault; - - private final CustomDomainStatusFilterEnum status; - - private final CustomDomainTypeEnum type; - - private final DomainVerification verification; - - private final OptionalNullable customClientIpHeader; - - private final Optional tlsPolicy; - - private final Optional>> domainMetadata; - - private final Optional certificate; - - private final Optional relyingPartyIdentifier; - - private final Map additionalProperties; - - private CreateCustomDomainResponseContent( - String customDomainId, - String domain, - boolean primary, - Optional isDefault, - CustomDomainStatusFilterEnum status, - CustomDomainTypeEnum type, - DomainVerification verification, - OptionalNullable customClientIpHeader, - Optional tlsPolicy, - Optional>> domainMetadata, - Optional certificate, - Optional relyingPartyIdentifier, - Map additionalProperties) { - this.customDomainId = customDomainId; - this.domain = domain; - this.primary = primary; - this.isDefault = isDefault; - this.status = status; - this.type = type; - this.verification = verification; - this.customClientIpHeader = customClientIpHeader; - this.tlsPolicy = tlsPolicy; - this.domainMetadata = domainMetadata; - this.certificate = certificate; - this.relyingPartyIdentifier = relyingPartyIdentifier; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the custom domain. - */ - @JsonProperty("custom_domain_id") - public String getCustomDomainId() { - return customDomainId; - } - - /** - * @return Domain name. - */ - @JsonProperty("domain") - public String getDomain() { - return domain; - } - - /** - * @return Whether this is a primary domain (true) or not (false). - */ - @JsonProperty("primary") - public boolean getPrimary() { - return primary; - } - - /** - * @return Whether this is the default custom domain (true) or not (false). - */ - @JsonProperty("is_default") - public Optional getIsDefault() { - return isDefault; - } - - @JsonProperty("status") - public CustomDomainStatusFilterEnum getStatus() { - return status; - } - - @JsonProperty("type") - public CustomDomainTypeEnum getType() { - return type; - } - - @JsonProperty("verification") - public DomainVerification getVerification() { - return verification; - } - - /** - * @return The HTTP header to fetch the client's IP address - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_client_ip_header") - public OptionalNullable getCustomClientIpHeader() { - if (customClientIpHeader == null) { - return OptionalNullable.absent(); - } - return customClientIpHeader; - } - - /** - * @return The TLS version policy - */ - @JsonProperty("tls_policy") - public Optional getTlsPolicy() { - return tlsPolicy; - } - - @JsonProperty("domain_metadata") - public Optional>> getDomainMetadata() { - return domainMetadata; - } - - @JsonProperty("certificate") - public Optional getCertificate() { - return certificate; - } - - /** - * @return Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used. - */ - @JsonProperty("relying_party_identifier") - public Optional getRelyingPartyIdentifier() { - return relyingPartyIdentifier; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_client_ip_header") - private OptionalNullable _getCustomClientIpHeader() { - return customClientIpHeader; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateCustomDomainResponseContent && equalTo((CreateCustomDomainResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateCustomDomainResponseContent other) { - return customDomainId.equals(other.customDomainId) - && domain.equals(other.domain) - && primary == other.primary - && isDefault.equals(other.isDefault) - && status.equals(other.status) - && type.equals(other.type) - && verification.equals(other.verification) - && customClientIpHeader.equals(other.customClientIpHeader) - && tlsPolicy.equals(other.tlsPolicy) - && domainMetadata.equals(other.domainMetadata) - && certificate.equals(other.certificate) - && relyingPartyIdentifier.equals(other.relyingPartyIdentifier); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.customDomainId, - this.domain, - this.primary, - this.isDefault, - this.status, - this.type, - this.verification, - this.customClientIpHeader, - this.tlsPolicy, - this.domainMetadata, - this.certificate, - this.relyingPartyIdentifier); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static CustomDomainIdStage builder() { - return new Builder(); - } - - public interface CustomDomainIdStage { - /** - *

ID of the custom domain.

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

Domain name.

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

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

- */ - StatusStage primary(boolean primary); - } - - public interface StatusStage { - TypeStage status(@NotNull CustomDomainStatusFilterEnum status); - } - - public interface TypeStage { - VerificationStage type(@NotNull CustomDomainTypeEnum type); - } - - public interface VerificationStage { - _FinalStage verification(@NotNull DomainVerification verification); - } - - public interface _FinalStage { - CreateCustomDomainResponseContent build(); - - /** - *

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

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

The HTTP header to fetch the client's IP address

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

The TLS version policy

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

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

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

ID of the custom domain.

- *

ID of the custom domain.

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

Domain name.

- *

Domain name.

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

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

- *

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

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

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

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

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

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

The TLS version policy

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

The TLS version policy

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

The HTTP header to fetch the client's IP address

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

The HTTP header to fetch the client's IP address

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

The HTTP header to fetch the client's IP address

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

The HTTP header to fetch the client's IP address

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

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

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

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

- */ - @java.lang.Override - @JsonSetter(value = "is_default", nulls = Nulls.SKIP) - public _FinalStage isDefault(Optional isDefault) { - this.isDefault = isDefault; - return this; - } - - @java.lang.Override - public CreateCustomDomainResponseContent build() { - return new CreateCustomDomainResponseContent( - customDomainId, - domain, - primary, - isDefault, - status, - type, - verification, - customClientIpHeader, - tlsPolicy, - domainMetadata, - certificate, - relyingPartyIdentifier, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningRequestContent.java deleted file mode 100644 index 33b3d9e05..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningRequestContent.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateDirectoryProvisioningRequestContent.Builder.class) -public final class CreateDirectoryProvisioningRequestContent { - private final Optional> mapping; - - private final Optional synchronizeAutomatically; - - private final Map additionalProperties; - - private CreateDirectoryProvisioningRequestContent( - Optional> mapping, - Optional synchronizeAutomatically, - Map additionalProperties) { - this.mapping = mapping; - this.synchronizeAutomatically = synchronizeAutomatically; - this.additionalProperties = additionalProperties; - } - - /** - * @return The mapping between Auth0 and IDP user attributes - */ - @JsonProperty("mapping") - public Optional> getMapping() { - return mapping; - } - - /** - * @return Whether periodic automatic synchronization is enabled - */ - @JsonProperty("synchronize_automatically") - public Optional getSynchronizeAutomatically() { - return synchronizeAutomatically; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateDirectoryProvisioningRequestContent - && equalTo((CreateDirectoryProvisioningRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateDirectoryProvisioningRequestContent other) { - return mapping.equals(other.mapping) && synchronizeAutomatically.equals(other.synchronizeAutomatically); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.mapping, this.synchronizeAutomatically); - } - - @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> mapping = Optional.empty(); - - private Optional synchronizeAutomatically = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateDirectoryProvisioningRequestContent other) { - mapping(other.getMapping()); - synchronizeAutomatically(other.getSynchronizeAutomatically()); - return this; - } - - /** - *

The mapping between Auth0 and IDP user attributes

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

Whether periodic automatic synchronization is enabled

- */ - @JsonSetter(value = "synchronize_automatically", nulls = Nulls.SKIP) - public Builder synchronizeAutomatically(Optional synchronizeAutomatically) { - this.synchronizeAutomatically = synchronizeAutomatically; - return this; - } - - public Builder synchronizeAutomatically(Boolean synchronizeAutomatically) { - this.synchronizeAutomatically = Optional.ofNullable(synchronizeAutomatically); - return this; - } - - public CreateDirectoryProvisioningRequestContent build() { - return new CreateDirectoryProvisioningRequestContent( - mapping, synchronizeAutomatically, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningResponseContent.java deleted file mode 100644 index 04a0d2f8e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateDirectoryProvisioningResponseContent.java +++ /dev/null @@ -1,513 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = CreateDirectoryProvisioningResponseContent.Builder.class) -public final class CreateDirectoryProvisioningResponseContent { - private final String connectionId; - - private final String connectionName; - - private final String strategy; - - private final List mapping; - - private final boolean synchronizeAutomatically; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional lastSynchronizationAt; - - private final Optional lastSynchronizationStatus; - - private final Optional lastSynchronizationError; - - private final Map additionalProperties; - - private CreateDirectoryProvisioningResponseContent( - String connectionId, - String connectionName, - String strategy, - List mapping, - boolean synchronizeAutomatically, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional lastSynchronizationAt, - Optional lastSynchronizationStatus, - Optional lastSynchronizationError, - Map additionalProperties) { - this.connectionId = connectionId; - this.connectionName = connectionName; - this.strategy = strategy; - this.mapping = mapping; - this.synchronizeAutomatically = synchronizeAutomatically; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.lastSynchronizationAt = lastSynchronizationAt; - this.lastSynchronizationStatus = lastSynchronizationStatus; - this.lastSynchronizationError = lastSynchronizationError; - this.additionalProperties = additionalProperties; - } - - /** - * @return The connection's identifier - */ - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - /** - * @return The connection's name - */ - @JsonProperty("connection_name") - public String getConnectionName() { - return connectionName; - } - - /** - * @return The connection's strategy - */ - @JsonProperty("strategy") - public String getStrategy() { - return strategy; - } - - /** - * @return The mapping between Auth0 and IDP user attributes - */ - @JsonProperty("mapping") - public List getMapping() { - return mapping; - } - - /** - * @return Whether periodic automatic synchronization is enabled - */ - @JsonProperty("synchronize_automatically") - public boolean getSynchronizeAutomatically() { - return synchronizeAutomatically; - } - - /** - * @return The timestamp at which the directory provisioning configuration was created - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return The timestamp at which the directory provisioning configuration was last updated - */ - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - /** - * @return The timestamp at which the connection was last synchronized - */ - @JsonProperty("last_synchronization_at") - public Optional getLastSynchronizationAt() { - return lastSynchronizationAt; - } - - /** - * @return The status of the last synchronization - */ - @JsonProperty("last_synchronization_status") - public Optional getLastSynchronizationStatus() { - return lastSynchronizationStatus; - } - - /** - * @return The error message of the last synchronization, if any - */ - @JsonProperty("last_synchronization_error") - public Optional getLastSynchronizationError() { - return lastSynchronizationError; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateDirectoryProvisioningResponseContent - && equalTo((CreateDirectoryProvisioningResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateDirectoryProvisioningResponseContent other) { - return connectionId.equals(other.connectionId) - && connectionName.equals(other.connectionName) - && strategy.equals(other.strategy) - && mapping.equals(other.mapping) - && synchronizeAutomatically == other.synchronizeAutomatically - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && lastSynchronizationAt.equals(other.lastSynchronizationAt) - && lastSynchronizationStatus.equals(other.lastSynchronizationStatus) - && lastSynchronizationError.equals(other.lastSynchronizationError); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.connectionName, - this.strategy, - this.mapping, - this.synchronizeAutomatically, - this.createdAt, - this.updatedAt, - this.lastSynchronizationAt, - this.lastSynchronizationStatus, - this.lastSynchronizationError); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - /** - *

The connection's identifier

- */ - ConnectionNameStage connectionId(@NotNull String connectionId); - - Builder from(CreateDirectoryProvisioningResponseContent other); - } - - public interface ConnectionNameStage { - /** - *

The connection's name

- */ - StrategyStage connectionName(@NotNull String connectionName); - } - - public interface StrategyStage { - /** - *

The connection's strategy

- */ - SynchronizeAutomaticallyStage strategy(@NotNull String strategy); - } - - public interface SynchronizeAutomaticallyStage { - /** - *

Whether periodic automatic synchronization is enabled

- */ - CreatedAtStage synchronizeAutomatically(boolean synchronizeAutomatically); - } - - public interface CreatedAtStage { - /** - *

The timestamp at which the directory provisioning configuration was created

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

The timestamp at which the directory provisioning configuration was last updated

- */ - _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); - } - - public interface _FinalStage { - CreateDirectoryProvisioningResponseContent build(); - - /** - *

The mapping between Auth0 and IDP user attributes

- */ - _FinalStage mapping(List mapping); - - _FinalStage addMapping(DirectoryProvisioningMappingItem mapping); - - _FinalStage addAllMapping(List mapping); - - /** - *

The timestamp at which the connection was last synchronized

- */ - _FinalStage lastSynchronizationAt(Optional lastSynchronizationAt); - - _FinalStage lastSynchronizationAt(OffsetDateTime lastSynchronizationAt); - - /** - *

The status of the last synchronization

- */ - _FinalStage lastSynchronizationStatus(Optional lastSynchronizationStatus); - - _FinalStage lastSynchronizationStatus(String lastSynchronizationStatus); - - /** - *

The error message of the last synchronization, if any

- */ - _FinalStage lastSynchronizationError(Optional lastSynchronizationError); - - _FinalStage lastSynchronizationError(String lastSynchronizationError); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements ConnectionIdStage, - ConnectionNameStage, - StrategyStage, - SynchronizeAutomaticallyStage, - CreatedAtStage, - UpdatedAtStage, - _FinalStage { - private String connectionId; - - private String connectionName; - - private String strategy; - - private boolean synchronizeAutomatically; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private Optional lastSynchronizationError = Optional.empty(); - - private Optional lastSynchronizationStatus = Optional.empty(); - - private Optional lastSynchronizationAt = Optional.empty(); - - private List mapping = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateDirectoryProvisioningResponseContent other) { - connectionId(other.getConnectionId()); - connectionName(other.getConnectionName()); - strategy(other.getStrategy()); - mapping(other.getMapping()); - synchronizeAutomatically(other.getSynchronizeAutomatically()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - lastSynchronizationAt(other.getLastSynchronizationAt()); - lastSynchronizationStatus(other.getLastSynchronizationStatus()); - lastSynchronizationError(other.getLastSynchronizationError()); - return this; - } - - /** - *

The connection's identifier

- *

The connection's identifier

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

The connection's name

- *

The connection's name

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

The connection's strategy

- *

The connection's strategy

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

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. - */ - @java.lang.Override - @JsonSetter("synchronize_automatically") - public CreatedAtStage synchronizeAutomatically(boolean synchronizeAutomatically) { - this.synchronizeAutomatically = synchronizeAutomatically; - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("created_at") - public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { - this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); - return this; - } - - /** - *

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. - */ - @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 error message of the last synchronization, if any

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

The error message of the last synchronization, if any

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

The status of the last synchronization

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

The status of the last synchronization

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

The timestamp at which the connection was last synchronized

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

The timestamp at which the connection was last synchronized

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

The mapping between Auth0 and IDP user attributes

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

The mapping between Auth0 and IDP user attributes

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addMapping(DirectoryProvisioningMappingItem mapping) { - this.mapping.add(mapping); - return this; - } - - /** - *

The mapping between Auth0 and IDP user attributes

- */ - @java.lang.Override - @JsonSetter(value = "mapping", nulls = Nulls.SKIP) - public _FinalStage mapping(List mapping) { - this.mapping.clear(); - if (mapping != null) { - this.mapping.addAll(mapping); - } - return this; - } - - @java.lang.Override - public CreateDirectoryProvisioningResponseContent build() { - return new CreateDirectoryProvisioningResponseContent( - connectionId, - connectionName, - strategy, - mapping, - synchronizeAutomatically, - createdAt, - updatedAt, - lastSynchronizationAt, - lastSynchronizationStatus, - lastSynchronizationError, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateDirectorySynchronizationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateDirectorySynchronizationResponseContent.java deleted file mode 100644 index 1619f8133..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateDirectorySynchronizationResponseContent.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateDirectorySynchronizationResponseContent.Builder.class) -public final class CreateDirectorySynchronizationResponseContent { - private final String connectionId; - - private final String synchronizationId; - - private final String status; - - private final Map additionalProperties; - - private CreateDirectorySynchronizationResponseContent( - String connectionId, String synchronizationId, String status, Map additionalProperties) { - this.connectionId = connectionId; - this.synchronizationId = synchronizationId; - this.status = status; - this.additionalProperties = additionalProperties; - } - - /** - * @return The connection's identifier - */ - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - /** - * @return The synchronization's identifier - */ - @JsonProperty("synchronization_id") - public String getSynchronizationId() { - return synchronizationId; - } - - /** - * @return The synchronization status - */ - @JsonProperty("status") - public String getStatus() { - return status; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateDirectorySynchronizationResponseContent - && equalTo((CreateDirectorySynchronizationResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateDirectorySynchronizationResponseContent other) { - return connectionId.equals(other.connectionId) - && synchronizationId.equals(other.synchronizationId) - && status.equals(other.status); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.synchronizationId, this.status); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - /** - *

The connection's identifier

- */ - SynchronizationIdStage connectionId(@NotNull String connectionId); - - Builder from(CreateDirectorySynchronizationResponseContent other); - } - - public interface SynchronizationIdStage { - /** - *

The synchronization's identifier

- */ - StatusStage synchronizationId(@NotNull String synchronizationId); - } - - public interface StatusStage { - /** - *

The synchronization status

- */ - _FinalStage status(@NotNull String status); - } - - public interface _FinalStage { - CreateDirectorySynchronizationResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, SynchronizationIdStage, StatusStage, _FinalStage { - private String connectionId; - - private String synchronizationId; - - private String status; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateDirectorySynchronizationResponseContent other) { - connectionId(other.getConnectionId()); - synchronizationId(other.getSynchronizationId()); - status(other.getStatus()); - return this; - } - - /** - *

The connection's identifier

- *

The connection's identifier

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

The synchronization's identifier

- *

The synchronization's identifier

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

The synchronization status

- *

The synchronization status

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("status") - public _FinalStage status(@NotNull String status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - @java.lang.Override - public CreateDirectorySynchronizationResponseContent build() { - return new CreateDirectorySynchronizationResponseContent( - connectionId, synchronizationId, status, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEmailProviderResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateEmailProviderResponseContent.java deleted file mode 100644 index 25db1c9d6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEmailProviderResponseContent.java +++ /dev/null @@ -1,213 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateEmailProviderResponseContent.Builder.class) -public final class CreateEmailProviderResponseContent { - private final Optional name; - - private final Optional enabled; - - private final Optional defaultFromAddress; - - private final Optional credentials; - - private final Optional> settings; - - private final Map additionalProperties; - - private CreateEmailProviderResponseContent( - Optional name, - Optional enabled, - Optional defaultFromAddress, - Optional credentials, - Optional> settings, - Map additionalProperties) { - this.name = name; - this.enabled = enabled; - this.defaultFromAddress = defaultFromAddress; - this.credentials = credentials; - this.settings = settings; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of the email provider. Can be mailgun, mandrill, sendgrid, ses, sparkpost, smtp, azure_cs, ms365, or custom. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Whether the provider is enabled (true) or disabled (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Email address to use as "from" when no other address specified. - */ - @JsonProperty("default_from_address") - public Optional getDefaultFromAddress() { - return defaultFromAddress; - } - - @JsonProperty("credentials") - public Optional getCredentials() { - return credentials; - } - - @JsonProperty("settings") - public Optional> getSettings() { - return settings; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateEmailProviderResponseContent - && equalTo((CreateEmailProviderResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateEmailProviderResponseContent other) { - return name.equals(other.name) - && enabled.equals(other.enabled) - && defaultFromAddress.equals(other.defaultFromAddress) - && credentials.equals(other.credentials) - && settings.equals(other.settings); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.enabled, this.defaultFromAddress, this.credentials, this.settings); - } - - @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 enabled = Optional.empty(); - - private Optional defaultFromAddress = Optional.empty(); - - private Optional credentials = Optional.empty(); - - private Optional> settings = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateEmailProviderResponseContent other) { - name(other.getName()); - enabled(other.getEnabled()); - defaultFromAddress(other.getDefaultFromAddress()); - credentials(other.getCredentials()); - settings(other.getSettings()); - return this; - } - - /** - *

Name of the email provider. Can be mailgun, mandrill, sendgrid, ses, sparkpost, smtp, azure_cs, ms365, or custom.

- */ - @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 the provider is enabled (true) or disabled (false).

- */ - @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; - } - - /** - *

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

- */ - @JsonSetter(value = "default_from_address", nulls = Nulls.SKIP) - public Builder defaultFromAddress(Optional defaultFromAddress) { - this.defaultFromAddress = defaultFromAddress; - return this; - } - - public Builder defaultFromAddress(String defaultFromAddress) { - this.defaultFromAddress = Optional.ofNullable(defaultFromAddress); - return this; - } - - @JsonSetter(value = "credentials", nulls = Nulls.SKIP) - public Builder credentials(Optional credentials) { - this.credentials = credentials; - return this; - } - - public Builder credentials(EmailProviderCredentials credentials) { - this.credentials = Optional.ofNullable(credentials); - return this; - } - - @JsonSetter(value = "settings", nulls = Nulls.SKIP) - public Builder settings(Optional> settings) { - this.settings = settings; - return this; - } - - public Builder settings(Map settings) { - this.settings = Optional.ofNullable(settings); - return this; - } - - public CreateEmailProviderResponseContent build() { - return new CreateEmailProviderResponseContent( - name, enabled, defaultFromAddress, credentials, settings, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEmailTemplateRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateEmailTemplateRequestContent.java deleted file mode 100644 index 646bb455c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEmailTemplateRequestContent.java +++ /dev/null @@ -1,780 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.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 = CreateEmailTemplateRequestContent.Builder.class) -public final class CreateEmailTemplateRequestContent { - private final EmailTemplateNameEnum template; - - private final OptionalNullable body; - - private final OptionalNullable from; - - private final OptionalNullable resultUrl; - - private final OptionalNullable subject; - - private final OptionalNullable syntax; - - private final OptionalNullable urlLifetimeInSeconds; - - private final Optional includeEmailInRedirect; - - private final OptionalNullable enabled; - - private final Map additionalProperties; - - private CreateEmailTemplateRequestContent( - EmailTemplateNameEnum template, - OptionalNullable body, - OptionalNullable from, - OptionalNullable resultUrl, - OptionalNullable subject, - OptionalNullable syntax, - OptionalNullable urlLifetimeInSeconds, - Optional includeEmailInRedirect, - OptionalNullable enabled, - Map additionalProperties) { - this.template = template; - this.body = body; - this.from = from; - this.resultUrl = resultUrl; - this.subject = subject; - this.syntax = syntax; - this.urlLifetimeInSeconds = urlLifetimeInSeconds; - this.includeEmailInRedirect = includeEmailInRedirect; - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("template") - public EmailTemplateNameEnum getTemplate() { - return template; - } - - /** - * @return Body of the email template. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("body") - public OptionalNullable getBody() { - if (body == null) { - return OptionalNullable.absent(); - } - return body; - } - - /** - * @return Senders from email address. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - public OptionalNullable getFrom() { - if (from == null) { - return OptionalNullable.absent(); - } - return from; - } - - /** - * @return URL to redirect the user to after a successful action. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("resultUrl") - public OptionalNullable getResultUrl() { - if (resultUrl == null) { - return OptionalNullable.absent(); - } - return resultUrl; - } - - /** - * @return Subject line of the email. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("subject") - public OptionalNullable getSubject() { - if (subject == null) { - return OptionalNullable.absent(); - } - return subject; - } - - /** - * @return Syntax of the template body. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("syntax") - public OptionalNullable getSyntax() { - if (syntax == null) { - return OptionalNullable.absent(); - } - return syntax; - } - - /** - * @return Lifetime in seconds that the link within the email will be valid for. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("urlLifetimeInSeconds") - public OptionalNullable getUrlLifetimeInSeconds() { - if (urlLifetimeInSeconds == null) { - return OptionalNullable.absent(); - } - return urlLifetimeInSeconds; - } - - /** - * @return Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. - */ - @JsonProperty("includeEmailInRedirect") - public Optional getIncludeEmailInRedirect() { - return includeEmailInRedirect; - } - - /** - * @return Whether the template is enabled (true) or disabled (false). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("enabled") - public OptionalNullable getEnabled() { - if (enabled == null) { - return OptionalNullable.absent(); - } - return enabled; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("body") - private OptionalNullable _getBody() { - return body; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - private OptionalNullable _getFrom() { - return from; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("resultUrl") - private OptionalNullable _getResultUrl() { - return resultUrl; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("subject") - private OptionalNullable _getSubject() { - return subject; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("syntax") - private OptionalNullable _getSyntax() { - return syntax; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("urlLifetimeInSeconds") - private OptionalNullable _getUrlLifetimeInSeconds() { - return urlLifetimeInSeconds; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("enabled") - private OptionalNullable _getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateEmailTemplateRequestContent && equalTo((CreateEmailTemplateRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateEmailTemplateRequestContent other) { - return template.equals(other.template) - && body.equals(other.body) - && from.equals(other.from) - && resultUrl.equals(other.resultUrl) - && subject.equals(other.subject) - && syntax.equals(other.syntax) - && urlLifetimeInSeconds.equals(other.urlLifetimeInSeconds) - && includeEmailInRedirect.equals(other.includeEmailInRedirect) - && enabled.equals(other.enabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.template, - this.body, - this.from, - this.resultUrl, - this.subject, - this.syntax, - this.urlLifetimeInSeconds, - this.includeEmailInRedirect, - this.enabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TemplateStage builder() { - return new Builder(); - } - - public interface TemplateStage { - _FinalStage template(@NotNull EmailTemplateNameEnum template); - - Builder from(CreateEmailTemplateRequestContent other); - } - - public interface _FinalStage { - CreateEmailTemplateRequestContent build(); - - /** - *

Body of the email template.

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

Senders from email address.

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

URL to redirect the user to after a successful action.

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

Subject line of the email.

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

Syntax of the template body.

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

Lifetime in seconds that the link within the email will be valid for.

- */ - _FinalStage urlLifetimeInSeconds(@Nullable OptionalNullable urlLifetimeInSeconds); - - _FinalStage urlLifetimeInSeconds(Double urlLifetimeInSeconds); - - _FinalStage urlLifetimeInSeconds(Optional urlLifetimeInSeconds); - - _FinalStage urlLifetimeInSeconds(com.auth0.client.mgmt.core.Nullable urlLifetimeInSeconds); - - /** - *

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

- */ - _FinalStage includeEmailInRedirect(Optional includeEmailInRedirect); - - _FinalStage includeEmailInRedirect(Boolean includeEmailInRedirect); - - /** - *

Whether the template is enabled (true) or disabled (false).

- */ - _FinalStage enabled(@Nullable OptionalNullable enabled); - - _FinalStage enabled(Boolean enabled); - - _FinalStage enabled(Optional enabled); - - _FinalStage enabled(com.auth0.client.mgmt.core.Nullable enabled); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TemplateStage, _FinalStage { - private EmailTemplateNameEnum template; - - private OptionalNullable enabled = OptionalNullable.absent(); - - private Optional includeEmailInRedirect = Optional.empty(); - - private OptionalNullable urlLifetimeInSeconds = OptionalNullable.absent(); - - private OptionalNullable syntax = OptionalNullable.absent(); - - private OptionalNullable subject = OptionalNullable.absent(); - - private OptionalNullable resultUrl = OptionalNullable.absent(); - - private OptionalNullable from = OptionalNullable.absent(); - - private OptionalNullable body = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateEmailTemplateRequestContent other) { - template(other.getTemplate()); - body(other.getBody()); - from(other.getFrom()); - resultUrl(other.getResultUrl()); - subject(other.getSubject()); - syntax(other.getSyntax()); - urlLifetimeInSeconds(other.getUrlLifetimeInSeconds()); - includeEmailInRedirect(other.getIncludeEmailInRedirect()); - enabled(other.getEnabled()); - return this; - } - - @java.lang.Override - @JsonSetter("template") - public _FinalStage template(@NotNull EmailTemplateNameEnum template) { - this.template = Objects.requireNonNull(template, "template must not be null"); - return this; - } - - /** - *

Whether the template is enabled (true) or disabled (false).

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

Whether the template is enabled (true) or disabled (false).

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

Whether the template is enabled (true) or disabled (false).

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

Whether the template is enabled (true) or disabled (false).

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

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

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

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

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

Lifetime in seconds that the link within the email will be valid for.

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

Lifetime in seconds that the link within the email will be valid for.

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

Lifetime in seconds that the link within the email will be valid for.

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

Lifetime in seconds that the link within the email will be valid for.

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

Syntax of the template body.

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

Syntax of the template body.

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

Syntax of the template body.

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

Syntax of the template body.

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

Subject line of the email.

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

Subject line of the email.

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

Subject line of the email.

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

Subject line of the email.

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

URL to redirect the user to after a successful action.

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

URL to redirect the user to after a successful action.

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

URL to redirect the user to after a successful action.

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

URL to redirect the user to after a successful action.

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

Senders from email address.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage 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; - } - - /** - *

Senders from email address.

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

Senders from email address.

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

Senders from email address.

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

Body of the email template.

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

Body of the email template.

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

Body of the email template.

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

Body of the email template.

- */ - @java.lang.Override - @JsonSetter(value = "body", nulls = Nulls.SKIP) - public _FinalStage body(@Nullable OptionalNullable body) { - this.body = body; - return this; - } - - @java.lang.Override - public CreateEmailTemplateRequestContent build() { - return new CreateEmailTemplateRequestContent( - template, - body, - from, - resultUrl, - subject, - syntax, - urlLifetimeInSeconds, - includeEmailInRedirect, - enabled, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEmailTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateEmailTemplateResponseContent.java deleted file mode 100644 index 3eac25b69..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEmailTemplateResponseContent.java +++ /dev/null @@ -1,781 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.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 = CreateEmailTemplateResponseContent.Builder.class) -public final class CreateEmailTemplateResponseContent { - private final EmailTemplateNameEnum template; - - private final OptionalNullable body; - - private final OptionalNullable from; - - private final OptionalNullable resultUrl; - - private final OptionalNullable subject; - - private final OptionalNullable syntax; - - private final OptionalNullable urlLifetimeInSeconds; - - private final Optional includeEmailInRedirect; - - private final OptionalNullable enabled; - - private final Map additionalProperties; - - private CreateEmailTemplateResponseContent( - EmailTemplateNameEnum template, - OptionalNullable body, - OptionalNullable from, - OptionalNullable resultUrl, - OptionalNullable subject, - OptionalNullable syntax, - OptionalNullable urlLifetimeInSeconds, - Optional includeEmailInRedirect, - OptionalNullable enabled, - Map additionalProperties) { - this.template = template; - this.body = body; - this.from = from; - this.resultUrl = resultUrl; - this.subject = subject; - this.syntax = syntax; - this.urlLifetimeInSeconds = urlLifetimeInSeconds; - this.includeEmailInRedirect = includeEmailInRedirect; - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("template") - public EmailTemplateNameEnum getTemplate() { - return template; - } - - /** - * @return Body of the email template. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("body") - public OptionalNullable getBody() { - if (body == null) { - return OptionalNullable.absent(); - } - return body; - } - - /** - * @return Senders from email address. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - public OptionalNullable getFrom() { - if (from == null) { - return OptionalNullable.absent(); - } - return from; - } - - /** - * @return URL to redirect the user to after a successful action. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("resultUrl") - public OptionalNullable getResultUrl() { - if (resultUrl == null) { - return OptionalNullable.absent(); - } - return resultUrl; - } - - /** - * @return Subject line of the email. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("subject") - public OptionalNullable getSubject() { - if (subject == null) { - return OptionalNullable.absent(); - } - return subject; - } - - /** - * @return Syntax of the template body. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("syntax") - public OptionalNullable getSyntax() { - if (syntax == null) { - return OptionalNullable.absent(); - } - return syntax; - } - - /** - * @return Lifetime in seconds that the link within the email will be valid for. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("urlLifetimeInSeconds") - public OptionalNullable getUrlLifetimeInSeconds() { - if (urlLifetimeInSeconds == null) { - return OptionalNullable.absent(); - } - return urlLifetimeInSeconds; - } - - /** - * @return Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. - */ - @JsonProperty("includeEmailInRedirect") - public Optional getIncludeEmailInRedirect() { - return includeEmailInRedirect; - } - - /** - * @return Whether the template is enabled (true) or disabled (false). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("enabled") - public OptionalNullable getEnabled() { - if (enabled == null) { - return OptionalNullable.absent(); - } - return enabled; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("body") - private OptionalNullable _getBody() { - return body; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - private OptionalNullable _getFrom() { - return from; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("resultUrl") - private OptionalNullable _getResultUrl() { - return resultUrl; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("subject") - private OptionalNullable _getSubject() { - return subject; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("syntax") - private OptionalNullable _getSyntax() { - return syntax; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("urlLifetimeInSeconds") - private OptionalNullable _getUrlLifetimeInSeconds() { - return urlLifetimeInSeconds; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("enabled") - private OptionalNullable _getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateEmailTemplateResponseContent - && equalTo((CreateEmailTemplateResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateEmailTemplateResponseContent other) { - return template.equals(other.template) - && body.equals(other.body) - && from.equals(other.from) - && resultUrl.equals(other.resultUrl) - && subject.equals(other.subject) - && syntax.equals(other.syntax) - && urlLifetimeInSeconds.equals(other.urlLifetimeInSeconds) - && includeEmailInRedirect.equals(other.includeEmailInRedirect) - && enabled.equals(other.enabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.template, - this.body, - this.from, - this.resultUrl, - this.subject, - this.syntax, - this.urlLifetimeInSeconds, - this.includeEmailInRedirect, - this.enabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TemplateStage builder() { - return new Builder(); - } - - public interface TemplateStage { - _FinalStage template(@NotNull EmailTemplateNameEnum template); - - Builder from(CreateEmailTemplateResponseContent other); - } - - public interface _FinalStage { - CreateEmailTemplateResponseContent build(); - - /** - *

Body of the email template.

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

Senders from email address.

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

URL to redirect the user to after a successful action.

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

Subject line of the email.

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

Syntax of the template body.

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

Lifetime in seconds that the link within the email will be valid for.

- */ - _FinalStage urlLifetimeInSeconds(@Nullable OptionalNullable urlLifetimeInSeconds); - - _FinalStage urlLifetimeInSeconds(Double urlLifetimeInSeconds); - - _FinalStage urlLifetimeInSeconds(Optional urlLifetimeInSeconds); - - _FinalStage urlLifetimeInSeconds(com.auth0.client.mgmt.core.Nullable urlLifetimeInSeconds); - - /** - *

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

- */ - _FinalStage includeEmailInRedirect(Optional includeEmailInRedirect); - - _FinalStage includeEmailInRedirect(Boolean includeEmailInRedirect); - - /** - *

Whether the template is enabled (true) or disabled (false).

- */ - _FinalStage enabled(@Nullable OptionalNullable enabled); - - _FinalStage enabled(Boolean enabled); - - _FinalStage enabled(Optional enabled); - - _FinalStage enabled(com.auth0.client.mgmt.core.Nullable enabled); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TemplateStage, _FinalStage { - private EmailTemplateNameEnum template; - - private OptionalNullable enabled = OptionalNullable.absent(); - - private Optional includeEmailInRedirect = Optional.empty(); - - private OptionalNullable urlLifetimeInSeconds = OptionalNullable.absent(); - - private OptionalNullable syntax = OptionalNullable.absent(); - - private OptionalNullable subject = OptionalNullable.absent(); - - private OptionalNullable resultUrl = OptionalNullable.absent(); - - private OptionalNullable from = OptionalNullable.absent(); - - private OptionalNullable body = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateEmailTemplateResponseContent other) { - template(other.getTemplate()); - body(other.getBody()); - from(other.getFrom()); - resultUrl(other.getResultUrl()); - subject(other.getSubject()); - syntax(other.getSyntax()); - urlLifetimeInSeconds(other.getUrlLifetimeInSeconds()); - includeEmailInRedirect(other.getIncludeEmailInRedirect()); - enabled(other.getEnabled()); - return this; - } - - @java.lang.Override - @JsonSetter("template") - public _FinalStage template(@NotNull EmailTemplateNameEnum template) { - this.template = Objects.requireNonNull(template, "template must not be null"); - return this; - } - - /** - *

Whether the template is enabled (true) or disabled (false).

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

Whether the template is enabled (true) or disabled (false).

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

Whether the template is enabled (true) or disabled (false).

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

Whether the template is enabled (true) or disabled (false).

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

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

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

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

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

Lifetime in seconds that the link within the email will be valid for.

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

Lifetime in seconds that the link within the email will be valid for.

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

Lifetime in seconds that the link within the email will be valid for.

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

Lifetime in seconds that the link within the email will be valid for.

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

Syntax of the template body.

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

Syntax of the template body.

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

Syntax of the template body.

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

Syntax of the template body.

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

Subject line of the email.

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

Subject line of the email.

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

Subject line of the email.

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

Subject line of the email.

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

URL to redirect the user to after a successful action.

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

URL to redirect the user to after a successful action.

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

URL to redirect the user to after a successful action.

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

URL to redirect the user to after a successful action.

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

Senders from email address.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage 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; - } - - /** - *

Senders from email address.

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

Senders from email address.

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

Senders from email address.

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

Body of the email template.

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

Body of the email template.

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

Body of the email template.

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

Body of the email template.

- */ - @java.lang.Override - @JsonSetter(value = "body", nulls = Nulls.SKIP) - public _FinalStage body(@Nullable OptionalNullable body) { - this.body = body; - return this; - } - - @java.lang.Override - public CreateEmailTemplateResponseContent build() { - return new CreateEmailTemplateResponseContent( - template, - body, - from, - resultUrl, - subject, - syntax, - urlLifetimeInSeconds, - includeEmailInRedirect, - enabled, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyPublicWrappingResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyPublicWrappingResponseContent.java deleted file mode 100644 index bc6ac47aa..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyPublicWrappingResponseContent.java +++ /dev/null @@ -1,139 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateEncryptionKeyPublicWrappingResponseContent.Builder.class) -public final class CreateEncryptionKeyPublicWrappingResponseContent { - private final String publicKey; - - private final EncryptionKeyPublicWrappingAlgorithm algorithm; - - private final Map additionalProperties; - - private CreateEncryptionKeyPublicWrappingResponseContent( - String publicKey, - EncryptionKeyPublicWrappingAlgorithm algorithm, - Map additionalProperties) { - this.publicKey = publicKey; - this.algorithm = algorithm; - this.additionalProperties = additionalProperties; - } - - /** - * @return Public wrapping key in PEM format - */ - @JsonProperty("public_key") - public String getPublicKey() { - return publicKey; - } - - @JsonProperty("algorithm") - public EncryptionKeyPublicWrappingAlgorithm getAlgorithm() { - return algorithm; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateEncryptionKeyPublicWrappingResponseContent - && equalTo((CreateEncryptionKeyPublicWrappingResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateEncryptionKeyPublicWrappingResponseContent other) { - return publicKey.equals(other.publicKey) && algorithm.equals(other.algorithm); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.publicKey, this.algorithm); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static PublicKeyStage builder() { - return new Builder(); - } - - public interface PublicKeyStage { - /** - *

Public wrapping key in PEM format

- */ - AlgorithmStage publicKey(@NotNull String publicKey); - - Builder from(CreateEncryptionKeyPublicWrappingResponseContent other); - } - - public interface AlgorithmStage { - _FinalStage algorithm(@NotNull EncryptionKeyPublicWrappingAlgorithm algorithm); - } - - public interface _FinalStage { - CreateEncryptionKeyPublicWrappingResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements PublicKeyStage, AlgorithmStage, _FinalStage { - private String publicKey; - - private EncryptionKeyPublicWrappingAlgorithm algorithm; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateEncryptionKeyPublicWrappingResponseContent other) { - publicKey(other.getPublicKey()); - algorithm(other.getAlgorithm()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("public_key") - public AlgorithmStage publicKey(@NotNull String publicKey) { - this.publicKey = Objects.requireNonNull(publicKey, "publicKey must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("algorithm") - public _FinalStage algorithm(@NotNull EncryptionKeyPublicWrappingAlgorithm algorithm) { - this.algorithm = Objects.requireNonNull(algorithm, "algorithm must not be null"); - return this; - } - - @java.lang.Override - public CreateEncryptionKeyPublicWrappingResponseContent build() { - return new CreateEncryptionKeyPublicWrappingResponseContent(publicKey, algorithm, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyResponseContent.java deleted file mode 100644 index 922f8ddda..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyResponseContent.java +++ /dev/null @@ -1,417 +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.NotNull; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateEncryptionKeyResponseContent.Builder.class) -public final class CreateEncryptionKeyResponseContent { - private final String kid; - - private final EncryptionKeyType type; - - private final EncryptionKeyState state; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final OptionalNullable parentKid; - - private final OptionalNullable publicKey; - - private final Map additionalProperties; - - private CreateEncryptionKeyResponseContent( - String kid, - EncryptionKeyType type, - EncryptionKeyState state, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - OptionalNullable parentKid, - OptionalNullable publicKey, - Map additionalProperties) { - this.kid = kid; - this.type = type; - this.state = state; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.parentKid = parentKid; - this.publicKey = publicKey; - this.additionalProperties = additionalProperties; - } - - /** - * @return Key ID - */ - @JsonProperty("kid") - public String getKid() { - return kid; - } - - @JsonProperty("type") - public EncryptionKeyType getType() { - return type; - } - - @JsonProperty("state") - public EncryptionKeyState getState() { - return state; - } - - /** - * @return Key creation timestamp - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return Key update timestamp - */ - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - /** - * @return ID of parent wrapping key - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("parent_kid") - public OptionalNullable getParentKid() { - if (parentKid == null) { - return OptionalNullable.absent(); - } - return parentKid; - } - - /** - * @return Public key in PEM format - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("public_key") - public OptionalNullable getPublicKey() { - if (publicKey == null) { - return OptionalNullable.absent(); - } - return publicKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("parent_kid") - private OptionalNullable _getParentKid() { - return parentKid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("public_key") - private OptionalNullable _getPublicKey() { - return publicKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateEncryptionKeyResponseContent - && equalTo((CreateEncryptionKeyResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateEncryptionKeyResponseContent other) { - return kid.equals(other.kid) - && type.equals(other.type) - && state.equals(other.state) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && parentKid.equals(other.parentKid) - && publicKey.equals(other.publicKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.kid, this.type, this.state, this.createdAt, this.updatedAt, this.parentKid, this.publicKey); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static KidStage builder() { - return new Builder(); - } - - public interface KidStage { - /** - *

Key ID

- */ - TypeStage kid(@NotNull String kid); - - Builder from(CreateEncryptionKeyResponseContent other); - } - - public interface TypeStage { - StateStage type(@NotNull EncryptionKeyType type); - } - - public interface StateStage { - CreatedAtStage state(@NotNull EncryptionKeyState state); - } - - public interface CreatedAtStage { - /** - *

Key creation timestamp

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

Key update timestamp

- */ - _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); - } - - public interface _FinalStage { - CreateEncryptionKeyResponseContent build(); - - /** - *

ID of parent wrapping key

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

Public key in PEM format

- */ - _FinalStage publicKey(@Nullable OptionalNullable publicKey); - - _FinalStage publicKey(String publicKey); - - _FinalStage publicKey(Optional publicKey); - - _FinalStage publicKey(com.auth0.client.mgmt.core.Nullable publicKey); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements KidStage, TypeStage, StateStage, CreatedAtStage, UpdatedAtStage, _FinalStage { - private String kid; - - private EncryptionKeyType type; - - private EncryptionKeyState state; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private OptionalNullable publicKey = OptionalNullable.absent(); - - private OptionalNullable parentKid = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateEncryptionKeyResponseContent other) { - kid(other.getKid()); - type(other.getType()); - state(other.getState()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - parentKid(other.getParentKid()); - publicKey(other.getPublicKey()); - return this; - } - - /** - *

Key ID

- *

Key ID

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("kid") - public TypeStage kid(@NotNull String kid) { - this.kid = Objects.requireNonNull(kid, "kid must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public StateStage type(@NotNull EncryptionKeyType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("state") - public CreatedAtStage state(@NotNull EncryptionKeyState state) { - this.state = Objects.requireNonNull(state, "state must not be null"); - return this; - } - - /** - *

Key creation timestamp

- *

Key creation timestamp

- * @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; - } - - /** - *

Key update timestamp

- *

Key update timestamp

- * @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; - } - - /** - *

Public key in PEM format

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

Public key in PEM format

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

Public key in PEM format

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

Public key in PEM format

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

ID of parent wrapping key

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

ID of parent wrapping key

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

ID of parent wrapping key

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

ID of parent wrapping key

- */ - @java.lang.Override - @JsonSetter(value = "parent_kid", nulls = Nulls.SKIP) - public _FinalStage parentKid(@Nullable OptionalNullable parentKid) { - this.parentKid = parentKid; - return this; - } - - @java.lang.Override - public CreateEncryptionKeyResponseContent build() { - return new CreateEncryptionKeyResponseContent( - kid, type, state, createdAt, updatedAt, parentKid, publicKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyType.java b/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyType.java deleted file mode 100644 index 8391b512d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEncryptionKeyType.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreateEncryptionKeyType { - public static final CreateEncryptionKeyType CUSTOMER_PROVIDED_ROOT_KEY = - new CreateEncryptionKeyType(Value.CUSTOMER_PROVIDED_ROOT_KEY, "customer-provided-root-key"); - - public static final CreateEncryptionKeyType TENANT_ENCRYPTION_KEY = - new CreateEncryptionKeyType(Value.TENANT_ENCRYPTION_KEY, "tenant-encryption-key"); - - private final Value value; - - private final String string; - - CreateEncryptionKeyType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreateEncryptionKeyType - && this.string.equals(((CreateEncryptionKeyType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CUSTOMER_PROVIDED_ROOT_KEY: - return visitor.visitCustomerProvidedRootKey(); - case TENANT_ENCRYPTION_KEY: - return visitor.visitTenantEncryptionKey(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreateEncryptionKeyType valueOf(String value) { - switch (value) { - case "customer-provided-root-key": - return CUSTOMER_PROVIDED_ROOT_KEY; - case "tenant-encryption-key": - return TENANT_ENCRYPTION_KEY; - default: - return new CreateEncryptionKeyType(Value.UNKNOWN, value); - } - } - - public enum Value { - CUSTOMER_PROVIDED_ROOT_KEY, - - TENANT_ENCRYPTION_KEY, - - UNKNOWN - } - - public interface Visitor { - T visitCustomerProvidedRootKey(); - - T visitTenantEncryptionKey(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamActionRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamActionRequestContent.java deleted file mode 100644 index b415797bf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamActionRequestContent.java +++ /dev/null @@ -1,225 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateEventStreamActionRequestContent.Builder.class) -public final class CreateEventStreamActionRequestContent { - private final Optional name; - - private final Optional> subscriptions; - - private final EventStreamActionDestination destination; - - private final Optional status; - - private final Map additionalProperties; - - private CreateEventStreamActionRequestContent( - Optional name, - Optional> subscriptions, - EventStreamActionDestination destination, - Optional status, - Map additionalProperties) { - this.name = name; - this.subscriptions = subscriptions; - this.destination = destination; - this.status = status; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of the event stream. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return List of event types subscribed to in this stream. - */ - @JsonProperty("subscriptions") - public Optional> getSubscriptions() { - return subscriptions; - } - - @JsonProperty("destination") - public EventStreamActionDestination getDestination() { - return destination; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateEventStreamActionRequestContent - && equalTo((CreateEventStreamActionRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateEventStreamActionRequestContent other) { - return name.equals(other.name) - && subscriptions.equals(other.subscriptions) - && destination.equals(other.destination) - && status.equals(other.status); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.subscriptions, this.destination, this.status); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static DestinationStage builder() { - return new Builder(); - } - - public interface DestinationStage { - _FinalStage destination(@NotNull EventStreamActionDestination destination); - - Builder from(CreateEventStreamActionRequestContent other); - } - - public interface _FinalStage { - CreateEventStreamActionRequestContent build(); - - /** - *

Name of the event stream.

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

List of event types subscribed to in this stream.

- */ - _FinalStage subscriptions(Optional> subscriptions); - - _FinalStage subscriptions(List subscriptions); - - _FinalStage status(Optional status); - - _FinalStage status(EventStreamStatusEnum status); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements DestinationStage, _FinalStage { - private EventStreamActionDestination destination; - - private Optional status = Optional.empty(); - - private Optional> subscriptions = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateEventStreamActionRequestContent other) { - name(other.getName()); - subscriptions(other.getSubscriptions()); - destination(other.getDestination()); - status(other.getStatus()); - return this; - } - - @java.lang.Override - @JsonSetter("destination") - public _FinalStage destination(@NotNull EventStreamActionDestination destination) { - this.destination = Objects.requireNonNull(destination, "destination must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage status(EventStreamStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - @java.lang.Override - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public _FinalStage status(Optional status) { - this.status = status; - return this; - } - - /** - *

List of event types subscribed to in this stream.

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

List of event types subscribed to in this stream.

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

Name of the event stream.

- * @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 the event stream.

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateEventStreamActionRequestContent build() { - return new CreateEventStreamActionRequestContent( - name, subscriptions, destination, status, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamEventBridgeRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamEventBridgeRequestContent.java deleted file mode 100644 index 08b37a544..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamEventBridgeRequestContent.java +++ /dev/null @@ -1,225 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateEventStreamEventBridgeRequestContent.Builder.class) -public final class CreateEventStreamEventBridgeRequestContent { - private final Optional name; - - private final Optional> subscriptions; - - private final EventStreamEventBridgeDestination destination; - - private final Optional status; - - private final Map additionalProperties; - - private CreateEventStreamEventBridgeRequestContent( - Optional name, - Optional> subscriptions, - EventStreamEventBridgeDestination destination, - Optional status, - Map additionalProperties) { - this.name = name; - this.subscriptions = subscriptions; - this.destination = destination; - this.status = status; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of the event stream. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return List of event types subscribed to in this stream. - */ - @JsonProperty("subscriptions") - public Optional> getSubscriptions() { - return subscriptions; - } - - @JsonProperty("destination") - public EventStreamEventBridgeDestination getDestination() { - return destination; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateEventStreamEventBridgeRequestContent - && equalTo((CreateEventStreamEventBridgeRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateEventStreamEventBridgeRequestContent other) { - return name.equals(other.name) - && subscriptions.equals(other.subscriptions) - && destination.equals(other.destination) - && status.equals(other.status); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.subscriptions, this.destination, this.status); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static DestinationStage builder() { - return new Builder(); - } - - public interface DestinationStage { - _FinalStage destination(@NotNull EventStreamEventBridgeDestination destination); - - Builder from(CreateEventStreamEventBridgeRequestContent other); - } - - public interface _FinalStage { - CreateEventStreamEventBridgeRequestContent build(); - - /** - *

Name of the event stream.

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

List of event types subscribed to in this stream.

- */ - _FinalStage subscriptions(Optional> subscriptions); - - _FinalStage subscriptions(List subscriptions); - - _FinalStage status(Optional status); - - _FinalStage status(EventStreamStatusEnum status); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements DestinationStage, _FinalStage { - private EventStreamEventBridgeDestination destination; - - private Optional status = Optional.empty(); - - private Optional> subscriptions = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateEventStreamEventBridgeRequestContent other) { - name(other.getName()); - subscriptions(other.getSubscriptions()); - destination(other.getDestination()); - status(other.getStatus()); - return this; - } - - @java.lang.Override - @JsonSetter("destination") - public _FinalStage destination(@NotNull EventStreamEventBridgeDestination destination) { - this.destination = Objects.requireNonNull(destination, "destination must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage status(EventStreamStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - @java.lang.Override - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public _FinalStage status(Optional status) { - this.status = status; - return this; - } - - /** - *

List of event types subscribed to in this stream.

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

List of event types subscribed to in this stream.

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

Name of the event stream.

- * @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 the event stream.

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateEventStreamEventBridgeRequestContent build() { - return new CreateEventStreamEventBridgeRequestContent( - name, subscriptions, destination, status, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamRedeliveryResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamRedeliveryResponseContent.java deleted file mode 100644 index 561e13d39..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamRedeliveryResponseContent.java +++ /dev/null @@ -1,197 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = CreateEventStreamRedeliveryResponseContent.Builder.class) -public final class CreateEventStreamRedeliveryResponseContent { - private final Optional dateFrom; - - private final Optional dateTo; - - private final Optional> statuses; - - private final Optional> eventTypes; - - private final Map additionalProperties; - - private CreateEventStreamRedeliveryResponseContent( - Optional dateFrom, - Optional dateTo, - Optional> statuses, - Optional> eventTypes, - Map additionalProperties) { - this.dateFrom = dateFrom; - this.dateTo = dateTo; - this.statuses = statuses; - this.eventTypes = eventTypes; - this.additionalProperties = additionalProperties; - } - - /** - * @return An RFC-3339 date-time for redelivery start, inclusive. Does not allow sub-second precision. - */ - @JsonProperty("date_from") - public Optional getDateFrom() { - return dateFrom; - } - - /** - * @return An RFC-3339 date-time for redelivery end, exclusive. Does not allow sub-second precision. - */ - @JsonProperty("date_to") - public Optional getDateTo() { - return dateTo; - } - - /** - * @return Filter by status - */ - @JsonProperty("statuses") - public Optional> getStatuses() { - return statuses; - } - - /** - * @return Filter by event type - */ - @JsonProperty("event_types") - public Optional> getEventTypes() { - return eventTypes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateEventStreamRedeliveryResponseContent - && equalTo((CreateEventStreamRedeliveryResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateEventStreamRedeliveryResponseContent other) { - return dateFrom.equals(other.dateFrom) - && dateTo.equals(other.dateTo) - && statuses.equals(other.statuses) - && eventTypes.equals(other.eventTypes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.dateFrom, this.dateTo, this.statuses, this.eventTypes); - } - - @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 dateFrom = Optional.empty(); - - private Optional dateTo = Optional.empty(); - - private Optional> statuses = Optional.empty(); - - private Optional> eventTypes = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateEventStreamRedeliveryResponseContent other) { - dateFrom(other.getDateFrom()); - dateTo(other.getDateTo()); - statuses(other.getStatuses()); - eventTypes(other.getEventTypes()); - return this; - } - - /** - *

An RFC-3339 date-time for redelivery start, inclusive. Does not allow sub-second precision.

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

An RFC-3339 date-time for redelivery end, exclusive. Does not allow sub-second precision.

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

Filter by status

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

Filter by event type

- */ - @JsonSetter(value = "event_types", nulls = Nulls.SKIP) - public Builder eventTypes(Optional> eventTypes) { - this.eventTypes = eventTypes; - return this; - } - - public Builder eventTypes(List eventTypes) { - this.eventTypes = Optional.ofNullable(eventTypes); - return this; - } - - public CreateEventStreamRedeliveryResponseContent build() { - return new CreateEventStreamRedeliveryResponseContent( - dateFrom, dateTo, statuses, eventTypes, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamResponseContent.java deleted file mode 100644 index e8a0edb1b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamResponseContent.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateEventStreamResponseContent.Deserializer.class) -public final class CreateEventStreamResponseContent { - private final Object value; - - private final int type; - - private CreateEventStreamResponseContent(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((EventStreamWebhookResponseContent) this.value); - } else if (this.type == 1) { - return visitor.visit((EventStreamEventBridgeResponseContent) this.value); - } else if (this.type == 2) { - return visitor.visit((EventStreamActionResponseContent) 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 CreateEventStreamResponseContent && equalTo((CreateEventStreamResponseContent) other); - } - - private boolean equalTo(CreateEventStreamResponseContent 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 CreateEventStreamResponseContent of(EventStreamWebhookResponseContent value) { - return new CreateEventStreamResponseContent(value, 0); - } - - public static CreateEventStreamResponseContent of(EventStreamEventBridgeResponseContent value) { - return new CreateEventStreamResponseContent(value, 1); - } - - public static CreateEventStreamResponseContent of(EventStreamActionResponseContent value) { - return new CreateEventStreamResponseContent(value, 2); - } - - public interface Visitor { - T visit(EventStreamWebhookResponseContent value); - - T visit(EventStreamEventBridgeResponseContent value); - - T visit(EventStreamActionResponseContent value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateEventStreamResponseContent.class); - } - - @java.lang.Override - public CreateEventStreamResponseContent deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamWebhookResponseContent.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamEventBridgeResponseContent.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamActionResponseContent.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamTestEventRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamTestEventRequestContent.java deleted file mode 100644 index 0909fa7f5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamTestEventRequestContent.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateEventStreamTestEventRequestContent.Builder.class) -public final class CreateEventStreamTestEventRequestContent { - private final EventStreamTestEventTypeEnum eventType; - - private final Optional> data; - - private final Map additionalProperties; - - private CreateEventStreamTestEventRequestContent( - EventStreamTestEventTypeEnum eventType, - Optional> data, - Map additionalProperties) { - this.eventType = eventType; - this.data = data; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("event_type") - public EventStreamTestEventTypeEnum getEventType() { - return eventType; - } - - @JsonProperty("data") - public Optional> getData() { - return data; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateEventStreamTestEventRequestContent - && equalTo((CreateEventStreamTestEventRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateEventStreamTestEventRequestContent other) { - return eventType.equals(other.eventType) && data.equals(other.data); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.eventType, this.data); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EventTypeStage builder() { - return new Builder(); - } - - public interface EventTypeStage { - _FinalStage eventType(@NotNull EventStreamTestEventTypeEnum eventType); - - Builder from(CreateEventStreamTestEventRequestContent other); - } - - public interface _FinalStage { - CreateEventStreamTestEventRequestContent build(); - - _FinalStage data(Optional> data); - - _FinalStage data(Map data); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EventTypeStage, _FinalStage { - private EventStreamTestEventTypeEnum eventType; - - private Optional> data = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateEventStreamTestEventRequestContent other) { - eventType(other.getEventType()); - data(other.getData()); - return this; - } - - @java.lang.Override - @JsonSetter("event_type") - public _FinalStage eventType(@NotNull EventStreamTestEventTypeEnum eventType) { - this.eventType = Objects.requireNonNull(eventType, "eventType must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage data(Map data) { - this.data = Optional.ofNullable(data); - return this; - } - - @java.lang.Override - @JsonSetter(value = "data", nulls = Nulls.SKIP) - public _FinalStage data(Optional> data) { - this.data = data; - return this; - } - - @java.lang.Override - public CreateEventStreamTestEventRequestContent build() { - return new CreateEventStreamTestEventRequestContent(eventType, data, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamTestEventResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamTestEventResponseContent.java deleted file mode 100644 index 2269e28f1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamTestEventResponseContent.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = CreateEventStreamTestEventResponseContent.Builder.class) -public final class CreateEventStreamTestEventResponseContent { - private final String id; - - private final String eventStreamId; - - private final EventStreamDeliveryStatusEnum status; - - private final EventStreamDeliveryEventTypeEnum eventType; - - private final List attempts; - - private final Optional event; - - private final Map additionalProperties; - - private CreateEventStreamTestEventResponseContent( - String id, - String eventStreamId, - EventStreamDeliveryStatusEnum status, - EventStreamDeliveryEventTypeEnum eventType, - List attempts, - Optional event, - Map additionalProperties) { - this.id = id; - this.eventStreamId = eventStreamId; - this.status = status; - this.eventType = eventType; - this.attempts = attempts; - this.event = event; - this.additionalProperties = additionalProperties; - } - - /** - * @return Unique identifier for the delivery - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return Unique identifier for the event stream. - */ - @JsonProperty("event_stream_id") - public String getEventStreamId() { - return eventStreamId; - } - - @JsonProperty("status") - public EventStreamDeliveryStatusEnum getStatus() { - return status; - } - - @JsonProperty("event_type") - public EventStreamDeliveryEventTypeEnum getEventType() { - return eventType; - } - - /** - * @return Results of delivery attempts - */ - @JsonProperty("attempts") - public List getAttempts() { - return attempts; - } - - @JsonProperty("event") - public Optional getEvent() { - return event; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateEventStreamTestEventResponseContent - && equalTo((CreateEventStreamTestEventResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateEventStreamTestEventResponseContent other) { - return id.equals(other.id) - && eventStreamId.equals(other.eventStreamId) - && status.equals(other.status) - && eventType.equals(other.eventType) - && attempts.equals(other.attempts) - && event.equals(other.event); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.eventStreamId, this.status, this.eventType, this.attempts, this.event); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

Unique identifier for the delivery

- */ - EventStreamIdStage id(@NotNull String id); - - Builder from(CreateEventStreamTestEventResponseContent other); - } - - public interface EventStreamIdStage { - /** - *

Unique identifier for the event stream.

- */ - StatusStage eventStreamId(@NotNull String eventStreamId); - } - - public interface StatusStage { - EventTypeStage status(@NotNull EventStreamDeliveryStatusEnum status); - } - - public interface EventTypeStage { - _FinalStage eventType(@NotNull EventStreamDeliveryEventTypeEnum eventType); - } - - public interface _FinalStage { - CreateEventStreamTestEventResponseContent build(); - - /** - *

Results of delivery attempts

- */ - _FinalStage attempts(List attempts); - - _FinalStage addAttempts(EventStreamDeliveryAttempt attempts); - - _FinalStage addAllAttempts(List attempts); - - _FinalStage event(Optional event); - - _FinalStage event(EventStreamCloudEvent event); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, EventStreamIdStage, StatusStage, EventTypeStage, _FinalStage { - private String id; - - private String eventStreamId; - - private EventStreamDeliveryStatusEnum status; - - private EventStreamDeliveryEventTypeEnum eventType; - - private Optional event = Optional.empty(); - - private List attempts = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateEventStreamTestEventResponseContent other) { - id(other.getId()); - eventStreamId(other.getEventStreamId()); - status(other.getStatus()); - eventType(other.getEventType()); - attempts(other.getAttempts()); - event(other.getEvent()); - return this; - } - - /** - *

Unique identifier for the delivery

- *

Unique identifier for the delivery

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

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. - */ - @java.lang.Override - @JsonSetter("event_stream_id") - public StatusStage eventStreamId(@NotNull String eventStreamId) { - this.eventStreamId = Objects.requireNonNull(eventStreamId, "eventStreamId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("status") - public EventTypeStage status(@NotNull EventStreamDeliveryStatusEnum status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("event_type") - public _FinalStage eventType(@NotNull EventStreamDeliveryEventTypeEnum eventType) { - this.eventType = Objects.requireNonNull(eventType, "eventType must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage event(EventStreamCloudEvent event) { - this.event = Optional.ofNullable(event); - return this; - } - - @java.lang.Override - @JsonSetter(value = "event", nulls = Nulls.SKIP) - public _FinalStage event(Optional event) { - this.event = event; - return this; - } - - /** - *

Results of delivery attempts

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

Results of delivery attempts

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addAttempts(EventStreamDeliveryAttempt attempts) { - this.attempts.add(attempts); - return this; - } - - /** - *

Results of delivery attempts

- */ - @java.lang.Override - @JsonSetter(value = "attempts", nulls = Nulls.SKIP) - public _FinalStage attempts(List attempts) { - this.attempts.clear(); - if (attempts != null) { - this.attempts.addAll(attempts); - } - return this; - } - - @java.lang.Override - public CreateEventStreamTestEventResponseContent build() { - return new CreateEventStreamTestEventResponseContent( - id, eventStreamId, status, eventType, attempts, event, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamWebHookRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamWebHookRequestContent.java deleted file mode 100644 index c0ef573bb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateEventStreamWebHookRequestContent.java +++ /dev/null @@ -1,225 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateEventStreamWebHookRequestContent.Builder.class) -public final class CreateEventStreamWebHookRequestContent { - private final Optional name; - - private final Optional> subscriptions; - - private final EventStreamWebhookDestination destination; - - private final Optional status; - - private final Map additionalProperties; - - private CreateEventStreamWebHookRequestContent( - Optional name, - Optional> subscriptions, - EventStreamWebhookDestination destination, - Optional status, - Map additionalProperties) { - this.name = name; - this.subscriptions = subscriptions; - this.destination = destination; - this.status = status; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of the event stream. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return List of event types subscribed to in this stream. - */ - @JsonProperty("subscriptions") - public Optional> getSubscriptions() { - return subscriptions; - } - - @JsonProperty("destination") - public EventStreamWebhookDestination getDestination() { - return destination; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateEventStreamWebHookRequestContent - && equalTo((CreateEventStreamWebHookRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateEventStreamWebHookRequestContent other) { - return name.equals(other.name) - && subscriptions.equals(other.subscriptions) - && destination.equals(other.destination) - && status.equals(other.status); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.subscriptions, this.destination, this.status); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static DestinationStage builder() { - return new Builder(); - } - - public interface DestinationStage { - _FinalStage destination(@NotNull EventStreamWebhookDestination destination); - - Builder from(CreateEventStreamWebHookRequestContent other); - } - - public interface _FinalStage { - CreateEventStreamWebHookRequestContent build(); - - /** - *

Name of the event stream.

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

List of event types subscribed to in this stream.

- */ - _FinalStage subscriptions(Optional> subscriptions); - - _FinalStage subscriptions(List subscriptions); - - _FinalStage status(Optional status); - - _FinalStage status(EventStreamStatusEnum status); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements DestinationStage, _FinalStage { - private EventStreamWebhookDestination destination; - - private Optional status = Optional.empty(); - - private Optional> subscriptions = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateEventStreamWebHookRequestContent other) { - name(other.getName()); - subscriptions(other.getSubscriptions()); - destination(other.getDestination()); - status(other.getStatus()); - return this; - } - - @java.lang.Override - @JsonSetter("destination") - public _FinalStage destination(@NotNull EventStreamWebhookDestination destination) { - this.destination = Objects.requireNonNull(destination, "destination must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage status(EventStreamStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - @java.lang.Override - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public _FinalStage status(Optional status) { - this.status = status; - return this; - } - - /** - *

List of event types subscribed to in this stream.

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

List of event types subscribed to in this stream.

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

Name of the event stream.

- * @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 the event stream.

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateEventStreamWebHookRequestContent build() { - return new CreateEventStreamWebHookRequestContent( - name, subscriptions, destination, status, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateExportUsersFields.java b/src/main/java/com/auth0/client/mgmt/types/CreateExportUsersFields.java deleted file mode 100644 index 48ebd22df..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateExportUsersFields.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateExportUsersFields.Builder.class) -public final class CreateExportUsersFields { - private final String name; - - private final Optional exportAs; - - private final Map additionalProperties; - - private CreateExportUsersFields(String name, Optional exportAs, Map additionalProperties) { - this.name = name; - this.exportAs = exportAs; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of the field in the profile. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return Title of the column in the exported CSV. - */ - @JsonProperty("export_as") - public Optional getExportAs() { - return exportAs; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateExportUsersFields && equalTo((CreateExportUsersFields) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateExportUsersFields other) { - return name.equals(other.name) && exportAs.equals(other.exportAs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.exportAs); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Name of the field in the profile.

- */ - _FinalStage name(@NotNull String name); - - Builder from(CreateExportUsersFields other); - } - - public interface _FinalStage { - CreateExportUsersFields build(); - - /** - *

Title of the column in the exported CSV.

- */ - _FinalStage exportAs(Optional exportAs); - - _FinalStage exportAs(String exportAs); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; - - private Optional exportAs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateExportUsersFields other) { - name(other.getName()); - exportAs(other.getExportAs()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("name") - public _FinalStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - /** - *

Title of the column in the exported CSV.

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

Title of the column in the exported CSV.

- */ - @java.lang.Override - @JsonSetter(value = "export_as", nulls = Nulls.SKIP) - public _FinalStage exportAs(Optional exportAs) { - this.exportAs = exportAs; - return this; - } - - @java.lang.Override - public CreateExportUsersFields build() { - return new CreateExportUsersFields(name, exportAs, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateExportUsersResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateExportUsersResponseContent.java deleted file mode 100644 index ab3539c98..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateExportUsersResponseContent.java +++ /dev/null @@ -1,399 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateExportUsersResponseContent.Builder.class) -public final class CreateExportUsersResponseContent { - private final String status; - - private final String type; - - private final Optional createdAt; - - private final String id; - - private final Optional connectionId; - - private final Optional format; - - private final Optional limit; - - private final Optional> fields; - - private final Map additionalProperties; - - private CreateExportUsersResponseContent( - String status, - String type, - Optional createdAt, - String id, - Optional connectionId, - Optional format, - Optional limit, - Optional> fields, - Map additionalProperties) { - this.status = status; - this.type = type; - this.createdAt = createdAt; - this.id = id; - this.connectionId = connectionId; - this.format = format; - this.limit = limit; - this.fields = fields; - this.additionalProperties = additionalProperties; - } - - /** - * @return Status of this job. - */ - @JsonProperty("status") - public String getStatus() { - return status; - } - - /** - * @return Type of job this is. - */ - @JsonProperty("type") - public String getType() { - return type; - } - - /** - * @return When this job was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return ID of this job. - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return connection_id of the connection from which users will be exported. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - @JsonProperty("format") - public Optional getFormat() { - return format; - } - - /** - * @return Limit the number of records. - */ - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - /** - * @return List of fields to be included in the CSV. Defaults to a predefined set of fields. - */ - @JsonProperty("fields") - public Optional> getFields() { - return fields; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateExportUsersResponseContent && equalTo((CreateExportUsersResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateExportUsersResponseContent other) { - return status.equals(other.status) - && type.equals(other.type) - && createdAt.equals(other.createdAt) - && id.equals(other.id) - && connectionId.equals(other.connectionId) - && format.equals(other.format) - && limit.equals(other.limit) - && fields.equals(other.fields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.status, - this.type, - this.createdAt, - this.id, - this.connectionId, - this.format, - this.limit, - this.fields); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StatusStage builder() { - return new Builder(); - } - - public interface StatusStage { - /** - *

Status of this job.

- */ - TypeStage status(@NotNull String status); - - Builder from(CreateExportUsersResponseContent other); - } - - public interface TypeStage { - /** - *

Type of job this is.

- */ - IdStage type(@NotNull String type); - } - - public interface IdStage { - /** - *

ID of this job.

- */ - _FinalStage id(@NotNull String id); - } - - public interface _FinalStage { - CreateExportUsersResponseContent build(); - - /** - *

When this job was created.

- */ - _FinalStage createdAt(Optional createdAt); - - _FinalStage createdAt(String createdAt); - - /** - *

connection_id of the connection from which users will be exported.

- */ - _FinalStage connectionId(Optional connectionId); - - _FinalStage connectionId(String connectionId); - - _FinalStage format(Optional format); - - _FinalStage format(JobFileFormatEnum format); - - /** - *

Limit the number of records.

- */ - _FinalStage limit(Optional limit); - - _FinalStage limit(Integer limit); - - /** - *

List of fields to be included in the CSV. Defaults to a predefined set of fields.

- */ - _FinalStage fields(Optional> fields); - - _FinalStage fields(List fields); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StatusStage, TypeStage, IdStage, _FinalStage { - private String status; - - private String type; - - private String id; - - private Optional> fields = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional format = Optional.empty(); - - private Optional connectionId = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateExportUsersResponseContent other) { - status(other.getStatus()); - type(other.getType()); - createdAt(other.getCreatedAt()); - id(other.getId()); - connectionId(other.getConnectionId()); - format(other.getFormat()); - limit(other.getLimit()); - fields(other.getFields()); - return this; - } - - /** - *

Status of this job.

- *

Status of this job.

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

Type of job this is.

- *

Type of job this is.

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

ID of this job.

- *

ID of this job.

- * @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; - } - - /** - *

List of fields to be included in the CSV. Defaults to a predefined set of fields.

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

List of fields to be included in the CSV. Defaults to a predefined set of fields.

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

Limit the number of records.

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

Limit the number of records.

- */ - @java.lang.Override - @JsonSetter(value = "limit", nulls = Nulls.SKIP) - public _FinalStage limit(Optional limit) { - this.limit = limit; - return this; - } - - @java.lang.Override - public _FinalStage format(JobFileFormatEnum format) { - this.format = Optional.ofNullable(format); - return this; - } - - @java.lang.Override - @JsonSetter(value = "format", nulls = Nulls.SKIP) - public _FinalStage format(Optional format) { - this.format = format; - return this; - } - - /** - *

connection_id of the connection from which users will be exported.

- * @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; - } - - /** - *

connection_id of the connection from which users will be exported.

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

When this job was created.

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

When this job was created.

- */ - @java.lang.Override - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public _FinalStage createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - @java.lang.Override - public CreateExportUsersResponseContent build() { - return new CreateExportUsersResponseContent( - status, type, createdAt, id, connectionId, format, limit, fields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowRequestContent.java deleted file mode 100644 index 929af5f34..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowRequestContent.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateFlowRequestContent.Builder.class) -public final class CreateFlowRequestContent { - private final String name; - - private final Optional> actions; - - private final Map additionalProperties; - - private CreateFlowRequestContent( - String name, Optional> actions, Map additionalProperties) { - this.name = name; - this.actions = actions; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("actions") - public Optional> getActions() { - return actions; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowRequestContent && equalTo((CreateFlowRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowRequestContent other) { - return name.equals(other.name) && actions.equals(other.actions); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.actions); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - _FinalStage name(@NotNull String name); - - Builder from(CreateFlowRequestContent other); - } - - public interface _FinalStage { - CreateFlowRequestContent build(); - - _FinalStage actions(Optional> actions); - - _FinalStage actions(List actions); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; - - private Optional> actions = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowRequestContent other) { - name(other.getName()); - actions(other.getActions()); - return this; - } - - @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 actions(List actions) { - this.actions = Optional.ofNullable(actions); - return this; - } - - @java.lang.Override - @JsonSetter(value = "actions", nulls = Nulls.SKIP) - public _FinalStage actions(Optional> actions) { - this.actions = actions; - return this; - } - - @java.lang.Override - public CreateFlowRequestContent build() { - return new CreateFlowRequestContent(name, actions, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowResponseContent.java deleted file mode 100644 index eabb8c199..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowResponseContent.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = CreateFlowResponseContent.Builder.class) -public final class CreateFlowResponseContent { - private final String id; - - private final String name; - - private final Optional> actions; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional executedAt; - - private final Map additionalProperties; - - private CreateFlowResponseContent( - String id, - String name, - Optional> actions, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional executedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.actions = actions; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.executedAt = executedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("actions") - public Optional> getActions() { - return actions; - } - - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("executed_at") - public Optional getExecutedAt() { - return executedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowResponseContent && equalTo((CreateFlowResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && actions.equals(other.actions) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && executedAt.equals(other.executedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.actions, this.createdAt, this.updatedAt, this.executedAt); - } - - @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(CreateFlowResponseContent other); - } - - 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 { - CreateFlowResponseContent build(); - - _FinalStage actions(Optional> actions); - - _FinalStage actions(List actions); - - _FinalStage executedAt(Optional executedAt); - - _FinalStage executedAt(String executedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, CreatedAtStage, UpdatedAtStage, _FinalStage { - private String id; - - private String name; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private Optional executedAt = Optional.empty(); - - private Optional> actions = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowResponseContent other) { - id(other.getId()); - name(other.getName()); - actions(other.getActions()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - executedAt(other.getExecutedAt()); - 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 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 executedAt(String executedAt) { - this.executedAt = Optional.ofNullable(executedAt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "executed_at", nulls = Nulls.SKIP) - public _FinalStage executedAt(Optional executedAt) { - this.executedAt = executedAt; - return this; - } - - @java.lang.Override - public _FinalStage actions(List actions) { - this.actions = Optional.ofNullable(actions); - return this; - } - - @java.lang.Override - @JsonSetter(value = "actions", nulls = Nulls.SKIP) - public _FinalStage actions(Optional> actions) { - this.actions = actions; - return this; - } - - @java.lang.Override - public CreateFlowResponseContent build() { - return new CreateFlowResponseContent( - id, name, actions, createdAt, updatedAt, executedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaign.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaign.java deleted file mode 100644 index ce2e7f0ad..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaign.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionActivecampaign.Deserializer.class) -public final class CreateFlowsVaultConnectionActivecampaign { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionActivecampaign(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((CreateFlowsVaultConnectionActivecampaignApiKey) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionActivecampaignUninitialized) 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 CreateFlowsVaultConnectionActivecampaign - && equalTo((CreateFlowsVaultConnectionActivecampaign) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionActivecampaign 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 CreateFlowsVaultConnectionActivecampaign of(CreateFlowsVaultConnectionActivecampaignApiKey value) { - return new CreateFlowsVaultConnectionActivecampaign(value, 0); - } - - public static CreateFlowsVaultConnectionActivecampaign of( - CreateFlowsVaultConnectionActivecampaignUninitialized value) { - return new CreateFlowsVaultConnectionActivecampaign(value, 1); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionActivecampaignApiKey value); - - T visit(CreateFlowsVaultConnectionActivecampaignUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionActivecampaign.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionActivecampaign deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionActivecampaignApiKey.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionActivecampaignUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaignApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaignApiKey.java deleted file mode 100644 index ca63ad15d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaignApiKey.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionActivecampaignApiKey.Builder.class) -public final class CreateFlowsVaultConnectionActivecampaignApiKey { - private final String name; - - private final FlowsVaultConnectionAppIdActivecampaignEnum appId; - - private final FlowsVaultConnectioSetupApiKeyWithBaseUrl setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionActivecampaignApiKey( - String name, - FlowsVaultConnectionAppIdActivecampaignEnum appId, - FlowsVaultConnectioSetupApiKeyWithBaseUrl setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdActivecampaignEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupApiKeyWithBaseUrl getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionActivecampaignApiKey - && equalTo((CreateFlowsVaultConnectionActivecampaignApiKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionActivecampaignApiKey other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionActivecampaignApiKey other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdActivecampaignEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupApiKeyWithBaseUrl setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionActivecampaignApiKey build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdActivecampaignEnum appId; - - private FlowsVaultConnectioSetupApiKeyWithBaseUrl setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionActivecampaignApiKey other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdActivecampaignEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupApiKeyWithBaseUrl setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionActivecampaignApiKey build() { - return new CreateFlowsVaultConnectionActivecampaignApiKey(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaignUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaignUninitialized.java deleted file mode 100644 index 4cc4f4e86..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionActivecampaignUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionActivecampaignUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionActivecampaignUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdActivecampaignEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionActivecampaignUninitialized( - String name, FlowsVaultConnectionAppIdActivecampaignEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdActivecampaignEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionActivecampaignUninitialized - && equalTo((CreateFlowsVaultConnectionActivecampaignUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionActivecampaignUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionActivecampaignUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdActivecampaignEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionActivecampaignUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdActivecampaignEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionActivecampaignUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdActivecampaignEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionActivecampaignUninitialized build() { - return new CreateFlowsVaultConnectionActivecampaignUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtable.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtable.java deleted file mode 100644 index c168ea6e1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtable.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionAirtable.Deserializer.class) -public final class CreateFlowsVaultConnectionAirtable { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionAirtable(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((CreateFlowsVaultConnectionAirtableApiKey) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionAirtableUninitialized) 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 CreateFlowsVaultConnectionAirtable - && equalTo((CreateFlowsVaultConnectionAirtable) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionAirtable 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 CreateFlowsVaultConnectionAirtable of(CreateFlowsVaultConnectionAirtableApiKey value) { - return new CreateFlowsVaultConnectionAirtable(value, 0); - } - - public static CreateFlowsVaultConnectionAirtable of(CreateFlowsVaultConnectionAirtableUninitialized value) { - return new CreateFlowsVaultConnectionAirtable(value, 1); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionAirtableApiKey value); - - T visit(CreateFlowsVaultConnectionAirtableUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionAirtable.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionAirtable deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionAirtableApiKey.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionAirtableUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtableApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtableApiKey.java deleted file mode 100644 index e81a2ae98..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtableApiKey.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionAirtableApiKey.Builder.class) -public final class CreateFlowsVaultConnectionAirtableApiKey { - private final String name; - - private final FlowsVaultConnectionAppIdAirtableEnum appId; - - private final FlowsVaultConnectioSetupApiKey setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionAirtableApiKey( - String name, - FlowsVaultConnectionAppIdAirtableEnum appId, - FlowsVaultConnectioSetupApiKey setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdAirtableEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupApiKey getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionAirtableApiKey - && equalTo((CreateFlowsVaultConnectionAirtableApiKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionAirtableApiKey other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionAirtableApiKey other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdAirtableEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupApiKey setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionAirtableApiKey build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdAirtableEnum appId; - - private FlowsVaultConnectioSetupApiKey setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionAirtableApiKey other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdAirtableEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupApiKey setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionAirtableApiKey build() { - return new CreateFlowsVaultConnectionAirtableApiKey(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtableUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtableUninitialized.java deleted file mode 100644 index c2274bde3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAirtableUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionAirtableUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionAirtableUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdAirtableEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionAirtableUninitialized( - String name, FlowsVaultConnectionAppIdAirtableEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdAirtableEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionAirtableUninitialized - && equalTo((CreateFlowsVaultConnectionAirtableUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionAirtableUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionAirtableUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdAirtableEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionAirtableUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdAirtableEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionAirtableUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdAirtableEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionAirtableUninitialized build() { - return new CreateFlowsVaultConnectionAirtableUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0.java deleted file mode 100644 index 4aaa10e63..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionAuth0.Deserializer.class) -public final class CreateFlowsVaultConnectionAuth0 { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionAuth0(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((CreateFlowsVaultConnectionAuth0OauthApp) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionAuth0Uninitialized) 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 CreateFlowsVaultConnectionAuth0 && equalTo((CreateFlowsVaultConnectionAuth0) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionAuth0 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 CreateFlowsVaultConnectionAuth0 of(CreateFlowsVaultConnectionAuth0OauthApp value) { - return new CreateFlowsVaultConnectionAuth0(value, 0); - } - - public static CreateFlowsVaultConnectionAuth0 of(CreateFlowsVaultConnectionAuth0Uninitialized value) { - return new CreateFlowsVaultConnectionAuth0(value, 1); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionAuth0OauthApp value); - - T visit(CreateFlowsVaultConnectionAuth0Uninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionAuth0.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionAuth0 deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionAuth0OauthApp.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionAuth0Uninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0OauthApp.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0OauthApp.java deleted file mode 100644 index 1668929f2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0OauthApp.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionAuth0OauthApp.Builder.class) -public final class CreateFlowsVaultConnectionAuth0OauthApp { - private final String name; - - private final FlowsVaultConnectionAppIdAuth0Enum appId; - - private final FlowsVaultConnectioSetupOauthApp setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionAuth0OauthApp( - String name, - FlowsVaultConnectionAppIdAuth0Enum appId, - FlowsVaultConnectioSetupOauthApp setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdAuth0Enum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupOauthApp getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionAuth0OauthApp - && equalTo((CreateFlowsVaultConnectionAuth0OauthApp) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionAuth0OauthApp other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionAuth0OauthApp other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdAuth0Enum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthApp setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionAuth0OauthApp build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdAuth0Enum appId; - - private FlowsVaultConnectioSetupOauthApp setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionAuth0OauthApp other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdAuth0Enum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthApp setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionAuth0OauthApp build() { - return new CreateFlowsVaultConnectionAuth0OauthApp(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0Uninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0Uninitialized.java deleted file mode 100644 index 779254ba7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionAuth0Uninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionAuth0Uninitialized.Builder.class) -public final class CreateFlowsVaultConnectionAuth0Uninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdAuth0Enum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionAuth0Uninitialized( - String name, FlowsVaultConnectionAppIdAuth0Enum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdAuth0Enum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionAuth0Uninitialized - && equalTo((CreateFlowsVaultConnectionAuth0Uninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionAuth0Uninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionAuth0Uninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdAuth0Enum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionAuth0Uninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdAuth0Enum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionAuth0Uninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdAuth0Enum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionAuth0Uninitialized build() { - return new CreateFlowsVaultConnectionAuth0Uninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigquery.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigquery.java deleted file mode 100644 index 41d28befc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigquery.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionBigquery.Deserializer.class) -public final class CreateFlowsVaultConnectionBigquery { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionBigquery(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((CreateFlowsVaultConnectionBigqueryJwt) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionBigqueryUninitialized) 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 CreateFlowsVaultConnectionBigquery - && equalTo((CreateFlowsVaultConnectionBigquery) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionBigquery 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 CreateFlowsVaultConnectionBigquery of(CreateFlowsVaultConnectionBigqueryJwt value) { - return new CreateFlowsVaultConnectionBigquery(value, 0); - } - - public static CreateFlowsVaultConnectionBigquery of(CreateFlowsVaultConnectionBigqueryUninitialized value) { - return new CreateFlowsVaultConnectionBigquery(value, 1); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionBigqueryJwt value); - - T visit(CreateFlowsVaultConnectionBigqueryUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionBigquery.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionBigquery deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionBigqueryJwt.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionBigqueryUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigqueryJwt.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigqueryJwt.java deleted file mode 100644 index 35f31b84a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigqueryJwt.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionBigqueryJwt.Builder.class) -public final class CreateFlowsVaultConnectionBigqueryJwt { - private final String name; - - private final FlowsVaultConnectionAppIdBigqueryEnum appId; - - private final FlowsVaultConnectioSetupBigqueryOauthJwt setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionBigqueryJwt( - String name, - FlowsVaultConnectionAppIdBigqueryEnum appId, - FlowsVaultConnectioSetupBigqueryOauthJwt setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdBigqueryEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupBigqueryOauthJwt getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionBigqueryJwt - && equalTo((CreateFlowsVaultConnectionBigqueryJwt) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionBigqueryJwt other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionBigqueryJwt other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdBigqueryEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupBigqueryOauthJwt setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionBigqueryJwt build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdBigqueryEnum appId; - - private FlowsVaultConnectioSetupBigqueryOauthJwt setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionBigqueryJwt other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdBigqueryEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupBigqueryOauthJwt setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionBigqueryJwt build() { - return new CreateFlowsVaultConnectionBigqueryJwt(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigqueryUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigqueryUninitialized.java deleted file mode 100644 index bf6368258..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionBigqueryUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionBigqueryUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionBigqueryUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdBigqueryEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionBigqueryUninitialized( - String name, FlowsVaultConnectionAppIdBigqueryEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdBigqueryEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionBigqueryUninitialized - && equalTo((CreateFlowsVaultConnectionBigqueryUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionBigqueryUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionBigqueryUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdBigqueryEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionBigqueryUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdBigqueryEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionBigqueryUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdBigqueryEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionBigqueryUninitialized build() { - return new CreateFlowsVaultConnectionBigqueryUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbit.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbit.java deleted file mode 100644 index 0cdf09707..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbit.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionClearbit.Deserializer.class) -public final class CreateFlowsVaultConnectionClearbit { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionClearbit(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((CreateFlowsVaultConnectionClearbitApiKey) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionClearbitUninitialized) 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 CreateFlowsVaultConnectionClearbit - && equalTo((CreateFlowsVaultConnectionClearbit) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionClearbit 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 CreateFlowsVaultConnectionClearbit of(CreateFlowsVaultConnectionClearbitApiKey value) { - return new CreateFlowsVaultConnectionClearbit(value, 0); - } - - public static CreateFlowsVaultConnectionClearbit of(CreateFlowsVaultConnectionClearbitUninitialized value) { - return new CreateFlowsVaultConnectionClearbit(value, 1); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionClearbitApiKey value); - - T visit(CreateFlowsVaultConnectionClearbitUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionClearbit.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionClearbit deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionClearbitApiKey.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionClearbitUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbitApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbitApiKey.java deleted file mode 100644 index fab2da8c4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbitApiKey.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionClearbitApiKey.Builder.class) -public final class CreateFlowsVaultConnectionClearbitApiKey { - private final String name; - - private final FlowsVaultConnectionAppIdClearbitEnum appId; - - private final FlowsVaultConnectioSetupSecretApiKey setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionClearbitApiKey( - String name, - FlowsVaultConnectionAppIdClearbitEnum appId, - FlowsVaultConnectioSetupSecretApiKey setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdClearbitEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupSecretApiKey getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionClearbitApiKey - && equalTo((CreateFlowsVaultConnectionClearbitApiKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionClearbitApiKey other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionClearbitApiKey other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdClearbitEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupSecretApiKey setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionClearbitApiKey build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdClearbitEnum appId; - - private FlowsVaultConnectioSetupSecretApiKey setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionClearbitApiKey other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdClearbitEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupSecretApiKey setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionClearbitApiKey build() { - return new CreateFlowsVaultConnectionClearbitApiKey(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbitUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbitUninitialized.java deleted file mode 100644 index b6717e204..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionClearbitUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionClearbitUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionClearbitUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdClearbitEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionClearbitUninitialized( - String name, FlowsVaultConnectionAppIdClearbitEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdClearbitEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionClearbitUninitialized - && equalTo((CreateFlowsVaultConnectionClearbitUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionClearbitUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionClearbitUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdClearbitEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionClearbitUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdClearbitEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionClearbitUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdClearbitEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionClearbitUninitialized build() { - return new CreateFlowsVaultConnectionClearbitUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusign.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusign.java deleted file mode 100644 index d8b9140c8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusign.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionDocusign.Deserializer.class) -public final class CreateFlowsVaultConnectionDocusign { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionDocusign(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((CreateFlowsVaultConnectionDocusignOauthCode) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionDocusignUninitialized) 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 CreateFlowsVaultConnectionDocusign - && equalTo((CreateFlowsVaultConnectionDocusign) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionDocusign 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 CreateFlowsVaultConnectionDocusign of(CreateFlowsVaultConnectionDocusignOauthCode value) { - return new CreateFlowsVaultConnectionDocusign(value, 0); - } - - public static CreateFlowsVaultConnectionDocusign of(CreateFlowsVaultConnectionDocusignUninitialized value) { - return new CreateFlowsVaultConnectionDocusign(value, 1); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionDocusignOauthCode value); - - T visit(CreateFlowsVaultConnectionDocusignUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionDocusign.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionDocusign deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionDocusignOauthCode.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionDocusignUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusignOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusignOauthCode.java deleted file mode 100644 index 5f0146cc4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusignOauthCode.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionDocusignOauthCode.Builder.class) -public final class CreateFlowsVaultConnectionDocusignOauthCode { - private final String name; - - private final FlowsVaultConnectionAppIdDocusignEnum appId; - - private final FlowsVaultConnectioSetupOauthCode setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionDocusignOauthCode( - String name, - FlowsVaultConnectionAppIdDocusignEnum appId, - FlowsVaultConnectioSetupOauthCode setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdDocusignEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupOauthCode getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionDocusignOauthCode - && equalTo((CreateFlowsVaultConnectionDocusignOauthCode) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionDocusignOauthCode other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionDocusignOauthCode other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdDocusignEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthCode setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionDocusignOauthCode build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdDocusignEnum appId; - - private FlowsVaultConnectioSetupOauthCode setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionDocusignOauthCode other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdDocusignEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthCode setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionDocusignOauthCode build() { - return new CreateFlowsVaultConnectionDocusignOauthCode(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusignUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusignUninitialized.java deleted file mode 100644 index 8813762a1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionDocusignUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionDocusignUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionDocusignUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdDocusignEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionDocusignUninitialized( - String name, FlowsVaultConnectionAppIdDocusignEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdDocusignEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionDocusignUninitialized - && equalTo((CreateFlowsVaultConnectionDocusignUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionDocusignUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionDocusignUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdDocusignEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionDocusignUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdDocusignEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionDocusignUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdDocusignEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionDocusignUninitialized build() { - return new CreateFlowsVaultConnectionDocusignUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheets.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheets.java deleted file mode 100644 index 81394a333..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheets.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionGoogleSheets.Deserializer.class) -public final class CreateFlowsVaultConnectionGoogleSheets { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionGoogleSheets(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((CreateFlowsVaultConnectionGoogleSheetsOauthCode) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionGoogleSheetsUninitialized) 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 CreateFlowsVaultConnectionGoogleSheets - && equalTo((CreateFlowsVaultConnectionGoogleSheets) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionGoogleSheets 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 CreateFlowsVaultConnectionGoogleSheets of(CreateFlowsVaultConnectionGoogleSheetsOauthCode value) { - return new CreateFlowsVaultConnectionGoogleSheets(value, 0); - } - - public static CreateFlowsVaultConnectionGoogleSheets of(CreateFlowsVaultConnectionGoogleSheetsUninitialized value) { - return new CreateFlowsVaultConnectionGoogleSheets(value, 1); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionGoogleSheetsOauthCode value); - - T visit(CreateFlowsVaultConnectionGoogleSheetsUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionGoogleSheets.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionGoogleSheets deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionGoogleSheetsOauthCode.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionGoogleSheetsUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheetsOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheetsOauthCode.java deleted file mode 100644 index 4fcb146b7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheetsOauthCode.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionGoogleSheetsOauthCode.Builder.class) -public final class CreateFlowsVaultConnectionGoogleSheetsOauthCode { - private final String name; - - private final FlowsVaultConnectionAppIdGoogleSheetsEnum appId; - - private final FlowsVaultConnectioSetupOauthCode setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionGoogleSheetsOauthCode( - String name, - FlowsVaultConnectionAppIdGoogleSheetsEnum appId, - FlowsVaultConnectioSetupOauthCode setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdGoogleSheetsEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupOauthCode getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionGoogleSheetsOauthCode - && equalTo((CreateFlowsVaultConnectionGoogleSheetsOauthCode) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionGoogleSheetsOauthCode other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionGoogleSheetsOauthCode other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdGoogleSheetsEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthCode setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionGoogleSheetsOauthCode build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdGoogleSheetsEnum appId; - - private FlowsVaultConnectioSetupOauthCode setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionGoogleSheetsOauthCode other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdGoogleSheetsEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthCode setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionGoogleSheetsOauthCode build() { - return new CreateFlowsVaultConnectionGoogleSheetsOauthCode(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheetsUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheetsUninitialized.java deleted file mode 100644 index 288d85a00..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionGoogleSheetsUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionGoogleSheetsUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionGoogleSheetsUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdGoogleSheetsEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionGoogleSheetsUninitialized( - String name, FlowsVaultConnectionAppIdGoogleSheetsEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdGoogleSheetsEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionGoogleSheetsUninitialized - && equalTo((CreateFlowsVaultConnectionGoogleSheetsUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionGoogleSheetsUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionGoogleSheetsUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdGoogleSheetsEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionGoogleSheetsUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdGoogleSheetsEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionGoogleSheetsUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdGoogleSheetsEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionGoogleSheetsUninitialized build() { - return new CreateFlowsVaultConnectionGoogleSheetsUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttp.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttp.java deleted file mode 100644 index 40158b1f9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttp.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionHttp.Deserializer.class) -public final class CreateFlowsVaultConnectionHttp { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionHttp(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((CreateFlowsVaultConnectionHttpBearer) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionHttpBasicAuth) this.value); - } else if (this.type == 2) { - return visitor.visit((CreateFlowsVaultConnectionHttpApiKey) this.value); - } else if (this.type == 3) { - return visitor.visit((CreateFlowsVaultConnectionHttpOauthClientCredentials) this.value); - } else if (this.type == 4) { - return visitor.visit((CreateFlowsVaultConnectionHttpUninitialized) 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 CreateFlowsVaultConnectionHttp && equalTo((CreateFlowsVaultConnectionHttp) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionHttp 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 CreateFlowsVaultConnectionHttp of(CreateFlowsVaultConnectionHttpBearer value) { - return new CreateFlowsVaultConnectionHttp(value, 0); - } - - public static CreateFlowsVaultConnectionHttp of(CreateFlowsVaultConnectionHttpBasicAuth value) { - return new CreateFlowsVaultConnectionHttp(value, 1); - } - - public static CreateFlowsVaultConnectionHttp of(CreateFlowsVaultConnectionHttpApiKey value) { - return new CreateFlowsVaultConnectionHttp(value, 2); - } - - public static CreateFlowsVaultConnectionHttp of(CreateFlowsVaultConnectionHttpOauthClientCredentials value) { - return new CreateFlowsVaultConnectionHttp(value, 3); - } - - public static CreateFlowsVaultConnectionHttp of(CreateFlowsVaultConnectionHttpUninitialized value) { - return new CreateFlowsVaultConnectionHttp(value, 4); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionHttpBearer value); - - T visit(CreateFlowsVaultConnectionHttpBasicAuth value); - - T visit(CreateFlowsVaultConnectionHttpApiKey value); - - T visit(CreateFlowsVaultConnectionHttpOauthClientCredentials value); - - T visit(CreateFlowsVaultConnectionHttpUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionHttp.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionHttp deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionHttpBearer.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionHttpBasicAuth.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionHttpApiKey.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionHttpOauthClientCredentials.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionHttpUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpApiKey.java deleted file mode 100644 index 38a897560..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpApiKey.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionHttpApiKey.Builder.class) -public final class CreateFlowsVaultConnectionHttpApiKey { - private final String name; - - private final FlowsVaultConnectionAppIdHttpEnum appId; - - private final FlowsVaultConnectionHttpApiKeySetup setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionHttpApiKey( - String name, - FlowsVaultConnectionAppIdHttpEnum appId, - FlowsVaultConnectionHttpApiKeySetup setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdHttpEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectionHttpApiKeySetup getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionHttpApiKey - && equalTo((CreateFlowsVaultConnectionHttpApiKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionHttpApiKey other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionHttpApiKey other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdHttpEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectionHttpApiKeySetup setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionHttpApiKey build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdHttpEnum appId; - - private FlowsVaultConnectionHttpApiKeySetup setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionHttpApiKey other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdHttpEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectionHttpApiKeySetup setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionHttpApiKey build() { - return new CreateFlowsVaultConnectionHttpApiKey(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpBasicAuth.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpBasicAuth.java deleted file mode 100644 index 6e4cba3a3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpBasicAuth.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionHttpBasicAuth.Builder.class) -public final class CreateFlowsVaultConnectionHttpBasicAuth { - private final String name; - - private final FlowsVaultConnectionAppIdHttpEnum appId; - - private final FlowsVaultConnectionHttpBasicAuthSetup setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionHttpBasicAuth( - String name, - FlowsVaultConnectionAppIdHttpEnum appId, - FlowsVaultConnectionHttpBasicAuthSetup setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdHttpEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectionHttpBasicAuthSetup getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionHttpBasicAuth - && equalTo((CreateFlowsVaultConnectionHttpBasicAuth) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionHttpBasicAuth other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionHttpBasicAuth other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdHttpEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectionHttpBasicAuthSetup setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionHttpBasicAuth build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdHttpEnum appId; - - private FlowsVaultConnectionHttpBasicAuthSetup setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionHttpBasicAuth other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdHttpEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectionHttpBasicAuthSetup setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionHttpBasicAuth build() { - return new CreateFlowsVaultConnectionHttpBasicAuth(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpBearer.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpBearer.java deleted file mode 100644 index 9da985db3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpBearer.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionHttpBearer.Builder.class) -public final class CreateFlowsVaultConnectionHttpBearer { - private final String name; - - private final FlowsVaultConnectionAppIdHttpEnum appId; - - private final FlowsVaultConnectioSetupHttpBearer setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionHttpBearer( - String name, - FlowsVaultConnectionAppIdHttpEnum appId, - FlowsVaultConnectioSetupHttpBearer setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdHttpEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupHttpBearer getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionHttpBearer - && equalTo((CreateFlowsVaultConnectionHttpBearer) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionHttpBearer other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionHttpBearer other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdHttpEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupHttpBearer setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionHttpBearer build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdHttpEnum appId; - - private FlowsVaultConnectioSetupHttpBearer setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionHttpBearer other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdHttpEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupHttpBearer setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionHttpBearer build() { - return new CreateFlowsVaultConnectionHttpBearer(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpOauthClientCredentials.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpOauthClientCredentials.java deleted file mode 100644 index aecc97ac6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpOauthClientCredentials.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionHttpOauthClientCredentials.Builder.class) -public final class CreateFlowsVaultConnectionHttpOauthClientCredentials { - private final String name; - - private final FlowsVaultConnectionAppIdHttpEnum appId; - - private final FlowsVaultConnectionHttpOauthClientCredentialsSetup setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionHttpOauthClientCredentials( - String name, - FlowsVaultConnectionAppIdHttpEnum appId, - FlowsVaultConnectionHttpOauthClientCredentialsSetup setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdHttpEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectionHttpOauthClientCredentialsSetup getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionHttpOauthClientCredentials - && equalTo((CreateFlowsVaultConnectionHttpOauthClientCredentials) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionHttpOauthClientCredentials other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionHttpOauthClientCredentials other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdHttpEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectionHttpOauthClientCredentialsSetup setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionHttpOauthClientCredentials build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdHttpEnum appId; - - private FlowsVaultConnectionHttpOauthClientCredentialsSetup setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionHttpOauthClientCredentials other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdHttpEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectionHttpOauthClientCredentialsSetup setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionHttpOauthClientCredentials build() { - return new CreateFlowsVaultConnectionHttpOauthClientCredentials(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpUninitialized.java deleted file mode 100644 index 1dcb5b91c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHttpUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionHttpUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionHttpUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdHttpEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionHttpUninitialized( - String name, FlowsVaultConnectionAppIdHttpEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdHttpEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionHttpUninitialized - && equalTo((CreateFlowsVaultConnectionHttpUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionHttpUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionHttpUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdHttpEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionHttpUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdHttpEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionHttpUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdHttpEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionHttpUninitialized build() { - return new CreateFlowsVaultConnectionHttpUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspot.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspot.java deleted file mode 100644 index c70dfcdce..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspot.java +++ /dev/null @@ -1,110 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionHubspot.Deserializer.class) -public final class CreateFlowsVaultConnectionHubspot { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionHubspot(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((CreateFlowsVaultConnectionHubspotApiKey) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionHubspotOauthCode) this.value); - } else if (this.type == 2) { - return visitor.visit((CreateFlowsVaultConnectionHubspotUninitialized) 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 CreateFlowsVaultConnectionHubspot && equalTo((CreateFlowsVaultConnectionHubspot) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionHubspot 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 CreateFlowsVaultConnectionHubspot of(CreateFlowsVaultConnectionHubspotApiKey value) { - return new CreateFlowsVaultConnectionHubspot(value, 0); - } - - public static CreateFlowsVaultConnectionHubspot of(CreateFlowsVaultConnectionHubspotOauthCode value) { - return new CreateFlowsVaultConnectionHubspot(value, 1); - } - - public static CreateFlowsVaultConnectionHubspot of(CreateFlowsVaultConnectionHubspotUninitialized value) { - return new CreateFlowsVaultConnectionHubspot(value, 2); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionHubspotApiKey value); - - T visit(CreateFlowsVaultConnectionHubspotOauthCode value); - - T visit(CreateFlowsVaultConnectionHubspotUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionHubspot.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionHubspot deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionHubspotApiKey.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionHubspotOauthCode.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionHubspotUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotApiKey.java deleted file mode 100644 index 742f14ea4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotApiKey.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionHubspotApiKey.Builder.class) -public final class CreateFlowsVaultConnectionHubspotApiKey { - private final String name; - - private final FlowsVaultConnectionAppIdHubspotEnum appId; - - private final FlowsVaultConnectioSetupApiKey setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionHubspotApiKey( - String name, - FlowsVaultConnectionAppIdHubspotEnum appId, - FlowsVaultConnectioSetupApiKey setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdHubspotEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupApiKey getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionHubspotApiKey - && equalTo((CreateFlowsVaultConnectionHubspotApiKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionHubspotApiKey other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionHubspotApiKey other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdHubspotEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupApiKey setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionHubspotApiKey build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdHubspotEnum appId; - - private FlowsVaultConnectioSetupApiKey setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionHubspotApiKey other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdHubspotEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupApiKey setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionHubspotApiKey build() { - return new CreateFlowsVaultConnectionHubspotApiKey(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotOauthCode.java deleted file mode 100644 index d8fd3237d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotOauthCode.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionHubspotOauthCode.Builder.class) -public final class CreateFlowsVaultConnectionHubspotOauthCode { - private final String name; - - private final FlowsVaultConnectionAppIdHubspotEnum appId; - - private final FlowsVaultConnectioSetupOauthCode setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionHubspotOauthCode( - String name, - FlowsVaultConnectionAppIdHubspotEnum appId, - FlowsVaultConnectioSetupOauthCode setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdHubspotEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupOauthCode getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionHubspotOauthCode - && equalTo((CreateFlowsVaultConnectionHubspotOauthCode) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionHubspotOauthCode other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionHubspotOauthCode other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdHubspotEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthCode setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionHubspotOauthCode build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdHubspotEnum appId; - - private FlowsVaultConnectioSetupOauthCode setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionHubspotOauthCode other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdHubspotEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthCode setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionHubspotOauthCode build() { - return new CreateFlowsVaultConnectionHubspotOauthCode(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotUninitialized.java deleted file mode 100644 index 980dd306f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionHubspotUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionHubspotUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionHubspotUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdHubspotEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionHubspotUninitialized( - String name, FlowsVaultConnectionAppIdHubspotEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdHubspotEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionHubspotUninitialized - && equalTo((CreateFlowsVaultConnectionHubspotUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionHubspotUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionHubspotUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdHubspotEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionHubspotUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdHubspotEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionHubspotUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdHubspotEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionHubspotUninitialized build() { - return new CreateFlowsVaultConnectionHubspotUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwt.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwt.java deleted file mode 100644 index e1d3316b2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwt.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionJwt.Deserializer.class) -public final class CreateFlowsVaultConnectionJwt { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionJwt(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((CreateFlowsVaultConnectionJwtJwt) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionJwtUninitialized) 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 CreateFlowsVaultConnectionJwt && equalTo((CreateFlowsVaultConnectionJwt) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionJwt 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 CreateFlowsVaultConnectionJwt of(CreateFlowsVaultConnectionJwtJwt value) { - return new CreateFlowsVaultConnectionJwt(value, 0); - } - - public static CreateFlowsVaultConnectionJwt of(CreateFlowsVaultConnectionJwtUninitialized value) { - return new CreateFlowsVaultConnectionJwt(value, 1); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionJwtJwt value); - - T visit(CreateFlowsVaultConnectionJwtUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionJwt.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionJwt deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionJwtJwt.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionJwtUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwtJwt.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwtJwt.java deleted file mode 100644 index 8df737fa4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwtJwt.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionJwtJwt.Builder.class) -public final class CreateFlowsVaultConnectionJwtJwt { - private final String name; - - private final FlowsVaultConnectionAppIdJwtEnum appId; - - private final FlowsVaultConnectioSetupJwt setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionJwtJwt( - String name, - FlowsVaultConnectionAppIdJwtEnum appId, - FlowsVaultConnectioSetupJwt setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdJwtEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupJwt getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionJwtJwt && equalTo((CreateFlowsVaultConnectionJwtJwt) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionJwtJwt other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionJwtJwt other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdJwtEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupJwt setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionJwtJwt build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdJwtEnum appId; - - private FlowsVaultConnectioSetupJwt setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionJwtJwt other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdJwtEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupJwt setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionJwtJwt build() { - return new CreateFlowsVaultConnectionJwtJwt(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwtUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwtUninitialized.java deleted file mode 100644 index 97b2e4d46..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionJwtUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionJwtUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionJwtUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdJwtEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionJwtUninitialized( - String name, FlowsVaultConnectionAppIdJwtEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdJwtEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionJwtUninitialized - && equalTo((CreateFlowsVaultConnectionJwtUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionJwtUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionJwtUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdJwtEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionJwtUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdJwtEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionJwtUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdJwtEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionJwtUninitialized build() { - return new CreateFlowsVaultConnectionJwtUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimp.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimp.java deleted file mode 100644 index 6d9afed3f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimp.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionMailchimp.Deserializer.class) -public final class CreateFlowsVaultConnectionMailchimp { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionMailchimp(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((CreateFlowsVaultConnectionMailchimpApiKey) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionMailchimpOauthCode) this.value); - } else if (this.type == 2) { - return visitor.visit((CreateFlowsVaultConnectionMailchimpUninitialized) 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 CreateFlowsVaultConnectionMailchimp - && equalTo((CreateFlowsVaultConnectionMailchimp) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionMailchimp 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 CreateFlowsVaultConnectionMailchimp of(CreateFlowsVaultConnectionMailchimpApiKey value) { - return new CreateFlowsVaultConnectionMailchimp(value, 0); - } - - public static CreateFlowsVaultConnectionMailchimp of(CreateFlowsVaultConnectionMailchimpOauthCode value) { - return new CreateFlowsVaultConnectionMailchimp(value, 1); - } - - public static CreateFlowsVaultConnectionMailchimp of(CreateFlowsVaultConnectionMailchimpUninitialized value) { - return new CreateFlowsVaultConnectionMailchimp(value, 2); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionMailchimpApiKey value); - - T visit(CreateFlowsVaultConnectionMailchimpOauthCode value); - - T visit(CreateFlowsVaultConnectionMailchimpUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionMailchimp.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionMailchimp deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionMailchimpApiKey.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionMailchimpOauthCode.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionMailchimpUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpApiKey.java deleted file mode 100644 index 0d407e44c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpApiKey.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionMailchimpApiKey.Builder.class) -public final class CreateFlowsVaultConnectionMailchimpApiKey { - private final String name; - - private final FlowsVaultConnectionAppIdMailchimpEnum appId; - - private final FlowsVaultConnectioSetupSecretApiKey setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionMailchimpApiKey( - String name, - FlowsVaultConnectionAppIdMailchimpEnum appId, - FlowsVaultConnectioSetupSecretApiKey setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdMailchimpEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupSecretApiKey getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionMailchimpApiKey - && equalTo((CreateFlowsVaultConnectionMailchimpApiKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionMailchimpApiKey other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionMailchimpApiKey other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdMailchimpEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupSecretApiKey setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionMailchimpApiKey build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdMailchimpEnum appId; - - private FlowsVaultConnectioSetupSecretApiKey setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionMailchimpApiKey other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdMailchimpEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupSecretApiKey setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionMailchimpApiKey build() { - return new CreateFlowsVaultConnectionMailchimpApiKey(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpOauthCode.java deleted file mode 100644 index 180f4a210..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpOauthCode.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionMailchimpOauthCode.Builder.class) -public final class CreateFlowsVaultConnectionMailchimpOauthCode { - private final String name; - - private final FlowsVaultConnectionAppIdMailchimpEnum appId; - - private final FlowsVaultConnectioSetupOauthCode setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionMailchimpOauthCode( - String name, - FlowsVaultConnectionAppIdMailchimpEnum appId, - FlowsVaultConnectioSetupOauthCode setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdMailchimpEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupOauthCode getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionMailchimpOauthCode - && equalTo((CreateFlowsVaultConnectionMailchimpOauthCode) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionMailchimpOauthCode other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionMailchimpOauthCode other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdMailchimpEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthCode setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionMailchimpOauthCode build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdMailchimpEnum appId; - - private FlowsVaultConnectioSetupOauthCode setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionMailchimpOauthCode other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdMailchimpEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthCode setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionMailchimpOauthCode build() { - return new CreateFlowsVaultConnectionMailchimpOauthCode(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpUninitialized.java deleted file mode 100644 index 5148e5a9b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailchimpUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionMailchimpUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionMailchimpUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdMailchimpEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionMailchimpUninitialized( - String name, FlowsVaultConnectionAppIdMailchimpEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdMailchimpEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionMailchimpUninitialized - && equalTo((CreateFlowsVaultConnectionMailchimpUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionMailchimpUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionMailchimpUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdMailchimpEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionMailchimpUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdMailchimpEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionMailchimpUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdMailchimpEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionMailchimpUninitialized build() { - return new CreateFlowsVaultConnectionMailchimpUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjet.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjet.java deleted file mode 100644 index 194d1a74b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjet.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionMailjet.Deserializer.class) -public final class CreateFlowsVaultConnectionMailjet { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionMailjet(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((CreateFlowsVaultConnectionMailjetApiKey) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionMailjetUninitialized) 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 CreateFlowsVaultConnectionMailjet && equalTo((CreateFlowsVaultConnectionMailjet) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionMailjet 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 CreateFlowsVaultConnectionMailjet of(CreateFlowsVaultConnectionMailjetApiKey value) { - return new CreateFlowsVaultConnectionMailjet(value, 0); - } - - public static CreateFlowsVaultConnectionMailjet of(CreateFlowsVaultConnectionMailjetUninitialized value) { - return new CreateFlowsVaultConnectionMailjet(value, 1); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionMailjetApiKey value); - - T visit(CreateFlowsVaultConnectionMailjetUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionMailjet.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionMailjet deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionMailjetApiKey.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionMailjetUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjetApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjetApiKey.java deleted file mode 100644 index 214236373..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjetApiKey.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionMailjetApiKey.Builder.class) -public final class CreateFlowsVaultConnectionMailjetApiKey { - private final String name; - - private final FlowsVaultConnectionAppIdMailjetEnum appId; - - private final FlowsVaultConnectioSetupMailjetApiKey setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionMailjetApiKey( - String name, - FlowsVaultConnectionAppIdMailjetEnum appId, - FlowsVaultConnectioSetupMailjetApiKey setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdMailjetEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupMailjetApiKey getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionMailjetApiKey - && equalTo((CreateFlowsVaultConnectionMailjetApiKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionMailjetApiKey other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionMailjetApiKey other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdMailjetEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupMailjetApiKey setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionMailjetApiKey build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdMailjetEnum appId; - - private FlowsVaultConnectioSetupMailjetApiKey setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionMailjetApiKey other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdMailjetEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupMailjetApiKey setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionMailjetApiKey build() { - return new CreateFlowsVaultConnectionMailjetApiKey(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjetUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjetUninitialized.java deleted file mode 100644 index 57a5e1500..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionMailjetUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionMailjetUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionMailjetUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdMailjetEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionMailjetUninitialized( - String name, FlowsVaultConnectionAppIdMailjetEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdMailjetEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionMailjetUninitialized - && equalTo((CreateFlowsVaultConnectionMailjetUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionMailjetUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionMailjetUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdMailjetEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionMailjetUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdMailjetEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionMailjetUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdMailjetEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionMailjetUninitialized build() { - return new CreateFlowsVaultConnectionMailjetUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedrive.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedrive.java deleted file mode 100644 index d8e1fc244..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedrive.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionPipedrive.Deserializer.class) -public final class CreateFlowsVaultConnectionPipedrive { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionPipedrive(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((CreateFlowsVaultConnectionPipedriveToken) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionPipedriveOauthCode) this.value); - } else if (this.type == 2) { - return visitor.visit((CreateFlowsVaultConnectionPipedriveUninitialized) 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 CreateFlowsVaultConnectionPipedrive - && equalTo((CreateFlowsVaultConnectionPipedrive) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionPipedrive 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 CreateFlowsVaultConnectionPipedrive of(CreateFlowsVaultConnectionPipedriveToken value) { - return new CreateFlowsVaultConnectionPipedrive(value, 0); - } - - public static CreateFlowsVaultConnectionPipedrive of(CreateFlowsVaultConnectionPipedriveOauthCode value) { - return new CreateFlowsVaultConnectionPipedrive(value, 1); - } - - public static CreateFlowsVaultConnectionPipedrive of(CreateFlowsVaultConnectionPipedriveUninitialized value) { - return new CreateFlowsVaultConnectionPipedrive(value, 2); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionPipedriveToken value); - - T visit(CreateFlowsVaultConnectionPipedriveOauthCode value); - - T visit(CreateFlowsVaultConnectionPipedriveUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionPipedrive.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionPipedrive deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionPipedriveToken.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionPipedriveOauthCode.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionPipedriveUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveOauthCode.java deleted file mode 100644 index 3030697e4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveOauthCode.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionPipedriveOauthCode.Builder.class) -public final class CreateFlowsVaultConnectionPipedriveOauthCode { - private final String name; - - private final FlowsVaultConnectionAppIdPipedriveEnum appId; - - private final FlowsVaultConnectioSetupOauthCode setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionPipedriveOauthCode( - String name, - FlowsVaultConnectionAppIdPipedriveEnum appId, - FlowsVaultConnectioSetupOauthCode setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdPipedriveEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupOauthCode getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionPipedriveOauthCode - && equalTo((CreateFlowsVaultConnectionPipedriveOauthCode) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionPipedriveOauthCode other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionPipedriveOauthCode other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdPipedriveEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthCode setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionPipedriveOauthCode build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdPipedriveEnum appId; - - private FlowsVaultConnectioSetupOauthCode setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionPipedriveOauthCode other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdPipedriveEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthCode setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionPipedriveOauthCode build() { - return new CreateFlowsVaultConnectionPipedriveOauthCode(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveToken.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveToken.java deleted file mode 100644 index 1b98642ef..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveToken.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionPipedriveToken.Builder.class) -public final class CreateFlowsVaultConnectionPipedriveToken { - private final String name; - - private final FlowsVaultConnectionAppIdPipedriveEnum appId; - - private final FlowsVaultConnectioSetupToken setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionPipedriveToken( - String name, - FlowsVaultConnectionAppIdPipedriveEnum appId, - FlowsVaultConnectioSetupToken setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdPipedriveEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupToken getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionPipedriveToken - && equalTo((CreateFlowsVaultConnectionPipedriveToken) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionPipedriveToken other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionPipedriveToken other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdPipedriveEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupToken setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionPipedriveToken build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdPipedriveEnum appId; - - private FlowsVaultConnectioSetupToken setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionPipedriveToken other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdPipedriveEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupToken setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionPipedriveToken build() { - return new CreateFlowsVaultConnectionPipedriveToken(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveUninitialized.java deleted file mode 100644 index fb097f101..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionPipedriveUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionPipedriveUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionPipedriveUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdPipedriveEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionPipedriveUninitialized( - String name, FlowsVaultConnectionAppIdPipedriveEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdPipedriveEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionPipedriveUninitialized - && equalTo((CreateFlowsVaultConnectionPipedriveUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionPipedriveUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionPipedriveUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdPipedriveEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionPipedriveUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdPipedriveEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionPipedriveUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdPipedriveEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionPipedriveUninitialized build() { - return new CreateFlowsVaultConnectionPipedriveUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionRequestContent.java deleted file mode 100644 index 2a5cf7ef9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionRequestContent.java +++ /dev/null @@ -1,326 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionRequestContent.Deserializer.class) -public final class CreateFlowsVaultConnectionRequestContent { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionRequestContent(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((CreateFlowsVaultConnectionActivecampaign) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionAirtable) this.value); - } else if (this.type == 2) { - return visitor.visit((CreateFlowsVaultConnectionAuth0) this.value); - } else if (this.type == 3) { - return visitor.visit((CreateFlowsVaultConnectionBigquery) this.value); - } else if (this.type == 4) { - return visitor.visit((CreateFlowsVaultConnectionClearbit) this.value); - } else if (this.type == 5) { - return visitor.visit((CreateFlowsVaultConnectionDocusign) this.value); - } else if (this.type == 6) { - return visitor.visit((CreateFlowsVaultConnectionGoogleSheets) this.value); - } else if (this.type == 7) { - return visitor.visit((CreateFlowsVaultConnectionHttp) this.value); - } else if (this.type == 8) { - return visitor.visit((CreateFlowsVaultConnectionHubspot) this.value); - } else if (this.type == 9) { - return visitor.visit((CreateFlowsVaultConnectionJwt) this.value); - } else if (this.type == 10) { - return visitor.visit((CreateFlowsVaultConnectionMailchimp) this.value); - } else if (this.type == 11) { - return visitor.visit((CreateFlowsVaultConnectionMailjet) this.value); - } else if (this.type == 12) { - return visitor.visit((CreateFlowsVaultConnectionPipedrive) this.value); - } else if (this.type == 13) { - return visitor.visit((CreateFlowsVaultConnectionSalesforce) this.value); - } else if (this.type == 14) { - return visitor.visit((CreateFlowsVaultConnectionSendgrid) this.value); - } else if (this.type == 15) { - return visitor.visit((CreateFlowsVaultConnectionSlack) this.value); - } else if (this.type == 16) { - return visitor.visit((CreateFlowsVaultConnectionStripe) this.value); - } else if (this.type == 17) { - return visitor.visit((CreateFlowsVaultConnectionTelegram) this.value); - } else if (this.type == 18) { - return visitor.visit((CreateFlowsVaultConnectionTwilio) this.value); - } else if (this.type == 19) { - return visitor.visit((CreateFlowsVaultConnectionWhatsapp) this.value); - } else if (this.type == 20) { - return visitor.visit((CreateFlowsVaultConnectionZapier) 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 CreateFlowsVaultConnectionRequestContent - && equalTo((CreateFlowsVaultConnectionRequestContent) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionRequestContent 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 CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionActivecampaign value) { - return new CreateFlowsVaultConnectionRequestContent(value, 0); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionAirtable value) { - return new CreateFlowsVaultConnectionRequestContent(value, 1); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionAuth0 value) { - return new CreateFlowsVaultConnectionRequestContent(value, 2); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionBigquery value) { - return new CreateFlowsVaultConnectionRequestContent(value, 3); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionClearbit value) { - return new CreateFlowsVaultConnectionRequestContent(value, 4); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionDocusign value) { - return new CreateFlowsVaultConnectionRequestContent(value, 5); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionGoogleSheets value) { - return new CreateFlowsVaultConnectionRequestContent(value, 6); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionHttp value) { - return new CreateFlowsVaultConnectionRequestContent(value, 7); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionHubspot value) { - return new CreateFlowsVaultConnectionRequestContent(value, 8); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionJwt value) { - return new CreateFlowsVaultConnectionRequestContent(value, 9); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionMailchimp value) { - return new CreateFlowsVaultConnectionRequestContent(value, 10); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionMailjet value) { - return new CreateFlowsVaultConnectionRequestContent(value, 11); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionPipedrive value) { - return new CreateFlowsVaultConnectionRequestContent(value, 12); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionSalesforce value) { - return new CreateFlowsVaultConnectionRequestContent(value, 13); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionSendgrid value) { - return new CreateFlowsVaultConnectionRequestContent(value, 14); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionSlack value) { - return new CreateFlowsVaultConnectionRequestContent(value, 15); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionStripe value) { - return new CreateFlowsVaultConnectionRequestContent(value, 16); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionTelegram value) { - return new CreateFlowsVaultConnectionRequestContent(value, 17); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionTwilio value) { - return new CreateFlowsVaultConnectionRequestContent(value, 18); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionWhatsapp value) { - return new CreateFlowsVaultConnectionRequestContent(value, 19); - } - - public static CreateFlowsVaultConnectionRequestContent of(CreateFlowsVaultConnectionZapier value) { - return new CreateFlowsVaultConnectionRequestContent(value, 20); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionActivecampaign value); - - T visit(CreateFlowsVaultConnectionAirtable value); - - T visit(CreateFlowsVaultConnectionAuth0 value); - - T visit(CreateFlowsVaultConnectionBigquery value); - - T visit(CreateFlowsVaultConnectionClearbit value); - - T visit(CreateFlowsVaultConnectionDocusign value); - - T visit(CreateFlowsVaultConnectionGoogleSheets value); - - T visit(CreateFlowsVaultConnectionHttp value); - - T visit(CreateFlowsVaultConnectionHubspot value); - - T visit(CreateFlowsVaultConnectionJwt value); - - T visit(CreateFlowsVaultConnectionMailchimp value); - - T visit(CreateFlowsVaultConnectionMailjet value); - - T visit(CreateFlowsVaultConnectionPipedrive value); - - T visit(CreateFlowsVaultConnectionSalesforce value); - - T visit(CreateFlowsVaultConnectionSendgrid value); - - T visit(CreateFlowsVaultConnectionSlack value); - - T visit(CreateFlowsVaultConnectionStripe value); - - T visit(CreateFlowsVaultConnectionTelegram value); - - T visit(CreateFlowsVaultConnectionTwilio value); - - T visit(CreateFlowsVaultConnectionWhatsapp value); - - T visit(CreateFlowsVaultConnectionZapier value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionRequestContent.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionRequestContent deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionActivecampaign.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionAirtable.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionAuth0.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionBigquery.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionClearbit.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionDocusign.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionGoogleSheets.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionHttp.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionHubspot.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionJwt.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionMailchimp.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionMailjet.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionPipedrive.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionSalesforce.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionSendgrid.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionSlack.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionStripe.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionTelegram.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionTwilio.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionWhatsapp.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionZapier.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionResponseContent.java deleted file mode 100644 index 845c6872c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionResponseContent.java +++ /dev/null @@ -1,476 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = CreateFlowsVaultConnectionResponseContent.Builder.class) -public final class CreateFlowsVaultConnectionResponseContent { - private final String id; - - private final String appId; - - private final Optional environment; - - private final String name; - - private final Optional accountName; - - private final boolean ready; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional refreshedAt; - - private final String fingerprint; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionResponseContent( - String id, - String appId, - Optional environment, - String name, - Optional accountName, - boolean ready, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional refreshedAt, - String fingerprint, - Map additionalProperties) { - this.id = id; - this.appId = appId; - this.environment = environment; - this.name = name; - this.accountName = accountName; - this.ready = ready; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.refreshedAt = refreshedAt; - this.fingerprint = fingerprint; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection identifier. - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return Flows Vault Connection app identifier. - */ - @JsonProperty("app_id") - public String getAppId() { - return appId; - } - - /** - * @return Flows Vault Connection environment. - */ - @JsonProperty("environment") - public Optional getEnvironment() { - return environment; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return Flows Vault Connection custom account name. - */ - @JsonProperty("account_name") - public Optional getAccountName() { - return accountName; - } - - /** - * @return Whether the Flows Vault Connection is configured. - */ - @JsonProperty("ready") - public boolean getReady() { - return ready; - } - - /** - * @return The ISO 8601 formatted date when this Flows Vault Connection was created. - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return The ISO 8601 formatted date when this Flows Vault Connection was updated. - */ - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - /** - * @return The ISO 8601 formatted date when this Flows Vault Connection was refreshed. - */ - @JsonProperty("refreshed_at") - public Optional getRefreshedAt() { - return refreshedAt; - } - - @JsonProperty("fingerprint") - public String getFingerprint() { - return fingerprint; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionResponseContent - && equalTo((CreateFlowsVaultConnectionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionResponseContent other) { - return id.equals(other.id) - && appId.equals(other.appId) - && environment.equals(other.environment) - && name.equals(other.name) - && accountName.equals(other.accountName) - && ready == other.ready - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && refreshedAt.equals(other.refreshedAt) - && fingerprint.equals(other.fingerprint); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.appId, - this.environment, - this.name, - this.accountName, - this.ready, - this.createdAt, - this.updatedAt, - this.refreshedAt, - this.fingerprint); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

Flows Vault Connection identifier.

- */ - AppIdStage id(@NotNull String id); - - Builder from(CreateFlowsVaultConnectionResponseContent other); - } - - public interface AppIdStage { - /** - *

Flows Vault Connection app identifier.

- */ - NameStage appId(@NotNull String appId); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - ReadyStage name(@NotNull String name); - } - - public interface ReadyStage { - /** - *

Whether the Flows Vault Connection is configured.

- */ - CreatedAtStage ready(boolean ready); - } - - public interface CreatedAtStage { - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was created.

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

The ISO 8601 formatted date when this Flows Vault Connection was updated.

- */ - FingerprintStage updatedAt(@NotNull OffsetDateTime updatedAt); - } - - public interface FingerprintStage { - _FinalStage fingerprint(@NotNull String fingerprint); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionResponseContent build(); - - /** - *

Flows Vault Connection environment.

- */ - _FinalStage environment(Optional environment); - - _FinalStage environment(String environment); - - /** - *

Flows Vault Connection custom account name.

- */ - _FinalStage accountName(Optional accountName); - - _FinalStage accountName(String accountName); - - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was refreshed.

- */ - _FinalStage refreshedAt(Optional refreshedAt); - - _FinalStage refreshedAt(OffsetDateTime refreshedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements IdStage, - AppIdStage, - NameStage, - ReadyStage, - CreatedAtStage, - UpdatedAtStage, - FingerprintStage, - _FinalStage { - private String id; - - private String appId; - - private String name; - - private boolean ready; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private String fingerprint; - - private Optional refreshedAt = Optional.empty(); - - private Optional accountName = Optional.empty(); - - private Optional environment = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionResponseContent other) { - id(other.getId()); - appId(other.getAppId()); - environment(other.getEnvironment()); - name(other.getName()); - accountName(other.getAccountName()); - ready(other.getReady()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - refreshedAt(other.getRefreshedAt()); - fingerprint(other.getFingerprint()); - return this; - } - - /** - *

Flows Vault Connection identifier.

- *

Flows Vault Connection identifier.

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

Flows Vault Connection app identifier.

- *

Flows Vault Connection app identifier.

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

Flows Vault Connection name.

- *

Flows Vault Connection name.

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

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. - */ - @java.lang.Override - @JsonSetter("ready") - public CreatedAtStage ready(boolean ready) { - this.ready = ready; - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("created_at") - public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { - this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("updated_at") - public FingerprintStage updatedAt(@NotNull OffsetDateTime updatedAt) { - this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("fingerprint") - public _FinalStage fingerprint(@NotNull String fingerprint) { - this.fingerprint = Objects.requireNonNull(fingerprint, "fingerprint must not be null"); - return this; - } - - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was refreshed.

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

The ISO 8601 formatted date when this Flows Vault Connection was refreshed.

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

Flows Vault Connection custom account name.

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

Flows Vault Connection custom account name.

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

Flows Vault Connection environment.

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

Flows Vault Connection environment.

- */ - @java.lang.Override - @JsonSetter(value = "environment", nulls = Nulls.SKIP) - public _FinalStage environment(Optional environment) { - this.environment = environment; - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionResponseContent build() { - return new CreateFlowsVaultConnectionResponseContent( - id, - appId, - environment, - name, - accountName, - ready, - createdAt, - updatedAt, - refreshedAt, - fingerprint, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforce.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforce.java deleted file mode 100644 index 4d6944097..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforce.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionSalesforce.Deserializer.class) -public final class CreateFlowsVaultConnectionSalesforce { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionSalesforce(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((CreateFlowsVaultConnectionSalesforceOauthCode) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionSalesforceUninitialized) 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 CreateFlowsVaultConnectionSalesforce - && equalTo((CreateFlowsVaultConnectionSalesforce) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionSalesforce 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 CreateFlowsVaultConnectionSalesforce of(CreateFlowsVaultConnectionSalesforceOauthCode value) { - return new CreateFlowsVaultConnectionSalesforce(value, 0); - } - - public static CreateFlowsVaultConnectionSalesforce of(CreateFlowsVaultConnectionSalesforceUninitialized value) { - return new CreateFlowsVaultConnectionSalesforce(value, 1); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionSalesforceOauthCode value); - - T visit(CreateFlowsVaultConnectionSalesforceUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionSalesforce.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionSalesforce deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionSalesforceOauthCode.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionSalesforceUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforceOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforceOauthCode.java deleted file mode 100644 index 36b769b02..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforceOauthCode.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionSalesforceOauthCode.Builder.class) -public final class CreateFlowsVaultConnectionSalesforceOauthCode { - private final String name; - - private final FlowsVaultConnectionAppIdSalesforceEnum appId; - - private final FlowsVaultConnectioSetupOauthCode setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionSalesforceOauthCode( - String name, - FlowsVaultConnectionAppIdSalesforceEnum appId, - FlowsVaultConnectioSetupOauthCode setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdSalesforceEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupOauthCode getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionSalesforceOauthCode - && equalTo((CreateFlowsVaultConnectionSalesforceOauthCode) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionSalesforceOauthCode other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionSalesforceOauthCode other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdSalesforceEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthCode setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionSalesforceOauthCode build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdSalesforceEnum appId; - - private FlowsVaultConnectioSetupOauthCode setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionSalesforceOauthCode other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdSalesforceEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthCode setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionSalesforceOauthCode build() { - return new CreateFlowsVaultConnectionSalesforceOauthCode(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforceUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforceUninitialized.java deleted file mode 100644 index 7688dad3f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSalesforceUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionSalesforceUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionSalesforceUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdSalesforceEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionSalesforceUninitialized( - String name, FlowsVaultConnectionAppIdSalesforceEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdSalesforceEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionSalesforceUninitialized - && equalTo((CreateFlowsVaultConnectionSalesforceUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionSalesforceUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionSalesforceUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdSalesforceEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionSalesforceUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdSalesforceEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionSalesforceUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdSalesforceEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionSalesforceUninitialized build() { - return new CreateFlowsVaultConnectionSalesforceUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgrid.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgrid.java deleted file mode 100644 index b43c88c1e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgrid.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionSendgrid.Deserializer.class) -public final class CreateFlowsVaultConnectionSendgrid { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionSendgrid(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((CreateFlowsVaultConnectionSendgridApiKey) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionSendgridUninitialized) 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 CreateFlowsVaultConnectionSendgrid - && equalTo((CreateFlowsVaultConnectionSendgrid) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionSendgrid 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 CreateFlowsVaultConnectionSendgrid of(CreateFlowsVaultConnectionSendgridApiKey value) { - return new CreateFlowsVaultConnectionSendgrid(value, 0); - } - - public static CreateFlowsVaultConnectionSendgrid of(CreateFlowsVaultConnectionSendgridUninitialized value) { - return new CreateFlowsVaultConnectionSendgrid(value, 1); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionSendgridApiKey value); - - T visit(CreateFlowsVaultConnectionSendgridUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionSendgrid.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionSendgrid deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionSendgridApiKey.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionSendgridUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgridApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgridApiKey.java deleted file mode 100644 index 4741baac3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgridApiKey.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionSendgridApiKey.Builder.class) -public final class CreateFlowsVaultConnectionSendgridApiKey { - private final String name; - - private final FlowsVaultConnectionAppIdSendgridEnum appId; - - private final FlowsVaultConnectioSetupApiKey setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionSendgridApiKey( - String name, - FlowsVaultConnectionAppIdSendgridEnum appId, - FlowsVaultConnectioSetupApiKey setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdSendgridEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupApiKey getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionSendgridApiKey - && equalTo((CreateFlowsVaultConnectionSendgridApiKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionSendgridApiKey other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionSendgridApiKey other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdSendgridEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupApiKey setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionSendgridApiKey build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdSendgridEnum appId; - - private FlowsVaultConnectioSetupApiKey setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionSendgridApiKey other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdSendgridEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupApiKey setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionSendgridApiKey build() { - return new CreateFlowsVaultConnectionSendgridApiKey(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgridUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgridUninitialized.java deleted file mode 100644 index 2ba4df933..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSendgridUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionSendgridUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionSendgridUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdSendgridEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionSendgridUninitialized( - String name, FlowsVaultConnectionAppIdSendgridEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdSendgridEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionSendgridUninitialized - && equalTo((CreateFlowsVaultConnectionSendgridUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionSendgridUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionSendgridUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdSendgridEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionSendgridUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdSendgridEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionSendgridUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdSendgridEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionSendgridUninitialized build() { - return new CreateFlowsVaultConnectionSendgridUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlack.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlack.java deleted file mode 100644 index dc95884d2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlack.java +++ /dev/null @@ -1,110 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionSlack.Deserializer.class) -public final class CreateFlowsVaultConnectionSlack { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionSlack(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((CreateFlowsVaultConnectionSlackWebhook) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionSlackOauthCode) this.value); - } else if (this.type == 2) { - return visitor.visit((CreateFlowsVaultConnectionSlackUninitialized) 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 CreateFlowsVaultConnectionSlack && equalTo((CreateFlowsVaultConnectionSlack) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionSlack 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 CreateFlowsVaultConnectionSlack of(CreateFlowsVaultConnectionSlackWebhook value) { - return new CreateFlowsVaultConnectionSlack(value, 0); - } - - public static CreateFlowsVaultConnectionSlack of(CreateFlowsVaultConnectionSlackOauthCode value) { - return new CreateFlowsVaultConnectionSlack(value, 1); - } - - public static CreateFlowsVaultConnectionSlack of(CreateFlowsVaultConnectionSlackUninitialized value) { - return new CreateFlowsVaultConnectionSlack(value, 2); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionSlackWebhook value); - - T visit(CreateFlowsVaultConnectionSlackOauthCode value); - - T visit(CreateFlowsVaultConnectionSlackUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionSlack.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionSlack deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionSlackWebhook.class)); - } catch (RuntimeException e) { - } - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionSlackOauthCode.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionSlackUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackOauthCode.java deleted file mode 100644 index 0195263a0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackOauthCode.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionSlackOauthCode.Builder.class) -public final class CreateFlowsVaultConnectionSlackOauthCode { - private final String name; - - private final FlowsVaultConnectionAppIdSlackEnum appId; - - private final FlowsVaultConnectioSetupOauthCode setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionSlackOauthCode( - String name, - FlowsVaultConnectionAppIdSlackEnum appId, - FlowsVaultConnectioSetupOauthCode setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdSlackEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupOauthCode getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionSlackOauthCode - && equalTo((CreateFlowsVaultConnectionSlackOauthCode) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionSlackOauthCode other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionSlackOauthCode other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdSlackEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthCode setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionSlackOauthCode build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdSlackEnum appId; - - private FlowsVaultConnectioSetupOauthCode setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionSlackOauthCode other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdSlackEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthCode setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionSlackOauthCode build() { - return new CreateFlowsVaultConnectionSlackOauthCode(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackUninitialized.java deleted file mode 100644 index 6bc6094f7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionSlackUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionSlackUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdSlackEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionSlackUninitialized( - String name, FlowsVaultConnectionAppIdSlackEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdSlackEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionSlackUninitialized - && equalTo((CreateFlowsVaultConnectionSlackUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionSlackUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionSlackUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdSlackEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionSlackUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdSlackEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionSlackUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdSlackEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionSlackUninitialized build() { - return new CreateFlowsVaultConnectionSlackUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackWebhook.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackWebhook.java deleted file mode 100644 index 51dcefebd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionSlackWebhook.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionSlackWebhook.Builder.class) -public final class CreateFlowsVaultConnectionSlackWebhook { - private final String name; - - private final FlowsVaultConnectionAppIdSlackEnum appId; - - private final FlowsVaultConnectioSetupWebhook setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionSlackWebhook( - String name, - FlowsVaultConnectionAppIdSlackEnum appId, - FlowsVaultConnectioSetupWebhook setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdSlackEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupWebhook getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionSlackWebhook - && equalTo((CreateFlowsVaultConnectionSlackWebhook) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionSlackWebhook other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionSlackWebhook other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdSlackEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupWebhook setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionSlackWebhook build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdSlackEnum appId; - - private FlowsVaultConnectioSetupWebhook setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionSlackWebhook other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdSlackEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupWebhook setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionSlackWebhook build() { - return new CreateFlowsVaultConnectionSlackWebhook(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripe.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripe.java deleted file mode 100644 index 3ee830644..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripe.java +++ /dev/null @@ -1,110 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionStripe.Deserializer.class) -public final class CreateFlowsVaultConnectionStripe { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionStripe(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((CreateFlowsVaultConnectionStripeKeyPair) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionStripeOauthCode) this.value); - } else if (this.type == 2) { - return visitor.visit((CreateFlowsVaultConnectionStripeUninitialized) 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 CreateFlowsVaultConnectionStripe && equalTo((CreateFlowsVaultConnectionStripe) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionStripe 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 CreateFlowsVaultConnectionStripe of(CreateFlowsVaultConnectionStripeKeyPair value) { - return new CreateFlowsVaultConnectionStripe(value, 0); - } - - public static CreateFlowsVaultConnectionStripe of(CreateFlowsVaultConnectionStripeOauthCode value) { - return new CreateFlowsVaultConnectionStripe(value, 1); - } - - public static CreateFlowsVaultConnectionStripe of(CreateFlowsVaultConnectionStripeUninitialized value) { - return new CreateFlowsVaultConnectionStripe(value, 2); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionStripeKeyPair value); - - T visit(CreateFlowsVaultConnectionStripeOauthCode value); - - T visit(CreateFlowsVaultConnectionStripeUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionStripe.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionStripe deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionStripeKeyPair.class)); - } catch (RuntimeException e) { - } - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionStripeOauthCode.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionStripeUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeKeyPair.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeKeyPair.java deleted file mode 100644 index e3b11daf7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeKeyPair.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionStripeKeyPair.Builder.class) -public final class CreateFlowsVaultConnectionStripeKeyPair { - private final String name; - - private final FlowsVaultConnectionAppIdStripeEnum appId; - - private final FlowsVaultConnectioSetupStripeKeyPair setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionStripeKeyPair( - String name, - FlowsVaultConnectionAppIdStripeEnum appId, - FlowsVaultConnectioSetupStripeKeyPair setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdStripeEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupStripeKeyPair getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionStripeKeyPair - && equalTo((CreateFlowsVaultConnectionStripeKeyPair) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionStripeKeyPair other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionStripeKeyPair other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdStripeEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupStripeKeyPair setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionStripeKeyPair build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdStripeEnum appId; - - private FlowsVaultConnectioSetupStripeKeyPair setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionStripeKeyPair other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdStripeEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupStripeKeyPair setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionStripeKeyPair build() { - return new CreateFlowsVaultConnectionStripeKeyPair(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeOauthCode.java deleted file mode 100644 index 19f3e4a46..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeOauthCode.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionStripeOauthCode.Builder.class) -public final class CreateFlowsVaultConnectionStripeOauthCode { - private final String name; - - private final FlowsVaultConnectionAppIdStripeEnum appId; - - private final FlowsVaultConnectioSetupOauthCode setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionStripeOauthCode( - String name, - FlowsVaultConnectionAppIdStripeEnum appId, - FlowsVaultConnectioSetupOauthCode setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdStripeEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupOauthCode getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionStripeOauthCode - && equalTo((CreateFlowsVaultConnectionStripeOauthCode) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionStripeOauthCode other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionStripeOauthCode other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdStripeEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthCode setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionStripeOauthCode build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdStripeEnum appId; - - private FlowsVaultConnectioSetupOauthCode setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionStripeOauthCode other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdStripeEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupOauthCode setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionStripeOauthCode build() { - return new CreateFlowsVaultConnectionStripeOauthCode(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeUninitialized.java deleted file mode 100644 index c8dedfa42..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionStripeUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionStripeUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionStripeUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdStripeEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionStripeUninitialized( - String name, FlowsVaultConnectionAppIdStripeEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdStripeEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionStripeUninitialized - && equalTo((CreateFlowsVaultConnectionStripeUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionStripeUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionStripeUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdStripeEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionStripeUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdStripeEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionStripeUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdStripeEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionStripeUninitialized build() { - return new CreateFlowsVaultConnectionStripeUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegram.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegram.java deleted file mode 100644 index 25b120da9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegram.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionTelegram.Deserializer.class) -public final class CreateFlowsVaultConnectionTelegram { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionTelegram(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((CreateFlowsVaultConnectionTelegramToken) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionTelegramUninitialized) 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 CreateFlowsVaultConnectionTelegram - && equalTo((CreateFlowsVaultConnectionTelegram) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionTelegram 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 CreateFlowsVaultConnectionTelegram of(CreateFlowsVaultConnectionTelegramToken value) { - return new CreateFlowsVaultConnectionTelegram(value, 0); - } - - public static CreateFlowsVaultConnectionTelegram of(CreateFlowsVaultConnectionTelegramUninitialized value) { - return new CreateFlowsVaultConnectionTelegram(value, 1); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionTelegramToken value); - - T visit(CreateFlowsVaultConnectionTelegramUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionTelegram.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionTelegram deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionTelegramToken.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionTelegramUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegramToken.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegramToken.java deleted file mode 100644 index c61fabeaf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegramToken.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionTelegramToken.Builder.class) -public final class CreateFlowsVaultConnectionTelegramToken { - private final String name; - - private final FlowsVaultConnectionAppIdTelegramEnum appId; - - private final FlowsVaultConnectioSetupToken setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionTelegramToken( - String name, - FlowsVaultConnectionAppIdTelegramEnum appId, - FlowsVaultConnectioSetupToken setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdTelegramEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupToken getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionTelegramToken - && equalTo((CreateFlowsVaultConnectionTelegramToken) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionTelegramToken other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionTelegramToken other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdTelegramEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupToken setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionTelegramToken build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdTelegramEnum appId; - - private FlowsVaultConnectioSetupToken setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionTelegramToken other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdTelegramEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupToken setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionTelegramToken build() { - return new CreateFlowsVaultConnectionTelegramToken(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegramUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegramUninitialized.java deleted file mode 100644 index 7f1973cf9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTelegramUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionTelegramUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionTelegramUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdTelegramEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionTelegramUninitialized( - String name, FlowsVaultConnectionAppIdTelegramEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdTelegramEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionTelegramUninitialized - && equalTo((CreateFlowsVaultConnectionTelegramUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionTelegramUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionTelegramUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdTelegramEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionTelegramUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdTelegramEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionTelegramUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdTelegramEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionTelegramUninitialized build() { - return new CreateFlowsVaultConnectionTelegramUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilio.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilio.java deleted file mode 100644 index 30aa978a6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilio.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionTwilio.Deserializer.class) -public final class CreateFlowsVaultConnectionTwilio { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionTwilio(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((CreateFlowsVaultConnectionTwilioApiKey) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionTwilioUninitialized) 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 CreateFlowsVaultConnectionTwilio && equalTo((CreateFlowsVaultConnectionTwilio) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionTwilio 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 CreateFlowsVaultConnectionTwilio of(CreateFlowsVaultConnectionTwilioApiKey value) { - return new CreateFlowsVaultConnectionTwilio(value, 0); - } - - public static CreateFlowsVaultConnectionTwilio of(CreateFlowsVaultConnectionTwilioUninitialized value) { - return new CreateFlowsVaultConnectionTwilio(value, 1); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionTwilioApiKey value); - - T visit(CreateFlowsVaultConnectionTwilioUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionTwilio.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionTwilio deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionTwilioApiKey.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionTwilioUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilioApiKey.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilioApiKey.java deleted file mode 100644 index de553b4ca..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilioApiKey.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionTwilioApiKey.Builder.class) -public final class CreateFlowsVaultConnectionTwilioApiKey { - private final String name; - - private final FlowsVaultConnectionAppIdTwilioEnum appId; - - private final FlowsVaultConnectioSetupTwilioApiKey setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionTwilioApiKey( - String name, - FlowsVaultConnectionAppIdTwilioEnum appId, - FlowsVaultConnectioSetupTwilioApiKey setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdTwilioEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupTwilioApiKey getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionTwilioApiKey - && equalTo((CreateFlowsVaultConnectionTwilioApiKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionTwilioApiKey other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionTwilioApiKey other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdTwilioEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupTwilioApiKey setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionTwilioApiKey build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdTwilioEnum appId; - - private FlowsVaultConnectioSetupTwilioApiKey setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionTwilioApiKey other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdTwilioEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupTwilioApiKey setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionTwilioApiKey build() { - return new CreateFlowsVaultConnectionTwilioApiKey(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilioUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilioUninitialized.java deleted file mode 100644 index ece43e2c5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionTwilioUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionTwilioUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionTwilioUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdTwilioEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionTwilioUninitialized( - String name, FlowsVaultConnectionAppIdTwilioEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdTwilioEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionTwilioUninitialized - && equalTo((CreateFlowsVaultConnectionTwilioUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionTwilioUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionTwilioUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdTwilioEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionTwilioUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdTwilioEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionTwilioUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdTwilioEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionTwilioUninitialized build() { - return new CreateFlowsVaultConnectionTwilioUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsapp.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsapp.java deleted file mode 100644 index 0dad15a03..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsapp.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionWhatsapp.Deserializer.class) -public final class CreateFlowsVaultConnectionWhatsapp { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionWhatsapp(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((CreateFlowsVaultConnectionWhatsappToken) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionWhatsappUninitialized) 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 CreateFlowsVaultConnectionWhatsapp - && equalTo((CreateFlowsVaultConnectionWhatsapp) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionWhatsapp 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 CreateFlowsVaultConnectionWhatsapp of(CreateFlowsVaultConnectionWhatsappToken value) { - return new CreateFlowsVaultConnectionWhatsapp(value, 0); - } - - public static CreateFlowsVaultConnectionWhatsapp of(CreateFlowsVaultConnectionWhatsappUninitialized value) { - return new CreateFlowsVaultConnectionWhatsapp(value, 1); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionWhatsappToken value); - - T visit(CreateFlowsVaultConnectionWhatsappUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionWhatsapp.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionWhatsapp deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionWhatsappToken.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionWhatsappUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsappToken.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsappToken.java deleted file mode 100644 index 66ebd11b4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsappToken.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionWhatsappToken.Builder.class) -public final class CreateFlowsVaultConnectionWhatsappToken { - private final String name; - - private final FlowsVaultConnectionAppIdWhatsappEnum appId; - - private final FlowsVaultConnectioSetupToken setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionWhatsappToken( - String name, - FlowsVaultConnectionAppIdWhatsappEnum appId, - FlowsVaultConnectioSetupToken setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdWhatsappEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupToken getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionWhatsappToken - && equalTo((CreateFlowsVaultConnectionWhatsappToken) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionWhatsappToken other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionWhatsappToken other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdWhatsappEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupToken setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionWhatsappToken build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdWhatsappEnum appId; - - private FlowsVaultConnectioSetupToken setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionWhatsappToken other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdWhatsappEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupToken setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionWhatsappToken build() { - return new CreateFlowsVaultConnectionWhatsappToken(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsappUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsappUninitialized.java deleted file mode 100644 index 5c396e594..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionWhatsappUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionWhatsappUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionWhatsappUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdWhatsappEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionWhatsappUninitialized( - String name, FlowsVaultConnectionAppIdWhatsappEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdWhatsappEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionWhatsappUninitialized - && equalTo((CreateFlowsVaultConnectionWhatsappUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionWhatsappUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionWhatsappUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdWhatsappEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionWhatsappUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdWhatsappEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionWhatsappUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdWhatsappEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionWhatsappUninitialized build() { - return new CreateFlowsVaultConnectionWhatsappUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapier.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapier.java deleted file mode 100644 index 9d713daed..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapier.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateFlowsVaultConnectionZapier.Deserializer.class) -public final class CreateFlowsVaultConnectionZapier { - private final Object value; - - private final int type; - - private CreateFlowsVaultConnectionZapier(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((CreateFlowsVaultConnectionZapierWebhook) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateFlowsVaultConnectionZapierUninitialized) 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 CreateFlowsVaultConnectionZapier && equalTo((CreateFlowsVaultConnectionZapier) other); - } - - private boolean equalTo(CreateFlowsVaultConnectionZapier 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 CreateFlowsVaultConnectionZapier of(CreateFlowsVaultConnectionZapierWebhook value) { - return new CreateFlowsVaultConnectionZapier(value, 0); - } - - public static CreateFlowsVaultConnectionZapier of(CreateFlowsVaultConnectionZapierUninitialized value) { - return new CreateFlowsVaultConnectionZapier(value, 1); - } - - public interface Visitor { - T visit(CreateFlowsVaultConnectionZapierWebhook value); - - T visit(CreateFlowsVaultConnectionZapierUninitialized value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateFlowsVaultConnectionZapier.class); - } - - @java.lang.Override - public CreateFlowsVaultConnectionZapier deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateFlowsVaultConnectionZapierWebhook.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateFlowsVaultConnectionZapierUninitialized.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapierUninitialized.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapierUninitialized.java deleted file mode 100644 index 80016bda2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapierUninitialized.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionZapierUninitialized.Builder.class) -public final class CreateFlowsVaultConnectionZapierUninitialized { - private final String name; - - private final FlowsVaultConnectionAppIdZapierEnum appId; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionZapierUninitialized( - String name, FlowsVaultConnectionAppIdZapierEnum appId, Map additionalProperties) { - this.name = name; - this.appId = appId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdZapierEnum getAppId() { - return appId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionZapierUninitialized - && equalTo((CreateFlowsVaultConnectionZapierUninitialized) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionZapierUninitialized other) { - return name.equals(other.name) && appId.equals(other.appId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionZapierUninitialized other); - } - - public interface AppIdStage { - _FinalStage appId(@NotNull FlowsVaultConnectionAppIdZapierEnum appId); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionZapierUninitialized build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdZapierEnum appId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionZapierUninitialized other) { - name(other.getName()); - appId(other.getAppId()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public _FinalStage appId(@NotNull FlowsVaultConnectionAppIdZapierEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionZapierUninitialized build() { - return new CreateFlowsVaultConnectionZapierUninitialized(name, appId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapierWebhook.java b/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapierWebhook.java deleted file mode 100644 index 1c4c73970..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFlowsVaultConnectionZapierWebhook.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateFlowsVaultConnectionZapierWebhook.Builder.class) -public final class CreateFlowsVaultConnectionZapierWebhook { - private final String name; - - private final FlowsVaultConnectionAppIdZapierEnum appId; - - private final FlowsVaultConnectioSetupWebhook setup; - - private final Map additionalProperties; - - private CreateFlowsVaultConnectionZapierWebhook( - String name, - FlowsVaultConnectionAppIdZapierEnum appId, - FlowsVaultConnectioSetupWebhook setup, - Map additionalProperties) { - this.name = name; - this.appId = appId; - this.setup = setup; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("app_id") - public FlowsVaultConnectionAppIdZapierEnum getAppId() { - return appId; - } - - @JsonProperty("setup") - public FlowsVaultConnectioSetupWebhook getSetup() { - return setup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFlowsVaultConnectionZapierWebhook - && equalTo((CreateFlowsVaultConnectionZapierWebhook) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFlowsVaultConnectionZapierWebhook other) { - return name.equals(other.name) && appId.equals(other.appId) && setup.equals(other.setup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.appId, this.setup); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - AppIdStage name(@NotNull String name); - - Builder from(CreateFlowsVaultConnectionZapierWebhook other); - } - - public interface AppIdStage { - SetupStage appId(@NotNull FlowsVaultConnectionAppIdZapierEnum appId); - } - - public interface SetupStage { - _FinalStage setup(@NotNull FlowsVaultConnectioSetupWebhook setup); - } - - public interface _FinalStage { - CreateFlowsVaultConnectionZapierWebhook build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, AppIdStage, SetupStage, _FinalStage { - private String name; - - private FlowsVaultConnectionAppIdZapierEnum appId; - - private FlowsVaultConnectioSetupWebhook setup; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFlowsVaultConnectionZapierWebhook other) { - name(other.getName()); - appId(other.getAppId()); - setup(other.getSetup()); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public AppIdStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("app_id") - public SetupStage appId(@NotNull FlowsVaultConnectionAppIdZapierEnum appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("setup") - public _FinalStage setup(@NotNull FlowsVaultConnectioSetupWebhook setup) { - this.setup = Objects.requireNonNull(setup, "setup must not be null"); - return this; - } - - @java.lang.Override - public CreateFlowsVaultConnectionZapierWebhook build() { - return new CreateFlowsVaultConnectionZapierWebhook(name, appId, setup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFormRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateFormRequestContent.java deleted file mode 100644 index facd598a5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFormRequestContent.java +++ /dev/null @@ -1,326 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateFormRequestContent.Builder.class) -public final class CreateFormRequestContent { - private final String name; - - private final Optional messages; - - private final Optional languages; - - private final Optional>> translations; - - private final Optional> nodes; - - private final Optional start; - - private final Optional ending; - - private final Optional style; - - private final Map additionalProperties; - - private CreateFormRequestContent( - String name, - Optional messages, - Optional languages, - Optional>> translations, - Optional> nodes, - Optional start, - Optional ending, - Optional style, - Map additionalProperties) { - this.name = name; - this.messages = messages; - this.languages = languages; - this.translations = translations; - this.nodes = nodes; - this.start = start; - this.ending = ending; - this.style = style; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("messages") - public Optional getMessages() { - return messages; - } - - @JsonProperty("languages") - public Optional getLanguages() { - return languages; - } - - @JsonProperty("translations") - public Optional>> getTranslations() { - return translations; - } - - @JsonProperty("nodes") - public Optional> getNodes() { - return nodes; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("ending") - public Optional getEnding() { - return ending; - } - - @JsonProperty("style") - public Optional getStyle() { - return style; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFormRequestContent && equalTo((CreateFormRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFormRequestContent other) { - return name.equals(other.name) - && messages.equals(other.messages) - && languages.equals(other.languages) - && translations.equals(other.translations) - && nodes.equals(other.nodes) - && start.equals(other.start) - && ending.equals(other.ending) - && style.equals(other.style); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.messages, - this.languages, - this.translations, - this.nodes, - this.start, - this.ending, - this.style); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - _FinalStage name(@NotNull String name); - - Builder from(CreateFormRequestContent other); - } - - public interface _FinalStage { - CreateFormRequestContent build(); - - _FinalStage messages(Optional messages); - - _FinalStage messages(FormMessages messages); - - _FinalStage languages(Optional languages); - - _FinalStage languages(FormLanguages languages); - - _FinalStage translations(Optional>> translations); - - _FinalStage translations(Map> translations); - - _FinalStage nodes(Optional> nodes); - - _FinalStage nodes(List nodes); - - _FinalStage start(Optional start); - - _FinalStage start(FormStartNode start); - - _FinalStage ending(Optional ending); - - _FinalStage ending(FormEndingNode ending); - - _FinalStage style(Optional style); - - _FinalStage style(FormStyle style); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; - - private Optional style = Optional.empty(); - - private Optional ending = Optional.empty(); - - private Optional start = Optional.empty(); - - private Optional> nodes = Optional.empty(); - - private Optional>> translations = Optional.empty(); - - private Optional languages = Optional.empty(); - - private Optional messages = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFormRequestContent other) { - name(other.getName()); - messages(other.getMessages()); - languages(other.getLanguages()); - translations(other.getTranslations()); - nodes(other.getNodes()); - start(other.getStart()); - ending(other.getEnding()); - style(other.getStyle()); - return this; - } - - @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 style(FormStyle style) { - this.style = Optional.ofNullable(style); - return this; - } - - @java.lang.Override - @JsonSetter(value = "style", nulls = Nulls.SKIP) - public _FinalStage style(Optional style) { - this.style = style; - return this; - } - - @java.lang.Override - public _FinalStage ending(FormEndingNode ending) { - this.ending = Optional.ofNullable(ending); - return this; - } - - @java.lang.Override - @JsonSetter(value = "ending", nulls = Nulls.SKIP) - public _FinalStage ending(Optional ending) { - this.ending = ending; - return this; - } - - @java.lang.Override - public _FinalStage start(FormStartNode start) { - this.start = Optional.ofNullable(start); - return this; - } - - @java.lang.Override - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public _FinalStage start(Optional start) { - this.start = start; - return this; - } - - @java.lang.Override - public _FinalStage nodes(List nodes) { - this.nodes = Optional.ofNullable(nodes); - return this; - } - - @java.lang.Override - @JsonSetter(value = "nodes", nulls = Nulls.SKIP) - public _FinalStage nodes(Optional> nodes) { - this.nodes = nodes; - return this; - } - - @java.lang.Override - public _FinalStage translations(Map> translations) { - this.translations = Optional.ofNullable(translations); - return this; - } - - @java.lang.Override - @JsonSetter(value = "translations", nulls = Nulls.SKIP) - public _FinalStage translations(Optional>> translations) { - this.translations = translations; - return this; - } - - @java.lang.Override - public _FinalStage languages(FormLanguages languages) { - this.languages = Optional.ofNullable(languages); - return this; - } - - @java.lang.Override - @JsonSetter(value = "languages", nulls = Nulls.SKIP) - public _FinalStage languages(Optional languages) { - this.languages = languages; - return this; - } - - @java.lang.Override - public _FinalStage messages(FormMessages messages) { - this.messages = Optional.ofNullable(messages); - return this; - } - - @java.lang.Override - @JsonSetter(value = "messages", nulls = Nulls.SKIP) - public _FinalStage messages(Optional messages) { - this.messages = messages; - return this; - } - - @java.lang.Override - public CreateFormRequestContent build() { - return new CreateFormRequestContent( - name, messages, languages, translations, nodes, start, ending, style, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateFormResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateFormResponseContent.java deleted file mode 100644 index 559f31156..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateFormResponseContent.java +++ /dev/null @@ -1,477 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = CreateFormResponseContent.Builder.class) -public final class CreateFormResponseContent { - private final String id; - - private final String name; - - private final Optional messages; - - private final Optional languages; - - private final Optional>> translations; - - private final Optional> nodes; - - private final Optional start; - - private final Optional ending; - - private final Optional style; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional embeddedAt; - - private final Optional submittedAt; - - private final Map additionalProperties; - - private CreateFormResponseContent( - String id, - String name, - Optional messages, - Optional languages, - Optional>> translations, - Optional> nodes, - Optional start, - Optional ending, - Optional style, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional embeddedAt, - Optional submittedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.messages = messages; - this.languages = languages; - this.translations = translations; - this.nodes = nodes; - this.start = start; - this.ending = ending; - this.style = style; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.embeddedAt = embeddedAt; - this.submittedAt = submittedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("messages") - public Optional getMessages() { - return messages; - } - - @JsonProperty("languages") - public Optional getLanguages() { - return languages; - } - - @JsonProperty("translations") - public Optional>> getTranslations() { - return translations; - } - - @JsonProperty("nodes") - public Optional> getNodes() { - return nodes; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("ending") - public Optional getEnding() { - return ending; - } - - @JsonProperty("style") - public Optional getStyle() { - return style; - } - - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("embedded_at") - public Optional getEmbeddedAt() { - return embeddedAt; - } - - @JsonProperty("submitted_at") - public Optional getSubmittedAt() { - return submittedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateFormResponseContent && equalTo((CreateFormResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateFormResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && messages.equals(other.messages) - && languages.equals(other.languages) - && translations.equals(other.translations) - && nodes.equals(other.nodes) - && start.equals(other.start) - && ending.equals(other.ending) - && style.equals(other.style) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && embeddedAt.equals(other.embeddedAt) - && submittedAt.equals(other.submittedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.messages, - this.languages, - this.translations, - this.nodes, - this.start, - this.ending, - this.style, - this.createdAt, - this.updatedAt, - this.embeddedAt, - this.submittedAt); - } - - @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(CreateFormResponseContent other); - } - - 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 { - CreateFormResponseContent build(); - - _FinalStage messages(Optional messages); - - _FinalStage messages(FormMessages messages); - - _FinalStage languages(Optional languages); - - _FinalStage languages(FormLanguages languages); - - _FinalStage translations(Optional>> translations); - - _FinalStage translations(Map> translations); - - _FinalStage nodes(Optional> nodes); - - _FinalStage nodes(List nodes); - - _FinalStage start(Optional start); - - _FinalStage start(FormStartNode start); - - _FinalStage ending(Optional ending); - - _FinalStage ending(FormEndingNode ending); - - _FinalStage style(Optional style); - - _FinalStage style(FormStyle style); - - _FinalStage embeddedAt(Optional embeddedAt); - - _FinalStage embeddedAt(String embeddedAt); - - _FinalStage submittedAt(Optional submittedAt); - - _FinalStage submittedAt(String submittedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, CreatedAtStage, UpdatedAtStage, _FinalStage { - private String id; - - private String name; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private Optional submittedAt = Optional.empty(); - - private Optional embeddedAt = Optional.empty(); - - private Optional style = Optional.empty(); - - private Optional ending = Optional.empty(); - - private Optional start = Optional.empty(); - - private Optional> nodes = Optional.empty(); - - private Optional>> translations = Optional.empty(); - - private Optional languages = Optional.empty(); - - private Optional messages = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateFormResponseContent other) { - id(other.getId()); - name(other.getName()); - messages(other.getMessages()); - languages(other.getLanguages()); - translations(other.getTranslations()); - nodes(other.getNodes()); - start(other.getStart()); - ending(other.getEnding()); - style(other.getStyle()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - embeddedAt(other.getEmbeddedAt()); - submittedAt(other.getSubmittedAt()); - 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 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 submittedAt(String submittedAt) { - this.submittedAt = Optional.ofNullable(submittedAt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "submitted_at", nulls = Nulls.SKIP) - public _FinalStage submittedAt(Optional submittedAt) { - this.submittedAt = submittedAt; - return this; - } - - @java.lang.Override - public _FinalStage embeddedAt(String embeddedAt) { - this.embeddedAt = Optional.ofNullable(embeddedAt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "embedded_at", nulls = Nulls.SKIP) - public _FinalStage embeddedAt(Optional embeddedAt) { - this.embeddedAt = embeddedAt; - return this; - } - - @java.lang.Override - public _FinalStage style(FormStyle style) { - this.style = Optional.ofNullable(style); - return this; - } - - @java.lang.Override - @JsonSetter(value = "style", nulls = Nulls.SKIP) - public _FinalStage style(Optional style) { - this.style = style; - return this; - } - - @java.lang.Override - public _FinalStage ending(FormEndingNode ending) { - this.ending = Optional.ofNullable(ending); - return this; - } - - @java.lang.Override - @JsonSetter(value = "ending", nulls = Nulls.SKIP) - public _FinalStage ending(Optional ending) { - this.ending = ending; - return this; - } - - @java.lang.Override - public _FinalStage start(FormStartNode start) { - this.start = Optional.ofNullable(start); - return this; - } - - @java.lang.Override - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public _FinalStage start(Optional start) { - this.start = start; - return this; - } - - @java.lang.Override - public _FinalStage nodes(List nodes) { - this.nodes = Optional.ofNullable(nodes); - return this; - } - - @java.lang.Override - @JsonSetter(value = "nodes", nulls = Nulls.SKIP) - public _FinalStage nodes(Optional> nodes) { - this.nodes = nodes; - return this; - } - - @java.lang.Override - public _FinalStage translations(Map> translations) { - this.translations = Optional.ofNullable(translations); - return this; - } - - @java.lang.Override - @JsonSetter(value = "translations", nulls = Nulls.SKIP) - public _FinalStage translations(Optional>> translations) { - this.translations = translations; - return this; - } - - @java.lang.Override - public _FinalStage languages(FormLanguages languages) { - this.languages = Optional.ofNullable(languages); - return this; - } - - @java.lang.Override - @JsonSetter(value = "languages", nulls = Nulls.SKIP) - public _FinalStage languages(Optional languages) { - this.languages = languages; - return this; - } - - @java.lang.Override - public _FinalStage messages(FormMessages messages) { - this.messages = Optional.ofNullable(messages); - return this; - } - - @java.lang.Override - @JsonSetter(value = "messages", nulls = Nulls.SKIP) - public _FinalStage messages(Optional messages) { - this.messages = messages; - return this; - } - - @java.lang.Override - public CreateFormResponseContent build() { - return new CreateFormResponseContent( - id, - name, - messages, - languages, - translations, - nodes, - start, - ending, - style, - createdAt, - updatedAt, - embeddedAt, - submittedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateGuardianEnrollmentTicketResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateGuardianEnrollmentTicketResponseContent.java deleted file mode 100644 index 709085672..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateGuardianEnrollmentTicketResponseContent.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateGuardianEnrollmentTicketResponseContent.Builder.class) -public final class CreateGuardianEnrollmentTicketResponseContent { - private final Optional ticketId; - - private final Optional ticketUrl; - - private final Map additionalProperties; - - private CreateGuardianEnrollmentTicketResponseContent( - Optional ticketId, Optional ticketUrl, Map additionalProperties) { - this.ticketId = ticketId; - this.ticketUrl = ticketUrl; - this.additionalProperties = additionalProperties; - } - - /** - * @return The ticket_id used to identify the enrollment - */ - @JsonProperty("ticket_id") - public Optional getTicketId() { - return ticketId; - } - - /** - * @return The url you can use to start enrollment - */ - @JsonProperty("ticket_url") - public Optional getTicketUrl() { - return ticketUrl; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateGuardianEnrollmentTicketResponseContent - && equalTo((CreateGuardianEnrollmentTicketResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateGuardianEnrollmentTicketResponseContent other) { - return ticketId.equals(other.ticketId) && ticketUrl.equals(other.ticketUrl); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.ticketId, this.ticketUrl); - } - - @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 ticketId = Optional.empty(); - - private Optional ticketUrl = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateGuardianEnrollmentTicketResponseContent other) { - ticketId(other.getTicketId()); - ticketUrl(other.getTicketUrl()); - return this; - } - - /** - *

The ticket_id used to identify the enrollment

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

The url you can use to start enrollment

- */ - @JsonSetter(value = "ticket_url", nulls = Nulls.SKIP) - public Builder ticketUrl(Optional ticketUrl) { - this.ticketUrl = ticketUrl; - return this; - } - - public Builder ticketUrl(String ticketUrl) { - this.ticketUrl = Optional.ofNullable(ticketUrl); - return this; - } - - public CreateGuardianEnrollmentTicketResponseContent build() { - return new CreateGuardianEnrollmentTicketResponseContent(ticketId, ticketUrl, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateHookRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateHookRequestContent.java deleted file mode 100644 index eec5dddb0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateHookRequestContent.java +++ /dev/null @@ -1,249 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateHookRequestContent.Builder.class) -public final class CreateHookRequestContent { - private final String name; - - private final String script; - - private final Optional enabled; - - private final Optional> dependencies; - - private final HookTriggerIdEnum triggerId; - - private final Map additionalProperties; - - private CreateHookRequestContent( - String name, - String script, - Optional enabled, - Optional> dependencies, - HookTriggerIdEnum triggerId, - Map additionalProperties) { - this.name = name; - this.script = script; - this.enabled = enabled; - this.dependencies = dependencies; - this.triggerId = triggerId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of this hook. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return Code to be executed when this hook runs. - */ - @JsonProperty("script") - public String getScript() { - return script; - } - - /** - * @return Whether this hook will be executed (true) or ignored (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - @JsonProperty("triggerId") - public HookTriggerIdEnum getTriggerId() { - return triggerId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateHookRequestContent && equalTo((CreateHookRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateHookRequestContent other) { - return name.equals(other.name) - && script.equals(other.script) - && enabled.equals(other.enabled) - && dependencies.equals(other.dependencies) - && triggerId.equals(other.triggerId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.script, this.enabled, this.dependencies, this.triggerId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Name of this hook.

- */ - ScriptStage name(@NotNull String name); - - Builder from(CreateHookRequestContent other); - } - - public interface ScriptStage { - /** - *

Code to be executed when this hook runs.

- */ - TriggerIdStage script(@NotNull String script); - } - - public interface TriggerIdStage { - _FinalStage triggerId(@NotNull HookTriggerIdEnum triggerId); - } - - public interface _FinalStage { - CreateHookRequestContent build(); - - /** - *

Whether this hook will be executed (true) or ignored (false).

- */ - _FinalStage enabled(Optional enabled); - - _FinalStage enabled(Boolean enabled); - - _FinalStage dependencies(Optional> dependencies); - - _FinalStage dependencies(Map dependencies); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, ScriptStage, TriggerIdStage, _FinalStage { - private String name; - - private String script; - - private HookTriggerIdEnum triggerId; - - private Optional> dependencies = Optional.empty(); - - private Optional enabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateHookRequestContent other) { - name(other.getName()); - script(other.getScript()); - enabled(other.getEnabled()); - dependencies(other.getDependencies()); - triggerId(other.getTriggerId()); - return this; - } - - /** - *

Name of this hook.

- *

Name of this hook.

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

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. - */ - @java.lang.Override - @JsonSetter("script") - public TriggerIdStage script(@NotNull String script) { - this.script = Objects.requireNonNull(script, "script must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("triggerId") - public _FinalStage triggerId(@NotNull HookTriggerIdEnum triggerId) { - this.triggerId = Objects.requireNonNull(triggerId, "triggerId must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage dependencies(Map dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - @java.lang.Override - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public _FinalStage dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - /** - *

Whether this hook will be executed (true) or ignored (false).

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

Whether this hook will be executed (true) or ignored (false).

- */ - @java.lang.Override - @JsonSetter(value = "enabled", nulls = Nulls.SKIP) - public _FinalStage enabled(Optional enabled) { - this.enabled = enabled; - return this; - } - - @java.lang.Override - public CreateHookRequestContent build() { - return new CreateHookRequestContent(name, script, enabled, dependencies, triggerId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateHookResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateHookResponseContent.java deleted file mode 100644 index b269591d6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateHookResponseContent.java +++ /dev/null @@ -1,248 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateHookResponseContent.Builder.class) -public final class CreateHookResponseContent { - private final Optional triggerId; - - private final Optional id; - - private final Optional name; - - private final Optional enabled; - - private final Optional script; - - private final Optional> dependencies; - - private final Map additionalProperties; - - private CreateHookResponseContent( - Optional triggerId, - Optional id, - Optional name, - Optional enabled, - Optional script, - Optional> dependencies, - Map additionalProperties) { - this.triggerId = triggerId; - this.id = id; - this.name = name; - this.enabled = enabled; - this.script = script; - this.dependencies = dependencies; - this.additionalProperties = additionalProperties; - } - - /** - * @return Trigger ID - */ - @JsonProperty("triggerId") - public Optional getTriggerId() { - return triggerId; - } - - /** - * @return ID of this hook. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Name of this hook. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Whether this hook will be executed (true) or ignored (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Code to be executed when this hook runs. - */ - @JsonProperty("script") - public Optional getScript() { - return script; - } - - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateHookResponseContent && equalTo((CreateHookResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateHookResponseContent other) { - return triggerId.equals(other.triggerId) - && id.equals(other.id) - && name.equals(other.name) - && enabled.equals(other.enabled) - && script.equals(other.script) - && dependencies.equals(other.dependencies); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.triggerId, this.id, this.name, this.enabled, this.script, this.dependencies); - } - - @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 triggerId = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional enabled = Optional.empty(); - - private Optional script = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateHookResponseContent other) { - triggerId(other.getTriggerId()); - id(other.getId()); - name(other.getName()); - enabled(other.getEnabled()); - script(other.getScript()); - dependencies(other.getDependencies()); - return this; - } - - /** - *

Trigger ID

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

ID of this hook.

- */ - @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; - } - - /** - *

Name of this hook.

- */ - @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 hook will be executed (true) or ignored (false).

- */ - @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; - } - - /** - *

Code to be executed when this hook runs.

- */ - @JsonSetter(value = "script", nulls = Nulls.SKIP) - public Builder script(Optional script) { - this.script = script; - return this; - } - - public Builder script(String script) { - this.script = Optional.ofNullable(script); - return this; - } - - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public Builder dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - public Builder dependencies(Map dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - public CreateHookResponseContent build() { - return new CreateHookResponseContent( - triggerId, id, name, enabled, script, dependencies, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateImportUsersResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateImportUsersResponseContent.java deleted file mode 100644 index f74fce543..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateImportUsersResponseContent.java +++ /dev/null @@ -1,302 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateImportUsersResponseContent.Builder.class) -public final class CreateImportUsersResponseContent { - private final String status; - - private final String type; - - private final String createdAt; - - private final String id; - - private final String connectionId; - - private final Optional externalId; - - private final Map additionalProperties; - - private CreateImportUsersResponseContent( - String status, - String type, - String createdAt, - String id, - String connectionId, - Optional externalId, - Map additionalProperties) { - this.status = status; - this.type = type; - this.createdAt = createdAt; - this.id = id; - this.connectionId = connectionId; - this.externalId = externalId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Status of this job. - */ - @JsonProperty("status") - public String getStatus() { - return status; - } - - /** - * @return Type of job this is. - */ - @JsonProperty("type") - public String getType() { - return type; - } - - /** - * @return When this job was created. - */ - @JsonProperty("created_at") - public String getCreatedAt() { - return createdAt; - } - - /** - * @return ID of this job. - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return connection_id of the connection to which users will be imported. - */ - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - /** - * @return Customer-defined ID. - */ - @JsonProperty("external_id") - public Optional getExternalId() { - return externalId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateImportUsersResponseContent && equalTo((CreateImportUsersResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateImportUsersResponseContent other) { - return status.equals(other.status) - && type.equals(other.type) - && createdAt.equals(other.createdAt) - && id.equals(other.id) - && connectionId.equals(other.connectionId) - && externalId.equals(other.externalId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.status, this.type, this.createdAt, this.id, this.connectionId, this.externalId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StatusStage builder() { - return new Builder(); - } - - public interface StatusStage { - /** - *

Status of this job.

- */ - TypeStage status(@NotNull String status); - - Builder from(CreateImportUsersResponseContent other); - } - - public interface TypeStage { - /** - *

Type of job this is.

- */ - CreatedAtStage type(@NotNull String type); - } - - public interface CreatedAtStage { - /** - *

When this job was created.

- */ - IdStage createdAt(@NotNull String createdAt); - } - - public interface IdStage { - /** - *

ID of this job.

- */ - ConnectionIdStage id(@NotNull String id); - } - - public interface ConnectionIdStage { - /** - *

connection_id of the connection to which users will be imported.

- */ - _FinalStage connectionId(@NotNull String connectionId); - } - - public interface _FinalStage { - CreateImportUsersResponseContent build(); - - /** - *

Customer-defined ID.

- */ - _FinalStage externalId(Optional externalId); - - _FinalStage externalId(String externalId); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements StatusStage, TypeStage, CreatedAtStage, IdStage, ConnectionIdStage, _FinalStage { - private String status; - - private String type; - - private String createdAt; - - private String id; - - private String connectionId; - - private Optional externalId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateImportUsersResponseContent other) { - status(other.getStatus()); - type(other.getType()); - createdAt(other.getCreatedAt()); - id(other.getId()); - connectionId(other.getConnectionId()); - externalId(other.getExternalId()); - return this; - } - - /** - *

Status of this job.

- *

Status of this job.

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

Type of job this is.

- *

Type of job this is.

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

When this job was created.

- *

When this job was created.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("created_at") - public IdStage createdAt(@NotNull String createdAt) { - this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); - return this; - } - - /** - *

ID of this job.

- *

ID of this job.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("id") - public ConnectionIdStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("connection_id") - public _FinalStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - /** - *

Customer-defined ID.

- * @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; - } - - /** - *

Customer-defined ID.

- */ - @java.lang.Override - @JsonSetter(value = "external_id", nulls = Nulls.SKIP) - public _FinalStage externalId(Optional externalId) { - this.externalId = externalId; - return this; - } - - @java.lang.Override - public CreateImportUsersResponseContent build() { - return new CreateImportUsersResponseContent( - status, type, createdAt, id, connectionId, externalId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamDatadogRequestBody.java b/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamDatadogRequestBody.java deleted file mode 100644 index c08e3d854..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamDatadogRequestBody.java +++ /dev/null @@ -1,335 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateLogStreamDatadogRequestBody.Builder.class) -public final class CreateLogStreamDatadogRequestBody { - private final Optional name; - - private final LogStreamDatadogEnum type; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final LogStreamDatadogSink sink; - - private final Optional startFrom; - - private final Map additionalProperties; - - private CreateLogStreamDatadogRequestBody( - Optional name, - LogStreamDatadogEnum type, - Optional isPriority, - Optional> filters, - Optional piiConfig, - LogStreamDatadogSink sink, - Optional startFrom, - Map additionalProperties) { - this.name = name; - this.type = type; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.startFrom = startFrom; - this.additionalProperties = additionalProperties; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("type") - public LogStreamDatadogEnum getType() { - return type; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public LogStreamDatadogSink getSink() { - return sink; - } - - /** - * @return The optional datetime (ISO 8601) to start streaming logs from - */ - @JsonProperty("startFrom") - public Optional getStartFrom() { - return startFrom; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateLogStreamDatadogRequestBody && equalTo((CreateLogStreamDatadogRequestBody) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateLogStreamDatadogRequestBody other) { - return name.equals(other.name) - && type.equals(other.type) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink) - && startFrom.equals(other.startFrom); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, this.type, this.isPriority, this.filters, this.piiConfig, this.sink, this.startFrom); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - SinkStage type(@NotNull LogStreamDatadogEnum type); - - Builder from(CreateLogStreamDatadogRequestBody other); - } - - public interface SinkStage { - _FinalStage sink(@NotNull LogStreamDatadogSink sink); - } - - public interface _FinalStage { - CreateLogStreamDatadogRequestBody build(); - - /** - *

log stream name

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

True for priority log streams, false for non-priority

- */ - _FinalStage isPriority(Optional isPriority); - - _FinalStage isPriority(Boolean isPriority); - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - _FinalStage filters(Optional> filters); - - _FinalStage filters(List filters); - - _FinalStage piiConfig(Optional piiConfig); - - _FinalStage piiConfig(LogStreamPiiConfig piiConfig); - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- */ - _FinalStage startFrom(Optional startFrom); - - _FinalStage startFrom(String startFrom); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, SinkStage, _FinalStage { - private LogStreamDatadogEnum type; - - private LogStreamDatadogSink sink; - - private Optional startFrom = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateLogStreamDatadogRequestBody other) { - name(other.getName()); - type(other.getType()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - startFrom(other.getStartFrom()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public SinkStage type(@NotNull LogStreamDatadogEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("sink") - public _FinalStage sink(@NotNull LogStreamDatadogSink sink) { - this.sink = Objects.requireNonNull(sink, "sink must not be null"); - return this; - } - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage startFrom(String startFrom) { - this.startFrom = Optional.ofNullable(startFrom); - return this; - } - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- */ - @java.lang.Override - @JsonSetter(value = "startFrom", nulls = Nulls.SKIP) - public _FinalStage startFrom(Optional startFrom) { - this.startFrom = startFrom; - return this; - } - - @java.lang.Override - public _FinalStage piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @java.lang.Override - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public _FinalStage piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @java.lang.Override - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public _FinalStage filters(Optional> filters) { - this.filters = filters; - return this; - } - - /** - *

True for priority log streams, false for non-priority

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @java.lang.Override - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public _FinalStage isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - /** - *

log stream 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; - } - - /** - *

log stream name

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateLogStreamDatadogRequestBody build() { - return new CreateLogStreamDatadogRequestBody( - name, type, isPriority, filters, piiConfig, sink, startFrom, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamEventBridgeRequestBody.java b/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamEventBridgeRequestBody.java deleted file mode 100644 index bfd39794c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamEventBridgeRequestBody.java +++ /dev/null @@ -1,336 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateLogStreamEventBridgeRequestBody.Builder.class) -public final class CreateLogStreamEventBridgeRequestBody { - private final Optional name; - - private final LogStreamEventBridgeEnum type; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final LogStreamEventBridgeSink sink; - - private final Optional startFrom; - - private final Map additionalProperties; - - private CreateLogStreamEventBridgeRequestBody( - Optional name, - LogStreamEventBridgeEnum type, - Optional isPriority, - Optional> filters, - Optional piiConfig, - LogStreamEventBridgeSink sink, - Optional startFrom, - Map additionalProperties) { - this.name = name; - this.type = type; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.startFrom = startFrom; - this.additionalProperties = additionalProperties; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("type") - public LogStreamEventBridgeEnum getType() { - return type; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public LogStreamEventBridgeSink getSink() { - return sink; - } - - /** - * @return The optional datetime (ISO 8601) to start streaming logs from - */ - @JsonProperty("startFrom") - public Optional getStartFrom() { - return startFrom; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateLogStreamEventBridgeRequestBody - && equalTo((CreateLogStreamEventBridgeRequestBody) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateLogStreamEventBridgeRequestBody other) { - return name.equals(other.name) - && type.equals(other.type) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink) - && startFrom.equals(other.startFrom); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, this.type, this.isPriority, this.filters, this.piiConfig, this.sink, this.startFrom); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - SinkStage type(@NotNull LogStreamEventBridgeEnum type); - - Builder from(CreateLogStreamEventBridgeRequestBody other); - } - - public interface SinkStage { - _FinalStage sink(@NotNull LogStreamEventBridgeSink sink); - } - - public interface _FinalStage { - CreateLogStreamEventBridgeRequestBody build(); - - /** - *

log stream name

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

True for priority log streams, false for non-priority

- */ - _FinalStage isPriority(Optional isPriority); - - _FinalStage isPriority(Boolean isPriority); - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - _FinalStage filters(Optional> filters); - - _FinalStage filters(List filters); - - _FinalStage piiConfig(Optional piiConfig); - - _FinalStage piiConfig(LogStreamPiiConfig piiConfig); - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- */ - _FinalStage startFrom(Optional startFrom); - - _FinalStage startFrom(String startFrom); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, SinkStage, _FinalStage { - private LogStreamEventBridgeEnum type; - - private LogStreamEventBridgeSink sink; - - private Optional startFrom = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateLogStreamEventBridgeRequestBody other) { - name(other.getName()); - type(other.getType()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - startFrom(other.getStartFrom()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public SinkStage type(@NotNull LogStreamEventBridgeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("sink") - public _FinalStage sink(@NotNull LogStreamEventBridgeSink sink) { - this.sink = Objects.requireNonNull(sink, "sink must not be null"); - return this; - } - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage startFrom(String startFrom) { - this.startFrom = Optional.ofNullable(startFrom); - return this; - } - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- */ - @java.lang.Override - @JsonSetter(value = "startFrom", nulls = Nulls.SKIP) - public _FinalStage startFrom(Optional startFrom) { - this.startFrom = startFrom; - return this; - } - - @java.lang.Override - public _FinalStage piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @java.lang.Override - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public _FinalStage piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @java.lang.Override - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public _FinalStage filters(Optional> filters) { - this.filters = filters; - return this; - } - - /** - *

True for priority log streams, false for non-priority

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @java.lang.Override - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public _FinalStage isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - /** - *

log stream 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; - } - - /** - *

log stream name

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateLogStreamEventBridgeRequestBody build() { - return new CreateLogStreamEventBridgeRequestBody( - name, type, isPriority, filters, piiConfig, sink, startFrom, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamEventGridRequestBody.java b/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamEventGridRequestBody.java deleted file mode 100644 index 14a4ec8d4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamEventGridRequestBody.java +++ /dev/null @@ -1,336 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateLogStreamEventGridRequestBody.Builder.class) -public final class CreateLogStreamEventGridRequestBody { - private final Optional name; - - private final LogStreamEventGridEnum type; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final LogStreamEventGridSink sink; - - private final Optional startFrom; - - private final Map additionalProperties; - - private CreateLogStreamEventGridRequestBody( - Optional name, - LogStreamEventGridEnum type, - Optional isPriority, - Optional> filters, - Optional piiConfig, - LogStreamEventGridSink sink, - Optional startFrom, - Map additionalProperties) { - this.name = name; - this.type = type; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.startFrom = startFrom; - this.additionalProperties = additionalProperties; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("type") - public LogStreamEventGridEnum getType() { - return type; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public LogStreamEventGridSink getSink() { - return sink; - } - - /** - * @return The optional datetime (ISO 8601) to start streaming logs from - */ - @JsonProperty("startFrom") - public Optional getStartFrom() { - return startFrom; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateLogStreamEventGridRequestBody - && equalTo((CreateLogStreamEventGridRequestBody) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateLogStreamEventGridRequestBody other) { - return name.equals(other.name) - && type.equals(other.type) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink) - && startFrom.equals(other.startFrom); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, this.type, this.isPriority, this.filters, this.piiConfig, this.sink, this.startFrom); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - SinkStage type(@NotNull LogStreamEventGridEnum type); - - Builder from(CreateLogStreamEventGridRequestBody other); - } - - public interface SinkStage { - _FinalStage sink(@NotNull LogStreamEventGridSink sink); - } - - public interface _FinalStage { - CreateLogStreamEventGridRequestBody build(); - - /** - *

log stream name

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

True for priority log streams, false for non-priority

- */ - _FinalStage isPriority(Optional isPriority); - - _FinalStage isPriority(Boolean isPriority); - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - _FinalStage filters(Optional> filters); - - _FinalStage filters(List filters); - - _FinalStage piiConfig(Optional piiConfig); - - _FinalStage piiConfig(LogStreamPiiConfig piiConfig); - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- */ - _FinalStage startFrom(Optional startFrom); - - _FinalStage startFrom(String startFrom); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, SinkStage, _FinalStage { - private LogStreamEventGridEnum type; - - private LogStreamEventGridSink sink; - - private Optional startFrom = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateLogStreamEventGridRequestBody other) { - name(other.getName()); - type(other.getType()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - startFrom(other.getStartFrom()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public SinkStage type(@NotNull LogStreamEventGridEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("sink") - public _FinalStage sink(@NotNull LogStreamEventGridSink sink) { - this.sink = Objects.requireNonNull(sink, "sink must not be null"); - return this; - } - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage startFrom(String startFrom) { - this.startFrom = Optional.ofNullable(startFrom); - return this; - } - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- */ - @java.lang.Override - @JsonSetter(value = "startFrom", nulls = Nulls.SKIP) - public _FinalStage startFrom(Optional startFrom) { - this.startFrom = startFrom; - return this; - } - - @java.lang.Override - public _FinalStage piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @java.lang.Override - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public _FinalStage piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @java.lang.Override - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public _FinalStage filters(Optional> filters) { - this.filters = filters; - return this; - } - - /** - *

True for priority log streams, false for non-priority

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @java.lang.Override - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public _FinalStage isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - /** - *

log stream 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; - } - - /** - *

log stream name

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateLogStreamEventGridRequestBody build() { - return new CreateLogStreamEventGridRequestBody( - name, type, isPriority, filters, piiConfig, sink, startFrom, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamHttpRequestBody.java b/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamHttpRequestBody.java deleted file mode 100644 index 9b5ada744..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamHttpRequestBody.java +++ /dev/null @@ -1,335 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateLogStreamHttpRequestBody.Builder.class) -public final class CreateLogStreamHttpRequestBody { - private final Optional name; - - private final LogStreamHttpEnum type; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final LogStreamHttpSink sink; - - private final Optional startFrom; - - private final Map additionalProperties; - - private CreateLogStreamHttpRequestBody( - Optional name, - LogStreamHttpEnum type, - Optional isPriority, - Optional> filters, - Optional piiConfig, - LogStreamHttpSink sink, - Optional startFrom, - Map additionalProperties) { - this.name = name; - this.type = type; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.startFrom = startFrom; - this.additionalProperties = additionalProperties; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("type") - public LogStreamHttpEnum getType() { - return type; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public LogStreamHttpSink getSink() { - return sink; - } - - /** - * @return The optional datetime (ISO 8601) to start streaming logs from - */ - @JsonProperty("startFrom") - public Optional getStartFrom() { - return startFrom; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateLogStreamHttpRequestBody && equalTo((CreateLogStreamHttpRequestBody) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateLogStreamHttpRequestBody other) { - return name.equals(other.name) - && type.equals(other.type) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink) - && startFrom.equals(other.startFrom); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, this.type, this.isPriority, this.filters, this.piiConfig, this.sink, this.startFrom); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - SinkStage type(@NotNull LogStreamHttpEnum type); - - Builder from(CreateLogStreamHttpRequestBody other); - } - - public interface SinkStage { - _FinalStage sink(@NotNull LogStreamHttpSink sink); - } - - public interface _FinalStage { - CreateLogStreamHttpRequestBody build(); - - /** - *

log stream name

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

True for priority log streams, false for non-priority

- */ - _FinalStage isPriority(Optional isPriority); - - _FinalStage isPriority(Boolean isPriority); - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - _FinalStage filters(Optional> filters); - - _FinalStage filters(List filters); - - _FinalStage piiConfig(Optional piiConfig); - - _FinalStage piiConfig(LogStreamPiiConfig piiConfig); - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- */ - _FinalStage startFrom(Optional startFrom); - - _FinalStage startFrom(String startFrom); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, SinkStage, _FinalStage { - private LogStreamHttpEnum type; - - private LogStreamHttpSink sink; - - private Optional startFrom = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateLogStreamHttpRequestBody other) { - name(other.getName()); - type(other.getType()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - startFrom(other.getStartFrom()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public SinkStage type(@NotNull LogStreamHttpEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("sink") - public _FinalStage sink(@NotNull LogStreamHttpSink sink) { - this.sink = Objects.requireNonNull(sink, "sink must not be null"); - return this; - } - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage startFrom(String startFrom) { - this.startFrom = Optional.ofNullable(startFrom); - return this; - } - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- */ - @java.lang.Override - @JsonSetter(value = "startFrom", nulls = Nulls.SKIP) - public _FinalStage startFrom(Optional startFrom) { - this.startFrom = startFrom; - return this; - } - - @java.lang.Override - public _FinalStage piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @java.lang.Override - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public _FinalStage piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @java.lang.Override - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public _FinalStage filters(Optional> filters) { - this.filters = filters; - return this; - } - - /** - *

True for priority log streams, false for non-priority

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @java.lang.Override - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public _FinalStage isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - /** - *

log stream 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; - } - - /** - *

log stream name

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateLogStreamHttpRequestBody build() { - return new CreateLogStreamHttpRequestBody( - name, type, isPriority, filters, piiConfig, sink, startFrom, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamMixpanelRequestBody.java b/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamMixpanelRequestBody.java deleted file mode 100644 index 81950fe00..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamMixpanelRequestBody.java +++ /dev/null @@ -1,336 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateLogStreamMixpanelRequestBody.Builder.class) -public final class CreateLogStreamMixpanelRequestBody { - private final Optional name; - - private final LogStreamMixpanelEnum type; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final LogStreamMixpanelSink sink; - - private final Optional startFrom; - - private final Map additionalProperties; - - private CreateLogStreamMixpanelRequestBody( - Optional name, - LogStreamMixpanelEnum type, - Optional isPriority, - Optional> filters, - Optional piiConfig, - LogStreamMixpanelSink sink, - Optional startFrom, - Map additionalProperties) { - this.name = name; - this.type = type; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.startFrom = startFrom; - this.additionalProperties = additionalProperties; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("type") - public LogStreamMixpanelEnum getType() { - return type; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public LogStreamMixpanelSink getSink() { - return sink; - } - - /** - * @return The optional datetime (ISO 8601) to start streaming logs from - */ - @JsonProperty("startFrom") - public Optional getStartFrom() { - return startFrom; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateLogStreamMixpanelRequestBody - && equalTo((CreateLogStreamMixpanelRequestBody) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateLogStreamMixpanelRequestBody other) { - return name.equals(other.name) - && type.equals(other.type) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink) - && startFrom.equals(other.startFrom); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, this.type, this.isPriority, this.filters, this.piiConfig, this.sink, this.startFrom); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - SinkStage type(@NotNull LogStreamMixpanelEnum type); - - Builder from(CreateLogStreamMixpanelRequestBody other); - } - - public interface SinkStage { - _FinalStage sink(@NotNull LogStreamMixpanelSink sink); - } - - public interface _FinalStage { - CreateLogStreamMixpanelRequestBody build(); - - /** - *

log stream name

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

True for priority log streams, false for non-priority

- */ - _FinalStage isPriority(Optional isPriority); - - _FinalStage isPriority(Boolean isPriority); - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - _FinalStage filters(Optional> filters); - - _FinalStage filters(List filters); - - _FinalStage piiConfig(Optional piiConfig); - - _FinalStage piiConfig(LogStreamPiiConfig piiConfig); - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- */ - _FinalStage startFrom(Optional startFrom); - - _FinalStage startFrom(String startFrom); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, SinkStage, _FinalStage { - private LogStreamMixpanelEnum type; - - private LogStreamMixpanelSink sink; - - private Optional startFrom = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateLogStreamMixpanelRequestBody other) { - name(other.getName()); - type(other.getType()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - startFrom(other.getStartFrom()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public SinkStage type(@NotNull LogStreamMixpanelEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("sink") - public _FinalStage sink(@NotNull LogStreamMixpanelSink sink) { - this.sink = Objects.requireNonNull(sink, "sink must not be null"); - return this; - } - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage startFrom(String startFrom) { - this.startFrom = Optional.ofNullable(startFrom); - return this; - } - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- */ - @java.lang.Override - @JsonSetter(value = "startFrom", nulls = Nulls.SKIP) - public _FinalStage startFrom(Optional startFrom) { - this.startFrom = startFrom; - return this; - } - - @java.lang.Override - public _FinalStage piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @java.lang.Override - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public _FinalStage piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @java.lang.Override - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public _FinalStage filters(Optional> filters) { - this.filters = filters; - return this; - } - - /** - *

True for priority log streams, false for non-priority

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @java.lang.Override - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public _FinalStage isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - /** - *

log stream 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; - } - - /** - *

log stream name

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateLogStreamMixpanelRequestBody build() { - return new CreateLogStreamMixpanelRequestBody( - name, type, isPriority, filters, piiConfig, sink, startFrom, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamRequestContent.java deleted file mode 100644 index 00e507c5d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamRequestContent.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateLogStreamRequestContent.Deserializer.class) -public final class CreateLogStreamRequestContent { - private final Object value; - - private final int type; - - private CreateLogStreamRequestContent(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((CreateLogStreamHttpRequestBody) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateLogStreamEventBridgeRequestBody) this.value); - } else if (this.type == 2) { - return visitor.visit((CreateLogStreamEventGridRequestBody) this.value); - } else if (this.type == 3) { - return visitor.visit((CreateLogStreamDatadogRequestBody) this.value); - } else if (this.type == 4) { - return visitor.visit((CreateLogStreamSplunkRequestBody) this.value); - } else if (this.type == 5) { - return visitor.visit((CreateLogStreamSumoRequestBody) this.value); - } else if (this.type == 6) { - return visitor.visit((CreateLogStreamSegmentRequestBody) this.value); - } else if (this.type == 7) { - return visitor.visit((CreateLogStreamMixpanelRequestBody) 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 CreateLogStreamRequestContent && equalTo((CreateLogStreamRequestContent) other); - } - - private boolean equalTo(CreateLogStreamRequestContent 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 CreateLogStreamRequestContent of(CreateLogStreamHttpRequestBody value) { - return new CreateLogStreamRequestContent(value, 0); - } - - public static CreateLogStreamRequestContent of(CreateLogStreamEventBridgeRequestBody value) { - return new CreateLogStreamRequestContent(value, 1); - } - - public static CreateLogStreamRequestContent of(CreateLogStreamEventGridRequestBody value) { - return new CreateLogStreamRequestContent(value, 2); - } - - public static CreateLogStreamRequestContent of(CreateLogStreamDatadogRequestBody value) { - return new CreateLogStreamRequestContent(value, 3); - } - - public static CreateLogStreamRequestContent of(CreateLogStreamSplunkRequestBody value) { - return new CreateLogStreamRequestContent(value, 4); - } - - public static CreateLogStreamRequestContent of(CreateLogStreamSumoRequestBody value) { - return new CreateLogStreamRequestContent(value, 5); - } - - public static CreateLogStreamRequestContent of(CreateLogStreamSegmentRequestBody value) { - return new CreateLogStreamRequestContent(value, 6); - } - - public static CreateLogStreamRequestContent of(CreateLogStreamMixpanelRequestBody value) { - return new CreateLogStreamRequestContent(value, 7); - } - - public interface Visitor { - T visit(CreateLogStreamHttpRequestBody value); - - T visit(CreateLogStreamEventBridgeRequestBody value); - - T visit(CreateLogStreamEventGridRequestBody value); - - T visit(CreateLogStreamDatadogRequestBody value); - - T visit(CreateLogStreamSplunkRequestBody value); - - T visit(CreateLogStreamSumoRequestBody value); - - T visit(CreateLogStreamSegmentRequestBody value); - - T visit(CreateLogStreamMixpanelRequestBody value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateLogStreamRequestContent.class); - } - - @java.lang.Override - public CreateLogStreamRequestContent deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamHttpRequestBody.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamEventBridgeRequestBody.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamEventGridRequestBody.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamDatadogRequestBody.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamSplunkRequestBody.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamSumoRequestBody.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamSegmentRequestBody.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateLogStreamMixpanelRequestBody.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamResponseContent.java deleted file mode 100644 index 6dfc8c398..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamResponseContent.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = CreateLogStreamResponseContent.Deserializer.class) -public final class CreateLogStreamResponseContent { - private final Object value; - - private final int type; - - private CreateLogStreamResponseContent(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((LogStreamHttpResponseSchema) this.value); - } else if (this.type == 1) { - return visitor.visit((LogStreamEventBridgeResponseSchema) this.value); - } else if (this.type == 2) { - return visitor.visit((LogStreamEventGridResponseSchema) this.value); - } else if (this.type == 3) { - return visitor.visit((LogStreamDatadogResponseSchema) this.value); - } else if (this.type == 4) { - return visitor.visit((LogStreamSplunkResponseSchema) this.value); - } else if (this.type == 5) { - return visitor.visit((LogStreamSumoResponseSchema) this.value); - } else if (this.type == 6) { - return visitor.visit((LogStreamSegmentResponseSchema) this.value); - } else if (this.type == 7) { - return visitor.visit((LogStreamMixpanelResponseSchema) 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 CreateLogStreamResponseContent && equalTo((CreateLogStreamResponseContent) other); - } - - private boolean equalTo(CreateLogStreamResponseContent 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 CreateLogStreamResponseContent of(LogStreamHttpResponseSchema value) { - return new CreateLogStreamResponseContent(value, 0); - } - - public static CreateLogStreamResponseContent of(LogStreamEventBridgeResponseSchema value) { - return new CreateLogStreamResponseContent(value, 1); - } - - public static CreateLogStreamResponseContent of(LogStreamEventGridResponseSchema value) { - return new CreateLogStreamResponseContent(value, 2); - } - - public static CreateLogStreamResponseContent of(LogStreamDatadogResponseSchema value) { - return new CreateLogStreamResponseContent(value, 3); - } - - public static CreateLogStreamResponseContent of(LogStreamSplunkResponseSchema value) { - return new CreateLogStreamResponseContent(value, 4); - } - - public static CreateLogStreamResponseContent of(LogStreamSumoResponseSchema value) { - return new CreateLogStreamResponseContent(value, 5); - } - - public static CreateLogStreamResponseContent of(LogStreamSegmentResponseSchema value) { - return new CreateLogStreamResponseContent(value, 6); - } - - public static CreateLogStreamResponseContent of(LogStreamMixpanelResponseSchema value) { - return new CreateLogStreamResponseContent(value, 7); - } - - public interface Visitor { - T visit(LogStreamHttpResponseSchema value); - - T visit(LogStreamEventBridgeResponseSchema value); - - T visit(LogStreamEventGridResponseSchema value); - - T visit(LogStreamDatadogResponseSchema value); - - T visit(LogStreamSplunkResponseSchema value); - - T visit(LogStreamSumoResponseSchema value); - - T visit(LogStreamSegmentResponseSchema value); - - T visit(LogStreamMixpanelResponseSchema value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(CreateLogStreamResponseContent.class); - } - - @java.lang.Override - public CreateLogStreamResponseContent deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamHttpResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamEventBridgeResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamEventGridResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamDatadogResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSplunkResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSumoResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSegmentResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamMixpanelResponseSchema.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamSegmentRequestBody.java b/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamSegmentRequestBody.java deleted file mode 100644 index 89db85ccd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamSegmentRequestBody.java +++ /dev/null @@ -1,335 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateLogStreamSegmentRequestBody.Builder.class) -public final class CreateLogStreamSegmentRequestBody { - private final Optional name; - - private final LogStreamSegmentEnum type; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final LogStreamSegmentSinkWriteKey sink; - - private final Optional startFrom; - - private final Map additionalProperties; - - private CreateLogStreamSegmentRequestBody( - Optional name, - LogStreamSegmentEnum type, - Optional isPriority, - Optional> filters, - Optional piiConfig, - LogStreamSegmentSinkWriteKey sink, - Optional startFrom, - Map additionalProperties) { - this.name = name; - this.type = type; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.startFrom = startFrom; - this.additionalProperties = additionalProperties; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("type") - public LogStreamSegmentEnum getType() { - return type; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public LogStreamSegmentSinkWriteKey getSink() { - return sink; - } - - /** - * @return The optional datetime (ISO 8601) to start streaming logs from - */ - @JsonProperty("startFrom") - public Optional getStartFrom() { - return startFrom; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateLogStreamSegmentRequestBody && equalTo((CreateLogStreamSegmentRequestBody) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateLogStreamSegmentRequestBody other) { - return name.equals(other.name) - && type.equals(other.type) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink) - && startFrom.equals(other.startFrom); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, this.type, this.isPriority, this.filters, this.piiConfig, this.sink, this.startFrom); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - SinkStage type(@NotNull LogStreamSegmentEnum type); - - Builder from(CreateLogStreamSegmentRequestBody other); - } - - public interface SinkStage { - _FinalStage sink(@NotNull LogStreamSegmentSinkWriteKey sink); - } - - public interface _FinalStage { - CreateLogStreamSegmentRequestBody build(); - - /** - *

log stream name

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

True for priority log streams, false for non-priority

- */ - _FinalStage isPriority(Optional isPriority); - - _FinalStage isPriority(Boolean isPriority); - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - _FinalStage filters(Optional> filters); - - _FinalStage filters(List filters); - - _FinalStage piiConfig(Optional piiConfig); - - _FinalStage piiConfig(LogStreamPiiConfig piiConfig); - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- */ - _FinalStage startFrom(Optional startFrom); - - _FinalStage startFrom(String startFrom); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, SinkStage, _FinalStage { - private LogStreamSegmentEnum type; - - private LogStreamSegmentSinkWriteKey sink; - - private Optional startFrom = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateLogStreamSegmentRequestBody other) { - name(other.getName()); - type(other.getType()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - startFrom(other.getStartFrom()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public SinkStage type(@NotNull LogStreamSegmentEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("sink") - public _FinalStage sink(@NotNull LogStreamSegmentSinkWriteKey sink) { - this.sink = Objects.requireNonNull(sink, "sink must not be null"); - return this; - } - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage startFrom(String startFrom) { - this.startFrom = Optional.ofNullable(startFrom); - return this; - } - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- */ - @java.lang.Override - @JsonSetter(value = "startFrom", nulls = Nulls.SKIP) - public _FinalStage startFrom(Optional startFrom) { - this.startFrom = startFrom; - return this; - } - - @java.lang.Override - public _FinalStage piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @java.lang.Override - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public _FinalStage piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @java.lang.Override - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public _FinalStage filters(Optional> filters) { - this.filters = filters; - return this; - } - - /** - *

True for priority log streams, false for non-priority

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @java.lang.Override - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public _FinalStage isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - /** - *

log stream 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; - } - - /** - *

log stream name

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateLogStreamSegmentRequestBody build() { - return new CreateLogStreamSegmentRequestBody( - name, type, isPriority, filters, piiConfig, sink, startFrom, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamSplunkRequestBody.java b/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamSplunkRequestBody.java deleted file mode 100644 index 047680651..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamSplunkRequestBody.java +++ /dev/null @@ -1,335 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateLogStreamSplunkRequestBody.Builder.class) -public final class CreateLogStreamSplunkRequestBody { - private final Optional name; - - private final LogStreamSplunkEnum type; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final LogStreamSplunkSink sink; - - private final Optional startFrom; - - private final Map additionalProperties; - - private CreateLogStreamSplunkRequestBody( - Optional name, - LogStreamSplunkEnum type, - Optional isPriority, - Optional> filters, - Optional piiConfig, - LogStreamSplunkSink sink, - Optional startFrom, - Map additionalProperties) { - this.name = name; - this.type = type; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.startFrom = startFrom; - this.additionalProperties = additionalProperties; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("type") - public LogStreamSplunkEnum getType() { - return type; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public LogStreamSplunkSink getSink() { - return sink; - } - - /** - * @return The optional datetime (ISO 8601) to start streaming logs from - */ - @JsonProperty("startFrom") - public Optional getStartFrom() { - return startFrom; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateLogStreamSplunkRequestBody && equalTo((CreateLogStreamSplunkRequestBody) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateLogStreamSplunkRequestBody other) { - return name.equals(other.name) - && type.equals(other.type) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink) - && startFrom.equals(other.startFrom); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, this.type, this.isPriority, this.filters, this.piiConfig, this.sink, this.startFrom); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - SinkStage type(@NotNull LogStreamSplunkEnum type); - - Builder from(CreateLogStreamSplunkRequestBody other); - } - - public interface SinkStage { - _FinalStage sink(@NotNull LogStreamSplunkSink sink); - } - - public interface _FinalStage { - CreateLogStreamSplunkRequestBody build(); - - /** - *

log stream name

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

True for priority log streams, false for non-priority

- */ - _FinalStage isPriority(Optional isPriority); - - _FinalStage isPriority(Boolean isPriority); - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - _FinalStage filters(Optional> filters); - - _FinalStage filters(List filters); - - _FinalStage piiConfig(Optional piiConfig); - - _FinalStage piiConfig(LogStreamPiiConfig piiConfig); - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- */ - _FinalStage startFrom(Optional startFrom); - - _FinalStage startFrom(String startFrom); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, SinkStage, _FinalStage { - private LogStreamSplunkEnum type; - - private LogStreamSplunkSink sink; - - private Optional startFrom = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateLogStreamSplunkRequestBody other) { - name(other.getName()); - type(other.getType()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - startFrom(other.getStartFrom()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public SinkStage type(@NotNull LogStreamSplunkEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("sink") - public _FinalStage sink(@NotNull LogStreamSplunkSink sink) { - this.sink = Objects.requireNonNull(sink, "sink must not be null"); - return this; - } - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage startFrom(String startFrom) { - this.startFrom = Optional.ofNullable(startFrom); - return this; - } - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- */ - @java.lang.Override - @JsonSetter(value = "startFrom", nulls = Nulls.SKIP) - public _FinalStage startFrom(Optional startFrom) { - this.startFrom = startFrom; - return this; - } - - @java.lang.Override - public _FinalStage piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @java.lang.Override - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public _FinalStage piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @java.lang.Override - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public _FinalStage filters(Optional> filters) { - this.filters = filters; - return this; - } - - /** - *

True for priority log streams, false for non-priority

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @java.lang.Override - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public _FinalStage isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - /** - *

log stream 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; - } - - /** - *

log stream name

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateLogStreamSplunkRequestBody build() { - return new CreateLogStreamSplunkRequestBody( - name, type, isPriority, filters, piiConfig, sink, startFrom, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamSumoRequestBody.java b/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamSumoRequestBody.java deleted file mode 100644 index 4cac7ed6f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateLogStreamSumoRequestBody.java +++ /dev/null @@ -1,335 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateLogStreamSumoRequestBody.Builder.class) -public final class CreateLogStreamSumoRequestBody { - private final Optional name; - - private final LogStreamSumoEnum type; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final LogStreamSumoSink sink; - - private final Optional startFrom; - - private final Map additionalProperties; - - private CreateLogStreamSumoRequestBody( - Optional name, - LogStreamSumoEnum type, - Optional isPriority, - Optional> filters, - Optional piiConfig, - LogStreamSumoSink sink, - Optional startFrom, - Map additionalProperties) { - this.name = name; - this.type = type; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.startFrom = startFrom; - this.additionalProperties = additionalProperties; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("type") - public LogStreamSumoEnum getType() { - return type; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public LogStreamSumoSink getSink() { - return sink; - } - - /** - * @return The optional datetime (ISO 8601) to start streaming logs from - */ - @JsonProperty("startFrom") - public Optional getStartFrom() { - return startFrom; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateLogStreamSumoRequestBody && equalTo((CreateLogStreamSumoRequestBody) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateLogStreamSumoRequestBody other) { - return name.equals(other.name) - && type.equals(other.type) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink) - && startFrom.equals(other.startFrom); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, this.type, this.isPriority, this.filters, this.piiConfig, this.sink, this.startFrom); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - SinkStage type(@NotNull LogStreamSumoEnum type); - - Builder from(CreateLogStreamSumoRequestBody other); - } - - public interface SinkStage { - _FinalStage sink(@NotNull LogStreamSumoSink sink); - } - - public interface _FinalStage { - CreateLogStreamSumoRequestBody build(); - - /** - *

log stream name

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

True for priority log streams, false for non-priority

- */ - _FinalStage isPriority(Optional isPriority); - - _FinalStage isPriority(Boolean isPriority); - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - _FinalStage filters(Optional> filters); - - _FinalStage filters(List filters); - - _FinalStage piiConfig(Optional piiConfig); - - _FinalStage piiConfig(LogStreamPiiConfig piiConfig); - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- */ - _FinalStage startFrom(Optional startFrom); - - _FinalStage startFrom(String startFrom); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, SinkStage, _FinalStage { - private LogStreamSumoEnum type; - - private LogStreamSumoSink sink; - - private Optional startFrom = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateLogStreamSumoRequestBody other) { - name(other.getName()); - type(other.getType()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - startFrom(other.getStartFrom()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public SinkStage type(@NotNull LogStreamSumoEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("sink") - public _FinalStage sink(@NotNull LogStreamSumoSink sink) { - this.sink = Objects.requireNonNull(sink, "sink must not be null"); - return this; - } - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage startFrom(String startFrom) { - this.startFrom = Optional.ofNullable(startFrom); - return this; - } - - /** - *

The optional datetime (ISO 8601) to start streaming logs from

- */ - @java.lang.Override - @JsonSetter(value = "startFrom", nulls = Nulls.SKIP) - public _FinalStage startFrom(Optional startFrom) { - this.startFrom = startFrom; - return this; - } - - @java.lang.Override - public _FinalStage piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @java.lang.Override - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public _FinalStage piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @java.lang.Override - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public _FinalStage filters(Optional> filters) { - this.filters = filters; - return this; - } - - /** - *

True for priority log streams, false for non-priority

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @java.lang.Override - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public _FinalStage isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - /** - *

log stream 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; - } - - /** - *

log stream name

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateLogStreamSumoRequestBody build() { - return new CreateLogStreamSumoRequestBody( - name, type, isPriority, filters, piiConfig, sink, startFrom, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateNetworkAclRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateNetworkAclRequestContent.java deleted file mode 100644 index 992ec4de3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateNetworkAclRequestContent.java +++ /dev/null @@ -1,198 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateNetworkAclRequestContent.Builder.class) -public final class CreateNetworkAclRequestContent { - private final String description; - - private final boolean active; - - private final double priority; - - private final NetworkAclRule rule; - - private final Map additionalProperties; - - private CreateNetworkAclRequestContent( - String description, - boolean active, - double priority, - NetworkAclRule rule, - Map additionalProperties) { - this.description = description; - this.active = active; - this.priority = priority; - this.rule = rule; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("description") - public String getDescription() { - return description; - } - - /** - * @return Indicates whether or not this access control list is actively being used - */ - @JsonProperty("active") - public boolean getActive() { - return active; - } - - /** - * @return Indicates the order in which the ACL will be evaluated relative to other ACL rules. - */ - @JsonProperty("priority") - public double getPriority() { - return priority; - } - - @JsonProperty("rule") - public NetworkAclRule getRule() { - return rule; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateNetworkAclRequestContent && equalTo((CreateNetworkAclRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateNetworkAclRequestContent other) { - return description.equals(other.description) - && active == other.active - && priority == other.priority - && rule.equals(other.rule); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.description, this.active, this.priority, this.rule); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static DescriptionStage builder() { - return new Builder(); - } - - public interface DescriptionStage { - ActiveStage description(@NotNull String description); - - Builder from(CreateNetworkAclRequestContent other); - } - - public interface ActiveStage { - /** - *

Indicates whether or not this access control list is actively being used

- */ - PriorityStage active(boolean active); - } - - public interface PriorityStage { - /** - *

Indicates the order in which the ACL will be evaluated relative to other ACL rules.

- */ - RuleStage priority(double priority); - } - - public interface RuleStage { - _FinalStage rule(@NotNull NetworkAclRule rule); - } - - public interface _FinalStage { - CreateNetworkAclRequestContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements DescriptionStage, ActiveStage, PriorityStage, RuleStage, _FinalStage { - private String description; - - private boolean active; - - private double priority; - - private NetworkAclRule rule; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateNetworkAclRequestContent other) { - description(other.getDescription()); - active(other.getActive()); - priority(other.getPriority()); - rule(other.getRule()); - return this; - } - - @java.lang.Override - @JsonSetter("description") - public ActiveStage description(@NotNull String description) { - this.description = Objects.requireNonNull(description, "description must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("active") - public PriorityStage active(boolean active) { - this.active = active; - return this; - } - - /** - *

Indicates the order in which the ACL will be evaluated relative to other ACL rules.

- *

Indicates the order in which the ACL will be evaluated relative to other ACL rules.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("priority") - public RuleStage priority(double priority) { - this.priority = priority; - return this; - } - - @java.lang.Override - @JsonSetter("rule") - public _FinalStage rule(@NotNull NetworkAclRule rule) { - this.rule = Objects.requireNonNull(rule, "rule must not be null"); - return this; - } - - @java.lang.Override - public CreateNetworkAclRequestContent build() { - return new CreateNetworkAclRequestContent(description, active, priority, rule, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationDiscoveryDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationDiscoveryDomainResponseContent.java deleted file mode 100644 index 4802b453a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationDiscoveryDomainResponseContent.java +++ /dev/null @@ -1,304 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateOrganizationDiscoveryDomainResponseContent.Builder.class) -public final class CreateOrganizationDiscoveryDomainResponseContent { - private final String id; - - private final String domain; - - private final OrganizationDiscoveryDomainStatus status; - - private final Optional useForOrganizationDiscovery; - - private final String verificationTxt; - - private final String verificationHost; - - private final Map additionalProperties; - - private CreateOrganizationDiscoveryDomainResponseContent( - String id, - String domain, - OrganizationDiscoveryDomainStatus status, - Optional useForOrganizationDiscovery, - String verificationTxt, - String verificationHost, - Map additionalProperties) { - this.id = id; - this.domain = domain; - this.status = status; - this.useForOrganizationDiscovery = useForOrganizationDiscovery; - this.verificationTxt = verificationTxt; - this.verificationHost = verificationHost; - this.additionalProperties = additionalProperties; - } - - /** - * @return Organization discovery domain identifier. - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return The domain name to associate with the organization e.g. acme.com. - */ - @JsonProperty("domain") - public String getDomain() { - return domain; - } - - @JsonProperty("status") - public OrganizationDiscoveryDomainStatus getStatus() { - return status; - } - - /** - * @return Indicates whether this domain should be used for organization discovery. - */ - @JsonProperty("use_for_organization_discovery") - public Optional getUseForOrganizationDiscovery() { - return useForOrganizationDiscovery; - } - - /** - * @return 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. - */ - @JsonProperty("verification_txt") - public String getVerificationTxt() { - return verificationTxt; - } - - /** - * @return The full domain where the TXT record should be added. - */ - @JsonProperty("verification_host") - public String getVerificationHost() { - return verificationHost; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateOrganizationDiscoveryDomainResponseContent - && equalTo((CreateOrganizationDiscoveryDomainResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateOrganizationDiscoveryDomainResponseContent other) { - return id.equals(other.id) - && domain.equals(other.domain) - && status.equals(other.status) - && useForOrganizationDiscovery.equals(other.useForOrganizationDiscovery) - && verificationTxt.equals(other.verificationTxt) - && verificationHost.equals(other.verificationHost); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.domain, - this.status, - this.useForOrganizationDiscovery, - this.verificationTxt, - this.verificationHost); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

Organization discovery domain identifier.

- */ - DomainStage id(@NotNull String id); - - Builder from(CreateOrganizationDiscoveryDomainResponseContent other); - } - - public interface DomainStage { - /** - *

The domain name to associate with the organization e.g. acme.com.

- */ - StatusStage domain(@NotNull String domain); - } - - public interface StatusStage { - VerificationTxtStage status(@NotNull OrganizationDiscoveryDomainStatus status); - } - - public interface VerificationTxtStage { - /** - *

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.

- */ - VerificationHostStage verificationTxt(@NotNull String verificationTxt); - } - - public interface VerificationHostStage { - /** - *

The full domain where the TXT record should be added.

- */ - _FinalStage verificationHost(@NotNull String verificationHost); - } - - public interface _FinalStage { - CreateOrganizationDiscoveryDomainResponseContent build(); - - /** - *

Indicates whether this domain should be used for organization discovery.

- */ - _FinalStage useForOrganizationDiscovery(Optional useForOrganizationDiscovery); - - _FinalStage useForOrganizationDiscovery(Boolean useForOrganizationDiscovery); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements IdStage, DomainStage, StatusStage, VerificationTxtStage, VerificationHostStage, _FinalStage { - private String id; - - private String domain; - - private OrganizationDiscoveryDomainStatus status; - - private String verificationTxt; - - private String verificationHost; - - private Optional useForOrganizationDiscovery = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateOrganizationDiscoveryDomainResponseContent other) { - id(other.getId()); - domain(other.getDomain()); - status(other.getStatus()); - useForOrganizationDiscovery(other.getUseForOrganizationDiscovery()); - verificationTxt(other.getVerificationTxt()); - verificationHost(other.getVerificationHost()); - return this; - } - - /** - *

Organization discovery domain identifier.

- *

Organization discovery domain identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("id") - public DomainStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("domain") - public StatusStage domain(@NotNull String domain) { - this.domain = Objects.requireNonNull(domain, "domain must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("status") - public VerificationTxtStage status(@NotNull OrganizationDiscoveryDomainStatus status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("verification_txt") - public VerificationHostStage verificationTxt(@NotNull String verificationTxt) { - this.verificationTxt = Objects.requireNonNull(verificationTxt, "verificationTxt must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("verification_host") - public _FinalStage verificationHost(@NotNull String verificationHost) { - this.verificationHost = Objects.requireNonNull(verificationHost, "verificationHost must not be null"); - return this; - } - - /** - *

Indicates whether this domain should be used for organization discovery.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage useForOrganizationDiscovery(Boolean useForOrganizationDiscovery) { - this.useForOrganizationDiscovery = Optional.ofNullable(useForOrganizationDiscovery); - return this; - } - - /** - *

Indicates whether this domain should be used for organization discovery.

- */ - @java.lang.Override - @JsonSetter(value = "use_for_organization_discovery", nulls = Nulls.SKIP) - public _FinalStage useForOrganizationDiscovery(Optional useForOrganizationDiscovery) { - this.useForOrganizationDiscovery = useForOrganizationDiscovery; - return this; - } - - @java.lang.Override - public CreateOrganizationDiscoveryDomainResponseContent build() { - return new CreateOrganizationDiscoveryDomainResponseContent( - id, - domain, - status, - useForOrganizationDiscovery, - verificationTxt, - verificationHost, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationInvitationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationInvitationResponseContent.java deleted file mode 100644 index 1c4ca998c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationInvitationResponseContent.java +++ /dev/null @@ -1,469 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = CreateOrganizationInvitationResponseContent.Builder.class) -public final class CreateOrganizationInvitationResponseContent { - private final Optional id; - - private final Optional organizationId; - - private final Optional inviter; - - private final Optional invitee; - - private final Optional invitationUrl; - - private final Optional createdAt; - - private final Optional expiresAt; - - private final Optional clientId; - - private final Optional connectionId; - - private final Optional> appMetadata; - - private final Optional> userMetadata; - - private final Optional> roles; - - private final Optional ticketId; - - private final Map additionalProperties; - - private CreateOrganizationInvitationResponseContent( - Optional id, - Optional organizationId, - Optional inviter, - Optional invitee, - Optional invitationUrl, - Optional createdAt, - Optional expiresAt, - Optional clientId, - Optional connectionId, - Optional> appMetadata, - Optional> userMetadata, - Optional> roles, - Optional ticketId, - Map additionalProperties) { - this.id = id; - this.organizationId = organizationId; - this.inviter = inviter; - this.invitee = invitee; - this.invitationUrl = invitationUrl; - this.createdAt = createdAt; - this.expiresAt = expiresAt; - this.clientId = clientId; - this.connectionId = connectionId; - this.appMetadata = appMetadata; - this.userMetadata = userMetadata; - this.roles = roles; - this.ticketId = ticketId; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the user invitation. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Organization identifier. - */ - @JsonProperty("organization_id") - public Optional getOrganizationId() { - return organizationId; - } - - @JsonProperty("inviter") - public Optional getInviter() { - return inviter; - } - - @JsonProperty("invitee") - public Optional getInvitee() { - return invitee; - } - - /** - * @return The invitation url to be send to the invitee. - */ - @JsonProperty("invitation_url") - public Optional getInvitationUrl() { - return invitationUrl; - } - - /** - * @return The ISO 8601 formatted timestamp representing the creation time of the invitation. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The ISO 8601 formatted timestamp representing the expiration time of the invitation. - */ - @JsonProperty("expires_at") - public Optional getExpiresAt() { - return expiresAt; - } - - /** - * @return Auth0 client ID. Used to resolve the application's login initiation endpoint. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @return The id of the connection to force invitee to authenticate with. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - @JsonProperty("app_metadata") - public Optional> getAppMetadata() { - return appMetadata; - } - - @JsonProperty("user_metadata") - public Optional> getUserMetadata() { - return userMetadata; - } - - /** - * @return List of roles IDs to associated with the user. - */ - @JsonProperty("roles") - public Optional> getRoles() { - return roles; - } - - /** - * @return The id of the invitation ticket - */ - @JsonProperty("ticket_id") - public Optional getTicketId() { - return ticketId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateOrganizationInvitationResponseContent - && equalTo((CreateOrganizationInvitationResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateOrganizationInvitationResponseContent other) { - return id.equals(other.id) - && organizationId.equals(other.organizationId) - && inviter.equals(other.inviter) - && invitee.equals(other.invitee) - && invitationUrl.equals(other.invitationUrl) - && createdAt.equals(other.createdAt) - && expiresAt.equals(other.expiresAt) - && clientId.equals(other.clientId) - && connectionId.equals(other.connectionId) - && appMetadata.equals(other.appMetadata) - && userMetadata.equals(other.userMetadata) - && roles.equals(other.roles) - && ticketId.equals(other.ticketId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.organizationId, - this.inviter, - this.invitee, - this.invitationUrl, - this.createdAt, - this.expiresAt, - this.clientId, - this.connectionId, - this.appMetadata, - this.userMetadata, - this.roles, - this.ticketId); - } - - @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 organizationId = Optional.empty(); - - private Optional inviter = Optional.empty(); - - private Optional invitee = Optional.empty(); - - private Optional invitationUrl = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional expiresAt = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional connectionId = Optional.empty(); - - private Optional> appMetadata = Optional.empty(); - - private Optional> userMetadata = Optional.empty(); - - private Optional> roles = Optional.empty(); - - private Optional ticketId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateOrganizationInvitationResponseContent other) { - id(other.getId()); - organizationId(other.getOrganizationId()); - inviter(other.getInviter()); - invitee(other.getInvitee()); - invitationUrl(other.getInvitationUrl()); - createdAt(other.getCreatedAt()); - expiresAt(other.getExpiresAt()); - clientId(other.getClientId()); - connectionId(other.getConnectionId()); - appMetadata(other.getAppMetadata()); - userMetadata(other.getUserMetadata()); - roles(other.getRoles()); - ticketId(other.getTicketId()); - return this; - } - - /** - *

The id of the user invitation.

- */ - @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; - } - - /** - *

Organization identifier.

- */ - @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; - } - - @JsonSetter(value = "inviter", nulls = Nulls.SKIP) - public Builder inviter(Optional inviter) { - this.inviter = inviter; - return this; - } - - public Builder inviter(OrganizationInvitationInviter inviter) { - this.inviter = Optional.ofNullable(inviter); - return this; - } - - @JsonSetter(value = "invitee", nulls = Nulls.SKIP) - public Builder invitee(Optional invitee) { - this.invitee = invitee; - return this; - } - - public Builder invitee(OrganizationInvitationInvitee invitee) { - this.invitee = Optional.ofNullable(invitee); - return this; - } - - /** - *

The invitation url to be send to the invitee.

- */ - @JsonSetter(value = "invitation_url", nulls = Nulls.SKIP) - public Builder invitationUrl(Optional invitationUrl) { - this.invitationUrl = invitationUrl; - return this; - } - - public Builder invitationUrl(String invitationUrl) { - this.invitationUrl = Optional.ofNullable(invitationUrl); - return this; - } - - /** - *

The ISO 8601 formatted timestamp representing the creation time of the invitation.

- */ - @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 formatted timestamp representing the expiration time of the invitation.

- */ - @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - public Builder expiresAt(OffsetDateTime expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); - return this; - } - - /** - *

Auth0 client ID. Used to resolve the application's login initiation endpoint.

- */ - @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 id of the connection to force invitee to authenticate with.

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - return this; - } - - @JsonSetter(value = "app_metadata", nulls = Nulls.SKIP) - public Builder appMetadata(Optional> appMetadata) { - this.appMetadata = appMetadata; - return this; - } - - public Builder appMetadata(Map appMetadata) { - this.appMetadata = Optional.ofNullable(appMetadata); - return this; - } - - @JsonSetter(value = "user_metadata", nulls = Nulls.SKIP) - public Builder userMetadata(Optional> userMetadata) { - this.userMetadata = userMetadata; - return this; - } - - public Builder userMetadata(Map userMetadata) { - this.userMetadata = Optional.ofNullable(userMetadata); - return this; - } - - /** - *

List of roles IDs to associated with the user.

- */ - @JsonSetter(value = "roles", nulls = Nulls.SKIP) - public Builder roles(Optional> roles) { - this.roles = roles; - return this; - } - - public Builder roles(List roles) { - this.roles = Optional.ofNullable(roles); - return this; - } - - /** - *

The id of the invitation ticket

- */ - @JsonSetter(value = "ticket_id", nulls = Nulls.SKIP) - public Builder ticketId(Optional ticketId) { - this.ticketId = ticketId; - return this; - } - - public Builder ticketId(String ticketId) { - this.ticketId = Optional.ofNullable(ticketId); - return this; - } - - public CreateOrganizationInvitationResponseContent build() { - return new CreateOrganizationInvitationResponseContent( - id, - organizationId, - inviter, - invitee, - invitationUrl, - createdAt, - expiresAt, - clientId, - connectionId, - appMetadata, - userMetadata, - roles, - ticketId, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationRequestContent.java deleted file mode 100644 index 21128edeb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationRequestContent.java +++ /dev/null @@ -1,297 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateOrganizationRequestContent.Builder.class) -public final class CreateOrganizationRequestContent { - private final String name; - - private final Optional displayName; - - private final Optional branding; - - private final Optional>> metadata; - - private final Optional> enabledConnections; - - private final Optional tokenQuota; - - private final Map additionalProperties; - - private CreateOrganizationRequestContent( - String name, - Optional displayName, - Optional branding, - Optional>> metadata, - Optional> enabledConnections, - Optional tokenQuota, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.branding = branding; - this.metadata = metadata; - this.enabledConnections = enabledConnections; - this.tokenQuota = tokenQuota; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of this organization. - */ - @JsonProperty("name") - public String 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("metadata") - public Optional>> getMetadata() { - return metadata; - } - - /** - * @return Connections that will be enabled for this organization. See POST enabled_connections endpoint for the object format. (Max of 10 connections allowed) - */ - @JsonProperty("enabled_connections") - public Optional> getEnabledConnections() { - return enabledConnections; - } - - @JsonProperty("token_quota") - public Optional getTokenQuota() { - return tokenQuota; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateOrganizationRequestContent && equalTo((CreateOrganizationRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateOrganizationRequestContent other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && branding.equals(other.branding) - && metadata.equals(other.metadata) - && enabledConnections.equals(other.enabledConnections) - && tokenQuota.equals(other.tokenQuota); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, this.displayName, this.branding, this.metadata, this.enabledConnections, this.tokenQuota); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

The name of this organization.

- */ - _FinalStage name(@NotNull String name); - - Builder from(CreateOrganizationRequestContent other); - } - - public interface _FinalStage { - CreateOrganizationRequestContent build(); - - /** - *

Friendly name of this organization.

- */ - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - _FinalStage branding(Optional branding); - - _FinalStage branding(OrganizationBranding branding); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - /** - *

Connections that will be enabled for this organization. See POST enabled_connections endpoint for the object format. (Max of 10 connections allowed)

- */ - _FinalStage enabledConnections(Optional> enabledConnections); - - _FinalStage enabledConnections(List enabledConnections); - - _FinalStage tokenQuota(Optional tokenQuota); - - _FinalStage tokenQuota(CreateTokenQuota tokenQuota); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; - - private Optional tokenQuota = Optional.empty(); - - private Optional> enabledConnections = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional branding = Optional.empty(); - - private Optional displayName = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateOrganizationRequestContent other) { - name(other.getName()); - displayName(other.getDisplayName()); - branding(other.getBranding()); - metadata(other.getMetadata()); - enabledConnections(other.getEnabledConnections()); - tokenQuota(other.getTokenQuota()); - 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. - */ - @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 tokenQuota(CreateTokenQuota tokenQuota) { - this.tokenQuota = Optional.ofNullable(tokenQuota); - return this; - } - - @java.lang.Override - @JsonSetter(value = "token_quota", nulls = Nulls.SKIP) - public _FinalStage tokenQuota(Optional tokenQuota) { - this.tokenQuota = tokenQuota; - return this; - } - - /** - *

Connections that will be enabled for this organization. See POST enabled_connections endpoint for the object format. (Max of 10 connections allowed)

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage enabledConnections(List enabledConnections) { - this.enabledConnections = Optional.ofNullable(enabledConnections); - return this; - } - - /** - *

Connections that will be enabled for this organization. See POST enabled_connections endpoint for the object format. (Max of 10 connections allowed)

- */ - @java.lang.Override - @JsonSetter(value = "enabled_connections", nulls = Nulls.SKIP) - public _FinalStage enabledConnections(Optional> enabledConnections) { - this.enabledConnections = enabledConnections; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage branding(OrganizationBranding 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; - } - - /** - *

Friendly name of this organization.

- * @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; - } - - /** - *

Friendly name of this organization.

- */ - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public CreateOrganizationRequestContent build() { - return new CreateOrganizationRequestContent( - name, displayName, branding, metadata, enabledConnections, tokenQuota, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationResponseContent.java deleted file mode 100644 index 30aaaa64f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateOrganizationResponseContent.java +++ /dev/null @@ -1,269 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateOrganizationResponseContent.Builder.class) -public final class CreateOrganizationResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional displayName; - - private final Optional branding; - - private final Optional>> metadata; - - private final Optional tokenQuota; - - private final Optional> enabledConnections; - - private final Map additionalProperties; - - private CreateOrganizationResponseContent( - Optional id, - Optional name, - Optional displayName, - Optional branding, - Optional>> metadata, - Optional tokenQuota, - Optional> enabledConnections, - Map additionalProperties) { - this.id = id; - this.name = name; - this.displayName = displayName; - this.branding = branding; - this.metadata = metadata; - this.tokenQuota = tokenQuota; - this.enabledConnections = enabledConnections; - 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("metadata") - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("token_quota") - public Optional getTokenQuota() { - return tokenQuota; - } - - @JsonProperty("enabled_connections") - public Optional> getEnabledConnections() { - return enabledConnections; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateOrganizationResponseContent && equalTo((CreateOrganizationResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateOrganizationResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && displayName.equals(other.displayName) - && branding.equals(other.branding) - && metadata.equals(other.metadata) - && tokenQuota.equals(other.tokenQuota) - && enabledConnections.equals(other.enabledConnections); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.displayName, - this.branding, - this.metadata, - this.tokenQuota, - this.enabledConnections); - } - - @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>> metadata = Optional.empty(); - - private Optional tokenQuota = Optional.empty(); - - private Optional> enabledConnections = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateOrganizationResponseContent other) { - id(other.getId()); - name(other.getName()); - displayName(other.getDisplayName()); - branding(other.getBranding()); - metadata(other.getMetadata()); - tokenQuota(other.getTokenQuota()); - enabledConnections(other.getEnabledConnections()); - 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 = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "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 = "enabled_connections", nulls = Nulls.SKIP) - public Builder enabledConnections(Optional> enabledConnections) { - this.enabledConnections = enabledConnections; - return this; - } - - public Builder enabledConnections(List enabledConnections) { - this.enabledConnections = Optional.ofNullable(enabledConnections); - return this; - } - - public CreateOrganizationResponseContent build() { - return new CreateOrganizationResponseContent( - id, name, displayName, branding, metadata, tokenQuota, enabledConnections, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreatePhoneProviderSendTestResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreatePhoneProviderSendTestResponseContent.java deleted file mode 100644 index 0f46dfd8e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreatePhoneProviderSendTestResponseContent.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreatePhoneProviderSendTestResponseContent.Builder.class) -public final class CreatePhoneProviderSendTestResponseContent { - private final Optional code; - - private final Optional message; - - private final Map additionalProperties; - - private CreatePhoneProviderSendTestResponseContent( - Optional code, Optional message, Map additionalProperties) { - this.code = code; - this.message = message; - this.additionalProperties = additionalProperties; - } - - /** - * @return The status code of the operation. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The description of the operation status. - */ - @JsonProperty("message") - public Optional getMessage() { - return message; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreatePhoneProviderSendTestResponseContent - && equalTo((CreatePhoneProviderSendTestResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreatePhoneProviderSendTestResponseContent 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 Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional code = Optional.empty(); - - private Optional message = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreatePhoneProviderSendTestResponseContent other) { - code(other.getCode()); - message(other.getMessage()); - return this; - } - - /** - *

The status code of the operation.

- */ - @JsonSetter(value = "code", nulls = Nulls.SKIP) - public Builder code(Optional code) { - this.code = code; - return this; - } - - public Builder code(Double code) { - this.code = Optional.ofNullable(code); - return this; - } - - /** - *

The description of the operation status.

- */ - @JsonSetter(value = "message", nulls = Nulls.SKIP) - public Builder message(Optional message) { - this.message = message; - return this; - } - - public Builder message(String message) { - this.message = Optional.ofNullable(message); - return this; - } - - public CreatePhoneProviderSendTestResponseContent build() { - return new CreatePhoneProviderSendTestResponseContent(code, message, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreatePhoneTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreatePhoneTemplateResponseContent.java deleted file mode 100644 index ae6277c28..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreatePhoneTemplateResponseContent.java +++ /dev/null @@ -1,282 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreatePhoneTemplateResponseContent.Builder.class) -public final class CreatePhoneTemplateResponseContent { - private final String id; - - private final Optional channel; - - private final Optional customizable; - - private final Optional tenant; - - private final PhoneTemplateContent content; - - private final PhoneTemplateNotificationTypeEnum type; - - private final boolean disabled; - - private final Map additionalProperties; - - private CreatePhoneTemplateResponseContent( - String id, - Optional channel, - Optional customizable, - Optional tenant, - PhoneTemplateContent content, - PhoneTemplateNotificationTypeEnum type, - boolean disabled, - Map additionalProperties) { - this.id = id; - this.channel = channel; - this.customizable = customizable; - this.tenant = tenant; - this.content = content; - this.type = type; - this.disabled = disabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("channel") - public Optional getChannel() { - return channel; - } - - @JsonProperty("customizable") - public Optional getCustomizable() { - return customizable; - } - - @JsonProperty("tenant") - public Optional getTenant() { - return tenant; - } - - @JsonProperty("content") - public PhoneTemplateContent getContent() { - return content; - } - - @JsonProperty("type") - public PhoneTemplateNotificationTypeEnum getType() { - return type; - } - - /** - * @return Whether the template is enabled (false) or disabled (true). - */ - @JsonProperty("disabled") - public boolean getDisabled() { - return disabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreatePhoneTemplateResponseContent - && equalTo((CreatePhoneTemplateResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreatePhoneTemplateResponseContent other) { - return id.equals(other.id) - && channel.equals(other.channel) - && customizable.equals(other.customizable) - && tenant.equals(other.tenant) - && content.equals(other.content) - && type.equals(other.type) - && disabled == other.disabled; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.channel, this.customizable, this.tenant, this.content, this.type, this.disabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - ContentStage id(@NotNull String id); - - Builder from(CreatePhoneTemplateResponseContent other); - } - - public interface ContentStage { - TypeStage content(@NotNull PhoneTemplateContent content); - } - - public interface TypeStage { - DisabledStage type(@NotNull PhoneTemplateNotificationTypeEnum type); - } - - public interface DisabledStage { - /** - *

Whether the template is enabled (false) or disabled (true).

- */ - _FinalStage disabled(boolean disabled); - } - - public interface _FinalStage { - CreatePhoneTemplateResponseContent build(); - - _FinalStage channel(Optional channel); - - _FinalStage channel(String channel); - - _FinalStage customizable(Optional customizable); - - _FinalStage customizable(Boolean customizable); - - _FinalStage tenant(Optional tenant); - - _FinalStage tenant(String tenant); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, ContentStage, TypeStage, DisabledStage, _FinalStage { - private String id; - - private PhoneTemplateContent content; - - private PhoneTemplateNotificationTypeEnum type; - - private boolean disabled; - - private Optional tenant = Optional.empty(); - - private Optional customizable = Optional.empty(); - - private Optional channel = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreatePhoneTemplateResponseContent other) { - id(other.getId()); - channel(other.getChannel()); - customizable(other.getCustomizable()); - tenant(other.getTenant()); - content(other.getContent()); - type(other.getType()); - disabled(other.getDisabled()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public ContentStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("content") - public TypeStage content(@NotNull PhoneTemplateContent content) { - this.content = Objects.requireNonNull(content, "content must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public DisabledStage type(@NotNull PhoneTemplateNotificationTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("disabled") - public _FinalStage disabled(boolean disabled) { - this.disabled = disabled; - return this; - } - - @java.lang.Override - public _FinalStage tenant(String tenant) { - this.tenant = Optional.ofNullable(tenant); - return this; - } - - @java.lang.Override - @JsonSetter(value = "tenant", nulls = Nulls.SKIP) - public _FinalStage tenant(Optional tenant) { - this.tenant = tenant; - return this; - } - - @java.lang.Override - public _FinalStage customizable(Boolean customizable) { - this.customizable = Optional.ofNullable(customizable); - return this; - } - - @java.lang.Override - @JsonSetter(value = "customizable", nulls = Nulls.SKIP) - public _FinalStage customizable(Optional customizable) { - this.customizable = customizable; - return this; - } - - @java.lang.Override - public _FinalStage channel(String channel) { - this.channel = Optional.ofNullable(channel); - return this; - } - - @java.lang.Override - @JsonSetter(value = "channel", nulls = Nulls.SKIP) - public _FinalStage channel(Optional channel) { - this.channel = channel; - return this; - } - - @java.lang.Override - public CreatePhoneTemplateResponseContent build() { - return new CreatePhoneTemplateResponseContent( - id, channel, customizable, tenant, content, type, disabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreatePhoneTemplateTestNotificationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreatePhoneTemplateTestNotificationResponseContent.java deleted file mode 100644 index 217c9314f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreatePhoneTemplateTestNotificationResponseContent.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreatePhoneTemplateTestNotificationResponseContent.Builder.class) -public final class CreatePhoneTemplateTestNotificationResponseContent { - private final String message; - - private final Map additionalProperties; - - private CreatePhoneTemplateTestNotificationResponseContent( - String message, Map additionalProperties) { - this.message = message; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("message") - public String getMessage() { - return message; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreatePhoneTemplateTestNotificationResponseContent - && equalTo((CreatePhoneTemplateTestNotificationResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreatePhoneTemplateTestNotificationResponseContent other) { - return message.equals(other.message); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.message); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static MessageStage builder() { - return new Builder(); - } - - public interface MessageStage { - _FinalStage message(@NotNull String message); - - Builder from(CreatePhoneTemplateTestNotificationResponseContent other); - } - - public interface _FinalStage { - CreatePhoneTemplateTestNotificationResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements MessageStage, _FinalStage { - private String message; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreatePhoneTemplateTestNotificationResponseContent other) { - message(other.getMessage()); - return this; - } - - @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 CreatePhoneTemplateTestNotificationResponseContent build() { - return new CreatePhoneTemplateTestNotificationResponseContent(message, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreatePublicKeyDeviceCredentialRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreatePublicKeyDeviceCredentialRequestContent.java deleted file mode 100644 index 9f2cab85e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreatePublicKeyDeviceCredentialRequestContent.java +++ /dev/null @@ -1,256 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreatePublicKeyDeviceCredentialRequestContent.Builder.class) -public final class CreatePublicKeyDeviceCredentialRequestContent { - private final String deviceName; - - private final DeviceCredentialPublicKeyTypeEnum type; - - private final String value; - - private final String deviceId; - - private final Optional clientId; - - private final Map additionalProperties; - - private CreatePublicKeyDeviceCredentialRequestContent( - String deviceName, - DeviceCredentialPublicKeyTypeEnum type, - String value, - String deviceId, - Optional clientId, - Map additionalProperties) { - this.deviceName = deviceName; - this.type = type; - this.value = value; - this.deviceId = deviceId; - this.clientId = clientId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name for this device easily recognized by owner. - */ - @JsonProperty("device_name") - public String getDeviceName() { - return deviceName; - } - - @JsonProperty("type") - public DeviceCredentialPublicKeyTypeEnum getType() { - return type; - } - - /** - * @return Base64 encoded string containing the credential. - */ - @JsonProperty("value") - public String getValue() { - return value; - } - - /** - * @return Unique identifier for the device. Recommend using <a href="http://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID">Android_ID</a> on Android and <a href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/index.html#//apple_ref/occ/instp/UIDevice/identifierForVendor">identifierForVendor</a>. - */ - @JsonProperty("device_id") - public String getDeviceId() { - return deviceId; - } - - /** - * @return client_id of the client (application) this credential is for. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreatePublicKeyDeviceCredentialRequestContent - && equalTo((CreatePublicKeyDeviceCredentialRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreatePublicKeyDeviceCredentialRequestContent other) { - return deviceName.equals(other.deviceName) - && type.equals(other.type) - && value.equals(other.value) - && deviceId.equals(other.deviceId) - && clientId.equals(other.clientId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.deviceName, this.type, this.value, this.deviceId, this.clientId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static DeviceNameStage builder() { - return new Builder(); - } - - public interface DeviceNameStage { - /** - *

Name for this device easily recognized by owner.

- */ - TypeStage deviceName(@NotNull String deviceName); - - Builder from(CreatePublicKeyDeviceCredentialRequestContent other); - } - - public interface TypeStage { - ValueStage type(@NotNull DeviceCredentialPublicKeyTypeEnum type); - } - - public interface ValueStage { - /** - *

Base64 encoded string containing the credential.

- */ - DeviceIdStage value(@NotNull String value); - } - - public interface DeviceIdStage { - /** - *

Unique identifier for the device. Recommend using <a href="http://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID">Android_ID</a> on Android and <a href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/index.html#//apple_ref/occ/instp/UIDevice/identifierForVendor">identifierForVendor</a>.

- */ - _FinalStage deviceId(@NotNull String deviceId); - } - - public interface _FinalStage { - CreatePublicKeyDeviceCredentialRequestContent build(); - - /** - *

client_id of the client (application) this credential is for.

- */ - _FinalStage clientId(Optional clientId); - - _FinalStage clientId(String clientId); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements DeviceNameStage, TypeStage, ValueStage, DeviceIdStage, _FinalStage { - private String deviceName; - - private DeviceCredentialPublicKeyTypeEnum type; - - private String value; - - private String deviceId; - - private Optional clientId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreatePublicKeyDeviceCredentialRequestContent other) { - deviceName(other.getDeviceName()); - type(other.getType()); - value(other.getValue()); - deviceId(other.getDeviceId()); - clientId(other.getClientId()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("device_name") - public TypeStage deviceName(@NotNull String deviceName) { - this.deviceName = Objects.requireNonNull(deviceName, "deviceName must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ValueStage type(@NotNull DeviceCredentialPublicKeyTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("value") - public DeviceIdStage value(@NotNull String value) { - this.value = Objects.requireNonNull(value, "value must not be null"); - return this; - } - - /** - *

Unique identifier for the device. Recommend using <a href="http://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID">Android_ID</a> on Android and <a href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/index.html#//apple_ref/occ/instp/UIDevice/identifierForVendor">identifierForVendor</a>.

- *

Unique identifier for the device. Recommend using <a href="http://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID">Android_ID</a> on Android and <a href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/index.html#//apple_ref/occ/instp/UIDevice/identifierForVendor">identifierForVendor</a>.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("device_id") - public _FinalStage deviceId(@NotNull String deviceId) { - this.deviceId = Objects.requireNonNull(deviceId, "deviceId must not be null"); - return this; - } - - /** - *

client_id of the client (application) this credential is for.

- * @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; - } - - /** - *

client_id of the client (application) this credential is for.

- */ - @java.lang.Override - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public _FinalStage clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - @java.lang.Override - public CreatePublicKeyDeviceCredentialRequestContent build() { - return new CreatePublicKeyDeviceCredentialRequestContent( - deviceName, type, value, deviceId, clientId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreatePublicKeyDeviceCredentialResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreatePublicKeyDeviceCredentialResponseContent.java deleted file mode 100644 index 7287d4940..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreatePublicKeyDeviceCredentialResponseContent.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreatePublicKeyDeviceCredentialResponseContent.Builder.class) -public final class CreatePublicKeyDeviceCredentialResponseContent { - private final String id; - - private final Map additionalProperties; - - private CreatePublicKeyDeviceCredentialResponseContent(String id, Map additionalProperties) { - this.id = id; - this.additionalProperties = additionalProperties; - } - - /** - * @return The credential's identifier - */ - @JsonProperty("id") - public String getId() { - return id; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreatePublicKeyDeviceCredentialResponseContent - && equalTo((CreatePublicKeyDeviceCredentialResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreatePublicKeyDeviceCredentialResponseContent 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 credential's identifier

- */ - _FinalStage id(@NotNull String id); - - Builder from(CreatePublicKeyDeviceCredentialResponseContent other); - } - - public interface _FinalStage { - CreatePublicKeyDeviceCredentialResponseContent build(); - } - - @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(CreatePublicKeyDeviceCredentialResponseContent other) { - id(other.getId()); - return this; - } - - /** - *

The credential's identifier

- *

The credential's 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 CreatePublicKeyDeviceCredentialResponseContent build() { - return new CreatePublicKeyDeviceCredentialResponseContent(id, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerRequestContent.java deleted file mode 100644 index 5bc6d05a9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerRequestContent.java +++ /dev/null @@ -1,782 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateResourceServerRequestContent.Builder.class) -public final class CreateResourceServerRequestContent { - private final Optional name; - - private final String identifier; - - private final Optional> scopes; - - private final Optional signingAlg; - - private final Optional signingSecret; - - private final Optional allowOfflineAccess; - - private final Optional tokenLifetime; - - private final Optional tokenDialect; - - private final Optional skipConsentForVerifiableFirstPartyClients; - - private final Optional enforcePolicies; - - private final OptionalNullable tokenEncryption; - - private final OptionalNullable consentPolicy; - - private final Optional> authorizationDetails; - - private final OptionalNullable proofOfPossession; - - private final Optional subjectTypeAuthorization; - - private final Map additionalProperties; - - private CreateResourceServerRequestContent( - Optional name, - String identifier, - Optional> scopes, - Optional signingAlg, - Optional signingSecret, - Optional allowOfflineAccess, - Optional tokenLifetime, - Optional tokenDialect, - Optional skipConsentForVerifiableFirstPartyClients, - Optional enforcePolicies, - OptionalNullable tokenEncryption, - OptionalNullable consentPolicy, - Optional> authorizationDetails, - OptionalNullable proofOfPossession, - Optional subjectTypeAuthorization, - Map additionalProperties) { - this.name = name; - this.identifier = identifier; - this.scopes = scopes; - this.signingAlg = signingAlg; - this.signingSecret = signingSecret; - this.allowOfflineAccess = allowOfflineAccess; - this.tokenLifetime = tokenLifetime; - this.tokenDialect = tokenDialect; - this.skipConsentForVerifiableFirstPartyClients = skipConsentForVerifiableFirstPartyClients; - this.enforcePolicies = enforcePolicies; - this.tokenEncryption = tokenEncryption; - this.consentPolicy = consentPolicy; - this.authorizationDetails = authorizationDetails; - this.proofOfPossession = proofOfPossession; - this.subjectTypeAuthorization = subjectTypeAuthorization; - this.additionalProperties = additionalProperties; - } - - /** - * @return Friendly name for this resource server. Can not contain < or > characters. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Unique identifier for the API used as the audience parameter on authorization calls. Can not be changed once set. - */ - @JsonProperty("identifier") - public String 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 Secret used to sign tokens when using symmetric algorithms (HS256). - */ - @JsonProperty("signing_secret") - public Optional getSigningSecret() { - return signingSecret; - } - - /** - * @return Whether refresh tokens can be issued for this API (true) or not (false). - */ - @JsonProperty("allow_offline_access") - public Optional getAllowOfflineAccess() { - return allowOfflineAccess; - } - - /** - * @return Expiration value (in seconds) for access tokens issued for this API from the token endpoint. - */ - @JsonProperty("token_lifetime") - public Optional getTokenLifetime() { - return tokenLifetime; - } - - @JsonProperty("token_dialect") - public Optional getTokenDialect() { - return tokenDialect; - } - - /** - * @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 Whether to enforce authorization policies (true) or to ignore them (false). - */ - @JsonProperty("enforce_policies") - public Optional getEnforcePolicies() { - return enforcePolicies; - } - - @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; - } - - @JsonProperty("authorization_details") - public Optional> getAuthorizationDetails() { - 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("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("proof_of_possession") - private OptionalNullable _getProofOfPossession() { - return proofOfPossession; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateResourceServerRequestContent - && equalTo((CreateResourceServerRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateResourceServerRequestContent other) { - return name.equals(other.name) - && identifier.equals(other.identifier) - && scopes.equals(other.scopes) - && signingAlg.equals(other.signingAlg) - && signingSecret.equals(other.signingSecret) - && allowOfflineAccess.equals(other.allowOfflineAccess) - && tokenLifetime.equals(other.tokenLifetime) - && tokenDialect.equals(other.tokenDialect) - && skipConsentForVerifiableFirstPartyClients.equals(other.skipConsentForVerifiableFirstPartyClients) - && enforcePolicies.equals(other.enforcePolicies) - && tokenEncryption.equals(other.tokenEncryption) - && consentPolicy.equals(other.consentPolicy) - && authorizationDetails.equals(other.authorizationDetails) - && proofOfPossession.equals(other.proofOfPossession) - && subjectTypeAuthorization.equals(other.subjectTypeAuthorization); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.identifier, - this.scopes, - this.signingAlg, - this.signingSecret, - this.allowOfflineAccess, - this.tokenLifetime, - this.tokenDialect, - this.skipConsentForVerifiableFirstPartyClients, - this.enforcePolicies, - this.tokenEncryption, - this.consentPolicy, - this.authorizationDetails, - this.proofOfPossession, - this.subjectTypeAuthorization); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdentifierStage builder() { - return new Builder(); - } - - public interface IdentifierStage { - /** - *

Unique identifier for the API used as the audience parameter on authorization calls. Can not be changed once set.

- */ - _FinalStage identifier(@NotNull String identifier); - - Builder from(CreateResourceServerRequestContent other); - } - - public interface _FinalStage { - CreateResourceServerRequestContent build(); - - /** - *

Friendly name for this resource server. Can not contain < or > characters.

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

List of permissions (scopes) that this API uses.

- */ - _FinalStage scopes(Optional> scopes); - - _FinalStage scopes(List scopes); - - _FinalStage signingAlg(Optional signingAlg); - - _FinalStage signingAlg(SigningAlgorithmEnum signingAlg); - - /** - *

Secret used to sign tokens when using symmetric algorithms (HS256).

- */ - _FinalStage signingSecret(Optional signingSecret); - - _FinalStage signingSecret(String signingSecret); - - /** - *

Whether refresh tokens can be issued for this API (true) or not (false).

- */ - _FinalStage allowOfflineAccess(Optional allowOfflineAccess); - - _FinalStage allowOfflineAccess(Boolean allowOfflineAccess); - - /** - *

Expiration value (in seconds) for access tokens issued for this API from the token endpoint.

- */ - _FinalStage tokenLifetime(Optional tokenLifetime); - - _FinalStage tokenLifetime(Integer tokenLifetime); - - _FinalStage tokenDialect(Optional tokenDialect); - - _FinalStage tokenDialect(ResourceServerTokenDialectSchemaEnum tokenDialect); - - /** - *

Whether to skip user consent for applications flagged as first party (true) or not (false).

- */ - _FinalStage skipConsentForVerifiableFirstPartyClients( - Optional skipConsentForVerifiableFirstPartyClients); - - _FinalStage skipConsentForVerifiableFirstPartyClients(Boolean skipConsentForVerifiableFirstPartyClients); - - /** - *

Whether to enforce authorization policies (true) or to ignore them (false).

- */ - _FinalStage enforcePolicies(Optional enforcePolicies); - - _FinalStage enforcePolicies(Boolean enforcePolicies); - - _FinalStage tokenEncryption(@Nullable OptionalNullable tokenEncryption); - - _FinalStage tokenEncryption(ResourceServerTokenEncryption tokenEncryption); - - _FinalStage tokenEncryption(Optional tokenEncryption); - - _FinalStage tokenEncryption(com.auth0.client.mgmt.core.Nullable tokenEncryption); - - _FinalStage consentPolicy(@Nullable OptionalNullable consentPolicy); - - _FinalStage consentPolicy(ResourceServerConsentPolicyEnum consentPolicy); - - _FinalStage consentPolicy(Optional consentPolicy); - - _FinalStage consentPolicy(com.auth0.client.mgmt.core.Nullable consentPolicy); - - _FinalStage authorizationDetails(Optional> authorizationDetails); - - _FinalStage authorizationDetails(List authorizationDetails); - - _FinalStage proofOfPossession(@Nullable OptionalNullable proofOfPossession); - - _FinalStage proofOfPossession(ResourceServerProofOfPossession proofOfPossession); - - _FinalStage proofOfPossession(Optional proofOfPossession); - - _FinalStage proofOfPossession( - com.auth0.client.mgmt.core.Nullable proofOfPossession); - - _FinalStage subjectTypeAuthorization(Optional subjectTypeAuthorization); - - _FinalStage subjectTypeAuthorization(ResourceServerSubjectTypeAuthorization subjectTypeAuthorization); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdentifierStage, _FinalStage { - private String identifier; - - private Optional subjectTypeAuthorization = Optional.empty(); - - private OptionalNullable proofOfPossession = OptionalNullable.absent(); - - private Optional> authorizationDetails = Optional.empty(); - - private OptionalNullable consentPolicy = OptionalNullable.absent(); - - private OptionalNullable tokenEncryption = OptionalNullable.absent(); - - private Optional enforcePolicies = Optional.empty(); - - private Optional skipConsentForVerifiableFirstPartyClients = Optional.empty(); - - private Optional tokenDialect = Optional.empty(); - - private Optional tokenLifetime = Optional.empty(); - - private Optional allowOfflineAccess = Optional.empty(); - - private Optional signingSecret = Optional.empty(); - - private Optional signingAlg = Optional.empty(); - - private Optional> scopes = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateResourceServerRequestContent other) { - name(other.getName()); - identifier(other.getIdentifier()); - scopes(other.getScopes()); - signingAlg(other.getSigningAlg()); - signingSecret(other.getSigningSecret()); - allowOfflineAccess(other.getAllowOfflineAccess()); - tokenLifetime(other.getTokenLifetime()); - tokenDialect(other.getTokenDialect()); - skipConsentForVerifiableFirstPartyClients(other.getSkipConsentForVerifiableFirstPartyClients()); - enforcePolicies(other.getEnforcePolicies()); - tokenEncryption(other.getTokenEncryption()); - consentPolicy(other.getConsentPolicy()); - authorizationDetails(other.getAuthorizationDetails()); - proofOfPossession(other.getProofOfPossession()); - subjectTypeAuthorization(other.getSubjectTypeAuthorization()); - 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. - */ - @java.lang.Override - @JsonSetter("identifier") - public _FinalStage identifier(@NotNull String identifier) { - this.identifier = Objects.requireNonNull(identifier, "identifier must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage subjectTypeAuthorization(ResourceServerSubjectTypeAuthorization subjectTypeAuthorization) { - this.subjectTypeAuthorization = Optional.ofNullable(subjectTypeAuthorization); - return this; - } - - @java.lang.Override - @JsonSetter(value = "subject_type_authorization", nulls = Nulls.SKIP) - public _FinalStage subjectTypeAuthorization( - Optional subjectTypeAuthorization) { - this.subjectTypeAuthorization = subjectTypeAuthorization; - return this; - } - - @java.lang.Override - public _FinalStage 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; - } - - @java.lang.Override - public _FinalStage proofOfPossession(Optional proofOfPossession) { - if (proofOfPossession.isPresent()) { - this.proofOfPossession = OptionalNullable.of(proofOfPossession.get()); - } else { - this.proofOfPossession = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage proofOfPossession(ResourceServerProofOfPossession proofOfPossession) { - this.proofOfPossession = OptionalNullable.of(proofOfPossession); - return this; - } - - @java.lang.Override - @JsonSetter(value = "proof_of_possession", nulls = Nulls.SKIP) - public _FinalStage proofOfPossession( - @Nullable OptionalNullable proofOfPossession) { - this.proofOfPossession = proofOfPossession; - return this; - } - - @java.lang.Override - public _FinalStage authorizationDetails(List authorizationDetails) { - this.authorizationDetails = Optional.ofNullable(authorizationDetails); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) - public _FinalStage authorizationDetails(Optional> authorizationDetails) { - this.authorizationDetails = authorizationDetails; - return this; - } - - @java.lang.Override - public _FinalStage 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; - } - - @java.lang.Override - public _FinalStage consentPolicy(Optional consentPolicy) { - if (consentPolicy.isPresent()) { - this.consentPolicy = OptionalNullable.of(consentPolicy.get()); - } else { - this.consentPolicy = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage consentPolicy(ResourceServerConsentPolicyEnum consentPolicy) { - this.consentPolicy = OptionalNullable.of(consentPolicy); - return this; - } - - @java.lang.Override - @JsonSetter(value = "consent_policy", nulls = Nulls.SKIP) - public _FinalStage consentPolicy(@Nullable OptionalNullable consentPolicy) { - this.consentPolicy = consentPolicy; - return this; - } - - @java.lang.Override - public _FinalStage 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; - } - - @java.lang.Override - public _FinalStage tokenEncryption(Optional tokenEncryption) { - if (tokenEncryption.isPresent()) { - this.tokenEncryption = OptionalNullable.of(tokenEncryption.get()); - } else { - this.tokenEncryption = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage tokenEncryption(ResourceServerTokenEncryption tokenEncryption) { - this.tokenEncryption = OptionalNullable.of(tokenEncryption); - return this; - } - - @java.lang.Override - @JsonSetter(value = "token_encryption", nulls = Nulls.SKIP) - public _FinalStage tokenEncryption(@Nullable OptionalNullable tokenEncryption) { - this.tokenEncryption = tokenEncryption; - 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. - */ - @java.lang.Override - public _FinalStage enforcePolicies(Boolean enforcePolicies) { - this.enforcePolicies = Optional.ofNullable(enforcePolicies); - return this; - } - - /** - *

Whether to enforce authorization policies (true) or to ignore them (false).

- */ - @java.lang.Override - @JsonSetter(value = "enforce_policies", nulls = Nulls.SKIP) - public _FinalStage enforcePolicies(Optional enforcePolicies) { - this.enforcePolicies = enforcePolicies; - return this; - } - - /** - *

Whether to skip user consent for applications flagged as first party (true) or not (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage skipConsentForVerifiableFirstPartyClients( - Boolean skipConsentForVerifiableFirstPartyClients) { - this.skipConsentForVerifiableFirstPartyClients = - Optional.ofNullable(skipConsentForVerifiableFirstPartyClients); - return this; - } - - /** - *

Whether to skip user consent for applications flagged as first party (true) or not (false).

- */ - @java.lang.Override - @JsonSetter(value = "skip_consent_for_verifiable_first_party_clients", nulls = Nulls.SKIP) - public _FinalStage skipConsentForVerifiableFirstPartyClients( - Optional skipConsentForVerifiableFirstPartyClients) { - this.skipConsentForVerifiableFirstPartyClients = skipConsentForVerifiableFirstPartyClients; - return this; - } - - @java.lang.Override - public _FinalStage tokenDialect(ResourceServerTokenDialectSchemaEnum tokenDialect) { - this.tokenDialect = Optional.ofNullable(tokenDialect); - return this; - } - - @java.lang.Override - @JsonSetter(value = "token_dialect", nulls = Nulls.SKIP) - public _FinalStage tokenDialect(Optional tokenDialect) { - this.tokenDialect = tokenDialect; - 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. - */ - @java.lang.Override - public _FinalStage tokenLifetime(Integer tokenLifetime) { - this.tokenLifetime = Optional.ofNullable(tokenLifetime); - return this; - } - - /** - *

Expiration value (in seconds) for access tokens issued for this API from the token endpoint.

- */ - @java.lang.Override - @JsonSetter(value = "token_lifetime", nulls = Nulls.SKIP) - public _FinalStage tokenLifetime(Optional tokenLifetime) { - this.tokenLifetime = tokenLifetime; - return this; - } - - /** - *

Whether refresh tokens can be issued for this API (true) or not (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage allowOfflineAccess(Boolean allowOfflineAccess) { - this.allowOfflineAccess = Optional.ofNullable(allowOfflineAccess); - return this; - } - - /** - *

Whether refresh tokens can be issued for this API (true) or not (false).

- */ - @java.lang.Override - @JsonSetter(value = "allow_offline_access", nulls = Nulls.SKIP) - public _FinalStage allowOfflineAccess(Optional allowOfflineAccess) { - this.allowOfflineAccess = allowOfflineAccess; - return this; - } - - /** - *

Secret used to sign tokens when using symmetric algorithms (HS256).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage signingSecret(String signingSecret) { - this.signingSecret = Optional.ofNullable(signingSecret); - return this; - } - - /** - *

Secret used to sign tokens when using symmetric algorithms (HS256).

- */ - @java.lang.Override - @JsonSetter(value = "signing_secret", nulls = Nulls.SKIP) - public _FinalStage signingSecret(Optional signingSecret) { - this.signingSecret = signingSecret; - return this; - } - - @java.lang.Override - public _FinalStage signingAlg(SigningAlgorithmEnum signingAlg) { - this.signingAlg = Optional.ofNullable(signingAlg); - return this; - } - - @java.lang.Override - @JsonSetter(value = "signing_alg", nulls = Nulls.SKIP) - public _FinalStage signingAlg(Optional signingAlg) { - this.signingAlg = signingAlg; - return this; - } - - /** - *

List of permissions (scopes) that this API uses.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage scopes(List scopes) { - this.scopes = Optional.ofNullable(scopes); - return this; - } - - /** - *

List of permissions (scopes) that this API uses.

- */ - @java.lang.Override - @JsonSetter(value = "scopes", nulls = Nulls.SKIP) - public _FinalStage scopes(Optional> scopes) { - this.scopes = scopes; - return this; - } - - /** - *

Friendly name for this resource server. Can not contain < or > characters.

- * @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; - } - - /** - *

Friendly name for this resource server. Can not contain < or > characters.

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateResourceServerRequestContent build() { - return new CreateResourceServerRequestContent( - name, - identifier, - scopes, - signingAlg, - signingSecret, - allowOfflineAccess, - tokenLifetime, - tokenDialect, - skipConsentForVerifiableFirstPartyClients, - enforcePolicies, - tokenEncryption, - consentPolicy, - authorizationDetails, - proofOfPossession, - subjectTypeAuthorization, - 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 deleted file mode 100644 index 67178cce5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateResourceServerResponseContent.java +++ /dev/null @@ -1,742 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateResourceServerResponseContent.Builder.class) -public final class CreateResourceServerResponseContent { - 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 signingSecret; - - private final Optional allowOfflineAccess; - - private final Optional skipConsentForVerifiableFirstPartyClients; - - private final Optional tokenLifetime; - - private final Optional tokenLifetimeForWeb; - - private final Optional enforcePolicies; - - private final Optional tokenDialect; - - private final OptionalNullable tokenEncryption; - - private final OptionalNullable consentPolicy; - - private final Optional> authorizationDetails; - - private final OptionalNullable proofOfPossession; - - private final Optional subjectTypeAuthorization; - - private final Optional clientId; - - private final Map additionalProperties; - - private CreateResourceServerResponseContent( - Optional id, - Optional name, - Optional isSystem, - Optional identifier, - Optional> scopes, - Optional signingAlg, - Optional signingSecret, - Optional allowOfflineAccess, - Optional skipConsentForVerifiableFirstPartyClients, - Optional tokenLifetime, - Optional tokenLifetimeForWeb, - Optional enforcePolicies, - Optional tokenDialect, - OptionalNullable tokenEncryption, - OptionalNullable consentPolicy, - Optional> authorizationDetails, - OptionalNullable proofOfPossession, - Optional subjectTypeAuthorization, - Optional clientId, - Map additionalProperties) { - this.id = id; - this.name = name; - this.isSystem = isSystem; - this.identifier = identifier; - this.scopes = scopes; - this.signingAlg = signingAlg; - this.signingSecret = signingSecret; - this.allowOfflineAccess = allowOfflineAccess; - this.skipConsentForVerifiableFirstPartyClients = skipConsentForVerifiableFirstPartyClients; - this.tokenLifetime = tokenLifetime; - this.tokenLifetimeForWeb = tokenLifetimeForWeb; - this.enforcePolicies = enforcePolicies; - this.tokenDialect = tokenDialect; - this.tokenEncryption = tokenEncryption; - this.consentPolicy = consentPolicy; - this.authorizationDetails = authorizationDetails; - this.proofOfPossession = proofOfPossession; - this.subjectTypeAuthorization = subjectTypeAuthorization; - this.clientId = clientId; - 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 Secret used to sign tokens when using symmetric algorithms (HS256). - */ - @JsonProperty("signing_secret") - public Optional getSigningSecret() { - return signingSecret; - } - - /** - * @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 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; - } - - @JsonProperty("token_dialect") - public Optional getTokenDialect() { - return tokenDialect; - } - - @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; - } - - @JsonProperty("authorization_details") - public Optional> getAuthorizationDetails() { - 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; - } - - /** - * @return The client ID of the client that this resource server is linked to - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @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("proof_of_possession") - private OptionalNullable _getProofOfPossession() { - return proofOfPossession; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateResourceServerResponseContent - && equalTo((CreateResourceServerResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateResourceServerResponseContent 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) - && signingSecret.equals(other.signingSecret) - && allowOfflineAccess.equals(other.allowOfflineAccess) - && skipConsentForVerifiableFirstPartyClients.equals(other.skipConsentForVerifiableFirstPartyClients) - && tokenLifetime.equals(other.tokenLifetime) - && tokenLifetimeForWeb.equals(other.tokenLifetimeForWeb) - && enforcePolicies.equals(other.enforcePolicies) - && tokenDialect.equals(other.tokenDialect) - && tokenEncryption.equals(other.tokenEncryption) - && consentPolicy.equals(other.consentPolicy) - && authorizationDetails.equals(other.authorizationDetails) - && proofOfPossession.equals(other.proofOfPossession) - && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) - && clientId.equals(other.clientId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.isSystem, - this.identifier, - this.scopes, - this.signingAlg, - this.signingSecret, - this.allowOfflineAccess, - this.skipConsentForVerifiableFirstPartyClients, - this.tokenLifetime, - this.tokenLifetimeForWeb, - this.enforcePolicies, - this.tokenDialect, - this.tokenEncryption, - this.consentPolicy, - this.authorizationDetails, - this.proofOfPossession, - this.subjectTypeAuthorization, - this.clientId); - } - - @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 signingSecret = Optional.empty(); - - private Optional allowOfflineAccess = Optional.empty(); - - private Optional skipConsentForVerifiableFirstPartyClients = Optional.empty(); - - private Optional tokenLifetime = Optional.empty(); - - private Optional tokenLifetimeForWeb = Optional.empty(); - - private Optional enforcePolicies = Optional.empty(); - - private Optional tokenDialect = Optional.empty(); - - private OptionalNullable tokenEncryption = OptionalNullable.absent(); - - private OptionalNullable consentPolicy = OptionalNullable.absent(); - - private Optional> authorizationDetails = Optional.empty(); - - private OptionalNullable proofOfPossession = OptionalNullable.absent(); - - private Optional subjectTypeAuthorization = Optional.empty(); - - private Optional clientId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateResourceServerResponseContent other) { - id(other.getId()); - name(other.getName()); - isSystem(other.getIsSystem()); - identifier(other.getIdentifier()); - scopes(other.getScopes()); - signingAlg(other.getSigningAlg()); - signingSecret(other.getSigningSecret()); - allowOfflineAccess(other.getAllowOfflineAccess()); - skipConsentForVerifiableFirstPartyClients(other.getSkipConsentForVerifiableFirstPartyClients()); - tokenLifetime(other.getTokenLifetime()); - tokenLifetimeForWeb(other.getTokenLifetimeForWeb()); - enforcePolicies(other.getEnforcePolicies()); - tokenDialect(other.getTokenDialect()); - tokenEncryption(other.getTokenEncryption()); - consentPolicy(other.getConsentPolicy()); - authorizationDetails(other.getAuthorizationDetails()); - proofOfPossession(other.getProofOfPossession()); - subjectTypeAuthorization(other.getSubjectTypeAuthorization()); - clientId(other.getClientId()); - 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; - } - - /** - *

Secret used to sign tokens when using symmetric algorithms (HS256).

- */ - @JsonSetter(value = "signing_secret", nulls = Nulls.SKIP) - public Builder signingSecret(Optional signingSecret) { - this.signingSecret = signingSecret; - return this; - } - - public Builder signingSecret(String signingSecret) { - this.signingSecret = Optional.ofNullable(signingSecret); - 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 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; - } - - @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 = "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; - } - - @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) - public Builder authorizationDetails(Optional> authorizationDetails) { - this.authorizationDetails = authorizationDetails; - return this; - } - - public Builder authorizationDetails(List authorizationDetails) { - this.authorizationDetails = Optional.ofNullable(authorizationDetails); - 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; - } - - /** - *

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; - } - - public CreateResourceServerResponseContent build() { - return new CreateResourceServerResponseContent( - id, - name, - isSystem, - identifier, - scopes, - signingAlg, - signingSecret, - allowOfflineAccess, - skipConsentForVerifiableFirstPartyClients, - tokenLifetime, - tokenLifetimeForWeb, - enforcePolicies, - tokenDialect, - tokenEncryption, - consentPolicy, - authorizationDetails, - proofOfPossession, - subjectTypeAuthorization, - clientId, - 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 deleted file mode 100644 index 3af2f35e5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateRoleRequestContent.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateRoleRequestContent.Builder.class) -public final class CreateRoleRequestContent { - private final String name; - - private final Optional description; - - private final Map additionalProperties; - - private CreateRoleRequestContent( - String name, Optional description, Map additionalProperties) { - this.name = name; - this.description = description; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of the role. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return Description of the role. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateRoleRequestContent && equalTo((CreateRoleRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateRoleRequestContent other) { - return name.equals(other.name) && description.equals(other.description); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.description); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Name of the role.

- */ - _FinalStage name(@NotNull String name); - - Builder from(CreateRoleRequestContent other); - } - - public interface _FinalStage { - CreateRoleRequestContent build(); - - /** - *

Description of the role.

- */ - _FinalStage description(Optional description); - - _FinalStage description(String description); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; - - private Optional description = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateRoleRequestContent other) { - name(other.getName()); - description(other.getDescription()); - return this; - } - - /** - *

Name of the role.

- *

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; - } - - /** - *

Description of the role.

- * @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; - } - - /** - *

Description of the role.

- */ - @java.lang.Override - @JsonSetter(value = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; - return this; - } - - @java.lang.Override - public CreateRoleRequestContent build() { - return new CreateRoleRequestContent(name, description, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateRoleResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateRoleResponseContent.java deleted file mode 100644 index 63cb8d6cf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateRoleResponseContent.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateRoleResponseContent.Builder.class) -public final class CreateRoleResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional description; - - private final Map additionalProperties; - - private CreateRoleResponseContent( - Optional id, - Optional name, - Optional description, - Map additionalProperties) { - this.id = id; - this.name = name; - this.description = description; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID for this role. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Name of this role. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Description of this role. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateRoleResponseContent && equalTo((CreateRoleResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateRoleResponseContent other) { - return id.equals(other.id) && name.equals(other.name) && description.equals(other.description); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.description); - } - - @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 description = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateRoleResponseContent other) { - id(other.getId()); - name(other.getName()); - description(other.getDescription()); - return this; - } - - /** - *

ID for this role.

- */ - @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; - } - - /** - *

Name of this role.

- */ - @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; - } - - /** - *

Description of this role.

- */ - @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; - } - - public CreateRoleResponseContent build() { - return new CreateRoleResponseContent(id, name, description, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateRuleRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateRuleRequestContent.java deleted file mode 100644 index 7726d91f6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateRuleRequestContent.java +++ /dev/null @@ -1,238 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateRuleRequestContent.Builder.class) -public final class CreateRuleRequestContent { - private final String name; - - private final String script; - - private final Optional order; - - private final Optional enabled; - - private final Map additionalProperties; - - private CreateRuleRequestContent( - String name, - String script, - Optional order, - Optional enabled, - Map additionalProperties) { - this.name = name; - this.script = script; - this.order = order; - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of this rule. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return Code to be executed when this rule runs. - */ - @JsonProperty("script") - public String getScript() { - return script; - } - - /** - * @return Order that this rule should execute in relative to other rules. Lower-valued rules execute first. - */ - @JsonProperty("order") - public Optional getOrder() { - return order; - } - - /** - * @return Whether the rule is enabled (true), or disabled (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateRuleRequestContent && equalTo((CreateRuleRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateRuleRequestContent other) { - return name.equals(other.name) - && script.equals(other.script) - && order.equals(other.order) - && enabled.equals(other.enabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.script, this.order, this.enabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Name of this rule.

- */ - ScriptStage name(@NotNull String name); - - Builder from(CreateRuleRequestContent other); - } - - public interface ScriptStage { - /** - *

Code to be executed when this rule runs.

- */ - _FinalStage script(@NotNull String script); - } - - public interface _FinalStage { - CreateRuleRequestContent build(); - - /** - *

Order that this rule should execute in relative to other rules. Lower-valued rules execute first.

- */ - _FinalStage order(Optional order); - - _FinalStage order(Double order); - - /** - *

Whether the rule is enabled (true), or disabled (false).

- */ - _FinalStage enabled(Optional enabled); - - _FinalStage enabled(Boolean enabled); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, ScriptStage, _FinalStage { - private String name; - - private String script; - - private Optional enabled = Optional.empty(); - - private Optional order = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateRuleRequestContent other) { - name(other.getName()); - script(other.getScript()); - order(other.getOrder()); - enabled(other.getEnabled()); - return this; - } - - /** - *

Name of this rule.

- *

Name of this rule.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public ScriptStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("script") - public _FinalStage script(@NotNull String script) { - this.script = Objects.requireNonNull(script, "script must not be null"); - return this; - } - - /** - *

Whether the rule is enabled (true), or disabled (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage enabled(Boolean enabled) { - this.enabled = Optional.ofNullable(enabled); - return this; - } - - /** - *

Whether the rule is enabled (true), or disabled (false).

- */ - @java.lang.Override - @JsonSetter(value = "enabled", nulls = Nulls.SKIP) - public _FinalStage enabled(Optional enabled) { - this.enabled = enabled; - return this; - } - - /** - *

Order that this rule should execute in relative to other rules. Lower-valued rules execute first.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage order(Double order) { - this.order = Optional.ofNullable(order); - return this; - } - - /** - *

Order that this rule should execute in relative to other rules. Lower-valued rules execute first.

- */ - @java.lang.Override - @JsonSetter(value = "order", nulls = Nulls.SKIP) - public _FinalStage order(Optional order) { - this.order = order; - return this; - } - - @java.lang.Override - public CreateRuleRequestContent build() { - return new CreateRuleRequestContent(name, script, order, enabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateRuleResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateRuleResponseContent.java deleted file mode 100644 index 5b3dc4157..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateRuleResponseContent.java +++ /dev/null @@ -1,253 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateRuleResponseContent.Builder.class) -public final class CreateRuleResponseContent { - private final Optional name; - - private final Optional id; - - private final Optional enabled; - - private final Optional script; - - private final Optional order; - - private final Optional stage; - - private final Map additionalProperties; - - private CreateRuleResponseContent( - Optional name, - Optional id, - Optional enabled, - Optional script, - Optional order, - Optional stage, - Map additionalProperties) { - this.name = name; - this.id = id; - this.enabled = enabled; - this.script = script; - this.order = order; - this.stage = stage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of this rule. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return ID of this rule. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Whether the rule is enabled (true), or disabled (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Code to be executed when this rule runs. - */ - @JsonProperty("script") - public Optional getScript() { - return script; - } - - /** - * @return Order that this rule should execute in relative to other rules. Lower-valued rules execute first. - */ - @JsonProperty("order") - public Optional getOrder() { - return order; - } - - /** - * @return Execution stage of this rule. Can be login_success, login_failure, or pre_authorize. - */ - @JsonProperty("stage") - public Optional getStage() { - return stage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateRuleResponseContent && equalTo((CreateRuleResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateRuleResponseContent other) { - return name.equals(other.name) - && id.equals(other.id) - && enabled.equals(other.enabled) - && script.equals(other.script) - && order.equals(other.order) - && stage.equals(other.stage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.id, this.enabled, this.script, this.order, this.stage); - } - - @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 id = Optional.empty(); - - private Optional enabled = Optional.empty(); - - private Optional script = Optional.empty(); - - private Optional order = Optional.empty(); - - private Optional stage = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateRuleResponseContent other) { - name(other.getName()); - id(other.getId()); - enabled(other.getEnabled()); - script(other.getScript()); - order(other.getOrder()); - stage(other.getStage()); - return this; - } - - /** - *

Name of this rule.

- */ - @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; - } - - /** - *

ID of this rule.

- */ - @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; - } - - /** - *

Whether the rule is enabled (true), or disabled (false).

- */ - @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; - } - - /** - *

Code to be executed when this rule runs.

- */ - @JsonSetter(value = "script", nulls = Nulls.SKIP) - public Builder script(Optional script) { - this.script = script; - return this; - } - - public Builder script(String script) { - this.script = Optional.ofNullable(script); - return this; - } - - /** - *

Order that this rule should execute in relative to other rules. Lower-valued rules execute first.

- */ - @JsonSetter(value = "order", nulls = Nulls.SKIP) - public Builder order(Optional order) { - this.order = order; - return this; - } - - public Builder order(Double order) { - this.order = Optional.ofNullable(order); - return this; - } - - /** - *

Execution stage of this rule. Can be login_success, login_failure, or pre_authorize.

- */ - @JsonSetter(value = "stage", nulls = Nulls.SKIP) - public Builder stage(Optional stage) { - this.stage = stage; - return this; - } - - public Builder stage(String stage) { - this.stage = Optional.ofNullable(stage); - return this; - } - - public CreateRuleResponseContent build() { - return new CreateRuleResponseContent(name, id, enabled, script, order, stage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateScimConfigurationRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateScimConfigurationRequestContent.java deleted file mode 100644 index bc9639641..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateScimConfigurationRequestContent.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateScimConfigurationRequestContent.Builder.class) -public final class CreateScimConfigurationRequestContent { - private final Optional userIdAttribute; - - private final Optional> mapping; - - private final Map additionalProperties; - - private CreateScimConfigurationRequestContent( - Optional userIdAttribute, - Optional> mapping, - Map additionalProperties) { - this.userIdAttribute = userIdAttribute; - this.mapping = mapping; - this.additionalProperties = additionalProperties; - } - - /** - * @return User ID attribute for generating unique user ids - */ - @JsonProperty("user_id_attribute") - public Optional getUserIdAttribute() { - return userIdAttribute; - } - - /** - * @return The mapping between auth0 and SCIM - */ - @JsonProperty("mapping") - public Optional> getMapping() { - return mapping; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateScimConfigurationRequestContent - && equalTo((CreateScimConfigurationRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateScimConfigurationRequestContent other) { - return userIdAttribute.equals(other.userIdAttribute) && mapping.equals(other.mapping); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.userIdAttribute, this.mapping); - } - - @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 userIdAttribute = Optional.empty(); - - private Optional> mapping = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateScimConfigurationRequestContent other) { - userIdAttribute(other.getUserIdAttribute()); - mapping(other.getMapping()); - return this; - } - - /** - *

User ID attribute for generating unique user ids

- */ - @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; - } - - /** - *

The mapping between auth0 and SCIM

- */ - @JsonSetter(value = "mapping", nulls = Nulls.SKIP) - public Builder mapping(Optional> mapping) { - this.mapping = mapping; - return this; - } - - public Builder mapping(List mapping) { - this.mapping = Optional.ofNullable(mapping); - return this; - } - - public CreateScimConfigurationRequestContent build() { - return new CreateScimConfigurationRequestContent(userIdAttribute, mapping, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateScimConfigurationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateScimConfigurationResponseContent.java deleted file mode 100644 index d9e4761b9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateScimConfigurationResponseContent.java +++ /dev/null @@ -1,332 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateScimConfigurationResponseContent.Builder.class) -public final class CreateScimConfigurationResponseContent { - private final Optional connectionId; - - private final Optional connectionName; - - private final Optional strategy; - - private final Optional tenantName; - - private final Optional userIdAttribute; - - private final Optional> mapping; - - private final Optional createdAt; - - private final Optional updatedOn; - - private final Map additionalProperties; - - private CreateScimConfigurationResponseContent( - Optional connectionId, - Optional connectionName, - Optional strategy, - Optional tenantName, - Optional userIdAttribute, - Optional> mapping, - Optional createdAt, - Optional updatedOn, - Map additionalProperties) { - this.connectionId = connectionId; - this.connectionName = connectionName; - this.strategy = strategy; - this.tenantName = tenantName; - this.userIdAttribute = userIdAttribute; - this.mapping = mapping; - this.createdAt = createdAt; - this.updatedOn = updatedOn; - this.additionalProperties = additionalProperties; - } - - /** - * @return The connection's identifier - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - /** - * @return The connection's identifier - */ - @JsonProperty("connection_name") - public Optional getConnectionName() { - return connectionName; - } - - /** - * @return The connection's strategy - */ - @JsonProperty("strategy") - public Optional getStrategy() { - return strategy; - } - - /** - * @return The tenant's name - */ - @JsonProperty("tenant_name") - public Optional getTenantName() { - return tenantName; - } - - /** - * @return User ID attribute for generating unique user ids - */ - @JsonProperty("user_id_attribute") - public Optional getUserIdAttribute() { - return userIdAttribute; - } - - /** - * @return The mapping between auth0 and SCIM - */ - @JsonProperty("mapping") - public Optional> getMapping() { - return mapping; - } - - /** - * @return The Date Time Scim Configuration was created - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The Date Time Scim Configuration was last updated - */ - @JsonProperty("updated_on") - public Optional getUpdatedOn() { - return updatedOn; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateScimConfigurationResponseContent - && equalTo((CreateScimConfigurationResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateScimConfigurationResponseContent other) { - return connectionId.equals(other.connectionId) - && connectionName.equals(other.connectionName) - && strategy.equals(other.strategy) - && tenantName.equals(other.tenantName) - && userIdAttribute.equals(other.userIdAttribute) - && mapping.equals(other.mapping) - && createdAt.equals(other.createdAt) - && updatedOn.equals(other.updatedOn); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.connectionName, - this.strategy, - this.tenantName, - this.userIdAttribute, - this.mapping, - this.createdAt, - this.updatedOn); - } - - @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 connectionId = Optional.empty(); - - private Optional connectionName = Optional.empty(); - - private Optional strategy = Optional.empty(); - - private Optional tenantName = Optional.empty(); - - private Optional userIdAttribute = Optional.empty(); - - private Optional> mapping = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedOn = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateScimConfigurationResponseContent other) { - connectionId(other.getConnectionId()); - connectionName(other.getConnectionName()); - strategy(other.getStrategy()); - tenantName(other.getTenantName()); - userIdAttribute(other.getUserIdAttribute()); - mapping(other.getMapping()); - createdAt(other.getCreatedAt()); - updatedOn(other.getUpdatedOn()); - return this; - } - - /** - *

The connection's identifier

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - return this; - } - - /** - *

The connection's identifier

- */ - @JsonSetter(value = "connection_name", nulls = Nulls.SKIP) - public Builder connectionName(Optional connectionName) { - this.connectionName = connectionName; - return this; - } - - public Builder connectionName(String connectionName) { - this.connectionName = Optional.ofNullable(connectionName); - return this; - } - - /** - *

The connection's strategy

- */ - @JsonSetter(value = "strategy", nulls = Nulls.SKIP) - public Builder strategy(Optional strategy) { - this.strategy = strategy; - return this; - } - - public Builder strategy(String strategy) { - this.strategy = Optional.ofNullable(strategy); - return this; - } - - /** - *

The tenant's name

- */ - @JsonSetter(value = "tenant_name", nulls = Nulls.SKIP) - public Builder tenantName(Optional tenantName) { - this.tenantName = tenantName; - return this; - } - - public Builder tenantName(String tenantName) { - this.tenantName = Optional.ofNullable(tenantName); - return this; - } - - /** - *

User ID attribute for generating unique user ids

- */ - @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; - } - - /** - *

The mapping between auth0 and SCIM

- */ - @JsonSetter(value = "mapping", nulls = Nulls.SKIP) - public Builder mapping(Optional> mapping) { - this.mapping = mapping; - return this; - } - - public Builder mapping(List mapping) { - this.mapping = Optional.ofNullable(mapping); - return this; - } - - /** - *

The Date Time Scim Configuration was created

- */ - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(String createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - /** - *

The Date Time Scim Configuration was last updated

- */ - @JsonSetter(value = "updated_on", nulls = Nulls.SKIP) - public Builder updatedOn(Optional updatedOn) { - this.updatedOn = updatedOn; - return this; - } - - public Builder updatedOn(String updatedOn) { - this.updatedOn = Optional.ofNullable(updatedOn); - return this; - } - - public CreateScimConfigurationResponseContent build() { - return new CreateScimConfigurationResponseContent( - connectionId, - connectionName, - strategy, - tenantName, - userIdAttribute, - mapping, - createdAt, - updatedOn, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateScimTokenResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateScimTokenResponseContent.java deleted file mode 100644 index 8eaff6e57..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateScimTokenResponseContent.java +++ /dev/null @@ -1,225 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateScimTokenResponseContent.Builder.class) -public final class CreateScimTokenResponseContent { - private final Optional tokenId; - - private final Optional token; - - private final Optional> scopes; - - private final Optional createdAt; - - private final Optional validUntil; - - private final Map additionalProperties; - - private CreateScimTokenResponseContent( - Optional tokenId, - Optional token, - Optional> scopes, - Optional createdAt, - Optional validUntil, - Map additionalProperties) { - this.tokenId = tokenId; - this.token = token; - this.scopes = scopes; - this.createdAt = createdAt; - this.validUntil = validUntil; - this.additionalProperties = additionalProperties; - } - - /** - * @return The token's identifier - */ - @JsonProperty("token_id") - public Optional getTokenId() { - return tokenId; - } - - /** - * @return The scim client's token - */ - @JsonProperty("token") - public Optional getToken() { - return token; - } - - /** - * @return The scopes of the scim token - */ - @JsonProperty("scopes") - public Optional> getScopes() { - return scopes; - } - - /** - * @return The token's created at timestamp - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The token's valid until at timestamp - */ - @JsonProperty("valid_until") - public Optional getValidUntil() { - return validUntil; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateScimTokenResponseContent && equalTo((CreateScimTokenResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateScimTokenResponseContent other) { - return tokenId.equals(other.tokenId) - && token.equals(other.token) - && scopes.equals(other.scopes) - && createdAt.equals(other.createdAt) - && validUntil.equals(other.validUntil); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.tokenId, this.token, this.scopes, this.createdAt, this.validUntil); - } - - @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 tokenId = Optional.empty(); - - private Optional token = Optional.empty(); - - private Optional> scopes = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional validUntil = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateScimTokenResponseContent other) { - tokenId(other.getTokenId()); - token(other.getToken()); - scopes(other.getScopes()); - createdAt(other.getCreatedAt()); - validUntil(other.getValidUntil()); - return this; - } - - /** - *

The token's identifier

- */ - @JsonSetter(value = "token_id", nulls = Nulls.SKIP) - public Builder tokenId(Optional tokenId) { - this.tokenId = tokenId; - return this; - } - - public Builder tokenId(String tokenId) { - this.tokenId = Optional.ofNullable(tokenId); - return this; - } - - /** - *

The scim client's token

- */ - @JsonSetter(value = "token", nulls = Nulls.SKIP) - public Builder token(Optional token) { - this.token = token; - return this; - } - - public Builder token(String token) { - this.token = Optional.ofNullable(token); - return this; - } - - /** - *

The scopes of the scim token

- */ - @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; - } - - /** - *

The token's created at timestamp

- */ - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(String createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - /** - *

The token's valid until at timestamp

- */ - @JsonSetter(value = "valid_until", nulls = Nulls.SKIP) - public Builder validUntil(Optional validUntil) { - this.validUntil = validUntil; - return this; - } - - public Builder validUntil(String validUntil) { - this.validUntil = Optional.ofNullable(validUntil); - return this; - } - - public CreateScimTokenResponseContent build() { - return new CreateScimTokenResponseContent( - tokenId, token, scopes, createdAt, validUntil, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileRequestContent.java deleted file mode 100644 index 565c957f7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileRequestContent.java +++ /dev/null @@ -1,334 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateSelfServiceProfileRequestContent.Builder.class) -public final class CreateSelfServiceProfileRequestContent { - private final String name; - - private final Optional description; - - private final Optional branding; - - private final Optional> allowedStrategies; - - private final Optional> userAttributes; - - private final Optional userAttributeProfileId; - - private final Map additionalProperties; - - private CreateSelfServiceProfileRequestContent( - String name, - Optional description, - Optional branding, - Optional> allowedStrategies, - Optional> userAttributes, - Optional userAttributeProfileId, - Map additionalProperties) { - this.name = name; - this.description = description; - this.branding = branding; - this.allowedStrategies = allowedStrategies; - this.userAttributes = userAttributes; - this.userAttributeProfileId = userAttributeProfileId; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the self-service Profile. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return The description of the self-service Profile. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - @JsonProperty("branding") - public Optional getBranding() { - return branding; - } - - /** - * @return List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, keycloak-samlp, pingfederate] - */ - @JsonProperty("allowed_strategies") - public Optional> getAllowedStrategies() { - return allowedStrategies; - } - - /** - * @return List of attributes to be mapped that will be shown to the user during the SS-SSO flow. - */ - @JsonProperty("user_attributes") - public Optional> getUserAttributes() { - return userAttributes; - } - - /** - * @return ID of the user-attribute-profile to associate with this self-service profile. - */ - @JsonProperty("user_attribute_profile_id") - public Optional getUserAttributeProfileId() { - return userAttributeProfileId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateSelfServiceProfileRequestContent - && equalTo((CreateSelfServiceProfileRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateSelfServiceProfileRequestContent other) { - return name.equals(other.name) - && description.equals(other.description) - && branding.equals(other.branding) - && allowedStrategies.equals(other.allowedStrategies) - && userAttributes.equals(other.userAttributes) - && userAttributeProfileId.equals(other.userAttributeProfileId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.description, - this.branding, - this.allowedStrategies, - this.userAttributes, - this.userAttributeProfileId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

The name of the self-service Profile.

- */ - _FinalStage name(@NotNull String name); - - Builder from(CreateSelfServiceProfileRequestContent other); - } - - public interface _FinalStage { - CreateSelfServiceProfileRequestContent build(); - - /** - *

The description of the self-service Profile.

- */ - _FinalStage description(Optional description); - - _FinalStage description(String description); - - _FinalStage branding(Optional branding); - - _FinalStage branding(SelfServiceProfileBrandingProperties branding); - - /** - *

List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, keycloak-samlp, pingfederate]

- */ - _FinalStage allowedStrategies(Optional> allowedStrategies); - - _FinalStage allowedStrategies(List allowedStrategies); - - /** - *

List of attributes to be mapped that will be shown to the user during the SS-SSO flow.

- */ - _FinalStage userAttributes(Optional> userAttributes); - - _FinalStage userAttributes(List userAttributes); - - /** - *

ID of the user-attribute-profile to associate with this self-service profile.

- */ - _FinalStage userAttributeProfileId(Optional userAttributeProfileId); - - _FinalStage userAttributeProfileId(String userAttributeProfileId); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; - - private Optional userAttributeProfileId = Optional.empty(); - - private Optional> userAttributes = Optional.empty(); - - private Optional> allowedStrategies = Optional.empty(); - - private Optional branding = Optional.empty(); - - private Optional description = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateSelfServiceProfileRequestContent other) { - name(other.getName()); - description(other.getDescription()); - branding(other.getBranding()); - allowedStrategies(other.getAllowedStrategies()); - userAttributes(other.getUserAttributes()); - userAttributeProfileId(other.getUserAttributeProfileId()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("name") - public _FinalStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - /** - *

ID of the user-attribute-profile to associate with this self-service profile.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage userAttributeProfileId(String userAttributeProfileId) { - this.userAttributeProfileId = Optional.ofNullable(userAttributeProfileId); - return this; - } - - /** - *

ID of the user-attribute-profile to associate with this self-service profile.

- */ - @java.lang.Override - @JsonSetter(value = "user_attribute_profile_id", nulls = Nulls.SKIP) - public _FinalStage userAttributeProfileId(Optional userAttributeProfileId) { - this.userAttributeProfileId = userAttributeProfileId; - return this; - } - - /** - *

List of attributes to be mapped that will be shown to the user during the SS-SSO flow.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage userAttributes(List userAttributes) { - this.userAttributes = Optional.ofNullable(userAttributes); - return this; - } - - /** - *

List of attributes to be mapped that will be shown to the user during the SS-SSO flow.

- */ - @java.lang.Override - @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) - public _FinalStage userAttributes(Optional> userAttributes) { - this.userAttributes = userAttributes; - return this; - } - - /** - *

List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, keycloak-samlp, pingfederate]

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage allowedStrategies(List allowedStrategies) { - this.allowedStrategies = Optional.ofNullable(allowedStrategies); - return this; - } - - /** - *

List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, keycloak-samlp, pingfederate]

- */ - @java.lang.Override - @JsonSetter(value = "allowed_strategies", nulls = Nulls.SKIP) - public _FinalStage allowedStrategies(Optional> allowedStrategies) { - this.allowedStrategies = allowedStrategies; - return this; - } - - @java.lang.Override - public _FinalStage branding(SelfServiceProfileBrandingProperties 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; - } - - /** - *

The description of the self-service Profile.

- * @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; - } - - /** - *

The description of the self-service Profile.

- */ - @java.lang.Override - @JsonSetter(value = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; - return this; - } - - @java.lang.Override - public CreateSelfServiceProfileRequestContent build() { - return new CreateSelfServiceProfileRequestContent( - name, - description, - branding, - allowedStrategies, - userAttributes, - userAttributeProfileId, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileResponseContent.java deleted file mode 100644 index 970cdd8e3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileResponseContent.java +++ /dev/null @@ -1,359 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = CreateSelfServiceProfileResponseContent.Builder.class) -public final class CreateSelfServiceProfileResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional description; - - private final Optional> userAttributes; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional branding; - - private final Optional> allowedStrategies; - - private final Optional userAttributeProfileId; - - private final Map additionalProperties; - - private CreateSelfServiceProfileResponseContent( - Optional id, - Optional name, - Optional description, - Optional> userAttributes, - Optional createdAt, - Optional updatedAt, - Optional branding, - Optional> allowedStrategies, - Optional userAttributeProfileId, - Map additionalProperties) { - this.id = id; - this.name = name; - this.description = description; - this.userAttributes = userAttributes; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.branding = branding; - this.allowedStrategies = allowedStrategies; - this.userAttributeProfileId = userAttributeProfileId; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the self-service Profile. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the self-service Profile. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The description of the self-service Profile. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - /** - * @return List of attributes to be mapped that will be shown to the user during the SS-SSO flow. - */ - @JsonProperty("user_attributes") - public Optional> getUserAttributes() { - return userAttributes; - } - - /** - * @return The time when this self-service Profile was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when this self-service Profile was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("branding") - public Optional getBranding() { - return branding; - } - - /** - * @return List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, keycloak-samlp, pingfederate] - */ - @JsonProperty("allowed_strategies") - public Optional> getAllowedStrategies() { - return allowedStrategies; - } - - /** - * @return ID of the user-attribute-profile to associate with this self-service profile. - */ - @JsonProperty("user_attribute_profile_id") - public Optional getUserAttributeProfileId() { - return userAttributeProfileId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateSelfServiceProfileResponseContent - && equalTo((CreateSelfServiceProfileResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateSelfServiceProfileResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && description.equals(other.description) - && userAttributes.equals(other.userAttributes) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && branding.equals(other.branding) - && allowedStrategies.equals(other.allowedStrategies) - && userAttributeProfileId.equals(other.userAttributeProfileId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.description, - this.userAttributes, - this.createdAt, - this.updatedAt, - this.branding, - this.allowedStrategies, - this.userAttributeProfileId); - } - - @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 description = Optional.empty(); - - private Optional> userAttributes = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional branding = Optional.empty(); - - private Optional> allowedStrategies = Optional.empty(); - - private Optional userAttributeProfileId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateSelfServiceProfileResponseContent other) { - id(other.getId()); - name(other.getName()); - description(other.getDescription()); - userAttributes(other.getUserAttributes()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - branding(other.getBranding()); - allowedStrategies(other.getAllowedStrategies()); - userAttributeProfileId(other.getUserAttributeProfileId()); - return this; - } - - /** - *

The unique ID of the self-service Profile.

- */ - @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 the self-service Profile.

- */ - @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 description of the self-service Profile.

- */ - @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; - } - - /** - *

List of attributes to be mapped that will be shown to the user during the SS-SSO flow.

- */ - @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) - public Builder userAttributes(Optional> userAttributes) { - this.userAttributes = userAttributes; - return this; - } - - public Builder userAttributes(List userAttributes) { - this.userAttributes = Optional.ofNullable(userAttributes); - return this; - } - - /** - *

The time when this self-service Profile 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 time when this self-service Profile was 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; - } - - @JsonSetter(value = "branding", nulls = Nulls.SKIP) - public Builder branding(Optional branding) { - this.branding = branding; - return this; - } - - public Builder branding(SelfServiceProfileBrandingProperties branding) { - this.branding = Optional.ofNullable(branding); - return this; - } - - /** - *

List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, keycloak-samlp, pingfederate]

- */ - @JsonSetter(value = "allowed_strategies", nulls = Nulls.SKIP) - public Builder allowedStrategies(Optional> allowedStrategies) { - this.allowedStrategies = allowedStrategies; - return this; - } - - public Builder allowedStrategies(List allowedStrategies) { - this.allowedStrategies = Optional.ofNullable(allowedStrategies); - return this; - } - - /** - *

ID of the user-attribute-profile to associate with this self-service profile.

- */ - @JsonSetter(value = "user_attribute_profile_id", nulls = Nulls.SKIP) - public Builder userAttributeProfileId(Optional userAttributeProfileId) { - this.userAttributeProfileId = userAttributeProfileId; - return this; - } - - public Builder userAttributeProfileId(String userAttributeProfileId) { - this.userAttributeProfileId = Optional.ofNullable(userAttributeProfileId); - return this; - } - - public CreateSelfServiceProfileResponseContent build() { - return new CreateSelfServiceProfileResponseContent( - id, - name, - description, - userAttributes, - createdAt, - updatedAt, - branding, - allowedStrategies, - userAttributeProfileId, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileSsoTicketResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileSsoTicketResponseContent.java deleted file mode 100644 index 3258ba8b2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateSelfServiceProfileSsoTicketResponseContent.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateSelfServiceProfileSsoTicketResponseContent.Builder.class) -public final class CreateSelfServiceProfileSsoTicketResponseContent { - private final Optional ticket; - - private final Map additionalProperties; - - private CreateSelfServiceProfileSsoTicketResponseContent( - Optional ticket, Map additionalProperties) { - this.ticket = ticket; - this.additionalProperties = additionalProperties; - } - - /** - * @return The URL for the created ticket. - */ - @JsonProperty("ticket") - public Optional getTicket() { - return ticket; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateSelfServiceProfileSsoTicketResponseContent - && equalTo((CreateSelfServiceProfileSsoTicketResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateSelfServiceProfileSsoTicketResponseContent other) { - return ticket.equals(other.ticket); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.ticket); - } - - @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 ticket = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateSelfServiceProfileSsoTicketResponseContent other) { - ticket(other.getTicket()); - return this; - } - - /** - *

The URL for the created ticket.

- */ - @JsonSetter(value = "ticket", nulls = Nulls.SKIP) - public Builder ticket(Optional ticket) { - this.ticket = ticket; - return this; - } - - public Builder ticket(String ticket) { - this.ticket = Optional.ofNullable(ticket); - return this; - } - - public CreateSelfServiceProfileSsoTicketResponseContent build() { - return new CreateSelfServiceProfileSsoTicketResponseContent(ticket, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateTokenExchangeProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateTokenExchangeProfileRequestContent.java deleted file mode 100644 index 44077540b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateTokenExchangeProfileRequestContent.java +++ /dev/null @@ -1,212 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateTokenExchangeProfileRequestContent.Builder.class) -public final class CreateTokenExchangeProfileRequestContent { - private final String name; - - private final String subjectTokenType; - - private final String actionId; - - private final TokenExchangeProfileTypeEnum type; - - private final Map additionalProperties; - - private CreateTokenExchangeProfileRequestContent( - String name, - String subjectTokenType, - String actionId, - TokenExchangeProfileTypeEnum type, - Map additionalProperties) { - this.name = name; - this.subjectTokenType = subjectTokenType; - this.actionId = actionId; - this.type = type; - this.additionalProperties = additionalProperties; - } - - /** - * @return Friendly name of this profile. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return 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. - */ - @JsonProperty("subject_token_type") - public String getSubjectTokenType() { - return subjectTokenType; - } - - /** - * @return 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. - */ - @JsonProperty("action_id") - public String getActionId() { - return actionId; - } - - @JsonProperty("type") - public TokenExchangeProfileTypeEnum getType() { - return type; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateTokenExchangeProfileRequestContent - && equalTo((CreateTokenExchangeProfileRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateTokenExchangeProfileRequestContent other) { - return name.equals(other.name) - && subjectTokenType.equals(other.subjectTokenType) - && actionId.equals(other.actionId) - && type.equals(other.type); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.subjectTokenType, this.actionId, this.type); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Friendly name of this profile.

- */ - SubjectTokenTypeStage name(@NotNull String name); - - Builder from(CreateTokenExchangeProfileRequestContent other); - } - - public interface SubjectTokenTypeStage { - /** - *

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.

- */ - ActionIdStage subjectTokenType(@NotNull String subjectTokenType); - } - - public interface ActionIdStage { - /** - *

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.

- */ - TypeStage actionId(@NotNull String actionId); - } - - public interface TypeStage { - _FinalStage type(@NotNull TokenExchangeProfileTypeEnum type); - } - - public interface _FinalStage { - CreateTokenExchangeProfileRequestContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements NameStage, SubjectTokenTypeStage, ActionIdStage, TypeStage, _FinalStage { - private String name; - - private String subjectTokenType; - - private String actionId; - - private TokenExchangeProfileTypeEnum type; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateTokenExchangeProfileRequestContent other) { - name(other.getName()); - subjectTokenType(other.getSubjectTokenType()); - actionId(other.getActionId()); - type(other.getType()); - return this; - } - - /** - *

Friendly name of this profile.

- *

Friendly name of this profile.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public SubjectTokenTypeStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("subject_token_type") - public ActionIdStage subjectTokenType(@NotNull String subjectTokenType) { - this.subjectTokenType = Objects.requireNonNull(subjectTokenType, "subjectTokenType must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("action_id") - public TypeStage actionId(@NotNull String actionId) { - this.actionId = Objects.requireNonNull(actionId, "actionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull TokenExchangeProfileTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public CreateTokenExchangeProfileRequestContent build() { - return new CreateTokenExchangeProfileRequestContent( - name, subjectTokenType, actionId, type, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateTokenExchangeProfileResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateTokenExchangeProfileResponseContent.java deleted file mode 100644 index 523fd9510..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateTokenExchangeProfileResponseContent.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = CreateTokenExchangeProfileResponseContent.Builder.class) -public final class CreateTokenExchangeProfileResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional subjectTokenType; - - private final Optional actionId; - - private final Optional type; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private CreateTokenExchangeProfileResponseContent( - Optional id, - Optional name, - Optional subjectTokenType, - Optional actionId, - Optional type, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.subjectTokenType = subjectTokenType; - this.actionId = actionId; - this.type = type; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the token exchange profile. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Friendly name of this profile. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return 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. - */ - @JsonProperty("subject_token_type") - public Optional getSubjectTokenType() { - return subjectTokenType; - } - - /** - * @return 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. - */ - @JsonProperty("action_id") - public Optional getActionId() { - return actionId; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return The time when this profile was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when this profile was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateTokenExchangeProfileResponseContent - && equalTo((CreateTokenExchangeProfileResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateTokenExchangeProfileResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && subjectTokenType.equals(other.subjectTokenType) - && actionId.equals(other.actionId) - && type.equals(other.type) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.name, this.subjectTokenType, this.actionId, this.type, this.createdAt, this.updatedAt); - } - - @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 subjectTokenType = Optional.empty(); - - private Optional actionId = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateTokenExchangeProfileResponseContent other) { - id(other.getId()); - name(other.getName()); - subjectTokenType(other.getSubjectTokenType()); - actionId(other.getActionId()); - type(other.getType()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

The unique ID of the token exchange profile.

- */ - @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 of this profile.

- */ - @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; - } - - /** - *

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.

- */ - @JsonSetter(value = "subject_token_type", nulls = Nulls.SKIP) - public Builder subjectTokenType(Optional subjectTokenType) { - this.subjectTokenType = subjectTokenType; - return this; - } - - public Builder subjectTokenType(String subjectTokenType) { - this.subjectTokenType = Optional.ofNullable(subjectTokenType); - return this; - } - - /** - *

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.

- */ - @JsonSetter(value = "action_id", nulls = Nulls.SKIP) - public Builder actionId(Optional actionId) { - this.actionId = actionId; - return this; - } - - public Builder actionId(String actionId) { - this.actionId = Optional.ofNullable(actionId); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(TokenExchangeProfileTypeEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

The time when this profile 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 time when this profile was 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; - } - - public CreateTokenExchangeProfileResponseContent build() { - return new CreateTokenExchangeProfileResponseContent( - id, name, subjectTokenType, actionId, type, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateTokenQuota.java b/src/main/java/com/auth0/client/mgmt/types/CreateTokenQuota.java deleted file mode 100644 index 6e97155ff..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateTokenQuota.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CreateTokenQuota.Builder.class) -public final class CreateTokenQuota { - private final TokenQuotaClientCredentials clientCredentials; - - private final Map additionalProperties; - - private CreateTokenQuota(TokenQuotaClientCredentials clientCredentials, Map additionalProperties) { - this.clientCredentials = clientCredentials; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_credentials") - public TokenQuotaClientCredentials getClientCredentials() { - return clientCredentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateTokenQuota && equalTo((CreateTokenQuota) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateTokenQuota other) { - return clientCredentials.equals(other.clientCredentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.clientCredentials); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ClientCredentialsStage builder() { - return new Builder(); - } - - public interface ClientCredentialsStage { - _FinalStage clientCredentials(@NotNull TokenQuotaClientCredentials clientCredentials); - - Builder from(CreateTokenQuota other); - } - - public interface _FinalStage { - CreateTokenQuota build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ClientCredentialsStage, _FinalStage { - private TokenQuotaClientCredentials clientCredentials; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateTokenQuota other) { - clientCredentials(other.getClientCredentials()); - return this; - } - - @java.lang.Override - @JsonSetter("client_credentials") - public _FinalStage clientCredentials(@NotNull TokenQuotaClientCredentials clientCredentials) { - this.clientCredentials = Objects.requireNonNull(clientCredentials, "clientCredentials must not be null"); - return this; - } - - @java.lang.Override - public CreateTokenQuota build() { - return new CreateTokenQuota(clientCredentials, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateUserAttributeProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateUserAttributeProfileRequestContent.java deleted file mode 100644 index 8f884ed88..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateUserAttributeProfileRequestContent.java +++ /dev/null @@ -1,183 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateUserAttributeProfileRequestContent.Builder.class) -public final class CreateUserAttributeProfileRequestContent { - private final String name; - - private final Optional userId; - - private final Map userAttributes; - - private final Map additionalProperties; - - private CreateUserAttributeProfileRequestContent( - String name, - Optional userId, - Map userAttributes, - Map additionalProperties) { - this.name = name; - this.userId = userId; - this.userAttributes = userAttributes; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - @JsonProperty("user_attributes") - public Map getUserAttributes() { - return userAttributes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateUserAttributeProfileRequestContent - && equalTo((CreateUserAttributeProfileRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateUserAttributeProfileRequestContent other) { - return name.equals(other.name) && userId.equals(other.userId) && userAttributes.equals(other.userAttributes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.userId, this.userAttributes); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - _FinalStage name(@NotNull String name); - - Builder from(CreateUserAttributeProfileRequestContent other); - } - - public interface _FinalStage { - CreateUserAttributeProfileRequestContent build(); - - _FinalStage userId(Optional userId); - - _FinalStage userId(UserAttributeProfileUserId userId); - - _FinalStage userAttributes(Map userAttributes); - - _FinalStage putAllUserAttributes( - Map userAttributes); - - _FinalStage userAttributes(String key, UserAttributeProfileUserAttributeAdditionalProperties value); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; - - private Map userAttributes = - new LinkedHashMap<>(); - - private Optional userId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateUserAttributeProfileRequestContent other) { - name(other.getName()); - userId(other.getUserId()); - userAttributes(other.getUserAttributes()); - return this; - } - - @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 userAttributes(String key, UserAttributeProfileUserAttributeAdditionalProperties value) { - this.userAttributes.put(key, value); - return this; - } - - @java.lang.Override - public _FinalStage putAllUserAttributes( - Map userAttributes) { - if (userAttributes != null) { - this.userAttributes.putAll(userAttributes); - } - return this; - } - - @java.lang.Override - @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) - public _FinalStage userAttributes( - Map userAttributes) { - this.userAttributes.clear(); - if (userAttributes != null) { - this.userAttributes.putAll(userAttributes); - } - return this; - } - - @java.lang.Override - public _FinalStage userId(UserAttributeProfileUserId userId) { - this.userId = Optional.ofNullable(userId); - return this; - } - - @java.lang.Override - @JsonSetter(value = "user_id", nulls = Nulls.SKIP) - public _FinalStage userId(Optional userId) { - this.userId = userId; - return this; - } - - @java.lang.Override - public CreateUserAttributeProfileRequestContent build() { - return new CreateUserAttributeProfileRequestContent(name, userId, userAttributes, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateUserAttributeProfileResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateUserAttributeProfileResponseContent.java deleted file mode 100644 index 2f7a2701e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateUserAttributeProfileResponseContent.java +++ /dev/null @@ -1,174 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateUserAttributeProfileResponseContent.Builder.class) -public final class CreateUserAttributeProfileResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional userId; - - private final Optional> userAttributes; - - private final Map additionalProperties; - - private CreateUserAttributeProfileResponseContent( - Optional id, - Optional name, - Optional userId, - Optional> userAttributes, - Map additionalProperties) { - this.id = id; - this.name = name; - this.userId = userId; - this.userAttributes = userAttributes; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - @JsonProperty("user_attributes") - public Optional> getUserAttributes() { - return userAttributes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateUserAttributeProfileResponseContent - && equalTo((CreateUserAttributeProfileResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateUserAttributeProfileResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && userId.equals(other.userId) - && userAttributes.equals(other.userAttributes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.userId, this.userAttributes); - } - - @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 userId = Optional.empty(); - - private Optional> userAttributes = - Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateUserAttributeProfileResponseContent other) { - id(other.getId()); - name(other.getName()); - userId(other.getUserId()); - userAttributes(other.getUserAttributes()); - 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 = "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 = "user_id", nulls = Nulls.SKIP) - public Builder userId(Optional userId) { - this.userId = userId; - return this; - } - - public Builder userId(UserAttributeProfileUserId userId) { - this.userId = Optional.ofNullable(userId); - return this; - } - - @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) - public Builder userAttributes( - Optional> userAttributes) { - this.userAttributes = userAttributes; - return this; - } - - public Builder userAttributes( - Map userAttributes) { - this.userAttributes = Optional.ofNullable(userAttributes); - return this; - } - - public CreateUserAttributeProfileResponseContent build() { - return new CreateUserAttributeProfileResponseContent( - id, name, userId, userAttributes, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateUserAuthenticationMethodResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateUserAuthenticationMethodResponseContent.java deleted file mode 100644 index 006836f7e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateUserAuthenticationMethodResponseContent.java +++ /dev/null @@ -1,630 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = CreateUserAuthenticationMethodResponseContent.Builder.class) -public final class CreateUserAuthenticationMethodResponseContent { - private final Optional id; - - private final CreatedUserAuthenticationMethodTypeEnum type; - - private final Optional name; - - private final Optional totpSecret; - - private final Optional phoneNumber; - - private final Optional email; - - private final Optional> authenticationMethods; - - private final Optional preferredAuthenticationMethod; - - private final Optional keyId; - - private final Optional publicKey; - - private final Optional aaguid; - - private final Optional relyingPartyIdentifier; - - private final Optional createdAt; - - private final Map additionalProperties; - - private CreateUserAuthenticationMethodResponseContent( - Optional id, - CreatedUserAuthenticationMethodTypeEnum type, - Optional name, - Optional totpSecret, - Optional phoneNumber, - Optional email, - Optional> authenticationMethods, - Optional preferredAuthenticationMethod, - Optional keyId, - Optional publicKey, - Optional aaguid, - Optional relyingPartyIdentifier, - Optional createdAt, - Map additionalProperties) { - this.id = id; - this.type = type; - this.name = name; - this.totpSecret = totpSecret; - this.phoneNumber = phoneNumber; - this.email = email; - this.authenticationMethods = authenticationMethods; - this.preferredAuthenticationMethod = preferredAuthenticationMethod; - this.keyId = keyId; - this.publicKey = publicKey; - this.aaguid = aaguid; - this.relyingPartyIdentifier = relyingPartyIdentifier; - this.createdAt = createdAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The ID of the newly created authentication method (automatically generated by the application) - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("type") - public CreatedUserAuthenticationMethodTypeEnum getType() { - return type; - } - - /** - * @return A human-readable label to identify the authentication method. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Base32 encoded secret for TOTP generation - */ - @JsonProperty("totp_secret") - public Optional getTotpSecret() { - return totpSecret; - } - - /** - * @return Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice. - */ - @JsonProperty("phone_number") - public Optional getPhoneNumber() { - return phoneNumber; - } - - /** - * @return Applies to email authentication methods only. The email address used to send verification messages. - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - @JsonProperty("authentication_methods") - public Optional> getAuthenticationMethods() { - return authenticationMethods; - } - - @JsonProperty("preferred_authentication_method") - public Optional getPreferredAuthenticationMethod() { - return preferredAuthenticationMethod; - } - - /** - * @return Applies to webauthn authenticators only. The id of the credential. - */ - @JsonProperty("key_id") - public Optional getKeyId() { - return keyId; - } - - /** - * @return Applies to webauthn authenticators only. The public key. - */ - @JsonProperty("public_key") - public Optional getPublicKey() { - return publicKey; - } - - /** - * @return Applies to passkeys only. Authenticator Attestation Globally Unique Identifier. - */ - @JsonProperty("aaguid") - public Optional getAaguid() { - return aaguid; - } - - /** - * @return Applies to webauthn authenticators only. The relying party identifier. - */ - @JsonProperty("relying_party_identifier") - public Optional getRelyingPartyIdentifier() { - return relyingPartyIdentifier; - } - - /** - * @return Authentication method creation date - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateUserAuthenticationMethodResponseContent - && equalTo((CreateUserAuthenticationMethodResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateUserAuthenticationMethodResponseContent other) { - return id.equals(other.id) - && type.equals(other.type) - && name.equals(other.name) - && totpSecret.equals(other.totpSecret) - && phoneNumber.equals(other.phoneNumber) - && email.equals(other.email) - && authenticationMethods.equals(other.authenticationMethods) - && preferredAuthenticationMethod.equals(other.preferredAuthenticationMethod) - && keyId.equals(other.keyId) - && publicKey.equals(other.publicKey) - && aaguid.equals(other.aaguid) - && relyingPartyIdentifier.equals(other.relyingPartyIdentifier) - && createdAt.equals(other.createdAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.type, - this.name, - this.totpSecret, - this.phoneNumber, - this.email, - this.authenticationMethods, - this.preferredAuthenticationMethod, - this.keyId, - this.publicKey, - this.aaguid, - this.relyingPartyIdentifier, - this.createdAt); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - _FinalStage type(@NotNull CreatedUserAuthenticationMethodTypeEnum type); - - Builder from(CreateUserAuthenticationMethodResponseContent other); - } - - public interface _FinalStage { - CreateUserAuthenticationMethodResponseContent build(); - - /** - *

The ID of the newly created authentication method (automatically generated by the application)

- */ - _FinalStage id(Optional id); - - _FinalStage id(String id); - - /** - *

A human-readable label to identify the authentication method.

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

Base32 encoded secret for TOTP generation

- */ - _FinalStage totpSecret(Optional totpSecret); - - _FinalStage totpSecret(String totpSecret); - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- */ - _FinalStage phoneNumber(Optional phoneNumber); - - _FinalStage phoneNumber(String phoneNumber); - - /** - *

Applies to email authentication methods only. The email address used to send verification messages.

- */ - _FinalStage email(Optional email); - - _FinalStage email(String email); - - _FinalStage authenticationMethods(Optional> authenticationMethods); - - _FinalStage authenticationMethods(List authenticationMethods); - - _FinalStage preferredAuthenticationMethod( - Optional preferredAuthenticationMethod); - - _FinalStage preferredAuthenticationMethod(PreferredAuthenticationMethodEnum preferredAuthenticationMethod); - - /** - *

Applies to webauthn authenticators only. The id of the credential.

- */ - _FinalStage keyId(Optional keyId); - - _FinalStage keyId(String keyId); - - /** - *

Applies to webauthn authenticators only. The public key.

- */ - _FinalStage publicKey(Optional publicKey); - - _FinalStage publicKey(String publicKey); - - /** - *

Applies to passkeys only. Authenticator Attestation Globally Unique Identifier.

- */ - _FinalStage aaguid(Optional aaguid); - - _FinalStage aaguid(String aaguid); - - /** - *

Applies to webauthn authenticators only. The relying party identifier.

- */ - _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier); - - _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier); - - /** - *

Authentication method creation date

- */ - _FinalStage createdAt(Optional createdAt); - - _FinalStage createdAt(OffsetDateTime createdAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, _FinalStage { - private CreatedUserAuthenticationMethodTypeEnum type; - - private Optional createdAt = Optional.empty(); - - private Optional relyingPartyIdentifier = Optional.empty(); - - private Optional aaguid = Optional.empty(); - - private Optional publicKey = Optional.empty(); - - private Optional keyId = Optional.empty(); - - private Optional preferredAuthenticationMethod = Optional.empty(); - - private Optional> authenticationMethods = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional phoneNumber = Optional.empty(); - - private Optional totpSecret = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional id = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateUserAuthenticationMethodResponseContent other) { - id(other.getId()); - type(other.getType()); - name(other.getName()); - totpSecret(other.getTotpSecret()); - phoneNumber(other.getPhoneNumber()); - email(other.getEmail()); - authenticationMethods(other.getAuthenticationMethods()); - preferredAuthenticationMethod(other.getPreferredAuthenticationMethod()); - keyId(other.getKeyId()); - publicKey(other.getPublicKey()); - aaguid(other.getAaguid()); - relyingPartyIdentifier(other.getRelyingPartyIdentifier()); - createdAt(other.getCreatedAt()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull CreatedUserAuthenticationMethodTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

Authentication method creation date

- * @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; - } - - /** - *

Authentication method creation date

- */ - @java.lang.Override - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public _FinalStage createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - *

Applies to webauthn authenticators only. The relying party identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier) { - this.relyingPartyIdentifier = Optional.ofNullable(relyingPartyIdentifier); - return this; - } - - /** - *

Applies to webauthn authenticators only. The relying party identifier.

- */ - @java.lang.Override - @JsonSetter(value = "relying_party_identifier", nulls = Nulls.SKIP) - public _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier) { - this.relyingPartyIdentifier = relyingPartyIdentifier; - return this; - } - - /** - *

Applies to passkeys only. Authenticator Attestation Globally Unique Identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage aaguid(String aaguid) { - this.aaguid = Optional.ofNullable(aaguid); - return this; - } - - /** - *

Applies to passkeys only. Authenticator Attestation Globally Unique Identifier.

- */ - @java.lang.Override - @JsonSetter(value = "aaguid", nulls = Nulls.SKIP) - public _FinalStage aaguid(Optional aaguid) { - this.aaguid = aaguid; - return this; - } - - /** - *

Applies to webauthn authenticators only. The public key.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage publicKey(String publicKey) { - this.publicKey = Optional.ofNullable(publicKey); - return this; - } - - /** - *

Applies to webauthn authenticators only. The public key.

- */ - @java.lang.Override - @JsonSetter(value = "public_key", nulls = Nulls.SKIP) - public _FinalStage publicKey(Optional publicKey) { - this.publicKey = publicKey; - return this; - } - - /** - *

Applies to webauthn authenticators only. The id of the credential.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage keyId(String keyId) { - this.keyId = Optional.ofNullable(keyId); - return this; - } - - /** - *

Applies to webauthn authenticators only. The id of the credential.

- */ - @java.lang.Override - @JsonSetter(value = "key_id", nulls = Nulls.SKIP) - public _FinalStage keyId(Optional keyId) { - this.keyId = keyId; - return this; - } - - @java.lang.Override - public _FinalStage preferredAuthenticationMethod( - PreferredAuthenticationMethodEnum preferredAuthenticationMethod) { - this.preferredAuthenticationMethod = Optional.ofNullable(preferredAuthenticationMethod); - return this; - } - - @java.lang.Override - @JsonSetter(value = "preferred_authentication_method", nulls = Nulls.SKIP) - public _FinalStage preferredAuthenticationMethod( - Optional preferredAuthenticationMethod) { - this.preferredAuthenticationMethod = preferredAuthenticationMethod; - return this; - } - - @java.lang.Override - public _FinalStage authenticationMethods(List authenticationMethods) { - this.authenticationMethods = Optional.ofNullable(authenticationMethods); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication_methods", nulls = Nulls.SKIP) - public _FinalStage authenticationMethods( - Optional> authenticationMethods) { - this.authenticationMethods = authenticationMethods; - return this; - } - - /** - *

Applies to email authentication methods only. The email address used to send verification messages.

- * @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; - } - - /** - *

Applies to email authentication methods only. The email address used to send verification messages.

- */ - @java.lang.Override - @JsonSetter(value = "email", nulls = Nulls.SKIP) - public _FinalStage email(Optional email) { - this.email = email; - return this; - } - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- * @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; - } - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- */ - @java.lang.Override - @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) - public _FinalStage phoneNumber(Optional phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - *

Base32 encoded secret for TOTP generation

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage totpSecret(String totpSecret) { - this.totpSecret = Optional.ofNullable(totpSecret); - return this; - } - - /** - *

Base32 encoded secret for TOTP generation

- */ - @java.lang.Override - @JsonSetter(value = "totp_secret", nulls = Nulls.SKIP) - public _FinalStage totpSecret(Optional totpSecret) { - this.totpSecret = totpSecret; - return this; - } - - /** - *

A human-readable label to identify the authentication method.

- * @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; - } - - /** - *

A human-readable label to identify the authentication method.

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - /** - *

The ID of the newly created authentication method (automatically generated by the application)

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - /** - *

The ID of the newly created authentication method (automatically generated by the application)

- */ - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public CreateUserAuthenticationMethodResponseContent build() { - return new CreateUserAuthenticationMethodResponseContent( - id, - type, - name, - totpSecret, - phoneNumber, - email, - authenticationMethods, - preferredAuthenticationMethod, - keyId, - publicKey, - aaguid, - relyingPartyIdentifier, - createdAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateUserRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateUserRequestContent.java deleted file mode 100644 index fa39b1afa..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateUserRequestContent.java +++ /dev/null @@ -1,814 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateUserRequestContent.Builder.class) -public final class CreateUserRequestContent { - private final Optional email; - - private final Optional phoneNumber; - - private final Optional> userMetadata; - - private final Optional blocked; - - private final Optional emailVerified; - - private final Optional phoneVerified; - - private final Optional> appMetadata; - - private final Optional givenName; - - private final Optional familyName; - - private final Optional name; - - private final Optional nickname; - - private final Optional picture; - - private final Optional userId; - - private final String connection; - - private final Optional password; - - private final Optional verifyEmail; - - private final Optional username; - - private final Map additionalProperties; - - private CreateUserRequestContent( - Optional email, - Optional phoneNumber, - Optional> userMetadata, - Optional blocked, - Optional emailVerified, - Optional phoneVerified, - Optional> appMetadata, - Optional givenName, - Optional familyName, - Optional name, - Optional nickname, - Optional picture, - Optional userId, - String connection, - Optional password, - Optional verifyEmail, - Optional username, - Map additionalProperties) { - this.email = email; - this.phoneNumber = phoneNumber; - this.userMetadata = userMetadata; - this.blocked = blocked; - this.emailVerified = emailVerified; - this.phoneVerified = phoneVerified; - this.appMetadata = appMetadata; - this.givenName = givenName; - this.familyName = familyName; - this.name = name; - this.nickname = nickname; - this.picture = picture; - this.userId = userId; - this.connection = connection; - this.password = password; - this.verifyEmail = verifyEmail; - this.username = username; - this.additionalProperties = additionalProperties; - } - - /** - * @return The user's email. - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - /** - * @return The user's phone number (following the E.164 recommendation). - */ - @JsonProperty("phone_number") - public Optional getPhoneNumber() { - return phoneNumber; - } - - @JsonProperty("user_metadata") - public Optional> getUserMetadata() { - return userMetadata; - } - - /** - * @return Whether this user was blocked by an administrator (true) or not (false). - */ - @JsonProperty("blocked") - public Optional getBlocked() { - return blocked; - } - - /** - * @return Whether this email address is verified (true) or unverified (false). User will receive a verification email after creation if email_verified is false or not specified - */ - @JsonProperty("email_verified") - public Optional getEmailVerified() { - return emailVerified; - } - - /** - * @return Whether this phone number has been verified (true) or not (false). - */ - @JsonProperty("phone_verified") - public Optional getPhoneVerified() { - return phoneVerified; - } - - @JsonProperty("app_metadata") - public Optional> getAppMetadata() { - return appMetadata; - } - - /** - * @return The user's given name(s). - */ - @JsonProperty("given_name") - public Optional getGivenName() { - return givenName; - } - - /** - * @return The user's family name(s). - */ - @JsonProperty("family_name") - public Optional getFamilyName() { - return familyName; - } - - /** - * @return The user's full name. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The user's nickname. - */ - @JsonProperty("nickname") - public Optional getNickname() { - return nickname; - } - - /** - * @return A URI pointing to the user's picture. - */ - @JsonProperty("picture") - public Optional getPicture() { - return picture; - } - - /** - * @return The external user's id provided by the identity provider. - */ - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - /** - * @return Name of the connection this user should be created in. - */ - @JsonProperty("connection") - public String getConnection() { - return connection; - } - - /** - * @return Initial password for this user. Only valid for auth0 connection strategy. - */ - @JsonProperty("password") - public Optional getPassword() { - return password; - } - - /** - * @return Whether the user will receive a verification email after creation (true) or no email (false). Overrides behavior of email_verified parameter. - */ - @JsonProperty("verify_email") - public Optional getVerifyEmail() { - return verifyEmail; - } - - /** - * @return The user's username. Only valid if the connection requires a username. - */ - @JsonProperty("username") - public Optional getUsername() { - return username; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateUserRequestContent && equalTo((CreateUserRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateUserRequestContent other) { - return email.equals(other.email) - && phoneNumber.equals(other.phoneNumber) - && userMetadata.equals(other.userMetadata) - && blocked.equals(other.blocked) - && emailVerified.equals(other.emailVerified) - && phoneVerified.equals(other.phoneVerified) - && appMetadata.equals(other.appMetadata) - && givenName.equals(other.givenName) - && familyName.equals(other.familyName) - && name.equals(other.name) - && nickname.equals(other.nickname) - && picture.equals(other.picture) - && userId.equals(other.userId) - && connection.equals(other.connection) - && password.equals(other.password) - && verifyEmail.equals(other.verifyEmail) - && username.equals(other.username); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.email, - this.phoneNumber, - this.userMetadata, - this.blocked, - this.emailVerified, - this.phoneVerified, - this.appMetadata, - this.givenName, - this.familyName, - this.name, - this.nickname, - this.picture, - this.userId, - this.connection, - this.password, - this.verifyEmail, - this.username); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionStage builder() { - return new Builder(); - } - - public interface ConnectionStage { - /** - *

Name of the connection this user should be created in.

- */ - _FinalStage connection(@NotNull String connection); - - Builder from(CreateUserRequestContent other); - } - - public interface _FinalStage { - CreateUserRequestContent build(); - - /** - *

The user's email.

- */ - _FinalStage email(Optional email); - - _FinalStage email(String email); - - /** - *

The user's phone number (following the E.164 recommendation).

- */ - _FinalStage phoneNumber(Optional phoneNumber); - - _FinalStage phoneNumber(String phoneNumber); - - _FinalStage userMetadata(Optional> userMetadata); - - _FinalStage userMetadata(Map userMetadata); - - /** - *

Whether this user was blocked by an administrator (true) or not (false).

- */ - _FinalStage blocked(Optional blocked); - - _FinalStage blocked(Boolean blocked); - - /** - *

Whether this email address is verified (true) or unverified (false). User will receive a verification email after creation if email_verified is false or not specified

- */ - _FinalStage emailVerified(Optional emailVerified); - - _FinalStage emailVerified(Boolean emailVerified); - - /** - *

Whether this phone number has been verified (true) or not (false).

- */ - _FinalStage phoneVerified(Optional phoneVerified); - - _FinalStage phoneVerified(Boolean phoneVerified); - - _FinalStage appMetadata(Optional> appMetadata); - - _FinalStage appMetadata(Map appMetadata); - - /** - *

The user's given name(s).

- */ - _FinalStage givenName(Optional givenName); - - _FinalStage givenName(String givenName); - - /** - *

The user's family name(s).

- */ - _FinalStage familyName(Optional familyName); - - _FinalStage familyName(String familyName); - - /** - *

The user's full name.

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

The user's nickname.

- */ - _FinalStage nickname(Optional nickname); - - _FinalStage nickname(String nickname); - - /** - *

A URI pointing to the user's picture.

- */ - _FinalStage picture(Optional picture); - - _FinalStage picture(String picture); - - /** - *

The external user's id provided by the identity provider.

- */ - _FinalStage userId(Optional userId); - - _FinalStage userId(String userId); - - /** - *

Initial password for this user. Only valid for auth0 connection strategy.

- */ - _FinalStage password(Optional password); - - _FinalStage password(String password); - - /** - *

Whether the user will receive a verification email after creation (true) or no email (false). Overrides behavior of email_verified parameter.

- */ - _FinalStage verifyEmail(Optional verifyEmail); - - _FinalStage verifyEmail(Boolean verifyEmail); - - /** - *

The user's username. Only valid if the connection requires a username.

- */ - _FinalStage username(Optional username); - - _FinalStage username(String username); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionStage, _FinalStage { - private String connection; - - private Optional username = Optional.empty(); - - private Optional verifyEmail = Optional.empty(); - - private Optional password = Optional.empty(); - - private Optional userId = Optional.empty(); - - private Optional picture = Optional.empty(); - - private Optional nickname = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional familyName = Optional.empty(); - - private Optional givenName = Optional.empty(); - - private Optional> appMetadata = Optional.empty(); - - private Optional phoneVerified = Optional.empty(); - - private Optional emailVerified = Optional.empty(); - - private Optional blocked = Optional.empty(); - - private Optional> userMetadata = Optional.empty(); - - private Optional phoneNumber = Optional.empty(); - - private Optional email = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateUserRequestContent other) { - email(other.getEmail()); - phoneNumber(other.getPhoneNumber()); - userMetadata(other.getUserMetadata()); - blocked(other.getBlocked()); - emailVerified(other.getEmailVerified()); - phoneVerified(other.getPhoneVerified()); - appMetadata(other.getAppMetadata()); - givenName(other.getGivenName()); - familyName(other.getFamilyName()); - name(other.getName()); - nickname(other.getNickname()); - picture(other.getPicture()); - userId(other.getUserId()); - connection(other.getConnection()); - password(other.getPassword()); - verifyEmail(other.getVerifyEmail()); - username(other.getUsername()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("connection") - public _FinalStage connection(@NotNull String connection) { - this.connection = Objects.requireNonNull(connection, "connection must not be null"); - return this; - } - - /** - *

The user's username. Only valid if the connection requires a username.

- * @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; - } - - /** - *

The user's username. Only valid if the connection requires a username.

- */ - @java.lang.Override - @JsonSetter(value = "username", nulls = Nulls.SKIP) - public _FinalStage username(Optional username) { - this.username = username; - return this; - } - - /** - *

Whether the user will receive a verification email after creation (true) or no email (false). Overrides behavior of email_verified parameter.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage verifyEmail(Boolean verifyEmail) { - this.verifyEmail = Optional.ofNullable(verifyEmail); - return this; - } - - /** - *

Whether the user will receive a verification email after creation (true) or no email (false). Overrides behavior of email_verified parameter.

- */ - @java.lang.Override - @JsonSetter(value = "verify_email", nulls = Nulls.SKIP) - public _FinalStage verifyEmail(Optional verifyEmail) { - this.verifyEmail = verifyEmail; - return this; - } - - /** - *

Initial password for this user. Only valid for auth0 connection strategy.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage password(String password) { - this.password = Optional.ofNullable(password); - return this; - } - - /** - *

Initial password for this user. Only valid for auth0 connection strategy.

- */ - @java.lang.Override - @JsonSetter(value = "password", nulls = Nulls.SKIP) - public _FinalStage password(Optional password) { - this.password = password; - return this; - } - - /** - *

The external user's id provided by the identity provider.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage userId(String userId) { - this.userId = Optional.ofNullable(userId); - return this; - } - - /** - *

The external user's id provided by the identity provider.

- */ - @java.lang.Override - @JsonSetter(value = "user_id", nulls = Nulls.SKIP) - public _FinalStage userId(Optional userId) { - this.userId = userId; - return this; - } - - /** - *

A URI pointing to the user's picture.

- * @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; - } - - /** - *

A URI pointing to the user's picture.

- */ - @java.lang.Override - @JsonSetter(value = "picture", nulls = Nulls.SKIP) - public _FinalStage picture(Optional picture) { - this.picture = picture; - return this; - } - - /** - *

The user's nickname.

- * @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; - } - - /** - *

The user's nickname.

- */ - @java.lang.Override - @JsonSetter(value = "nickname", nulls = Nulls.SKIP) - public _FinalStage nickname(Optional nickname) { - this.nickname = nickname; - return this; - } - - /** - *

The user's full 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; - } - - /** - *

The user's full name.

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - /** - *

The user's family name(s).

- * @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; - } - - /** - *

The user's family name(s).

- */ - @java.lang.Override - @JsonSetter(value = "family_name", nulls = Nulls.SKIP) - public _FinalStage familyName(Optional familyName) { - this.familyName = familyName; - return this; - } - - /** - *

The user's given name(s).

- * @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; - } - - /** - *

The user's given name(s).

- */ - @java.lang.Override - @JsonSetter(value = "given_name", nulls = Nulls.SKIP) - public _FinalStage givenName(Optional givenName) { - this.givenName = givenName; - 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; - } - - /** - *

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; - } - - /** - *

Whether this email address is verified (true) or unverified (false). User will receive a verification email after creation if email_verified is false or not specified

- * @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). User will receive a verification email after creation if email_verified is false or not specified

- */ - @java.lang.Override - @JsonSetter(value = "email_verified", nulls = Nulls.SKIP) - public _FinalStage emailVerified(Optional emailVerified) { - this.emailVerified = emailVerified; - return this; - } - - /** - *

Whether this user was blocked by an administrator (true) or 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 not (false).

- */ - @java.lang.Override - @JsonSetter(value = "blocked", nulls = Nulls.SKIP) - public _FinalStage blocked(Optional blocked) { - this.blocked = blocked; - 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; - } - - /** - *

The user's phone number (following the E.164 recommendation).

- * @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; - } - - /** - *

The user's phone number (following the E.164 recommendation).

- */ - @java.lang.Override - @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) - public _FinalStage phoneNumber(Optional phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - *

The user's 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; - } - - /** - *

The user's email.

- */ - @java.lang.Override - @JsonSetter(value = "email", nulls = Nulls.SKIP) - public _FinalStage email(Optional email) { - this.email = email; - return this; - } - - @java.lang.Override - public CreateUserRequestContent build() { - return new CreateUserRequestContent( - email, - phoneNumber, - userMetadata, - blocked, - emailVerified, - phoneVerified, - appMetadata, - givenName, - familyName, - name, - nickname, - picture, - userId, - connection, - password, - verifyEmail, - username, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateUserResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateUserResponseContent.java deleted file mode 100644 index ce01f5312..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateUserResponseContent.java +++ /dev/null @@ -1,717 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateUserResponseContent.Builder.class) -public final class CreateUserResponseContent { - private final Optional userId; - - private final Optional email; - - private final Optional emailVerified; - - private final Optional username; - - private final Optional phoneNumber; - - private final Optional phoneVerified; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional> 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 CreateUserResponseContent( - Optional userId, - Optional email, - Optional emailVerified, - Optional username, - Optional phoneNumber, - Optional phoneVerified, - Optional createdAt, - Optional updatedAt, - Optional> 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 Optional 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 for this user. Follows the <a href="https://en.wikipedia.org/wiki/E.164">E.164 recommendation</a>. - */ - @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; - } - - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return Array of user identity objects when accounts are linked. - */ - @JsonProperty("identities") - public Optional> 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; - } - - @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 CreateUserResponseContent && equalTo((CreateUserResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateUserResponseContent 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 Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional userId = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional emailVerified = Optional.empty(); - - private Optional username = Optional.empty(); - - private Optional phoneNumber = Optional.empty(); - - private Optional phoneVerified = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional> identities = Optional.empty(); - - private Optional> appMetadata = Optional.empty(); - - private Optional> userMetadata = Optional.empty(); - - private Optional picture = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional nickname = Optional.empty(); - - private Optional> multifactor = Optional.empty(); - - private Optional lastIp = Optional.empty(); - - private Optional lastLogin = Optional.empty(); - - private Optional loginsCount = Optional.empty(); - - private Optional blocked = Optional.empty(); - - private Optional givenName = Optional.empty(); - - private Optional familyName = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateUserResponseContent 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.

- */ - @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; - } - - /** - *

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; - } - - /** - *

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; - } - - /** - *

Phone number for this user. Follows the <a href="https://en.wikipedia.org/wiki/E.164">E.164 recommendation</a>.

- */ - @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; - } - - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(UserDateSchema createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - public Builder updatedAt(UserDateSchema updatedAt) { - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - /** - *

Array of user identity objects when accounts are linked.

- */ - @JsonSetter(value = "identities", nulls = Nulls.SKIP) - public Builder identities(Optional> identities) { - this.identities = identities; - return this; - } - - public Builder identities(List identities) { - this.identities = Optional.ofNullable(identities); - return this; - } - - @JsonSetter(value = "app_metadata", nulls = Nulls.SKIP) - public Builder appMetadata(Optional> appMetadata) { - this.appMetadata = appMetadata; - return this; - } - - public Builder appMetadata(Map appMetadata) { - this.appMetadata = Optional.ofNullable(appMetadata); - return this; - } - - @JsonSetter(value = "user_metadata", nulls = Nulls.SKIP) - public Builder userMetadata(Optional> userMetadata) { - this.userMetadata = userMetadata; - return this; - } - - public Builder userMetadata(Map userMetadata) { - this.userMetadata = Optional.ofNullable(userMetadata); - return this; - } - - /** - *

URL to picture, photo, or avatar of 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; - } - - /** - *

Preferred nickname or alias of this user.

- */ - @JsonSetter(value = "nickname", nulls = Nulls.SKIP) - public Builder nickname(Optional nickname) { - this.nickname = nickname; - return this; - } - - public Builder nickname(String nickname) { - this.nickname = Optional.ofNullable(nickname); - return this; - } - - /** - *

List of multi-factor authentication providers with which this user has enrolled.

- */ - @JsonSetter(value = "multifactor", nulls = Nulls.SKIP) - public Builder multifactor(Optional> multifactor) { - this.multifactor = multifactor; - return this; - } - - public Builder multifactor(List multifactor) { - this.multifactor = Optional.ofNullable(multifactor); - return this; - } - - /** - *

Last IP address from which this user logged in.

- */ - @JsonSetter(value = "last_ip", nulls = Nulls.SKIP) - public Builder lastIp(Optional lastIp) { - this.lastIp = lastIp; - return this; - } - - public Builder lastIp(String lastIp) { - this.lastIp = Optional.ofNullable(lastIp); - return this; - } - - @JsonSetter(value = "last_login", nulls = Nulls.SKIP) - public Builder lastLogin(Optional lastLogin) { - this.lastLogin = lastLogin; - return this; - } - - public Builder lastLogin(UserDateSchema lastLogin) { - this.lastLogin = Optional.ofNullable(lastLogin); - return this; - } - - /** - *

Total number of logins this user has performed.

- */ - @JsonSetter(value = "logins_count", nulls = Nulls.SKIP) - public Builder loginsCount(Optional loginsCount) { - this.loginsCount = loginsCount; - return this; - } - - public Builder loginsCount(Integer loginsCount) { - this.loginsCount = Optional.ofNullable(loginsCount); - return this; - } - - /** - *

Whether this user was blocked by an administrator (true) or is not (false).

- */ - @JsonSetter(value = "blocked", nulls = Nulls.SKIP) - public Builder blocked(Optional blocked) { - this.blocked = blocked; - return this; - } - - public Builder blocked(Boolean blocked) { - this.blocked = Optional.ofNullable(blocked); - 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; - } - - public CreateUserResponseContent build() { - return new CreateUserResponseContent( - userId, - email, - emailVerified, - username, - phoneNumber, - phoneVerified, - createdAt, - updatedAt, - identities, - appMetadata, - userMetadata, - picture, - name, - nickname, - multifactor, - lastIp, - lastLogin, - loginsCount, - blocked, - givenName, - familyName, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateVerifiableCredentialTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateVerifiableCredentialTemplateResponseContent.java deleted file mode 100644 index a6ebb8069..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateVerifiableCredentialTemplateResponseContent.java +++ /dev/null @@ -1,422 +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 = CreateVerifiableCredentialTemplateResponseContent.Builder.class) -public final class CreateVerifiableCredentialTemplateResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional type; - - private final Optional dialect; - - private final Optional presentation; - - private final OptionalNullable customCertificateAuthority; - - private final OptionalNullable wellKnownTrustedIssuers; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private CreateVerifiableCredentialTemplateResponseContent( - Optional id, - Optional name, - Optional type, - Optional dialect, - Optional presentation, - OptionalNullable customCertificateAuthority, - OptionalNullable wellKnownTrustedIssuers, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.type = type; - this.dialect = dialect; - this.presentation = presentation; - this.customCertificateAuthority = customCertificateAuthority; - this.wellKnownTrustedIssuers = wellKnownTrustedIssuers; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the template. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the template. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The type of the template. - */ - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return The dialect of the template. - */ - @JsonProperty("dialect") - public Optional getDialect() { - return dialect; - } - - @JsonProperty("presentation") - public Optional getPresentation() { - return presentation; - } - - /** - * @return The custom certificate authority. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_certificate_authority") - public OptionalNullable getCustomCertificateAuthority() { - if (customCertificateAuthority == null) { - return OptionalNullable.absent(); - } - return customCertificateAuthority; - } - - /** - * @return The well-known trusted issuers, comma separated. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("well_known_trusted_issuers") - public OptionalNullable getWellKnownTrustedIssuers() { - if (wellKnownTrustedIssuers == null) { - return OptionalNullable.absent(); - } - return wellKnownTrustedIssuers; - } - - /** - * @return The date and time the template was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The date and time the template was created. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_certificate_authority") - private OptionalNullable _getCustomCertificateAuthority() { - return customCertificateAuthority; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("well_known_trusted_issuers") - private OptionalNullable _getWellKnownTrustedIssuers() { - return wellKnownTrustedIssuers; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateVerifiableCredentialTemplateResponseContent - && equalTo((CreateVerifiableCredentialTemplateResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateVerifiableCredentialTemplateResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && type.equals(other.type) - && dialect.equals(other.dialect) - && presentation.equals(other.presentation) - && customCertificateAuthority.equals(other.customCertificateAuthority) - && wellKnownTrustedIssuers.equals(other.wellKnownTrustedIssuers) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.type, - this.dialect, - this.presentation, - this.customCertificateAuthority, - this.wellKnownTrustedIssuers, - this.createdAt, - this.updatedAt); - } - - @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 type = Optional.empty(); - - private Optional dialect = Optional.empty(); - - private Optional presentation = Optional.empty(); - - private OptionalNullable customCertificateAuthority = OptionalNullable.absent(); - - private OptionalNullable wellKnownTrustedIssuers = OptionalNullable.absent(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateVerifiableCredentialTemplateResponseContent other) { - id(other.getId()); - name(other.getName()); - type(other.getType()); - dialect(other.getDialect()); - presentation(other.getPresentation()); - customCertificateAuthority(other.getCustomCertificateAuthority()); - wellKnownTrustedIssuers(other.getWellKnownTrustedIssuers()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

The id of the template.

- */ - @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 the template.

- */ - @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 template.

- */ - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(String type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

The dialect of the template.

- */ - @JsonSetter(value = "dialect", nulls = Nulls.SKIP) - public Builder dialect(Optional dialect) { - this.dialect = dialect; - return this; - } - - public Builder dialect(String dialect) { - this.dialect = Optional.ofNullable(dialect); - return this; - } - - @JsonSetter(value = "presentation", nulls = Nulls.SKIP) - public Builder presentation(Optional presentation) { - this.presentation = presentation; - return this; - } - - public Builder presentation(MdlPresentationRequest presentation) { - this.presentation = Optional.ofNullable(presentation); - return this; - } - - /** - *

The custom certificate authority.

- */ - @JsonSetter(value = "custom_certificate_authority", nulls = Nulls.SKIP) - public Builder customCertificateAuthority(@Nullable OptionalNullable customCertificateAuthority) { - this.customCertificateAuthority = customCertificateAuthority; - return this; - } - - public Builder customCertificateAuthority(String customCertificateAuthority) { - this.customCertificateAuthority = OptionalNullable.of(customCertificateAuthority); - return this; - } - - public Builder customCertificateAuthority(Optional customCertificateAuthority) { - if (customCertificateAuthority.isPresent()) { - this.customCertificateAuthority = OptionalNullable.of(customCertificateAuthority.get()); - } else { - this.customCertificateAuthority = OptionalNullable.absent(); - } - return this; - } - - public Builder customCertificateAuthority( - com.auth0.client.mgmt.core.Nullable customCertificateAuthority) { - if (customCertificateAuthority.isNull()) { - this.customCertificateAuthority = OptionalNullable.ofNull(); - } else if (customCertificateAuthority.isEmpty()) { - this.customCertificateAuthority = OptionalNullable.absent(); - } else { - this.customCertificateAuthority = OptionalNullable.of(customCertificateAuthority.get()); - } - return this; - } - - /** - *

The well-known trusted issuers, comma separated.

- */ - @JsonSetter(value = "well_known_trusted_issuers", nulls = Nulls.SKIP) - public Builder wellKnownTrustedIssuers(@Nullable OptionalNullable wellKnownTrustedIssuers) { - this.wellKnownTrustedIssuers = wellKnownTrustedIssuers; - return this; - } - - public Builder wellKnownTrustedIssuers(String wellKnownTrustedIssuers) { - this.wellKnownTrustedIssuers = OptionalNullable.of(wellKnownTrustedIssuers); - return this; - } - - public Builder wellKnownTrustedIssuers(Optional wellKnownTrustedIssuers) { - if (wellKnownTrustedIssuers.isPresent()) { - this.wellKnownTrustedIssuers = OptionalNullable.of(wellKnownTrustedIssuers.get()); - } else { - this.wellKnownTrustedIssuers = OptionalNullable.absent(); - } - return this; - } - - public Builder wellKnownTrustedIssuers(com.auth0.client.mgmt.core.Nullable wellKnownTrustedIssuers) { - if (wellKnownTrustedIssuers.isNull()) { - this.wellKnownTrustedIssuers = OptionalNullable.ofNull(); - } else if (wellKnownTrustedIssuers.isEmpty()) { - this.wellKnownTrustedIssuers = OptionalNullable.absent(); - } else { - this.wellKnownTrustedIssuers = OptionalNullable.of(wellKnownTrustedIssuers.get()); - } - return this; - } - - /** - *

The date and time the template 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 date and time the template was created.

- */ - @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; - } - - public CreateVerifiableCredentialTemplateResponseContent build() { - return new CreateVerifiableCredentialTemplateResponseContent( - id, - name, - type, - dialect, - presentation, - customCertificateAuthority, - wellKnownTrustedIssuers, - createdAt, - updatedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreateVerificationEmailResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/CreateVerificationEmailResponseContent.java deleted file mode 100644 index 423b6f53f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreateVerificationEmailResponseContent.java +++ /dev/null @@ -1,231 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateVerificationEmailResponseContent.Builder.class) -public final class CreateVerificationEmailResponseContent { - private final String status; - - private final String type; - - private final Optional createdAt; - - private final String id; - - private final Map additionalProperties; - - private CreateVerificationEmailResponseContent( - String status, - String type, - Optional createdAt, - String id, - Map additionalProperties) { - this.status = status; - this.type = type; - this.createdAt = createdAt; - this.id = id; - this.additionalProperties = additionalProperties; - } - - /** - * @return Status of this job. - */ - @JsonProperty("status") - public String getStatus() { - return status; - } - - /** - * @return Type of job this is. - */ - @JsonProperty("type") - public String getType() { - return type; - } - - /** - * @return When this job was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return ID of this job. - */ - @JsonProperty("id") - public String getId() { - return id; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateVerificationEmailResponseContent - && equalTo((CreateVerificationEmailResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateVerificationEmailResponseContent other) { - return status.equals(other.status) - && type.equals(other.type) - && createdAt.equals(other.createdAt) - && id.equals(other.id); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.status, this.type, this.createdAt, this.id); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StatusStage builder() { - return new Builder(); - } - - public interface StatusStage { - /** - *

Status of this job.

- */ - TypeStage status(@NotNull String status); - - Builder from(CreateVerificationEmailResponseContent other); - } - - public interface TypeStage { - /** - *

Type of job this is.

- */ - IdStage type(@NotNull String type); - } - - public interface IdStage { - /** - *

ID of this job.

- */ - _FinalStage id(@NotNull String id); - } - - public interface _FinalStage { - CreateVerificationEmailResponseContent build(); - - /** - *

When this job was created.

- */ - _FinalStage createdAt(Optional createdAt); - - _FinalStage createdAt(String createdAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StatusStage, TypeStage, IdStage, _FinalStage { - private String status; - - private String type; - - private String id; - - private Optional createdAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateVerificationEmailResponseContent other) { - status(other.getStatus()); - type(other.getType()); - createdAt(other.getCreatedAt()); - id(other.getId()); - return this; - } - - /** - *

Status of this job.

- *

Status of this job.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("status") - public TypeStage status(@NotNull String status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - /** - *

Type of job this is.

- *

Type of job this is.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("type") - public IdStage type(@NotNull String type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

ID of this job.

- *

ID of this job.

- * @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; - } - - /** - *

When this job was created.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage createdAt(String createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - /** - *

When this job was created.

- */ - @java.lang.Override - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public _FinalStage createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - @java.lang.Override - public CreateVerificationEmailResponseContent build() { - return new CreateVerificationEmailResponseContent(status, type, createdAt, id, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreatedAuthenticationMethodTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/CreatedAuthenticationMethodTypeEnum.java deleted file mode 100644 index 06f30e70d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreatedAuthenticationMethodTypeEnum.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreatedAuthenticationMethodTypeEnum { - public static final CreatedAuthenticationMethodTypeEnum EMAIL = - new CreatedAuthenticationMethodTypeEnum(Value.EMAIL, "email"); - - public static final CreatedAuthenticationMethodTypeEnum TOTP = - new CreatedAuthenticationMethodTypeEnum(Value.TOTP, "totp"); - - public static final CreatedAuthenticationMethodTypeEnum PHONE = - new CreatedAuthenticationMethodTypeEnum(Value.PHONE, "phone"); - - public static final CreatedAuthenticationMethodTypeEnum WEBAUTHN_ROAMING = - new CreatedAuthenticationMethodTypeEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); - - private final Value value; - - private final String string; - - CreatedAuthenticationMethodTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreatedAuthenticationMethodTypeEnum - && this.string.equals(((CreatedAuthenticationMethodTypeEnum) 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 TOTP: - return visitor.visitTotp(); - case PHONE: - return visitor.visitPhone(); - case WEBAUTHN_ROAMING: - return visitor.visitWebauthnRoaming(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreatedAuthenticationMethodTypeEnum valueOf(String value) { - switch (value) { - case "email": - return EMAIL; - case "totp": - return TOTP; - case "phone": - return PHONE; - case "webauthn-roaming": - return WEBAUTHN_ROAMING; - default: - return new CreatedAuthenticationMethodTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PHONE, - - EMAIL, - - TOTP, - - WEBAUTHN_ROAMING, - - UNKNOWN - } - - public interface Visitor { - T visitPhone(); - - T visitEmail(); - - T visitTotp(); - - T visitWebauthnRoaming(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CreatedUserAuthenticationMethodTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/CreatedUserAuthenticationMethodTypeEnum.java deleted file mode 100644 index 2cb6a0feb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CreatedUserAuthenticationMethodTypeEnum.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CreatedUserAuthenticationMethodTypeEnum { - public static final CreatedUserAuthenticationMethodTypeEnum EMAIL = - new CreatedUserAuthenticationMethodTypeEnum(Value.EMAIL, "email"); - - public static final CreatedUserAuthenticationMethodTypeEnum TOTP = - new CreatedUserAuthenticationMethodTypeEnum(Value.TOTP, "totp"); - - public static final CreatedUserAuthenticationMethodTypeEnum PASSKEY = - new CreatedUserAuthenticationMethodTypeEnum(Value.PASSKEY, "passkey"); - - public static final CreatedUserAuthenticationMethodTypeEnum PHONE = - new CreatedUserAuthenticationMethodTypeEnum(Value.PHONE, "phone"); - - public static final CreatedUserAuthenticationMethodTypeEnum WEBAUTHN_ROAMING = - new CreatedUserAuthenticationMethodTypeEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); - - private final Value value; - - private final String string; - - CreatedUserAuthenticationMethodTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CreatedUserAuthenticationMethodTypeEnum - && this.string.equals(((CreatedUserAuthenticationMethodTypeEnum) 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 TOTP: - return visitor.visitTotp(); - case PASSKEY: - return visitor.visitPasskey(); - case PHONE: - return visitor.visitPhone(); - case WEBAUTHN_ROAMING: - return visitor.visitWebauthnRoaming(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CreatedUserAuthenticationMethodTypeEnum valueOf(String value) { - switch (value) { - case "email": - return EMAIL; - case "totp": - return TOTP; - case "passkey": - return PASSKEY; - case "phone": - return PHONE; - case "webauthn-roaming": - return WEBAUTHN_ROAMING; - default: - return new CreatedUserAuthenticationMethodTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PHONE, - - EMAIL, - - TOTP, - - WEBAUTHN_ROAMING, - - PASSKEY, - - UNKNOWN - } - - public interface Visitor { - T visitPhone(); - - T visitEmail(); - - T visitTotp(); - - T visitWebauthnRoaming(); - - T visitPasskey(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CredentialId.java b/src/main/java/com/auth0/client/mgmt/types/CredentialId.java deleted file mode 100644 index f50986cde..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CredentialId.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = CredentialId.Builder.class) -public final class CredentialId { - private final String id; - - private final Map additionalProperties; - - private CredentialId(String id, Map additionalProperties) { - this.id = id; - this.additionalProperties = additionalProperties; - } - - /** - * @return Credential ID - */ - @JsonProperty("id") - public String getId() { - return id; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CredentialId && equalTo((CredentialId) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CredentialId 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 { - /** - *

Credential ID

- */ - _FinalStage id(@NotNull String id); - - Builder from(CredentialId other); - } - - public interface _FinalStage { - CredentialId build(); - } - - @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(CredentialId other) { - id(other.getId()); - return this; - } - - /** - *

Credential ID

- *

Credential 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 CredentialId build() { - return new CredentialId(id, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomDomain.java b/src/main/java/com/auth0/client/mgmt/types/CustomDomain.java deleted file mode 100644 index c9be47932..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CustomDomain.java +++ /dev/null @@ -1,615 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.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 = CustomDomain.Builder.class) -public final class CustomDomain { - private final String customDomainId; - - private final String domain; - - private final boolean primary; - - private final Optional isDefault; - - private final CustomDomainStatusFilterEnum status; - - private final CustomDomainTypeEnum type; - - private final Optional originDomainName; - - private final Optional verification; - - private final OptionalNullable customClientIpHeader; - - private final Optional tlsPolicy; - - private final Optional>> domainMetadata; - - private final Optional certificate; - - private final Optional relyingPartyIdentifier; - - private final Map additionalProperties; - - private CustomDomain( - String customDomainId, - String domain, - boolean primary, - Optional isDefault, - CustomDomainStatusFilterEnum status, - CustomDomainTypeEnum type, - Optional originDomainName, - Optional verification, - OptionalNullable customClientIpHeader, - Optional tlsPolicy, - Optional>> domainMetadata, - Optional certificate, - Optional relyingPartyIdentifier, - Map additionalProperties) { - this.customDomainId = customDomainId; - this.domain = domain; - this.primary = primary; - this.isDefault = isDefault; - this.status = status; - this.type = type; - this.originDomainName = originDomainName; - this.verification = verification; - this.customClientIpHeader = customClientIpHeader; - this.tlsPolicy = tlsPolicy; - this.domainMetadata = domainMetadata; - this.certificate = certificate; - this.relyingPartyIdentifier = relyingPartyIdentifier; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the custom domain. - */ - @JsonProperty("custom_domain_id") - public String getCustomDomainId() { - return customDomainId; - } - - /** - * @return Domain name. - */ - @JsonProperty("domain") - public String getDomain() { - return domain; - } - - /** - * @return Whether this is a primary domain (true) or not (false). - */ - @JsonProperty("primary") - public boolean getPrimary() { - return primary; - } - - /** - * @return Whether this is the default custom domain (true) or not (false). - */ - @JsonProperty("is_default") - public Optional getIsDefault() { - return isDefault; - } - - @JsonProperty("status") - public CustomDomainStatusFilterEnum getStatus() { - return status; - } - - @JsonProperty("type") - public CustomDomainTypeEnum getType() { - return type; - } - - /** - * @return Intermediate address. - */ - @JsonProperty("origin_domain_name") - public Optional getOriginDomainName() { - return originDomainName; - } - - @JsonProperty("verification") - public Optional getVerification() { - return verification; - } - - /** - * @return The HTTP header to fetch the client's IP address - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_client_ip_header") - public OptionalNullable getCustomClientIpHeader() { - if (customClientIpHeader == null) { - return OptionalNullable.absent(); - } - return customClientIpHeader; - } - - /** - * @return The TLS version policy - */ - @JsonProperty("tls_policy") - public Optional getTlsPolicy() { - return tlsPolicy; - } - - @JsonProperty("domain_metadata") - public Optional>> getDomainMetadata() { - return domainMetadata; - } - - @JsonProperty("certificate") - public Optional getCertificate() { - return certificate; - } - - /** - * @return Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used. - */ - @JsonProperty("relying_party_identifier") - public Optional getRelyingPartyIdentifier() { - return relyingPartyIdentifier; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_client_ip_header") - private OptionalNullable _getCustomClientIpHeader() { - return customClientIpHeader; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CustomDomain && equalTo((CustomDomain) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CustomDomain other) { - return customDomainId.equals(other.customDomainId) - && domain.equals(other.domain) - && primary == other.primary - && isDefault.equals(other.isDefault) - && status.equals(other.status) - && type.equals(other.type) - && originDomainName.equals(other.originDomainName) - && verification.equals(other.verification) - && customClientIpHeader.equals(other.customClientIpHeader) - && tlsPolicy.equals(other.tlsPolicy) - && domainMetadata.equals(other.domainMetadata) - && certificate.equals(other.certificate) - && relyingPartyIdentifier.equals(other.relyingPartyIdentifier); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.customDomainId, - this.domain, - this.primary, - this.isDefault, - this.status, - this.type, - this.originDomainName, - this.verification, - this.customClientIpHeader, - this.tlsPolicy, - this.domainMetadata, - this.certificate, - this.relyingPartyIdentifier); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static CustomDomainIdStage builder() { - return new Builder(); - } - - public interface CustomDomainIdStage { - /** - *

ID of the custom domain.

- */ - DomainStage customDomainId(@NotNull String customDomainId); - - Builder from(CustomDomain other); - } - - public interface DomainStage { - /** - *

Domain name.

- */ - PrimaryStage domain(@NotNull String domain); - } - - public interface PrimaryStage { - /** - *

Whether this is a primary domain (true) or not (false).

- */ - StatusStage primary(boolean primary); - } - - public interface StatusStage { - TypeStage status(@NotNull CustomDomainStatusFilterEnum status); - } - - public interface TypeStage { - _FinalStage type(@NotNull CustomDomainTypeEnum type); - } - - public interface _FinalStage { - CustomDomain build(); - - /** - *

Whether this is the default custom domain (true) or not (false).

- */ - _FinalStage isDefault(Optional isDefault); - - _FinalStage isDefault(Boolean isDefault); - - /** - *

Intermediate address.

- */ - _FinalStage originDomainName(Optional originDomainName); - - _FinalStage originDomainName(String originDomainName); - - _FinalStage verification(Optional verification); - - _FinalStage verification(DomainVerification verification); - - /** - *

The HTTP header to fetch the client's IP address

- */ - _FinalStage customClientIpHeader(@Nullable OptionalNullable customClientIpHeader); - - _FinalStage customClientIpHeader(String customClientIpHeader); - - _FinalStage customClientIpHeader(Optional customClientIpHeader); - - _FinalStage customClientIpHeader(com.auth0.client.mgmt.core.Nullable customClientIpHeader); - - /** - *

The TLS version policy

- */ - _FinalStage tlsPolicy(Optional tlsPolicy); - - _FinalStage tlsPolicy(String tlsPolicy); - - _FinalStage domainMetadata(Optional>> domainMetadata); - - _FinalStage domainMetadata(Map> domainMetadata); - - _FinalStage certificate(Optional certificate); - - _FinalStage certificate(DomainCertificate certificate); - - /** - *

Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used.

- */ - _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier); - - _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements CustomDomainIdStage, DomainStage, PrimaryStage, StatusStage, TypeStage, _FinalStage { - private String customDomainId; - - private String domain; - - private boolean primary; - - private CustomDomainStatusFilterEnum status; - - private CustomDomainTypeEnum type; - - private Optional relyingPartyIdentifier = Optional.empty(); - - private Optional certificate = Optional.empty(); - - private Optional>> domainMetadata = Optional.empty(); - - private Optional tlsPolicy = Optional.empty(); - - private OptionalNullable customClientIpHeader = OptionalNullable.absent(); - - private Optional verification = Optional.empty(); - - private Optional originDomainName = Optional.empty(); - - private Optional isDefault = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CustomDomain other) { - customDomainId(other.getCustomDomainId()); - domain(other.getDomain()); - primary(other.getPrimary()); - isDefault(other.getIsDefault()); - status(other.getStatus()); - type(other.getType()); - originDomainName(other.getOriginDomainName()); - verification(other.getVerification()); - customClientIpHeader(other.getCustomClientIpHeader()); - tlsPolicy(other.getTlsPolicy()); - domainMetadata(other.getDomainMetadata()); - certificate(other.getCertificate()); - relyingPartyIdentifier(other.getRelyingPartyIdentifier()); - return this; - } - - /** - *

ID of the custom domain.

- *

ID of the custom domain.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("custom_domain_id") - public DomainStage customDomainId(@NotNull String customDomainId) { - this.customDomainId = Objects.requireNonNull(customDomainId, "customDomainId must not be null"); - return this; - } - - /** - *

Domain name.

- *

Domain name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("domain") - public PrimaryStage domain(@NotNull String domain) { - this.domain = Objects.requireNonNull(domain, "domain must not be null"); - return this; - } - - /** - *

Whether this is a primary domain (true) or not (false).

- *

Whether this is a primary domain (true) or not (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("primary") - public StatusStage primary(boolean primary) { - this.primary = primary; - return this; - } - - @java.lang.Override - @JsonSetter("status") - public TypeStage status(@NotNull CustomDomainStatusFilterEnum status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull CustomDomainTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier) { - this.relyingPartyIdentifier = Optional.ofNullable(relyingPartyIdentifier); - return this; - } - - /** - *

Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used.

- */ - @java.lang.Override - @JsonSetter(value = "relying_party_identifier", nulls = Nulls.SKIP) - public _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier) { - this.relyingPartyIdentifier = relyingPartyIdentifier; - return this; - } - - @java.lang.Override - public _FinalStage certificate(DomainCertificate certificate) { - this.certificate = Optional.ofNullable(certificate); - return this; - } - - @java.lang.Override - @JsonSetter(value = "certificate", nulls = Nulls.SKIP) - public _FinalStage certificate(Optional certificate) { - this.certificate = certificate; - return this; - } - - @java.lang.Override - public _FinalStage domainMetadata(Map> domainMetadata) { - this.domainMetadata = Optional.ofNullable(domainMetadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "domain_metadata", nulls = Nulls.SKIP) - public _FinalStage domainMetadata(Optional>> domainMetadata) { - this.domainMetadata = domainMetadata; - return this; - } - - /** - *

The TLS version policy

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage tlsPolicy(String tlsPolicy) { - this.tlsPolicy = Optional.ofNullable(tlsPolicy); - return this; - } - - /** - *

The TLS version policy

- */ - @java.lang.Override - @JsonSetter(value = "tls_policy", nulls = Nulls.SKIP) - public _FinalStage tlsPolicy(Optional tlsPolicy) { - this.tlsPolicy = tlsPolicy; - return this; - } - - /** - *

The HTTP header to fetch the client's IP address

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage customClientIpHeader(com.auth0.client.mgmt.core.Nullable customClientIpHeader) { - if (customClientIpHeader.isNull()) { - this.customClientIpHeader = OptionalNullable.ofNull(); - } else if (customClientIpHeader.isEmpty()) { - this.customClientIpHeader = OptionalNullable.absent(); - } else { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader.get()); - } - return this; - } - - /** - *

The HTTP header to fetch the client's IP address

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage customClientIpHeader(Optional customClientIpHeader) { - if (customClientIpHeader.isPresent()) { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader.get()); - } else { - this.customClientIpHeader = OptionalNullable.absent(); - } - return this; - } - - /** - *

The HTTP header to fetch the client's IP address

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage customClientIpHeader(String customClientIpHeader) { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader); - return this; - } - - /** - *

The HTTP header to fetch the client's IP address

- */ - @java.lang.Override - @JsonSetter(value = "custom_client_ip_header", nulls = Nulls.SKIP) - public _FinalStage customClientIpHeader(@Nullable OptionalNullable customClientIpHeader) { - this.customClientIpHeader = customClientIpHeader; - return this; - } - - @java.lang.Override - public _FinalStage verification(DomainVerification verification) { - this.verification = Optional.ofNullable(verification); - return this; - } - - @java.lang.Override - @JsonSetter(value = "verification", nulls = Nulls.SKIP) - public _FinalStage verification(Optional verification) { - this.verification = verification; - return this; - } - - /** - *

Intermediate address.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage originDomainName(String originDomainName) { - this.originDomainName = Optional.ofNullable(originDomainName); - return this; - } - - /** - *

Intermediate address.

- */ - @java.lang.Override - @JsonSetter(value = "origin_domain_name", nulls = Nulls.SKIP) - public _FinalStage originDomainName(Optional originDomainName) { - this.originDomainName = originDomainName; - return this; - } - - /** - *

Whether this is the default custom domain (true) or not (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage isDefault(Boolean isDefault) { - this.isDefault = Optional.ofNullable(isDefault); - return this; - } - - /** - *

Whether this is the default custom domain (true) or not (false).

- */ - @java.lang.Override - @JsonSetter(value = "is_default", nulls = Nulls.SKIP) - public _FinalStage isDefault(Optional isDefault) { - this.isDefault = isDefault; - return this; - } - - @java.lang.Override - public CustomDomain build() { - return new CustomDomain( - customDomainId, - domain, - primary, - isDefault, - status, - type, - originDomainName, - verification, - customClientIpHeader, - tlsPolicy, - domainMetadata, - certificate, - relyingPartyIdentifier, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomDomainCustomClientIpHeaderEnum.java b/src/main/java/com/auth0/client/mgmt/types/CustomDomainCustomClientIpHeaderEnum.java deleted file mode 100644 index 0325fd72d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CustomDomainCustomClientIpHeaderEnum.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CustomDomainCustomClientIpHeaderEnum { - public static final CustomDomainCustomClientIpHeaderEnum TRUE_CLIENT_IP = - new CustomDomainCustomClientIpHeaderEnum(Value.TRUE_CLIENT_IP, "true-client-ip"); - - public static final CustomDomainCustomClientIpHeaderEnum X_AZURE_CLIENTIP = - new CustomDomainCustomClientIpHeaderEnum(Value.X_AZURE_CLIENTIP, "x-azure-clientip"); - - public static final CustomDomainCustomClientIpHeaderEnum EMPTY = - new CustomDomainCustomClientIpHeaderEnum(Value.EMPTY, ""); - - public static final CustomDomainCustomClientIpHeaderEnum X_FORWARDED_FOR = - new CustomDomainCustomClientIpHeaderEnum(Value.X_FORWARDED_FOR, "x-forwarded-for"); - - public static final CustomDomainCustomClientIpHeaderEnum CF_CONNECTING_IP = - new CustomDomainCustomClientIpHeaderEnum(Value.CF_CONNECTING_IP, "cf-connecting-ip"); - - private final Value value; - - private final String string; - - CustomDomainCustomClientIpHeaderEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CustomDomainCustomClientIpHeaderEnum - && this.string.equals(((CustomDomainCustomClientIpHeaderEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TRUE_CLIENT_IP: - return visitor.visitTrueClientIp(); - case X_AZURE_CLIENTIP: - return visitor.visitXAzureClientip(); - case EMPTY: - return visitor.visitEmpty(); - case X_FORWARDED_FOR: - return visitor.visitXForwardedFor(); - case CF_CONNECTING_IP: - return visitor.visitCfConnectingIp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CustomDomainCustomClientIpHeaderEnum valueOf(String value) { - switch (value) { - case "true-client-ip": - return TRUE_CLIENT_IP; - case "x-azure-clientip": - return X_AZURE_CLIENTIP; - case "": - return EMPTY; - case "x-forwarded-for": - return X_FORWARDED_FOR; - case "cf-connecting-ip": - return CF_CONNECTING_IP; - default: - return new CustomDomainCustomClientIpHeaderEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - TRUE_CLIENT_IP, - - CF_CONNECTING_IP, - - X_FORWARDED_FOR, - - X_AZURE_CLIENTIP, - - EMPTY, - - UNKNOWN - } - - public interface Visitor { - T visitTrueClientIp(); - - T visitCfConnectingIp(); - - T visitXForwardedFor(); - - T visitXAzureClientip(); - - T visitEmpty(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomDomainProvisioningTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/CustomDomainProvisioningTypeEnum.java deleted file mode 100644 index 10ea63a75..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CustomDomainProvisioningTypeEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CustomDomainProvisioningTypeEnum { - public static final CustomDomainProvisioningTypeEnum SELF_MANAGED_CERTS = - new CustomDomainProvisioningTypeEnum(Value.SELF_MANAGED_CERTS, "self_managed_certs"); - - public static final CustomDomainProvisioningTypeEnum AUTH0MANAGED_CERTS = - new CustomDomainProvisioningTypeEnum(Value.AUTH0MANAGED_CERTS, "auth0_managed_certs"); - - private final Value value; - - private final String string; - - CustomDomainProvisioningTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CustomDomainProvisioningTypeEnum - && this.string.equals(((CustomDomainProvisioningTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SELF_MANAGED_CERTS: - return visitor.visitSelfManagedCerts(); - case AUTH0MANAGED_CERTS: - return visitor.visitAuth0ManagedCerts(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CustomDomainProvisioningTypeEnum valueOf(String value) { - switch (value) { - case "self_managed_certs": - return SELF_MANAGED_CERTS; - case "auth0_managed_certs": - return AUTH0MANAGED_CERTS; - default: - return new CustomDomainProvisioningTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AUTH0MANAGED_CERTS, - - SELF_MANAGED_CERTS, - - UNKNOWN - } - - public interface Visitor { - T visitAuth0ManagedCerts(); - - T visitSelfManagedCerts(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomDomainStatusFilterEnum.java b/src/main/java/com/auth0/client/mgmt/types/CustomDomainStatusFilterEnum.java deleted file mode 100644 index d2ca162d6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CustomDomainStatusFilterEnum.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CustomDomainStatusFilterEnum { - public static final CustomDomainStatusFilterEnum FAILED = new CustomDomainStatusFilterEnum(Value.FAILED, "failed"); - - public static final CustomDomainStatusFilterEnum READY = new CustomDomainStatusFilterEnum(Value.READY, "ready"); - - public static final CustomDomainStatusFilterEnum PENDING_VERIFICATION = - new CustomDomainStatusFilterEnum(Value.PENDING_VERIFICATION, "pending_verification"); - - private final Value value; - - private final String string; - - CustomDomainStatusFilterEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CustomDomainStatusFilterEnum - && this.string.equals(((CustomDomainStatusFilterEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FAILED: - return visitor.visitFailed(); - case READY: - return visitor.visitReady(); - case PENDING_VERIFICATION: - return visitor.visitPendingVerification(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CustomDomainStatusFilterEnum valueOf(String value) { - switch (value) { - case "failed": - return FAILED; - case "ready": - return READY; - case "pending_verification": - return PENDING_VERIFICATION; - default: - return new CustomDomainStatusFilterEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PENDING_VERIFICATION, - - READY, - - FAILED, - - UNKNOWN - } - - public interface Visitor { - T visitPendingVerification(); - - T visitReady(); - - T visitFailed(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomDomainTlsPolicyEnum.java b/src/main/java/com/auth0/client/mgmt/types/CustomDomainTlsPolicyEnum.java deleted file mode 100644 index 0ae0fb6b4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CustomDomainTlsPolicyEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CustomDomainTlsPolicyEnum { - public static final CustomDomainTlsPolicyEnum RECOMMENDED = - new CustomDomainTlsPolicyEnum(Value.RECOMMENDED, "recommended"); - - private final Value value; - - private final String string; - - CustomDomainTlsPolicyEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CustomDomainTlsPolicyEnum - && this.string.equals(((CustomDomainTlsPolicyEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case RECOMMENDED: - return visitor.visitRecommended(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CustomDomainTlsPolicyEnum valueOf(String value) { - switch (value) { - case "recommended": - return RECOMMENDED; - default: - return new CustomDomainTlsPolicyEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - RECOMMENDED, - - UNKNOWN - } - - public interface Visitor { - T visitRecommended(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomDomainTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/CustomDomainTypeEnum.java deleted file mode 100644 index 1300052c1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CustomDomainTypeEnum.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CustomDomainTypeEnum { - public static final CustomDomainTypeEnum SELF_MANAGED_CERTS = - new CustomDomainTypeEnum(Value.SELF_MANAGED_CERTS, "self_managed_certs"); - - public static final CustomDomainTypeEnum AUTH0MANAGED_CERTS = - new CustomDomainTypeEnum(Value.AUTH0MANAGED_CERTS, "auth0_managed_certs"); - - private final Value value; - - private final String string; - - CustomDomainTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CustomDomainTypeEnum && this.string.equals(((CustomDomainTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SELF_MANAGED_CERTS: - return visitor.visitSelfManagedCerts(); - case AUTH0MANAGED_CERTS: - return visitor.visitAuth0ManagedCerts(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CustomDomainTypeEnum valueOf(String value) { - switch (value) { - case "self_managed_certs": - return SELF_MANAGED_CERTS; - case "auth0_managed_certs": - return AUTH0MANAGED_CERTS; - default: - return new CustomDomainTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AUTH0MANAGED_CERTS, - - SELF_MANAGED_CERTS, - - UNKNOWN - } - - public interface Visitor { - T visitAuth0ManagedCerts(); - - T visitSelfManagedCerts(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomDomainVerificationMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/CustomDomainVerificationMethodEnum.java deleted file mode 100644 index 56445b9ba..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CustomDomainVerificationMethodEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CustomDomainVerificationMethodEnum { - public static final CustomDomainVerificationMethodEnum TXT = - new CustomDomainVerificationMethodEnum(Value.TXT, "txt"); - - private final Value value; - - private final String string; - - CustomDomainVerificationMethodEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CustomDomainVerificationMethodEnum - && this.string.equals(((CustomDomainVerificationMethodEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TXT: - return visitor.visitTxt(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CustomDomainVerificationMethodEnum valueOf(String value) { - switch (value) { - case "txt": - return TXT; - default: - return new CustomDomainVerificationMethodEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - TXT, - - UNKNOWN - } - - public interface Visitor { - T visitTxt(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomProviderConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/CustomProviderConfiguration.java deleted file mode 100644 index bdf32df78..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CustomProviderConfiguration.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = CustomProviderConfiguration.Builder.class) -public final class CustomProviderConfiguration { - private final List deliveryMethods; - - private final Map additionalProperties; - - private CustomProviderConfiguration( - List deliveryMethods, Map additionalProperties) { - this.deliveryMethods = deliveryMethods; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("delivery_methods") - public List getDeliveryMethods() { - return deliveryMethods; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CustomProviderConfiguration && equalTo((CustomProviderConfiguration) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CustomProviderConfiguration other) { - return deliveryMethods.equals(other.deliveryMethods); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.deliveryMethods); - } - - @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 deliveryMethods = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CustomProviderConfiguration other) { - deliveryMethods(other.getDeliveryMethods()); - return this; - } - - @JsonSetter(value = "delivery_methods", nulls = Nulls.SKIP) - public Builder deliveryMethods(List deliveryMethods) { - this.deliveryMethods.clear(); - if (deliveryMethods != null) { - this.deliveryMethods.addAll(deliveryMethods); - } - return this; - } - - public Builder addDeliveryMethods(CustomProviderDeliveryMethodEnum deliveryMethods) { - this.deliveryMethods.add(deliveryMethods); - return this; - } - - public Builder addAllDeliveryMethods(List deliveryMethods) { - if (deliveryMethods != null) { - this.deliveryMethods.addAll(deliveryMethods); - } - return this; - } - - public CustomProviderConfiguration build() { - return new CustomProviderConfiguration(deliveryMethods, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomProviderCredentials.java b/src/main/java/com/auth0/client/mgmt/types/CustomProviderCredentials.java deleted file mode 100644 index 5a718e799..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CustomProviderCredentials.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.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 = CustomProviderCredentials.Builder.class) -public final class CustomProviderCredentials { - private final Map additionalProperties; - - private CustomProviderCredentials(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CustomProviderCredentials; - } - - @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(CustomProviderCredentials other) { - return this; - } - - public CustomProviderCredentials build() { - return new CustomProviderCredentials(additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomProviderDeliveryMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/CustomProviderDeliveryMethodEnum.java deleted file mode 100644 index 50271acca..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CustomProviderDeliveryMethodEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CustomProviderDeliveryMethodEnum { - public static final CustomProviderDeliveryMethodEnum TEXT = - new CustomProviderDeliveryMethodEnum(Value.TEXT, "text"); - - public static final CustomProviderDeliveryMethodEnum VOICE = - new CustomProviderDeliveryMethodEnum(Value.VOICE, "voice"); - - private final Value value; - - private final String string; - - CustomProviderDeliveryMethodEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CustomProviderDeliveryMethodEnum - && this.string.equals(((CustomProviderDeliveryMethodEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TEXT: - return visitor.visitText(); - case VOICE: - return visitor.visitVoice(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CustomProviderDeliveryMethodEnum valueOf(String value) { - switch (value) { - case "text": - return TEXT; - case "voice": - return VOICE; - default: - return new CustomProviderDeliveryMethodEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - TEXT, - - VOICE, - - UNKNOWN - } - - public interface Visitor { - T visitText(); - - T visitVoice(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyAlgorithmEnum.java deleted file mode 100644 index e9709e539..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyAlgorithmEnum.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CustomSigningKeyAlgorithmEnum { - public static final CustomSigningKeyAlgorithmEnum RS512 = new CustomSigningKeyAlgorithmEnum(Value.RS512, "RS512"); - - public static final CustomSigningKeyAlgorithmEnum ES256 = new CustomSigningKeyAlgorithmEnum(Value.ES256, "ES256"); - - public static final CustomSigningKeyAlgorithmEnum PS256 = new CustomSigningKeyAlgorithmEnum(Value.PS256, "PS256"); - - public static final CustomSigningKeyAlgorithmEnum ES384 = new CustomSigningKeyAlgorithmEnum(Value.ES384, "ES384"); - - public static final CustomSigningKeyAlgorithmEnum PS384 = new CustomSigningKeyAlgorithmEnum(Value.PS384, "PS384"); - - public static final CustomSigningKeyAlgorithmEnum ES512 = new CustomSigningKeyAlgorithmEnum(Value.ES512, "ES512"); - - public static final CustomSigningKeyAlgorithmEnum PS512 = new CustomSigningKeyAlgorithmEnum(Value.PS512, "PS512"); - - public static final CustomSigningKeyAlgorithmEnum RS256 = new CustomSigningKeyAlgorithmEnum(Value.RS256, "RS256"); - - public static final CustomSigningKeyAlgorithmEnum RS384 = new CustomSigningKeyAlgorithmEnum(Value.RS384, "RS384"); - - private final Value value; - - private final String string; - - CustomSigningKeyAlgorithmEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CustomSigningKeyAlgorithmEnum - && this.string.equals(((CustomSigningKeyAlgorithmEnum) 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 ES256: - return visitor.visitEs256(); - case PS256: - return visitor.visitPs256(); - case ES384: - return visitor.visitEs384(); - case PS384: - return visitor.visitPs384(); - case ES512: - return visitor.visitEs512(); - case PS512: - return visitor.visitPs512(); - case RS256: - return visitor.visitRs256(); - case RS384: - return visitor.visitRs384(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CustomSigningKeyAlgorithmEnum valueOf(String value) { - switch (value) { - case "RS512": - return RS512; - case "ES256": - return ES256; - case "PS256": - return PS256; - case "ES384": - return ES384; - case "PS384": - return PS384; - case "ES512": - return ES512; - case "PS512": - return PS512; - case "RS256": - return RS256; - case "RS384": - return RS384; - default: - return new CustomSigningKeyAlgorithmEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - RS256, - - RS384, - - RS512, - - ES256, - - ES384, - - ES512, - - PS256, - - PS384, - - PS512, - - UNKNOWN - } - - public interface Visitor { - T visitRs256(); - - T visitRs384(); - - T visitRs512(); - - T visitEs256(); - - T visitEs384(); - - T visitEs512(); - - T visitPs256(); - - T visitPs384(); - - T visitPs512(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyCurveEnum.java b/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyCurveEnum.java deleted file mode 100644 index bfb12f6d9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyCurveEnum.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CustomSigningKeyCurveEnum { - public static final CustomSigningKeyCurveEnum P521 = new CustomSigningKeyCurveEnum(Value.P521, "P-521"); - - public static final CustomSigningKeyCurveEnum P256 = new CustomSigningKeyCurveEnum(Value.P256, "P-256"); - - public static final CustomSigningKeyCurveEnum P384 = new CustomSigningKeyCurveEnum(Value.P384, "P-384"); - - private final Value value; - - private final String string; - - CustomSigningKeyCurveEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CustomSigningKeyCurveEnum - && this.string.equals(((CustomSigningKeyCurveEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case P521: - return visitor.visitP521(); - case P256: - return visitor.visitP256(); - case P384: - return visitor.visitP384(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CustomSigningKeyCurveEnum valueOf(String value) { - switch (value) { - case "P-521": - return P521; - case "P-256": - return P256; - case "P-384": - return P384; - default: - return new CustomSigningKeyCurveEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - P256, - - P384, - - P521, - - UNKNOWN - } - - public interface Visitor { - T visitP256(); - - T visitP384(); - - T visitP521(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyJwk.java b/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyJwk.java deleted file mode 100644 index 1b04b9cdf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyJwk.java +++ /dev/null @@ -1,642 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CustomSigningKeyJwk.Builder.class) -public final class CustomSigningKeyJwk { - private final CustomSigningKeyTypeEnum kty; - - private final Optional kid; - - private final Optional use; - - private final Optional> keyOps; - - private final Optional alg; - - private final Optional n; - - private final Optional e; - - private final Optional crv; - - private final Optional x; - - private final Optional y; - - private final Optional x5U; - - private final Optional> x5C; - - private final Optional x5T; - - private final Optional x5TS256; - - private final Map additionalProperties; - - private CustomSigningKeyJwk( - CustomSigningKeyTypeEnum kty, - Optional kid, - Optional use, - Optional> keyOps, - Optional alg, - Optional n, - Optional e, - Optional crv, - Optional x, - Optional y, - Optional x5U, - Optional> x5C, - Optional x5T, - Optional x5TS256, - Map additionalProperties) { - this.kty = kty; - this.kid = kid; - this.use = use; - this.keyOps = keyOps; - this.alg = alg; - this.n = n; - this.e = e; - this.crv = crv; - this.x = x; - this.y = y; - this.x5U = x5U; - this.x5C = x5C; - this.x5T = x5T; - this.x5TS256 = x5TS256; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("kty") - public CustomSigningKeyTypeEnum getKty() { - return kty; - } - - /** - * @return Key identifier - */ - @JsonProperty("kid") - public Optional getKid() { - return kid; - } - - @JsonProperty("use") - public Optional getUse() { - return use; - } - - /** - * @return Key operations - */ - @JsonProperty("key_ops") - public Optional> getKeyOps() { - return keyOps; - } - - @JsonProperty("alg") - public Optional getAlg() { - return alg; - } - - /** - * @return Key modulus - */ - @JsonProperty("n") - public Optional getN() { - return n; - } - - /** - * @return Key exponent - */ - @JsonProperty("e") - public Optional getE() { - return e; - } - - @JsonProperty("crv") - public Optional getCrv() { - return crv; - } - - /** - * @return X coordinate - */ - @JsonProperty("x") - public Optional getX() { - return x; - } - - /** - * @return Y coordinate - */ - @JsonProperty("y") - public Optional getY() { - return y; - } - - /** - * @return X.509 URL - */ - @JsonProperty("x5u") - public Optional getX5U() { - return x5U; - } - - /** - * @return X.509 certificate chain - */ - @JsonProperty("x5c") - public Optional> getX5C() { - return x5C; - } - - /** - * @return X.509 certificate SHA-1 thumbprint - */ - @JsonProperty("x5t") - public Optional getX5T() { - return x5T; - } - - /** - * @return X.509 certificate SHA-256 thumbprint - */ - @JsonProperty("x5t#S256") - public Optional getX5TS256() { - return x5TS256; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CustomSigningKeyJwk && equalTo((CustomSigningKeyJwk) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CustomSigningKeyJwk other) { - return kty.equals(other.kty) - && kid.equals(other.kid) - && use.equals(other.use) - && keyOps.equals(other.keyOps) - && alg.equals(other.alg) - && n.equals(other.n) - && e.equals(other.e) - && crv.equals(other.crv) - && x.equals(other.x) - && y.equals(other.y) - && x5U.equals(other.x5U) - && x5C.equals(other.x5C) - && x5T.equals(other.x5T) - && x5TS256.equals(other.x5TS256); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.kty, - this.kid, - this.use, - this.keyOps, - this.alg, - this.n, - this.e, - this.crv, - this.x, - this.y, - this.x5U, - this.x5C, - this.x5T, - this.x5TS256); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static KtyStage builder() { - return new Builder(); - } - - public interface KtyStage { - _FinalStage kty(@NotNull CustomSigningKeyTypeEnum kty); - - Builder from(CustomSigningKeyJwk other); - } - - public interface _FinalStage { - CustomSigningKeyJwk build(); - - /** - *

Key identifier

- */ - _FinalStage kid(Optional kid); - - _FinalStage kid(String kid); - - _FinalStage use(Optional use); - - _FinalStage use(CustomSigningKeyUseEnum use); - - /** - *

Key operations

- */ - _FinalStage keyOps(Optional> keyOps); - - _FinalStage keyOps(List keyOps); - - _FinalStage alg(Optional alg); - - _FinalStage alg(CustomSigningKeyAlgorithmEnum alg); - - /** - *

Key modulus

- */ - _FinalStage n(Optional n); - - _FinalStage n(String n); - - /** - *

Key exponent

- */ - _FinalStage e(Optional e); - - _FinalStage e(String e); - - _FinalStage crv(Optional crv); - - _FinalStage crv(CustomSigningKeyCurveEnum crv); - - /** - *

X coordinate

- */ - _FinalStage x(Optional x); - - _FinalStage x(String x); - - /** - *

Y coordinate

- */ - _FinalStage y(Optional y); - - _FinalStage y(String y); - - /** - *

X.509 URL

- */ - _FinalStage x5U(Optional x5U); - - _FinalStage x5U(String x5U); - - /** - *

X.509 certificate chain

- */ - _FinalStage x5C(Optional> x5C); - - _FinalStage x5C(List x5C); - - /** - *

X.509 certificate SHA-1 thumbprint

- */ - _FinalStage x5T(Optional x5T); - - _FinalStage x5T(String x5T); - - /** - *

X.509 certificate SHA-256 thumbprint

- */ - _FinalStage x5TS256(Optional x5TS256); - - _FinalStage x5TS256(String x5TS256); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements KtyStage, _FinalStage { - private CustomSigningKeyTypeEnum kty; - - private Optional x5TS256 = Optional.empty(); - - private Optional x5T = Optional.empty(); - - private Optional> x5C = Optional.empty(); - - private Optional x5U = Optional.empty(); - - private Optional y = Optional.empty(); - - private Optional x = Optional.empty(); - - private Optional crv = Optional.empty(); - - private Optional e = Optional.empty(); - - private Optional n = Optional.empty(); - - private Optional alg = Optional.empty(); - - private Optional> keyOps = Optional.empty(); - - private Optional use = Optional.empty(); - - private Optional kid = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CustomSigningKeyJwk other) { - kty(other.getKty()); - kid(other.getKid()); - use(other.getUse()); - keyOps(other.getKeyOps()); - alg(other.getAlg()); - n(other.getN()); - e(other.getE()); - crv(other.getCrv()); - x(other.getX()); - y(other.getY()); - x5U(other.getX5U()); - x5C(other.getX5C()); - x5T(other.getX5T()); - x5TS256(other.getX5TS256()); - return this; - } - - @java.lang.Override - @JsonSetter("kty") - public _FinalStage kty(@NotNull CustomSigningKeyTypeEnum kty) { - this.kty = Objects.requireNonNull(kty, "kty must not be null"); - return this; - } - - /** - *

X.509 certificate SHA-256 thumbprint

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage x5TS256(String x5TS256) { - this.x5TS256 = Optional.ofNullable(x5TS256); - return this; - } - - /** - *

X.509 certificate SHA-256 thumbprint

- */ - @java.lang.Override - @JsonSetter(value = "x5t#S256", nulls = Nulls.SKIP) - public _FinalStage x5TS256(Optional x5TS256) { - this.x5TS256 = x5TS256; - return this; - } - - /** - *

X.509 certificate SHA-1 thumbprint

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage x5T(String x5T) { - this.x5T = Optional.ofNullable(x5T); - return this; - } - - /** - *

X.509 certificate SHA-1 thumbprint

- */ - @java.lang.Override - @JsonSetter(value = "x5t", nulls = Nulls.SKIP) - public _FinalStage x5T(Optional x5T) { - this.x5T = x5T; - return this; - } - - /** - *

X.509 certificate chain

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage x5C(List x5C) { - this.x5C = Optional.ofNullable(x5C); - return this; - } - - /** - *

X.509 certificate chain

- */ - @java.lang.Override - @JsonSetter(value = "x5c", nulls = Nulls.SKIP) - public _FinalStage x5C(Optional> x5C) { - this.x5C = x5C; - return this; - } - - /** - *

X.509 URL

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage x5U(String x5U) { - this.x5U = Optional.ofNullable(x5U); - return this; - } - - /** - *

X.509 URL

- */ - @java.lang.Override - @JsonSetter(value = "x5u", nulls = Nulls.SKIP) - public _FinalStage x5U(Optional x5U) { - this.x5U = x5U; - return this; - } - - /** - *

Y coordinate

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage y(String y) { - this.y = Optional.ofNullable(y); - return this; - } - - /** - *

Y coordinate

- */ - @java.lang.Override - @JsonSetter(value = "y", nulls = Nulls.SKIP) - public _FinalStage y(Optional y) { - this.y = y; - return this; - } - - /** - *

X coordinate

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage x(String x) { - this.x = Optional.ofNullable(x); - return this; - } - - /** - *

X coordinate

- */ - @java.lang.Override - @JsonSetter(value = "x", nulls = Nulls.SKIP) - public _FinalStage x(Optional x) { - this.x = x; - return this; - } - - @java.lang.Override - public _FinalStage crv(CustomSigningKeyCurveEnum crv) { - this.crv = Optional.ofNullable(crv); - return this; - } - - @java.lang.Override - @JsonSetter(value = "crv", nulls = Nulls.SKIP) - public _FinalStage crv(Optional crv) { - this.crv = crv; - return this; - } - - /** - *

Key exponent

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage e(String e) { - this.e = Optional.ofNullable(e); - return this; - } - - /** - *

Key exponent

- */ - @java.lang.Override - @JsonSetter(value = "e", nulls = Nulls.SKIP) - public _FinalStage e(Optional e) { - this.e = e; - return this; - } - - /** - *

Key modulus

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage n(String n) { - this.n = Optional.ofNullable(n); - return this; - } - - /** - *

Key modulus

- */ - @java.lang.Override - @JsonSetter(value = "n", nulls = Nulls.SKIP) - public _FinalStage n(Optional n) { - this.n = n; - return this; - } - - @java.lang.Override - public _FinalStage alg(CustomSigningKeyAlgorithmEnum alg) { - this.alg = Optional.ofNullable(alg); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alg", nulls = Nulls.SKIP) - public _FinalStage alg(Optional alg) { - this.alg = alg; - return this; - } - - /** - *

Key operations

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage keyOps(List keyOps) { - this.keyOps = Optional.ofNullable(keyOps); - return this; - } - - /** - *

Key operations

- */ - @java.lang.Override - @JsonSetter(value = "key_ops", nulls = Nulls.SKIP) - public _FinalStage keyOps(Optional> keyOps) { - this.keyOps = keyOps; - return this; - } - - @java.lang.Override - public _FinalStage use(CustomSigningKeyUseEnum use) { - this.use = Optional.ofNullable(use); - return this; - } - - @java.lang.Override - @JsonSetter(value = "use", nulls = Nulls.SKIP) - public _FinalStage use(Optional use) { - this.use = use; - return this; - } - - /** - *

Key identifier

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage kid(String kid) { - this.kid = Optional.ofNullable(kid); - return this; - } - - /** - *

Key identifier

- */ - @java.lang.Override - @JsonSetter(value = "kid", nulls = Nulls.SKIP) - public _FinalStage kid(Optional kid) { - this.kid = kid; - return this; - } - - @java.lang.Override - public CustomSigningKeyJwk build() { - return new CustomSigningKeyJwk( - kty, kid, use, keyOps, alg, n, e, crv, x, y, x5U, x5C, x5T, x5TS256, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyOperationEnum.java b/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyOperationEnum.java deleted file mode 100644 index 20c39050f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyOperationEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CustomSigningKeyOperationEnum { - public static final CustomSigningKeyOperationEnum VERIFY = - new CustomSigningKeyOperationEnum(Value.VERIFY, "verify"); - - private final Value value; - - private final String string; - - CustomSigningKeyOperationEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CustomSigningKeyOperationEnum - && this.string.equals(((CustomSigningKeyOperationEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case VERIFY: - return visitor.visitVerify(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CustomSigningKeyOperationEnum valueOf(String value) { - switch (value) { - case "verify": - return VERIFY; - default: - return new CustomSigningKeyOperationEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - VERIFY, - - UNKNOWN - } - - public interface Visitor { - T visitVerify(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyTypeEnum.java deleted file mode 100644 index c5436f6bf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyTypeEnum.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CustomSigningKeyTypeEnum { - public static final CustomSigningKeyTypeEnum EC = new CustomSigningKeyTypeEnum(Value.EC, "EC"); - - public static final CustomSigningKeyTypeEnum RSA = new CustomSigningKeyTypeEnum(Value.RSA, "RSA"); - - private final Value value; - - private final String string; - - CustomSigningKeyTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CustomSigningKeyTypeEnum - && this.string.equals(((CustomSigningKeyTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EC: - return visitor.visitEc(); - case RSA: - return visitor.visitRsa(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CustomSigningKeyTypeEnum valueOf(String value) { - switch (value) { - case "EC": - return EC; - case "RSA": - return RSA; - default: - return new CustomSigningKeyTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - EC, - - RSA, - - UNKNOWN - } - - public interface Visitor { - T visitEc(); - - T visitRsa(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyUseEnum.java b/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyUseEnum.java deleted file mode 100644 index 9d090ef07..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/CustomSigningKeyUseEnum.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class CustomSigningKeyUseEnum { - public static final CustomSigningKeyUseEnum SIG = new CustomSigningKeyUseEnum(Value.SIG, "sig"); - - private final Value value; - - private final String string; - - CustomSigningKeyUseEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof CustomSigningKeyUseEnum - && this.string.equals(((CustomSigningKeyUseEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SIG: - return visitor.visitSig(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static CustomSigningKeyUseEnum valueOf(String value) { - switch (value) { - case "sig": - return SIG; - default: - return new CustomSigningKeyUseEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - SIG, - - UNKNOWN - } - - public interface Visitor { - T visitSig(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DailyStats.java b/src/main/java/com/auth0/client/mgmt/types/DailyStats.java deleted file mode 100644 index 9a9419276..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DailyStats.java +++ /dev/null @@ -1,253 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = DailyStats.Builder.class) -public final class DailyStats { - private final Optional date; - - private final Optional logins; - - private final Optional signups; - - private final Optional leakedPasswords; - - private final Optional updatedAt; - - private final Optional createdAt; - - private final Map additionalProperties; - - private DailyStats( - Optional date, - Optional logins, - Optional signups, - Optional leakedPasswords, - Optional updatedAt, - Optional createdAt, - Map additionalProperties) { - this.date = date; - this.logins = logins; - this.signups = signups; - this.leakedPasswords = leakedPasswords; - this.updatedAt = updatedAt; - this.createdAt = createdAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return Date these events occurred in ISO 8601 format. - */ - @JsonProperty("date") - public Optional getDate() { - return date; - } - - /** - * @return Number of logins on this date. - */ - @JsonProperty("logins") - public Optional getLogins() { - return logins; - } - - /** - * @return Number of signups on this date. - */ - @JsonProperty("signups") - public Optional getSignups() { - return signups; - } - - /** - * @return Number of breached-password detections on this date (subscription required). - */ - @JsonProperty("leaked_passwords") - public Optional getLeakedPasswords() { - return leakedPasswords; - } - - /** - * @return Date and time this stats entry was last updated in ISO 8601 format. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return Approximate date and time the first event occurred in ISO 8601 format. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DailyStats && equalTo((DailyStats) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DailyStats other) { - return date.equals(other.date) - && logins.equals(other.logins) - && signups.equals(other.signups) - && leakedPasswords.equals(other.leakedPasswords) - && updatedAt.equals(other.updatedAt) - && createdAt.equals(other.createdAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.date, this.logins, this.signups, this.leakedPasswords, this.updatedAt, this.createdAt); - } - - @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 date = Optional.empty(); - - private Optional logins = Optional.empty(); - - private Optional signups = Optional.empty(); - - private Optional leakedPasswords = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(DailyStats other) { - date(other.getDate()); - logins(other.getLogins()); - signups(other.getSignups()); - leakedPasswords(other.getLeakedPasswords()); - updatedAt(other.getUpdatedAt()); - createdAt(other.getCreatedAt()); - return this; - } - - /** - *

Date these events occurred in ISO 8601 format.

- */ - @JsonSetter(value = "date", nulls = Nulls.SKIP) - public Builder date(Optional date) { - this.date = date; - return this; - } - - public Builder date(String date) { - this.date = Optional.ofNullable(date); - return this; - } - - /** - *

Number of logins on this date.

- */ - @JsonSetter(value = "logins", nulls = Nulls.SKIP) - public Builder logins(Optional logins) { - this.logins = logins; - return this; - } - - public Builder logins(Integer logins) { - this.logins = Optional.ofNullable(logins); - return this; - } - - /** - *

Number of signups on this date.

- */ - @JsonSetter(value = "signups", nulls = Nulls.SKIP) - public Builder signups(Optional signups) { - this.signups = signups; - return this; - } - - public Builder signups(Integer signups) { - this.signups = Optional.ofNullable(signups); - return this; - } - - /** - *

Number of breached-password detections on this date (subscription required).

- */ - @JsonSetter(value = "leaked_passwords", nulls = Nulls.SKIP) - public Builder leakedPasswords(Optional leakedPasswords) { - this.leakedPasswords = leakedPasswords; - return this; - } - - public Builder leakedPasswords(Integer leakedPasswords) { - this.leakedPasswords = Optional.ofNullable(leakedPasswords); - return this; - } - - /** - *

Date and time this stats entry was last updated in ISO 8601 format.

- */ - @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - public Builder updatedAt(String updatedAt) { - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - /** - *

Approximate date and time the first event occurred in ISO 8601 format.

- */ - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(String createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - public DailyStats build() { - return new DailyStats(date, logins, signups, leakedPasswords, updatedAt, createdAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DefaultMethodEmailIdentifierEnum.java b/src/main/java/com/auth0/client/mgmt/types/DefaultMethodEmailIdentifierEnum.java deleted file mode 100644 index 092b4d9a5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DefaultMethodEmailIdentifierEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class DefaultMethodEmailIdentifierEnum { - public static final DefaultMethodEmailIdentifierEnum PASSWORD = - new DefaultMethodEmailIdentifierEnum(Value.PASSWORD, "password"); - - public static final DefaultMethodEmailIdentifierEnum EMAIL_OTP = - new DefaultMethodEmailIdentifierEnum(Value.EMAIL_OTP, "email_otp"); - - private final Value value; - - private final String string; - - DefaultMethodEmailIdentifierEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof DefaultMethodEmailIdentifierEnum - && this.string.equals(((DefaultMethodEmailIdentifierEnum) 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 EMAIL_OTP: - return visitor.visitEmailOtp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static DefaultMethodEmailIdentifierEnum valueOf(String value) { - switch (value) { - case "password": - return PASSWORD; - case "email_otp": - return EMAIL_OTP; - default: - return new DefaultMethodEmailIdentifierEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PASSWORD, - - EMAIL_OTP, - - UNKNOWN - } - - public interface Visitor { - T visitPassword(); - - T visitEmailOtp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DefaultTokenQuota.java b/src/main/java/com/auth0/client/mgmt/types/DefaultTokenQuota.java deleted file mode 100644 index 588640ef6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DefaultTokenQuota.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = DefaultTokenQuota.Builder.class) -public final class DefaultTokenQuota { - private final Optional clients; - - private final Optional organizations; - - private final Map additionalProperties; - - private DefaultTokenQuota( - Optional clients, - Optional organizations, - Map additionalProperties) { - this.clients = clients; - this.organizations = organizations; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("clients") - public Optional getClients() { - return clients; - } - - @JsonProperty("organizations") - public Optional getOrganizations() { - return organizations; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DefaultTokenQuota && equalTo((DefaultTokenQuota) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DefaultTokenQuota other) { - return clients.equals(other.clients) && organizations.equals(other.organizations); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.clients, this.organizations); - } - - @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 clients = Optional.empty(); - - private Optional organizations = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(DefaultTokenQuota other) { - clients(other.getClients()); - organizations(other.getOrganizations()); - return this; - } - - @JsonSetter(value = "clients", nulls = Nulls.SKIP) - public Builder clients(Optional clients) { - this.clients = clients; - return this; - } - - public Builder clients(TokenQuotaConfiguration clients) { - this.clients = Optional.ofNullable(clients); - return this; - } - - @JsonSetter(value = "organizations", nulls = Nulls.SKIP) - public Builder organizations(Optional organizations) { - this.organizations = organizations; - return this; - } - - public Builder organizations(TokenQuotaConfiguration organizations) { - this.organizations = Optional.ofNullable(organizations); - return this; - } - - public DefaultTokenQuota build() { - return new DefaultTokenQuota(clients, organizations, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DeleteActionRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/DeleteActionRequestParameters.java deleted file mode 100644 index 5f1777c0f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DeleteActionRequestParameters.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = DeleteActionRequestParameters.Builder.class) -public final class DeleteActionRequestParameters { - private final OptionalNullable force; - - private final Map additionalProperties; - - private DeleteActionRequestParameters(OptionalNullable force, Map additionalProperties) { - this.force = force; - this.additionalProperties = additionalProperties; - } - - /** - * @return Force action deletion detaching bindings - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("force") - public OptionalNullable getForce() { - if (force == null) { - return OptionalNullable.absent(); - } - 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; - return other instanceof DeleteActionRequestParameters && equalTo((DeleteActionRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DeleteActionRequestParameters other) { - return force.equals(other.force); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.force); - } - - @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 force = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(DeleteActionRequestParameters other) { - force(other.getForce()); - return this; - } - - /** - *

Force action deletion detaching bindings

- */ - @JsonSetter(value = "force", nulls = Nulls.SKIP) - public Builder force(@Nullable OptionalNullable force) { - this.force = force; - return this; - } - - public Builder force(Boolean force) { - this.force = OptionalNullable.of(force); - return this; - } - - public Builder force(Optional force) { - if (force.isPresent()) { - this.force = OptionalNullable.of(force.get()); - } else { - this.force = OptionalNullable.absent(); - } - return this; - } - - public Builder force(com.auth0.client.mgmt.core.Nullable force) { - if (force.isNull()) { - this.force = OptionalNullable.ofNull(); - } else if (force.isEmpty()) { - this.force = OptionalNullable.absent(); - } else { - this.force = OptionalNullable.of(force.get()); - } - return this; - } - - public DeleteActionRequestParameters build() { - return new DeleteActionRequestParameters(force, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DeleteUserBlocksByIdentifierRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/DeleteUserBlocksByIdentifierRequestParameters.java deleted file mode 100644 index 3a5d3b645..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DeleteUserBlocksByIdentifierRequestParameters.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = DeleteUserBlocksByIdentifierRequestParameters.Builder.class) -public final class DeleteUserBlocksByIdentifierRequestParameters { - private final String identifier; - - private final Map additionalProperties; - - private DeleteUserBlocksByIdentifierRequestParameters(String identifier, Map additionalProperties) { - this.identifier = identifier; - this.additionalProperties = additionalProperties; - } - - /** - * @return Should be any of a username, phone number, or email. - */ - @JsonProperty("identifier") - public String getIdentifier() { - return identifier; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DeleteUserBlocksByIdentifierRequestParameters - && equalTo((DeleteUserBlocksByIdentifierRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DeleteUserBlocksByIdentifierRequestParameters other) { - return identifier.equals(other.identifier); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.identifier); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdentifierStage builder() { - return new Builder(); - } - - public interface IdentifierStage { - /** - *

Should be any of a username, phone number, or email.

- */ - _FinalStage identifier(@NotNull String identifier); - - Builder from(DeleteUserBlocksByIdentifierRequestParameters other); - } - - public interface _FinalStage { - DeleteUserBlocksByIdentifierRequestParameters build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdentifierStage, _FinalStage { - private String identifier; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DeleteUserBlocksByIdentifierRequestParameters other) { - identifier(other.getIdentifier()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("identifier") - public _FinalStage identifier(@NotNull String identifier) { - this.identifier = Objects.requireNonNull(identifier, "identifier must not be null"); - return this; - } - - @java.lang.Override - public DeleteUserBlocksByIdentifierRequestParameters build() { - return new DeleteUserBlocksByIdentifierRequestParameters(identifier, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DeleteUserGrantByUserIdRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/DeleteUserGrantByUserIdRequestParameters.java deleted file mode 100644 index 4f2c23fe2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DeleteUserGrantByUserIdRequestParameters.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = DeleteUserGrantByUserIdRequestParameters.Builder.class) -public final class DeleteUserGrantByUserIdRequestParameters { - private final String userId; - - private final Map additionalProperties; - - private DeleteUserGrantByUserIdRequestParameters(String userId, Map additionalProperties) { - this.userId = userId; - this.additionalProperties = additionalProperties; - } - - /** - * @return user_id of the grant to delete. - */ - @JsonProperty("user_id") - public String getUserId() { - return userId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DeleteUserGrantByUserIdRequestParameters - && equalTo((DeleteUserGrantByUserIdRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DeleteUserGrantByUserIdRequestParameters 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 { - /** - *

user_id of the grant to delete.

- */ - _FinalStage userId(@NotNull String userId); - - Builder from(DeleteUserGrantByUserIdRequestParameters other); - } - - public interface _FinalStage { - DeleteUserGrantByUserIdRequestParameters build(); - } - - @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(DeleteUserGrantByUserIdRequestParameters other) { - userId(other.getUserId()); - return this; - } - - /** - *

user_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. - */ - @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 DeleteUserGrantByUserIdRequestParameters build() { - return new DeleteUserGrantByUserIdRequestParameters(userId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DeleteUserIdentityResponseContentItem.java b/src/main/java/com/auth0/client/mgmt/types/DeleteUserIdentityResponseContentItem.java deleted file mode 100644 index becb6c2ed..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DeleteUserIdentityResponseContentItem.java +++ /dev/null @@ -1,407 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = DeleteUserIdentityResponseContentItem.Builder.class) -public final class DeleteUserIdentityResponseContentItem { - private final String connection; - - private final String userId; - - private final String provider; - - private final Optional isSocial; - - private final Optional accessToken; - - private final Optional accessTokenSecret; - - private final Optional refreshToken; - - private final Optional profileData; - - private final Map additionalProperties; - - private DeleteUserIdentityResponseContentItem( - String connection, - String userId, - String provider, - Optional isSocial, - Optional accessToken, - Optional accessTokenSecret, - Optional refreshToken, - Optional profileData, - Map additionalProperties) { - this.connection = connection; - this.userId = userId; - this.provider = provider; - this.isSocial = isSocial; - this.accessToken = accessToken; - this.accessTokenSecret = accessTokenSecret; - this.refreshToken = refreshToken; - this.profileData = profileData; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the connection for the identity. - */ - @JsonProperty("connection") - public String getConnection() { - return connection; - } - - /** - * @return The unique identifier for the user for the identity. - */ - @JsonProperty("user_id") - public String getUserId() { - return userId; - } - - /** - * @return The type of identity provider. - */ - @JsonProperty("provider") - public String getProvider() { - return provider; - } - - /** - * @return <code>true</code> if the identity provider is a social provider, <code>false</code>s otherwise - */ - @JsonProperty("isSocial") - public Optional getIsSocial() { - return isSocial; - } - - /** - * @return IDP access token returned only if scope read:user_idp_tokens is defined - */ - @JsonProperty("access_token") - public Optional getAccessToken() { - return accessToken; - } - - /** - * @return IDP access token secret returned only if scope read:user_idp_tokens is defined. - */ - @JsonProperty("access_token_secret") - public Optional getAccessTokenSecret() { - return accessTokenSecret; - } - - /** - * @return IDP refresh token returned only if scope read:user_idp_tokens is defined. - */ - @JsonProperty("refresh_token") - public Optional getRefreshToken() { - return refreshToken; - } - - @JsonProperty("profileData") - public Optional getProfileData() { - return profileData; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DeleteUserIdentityResponseContentItem - && equalTo((DeleteUserIdentityResponseContentItem) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DeleteUserIdentityResponseContentItem other) { - return connection.equals(other.connection) - && userId.equals(other.userId) - && provider.equals(other.provider) - && isSocial.equals(other.isSocial) - && accessToken.equals(other.accessToken) - && accessTokenSecret.equals(other.accessTokenSecret) - && refreshToken.equals(other.refreshToken) - && profileData.equals(other.profileData); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connection, - this.userId, - this.provider, - this.isSocial, - this.accessToken, - this.accessTokenSecret, - this.refreshToken, - this.profileData); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionStage builder() { - return new Builder(); - } - - public interface ConnectionStage { - /** - *

The name of the connection for the identity.

- */ - UserIdStage connection(@NotNull String connection); - - Builder from(DeleteUserIdentityResponseContentItem other); - } - - public interface UserIdStage { - /** - *

The unique identifier for the user for the identity.

- */ - ProviderStage userId(@NotNull String userId); - } - - public interface ProviderStage { - /** - *

The type of identity provider.

- */ - _FinalStage provider(@NotNull String provider); - } - - public interface _FinalStage { - DeleteUserIdentityResponseContentItem build(); - - /** - *

<code>true</code> if the identity provider is a social provider, <code>false</code>s otherwise

- */ - _FinalStage isSocial(Optional isSocial); - - _FinalStage isSocial(Boolean isSocial); - - /** - *

IDP access token returned only if scope read:user_idp_tokens is defined

- */ - _FinalStage accessToken(Optional accessToken); - - _FinalStage accessToken(String accessToken); - - /** - *

IDP access token secret returned only if scope read:user_idp_tokens is defined.

- */ - _FinalStage accessTokenSecret(Optional accessTokenSecret); - - _FinalStage accessTokenSecret(String accessTokenSecret); - - /** - *

IDP refresh token returned only if scope read:user_idp_tokens is defined.

- */ - _FinalStage refreshToken(Optional refreshToken); - - _FinalStage refreshToken(String refreshToken); - - _FinalStage profileData(Optional profileData); - - _FinalStage profileData(UserProfileData profileData); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionStage, UserIdStage, ProviderStage, _FinalStage { - private String connection; - - private String userId; - - private String provider; - - private Optional profileData = Optional.empty(); - - private Optional refreshToken = Optional.empty(); - - private Optional accessTokenSecret = Optional.empty(); - - private Optional accessToken = Optional.empty(); - - private Optional isSocial = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DeleteUserIdentityResponseContentItem other) { - connection(other.getConnection()); - userId(other.getUserId()); - provider(other.getProvider()); - isSocial(other.getIsSocial()); - accessToken(other.getAccessToken()); - accessTokenSecret(other.getAccessTokenSecret()); - refreshToken(other.getRefreshToken()); - profileData(other.getProfileData()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("connection") - public UserIdStage connection(@NotNull String connection) { - this.connection = Objects.requireNonNull(connection, "connection must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("user_id") - public ProviderStage userId(@NotNull String userId) { - this.userId = Objects.requireNonNull(userId, "userId must not be null"); - return this; - } - - /** - *

The type of identity provider.

- *

The type of identity provider.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("provider") - public _FinalStage provider(@NotNull String provider) { - this.provider = Objects.requireNonNull(provider, "provider must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage profileData(UserProfileData 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; - } - - /** - *

IDP refresh token returned only if scope read:user_idp_tokens is defined.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage refreshToken(String refreshToken) { - this.refreshToken = Optional.ofNullable(refreshToken); - return this; - } - - /** - *

IDP refresh token returned only if scope read:user_idp_tokens is defined.

- */ - @java.lang.Override - @JsonSetter(value = "refresh_token", nulls = Nulls.SKIP) - public _FinalStage refreshToken(Optional refreshToken) { - this.refreshToken = refreshToken; - return this; - } - - /** - *

IDP access token secret returned only if scope read:user_idp_tokens is defined.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage accessTokenSecret(String accessTokenSecret) { - this.accessTokenSecret = Optional.ofNullable(accessTokenSecret); - return this; - } - - /** - *

IDP access token secret returned only if scope read:user_idp_tokens is defined.

- */ - @java.lang.Override - @JsonSetter(value = "access_token_secret", nulls = Nulls.SKIP) - public _FinalStage accessTokenSecret(Optional accessTokenSecret) { - this.accessTokenSecret = accessTokenSecret; - return this; - } - - /** - *

IDP access token returned only if scope read:user_idp_tokens is defined

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage accessToken(String accessToken) { - this.accessToken = Optional.ofNullable(accessToken); - return this; - } - - /** - *

IDP access token returned only if scope read:user_idp_tokens is defined

- */ - @java.lang.Override - @JsonSetter(value = "access_token", nulls = Nulls.SKIP) - public _FinalStage accessToken(Optional accessToken) { - this.accessToken = accessToken; - return this; - } - - /** - *

<code>true</code> if the identity provider is a social provider, <code>false</code>s otherwise

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage isSocial(Boolean isSocial) { - this.isSocial = Optional.ofNullable(isSocial); - return this; - } - - /** - *

<code>true</code> if the identity provider is a social provider, <code>false</code>s otherwise

- */ - @java.lang.Override - @JsonSetter(value = "isSocial", nulls = Nulls.SKIP) - public _FinalStage isSocial(Optional isSocial) { - this.isSocial = isSocial; - return this; - } - - @java.lang.Override - public DeleteUserIdentityResponseContentItem build() { - return new DeleteUserIdentityResponseContentItem( - connection, - userId, - provider, - isSocial, - accessToken, - accessTokenSecret, - refreshToken, - profileData, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DeployActionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/DeployActionResponseContent.java deleted file mode 100644 index 5b2c38332..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DeployActionResponseContent.java +++ /dev/null @@ -1,576 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = DeployActionResponseContent.Builder.class) -public final class DeployActionResponseContent { - private final Optional id; - - private final Optional actionId; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional deployed; - - private final Optional runtime; - - private final Optional> secrets; - - private final Optional status; - - private final Optional number; - - private final Optional> errors; - - private final Optional action; - - private final Optional builtAt; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional> supportedTriggers; - - private final Optional> modules; - - private final Map additionalProperties; - - private DeployActionResponseContent( - Optional id, - Optional actionId, - Optional code, - Optional> dependencies, - Optional deployed, - Optional runtime, - Optional> secrets, - Optional status, - Optional number, - Optional> errors, - Optional action, - Optional builtAt, - Optional createdAt, - Optional updatedAt, - Optional> supportedTriggers, - Optional> modules, - Map additionalProperties) { - this.id = id; - this.actionId = actionId; - this.code = code; - this.dependencies = dependencies; - this.deployed = deployed; - this.runtime = runtime; - this.secrets = secrets; - this.status = status; - this.number = number; - this.errors = errors; - this.action = action; - this.builtAt = builtAt; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.supportedTriggers = supportedTriggers; - this.modules = modules; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique id of an action version. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The id of the action to which this version belongs. - */ - @JsonProperty("action_id") - public Optional getActionId() { - return actionId; - } - - /** - * @return The source code of this specific version of the action. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The list of third party npm modules, and their versions, that this specific version depends on. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return Indicates if this specific version is the currently one deployed. - */ - @JsonProperty("deployed") - public Optional getDeployed() { - return deployed; - } - - /** - * @return The Node runtime. For example: node22 - */ - @JsonProperty("runtime") - public Optional getRuntime() { - return runtime; - } - - /** - * @return The list of secrets that are included in an action or a version of an action. - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return The index of this version in list of versions for the action. - */ - @JsonProperty("number") - public Optional getNumber() { - return number; - } - - /** - * @return Any errors that occurred while the version was being built. - */ - @JsonProperty("errors") - public Optional> getErrors() { - return errors; - } - - @JsonProperty("action") - public Optional getAction() { - return action; - } - - /** - * @return The time when this version was built successfully. - */ - @JsonProperty("built_at") - public Optional getBuiltAt() { - return builtAt; - } - - /** - * @return The time when this version was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when a version was updated. Versions are never updated externally. Only Auth0 will update an action version as it is being built. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return The list of triggers that this version supports. At this time, a version can only target a single trigger at a time. - */ - @JsonProperty("supported_triggers") - public Optional> getSupportedTriggers() { - return supportedTriggers; - } - - /** - * @return The list of action modules and their versions used by this action version. - */ - @JsonProperty("modules") - public Optional> getModules() { - return modules; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DeployActionResponseContent && equalTo((DeployActionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DeployActionResponseContent other) { - return id.equals(other.id) - && actionId.equals(other.actionId) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && deployed.equals(other.deployed) - && runtime.equals(other.runtime) - && secrets.equals(other.secrets) - && status.equals(other.status) - && number.equals(other.number) - && errors.equals(other.errors) - && action.equals(other.action) - && builtAt.equals(other.builtAt) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && supportedTriggers.equals(other.supportedTriggers) - && modules.equals(other.modules); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.actionId, - this.code, - this.dependencies, - this.deployed, - this.runtime, - this.secrets, - this.status, - this.number, - this.errors, - this.action, - this.builtAt, - this.createdAt, - this.updatedAt, - this.supportedTriggers, - this.modules); - } - - @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 actionId = Optional.empty(); - - private Optional code = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional deployed = Optional.empty(); - - private Optional runtime = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional status = Optional.empty(); - - private Optional number = Optional.empty(); - - private Optional> errors = Optional.empty(); - - private Optional action = Optional.empty(); - - private Optional builtAt = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional> supportedTriggers = Optional.empty(); - - private Optional> modules = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(DeployActionResponseContent other) { - id(other.getId()); - actionId(other.getActionId()); - code(other.getCode()); - dependencies(other.getDependencies()); - deployed(other.getDeployed()); - runtime(other.getRuntime()); - secrets(other.getSecrets()); - status(other.getStatus()); - number(other.getNumber()); - errors(other.getErrors()); - action(other.getAction()); - builtAt(other.getBuiltAt()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - supportedTriggers(other.getSupportedTriggers()); - modules(other.getModules()); - return this; - } - - /** - *

The unique id of an action version.

- */ - @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 id of the action to which this version belongs.

- */ - @JsonSetter(value = "action_id", nulls = Nulls.SKIP) - public Builder actionId(Optional actionId) { - this.actionId = actionId; - return this; - } - - public Builder actionId(String actionId) { - this.actionId = Optional.ofNullable(actionId); - return this; - } - - /** - *

The source code of this specific version of the action.

- */ - @JsonSetter(value = "code", nulls = Nulls.SKIP) - public Builder code(Optional code) { - this.code = code; - return this; - } - - public Builder code(String code) { - this.code = Optional.ofNullable(code); - return this; - } - - /** - *

The list of third party npm modules, and their versions, that this specific version depends on.

- */ - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public Builder dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - public Builder dependencies(List dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - /** - *

Indicates if this specific version is the currently one deployed.

- */ - @JsonSetter(value = "deployed", nulls = Nulls.SKIP) - public Builder deployed(Optional deployed) { - this.deployed = deployed; - return this; - } - - public Builder deployed(Boolean deployed) { - this.deployed = Optional.ofNullable(deployed); - return this; - } - - /** - *

The Node runtime. For example: node22

- */ - @JsonSetter(value = "runtime", nulls = Nulls.SKIP) - public Builder runtime(Optional runtime) { - this.runtime = runtime; - return this; - } - - public Builder runtime(String runtime) { - this.runtime = Optional.ofNullable(runtime); - return this; - } - - /** - *

The list of secrets that are included in an action or a version of an action.

- */ - @JsonSetter(value = "secrets", nulls = Nulls.SKIP) - public Builder secrets(Optional> secrets) { - this.secrets = secrets; - return this; - } - - public Builder secrets(List secrets) { - this.secrets = Optional.ofNullable(secrets); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(ActionVersionBuildStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - /** - *

The index of this version in list of versions for the action.

- */ - @JsonSetter(value = "number", nulls = Nulls.SKIP) - public Builder number(Optional number) { - this.number = number; - return this; - } - - public Builder number(Double number) { - this.number = Optional.ofNullable(number); - return this; - } - - /** - *

Any errors that occurred while the version was being built.

- */ - @JsonSetter(value = "errors", nulls = Nulls.SKIP) - public Builder errors(Optional> errors) { - this.errors = errors; - return this; - } - - public Builder errors(List errors) { - this.errors = Optional.ofNullable(errors); - return this; - } - - @JsonSetter(value = "action", nulls = Nulls.SKIP) - public Builder action(Optional action) { - this.action = action; - return this; - } - - public Builder action(ActionBase action) { - this.action = Optional.ofNullable(action); - return this; - } - - /** - *

The time when this version was built successfully.

- */ - @JsonSetter(value = "built_at", nulls = Nulls.SKIP) - public Builder builtAt(Optional builtAt) { - this.builtAt = builtAt; - return this; - } - - public Builder builtAt(OffsetDateTime builtAt) { - this.builtAt = Optional.ofNullable(builtAt); - return this; - } - - /** - *

The time when this version 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 time when a version was updated. Versions are never updated externally. Only Auth0 will update an action version as it is being built.

- */ - @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; - } - - /** - *

The list of triggers that this version supports. At this time, a version can only target a single trigger at a time.

- */ - @JsonSetter(value = "supported_triggers", nulls = Nulls.SKIP) - public Builder supportedTriggers(Optional> supportedTriggers) { - this.supportedTriggers = supportedTriggers; - return this; - } - - public Builder supportedTriggers(List supportedTriggers) { - this.supportedTriggers = Optional.ofNullable(supportedTriggers); - return this; - } - - /** - *

The list of action modules and their versions used by this action version.

- */ - @JsonSetter(value = "modules", nulls = Nulls.SKIP) - public Builder modules(Optional> modules) { - this.modules = modules; - return this; - } - - public Builder modules(List modules) { - this.modules = Optional.ofNullable(modules); - return this; - } - - public DeployActionResponseContent build() { - return new DeployActionResponseContent( - id, - actionId, - code, - dependencies, - deployed, - runtime, - secrets, - status, - number, - errors, - action, - builtAt, - createdAt, - updatedAt, - supportedTriggers, - modules, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DeployActionVersionRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/DeployActionVersionRequestContent.java deleted file mode 100644 index c1b9c628c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DeployActionVersionRequestContent.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = DeployActionVersionRequestContent.Builder.class) -public final class DeployActionVersionRequestContent { - private final Optional updateDraft; - - private final Map additionalProperties; - - private DeployActionVersionRequestContent(Optional updateDraft, Map additionalProperties) { - this.updateDraft = updateDraft; - this.additionalProperties = additionalProperties; - } - - /** - * @return True if the draft of the action should be updated with the reverted version. - */ - @JsonProperty("update_draft") - public Optional getUpdateDraft() { - return updateDraft; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DeployActionVersionRequestContent && equalTo((DeployActionVersionRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DeployActionVersionRequestContent other) { - return updateDraft.equals(other.updateDraft); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.updateDraft); - } - - @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 updateDraft = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(DeployActionVersionRequestContent other) { - updateDraft(other.getUpdateDraft()); - return this; - } - - /** - *

True if the draft of the action should be updated with the reverted version.

- */ - @JsonSetter(value = "update_draft", nulls = Nulls.SKIP) - public Builder updateDraft(Optional updateDraft) { - this.updateDraft = updateDraft; - return this; - } - - public Builder updateDraft(Boolean updateDraft) { - this.updateDraft = Optional.ofNullable(updateDraft); - return this; - } - - public DeployActionVersionRequestContent build() { - return new DeployActionVersionRequestContent(updateDraft, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DeployActionVersionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/DeployActionVersionResponseContent.java deleted file mode 100644 index 9dbe98bc6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DeployActionVersionResponseContent.java +++ /dev/null @@ -1,577 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = DeployActionVersionResponseContent.Builder.class) -public final class DeployActionVersionResponseContent { - private final Optional id; - - private final Optional actionId; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional deployed; - - private final Optional runtime; - - private final Optional> secrets; - - private final Optional status; - - private final Optional number; - - private final Optional> errors; - - private final Optional action; - - private final Optional builtAt; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional> supportedTriggers; - - private final Optional> modules; - - private final Map additionalProperties; - - private DeployActionVersionResponseContent( - Optional id, - Optional actionId, - Optional code, - Optional> dependencies, - Optional deployed, - Optional runtime, - Optional> secrets, - Optional status, - Optional number, - Optional> errors, - Optional action, - Optional builtAt, - Optional createdAt, - Optional updatedAt, - Optional> supportedTriggers, - Optional> modules, - Map additionalProperties) { - this.id = id; - this.actionId = actionId; - this.code = code; - this.dependencies = dependencies; - this.deployed = deployed; - this.runtime = runtime; - this.secrets = secrets; - this.status = status; - this.number = number; - this.errors = errors; - this.action = action; - this.builtAt = builtAt; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.supportedTriggers = supportedTriggers; - this.modules = modules; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique id of an action version. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The id of the action to which this version belongs. - */ - @JsonProperty("action_id") - public Optional getActionId() { - return actionId; - } - - /** - * @return The source code of this specific version of the action. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The list of third party npm modules, and their versions, that this specific version depends on. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return Indicates if this specific version is the currently one deployed. - */ - @JsonProperty("deployed") - public Optional getDeployed() { - return deployed; - } - - /** - * @return The Node runtime. For example: node22 - */ - @JsonProperty("runtime") - public Optional getRuntime() { - return runtime; - } - - /** - * @return The list of secrets that are included in an action or a version of an action. - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return The index of this version in list of versions for the action. - */ - @JsonProperty("number") - public Optional getNumber() { - return number; - } - - /** - * @return Any errors that occurred while the version was being built. - */ - @JsonProperty("errors") - public Optional> getErrors() { - return errors; - } - - @JsonProperty("action") - public Optional getAction() { - return action; - } - - /** - * @return The time when this version was built successfully. - */ - @JsonProperty("built_at") - public Optional getBuiltAt() { - return builtAt; - } - - /** - * @return The time when this version was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when a version was updated. Versions are never updated externally. Only Auth0 will update an action version as it is being built. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return The list of triggers that this version supports. At this time, a version can only target a single trigger at a time. - */ - @JsonProperty("supported_triggers") - public Optional> getSupportedTriggers() { - return supportedTriggers; - } - - /** - * @return The list of action modules and their versions used by this action version. - */ - @JsonProperty("modules") - public Optional> getModules() { - return modules; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DeployActionVersionResponseContent - && equalTo((DeployActionVersionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DeployActionVersionResponseContent other) { - return id.equals(other.id) - && actionId.equals(other.actionId) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && deployed.equals(other.deployed) - && runtime.equals(other.runtime) - && secrets.equals(other.secrets) - && status.equals(other.status) - && number.equals(other.number) - && errors.equals(other.errors) - && action.equals(other.action) - && builtAt.equals(other.builtAt) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && supportedTriggers.equals(other.supportedTriggers) - && modules.equals(other.modules); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.actionId, - this.code, - this.dependencies, - this.deployed, - this.runtime, - this.secrets, - this.status, - this.number, - this.errors, - this.action, - this.builtAt, - this.createdAt, - this.updatedAt, - this.supportedTriggers, - this.modules); - } - - @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 actionId = Optional.empty(); - - private Optional code = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional deployed = Optional.empty(); - - private Optional runtime = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional status = Optional.empty(); - - private Optional number = Optional.empty(); - - private Optional> errors = Optional.empty(); - - private Optional action = Optional.empty(); - - private Optional builtAt = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional> supportedTriggers = Optional.empty(); - - private Optional> modules = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(DeployActionVersionResponseContent other) { - id(other.getId()); - actionId(other.getActionId()); - code(other.getCode()); - dependencies(other.getDependencies()); - deployed(other.getDeployed()); - runtime(other.getRuntime()); - secrets(other.getSecrets()); - status(other.getStatus()); - number(other.getNumber()); - errors(other.getErrors()); - action(other.getAction()); - builtAt(other.getBuiltAt()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - supportedTriggers(other.getSupportedTriggers()); - modules(other.getModules()); - return this; - } - - /** - *

The unique id of an action version.

- */ - @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 id of the action to which this version belongs.

- */ - @JsonSetter(value = "action_id", nulls = Nulls.SKIP) - public Builder actionId(Optional actionId) { - this.actionId = actionId; - return this; - } - - public Builder actionId(String actionId) { - this.actionId = Optional.ofNullable(actionId); - return this; - } - - /** - *

The source code of this specific version of the action.

- */ - @JsonSetter(value = "code", nulls = Nulls.SKIP) - public Builder code(Optional code) { - this.code = code; - return this; - } - - public Builder code(String code) { - this.code = Optional.ofNullable(code); - return this; - } - - /** - *

The list of third party npm modules, and their versions, that this specific version depends on.

- */ - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public Builder dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - public Builder dependencies(List dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - /** - *

Indicates if this specific version is the currently one deployed.

- */ - @JsonSetter(value = "deployed", nulls = Nulls.SKIP) - public Builder deployed(Optional deployed) { - this.deployed = deployed; - return this; - } - - public Builder deployed(Boolean deployed) { - this.deployed = Optional.ofNullable(deployed); - return this; - } - - /** - *

The Node runtime. For example: node22

- */ - @JsonSetter(value = "runtime", nulls = Nulls.SKIP) - public Builder runtime(Optional runtime) { - this.runtime = runtime; - return this; - } - - public Builder runtime(String runtime) { - this.runtime = Optional.ofNullable(runtime); - return this; - } - - /** - *

The list of secrets that are included in an action or a version of an action.

- */ - @JsonSetter(value = "secrets", nulls = Nulls.SKIP) - public Builder secrets(Optional> secrets) { - this.secrets = secrets; - return this; - } - - public Builder secrets(List secrets) { - this.secrets = Optional.ofNullable(secrets); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(ActionVersionBuildStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - /** - *

The index of this version in list of versions for the action.

- */ - @JsonSetter(value = "number", nulls = Nulls.SKIP) - public Builder number(Optional number) { - this.number = number; - return this; - } - - public Builder number(Double number) { - this.number = Optional.ofNullable(number); - return this; - } - - /** - *

Any errors that occurred while the version was being built.

- */ - @JsonSetter(value = "errors", nulls = Nulls.SKIP) - public Builder errors(Optional> errors) { - this.errors = errors; - return this; - } - - public Builder errors(List errors) { - this.errors = Optional.ofNullable(errors); - return this; - } - - @JsonSetter(value = "action", nulls = Nulls.SKIP) - public Builder action(Optional action) { - this.action = action; - return this; - } - - public Builder action(ActionBase action) { - this.action = Optional.ofNullable(action); - return this; - } - - /** - *

The time when this version was built successfully.

- */ - @JsonSetter(value = "built_at", nulls = Nulls.SKIP) - public Builder builtAt(Optional builtAt) { - this.builtAt = builtAt; - return this; - } - - public Builder builtAt(OffsetDateTime builtAt) { - this.builtAt = Optional.ofNullable(builtAt); - return this; - } - - /** - *

The time when this version 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 time when a version was updated. Versions are never updated externally. Only Auth0 will update an action version as it is being built.

- */ - @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; - } - - /** - *

The list of triggers that this version supports. At this time, a version can only target a single trigger at a time.

- */ - @JsonSetter(value = "supported_triggers", nulls = Nulls.SKIP) - public Builder supportedTriggers(Optional> supportedTriggers) { - this.supportedTriggers = supportedTriggers; - return this; - } - - public Builder supportedTriggers(List supportedTriggers) { - this.supportedTriggers = Optional.ofNullable(supportedTriggers); - return this; - } - - /** - *

The list of action modules and their versions used by this action version.

- */ - @JsonSetter(value = "modules", nulls = Nulls.SKIP) - public Builder modules(Optional> modules) { - this.modules = modules; - return this; - } - - public Builder modules(List modules) { - this.modules = Optional.ofNullable(modules); - return this; - } - - public DeployActionVersionResponseContent build() { - return new DeployActionVersionResponseContent( - id, - actionId, - code, - dependencies, - deployed, - runtime, - secrets, - status, - number, - errors, - action, - builtAt, - createdAt, - updatedAt, - supportedTriggers, - modules, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DeviceCredential.java b/src/main/java/com/auth0/client/mgmt/types/DeviceCredential.java deleted file mode 100644 index 43b299cd1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DeviceCredential.java +++ /dev/null @@ -1,247 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = DeviceCredential.Builder.class) -public final class DeviceCredential { - private final Optional id; - - private final Optional deviceName; - - private final Optional deviceId; - - private final Optional type; - - private final Optional userId; - - private final Optional clientId; - - private final Map additionalProperties; - - private DeviceCredential( - Optional id, - Optional deviceName, - Optional deviceId, - Optional type, - Optional userId, - Optional clientId, - Map additionalProperties) { - this.id = id; - this.deviceName = deviceName; - this.deviceId = deviceId; - this.type = type; - this.userId = userId; - this.clientId = clientId; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of this device. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return User agent for this device - */ - @JsonProperty("device_name") - public Optional getDeviceName() { - return deviceName; - } - - /** - * @return Unique identifier for the device. NOTE: This field is generally not populated for refresh_tokens and rotating_refresh_tokens - */ - @JsonProperty("device_id") - public Optional getDeviceId() { - return deviceId; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return user_id this credential is associated with. - */ - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - /** - * @return client_id of the client (application) this credential is for. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DeviceCredential && equalTo((DeviceCredential) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DeviceCredential other) { - return id.equals(other.id) - && deviceName.equals(other.deviceName) - && deviceId.equals(other.deviceId) - && type.equals(other.type) - && userId.equals(other.userId) - && clientId.equals(other.clientId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.deviceName, this.deviceId, this.type, this.userId, this.clientId); - } - - @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 deviceName = Optional.empty(); - - private Optional deviceId = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional userId = Optional.empty(); - - private Optional clientId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(DeviceCredential other) { - id(other.getId()); - deviceName(other.getDeviceName()); - deviceId(other.getDeviceId()); - type(other.getType()); - userId(other.getUserId()); - clientId(other.getClientId()); - return this; - } - - /** - *

ID of this device.

- */ - @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; - } - - /** - *

User agent for this device

- */ - @JsonSetter(value = "device_name", nulls = Nulls.SKIP) - public Builder deviceName(Optional deviceName) { - this.deviceName = deviceName; - return this; - } - - public Builder deviceName(String deviceName) { - this.deviceName = Optional.ofNullable(deviceName); - return this; - } - - /** - *

Unique identifier for the device. NOTE: This field is generally not populated for refresh_tokens and rotating_refresh_tokens

- */ - @JsonSetter(value = "device_id", nulls = Nulls.SKIP) - public Builder deviceId(Optional deviceId) { - this.deviceId = deviceId; - return this; - } - - public Builder deviceId(String deviceId) { - this.deviceId = Optional.ofNullable(deviceId); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(DeviceCredentialTypeEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

user_id this credential is associated with.

- */ - @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; - } - - /** - *

client_id of the client (application) this credential is for.

- */ - @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; - } - - public DeviceCredential build() { - return new DeviceCredential(id, deviceName, deviceId, type, userId, clientId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DeviceCredentialPublicKeyTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/DeviceCredentialPublicKeyTypeEnum.java deleted file mode 100644 index 20b594f32..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DeviceCredentialPublicKeyTypeEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class DeviceCredentialPublicKeyTypeEnum { - public static final DeviceCredentialPublicKeyTypeEnum PUBLIC_KEY = - new DeviceCredentialPublicKeyTypeEnum(Value.PUBLIC_KEY, "public_key"); - - private final Value value; - - private final String string; - - DeviceCredentialPublicKeyTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof DeviceCredentialPublicKeyTypeEnum - && this.string.equals(((DeviceCredentialPublicKeyTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PUBLIC_KEY: - return visitor.visitPublicKey(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static DeviceCredentialPublicKeyTypeEnum valueOf(String value) { - switch (value) { - case "public_key": - return PUBLIC_KEY; - default: - return new DeviceCredentialPublicKeyTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PUBLIC_KEY, - - UNKNOWN - } - - public interface Visitor { - T visitPublicKey(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DeviceCredentialTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/DeviceCredentialTypeEnum.java deleted file mode 100644 index 10fe7a1ae..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DeviceCredentialTypeEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class DeviceCredentialTypeEnum { - public static final DeviceCredentialTypeEnum REFRESH_TOKEN = - new DeviceCredentialTypeEnum(Value.REFRESH_TOKEN, "refresh_token"); - - public static final DeviceCredentialTypeEnum ROTATING_REFRESH_TOKEN = - new DeviceCredentialTypeEnum(Value.ROTATING_REFRESH_TOKEN, "rotating_refresh_token"); - - public static final DeviceCredentialTypeEnum PUBLIC_KEY = - new DeviceCredentialTypeEnum(Value.PUBLIC_KEY, "public_key"); - - private final Value value; - - private final String string; - - DeviceCredentialTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof DeviceCredentialTypeEnum - && this.string.equals(((DeviceCredentialTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case REFRESH_TOKEN: - return visitor.visitRefreshToken(); - case ROTATING_REFRESH_TOKEN: - return visitor.visitRotatingRefreshToken(); - case PUBLIC_KEY: - return visitor.visitPublicKey(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static DeviceCredentialTypeEnum valueOf(String value) { - switch (value) { - case "refresh_token": - return REFRESH_TOKEN; - case "rotating_refresh_token": - return ROTATING_REFRESH_TOKEN; - case "public_key": - return PUBLIC_KEY; - default: - return new DeviceCredentialTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PUBLIC_KEY, - - REFRESH_TOKEN, - - ROTATING_REFRESH_TOKEN, - - UNKNOWN - } - - public interface Visitor { - T visitPublicKey(); - - T visitRefreshToken(); - - T visitRotatingRefreshToken(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioning.java b/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioning.java deleted file mode 100644 index 4a51b5ec9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioning.java +++ /dev/null @@ -1,512 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = DirectoryProvisioning.Builder.class) -public final class DirectoryProvisioning { - private final String connectionId; - - private final String connectionName; - - private final String strategy; - - private final List mapping; - - private final boolean synchronizeAutomatically; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional lastSynchronizationAt; - - private final Optional lastSynchronizationStatus; - - private final Optional lastSynchronizationError; - - private final Map additionalProperties; - - private DirectoryProvisioning( - String connectionId, - String connectionName, - String strategy, - List mapping, - boolean synchronizeAutomatically, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional lastSynchronizationAt, - Optional lastSynchronizationStatus, - Optional lastSynchronizationError, - Map additionalProperties) { - this.connectionId = connectionId; - this.connectionName = connectionName; - this.strategy = strategy; - this.mapping = mapping; - this.synchronizeAutomatically = synchronizeAutomatically; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.lastSynchronizationAt = lastSynchronizationAt; - this.lastSynchronizationStatus = lastSynchronizationStatus; - this.lastSynchronizationError = lastSynchronizationError; - this.additionalProperties = additionalProperties; - } - - /** - * @return The connection's identifier - */ - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - /** - * @return The connection's name - */ - @JsonProperty("connection_name") - public String getConnectionName() { - return connectionName; - } - - /** - * @return The connection's strategy - */ - @JsonProperty("strategy") - public String getStrategy() { - return strategy; - } - - /** - * @return The mapping between Auth0 and IDP user attributes - */ - @JsonProperty("mapping") - public List getMapping() { - return mapping; - } - - /** - * @return Whether periodic automatic synchronization is enabled - */ - @JsonProperty("synchronize_automatically") - public boolean getSynchronizeAutomatically() { - return synchronizeAutomatically; - } - - /** - * @return The timestamp at which the directory provisioning configuration was created - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return The timestamp at which the directory provisioning configuration was last updated - */ - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - /** - * @return The timestamp at which the connection was last synchronized - */ - @JsonProperty("last_synchronization_at") - public Optional getLastSynchronizationAt() { - return lastSynchronizationAt; - } - - /** - * @return The status of the last synchronization - */ - @JsonProperty("last_synchronization_status") - public Optional getLastSynchronizationStatus() { - return lastSynchronizationStatus; - } - - /** - * @return The error message of the last synchronization, if any - */ - @JsonProperty("last_synchronization_error") - public Optional getLastSynchronizationError() { - return lastSynchronizationError; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DirectoryProvisioning && equalTo((DirectoryProvisioning) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DirectoryProvisioning other) { - return connectionId.equals(other.connectionId) - && connectionName.equals(other.connectionName) - && strategy.equals(other.strategy) - && mapping.equals(other.mapping) - && synchronizeAutomatically == other.synchronizeAutomatically - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && lastSynchronizationAt.equals(other.lastSynchronizationAt) - && lastSynchronizationStatus.equals(other.lastSynchronizationStatus) - && lastSynchronizationError.equals(other.lastSynchronizationError); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.connectionName, - this.strategy, - this.mapping, - this.synchronizeAutomatically, - this.createdAt, - this.updatedAt, - this.lastSynchronizationAt, - this.lastSynchronizationStatus, - this.lastSynchronizationError); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - /** - *

The connection's identifier

- */ - ConnectionNameStage connectionId(@NotNull String connectionId); - - Builder from(DirectoryProvisioning other); - } - - public interface ConnectionNameStage { - /** - *

The connection's name

- */ - StrategyStage connectionName(@NotNull String connectionName); - } - - public interface StrategyStage { - /** - *

The connection's strategy

- */ - SynchronizeAutomaticallyStage strategy(@NotNull String strategy); - } - - public interface SynchronizeAutomaticallyStage { - /** - *

Whether periodic automatic synchronization is enabled

- */ - CreatedAtStage synchronizeAutomatically(boolean synchronizeAutomatically); - } - - public interface CreatedAtStage { - /** - *

The timestamp at which the directory provisioning configuration was created

- */ - UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); - } - - public interface UpdatedAtStage { - /** - *

The timestamp at which the directory provisioning configuration was last updated

- */ - _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); - } - - public interface _FinalStage { - DirectoryProvisioning build(); - - /** - *

The mapping between Auth0 and IDP user attributes

- */ - _FinalStage mapping(List mapping); - - _FinalStage addMapping(DirectoryProvisioningMappingItem mapping); - - _FinalStage addAllMapping(List mapping); - - /** - *

The timestamp at which the connection was last synchronized

- */ - _FinalStage lastSynchronizationAt(Optional lastSynchronizationAt); - - _FinalStage lastSynchronizationAt(OffsetDateTime lastSynchronizationAt); - - /** - *

The status of the last synchronization

- */ - _FinalStage lastSynchronizationStatus(Optional lastSynchronizationStatus); - - _FinalStage lastSynchronizationStatus(String lastSynchronizationStatus); - - /** - *

The error message of the last synchronization, if any

- */ - _FinalStage lastSynchronizationError(Optional lastSynchronizationError); - - _FinalStage lastSynchronizationError(String lastSynchronizationError); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements ConnectionIdStage, - ConnectionNameStage, - StrategyStage, - SynchronizeAutomaticallyStage, - CreatedAtStage, - UpdatedAtStage, - _FinalStage { - private String connectionId; - - private String connectionName; - - private String strategy; - - private boolean synchronizeAutomatically; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private Optional lastSynchronizationError = Optional.empty(); - - private Optional lastSynchronizationStatus = Optional.empty(); - - private Optional lastSynchronizationAt = Optional.empty(); - - private List mapping = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DirectoryProvisioning other) { - connectionId(other.getConnectionId()); - connectionName(other.getConnectionName()); - strategy(other.getStrategy()); - mapping(other.getMapping()); - synchronizeAutomatically(other.getSynchronizeAutomatically()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - lastSynchronizationAt(other.getLastSynchronizationAt()); - lastSynchronizationStatus(other.getLastSynchronizationStatus()); - lastSynchronizationError(other.getLastSynchronizationError()); - return this; - } - - /** - *

The connection's identifier

- *

The connection's identifier

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("connection_id") - public ConnectionNameStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - /** - *

The connection's name

- *

The connection's name

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("connection_name") - public StrategyStage connectionName(@NotNull String connectionName) { - this.connectionName = Objects.requireNonNull(connectionName, "connectionName must not be null"); - return this; - } - - /** - *

The connection's strategy

- *

The connection's strategy

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("strategy") - public SynchronizeAutomaticallyStage strategy(@NotNull String strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("synchronize_automatically") - public CreatedAtStage synchronizeAutomatically(boolean synchronizeAutomatically) { - this.synchronizeAutomatically = synchronizeAutomatically; - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("created_at") - public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { - this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); - return this; - } - - /** - *

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. - */ - @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 error message of the last synchronization, if any

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage lastSynchronizationError(String lastSynchronizationError) { - this.lastSynchronizationError = Optional.ofNullable(lastSynchronizationError); - return this; - } - - /** - *

The error message of the last synchronization, if any

- */ - @java.lang.Override - @JsonSetter(value = "last_synchronization_error", nulls = Nulls.SKIP) - public _FinalStage lastSynchronizationError(Optional lastSynchronizationError) { - this.lastSynchronizationError = lastSynchronizationError; - return this; - } - - /** - *

The status of the last synchronization

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage lastSynchronizationStatus(String lastSynchronizationStatus) { - this.lastSynchronizationStatus = Optional.ofNullable(lastSynchronizationStatus); - return this; - } - - /** - *

The status of the last synchronization

- */ - @java.lang.Override - @JsonSetter(value = "last_synchronization_status", nulls = Nulls.SKIP) - public _FinalStage lastSynchronizationStatus(Optional lastSynchronizationStatus) { - this.lastSynchronizationStatus = lastSynchronizationStatus; - return this; - } - - /** - *

The timestamp at which the connection was last synchronized

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage lastSynchronizationAt(OffsetDateTime lastSynchronizationAt) { - this.lastSynchronizationAt = Optional.ofNullable(lastSynchronizationAt); - return this; - } - - /** - *

The timestamp at which the connection was last synchronized

- */ - @java.lang.Override - @JsonSetter(value = "last_synchronization_at", nulls = Nulls.SKIP) - public _FinalStage lastSynchronizationAt(Optional lastSynchronizationAt) { - this.lastSynchronizationAt = lastSynchronizationAt; - return this; - } - - /** - *

The mapping between Auth0 and IDP user attributes

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addAllMapping(List mapping) { - if (mapping != null) { - this.mapping.addAll(mapping); - } - return this; - } - - /** - *

The mapping between Auth0 and IDP user attributes

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addMapping(DirectoryProvisioningMappingItem mapping) { - this.mapping.add(mapping); - return this; - } - - /** - *

The mapping between Auth0 and IDP user attributes

- */ - @java.lang.Override - @JsonSetter(value = "mapping", nulls = Nulls.SKIP) - public _FinalStage mapping(List mapping) { - this.mapping.clear(); - if (mapping != null) { - this.mapping.addAll(mapping); - } - return this; - } - - @java.lang.Override - public DirectoryProvisioning build() { - return new DirectoryProvisioning( - connectionId, - connectionName, - strategy, - mapping, - synchronizeAutomatically, - createdAt, - updatedAt, - lastSynchronizationAt, - lastSynchronizationStatus, - lastSynchronizationError, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioningMappingItem.java b/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioningMappingItem.java deleted file mode 100644 index b6b111e63..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DirectoryProvisioningMappingItem.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = DirectoryProvisioningMappingItem.Builder.class) -public final class DirectoryProvisioningMappingItem { - private final String auth0; - - private final String idp; - - private final Map additionalProperties; - - private DirectoryProvisioningMappingItem(String auth0, String idp, Map additionalProperties) { - this.auth0 = auth0; - this.idp = idp; - this.additionalProperties = additionalProperties; - } - - /** - * @return The field location in the Auth0 schema - */ - @JsonProperty("auth0") - public String getAuth0() { - return auth0; - } - - /** - * @return The field location in the IDP schema - */ - @JsonProperty("idp") - public String getIdp() { - return idp; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DirectoryProvisioningMappingItem && equalTo((DirectoryProvisioningMappingItem) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DirectoryProvisioningMappingItem other) { - return auth0.equals(other.auth0) && idp.equals(other.idp); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.auth0, this.idp); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Auth0Stage builder() { - return new Builder(); - } - - public interface Auth0Stage { - /** - *

The field location in the Auth0 schema

- */ - IdpStage auth0(@NotNull String auth0); - - Builder from(DirectoryProvisioningMappingItem other); - } - - public interface IdpStage { - /** - *

The field location in the IDP schema

- */ - _FinalStage idp(@NotNull String idp); - } - - public interface _FinalStage { - DirectoryProvisioningMappingItem build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements Auth0Stage, IdpStage, _FinalStage { - private String auth0; - - private String idp; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DirectoryProvisioningMappingItem other) { - auth0(other.getAuth0()); - idp(other.getIdp()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("auth0") - public IdpStage auth0(@NotNull String auth0) { - this.auth0 = Objects.requireNonNull(auth0, "auth0 must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("idp") - public _FinalStage idp(@NotNull String idp) { - this.idp = Objects.requireNonNull(idp, "idp must not be null"); - return this; - } - - @java.lang.Override - public DirectoryProvisioningMappingItem build() { - return new DirectoryProvisioningMappingItem(auth0, idp, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DomainCertificate.java b/src/main/java/com/auth0/client/mgmt/types/DomainCertificate.java deleted file mode 100644 index 48fab1960..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DomainCertificate.java +++ /dev/null @@ -1,181 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = DomainCertificate.Builder.class) -public final class DomainCertificate { - private final Optional status; - - private final Optional errorMsg; - - private final Optional certificateAuthority; - - private final Optional renewsBefore; - - private final Map additionalProperties; - - private DomainCertificate( - Optional status, - Optional errorMsg, - Optional certificateAuthority, - Optional renewsBefore, - Map additionalProperties) { - this.status = status; - this.errorMsg = errorMsg; - this.certificateAuthority = certificateAuthority; - this.renewsBefore = renewsBefore; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return A user-friendly error message will be presented if the certificate status is provisioning_failed or renewing_failed. - */ - @JsonProperty("error_msg") - public Optional getErrorMsg() { - return errorMsg; - } - - @JsonProperty("certificate_authority") - public Optional getCertificateAuthority() { - return certificateAuthority; - } - - /** - * @return The certificate will be renewed prior to this date. - */ - @JsonProperty("renews_before") - public Optional getRenewsBefore() { - return renewsBefore; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DomainCertificate && equalTo((DomainCertificate) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DomainCertificate other) { - return status.equals(other.status) - && errorMsg.equals(other.errorMsg) - && certificateAuthority.equals(other.certificateAuthority) - && renewsBefore.equals(other.renewsBefore); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.status, this.errorMsg, this.certificateAuthority, this.renewsBefore); - } - - @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 status = Optional.empty(); - - private Optional errorMsg = Optional.empty(); - - private Optional certificateAuthority = Optional.empty(); - - private Optional renewsBefore = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(DomainCertificate other) { - status(other.getStatus()); - errorMsg(other.getErrorMsg()); - certificateAuthority(other.getCertificateAuthority()); - renewsBefore(other.getRenewsBefore()); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(DomainCertificateStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - /** - *

A user-friendly error message will be presented if the certificate status is provisioning_failed or renewing_failed.

- */ - @JsonSetter(value = "error_msg", nulls = Nulls.SKIP) - public Builder errorMsg(Optional errorMsg) { - this.errorMsg = errorMsg; - return this; - } - - public Builder errorMsg(String errorMsg) { - this.errorMsg = Optional.ofNullable(errorMsg); - return this; - } - - @JsonSetter(value = "certificate_authority", nulls = Nulls.SKIP) - public Builder certificateAuthority(Optional certificateAuthority) { - this.certificateAuthority = certificateAuthority; - return this; - } - - public Builder certificateAuthority(DomainCertificateAuthorityEnum certificateAuthority) { - this.certificateAuthority = Optional.ofNullable(certificateAuthority); - return this; - } - - /** - *

The certificate will be renewed prior to this date.

- */ - @JsonSetter(value = "renews_before", nulls = Nulls.SKIP) - public Builder renewsBefore(Optional renewsBefore) { - this.renewsBefore = renewsBefore; - return this; - } - - public Builder renewsBefore(String renewsBefore) { - this.renewsBefore = Optional.ofNullable(renewsBefore); - return this; - } - - public DomainCertificate build() { - return new DomainCertificate(status, errorMsg, certificateAuthority, renewsBefore, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DomainCertificateAuthorityEnum.java b/src/main/java/com/auth0/client/mgmt/types/DomainCertificateAuthorityEnum.java deleted file mode 100644 index 212b349d7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DomainCertificateAuthorityEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class DomainCertificateAuthorityEnum { - public static final DomainCertificateAuthorityEnum LETSENCRYPT = - new DomainCertificateAuthorityEnum(Value.LETSENCRYPT, "letsencrypt"); - - public static final DomainCertificateAuthorityEnum GOOGLETRUST = - new DomainCertificateAuthorityEnum(Value.GOOGLETRUST, "googletrust"); - - private final Value value; - - private final String string; - - DomainCertificateAuthorityEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof DomainCertificateAuthorityEnum - && this.string.equals(((DomainCertificateAuthorityEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case LETSENCRYPT: - return visitor.visitLetsencrypt(); - case GOOGLETRUST: - return visitor.visitGoogletrust(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static DomainCertificateAuthorityEnum valueOf(String value) { - switch (value) { - case "letsencrypt": - return LETSENCRYPT; - case "googletrust": - return GOOGLETRUST; - default: - return new DomainCertificateAuthorityEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - LETSENCRYPT, - - GOOGLETRUST, - - UNKNOWN - } - - public interface Visitor { - T visitLetsencrypt(); - - T visitGoogletrust(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DomainCertificateStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/DomainCertificateStatusEnum.java deleted file mode 100644 index abdd960b0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DomainCertificateStatusEnum.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class DomainCertificateStatusEnum { - public static final DomainCertificateStatusEnum PROVISIONING_FAILED = - new DomainCertificateStatusEnum(Value.PROVISIONING_FAILED, "provisioning_failed"); - - public static final DomainCertificateStatusEnum PROVISIONING = - new DomainCertificateStatusEnum(Value.PROVISIONING, "provisioning"); - - public static final DomainCertificateStatusEnum RENEWING_FAILED = - new DomainCertificateStatusEnum(Value.RENEWING_FAILED, "renewing_failed"); - - public static final DomainCertificateStatusEnum PROVISIONED = - new DomainCertificateStatusEnum(Value.PROVISIONED, "provisioned"); - - private final Value value; - - private final String string; - - DomainCertificateStatusEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof DomainCertificateStatusEnum - && this.string.equals(((DomainCertificateStatusEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PROVISIONING_FAILED: - return visitor.visitProvisioningFailed(); - case PROVISIONING: - return visitor.visitProvisioning(); - case RENEWING_FAILED: - return visitor.visitRenewingFailed(); - case PROVISIONED: - return visitor.visitProvisioned(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static DomainCertificateStatusEnum valueOf(String value) { - switch (value) { - case "provisioning_failed": - return PROVISIONING_FAILED; - case "provisioning": - return PROVISIONING; - case "renewing_failed": - return RENEWING_FAILED; - case "provisioned": - return PROVISIONED; - default: - return new DomainCertificateStatusEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PROVISIONING, - - PROVISIONING_FAILED, - - PROVISIONED, - - RENEWING_FAILED, - - UNKNOWN - } - - public interface Visitor { - T visitProvisioning(); - - T visitProvisioningFailed(); - - T visitProvisioned(); - - T visitRenewingFailed(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DomainVerification.java b/src/main/java/com/auth0/client/mgmt/types/DomainVerification.java deleted file mode 100644 index 1ac0f4125..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DomainVerification.java +++ /dev/null @@ -1,188 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = DomainVerification.Builder.class) -public final class DomainVerification { - private final Optional> methods; - - private final Optional status; - - private final Optional errorMsg; - - private final Optional lastVerifiedAt; - - private final Map additionalProperties; - - private DomainVerification( - Optional> methods, - Optional status, - Optional errorMsg, - Optional lastVerifiedAt, - Map additionalProperties) { - this.methods = methods; - this.status = status; - this.errorMsg = errorMsg; - this.lastVerifiedAt = lastVerifiedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return Domain verification methods. - */ - @JsonProperty("methods") - public Optional> getMethods() { - return methods; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return The user0-friendly error message in case of failed verification. This field is relevant only for Custom Domains with Auth0-Managed Certificates. - */ - @JsonProperty("error_msg") - public Optional getErrorMsg() { - return errorMsg; - } - - /** - * @return The date and time when the custom domain was last verified. This field is relevant only for Custom Domains with Auth0-Managed Certificates. - */ - @JsonProperty("last_verified_at") - public Optional getLastVerifiedAt() { - return lastVerifiedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DomainVerification && equalTo((DomainVerification) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DomainVerification other) { - return methods.equals(other.methods) - && status.equals(other.status) - && errorMsg.equals(other.errorMsg) - && lastVerifiedAt.equals(other.lastVerifiedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.methods, this.status, this.errorMsg, this.lastVerifiedAt); - } - - @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> methods = Optional.empty(); - - private Optional status = Optional.empty(); - - private Optional errorMsg = Optional.empty(); - - private Optional lastVerifiedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(DomainVerification other) { - methods(other.getMethods()); - status(other.getStatus()); - errorMsg(other.getErrorMsg()); - lastVerifiedAt(other.getLastVerifiedAt()); - return this; - } - - /** - *

Domain verification methods.

- */ - @JsonSetter(value = "methods", nulls = Nulls.SKIP) - public Builder methods(Optional> methods) { - this.methods = methods; - return this; - } - - public Builder methods(List methods) { - this.methods = Optional.ofNullable(methods); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(DomainVerificationStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - /** - *

The user0-friendly error message in case of failed verification. This field is relevant only for Custom Domains with Auth0-Managed Certificates.

- */ - @JsonSetter(value = "error_msg", nulls = Nulls.SKIP) - public Builder errorMsg(Optional errorMsg) { - this.errorMsg = errorMsg; - return this; - } - - public Builder errorMsg(String errorMsg) { - this.errorMsg = Optional.ofNullable(errorMsg); - return this; - } - - /** - *

The date and time when the custom domain was last verified. This field is relevant only for Custom Domains with Auth0-Managed Certificates.

- */ - @JsonSetter(value = "last_verified_at", nulls = Nulls.SKIP) - public Builder lastVerifiedAt(Optional lastVerifiedAt) { - this.lastVerifiedAt = lastVerifiedAt; - return this; - } - - public Builder lastVerifiedAt(String lastVerifiedAt) { - this.lastVerifiedAt = Optional.ofNullable(lastVerifiedAt); - return this; - } - - public DomainVerification build() { - return new DomainVerification(methods, status, errorMsg, lastVerifiedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DomainVerificationMethod.java b/src/main/java/com/auth0/client/mgmt/types/DomainVerificationMethod.java deleted file mode 100644 index d34982711..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DomainVerificationMethod.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = DomainVerificationMethod.Builder.class) -public final class DomainVerificationMethod { - private final DomainVerificationMethodNameEnum name; - - private final String record; - - private final Optional domain; - - private final Map additionalProperties; - - private DomainVerificationMethod( - DomainVerificationMethodNameEnum name, - String record, - Optional domain, - Map additionalProperties) { - this.name = name; - this.record = record; - this.domain = domain; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public DomainVerificationMethodNameEnum getName() { - return name; - } - - /** - * @return Value used to verify the domain. - */ - @JsonProperty("record") - public String getRecord() { - return record; - } - - /** - * @return The name of the txt record for verification - */ - @JsonProperty("domain") - public Optional getDomain() { - return domain; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DomainVerificationMethod && equalTo((DomainVerificationMethod) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DomainVerificationMethod other) { - return name.equals(other.name) && record.equals(other.record) && domain.equals(other.domain); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.record, this.domain); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - RecordStage name(@NotNull DomainVerificationMethodNameEnum name); - - Builder from(DomainVerificationMethod other); - } - - public interface RecordStage { - /** - *

Value used to verify the domain.

- */ - _FinalStage record(@NotNull String record); - } - - public interface _FinalStage { - DomainVerificationMethod build(); - - /** - *

The name of the txt record for verification

- */ - _FinalStage domain(Optional domain); - - _FinalStage domain(String domain); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, RecordStage, _FinalStage { - private DomainVerificationMethodNameEnum name; - - private String record; - - private Optional domain = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(DomainVerificationMethod other) { - name(other.getName()); - record(other.getRecord()); - domain(other.getDomain()); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public RecordStage name(@NotNull DomainVerificationMethodNameEnum name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("record") - public _FinalStage record(@NotNull String record) { - this.record = Objects.requireNonNull(record, "record must not be null"); - return this; - } - - /** - *

The name of the txt record for verification

- * @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 name of the txt record for verification

- */ - @java.lang.Override - @JsonSetter(value = "domain", nulls = Nulls.SKIP) - public _FinalStage domain(Optional domain) { - this.domain = domain; - return this; - } - - @java.lang.Override - public DomainVerificationMethod build() { - return new DomainVerificationMethod(name, record, domain, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DomainVerificationMethodNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/DomainVerificationMethodNameEnum.java deleted file mode 100644 index f41d37983..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DomainVerificationMethodNameEnum.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class DomainVerificationMethodNameEnum { - public static final DomainVerificationMethodNameEnum CNAME = - new DomainVerificationMethodNameEnum(Value.CNAME, "cname"); - - public static final DomainVerificationMethodNameEnum TXT = new DomainVerificationMethodNameEnum(Value.TXT, "txt"); - - private final Value value; - - private final String string; - - DomainVerificationMethodNameEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof DomainVerificationMethodNameEnum - && this.string.equals(((DomainVerificationMethodNameEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CNAME: - return visitor.visitCname(); - case TXT: - return visitor.visitTxt(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static DomainVerificationMethodNameEnum valueOf(String value) { - switch (value) { - case "cname": - return CNAME; - case "txt": - return TXT; - default: - return new DomainVerificationMethodNameEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - CNAME, - - TXT, - - UNKNOWN - } - - public interface Visitor { - T visitCname(); - - T visitTxt(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/DomainVerificationStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/DomainVerificationStatusEnum.java deleted file mode 100644 index 6267aee28..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/DomainVerificationStatusEnum.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class DomainVerificationStatusEnum { - public static final DomainVerificationStatusEnum FAILED = new DomainVerificationStatusEnum(Value.FAILED, "failed"); - - public static final DomainVerificationStatusEnum PENDING = - new DomainVerificationStatusEnum(Value.PENDING, "pending"); - - public static final DomainVerificationStatusEnum VERIFIED = - new DomainVerificationStatusEnum(Value.VERIFIED, "verified"); - - private final Value value; - - private final String string; - - DomainVerificationStatusEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof DomainVerificationStatusEnum - && this.string.equals(((DomainVerificationStatusEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FAILED: - return visitor.visitFailed(); - case PENDING: - return visitor.visitPending(); - case VERIFIED: - return visitor.visitVerified(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static DomainVerificationStatusEnum valueOf(String value) { - switch (value) { - case "failed": - return FAILED; - case "pending": - return PENDING; - case "verified": - return VERIFIED; - default: - return new DomainVerificationStatusEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - VERIFIED, - - PENDING, - - FAILED, - - UNKNOWN - } - - public interface Visitor { - T visitVerified(); - - T visitPending(); - - T visitFailed(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailAttribute.java b/src/main/java/com/auth0/client/mgmt/types/EmailAttribute.java deleted file mode 100644 index 5e65ffcc4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EmailAttribute.java +++ /dev/null @@ -1,206 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = EmailAttribute.Builder.class) -public final class EmailAttribute { - private final Optional identifier; - - private final Optional unique; - - private final Optional profileRequired; - - private final Optional verificationMethod; - - private final Optional signup; - - private final Map additionalProperties; - - private EmailAttribute( - Optional identifier, - Optional unique, - Optional profileRequired, - Optional verificationMethod, - Optional signup, - Map additionalProperties) { - this.identifier = identifier; - this.unique = unique; - this.profileRequired = profileRequired; - this.verificationMethod = verificationMethod; - this.signup = signup; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("identifier") - public Optional getIdentifier() { - return identifier; - } - - /** - * @return Determines if the attribute is unique in a given connection - */ - @JsonProperty("unique") - public Optional getUnique() { - return unique; - } - - /** - * @return Determines if property should be required for users - */ - @JsonProperty("profile_required") - public Optional getProfileRequired() { - return profileRequired; - } - - @JsonProperty("verification_method") - public Optional getVerificationMethod() { - return verificationMethod; - } - - @JsonProperty("signup") - public Optional getSignup() { - return signup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EmailAttribute && equalTo((EmailAttribute) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EmailAttribute other) { - return identifier.equals(other.identifier) - && unique.equals(other.unique) - && profileRequired.equals(other.profileRequired) - && verificationMethod.equals(other.verificationMethod) - && signup.equals(other.signup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.identifier, this.unique, this.profileRequired, this.verificationMethod, this.signup); - } - - @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 identifier = Optional.empty(); - - private Optional unique = Optional.empty(); - - private Optional profileRequired = Optional.empty(); - - private Optional verificationMethod = Optional.empty(); - - private Optional signup = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(EmailAttribute other) { - identifier(other.getIdentifier()); - unique(other.getUnique()); - profileRequired(other.getProfileRequired()); - verificationMethod(other.getVerificationMethod()); - signup(other.getSignup()); - return this; - } - - @JsonSetter(value = "identifier", nulls = Nulls.SKIP) - public Builder identifier(Optional identifier) { - this.identifier = identifier; - return this; - } - - public Builder identifier(ConnectionAttributeIdentifier identifier) { - this.identifier = Optional.ofNullable(identifier); - return this; - } - - /** - *

Determines if the attribute is unique in a given connection

- */ - @JsonSetter(value = "unique", nulls = Nulls.SKIP) - public Builder unique(Optional unique) { - this.unique = unique; - return this; - } - - public Builder unique(Boolean unique) { - this.unique = Optional.ofNullable(unique); - return this; - } - - /** - *

Determines if property should be required for users

- */ - @JsonSetter(value = "profile_required", nulls = Nulls.SKIP) - public Builder profileRequired(Optional profileRequired) { - this.profileRequired = profileRequired; - return this; - } - - public Builder profileRequired(Boolean profileRequired) { - this.profileRequired = Optional.ofNullable(profileRequired); - return this; - } - - @JsonSetter(value = "verification_method", nulls = Nulls.SKIP) - public Builder verificationMethod(Optional verificationMethod) { - this.verificationMethod = verificationMethod; - return this; - } - - public Builder verificationMethod(VerificationMethodEnum verificationMethod) { - this.verificationMethod = Optional.ofNullable(verificationMethod); - return this; - } - - @JsonSetter(value = "signup", nulls = Nulls.SKIP) - public Builder signup(Optional signup) { - this.signup = signup; - return this; - } - - public Builder signup(SignupVerified signup) { - this.signup = Optional.ofNullable(signup); - return this; - } - - public EmailAttribute build() { - return new EmailAttribute( - identifier, unique, profileRequired, verificationMethod, signup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailMailgunRegionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EmailMailgunRegionEnum.java deleted file mode 100644 index 0e12defec..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EmailMailgunRegionEnum.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EmailMailgunRegionEnum { - public static final EmailMailgunRegionEnum EU = new EmailMailgunRegionEnum(Value.EU, "eu"); - - private final Value value; - - private final String string; - - EmailMailgunRegionEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EmailMailgunRegionEnum - && this.string.equals(((EmailMailgunRegionEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EU: - return visitor.visitEu(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EmailMailgunRegionEnum valueOf(String value) { - switch (value) { - case "eu": - return EU; - default: - return new EmailMailgunRegionEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - EU, - - UNKNOWN - } - - public interface Visitor { - T visitEu(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentials.java b/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentials.java deleted file mode 100644 index 2de5fba4f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentials.java +++ /dev/null @@ -1,223 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = EmailProviderCredentials.Builder.class) -public final class EmailProviderCredentials { - private final Optional apiUser; - - private final Optional region; - - private final Optional smtpHost; - - private final Optional smtpPort; - - private final Optional smtpUser; - - private final Map additionalProperties; - - private EmailProviderCredentials( - Optional apiUser, - Optional region, - Optional smtpHost, - Optional smtpPort, - Optional smtpUser, - Map additionalProperties) { - this.apiUser = apiUser; - this.region = region; - this.smtpHost = smtpHost; - this.smtpPort = smtpPort; - this.smtpUser = smtpUser; - this.additionalProperties = additionalProperties; - } - - /** - * @return API User. - */ - @JsonProperty("api_user") - public Optional getApiUser() { - return apiUser; - } - - /** - * @return AWS or SparkPost region. - */ - @JsonProperty("region") - public Optional getRegion() { - return region; - } - - /** - * @return SMTP host. - */ - @JsonProperty("smtp_host") - public Optional getSmtpHost() { - return smtpHost; - } - - /** - * @return SMTP port. - */ - @JsonProperty("smtp_port") - public Optional getSmtpPort() { - return smtpPort; - } - - /** - * @return SMTP username. - */ - @JsonProperty("smtp_user") - public Optional getSmtpUser() { - return smtpUser; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EmailProviderCredentials && equalTo((EmailProviderCredentials) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EmailProviderCredentials other) { - return apiUser.equals(other.apiUser) - && region.equals(other.region) - && smtpHost.equals(other.smtpHost) - && smtpPort.equals(other.smtpPort) - && smtpUser.equals(other.smtpUser); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.apiUser, this.region, this.smtpHost, this.smtpPort, this.smtpUser); - } - - @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 apiUser = Optional.empty(); - - private Optional region = Optional.empty(); - - private Optional smtpHost = Optional.empty(); - - private Optional smtpPort = Optional.empty(); - - private Optional smtpUser = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(EmailProviderCredentials other) { - apiUser(other.getApiUser()); - region(other.getRegion()); - smtpHost(other.getSmtpHost()); - smtpPort(other.getSmtpPort()); - smtpUser(other.getSmtpUser()); - return this; - } - - /** - *

API User.

- */ - @JsonSetter(value = "api_user", nulls = Nulls.SKIP) - public Builder apiUser(Optional apiUser) { - this.apiUser = apiUser; - return this; - } - - public Builder apiUser(String apiUser) { - this.apiUser = Optional.ofNullable(apiUser); - return this; - } - - /** - *

AWS or SparkPost region.

- */ - @JsonSetter(value = "region", nulls = Nulls.SKIP) - public Builder region(Optional region) { - this.region = region; - return this; - } - - public Builder region(String region) { - this.region = Optional.ofNullable(region); - return this; - } - - /** - *

SMTP host.

- */ - @JsonSetter(value = "smtp_host", nulls = Nulls.SKIP) - public Builder smtpHost(Optional smtpHost) { - this.smtpHost = smtpHost; - return this; - } - - public Builder smtpHost(String smtpHost) { - this.smtpHost = Optional.ofNullable(smtpHost); - return this; - } - - /** - *

SMTP port.

- */ - @JsonSetter(value = "smtp_port", nulls = Nulls.SKIP) - public Builder smtpPort(Optional smtpPort) { - this.smtpPort = smtpPort; - return this; - } - - public Builder smtpPort(Integer smtpPort) { - this.smtpPort = Optional.ofNullable(smtpPort); - return this; - } - - /** - *

SMTP username.

- */ - @JsonSetter(value = "smtp_user", nulls = Nulls.SKIP) - public Builder smtpUser(Optional smtpUser) { - this.smtpUser = smtpUser; - return this; - } - - public Builder smtpUser(String smtpUser) { - this.smtpUser = Optional.ofNullable(smtpUser); - return this; - } - - public EmailProviderCredentials build() { - return new EmailProviderCredentials(apiUser, region, smtpHost, smtpPort, smtpUser, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchema.java b/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchema.java deleted file mode 100644 index 2ab98a41f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchema.java +++ /dev/null @@ -1,170 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = EmailProviderCredentialsSchema.Deserializer.class) -public final class EmailProviderCredentialsSchema { - private final Object value; - - private final int type; - - private EmailProviderCredentialsSchema(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((EmailProviderCredentialsSchemaZero) this.value); - } else if (this.type == 1) { - return visitor.visit((EmailProviderCredentialsSchemaAccessKeyId) this.value); - } else if (this.type == 2) { - return visitor.visit((EmailProviderCredentialsSchemaSmtpHost) this.value); - } else if (this.type == 3) { - return visitor.visit((EmailProviderCredentialsSchemaThree) this.value); - } else if (this.type == 4) { - return visitor.visit((EmailProviderCredentialsSchemaApiKey) this.value); - } else if (this.type == 5) { - return visitor.visit((EmailProviderCredentialsSchemaConnectionString) this.value); - } else if (this.type == 6) { - return visitor.visit((EmailProviderCredentialsSchemaClientId) this.value); - } else if (this.type == 7) { - return visitor.visit((ExtensibilityEmailProviderCredentials) 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 EmailProviderCredentialsSchema && equalTo((EmailProviderCredentialsSchema) other); - } - - private boolean equalTo(EmailProviderCredentialsSchema 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 EmailProviderCredentialsSchema of(EmailProviderCredentialsSchemaZero value) { - return new EmailProviderCredentialsSchema(value, 0); - } - - public static EmailProviderCredentialsSchema of(EmailProviderCredentialsSchemaAccessKeyId value) { - return new EmailProviderCredentialsSchema(value, 1); - } - - public static EmailProviderCredentialsSchema of(EmailProviderCredentialsSchemaSmtpHost value) { - return new EmailProviderCredentialsSchema(value, 2); - } - - public static EmailProviderCredentialsSchema of(EmailProviderCredentialsSchemaThree value) { - return new EmailProviderCredentialsSchema(value, 3); - } - - public static EmailProviderCredentialsSchema of(EmailProviderCredentialsSchemaApiKey value) { - return new EmailProviderCredentialsSchema(value, 4); - } - - public static EmailProviderCredentialsSchema of(EmailProviderCredentialsSchemaConnectionString value) { - return new EmailProviderCredentialsSchema(value, 5); - } - - public static EmailProviderCredentialsSchema of(EmailProviderCredentialsSchemaClientId value) { - return new EmailProviderCredentialsSchema(value, 6); - } - - public static EmailProviderCredentialsSchema of(ExtensibilityEmailProviderCredentials value) { - return new EmailProviderCredentialsSchema(value, 7); - } - - public interface Visitor { - T visit(EmailProviderCredentialsSchemaZero value); - - T visit(EmailProviderCredentialsSchemaAccessKeyId value); - - T visit(EmailProviderCredentialsSchemaSmtpHost value); - - T visit(EmailProviderCredentialsSchemaThree value); - - T visit(EmailProviderCredentialsSchemaApiKey value); - - T visit(EmailProviderCredentialsSchemaConnectionString value); - - T visit(EmailProviderCredentialsSchemaClientId value); - - T visit(ExtensibilityEmailProviderCredentials value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(EmailProviderCredentialsSchema.class); - } - - @java.lang.Override - public EmailProviderCredentialsSchema deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EmailProviderCredentialsSchemaZero.class)); - } catch (RuntimeException e) { - } - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, EmailProviderCredentialsSchemaAccessKeyId.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EmailProviderCredentialsSchemaSmtpHost.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EmailProviderCredentialsSchemaThree.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EmailProviderCredentialsSchemaApiKey.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, EmailProviderCredentialsSchemaConnectionString.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EmailProviderCredentialsSchemaClientId.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, ExtensibilityEmailProviderCredentials.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaAccessKeyId.java b/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaAccessKeyId.java deleted file mode 100644 index aeb41ba39..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaAccessKeyId.java +++ /dev/null @@ -1,165 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = EmailProviderCredentialsSchemaAccessKeyId.Builder.class) -public final class EmailProviderCredentialsSchemaAccessKeyId { - private final Optional accessKeyId; - - private final Optional secretAccessKey; - - private final Optional region; - - private final Map additionalProperties; - - private EmailProviderCredentialsSchemaAccessKeyId( - Optional accessKeyId, - Optional secretAccessKey, - Optional region, - Map additionalProperties) { - this.accessKeyId = accessKeyId; - this.secretAccessKey = secretAccessKey; - this.region = region; - this.additionalProperties = additionalProperties; - } - - /** - * @return AWS Access Key ID. - */ - @JsonProperty("accessKeyId") - public Optional getAccessKeyId() { - return accessKeyId; - } - - /** - * @return AWS Secret Access Key. - */ - @JsonProperty("secretAccessKey") - public Optional getSecretAccessKey() { - return secretAccessKey; - } - - /** - * @return AWS region. - */ - @JsonProperty("region") - public Optional getRegion() { - return region; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EmailProviderCredentialsSchemaAccessKeyId - && equalTo((EmailProviderCredentialsSchemaAccessKeyId) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EmailProviderCredentialsSchemaAccessKeyId other) { - return accessKeyId.equals(other.accessKeyId) - && secretAccessKey.equals(other.secretAccessKey) - && region.equals(other.region); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.accessKeyId, this.secretAccessKey, 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 accessKeyId = Optional.empty(); - - private Optional secretAccessKey = Optional.empty(); - - private Optional region = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(EmailProviderCredentialsSchemaAccessKeyId other) { - accessKeyId(other.getAccessKeyId()); - secretAccessKey(other.getSecretAccessKey()); - region(other.getRegion()); - return this; - } - - /** - *

AWS Access Key ID.

- */ - @JsonSetter(value = "accessKeyId", nulls = Nulls.SKIP) - public Builder accessKeyId(Optional accessKeyId) { - this.accessKeyId = accessKeyId; - return this; - } - - public Builder accessKeyId(String accessKeyId) { - this.accessKeyId = Optional.ofNullable(accessKeyId); - return this; - } - - /** - *

AWS Secret Access Key.

- */ - @JsonSetter(value = "secretAccessKey", nulls = Nulls.SKIP) - public Builder secretAccessKey(Optional secretAccessKey) { - this.secretAccessKey = secretAccessKey; - return this; - } - - public Builder secretAccessKey(String secretAccessKey) { - this.secretAccessKey = Optional.ofNullable(secretAccessKey); - return this; - } - - /** - *

AWS region.

- */ - @JsonSetter(value = "region", nulls = Nulls.SKIP) - public Builder region(Optional region) { - this.region = region; - return this; - } - - public Builder region(String region) { - this.region = Optional.ofNullable(region); - return this; - } - - public EmailProviderCredentialsSchemaAccessKeyId build() { - return new EmailProviderCredentialsSchemaAccessKeyId( - accessKeyId, secretAccessKey, region, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaApiKey.java b/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaApiKey.java deleted file mode 100644 index 7b5605062..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaApiKey.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = EmailProviderCredentialsSchemaApiKey.Builder.class) -public final class EmailProviderCredentialsSchemaApiKey { - private final Optional apiKey; - - private final Optional domain; - - private final Optional region; - - private final Map additionalProperties; - - private EmailProviderCredentialsSchemaApiKey( - Optional apiKey, - Optional domain, - Optional region, - Map additionalProperties) { - this.apiKey = apiKey; - this.domain = domain; - this.region = region; - this.additionalProperties = additionalProperties; - } - - /** - * @return API Key - */ - @JsonProperty("api_key") - public Optional getApiKey() { - return apiKey; - } - - /** - * @return Domain - */ - @JsonProperty("domain") - public Optional getDomain() { - return domain; - } - - @JsonProperty("region") - public Optional getRegion() { - return region; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EmailProviderCredentialsSchemaApiKey - && equalTo((EmailProviderCredentialsSchemaApiKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EmailProviderCredentialsSchemaApiKey other) { - return apiKey.equals(other.apiKey) && domain.equals(other.domain) && region.equals(other.region); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.apiKey, this.domain, 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 apiKey = Optional.empty(); - - private Optional domain = Optional.empty(); - - private Optional region = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(EmailProviderCredentialsSchemaApiKey other) { - apiKey(other.getApiKey()); - domain(other.getDomain()); - region(other.getRegion()); - return this; - } - - /** - *

API Key

- */ - @JsonSetter(value = "api_key", nulls = Nulls.SKIP) - public Builder apiKey(Optional apiKey) { - this.apiKey = apiKey; - return this; - } - - public Builder apiKey(String apiKey) { - this.apiKey = Optional.ofNullable(apiKey); - return this; - } - - /** - *

Domain

- */ - @JsonSetter(value = "domain", nulls = Nulls.SKIP) - public Builder domain(Optional domain) { - this.domain = domain; - return this; - } - - public Builder domain(String domain) { - this.domain = Optional.ofNullable(domain); - return this; - } - - @JsonSetter(value = "region", nulls = Nulls.SKIP) - public Builder region(Optional region) { - this.region = region; - return this; - } - - public Builder region(EmailMailgunRegionEnum region) { - this.region = Optional.ofNullable(region); - return this; - } - - public EmailProviderCredentialsSchemaApiKey build() { - return new EmailProviderCredentialsSchemaApiKey(apiKey, domain, region, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaClientId.java b/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaClientId.java deleted file mode 100644 index afd69f78a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaClientId.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = EmailProviderCredentialsSchemaClientId.Builder.class) -public final class EmailProviderCredentialsSchemaClientId { - private final Optional tenantId; - - private final Optional clientId; - - private final Optional clientSecret; - - private final Map additionalProperties; - - private EmailProviderCredentialsSchemaClientId( - Optional tenantId, - Optional clientId, - Optional clientSecret, - Map additionalProperties) { - this.tenantId = tenantId; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.additionalProperties = additionalProperties; - } - - /** - * @return Microsoft 365 Tenant ID. - */ - @JsonProperty("tenantId") - public Optional getTenantId() { - return tenantId; - } - - /** - * @return Microsoft 365 Client ID. - */ - @JsonProperty("clientId") - public Optional getClientId() { - return clientId; - } - - /** - * @return Microsoft 365 Client Secret. - */ - @JsonProperty("clientSecret") - public Optional getClientSecret() { - return clientSecret; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EmailProviderCredentialsSchemaClientId - && equalTo((EmailProviderCredentialsSchemaClientId) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EmailProviderCredentialsSchemaClientId other) { - return tenantId.equals(other.tenantId) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.tenantId, this.clientId, this.clientSecret); - } - - @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 tenantId = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(EmailProviderCredentialsSchemaClientId other) { - tenantId(other.getTenantId()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - return this; - } - - /** - *

Microsoft 365 Tenant ID.

- */ - @JsonSetter(value = "tenantId", nulls = Nulls.SKIP) - public Builder tenantId(Optional tenantId) { - this.tenantId = tenantId; - return this; - } - - public Builder tenantId(String tenantId) { - this.tenantId = Optional.ofNullable(tenantId); - return this; - } - - /** - *

Microsoft 365 Client ID.

- */ - @JsonSetter(value = "clientId", 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; - } - - /** - *

Microsoft 365 Client Secret.

- */ - @JsonSetter(value = "clientSecret", 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; - } - - public EmailProviderCredentialsSchemaClientId build() { - return new EmailProviderCredentialsSchemaClientId(tenantId, clientId, clientSecret, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaConnectionString.java b/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaConnectionString.java deleted file mode 100644 index 92c4c9bfe..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaConnectionString.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = EmailProviderCredentialsSchemaConnectionString.Builder.class) -public final class EmailProviderCredentialsSchemaConnectionString { - private final Optional connectionString; - - private final Map additionalProperties; - - private EmailProviderCredentialsSchemaConnectionString( - Optional connectionString, Map additionalProperties) { - this.connectionString = connectionString; - this.additionalProperties = additionalProperties; - } - - /** - * @return Azure Communication Services Connection String. - */ - @JsonProperty("connectionString") - public Optional getConnectionString() { - return connectionString; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EmailProviderCredentialsSchemaConnectionString - && equalTo((EmailProviderCredentialsSchemaConnectionString) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EmailProviderCredentialsSchemaConnectionString other) { - return connectionString.equals(other.connectionString); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionString); - } - - @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 connectionString = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(EmailProviderCredentialsSchemaConnectionString other) { - connectionString(other.getConnectionString()); - return this; - } - - /** - *

Azure Communication Services Connection String.

- */ - @JsonSetter(value = "connectionString", nulls = Nulls.SKIP) - public Builder connectionString(Optional connectionString) { - this.connectionString = connectionString; - return this; - } - - public Builder connectionString(String connectionString) { - this.connectionString = Optional.ofNullable(connectionString); - return this; - } - - public EmailProviderCredentialsSchemaConnectionString build() { - return new EmailProviderCredentialsSchemaConnectionString(connectionString, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaSmtpHost.java b/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaSmtpHost.java deleted file mode 100644 index e32a7d5c8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaSmtpHost.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = EmailProviderCredentialsSchemaSmtpHost.Builder.class) -public final class EmailProviderCredentialsSchemaSmtpHost { - private final Optional smtpHost; - - private final Optional smtpPort; - - private final Optional smtpUser; - - private final Optional smtpPass; - - private final Map additionalProperties; - - private EmailProviderCredentialsSchemaSmtpHost( - Optional smtpHost, - Optional smtpPort, - Optional smtpUser, - Optional smtpPass, - Map additionalProperties) { - this.smtpHost = smtpHost; - this.smtpPort = smtpPort; - this.smtpUser = smtpUser; - this.smtpPass = smtpPass; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("smtp_host") - public Optional getSmtpHost() { - return smtpHost; - } - - /** - * @return SMTP port. - */ - @JsonProperty("smtp_port") - public Optional getSmtpPort() { - return smtpPort; - } - - /** - * @return SMTP username. - */ - @JsonProperty("smtp_user") - public Optional getSmtpUser() { - return smtpUser; - } - - /** - * @return SMTP password. - */ - @JsonProperty("smtp_pass") - public Optional getSmtpPass() { - return smtpPass; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EmailProviderCredentialsSchemaSmtpHost - && equalTo((EmailProviderCredentialsSchemaSmtpHost) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EmailProviderCredentialsSchemaSmtpHost other) { - return smtpHost.equals(other.smtpHost) - && smtpPort.equals(other.smtpPort) - && smtpUser.equals(other.smtpUser) - && smtpPass.equals(other.smtpPass); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.smtpHost, this.smtpPort, this.smtpUser, this.smtpPass); - } - - @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 smtpHost = Optional.empty(); - - private Optional smtpPort = Optional.empty(); - - private Optional smtpUser = Optional.empty(); - - private Optional smtpPass = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(EmailProviderCredentialsSchemaSmtpHost other) { - smtpHost(other.getSmtpHost()); - smtpPort(other.getSmtpPort()); - smtpUser(other.getSmtpUser()); - smtpPass(other.getSmtpPass()); - return this; - } - - @JsonSetter(value = "smtp_host", nulls = Nulls.SKIP) - public Builder smtpHost(Optional smtpHost) { - this.smtpHost = smtpHost; - return this; - } - - public Builder smtpHost(String smtpHost) { - this.smtpHost = Optional.ofNullable(smtpHost); - return this; - } - - /** - *

SMTP port.

- */ - @JsonSetter(value = "smtp_port", nulls = Nulls.SKIP) - public Builder smtpPort(Optional smtpPort) { - this.smtpPort = smtpPort; - return this; - } - - public Builder smtpPort(Integer smtpPort) { - this.smtpPort = Optional.ofNullable(smtpPort); - return this; - } - - /** - *

SMTP username.

- */ - @JsonSetter(value = "smtp_user", nulls = Nulls.SKIP) - public Builder smtpUser(Optional smtpUser) { - this.smtpUser = smtpUser; - return this; - } - - public Builder smtpUser(String smtpUser) { - this.smtpUser = Optional.ofNullable(smtpUser); - return this; - } - - /** - *

SMTP password.

- */ - @JsonSetter(value = "smtp_pass", nulls = Nulls.SKIP) - public Builder smtpPass(Optional smtpPass) { - this.smtpPass = smtpPass; - return this; - } - - public Builder smtpPass(String smtpPass) { - this.smtpPass = Optional.ofNullable(smtpPass); - return this; - } - - public EmailProviderCredentialsSchemaSmtpHost build() { - return new EmailProviderCredentialsSchemaSmtpHost( - smtpHost, smtpPort, smtpUser, smtpPass, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaThree.java b/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaThree.java deleted file mode 100644 index c3c5e07a2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaThree.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = EmailProviderCredentialsSchemaThree.Builder.class) -public final class EmailProviderCredentialsSchemaThree { - private final Optional apiKey; - - private final Optional region; - - private final Map additionalProperties; - - private EmailProviderCredentialsSchemaThree( - Optional apiKey, - Optional region, - Map additionalProperties) { - this.apiKey = apiKey; - this.region = region; - this.additionalProperties = additionalProperties; - } - - /** - * @return API Key - */ - @JsonProperty("api_key") - public Optional getApiKey() { - return apiKey; - } - - @JsonProperty("region") - public Optional getRegion() { - return region; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EmailProviderCredentialsSchemaThree - && equalTo((EmailProviderCredentialsSchemaThree) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EmailProviderCredentialsSchemaThree other) { - return apiKey.equals(other.apiKey) && region.equals(other.region); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.apiKey, 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 apiKey = Optional.empty(); - - private Optional region = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(EmailProviderCredentialsSchemaThree other) { - apiKey(other.getApiKey()); - region(other.getRegion()); - return this; - } - - /** - *

API Key

- */ - @JsonSetter(value = "api_key", nulls = Nulls.SKIP) - public Builder apiKey(Optional apiKey) { - this.apiKey = apiKey; - return this; - } - - public Builder apiKey(String apiKey) { - this.apiKey = Optional.ofNullable(apiKey); - return this; - } - - @JsonSetter(value = "region", nulls = Nulls.SKIP) - public Builder region(Optional region) { - this.region = region; - return this; - } - - public Builder region(EmailSparkPostRegionEnum region) { - this.region = Optional.ofNullable(region); - return this; - } - - public EmailProviderCredentialsSchemaThree build() { - return new EmailProviderCredentialsSchemaThree(apiKey, region, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaZero.java b/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaZero.java deleted file mode 100644 index 330800496..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EmailProviderCredentialsSchemaZero.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = EmailProviderCredentialsSchemaZero.Builder.class) -public final class EmailProviderCredentialsSchemaZero { - private final String apiKey; - - private final Map additionalProperties; - - private EmailProviderCredentialsSchemaZero(String apiKey, Map additionalProperties) { - this.apiKey = apiKey; - this.additionalProperties = additionalProperties; - } - - /** - * @return API Key - */ - @JsonProperty("api_key") - public String getApiKey() { - return apiKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EmailProviderCredentialsSchemaZero - && equalTo((EmailProviderCredentialsSchemaZero) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EmailProviderCredentialsSchemaZero other) { - return apiKey.equals(other.apiKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.apiKey); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ApiKeyStage builder() { - return new Builder(); - } - - public interface ApiKeyStage { - /** - *

API Key

- */ - _FinalStage apiKey(@NotNull String apiKey); - - Builder from(EmailProviderCredentialsSchemaZero other); - } - - public interface _FinalStage { - EmailProviderCredentialsSchemaZero build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ApiKeyStage, _FinalStage { - private String apiKey; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(EmailProviderCredentialsSchemaZero other) { - apiKey(other.getApiKey()); - return this; - } - - /** - *

API Key

- *

API Key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("api_key") - public _FinalStage apiKey(@NotNull String apiKey) { - this.apiKey = Objects.requireNonNull(apiKey, "apiKey must not be null"); - return this; - } - - @java.lang.Override - public EmailProviderCredentialsSchemaZero build() { - return new EmailProviderCredentialsSchemaZero(apiKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailProviderNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/EmailProviderNameEnum.java deleted file mode 100644 index 3adaf39e7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EmailProviderNameEnum.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EmailProviderNameEnum { - public static final EmailProviderNameEnum MAILGUN = new EmailProviderNameEnum(Value.MAILGUN, "mailgun"); - - public static final EmailProviderNameEnum SES = new EmailProviderNameEnum(Value.SES, "ses"); - - public static final EmailProviderNameEnum MS365 = new EmailProviderNameEnum(Value.MS365, "ms365"); - - public static final EmailProviderNameEnum CUSTOM = new EmailProviderNameEnum(Value.CUSTOM, "custom"); - - public static final EmailProviderNameEnum SPARKPOST = new EmailProviderNameEnum(Value.SPARKPOST, "sparkpost"); - - public static final EmailProviderNameEnum AZURE_CS = new EmailProviderNameEnum(Value.AZURE_CS, "azure_cs"); - - public static final EmailProviderNameEnum SMTP = new EmailProviderNameEnum(Value.SMTP, "smtp"); - - public static final EmailProviderNameEnum MANDRILL = new EmailProviderNameEnum(Value.MANDRILL, "mandrill"); - - public static final EmailProviderNameEnum SENDGRID = new EmailProviderNameEnum(Value.SENDGRID, "sendgrid"); - - private final Value value; - - private final String string; - - EmailProviderNameEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EmailProviderNameEnum - && this.string.equals(((EmailProviderNameEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MAILGUN: - return visitor.visitMailgun(); - case SES: - return visitor.visitSes(); - case MS365: - return visitor.visitMs365(); - case CUSTOM: - return visitor.visitCustom(); - case SPARKPOST: - return visitor.visitSparkpost(); - case AZURE_CS: - return visitor.visitAzureCs(); - case SMTP: - return visitor.visitSmtp(); - case MANDRILL: - return visitor.visitMandrill(); - case SENDGRID: - return visitor.visitSendgrid(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EmailProviderNameEnum valueOf(String value) { - switch (value) { - case "mailgun": - return MAILGUN; - case "ses": - return SES; - case "ms365": - return MS365; - case "custom": - return CUSTOM; - case "sparkpost": - return SPARKPOST; - case "azure_cs": - return AZURE_CS; - case "smtp": - return SMTP; - case "mandrill": - return MANDRILL; - case "sendgrid": - return SENDGRID; - default: - return new EmailProviderNameEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - MAILGUN, - - MANDRILL, - - SENDGRID, - - SES, - - SPARKPOST, - - SMTP, - - AZURE_CS, - - MS365, - - CUSTOM, - - UNKNOWN - } - - public interface Visitor { - T visitMailgun(); - - T visitMandrill(); - - T visitSendgrid(); - - T visitSes(); - - T visitSparkpost(); - - T visitSmtp(); - - T visitAzureCs(); - - T visitMs365(); - - T visitCustom(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailSparkPostRegionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EmailSparkPostRegionEnum.java deleted file mode 100644 index 97d8d3266..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EmailSparkPostRegionEnum.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EmailSparkPostRegionEnum { - public static final EmailSparkPostRegionEnum EU = new EmailSparkPostRegionEnum(Value.EU, "eu"); - - private final Value value; - - private final String string; - - EmailSparkPostRegionEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EmailSparkPostRegionEnum - && this.string.equals(((EmailSparkPostRegionEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EU: - return visitor.visitEu(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EmailSparkPostRegionEnum valueOf(String value) { - switch (value) { - case "eu": - return EU; - default: - return new EmailSparkPostRegionEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - EU, - - UNKNOWN - } - - public interface Visitor { - T visitEu(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EmailTemplateNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/EmailTemplateNameEnum.java deleted file mode 100644 index cde3175c9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EmailTemplateNameEnum.java +++ /dev/null @@ -1,206 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EmailTemplateNameEnum { - public static final EmailTemplateNameEnum RESET_EMAIL_BY_CODE = - new EmailTemplateNameEnum(Value.RESET_EMAIL_BY_CODE, "reset_email_by_code"); - - public static final EmailTemplateNameEnum CHANGE_PASSWORD = - new EmailTemplateNameEnum(Value.CHANGE_PASSWORD, "change_password"); - - public static final EmailTemplateNameEnum STOLEN_CREDENTIALS = - new EmailTemplateNameEnum(Value.STOLEN_CREDENTIALS, "stolen_credentials"); - - public static final EmailTemplateNameEnum USER_INVITATION = - new EmailTemplateNameEnum(Value.USER_INVITATION, "user_invitation"); - - public static final EmailTemplateNameEnum BLOCKED_ACCOUNT = - new EmailTemplateNameEnum(Value.BLOCKED_ACCOUNT, "blocked_account"); - - public static final EmailTemplateNameEnum ENROLLMENT_EMAIL = - new EmailTemplateNameEnum(Value.ENROLLMENT_EMAIL, "enrollment_email"); - - public static final EmailTemplateNameEnum PASSWORD_RESET = - new EmailTemplateNameEnum(Value.PASSWORD_RESET, "password_reset"); - - public static final EmailTemplateNameEnum VERIFY_EMAIL = - new EmailTemplateNameEnum(Value.VERIFY_EMAIL, "verify_email"); - - public static final EmailTemplateNameEnum WELCOME_EMAIL = - new EmailTemplateNameEnum(Value.WELCOME_EMAIL, "welcome_email"); - - public static final EmailTemplateNameEnum VERIFY_EMAIL_BY_CODE = - new EmailTemplateNameEnum(Value.VERIFY_EMAIL_BY_CODE, "verify_email_by_code"); - - public static final EmailTemplateNameEnum MFA_OOB_CODE = - new EmailTemplateNameEnum(Value.MFA_OOB_CODE, "mfa_oob_code"); - - public static final EmailTemplateNameEnum ASYNC_APPROVAL = - new EmailTemplateNameEnum(Value.ASYNC_APPROVAL, "async_approval"); - - public static final EmailTemplateNameEnum RESET_EMAIL = new EmailTemplateNameEnum(Value.RESET_EMAIL, "reset_email"); - - private final Value value; - - private final String string; - - EmailTemplateNameEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EmailTemplateNameEnum - && this.string.equals(((EmailTemplateNameEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case RESET_EMAIL_BY_CODE: - return visitor.visitResetEmailByCode(); - case CHANGE_PASSWORD: - return visitor.visitChangePassword(); - case STOLEN_CREDENTIALS: - return visitor.visitStolenCredentials(); - case USER_INVITATION: - return visitor.visitUserInvitation(); - case BLOCKED_ACCOUNT: - return visitor.visitBlockedAccount(); - case ENROLLMENT_EMAIL: - return visitor.visitEnrollmentEmail(); - case PASSWORD_RESET: - return visitor.visitPasswordReset(); - case VERIFY_EMAIL: - return visitor.visitVerifyEmail(); - case WELCOME_EMAIL: - return visitor.visitWelcomeEmail(); - case VERIFY_EMAIL_BY_CODE: - return visitor.visitVerifyEmailByCode(); - case MFA_OOB_CODE: - return visitor.visitMfaOobCode(); - case ASYNC_APPROVAL: - return visitor.visitAsyncApproval(); - case RESET_EMAIL: - return visitor.visitResetEmail(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EmailTemplateNameEnum valueOf(String value) { - switch (value) { - case "reset_email_by_code": - return RESET_EMAIL_BY_CODE; - case "change_password": - return CHANGE_PASSWORD; - case "stolen_credentials": - return STOLEN_CREDENTIALS; - case "user_invitation": - return USER_INVITATION; - case "blocked_account": - return BLOCKED_ACCOUNT; - case "enrollment_email": - return ENROLLMENT_EMAIL; - case "password_reset": - return PASSWORD_RESET; - case "verify_email": - return VERIFY_EMAIL; - case "welcome_email": - return WELCOME_EMAIL; - case "verify_email_by_code": - return VERIFY_EMAIL_BY_CODE; - case "mfa_oob_code": - return MFA_OOB_CODE; - case "async_approval": - return ASYNC_APPROVAL; - case "reset_email": - return RESET_EMAIL; - default: - return new EmailTemplateNameEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - VERIFY_EMAIL, - - VERIFY_EMAIL_BY_CODE, - - RESET_EMAIL, - - RESET_EMAIL_BY_CODE, - - WELCOME_EMAIL, - - BLOCKED_ACCOUNT, - - STOLEN_CREDENTIALS, - - ENROLLMENT_EMAIL, - - MFA_OOB_CODE, - - USER_INVITATION, - - CHANGE_PASSWORD, - - PASSWORD_RESET, - - ASYNC_APPROVAL, - - UNKNOWN - } - - public interface Visitor { - T visitVerifyEmail(); - - T visitVerifyEmailByCode(); - - T visitResetEmail(); - - T visitResetEmailByCode(); - - T visitWelcomeEmail(); - - T visitBlockedAccount(); - - T visitStolenCredentials(); - - T visitEnrollmentEmail(); - - T visitMfaOobCode(); - - T visitUserInvitation(); - - T visitChangePassword(); - - T visitPasswordReset(); - - T visitAsyncApproval(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EnabledFeaturesEnum.java b/src/main/java/com/auth0/client/mgmt/types/EnabledFeaturesEnum.java deleted file mode 100644 index 0c8f0e43f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EnabledFeaturesEnum.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EnabledFeaturesEnum { - public static final EnabledFeaturesEnum SCIM = new EnabledFeaturesEnum(Value.SCIM, "scim"); - - public static final EnabledFeaturesEnum UNIVERSAL_LOGOUT = - new EnabledFeaturesEnum(Value.UNIVERSAL_LOGOUT, "universal_logout"); - - private final Value value; - - private final String string; - - EnabledFeaturesEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EnabledFeaturesEnum && this.string.equals(((EnabledFeaturesEnum) 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 UNIVERSAL_LOGOUT: - return visitor.visitUniversalLogout(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EnabledFeaturesEnum valueOf(String value) { - switch (value) { - case "scim": - return SCIM; - case "universal_logout": - return UNIVERSAL_LOGOUT; - default: - return new EnabledFeaturesEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - SCIM, - - UNIVERSAL_LOGOUT, - - UNKNOWN - } - - public interface Visitor { - T visitScim(); - - T visitUniversalLogout(); - - 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 deleted file mode 100644 index d3e88dafb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EncryptionKey.java +++ /dev/null @@ -1,416 +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.NotNull; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = EncryptionKey.Builder.class) -public final class EncryptionKey { - private final String kid; - - private final EncryptionKeyType type; - - private final EncryptionKeyState state; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final OptionalNullable parentKid; - - private final OptionalNullable publicKey; - - private final Map additionalProperties; - - private EncryptionKey( - String kid, - EncryptionKeyType type, - EncryptionKeyState state, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - OptionalNullable parentKid, - OptionalNullable publicKey, - Map additionalProperties) { - this.kid = kid; - this.type = type; - this.state = state; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.parentKid = parentKid; - this.publicKey = publicKey; - this.additionalProperties = additionalProperties; - } - - /** - * @return Key ID - */ - @JsonProperty("kid") - public String getKid() { - return kid; - } - - @JsonProperty("type") - public EncryptionKeyType getType() { - return type; - } - - @JsonProperty("state") - public EncryptionKeyState getState() { - return state; - } - - /** - * @return Key creation timestamp - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return Key update timestamp - */ - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - /** - * @return ID of parent wrapping key - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("parent_kid") - public OptionalNullable getParentKid() { - if (parentKid == null) { - return OptionalNullable.absent(); - } - return parentKid; - } - - /** - * @return Public key in PEM format - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("public_key") - public OptionalNullable getPublicKey() { - if (publicKey == null) { - return OptionalNullable.absent(); - } - return publicKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("parent_kid") - private OptionalNullable _getParentKid() { - return parentKid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("public_key") - private OptionalNullable _getPublicKey() { - return publicKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EncryptionKey && equalTo((EncryptionKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EncryptionKey other) { - return kid.equals(other.kid) - && type.equals(other.type) - && state.equals(other.state) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && parentKid.equals(other.parentKid) - && publicKey.equals(other.publicKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.kid, this.type, this.state, this.createdAt, this.updatedAt, this.parentKid, this.publicKey); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static KidStage builder() { - return new Builder(); - } - - public interface KidStage { - /** - *

Key ID

- */ - TypeStage kid(@NotNull String kid); - - Builder from(EncryptionKey other); - } - - public interface TypeStage { - StateStage type(@NotNull EncryptionKeyType type); - } - - public interface StateStage { - CreatedAtStage state(@NotNull EncryptionKeyState state); - } - - public interface CreatedAtStage { - /** - *

Key creation timestamp

- */ - UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); - } - - public interface UpdatedAtStage { - /** - *

Key update timestamp

- */ - _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); - } - - public interface _FinalStage { - EncryptionKey build(); - - /** - *

ID of parent wrapping key

- */ - _FinalStage parentKid(@Nullable OptionalNullable parentKid); - - _FinalStage parentKid(String parentKid); - - _FinalStage parentKid(Optional parentKid); - - _FinalStage parentKid(com.auth0.client.mgmt.core.Nullable parentKid); - - /** - *

Public key in PEM format

- */ - _FinalStage publicKey(@Nullable OptionalNullable publicKey); - - _FinalStage publicKey(String publicKey); - - _FinalStage publicKey(Optional publicKey); - - _FinalStage publicKey(com.auth0.client.mgmt.core.Nullable publicKey); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements KidStage, TypeStage, StateStage, CreatedAtStage, UpdatedAtStage, _FinalStage { - private String kid; - - private EncryptionKeyType type; - - private EncryptionKeyState state; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private OptionalNullable publicKey = OptionalNullable.absent(); - - private OptionalNullable parentKid = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(EncryptionKey other) { - kid(other.getKid()); - type(other.getType()); - state(other.getState()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - parentKid(other.getParentKid()); - publicKey(other.getPublicKey()); - return this; - } - - /** - *

Key ID

- *

Key ID

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("kid") - public TypeStage kid(@NotNull String kid) { - this.kid = Objects.requireNonNull(kid, "kid must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public StateStage type(@NotNull EncryptionKeyType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("state") - public CreatedAtStage state(@NotNull EncryptionKeyState state) { - this.state = Objects.requireNonNull(state, "state must not be null"); - return this; - } - - /** - *

Key creation timestamp

- *

Key creation timestamp

- * @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; - } - - /** - *

Key update timestamp

- *

Key update timestamp

- * @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; - } - - /** - *

Public key in PEM format

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage publicKey(com.auth0.client.mgmt.core.Nullable publicKey) { - if (publicKey.isNull()) { - this.publicKey = OptionalNullable.ofNull(); - } else if (publicKey.isEmpty()) { - this.publicKey = OptionalNullable.absent(); - } else { - this.publicKey = OptionalNullable.of(publicKey.get()); - } - return this; - } - - /** - *

Public key in PEM format

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage publicKey(Optional publicKey) { - if (publicKey.isPresent()) { - this.publicKey = OptionalNullable.of(publicKey.get()); - } else { - this.publicKey = OptionalNullable.absent(); - } - return this; - } - - /** - *

Public key in PEM format

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage publicKey(String publicKey) { - this.publicKey = OptionalNullable.of(publicKey); - return this; - } - - /** - *

Public key in PEM format

- */ - @java.lang.Override - @JsonSetter(value = "public_key", nulls = Nulls.SKIP) - public _FinalStage publicKey(@Nullable OptionalNullable publicKey) { - this.publicKey = publicKey; - return this; - } - - /** - *

ID of parent wrapping key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage parentKid(com.auth0.client.mgmt.core.Nullable parentKid) { - if (parentKid.isNull()) { - this.parentKid = OptionalNullable.ofNull(); - } else if (parentKid.isEmpty()) { - this.parentKid = OptionalNullable.absent(); - } else { - this.parentKid = OptionalNullable.of(parentKid.get()); - } - return this; - } - - /** - *

ID of parent wrapping key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage parentKid(Optional parentKid) { - if (parentKid.isPresent()) { - this.parentKid = OptionalNullable.of(parentKid.get()); - } else { - this.parentKid = OptionalNullable.absent(); - } - return this; - } - - /** - *

ID of parent wrapping key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage parentKid(String parentKid) { - this.parentKid = OptionalNullable.of(parentKid); - return this; - } - - /** - *

ID of parent wrapping key

- */ - @java.lang.Override - @JsonSetter(value = "parent_kid", nulls = Nulls.SKIP) - public _FinalStage parentKid(@Nullable OptionalNullable parentKid) { - this.parentKid = parentKid; - return this; - } - - @java.lang.Override - public EncryptionKey build() { - return new EncryptionKey( - kid, type, state, createdAt, updatedAt, parentKid, publicKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EncryptionKeyPublicWrappingAlgorithm.java b/src/main/java/com/auth0/client/mgmt/types/EncryptionKeyPublicWrappingAlgorithm.java deleted file mode 100644 index 25dedc28f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EncryptionKeyPublicWrappingAlgorithm.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EncryptionKeyPublicWrappingAlgorithm { - public static final EncryptionKeyPublicWrappingAlgorithm CKM_RSA_AES_KEY_WRAP = - new EncryptionKeyPublicWrappingAlgorithm(Value.CKM_RSA_AES_KEY_WRAP, "CKM_RSA_AES_KEY_WRAP"); - - private final Value value; - - private final String string; - - EncryptionKeyPublicWrappingAlgorithm(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EncryptionKeyPublicWrappingAlgorithm - && this.string.equals(((EncryptionKeyPublicWrappingAlgorithm) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CKM_RSA_AES_KEY_WRAP: - return visitor.visitCkmRsaAesKeyWrap(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EncryptionKeyPublicWrappingAlgorithm valueOf(String value) { - switch (value) { - case "CKM_RSA_AES_KEY_WRAP": - return CKM_RSA_AES_KEY_WRAP; - default: - return new EncryptionKeyPublicWrappingAlgorithm(Value.UNKNOWN, value); - } - } - - public enum Value { - CKM_RSA_AES_KEY_WRAP, - - UNKNOWN - } - - public interface Visitor { - T visitCkmRsaAesKeyWrap(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EncryptionKeyState.java b/src/main/java/com/auth0/client/mgmt/types/EncryptionKeyState.java deleted file mode 100644 index 50b5ab6a8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EncryptionKeyState.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EncryptionKeyState { - public static final EncryptionKeyState DESTROYED = new EncryptionKeyState(Value.DESTROYED, "destroyed"); - - public static final EncryptionKeyState PRE_ACTIVATION = - new EncryptionKeyState(Value.PRE_ACTIVATION, "pre-activation"); - - public static final EncryptionKeyState DEACTIVATED = new EncryptionKeyState(Value.DEACTIVATED, "deactivated"); - - public static final EncryptionKeyState ACTIVE = new EncryptionKeyState(Value.ACTIVE, "active"); - - private final Value value; - - private final String string; - - EncryptionKeyState(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EncryptionKeyState && this.string.equals(((EncryptionKeyState) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DESTROYED: - return visitor.visitDestroyed(); - case PRE_ACTIVATION: - return visitor.visitPreActivation(); - case DEACTIVATED: - return visitor.visitDeactivated(); - case ACTIVE: - return visitor.visitActive(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EncryptionKeyState valueOf(String value) { - switch (value) { - case "destroyed": - return DESTROYED; - case "pre-activation": - return PRE_ACTIVATION; - case "deactivated": - return DEACTIVATED; - case "active": - return ACTIVE; - default: - return new EncryptionKeyState(Value.UNKNOWN, value); - } - } - - public enum Value { - PRE_ACTIVATION, - - ACTIVE, - - DEACTIVATED, - - DESTROYED, - - UNKNOWN - } - - public interface Visitor { - T visitPreActivation(); - - T visitActive(); - - T visitDeactivated(); - - T visitDestroyed(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EncryptionKeyType.java b/src/main/java/com/auth0/client/mgmt/types/EncryptionKeyType.java deleted file mode 100644 index 6eaa7164b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EncryptionKeyType.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EncryptionKeyType { - public static final EncryptionKeyType ENVIRONMENT_ROOT_KEY = - new EncryptionKeyType(Value.ENVIRONMENT_ROOT_KEY, "environment-root-key"); - - public static final EncryptionKeyType CUSTOMER_PROVIDED_ROOT_KEY = - new EncryptionKeyType(Value.CUSTOMER_PROVIDED_ROOT_KEY, "customer-provided-root-key"); - - public static final EncryptionKeyType TENANT_MASTER_KEY = - new EncryptionKeyType(Value.TENANT_MASTER_KEY, "tenant-master-key"); - - public static final EncryptionKeyType TENANT_ENCRYPTION_KEY = - new EncryptionKeyType(Value.TENANT_ENCRYPTION_KEY, "tenant-encryption-key"); - - private final Value value; - - private final String string; - - EncryptionKeyType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EncryptionKeyType && this.string.equals(((EncryptionKeyType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ENVIRONMENT_ROOT_KEY: - return visitor.visitEnvironmentRootKey(); - case CUSTOMER_PROVIDED_ROOT_KEY: - return visitor.visitCustomerProvidedRootKey(); - case TENANT_MASTER_KEY: - return visitor.visitTenantMasterKey(); - case TENANT_ENCRYPTION_KEY: - return visitor.visitTenantEncryptionKey(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EncryptionKeyType valueOf(String value) { - switch (value) { - case "environment-root-key": - return ENVIRONMENT_ROOT_KEY; - case "customer-provided-root-key": - return CUSTOMER_PROVIDED_ROOT_KEY; - case "tenant-master-key": - return TENANT_MASTER_KEY; - case "tenant-encryption-key": - return TENANT_ENCRYPTION_KEY; - default: - return new EncryptionKeyType(Value.UNKNOWN, value); - } - } - - public enum Value { - CUSTOMER_PROVIDED_ROOT_KEY, - - ENVIRONMENT_ROOT_KEY, - - TENANT_MASTER_KEY, - - TENANT_ENCRYPTION_KEY, - - UNKNOWN - } - - public interface Visitor { - T visitCustomerProvidedRootKey(); - - T visitEnvironmentRootKey(); - - T visitTenantMasterKey(); - - T visitTenantEncryptionKey(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamActionConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamActionConfiguration.java deleted file mode 100644 index daaeb1ecb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamActionConfiguration.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = EventStreamActionConfiguration.Builder.class) -public final class EventStreamActionConfiguration { - private final String actionId; - - private final Map additionalProperties; - - private EventStreamActionConfiguration(String actionId, Map additionalProperties) { - this.actionId = actionId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Action ID for the action destination. - */ - @JsonProperty("action_id") - public String getActionId() { - return actionId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EventStreamActionConfiguration && equalTo((EventStreamActionConfiguration) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EventStreamActionConfiguration other) { - return actionId.equals(other.actionId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.actionId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ActionIdStage builder() { - return new Builder(); - } - - public interface ActionIdStage { - /** - *

Action ID for the action destination.

- */ - _FinalStage actionId(@NotNull String actionId); - - Builder from(EventStreamActionConfiguration other); - } - - public interface _FinalStage { - EventStreamActionConfiguration build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ActionIdStage, _FinalStage { - private String actionId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(EventStreamActionConfiguration other) { - actionId(other.getActionId()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("action_id") - public _FinalStage actionId(@NotNull String actionId) { - this.actionId = Objects.requireNonNull(actionId, "actionId must not be null"); - return this; - } - - @java.lang.Override - public EventStreamActionConfiguration build() { - return new EventStreamActionConfiguration(actionId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamActionDestination.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamActionDestination.java deleted file mode 100644 index 03ef7d75a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamActionDestination.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = EventStreamActionDestination.Builder.class) -public final class EventStreamActionDestination { - private final EventStreamActionDestinationTypeEnum type; - - private final EventStreamActionConfiguration configuration; - - private final Map additionalProperties; - - private EventStreamActionDestination( - EventStreamActionDestinationTypeEnum type, - EventStreamActionConfiguration configuration, - Map additionalProperties) { - this.type = type; - this.configuration = configuration; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public EventStreamActionDestinationTypeEnum getType() { - return type; - } - - @JsonProperty("configuration") - public EventStreamActionConfiguration getConfiguration() { - return configuration; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EventStreamActionDestination && equalTo((EventStreamActionDestination) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EventStreamActionDestination other) { - return type.equals(other.type) && configuration.equals(other.configuration); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.configuration); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - ConfigurationStage type(@NotNull EventStreamActionDestinationTypeEnum type); - - Builder from(EventStreamActionDestination other); - } - - public interface ConfigurationStage { - _FinalStage configuration(@NotNull EventStreamActionConfiguration configuration); - } - - public interface _FinalStage { - EventStreamActionDestination build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, ConfigurationStage, _FinalStage { - private EventStreamActionDestinationTypeEnum type; - - private EventStreamActionConfiguration configuration; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(EventStreamActionDestination other) { - type(other.getType()); - configuration(other.getConfiguration()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ConfigurationStage type(@NotNull EventStreamActionDestinationTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("configuration") - public _FinalStage configuration(@NotNull EventStreamActionConfiguration configuration) { - this.configuration = Objects.requireNonNull(configuration, "configuration must not be null"); - return this; - } - - @java.lang.Override - public EventStreamActionDestination build() { - return new EventStreamActionDestination(type, configuration, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamActionDestinationTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamActionDestinationTypeEnum.java deleted file mode 100644 index d6349946e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamActionDestinationTypeEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EventStreamActionDestinationTypeEnum { - public static final EventStreamActionDestinationTypeEnum ACTION = - new EventStreamActionDestinationTypeEnum(Value.ACTION, "action"); - - private final Value value; - - private final String string; - - EventStreamActionDestinationTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EventStreamActionDestinationTypeEnum - && this.string.equals(((EventStreamActionDestinationTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ACTION: - return visitor.visitAction(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EventStreamActionDestinationTypeEnum valueOf(String value) { - switch (value) { - case "action": - return ACTION; - default: - return new EventStreamActionDestinationTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - ACTION, - - UNKNOWN - } - - public interface Visitor { - T visitAction(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamActionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamActionResponseContent.java deleted file mode 100644 index a79e68339..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamActionResponseContent.java +++ /dev/null @@ -1,275 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = EventStreamActionResponseContent.Builder.class) -public final class EventStreamActionResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional> subscriptions; - - private final Optional destination; - - private final Optional status; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private EventStreamActionResponseContent( - Optional id, - Optional name, - Optional> subscriptions, - Optional destination, - Optional status, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.subscriptions = subscriptions; - this.destination = destination; - this.status = status; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return Unique identifier for the event stream. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Name of the event stream. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return List of event types subscribed to in this stream. - */ - @JsonProperty("subscriptions") - public Optional> getSubscriptions() { - return subscriptions; - } - - @JsonProperty("destination") - public Optional getDestination() { - return destination; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return Timestamp when the event stream was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return Timestamp when the event stream was last updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EventStreamActionResponseContent && equalTo((EventStreamActionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EventStreamActionResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && subscriptions.equals(other.subscriptions) - && destination.equals(other.destination) - && status.equals(other.status) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.name, this.subscriptions, this.destination, this.status, this.createdAt, this.updatedAt); - } - - @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> subscriptions = Optional.empty(); - - private Optional destination = Optional.empty(); - - private Optional status = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(EventStreamActionResponseContent other) { - id(other.getId()); - name(other.getName()); - subscriptions(other.getSubscriptions()); - destination(other.getDestination()); - status(other.getStatus()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

Unique identifier for the event stream.

- */ - @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; - } - - /** - *

Name of the event stream.

- */ - @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; - } - - /** - *

List of event types subscribed to in this stream.

- */ - @JsonSetter(value = "subscriptions", nulls = Nulls.SKIP) - public Builder subscriptions(Optional> subscriptions) { - this.subscriptions = subscriptions; - return this; - } - - public Builder subscriptions(List subscriptions) { - this.subscriptions = Optional.ofNullable(subscriptions); - return this; - } - - @JsonSetter(value = "destination", nulls = Nulls.SKIP) - public Builder destination(Optional destination) { - this.destination = destination; - return this; - } - - public Builder destination(EventStreamActionDestination destination) { - this.destination = Optional.ofNullable(destination); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(EventStreamStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - /** - *

Timestamp when the event stream 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; - } - - /** - *

Timestamp when the event stream 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; - } - - public EventStreamActionResponseContent build() { - return new EventStreamActionResponseContent( - id, name, subscriptions, destination, status, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEvent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEvent.java deleted file mode 100644 index 1bc25e7b7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamCloudEvent.java +++ /dev/null @@ -1,254 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = EventStreamCloudEvent.Builder.class) -public final class EventStreamCloudEvent { - private final Optional id; - - private final Optional source; - - private final Optional specversion; - - private final Optional type; - - private final Optional time; - - private final Optional data; - - private final Map additionalProperties; - - private EventStreamCloudEvent( - Optional id, - Optional source, - Optional specversion, - Optional type, - Optional time, - Optional data, - Map additionalProperties) { - this.id = id; - this.source = source; - this.specversion = specversion; - this.type = type; - this.time = time; - this.data = data; - this.additionalProperties = additionalProperties; - } - - /** - * @return Unique identifier for the event - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Where the event originated - */ - @JsonProperty("source") - public Optional getSource() { - return source; - } - - /** - * @return Version of CloudEvents spec - */ - @JsonProperty("specversion") - public Optional getSpecversion() { - return specversion; - } - - /** - * @return Type of the event (e.g., user.created) - */ - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return Timestamp at which the event was generated - */ - @JsonProperty("time") - public Optional getTime() { - return time; - } - - /** - * @return Event contents encoded as a string. - */ - @JsonProperty("data") - public Optional getData() { - return data; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EventStreamCloudEvent && equalTo((EventStreamCloudEvent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EventStreamCloudEvent other) { - return id.equals(other.id) - && source.equals(other.source) - && specversion.equals(other.specversion) - && type.equals(other.type) - && time.equals(other.time) - && data.equals(other.data); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.source, this.specversion, this.type, this.time, this.data); - } - - @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 source = Optional.empty(); - - private Optional specversion = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional time = Optional.empty(); - - private Optional data = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(EventStreamCloudEvent other) { - id(other.getId()); - source(other.getSource()); - specversion(other.getSpecversion()); - type(other.getType()); - time(other.getTime()); - data(other.getData()); - return this; - } - - /** - *

Unique identifier for the event

- */ - @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; - } - - /** - *

Where the event originated

- */ - @JsonSetter(value = "source", nulls = Nulls.SKIP) - public Builder source(Optional source) { - this.source = source; - return this; - } - - public Builder source(String source) { - this.source = Optional.ofNullable(source); - return this; - } - - /** - *

Version of CloudEvents spec

- */ - @JsonSetter(value = "specversion", nulls = Nulls.SKIP) - public Builder specversion(Optional specversion) { - this.specversion = specversion; - return this; - } - - public Builder specversion(String specversion) { - this.specversion = Optional.ofNullable(specversion); - return this; - } - - /** - *

Type of the event (e.g., user.created)

- */ - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(String type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

Timestamp at which the event was generated

- */ - @JsonSetter(value = "time", nulls = Nulls.SKIP) - public Builder time(Optional time) { - this.time = time; - return this; - } - - public Builder time(OffsetDateTime time) { - this.time = Optional.ofNullable(time); - return this; - } - - /** - *

Event contents encoded as a string.

- */ - @JsonSetter(value = "data", nulls = Nulls.SKIP) - public Builder data(Optional data) { - this.data = data; - return this; - } - - public Builder data(String data) { - this.data = Optional.ofNullable(data); - return this; - } - - public EventStreamCloudEvent build() { - return new EventStreamCloudEvent(id, source, specversion, type, time, data, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamDelivery.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamDelivery.java deleted file mode 100644 index 859ae3340..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamDelivery.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.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = EventStreamDelivery.Builder.class) -public final class EventStreamDelivery { - private final String id; - - private final String eventStreamId; - - private final EventStreamDeliveryStatusEnum status; - - private final EventStreamDeliveryEventTypeEnum eventType; - - private final List attempts; - - private final Optional event; - - private final Map additionalProperties; - - private EventStreamDelivery( - String id, - String eventStreamId, - EventStreamDeliveryStatusEnum status, - EventStreamDeliveryEventTypeEnum eventType, - List attempts, - Optional event, - Map additionalProperties) { - this.id = id; - this.eventStreamId = eventStreamId; - this.status = status; - this.eventType = eventType; - this.attempts = attempts; - this.event = event; - this.additionalProperties = additionalProperties; - } - - /** - * @return Unique identifier for the delivery - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return Unique identifier for the event stream. - */ - @JsonProperty("event_stream_id") - public String getEventStreamId() { - return eventStreamId; - } - - @JsonProperty("status") - public EventStreamDeliveryStatusEnum getStatus() { - return status; - } - - @JsonProperty("event_type") - public EventStreamDeliveryEventTypeEnum getEventType() { - return eventType; - } - - /** - * @return Results of delivery attempts - */ - @JsonProperty("attempts") - public List getAttempts() { - return attempts; - } - - @JsonProperty("event") - public Optional getEvent() { - return event; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EventStreamDelivery && equalTo((EventStreamDelivery) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EventStreamDelivery other) { - return id.equals(other.id) - && eventStreamId.equals(other.eventStreamId) - && status.equals(other.status) - && eventType.equals(other.eventType) - && attempts.equals(other.attempts) - && event.equals(other.event); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.eventStreamId, this.status, this.eventType, this.attempts, this.event); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

Unique identifier for the delivery

- */ - EventStreamIdStage id(@NotNull String id); - - Builder from(EventStreamDelivery other); - } - - public interface EventStreamIdStage { - /** - *

Unique identifier for the event stream.

- */ - StatusStage eventStreamId(@NotNull String eventStreamId); - } - - public interface StatusStage { - EventTypeStage status(@NotNull EventStreamDeliveryStatusEnum status); - } - - public interface EventTypeStage { - _FinalStage eventType(@NotNull EventStreamDeliveryEventTypeEnum eventType); - } - - public interface _FinalStage { - EventStreamDelivery build(); - - /** - *

Results of delivery attempts

- */ - _FinalStage attempts(List attempts); - - _FinalStage addAttempts(EventStreamDeliveryAttempt attempts); - - _FinalStage addAllAttempts(List attempts); - - _FinalStage event(Optional event); - - _FinalStage event(EventStreamCloudEvent event); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, EventStreamIdStage, StatusStage, EventTypeStage, _FinalStage { - private String id; - - private String eventStreamId; - - private EventStreamDeliveryStatusEnum status; - - private EventStreamDeliveryEventTypeEnum eventType; - - private Optional event = Optional.empty(); - - private List attempts = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(EventStreamDelivery other) { - id(other.getId()); - eventStreamId(other.getEventStreamId()); - status(other.getStatus()); - eventType(other.getEventType()); - attempts(other.getAttempts()); - event(other.getEvent()); - return this; - } - - /** - *

Unique identifier for the delivery

- *

Unique identifier for the delivery

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("id") - public EventStreamIdStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("event_stream_id") - public StatusStage eventStreamId(@NotNull String eventStreamId) { - this.eventStreamId = Objects.requireNonNull(eventStreamId, "eventStreamId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("status") - public EventTypeStage status(@NotNull EventStreamDeliveryStatusEnum status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("event_type") - public _FinalStage eventType(@NotNull EventStreamDeliveryEventTypeEnum eventType) { - this.eventType = Objects.requireNonNull(eventType, "eventType must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage event(EventStreamCloudEvent event) { - this.event = Optional.ofNullable(event); - return this; - } - - @java.lang.Override - @JsonSetter(value = "event", nulls = Nulls.SKIP) - public _FinalStage event(Optional event) { - this.event = event; - return this; - } - - /** - *

Results of delivery attempts

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addAllAttempts(List attempts) { - if (attempts != null) { - this.attempts.addAll(attempts); - } - return this; - } - - /** - *

Results of delivery attempts

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addAttempts(EventStreamDeliveryAttempt attempts) { - this.attempts.add(attempts); - return this; - } - - /** - *

Results of delivery attempts

- */ - @java.lang.Override - @JsonSetter(value = "attempts", nulls = Nulls.SKIP) - public _FinalStage attempts(List attempts) { - this.attempts.clear(); - if (attempts != null) { - this.attempts.addAll(attempts); - } - return this; - } - - @java.lang.Override - public EventStreamDelivery build() { - return new EventStreamDelivery(id, eventStreamId, status, eventType, attempts, event, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryAttempt.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryAttempt.java deleted file mode 100644 index cc0d3adef..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryAttempt.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = EventStreamDeliveryAttempt.Builder.class) -public final class EventStreamDeliveryAttempt { - private final EventStreamDeliveryStatusEnum status; - - private final OffsetDateTime timestamp; - - private final Optional errorMessage; - - private final Map additionalProperties; - - private EventStreamDeliveryAttempt( - EventStreamDeliveryStatusEnum status, - OffsetDateTime timestamp, - Optional errorMessage, - Map additionalProperties) { - this.status = status; - this.timestamp = timestamp; - this.errorMessage = errorMessage; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("status") - public EventStreamDeliveryStatusEnum getStatus() { - return status; - } - - /** - * @return Timestamp of delivery attempt - */ - @JsonProperty("timestamp") - public OffsetDateTime getTimestamp() { - return timestamp; - } - - /** - * @return Delivery error message, if applicable - */ - @JsonProperty("error_message") - public Optional getErrorMessage() { - return errorMessage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EventStreamDeliveryAttempt && equalTo((EventStreamDeliveryAttempt) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EventStreamDeliveryAttempt other) { - return status.equals(other.status) - && timestamp.equals(other.timestamp) - && errorMessage.equals(other.errorMessage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.status, this.timestamp, this.errorMessage); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StatusStage builder() { - return new Builder(); - } - - public interface StatusStage { - TimestampStage status(@NotNull EventStreamDeliveryStatusEnum status); - - Builder from(EventStreamDeliveryAttempt other); - } - - public interface TimestampStage { - /** - *

Timestamp of delivery attempt

- */ - _FinalStage timestamp(@NotNull OffsetDateTime timestamp); - } - - public interface _FinalStage { - EventStreamDeliveryAttempt build(); - - /** - *

Delivery error message, if applicable

- */ - _FinalStage errorMessage(Optional errorMessage); - - _FinalStage errorMessage(String errorMessage); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StatusStage, TimestampStage, _FinalStage { - private EventStreamDeliveryStatusEnum status; - - private OffsetDateTime timestamp; - - private Optional errorMessage = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(EventStreamDeliveryAttempt other) { - status(other.getStatus()); - timestamp(other.getTimestamp()); - errorMessage(other.getErrorMessage()); - return this; - } - - @java.lang.Override - @JsonSetter("status") - public TimestampStage status(@NotNull EventStreamDeliveryStatusEnum status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - /** - *

Timestamp of delivery attempt

- *

Timestamp of delivery attempt

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("timestamp") - public _FinalStage timestamp(@NotNull OffsetDateTime timestamp) { - this.timestamp = Objects.requireNonNull(timestamp, "timestamp must not be null"); - return this; - } - - /** - *

Delivery error message, if applicable

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage errorMessage(String errorMessage) { - this.errorMessage = Optional.ofNullable(errorMessage); - return this; - } - - /** - *

Delivery error message, if applicable

- */ - @java.lang.Override - @JsonSetter(value = "error_message", nulls = Nulls.SKIP) - public _FinalStage errorMessage(Optional errorMessage) { - this.errorMessage = errorMessage; - return this; - } - - @java.lang.Override - public EventStreamDeliveryAttempt build() { - return new EventStreamDeliveryAttempt(status, timestamp, errorMessage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryEventTypeEnum.java deleted file mode 100644 index 356649e1e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryEventTypeEnum.java +++ /dev/null @@ -1,266 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EventStreamDeliveryEventTypeEnum { - public static final EventStreamDeliveryEventTypeEnum GROUP_DELETED = - new EventStreamDeliveryEventTypeEnum(Value.GROUP_DELETED, "group.deleted"); - - 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 ORGANIZATION_CONNECTION_UPDATED = - new EventStreamDeliveryEventTypeEnum( - Value.ORGANIZATION_CONNECTION_UPDATED, "organization.connection.updated"); - - public static final EventStreamDeliveryEventTypeEnum USER_UPDATED = - new EventStreamDeliveryEventTypeEnum(Value.USER_UPDATED, "user.updated"); - - 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"); - - public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_UPDATED = - new EventStreamDeliveryEventTypeEnum(Value.ORGANIZATION_UPDATED, "organization.updated"); - - public static final EventStreamDeliveryEventTypeEnum GROUP_MEMBER_ADDED = - new EventStreamDeliveryEventTypeEnum(Value.GROUP_MEMBER_ADDED, "group.member.added"); - - public static final EventStreamDeliveryEventTypeEnum GROUP_CREATED = - new EventStreamDeliveryEventTypeEnum(Value.GROUP_CREATED, "group.created"); - - public static final EventStreamDeliveryEventTypeEnum GROUP_UPDATED = - new EventStreamDeliveryEventTypeEnum(Value.GROUP_UPDATED, "group.updated"); - - public static final EventStreamDeliveryEventTypeEnum USER_CREATED = - new EventStreamDeliveryEventTypeEnum(Value.USER_CREATED, "user.created"); - - public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_CONNECTION_REMOVED = - new EventStreamDeliveryEventTypeEnum( - Value.ORGANIZATION_CONNECTION_REMOVED, "organization.connection.removed"); - - public static final EventStreamDeliveryEventTypeEnum GROUP_MEMBER_DELETED = - new EventStreamDeliveryEventTypeEnum(Value.GROUP_MEMBER_DELETED, "group.member.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_DELETED = - new EventStreamDeliveryEventTypeEnum(Value.ORGANIZATION_DELETED, "organization.deleted"); - - public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_MEMBER_ADDED = - new EventStreamDeliveryEventTypeEnum(Value.ORGANIZATION_MEMBER_ADDED, "organization.member.added"); - - public static final EventStreamDeliveryEventTypeEnum ORGANIZATION_MEMBER_ROLE_DELETED = - new EventStreamDeliveryEventTypeEnum( - Value.ORGANIZATION_MEMBER_ROLE_DELETED, "organization.member.role.deleted"); - - private final Value value; - - private final String string; - - EventStreamDeliveryEventTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EventStreamDeliveryEventTypeEnum - && this.string.equals(((EventStreamDeliveryEventTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GROUP_DELETED: - return visitor.visitGroupDeleted(); - case ORGANIZATION_CONNECTION_ADDED: - return visitor.visitOrganizationConnectionAdded(); - case USER_DELETED: - return visitor.visitUserDeleted(); - case ORGANIZATION_CONNECTION_UPDATED: - return visitor.visitOrganizationConnectionUpdated(); - case USER_UPDATED: - return visitor.visitUserUpdated(); - case ORGANIZATION_CREATED: - return visitor.visitOrganizationCreated(); - case ORGANIZATION_MEMBER_DELETED: - return visitor.visitOrganizationMemberDeleted(); - case ORGANIZATION_UPDATED: - return visitor.visitOrganizationUpdated(); - case GROUP_MEMBER_ADDED: - return visitor.visitGroupMemberAdded(); - case GROUP_CREATED: - return visitor.visitGroupCreated(); - case GROUP_UPDATED: - return visitor.visitGroupUpdated(); - case USER_CREATED: - return visitor.visitUserCreated(); - case ORGANIZATION_CONNECTION_REMOVED: - return visitor.visitOrganizationConnectionRemoved(); - case GROUP_MEMBER_DELETED: - return visitor.visitGroupMemberDeleted(); - case ORGANIZATION_MEMBER_ROLE_ASSIGNED: - return visitor.visitOrganizationMemberRoleAssigned(); - case ORGANIZATION_DELETED: - return visitor.visitOrganizationDeleted(); - case ORGANIZATION_MEMBER_ADDED: - return visitor.visitOrganizationMemberAdded(); - case ORGANIZATION_MEMBER_ROLE_DELETED: - return visitor.visitOrganizationMemberRoleDeleted(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EventStreamDeliveryEventTypeEnum valueOf(String value) { - switch (value) { - case "group.deleted": - return GROUP_DELETED; - case "organization.connection.added": - return ORGANIZATION_CONNECTION_ADDED; - case "user.deleted": - return USER_DELETED; - case "organization.connection.updated": - return ORGANIZATION_CONNECTION_UPDATED; - case "user.updated": - return USER_UPDATED; - case "organization.created": - return ORGANIZATION_CREATED; - case "organization.member.deleted": - return ORGANIZATION_MEMBER_DELETED; - case "organization.updated": - return ORGANIZATION_UPDATED; - case "group.member.added": - return GROUP_MEMBER_ADDED; - case "group.created": - return GROUP_CREATED; - case "group.updated": - return GROUP_UPDATED; - case "user.created": - return USER_CREATED; - case "organization.connection.removed": - return ORGANIZATION_CONNECTION_REMOVED; - case "group.member.deleted": - return GROUP_MEMBER_DELETED; - case "organization.member.role.assigned": - return ORGANIZATION_MEMBER_ROLE_ASSIGNED; - case "organization.deleted": - return ORGANIZATION_DELETED; - case "organization.member.added": - return ORGANIZATION_MEMBER_ADDED; - case "organization.member.role.deleted": - return ORGANIZATION_MEMBER_ROLE_DELETED; - default: - return new EventStreamDeliveryEventTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - USER_CREATED, - - USER_DELETED, - - USER_UPDATED, - - ORGANIZATION_CREATED, - - ORGANIZATION_UPDATED, - - ORGANIZATION_DELETED, - - ORGANIZATION_MEMBER_ADDED, - - ORGANIZATION_MEMBER_DELETED, - - ORGANIZATION_MEMBER_ROLE_ASSIGNED, - - ORGANIZATION_MEMBER_ROLE_DELETED, - - ORGANIZATION_CONNECTION_ADDED, - - ORGANIZATION_CONNECTION_UPDATED, - - ORGANIZATION_CONNECTION_REMOVED, - - GROUP_CREATED, - - GROUP_UPDATED, - - GROUP_DELETED, - - GROUP_MEMBER_ADDED, - - GROUP_MEMBER_DELETED, - - UNKNOWN - } - - public interface Visitor { - T visitUserCreated(); - - T visitUserDeleted(); - - T visitUserUpdated(); - - T visitOrganizationCreated(); - - T visitOrganizationUpdated(); - - T visitOrganizationDeleted(); - - T visitOrganizationMemberAdded(); - - T visitOrganizationMemberDeleted(); - - T visitOrganizationMemberRoleAssigned(); - - T visitOrganizationMemberRoleDeleted(); - - T visitOrganizationConnectionAdded(); - - T visitOrganizationConnectionUpdated(); - - T visitOrganizationConnectionRemoved(); - - T visitGroupCreated(); - - T visitGroupUpdated(); - - T visitGroupDeleted(); - - T visitGroupMemberAdded(); - - T visitGroupMemberDeleted(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryStatusEnum.java deleted file mode 100644 index 8aa7478f4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamDeliveryStatusEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EventStreamDeliveryStatusEnum { - public static final EventStreamDeliveryStatusEnum FAILED = - new EventStreamDeliveryStatusEnum(Value.FAILED, "failed"); - - private final Value value; - - private final String string; - - EventStreamDeliveryStatusEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EventStreamDeliveryStatusEnum - && this.string.equals(((EventStreamDeliveryStatusEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FAILED: - return visitor.visitFailed(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EventStreamDeliveryStatusEnum valueOf(String value) { - switch (value) { - case "failed": - return FAILED; - default: - return new EventStreamDeliveryStatusEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - FAILED, - - UNKNOWN - } - - public interface Visitor { - T visitFailed(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamDestinationPatch.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamDestinationPatch.java deleted file mode 100644 index f764532ca..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamDestinationPatch.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = EventStreamDestinationPatch.Deserializer.class) -public final class EventStreamDestinationPatch { - private final Object value; - - private final int type; - - private EventStreamDestinationPatch(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((EventStreamWebhookDestination) this.value); - } else if (this.type == 1) { - return visitor.visit((EventStreamActionDestination) 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 EventStreamDestinationPatch && equalTo((EventStreamDestinationPatch) other); - } - - private boolean equalTo(EventStreamDestinationPatch 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 EventStreamDestinationPatch of(EventStreamWebhookDestination value) { - return new EventStreamDestinationPatch(value, 0); - } - - public static EventStreamDestinationPatch of(EventStreamActionDestination value) { - return new EventStreamDestinationPatch(value, 1); - } - - public interface Visitor { - T visit(EventStreamWebhookDestination value); - - T visit(EventStreamActionDestination value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(EventStreamDestinationPatch.class); - } - - @java.lang.Override - public EventStreamDestinationPatch deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamWebhookDestination.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamActionDestination.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeAwsRegionEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeAwsRegionEnum.java deleted file mode 100644 index f074028bf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeAwsRegionEnum.java +++ /dev/null @@ -1,460 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EventStreamEventBridgeAwsRegionEnum { - public static final EventStreamEventBridgeAwsRegionEnum EU_SOUTH1 = - new EventStreamEventBridgeAwsRegionEnum(Value.EU_SOUTH1, "eu-south-1"); - - public static final EventStreamEventBridgeAwsRegionEnum AP_NORTHEAST2 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_NORTHEAST2, "ap-northeast-2"); - - public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST1 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST1, "ap-southeast-1"); - - public static final EventStreamEventBridgeAwsRegionEnum EU_SOUTH2 = - new EventStreamEventBridgeAwsRegionEnum(Value.EU_SOUTH2, "eu-south-2"); - - public static final EventStreamEventBridgeAwsRegionEnum AP_NORTHEAST3 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_NORTHEAST3, "ap-northeast-3"); - - public static final EventStreamEventBridgeAwsRegionEnum AP_NORTHEAST1 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_NORTHEAST1, "ap-northeast-1"); - - public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTH1 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTH1, "ap-south-1"); - - public static final EventStreamEventBridgeAwsRegionEnum CA_CENTRAL1 = - new EventStreamEventBridgeAwsRegionEnum(Value.CA_CENTRAL1, "ca-central-1"); - - public static final EventStreamEventBridgeAwsRegionEnum EU_NORTH1 = - new EventStreamEventBridgeAwsRegionEnum(Value.EU_NORTH1, "eu-north-1"); - - public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTH2 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTH2, "ap-south-2"); - - public static final EventStreamEventBridgeAwsRegionEnum US_GOV_WEST1 = - new EventStreamEventBridgeAwsRegionEnum(Value.US_GOV_WEST1, "us-gov-west-1"); - - public static final EventStreamEventBridgeAwsRegionEnum CA_WEST1 = - new EventStreamEventBridgeAwsRegionEnum(Value.CA_WEST1, "ca-west-1"); - - public static final EventStreamEventBridgeAwsRegionEnum ME_SOUTH1 = - new EventStreamEventBridgeAwsRegionEnum(Value.ME_SOUTH1, "me-south-1"); - - public static final EventStreamEventBridgeAwsRegionEnum MX_CENTRAL1 = - new EventStreamEventBridgeAwsRegionEnum(Value.MX_CENTRAL1, "mx-central-1"); - - public static final EventStreamEventBridgeAwsRegionEnum US_EAST1 = - new EventStreamEventBridgeAwsRegionEnum(Value.US_EAST1, "us-east-1"); - - public static final EventStreamEventBridgeAwsRegionEnum SA_EAST1 = - new EventStreamEventBridgeAwsRegionEnum(Value.SA_EAST1, "sa-east-1"); - - public static final EventStreamEventBridgeAwsRegionEnum AP_EAST2 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_EAST2, "ap-east-2"); - - public static final EventStreamEventBridgeAwsRegionEnum US_GOV_EAST1 = - new EventStreamEventBridgeAwsRegionEnum(Value.US_GOV_EAST1, "us-gov-east-1"); - - public static final EventStreamEventBridgeAwsRegionEnum US_EAST2 = - new EventStreamEventBridgeAwsRegionEnum(Value.US_EAST2, "us-east-2"); - - public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST5 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST5, "ap-southeast-5"); - - public static final EventStreamEventBridgeAwsRegionEnum AP_EAST1 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_EAST1, "ap-east-1"); - - public static final EventStreamEventBridgeAwsRegionEnum ME_CENTRAL1 = - new EventStreamEventBridgeAwsRegionEnum(Value.ME_CENTRAL1, "me-central-1"); - - public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST7 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST7, "ap-southeast-7"); - - public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST6 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST6, "ap-southeast-6"); - - public static final EventStreamEventBridgeAwsRegionEnum US_WEST2 = - new EventStreamEventBridgeAwsRegionEnum(Value.US_WEST2, "us-west-2"); - - public static final EventStreamEventBridgeAwsRegionEnum EU_WEST3 = - new EventStreamEventBridgeAwsRegionEnum(Value.EU_WEST3, "eu-west-3"); - - public static final EventStreamEventBridgeAwsRegionEnum AF_SOUTH1 = - new EventStreamEventBridgeAwsRegionEnum(Value.AF_SOUTH1, "af-south-1"); - - public static final EventStreamEventBridgeAwsRegionEnum EU_WEST2 = - new EventStreamEventBridgeAwsRegionEnum(Value.EU_WEST2, "eu-west-2"); - - public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST2 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST2, "ap-southeast-2"); - - public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST4 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST4, "ap-southeast-4"); - - public static final EventStreamEventBridgeAwsRegionEnum EU_CENTRAL1 = - new EventStreamEventBridgeAwsRegionEnum(Value.EU_CENTRAL1, "eu-central-1"); - - public static final EventStreamEventBridgeAwsRegionEnum IL_CENTRAL1 = - new EventStreamEventBridgeAwsRegionEnum(Value.IL_CENTRAL1, "il-central-1"); - - public static final EventStreamEventBridgeAwsRegionEnum US_WEST1 = - new EventStreamEventBridgeAwsRegionEnum(Value.US_WEST1, "us-west-1"); - - public static final EventStreamEventBridgeAwsRegionEnum AP_SOUTHEAST3 = - new EventStreamEventBridgeAwsRegionEnum(Value.AP_SOUTHEAST3, "ap-southeast-3"); - - public static final EventStreamEventBridgeAwsRegionEnum EU_CENTRAL2 = - new EventStreamEventBridgeAwsRegionEnum(Value.EU_CENTRAL2, "eu-central-2"); - - public static final EventStreamEventBridgeAwsRegionEnum EU_WEST1 = - new EventStreamEventBridgeAwsRegionEnum(Value.EU_WEST1, "eu-west-1"); - - private final Value value; - - private final String string; - - EventStreamEventBridgeAwsRegionEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EventStreamEventBridgeAwsRegionEnum - && this.string.equals(((EventStreamEventBridgeAwsRegionEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EU_SOUTH1: - return visitor.visitEuSouth1(); - case AP_NORTHEAST2: - return visitor.visitApNortheast2(); - case AP_SOUTHEAST1: - return visitor.visitApSoutheast1(); - case EU_SOUTH2: - return visitor.visitEuSouth2(); - case AP_NORTHEAST3: - return visitor.visitApNortheast3(); - case AP_NORTHEAST1: - return visitor.visitApNortheast1(); - case AP_SOUTH1: - return visitor.visitApSouth1(); - case CA_CENTRAL1: - return visitor.visitCaCentral1(); - case EU_NORTH1: - return visitor.visitEuNorth1(); - case AP_SOUTH2: - return visitor.visitApSouth2(); - case US_GOV_WEST1: - return visitor.visitUsGovWest1(); - case CA_WEST1: - return visitor.visitCaWest1(); - case ME_SOUTH1: - return visitor.visitMeSouth1(); - case MX_CENTRAL1: - return visitor.visitMxCentral1(); - case US_EAST1: - return visitor.visitUsEast1(); - case SA_EAST1: - return visitor.visitSaEast1(); - case AP_EAST2: - return visitor.visitApEast2(); - case US_GOV_EAST1: - return visitor.visitUsGovEast1(); - case US_EAST2: - return visitor.visitUsEast2(); - case AP_SOUTHEAST5: - return visitor.visitApSoutheast5(); - case AP_EAST1: - return visitor.visitApEast1(); - case ME_CENTRAL1: - return visitor.visitMeCentral1(); - case AP_SOUTHEAST7: - return visitor.visitApSoutheast7(); - case AP_SOUTHEAST6: - return visitor.visitApSoutheast6(); - case US_WEST2: - return visitor.visitUsWest2(); - case EU_WEST3: - return visitor.visitEuWest3(); - case AF_SOUTH1: - return visitor.visitAfSouth1(); - case EU_WEST2: - return visitor.visitEuWest2(); - case AP_SOUTHEAST2: - return visitor.visitApSoutheast2(); - case AP_SOUTHEAST4: - return visitor.visitApSoutheast4(); - case EU_CENTRAL1: - return visitor.visitEuCentral1(); - case IL_CENTRAL1: - return visitor.visitIlCentral1(); - case US_WEST1: - return visitor.visitUsWest1(); - case AP_SOUTHEAST3: - return visitor.visitApSoutheast3(); - case EU_CENTRAL2: - return visitor.visitEuCentral2(); - case EU_WEST1: - return visitor.visitEuWest1(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EventStreamEventBridgeAwsRegionEnum valueOf(String value) { - switch (value) { - case "eu-south-1": - return EU_SOUTH1; - case "ap-northeast-2": - return AP_NORTHEAST2; - case "ap-southeast-1": - return AP_SOUTHEAST1; - case "eu-south-2": - return EU_SOUTH2; - case "ap-northeast-3": - return AP_NORTHEAST3; - case "ap-northeast-1": - return AP_NORTHEAST1; - case "ap-south-1": - return AP_SOUTH1; - case "ca-central-1": - return CA_CENTRAL1; - case "eu-north-1": - return EU_NORTH1; - case "ap-south-2": - return AP_SOUTH2; - case "us-gov-west-1": - return US_GOV_WEST1; - case "ca-west-1": - return CA_WEST1; - case "me-south-1": - return ME_SOUTH1; - case "mx-central-1": - return MX_CENTRAL1; - case "us-east-1": - return US_EAST1; - case "sa-east-1": - return SA_EAST1; - case "ap-east-2": - return AP_EAST2; - case "us-gov-east-1": - return US_GOV_EAST1; - case "us-east-2": - return US_EAST2; - case "ap-southeast-5": - return AP_SOUTHEAST5; - case "ap-east-1": - return AP_EAST1; - case "me-central-1": - return ME_CENTRAL1; - case "ap-southeast-7": - return AP_SOUTHEAST7; - case "ap-southeast-6": - return AP_SOUTHEAST6; - case "us-west-2": - return US_WEST2; - case "eu-west-3": - return EU_WEST3; - case "af-south-1": - return AF_SOUTH1; - case "eu-west-2": - return EU_WEST2; - case "ap-southeast-2": - return AP_SOUTHEAST2; - case "ap-southeast-4": - return AP_SOUTHEAST4; - case "eu-central-1": - return EU_CENTRAL1; - case "il-central-1": - return IL_CENTRAL1; - case "us-west-1": - return US_WEST1; - case "ap-southeast-3": - return AP_SOUTHEAST3; - case "eu-central-2": - return EU_CENTRAL2; - case "eu-west-1": - return EU_WEST1; - default: - return new EventStreamEventBridgeAwsRegionEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AF_SOUTH1, - - AP_EAST1, - - AP_EAST2, - - AP_NORTHEAST1, - - AP_NORTHEAST2, - - AP_NORTHEAST3, - - AP_SOUTH1, - - AP_SOUTH2, - - AP_SOUTHEAST1, - - AP_SOUTHEAST2, - - AP_SOUTHEAST3, - - AP_SOUTHEAST4, - - AP_SOUTHEAST5, - - AP_SOUTHEAST6, - - AP_SOUTHEAST7, - - CA_CENTRAL1, - - CA_WEST1, - - EU_CENTRAL1, - - EU_CENTRAL2, - - EU_NORTH1, - - EU_SOUTH1, - - EU_SOUTH2, - - EU_WEST1, - - EU_WEST2, - - EU_WEST3, - - IL_CENTRAL1, - - ME_CENTRAL1, - - ME_SOUTH1, - - MX_CENTRAL1, - - SA_EAST1, - - US_GOV_EAST1, - - US_GOV_WEST1, - - US_EAST1, - - US_EAST2, - - US_WEST1, - - US_WEST2, - - UNKNOWN - } - - public interface Visitor { - T visitAfSouth1(); - - T visitApEast1(); - - T visitApEast2(); - - T visitApNortheast1(); - - T visitApNortheast2(); - - T visitApNortheast3(); - - T visitApSouth1(); - - T visitApSouth2(); - - T visitApSoutheast1(); - - T visitApSoutheast2(); - - T visitApSoutheast3(); - - T visitApSoutheast4(); - - T visitApSoutheast5(); - - T visitApSoutheast6(); - - T visitApSoutheast7(); - - T visitCaCentral1(); - - T visitCaWest1(); - - T visitEuCentral1(); - - T visitEuCentral2(); - - T visitEuNorth1(); - - T visitEuSouth1(); - - T visitEuSouth2(); - - T visitEuWest1(); - - T visitEuWest2(); - - T visitEuWest3(); - - T visitIlCentral1(); - - T visitMeCentral1(); - - T visitMeSouth1(); - - T visitMxCentral1(); - - T visitSaEast1(); - - T visitUsGovEast1(); - - T visitUsGovWest1(); - - T visitUsEast1(); - - T visitUsEast2(); - - T visitUsWest1(); - - T visitUsWest2(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeConfiguration.java deleted file mode 100644 index 5605c44ae..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeConfiguration.java +++ /dev/null @@ -1,186 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = EventStreamEventBridgeConfiguration.Builder.class) -public final class EventStreamEventBridgeConfiguration { - private final String awsAccountId; - - private final EventStreamEventBridgeAwsRegionEnum awsRegion; - - private final Optional awsPartnerEventSource; - - private final Map additionalProperties; - - private EventStreamEventBridgeConfiguration( - String awsAccountId, - EventStreamEventBridgeAwsRegionEnum awsRegion, - Optional awsPartnerEventSource, - Map additionalProperties) { - this.awsAccountId = awsAccountId; - this.awsRegion = awsRegion; - this.awsPartnerEventSource = awsPartnerEventSource; - this.additionalProperties = additionalProperties; - } - - /** - * @return AWS Account ID for EventBridge destination. - */ - @JsonProperty("aws_account_id") - public String getAwsAccountId() { - return awsAccountId; - } - - @JsonProperty("aws_region") - public EventStreamEventBridgeAwsRegionEnum getAwsRegion() { - return awsRegion; - } - - /** - * @return AWS Partner Event Source for EventBridge destination. - */ - @JsonProperty("aws_partner_event_source") - public Optional getAwsPartnerEventSource() { - return awsPartnerEventSource; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EventStreamEventBridgeConfiguration - && equalTo((EventStreamEventBridgeConfiguration) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EventStreamEventBridgeConfiguration other) { - return awsAccountId.equals(other.awsAccountId) - && awsRegion.equals(other.awsRegion) - && awsPartnerEventSource.equals(other.awsPartnerEventSource); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.awsAccountId, this.awsRegion, this.awsPartnerEventSource); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static AwsAccountIdStage builder() { - return new Builder(); - } - - public interface AwsAccountIdStage { - /** - *

AWS Account ID for EventBridge destination.

- */ - AwsRegionStage awsAccountId(@NotNull String awsAccountId); - - Builder from(EventStreamEventBridgeConfiguration other); - } - - public interface AwsRegionStage { - _FinalStage awsRegion(@NotNull EventStreamEventBridgeAwsRegionEnum awsRegion); - } - - public interface _FinalStage { - EventStreamEventBridgeConfiguration build(); - - /** - *

AWS Partner Event Source for EventBridge destination.

- */ - _FinalStage awsPartnerEventSource(Optional awsPartnerEventSource); - - _FinalStage awsPartnerEventSource(String awsPartnerEventSource); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements AwsAccountIdStage, AwsRegionStage, _FinalStage { - private String awsAccountId; - - private EventStreamEventBridgeAwsRegionEnum awsRegion; - - private Optional awsPartnerEventSource = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(EventStreamEventBridgeConfiguration other) { - awsAccountId(other.getAwsAccountId()); - awsRegion(other.getAwsRegion()); - awsPartnerEventSource(other.getAwsPartnerEventSource()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("aws_account_id") - public AwsRegionStage awsAccountId(@NotNull String awsAccountId) { - this.awsAccountId = Objects.requireNonNull(awsAccountId, "awsAccountId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("aws_region") - public _FinalStage awsRegion(@NotNull EventStreamEventBridgeAwsRegionEnum awsRegion) { - this.awsRegion = Objects.requireNonNull(awsRegion, "awsRegion must not be null"); - return this; - } - - /** - *

AWS Partner Event Source for EventBridge destination.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage awsPartnerEventSource(String awsPartnerEventSource) { - this.awsPartnerEventSource = Optional.ofNullable(awsPartnerEventSource); - return this; - } - - /** - *

AWS Partner Event Source for EventBridge destination.

- */ - @java.lang.Override - @JsonSetter(value = "aws_partner_event_source", nulls = Nulls.SKIP) - public _FinalStage awsPartnerEventSource(Optional awsPartnerEventSource) { - this.awsPartnerEventSource = awsPartnerEventSource; - return this; - } - - @java.lang.Override - public EventStreamEventBridgeConfiguration build() { - return new EventStreamEventBridgeConfiguration( - awsAccountId, awsRegion, awsPartnerEventSource, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeDestination.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeDestination.java deleted file mode 100644 index 987b30a91..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeDestination.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = EventStreamEventBridgeDestination.Builder.class) -public final class EventStreamEventBridgeDestination { - private final EventStreamEventBridgeDestinationTypeEnum type; - - private final EventStreamEventBridgeConfiguration configuration; - - private final Map additionalProperties; - - private EventStreamEventBridgeDestination( - EventStreamEventBridgeDestinationTypeEnum type, - EventStreamEventBridgeConfiguration configuration, - Map additionalProperties) { - this.type = type; - this.configuration = configuration; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public EventStreamEventBridgeDestinationTypeEnum getType() { - return type; - } - - @JsonProperty("configuration") - public EventStreamEventBridgeConfiguration getConfiguration() { - return configuration; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EventStreamEventBridgeDestination && equalTo((EventStreamEventBridgeDestination) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EventStreamEventBridgeDestination other) { - return type.equals(other.type) && configuration.equals(other.configuration); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.configuration); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - ConfigurationStage type(@NotNull EventStreamEventBridgeDestinationTypeEnum type); - - Builder from(EventStreamEventBridgeDestination other); - } - - public interface ConfigurationStage { - _FinalStage configuration(@NotNull EventStreamEventBridgeConfiguration configuration); - } - - public interface _FinalStage { - EventStreamEventBridgeDestination build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, ConfigurationStage, _FinalStage { - private EventStreamEventBridgeDestinationTypeEnum type; - - private EventStreamEventBridgeConfiguration configuration; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(EventStreamEventBridgeDestination other) { - type(other.getType()); - configuration(other.getConfiguration()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ConfigurationStage type(@NotNull EventStreamEventBridgeDestinationTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("configuration") - public _FinalStage configuration(@NotNull EventStreamEventBridgeConfiguration configuration) { - this.configuration = Objects.requireNonNull(configuration, "configuration must not be null"); - return this; - } - - @java.lang.Override - public EventStreamEventBridgeDestination build() { - return new EventStreamEventBridgeDestination(type, configuration, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeDestinationTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeDestinationTypeEnum.java deleted file mode 100644 index 9ec8503b4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeDestinationTypeEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EventStreamEventBridgeDestinationTypeEnum { - public static final EventStreamEventBridgeDestinationTypeEnum EVENTBRIDGE = - new EventStreamEventBridgeDestinationTypeEnum(Value.EVENTBRIDGE, "eventbridge"); - - private final Value value; - - private final String string; - - EventStreamEventBridgeDestinationTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EventStreamEventBridgeDestinationTypeEnum - && this.string.equals(((EventStreamEventBridgeDestinationTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EVENTBRIDGE: - return visitor.visitEventbridge(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EventStreamEventBridgeDestinationTypeEnum valueOf(String value) { - switch (value) { - case "eventbridge": - return EVENTBRIDGE; - default: - return new EventStreamEventBridgeDestinationTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - EVENTBRIDGE, - - UNKNOWN - } - - public interface Visitor { - T visitEventbridge(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeResponseContent.java deleted file mode 100644 index 9735a2d13..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventBridgeResponseContent.java +++ /dev/null @@ -1,276 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = EventStreamEventBridgeResponseContent.Builder.class) -public final class EventStreamEventBridgeResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional> subscriptions; - - private final Optional destination; - - private final Optional status; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private EventStreamEventBridgeResponseContent( - Optional id, - Optional name, - Optional> subscriptions, - Optional destination, - Optional status, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.subscriptions = subscriptions; - this.destination = destination; - this.status = status; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return Unique identifier for the event stream. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Name of the event stream. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return List of event types subscribed to in this stream. - */ - @JsonProperty("subscriptions") - public Optional> getSubscriptions() { - return subscriptions; - } - - @JsonProperty("destination") - public Optional getDestination() { - return destination; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return Timestamp when the event stream was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return Timestamp when the event stream was last updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EventStreamEventBridgeResponseContent - && equalTo((EventStreamEventBridgeResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EventStreamEventBridgeResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && subscriptions.equals(other.subscriptions) - && destination.equals(other.destination) - && status.equals(other.status) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.name, this.subscriptions, this.destination, this.status, this.createdAt, this.updatedAt); - } - - @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> subscriptions = Optional.empty(); - - private Optional destination = Optional.empty(); - - private Optional status = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(EventStreamEventBridgeResponseContent other) { - id(other.getId()); - name(other.getName()); - subscriptions(other.getSubscriptions()); - destination(other.getDestination()); - status(other.getStatus()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

Unique identifier for the event stream.

- */ - @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; - } - - /** - *

Name of the event stream.

- */ - @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; - } - - /** - *

List of event types subscribed to in this stream.

- */ - @JsonSetter(value = "subscriptions", nulls = Nulls.SKIP) - public Builder subscriptions(Optional> subscriptions) { - this.subscriptions = subscriptions; - return this; - } - - public Builder subscriptions(List subscriptions) { - this.subscriptions = Optional.ofNullable(subscriptions); - return this; - } - - @JsonSetter(value = "destination", nulls = Nulls.SKIP) - public Builder destination(Optional destination) { - this.destination = destination; - return this; - } - - public Builder destination(EventStreamEventBridgeDestination destination) { - this.destination = Optional.ofNullable(destination); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(EventStreamStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - /** - *

Timestamp when the event stream 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; - } - - /** - *

Timestamp when the event stream 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; - } - - public EventStreamEventBridgeResponseContent build() { - return new EventStreamEventBridgeResponseContent( - id, name, subscriptions, destination, status, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamEventTypeEnum.java deleted file mode 100644 index ec22b82f0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamEventTypeEnum.java +++ /dev/null @@ -1,262 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EventStreamEventTypeEnum { - public static final EventStreamEventTypeEnum GROUP_DELETED = - new EventStreamEventTypeEnum(Value.GROUP_DELETED, "group.deleted"); - - 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 ORGANIZATION_CONNECTION_UPDATED = - new EventStreamEventTypeEnum(Value.ORGANIZATION_CONNECTION_UPDATED, "organization.connection.updated"); - - public static final EventStreamEventTypeEnum USER_UPDATED = - new EventStreamEventTypeEnum(Value.USER_UPDATED, "user.updated"); - - 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"); - - public static final EventStreamEventTypeEnum ORGANIZATION_UPDATED = - new EventStreamEventTypeEnum(Value.ORGANIZATION_UPDATED, "organization.updated"); - - public static final EventStreamEventTypeEnum GROUP_MEMBER_ADDED = - new EventStreamEventTypeEnum(Value.GROUP_MEMBER_ADDED, "group.member.added"); - - public static final EventStreamEventTypeEnum GROUP_CREATED = - new EventStreamEventTypeEnum(Value.GROUP_CREATED, "group.created"); - - public static final EventStreamEventTypeEnum GROUP_UPDATED = - new EventStreamEventTypeEnum(Value.GROUP_UPDATED, "group.updated"); - - public static final EventStreamEventTypeEnum USER_CREATED = - new EventStreamEventTypeEnum(Value.USER_CREATED, "user.created"); - - public static final EventStreamEventTypeEnum ORGANIZATION_CONNECTION_REMOVED = - new EventStreamEventTypeEnum(Value.ORGANIZATION_CONNECTION_REMOVED, "organization.connection.removed"); - - public static final EventStreamEventTypeEnum GROUP_MEMBER_DELETED = - new EventStreamEventTypeEnum(Value.GROUP_MEMBER_DELETED, "group.member.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_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_MEMBER_ROLE_DELETED = - new EventStreamEventTypeEnum(Value.ORGANIZATION_MEMBER_ROLE_DELETED, "organization.member.role.deleted"); - - private final Value value; - - private final String string; - - EventStreamEventTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EventStreamEventTypeEnum - && this.string.equals(((EventStreamEventTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GROUP_DELETED: - return visitor.visitGroupDeleted(); - case ORGANIZATION_CONNECTION_ADDED: - return visitor.visitOrganizationConnectionAdded(); - case USER_DELETED: - return visitor.visitUserDeleted(); - case ORGANIZATION_CONNECTION_UPDATED: - return visitor.visitOrganizationConnectionUpdated(); - case USER_UPDATED: - return visitor.visitUserUpdated(); - case ORGANIZATION_CREATED: - return visitor.visitOrganizationCreated(); - case ORGANIZATION_MEMBER_DELETED: - return visitor.visitOrganizationMemberDeleted(); - case ORGANIZATION_UPDATED: - return visitor.visitOrganizationUpdated(); - case GROUP_MEMBER_ADDED: - return visitor.visitGroupMemberAdded(); - case GROUP_CREATED: - return visitor.visitGroupCreated(); - case GROUP_UPDATED: - return visitor.visitGroupUpdated(); - case USER_CREATED: - return visitor.visitUserCreated(); - case ORGANIZATION_CONNECTION_REMOVED: - return visitor.visitOrganizationConnectionRemoved(); - case GROUP_MEMBER_DELETED: - return visitor.visitGroupMemberDeleted(); - case ORGANIZATION_MEMBER_ROLE_ASSIGNED: - return visitor.visitOrganizationMemberRoleAssigned(); - case ORGANIZATION_DELETED: - return visitor.visitOrganizationDeleted(); - case ORGANIZATION_MEMBER_ADDED: - return visitor.visitOrganizationMemberAdded(); - case ORGANIZATION_MEMBER_ROLE_DELETED: - return visitor.visitOrganizationMemberRoleDeleted(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EventStreamEventTypeEnum valueOf(String value) { - switch (value) { - case "group.deleted": - return GROUP_DELETED; - case "organization.connection.added": - return ORGANIZATION_CONNECTION_ADDED; - case "user.deleted": - return USER_DELETED; - case "organization.connection.updated": - return ORGANIZATION_CONNECTION_UPDATED; - case "user.updated": - return USER_UPDATED; - case "organization.created": - return ORGANIZATION_CREATED; - case "organization.member.deleted": - return ORGANIZATION_MEMBER_DELETED; - case "organization.updated": - return ORGANIZATION_UPDATED; - case "group.member.added": - return GROUP_MEMBER_ADDED; - case "group.created": - return GROUP_CREATED; - case "group.updated": - return GROUP_UPDATED; - case "user.created": - return USER_CREATED; - case "organization.connection.removed": - return ORGANIZATION_CONNECTION_REMOVED; - case "group.member.deleted": - return GROUP_MEMBER_DELETED; - case "organization.member.role.assigned": - return ORGANIZATION_MEMBER_ROLE_ASSIGNED; - case "organization.deleted": - return ORGANIZATION_DELETED; - case "organization.member.added": - return ORGANIZATION_MEMBER_ADDED; - case "organization.member.role.deleted": - return ORGANIZATION_MEMBER_ROLE_DELETED; - default: - return new EventStreamEventTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - USER_CREATED, - - USER_DELETED, - - USER_UPDATED, - - ORGANIZATION_CREATED, - - ORGANIZATION_UPDATED, - - ORGANIZATION_DELETED, - - ORGANIZATION_MEMBER_ADDED, - - ORGANIZATION_MEMBER_DELETED, - - ORGANIZATION_MEMBER_ROLE_ASSIGNED, - - ORGANIZATION_MEMBER_ROLE_DELETED, - - ORGANIZATION_CONNECTION_ADDED, - - ORGANIZATION_CONNECTION_UPDATED, - - ORGANIZATION_CONNECTION_REMOVED, - - GROUP_CREATED, - - GROUP_UPDATED, - - GROUP_DELETED, - - GROUP_MEMBER_ADDED, - - GROUP_MEMBER_DELETED, - - UNKNOWN - } - - public interface Visitor { - T visitUserCreated(); - - T visitUserDeleted(); - - T visitUserUpdated(); - - T visitOrganizationCreated(); - - T visitOrganizationUpdated(); - - T visitOrganizationDeleted(); - - T visitOrganizationMemberAdded(); - - T visitOrganizationMemberDeleted(); - - T visitOrganizationMemberRoleAssigned(); - - T visitOrganizationMemberRoleDeleted(); - - T visitOrganizationConnectionAdded(); - - T visitOrganizationConnectionUpdated(); - - T visitOrganizationConnectionRemoved(); - - T visitGroupCreated(); - - T visitGroupUpdated(); - - T visitGroupDeleted(); - - T visitGroupMemberAdded(); - - T visitGroupMemberDeleted(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamResponseContent.java deleted file mode 100644 index 65879e17e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamResponseContent.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = EventStreamResponseContent.Deserializer.class) -public final class EventStreamResponseContent { - private final Object value; - - private final int type; - - private EventStreamResponseContent(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((EventStreamWebhookResponseContent) this.value); - } else if (this.type == 1) { - return visitor.visit((EventStreamEventBridgeResponseContent) this.value); - } else if (this.type == 2) { - return visitor.visit((EventStreamActionResponseContent) 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 EventStreamResponseContent && equalTo((EventStreamResponseContent) other); - } - - private boolean equalTo(EventStreamResponseContent 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 EventStreamResponseContent of(EventStreamWebhookResponseContent value) { - return new EventStreamResponseContent(value, 0); - } - - public static EventStreamResponseContent of(EventStreamEventBridgeResponseContent value) { - return new EventStreamResponseContent(value, 1); - } - - public static EventStreamResponseContent of(EventStreamActionResponseContent value) { - return new EventStreamResponseContent(value, 2); - } - - public interface Visitor { - T visit(EventStreamWebhookResponseContent value); - - T visit(EventStreamEventBridgeResponseContent value); - - T visit(EventStreamActionResponseContent value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(EventStreamResponseContent.class); - } - - @java.lang.Override - public EventStreamResponseContent deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamWebhookResponseContent.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamEventBridgeResponseContent.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamActionResponseContent.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamStatusEnum.java deleted file mode 100644 index e19364e54..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamStatusEnum.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EventStreamStatusEnum { - public static final EventStreamStatusEnum ENABLED = new EventStreamStatusEnum(Value.ENABLED, "enabled"); - - public static final EventStreamStatusEnum DISABLED = new EventStreamStatusEnum(Value.DISABLED, "disabled"); - - private final Value value; - - private final String string; - - EventStreamStatusEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EventStreamStatusEnum - && this.string.equals(((EventStreamStatusEnum) 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 EventStreamStatusEnum valueOf(String value) { - switch (value) { - case "enabled": - return ENABLED; - case "disabled": - return DISABLED; - default: - return new EventStreamStatusEnum(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/EventStreamSubscription.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscription.java deleted file mode 100644 index 9e50268e8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamSubscription.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = EventStreamSubscription.Builder.class) -public final class EventStreamSubscription { - private final Optional eventType; - - private final Map additionalProperties; - - private EventStreamSubscription(Optional eventType, Map additionalProperties) { - this.eventType = eventType; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("event_type") - public Optional getEventType() { - return eventType; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EventStreamSubscription && equalTo((EventStreamSubscription) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EventStreamSubscription other) { - return eventType.equals(other.eventType); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.eventType); - } - - @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 eventType = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(EventStreamSubscription other) { - eventType(other.getEventType()); - return this; - } - - @JsonSetter(value = "event_type", nulls = Nulls.SKIP) - public Builder eventType(Optional eventType) { - this.eventType = eventType; - return this; - } - - public Builder eventType(String eventType) { - this.eventType = Optional.ofNullable(eventType); - return this; - } - - public EventStreamSubscription build() { - return new EventStreamSubscription(eventType, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamTestEventTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamTestEventTypeEnum.java deleted file mode 100644 index d1ac98504..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamTestEventTypeEnum.java +++ /dev/null @@ -1,264 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EventStreamTestEventTypeEnum { - public static final EventStreamTestEventTypeEnum GROUP_DELETED = - new EventStreamTestEventTypeEnum(Value.GROUP_DELETED, "group.deleted"); - - 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 ORGANIZATION_CONNECTION_UPDATED = - new EventStreamTestEventTypeEnum(Value.ORGANIZATION_CONNECTION_UPDATED, "organization.connection.updated"); - - public static final EventStreamTestEventTypeEnum USER_UPDATED = - new EventStreamTestEventTypeEnum(Value.USER_UPDATED, "user.updated"); - - 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"); - - public static final EventStreamTestEventTypeEnum ORGANIZATION_UPDATED = - new EventStreamTestEventTypeEnum(Value.ORGANIZATION_UPDATED, "organization.updated"); - - public static final EventStreamTestEventTypeEnum GROUP_MEMBER_ADDED = - new EventStreamTestEventTypeEnum(Value.GROUP_MEMBER_ADDED, "group.member.added"); - - public static final EventStreamTestEventTypeEnum GROUP_CREATED = - new EventStreamTestEventTypeEnum(Value.GROUP_CREATED, "group.created"); - - public static final EventStreamTestEventTypeEnum GROUP_UPDATED = - new EventStreamTestEventTypeEnum(Value.GROUP_UPDATED, "group.updated"); - - public static final EventStreamTestEventTypeEnum USER_CREATED = - new EventStreamTestEventTypeEnum(Value.USER_CREATED, "user.created"); - - public static final EventStreamTestEventTypeEnum ORGANIZATION_CONNECTION_REMOVED = - new EventStreamTestEventTypeEnum(Value.ORGANIZATION_CONNECTION_REMOVED, "organization.connection.removed"); - - public static final EventStreamTestEventTypeEnum GROUP_MEMBER_DELETED = - new EventStreamTestEventTypeEnum(Value.GROUP_MEMBER_DELETED, "group.member.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_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_MEMBER_ROLE_DELETED = - new EventStreamTestEventTypeEnum( - Value.ORGANIZATION_MEMBER_ROLE_DELETED, "organization.member.role.deleted"); - - private final Value value; - - private final String string; - - EventStreamTestEventTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EventStreamTestEventTypeEnum - && this.string.equals(((EventStreamTestEventTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GROUP_DELETED: - return visitor.visitGroupDeleted(); - case ORGANIZATION_CONNECTION_ADDED: - return visitor.visitOrganizationConnectionAdded(); - case USER_DELETED: - return visitor.visitUserDeleted(); - case ORGANIZATION_CONNECTION_UPDATED: - return visitor.visitOrganizationConnectionUpdated(); - case USER_UPDATED: - return visitor.visitUserUpdated(); - case ORGANIZATION_CREATED: - return visitor.visitOrganizationCreated(); - case ORGANIZATION_MEMBER_DELETED: - return visitor.visitOrganizationMemberDeleted(); - case ORGANIZATION_UPDATED: - return visitor.visitOrganizationUpdated(); - case GROUP_MEMBER_ADDED: - return visitor.visitGroupMemberAdded(); - case GROUP_CREATED: - return visitor.visitGroupCreated(); - case GROUP_UPDATED: - return visitor.visitGroupUpdated(); - case USER_CREATED: - return visitor.visitUserCreated(); - case ORGANIZATION_CONNECTION_REMOVED: - return visitor.visitOrganizationConnectionRemoved(); - case GROUP_MEMBER_DELETED: - return visitor.visitGroupMemberDeleted(); - case ORGANIZATION_MEMBER_ROLE_ASSIGNED: - return visitor.visitOrganizationMemberRoleAssigned(); - case ORGANIZATION_DELETED: - return visitor.visitOrganizationDeleted(); - case ORGANIZATION_MEMBER_ADDED: - return visitor.visitOrganizationMemberAdded(); - case ORGANIZATION_MEMBER_ROLE_DELETED: - return visitor.visitOrganizationMemberRoleDeleted(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EventStreamTestEventTypeEnum valueOf(String value) { - switch (value) { - case "group.deleted": - return GROUP_DELETED; - case "organization.connection.added": - return ORGANIZATION_CONNECTION_ADDED; - case "user.deleted": - return USER_DELETED; - case "organization.connection.updated": - return ORGANIZATION_CONNECTION_UPDATED; - case "user.updated": - return USER_UPDATED; - case "organization.created": - return ORGANIZATION_CREATED; - case "organization.member.deleted": - return ORGANIZATION_MEMBER_DELETED; - case "organization.updated": - return ORGANIZATION_UPDATED; - case "group.member.added": - return GROUP_MEMBER_ADDED; - case "group.created": - return GROUP_CREATED; - case "group.updated": - return GROUP_UPDATED; - case "user.created": - return USER_CREATED; - case "organization.connection.removed": - return ORGANIZATION_CONNECTION_REMOVED; - case "group.member.deleted": - return GROUP_MEMBER_DELETED; - case "organization.member.role.assigned": - return ORGANIZATION_MEMBER_ROLE_ASSIGNED; - case "organization.deleted": - return ORGANIZATION_DELETED; - case "organization.member.added": - return ORGANIZATION_MEMBER_ADDED; - case "organization.member.role.deleted": - return ORGANIZATION_MEMBER_ROLE_DELETED; - default: - return new EventStreamTestEventTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - USER_CREATED, - - USER_DELETED, - - USER_UPDATED, - - ORGANIZATION_CREATED, - - ORGANIZATION_UPDATED, - - ORGANIZATION_DELETED, - - ORGANIZATION_MEMBER_ADDED, - - ORGANIZATION_MEMBER_DELETED, - - ORGANIZATION_MEMBER_ROLE_ASSIGNED, - - ORGANIZATION_MEMBER_ROLE_DELETED, - - ORGANIZATION_CONNECTION_ADDED, - - ORGANIZATION_CONNECTION_UPDATED, - - ORGANIZATION_CONNECTION_REMOVED, - - GROUP_CREATED, - - GROUP_UPDATED, - - GROUP_DELETED, - - GROUP_MEMBER_ADDED, - - GROUP_MEMBER_DELETED, - - UNKNOWN - } - - public interface Visitor { - T visitUserCreated(); - - T visitUserDeleted(); - - T visitUserUpdated(); - - T visitOrganizationCreated(); - - T visitOrganizationUpdated(); - - T visitOrganizationDeleted(); - - T visitOrganizationMemberAdded(); - - T visitOrganizationMemberDeleted(); - - T visitOrganizationMemberRoleAssigned(); - - T visitOrganizationMemberRoleDeleted(); - - T visitOrganizationConnectionAdded(); - - T visitOrganizationConnectionUpdated(); - - T visitOrganizationConnectionRemoved(); - - T visitGroupCreated(); - - T visitGroupUpdated(); - - T visitGroupDeleted(); - - T visitGroupMemberAdded(); - - T visitGroupMemberDeleted(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookAuthorizationResponse.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookAuthorizationResponse.java deleted file mode 100644 index 67ba0e358..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookAuthorizationResponse.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = EventStreamWebhookAuthorizationResponse.Deserializer.class) -public final class EventStreamWebhookAuthorizationResponse { - private final Object value; - - private final int type; - - private EventStreamWebhookAuthorizationResponse(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((EventStreamWebhookBasicAuth) this.value); - } else if (this.type == 1) { - return visitor.visit((EventStreamWebhookBearerAuth) 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 EventStreamWebhookAuthorizationResponse - && equalTo((EventStreamWebhookAuthorizationResponse) other); - } - - private boolean equalTo(EventStreamWebhookAuthorizationResponse 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 EventStreamWebhookAuthorizationResponse of(EventStreamWebhookBasicAuth value) { - return new EventStreamWebhookAuthorizationResponse(value, 0); - } - - public static EventStreamWebhookAuthorizationResponse of(EventStreamWebhookBearerAuth value) { - return new EventStreamWebhookAuthorizationResponse(value, 1); - } - - public interface Visitor { - T visit(EventStreamWebhookBasicAuth value); - - T visit(EventStreamWebhookBearerAuth value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(EventStreamWebhookAuthorizationResponse.class); - } - - @java.lang.Override - public EventStreamWebhookAuthorizationResponse deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamWebhookBasicAuth.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamWebhookBearerAuth.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookBasicAuth.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookBasicAuth.java deleted file mode 100644 index ef2acb6f2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookBasicAuth.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = EventStreamWebhookBasicAuth.Builder.class) -public final class EventStreamWebhookBasicAuth { - private final EventStreamWebhookBasicAuthMethodEnum method; - - private final String username; - - private final Map additionalProperties; - - private EventStreamWebhookBasicAuth( - EventStreamWebhookBasicAuthMethodEnum method, String username, Map additionalProperties) { - this.method = method; - this.username = username; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("method") - public EventStreamWebhookBasicAuthMethodEnum getMethod() { - return method; - } - - /** - * @return Username - */ - @JsonProperty("username") - public String getUsername() { - return username; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EventStreamWebhookBasicAuth && equalTo((EventStreamWebhookBasicAuth) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EventStreamWebhookBasicAuth other) { - return method.equals(other.method) && username.equals(other.username); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.method, this.username); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static MethodStage builder() { - return new Builder(); - } - - public interface MethodStage { - UsernameStage method(@NotNull EventStreamWebhookBasicAuthMethodEnum method); - - Builder from(EventStreamWebhookBasicAuth other); - } - - public interface UsernameStage { - /** - *

Username

- */ - _FinalStage username(@NotNull String username); - } - - public interface _FinalStage { - EventStreamWebhookBasicAuth build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements MethodStage, UsernameStage, _FinalStage { - private EventStreamWebhookBasicAuthMethodEnum method; - - private String username; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(EventStreamWebhookBasicAuth other) { - method(other.getMethod()); - username(other.getUsername()); - return this; - } - - @java.lang.Override - @JsonSetter("method") - public UsernameStage method(@NotNull EventStreamWebhookBasicAuthMethodEnum method) { - this.method = Objects.requireNonNull(method, "method must not be null"); - return this; - } - - /** - *

Username

- *

Username

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("username") - public _FinalStage username(@NotNull String username) { - this.username = Objects.requireNonNull(username, "username must not be null"); - return this; - } - - @java.lang.Override - public EventStreamWebhookBasicAuth build() { - return new EventStreamWebhookBasicAuth(method, username, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookBasicAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookBasicAuthMethodEnum.java deleted file mode 100644 index 74454b351..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookBasicAuthMethodEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EventStreamWebhookBasicAuthMethodEnum { - public static final EventStreamWebhookBasicAuthMethodEnum BASIC = - new EventStreamWebhookBasicAuthMethodEnum(Value.BASIC, "basic"); - - private final Value value; - - private final String string; - - EventStreamWebhookBasicAuthMethodEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EventStreamWebhookBasicAuthMethodEnum - && this.string.equals(((EventStreamWebhookBasicAuthMethodEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case BASIC: - return visitor.visitBasic(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EventStreamWebhookBasicAuthMethodEnum valueOf(String value) { - switch (value) { - case "basic": - return BASIC; - default: - return new EventStreamWebhookBasicAuthMethodEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - BASIC, - - UNKNOWN - } - - public interface Visitor { - T visitBasic(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookBearerAuth.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookBearerAuth.java deleted file mode 100644 index f54032db2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookBearerAuth.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = EventStreamWebhookBearerAuth.Builder.class) -public final class EventStreamWebhookBearerAuth { - private final EventStreamWebhookBearerAuthMethodEnum method; - - private final Map additionalProperties; - - private EventStreamWebhookBearerAuth( - EventStreamWebhookBearerAuthMethodEnum method, Map additionalProperties) { - this.method = method; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("method") - public EventStreamWebhookBearerAuthMethodEnum getMethod() { - return method; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EventStreamWebhookBearerAuth && equalTo((EventStreamWebhookBearerAuth) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EventStreamWebhookBearerAuth other) { - return method.equals(other.method); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.method); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static MethodStage builder() { - return new Builder(); - } - - public interface MethodStage { - _FinalStage method(@NotNull EventStreamWebhookBearerAuthMethodEnum method); - - Builder from(EventStreamWebhookBearerAuth other); - } - - public interface _FinalStage { - EventStreamWebhookBearerAuth build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements MethodStage, _FinalStage { - private EventStreamWebhookBearerAuthMethodEnum method; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(EventStreamWebhookBearerAuth other) { - method(other.getMethod()); - return this; - } - - @java.lang.Override - @JsonSetter("method") - public _FinalStage method(@NotNull EventStreamWebhookBearerAuthMethodEnum method) { - this.method = Objects.requireNonNull(method, "method must not be null"); - return this; - } - - @java.lang.Override - public EventStreamWebhookBearerAuth build() { - return new EventStreamWebhookBearerAuth(method, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookBearerAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookBearerAuthMethodEnum.java deleted file mode 100644 index b9a0394d8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookBearerAuthMethodEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EventStreamWebhookBearerAuthMethodEnum { - public static final EventStreamWebhookBearerAuthMethodEnum BEARER = - new EventStreamWebhookBearerAuthMethodEnum(Value.BEARER, "bearer"); - - private final Value value; - - private final String string; - - EventStreamWebhookBearerAuthMethodEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EventStreamWebhookBearerAuthMethodEnum - && this.string.equals(((EventStreamWebhookBearerAuthMethodEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case BEARER: - return visitor.visitBearer(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EventStreamWebhookBearerAuthMethodEnum valueOf(String value) { - switch (value) { - case "bearer": - return BEARER; - default: - return new EventStreamWebhookBearerAuthMethodEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - BEARER, - - UNKNOWN - } - - public interface Visitor { - T visitBearer(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookConfiguration.java deleted file mode 100644 index a3dafb72d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookConfiguration.java +++ /dev/null @@ -1,139 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = EventStreamWebhookConfiguration.Builder.class) -public final class EventStreamWebhookConfiguration { - private final String webhookEndpoint; - - private final EventStreamWebhookAuthorizationResponse webhookAuthorization; - - private final Map additionalProperties; - - private EventStreamWebhookConfiguration( - String webhookEndpoint, - EventStreamWebhookAuthorizationResponse webhookAuthorization, - Map additionalProperties) { - this.webhookEndpoint = webhookEndpoint; - this.webhookAuthorization = webhookAuthorization; - this.additionalProperties = additionalProperties; - } - - /** - * @return Target HTTP endpoint URL. - */ - @JsonProperty("webhook_endpoint") - public String getWebhookEndpoint() { - return webhookEndpoint; - } - - @JsonProperty("webhook_authorization") - public EventStreamWebhookAuthorizationResponse getWebhookAuthorization() { - return webhookAuthorization; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EventStreamWebhookConfiguration && equalTo((EventStreamWebhookConfiguration) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EventStreamWebhookConfiguration other) { - return webhookEndpoint.equals(other.webhookEndpoint) && webhookAuthorization.equals(other.webhookAuthorization); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.webhookEndpoint, this.webhookAuthorization); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static WebhookEndpointStage builder() { - return new Builder(); - } - - public interface WebhookEndpointStage { - /** - *

Target HTTP endpoint URL.

- */ - WebhookAuthorizationStage webhookEndpoint(@NotNull String webhookEndpoint); - - Builder from(EventStreamWebhookConfiguration other); - } - - public interface WebhookAuthorizationStage { - _FinalStage webhookAuthorization(@NotNull EventStreamWebhookAuthorizationResponse webhookAuthorization); - } - - public interface _FinalStage { - EventStreamWebhookConfiguration build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements WebhookEndpointStage, WebhookAuthorizationStage, _FinalStage { - private String webhookEndpoint; - - private EventStreamWebhookAuthorizationResponse webhookAuthorization; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(EventStreamWebhookConfiguration other) { - webhookEndpoint(other.getWebhookEndpoint()); - webhookAuthorization(other.getWebhookAuthorization()); - return this; - } - - /** - *

Target HTTP endpoint URL.

- *

Target HTTP endpoint URL.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("webhook_endpoint") - public WebhookAuthorizationStage webhookEndpoint(@NotNull String webhookEndpoint) { - this.webhookEndpoint = Objects.requireNonNull(webhookEndpoint, "webhookEndpoint must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("webhook_authorization") - public _FinalStage webhookAuthorization(@NotNull EventStreamWebhookAuthorizationResponse webhookAuthorization) { - this.webhookAuthorization = - Objects.requireNonNull(webhookAuthorization, "webhookAuthorization must not be null"); - return this; - } - - @java.lang.Override - public EventStreamWebhookConfiguration build() { - return new EventStreamWebhookConfiguration(webhookEndpoint, webhookAuthorization, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookDestination.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookDestination.java deleted file mode 100644 index 16f5f420a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookDestination.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = EventStreamWebhookDestination.Builder.class) -public final class EventStreamWebhookDestination { - private final EventStreamWebhookDestinationTypeEnum type; - - private final EventStreamWebhookConfiguration configuration; - - private final Map additionalProperties; - - private EventStreamWebhookDestination( - EventStreamWebhookDestinationTypeEnum type, - EventStreamWebhookConfiguration configuration, - Map additionalProperties) { - this.type = type; - this.configuration = configuration; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public EventStreamWebhookDestinationTypeEnum getType() { - return type; - } - - @JsonProperty("configuration") - public EventStreamWebhookConfiguration getConfiguration() { - return configuration; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EventStreamWebhookDestination && equalTo((EventStreamWebhookDestination) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EventStreamWebhookDestination other) { - return type.equals(other.type) && configuration.equals(other.configuration); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.configuration); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - ConfigurationStage type(@NotNull EventStreamWebhookDestinationTypeEnum type); - - Builder from(EventStreamWebhookDestination other); - } - - public interface ConfigurationStage { - _FinalStage configuration(@NotNull EventStreamWebhookConfiguration configuration); - } - - public interface _FinalStage { - EventStreamWebhookDestination build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, ConfigurationStage, _FinalStage { - private EventStreamWebhookDestinationTypeEnum type; - - private EventStreamWebhookConfiguration configuration; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(EventStreamWebhookDestination other) { - type(other.getType()); - configuration(other.getConfiguration()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ConfigurationStage type(@NotNull EventStreamWebhookDestinationTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("configuration") - public _FinalStage configuration(@NotNull EventStreamWebhookConfiguration configuration) { - this.configuration = Objects.requireNonNull(configuration, "configuration must not be null"); - return this; - } - - @java.lang.Override - public EventStreamWebhookDestination build() { - return new EventStreamWebhookDestination(type, configuration, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookDestinationTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookDestinationTypeEnum.java deleted file mode 100644 index a33a1df05..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookDestinationTypeEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class EventStreamWebhookDestinationTypeEnum { - public static final EventStreamWebhookDestinationTypeEnum WEBHOOK = - new EventStreamWebhookDestinationTypeEnum(Value.WEBHOOK, "webhook"); - - private final Value value; - - private final String string; - - EventStreamWebhookDestinationTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof EventStreamWebhookDestinationTypeEnum - && this.string.equals(((EventStreamWebhookDestinationTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case WEBHOOK: - return visitor.visitWebhook(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static EventStreamWebhookDestinationTypeEnum valueOf(String value) { - switch (value) { - case "webhook": - return WEBHOOK; - default: - return new EventStreamWebhookDestinationTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - WEBHOOK, - - UNKNOWN - } - - public interface Visitor { - T visitWebhook(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookResponseContent.java deleted file mode 100644 index f21a19b20..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamWebhookResponseContent.java +++ /dev/null @@ -1,275 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = EventStreamWebhookResponseContent.Builder.class) -public final class EventStreamWebhookResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional> subscriptions; - - private final Optional destination; - - private final Optional status; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private EventStreamWebhookResponseContent( - Optional id, - Optional name, - Optional> subscriptions, - Optional destination, - Optional status, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.subscriptions = subscriptions; - this.destination = destination; - this.status = status; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return Unique identifier for the event stream. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Name of the event stream. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return List of event types subscribed to in this stream. - */ - @JsonProperty("subscriptions") - public Optional> getSubscriptions() { - return subscriptions; - } - - @JsonProperty("destination") - public Optional getDestination() { - return destination; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return Timestamp when the event stream was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return Timestamp when the event stream was last updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof EventStreamWebhookResponseContent && equalTo((EventStreamWebhookResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(EventStreamWebhookResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && subscriptions.equals(other.subscriptions) - && destination.equals(other.destination) - && status.equals(other.status) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.name, this.subscriptions, this.destination, this.status, this.createdAt, this.updatedAt); - } - - @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> subscriptions = Optional.empty(); - - private Optional destination = Optional.empty(); - - private Optional status = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(EventStreamWebhookResponseContent other) { - id(other.getId()); - name(other.getName()); - subscriptions(other.getSubscriptions()); - destination(other.getDestination()); - status(other.getStatus()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

Unique identifier for the event stream.

- */ - @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; - } - - /** - *

Name of the event stream.

- */ - @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; - } - - /** - *

List of event types subscribed to in this stream.

- */ - @JsonSetter(value = "subscriptions", nulls = Nulls.SKIP) - public Builder subscriptions(Optional> subscriptions) { - this.subscriptions = subscriptions; - return this; - } - - public Builder subscriptions(List subscriptions) { - this.subscriptions = Optional.ofNullable(subscriptions); - return this; - } - - @JsonSetter(value = "destination", nulls = Nulls.SKIP) - public Builder destination(Optional destination) { - this.destination = destination; - return this; - } - - public Builder destination(EventStreamWebhookDestination destination) { - this.destination = Optional.ofNullable(destination); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(EventStreamStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - /** - *

Timestamp when the event stream 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; - } - - /** - *

Timestamp when the event stream 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; - } - - public EventStreamWebhookResponseContent build() { - return new EventStreamWebhookResponseContent( - id, name, subscriptions, destination, status, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/EventStreamsCreateRequest.java b/src/main/java/com/auth0/client/mgmt/types/EventStreamsCreateRequest.java deleted file mode 100644 index 3af8d30e1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/EventStreamsCreateRequest.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = EventStreamsCreateRequest.Deserializer.class) -public final class EventStreamsCreateRequest { - private final Object value; - - private final int type; - - private EventStreamsCreateRequest(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((CreateEventStreamWebHookRequestContent) this.value); - } else if (this.type == 1) { - return visitor.visit((CreateEventStreamEventBridgeRequestContent) this.value); - } else if (this.type == 2) { - return visitor.visit((CreateEventStreamActionRequestContent) 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 EventStreamsCreateRequest && equalTo((EventStreamsCreateRequest) other); - } - - private boolean equalTo(EventStreamsCreateRequest 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 EventStreamsCreateRequest of(CreateEventStreamWebHookRequestContent value) { - return new EventStreamsCreateRequest(value, 0); - } - - public static EventStreamsCreateRequest of(CreateEventStreamEventBridgeRequestContent value) { - return new EventStreamsCreateRequest(value, 1); - } - - public static EventStreamsCreateRequest of(CreateEventStreamActionRequestContent value) { - return new EventStreamsCreateRequest(value, 2); - } - - public interface Visitor { - T visit(CreateEventStreamWebHookRequestContent value); - - T visit(CreateEventStreamEventBridgeRequestContent value); - - T visit(CreateEventStreamActionRequestContent value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(EventStreamsCreateRequest.class); - } - - @java.lang.Override - public EventStreamsCreateRequest deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateEventStreamWebHookRequestContent.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, CreateEventStreamEventBridgeRequestContent.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreateEventStreamActionRequestContent.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ExpressConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/ExpressConfiguration.java deleted file mode 100644 index 9f99ee92e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ExpressConfiguration.java +++ /dev/null @@ -1,444 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ExpressConfiguration.Builder.class) -public final class ExpressConfiguration { - private final String initiateLoginUriTemplate; - - private final String userAttributeProfileId; - - private final String connectionProfileId; - - private final boolean enableClient; - - private final boolean enableOrganization; - - private final Optional> linkedClients; - - private final String oktaOinClientId; - - private final String adminLoginDomain; - - private final Optional oinSubmissionId; - - private final Map additionalProperties; - - private ExpressConfiguration( - String initiateLoginUriTemplate, - String userAttributeProfileId, - String connectionProfileId, - boolean enableClient, - boolean enableOrganization, - Optional> linkedClients, - String oktaOinClientId, - String adminLoginDomain, - Optional oinSubmissionId, - Map additionalProperties) { - this.initiateLoginUriTemplate = initiateLoginUriTemplate; - this.userAttributeProfileId = userAttributeProfileId; - this.connectionProfileId = connectionProfileId; - this.enableClient = enableClient; - this.enableOrganization = enableOrganization; - this.linkedClients = linkedClients; - this.oktaOinClientId = oktaOinClientId; - this.adminLoginDomain = adminLoginDomain; - this.oinSubmissionId = oinSubmissionId; - this.additionalProperties = additionalProperties; - } - - /** - * @return 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. - */ - @JsonProperty("initiate_login_uri_template") - public String getInitiateLoginUriTemplate() { - return initiateLoginUriTemplate; - } - - /** - * @return The ID of the user attribute profile to use for this application. - */ - @JsonProperty("user_attribute_profile_id") - public String getUserAttributeProfileId() { - return userAttributeProfileId; - } - - /** - * @return The ID of the connection profile to use for this application. - */ - @JsonProperty("connection_profile_id") - public String getConnectionProfileId() { - return connectionProfileId; - } - - /** - * @return When true, all connections made via express configuration will be enabled for this application. - */ - @JsonProperty("enable_client") - public boolean getEnableClient() { - return enableClient; - } - - /** - * @return When true, all connections made via express configuration will have the associated organization enabled. - */ - @JsonProperty("enable_organization") - public boolean getEnableOrganization() { - return enableOrganization; - } - - /** - * @return List of client IDs that are linked to this express configuration (e.g. web or mobile clients). - */ - @JsonProperty("linked_clients") - public Optional> getLinkedClients() { - return linkedClients; - } - - /** - * @return This is the unique identifier for the Okta OIN Express Configuration Client, which Okta will use for this application. - */ - @JsonProperty("okta_oin_client_id") - public String getOktaOinClientId() { - return oktaOinClientId; - } - - /** - * @return 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. - */ - @JsonProperty("admin_login_domain") - public String getAdminLoginDomain() { - return adminLoginDomain; - } - - /** - * @return The identifier of the published application in the OKTA OIN. - */ - @JsonProperty("oin_submission_id") - public Optional getOinSubmissionId() { - return oinSubmissionId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ExpressConfiguration && equalTo((ExpressConfiguration) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ExpressConfiguration other) { - return initiateLoginUriTemplate.equals(other.initiateLoginUriTemplate) - && userAttributeProfileId.equals(other.userAttributeProfileId) - && connectionProfileId.equals(other.connectionProfileId) - && enableClient == other.enableClient - && enableOrganization == other.enableOrganization - && linkedClients.equals(other.linkedClients) - && oktaOinClientId.equals(other.oktaOinClientId) - && adminLoginDomain.equals(other.adminLoginDomain) - && oinSubmissionId.equals(other.oinSubmissionId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.initiateLoginUriTemplate, - this.userAttributeProfileId, - this.connectionProfileId, - this.enableClient, - this.enableOrganization, - this.linkedClients, - this.oktaOinClientId, - this.adminLoginDomain, - this.oinSubmissionId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static InitiateLoginUriTemplateStage builder() { - return new Builder(); - } - - public interface InitiateLoginUriTemplateStage { - /** - *

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.

- */ - UserAttributeProfileIdStage initiateLoginUriTemplate(@NotNull String initiateLoginUriTemplate); - - Builder from(ExpressConfiguration other); - } - - public interface UserAttributeProfileIdStage { - /** - *

The ID of the user attribute profile to use for this application.

- */ - ConnectionProfileIdStage userAttributeProfileId(@NotNull String userAttributeProfileId); - } - - public interface ConnectionProfileIdStage { - /** - *

The ID of the connection profile to use for this application.

- */ - EnableClientStage connectionProfileId(@NotNull String connectionProfileId); - } - - public interface EnableClientStage { - /** - *

When true, all connections made via express configuration will be enabled for this application.

- */ - EnableOrganizationStage enableClient(boolean enableClient); - } - - public interface EnableOrganizationStage { - /** - *

When true, all connections made via express configuration will have the associated organization enabled.

- */ - OktaOinClientIdStage enableOrganization(boolean enableOrganization); - } - - public interface OktaOinClientIdStage { - /** - *

This is the unique identifier for the Okta OIN Express Configuration Client, which Okta will use for this application.

- */ - AdminLoginDomainStage oktaOinClientId(@NotNull String oktaOinClientId); - } - - public interface AdminLoginDomainStage { - /** - *

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.

- */ - _FinalStage adminLoginDomain(@NotNull String adminLoginDomain); - } - - public interface _FinalStage { - ExpressConfiguration build(); - - /** - *

List of client IDs that are linked to this express configuration (e.g. web or mobile clients).

- */ - _FinalStage linkedClients(Optional> linkedClients); - - _FinalStage linkedClients(List linkedClients); - - /** - *

The identifier of the published application in the OKTA OIN.

- */ - _FinalStage oinSubmissionId(Optional oinSubmissionId); - - _FinalStage oinSubmissionId(String oinSubmissionId); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements InitiateLoginUriTemplateStage, - UserAttributeProfileIdStage, - ConnectionProfileIdStage, - EnableClientStage, - EnableOrganizationStage, - OktaOinClientIdStage, - AdminLoginDomainStage, - _FinalStage { - private String initiateLoginUriTemplate; - - private String userAttributeProfileId; - - private String connectionProfileId; - - private boolean enableClient; - - private boolean enableOrganization; - - private String oktaOinClientId; - - private String adminLoginDomain; - - private Optional oinSubmissionId = Optional.empty(); - - private Optional> linkedClients = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ExpressConfiguration other) { - initiateLoginUriTemplate(other.getInitiateLoginUriTemplate()); - userAttributeProfileId(other.getUserAttributeProfileId()); - connectionProfileId(other.getConnectionProfileId()); - enableClient(other.getEnableClient()); - enableOrganization(other.getEnableOrganization()); - linkedClients(other.getLinkedClients()); - oktaOinClientId(other.getOktaOinClientId()); - adminLoginDomain(other.getAdminLoginDomain()); - oinSubmissionId(other.getOinSubmissionId()); - 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. - */ - @java.lang.Override - @JsonSetter("initiate_login_uri_template") - public UserAttributeProfileIdStage initiateLoginUriTemplate(@NotNull String initiateLoginUriTemplate) { - this.initiateLoginUriTemplate = - Objects.requireNonNull(initiateLoginUriTemplate, "initiateLoginUriTemplate must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("user_attribute_profile_id") - public ConnectionProfileIdStage userAttributeProfileId(@NotNull String userAttributeProfileId) { - this.userAttributeProfileId = - Objects.requireNonNull(userAttributeProfileId, "userAttributeProfileId must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("connection_profile_id") - public EnableClientStage connectionProfileId(@NotNull String connectionProfileId) { - this.connectionProfileId = - Objects.requireNonNull(connectionProfileId, "connectionProfileId must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("enable_client") - public EnableOrganizationStage enableClient(boolean enableClient) { - this.enableClient = enableClient; - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("enable_organization") - public OktaOinClientIdStage enableOrganization(boolean enableOrganization) { - this.enableOrganization = enableOrganization; - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("okta_oin_client_id") - public AdminLoginDomainStage oktaOinClientId(@NotNull String oktaOinClientId) { - this.oktaOinClientId = Objects.requireNonNull(oktaOinClientId, "oktaOinClientId must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("admin_login_domain") - public _FinalStage adminLoginDomain(@NotNull String adminLoginDomain) { - this.adminLoginDomain = Objects.requireNonNull(adminLoginDomain, "adminLoginDomain must not be null"); - 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. - */ - @java.lang.Override - public _FinalStage oinSubmissionId(String oinSubmissionId) { - this.oinSubmissionId = Optional.ofNullable(oinSubmissionId); - return this; - } - - /** - *

The identifier of the published application in the OKTA OIN.

- */ - @java.lang.Override - @JsonSetter(value = "oin_submission_id", nulls = Nulls.SKIP) - public _FinalStage oinSubmissionId(Optional oinSubmissionId) { - this.oinSubmissionId = oinSubmissionId; - return this; - } - - /** - *

List of client IDs that are linked to this express configuration (e.g. web or mobile clients).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage linkedClients(List linkedClients) { - this.linkedClients = Optional.ofNullable(linkedClients); - return this; - } - - /** - *

List of client IDs that are linked to this express configuration (e.g. web or mobile clients).

- */ - @java.lang.Override - @JsonSetter(value = "linked_clients", nulls = Nulls.SKIP) - public _FinalStage linkedClients(Optional> linkedClients) { - this.linkedClients = linkedClients; - return this; - } - - @java.lang.Override - public ExpressConfiguration build() { - return new ExpressConfiguration( - initiateLoginUriTemplate, - userAttributeProfileId, - connectionProfileId, - enableClient, - enableOrganization, - linkedClients, - oktaOinClientId, - adminLoginDomain, - oinSubmissionId, - 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 deleted file mode 100644 index 24fcd7f9a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ExpressConfigurationOrNull.java +++ /dev/null @@ -1,444 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ExpressConfigurationOrNull.Builder.class) -public final class ExpressConfigurationOrNull { - private final String initiateLoginUriTemplate; - - private final String userAttributeProfileId; - - private final String connectionProfileId; - - private final boolean enableClient; - - private final boolean enableOrganization; - - private final Optional> linkedClients; - - private final String oktaOinClientId; - - private final String adminLoginDomain; - - private final Optional oinSubmissionId; - - private final Map additionalProperties; - - private ExpressConfigurationOrNull( - String initiateLoginUriTemplate, - String userAttributeProfileId, - String connectionProfileId, - boolean enableClient, - boolean enableOrganization, - Optional> linkedClients, - String oktaOinClientId, - String adminLoginDomain, - Optional oinSubmissionId, - Map additionalProperties) { - this.initiateLoginUriTemplate = initiateLoginUriTemplate; - this.userAttributeProfileId = userAttributeProfileId; - this.connectionProfileId = connectionProfileId; - this.enableClient = enableClient; - this.enableOrganization = enableOrganization; - this.linkedClients = linkedClients; - this.oktaOinClientId = oktaOinClientId; - this.adminLoginDomain = adminLoginDomain; - this.oinSubmissionId = oinSubmissionId; - this.additionalProperties = additionalProperties; - } - - /** - * @return 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. - */ - @JsonProperty("initiate_login_uri_template") - public String getInitiateLoginUriTemplate() { - return initiateLoginUriTemplate; - } - - /** - * @return The ID of the user attribute profile to use for this application. - */ - @JsonProperty("user_attribute_profile_id") - public String getUserAttributeProfileId() { - return userAttributeProfileId; - } - - /** - * @return The ID of the connection profile to use for this application. - */ - @JsonProperty("connection_profile_id") - public String getConnectionProfileId() { - return connectionProfileId; - } - - /** - * @return When true, all connections made via express configuration will be enabled for this application. - */ - @JsonProperty("enable_client") - public boolean getEnableClient() { - return enableClient; - } - - /** - * @return When true, all connections made via express configuration will have the associated organization enabled. - */ - @JsonProperty("enable_organization") - public boolean getEnableOrganization() { - return enableOrganization; - } - - /** - * @return List of client IDs that are linked to this express configuration (e.g. web or mobile clients). - */ - @JsonProperty("linked_clients") - public Optional> getLinkedClients() { - return linkedClients; - } - - /** - * @return This is the unique identifier for the Okta OIN Express Configuration Client, which Okta will use for this application. - */ - @JsonProperty("okta_oin_client_id") - public String getOktaOinClientId() { - return oktaOinClientId; - } - - /** - * @return 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. - */ - @JsonProperty("admin_login_domain") - public String getAdminLoginDomain() { - return adminLoginDomain; - } - - /** - * @return The identifier of the published application in the OKTA OIN. - */ - @JsonProperty("oin_submission_id") - public Optional getOinSubmissionId() { - return oinSubmissionId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ExpressConfigurationOrNull && equalTo((ExpressConfigurationOrNull) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ExpressConfigurationOrNull other) { - return initiateLoginUriTemplate.equals(other.initiateLoginUriTemplate) - && userAttributeProfileId.equals(other.userAttributeProfileId) - && connectionProfileId.equals(other.connectionProfileId) - && enableClient == other.enableClient - && enableOrganization == other.enableOrganization - && linkedClients.equals(other.linkedClients) - && oktaOinClientId.equals(other.oktaOinClientId) - && adminLoginDomain.equals(other.adminLoginDomain) - && oinSubmissionId.equals(other.oinSubmissionId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.initiateLoginUriTemplate, - this.userAttributeProfileId, - this.connectionProfileId, - this.enableClient, - this.enableOrganization, - this.linkedClients, - this.oktaOinClientId, - this.adminLoginDomain, - this.oinSubmissionId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static InitiateLoginUriTemplateStage builder() { - return new Builder(); - } - - public interface InitiateLoginUriTemplateStage { - /** - *

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.

- */ - UserAttributeProfileIdStage initiateLoginUriTemplate(@NotNull String initiateLoginUriTemplate); - - Builder from(ExpressConfigurationOrNull other); - } - - public interface UserAttributeProfileIdStage { - /** - *

The ID of the user attribute profile to use for this application.

- */ - ConnectionProfileIdStage userAttributeProfileId(@NotNull String userAttributeProfileId); - } - - public interface ConnectionProfileIdStage { - /** - *

The ID of the connection profile to use for this application.

- */ - EnableClientStage connectionProfileId(@NotNull String connectionProfileId); - } - - public interface EnableClientStage { - /** - *

When true, all connections made via express configuration will be enabled for this application.

- */ - EnableOrganizationStage enableClient(boolean enableClient); - } - - public interface EnableOrganizationStage { - /** - *

When true, all connections made via express configuration will have the associated organization enabled.

- */ - OktaOinClientIdStage enableOrganization(boolean enableOrganization); - } - - public interface OktaOinClientIdStage { - /** - *

This is the unique identifier for the Okta OIN Express Configuration Client, which Okta will use for this application.

- */ - AdminLoginDomainStage oktaOinClientId(@NotNull String oktaOinClientId); - } - - public interface AdminLoginDomainStage { - /** - *

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.

- */ - _FinalStage adminLoginDomain(@NotNull String adminLoginDomain); - } - - public interface _FinalStage { - ExpressConfigurationOrNull build(); - - /** - *

List of client IDs that are linked to this express configuration (e.g. web or mobile clients).

- */ - _FinalStage linkedClients(Optional> linkedClients); - - _FinalStage linkedClients(List linkedClients); - - /** - *

The identifier of the published application in the OKTA OIN.

- */ - _FinalStage oinSubmissionId(Optional oinSubmissionId); - - _FinalStage oinSubmissionId(String oinSubmissionId); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements InitiateLoginUriTemplateStage, - UserAttributeProfileIdStage, - ConnectionProfileIdStage, - EnableClientStage, - EnableOrganizationStage, - OktaOinClientIdStage, - AdminLoginDomainStage, - _FinalStage { - private String initiateLoginUriTemplate; - - private String userAttributeProfileId; - - private String connectionProfileId; - - private boolean enableClient; - - private boolean enableOrganization; - - private String oktaOinClientId; - - private String adminLoginDomain; - - private Optional oinSubmissionId = Optional.empty(); - - private Optional> linkedClients = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ExpressConfigurationOrNull other) { - initiateLoginUriTemplate(other.getInitiateLoginUriTemplate()); - userAttributeProfileId(other.getUserAttributeProfileId()); - connectionProfileId(other.getConnectionProfileId()); - enableClient(other.getEnableClient()); - enableOrganization(other.getEnableOrganization()); - linkedClients(other.getLinkedClients()); - oktaOinClientId(other.getOktaOinClientId()); - adminLoginDomain(other.getAdminLoginDomain()); - oinSubmissionId(other.getOinSubmissionId()); - 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. - */ - @java.lang.Override - @JsonSetter("initiate_login_uri_template") - public UserAttributeProfileIdStage initiateLoginUriTemplate(@NotNull String initiateLoginUriTemplate) { - this.initiateLoginUriTemplate = - Objects.requireNonNull(initiateLoginUriTemplate, "initiateLoginUriTemplate must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("user_attribute_profile_id") - public ConnectionProfileIdStage userAttributeProfileId(@NotNull String userAttributeProfileId) { - this.userAttributeProfileId = - Objects.requireNonNull(userAttributeProfileId, "userAttributeProfileId must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("connection_profile_id") - public EnableClientStage connectionProfileId(@NotNull String connectionProfileId) { - this.connectionProfileId = - Objects.requireNonNull(connectionProfileId, "connectionProfileId must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("enable_client") - public EnableOrganizationStage enableClient(boolean enableClient) { - this.enableClient = enableClient; - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("enable_organization") - public OktaOinClientIdStage enableOrganization(boolean enableOrganization) { - this.enableOrganization = enableOrganization; - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("okta_oin_client_id") - public AdminLoginDomainStage oktaOinClientId(@NotNull String oktaOinClientId) { - this.oktaOinClientId = Objects.requireNonNull(oktaOinClientId, "oktaOinClientId must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("admin_login_domain") - public _FinalStage adminLoginDomain(@NotNull String adminLoginDomain) { - this.adminLoginDomain = Objects.requireNonNull(adminLoginDomain, "adminLoginDomain must not be null"); - 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. - */ - @java.lang.Override - public _FinalStage oinSubmissionId(String oinSubmissionId) { - this.oinSubmissionId = Optional.ofNullable(oinSubmissionId); - return this; - } - - /** - *

The identifier of the published application in the OKTA OIN.

- */ - @java.lang.Override - @JsonSetter(value = "oin_submission_id", nulls = Nulls.SKIP) - public _FinalStage oinSubmissionId(Optional oinSubmissionId) { - this.oinSubmissionId = oinSubmissionId; - return this; - } - - /** - *

List of client IDs that are linked to this express configuration (e.g. web or mobile clients).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage linkedClients(List linkedClients) { - this.linkedClients = Optional.ofNullable(linkedClients); - return this; - } - - /** - *

List of client IDs that are linked to this express configuration (e.g. web or mobile clients).

- */ - @java.lang.Override - @JsonSetter(value = "linked_clients", nulls = Nulls.SKIP) - public _FinalStage linkedClients(Optional> linkedClients) { - this.linkedClients = linkedClients; - return this; - } - - @java.lang.Override - public ExpressConfigurationOrNull build() { - return new ExpressConfigurationOrNull( - initiateLoginUriTemplate, - userAttributeProfileId, - connectionProfileId, - enableClient, - enableOrganization, - linkedClients, - oktaOinClientId, - adminLoginDomain, - oinSubmissionId, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ExtensibilityEmailProviderCredentials.java b/src/main/java/com/auth0/client/mgmt/types/ExtensibilityEmailProviderCredentials.java deleted file mode 100644 index 6997e2fa5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ExtensibilityEmailProviderCredentials.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.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 = ExtensibilityEmailProviderCredentials.Builder.class) -public final class ExtensibilityEmailProviderCredentials { - private final Map additionalProperties; - - private ExtensibilityEmailProviderCredentials(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ExtensibilityEmailProviderCredentials; - } - - @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(ExtensibilityEmailProviderCredentials other) { - return this; - } - - public ExtensibilityEmailProviderCredentials build() { - return new ExtensibilityEmailProviderCredentials(additionalProperties); - } - } -} 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 b9228e67b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FederatedConnectionTokenSet.java +++ /dev/null @@ -1,282 +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); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowAction.java deleted file mode 100644 index 35d21213e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowAction.java +++ /dev/null @@ -1,371 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowAction.Deserializer.class) -public final class FlowAction { - private final Object value; - - private final int type; - - private FlowAction(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((FlowActionActivecampaign) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowActionAirtable) this.value); - } else if (this.type == 2) { - return visitor.visit((FlowActionAuth0) this.value); - } else if (this.type == 3) { - return visitor.visit((FlowActionBigqueryInsertRows) this.value); - } else if (this.type == 4) { - return visitor.visit((FlowActionClearbit) this.value); - } else if (this.type == 5) { - return visitor.visit((FlowActionEmailVerifyEmail) this.value); - } else if (this.type == 6) { - return visitor.visit((FlowActionFlow) this.value); - } else if (this.type == 7) { - return visitor.visit((FlowActionGoogleSheetsAddRow) this.value); - } else if (this.type == 8) { - return visitor.visit((FlowActionHttpSendRequest) this.value); - } else if (this.type == 9) { - return visitor.visit((FlowActionHubspot) this.value); - } else if (this.type == 10) { - return visitor.visit((FlowActionJson) this.value); - } else if (this.type == 11) { - return visitor.visit((FlowActionJwt) this.value); - } else if (this.type == 12) { - return visitor.visit((FlowActionMailchimpUpsertMember) this.value); - } else if (this.type == 13) { - return visitor.visit((FlowActionMailjetSendEmail) this.value); - } else if (this.type == 14) { - return visitor.visit((FlowActionOtp) this.value); - } else if (this.type == 15) { - return visitor.visit((FlowActionPipedrive) this.value); - } else if (this.type == 16) { - return visitor.visit((FlowActionSalesforce) this.value); - } else if (this.type == 17) { - return visitor.visit((FlowActionSendgridSendEmail) this.value); - } else if (this.type == 18) { - return visitor.visit((FlowActionSlackPostMessage) this.value); - } else if (this.type == 19) { - return visitor.visit((FlowActionStripe) this.value); - } else if (this.type == 20) { - return visitor.visit((FlowActionTelegramSendMessage) this.value); - } else if (this.type == 21) { - return visitor.visit((FlowActionTwilio) this.value); - } else if (this.type == 22) { - return visitor.visit((FlowActionWhatsappSendMessage) this.value); - } else if (this.type == 23) { - return visitor.visit((FlowActionXml) this.value); - } else if (this.type == 24) { - return visitor.visit((FlowActionZapierTriggerWebhook) 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 FlowAction && equalTo((FlowAction) other); - } - - private boolean equalTo(FlowAction 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 FlowAction of(FlowActionActivecampaign value) { - return new FlowAction(value, 0); - } - - public static FlowAction of(FlowActionAirtable value) { - return new FlowAction(value, 1); - } - - public static FlowAction of(FlowActionAuth0 value) { - return new FlowAction(value, 2); - } - - public static FlowAction of(FlowActionBigqueryInsertRows value) { - return new FlowAction(value, 3); - } - - public static FlowAction of(FlowActionClearbit value) { - return new FlowAction(value, 4); - } - - public static FlowAction of(FlowActionEmailVerifyEmail value) { - return new FlowAction(value, 5); - } - - public static FlowAction of(FlowActionFlow value) { - return new FlowAction(value, 6); - } - - public static FlowAction of(FlowActionGoogleSheetsAddRow value) { - return new FlowAction(value, 7); - } - - public static FlowAction of(FlowActionHttpSendRequest value) { - return new FlowAction(value, 8); - } - - public static FlowAction of(FlowActionHubspot value) { - return new FlowAction(value, 9); - } - - public static FlowAction of(FlowActionJson value) { - return new FlowAction(value, 10); - } - - public static FlowAction of(FlowActionJwt value) { - return new FlowAction(value, 11); - } - - public static FlowAction of(FlowActionMailchimpUpsertMember value) { - return new FlowAction(value, 12); - } - - public static FlowAction of(FlowActionMailjetSendEmail value) { - return new FlowAction(value, 13); - } - - public static FlowAction of(FlowActionOtp value) { - return new FlowAction(value, 14); - } - - public static FlowAction of(FlowActionPipedrive value) { - return new FlowAction(value, 15); - } - - public static FlowAction of(FlowActionSalesforce value) { - return new FlowAction(value, 16); - } - - public static FlowAction of(FlowActionSendgridSendEmail value) { - return new FlowAction(value, 17); - } - - public static FlowAction of(FlowActionSlackPostMessage value) { - return new FlowAction(value, 18); - } - - public static FlowAction of(FlowActionStripe value) { - return new FlowAction(value, 19); - } - - public static FlowAction of(FlowActionTelegramSendMessage value) { - return new FlowAction(value, 20); - } - - public static FlowAction of(FlowActionTwilio value) { - return new FlowAction(value, 21); - } - - public static FlowAction of(FlowActionWhatsappSendMessage value) { - return new FlowAction(value, 22); - } - - public static FlowAction of(FlowActionXml value) { - return new FlowAction(value, 23); - } - - public static FlowAction of(FlowActionZapierTriggerWebhook value) { - return new FlowAction(value, 24); - } - - public interface Visitor { - T visit(FlowActionActivecampaign value); - - T visit(FlowActionAirtable value); - - T visit(FlowActionAuth0 value); - - T visit(FlowActionBigqueryInsertRows value); - - T visit(FlowActionClearbit value); - - T visit(FlowActionEmailVerifyEmail value); - - T visit(FlowActionFlow value); - - T visit(FlowActionGoogleSheetsAddRow value); - - T visit(FlowActionHttpSendRequest value); - - T visit(FlowActionHubspot value); - - T visit(FlowActionJson value); - - T visit(FlowActionJwt value); - - T visit(FlowActionMailchimpUpsertMember value); - - T visit(FlowActionMailjetSendEmail value); - - T visit(FlowActionOtp value); - - T visit(FlowActionPipedrive value); - - T visit(FlowActionSalesforce value); - - T visit(FlowActionSendgridSendEmail value); - - T visit(FlowActionSlackPostMessage value); - - T visit(FlowActionStripe value); - - T visit(FlowActionTelegramSendMessage value); - - T visit(FlowActionTwilio value); - - T visit(FlowActionWhatsappSendMessage value); - - T visit(FlowActionXml value); - - T visit(FlowActionZapierTriggerWebhook value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowAction.class); - } - - @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) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionBigqueryInsertRows.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, FlowActionEmailVerifyEmail.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, FlowActionGoogleSheetsAddRow.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionHttpSendRequest.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, FlowActionMailchimpUpsertMember.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionMailjetSendEmail.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, FlowActionSendgridSendEmail.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSlackPostMessage.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, FlowActionTelegramSendMessage.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, FlowActionWhatsappSendMessage.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionXml.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionZapierTriggerWebhook.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaign.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaign.java deleted file mode 100644 index 06a370898..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaign.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionActivecampaign.Deserializer.class) -public final class FlowActionActivecampaign { - private final Object value; - - private final int type; - - private FlowActionActivecampaign(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((FlowActionActivecampaignListContacts) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowActionActivecampaignUpsertContact) 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 FlowActionActivecampaign && equalTo((FlowActionActivecampaign) other); - } - - private boolean equalTo(FlowActionActivecampaign 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 FlowActionActivecampaign of(FlowActionActivecampaignListContacts value) { - return new FlowActionActivecampaign(value, 0); - } - - public static FlowActionActivecampaign of(FlowActionActivecampaignUpsertContact value) { - return new FlowActionActivecampaign(value, 1); - } - - public interface Visitor { - T visit(FlowActionActivecampaignListContacts value); - - T visit(FlowActionActivecampaignUpsertContact value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionActivecampaign.class); - } - - @java.lang.Override - public FlowActionActivecampaign deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionActivecampaignListContacts.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionActivecampaignUpsertContact.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignListContacts.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignListContacts.java deleted file mode 100644 index 31cc8cbc9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignListContacts.java +++ /dev/null @@ -1,271 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionActivecampaignListContacts.Builder.class) -public final class FlowActionActivecampaignListContacts { - private final String id; - - private final Optional alias; - - private final FlowActionActivecampaignListContactsType type; - - private final FlowActionActivecampaignListContactsAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionActivecampaignListContactsParams params; - - private final Map additionalProperties; - - private FlowActionActivecampaignListContacts( - String id, - Optional alias, - FlowActionActivecampaignListContactsType type, - FlowActionActivecampaignListContactsAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionActivecampaignListContactsParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionActivecampaignListContactsType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionActivecampaignListContactsAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionActivecampaignListContactsParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionActivecampaignListContacts - && equalTo((FlowActionActivecampaignListContacts) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionActivecampaignListContacts other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionActivecampaignListContacts other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionActivecampaignListContactsType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionActivecampaignListContactsAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionActivecampaignListContactsParams params); - } - - public interface _FinalStage { - FlowActionActivecampaignListContacts build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionActivecampaignListContactsType type; - - private FlowActionActivecampaignListContactsAction action; - - private FlowActionActivecampaignListContactsParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionActivecampaignListContacts other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionActivecampaignListContactsType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionActivecampaignListContactsAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionActivecampaignListContactsParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionActivecampaignListContacts build() { - return new FlowActionActivecampaignListContacts( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignListContactsAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignListContactsAction.java deleted file mode 100644 index 908194877..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignListContactsAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionActivecampaignListContactsAction { - public static final FlowActionActivecampaignListContactsAction LIST_CONTACTS = - new FlowActionActivecampaignListContactsAction(Value.LIST_CONTACTS, "LIST_CONTACTS"); - - private final Value value; - - private final String string; - - FlowActionActivecampaignListContactsAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionActivecampaignListContactsAction - && this.string.equals(((FlowActionActivecampaignListContactsAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case LIST_CONTACTS: - return visitor.visitListContacts(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionActivecampaignListContactsAction valueOf(String value) { - switch (value) { - case "LIST_CONTACTS": - return LIST_CONTACTS; - default: - return new FlowActionActivecampaignListContactsAction(Value.UNKNOWN, value); - } - } - - public enum Value { - LIST_CONTACTS, - - UNKNOWN - } - - public interface Visitor { - T visitListContacts(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignListContactsParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignListContactsParams.java deleted file mode 100644 index 92b6b2466..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignListContactsParams.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionActivecampaignListContactsParams.Builder.class) -public final class FlowActionActivecampaignListContactsParams { - private final String connectionId; - - private final String email; - - private final Map additionalProperties; - - private FlowActionActivecampaignListContactsParams( - String connectionId, String email, Map additionalProperties) { - this.connectionId = connectionId; - this.email = email; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("email") - public String getEmail() { - return email; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionActivecampaignListContactsParams - && equalTo((FlowActionActivecampaignListContactsParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionActivecampaignListContactsParams other) { - return connectionId.equals(other.connectionId) && email.equals(other.email); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.email); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - EmailStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionActivecampaignListContactsParams other); - } - - public interface EmailStage { - _FinalStage email(@NotNull String email); - } - - public interface _FinalStage { - FlowActionActivecampaignListContactsParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, EmailStage, _FinalStage { - private String connectionId; - - private String email; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionActivecampaignListContactsParams other) { - connectionId(other.getConnectionId()); - email(other.getEmail()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public EmailStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("email") - public _FinalStage email(@NotNull String email) { - this.email = Objects.requireNonNull(email, "email must not be null"); - return this; - } - - @java.lang.Override - public FlowActionActivecampaignListContactsParams build() { - return new FlowActionActivecampaignListContactsParams(connectionId, email, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignListContactsType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignListContactsType.java deleted file mode 100644 index 99d3e2823..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignListContactsType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionActivecampaignListContactsType { - public static final FlowActionActivecampaignListContactsType ACTIVECAMPAIGN = - new FlowActionActivecampaignListContactsType(Value.ACTIVECAMPAIGN, "ACTIVECAMPAIGN"); - - private final Value value; - - private final String string; - - FlowActionActivecampaignListContactsType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionActivecampaignListContactsType - && this.string.equals(((FlowActionActivecampaignListContactsType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ACTIVECAMPAIGN: - return visitor.visitActivecampaign(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionActivecampaignListContactsType valueOf(String value) { - switch (value) { - case "ACTIVECAMPAIGN": - return ACTIVECAMPAIGN; - default: - return new FlowActionActivecampaignListContactsType(Value.UNKNOWN, value); - } - } - - public enum Value { - ACTIVECAMPAIGN, - - UNKNOWN - } - - public interface Visitor { - T visitActivecampaign(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignUpsertContact.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignUpsertContact.java deleted file mode 100644 index 251229c9d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignUpsertContact.java +++ /dev/null @@ -1,271 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionActivecampaignUpsertContact.Builder.class) -public final class FlowActionActivecampaignUpsertContact { - private final String id; - - private final Optional alias; - - private final FlowActionActivecampaignUpsertContactType type; - - private final FlowActionActivecampaignUpsertContactAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionActivecampaignUpsertContactParams params; - - private final Map additionalProperties; - - private FlowActionActivecampaignUpsertContact( - String id, - Optional alias, - FlowActionActivecampaignUpsertContactType type, - FlowActionActivecampaignUpsertContactAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionActivecampaignUpsertContactParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionActivecampaignUpsertContactType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionActivecampaignUpsertContactAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionActivecampaignUpsertContactParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionActivecampaignUpsertContact - && equalTo((FlowActionActivecampaignUpsertContact) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionActivecampaignUpsertContact other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionActivecampaignUpsertContact other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionActivecampaignUpsertContactType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionActivecampaignUpsertContactAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionActivecampaignUpsertContactParams params); - } - - public interface _FinalStage { - FlowActionActivecampaignUpsertContact build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionActivecampaignUpsertContactType type; - - private FlowActionActivecampaignUpsertContactAction action; - - private FlowActionActivecampaignUpsertContactParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionActivecampaignUpsertContact other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionActivecampaignUpsertContactType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionActivecampaignUpsertContactAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionActivecampaignUpsertContactParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionActivecampaignUpsertContact build() { - return new FlowActionActivecampaignUpsertContact( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignUpsertContactAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignUpsertContactAction.java deleted file mode 100644 index 350111a64..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignUpsertContactAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionActivecampaignUpsertContactAction { - public static final FlowActionActivecampaignUpsertContactAction UPSERT_CONTACT = - new FlowActionActivecampaignUpsertContactAction(Value.UPSERT_CONTACT, "UPSERT_CONTACT"); - - private final Value value; - - private final String string; - - FlowActionActivecampaignUpsertContactAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionActivecampaignUpsertContactAction - && this.string.equals(((FlowActionActivecampaignUpsertContactAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case UPSERT_CONTACT: - return visitor.visitUpsertContact(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionActivecampaignUpsertContactAction valueOf(String value) { - switch (value) { - case "UPSERT_CONTACT": - return UPSERT_CONTACT; - default: - return new FlowActionActivecampaignUpsertContactAction(Value.UNKNOWN, value); - } - } - - public enum Value { - UPSERT_CONTACT, - - UNKNOWN - } - - public interface Visitor { - T visitUpsertContact(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignUpsertContactParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignUpsertContactParams.java deleted file mode 100644 index 756f1d32e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignUpsertContactParams.java +++ /dev/null @@ -1,253 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionActivecampaignUpsertContactParams.Builder.class) -public final class FlowActionActivecampaignUpsertContactParams { - private final String connectionId; - - private final String email; - - private final Optional firstName; - - private final Optional lastName; - - private final Optional phone; - - private final Optional> customFields; - - private final Map additionalProperties; - - private FlowActionActivecampaignUpsertContactParams( - String connectionId, - String email, - Optional firstName, - Optional lastName, - Optional phone, - Optional> customFields, - Map additionalProperties) { - this.connectionId = connectionId; - this.email = email; - this.firstName = firstName; - this.lastName = lastName; - this.phone = phone; - this.customFields = customFields; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("email") - public String getEmail() { - return email; - } - - @JsonProperty("first_name") - public Optional getFirstName() { - return firstName; - } - - @JsonProperty("last_name") - public Optional getLastName() { - return lastName; - } - - @JsonProperty("phone") - public Optional getPhone() { - return phone; - } - - @JsonProperty("custom_fields") - public Optional> getCustomFields() { - return customFields; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionActivecampaignUpsertContactParams - && equalTo((FlowActionActivecampaignUpsertContactParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionActivecampaignUpsertContactParams other) { - return connectionId.equals(other.connectionId) - && email.equals(other.email) - && firstName.equals(other.firstName) - && lastName.equals(other.lastName) - && phone.equals(other.phone) - && customFields.equals(other.customFields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, this.email, this.firstName, this.lastName, this.phone, this.customFields); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - EmailStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionActivecampaignUpsertContactParams other); - } - - public interface EmailStage { - _FinalStage email(@NotNull String email); - } - - public interface _FinalStage { - FlowActionActivecampaignUpsertContactParams build(); - - _FinalStage firstName(Optional firstName); - - _FinalStage firstName(String firstName); - - _FinalStage lastName(Optional lastName); - - _FinalStage lastName(String lastName); - - _FinalStage phone(Optional phone); - - _FinalStage phone(String phone); - - _FinalStage customFields(Optional> customFields); - - _FinalStage customFields(Map customFields); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, EmailStage, _FinalStage { - private String connectionId; - - private String email; - - private Optional> customFields = Optional.empty(); - - private Optional phone = Optional.empty(); - - private Optional lastName = Optional.empty(); - - private Optional firstName = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionActivecampaignUpsertContactParams other) { - connectionId(other.getConnectionId()); - email(other.getEmail()); - firstName(other.getFirstName()); - lastName(other.getLastName()); - phone(other.getPhone()); - customFields(other.getCustomFields()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public EmailStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("email") - public _FinalStage email(@NotNull String email) { - this.email = Objects.requireNonNull(email, "email must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage customFields(Map customFields) { - this.customFields = Optional.ofNullable(customFields); - return this; - } - - @java.lang.Override - @JsonSetter(value = "custom_fields", nulls = Nulls.SKIP) - public _FinalStage customFields(Optional> customFields) { - this.customFields = customFields; - return this; - } - - @java.lang.Override - public _FinalStage phone(String phone) { - this.phone = Optional.ofNullable(phone); - return this; - } - - @java.lang.Override - @JsonSetter(value = "phone", nulls = Nulls.SKIP) - public _FinalStage phone(Optional phone) { - this.phone = phone; - return this; - } - - @java.lang.Override - public _FinalStage lastName(String lastName) { - this.lastName = Optional.ofNullable(lastName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "last_name", nulls = Nulls.SKIP) - public _FinalStage lastName(Optional lastName) { - this.lastName = lastName; - return this; - } - - @java.lang.Override - public _FinalStage firstName(String firstName) { - this.firstName = Optional.ofNullable(firstName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "first_name", nulls = Nulls.SKIP) - public _FinalStage firstName(Optional firstName) { - this.firstName = firstName; - return this; - } - - @java.lang.Override - public FlowActionActivecampaignUpsertContactParams build() { - return new FlowActionActivecampaignUpsertContactParams( - connectionId, email, firstName, lastName, phone, customFields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignUpsertContactType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignUpsertContactType.java deleted file mode 100644 index cc48d487c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionActivecampaignUpsertContactType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionActivecampaignUpsertContactType { - public static final FlowActionActivecampaignUpsertContactType ACTIVECAMPAIGN = - new FlowActionActivecampaignUpsertContactType(Value.ACTIVECAMPAIGN, "ACTIVECAMPAIGN"); - - private final Value value; - - private final String string; - - FlowActionActivecampaignUpsertContactType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionActivecampaignUpsertContactType - && this.string.equals(((FlowActionActivecampaignUpsertContactType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ACTIVECAMPAIGN: - return visitor.visitActivecampaign(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionActivecampaignUpsertContactType valueOf(String value) { - switch (value) { - case "ACTIVECAMPAIGN": - return ACTIVECAMPAIGN; - default: - return new FlowActionActivecampaignUpsertContactType(Value.UNKNOWN, value); - } - } - - public enum Value { - ACTIVECAMPAIGN, - - UNKNOWN - } - - public interface Visitor { - T visitActivecampaign(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtable.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtable.java deleted file mode 100644 index c7d701ea4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtable.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionAirtable.Deserializer.class) -public final class FlowActionAirtable { - private final Object value; - - private final int type; - - private FlowActionAirtable(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((FlowActionAirtableCreateRecord) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowActionAirtableListRecords) this.value); - } else if (this.type == 2) { - return visitor.visit((FlowActionAirtableUpdateRecord) 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 FlowActionAirtable && equalTo((FlowActionAirtable) other); - } - - private boolean equalTo(FlowActionAirtable 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 FlowActionAirtable of(FlowActionAirtableCreateRecord value) { - return new FlowActionAirtable(value, 0); - } - - public static FlowActionAirtable of(FlowActionAirtableListRecords value) { - return new FlowActionAirtable(value, 1); - } - - public static FlowActionAirtable of(FlowActionAirtableUpdateRecord value) { - return new FlowActionAirtable(value, 2); - } - - public interface Visitor { - T visit(FlowActionAirtableCreateRecord value); - - T visit(FlowActionAirtableListRecords value); - - T visit(FlowActionAirtableUpdateRecord value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionAirtable.class); - } - - @java.lang.Override - public FlowActionAirtable deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAirtableCreateRecord.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAirtableListRecords.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAirtableUpdateRecord.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableCreateRecord.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableCreateRecord.java deleted file mode 100644 index 4798e813f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableCreateRecord.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAirtableCreateRecord.Builder.class) -public final class FlowActionAirtableCreateRecord { - private final String id; - - private final Optional alias; - - private final FlowActionAirtableCreateRecordType type; - - private final FlowActionAirtableCreateRecordAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionAirtableCreateRecordParams params; - - private final Map additionalProperties; - - private FlowActionAirtableCreateRecord( - String id, - Optional alias, - FlowActionAirtableCreateRecordType type, - FlowActionAirtableCreateRecordAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionAirtableCreateRecordParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionAirtableCreateRecordType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionAirtableCreateRecordAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionAirtableCreateRecordParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAirtableCreateRecord && equalTo((FlowActionAirtableCreateRecord) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAirtableCreateRecord other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionAirtableCreateRecord other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionAirtableCreateRecordType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionAirtableCreateRecordAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionAirtableCreateRecordParams params); - } - - public interface _FinalStage { - FlowActionAirtableCreateRecord build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionAirtableCreateRecordType type; - - private FlowActionAirtableCreateRecordAction action; - - private FlowActionAirtableCreateRecordParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAirtableCreateRecord other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionAirtableCreateRecordType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionAirtableCreateRecordAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionAirtableCreateRecordParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionAirtableCreateRecord build() { - return new FlowActionAirtableCreateRecord( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableCreateRecordAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableCreateRecordAction.java deleted file mode 100644 index 70ec07d83..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableCreateRecordAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAirtableCreateRecordAction { - public static final FlowActionAirtableCreateRecordAction CREATE_RECORD = - new FlowActionAirtableCreateRecordAction(Value.CREATE_RECORD, "CREATE_RECORD"); - - private final Value value; - - private final String string; - - FlowActionAirtableCreateRecordAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAirtableCreateRecordAction - && this.string.equals(((FlowActionAirtableCreateRecordAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CREATE_RECORD: - return visitor.visitCreateRecord(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionAirtableCreateRecordAction valueOf(String value) { - switch (value) { - case "CREATE_RECORD": - return CREATE_RECORD; - default: - return new FlowActionAirtableCreateRecordAction(Value.UNKNOWN, value); - } - } - - public enum Value { - CREATE_RECORD, - - UNKNOWN - } - - public interface Visitor { - T visitCreateRecord(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableCreateRecordParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableCreateRecordParams.java deleted file mode 100644 index 1b77ec248..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableCreateRecordParams.java +++ /dev/null @@ -1,186 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAirtableCreateRecordParams.Builder.class) -public final class FlowActionAirtableCreateRecordParams { - private final String connectionId; - - private final String baseId; - - private final String tableName; - - private final Optional> fields; - - private final Map additionalProperties; - - private FlowActionAirtableCreateRecordParams( - String connectionId, - String baseId, - String tableName, - Optional> fields, - Map additionalProperties) { - this.connectionId = connectionId; - this.baseId = baseId; - this.tableName = tableName; - this.fields = fields; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("base_id") - public String getBaseId() { - return baseId; - } - - @JsonProperty("table_name") - public String getTableName() { - return tableName; - } - - @JsonProperty("fields") - public Optional> getFields() { - return fields; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAirtableCreateRecordParams - && equalTo((FlowActionAirtableCreateRecordParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAirtableCreateRecordParams other) { - return connectionId.equals(other.connectionId) - && baseId.equals(other.baseId) - && tableName.equals(other.tableName) - && fields.equals(other.fields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.baseId, this.tableName, this.fields); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - BaseIdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionAirtableCreateRecordParams other); - } - - public interface BaseIdStage { - TableNameStage baseId(@NotNull String baseId); - } - - public interface TableNameStage { - _FinalStage tableName(@NotNull String tableName); - } - - public interface _FinalStage { - FlowActionAirtableCreateRecordParams build(); - - _FinalStage fields(Optional> fields); - - _FinalStage fields(Map fields); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, BaseIdStage, TableNameStage, _FinalStage { - private String connectionId; - - private String baseId; - - private String tableName; - - private Optional> fields = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAirtableCreateRecordParams other) { - connectionId(other.getConnectionId()); - baseId(other.getBaseId()); - tableName(other.getTableName()); - fields(other.getFields()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public BaseIdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("base_id") - public TableNameStage baseId(@NotNull String baseId) { - this.baseId = Objects.requireNonNull(baseId, "baseId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("table_name") - public _FinalStage tableName(@NotNull String tableName) { - this.tableName = Objects.requireNonNull(tableName, "tableName must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage fields(Map fields) { - this.fields = Optional.ofNullable(fields); - return this; - } - - @java.lang.Override - @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public _FinalStage fields(Optional> fields) { - this.fields = fields; - return this; - } - - @java.lang.Override - public FlowActionAirtableCreateRecordParams build() { - return new FlowActionAirtableCreateRecordParams( - connectionId, baseId, tableName, fields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableCreateRecordType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableCreateRecordType.java deleted file mode 100644 index 1f6369741..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableCreateRecordType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAirtableCreateRecordType { - public static final FlowActionAirtableCreateRecordType AIRTABLE = - new FlowActionAirtableCreateRecordType(Value.AIRTABLE, "AIRTABLE"); - - private final Value value; - - private final String string; - - FlowActionAirtableCreateRecordType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAirtableCreateRecordType - && this.string.equals(((FlowActionAirtableCreateRecordType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AIRTABLE: - return visitor.visitAirtable(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionAirtableCreateRecordType valueOf(String value) { - switch (value) { - case "AIRTABLE": - return AIRTABLE; - default: - return new FlowActionAirtableCreateRecordType(Value.UNKNOWN, value); - } - } - - public enum Value { - AIRTABLE, - - UNKNOWN - } - - public interface Visitor { - T visitAirtable(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableListRecords.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableListRecords.java deleted file mode 100644 index d877cf0b8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableListRecords.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAirtableListRecords.Builder.class) -public final class FlowActionAirtableListRecords { - private final String id; - - private final Optional alias; - - private final FlowActionAirtableListRecordsType type; - - private final FlowActionAirtableListRecordsAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionAirtableListRecordsParams params; - - private final Map additionalProperties; - - private FlowActionAirtableListRecords( - String id, - Optional alias, - FlowActionAirtableListRecordsType type, - FlowActionAirtableListRecordsAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionAirtableListRecordsParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionAirtableListRecordsType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionAirtableListRecordsAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionAirtableListRecordsParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAirtableListRecords && equalTo((FlowActionAirtableListRecords) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAirtableListRecords other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionAirtableListRecords other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionAirtableListRecordsType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionAirtableListRecordsAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionAirtableListRecordsParams params); - } - - public interface _FinalStage { - FlowActionAirtableListRecords build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionAirtableListRecordsType type; - - private FlowActionAirtableListRecordsAction action; - - private FlowActionAirtableListRecordsParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAirtableListRecords other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionAirtableListRecordsType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionAirtableListRecordsAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionAirtableListRecordsParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionAirtableListRecords build() { - return new FlowActionAirtableListRecords( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableListRecordsAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableListRecordsAction.java deleted file mode 100644 index 00da90e99..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableListRecordsAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAirtableListRecordsAction { - public static final FlowActionAirtableListRecordsAction LIST_RECORDS = - new FlowActionAirtableListRecordsAction(Value.LIST_RECORDS, "LIST_RECORDS"); - - private final Value value; - - private final String string; - - FlowActionAirtableListRecordsAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAirtableListRecordsAction - && this.string.equals(((FlowActionAirtableListRecordsAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case LIST_RECORDS: - return visitor.visitListRecords(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionAirtableListRecordsAction valueOf(String value) { - switch (value) { - case "LIST_RECORDS": - return LIST_RECORDS; - default: - return new FlowActionAirtableListRecordsAction(Value.UNKNOWN, value); - } - } - - public enum Value { - LIST_RECORDS, - - UNKNOWN - } - - public interface Visitor { - T visitListRecords(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableListRecordsParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableListRecordsParams.java deleted file mode 100644 index cf5310d9f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableListRecordsParams.java +++ /dev/null @@ -1,216 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAirtableListRecordsParams.Builder.class) -public final class FlowActionAirtableListRecordsParams { - private final String connectionId; - - private final String baseId; - - private final String tableName; - - private final Optional query; - - private final Optional view; - - private final Map additionalProperties; - - private FlowActionAirtableListRecordsParams( - String connectionId, - String baseId, - String tableName, - Optional query, - Optional view, - Map additionalProperties) { - this.connectionId = connectionId; - this.baseId = baseId; - this.tableName = tableName; - this.query = query; - this.view = view; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("base_id") - public String getBaseId() { - return baseId; - } - - @JsonProperty("table_name") - public String getTableName() { - return tableName; - } - - @JsonProperty("query") - public Optional getQuery() { - return query; - } - - @JsonProperty("view") - public Optional getView() { - return view; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAirtableListRecordsParams - && equalTo((FlowActionAirtableListRecordsParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAirtableListRecordsParams other) { - return connectionId.equals(other.connectionId) - && baseId.equals(other.baseId) - && tableName.equals(other.tableName) - && query.equals(other.query) - && view.equals(other.view); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.baseId, this.tableName, this.query, this.view); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - BaseIdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionAirtableListRecordsParams other); - } - - public interface BaseIdStage { - TableNameStage baseId(@NotNull String baseId); - } - - public interface TableNameStage { - _FinalStage tableName(@NotNull String tableName); - } - - public interface _FinalStage { - FlowActionAirtableListRecordsParams build(); - - _FinalStage query(Optional query); - - _FinalStage query(String query); - - _FinalStage view(Optional view); - - _FinalStage view(String view); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, BaseIdStage, TableNameStage, _FinalStage { - private String connectionId; - - private String baseId; - - private String tableName; - - private Optional view = Optional.empty(); - - private Optional query = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAirtableListRecordsParams other) { - connectionId(other.getConnectionId()); - baseId(other.getBaseId()); - tableName(other.getTableName()); - query(other.getQuery()); - view(other.getView()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public BaseIdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("base_id") - public TableNameStage baseId(@NotNull String baseId) { - this.baseId = Objects.requireNonNull(baseId, "baseId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("table_name") - public _FinalStage tableName(@NotNull String tableName) { - this.tableName = Objects.requireNonNull(tableName, "tableName must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage view(String view) { - this.view = Optional.ofNullable(view); - return this; - } - - @java.lang.Override - @JsonSetter(value = "view", nulls = Nulls.SKIP) - public _FinalStage view(Optional view) { - this.view = view; - return this; - } - - @java.lang.Override - public _FinalStage query(String query) { - this.query = Optional.ofNullable(query); - return this; - } - - @java.lang.Override - @JsonSetter(value = "query", nulls = Nulls.SKIP) - public _FinalStage query(Optional query) { - this.query = query; - return this; - } - - @java.lang.Override - public FlowActionAirtableListRecordsParams build() { - return new FlowActionAirtableListRecordsParams( - connectionId, baseId, tableName, query, view, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableListRecordsType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableListRecordsType.java deleted file mode 100644 index fd2654af8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableListRecordsType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAirtableListRecordsType { - public static final FlowActionAirtableListRecordsType AIRTABLE = - new FlowActionAirtableListRecordsType(Value.AIRTABLE, "AIRTABLE"); - - private final Value value; - - private final String string; - - FlowActionAirtableListRecordsType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAirtableListRecordsType - && this.string.equals(((FlowActionAirtableListRecordsType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AIRTABLE: - return visitor.visitAirtable(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionAirtableListRecordsType valueOf(String value) { - switch (value) { - case "AIRTABLE": - return AIRTABLE; - default: - return new FlowActionAirtableListRecordsType(Value.UNKNOWN, value); - } - } - - public enum Value { - AIRTABLE, - - UNKNOWN - } - - public interface Visitor { - T visitAirtable(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableUpdateRecord.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableUpdateRecord.java deleted file mode 100644 index 49678b614..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableUpdateRecord.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAirtableUpdateRecord.Builder.class) -public final class FlowActionAirtableUpdateRecord { - private final String id; - - private final Optional alias; - - private final FlowActionAirtableUpdateRecordType type; - - private final FlowActionAirtableUpdateRecordAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionAirtableUpdateRecordParams params; - - private final Map additionalProperties; - - private FlowActionAirtableUpdateRecord( - String id, - Optional alias, - FlowActionAirtableUpdateRecordType type, - FlowActionAirtableUpdateRecordAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionAirtableUpdateRecordParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionAirtableUpdateRecordType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionAirtableUpdateRecordAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionAirtableUpdateRecordParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAirtableUpdateRecord && equalTo((FlowActionAirtableUpdateRecord) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAirtableUpdateRecord other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionAirtableUpdateRecord other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionAirtableUpdateRecordType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionAirtableUpdateRecordAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionAirtableUpdateRecordParams params); - } - - public interface _FinalStage { - FlowActionAirtableUpdateRecord build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionAirtableUpdateRecordType type; - - private FlowActionAirtableUpdateRecordAction action; - - private FlowActionAirtableUpdateRecordParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAirtableUpdateRecord other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionAirtableUpdateRecordType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionAirtableUpdateRecordAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionAirtableUpdateRecordParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionAirtableUpdateRecord build() { - return new FlowActionAirtableUpdateRecord( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableUpdateRecordAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableUpdateRecordAction.java deleted file mode 100644 index 4cabdb1aa..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableUpdateRecordAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAirtableUpdateRecordAction { - public static final FlowActionAirtableUpdateRecordAction UPDATE_RECORD = - new FlowActionAirtableUpdateRecordAction(Value.UPDATE_RECORD, "UPDATE_RECORD"); - - private final Value value; - - private final String string; - - FlowActionAirtableUpdateRecordAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAirtableUpdateRecordAction - && this.string.equals(((FlowActionAirtableUpdateRecordAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case UPDATE_RECORD: - return visitor.visitUpdateRecord(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionAirtableUpdateRecordAction valueOf(String value) { - switch (value) { - case "UPDATE_RECORD": - return UPDATE_RECORD; - default: - return new FlowActionAirtableUpdateRecordAction(Value.UNKNOWN, value); - } - } - - public enum Value { - UPDATE_RECORD, - - UNKNOWN - } - - public interface Visitor { - T visitUpdateRecord(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableUpdateRecordParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableUpdateRecordParams.java deleted file mode 100644 index cc9e72e32..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableUpdateRecordParams.java +++ /dev/null @@ -1,211 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAirtableUpdateRecordParams.Builder.class) -public final class FlowActionAirtableUpdateRecordParams { - private final String connectionId; - - private final String baseId; - - private final String tableName; - - private final String recordId; - - private final Optional> fields; - - private final Map additionalProperties; - - private FlowActionAirtableUpdateRecordParams( - String connectionId, - String baseId, - String tableName, - String recordId, - Optional> fields, - Map additionalProperties) { - this.connectionId = connectionId; - this.baseId = baseId; - this.tableName = tableName; - this.recordId = recordId; - this.fields = fields; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("base_id") - public String getBaseId() { - return baseId; - } - - @JsonProperty("table_name") - public String getTableName() { - return tableName; - } - - @JsonProperty("record_id") - public String getRecordId() { - return recordId; - } - - @JsonProperty("fields") - public Optional> getFields() { - return fields; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAirtableUpdateRecordParams - && equalTo((FlowActionAirtableUpdateRecordParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAirtableUpdateRecordParams other) { - return connectionId.equals(other.connectionId) - && baseId.equals(other.baseId) - && tableName.equals(other.tableName) - && recordId.equals(other.recordId) - && fields.equals(other.fields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.baseId, this.tableName, this.recordId, this.fields); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - BaseIdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionAirtableUpdateRecordParams other); - } - - public interface BaseIdStage { - TableNameStage baseId(@NotNull String baseId); - } - - public interface TableNameStage { - RecordIdStage tableName(@NotNull String tableName); - } - - public interface RecordIdStage { - _FinalStage recordId(@NotNull String recordId); - } - - public interface _FinalStage { - FlowActionAirtableUpdateRecordParams build(); - - _FinalStage fields(Optional> fields); - - _FinalStage fields(Map fields); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements ConnectionIdStage, BaseIdStage, TableNameStage, RecordIdStage, _FinalStage { - private String connectionId; - - private String baseId; - - private String tableName; - - private String recordId; - - private Optional> fields = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAirtableUpdateRecordParams other) { - connectionId(other.getConnectionId()); - baseId(other.getBaseId()); - tableName(other.getTableName()); - recordId(other.getRecordId()); - fields(other.getFields()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public BaseIdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("base_id") - public TableNameStage baseId(@NotNull String baseId) { - this.baseId = Objects.requireNonNull(baseId, "baseId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("table_name") - public RecordIdStage tableName(@NotNull String tableName) { - this.tableName = Objects.requireNonNull(tableName, "tableName must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("record_id") - public _FinalStage recordId(@NotNull String recordId) { - this.recordId = Objects.requireNonNull(recordId, "recordId must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage fields(Map fields) { - this.fields = Optional.ofNullable(fields); - return this; - } - - @java.lang.Override - @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public _FinalStage fields(Optional> fields) { - this.fields = fields; - return this; - } - - @java.lang.Override - public FlowActionAirtableUpdateRecordParams build() { - return new FlowActionAirtableUpdateRecordParams( - connectionId, baseId, tableName, recordId, fields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableUpdateRecordType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableUpdateRecordType.java deleted file mode 100644 index 7fbcedff3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAirtableUpdateRecordType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAirtableUpdateRecordType { - public static final FlowActionAirtableUpdateRecordType AIRTABLE = - new FlowActionAirtableUpdateRecordType(Value.AIRTABLE, "AIRTABLE"); - - private final Value value; - - private final String string; - - FlowActionAirtableUpdateRecordType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAirtableUpdateRecordType - && this.string.equals(((FlowActionAirtableUpdateRecordType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AIRTABLE: - return visitor.visitAirtable(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionAirtableUpdateRecordType valueOf(String value) { - switch (value) { - case "AIRTABLE": - return AIRTABLE; - default: - return new FlowActionAirtableUpdateRecordType(Value.UNKNOWN, value); - } - } - - public enum Value { - AIRTABLE, - - UNKNOWN - } - - public interface Visitor { - T visitAirtable(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0.java deleted file mode 100644 index 08557e778..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionAuth0.Deserializer.class) -public final class FlowActionAuth0 { - private final Object value; - - private final int type; - - private FlowActionAuth0(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((FlowActionAuth0CreateUser) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowActionAuth0GetUser) this.value); - } else if (this.type == 2) { - return visitor.visit((FlowActionAuth0UpdateUser) this.value); - } else if (this.type == 3) { - return visitor.visit((FlowActionAuth0SendRequest) this.value); - } else if (this.type == 4) { - return visitor.visit((FlowActionAuth0SendEmail) this.value); - } else if (this.type == 5) { - return visitor.visit((FlowActionAuth0SendSms) this.value); - } else if (this.type == 6) { - return visitor.visit((FlowActionAuth0MakeCall) 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 FlowActionAuth0 && equalTo((FlowActionAuth0) other); - } - - private boolean equalTo(FlowActionAuth0 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 FlowActionAuth0 of(FlowActionAuth0CreateUser value) { - return new FlowActionAuth0(value, 0); - } - - public static FlowActionAuth0 of(FlowActionAuth0GetUser value) { - return new FlowActionAuth0(value, 1); - } - - public static FlowActionAuth0 of(FlowActionAuth0UpdateUser value) { - return new FlowActionAuth0(value, 2); - } - - public static FlowActionAuth0 of(FlowActionAuth0SendRequest value) { - return new FlowActionAuth0(value, 3); - } - - public static FlowActionAuth0 of(FlowActionAuth0SendEmail value) { - return new FlowActionAuth0(value, 4); - } - - public static FlowActionAuth0 of(FlowActionAuth0SendSms value) { - return new FlowActionAuth0(value, 5); - } - - public static FlowActionAuth0 of(FlowActionAuth0MakeCall value) { - return new FlowActionAuth0(value, 6); - } - - public interface Visitor { - T visit(FlowActionAuth0CreateUser value); - - T visit(FlowActionAuth0GetUser value); - - T visit(FlowActionAuth0UpdateUser value); - - T visit(FlowActionAuth0SendRequest value); - - T visit(FlowActionAuth0SendEmail value); - - T visit(FlowActionAuth0SendSms value); - - T visit(FlowActionAuth0MakeCall value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionAuth0.class); - } - - @java.lang.Override - public FlowActionAuth0 deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0CreateUser.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0GetUser.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0UpdateUser.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0SendRequest.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0SendEmail.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0SendSms.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionAuth0MakeCall.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0CreateUser.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0CreateUser.java deleted file mode 100644 index e91bddef2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0CreateUser.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAuth0CreateUser.Builder.class) -public final class FlowActionAuth0CreateUser { - private final String id; - - private final Optional alias; - - private final FlowActionAuth0CreateUserType type; - - private final FlowActionAuth0CreateUserAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionAuth0CreateUserParams params; - - private final Map additionalProperties; - - private FlowActionAuth0CreateUser( - String id, - Optional alias, - FlowActionAuth0CreateUserType type, - FlowActionAuth0CreateUserAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionAuth0CreateUserParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionAuth0CreateUserType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionAuth0CreateUserAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionAuth0CreateUserParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAuth0CreateUser && equalTo((FlowActionAuth0CreateUser) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAuth0CreateUser other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionAuth0CreateUser other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionAuth0CreateUserType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionAuth0CreateUserAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionAuth0CreateUserParams params); - } - - public interface _FinalStage { - FlowActionAuth0CreateUser build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionAuth0CreateUserType type; - - private FlowActionAuth0CreateUserAction action; - - private FlowActionAuth0CreateUserParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAuth0CreateUser other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionAuth0CreateUserType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionAuth0CreateUserAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionAuth0CreateUserParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionAuth0CreateUser build() { - return new FlowActionAuth0CreateUser( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0CreateUserAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0CreateUserAction.java deleted file mode 100644 index cbe5d985e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0CreateUserAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAuth0CreateUserAction { - public static final FlowActionAuth0CreateUserAction CREATE_USER = - new FlowActionAuth0CreateUserAction(Value.CREATE_USER, "CREATE_USER"); - - private final Value value; - - private final String string; - - FlowActionAuth0CreateUserAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAuth0CreateUserAction - && this.string.equals(((FlowActionAuth0CreateUserAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CREATE_USER: - return visitor.visitCreateUser(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionAuth0CreateUserAction valueOf(String value) { - switch (value) { - case "CREATE_USER": - return CREATE_USER; - default: - return new FlowActionAuth0CreateUserAction(Value.UNKNOWN, value); - } - } - - public enum Value { - CREATE_USER, - - UNKNOWN - } - - public interface Visitor { - T visitCreateUser(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0CreateUserParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0CreateUserParams.java deleted file mode 100644 index adee48f44..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0CreateUserParams.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = FlowActionAuth0CreateUserParams.Builder.class) -public final class FlowActionAuth0CreateUserParams { - private final String connectionId; - - private final Map payload; - - private final Map additionalProperties; - - private FlowActionAuth0CreateUserParams( - String connectionId, Map payload, Map additionalProperties) { - this.connectionId = connectionId; - this.payload = payload; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("payload") - public Map getPayload() { - return payload; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAuth0CreateUserParams && equalTo((FlowActionAuth0CreateUserParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAuth0CreateUserParams other) { - return connectionId.equals(other.connectionId) && payload.equals(other.payload); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.payload); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - _FinalStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionAuth0CreateUserParams other); - } - - public interface _FinalStage { - FlowActionAuth0CreateUserParams build(); - - _FinalStage payload(Map payload); - - _FinalStage putAllPayload(Map payload); - - _FinalStage payload(String key, Object value); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, _FinalStage { - private String connectionId; - - private Map payload = new LinkedHashMap<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAuth0CreateUserParams other) { - connectionId(other.getConnectionId()); - payload(other.getPayload()); - return this; - } - - @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 _FinalStage payload(String key, Object value) { - this.payload.put(key, value); - return this; - } - - @java.lang.Override - public _FinalStage putAllPayload(Map payload) { - if (payload != null) { - this.payload.putAll(payload); - } - return this; - } - - @java.lang.Override - @JsonSetter(value = "payload", nulls = Nulls.SKIP) - public _FinalStage payload(Map payload) { - this.payload.clear(); - if (payload != null) { - this.payload.putAll(payload); - } - return this; - } - - @java.lang.Override - public FlowActionAuth0CreateUserParams build() { - return new FlowActionAuth0CreateUserParams(connectionId, payload, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0CreateUserType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0CreateUserType.java deleted file mode 100644 index 1fe58c78d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0CreateUserType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAuth0CreateUserType { - public static final FlowActionAuth0CreateUserType AUTH0 = new FlowActionAuth0CreateUserType(Value.AUTH0, "AUTH0"); - - private final Value value; - - private final String string; - - FlowActionAuth0CreateUserType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAuth0CreateUserType - && this.string.equals(((FlowActionAuth0CreateUserType) 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 FlowActionAuth0CreateUserType valueOf(String value) { - switch (value) { - case "AUTH0": - return AUTH0; - default: - return new FlowActionAuth0CreateUserType(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/FlowActionAuth0GetUser.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0GetUser.java deleted file mode 100644 index 4cae3a052..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0GetUser.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAuth0GetUser.Builder.class) -public final class FlowActionAuth0GetUser { - private final String id; - - private final Optional alias; - - private final FlowActionAuth0GetUserType type; - - private final FlowActionAuth0GetUserAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionAuth0GetUserParams params; - - private final Map additionalProperties; - - private FlowActionAuth0GetUser( - String id, - Optional alias, - FlowActionAuth0GetUserType type, - FlowActionAuth0GetUserAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionAuth0GetUserParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionAuth0GetUserType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionAuth0GetUserAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionAuth0GetUserParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAuth0GetUser && equalTo((FlowActionAuth0GetUser) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAuth0GetUser other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionAuth0GetUser other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionAuth0GetUserType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionAuth0GetUserAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionAuth0GetUserParams params); - } - - public interface _FinalStage { - FlowActionAuth0GetUser build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionAuth0GetUserType type; - - private FlowActionAuth0GetUserAction action; - - private FlowActionAuth0GetUserParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAuth0GetUser other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionAuth0GetUserType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionAuth0GetUserAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionAuth0GetUserParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionAuth0GetUser build() { - return new FlowActionAuth0GetUser( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0GetUserAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0GetUserAction.java deleted file mode 100644 index df13a112a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0GetUserAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAuth0GetUserAction { - public static final FlowActionAuth0GetUserAction GET_USER = - new FlowActionAuth0GetUserAction(Value.GET_USER, "GET_USER"); - - private final Value value; - - private final String string; - - FlowActionAuth0GetUserAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAuth0GetUserAction - && this.string.equals(((FlowActionAuth0GetUserAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GET_USER: - return visitor.visitGetUser(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionAuth0GetUserAction valueOf(String value) { - switch (value) { - case "GET_USER": - return GET_USER; - default: - return new FlowActionAuth0GetUserAction(Value.UNKNOWN, value); - } - } - - public enum Value { - GET_USER, - - UNKNOWN - } - - public interface Visitor { - T visitGetUser(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0GetUserParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0GetUserParams.java deleted file mode 100644 index 6daecbc64..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0GetUserParams.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionAuth0GetUserParams.Builder.class) -public final class FlowActionAuth0GetUserParams { - private final String connectionId; - - private final String userId; - - private final Map additionalProperties; - - private FlowActionAuth0GetUserParams(String connectionId, String userId, Map additionalProperties) { - this.connectionId = connectionId; - this.userId = userId; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("user_id") - public String getUserId() { - return userId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAuth0GetUserParams && equalTo((FlowActionAuth0GetUserParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAuth0GetUserParams other) { - return connectionId.equals(other.connectionId) && userId.equals(other.userId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.userId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - UserIdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionAuth0GetUserParams other); - } - - public interface UserIdStage { - _FinalStage userId(@NotNull String userId); - } - - public interface _FinalStage { - FlowActionAuth0GetUserParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, UserIdStage, _FinalStage { - private String connectionId; - - private String userId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAuth0GetUserParams other) { - connectionId(other.getConnectionId()); - userId(other.getUserId()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public UserIdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @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 FlowActionAuth0GetUserParams build() { - return new FlowActionAuth0GetUserParams(connectionId, userId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0GetUserType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0GetUserType.java deleted file mode 100644 index 6f83a3d07..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0GetUserType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAuth0GetUserType { - public static final FlowActionAuth0GetUserType AUTH0 = new FlowActionAuth0GetUserType(Value.AUTH0, "AUTH0"); - - private final Value value; - - private final String string; - - FlowActionAuth0GetUserType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAuth0GetUserType - && this.string.equals(((FlowActionAuth0GetUserType) 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 FlowActionAuth0GetUserType valueOf(String value) { - switch (value) { - case "AUTH0": - return AUTH0; - default: - return new FlowActionAuth0GetUserType(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/FlowActionAuth0MakeCall.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0MakeCall.java deleted file mode 100644 index 1a443ca5b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0MakeCall.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAuth0MakeCall.Builder.class) -public final class FlowActionAuth0MakeCall { - private final String id; - - private final Optional alias; - - private final FlowActionAuth0MakeCallType type; - - private final FlowActionAuth0MakeCallAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionAuth0MakeCallParams params; - - private final Map additionalProperties; - - private FlowActionAuth0MakeCall( - String id, - Optional alias, - FlowActionAuth0MakeCallType type, - FlowActionAuth0MakeCallAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionAuth0MakeCallParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionAuth0MakeCallType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionAuth0MakeCallAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionAuth0MakeCallParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAuth0MakeCall && equalTo((FlowActionAuth0MakeCall) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAuth0MakeCall other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionAuth0MakeCall other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionAuth0MakeCallType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionAuth0MakeCallAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionAuth0MakeCallParams params); - } - - public interface _FinalStage { - FlowActionAuth0MakeCall build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionAuth0MakeCallType type; - - private FlowActionAuth0MakeCallAction action; - - private FlowActionAuth0MakeCallParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAuth0MakeCall other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionAuth0MakeCallType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionAuth0MakeCallAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionAuth0MakeCallParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionAuth0MakeCall build() { - return new FlowActionAuth0MakeCall( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0MakeCallAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0MakeCallAction.java deleted file mode 100644 index a205cc683..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0MakeCallAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAuth0MakeCallAction { - public static final FlowActionAuth0MakeCallAction MAKE_CALL = - new FlowActionAuth0MakeCallAction(Value.MAKE_CALL, "MAKE_CALL"); - - private final Value value; - - private final String string; - - FlowActionAuth0MakeCallAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAuth0MakeCallAction - && this.string.equals(((FlowActionAuth0MakeCallAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MAKE_CALL: - return visitor.visitMakeCall(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionAuth0MakeCallAction valueOf(String value) { - switch (value) { - case "MAKE_CALL": - return MAKE_CALL; - default: - return new FlowActionAuth0MakeCallAction(Value.UNKNOWN, value); - } - } - - public enum Value { - MAKE_CALL, - - UNKNOWN - } - - public interface Visitor { - T visitMakeCall(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0MakeCallParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0MakeCallParams.java deleted file mode 100644 index 0d89ee8fe..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0MakeCallParams.java +++ /dev/null @@ -1,190 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAuth0MakeCallParams.Builder.class) -public final class FlowActionAuth0MakeCallParams { - private final Optional from; - - private final String to; - - private final String message; - - private final Optional> customVars; - - private final Map additionalProperties; - - private FlowActionAuth0MakeCallParams( - Optional from, - String to, - String message, - Optional> customVars, - Map additionalProperties) { - this.from = from; - this.to = to; - this.message = message; - this.customVars = customVars; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("from") - public Optional getFrom() { - return from; - } - - @JsonProperty("to") - public String getTo() { - return to; - } - - @JsonProperty("message") - public String getMessage() { - return message; - } - - @JsonProperty("custom_vars") - public Optional> getCustomVars() { - return customVars; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAuth0MakeCallParams && equalTo((FlowActionAuth0MakeCallParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAuth0MakeCallParams other) { - return from.equals(other.from) - && to.equals(other.to) - && message.equals(other.message) - && customVars.equals(other.customVars); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.from, this.to, this.message, this.customVars); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ToStage builder() { - return new Builder(); - } - - public interface ToStage { - MessageStage to(@NotNull String to); - - Builder from(FlowActionAuth0MakeCallParams other); - } - - public interface MessageStage { - _FinalStage message(@NotNull String message); - } - - public interface _FinalStage { - FlowActionAuth0MakeCallParams build(); - - _FinalStage from(Optional from); - - _FinalStage from(String from); - - _FinalStage customVars(Optional> customVars); - - _FinalStage customVars(Map customVars); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ToStage, MessageStage, _FinalStage { - private String to; - - private String message; - - private Optional> customVars = Optional.empty(); - - private Optional from = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAuth0MakeCallParams other) { - from(other.getFrom()); - to(other.getTo()); - message(other.getMessage()); - customVars(other.getCustomVars()); - return this; - } - - @java.lang.Override - @JsonSetter("to") - public MessageStage to(@NotNull String to) { - this.to = Objects.requireNonNull(to, "to must not be null"); - return this; - } - - @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 _FinalStage customVars(Map customVars) { - this.customVars = Optional.ofNullable(customVars); - return this; - } - - @java.lang.Override - @JsonSetter(value = "custom_vars", nulls = Nulls.SKIP) - public _FinalStage customVars(Optional> customVars) { - this.customVars = customVars; - return this; - } - - @java.lang.Override - public _FinalStage from(String from) { - this.from = Optional.ofNullable(from); - return this; - } - - @java.lang.Override - @JsonSetter(value = "from", nulls = Nulls.SKIP) - public _FinalStage from(Optional from) { - this.from = from; - return this; - } - - @java.lang.Override - public FlowActionAuth0MakeCallParams build() { - return new FlowActionAuth0MakeCallParams(from, to, message, customVars, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0MakeCallType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0MakeCallType.java deleted file mode 100644 index 42f3feff6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0MakeCallType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAuth0MakeCallType { - public static final FlowActionAuth0MakeCallType AUTH0 = new FlowActionAuth0MakeCallType(Value.AUTH0, "AUTH0"); - - private final Value value; - - private final String string; - - FlowActionAuth0MakeCallType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAuth0MakeCallType - && this.string.equals(((FlowActionAuth0MakeCallType) 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 FlowActionAuth0MakeCallType valueOf(String value) { - switch (value) { - case "AUTH0": - return AUTH0; - default: - return new FlowActionAuth0MakeCallType(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/FlowActionAuth0SendEmail.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendEmail.java deleted file mode 100644 index ace3b0056..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendEmail.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAuth0SendEmail.Builder.class) -public final class FlowActionAuth0SendEmail { - private final String id; - - private final Optional alias; - - private final FlowActionAuth0SendEmailType type; - - private final FlowActionAuth0SendEmailAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionAuth0SendEmailParams params; - - private final Map additionalProperties; - - private FlowActionAuth0SendEmail( - String id, - Optional alias, - FlowActionAuth0SendEmailType type, - FlowActionAuth0SendEmailAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionAuth0SendEmailParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionAuth0SendEmailType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionAuth0SendEmailAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionAuth0SendEmailParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAuth0SendEmail && equalTo((FlowActionAuth0SendEmail) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAuth0SendEmail other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionAuth0SendEmail other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionAuth0SendEmailType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionAuth0SendEmailAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionAuth0SendEmailParams params); - } - - public interface _FinalStage { - FlowActionAuth0SendEmail build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionAuth0SendEmailType type; - - private FlowActionAuth0SendEmailAction action; - - private FlowActionAuth0SendEmailParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAuth0SendEmail other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionAuth0SendEmailType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionAuth0SendEmailAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionAuth0SendEmailParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionAuth0SendEmail build() { - return new FlowActionAuth0SendEmail( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendEmailAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendEmailAction.java deleted file mode 100644 index 024781543..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendEmailAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAuth0SendEmailAction { - public static final FlowActionAuth0SendEmailAction SEND_EMAIL = - new FlowActionAuth0SendEmailAction(Value.SEND_EMAIL, "SEND_EMAIL"); - - private final Value value; - - private final String string; - - FlowActionAuth0SendEmailAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAuth0SendEmailAction - && this.string.equals(((FlowActionAuth0SendEmailAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SEND_EMAIL: - return visitor.visitSendEmail(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionAuth0SendEmailAction valueOf(String value) { - switch (value) { - case "SEND_EMAIL": - return SEND_EMAIL; - default: - return new FlowActionAuth0SendEmailAction(Value.UNKNOWN, value); - } - } - - public enum Value { - SEND_EMAIL, - - UNKNOWN - } - - public interface Visitor { - T visitSendEmail(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendEmailParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendEmailParams.java deleted file mode 100644 index e5271bfc8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendEmailParams.java +++ /dev/null @@ -1,214 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAuth0SendEmailParams.Builder.class) -public final class FlowActionAuth0SendEmailParams { - private final Optional from; - - private final String to; - - private final String subject; - - private final String body; - - private final Optional> customVars; - - private final Map additionalProperties; - - private FlowActionAuth0SendEmailParams( - Optional from, - String to, - String subject, - String body, - Optional> customVars, - Map additionalProperties) { - this.from = from; - this.to = to; - this.subject = subject; - this.body = body; - this.customVars = customVars; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("from") - public Optional getFrom() { - return from; - } - - @JsonProperty("to") - public String getTo() { - return to; - } - - @JsonProperty("subject") - public String getSubject() { - return subject; - } - - @JsonProperty("body") - public String getBody() { - return body; - } - - @JsonProperty("custom_vars") - public Optional> getCustomVars() { - return customVars; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAuth0SendEmailParams && equalTo((FlowActionAuth0SendEmailParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAuth0SendEmailParams other) { - return from.equals(other.from) - && to.equals(other.to) - && subject.equals(other.subject) - && body.equals(other.body) - && customVars.equals(other.customVars); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.from, this.to, this.subject, this.body, this.customVars); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ToStage builder() { - return new Builder(); - } - - public interface ToStage { - SubjectStage to(@NotNull String to); - - Builder from(FlowActionAuth0SendEmailParams other); - } - - public interface SubjectStage { - BodyStage subject(@NotNull String subject); - } - - public interface BodyStage { - _FinalStage body(@NotNull String body); - } - - public interface _FinalStage { - FlowActionAuth0SendEmailParams build(); - - _FinalStage from(Optional from); - - _FinalStage from(FlowActionAuth0SendEmailParamsFrom from); - - _FinalStage customVars(Optional> customVars); - - _FinalStage customVars(Map customVars); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ToStage, SubjectStage, BodyStage, _FinalStage { - private String to; - - private String subject; - - private String body; - - private Optional> customVars = Optional.empty(); - - private Optional from = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAuth0SendEmailParams other) { - from(other.getFrom()); - to(other.getTo()); - subject(other.getSubject()); - body(other.getBody()); - customVars(other.getCustomVars()); - return this; - } - - @java.lang.Override - @JsonSetter("to") - public SubjectStage to(@NotNull String to) { - this.to = Objects.requireNonNull(to, "to must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("subject") - public BodyStage subject(@NotNull String subject) { - this.subject = Objects.requireNonNull(subject, "subject must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("body") - public _FinalStage body(@NotNull String body) { - this.body = Objects.requireNonNull(body, "body must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage customVars(Map customVars) { - this.customVars = Optional.ofNullable(customVars); - return this; - } - - @java.lang.Override - @JsonSetter(value = "custom_vars", nulls = Nulls.SKIP) - public _FinalStage customVars(Optional> customVars) { - this.customVars = customVars; - return this; - } - - @java.lang.Override - public _FinalStage from(FlowActionAuth0SendEmailParamsFrom from) { - this.from = Optional.ofNullable(from); - return this; - } - - @java.lang.Override - @JsonSetter(value = "from", nulls = Nulls.SKIP) - public _FinalStage from(Optional from) { - this.from = from; - return this; - } - - @java.lang.Override - public FlowActionAuth0SendEmailParams build() { - return new FlowActionAuth0SendEmailParams(from, to, subject, body, customVars, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendEmailParamsFrom.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendEmailParamsFrom.java deleted file mode 100644 index e887fad68..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendEmailParamsFrom.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAuth0SendEmailParamsFrom.Builder.class) -public final class FlowActionAuth0SendEmailParamsFrom { - private final Optional name; - - private final String email; - - private final Map additionalProperties; - - private FlowActionAuth0SendEmailParamsFrom( - Optional name, String email, Map additionalProperties) { - this.name = name; - this.email = email; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("email") - public String getEmail() { - return email; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAuth0SendEmailParamsFrom - && equalTo((FlowActionAuth0SendEmailParamsFrom) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAuth0SendEmailParamsFrom other) { - return name.equals(other.name) && email.equals(other.email); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.email); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EmailStage builder() { - return new Builder(); - } - - public interface EmailStage { - _FinalStage email(@NotNull String email); - - Builder from(FlowActionAuth0SendEmailParamsFrom other); - } - - public interface _FinalStage { - FlowActionAuth0SendEmailParamsFrom build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EmailStage, _FinalStage { - private String email; - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAuth0SendEmailParamsFrom other) { - name(other.getName()); - email(other.getEmail()); - return this; - } - - @java.lang.Override - @JsonSetter("email") - public _FinalStage email(@NotNull String email) { - this.email = Objects.requireNonNull(email, "email must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public FlowActionAuth0SendEmailParamsFrom build() { - return new FlowActionAuth0SendEmailParamsFrom(name, email, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendEmailType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendEmailType.java deleted file mode 100644 index 26d7bf22c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendEmailType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAuth0SendEmailType { - public static final FlowActionAuth0SendEmailType AUTH0 = new FlowActionAuth0SendEmailType(Value.AUTH0, "AUTH0"); - - private final Value value; - - private final String string; - - FlowActionAuth0SendEmailType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAuth0SendEmailType - && this.string.equals(((FlowActionAuth0SendEmailType) 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 FlowActionAuth0SendEmailType valueOf(String value) { - switch (value) { - case "AUTH0": - return AUTH0; - default: - return new FlowActionAuth0SendEmailType(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/FlowActionAuth0SendRequest.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequest.java deleted file mode 100644 index 64e6c554a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequest.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAuth0SendRequest.Builder.class) -public final class FlowActionAuth0SendRequest { - private final String id; - - private final Optional alias; - - private final FlowActionAuth0SendRequestType type; - - private final FlowActionAuth0SendRequestAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionAuth0SendRequestParams params; - - private final Map additionalProperties; - - private FlowActionAuth0SendRequest( - String id, - Optional alias, - FlowActionAuth0SendRequestType type, - FlowActionAuth0SendRequestAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionAuth0SendRequestParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionAuth0SendRequestType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionAuth0SendRequestAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionAuth0SendRequestParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAuth0SendRequest && equalTo((FlowActionAuth0SendRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAuth0SendRequest other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionAuth0SendRequest other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionAuth0SendRequestType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionAuth0SendRequestAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionAuth0SendRequestParams params); - } - - public interface _FinalStage { - FlowActionAuth0SendRequest build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionAuth0SendRequestType type; - - private FlowActionAuth0SendRequestAction action; - - private FlowActionAuth0SendRequestParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAuth0SendRequest other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionAuth0SendRequestType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionAuth0SendRequestAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionAuth0SendRequestParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionAuth0SendRequest build() { - return new FlowActionAuth0SendRequest( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestAction.java deleted file mode 100644 index b948d2d13..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAuth0SendRequestAction { - public static final FlowActionAuth0SendRequestAction SEND_REQUEST = - new FlowActionAuth0SendRequestAction(Value.SEND_REQUEST, "SEND_REQUEST"); - - private final Value value; - - private final String string; - - FlowActionAuth0SendRequestAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAuth0SendRequestAction - && this.string.equals(((FlowActionAuth0SendRequestAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SEND_REQUEST: - return visitor.visitSendRequest(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionAuth0SendRequestAction valueOf(String value) { - switch (value) { - case "SEND_REQUEST": - return SEND_REQUEST; - default: - return new FlowActionAuth0SendRequestAction(Value.UNKNOWN, value); - } - } - - public enum Value { - SEND_REQUEST, - - UNKNOWN - } - - public interface Visitor { - T visitSendRequest(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestParams.java deleted file mode 100644 index a8f5fd9a9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestParams.java +++ /dev/null @@ -1,256 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = FlowActionAuth0SendRequestParams.Builder.class) -public final class FlowActionAuth0SendRequestParams { - private final String connectionId; - - private final String pathname; - - private final Optional method; - - private final Optional> headers; - - private final Optional>> params; - - private final Optional payload; - - private final Map additionalProperties; - - private FlowActionAuth0SendRequestParams( - String connectionId, - String pathname, - Optional method, - Optional> headers, - Optional>> params, - Optional payload, - Map additionalProperties) { - this.connectionId = connectionId; - this.pathname = pathname; - this.method = method; - this.headers = headers; - this.params = params; - this.payload = payload; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("pathname") - public String getPathname() { - return pathname; - } - - @JsonProperty("method") - public Optional getMethod() { - return method; - } - - @JsonProperty("headers") - public Optional> getHeaders() { - return headers; - } - - @JsonProperty("params") - public Optional>> getParams() { - return params; - } - - @JsonProperty("payload") - public Optional getPayload() { - return payload; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAuth0SendRequestParams && equalTo((FlowActionAuth0SendRequestParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAuth0SendRequestParams other) { - return connectionId.equals(other.connectionId) - && pathname.equals(other.pathname) - && method.equals(other.method) - && headers.equals(other.headers) - && params.equals(other.params) - && payload.equals(other.payload); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.pathname, this.method, this.headers, this.params, this.payload); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - PathnameStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionAuth0SendRequestParams other); - } - - public interface PathnameStage { - _FinalStage pathname(@NotNull String pathname); - } - - public interface _FinalStage { - FlowActionAuth0SendRequestParams build(); - - _FinalStage method(Optional method); - - _FinalStage method(FlowActionAuth0SendRequestParamsMethod method); - - _FinalStage headers(Optional> headers); - - _FinalStage headers(Map headers); - - _FinalStage params( - Optional>> params); - - _FinalStage params(Map> params); - - _FinalStage payload(Optional payload); - - _FinalStage payload(FlowActionAuth0SendRequestParamsPayload payload); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, PathnameStage, _FinalStage { - private String connectionId; - - private String pathname; - - private Optional payload = Optional.empty(); - - private Optional>> params = - Optional.empty(); - - private Optional> headers = Optional.empty(); - - private Optional method = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAuth0SendRequestParams other) { - connectionId(other.getConnectionId()); - pathname(other.getPathname()); - method(other.getMethod()); - headers(other.getHeaders()); - params(other.getParams()); - payload(other.getPayload()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public PathnameStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("pathname") - public _FinalStage pathname(@NotNull String pathname) { - this.pathname = Objects.requireNonNull(pathname, "pathname must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage payload(FlowActionAuth0SendRequestParamsPayload payload) { - this.payload = Optional.ofNullable(payload); - return this; - } - - @java.lang.Override - @JsonSetter(value = "payload", nulls = Nulls.SKIP) - public _FinalStage payload(Optional payload) { - this.payload = payload; - return this; - } - - @java.lang.Override - public _FinalStage params( - Map> params) { - this.params = Optional.ofNullable(params); - return this; - } - - @java.lang.Override - @JsonSetter(value = "params", nulls = Nulls.SKIP) - public _FinalStage params( - Optional>> params) { - this.params = params; - return this; - } - - @java.lang.Override - public _FinalStage headers(Map headers) { - this.headers = Optional.ofNullable(headers); - return this; - } - - @java.lang.Override - @JsonSetter(value = "headers", nulls = Nulls.SKIP) - public _FinalStage headers(Optional> headers) { - this.headers = headers; - return this; - } - - @java.lang.Override - public _FinalStage method(FlowActionAuth0SendRequestParamsMethod method) { - this.method = Optional.ofNullable(method); - return this; - } - - @java.lang.Override - @JsonSetter(value = "method", nulls = Nulls.SKIP) - public _FinalStage method(Optional method) { - this.method = method; - return this; - } - - @java.lang.Override - public FlowActionAuth0SendRequestParams build() { - return new FlowActionAuth0SendRequestParams( - connectionId, pathname, method, headers, params, payload, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestParamsMethod.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestParamsMethod.java deleted file mode 100644 index 56bd83eb8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestParamsMethod.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAuth0SendRequestParamsMethod { - public static final FlowActionAuth0SendRequestParamsMethod PATCH = - new FlowActionAuth0SendRequestParamsMethod(Value.PATCH, "PATCH"); - - public static final FlowActionAuth0SendRequestParamsMethod DELETE = - new FlowActionAuth0SendRequestParamsMethod(Value.DELETE, "DELETE"); - - public static final FlowActionAuth0SendRequestParamsMethod GET = - new FlowActionAuth0SendRequestParamsMethod(Value.GET, "GET"); - - public static final FlowActionAuth0SendRequestParamsMethod PUT = - new FlowActionAuth0SendRequestParamsMethod(Value.PUT, "PUT"); - - public static final FlowActionAuth0SendRequestParamsMethod POST = - new FlowActionAuth0SendRequestParamsMethod(Value.POST, "POST"); - - private final Value value; - - private final String string; - - FlowActionAuth0SendRequestParamsMethod(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAuth0SendRequestParamsMethod - && this.string.equals(((FlowActionAuth0SendRequestParamsMethod) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PATCH: - return visitor.visitPatch(); - case DELETE: - return visitor.visitDelete(); - case GET: - return visitor.visitGet(); - case PUT: - return visitor.visitPut(); - case POST: - return visitor.visitPost(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionAuth0SendRequestParamsMethod valueOf(String value) { - switch (value) { - case "PATCH": - return PATCH; - case "DELETE": - return DELETE; - case "GET": - return GET; - case "PUT": - return PUT; - case "POST": - return POST; - default: - return new FlowActionAuth0SendRequestParamsMethod(Value.UNKNOWN, value); - } - } - - public enum Value { - GET, - - POST, - - PUT, - - PATCH, - - DELETE, - - UNKNOWN - } - - public interface Visitor { - T visitGet(); - - T visitPost(); - - T visitPut(); - - T visitPatch(); - - T visitDelete(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestParamsPayload.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestParamsPayload.java deleted file mode 100644 index c88b6c5ac..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestParamsPayload.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionAuth0SendRequestParamsPayload.Deserializer.class) -public final class FlowActionAuth0SendRequestParamsPayload { - private final Object value; - - private final int type; - - private FlowActionAuth0SendRequestParamsPayload(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((List) this.value); - } else if (this.type == 2) { - return visitor.visit((Map) 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 FlowActionAuth0SendRequestParamsPayload - && equalTo((FlowActionAuth0SendRequestParamsPayload) other); - } - - private boolean equalTo(FlowActionAuth0SendRequestParamsPayload 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 FlowActionAuth0SendRequestParamsPayload of(String value) { - return new FlowActionAuth0SendRequestParamsPayload(value, 0); - } - - public static FlowActionAuth0SendRequestParamsPayload of(List value) { - return new FlowActionAuth0SendRequestParamsPayload(value, 1); - } - - public static FlowActionAuth0SendRequestParamsPayload of(Map value) { - return new FlowActionAuth0SendRequestParamsPayload(value, 2); - } - - public interface Visitor { - T visit(String value); - - T visit(List value); - - T visit(Map value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionAuth0SendRequestParamsPayload.class); - } - - @java.lang.Override - public FlowActionAuth0SendRequestParamsPayload deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference>() {})); - } 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/FlowActionAuth0SendRequestParamsQueryParamsValue.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestParamsQueryParamsValue.java deleted file mode 100644 index a66ab3901..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestParamsQueryParamsValue.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionAuth0SendRequestParamsQueryParamsValue.Deserializer.class) -public final class FlowActionAuth0SendRequestParamsQueryParamsValue { - private final Object value; - - private final int type; - - private FlowActionAuth0SendRequestParamsQueryParamsValue(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((double) this.value); - } else if (this.type == 1) { - return visitor.visit((String) 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 FlowActionAuth0SendRequestParamsQueryParamsValue - && equalTo((FlowActionAuth0SendRequestParamsQueryParamsValue) other); - } - - private boolean equalTo(FlowActionAuth0SendRequestParamsQueryParamsValue 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 FlowActionAuth0SendRequestParamsQueryParamsValue of(double value) { - return new FlowActionAuth0SendRequestParamsQueryParamsValue(value, 0); - } - - public static FlowActionAuth0SendRequestParamsQueryParamsValue of(String value) { - return new FlowActionAuth0SendRequestParamsQueryParamsValue(value, 1); - } - - public interface Visitor { - T visit(double value); - - T visit(String value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionAuth0SendRequestParamsQueryParamsValue.class); - } - - @java.lang.Override - public FlowActionAuth0SendRequestParamsQueryParamsValue deserialize( - JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - 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/FlowActionAuth0SendRequestType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestType.java deleted file mode 100644 index acb97fe3a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendRequestType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAuth0SendRequestType { - public static final FlowActionAuth0SendRequestType AUTH0 = new FlowActionAuth0SendRequestType(Value.AUTH0, "AUTH0"); - - private final Value value; - - private final String string; - - FlowActionAuth0SendRequestType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAuth0SendRequestType - && this.string.equals(((FlowActionAuth0SendRequestType) 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 FlowActionAuth0SendRequestType valueOf(String value) { - switch (value) { - case "AUTH0": - return AUTH0; - default: - return new FlowActionAuth0SendRequestType(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/FlowActionAuth0SendSms.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendSms.java deleted file mode 100644 index 75c167912..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendSms.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAuth0SendSms.Builder.class) -public final class FlowActionAuth0SendSms { - private final String id; - - private final Optional alias; - - private final FlowActionAuth0SendSmsType type; - - private final FlowActionAuth0SendSmsAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionAuth0SendSmsParams params; - - private final Map additionalProperties; - - private FlowActionAuth0SendSms( - String id, - Optional alias, - FlowActionAuth0SendSmsType type, - FlowActionAuth0SendSmsAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionAuth0SendSmsParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionAuth0SendSmsType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionAuth0SendSmsAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionAuth0SendSmsParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAuth0SendSms && equalTo((FlowActionAuth0SendSms) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAuth0SendSms other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionAuth0SendSms other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionAuth0SendSmsType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionAuth0SendSmsAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionAuth0SendSmsParams params); - } - - public interface _FinalStage { - FlowActionAuth0SendSms build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionAuth0SendSmsType type; - - private FlowActionAuth0SendSmsAction action; - - private FlowActionAuth0SendSmsParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAuth0SendSms other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionAuth0SendSmsType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionAuth0SendSmsAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionAuth0SendSmsParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionAuth0SendSms build() { - return new FlowActionAuth0SendSms( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendSmsAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendSmsAction.java deleted file mode 100644 index 4c9b9d987..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendSmsAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAuth0SendSmsAction { - public static final FlowActionAuth0SendSmsAction SEND_SMS = - new FlowActionAuth0SendSmsAction(Value.SEND_SMS, "SEND_SMS"); - - private final Value value; - - private final String string; - - FlowActionAuth0SendSmsAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAuth0SendSmsAction - && this.string.equals(((FlowActionAuth0SendSmsAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SEND_SMS: - return visitor.visitSendSms(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionAuth0SendSmsAction valueOf(String value) { - switch (value) { - case "SEND_SMS": - return SEND_SMS; - default: - return new FlowActionAuth0SendSmsAction(Value.UNKNOWN, value); - } - } - - public enum Value { - SEND_SMS, - - UNKNOWN - } - - public interface Visitor { - T visitSendSms(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendSmsParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendSmsParams.java deleted file mode 100644 index a5b2953be..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendSmsParams.java +++ /dev/null @@ -1,190 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAuth0SendSmsParams.Builder.class) -public final class FlowActionAuth0SendSmsParams { - private final Optional from; - - private final String to; - - private final String message; - - private final Optional> customVars; - - private final Map additionalProperties; - - private FlowActionAuth0SendSmsParams( - Optional from, - String to, - String message, - Optional> customVars, - Map additionalProperties) { - this.from = from; - this.to = to; - this.message = message; - this.customVars = customVars; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("from") - public Optional getFrom() { - return from; - } - - @JsonProperty("to") - public String getTo() { - return to; - } - - @JsonProperty("message") - public String getMessage() { - return message; - } - - @JsonProperty("custom_vars") - public Optional> getCustomVars() { - return customVars; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAuth0SendSmsParams && equalTo((FlowActionAuth0SendSmsParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAuth0SendSmsParams other) { - return from.equals(other.from) - && to.equals(other.to) - && message.equals(other.message) - && customVars.equals(other.customVars); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.from, this.to, this.message, this.customVars); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ToStage builder() { - return new Builder(); - } - - public interface ToStage { - MessageStage to(@NotNull String to); - - Builder from(FlowActionAuth0SendSmsParams other); - } - - public interface MessageStage { - _FinalStage message(@NotNull String message); - } - - public interface _FinalStage { - FlowActionAuth0SendSmsParams build(); - - _FinalStage from(Optional from); - - _FinalStage from(String from); - - _FinalStage customVars(Optional> customVars); - - _FinalStage customVars(Map customVars); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ToStage, MessageStage, _FinalStage { - private String to; - - private String message; - - private Optional> customVars = Optional.empty(); - - private Optional from = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAuth0SendSmsParams other) { - from(other.getFrom()); - to(other.getTo()); - message(other.getMessage()); - customVars(other.getCustomVars()); - return this; - } - - @java.lang.Override - @JsonSetter("to") - public MessageStage to(@NotNull String to) { - this.to = Objects.requireNonNull(to, "to must not be null"); - return this; - } - - @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 _FinalStage customVars(Map customVars) { - this.customVars = Optional.ofNullable(customVars); - return this; - } - - @java.lang.Override - @JsonSetter(value = "custom_vars", nulls = Nulls.SKIP) - public _FinalStage customVars(Optional> customVars) { - this.customVars = customVars; - return this; - } - - @java.lang.Override - public _FinalStage from(String from) { - this.from = Optional.ofNullable(from); - return this; - } - - @java.lang.Override - @JsonSetter(value = "from", nulls = Nulls.SKIP) - public _FinalStage from(Optional from) { - this.from = from; - return this; - } - - @java.lang.Override - public FlowActionAuth0SendSmsParams build() { - return new FlowActionAuth0SendSmsParams(from, to, message, customVars, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendSmsType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendSmsType.java deleted file mode 100644 index 42fd2ad43..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendSmsType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAuth0SendSmsType { - public static final FlowActionAuth0SendSmsType AUTH0 = new FlowActionAuth0SendSmsType(Value.AUTH0, "AUTH0"); - - private final Value value; - - private final String string; - - FlowActionAuth0SendSmsType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAuth0SendSmsType - && this.string.equals(((FlowActionAuth0SendSmsType) 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 FlowActionAuth0SendSmsType valueOf(String value) { - switch (value) { - case "AUTH0": - return AUTH0; - default: - return new FlowActionAuth0SendSmsType(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/FlowActionAuth0UpdateUser.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0UpdateUser.java deleted file mode 100644 index ac86cc353..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0UpdateUser.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionAuth0UpdateUser.Builder.class) -public final class FlowActionAuth0UpdateUser { - private final String id; - - private final Optional alias; - - private final FlowActionAuth0UpdateUserType type; - - private final FlowActionAuth0UpdateUserAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionAuth0UpdateUserParams params; - - private final Map additionalProperties; - - private FlowActionAuth0UpdateUser( - String id, - Optional alias, - FlowActionAuth0UpdateUserType type, - FlowActionAuth0UpdateUserAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionAuth0UpdateUserParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionAuth0UpdateUserType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionAuth0UpdateUserAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionAuth0UpdateUserParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAuth0UpdateUser && equalTo((FlowActionAuth0UpdateUser) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAuth0UpdateUser other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionAuth0UpdateUser other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionAuth0UpdateUserType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionAuth0UpdateUserAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionAuth0UpdateUserParams params); - } - - public interface _FinalStage { - FlowActionAuth0UpdateUser build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionAuth0UpdateUserType type; - - private FlowActionAuth0UpdateUserAction action; - - private FlowActionAuth0UpdateUserParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAuth0UpdateUser other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionAuth0UpdateUserType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionAuth0UpdateUserAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionAuth0UpdateUserParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionAuth0UpdateUser build() { - return new FlowActionAuth0UpdateUser( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0UpdateUserAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0UpdateUserAction.java deleted file mode 100644 index 30d06246e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0UpdateUserAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAuth0UpdateUserAction { - public static final FlowActionAuth0UpdateUserAction UPDATE_USER = - new FlowActionAuth0UpdateUserAction(Value.UPDATE_USER, "UPDATE_USER"); - - private final Value value; - - private final String string; - - FlowActionAuth0UpdateUserAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAuth0UpdateUserAction - && this.string.equals(((FlowActionAuth0UpdateUserAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case UPDATE_USER: - return visitor.visitUpdateUser(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionAuth0UpdateUserAction valueOf(String value) { - switch (value) { - case "UPDATE_USER": - return UPDATE_USER; - default: - return new FlowActionAuth0UpdateUserAction(Value.UNKNOWN, value); - } - } - - public enum Value { - UPDATE_USER, - - UNKNOWN - } - - public interface Visitor { - T visitUpdateUser(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0UpdateUserParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0UpdateUserParams.java deleted file mode 100644 index 3d81255d1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0UpdateUserParams.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = FlowActionAuth0UpdateUserParams.Builder.class) -public final class FlowActionAuth0UpdateUserParams { - private final String connectionId; - - private final String userId; - - private final Map changes; - - private final Map additionalProperties; - - private FlowActionAuth0UpdateUserParams( - String connectionId, String userId, Map changes, Map additionalProperties) { - this.connectionId = connectionId; - this.userId = userId; - this.changes = changes; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("user_id") - public String getUserId() { - return userId; - } - - @JsonProperty("changes") - public Map getChanges() { - return changes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionAuth0UpdateUserParams && equalTo((FlowActionAuth0UpdateUserParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionAuth0UpdateUserParams other) { - return connectionId.equals(other.connectionId) && userId.equals(other.userId) && changes.equals(other.changes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.userId, this.changes); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - UserIdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionAuth0UpdateUserParams other); - } - - public interface UserIdStage { - _FinalStage userId(@NotNull String userId); - } - - public interface _FinalStage { - FlowActionAuth0UpdateUserParams build(); - - _FinalStage changes(Map changes); - - _FinalStage putAllChanges(Map changes); - - _FinalStage changes(String key, Object value); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, UserIdStage, _FinalStage { - private String connectionId; - - private String userId; - - private Map changes = new LinkedHashMap<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionAuth0UpdateUserParams other) { - connectionId(other.getConnectionId()); - userId(other.getUserId()); - changes(other.getChanges()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public UserIdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @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 _FinalStage changes(String key, Object value) { - this.changes.put(key, value); - return this; - } - - @java.lang.Override - public _FinalStage putAllChanges(Map changes) { - if (changes != null) { - this.changes.putAll(changes); - } - return this; - } - - @java.lang.Override - @JsonSetter(value = "changes", nulls = Nulls.SKIP) - public _FinalStage changes(Map changes) { - this.changes.clear(); - if (changes != null) { - this.changes.putAll(changes); - } - return this; - } - - @java.lang.Override - public FlowActionAuth0UpdateUserParams build() { - return new FlowActionAuth0UpdateUserParams(connectionId, userId, changes, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0UpdateUserType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0UpdateUserType.java deleted file mode 100644 index b2500a038..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0UpdateUserType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionAuth0UpdateUserType { - public static final FlowActionAuth0UpdateUserType AUTH0 = new FlowActionAuth0UpdateUserType(Value.AUTH0, "AUTH0"); - - private final Value value; - - private final String string; - - FlowActionAuth0UpdateUserType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionAuth0UpdateUserType - && this.string.equals(((FlowActionAuth0UpdateUserType) 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 FlowActionAuth0UpdateUserType valueOf(String value) { - switch (value) { - case "AUTH0": - return AUTH0; - default: - return new FlowActionAuth0UpdateUserType(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/FlowActionBigqueryInsertRows.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionBigqueryInsertRows.java deleted file mode 100644 index 71f00d10c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionBigqueryInsertRows.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionBigqueryInsertRows.Builder.class) -public final class FlowActionBigqueryInsertRows { - private final String id; - - private final Optional alias; - - private final FlowActionBigqueryInsertRowsType type; - - private final FlowActionBigqueryInsertRowsAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionBigqueryInsertRowsParams params; - - private final Map additionalProperties; - - private FlowActionBigqueryInsertRows( - String id, - Optional alias, - FlowActionBigqueryInsertRowsType type, - FlowActionBigqueryInsertRowsAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionBigqueryInsertRowsParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionBigqueryInsertRowsType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionBigqueryInsertRowsAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionBigqueryInsertRowsParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionBigqueryInsertRows && equalTo((FlowActionBigqueryInsertRows) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionBigqueryInsertRows other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionBigqueryInsertRows other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionBigqueryInsertRowsType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionBigqueryInsertRowsAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionBigqueryInsertRowsParams params); - } - - public interface _FinalStage { - FlowActionBigqueryInsertRows build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionBigqueryInsertRowsType type; - - private FlowActionBigqueryInsertRowsAction action; - - private FlowActionBigqueryInsertRowsParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionBigqueryInsertRows other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionBigqueryInsertRowsType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionBigqueryInsertRowsAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionBigqueryInsertRowsParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionBigqueryInsertRows build() { - return new FlowActionBigqueryInsertRows( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionBigqueryInsertRowsAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionBigqueryInsertRowsAction.java deleted file mode 100644 index 343cbac94..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionBigqueryInsertRowsAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionBigqueryInsertRowsAction { - public static final FlowActionBigqueryInsertRowsAction INSERT_ROWS = - new FlowActionBigqueryInsertRowsAction(Value.INSERT_ROWS, "INSERT_ROWS"); - - private final Value value; - - private final String string; - - FlowActionBigqueryInsertRowsAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionBigqueryInsertRowsAction - && this.string.equals(((FlowActionBigqueryInsertRowsAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case INSERT_ROWS: - return visitor.visitInsertRows(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionBigqueryInsertRowsAction valueOf(String value) { - switch (value) { - case "INSERT_ROWS": - return INSERT_ROWS; - default: - return new FlowActionBigqueryInsertRowsAction(Value.UNKNOWN, value); - } - } - - public enum Value { - INSERT_ROWS, - - UNKNOWN - } - - public interface Visitor { - T visitInsertRows(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionBigqueryInsertRowsParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionBigqueryInsertRowsParams.java deleted file mode 100644 index 1dd56cd7f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionBigqueryInsertRowsParams.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionBigqueryInsertRowsParams.Builder.class) -public final class FlowActionBigqueryInsertRowsParams { - private final String connectionId; - - private final String datasetId; - - private final String tableId; - - private final Optional> data; - - private final Map additionalProperties; - - private FlowActionBigqueryInsertRowsParams( - String connectionId, - String datasetId, - String tableId, - Optional> data, - Map additionalProperties) { - this.connectionId = connectionId; - this.datasetId = datasetId; - this.tableId = tableId; - this.data = data; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("dataset_id") - public String getDatasetId() { - return datasetId; - } - - @JsonProperty("table_id") - public String getTableId() { - return tableId; - } - - @JsonProperty("data") - public Optional> getData() { - return data; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionBigqueryInsertRowsParams - && equalTo((FlowActionBigqueryInsertRowsParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionBigqueryInsertRowsParams other) { - return connectionId.equals(other.connectionId) - && datasetId.equals(other.datasetId) - && tableId.equals(other.tableId) - && data.equals(other.data); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.datasetId, this.tableId, this.data); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - DatasetIdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionBigqueryInsertRowsParams other); - } - - public interface DatasetIdStage { - TableIdStage datasetId(@NotNull String datasetId); - } - - public interface TableIdStage { - _FinalStage tableId(@NotNull String tableId); - } - - public interface _FinalStage { - FlowActionBigqueryInsertRowsParams build(); - - _FinalStage data(Optional> data); - - _FinalStage data(Map data); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, DatasetIdStage, TableIdStage, _FinalStage { - private String connectionId; - - private String datasetId; - - private String tableId; - - private Optional> data = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionBigqueryInsertRowsParams other) { - connectionId(other.getConnectionId()); - datasetId(other.getDatasetId()); - tableId(other.getTableId()); - data(other.getData()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public DatasetIdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("dataset_id") - public TableIdStage datasetId(@NotNull String datasetId) { - this.datasetId = Objects.requireNonNull(datasetId, "datasetId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("table_id") - public _FinalStage tableId(@NotNull String tableId) { - this.tableId = Objects.requireNonNull(tableId, "tableId must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage data(Map data) { - this.data = Optional.ofNullable(data); - return this; - } - - @java.lang.Override - @JsonSetter(value = "data", nulls = Nulls.SKIP) - public _FinalStage data(Optional> data) { - this.data = data; - return this; - } - - @java.lang.Override - public FlowActionBigqueryInsertRowsParams build() { - return new FlowActionBigqueryInsertRowsParams(connectionId, datasetId, tableId, data, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionBigqueryInsertRowsType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionBigqueryInsertRowsType.java deleted file mode 100644 index 387458928..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionBigqueryInsertRowsType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionBigqueryInsertRowsType { - public static final FlowActionBigqueryInsertRowsType BIGQUERY = - new FlowActionBigqueryInsertRowsType(Value.BIGQUERY, "BIGQUERY"); - - private final Value value; - - private final String string; - - FlowActionBigqueryInsertRowsType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionBigqueryInsertRowsType - && this.string.equals(((FlowActionBigqueryInsertRowsType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case BIGQUERY: - return visitor.visitBigquery(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionBigqueryInsertRowsType valueOf(String value) { - switch (value) { - case "BIGQUERY": - return BIGQUERY; - default: - return new FlowActionBigqueryInsertRowsType(Value.UNKNOWN, value); - } - } - - public enum Value { - BIGQUERY, - - UNKNOWN - } - - public interface Visitor { - T visitBigquery(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbit.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbit.java deleted file mode 100644 index 1cc990a3e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbit.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionClearbit.Deserializer.class) -public final class FlowActionClearbit { - private final Object value; - - private final int type; - - private FlowActionClearbit(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((FlowActionClearbitFindPerson) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowActionClearbitFindCompany) 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 FlowActionClearbit && equalTo((FlowActionClearbit) other); - } - - private boolean equalTo(FlowActionClearbit 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 FlowActionClearbit of(FlowActionClearbitFindPerson value) { - return new FlowActionClearbit(value, 0); - } - - public static FlowActionClearbit of(FlowActionClearbitFindCompany value) { - return new FlowActionClearbit(value, 1); - } - - public interface Visitor { - T visit(FlowActionClearbitFindPerson value); - - T visit(FlowActionClearbitFindCompany value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionClearbit.class); - } - - @java.lang.Override - public FlowActionClearbit deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionClearbitFindPerson.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionClearbitFindCompany.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindCompany.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindCompany.java deleted file mode 100644 index c155b690e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindCompany.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionClearbitFindCompany.Builder.class) -public final class FlowActionClearbitFindCompany { - private final String id; - - private final Optional alias; - - private final FlowActionClearbitFindCompanyType type; - - private final FlowActionClearbitFindCompanyAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionClearbitFindCompanyParams params; - - private final Map additionalProperties; - - private FlowActionClearbitFindCompany( - String id, - Optional alias, - FlowActionClearbitFindCompanyType type, - FlowActionClearbitFindCompanyAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionClearbitFindCompanyParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionClearbitFindCompanyType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionClearbitFindCompanyAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionClearbitFindCompanyParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionClearbitFindCompany && equalTo((FlowActionClearbitFindCompany) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionClearbitFindCompany other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionClearbitFindCompany other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionClearbitFindCompanyType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionClearbitFindCompanyAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionClearbitFindCompanyParams params); - } - - public interface _FinalStage { - FlowActionClearbitFindCompany build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionClearbitFindCompanyType type; - - private FlowActionClearbitFindCompanyAction action; - - private FlowActionClearbitFindCompanyParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionClearbitFindCompany other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionClearbitFindCompanyType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionClearbitFindCompanyAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionClearbitFindCompanyParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionClearbitFindCompany build() { - return new FlowActionClearbitFindCompany( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindCompanyAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindCompanyAction.java deleted file mode 100644 index 91e45fb46..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindCompanyAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionClearbitFindCompanyAction { - public static final FlowActionClearbitFindCompanyAction FIND_COMPANY = - new FlowActionClearbitFindCompanyAction(Value.FIND_COMPANY, "FIND_COMPANY"); - - private final Value value; - - private final String string; - - FlowActionClearbitFindCompanyAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionClearbitFindCompanyAction - && this.string.equals(((FlowActionClearbitFindCompanyAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FIND_COMPANY: - return visitor.visitFindCompany(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionClearbitFindCompanyAction valueOf(String value) { - switch (value) { - case "FIND_COMPANY": - return FIND_COMPANY; - default: - return new FlowActionClearbitFindCompanyAction(Value.UNKNOWN, value); - } - } - - public enum Value { - FIND_COMPANY, - - UNKNOWN - } - - public interface Visitor { - T visitFindCompany(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindCompanyParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindCompanyParams.java deleted file mode 100644 index de83605e4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindCompanyParams.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionClearbitFindCompanyParams.Builder.class) -public final class FlowActionClearbitFindCompanyParams { - private final String connectionId; - - private final String domain; - - private final Map additionalProperties; - - private FlowActionClearbitFindCompanyParams( - String connectionId, String domain, Map additionalProperties) { - this.connectionId = connectionId; - this.domain = domain; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("domain") - public String getDomain() { - return domain; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionClearbitFindCompanyParams - && equalTo((FlowActionClearbitFindCompanyParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionClearbitFindCompanyParams other) { - return connectionId.equals(other.connectionId) && domain.equals(other.domain); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.domain); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - DomainStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionClearbitFindCompanyParams other); - } - - public interface DomainStage { - _FinalStage domain(@NotNull String domain); - } - - public interface _FinalStage { - FlowActionClearbitFindCompanyParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, DomainStage, _FinalStage { - private String connectionId; - - private String domain; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionClearbitFindCompanyParams other) { - connectionId(other.getConnectionId()); - domain(other.getDomain()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public DomainStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("domain") - public _FinalStage domain(@NotNull String domain) { - this.domain = Objects.requireNonNull(domain, "domain must not be null"); - return this; - } - - @java.lang.Override - public FlowActionClearbitFindCompanyParams build() { - return new FlowActionClearbitFindCompanyParams(connectionId, domain, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindCompanyType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindCompanyType.java deleted file mode 100644 index 0e5fea5aa..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindCompanyType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionClearbitFindCompanyType { - public static final FlowActionClearbitFindCompanyType CLEARBIT = - new FlowActionClearbitFindCompanyType(Value.CLEARBIT, "CLEARBIT"); - - private final Value value; - - private final String string; - - FlowActionClearbitFindCompanyType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionClearbitFindCompanyType - && this.string.equals(((FlowActionClearbitFindCompanyType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CLEARBIT: - return visitor.visitClearbit(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionClearbitFindCompanyType valueOf(String value) { - switch (value) { - case "CLEARBIT": - return CLEARBIT; - default: - return new FlowActionClearbitFindCompanyType(Value.UNKNOWN, value); - } - } - - public enum Value { - CLEARBIT, - - UNKNOWN - } - - public interface Visitor { - T visitClearbit(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindPerson.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindPerson.java deleted file mode 100644 index e56f63599..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindPerson.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionClearbitFindPerson.Builder.class) -public final class FlowActionClearbitFindPerson { - private final String id; - - private final Optional alias; - - private final FlowActionClearbitFindPersonType type; - - private final FlowActionClearbitFindPersonAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionClearbitFindPersonParams params; - - private final Map additionalProperties; - - private FlowActionClearbitFindPerson( - String id, - Optional alias, - FlowActionClearbitFindPersonType type, - FlowActionClearbitFindPersonAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionClearbitFindPersonParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionClearbitFindPersonType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionClearbitFindPersonAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionClearbitFindPersonParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionClearbitFindPerson && equalTo((FlowActionClearbitFindPerson) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionClearbitFindPerson other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionClearbitFindPerson other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionClearbitFindPersonType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionClearbitFindPersonAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionClearbitFindPersonParams params); - } - - public interface _FinalStage { - FlowActionClearbitFindPerson build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionClearbitFindPersonType type; - - private FlowActionClearbitFindPersonAction action; - - private FlowActionClearbitFindPersonParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionClearbitFindPerson other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionClearbitFindPersonType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionClearbitFindPersonAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionClearbitFindPersonParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionClearbitFindPerson build() { - return new FlowActionClearbitFindPerson( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindPersonAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindPersonAction.java deleted file mode 100644 index ce7963fcb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindPersonAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionClearbitFindPersonAction { - public static final FlowActionClearbitFindPersonAction FIND_PERSON = - new FlowActionClearbitFindPersonAction(Value.FIND_PERSON, "FIND_PERSON"); - - private final Value value; - - private final String string; - - FlowActionClearbitFindPersonAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionClearbitFindPersonAction - && this.string.equals(((FlowActionClearbitFindPersonAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FIND_PERSON: - return visitor.visitFindPerson(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionClearbitFindPersonAction valueOf(String value) { - switch (value) { - case "FIND_PERSON": - return FIND_PERSON; - default: - return new FlowActionClearbitFindPersonAction(Value.UNKNOWN, value); - } - } - - public enum Value { - FIND_PERSON, - - UNKNOWN - } - - public interface Visitor { - T visitFindPerson(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindPersonParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindPersonParams.java deleted file mode 100644 index 8c4cb50f3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindPersonParams.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionClearbitFindPersonParams.Builder.class) -public final class FlowActionClearbitFindPersonParams { - private final String connectionId; - - private final String email; - - private final Map additionalProperties; - - private FlowActionClearbitFindPersonParams( - String connectionId, String email, Map additionalProperties) { - this.connectionId = connectionId; - this.email = email; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("email") - public String getEmail() { - return email; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionClearbitFindPersonParams - && equalTo((FlowActionClearbitFindPersonParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionClearbitFindPersonParams other) { - return connectionId.equals(other.connectionId) && email.equals(other.email); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.email); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - EmailStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionClearbitFindPersonParams other); - } - - public interface EmailStage { - _FinalStage email(@NotNull String email); - } - - public interface _FinalStage { - FlowActionClearbitFindPersonParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, EmailStage, _FinalStage { - private String connectionId; - - private String email; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionClearbitFindPersonParams other) { - connectionId(other.getConnectionId()); - email(other.getEmail()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public EmailStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("email") - public _FinalStage email(@NotNull String email) { - this.email = Objects.requireNonNull(email, "email must not be null"); - return this; - } - - @java.lang.Override - public FlowActionClearbitFindPersonParams build() { - return new FlowActionClearbitFindPersonParams(connectionId, email, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindPersonType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindPersonType.java deleted file mode 100644 index beedc65cf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionClearbitFindPersonType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionClearbitFindPersonType { - public static final FlowActionClearbitFindPersonType CLEARBIT = - new FlowActionClearbitFindPersonType(Value.CLEARBIT, "CLEARBIT"); - - private final Value value; - - private final String string; - - FlowActionClearbitFindPersonType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionClearbitFindPersonType - && this.string.equals(((FlowActionClearbitFindPersonType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CLEARBIT: - return visitor.visitClearbit(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionClearbitFindPersonType valueOf(String value) { - switch (value) { - case "CLEARBIT": - return CLEARBIT; - default: - return new FlowActionClearbitFindPersonType(Value.UNKNOWN, value); - } - } - - public enum Value { - CLEARBIT, - - UNKNOWN - } - - public interface Visitor { - T visitClearbit(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionEmailVerifyEmail.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionEmailVerifyEmail.java deleted file mode 100644 index 3c52ff4de..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionEmailVerifyEmail.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionEmailVerifyEmail.Builder.class) -public final class FlowActionEmailVerifyEmail { - private final String id; - - private final Optional alias; - - private final FlowActionEmailVerifyEmailType type; - - private final FlowActionEmailVerifyEmailAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionEmailVerifyEmailParams params; - - private final Map additionalProperties; - - private FlowActionEmailVerifyEmail( - String id, - Optional alias, - FlowActionEmailVerifyEmailType type, - FlowActionEmailVerifyEmailAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionEmailVerifyEmailParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionEmailVerifyEmailType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionEmailVerifyEmailAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionEmailVerifyEmailParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionEmailVerifyEmail && equalTo((FlowActionEmailVerifyEmail) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionEmailVerifyEmail other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionEmailVerifyEmail other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionEmailVerifyEmailType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionEmailVerifyEmailAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionEmailVerifyEmailParams params); - } - - public interface _FinalStage { - FlowActionEmailVerifyEmail build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionEmailVerifyEmailType type; - - private FlowActionEmailVerifyEmailAction action; - - private FlowActionEmailVerifyEmailParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionEmailVerifyEmail other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionEmailVerifyEmailType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionEmailVerifyEmailAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionEmailVerifyEmailParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionEmailVerifyEmail build() { - return new FlowActionEmailVerifyEmail( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionEmailVerifyEmailAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionEmailVerifyEmailAction.java deleted file mode 100644 index 362d87826..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionEmailVerifyEmailAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionEmailVerifyEmailAction { - public static final FlowActionEmailVerifyEmailAction VERIFY_EMAIL = - new FlowActionEmailVerifyEmailAction(Value.VERIFY_EMAIL, "VERIFY_EMAIL"); - - private final Value value; - - private final String string; - - FlowActionEmailVerifyEmailAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionEmailVerifyEmailAction - && this.string.equals(((FlowActionEmailVerifyEmailAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case VERIFY_EMAIL: - return visitor.visitVerifyEmail(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionEmailVerifyEmailAction valueOf(String value) { - switch (value) { - case "VERIFY_EMAIL": - return VERIFY_EMAIL; - default: - return new FlowActionEmailVerifyEmailAction(Value.UNKNOWN, value); - } - } - - public enum Value { - VERIFY_EMAIL, - - UNKNOWN - } - - public interface Visitor { - T visitVerifyEmail(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionEmailVerifyEmailParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionEmailVerifyEmailParams.java deleted file mode 100644 index 8a1714450..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionEmailVerifyEmailParams.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionEmailVerifyEmailParams.Builder.class) -public final class FlowActionEmailVerifyEmailParams { - private final String email; - - private final Optional rules; - - private final Map additionalProperties; - - private FlowActionEmailVerifyEmailParams( - String email, - Optional rules, - Map additionalProperties) { - this.email = email; - this.rules = rules; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("email") - public String getEmail() { - return email; - } - - @JsonProperty("rules") - public Optional getRules() { - return rules; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionEmailVerifyEmailParams && equalTo((FlowActionEmailVerifyEmailParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionEmailVerifyEmailParams other) { - return email.equals(other.email) && rules.equals(other.rules); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.email, this.rules); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EmailStage builder() { - return new Builder(); - } - - public interface EmailStage { - _FinalStage email(@NotNull String email); - - Builder from(FlowActionEmailVerifyEmailParams other); - } - - public interface _FinalStage { - FlowActionEmailVerifyEmailParams build(); - - _FinalStage rules(Optional rules); - - _FinalStage rules(FlowActionEmailVerifyEmailParamsRules rules); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EmailStage, _FinalStage { - private String email; - - private Optional rules = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionEmailVerifyEmailParams other) { - email(other.getEmail()); - rules(other.getRules()); - return this; - } - - @java.lang.Override - @JsonSetter("email") - public _FinalStage email(@NotNull String email) { - this.email = Objects.requireNonNull(email, "email must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage rules(FlowActionEmailVerifyEmailParamsRules rules) { - this.rules = Optional.ofNullable(rules); - return this; - } - - @java.lang.Override - @JsonSetter(value = "rules", nulls = Nulls.SKIP) - public _FinalStage rules(Optional rules) { - this.rules = rules; - return this; - } - - @java.lang.Override - public FlowActionEmailVerifyEmailParams build() { - return new FlowActionEmailVerifyEmailParams(email, rules, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionEmailVerifyEmailParamsRules.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionEmailVerifyEmailParamsRules.java deleted file mode 100644 index 77655741d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionEmailVerifyEmailParamsRules.java +++ /dev/null @@ -1,232 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionEmailVerifyEmailParamsRules.Builder.class) -public final class FlowActionEmailVerifyEmailParamsRules { - private final Optional requireMxRecord; - - private final Optional blockAliases; - - private final Optional blockFreeEmails; - - private final Optional blockDisposableEmails; - - private final Optional> blocklist; - - private final Optional> allowlist; - - private final Map additionalProperties; - - private FlowActionEmailVerifyEmailParamsRules( - Optional requireMxRecord, - Optional blockAliases, - Optional blockFreeEmails, - Optional blockDisposableEmails, - Optional> blocklist, - Optional> allowlist, - Map additionalProperties) { - this.requireMxRecord = requireMxRecord; - this.blockAliases = blockAliases; - this.blockFreeEmails = blockFreeEmails; - this.blockDisposableEmails = blockDisposableEmails; - this.blocklist = blocklist; - this.allowlist = allowlist; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("require_mx_record") - public Optional getRequireMxRecord() { - return requireMxRecord; - } - - @JsonProperty("block_aliases") - public Optional getBlockAliases() { - return blockAliases; - } - - @JsonProperty("block_free_emails") - public Optional getBlockFreeEmails() { - return blockFreeEmails; - } - - @JsonProperty("block_disposable_emails") - public Optional getBlockDisposableEmails() { - return blockDisposableEmails; - } - - @JsonProperty("blocklist") - public Optional> getBlocklist() { - return blocklist; - } - - @JsonProperty("allowlist") - public Optional> getAllowlist() { - return allowlist; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionEmailVerifyEmailParamsRules - && equalTo((FlowActionEmailVerifyEmailParamsRules) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionEmailVerifyEmailParamsRules other) { - return requireMxRecord.equals(other.requireMxRecord) - && blockAliases.equals(other.blockAliases) - && blockFreeEmails.equals(other.blockFreeEmails) - && blockDisposableEmails.equals(other.blockDisposableEmails) - && blocklist.equals(other.blocklist) - && allowlist.equals(other.allowlist); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.requireMxRecord, - this.blockAliases, - this.blockFreeEmails, - this.blockDisposableEmails, - this.blocklist, - this.allowlist); - } - - @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 requireMxRecord = Optional.empty(); - - private Optional blockAliases = Optional.empty(); - - private Optional blockFreeEmails = Optional.empty(); - - private Optional blockDisposableEmails = Optional.empty(); - - private Optional> blocklist = Optional.empty(); - - private Optional> allowlist = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FlowActionEmailVerifyEmailParamsRules other) { - requireMxRecord(other.getRequireMxRecord()); - blockAliases(other.getBlockAliases()); - blockFreeEmails(other.getBlockFreeEmails()); - blockDisposableEmails(other.getBlockDisposableEmails()); - blocklist(other.getBlocklist()); - allowlist(other.getAllowlist()); - return this; - } - - @JsonSetter(value = "require_mx_record", nulls = Nulls.SKIP) - public Builder requireMxRecord(Optional requireMxRecord) { - this.requireMxRecord = requireMxRecord; - return this; - } - - public Builder requireMxRecord(Boolean requireMxRecord) { - this.requireMxRecord = Optional.ofNullable(requireMxRecord); - return this; - } - - @JsonSetter(value = "block_aliases", nulls = Nulls.SKIP) - public Builder blockAliases(Optional blockAliases) { - this.blockAliases = blockAliases; - return this; - } - - public Builder blockAliases(Boolean blockAliases) { - this.blockAliases = Optional.ofNullable(blockAliases); - return this; - } - - @JsonSetter(value = "block_free_emails", nulls = Nulls.SKIP) - public Builder blockFreeEmails(Optional blockFreeEmails) { - this.blockFreeEmails = blockFreeEmails; - return this; - } - - public Builder blockFreeEmails(Boolean blockFreeEmails) { - this.blockFreeEmails = Optional.ofNullable(blockFreeEmails); - return this; - } - - @JsonSetter(value = "block_disposable_emails", nulls = Nulls.SKIP) - public Builder blockDisposableEmails(Optional blockDisposableEmails) { - this.blockDisposableEmails = blockDisposableEmails; - return this; - } - - public Builder blockDisposableEmails(Boolean blockDisposableEmails) { - this.blockDisposableEmails = Optional.ofNullable(blockDisposableEmails); - return this; - } - - @JsonSetter(value = "blocklist", nulls = Nulls.SKIP) - public Builder blocklist(Optional> blocklist) { - this.blocklist = blocklist; - return this; - } - - public Builder blocklist(List blocklist) { - this.blocklist = Optional.ofNullable(blocklist); - return this; - } - - @JsonSetter(value = "allowlist", nulls = Nulls.SKIP) - public Builder allowlist(Optional> allowlist) { - this.allowlist = allowlist; - return this; - } - - public Builder allowlist(List allowlist) { - this.allowlist = Optional.ofNullable(allowlist); - return this; - } - - public FlowActionEmailVerifyEmailParamsRules build() { - return new FlowActionEmailVerifyEmailParamsRules( - requireMxRecord, - blockAliases, - blockFreeEmails, - blockDisposableEmails, - blocklist, - allowlist, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionEmailVerifyEmailType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionEmailVerifyEmailType.java deleted file mode 100644 index 865309c19..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionEmailVerifyEmailType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionEmailVerifyEmailType { - public static final FlowActionEmailVerifyEmailType EMAIL = new FlowActionEmailVerifyEmailType(Value.EMAIL, "EMAIL"); - - private final Value value; - - private final String string; - - FlowActionEmailVerifyEmailType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionEmailVerifyEmailType - && this.string.equals(((FlowActionEmailVerifyEmailType) 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 UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionEmailVerifyEmailType valueOf(String value) { - switch (value) { - case "EMAIL": - return EMAIL; - default: - return new FlowActionEmailVerifyEmailType(Value.UNKNOWN, value); - } - } - - public enum Value { - EMAIL, - - UNKNOWN - } - - public interface Visitor { - T visitEmail(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlow.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlow.java deleted file mode 100644 index 1b493a483..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlow.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionFlow.Deserializer.class) -public final class FlowActionFlow { - private final Object value; - - private final int type; - - private FlowActionFlow(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((FlowActionFlowBooleanCondition) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowActionFlowDelayFlow) this.value); - } else if (this.type == 2) { - return visitor.visit((FlowActionFlowDoNothing) this.value); - } else if (this.type == 3) { - return visitor.visit((FlowActionFlowErrorMessage) this.value); - } else if (this.type == 4) { - return visitor.visit((FlowActionFlowMapValue) this.value); - } else if (this.type == 5) { - return visitor.visit((FlowActionFlowReturnJson) this.value); - } else if (this.type == 6) { - return visitor.visit((FlowActionFlowStoreVars) 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 FlowActionFlow && equalTo((FlowActionFlow) other); - } - - private boolean equalTo(FlowActionFlow 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 FlowActionFlow of(FlowActionFlowBooleanCondition value) { - return new FlowActionFlow(value, 0); - } - - public static FlowActionFlow of(FlowActionFlowDelayFlow value) { - return new FlowActionFlow(value, 1); - } - - public static FlowActionFlow of(FlowActionFlowDoNothing value) { - return new FlowActionFlow(value, 2); - } - - public static FlowActionFlow of(FlowActionFlowErrorMessage value) { - return new FlowActionFlow(value, 3); - } - - public static FlowActionFlow of(FlowActionFlowMapValue value) { - return new FlowActionFlow(value, 4); - } - - public static FlowActionFlow of(FlowActionFlowReturnJson value) { - return new FlowActionFlow(value, 5); - } - - public static FlowActionFlow of(FlowActionFlowStoreVars value) { - return new FlowActionFlow(value, 6); - } - - public interface Visitor { - T visit(FlowActionFlowBooleanCondition value); - - T visit(FlowActionFlowDelayFlow value); - - T visit(FlowActionFlowDoNothing value); - - T visit(FlowActionFlowErrorMessage value); - - T visit(FlowActionFlowMapValue value); - - T visit(FlowActionFlowReturnJson value); - - T visit(FlowActionFlowStoreVars value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionFlow.class); - } - - @java.lang.Override - public FlowActionFlow deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowBooleanCondition.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowDelayFlow.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowDoNothing.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowErrorMessage.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowMapValue.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowReturnJson.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionFlowStoreVars.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowBooleanCondition.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowBooleanCondition.java deleted file mode 100644 index 8126646e2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowBooleanCondition.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionFlowBooleanCondition.Builder.class) -public final class FlowActionFlowBooleanCondition { - private final String id; - - private final Optional alias; - - private final FlowActionFlowBooleanConditionType type; - - private final FlowActionFlowBooleanConditionAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionFlowBooleanConditionParams params; - - private final Map additionalProperties; - - private FlowActionFlowBooleanCondition( - String id, - Optional alias, - FlowActionFlowBooleanConditionType type, - FlowActionFlowBooleanConditionAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionFlowBooleanConditionParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionFlowBooleanConditionType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionFlowBooleanConditionAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionFlowBooleanConditionParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionFlowBooleanCondition && equalTo((FlowActionFlowBooleanCondition) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionFlowBooleanCondition other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionFlowBooleanCondition other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionFlowBooleanConditionType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionFlowBooleanConditionAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionFlowBooleanConditionParams params); - } - - public interface _FinalStage { - FlowActionFlowBooleanCondition build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionFlowBooleanConditionType type; - - private FlowActionFlowBooleanConditionAction action; - - private FlowActionFlowBooleanConditionParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionFlowBooleanCondition other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionFlowBooleanConditionType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionFlowBooleanConditionAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionFlowBooleanConditionParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionFlowBooleanCondition build() { - return new FlowActionFlowBooleanCondition( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowBooleanConditionAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowBooleanConditionAction.java deleted file mode 100644 index 431c07e23..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowBooleanConditionAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionFlowBooleanConditionAction { - public static final FlowActionFlowBooleanConditionAction BOOLEAN_CONDITION = - new FlowActionFlowBooleanConditionAction(Value.BOOLEAN_CONDITION, "BOOLEAN_CONDITION"); - - private final Value value; - - private final String string; - - FlowActionFlowBooleanConditionAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionFlowBooleanConditionAction - && this.string.equals(((FlowActionFlowBooleanConditionAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case BOOLEAN_CONDITION: - return visitor.visitBooleanCondition(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionFlowBooleanConditionAction valueOf(String value) { - switch (value) { - case "BOOLEAN_CONDITION": - return BOOLEAN_CONDITION; - default: - return new FlowActionFlowBooleanConditionAction(Value.UNKNOWN, value); - } - } - - public enum Value { - BOOLEAN_CONDITION, - - UNKNOWN - } - - public interface Visitor { - T visitBooleanCondition(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowBooleanConditionParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowBooleanConditionParams.java deleted file mode 100644 index 43db6943a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowBooleanConditionParams.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionFlowBooleanConditionParams.Builder.class) -public final class FlowActionFlowBooleanConditionParams { - private final Optional> then; - - private final Optional> else_; - - private final Map additionalProperties; - - private FlowActionFlowBooleanConditionParams( - Optional> then, - Optional> else_, - Map additionalProperties) { - this.then = then; - this.else_ = else_; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("then") - public Optional> getThen() { - return then; - } - - @JsonProperty("else") - public Optional> getElse() { - return else_; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionFlowBooleanConditionParams - && equalTo((FlowActionFlowBooleanConditionParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionFlowBooleanConditionParams other) { - return then.equals(other.then) && else_.equals(other.else_); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.then, this.else_); - } - - @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> then = Optional.empty(); - - private Optional> else_ = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FlowActionFlowBooleanConditionParams other) { - then(other.getThen()); - else_(other.getElse()); - return this; - } - - @JsonSetter(value = "then", nulls = Nulls.SKIP) - public Builder then(Optional> then) { - this.then = then; - return this; - } - - public Builder then(List then) { - this.then = Optional.ofNullable(then); - return this; - } - - @JsonSetter(value = "else", nulls = Nulls.SKIP) - public Builder else_(Optional> else_) { - this.else_ = else_; - return this; - } - - public Builder else_(List else_) { - this.else_ = Optional.ofNullable(else_); - return this; - } - - public FlowActionFlowBooleanConditionParams build() { - return new FlowActionFlowBooleanConditionParams(then, else_, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowBooleanConditionType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowBooleanConditionType.java deleted file mode 100644 index ee69d86fc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowBooleanConditionType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionFlowBooleanConditionType { - public static final FlowActionFlowBooleanConditionType FLOW = - new FlowActionFlowBooleanConditionType(Value.FLOW, "FLOW"); - - private final Value value; - - private final String string; - - FlowActionFlowBooleanConditionType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionFlowBooleanConditionType - && this.string.equals(((FlowActionFlowBooleanConditionType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FLOW: - return visitor.visitFlow(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionFlowBooleanConditionType valueOf(String value) { - switch (value) { - case "FLOW": - return FLOW; - default: - return new FlowActionFlowBooleanConditionType(Value.UNKNOWN, value); - } - } - - public enum Value { - FLOW, - - UNKNOWN - } - - public interface Visitor { - T visitFlow(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlow.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlow.java deleted file mode 100644 index 3b6c984a9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlow.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionFlowDelayFlow.Builder.class) -public final class FlowActionFlowDelayFlow { - private final String id; - - private final Optional alias; - - private final FlowActionFlowDelayFlowType type; - - private final FlowActionFlowDelayFlowAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionFlowDelayFlowParams params; - - private final Map additionalProperties; - - private FlowActionFlowDelayFlow( - String id, - Optional alias, - FlowActionFlowDelayFlowType type, - FlowActionFlowDelayFlowAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionFlowDelayFlowParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionFlowDelayFlowType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionFlowDelayFlowAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionFlowDelayFlowParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionFlowDelayFlow && equalTo((FlowActionFlowDelayFlow) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionFlowDelayFlow other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionFlowDelayFlow other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionFlowDelayFlowType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionFlowDelayFlowAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionFlowDelayFlowParams params); - } - - public interface _FinalStage { - FlowActionFlowDelayFlow build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionFlowDelayFlowType type; - - private FlowActionFlowDelayFlowAction action; - - private FlowActionFlowDelayFlowParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionFlowDelayFlow other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionFlowDelayFlowType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionFlowDelayFlowAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionFlowDelayFlowParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionFlowDelayFlow build() { - return new FlowActionFlowDelayFlow( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowAction.java deleted file mode 100644 index 5bcecb9ca..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionFlowDelayFlowAction { - public static final FlowActionFlowDelayFlowAction DELAY_FLOW = - new FlowActionFlowDelayFlowAction(Value.DELAY_FLOW, "DELAY_FLOW"); - - private final Value value; - - private final String string; - - FlowActionFlowDelayFlowAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionFlowDelayFlowAction - && this.string.equals(((FlowActionFlowDelayFlowAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DELAY_FLOW: - return visitor.visitDelayFlow(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionFlowDelayFlowAction valueOf(String value) { - switch (value) { - case "DELAY_FLOW": - return DELAY_FLOW; - default: - return new FlowActionFlowDelayFlowAction(Value.UNKNOWN, value); - } - } - - public enum Value { - DELAY_FLOW, - - UNKNOWN - } - - public interface Visitor { - T visitDelayFlow(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowParams.java deleted file mode 100644 index ba1cb36c2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowParams.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionFlowDelayFlowParams.Builder.class) -public final class FlowActionFlowDelayFlowParams { - private final FlowActionFlowDelayFlowParamsNumber number; - - private final Optional units; - - private final Map additionalProperties; - - private FlowActionFlowDelayFlowParams( - FlowActionFlowDelayFlowParamsNumber number, - Optional units, - Map additionalProperties) { - this.number = number; - this.units = units; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("number") - public FlowActionFlowDelayFlowParamsNumber getNumber() { - return number; - } - - @JsonProperty("units") - public Optional getUnits() { - return units; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionFlowDelayFlowParams && equalTo((FlowActionFlowDelayFlowParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionFlowDelayFlowParams other) { - return number.equals(other.number) && units.equals(other.units); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.number, this.units); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NumberStage builder() { - return new Builder(); - } - - public interface NumberStage { - _FinalStage number(@NotNull FlowActionFlowDelayFlowParamsNumber number); - - Builder from(FlowActionFlowDelayFlowParams other); - } - - public interface _FinalStage { - FlowActionFlowDelayFlowParams build(); - - _FinalStage units(Optional units); - - _FinalStage units(FlowActionFlowDelayFlowParamsUnits units); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NumberStage, _FinalStage { - private FlowActionFlowDelayFlowParamsNumber number; - - private Optional units = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionFlowDelayFlowParams other) { - number(other.getNumber()); - units(other.getUnits()); - return this; - } - - @java.lang.Override - @JsonSetter("number") - public _FinalStage number(@NotNull FlowActionFlowDelayFlowParamsNumber number) { - this.number = Objects.requireNonNull(number, "number must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage units(FlowActionFlowDelayFlowParamsUnits units) { - this.units = Optional.ofNullable(units); - return this; - } - - @java.lang.Override - @JsonSetter(value = "units", nulls = Nulls.SKIP) - public _FinalStage units(Optional units) { - this.units = units; - return this; - } - - @java.lang.Override - public FlowActionFlowDelayFlowParams build() { - return new FlowActionFlowDelayFlowParams(number, units, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowParamsNumber.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowParamsNumber.java deleted file mode 100644 index b552f5158..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowParamsNumber.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionFlowDelayFlowParamsNumber.Deserializer.class) -public final class FlowActionFlowDelayFlowParamsNumber { - private final Object value; - - private final int type; - - private FlowActionFlowDelayFlowParamsNumber(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((int) this.value); - } else if (this.type == 1) { - return visitor.visit((String) 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 FlowActionFlowDelayFlowParamsNumber - && equalTo((FlowActionFlowDelayFlowParamsNumber) other); - } - - private boolean equalTo(FlowActionFlowDelayFlowParamsNumber 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 FlowActionFlowDelayFlowParamsNumber of(int value) { - return new FlowActionFlowDelayFlowParamsNumber(value, 0); - } - - public static FlowActionFlowDelayFlowParamsNumber of(String value) { - return new FlowActionFlowDelayFlowParamsNumber(value, 1); - } - - public interface Visitor { - T visit(int value); - - T visit(String value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionFlowDelayFlowParamsNumber.class); - } - - @java.lang.Override - public FlowActionFlowDelayFlowParamsNumber 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/FlowActionFlowDelayFlowParamsUnits.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowParamsUnits.java deleted file mode 100644 index d64396682..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowParamsUnits.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionFlowDelayFlowParamsUnits { - public static final FlowActionFlowDelayFlowParamsUnits SECONDS = - new FlowActionFlowDelayFlowParamsUnits(Value.SECONDS, "SECONDS"); - - public static final FlowActionFlowDelayFlowParamsUnits MINUTES = - new FlowActionFlowDelayFlowParamsUnits(Value.MINUTES, "MINUTES"); - - public static final FlowActionFlowDelayFlowParamsUnits DAYS = - new FlowActionFlowDelayFlowParamsUnits(Value.DAYS, "DAYS"); - - public static final FlowActionFlowDelayFlowParamsUnits HOURS = - new FlowActionFlowDelayFlowParamsUnits(Value.HOURS, "HOURS"); - - private final Value value; - - private final String string; - - FlowActionFlowDelayFlowParamsUnits(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionFlowDelayFlowParamsUnits - && this.string.equals(((FlowActionFlowDelayFlowParamsUnits) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SECONDS: - return visitor.visitSeconds(); - case MINUTES: - return visitor.visitMinutes(); - case DAYS: - return visitor.visitDays(); - case HOURS: - return visitor.visitHours(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionFlowDelayFlowParamsUnits valueOf(String value) { - switch (value) { - case "SECONDS": - return SECONDS; - case "MINUTES": - return MINUTES; - case "DAYS": - return DAYS; - case "HOURS": - return HOURS; - default: - return new FlowActionFlowDelayFlowParamsUnits(Value.UNKNOWN, value); - } - } - - public enum Value { - SECONDS, - - MINUTES, - - HOURS, - - DAYS, - - UNKNOWN - } - - public interface Visitor { - T visitSeconds(); - - T visitMinutes(); - - T visitHours(); - - T visitDays(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowType.java deleted file mode 100644 index 38182c7ab..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDelayFlowType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionFlowDelayFlowType { - public static final FlowActionFlowDelayFlowType FLOW = new FlowActionFlowDelayFlowType(Value.FLOW, "FLOW"); - - private final Value value; - - private final String string; - - FlowActionFlowDelayFlowType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionFlowDelayFlowType - && this.string.equals(((FlowActionFlowDelayFlowType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FLOW: - return visitor.visitFlow(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionFlowDelayFlowType valueOf(String value) { - switch (value) { - case "FLOW": - return FLOW; - default: - return new FlowActionFlowDelayFlowType(Value.UNKNOWN, value); - } - } - - public enum Value { - FLOW, - - UNKNOWN - } - - public interface Visitor { - T visitFlow(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDoNothing.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDoNothing.java deleted file mode 100644 index 3823534b5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDoNothing.java +++ /dev/null @@ -1,276 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionFlowDoNothing.Builder.class) -public final class FlowActionFlowDoNothing { - private final String id; - - private final Optional alias; - - private final FlowActionFlowDoNothingType type; - - private final FlowActionFlowDoNothingAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final Optional params; - - private final Map additionalProperties; - - private FlowActionFlowDoNothing( - String id, - Optional alias, - FlowActionFlowDoNothingType type, - FlowActionFlowDoNothingAction action, - Optional allowFailure, - Optional maskOutput, - Optional params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionFlowDoNothingType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionFlowDoNothingAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public Optional getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionFlowDoNothing && equalTo((FlowActionFlowDoNothing) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionFlowDoNothing other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionFlowDoNothing other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionFlowDoNothingType type); - } - - public interface ActionStage { - _FinalStage action(@NotNull FlowActionFlowDoNothingAction action); - } - - public interface _FinalStage { - FlowActionFlowDoNothing build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - - _FinalStage params(Optional params); - - _FinalStage params(FlowActionFlowDoNothingParams params); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, _FinalStage { - private String id; - - private FlowActionFlowDoNothingType type; - - private FlowActionFlowDoNothingAction action; - - private Optional params = Optional.empty(); - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionFlowDoNothing other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionFlowDoNothingType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public _FinalStage action(@NotNull FlowActionFlowDoNothingAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage params(FlowActionFlowDoNothingParams params) { - this.params = Optional.ofNullable(params); - return this; - } - - @java.lang.Override - @JsonSetter(value = "params", nulls = Nulls.SKIP) - public _FinalStage params(Optional params) { - this.params = params; - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionFlowDoNothing build() { - return new FlowActionFlowDoNothing( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDoNothingAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDoNothingAction.java deleted file mode 100644 index 5d819ca75..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDoNothingAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionFlowDoNothingAction { - public static final FlowActionFlowDoNothingAction DO_NOTHING = - new FlowActionFlowDoNothingAction(Value.DO_NOTHING, "DO_NOTHING"); - - private final Value value; - - private final String string; - - FlowActionFlowDoNothingAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionFlowDoNothingAction - && this.string.equals(((FlowActionFlowDoNothingAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DO_NOTHING: - return visitor.visitDoNothing(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionFlowDoNothingAction valueOf(String value) { - switch (value) { - case "DO_NOTHING": - return DO_NOTHING; - default: - return new FlowActionFlowDoNothingAction(Value.UNKNOWN, value); - } - } - - public enum Value { - DO_NOTHING, - - UNKNOWN - } - - public interface Visitor { - T visitDoNothing(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDoNothingParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDoNothingParams.java deleted file mode 100644 index 35a08cb41..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDoNothingParams.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.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 = FlowActionFlowDoNothingParams.Builder.class) -public final class FlowActionFlowDoNothingParams { - private final Map additionalProperties; - - private FlowActionFlowDoNothingParams(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionFlowDoNothingParams; - } - - @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(FlowActionFlowDoNothingParams other) { - return this; - } - - public FlowActionFlowDoNothingParams build() { - return new FlowActionFlowDoNothingParams(additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDoNothingType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDoNothingType.java deleted file mode 100644 index 68a2b2a34..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowDoNothingType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionFlowDoNothingType { - public static final FlowActionFlowDoNothingType FLOW = new FlowActionFlowDoNothingType(Value.FLOW, "FLOW"); - - private final Value value; - - private final String string; - - FlowActionFlowDoNothingType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionFlowDoNothingType - && this.string.equals(((FlowActionFlowDoNothingType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FLOW: - return visitor.visitFlow(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionFlowDoNothingType valueOf(String value) { - switch (value) { - case "FLOW": - return FLOW; - default: - return new FlowActionFlowDoNothingType(Value.UNKNOWN, value); - } - } - - public enum Value { - FLOW, - - UNKNOWN - } - - public interface Visitor { - T visitFlow(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowErrorMessage.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowErrorMessage.java deleted file mode 100644 index 124899924..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowErrorMessage.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionFlowErrorMessage.Builder.class) -public final class FlowActionFlowErrorMessage { - private final String id; - - private final Optional alias; - - private final FlowActionFlowErrorMessageType type; - - private final FlowActionFlowErrorMessageAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionFlowErrorMessageParams params; - - private final Map additionalProperties; - - private FlowActionFlowErrorMessage( - String id, - Optional alias, - FlowActionFlowErrorMessageType type, - FlowActionFlowErrorMessageAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionFlowErrorMessageParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionFlowErrorMessageType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionFlowErrorMessageAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionFlowErrorMessageParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionFlowErrorMessage && equalTo((FlowActionFlowErrorMessage) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionFlowErrorMessage other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionFlowErrorMessage other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionFlowErrorMessageType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionFlowErrorMessageAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionFlowErrorMessageParams params); - } - - public interface _FinalStage { - FlowActionFlowErrorMessage build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionFlowErrorMessageType type; - - private FlowActionFlowErrorMessageAction action; - - private FlowActionFlowErrorMessageParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionFlowErrorMessage other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionFlowErrorMessageType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionFlowErrorMessageAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionFlowErrorMessageParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionFlowErrorMessage build() { - return new FlowActionFlowErrorMessage( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowErrorMessageAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowErrorMessageAction.java deleted file mode 100644 index 611df4d26..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowErrorMessageAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionFlowErrorMessageAction { - public static final FlowActionFlowErrorMessageAction ERROR_MESSAGE = - new FlowActionFlowErrorMessageAction(Value.ERROR_MESSAGE, "ERROR_MESSAGE"); - - private final Value value; - - private final String string; - - FlowActionFlowErrorMessageAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionFlowErrorMessageAction - && this.string.equals(((FlowActionFlowErrorMessageAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ERROR_MESSAGE: - return visitor.visitErrorMessage(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionFlowErrorMessageAction valueOf(String value) { - switch (value) { - case "ERROR_MESSAGE": - return ERROR_MESSAGE; - default: - return new FlowActionFlowErrorMessageAction(Value.UNKNOWN, value); - } - } - - public enum Value { - ERROR_MESSAGE, - - UNKNOWN - } - - public interface Visitor { - T visitErrorMessage(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowErrorMessageParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowErrorMessageParams.java deleted file mode 100644 index 0628fae3e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowErrorMessageParams.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionFlowErrorMessageParams.Builder.class) -public final class FlowActionFlowErrorMessageParams { - private final String message; - - private final Map additionalProperties; - - private FlowActionFlowErrorMessageParams(String message, Map additionalProperties) { - this.message = message; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("message") - public String getMessage() { - return message; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionFlowErrorMessageParams && equalTo((FlowActionFlowErrorMessageParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionFlowErrorMessageParams other) { - return message.equals(other.message); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.message); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static MessageStage builder() { - return new Builder(); - } - - public interface MessageStage { - _FinalStage message(@NotNull String message); - - Builder from(FlowActionFlowErrorMessageParams other); - } - - public interface _FinalStage { - FlowActionFlowErrorMessageParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements MessageStage, _FinalStage { - private String message; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionFlowErrorMessageParams other) { - message(other.getMessage()); - return this; - } - - @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 FlowActionFlowErrorMessageParams build() { - return new FlowActionFlowErrorMessageParams(message, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowErrorMessageType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowErrorMessageType.java deleted file mode 100644 index 2e5b5494a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowErrorMessageType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionFlowErrorMessageType { - public static final FlowActionFlowErrorMessageType FLOW = new FlowActionFlowErrorMessageType(Value.FLOW, "FLOW"); - - private final Value value; - - private final String string; - - FlowActionFlowErrorMessageType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionFlowErrorMessageType - && this.string.equals(((FlowActionFlowErrorMessageType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FLOW: - return visitor.visitFlow(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionFlowErrorMessageType valueOf(String value) { - switch (value) { - case "FLOW": - return FLOW; - default: - return new FlowActionFlowErrorMessageType(Value.UNKNOWN, value); - } - } - - public enum Value { - FLOW, - - UNKNOWN - } - - public interface Visitor { - T visitFlow(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValue.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValue.java deleted file mode 100644 index d795d9c1f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValue.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionFlowMapValue.Builder.class) -public final class FlowActionFlowMapValue { - private final String id; - - private final Optional alias; - - private final FlowActionFlowMapValueType type; - - private final FlowActionFlowMapValueAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionFlowMapValueParams params; - - private final Map additionalProperties; - - private FlowActionFlowMapValue( - String id, - Optional alias, - FlowActionFlowMapValueType type, - FlowActionFlowMapValueAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionFlowMapValueParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionFlowMapValueType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionFlowMapValueAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionFlowMapValueParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionFlowMapValue && equalTo((FlowActionFlowMapValue) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionFlowMapValue other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionFlowMapValue other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionFlowMapValueType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionFlowMapValueAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionFlowMapValueParams params); - } - - public interface _FinalStage { - FlowActionFlowMapValue build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionFlowMapValueType type; - - private FlowActionFlowMapValueAction action; - - private FlowActionFlowMapValueParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionFlowMapValue other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionFlowMapValueType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionFlowMapValueAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionFlowMapValueParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionFlowMapValue build() { - return new FlowActionFlowMapValue( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueAction.java deleted file mode 100644 index df662ea97..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionFlowMapValueAction { - public static final FlowActionFlowMapValueAction MAP_VALUE = - new FlowActionFlowMapValueAction(Value.MAP_VALUE, "MAP_VALUE"); - - private final Value value; - - private final String string; - - FlowActionFlowMapValueAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionFlowMapValueAction - && this.string.equals(((FlowActionFlowMapValueAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MAP_VALUE: - return visitor.visitMapValue(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionFlowMapValueAction valueOf(String value) { - switch (value) { - case "MAP_VALUE": - return MAP_VALUE; - default: - return new FlowActionFlowMapValueAction(Value.UNKNOWN, value); - } - } - - public enum Value { - MAP_VALUE, - - UNKNOWN - } - - public interface Visitor { - T visitMapValue(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParams.java deleted file mode 100644 index 850feaf73..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParams.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionFlowMapValueParams.Builder.class) -public final class FlowActionFlowMapValueParams { - private final FlowActionFlowMapValueParamsInput input; - - private final Optional> cases; - - private final Optional fallback; - - private final Map additionalProperties; - - private FlowActionFlowMapValueParams( - FlowActionFlowMapValueParamsInput input, - Optional> cases, - Optional fallback, - Map additionalProperties) { - this.input = input; - this.cases = cases; - this.fallback = fallback; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("input") - public FlowActionFlowMapValueParamsInput getInput() { - return input; - } - - @JsonProperty("cases") - public Optional> getCases() { - return cases; - } - - @JsonProperty("fallback") - public Optional getFallback() { - return fallback; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionFlowMapValueParams && equalTo((FlowActionFlowMapValueParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionFlowMapValueParams other) { - return input.equals(other.input) && cases.equals(other.cases) && fallback.equals(other.fallback); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.input, this.cases, this.fallback); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static InputStage builder() { - return new Builder(); - } - - public interface InputStage { - _FinalStage input(@NotNull FlowActionFlowMapValueParamsInput input); - - Builder from(FlowActionFlowMapValueParams other); - } - - public interface _FinalStage { - FlowActionFlowMapValueParams build(); - - _FinalStage cases(Optional> cases); - - _FinalStage cases(Map cases); - - _FinalStage fallback(Optional fallback); - - _FinalStage fallback(FlowActionFlowMapValueParamsFallback fallback); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements InputStage, _FinalStage { - private FlowActionFlowMapValueParamsInput input; - - private Optional fallback = Optional.empty(); - - private Optional> cases = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionFlowMapValueParams other) { - input(other.getInput()); - cases(other.getCases()); - fallback(other.getFallback()); - return this; - } - - @java.lang.Override - @JsonSetter("input") - public _FinalStage input(@NotNull FlowActionFlowMapValueParamsInput input) { - this.input = Objects.requireNonNull(input, "input must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage fallback(FlowActionFlowMapValueParamsFallback fallback) { - this.fallback = Optional.ofNullable(fallback); - return this; - } - - @java.lang.Override - @JsonSetter(value = "fallback", nulls = Nulls.SKIP) - public _FinalStage fallback(Optional fallback) { - this.fallback = fallback; - return this; - } - - @java.lang.Override - public _FinalStage cases(Map cases) { - this.cases = Optional.ofNullable(cases); - return this; - } - - @java.lang.Override - @JsonSetter(value = "cases", nulls = Nulls.SKIP) - public _FinalStage cases(Optional> cases) { - this.cases = cases; - return this; - } - - @java.lang.Override - public FlowActionFlowMapValueParams build() { - return new FlowActionFlowMapValueParams(input, cases, fallback, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParamsFallback.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParamsFallback.java deleted file mode 100644 index 48a01b9d9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParamsFallback.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionFlowMapValueParamsFallback.Deserializer.class) -public final class FlowActionFlowMapValueParamsFallback { - private final Object value; - - private final int type; - - private FlowActionFlowMapValueParamsFallback(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((double) this.value); - } else if (this.type == 2) { - return visitor.visit((Map) this.value); - } else if (this.type == 3) { - return visitor.visit((List) 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 FlowActionFlowMapValueParamsFallback - && equalTo((FlowActionFlowMapValueParamsFallback) other); - } - - private boolean equalTo(FlowActionFlowMapValueParamsFallback 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 FlowActionFlowMapValueParamsFallback of(String value) { - return new FlowActionFlowMapValueParamsFallback(value, 0); - } - - public static FlowActionFlowMapValueParamsFallback of(double value) { - return new FlowActionFlowMapValueParamsFallback(value, 1); - } - - public static FlowActionFlowMapValueParamsFallback of(Map value) { - return new FlowActionFlowMapValueParamsFallback(value, 2); - } - - public static FlowActionFlowMapValueParamsFallback of(List value) { - return new FlowActionFlowMapValueParamsFallback(value, 3); - } - - public interface Visitor { - T visit(String value); - - T visit(double value); - - T visit(Map value); - - T visit(List value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionFlowMapValueParamsFallback.class); - } - - @java.lang.Override - public FlowActionFlowMapValueParamsFallback deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - if (value instanceof Double) { - return of((Double) value); - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference>() {})); - } 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/FlowActionFlowMapValueParamsInput.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParamsInput.java deleted file mode 100644 index da6cdaaba..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueParamsInput.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionFlowMapValueParamsInput.Deserializer.class) -public final class FlowActionFlowMapValueParamsInput { - private final Object value; - - private final int type; - - private FlowActionFlowMapValueParamsInput(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((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 FlowActionFlowMapValueParamsInput && equalTo((FlowActionFlowMapValueParamsInput) other); - } - - private boolean equalTo(FlowActionFlowMapValueParamsInput 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 FlowActionFlowMapValueParamsInput of(String value) { - return new FlowActionFlowMapValueParamsInput(value, 0); - } - - public static FlowActionFlowMapValueParamsInput of(double value) { - return new FlowActionFlowMapValueParamsInput(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(double value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionFlowMapValueParamsInput.class); - } - - @java.lang.Override - public FlowActionFlowMapValueParamsInput deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - if (value instanceof Double) { - return of((Double) value); - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueType.java deleted file mode 100644 index 322ed0b14..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowMapValueType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionFlowMapValueType { - public static final FlowActionFlowMapValueType FLOW = new FlowActionFlowMapValueType(Value.FLOW, "FLOW"); - - private final Value value; - - private final String string; - - FlowActionFlowMapValueType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionFlowMapValueType - && this.string.equals(((FlowActionFlowMapValueType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FLOW: - return visitor.visitFlow(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionFlowMapValueType valueOf(String value) { - switch (value) { - case "FLOW": - return FLOW; - default: - return new FlowActionFlowMapValueType(Value.UNKNOWN, value); - } - } - - public enum Value { - FLOW, - - UNKNOWN - } - - public interface Visitor { - T visitFlow(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowReturnJson.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowReturnJson.java deleted file mode 100644 index d63a58006..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowReturnJson.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionFlowReturnJson.Builder.class) -public final class FlowActionFlowReturnJson { - private final String id; - - private final Optional alias; - - private final FlowActionFlowReturnJsonType type; - - private final FlowActionFlowReturnJsonAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionFlowReturnJsonParams params; - - private final Map additionalProperties; - - private FlowActionFlowReturnJson( - String id, - Optional alias, - FlowActionFlowReturnJsonType type, - FlowActionFlowReturnJsonAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionFlowReturnJsonParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionFlowReturnJsonType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionFlowReturnJsonAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionFlowReturnJsonParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionFlowReturnJson && equalTo((FlowActionFlowReturnJson) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionFlowReturnJson other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionFlowReturnJson other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionFlowReturnJsonType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionFlowReturnJsonAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionFlowReturnJsonParams params); - } - - public interface _FinalStage { - FlowActionFlowReturnJson build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionFlowReturnJsonType type; - - private FlowActionFlowReturnJsonAction action; - - private FlowActionFlowReturnJsonParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionFlowReturnJson other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionFlowReturnJsonType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionFlowReturnJsonAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionFlowReturnJsonParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionFlowReturnJson build() { - return new FlowActionFlowReturnJson( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowReturnJsonAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowReturnJsonAction.java deleted file mode 100644 index 04fa3a564..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowReturnJsonAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionFlowReturnJsonAction { - public static final FlowActionFlowReturnJsonAction RETURN_JSON = - new FlowActionFlowReturnJsonAction(Value.RETURN_JSON, "RETURN_JSON"); - - private final Value value; - - private final String string; - - FlowActionFlowReturnJsonAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionFlowReturnJsonAction - && this.string.equals(((FlowActionFlowReturnJsonAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case RETURN_JSON: - return visitor.visitReturnJson(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionFlowReturnJsonAction valueOf(String value) { - switch (value) { - case "RETURN_JSON": - return RETURN_JSON; - default: - return new FlowActionFlowReturnJsonAction(Value.UNKNOWN, value); - } - } - - public enum Value { - RETURN_JSON, - - UNKNOWN - } - - public interface Visitor { - T visitReturnJson(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowReturnJsonParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowReturnJsonParams.java deleted file mode 100644 index c80f080fe..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowReturnJsonParams.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionFlowReturnJsonParams.Builder.class) -public final class FlowActionFlowReturnJsonParams { - private final FlowActionFlowReturnJsonParamsPayload payload; - - private final Map additionalProperties; - - private FlowActionFlowReturnJsonParams( - FlowActionFlowReturnJsonParamsPayload payload, Map additionalProperties) { - this.payload = payload; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("payload") - public FlowActionFlowReturnJsonParamsPayload getPayload() { - return payload; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionFlowReturnJsonParams && equalTo((FlowActionFlowReturnJsonParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionFlowReturnJsonParams other) { - return payload.equals(other.payload); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.payload); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static PayloadStage builder() { - return new Builder(); - } - - public interface PayloadStage { - _FinalStage payload(@NotNull FlowActionFlowReturnJsonParamsPayload payload); - - Builder from(FlowActionFlowReturnJsonParams other); - } - - public interface _FinalStage { - FlowActionFlowReturnJsonParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements PayloadStage, _FinalStage { - private FlowActionFlowReturnJsonParamsPayload payload; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionFlowReturnJsonParams other) { - payload(other.getPayload()); - return this; - } - - @java.lang.Override - @JsonSetter("payload") - public _FinalStage payload(@NotNull FlowActionFlowReturnJsonParamsPayload payload) { - this.payload = Objects.requireNonNull(payload, "payload must not be null"); - return this; - } - - @java.lang.Override - public FlowActionFlowReturnJsonParams build() { - return new FlowActionFlowReturnJsonParams(payload, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowReturnJsonParamsPayload.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowReturnJsonParamsPayload.java deleted file mode 100644 index 098c68e40..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowReturnJsonParamsPayload.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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.Map; -import java.util.Objects; - -@JsonDeserialize(using = FlowActionFlowReturnJsonParamsPayload.Deserializer.class) -public final class FlowActionFlowReturnJsonParamsPayload { - private final Object value; - - private final int type; - - private FlowActionFlowReturnJsonParamsPayload(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((Map) this.value); - } else if (this.type == 1) { - return visitor.visit((String) 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 FlowActionFlowReturnJsonParamsPayload - && equalTo((FlowActionFlowReturnJsonParamsPayload) other); - } - - private boolean equalTo(FlowActionFlowReturnJsonParamsPayload 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 FlowActionFlowReturnJsonParamsPayload of(Map value) { - return new FlowActionFlowReturnJsonParamsPayload(value, 0); - } - - public static FlowActionFlowReturnJsonParamsPayload of(String value) { - return new FlowActionFlowReturnJsonParamsPayload(value, 1); - } - - public interface Visitor { - T visit(Map value); - - T visit(String value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionFlowReturnJsonParamsPayload.class); - } - - @java.lang.Override - public FlowActionFlowReturnJsonParamsPayload 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) { - } - 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/FlowActionFlowReturnJsonType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowReturnJsonType.java deleted file mode 100644 index 456a7a4d9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowReturnJsonType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionFlowReturnJsonType { - public static final FlowActionFlowReturnJsonType FLOW = new FlowActionFlowReturnJsonType(Value.FLOW, "FLOW"); - - private final Value value; - - private final String string; - - FlowActionFlowReturnJsonType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionFlowReturnJsonType - && this.string.equals(((FlowActionFlowReturnJsonType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FLOW: - return visitor.visitFlow(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionFlowReturnJsonType valueOf(String value) { - switch (value) { - case "FLOW": - return FLOW; - default: - return new FlowActionFlowReturnJsonType(Value.UNKNOWN, value); - } - } - - public enum Value { - FLOW, - - UNKNOWN - } - - public interface Visitor { - T visitFlow(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowStoreVars.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowStoreVars.java deleted file mode 100644 index c9edef5c3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowStoreVars.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionFlowStoreVars.Builder.class) -public final class FlowActionFlowStoreVars { - private final String id; - - private final Optional alias; - - private final FlowActionFlowStoreVarsType type; - - private final FlowActionFlowStoreVarsAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionFlowStoreVarsParams params; - - private final Map additionalProperties; - - private FlowActionFlowStoreVars( - String id, - Optional alias, - FlowActionFlowStoreVarsType type, - FlowActionFlowStoreVarsAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionFlowStoreVarsParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionFlowStoreVarsType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionFlowStoreVarsAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionFlowStoreVarsParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionFlowStoreVars && equalTo((FlowActionFlowStoreVars) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionFlowStoreVars other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionFlowStoreVars other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionFlowStoreVarsType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionFlowStoreVarsAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionFlowStoreVarsParams params); - } - - public interface _FinalStage { - FlowActionFlowStoreVars build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionFlowStoreVarsType type; - - private FlowActionFlowStoreVarsAction action; - - private FlowActionFlowStoreVarsParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionFlowStoreVars other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionFlowStoreVarsType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionFlowStoreVarsAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionFlowStoreVarsParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionFlowStoreVars build() { - return new FlowActionFlowStoreVars( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowStoreVarsAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowStoreVarsAction.java deleted file mode 100644 index b4e76dcfd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowStoreVarsAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionFlowStoreVarsAction { - public static final FlowActionFlowStoreVarsAction STORE_VARS = - new FlowActionFlowStoreVarsAction(Value.STORE_VARS, "STORE_VARS"); - - private final Value value; - - private final String string; - - FlowActionFlowStoreVarsAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionFlowStoreVarsAction - && this.string.equals(((FlowActionFlowStoreVarsAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case STORE_VARS: - return visitor.visitStoreVars(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionFlowStoreVarsAction valueOf(String value) { - switch (value) { - case "STORE_VARS": - return STORE_VARS; - default: - return new FlowActionFlowStoreVarsAction(Value.UNKNOWN, value); - } - } - - public enum Value { - STORE_VARS, - - UNKNOWN - } - - public interface Visitor { - T visitStoreVars(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowStoreVarsParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowStoreVarsParams.java deleted file mode 100644 index 41ccaa29f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowStoreVarsParams.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = FlowActionFlowStoreVarsParams.Builder.class) -public final class FlowActionFlowStoreVarsParams { - private final Map vars; - - private final Map additionalProperties; - - private FlowActionFlowStoreVarsParams(Map vars, Map additionalProperties) { - this.vars = vars; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("vars") - public Map getVars() { - return vars; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionFlowStoreVarsParams && equalTo((FlowActionFlowStoreVarsParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionFlowStoreVarsParams other) { - return vars.equals(other.vars); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.vars); - } - - @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 Map vars = new LinkedHashMap<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FlowActionFlowStoreVarsParams other) { - vars(other.getVars()); - return this; - } - - @JsonSetter(value = "vars", nulls = Nulls.SKIP) - public Builder vars(Map vars) { - this.vars.clear(); - if (vars != null) { - this.vars.putAll(vars); - } - return this; - } - - public Builder putAllVars(Map vars) { - if (vars != null) { - this.vars.putAll(vars); - } - return this; - } - - public Builder vars(String key, Object value) { - this.vars.put(key, value); - return this; - } - - public FlowActionFlowStoreVarsParams build() { - return new FlowActionFlowStoreVarsParams(vars, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowStoreVarsType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowStoreVarsType.java deleted file mode 100644 index 0a21fdcfc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionFlowStoreVarsType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionFlowStoreVarsType { - public static final FlowActionFlowStoreVarsType FLOW = new FlowActionFlowStoreVarsType(Value.FLOW, "FLOW"); - - private final Value value; - - private final String string; - - FlowActionFlowStoreVarsType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionFlowStoreVarsType - && this.string.equals(((FlowActionFlowStoreVarsType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FLOW: - return visitor.visitFlow(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionFlowStoreVarsType valueOf(String value) { - switch (value) { - case "FLOW": - return FLOW; - default: - return new FlowActionFlowStoreVarsType(Value.UNKNOWN, value); - } - } - - public enum Value { - FLOW, - - UNKNOWN - } - - public interface Visitor { - T visitFlow(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionGoogleSheetsAddRow.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionGoogleSheetsAddRow.java deleted file mode 100644 index 7d0da1d88..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionGoogleSheetsAddRow.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionGoogleSheetsAddRow.Builder.class) -public final class FlowActionGoogleSheetsAddRow { - private final String id; - - private final Optional alias; - - private final FlowActionGoogleSheetsAddRowType type; - - private final FlowActionGoogleSheetsAddRowAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionGoogleSheetsAddRowParams params; - - private final Map additionalProperties; - - private FlowActionGoogleSheetsAddRow( - String id, - Optional alias, - FlowActionGoogleSheetsAddRowType type, - FlowActionGoogleSheetsAddRowAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionGoogleSheetsAddRowParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionGoogleSheetsAddRowType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionGoogleSheetsAddRowAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionGoogleSheetsAddRowParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionGoogleSheetsAddRow && equalTo((FlowActionGoogleSheetsAddRow) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionGoogleSheetsAddRow other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionGoogleSheetsAddRow other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionGoogleSheetsAddRowType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionGoogleSheetsAddRowAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionGoogleSheetsAddRowParams params); - } - - public interface _FinalStage { - FlowActionGoogleSheetsAddRow build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionGoogleSheetsAddRowType type; - - private FlowActionGoogleSheetsAddRowAction action; - - private FlowActionGoogleSheetsAddRowParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionGoogleSheetsAddRow other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionGoogleSheetsAddRowType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionGoogleSheetsAddRowAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionGoogleSheetsAddRowParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionGoogleSheetsAddRow build() { - return new FlowActionGoogleSheetsAddRow( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionGoogleSheetsAddRowAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionGoogleSheetsAddRowAction.java deleted file mode 100644 index 720662a1d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionGoogleSheetsAddRowAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionGoogleSheetsAddRowAction { - public static final FlowActionGoogleSheetsAddRowAction ADD_ROW = - new FlowActionGoogleSheetsAddRowAction(Value.ADD_ROW, "ADD_ROW"); - - private final Value value; - - private final String string; - - FlowActionGoogleSheetsAddRowAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionGoogleSheetsAddRowAction - && this.string.equals(((FlowActionGoogleSheetsAddRowAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ADD_ROW: - return visitor.visitAddRow(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionGoogleSheetsAddRowAction valueOf(String value) { - switch (value) { - case "ADD_ROW": - return ADD_ROW; - default: - return new FlowActionGoogleSheetsAddRowAction(Value.UNKNOWN, value); - } - } - - public enum Value { - ADD_ROW, - - UNKNOWN - } - - public interface Visitor { - T visitAddRow(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionGoogleSheetsAddRowParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionGoogleSheetsAddRowParams.java deleted file mode 100644 index 38924b194..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionGoogleSheetsAddRowParams.java +++ /dev/null @@ -1,194 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = FlowActionGoogleSheetsAddRowParams.Builder.class) -public final class FlowActionGoogleSheetsAddRowParams { - private final String connectionId; - - private final String spreadsheetId; - - private final Optional sheetId; - - private final Optional>> values; - - private final Map additionalProperties; - - private FlowActionGoogleSheetsAddRowParams( - String connectionId, - String spreadsheetId, - Optional sheetId, - Optional>> values, - Map additionalProperties) { - this.connectionId = connectionId; - this.spreadsheetId = spreadsheetId; - this.sheetId = sheetId; - this.values = values; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("spreadsheet_id") - public String getSpreadsheetId() { - return spreadsheetId; - } - - @JsonProperty("sheet_id") - public Optional getSheetId() { - return sheetId; - } - - @JsonProperty("values") - public Optional>> getValues() { - return values; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionGoogleSheetsAddRowParams - && equalTo((FlowActionGoogleSheetsAddRowParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionGoogleSheetsAddRowParams other) { - return connectionId.equals(other.connectionId) - && spreadsheetId.equals(other.spreadsheetId) - && sheetId.equals(other.sheetId) - && values.equals(other.values); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.spreadsheetId, this.sheetId, this.values); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - SpreadsheetIdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionGoogleSheetsAddRowParams other); - } - - public interface SpreadsheetIdStage { - _FinalStage spreadsheetId(@NotNull String spreadsheetId); - } - - public interface _FinalStage { - FlowActionGoogleSheetsAddRowParams build(); - - _FinalStage sheetId(Optional sheetId); - - _FinalStage sheetId(FlowActionGoogleSheetsAddRowParamsSheetId sheetId); - - _FinalStage values(Optional>> values); - - _FinalStage values(List> values); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, SpreadsheetIdStage, _FinalStage { - private String connectionId; - - private String spreadsheetId; - - private Optional>> values = Optional.empty(); - - private Optional sheetId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionGoogleSheetsAddRowParams other) { - connectionId(other.getConnectionId()); - spreadsheetId(other.getSpreadsheetId()); - sheetId(other.getSheetId()); - values(other.getValues()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public SpreadsheetIdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("spreadsheet_id") - public _FinalStage spreadsheetId(@NotNull String spreadsheetId) { - this.spreadsheetId = Objects.requireNonNull(spreadsheetId, "spreadsheetId must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage values(List> values) { - this.values = Optional.ofNullable(values); - return this; - } - - @java.lang.Override - @JsonSetter(value = "values", nulls = Nulls.SKIP) - public _FinalStage values(Optional>> values) { - this.values = values; - return this; - } - - @java.lang.Override - public _FinalStage sheetId(FlowActionGoogleSheetsAddRowParamsSheetId sheetId) { - this.sheetId = Optional.ofNullable(sheetId); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sheet_id", nulls = Nulls.SKIP) - public _FinalStage sheetId(Optional sheetId) { - this.sheetId = sheetId; - return this; - } - - @java.lang.Override - public FlowActionGoogleSheetsAddRowParams build() { - return new FlowActionGoogleSheetsAddRowParams( - connectionId, spreadsheetId, sheetId, values, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionGoogleSheetsAddRowParamsSheetId.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionGoogleSheetsAddRowParamsSheetId.java deleted file mode 100644 index f7e4f5065..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionGoogleSheetsAddRowParamsSheetId.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionGoogleSheetsAddRowParamsSheetId.Deserializer.class) -public final class FlowActionGoogleSheetsAddRowParamsSheetId { - private final Object value; - - private final int type; - - private FlowActionGoogleSheetsAddRowParamsSheetId(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((int) this.value); - } else if (this.type == 1) { - return visitor.visit((String) 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 FlowActionGoogleSheetsAddRowParamsSheetId - && equalTo((FlowActionGoogleSheetsAddRowParamsSheetId) other); - } - - private boolean equalTo(FlowActionGoogleSheetsAddRowParamsSheetId 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 FlowActionGoogleSheetsAddRowParamsSheetId of(int value) { - return new FlowActionGoogleSheetsAddRowParamsSheetId(value, 0); - } - - public static FlowActionGoogleSheetsAddRowParamsSheetId of(String value) { - return new FlowActionGoogleSheetsAddRowParamsSheetId(value, 1); - } - - public interface Visitor { - T visit(int value); - - T visit(String value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionGoogleSheetsAddRowParamsSheetId.class); - } - - @java.lang.Override - public FlowActionGoogleSheetsAddRowParamsSheetId 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/FlowActionGoogleSheetsAddRowType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionGoogleSheetsAddRowType.java deleted file mode 100644 index 586e92c68..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionGoogleSheetsAddRowType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionGoogleSheetsAddRowType { - public static final FlowActionGoogleSheetsAddRowType GOOGLE_SHEETS = - new FlowActionGoogleSheetsAddRowType(Value.GOOGLE_SHEETS, "GOOGLE_SHEETS"); - - private final Value value; - - private final String string; - - FlowActionGoogleSheetsAddRowType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionGoogleSheetsAddRowType - && this.string.equals(((FlowActionGoogleSheetsAddRowType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GOOGLE_SHEETS: - return visitor.visitGoogleSheets(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionGoogleSheetsAddRowType valueOf(String value) { - switch (value) { - case "GOOGLE_SHEETS": - return GOOGLE_SHEETS; - default: - return new FlowActionGoogleSheetsAddRowType(Value.UNKNOWN, value); - } - } - - public enum Value { - GOOGLE_SHEETS, - - UNKNOWN - } - - public interface Visitor { - T visitGoogleSheets(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequest.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequest.java deleted file mode 100644 index e217ae638..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequest.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionHttpSendRequest.Builder.class) -public final class FlowActionHttpSendRequest { - private final String id; - - private final Optional alias; - - private final FlowActionHttpSendRequestType type; - - private final FlowActionHttpSendRequestAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionHttpSendRequestParams params; - - private final Map additionalProperties; - - private FlowActionHttpSendRequest( - String id, - Optional alias, - FlowActionHttpSendRequestType type, - FlowActionHttpSendRequestAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionHttpSendRequestParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionHttpSendRequestType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionHttpSendRequestAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionHttpSendRequestParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionHttpSendRequest && equalTo((FlowActionHttpSendRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionHttpSendRequest other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionHttpSendRequest other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionHttpSendRequestType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionHttpSendRequestAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionHttpSendRequestParams params); - } - - public interface _FinalStage { - FlowActionHttpSendRequest build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionHttpSendRequestType type; - - private FlowActionHttpSendRequestAction action; - - private FlowActionHttpSendRequestParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionHttpSendRequest other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionHttpSendRequestType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionHttpSendRequestAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionHttpSendRequestParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionHttpSendRequest build() { - return new FlowActionHttpSendRequest( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestAction.java deleted file mode 100644 index 93679aabc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionHttpSendRequestAction { - public static final FlowActionHttpSendRequestAction SEND_REQUEST = - new FlowActionHttpSendRequestAction(Value.SEND_REQUEST, "SEND_REQUEST"); - - private final Value value; - - private final String string; - - FlowActionHttpSendRequestAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionHttpSendRequestAction - && this.string.equals(((FlowActionHttpSendRequestAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SEND_REQUEST: - return visitor.visitSendRequest(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionHttpSendRequestAction valueOf(String value) { - switch (value) { - case "SEND_REQUEST": - return SEND_REQUEST; - default: - return new FlowActionHttpSendRequestAction(Value.UNKNOWN, value); - } - } - - public enum Value { - SEND_REQUEST, - - UNKNOWN - } - - public interface Visitor { - T visitSendRequest(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParams.java deleted file mode 100644 index b239b21ff..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParams.java +++ /dev/null @@ -1,330 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = FlowActionHttpSendRequestParams.Builder.class) -public final class FlowActionHttpSendRequestParams { - private final Optional connectionId; - - private final String url; - - private final Optional method; - - private final Optional> headers; - - private final Optional basic; - - private final Optional>> params; - - private final Optional payload; - - private final Optional contentType; - - private final Map additionalProperties; - - private FlowActionHttpSendRequestParams( - Optional connectionId, - String url, - Optional method, - Optional> headers, - Optional basic, - Optional>> params, - Optional payload, - Optional contentType, - Map additionalProperties) { - this.connectionId = connectionId; - this.url = url; - this.method = method; - this.headers = headers; - this.basic = basic; - this.params = params; - this.payload = payload; - this.contentType = contentType; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - @JsonProperty("url") - public String getUrl() { - return url; - } - - @JsonProperty("method") - public Optional getMethod() { - return method; - } - - @JsonProperty("headers") - public Optional> getHeaders() { - return headers; - } - - @JsonProperty("basic") - public Optional getBasic() { - return basic; - } - - @JsonProperty("params") - public Optional>> getParams() { - return params; - } - - @JsonProperty("payload") - public Optional getPayload() { - return payload; - } - - @JsonProperty("content_type") - public Optional getContentType() { - return contentType; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionHttpSendRequestParams && equalTo((FlowActionHttpSendRequestParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionHttpSendRequestParams other) { - return connectionId.equals(other.connectionId) - && url.equals(other.url) - && method.equals(other.method) - && headers.equals(other.headers) - && basic.equals(other.basic) - && params.equals(other.params) - && payload.equals(other.payload) - && contentType.equals(other.contentType); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.url, - this.method, - this.headers, - this.basic, - this.params, - this.payload, - this.contentType); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static UrlStage builder() { - return new Builder(); - } - - public interface UrlStage { - _FinalStage url(@NotNull String url); - - Builder from(FlowActionHttpSendRequestParams other); - } - - public interface _FinalStage { - FlowActionHttpSendRequestParams build(); - - _FinalStage connectionId(Optional connectionId); - - _FinalStage connectionId(String connectionId); - - _FinalStage method(Optional method); - - _FinalStage method(FlowActionHttpSendRequestParamsMethod method); - - _FinalStage headers(Optional> headers); - - _FinalStage headers(Map headers); - - _FinalStage basic(Optional basic); - - _FinalStage basic(FlowActionHttpSendRequestParamsBasicAuth basic); - - _FinalStage params( - Optional>> params); - - _FinalStage params(Map> params); - - _FinalStage payload(Optional payload); - - _FinalStage payload(FlowActionHttpSendRequestParamsPayload payload); - - _FinalStage contentType(Optional contentType); - - _FinalStage contentType(FlowActionHttpSendRequestParamsContentType contentType); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements UrlStage, _FinalStage { - private String url; - - private Optional contentType = Optional.empty(); - - private Optional payload = Optional.empty(); - - private Optional>> params = - Optional.empty(); - - private Optional basic = Optional.empty(); - - private Optional> headers = Optional.empty(); - - private Optional method = Optional.empty(); - - private Optional connectionId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionHttpSendRequestParams other) { - connectionId(other.getConnectionId()); - url(other.getUrl()); - method(other.getMethod()); - headers(other.getHeaders()); - basic(other.getBasic()); - params(other.getParams()); - payload(other.getPayload()); - contentType(other.getContentType()); - return this; - } - - @java.lang.Override - @JsonSetter("url") - public _FinalStage url(@NotNull String url) { - this.url = Objects.requireNonNull(url, "url must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage contentType(FlowActionHttpSendRequestParamsContentType contentType) { - this.contentType = Optional.ofNullable(contentType); - return this; - } - - @java.lang.Override - @JsonSetter(value = "content_type", nulls = Nulls.SKIP) - public _FinalStage contentType(Optional contentType) { - this.contentType = contentType; - return this; - } - - @java.lang.Override - public _FinalStage payload(FlowActionHttpSendRequestParamsPayload payload) { - this.payload = Optional.ofNullable(payload); - return this; - } - - @java.lang.Override - @JsonSetter(value = "payload", nulls = Nulls.SKIP) - public _FinalStage payload(Optional payload) { - this.payload = payload; - return this; - } - - @java.lang.Override - public _FinalStage params( - Map> params) { - this.params = Optional.ofNullable(params); - return this; - } - - @java.lang.Override - @JsonSetter(value = "params", nulls = Nulls.SKIP) - public _FinalStage params( - Optional>> params) { - this.params = params; - return this; - } - - @java.lang.Override - public _FinalStage basic(FlowActionHttpSendRequestParamsBasicAuth basic) { - this.basic = Optional.ofNullable(basic); - return this; - } - - @java.lang.Override - @JsonSetter(value = "basic", nulls = Nulls.SKIP) - public _FinalStage basic(Optional basic) { - this.basic = basic; - return this; - } - - @java.lang.Override - public _FinalStage headers(Map headers) { - this.headers = Optional.ofNullable(headers); - return this; - } - - @java.lang.Override - @JsonSetter(value = "headers", nulls = Nulls.SKIP) - public _FinalStage headers(Optional> headers) { - this.headers = headers; - return this; - } - - @java.lang.Override - public _FinalStage method(FlowActionHttpSendRequestParamsMethod method) { - this.method = Optional.ofNullable(method); - return this; - } - - @java.lang.Override - @JsonSetter(value = "method", nulls = Nulls.SKIP) - public _FinalStage method(Optional method) { - this.method = method; - return this; - } - - @java.lang.Override - public _FinalStage connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - return this; - } - - @java.lang.Override - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public _FinalStage connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - @java.lang.Override - public FlowActionHttpSendRequestParams build() { - return new FlowActionHttpSendRequestParams( - connectionId, url, method, headers, basic, params, payload, contentType, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsBasicAuth.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsBasicAuth.java deleted file mode 100644 index fae9be90b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsBasicAuth.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionHttpSendRequestParamsBasicAuth.Builder.class) -public final class FlowActionHttpSendRequestParamsBasicAuth { - private final Optional username; - - private final Optional password; - - private final Map additionalProperties; - - private FlowActionHttpSendRequestParamsBasicAuth( - Optional username, Optional password, Map additionalProperties) { - this.username = username; - this.password = password; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("username") - public Optional getUsername() { - return username; - } - - @JsonProperty("password") - public Optional getPassword() { - return password; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionHttpSendRequestParamsBasicAuth - && equalTo((FlowActionHttpSendRequestParamsBasicAuth) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionHttpSendRequestParamsBasicAuth other) { - return username.equals(other.username) && password.equals(other.password); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.username, this.password); - } - - @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 username = Optional.empty(); - - private Optional password = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FlowActionHttpSendRequestParamsBasicAuth other) { - username(other.getUsername()); - password(other.getPassword()); - return this; - } - - @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; - } - - @JsonSetter(value = "password", nulls = Nulls.SKIP) - public Builder password(Optional password) { - this.password = password; - return this; - } - - public Builder password(String password) { - this.password = Optional.ofNullable(password); - return this; - } - - public FlowActionHttpSendRequestParamsBasicAuth build() { - return new FlowActionHttpSendRequestParamsBasicAuth(username, password, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsContentType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsContentType.java deleted file mode 100644 index f612ad7a8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsContentType.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionHttpSendRequestParamsContentType { - public static final FlowActionHttpSendRequestParamsContentType FORM = - new FlowActionHttpSendRequestParamsContentType(Value.FORM, "FORM"); - - public static final FlowActionHttpSendRequestParamsContentType XML = - new FlowActionHttpSendRequestParamsContentType(Value.XML, "XML"); - - public static final FlowActionHttpSendRequestParamsContentType JSON = - new FlowActionHttpSendRequestParamsContentType(Value.JSON, "JSON"); - - private final Value value; - - private final String string; - - FlowActionHttpSendRequestParamsContentType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionHttpSendRequestParamsContentType - && this.string.equals(((FlowActionHttpSendRequestParamsContentType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FORM: - return visitor.visitForm(); - case XML: - return visitor.visitXml(); - case JSON: - return visitor.visitJson(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionHttpSendRequestParamsContentType valueOf(String value) { - switch (value) { - case "FORM": - return FORM; - case "XML": - return XML; - case "JSON": - return JSON; - default: - return new FlowActionHttpSendRequestParamsContentType(Value.UNKNOWN, value); - } - } - - public enum Value { - JSON, - - FORM, - - XML, - - UNKNOWN - } - - public interface Visitor { - T visitJson(); - - T visitForm(); - - T visitXml(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsMethod.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsMethod.java deleted file mode 100644 index 63fda3fa3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsMethod.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionHttpSendRequestParamsMethod { - public static final FlowActionHttpSendRequestParamsMethod PATCH = - new FlowActionHttpSendRequestParamsMethod(Value.PATCH, "PATCH"); - - public static final FlowActionHttpSendRequestParamsMethod DELETE = - new FlowActionHttpSendRequestParamsMethod(Value.DELETE, "DELETE"); - - public static final FlowActionHttpSendRequestParamsMethod GET = - new FlowActionHttpSendRequestParamsMethod(Value.GET, "GET"); - - public static final FlowActionHttpSendRequestParamsMethod PUT = - new FlowActionHttpSendRequestParamsMethod(Value.PUT, "PUT"); - - public static final FlowActionHttpSendRequestParamsMethod POST = - new FlowActionHttpSendRequestParamsMethod(Value.POST, "POST"); - - private final Value value; - - private final String string; - - FlowActionHttpSendRequestParamsMethod(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionHttpSendRequestParamsMethod - && this.string.equals(((FlowActionHttpSendRequestParamsMethod) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PATCH: - return visitor.visitPatch(); - case DELETE: - return visitor.visitDelete(); - case GET: - return visitor.visitGet(); - case PUT: - return visitor.visitPut(); - case POST: - return visitor.visitPost(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionHttpSendRequestParamsMethod valueOf(String value) { - switch (value) { - case "PATCH": - return PATCH; - case "DELETE": - return DELETE; - case "GET": - return GET; - case "PUT": - return PUT; - case "POST": - return POST; - default: - return new FlowActionHttpSendRequestParamsMethod(Value.UNKNOWN, value); - } - } - - public enum Value { - GET, - - POST, - - PUT, - - PATCH, - - DELETE, - - UNKNOWN - } - - public interface Visitor { - T visitGet(); - - T visitPost(); - - T visitPut(); - - T visitPatch(); - - T visitDelete(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsPayload.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsPayload.java deleted file mode 100644 index 1e96478b4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsPayload.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionHttpSendRequestParamsPayload.Deserializer.class) -public final class FlowActionHttpSendRequestParamsPayload { - private final Object value; - - private final int type; - - private FlowActionHttpSendRequestParamsPayload(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((List) this.value); - } else if (this.type == 2) { - return visitor.visit((Map) 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 FlowActionHttpSendRequestParamsPayload - && equalTo((FlowActionHttpSendRequestParamsPayload) other); - } - - private boolean equalTo(FlowActionHttpSendRequestParamsPayload 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 FlowActionHttpSendRequestParamsPayload of(String value) { - return new FlowActionHttpSendRequestParamsPayload(value, 0); - } - - public static FlowActionHttpSendRequestParamsPayload of(List value) { - return new FlowActionHttpSendRequestParamsPayload(value, 1); - } - - public static FlowActionHttpSendRequestParamsPayload of(Map value) { - return new FlowActionHttpSendRequestParamsPayload(value, 2); - } - - public interface Visitor { - T visit(String value); - - T visit(List value); - - T visit(Map value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionHttpSendRequestParamsPayload.class); - } - - @java.lang.Override - public FlowActionHttpSendRequestParamsPayload deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, new TypeReference>() {})); - } 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/FlowActionHttpSendRequestParamsQueryParamsValue.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsQueryParamsValue.java deleted file mode 100644 index d43630900..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestParamsQueryParamsValue.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionHttpSendRequestParamsQueryParamsValue.Deserializer.class) -public final class FlowActionHttpSendRequestParamsQueryParamsValue { - private final Object value; - - private final int type; - - private FlowActionHttpSendRequestParamsQueryParamsValue(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((double) this.value); - } else if (this.type == 1) { - return visitor.visit((String) 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 FlowActionHttpSendRequestParamsQueryParamsValue - && equalTo((FlowActionHttpSendRequestParamsQueryParamsValue) other); - } - - private boolean equalTo(FlowActionHttpSendRequestParamsQueryParamsValue 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 FlowActionHttpSendRequestParamsQueryParamsValue of(double value) { - return new FlowActionHttpSendRequestParamsQueryParamsValue(value, 0); - } - - public static FlowActionHttpSendRequestParamsQueryParamsValue of(String value) { - return new FlowActionHttpSendRequestParamsQueryParamsValue(value, 1); - } - - public interface Visitor { - T visit(double value); - - T visit(String value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionHttpSendRequestParamsQueryParamsValue.class); - } - - @java.lang.Override - public FlowActionHttpSendRequestParamsQueryParamsValue deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - 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/FlowActionHttpSendRequestType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestType.java deleted file mode 100644 index fe3739711..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHttpSendRequestType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionHttpSendRequestType { - public static final FlowActionHttpSendRequestType HTTP = new FlowActionHttpSendRequestType(Value.HTTP, "HTTP"); - - private final Value value; - - private final String string; - - FlowActionHttpSendRequestType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionHttpSendRequestType - && this.string.equals(((FlowActionHttpSendRequestType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case HTTP: - return visitor.visitHttp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionHttpSendRequestType valueOf(String value) { - switch (value) { - case "HTTP": - return HTTP; - default: - return new FlowActionHttpSendRequestType(Value.UNKNOWN, value); - } - } - - public enum Value { - HTTP, - - UNKNOWN - } - - public interface Visitor { - T visitHttp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspot.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspot.java deleted file mode 100644 index 769407858..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspot.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionHubspot.Deserializer.class) -public final class FlowActionHubspot { - private final Object value; - - private final int type; - - private FlowActionHubspot(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((FlowActionHubspotEnrollContact) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowActionHubspotGetContact) this.value); - } else if (this.type == 2) { - return visitor.visit((FlowActionHubspotUpsertContact) 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 FlowActionHubspot && equalTo((FlowActionHubspot) other); - } - - private boolean equalTo(FlowActionHubspot 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 FlowActionHubspot of(FlowActionHubspotEnrollContact value) { - return new FlowActionHubspot(value, 0); - } - - public static FlowActionHubspot of(FlowActionHubspotGetContact value) { - return new FlowActionHubspot(value, 1); - } - - public static FlowActionHubspot of(FlowActionHubspotUpsertContact value) { - return new FlowActionHubspot(value, 2); - } - - public interface Visitor { - T visit(FlowActionHubspotEnrollContact value); - - T visit(FlowActionHubspotGetContact value); - - T visit(FlowActionHubspotUpsertContact value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionHubspot.class); - } - - @java.lang.Override - public FlowActionHubspot deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionHubspotEnrollContact.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionHubspotGetContact.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionHubspotUpsertContact.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContact.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContact.java deleted file mode 100644 index e38661cee..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContact.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionHubspotEnrollContact.Builder.class) -public final class FlowActionHubspotEnrollContact { - private final String id; - - private final Optional alias; - - private final FlowActionHubspotEnrollContactType type; - - private final FlowActionHubspotEnrollContactAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionHubspotEnrollContactParams params; - - private final Map additionalProperties; - - private FlowActionHubspotEnrollContact( - String id, - Optional alias, - FlowActionHubspotEnrollContactType type, - FlowActionHubspotEnrollContactAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionHubspotEnrollContactParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionHubspotEnrollContactType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionHubspotEnrollContactAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionHubspotEnrollContactParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionHubspotEnrollContact && equalTo((FlowActionHubspotEnrollContact) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionHubspotEnrollContact other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionHubspotEnrollContact other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionHubspotEnrollContactType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionHubspotEnrollContactAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionHubspotEnrollContactParams params); - } - - public interface _FinalStage { - FlowActionHubspotEnrollContact build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionHubspotEnrollContactType type; - - private FlowActionHubspotEnrollContactAction action; - - private FlowActionHubspotEnrollContactParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionHubspotEnrollContact other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionHubspotEnrollContactType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionHubspotEnrollContactAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionHubspotEnrollContactParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionHubspotEnrollContact build() { - return new FlowActionHubspotEnrollContact( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContactAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContactAction.java deleted file mode 100644 index 0b04a5490..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContactAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionHubspotEnrollContactAction { - public static final FlowActionHubspotEnrollContactAction ENROLL_CONTACT = - new FlowActionHubspotEnrollContactAction(Value.ENROLL_CONTACT, "ENROLL_CONTACT"); - - private final Value value; - - private final String string; - - FlowActionHubspotEnrollContactAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionHubspotEnrollContactAction - && this.string.equals(((FlowActionHubspotEnrollContactAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ENROLL_CONTACT: - return visitor.visitEnrollContact(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionHubspotEnrollContactAction valueOf(String value) { - switch (value) { - case "ENROLL_CONTACT": - return ENROLL_CONTACT; - default: - return new FlowActionHubspotEnrollContactAction(Value.UNKNOWN, value); - } - } - - public enum Value { - ENROLL_CONTACT, - - UNKNOWN - } - - public interface Visitor { - T visitEnrollContact(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContactParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContactParams.java deleted file mode 100644 index aa2769440..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContactParams.java +++ /dev/null @@ -1,153 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionHubspotEnrollContactParams.Builder.class) -public final class FlowActionHubspotEnrollContactParams { - private final String connectionId; - - private final String email; - - private final FlowActionHubspotEnrollContactParamsWorkflowId workflowId; - - private final Map additionalProperties; - - private FlowActionHubspotEnrollContactParams( - String connectionId, - String email, - FlowActionHubspotEnrollContactParamsWorkflowId workflowId, - Map additionalProperties) { - this.connectionId = connectionId; - this.email = email; - this.workflowId = workflowId; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("email") - public String getEmail() { - return email; - } - - @JsonProperty("workflow_id") - public FlowActionHubspotEnrollContactParamsWorkflowId getWorkflowId() { - return workflowId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionHubspotEnrollContactParams - && equalTo((FlowActionHubspotEnrollContactParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionHubspotEnrollContactParams other) { - return connectionId.equals(other.connectionId) - && email.equals(other.email) - && workflowId.equals(other.workflowId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.email, this.workflowId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - EmailStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionHubspotEnrollContactParams other); - } - - public interface EmailStage { - WorkflowIdStage email(@NotNull String email); - } - - public interface WorkflowIdStage { - _FinalStage workflowId(@NotNull FlowActionHubspotEnrollContactParamsWorkflowId workflowId); - } - - public interface _FinalStage { - FlowActionHubspotEnrollContactParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, EmailStage, WorkflowIdStage, _FinalStage { - private String connectionId; - - private String email; - - private FlowActionHubspotEnrollContactParamsWorkflowId workflowId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionHubspotEnrollContactParams other) { - connectionId(other.getConnectionId()); - email(other.getEmail()); - workflowId(other.getWorkflowId()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public EmailStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("email") - public WorkflowIdStage email(@NotNull String email) { - this.email = Objects.requireNonNull(email, "email must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("workflow_id") - public _FinalStage workflowId(@NotNull FlowActionHubspotEnrollContactParamsWorkflowId workflowId) { - this.workflowId = Objects.requireNonNull(workflowId, "workflowId must not be null"); - return this; - } - - @java.lang.Override - public FlowActionHubspotEnrollContactParams build() { - return new FlowActionHubspotEnrollContactParams(connectionId, email, workflowId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContactParamsWorkflowId.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContactParamsWorkflowId.java deleted file mode 100644 index bcd188307..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContactParamsWorkflowId.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionHubspotEnrollContactParamsWorkflowId.Deserializer.class) -public final class FlowActionHubspotEnrollContactParamsWorkflowId { - private final Object value; - - private final int type; - - private FlowActionHubspotEnrollContactParamsWorkflowId(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 FlowActionHubspotEnrollContactParamsWorkflowId - && equalTo((FlowActionHubspotEnrollContactParamsWorkflowId) other); - } - - private boolean equalTo(FlowActionHubspotEnrollContactParamsWorkflowId 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 FlowActionHubspotEnrollContactParamsWorkflowId of(String value) { - return new FlowActionHubspotEnrollContactParamsWorkflowId(value, 0); - } - - public static FlowActionHubspotEnrollContactParamsWorkflowId of(int value) { - return new FlowActionHubspotEnrollContactParamsWorkflowId(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(int value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionHubspotEnrollContactParamsWorkflowId.class); - } - - @java.lang.Override - public FlowActionHubspotEnrollContactParamsWorkflowId deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - if (value instanceof Integer) { - return of((Integer) value); - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContactType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContactType.java deleted file mode 100644 index ed53c7611..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotEnrollContactType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionHubspotEnrollContactType { - public static final FlowActionHubspotEnrollContactType HUBSPOT = - new FlowActionHubspotEnrollContactType(Value.HUBSPOT, "HUBSPOT"); - - private final Value value; - - private final String string; - - FlowActionHubspotEnrollContactType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionHubspotEnrollContactType - && this.string.equals(((FlowActionHubspotEnrollContactType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case HUBSPOT: - return visitor.visitHubspot(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionHubspotEnrollContactType valueOf(String value) { - switch (value) { - case "HUBSPOT": - return HUBSPOT; - default: - return new FlowActionHubspotEnrollContactType(Value.UNKNOWN, value); - } - } - - public enum Value { - HUBSPOT, - - UNKNOWN - } - - public interface Visitor { - T visitHubspot(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotGetContact.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotGetContact.java deleted file mode 100644 index 295c03df8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotGetContact.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionHubspotGetContact.Builder.class) -public final class FlowActionHubspotGetContact { - private final String id; - - private final Optional alias; - - private final FlowActionHubspotGetContactType type; - - private final FlowActionHubspotGetContactAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionHubspotGetContactParams params; - - private final Map additionalProperties; - - private FlowActionHubspotGetContact( - String id, - Optional alias, - FlowActionHubspotGetContactType type, - FlowActionHubspotGetContactAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionHubspotGetContactParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionHubspotGetContactType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionHubspotGetContactAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionHubspotGetContactParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionHubspotGetContact && equalTo((FlowActionHubspotGetContact) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionHubspotGetContact other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionHubspotGetContact other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionHubspotGetContactType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionHubspotGetContactAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionHubspotGetContactParams params); - } - - public interface _FinalStage { - FlowActionHubspotGetContact build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionHubspotGetContactType type; - - private FlowActionHubspotGetContactAction action; - - private FlowActionHubspotGetContactParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionHubspotGetContact other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionHubspotGetContactType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionHubspotGetContactAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionHubspotGetContactParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionHubspotGetContact build() { - return new FlowActionHubspotGetContact( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotGetContactAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotGetContactAction.java deleted file mode 100644 index 4b25f64a4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotGetContactAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionHubspotGetContactAction { - public static final FlowActionHubspotGetContactAction GET_CONTACT = - new FlowActionHubspotGetContactAction(Value.GET_CONTACT, "GET_CONTACT"); - - private final Value value; - - private final String string; - - FlowActionHubspotGetContactAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionHubspotGetContactAction - && this.string.equals(((FlowActionHubspotGetContactAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GET_CONTACT: - return visitor.visitGetContact(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionHubspotGetContactAction valueOf(String value) { - switch (value) { - case "GET_CONTACT": - return GET_CONTACT; - default: - return new FlowActionHubspotGetContactAction(Value.UNKNOWN, value); - } - } - - public enum Value { - GET_CONTACT, - - UNKNOWN - } - - public interface Visitor { - T visitGetContact(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotGetContactParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotGetContactParams.java deleted file mode 100644 index 40b575938..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotGetContactParams.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionHubspotGetContactParams.Builder.class) -public final class FlowActionHubspotGetContactParams { - private final String connectionId; - - private final String email; - - private final Map additionalProperties; - - private FlowActionHubspotGetContactParams( - String connectionId, String email, Map additionalProperties) { - this.connectionId = connectionId; - this.email = email; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("email") - public String getEmail() { - return email; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionHubspotGetContactParams && equalTo((FlowActionHubspotGetContactParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionHubspotGetContactParams other) { - return connectionId.equals(other.connectionId) && email.equals(other.email); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.email); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - EmailStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionHubspotGetContactParams other); - } - - public interface EmailStage { - _FinalStage email(@NotNull String email); - } - - public interface _FinalStage { - FlowActionHubspotGetContactParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, EmailStage, _FinalStage { - private String connectionId; - - private String email; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionHubspotGetContactParams other) { - connectionId(other.getConnectionId()); - email(other.getEmail()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public EmailStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("email") - public _FinalStage email(@NotNull String email) { - this.email = Objects.requireNonNull(email, "email must not be null"); - return this; - } - - @java.lang.Override - public FlowActionHubspotGetContactParams build() { - return new FlowActionHubspotGetContactParams(connectionId, email, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotGetContactType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotGetContactType.java deleted file mode 100644 index 58c89b68e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotGetContactType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionHubspotGetContactType { - public static final FlowActionHubspotGetContactType HUBSPOT = - new FlowActionHubspotGetContactType(Value.HUBSPOT, "HUBSPOT"); - - private final Value value; - - private final String string; - - FlowActionHubspotGetContactType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionHubspotGetContactType - && this.string.equals(((FlowActionHubspotGetContactType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case HUBSPOT: - return visitor.visitHubspot(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionHubspotGetContactType valueOf(String value) { - switch (value) { - case "HUBSPOT": - return HUBSPOT; - default: - return new FlowActionHubspotGetContactType(Value.UNKNOWN, value); - } - } - - public enum Value { - HUBSPOT, - - UNKNOWN - } - - public interface Visitor { - T visitHubspot(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotUpsertContact.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotUpsertContact.java deleted file mode 100644 index 1fb7f3dd2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotUpsertContact.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionHubspotUpsertContact.Builder.class) -public final class FlowActionHubspotUpsertContact { - private final String id; - - private final Optional alias; - - private final FlowActionHubspotUpsertContactType type; - - private final FlowActionHubspotUpsertContactAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionHubspotUpsertContactParams params; - - private final Map additionalProperties; - - private FlowActionHubspotUpsertContact( - String id, - Optional alias, - FlowActionHubspotUpsertContactType type, - FlowActionHubspotUpsertContactAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionHubspotUpsertContactParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionHubspotUpsertContactType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionHubspotUpsertContactAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionHubspotUpsertContactParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionHubspotUpsertContact && equalTo((FlowActionHubspotUpsertContact) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionHubspotUpsertContact other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionHubspotUpsertContact other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionHubspotUpsertContactType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionHubspotUpsertContactAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionHubspotUpsertContactParams params); - } - - public interface _FinalStage { - FlowActionHubspotUpsertContact build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionHubspotUpsertContactType type; - - private FlowActionHubspotUpsertContactAction action; - - private FlowActionHubspotUpsertContactParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionHubspotUpsertContact other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionHubspotUpsertContactType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionHubspotUpsertContactAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionHubspotUpsertContactParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionHubspotUpsertContact build() { - return new FlowActionHubspotUpsertContact( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotUpsertContactAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotUpsertContactAction.java deleted file mode 100644 index 7586f9c11..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotUpsertContactAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionHubspotUpsertContactAction { - public static final FlowActionHubspotUpsertContactAction UPSERT_CONTACT = - new FlowActionHubspotUpsertContactAction(Value.UPSERT_CONTACT, "UPSERT_CONTACT"); - - private final Value value; - - private final String string; - - FlowActionHubspotUpsertContactAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionHubspotUpsertContactAction - && this.string.equals(((FlowActionHubspotUpsertContactAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case UPSERT_CONTACT: - return visitor.visitUpsertContact(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionHubspotUpsertContactAction valueOf(String value) { - switch (value) { - case "UPSERT_CONTACT": - return UPSERT_CONTACT; - default: - return new FlowActionHubspotUpsertContactAction(Value.UNKNOWN, value); - } - } - - public enum Value { - UPSERT_CONTACT, - - UNKNOWN - } - - public interface Visitor { - T visitUpsertContact(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotUpsertContactParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotUpsertContactParams.java deleted file mode 100644 index 8546cd868..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotUpsertContactParams.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionHubspotUpsertContactParams.Builder.class) -public final class FlowActionHubspotUpsertContactParams { - private final String connectionId; - - private final String email; - - private final Optional> properties; - - private final Map additionalProperties; - - private FlowActionHubspotUpsertContactParams( - String connectionId, - String email, - Optional> properties, - Map additionalProperties) { - this.connectionId = connectionId; - this.email = email; - this.properties = properties; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("email") - public String getEmail() { - return email; - } - - @JsonProperty("properties") - public Optional> getProperties() { - return properties; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionHubspotUpsertContactParams - && equalTo((FlowActionHubspotUpsertContactParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionHubspotUpsertContactParams other) { - return connectionId.equals(other.connectionId) - && email.equals(other.email) - && properties.equals(other.properties); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.email, this.properties); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - EmailStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionHubspotUpsertContactParams other); - } - - public interface EmailStage { - _FinalStage email(@NotNull String email); - } - - public interface _FinalStage { - FlowActionHubspotUpsertContactParams build(); - - _FinalStage properties(Optional> properties); - - _FinalStage properties(List properties); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, EmailStage, _FinalStage { - private String connectionId; - - private String email; - - private Optional> properties = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionHubspotUpsertContactParams other) { - connectionId(other.getConnectionId()); - email(other.getEmail()); - properties(other.getProperties()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public EmailStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("email") - public _FinalStage email(@NotNull String email) { - this.email = Objects.requireNonNull(email, "email must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage properties(List properties) { - this.properties = Optional.ofNullable(properties); - return this; - } - - @java.lang.Override - @JsonSetter(value = "properties", nulls = Nulls.SKIP) - public _FinalStage properties(Optional> properties) { - this.properties = properties; - return this; - } - - @java.lang.Override - public FlowActionHubspotUpsertContactParams build() { - return new FlowActionHubspotUpsertContactParams(connectionId, email, properties, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotUpsertContactParamsProperty.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotUpsertContactParamsProperty.java deleted file mode 100644 index bb07959cb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotUpsertContactParamsProperty.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionHubspotUpsertContactParamsProperty.Builder.class) -public final class FlowActionHubspotUpsertContactParamsProperty { - private final String property; - - private final Map additionalProperties; - - private FlowActionHubspotUpsertContactParamsProperty(String property, Map additionalProperties) { - this.property = property; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("property") - public String getProperty() { - return property; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionHubspotUpsertContactParamsProperty - && equalTo((FlowActionHubspotUpsertContactParamsProperty) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionHubspotUpsertContactParamsProperty other) { - return property.equals(other.property); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.property); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static PropertyStage builder() { - return new Builder(); - } - - public interface PropertyStage { - _FinalStage property(@NotNull String property); - - Builder from(FlowActionHubspotUpsertContactParamsProperty other); - } - - public interface _FinalStage { - FlowActionHubspotUpsertContactParamsProperty build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements PropertyStage, _FinalStage { - private String property; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionHubspotUpsertContactParamsProperty other) { - property(other.getProperty()); - return this; - } - - @java.lang.Override - @JsonSetter("property") - public _FinalStage property(@NotNull String property) { - this.property = Objects.requireNonNull(property, "property must not be null"); - return this; - } - - @java.lang.Override - public FlowActionHubspotUpsertContactParamsProperty build() { - return new FlowActionHubspotUpsertContactParamsProperty(property, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotUpsertContactType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotUpsertContactType.java deleted file mode 100644 index df46e3ca5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionHubspotUpsertContactType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionHubspotUpsertContactType { - public static final FlowActionHubspotUpsertContactType HUBSPOT = - new FlowActionHubspotUpsertContactType(Value.HUBSPOT, "HUBSPOT"); - - private final Value value; - - private final String string; - - FlowActionHubspotUpsertContactType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionHubspotUpsertContactType - && this.string.equals(((FlowActionHubspotUpsertContactType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case HUBSPOT: - return visitor.visitHubspot(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionHubspotUpsertContactType valueOf(String value) { - switch (value) { - case "HUBSPOT": - return HUBSPOT; - default: - return new FlowActionHubspotUpsertContactType(Value.UNKNOWN, value); - } - } - - public enum Value { - HUBSPOT, - - UNKNOWN - } - - public interface Visitor { - T visitHubspot(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJson.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJson.java deleted file mode 100644 index 5d6e9ce3a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJson.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionJson.Deserializer.class) -public final class FlowActionJson { - private final Object value; - - private final int type; - - private FlowActionJson(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((FlowActionJsonCreateJson) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowActionJsonParseJson) this.value); - } else if (this.type == 2) { - return visitor.visit((FlowActionJsonSerializeJson) 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 FlowActionJson && equalTo((FlowActionJson) other); - } - - private boolean equalTo(FlowActionJson 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 FlowActionJson of(FlowActionJsonCreateJson value) { - return new FlowActionJson(value, 0); - } - - public static FlowActionJson of(FlowActionJsonParseJson value) { - return new FlowActionJson(value, 1); - } - - public static FlowActionJson of(FlowActionJsonSerializeJson value) { - return new FlowActionJson(value, 2); - } - - public interface Visitor { - T visit(FlowActionJsonCreateJson value); - - T visit(FlowActionJsonParseJson value); - - T visit(FlowActionJsonSerializeJson value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionJson.class); - } - - @java.lang.Override - public FlowActionJson deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJsonCreateJson.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJsonParseJson.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJsonSerializeJson.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonCreateJson.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonCreateJson.java deleted file mode 100644 index 35aaddc50..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonCreateJson.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionJsonCreateJson.Builder.class) -public final class FlowActionJsonCreateJson { - private final String id; - - private final Optional alias; - - private final FlowActionJsonCreateJsonType type; - - private final FlowActionJsonCreateJsonAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionJsonCreateJsonParams params; - - private final Map additionalProperties; - - private FlowActionJsonCreateJson( - String id, - Optional alias, - FlowActionJsonCreateJsonType type, - FlowActionJsonCreateJsonAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionJsonCreateJsonParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionJsonCreateJsonType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionJsonCreateJsonAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionJsonCreateJsonParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionJsonCreateJson && equalTo((FlowActionJsonCreateJson) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionJsonCreateJson other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionJsonCreateJson other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionJsonCreateJsonType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionJsonCreateJsonAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionJsonCreateJsonParams params); - } - - public interface _FinalStage { - FlowActionJsonCreateJson build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionJsonCreateJsonType type; - - private FlowActionJsonCreateJsonAction action; - - private FlowActionJsonCreateJsonParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionJsonCreateJson other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionJsonCreateJsonType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionJsonCreateJsonAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionJsonCreateJsonParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionJsonCreateJson build() { - return new FlowActionJsonCreateJson( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonCreateJsonAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonCreateJsonAction.java deleted file mode 100644 index 4963094a1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonCreateJsonAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionJsonCreateJsonAction { - public static final FlowActionJsonCreateJsonAction CREATE_JSON = - new FlowActionJsonCreateJsonAction(Value.CREATE_JSON, "CREATE_JSON"); - - private final Value value; - - private final String string; - - FlowActionJsonCreateJsonAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionJsonCreateJsonAction - && this.string.equals(((FlowActionJsonCreateJsonAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CREATE_JSON: - return visitor.visitCreateJson(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionJsonCreateJsonAction valueOf(String value) { - switch (value) { - case "CREATE_JSON": - return CREATE_JSON; - default: - return new FlowActionJsonCreateJsonAction(Value.UNKNOWN, value); - } - } - - public enum Value { - CREATE_JSON, - - UNKNOWN - } - - public interface Visitor { - T visitCreateJson(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonCreateJsonParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonCreateJsonParams.java deleted file mode 100644 index 0bd6dd71b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonCreateJsonParams.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = FlowActionJsonCreateJsonParams.Builder.class) -public final class FlowActionJsonCreateJsonParams { - private final Map object; - - private final Map additionalProperties; - - private FlowActionJsonCreateJsonParams(Map object, Map additionalProperties) { - this.object = object; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("object") - public Map getObject() { - return object; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionJsonCreateJsonParams && equalTo((FlowActionJsonCreateJsonParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionJsonCreateJsonParams other) { - return object.equals(other.object); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.object); - } - - @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 Map object = new LinkedHashMap<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FlowActionJsonCreateJsonParams other) { - object(other.getObject()); - return this; - } - - @JsonSetter(value = "object", nulls = Nulls.SKIP) - public Builder object(Map object) { - this.object.clear(); - if (object != null) { - this.object.putAll(object); - } - return this; - } - - public Builder putAllObject(Map object) { - if (object != null) { - this.object.putAll(object); - } - return this; - } - - public Builder object(String key, Object value) { - this.object.put(key, value); - return this; - } - - public FlowActionJsonCreateJsonParams build() { - return new FlowActionJsonCreateJsonParams(object, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonCreateJsonType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonCreateJsonType.java deleted file mode 100644 index 49e907595..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonCreateJsonType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionJsonCreateJsonType { - public static final FlowActionJsonCreateJsonType JSON = new FlowActionJsonCreateJsonType(Value.JSON, "JSON"); - - private final Value value; - - private final String string; - - FlowActionJsonCreateJsonType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionJsonCreateJsonType - && this.string.equals(((FlowActionJsonCreateJsonType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case JSON: - return visitor.visitJson(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionJsonCreateJsonType valueOf(String value) { - switch (value) { - case "JSON": - return JSON; - default: - return new FlowActionJsonCreateJsonType(Value.UNKNOWN, value); - } - } - - public enum Value { - JSON, - - UNKNOWN - } - - public interface Visitor { - T visitJson(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonParseJson.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonParseJson.java deleted file mode 100644 index fe5ac210c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonParseJson.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionJsonParseJson.Builder.class) -public final class FlowActionJsonParseJson { - private final String id; - - private final Optional alias; - - private final FlowActionJsonParseJsonType type; - - private final FlowActionJsonParseJsonAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionJsonParseJsonParams params; - - private final Map additionalProperties; - - private FlowActionJsonParseJson( - String id, - Optional alias, - FlowActionJsonParseJsonType type, - FlowActionJsonParseJsonAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionJsonParseJsonParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionJsonParseJsonType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionJsonParseJsonAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionJsonParseJsonParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionJsonParseJson && equalTo((FlowActionJsonParseJson) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionJsonParseJson other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionJsonParseJson other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionJsonParseJsonType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionJsonParseJsonAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionJsonParseJsonParams params); - } - - public interface _FinalStage { - FlowActionJsonParseJson build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionJsonParseJsonType type; - - private FlowActionJsonParseJsonAction action; - - private FlowActionJsonParseJsonParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionJsonParseJson other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionJsonParseJsonType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionJsonParseJsonAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionJsonParseJsonParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionJsonParseJson build() { - return new FlowActionJsonParseJson( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonParseJsonAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonParseJsonAction.java deleted file mode 100644 index 86cbc085e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonParseJsonAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionJsonParseJsonAction { - public static final FlowActionJsonParseJsonAction PARSE_JSON = - new FlowActionJsonParseJsonAction(Value.PARSE_JSON, "PARSE_JSON"); - - private final Value value; - - private final String string; - - FlowActionJsonParseJsonAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionJsonParseJsonAction - && this.string.equals(((FlowActionJsonParseJsonAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PARSE_JSON: - return visitor.visitParseJson(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionJsonParseJsonAction valueOf(String value) { - switch (value) { - case "PARSE_JSON": - return PARSE_JSON; - default: - return new FlowActionJsonParseJsonAction(Value.UNKNOWN, value); - } - } - - public enum Value { - PARSE_JSON, - - UNKNOWN - } - - public interface Visitor { - T visitParseJson(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonParseJsonParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonParseJsonParams.java deleted file mode 100644 index 6f743bdff..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonParseJsonParams.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionJsonParseJsonParams.Builder.class) -public final class FlowActionJsonParseJsonParams { - private final String json; - - private final Map additionalProperties; - - private FlowActionJsonParseJsonParams(String json, Map additionalProperties) { - this.json = json; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("json") - public String getJson() { - return json; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionJsonParseJsonParams && equalTo((FlowActionJsonParseJsonParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionJsonParseJsonParams other) { - return json.equals(other.json); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.json); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static JsonStage builder() { - return new Builder(); - } - - public interface JsonStage { - _FinalStage json(@NotNull String json); - - Builder from(FlowActionJsonParseJsonParams other); - } - - public interface _FinalStage { - FlowActionJsonParseJsonParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements JsonStage, _FinalStage { - private String json; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionJsonParseJsonParams other) { - json(other.getJson()); - return this; - } - - @java.lang.Override - @JsonSetter("json") - public _FinalStage json(@NotNull String json) { - this.json = Objects.requireNonNull(json, "json must not be null"); - return this; - } - - @java.lang.Override - public FlowActionJsonParseJsonParams build() { - return new FlowActionJsonParseJsonParams(json, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonParseJsonType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonParseJsonType.java deleted file mode 100644 index 6322a659b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonParseJsonType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionJsonParseJsonType { - public static final FlowActionJsonParseJsonType JSON = new FlowActionJsonParseJsonType(Value.JSON, "JSON"); - - private final Value value; - - private final String string; - - FlowActionJsonParseJsonType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionJsonParseJsonType - && this.string.equals(((FlowActionJsonParseJsonType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case JSON: - return visitor.visitJson(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionJsonParseJsonType valueOf(String value) { - switch (value) { - case "JSON": - return JSON; - default: - return new FlowActionJsonParseJsonType(Value.UNKNOWN, value); - } - } - - public enum Value { - JSON, - - UNKNOWN - } - - public interface Visitor { - T visitJson(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonSerializeJson.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonSerializeJson.java deleted file mode 100644 index 2d2fbf4e1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonSerializeJson.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionJsonSerializeJson.Builder.class) -public final class FlowActionJsonSerializeJson { - private final String id; - - private final Optional alias; - - private final FlowActionJsonSerializeJsonType type; - - private final FlowActionJsonSerializeJsonAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionJsonSerializeJsonParams params; - - private final Map additionalProperties; - - private FlowActionJsonSerializeJson( - String id, - Optional alias, - FlowActionJsonSerializeJsonType type, - FlowActionJsonSerializeJsonAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionJsonSerializeJsonParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionJsonSerializeJsonType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionJsonSerializeJsonAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionJsonSerializeJsonParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionJsonSerializeJson && equalTo((FlowActionJsonSerializeJson) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionJsonSerializeJson other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionJsonSerializeJson other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionJsonSerializeJsonType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionJsonSerializeJsonAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionJsonSerializeJsonParams params); - } - - public interface _FinalStage { - FlowActionJsonSerializeJson build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionJsonSerializeJsonType type; - - private FlowActionJsonSerializeJsonAction action; - - private FlowActionJsonSerializeJsonParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionJsonSerializeJson other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionJsonSerializeJsonType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionJsonSerializeJsonAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionJsonSerializeJsonParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionJsonSerializeJson build() { - return new FlowActionJsonSerializeJson( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonSerializeJsonAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonSerializeJsonAction.java deleted file mode 100644 index 5a50408c7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonSerializeJsonAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionJsonSerializeJsonAction { - public static final FlowActionJsonSerializeJsonAction SERIALIZE_JSON = - new FlowActionJsonSerializeJsonAction(Value.SERIALIZE_JSON, "SERIALIZE_JSON"); - - private final Value value; - - private final String string; - - FlowActionJsonSerializeJsonAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionJsonSerializeJsonAction - && this.string.equals(((FlowActionJsonSerializeJsonAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SERIALIZE_JSON: - return visitor.visitSerializeJson(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionJsonSerializeJsonAction valueOf(String value) { - switch (value) { - case "SERIALIZE_JSON": - return SERIALIZE_JSON; - default: - return new FlowActionJsonSerializeJsonAction(Value.UNKNOWN, value); - } - } - - public enum Value { - SERIALIZE_JSON, - - UNKNOWN - } - - public interface Visitor { - T visitSerializeJson(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonSerializeJsonParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonSerializeJsonParams.java deleted file mode 100644 index 2bea64bc7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonSerializeJsonParams.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionJsonSerializeJsonParams.Builder.class) -public final class FlowActionJsonSerializeJsonParams { - private final FlowActionJsonSerializeJsonParamsObject object; - - private final Map additionalProperties; - - private FlowActionJsonSerializeJsonParams( - FlowActionJsonSerializeJsonParamsObject object, Map additionalProperties) { - this.object = object; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("object") - public FlowActionJsonSerializeJsonParamsObject getObject() { - return object; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionJsonSerializeJsonParams && equalTo((FlowActionJsonSerializeJsonParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionJsonSerializeJsonParams other) { - return object.equals(other.object); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.object); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ObjectStage builder() { - return new Builder(); - } - - public interface ObjectStage { - _FinalStage object(@NotNull FlowActionJsonSerializeJsonParamsObject object); - - Builder from(FlowActionJsonSerializeJsonParams other); - } - - public interface _FinalStage { - FlowActionJsonSerializeJsonParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ObjectStage, _FinalStage { - private FlowActionJsonSerializeJsonParamsObject object; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionJsonSerializeJsonParams other) { - object(other.getObject()); - return this; - } - - @java.lang.Override - @JsonSetter("object") - public _FinalStage object(@NotNull FlowActionJsonSerializeJsonParamsObject object) { - this.object = Objects.requireNonNull(object, "object must not be null"); - return this; - } - - @java.lang.Override - public FlowActionJsonSerializeJsonParams build() { - return new FlowActionJsonSerializeJsonParams(object, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonSerializeJsonParamsObject.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonSerializeJsonParamsObject.java deleted file mode 100644 index 9c541d00d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonSerializeJsonParamsObject.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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.Map; -import java.util.Objects; - -@JsonDeserialize(using = FlowActionJsonSerializeJsonParamsObject.Deserializer.class) -public final class FlowActionJsonSerializeJsonParamsObject { - private final Object value; - - private final int type; - - private FlowActionJsonSerializeJsonParamsObject(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((Map) 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 FlowActionJsonSerializeJsonParamsObject - && equalTo((FlowActionJsonSerializeJsonParamsObject) other); - } - - private boolean equalTo(FlowActionJsonSerializeJsonParamsObject 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 FlowActionJsonSerializeJsonParamsObject of(String value) { - return new FlowActionJsonSerializeJsonParamsObject(value, 0); - } - - public static FlowActionJsonSerializeJsonParamsObject of(Map value) { - return new FlowActionJsonSerializeJsonParamsObject(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(Map value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionJsonSerializeJsonParamsObject.class); - } - - @java.lang.Override - public FlowActionJsonSerializeJsonParamsObject deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.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/FlowActionJsonSerializeJsonType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonSerializeJsonType.java deleted file mode 100644 index 37cdfa8e6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJsonSerializeJsonType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionJsonSerializeJsonType { - public static final FlowActionJsonSerializeJsonType JSON = new FlowActionJsonSerializeJsonType(Value.JSON, "JSON"); - - private final Value value; - - private final String string; - - FlowActionJsonSerializeJsonType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionJsonSerializeJsonType - && this.string.equals(((FlowActionJsonSerializeJsonType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case JSON: - return visitor.visitJson(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionJsonSerializeJsonType valueOf(String value) { - switch (value) { - case "JSON": - return JSON; - default: - return new FlowActionJsonSerializeJsonType(Value.UNKNOWN, value); - } - } - - public enum Value { - JSON, - - UNKNOWN - } - - public interface Visitor { - T visitJson(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwt.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJwt.java deleted file mode 100644 index 171c06498..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwt.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionJwt.Deserializer.class) -public final class FlowActionJwt { - private final Object value; - - private final int type; - - private FlowActionJwt(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((FlowActionJwtDecodeJwt) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowActionJwtSignJwt) this.value); - } else if (this.type == 2) { - return visitor.visit((FlowActionJwtVerifyJwt) 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 FlowActionJwt && equalTo((FlowActionJwt) other); - } - - private boolean equalTo(FlowActionJwt 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 FlowActionJwt of(FlowActionJwtDecodeJwt value) { - return new FlowActionJwt(value, 0); - } - - public static FlowActionJwt of(FlowActionJwtSignJwt value) { - return new FlowActionJwt(value, 1); - } - - public static FlowActionJwt of(FlowActionJwtVerifyJwt value) { - return new FlowActionJwt(value, 2); - } - - public interface Visitor { - T visit(FlowActionJwtDecodeJwt value); - - T visit(FlowActionJwtSignJwt value); - - T visit(FlowActionJwtVerifyJwt value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionJwt.class); - } - - @java.lang.Override - public FlowActionJwt deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJwtDecodeJwt.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJwtSignJwt.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionJwtVerifyJwt.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtDecodeJwt.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtDecodeJwt.java deleted file mode 100644 index 784d11115..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtDecodeJwt.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionJwtDecodeJwt.Builder.class) -public final class FlowActionJwtDecodeJwt { - private final String id; - - private final Optional alias; - - private final FlowActionJwtDecodeJwtType type; - - private final FlowActionJwtDecodeJwtAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionJwtDecodeJwtParams params; - - private final Map additionalProperties; - - private FlowActionJwtDecodeJwt( - String id, - Optional alias, - FlowActionJwtDecodeJwtType type, - FlowActionJwtDecodeJwtAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionJwtDecodeJwtParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionJwtDecodeJwtType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionJwtDecodeJwtAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionJwtDecodeJwtParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionJwtDecodeJwt && equalTo((FlowActionJwtDecodeJwt) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionJwtDecodeJwt other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionJwtDecodeJwt other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionJwtDecodeJwtType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionJwtDecodeJwtAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionJwtDecodeJwtParams params); - } - - public interface _FinalStage { - FlowActionJwtDecodeJwt build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionJwtDecodeJwtType type; - - private FlowActionJwtDecodeJwtAction action; - - private FlowActionJwtDecodeJwtParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionJwtDecodeJwt other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionJwtDecodeJwtType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionJwtDecodeJwtAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionJwtDecodeJwtParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionJwtDecodeJwt build() { - return new FlowActionJwtDecodeJwt( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtDecodeJwtAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtDecodeJwtAction.java deleted file mode 100644 index 8e813110f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtDecodeJwtAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionJwtDecodeJwtAction { - public static final FlowActionJwtDecodeJwtAction DECODE_JWT = - new FlowActionJwtDecodeJwtAction(Value.DECODE_JWT, "DECODE_JWT"); - - private final Value value; - - private final String string; - - FlowActionJwtDecodeJwtAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionJwtDecodeJwtAction - && this.string.equals(((FlowActionJwtDecodeJwtAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DECODE_JWT: - return visitor.visitDecodeJwt(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionJwtDecodeJwtAction valueOf(String value) { - switch (value) { - case "DECODE_JWT": - return DECODE_JWT; - default: - return new FlowActionJwtDecodeJwtAction(Value.UNKNOWN, value); - } - } - - public enum Value { - DECODE_JWT, - - UNKNOWN - } - - public interface Visitor { - T visitDecodeJwt(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtDecodeJwtParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtDecodeJwtParams.java deleted file mode 100644 index 22f6e8c87..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtDecodeJwtParams.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionJwtDecodeJwtParams.Builder.class) -public final class FlowActionJwtDecodeJwtParams { - private final String token; - - private final Map additionalProperties; - - private FlowActionJwtDecodeJwtParams(String token, Map additionalProperties) { - this.token = token; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("token") - public String getToken() { - return token; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionJwtDecodeJwtParams && equalTo((FlowActionJwtDecodeJwtParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionJwtDecodeJwtParams other) { - return token.equals(other.token); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.token); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TokenStage builder() { - return new Builder(); - } - - public interface TokenStage { - _FinalStage token(@NotNull String token); - - Builder from(FlowActionJwtDecodeJwtParams other); - } - - public interface _FinalStage { - FlowActionJwtDecodeJwtParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TokenStage, _FinalStage { - private String token; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionJwtDecodeJwtParams other) { - token(other.getToken()); - return this; - } - - @java.lang.Override - @JsonSetter("token") - public _FinalStage token(@NotNull String token) { - this.token = Objects.requireNonNull(token, "token must not be null"); - return this; - } - - @java.lang.Override - public FlowActionJwtDecodeJwtParams build() { - return new FlowActionJwtDecodeJwtParams(token, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtDecodeJwtType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtDecodeJwtType.java deleted file mode 100644 index 1cabc1b04..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtDecodeJwtType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionJwtDecodeJwtType { - public static final FlowActionJwtDecodeJwtType JWT = new FlowActionJwtDecodeJwtType(Value.JWT, "JWT"); - - private final Value value; - - private final String string; - - FlowActionJwtDecodeJwtType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionJwtDecodeJwtType - && this.string.equals(((FlowActionJwtDecodeJwtType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case JWT: - return visitor.visitJwt(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionJwtDecodeJwtType valueOf(String value) { - switch (value) { - case "JWT": - return JWT; - default: - return new FlowActionJwtDecodeJwtType(Value.UNKNOWN, value); - } - } - - public enum Value { - JWT, - - UNKNOWN - } - - public interface Visitor { - T visitJwt(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtSignJwt.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtSignJwt.java deleted file mode 100644 index 388e5dc6e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtSignJwt.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionJwtSignJwt.Builder.class) -public final class FlowActionJwtSignJwt { - private final String id; - - private final Optional alias; - - private final FlowActionJwtSignJwtType type; - - private final FlowActionJwtSignJwtAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionJwtSignJwtParams params; - - private final Map additionalProperties; - - private FlowActionJwtSignJwt( - String id, - Optional alias, - FlowActionJwtSignJwtType type, - FlowActionJwtSignJwtAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionJwtSignJwtParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionJwtSignJwtType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionJwtSignJwtAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionJwtSignJwtParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionJwtSignJwt && equalTo((FlowActionJwtSignJwt) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionJwtSignJwt other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionJwtSignJwt other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionJwtSignJwtType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionJwtSignJwtAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionJwtSignJwtParams params); - } - - public interface _FinalStage { - FlowActionJwtSignJwt build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionJwtSignJwtType type; - - private FlowActionJwtSignJwtAction action; - - private FlowActionJwtSignJwtParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionJwtSignJwt other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionJwtSignJwtType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionJwtSignJwtAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionJwtSignJwtParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionJwtSignJwt build() { - return new FlowActionJwtSignJwt( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtSignJwtAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtSignJwtAction.java deleted file mode 100644 index 0281afe16..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtSignJwtAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionJwtSignJwtAction { - public static final FlowActionJwtSignJwtAction SIGN_JWT = - new FlowActionJwtSignJwtAction(Value.SIGN_JWT, "SIGN_JWT"); - - private final Value value; - - private final String string; - - FlowActionJwtSignJwtAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionJwtSignJwtAction - && this.string.equals(((FlowActionJwtSignJwtAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SIGN_JWT: - return visitor.visitSignJwt(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionJwtSignJwtAction valueOf(String value) { - switch (value) { - case "SIGN_JWT": - return SIGN_JWT; - default: - return new FlowActionJwtSignJwtAction(Value.UNKNOWN, value); - } - } - - public enum Value { - SIGN_JWT, - - UNKNOWN - } - - public interface Visitor { - T visitSignJwt(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtSignJwtParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtSignJwtParams.java deleted file mode 100644 index 5ad501846..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtSignJwtParams.java +++ /dev/null @@ -1,257 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionJwtSignJwtParams.Builder.class) -public final class FlowActionJwtSignJwtParams { - private final String connectionId; - - private final Optional> payload; - - private final Optional subject; - - private final Optional issuer; - - private final Optional audience; - - private final Optional expiresIn; - - private final Map additionalProperties; - - private FlowActionJwtSignJwtParams( - String connectionId, - Optional> payload, - Optional subject, - Optional issuer, - Optional audience, - Optional expiresIn, - Map additionalProperties) { - this.connectionId = connectionId; - this.payload = payload; - this.subject = subject; - this.issuer = issuer; - this.audience = audience; - this.expiresIn = expiresIn; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("payload") - public Optional> getPayload() { - return payload; - } - - @JsonProperty("subject") - public Optional getSubject() { - return subject; - } - - @JsonProperty("issuer") - public Optional getIssuer() { - return issuer; - } - - @JsonProperty("audience") - public Optional getAudience() { - return audience; - } - - @JsonProperty("expires_in") - public Optional getExpiresIn() { - return expiresIn; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionJwtSignJwtParams && equalTo((FlowActionJwtSignJwtParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionJwtSignJwtParams other) { - return connectionId.equals(other.connectionId) - && payload.equals(other.payload) - && subject.equals(other.subject) - && issuer.equals(other.issuer) - && audience.equals(other.audience) - && expiresIn.equals(other.expiresIn); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.payload, this.subject, this.issuer, this.audience, this.expiresIn); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - _FinalStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionJwtSignJwtParams other); - } - - public interface _FinalStage { - FlowActionJwtSignJwtParams build(); - - _FinalStage payload(Optional> payload); - - _FinalStage payload(Map payload); - - _FinalStage subject(Optional subject); - - _FinalStage subject(String subject); - - _FinalStage issuer(Optional issuer); - - _FinalStage issuer(String issuer); - - _FinalStage audience(Optional audience); - - _FinalStage audience(String audience); - - _FinalStage expiresIn(Optional expiresIn); - - _FinalStage expiresIn(String expiresIn); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, _FinalStage { - private String connectionId; - - private Optional expiresIn = Optional.empty(); - - private Optional audience = Optional.empty(); - - private Optional issuer = Optional.empty(); - - private Optional subject = Optional.empty(); - - private Optional> payload = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionJwtSignJwtParams other) { - connectionId(other.getConnectionId()); - payload(other.getPayload()); - subject(other.getSubject()); - issuer(other.getIssuer()); - audience(other.getAudience()); - expiresIn(other.getExpiresIn()); - return this; - } - - @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 _FinalStage expiresIn(String expiresIn) { - this.expiresIn = Optional.ofNullable(expiresIn); - return this; - } - - @java.lang.Override - @JsonSetter(value = "expires_in", nulls = Nulls.SKIP) - public _FinalStage expiresIn(Optional expiresIn) { - this.expiresIn = expiresIn; - return this; - } - - @java.lang.Override - public _FinalStage audience(String audience) { - this.audience = Optional.ofNullable(audience); - return this; - } - - @java.lang.Override - @JsonSetter(value = "audience", nulls = Nulls.SKIP) - public _FinalStage audience(Optional audience) { - this.audience = audience; - return this; - } - - @java.lang.Override - public _FinalStage issuer(String issuer) { - this.issuer = Optional.ofNullable(issuer); - return this; - } - - @java.lang.Override - @JsonSetter(value = "issuer", nulls = Nulls.SKIP) - public _FinalStage issuer(Optional issuer) { - this.issuer = issuer; - return this; - } - - @java.lang.Override - public _FinalStage subject(String 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; - } - - @java.lang.Override - public _FinalStage payload(Map payload) { - this.payload = Optional.ofNullable(payload); - return this; - } - - @java.lang.Override - @JsonSetter(value = "payload", nulls = Nulls.SKIP) - public _FinalStage payload(Optional> payload) { - this.payload = payload; - return this; - } - - @java.lang.Override - public FlowActionJwtSignJwtParams build() { - return new FlowActionJwtSignJwtParams( - connectionId, payload, subject, issuer, audience, expiresIn, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtSignJwtType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtSignJwtType.java deleted file mode 100644 index 45561c0b0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtSignJwtType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionJwtSignJwtType { - public static final FlowActionJwtSignJwtType JWT = new FlowActionJwtSignJwtType(Value.JWT, "JWT"); - - private final Value value; - - private final String string; - - FlowActionJwtSignJwtType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionJwtSignJwtType - && this.string.equals(((FlowActionJwtSignJwtType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case JWT: - return visitor.visitJwt(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionJwtSignJwtType valueOf(String value) { - switch (value) { - case "JWT": - return JWT; - default: - return new FlowActionJwtSignJwtType(Value.UNKNOWN, value); - } - } - - public enum Value { - JWT, - - UNKNOWN - } - - public interface Visitor { - T visitJwt(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtVerifyJwt.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtVerifyJwt.java deleted file mode 100644 index 43db2a25a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtVerifyJwt.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionJwtVerifyJwt.Builder.class) -public final class FlowActionJwtVerifyJwt { - private final String id; - - private final Optional alias; - - private final FlowActionJwtVerifyJwtType type; - - private final FlowActionJwtVerifyJwtAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionJwtVerifyJwtParams params; - - private final Map additionalProperties; - - private FlowActionJwtVerifyJwt( - String id, - Optional alias, - FlowActionJwtVerifyJwtType type, - FlowActionJwtVerifyJwtAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionJwtVerifyJwtParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionJwtVerifyJwtType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionJwtVerifyJwtAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionJwtVerifyJwtParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionJwtVerifyJwt && equalTo((FlowActionJwtVerifyJwt) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionJwtVerifyJwt other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionJwtVerifyJwt other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionJwtVerifyJwtType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionJwtVerifyJwtAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionJwtVerifyJwtParams params); - } - - public interface _FinalStage { - FlowActionJwtVerifyJwt build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionJwtVerifyJwtType type; - - private FlowActionJwtVerifyJwtAction action; - - private FlowActionJwtVerifyJwtParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionJwtVerifyJwt other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionJwtVerifyJwtType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionJwtVerifyJwtAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionJwtVerifyJwtParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionJwtVerifyJwt build() { - return new FlowActionJwtVerifyJwt( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtVerifyJwtAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtVerifyJwtAction.java deleted file mode 100644 index c243621f1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtVerifyJwtAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionJwtVerifyJwtAction { - public static final FlowActionJwtVerifyJwtAction VERIFY_JWT = - new FlowActionJwtVerifyJwtAction(Value.VERIFY_JWT, "VERIFY_JWT"); - - private final Value value; - - private final String string; - - FlowActionJwtVerifyJwtAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionJwtVerifyJwtAction - && this.string.equals(((FlowActionJwtVerifyJwtAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case VERIFY_JWT: - return visitor.visitVerifyJwt(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionJwtVerifyJwtAction valueOf(String value) { - switch (value) { - case "VERIFY_JWT": - return VERIFY_JWT; - default: - return new FlowActionJwtVerifyJwtAction(Value.UNKNOWN, value); - } - } - - public enum Value { - VERIFY_JWT, - - UNKNOWN - } - - public interface Visitor { - T visitVerifyJwt(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtVerifyJwtParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtVerifyJwtParams.java deleted file mode 100644 index 07475c20d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtVerifyJwtParams.java +++ /dev/null @@ -1,190 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionJwtVerifyJwtParams.Builder.class) -public final class FlowActionJwtVerifyJwtParams { - private final String connectionId; - - private final String token; - - private final Optional audience; - - private final Optional issuer; - - private final Map additionalProperties; - - private FlowActionJwtVerifyJwtParams( - String connectionId, - String token, - Optional audience, - Optional issuer, - Map additionalProperties) { - this.connectionId = connectionId; - this.token = token; - this.audience = audience; - this.issuer = issuer; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("token") - public String getToken() { - return token; - } - - @JsonProperty("audience") - public Optional getAudience() { - return audience; - } - - @JsonProperty("issuer") - public Optional getIssuer() { - return issuer; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionJwtVerifyJwtParams && equalTo((FlowActionJwtVerifyJwtParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionJwtVerifyJwtParams other) { - return connectionId.equals(other.connectionId) - && token.equals(other.token) - && audience.equals(other.audience) - && issuer.equals(other.issuer); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.token, this.audience, this.issuer); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - TokenStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionJwtVerifyJwtParams other); - } - - public interface TokenStage { - _FinalStage token(@NotNull String token); - } - - public interface _FinalStage { - FlowActionJwtVerifyJwtParams build(); - - _FinalStage audience(Optional audience); - - _FinalStage audience(String audience); - - _FinalStage issuer(Optional issuer); - - _FinalStage issuer(String issuer); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, TokenStage, _FinalStage { - private String connectionId; - - private String token; - - private Optional issuer = Optional.empty(); - - private Optional audience = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionJwtVerifyJwtParams other) { - connectionId(other.getConnectionId()); - token(other.getToken()); - audience(other.getAudience()); - issuer(other.getIssuer()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public TokenStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("token") - public _FinalStage token(@NotNull String token) { - this.token = Objects.requireNonNull(token, "token must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage issuer(String issuer) { - this.issuer = Optional.ofNullable(issuer); - return this; - } - - @java.lang.Override - @JsonSetter(value = "issuer", nulls = Nulls.SKIP) - public _FinalStage issuer(Optional issuer) { - this.issuer = issuer; - return this; - } - - @java.lang.Override - public _FinalStage audience(String audience) { - this.audience = Optional.ofNullable(audience); - return this; - } - - @java.lang.Override - @JsonSetter(value = "audience", nulls = Nulls.SKIP) - public _FinalStage audience(Optional audience) { - this.audience = audience; - return this; - } - - @java.lang.Override - public FlowActionJwtVerifyJwtParams build() { - return new FlowActionJwtVerifyJwtParams(connectionId, token, audience, issuer, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtVerifyJwtType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtVerifyJwtType.java deleted file mode 100644 index 532fd0dd3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionJwtVerifyJwtType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionJwtVerifyJwtType { - public static final FlowActionJwtVerifyJwtType JWT = new FlowActionJwtVerifyJwtType(Value.JWT, "JWT"); - - private final Value value; - - private final String string; - - FlowActionJwtVerifyJwtType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionJwtVerifyJwtType - && this.string.equals(((FlowActionJwtVerifyJwtType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case JWT: - return visitor.visitJwt(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionJwtVerifyJwtType valueOf(String value) { - switch (value) { - case "JWT": - return JWT; - default: - return new FlowActionJwtVerifyJwtType(Value.UNKNOWN, value); - } - } - - public enum Value { - JWT, - - UNKNOWN - } - - public interface Visitor { - T visitJwt(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailchimpUpsertMember.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionMailchimpUpsertMember.java deleted file mode 100644 index 904c3ff70..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailchimpUpsertMember.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionMailchimpUpsertMember.Builder.class) -public final class FlowActionMailchimpUpsertMember { - private final String id; - - private final Optional alias; - - private final FlowActionMailchimpUpsertMemberType type; - - private final FlowActionMailchimpUpsertMemberAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionMailchimpUpsertMemberParams params; - - private final Map additionalProperties; - - private FlowActionMailchimpUpsertMember( - String id, - Optional alias, - FlowActionMailchimpUpsertMemberType type, - FlowActionMailchimpUpsertMemberAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionMailchimpUpsertMemberParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionMailchimpUpsertMemberType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionMailchimpUpsertMemberAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionMailchimpUpsertMemberParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionMailchimpUpsertMember && equalTo((FlowActionMailchimpUpsertMember) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionMailchimpUpsertMember other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionMailchimpUpsertMember other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionMailchimpUpsertMemberType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionMailchimpUpsertMemberAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionMailchimpUpsertMemberParams params); - } - - public interface _FinalStage { - FlowActionMailchimpUpsertMember build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionMailchimpUpsertMemberType type; - - private FlowActionMailchimpUpsertMemberAction action; - - private FlowActionMailchimpUpsertMemberParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionMailchimpUpsertMember other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionMailchimpUpsertMemberType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionMailchimpUpsertMemberAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionMailchimpUpsertMemberParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionMailchimpUpsertMember build() { - return new FlowActionMailchimpUpsertMember( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailchimpUpsertMemberAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionMailchimpUpsertMemberAction.java deleted file mode 100644 index f7995ede7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailchimpUpsertMemberAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionMailchimpUpsertMemberAction { - public static final FlowActionMailchimpUpsertMemberAction UPSERT_MEMBER = - new FlowActionMailchimpUpsertMemberAction(Value.UPSERT_MEMBER, "UPSERT_MEMBER"); - - private final Value value; - - private final String string; - - FlowActionMailchimpUpsertMemberAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionMailchimpUpsertMemberAction - && this.string.equals(((FlowActionMailchimpUpsertMemberAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case UPSERT_MEMBER: - return visitor.visitUpsertMember(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionMailchimpUpsertMemberAction valueOf(String value) { - switch (value) { - case "UPSERT_MEMBER": - return UPSERT_MEMBER; - default: - return new FlowActionMailchimpUpsertMemberAction(Value.UNKNOWN, value); - } - } - - public enum Value { - UPSERT_MEMBER, - - UNKNOWN - } - - public interface Visitor { - T visitUpsertMember(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailchimpUpsertMemberParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionMailchimpUpsertMemberParams.java deleted file mode 100644 index c4bc155d1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailchimpUpsertMemberParams.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionMailchimpUpsertMemberParams.Builder.class) -public final class FlowActionMailchimpUpsertMemberParams { - private final String connectionId; - - private final String listId; - - private final FlowActionMailchimpUpsertMemberParamsMember member; - - private final Map additionalProperties; - - private FlowActionMailchimpUpsertMemberParams( - String connectionId, - String listId, - FlowActionMailchimpUpsertMemberParamsMember member, - Map additionalProperties) { - this.connectionId = connectionId; - this.listId = listId; - this.member = member; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("list_id") - public String getListId() { - return listId; - } - - @JsonProperty("member") - public FlowActionMailchimpUpsertMemberParamsMember getMember() { - return member; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionMailchimpUpsertMemberParams - && equalTo((FlowActionMailchimpUpsertMemberParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionMailchimpUpsertMemberParams other) { - return connectionId.equals(other.connectionId) && listId.equals(other.listId) && member.equals(other.member); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.listId, this.member); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - ListIdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionMailchimpUpsertMemberParams other); - } - - public interface ListIdStage { - MemberStage listId(@NotNull String listId); - } - - public interface MemberStage { - _FinalStage member(@NotNull FlowActionMailchimpUpsertMemberParamsMember member); - } - - public interface _FinalStage { - FlowActionMailchimpUpsertMemberParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, ListIdStage, MemberStage, _FinalStage { - private String connectionId; - - private String listId; - - private FlowActionMailchimpUpsertMemberParamsMember member; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionMailchimpUpsertMemberParams other) { - connectionId(other.getConnectionId()); - listId(other.getListId()); - member(other.getMember()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public ListIdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("list_id") - public MemberStage listId(@NotNull String listId) { - this.listId = Objects.requireNonNull(listId, "listId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("member") - public _FinalStage member(@NotNull FlowActionMailchimpUpsertMemberParamsMember member) { - this.member = Objects.requireNonNull(member, "member must not be null"); - return this; - } - - @java.lang.Override - public FlowActionMailchimpUpsertMemberParams build() { - return new FlowActionMailchimpUpsertMemberParams(connectionId, listId, member, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailchimpUpsertMemberParamsMember.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionMailchimpUpsertMemberParamsMember.java deleted file mode 100644 index e69b9a8de..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailchimpUpsertMemberParamsMember.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionMailchimpUpsertMemberParamsMember.Builder.class) -public final class FlowActionMailchimpUpsertMemberParamsMember { - private final String emailAddress; - - private final String statusIfNew; - - private final Optional> mergeFields; - - private final Map additionalProperties; - - private FlowActionMailchimpUpsertMemberParamsMember( - String emailAddress, - String statusIfNew, - Optional> mergeFields, - Map additionalProperties) { - this.emailAddress = emailAddress; - this.statusIfNew = statusIfNew; - this.mergeFields = mergeFields; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("email_address") - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty("status_if_new") - public String getStatusIfNew() { - return statusIfNew; - } - - @JsonProperty("merge_fields") - public Optional> getMergeFields() { - return mergeFields; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionMailchimpUpsertMemberParamsMember - && equalTo((FlowActionMailchimpUpsertMemberParamsMember) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionMailchimpUpsertMemberParamsMember other) { - return emailAddress.equals(other.emailAddress) - && statusIfNew.equals(other.statusIfNew) - && mergeFields.equals(other.mergeFields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.emailAddress, this.statusIfNew, this.mergeFields); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EmailAddressStage builder() { - return new Builder(); - } - - public interface EmailAddressStage { - StatusIfNewStage emailAddress(@NotNull String emailAddress); - - Builder from(FlowActionMailchimpUpsertMemberParamsMember other); - } - - public interface StatusIfNewStage { - _FinalStage statusIfNew(@NotNull String statusIfNew); - } - - public interface _FinalStage { - FlowActionMailchimpUpsertMemberParamsMember build(); - - _FinalStage mergeFields(Optional> mergeFields); - - _FinalStage mergeFields(Map mergeFields); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EmailAddressStage, StatusIfNewStage, _FinalStage { - private String emailAddress; - - private String statusIfNew; - - private Optional> mergeFields = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionMailchimpUpsertMemberParamsMember other) { - emailAddress(other.getEmailAddress()); - statusIfNew(other.getStatusIfNew()); - mergeFields(other.getMergeFields()); - return this; - } - - @java.lang.Override - @JsonSetter("email_address") - public StatusIfNewStage emailAddress(@NotNull String emailAddress) { - this.emailAddress = Objects.requireNonNull(emailAddress, "emailAddress must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("status_if_new") - public _FinalStage statusIfNew(@NotNull String statusIfNew) { - this.statusIfNew = Objects.requireNonNull(statusIfNew, "statusIfNew must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage mergeFields(Map mergeFields) { - this.mergeFields = Optional.ofNullable(mergeFields); - return this; - } - - @java.lang.Override - @JsonSetter(value = "merge_fields", nulls = Nulls.SKIP) - public _FinalStage mergeFields(Optional> mergeFields) { - this.mergeFields = mergeFields; - return this; - } - - @java.lang.Override - public FlowActionMailchimpUpsertMemberParamsMember build() { - return new FlowActionMailchimpUpsertMemberParamsMember( - emailAddress, statusIfNew, mergeFields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailchimpUpsertMemberType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionMailchimpUpsertMemberType.java deleted file mode 100644 index ade6ee409..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailchimpUpsertMemberType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionMailchimpUpsertMemberType { - public static final FlowActionMailchimpUpsertMemberType MAILCHIMP = - new FlowActionMailchimpUpsertMemberType(Value.MAILCHIMP, "MAILCHIMP"); - - private final Value value; - - private final String string; - - FlowActionMailchimpUpsertMemberType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionMailchimpUpsertMemberType - && this.string.equals(((FlowActionMailchimpUpsertMemberType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MAILCHIMP: - return visitor.visitMailchimp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionMailchimpUpsertMemberType valueOf(String value) { - switch (value) { - case "MAILCHIMP": - return MAILCHIMP; - default: - return new FlowActionMailchimpUpsertMemberType(Value.UNKNOWN, value); - } - } - - public enum Value { - MAILCHIMP, - - UNKNOWN - } - - public interface Visitor { - T visitMailchimp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmail.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmail.java deleted file mode 100644 index ebb267857..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmail.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionMailjetSendEmail.Builder.class) -public final class FlowActionMailjetSendEmail { - private final String id; - - private final Optional alias; - - private final FlowActionMailjetSendEmailType type; - - private final FlowActionMailjetSendEmailAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionMailjetSendEmailParams params; - - private final Map additionalProperties; - - private FlowActionMailjetSendEmail( - String id, - Optional alias, - FlowActionMailjetSendEmailType type, - FlowActionMailjetSendEmailAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionMailjetSendEmailParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionMailjetSendEmailType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionMailjetSendEmailAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionMailjetSendEmailParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionMailjetSendEmail && equalTo((FlowActionMailjetSendEmail) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionMailjetSendEmail other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionMailjetSendEmail other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionMailjetSendEmailType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionMailjetSendEmailAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionMailjetSendEmailParams params); - } - - public interface _FinalStage { - FlowActionMailjetSendEmail build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionMailjetSendEmailType type; - - private FlowActionMailjetSendEmailAction action; - - private FlowActionMailjetSendEmailParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionMailjetSendEmail other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionMailjetSendEmailType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionMailjetSendEmailAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionMailjetSendEmailParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionMailjetSendEmail build() { - return new FlowActionMailjetSendEmail( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailAction.java deleted file mode 100644 index 3e664e82a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionMailjetSendEmailAction { - public static final FlowActionMailjetSendEmailAction SEND_EMAIL = - new FlowActionMailjetSendEmailAction(Value.SEND_EMAIL, "SEND_EMAIL"); - - private final Value value; - - private final String string; - - FlowActionMailjetSendEmailAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionMailjetSendEmailAction - && this.string.equals(((FlowActionMailjetSendEmailAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SEND_EMAIL: - return visitor.visitSendEmail(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionMailjetSendEmailAction valueOf(String value) { - switch (value) { - case "SEND_EMAIL": - return SEND_EMAIL; - default: - return new FlowActionMailjetSendEmailAction(Value.UNKNOWN, value); - } - } - - public enum Value { - SEND_EMAIL, - - UNKNOWN - } - - public interface Visitor { - T visitSendEmail(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailParams.java deleted file mode 100644 index 405efb196..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailParams.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionMailjetSendEmailParams.Deserializer.class) -public final class FlowActionMailjetSendEmailParams { - private final Object value; - - private final int type; - - private FlowActionMailjetSendEmailParams(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((FlowActionMailjetSendEmailParamsContent) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowActionMailjetSendEmailParamsTemplateId) 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 FlowActionMailjetSendEmailParams && equalTo((FlowActionMailjetSendEmailParams) other); - } - - private boolean equalTo(FlowActionMailjetSendEmailParams 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 FlowActionMailjetSendEmailParams of(FlowActionMailjetSendEmailParamsContent value) { - return new FlowActionMailjetSendEmailParams(value, 0); - } - - public static FlowActionMailjetSendEmailParams of(FlowActionMailjetSendEmailParamsTemplateId value) { - return new FlowActionMailjetSendEmailParams(value, 1); - } - - public interface Visitor { - T visit(FlowActionMailjetSendEmailParamsContent value); - - T visit(FlowActionMailjetSendEmailParamsTemplateId value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionMailjetSendEmailParams.class); - } - - @java.lang.Override - public FlowActionMailjetSendEmailParams deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionMailjetSendEmailParamsContent.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, FlowActionMailjetSendEmailParamsTemplateId.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailParamsContent.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailParamsContent.java deleted file mode 100644 index a6babc079..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailParamsContent.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionMailjetSendEmailParamsContent.Builder.class) -public final class FlowActionMailjetSendEmailParamsContent { - private final String content; - - private final Map additionalProperties; - - private FlowActionMailjetSendEmailParamsContent(String content, Map additionalProperties) { - this.content = content; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("content") - public String getContent() { - return content; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionMailjetSendEmailParamsContent - && equalTo((FlowActionMailjetSendEmailParamsContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionMailjetSendEmailParamsContent 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 { - _FinalStage content(@NotNull String content); - - Builder from(FlowActionMailjetSendEmailParamsContent other); - } - - public interface _FinalStage { - FlowActionMailjetSendEmailParamsContent build(); - } - - @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(FlowActionMailjetSendEmailParamsContent other) { - content(other.getContent()); - return this; - } - - @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 FlowActionMailjetSendEmailParamsContent build() { - return new FlowActionMailjetSendEmailParamsContent(content, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailParamsTemplateId.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailParamsTemplateId.java deleted file mode 100644 index 271928a04..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailParamsTemplateId.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionMailjetSendEmailParamsTemplateId.Builder.class) -public final class FlowActionMailjetSendEmailParamsTemplateId { - private final int templateId; - - private final Optional> variables; - - private final Map additionalProperties; - - private FlowActionMailjetSendEmailParamsTemplateId( - int templateId, Optional> variables, Map additionalProperties) { - this.templateId = templateId; - this.variables = variables; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("template_id") - public int getTemplateId() { - return templateId; - } - - @JsonProperty("variables") - public Optional> getVariables() { - return variables; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionMailjetSendEmailParamsTemplateId - && equalTo((FlowActionMailjetSendEmailParamsTemplateId) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionMailjetSendEmailParamsTemplateId other) { - return templateId == other.templateId && variables.equals(other.variables); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.templateId, this.variables); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TemplateIdStage builder() { - return new Builder(); - } - - public interface TemplateIdStage { - _FinalStage templateId(int templateId); - - Builder from(FlowActionMailjetSendEmailParamsTemplateId other); - } - - public interface _FinalStage { - FlowActionMailjetSendEmailParamsTemplateId build(); - - _FinalStage variables(Optional> variables); - - _FinalStage variables(Map variables); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TemplateIdStage, _FinalStage { - private int templateId; - - private Optional> variables = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionMailjetSendEmailParamsTemplateId other) { - templateId(other.getTemplateId()); - variables(other.getVariables()); - return this; - } - - @java.lang.Override - @JsonSetter("template_id") - public _FinalStage templateId(int templateId) { - this.templateId = templateId; - return this; - } - - @java.lang.Override - public _FinalStage variables(Map variables) { - this.variables = Optional.ofNullable(variables); - return this; - } - - @java.lang.Override - @JsonSetter(value = "variables", nulls = Nulls.SKIP) - public _FinalStage variables(Optional> variables) { - this.variables = variables; - return this; - } - - @java.lang.Override - public FlowActionMailjetSendEmailParamsTemplateId build() { - return new FlowActionMailjetSendEmailParamsTemplateId(templateId, variables, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailType.java deleted file mode 100644 index b2f90e417..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionMailjetSendEmailType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionMailjetSendEmailType { - public static final FlowActionMailjetSendEmailType MAILJET = - new FlowActionMailjetSendEmailType(Value.MAILJET, "MAILJET"); - - private final Value value; - - private final String string; - - FlowActionMailjetSendEmailType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionMailjetSendEmailType - && this.string.equals(((FlowActionMailjetSendEmailType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MAILJET: - return visitor.visitMailjet(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionMailjetSendEmailType valueOf(String value) { - switch (value) { - case "MAILJET": - return MAILJET; - default: - return new FlowActionMailjetSendEmailType(Value.UNKNOWN, value); - } - } - - public enum Value { - MAILJET, - - UNKNOWN - } - - public interface Visitor { - T visitMailjet(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtp.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionOtp.java deleted file mode 100644 index 11e628e90..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtp.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionOtp.Deserializer.class) -public final class FlowActionOtp { - private final Object value; - - private final int type; - - private FlowActionOtp(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((FlowActionOtpGenerateCode) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowActionOtpVerifyCode) 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 FlowActionOtp && equalTo((FlowActionOtp) other); - } - - private boolean equalTo(FlowActionOtp 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 FlowActionOtp of(FlowActionOtpGenerateCode value) { - return new FlowActionOtp(value, 0); - } - - public static FlowActionOtp of(FlowActionOtpVerifyCode value) { - return new FlowActionOtp(value, 1); - } - - public interface Visitor { - T visit(FlowActionOtpGenerateCode value); - - T visit(FlowActionOtpVerifyCode value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionOtp.class); - } - - @java.lang.Override - public FlowActionOtp deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionOtpGenerateCode.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionOtpVerifyCode.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpGenerateCode.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpGenerateCode.java deleted file mode 100644 index 529d08b3f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpGenerateCode.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionOtpGenerateCode.Builder.class) -public final class FlowActionOtpGenerateCode { - private final String id; - - private final Optional alias; - - private final FlowActionOtpGenerateCodeType type; - - private final FlowActionOtpGenerateCodeAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionOtpGenerateCodeParams params; - - private final Map additionalProperties; - - private FlowActionOtpGenerateCode( - String id, - Optional alias, - FlowActionOtpGenerateCodeType type, - FlowActionOtpGenerateCodeAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionOtpGenerateCodeParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionOtpGenerateCodeType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionOtpGenerateCodeAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionOtpGenerateCodeParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionOtpGenerateCode && equalTo((FlowActionOtpGenerateCode) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionOtpGenerateCode other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionOtpGenerateCode other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionOtpGenerateCodeType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionOtpGenerateCodeAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionOtpGenerateCodeParams params); - } - - public interface _FinalStage { - FlowActionOtpGenerateCode build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionOtpGenerateCodeType type; - - private FlowActionOtpGenerateCodeAction action; - - private FlowActionOtpGenerateCodeParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionOtpGenerateCode other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionOtpGenerateCodeType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionOtpGenerateCodeAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionOtpGenerateCodeParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionOtpGenerateCode build() { - return new FlowActionOtpGenerateCode( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpGenerateCodeAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpGenerateCodeAction.java deleted file mode 100644 index 4ea981d29..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpGenerateCodeAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionOtpGenerateCodeAction { - public static final FlowActionOtpGenerateCodeAction GENERATE_CODE = - new FlowActionOtpGenerateCodeAction(Value.GENERATE_CODE, "GENERATE_CODE"); - - private final Value value; - - private final String string; - - FlowActionOtpGenerateCodeAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionOtpGenerateCodeAction - && this.string.equals(((FlowActionOtpGenerateCodeAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GENERATE_CODE: - return visitor.visitGenerateCode(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionOtpGenerateCodeAction valueOf(String value) { - switch (value) { - case "GENERATE_CODE": - return GENERATE_CODE; - default: - return new FlowActionOtpGenerateCodeAction(Value.UNKNOWN, value); - } - } - - public enum Value { - GENERATE_CODE, - - UNKNOWN - } - - public interface Visitor { - T visitGenerateCode(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpGenerateCodeParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpGenerateCodeParams.java deleted file mode 100644 index dde8d51e0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpGenerateCodeParams.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionOtpGenerateCodeParams.Builder.class) -public final class FlowActionOtpGenerateCodeParams { - private final String reference; - - private final int length; - - private final Map additionalProperties; - - private FlowActionOtpGenerateCodeParams(String reference, int length, Map additionalProperties) { - this.reference = reference; - this.length = length; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("reference") - public String getReference() { - return reference; - } - - @JsonProperty("length") - public int getLength() { - return length; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionOtpGenerateCodeParams && equalTo((FlowActionOtpGenerateCodeParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionOtpGenerateCodeParams other) { - return reference.equals(other.reference) && length == other.length; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.reference, this.length); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ReferenceStage builder() { - return new Builder(); - } - - public interface ReferenceStage { - LengthStage reference(@NotNull String reference); - - Builder from(FlowActionOtpGenerateCodeParams other); - } - - public interface LengthStage { - _FinalStage length(int length); - } - - public interface _FinalStage { - FlowActionOtpGenerateCodeParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ReferenceStage, LengthStage, _FinalStage { - private String reference; - - private int length; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionOtpGenerateCodeParams other) { - reference(other.getReference()); - length(other.getLength()); - return this; - } - - @java.lang.Override - @JsonSetter("reference") - public LengthStage reference(@NotNull String reference) { - this.reference = Objects.requireNonNull(reference, "reference must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("length") - public _FinalStage length(int length) { - this.length = length; - return this; - } - - @java.lang.Override - public FlowActionOtpGenerateCodeParams build() { - return new FlowActionOtpGenerateCodeParams(reference, length, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpGenerateCodeType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpGenerateCodeType.java deleted file mode 100644 index 6ac04c231..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpGenerateCodeType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionOtpGenerateCodeType { - public static final FlowActionOtpGenerateCodeType OTP = new FlowActionOtpGenerateCodeType(Value.OTP, "OTP"); - - private final Value value; - - private final String string; - - FlowActionOtpGenerateCodeType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionOtpGenerateCodeType - && this.string.equals(((FlowActionOtpGenerateCodeType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case OTP: - return visitor.visitOtp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionOtpGenerateCodeType valueOf(String value) { - switch (value) { - case "OTP": - return OTP; - default: - return new FlowActionOtpGenerateCodeType(Value.UNKNOWN, value); - } - } - - public enum Value { - OTP, - - UNKNOWN - } - - public interface Visitor { - T visitOtp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpVerifyCode.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpVerifyCode.java deleted file mode 100644 index 13024d0a7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpVerifyCode.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionOtpVerifyCode.Builder.class) -public final class FlowActionOtpVerifyCode { - private final String id; - - private final Optional alias; - - private final FlowActionOtpVerifyCodeType type; - - private final FlowActionOtpVerifyCodeAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionOtpVerifyCodeParams params; - - private final Map additionalProperties; - - private FlowActionOtpVerifyCode( - String id, - Optional alias, - FlowActionOtpVerifyCodeType type, - FlowActionOtpVerifyCodeAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionOtpVerifyCodeParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionOtpVerifyCodeType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionOtpVerifyCodeAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionOtpVerifyCodeParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionOtpVerifyCode && equalTo((FlowActionOtpVerifyCode) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionOtpVerifyCode other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionOtpVerifyCode other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionOtpVerifyCodeType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionOtpVerifyCodeAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionOtpVerifyCodeParams params); - } - - public interface _FinalStage { - FlowActionOtpVerifyCode build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionOtpVerifyCodeType type; - - private FlowActionOtpVerifyCodeAction action; - - private FlowActionOtpVerifyCodeParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionOtpVerifyCode other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionOtpVerifyCodeType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionOtpVerifyCodeAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionOtpVerifyCodeParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionOtpVerifyCode build() { - return new FlowActionOtpVerifyCode( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpVerifyCodeAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpVerifyCodeAction.java deleted file mode 100644 index f76135383..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpVerifyCodeAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionOtpVerifyCodeAction { - public static final FlowActionOtpVerifyCodeAction VERIFY_CODE = - new FlowActionOtpVerifyCodeAction(Value.VERIFY_CODE, "VERIFY_CODE"); - - private final Value value; - - private final String string; - - FlowActionOtpVerifyCodeAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionOtpVerifyCodeAction - && this.string.equals(((FlowActionOtpVerifyCodeAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case VERIFY_CODE: - return visitor.visitVerifyCode(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionOtpVerifyCodeAction valueOf(String value) { - switch (value) { - case "VERIFY_CODE": - return VERIFY_CODE; - default: - return new FlowActionOtpVerifyCodeAction(Value.UNKNOWN, value); - } - } - - public enum Value { - VERIFY_CODE, - - UNKNOWN - } - - public interface Visitor { - T visitVerifyCode(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpVerifyCodeParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpVerifyCodeParams.java deleted file mode 100644 index c1640f8df..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpVerifyCodeParams.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionOtpVerifyCodeParams.Builder.class) -public final class FlowActionOtpVerifyCodeParams { - private final String reference; - - private final FlowActionOtpVerifyCodeParamsCode code; - - private final Map additionalProperties; - - private FlowActionOtpVerifyCodeParams( - String reference, FlowActionOtpVerifyCodeParamsCode code, Map additionalProperties) { - this.reference = reference; - this.code = code; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("reference") - public String getReference() { - return reference; - } - - @JsonProperty("code") - public FlowActionOtpVerifyCodeParamsCode getCode() { - return code; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionOtpVerifyCodeParams && equalTo((FlowActionOtpVerifyCodeParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionOtpVerifyCodeParams other) { - return reference.equals(other.reference) && code.equals(other.code); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.reference, this.code); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ReferenceStage builder() { - return new Builder(); - } - - public interface ReferenceStage { - CodeStage reference(@NotNull String reference); - - Builder from(FlowActionOtpVerifyCodeParams other); - } - - public interface CodeStage { - _FinalStage code(@NotNull FlowActionOtpVerifyCodeParamsCode code); - } - - public interface _FinalStage { - FlowActionOtpVerifyCodeParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ReferenceStage, CodeStage, _FinalStage { - private String reference; - - private FlowActionOtpVerifyCodeParamsCode code; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionOtpVerifyCodeParams other) { - reference(other.getReference()); - code(other.getCode()); - return this; - } - - @java.lang.Override - @JsonSetter("reference") - public CodeStage reference(@NotNull String reference) { - this.reference = Objects.requireNonNull(reference, "reference must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("code") - public _FinalStage code(@NotNull FlowActionOtpVerifyCodeParamsCode code) { - this.code = Objects.requireNonNull(code, "code must not be null"); - return this; - } - - @java.lang.Override - public FlowActionOtpVerifyCodeParams build() { - return new FlowActionOtpVerifyCodeParams(reference, code, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpVerifyCodeParamsCode.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpVerifyCodeParamsCode.java deleted file mode 100644 index 2f215ddef..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpVerifyCodeParamsCode.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionOtpVerifyCodeParamsCode.Deserializer.class) -public final class FlowActionOtpVerifyCodeParamsCode { - private final Object value; - - private final int type; - - private FlowActionOtpVerifyCodeParamsCode(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((int) this.value); - } else if (this.type == 1) { - return visitor.visit((String) 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 FlowActionOtpVerifyCodeParamsCode && equalTo((FlowActionOtpVerifyCodeParamsCode) other); - } - - private boolean equalTo(FlowActionOtpVerifyCodeParamsCode 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 FlowActionOtpVerifyCodeParamsCode of(int value) { - return new FlowActionOtpVerifyCodeParamsCode(value, 0); - } - - public static FlowActionOtpVerifyCodeParamsCode of(String value) { - return new FlowActionOtpVerifyCodeParamsCode(value, 1); - } - - public interface Visitor { - T visit(int value); - - T visit(String value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionOtpVerifyCodeParamsCode.class); - } - - @java.lang.Override - public FlowActionOtpVerifyCodeParamsCode 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/FlowActionOtpVerifyCodeType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpVerifyCodeType.java deleted file mode 100644 index 0afba0a97..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionOtpVerifyCodeType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionOtpVerifyCodeType { - public static final FlowActionOtpVerifyCodeType OTP = new FlowActionOtpVerifyCodeType(Value.OTP, "OTP"); - - private final Value value; - - private final String string; - - FlowActionOtpVerifyCodeType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionOtpVerifyCodeType - && this.string.equals(((FlowActionOtpVerifyCodeType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case OTP: - return visitor.visitOtp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionOtpVerifyCodeType valueOf(String value) { - switch (value) { - case "OTP": - return OTP; - default: - return new FlowActionOtpVerifyCodeType(Value.UNKNOWN, value); - } - } - - public enum Value { - OTP, - - UNKNOWN - } - - public interface Visitor { - T visitOtp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedrive.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedrive.java deleted file mode 100644 index b6dcef663..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedrive.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionPipedrive.Deserializer.class) -public final class FlowActionPipedrive { - private final Object value; - - private final int type; - - private FlowActionPipedrive(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((FlowActionPipedriveAddDeal) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowActionPipedriveAddOrganization) this.value); - } else if (this.type == 2) { - return visitor.visit((FlowActionPipedriveAddPerson) 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 FlowActionPipedrive && equalTo((FlowActionPipedrive) other); - } - - private boolean equalTo(FlowActionPipedrive 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 FlowActionPipedrive of(FlowActionPipedriveAddDeal value) { - return new FlowActionPipedrive(value, 0); - } - - public static FlowActionPipedrive of(FlowActionPipedriveAddOrganization value) { - return new FlowActionPipedrive(value, 1); - } - - public static FlowActionPipedrive of(FlowActionPipedriveAddPerson value) { - return new FlowActionPipedrive(value, 2); - } - - public interface Visitor { - T visit(FlowActionPipedriveAddDeal value); - - T visit(FlowActionPipedriveAddOrganization value); - - T visit(FlowActionPipedriveAddPerson value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionPipedrive.class); - } - - @java.lang.Override - public FlowActionPipedrive deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionPipedriveAddDeal.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionPipedriveAddOrganization.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionPipedriveAddPerson.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDeal.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDeal.java deleted file mode 100644 index c39e9d874..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDeal.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionPipedriveAddDeal.Builder.class) -public final class FlowActionPipedriveAddDeal { - private final String id; - - private final Optional alias; - - private final FlowActionPipedriveAddDealType type; - - private final FlowActionPipedriveAddDealAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionPipedriveAddDealParams params; - - private final Map additionalProperties; - - private FlowActionPipedriveAddDeal( - String id, - Optional alias, - FlowActionPipedriveAddDealType type, - FlowActionPipedriveAddDealAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionPipedriveAddDealParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionPipedriveAddDealType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionPipedriveAddDealAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionPipedriveAddDealParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionPipedriveAddDeal && equalTo((FlowActionPipedriveAddDeal) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionPipedriveAddDeal other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionPipedriveAddDeal other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionPipedriveAddDealType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionPipedriveAddDealAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionPipedriveAddDealParams params); - } - - public interface _FinalStage { - FlowActionPipedriveAddDeal build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionPipedriveAddDealType type; - - private FlowActionPipedriveAddDealAction action; - - private FlowActionPipedriveAddDealParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionPipedriveAddDeal other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionPipedriveAddDealType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionPipedriveAddDealAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionPipedriveAddDealParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionPipedriveAddDeal build() { - return new FlowActionPipedriveAddDeal( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealAction.java deleted file mode 100644 index 46b2784dd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionPipedriveAddDealAction { - public static final FlowActionPipedriveAddDealAction ADD_DEAL = - new FlowActionPipedriveAddDealAction(Value.ADD_DEAL, "ADD_DEAL"); - - private final Value value; - - private final String string; - - FlowActionPipedriveAddDealAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionPipedriveAddDealAction - && this.string.equals(((FlowActionPipedriveAddDealAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ADD_DEAL: - return visitor.visitAddDeal(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionPipedriveAddDealAction valueOf(String value) { - switch (value) { - case "ADD_DEAL": - return ADD_DEAL; - default: - return new FlowActionPipedriveAddDealAction(Value.UNKNOWN, value); - } - } - - public enum Value { - ADD_DEAL, - - UNKNOWN - } - - public interface Visitor { - T visitAddDeal(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParams.java deleted file mode 100644 index 86d44f911..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParams.java +++ /dev/null @@ -1,327 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionPipedriveAddDealParams.Builder.class) -public final class FlowActionPipedriveAddDealParams { - private final String connectionId; - - private final String title; - - private final Optional value; - - private final Optional userId; - - private final Optional personId; - - private final Optional organizationId; - - private final Optional stageId; - - private final Optional> fields; - - private final Map additionalProperties; - - private FlowActionPipedriveAddDealParams( - String connectionId, - String title, - Optional value, - Optional userId, - Optional personId, - Optional organizationId, - Optional stageId, - Optional> fields, - Map additionalProperties) { - this.connectionId = connectionId; - this.title = title; - this.value = value; - this.userId = userId; - this.personId = personId; - this.organizationId = organizationId; - this.stageId = stageId; - this.fields = fields; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("title") - public String getTitle() { - return title; - } - - @JsonProperty("value") - public Optional getValue() { - return value; - } - - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - @JsonProperty("person_id") - public Optional getPersonId() { - return personId; - } - - @JsonProperty("organization_id") - public Optional getOrganizationId() { - return organizationId; - } - - @JsonProperty("stage_id") - public Optional getStageId() { - return stageId; - } - - @JsonProperty("fields") - public Optional> getFields() { - return fields; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionPipedriveAddDealParams && equalTo((FlowActionPipedriveAddDealParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionPipedriveAddDealParams other) { - return connectionId.equals(other.connectionId) - && title.equals(other.title) - && value.equals(other.value) - && userId.equals(other.userId) - && personId.equals(other.personId) - && organizationId.equals(other.organizationId) - && stageId.equals(other.stageId) - && fields.equals(other.fields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.title, - this.value, - this.userId, - this.personId, - this.organizationId, - this.stageId, - this.fields); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - TitleStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionPipedriveAddDealParams other); - } - - public interface TitleStage { - _FinalStage title(@NotNull String title); - } - - public interface _FinalStage { - FlowActionPipedriveAddDealParams build(); - - _FinalStage value(Optional value); - - _FinalStage value(String value); - - _FinalStage userId(Optional userId); - - _FinalStage userId(FlowActionPipedriveAddDealParamsUserId userId); - - _FinalStage personId(Optional personId); - - _FinalStage personId(FlowActionPipedriveAddDealParamsPersonId personId); - - _FinalStage organizationId(Optional organizationId); - - _FinalStage organizationId(FlowActionPipedriveAddDealParamsOrganizationId organizationId); - - _FinalStage stageId(Optional stageId); - - _FinalStage stageId(FlowActionPipedriveAddDealParamsStageId stageId); - - _FinalStage fields(Optional> fields); - - _FinalStage fields(Map fields); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, TitleStage, _FinalStage { - private String connectionId; - - private String title; - - private Optional> fields = Optional.empty(); - - private Optional stageId = Optional.empty(); - - private Optional organizationId = Optional.empty(); - - private Optional personId = Optional.empty(); - - private Optional userId = Optional.empty(); - - private Optional value = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionPipedriveAddDealParams other) { - connectionId(other.getConnectionId()); - title(other.getTitle()); - value(other.getValue()); - userId(other.getUserId()); - personId(other.getPersonId()); - organizationId(other.getOrganizationId()); - stageId(other.getStageId()); - fields(other.getFields()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public TitleStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("title") - public _FinalStage title(@NotNull String title) { - this.title = Objects.requireNonNull(title, "title must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage fields(Map fields) { - this.fields = Optional.ofNullable(fields); - return this; - } - - @java.lang.Override - @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public _FinalStage fields(Optional> fields) { - this.fields = fields; - return this; - } - - @java.lang.Override - public _FinalStage stageId(FlowActionPipedriveAddDealParamsStageId stageId) { - this.stageId = Optional.ofNullable(stageId); - return this; - } - - @java.lang.Override - @JsonSetter(value = "stage_id", nulls = Nulls.SKIP) - public _FinalStage stageId(Optional stageId) { - this.stageId = stageId; - return this; - } - - @java.lang.Override - public _FinalStage organizationId(FlowActionPipedriveAddDealParamsOrganizationId organizationId) { - this.organizationId = Optional.ofNullable(organizationId); - return this; - } - - @java.lang.Override - @JsonSetter(value = "organization_id", nulls = Nulls.SKIP) - public _FinalStage organizationId(Optional organizationId) { - this.organizationId = organizationId; - return this; - } - - @java.lang.Override - public _FinalStage personId(FlowActionPipedriveAddDealParamsPersonId personId) { - this.personId = Optional.ofNullable(personId); - return this; - } - - @java.lang.Override - @JsonSetter(value = "person_id", nulls = Nulls.SKIP) - public _FinalStage personId(Optional personId) { - this.personId = personId; - return this; - } - - @java.lang.Override - public _FinalStage userId(FlowActionPipedriveAddDealParamsUserId userId) { - this.userId = Optional.ofNullable(userId); - return this; - } - - @java.lang.Override - @JsonSetter(value = "user_id", nulls = Nulls.SKIP) - public _FinalStage userId(Optional userId) { - this.userId = userId; - return this; - } - - @java.lang.Override - public _FinalStage value(String value) { - this.value = Optional.ofNullable(value); - return this; - } - - @java.lang.Override - @JsonSetter(value = "value", nulls = Nulls.SKIP) - public _FinalStage value(Optional value) { - this.value = value; - return this; - } - - @java.lang.Override - public FlowActionPipedriveAddDealParams build() { - return new FlowActionPipedriveAddDealParams( - connectionId, - title, - value, - userId, - personId, - organizationId, - stageId, - fields, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParamsOrganizationId.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParamsOrganizationId.java deleted file mode 100644 index a54e34bdd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParamsOrganizationId.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionPipedriveAddDealParamsOrganizationId.Deserializer.class) -public final class FlowActionPipedriveAddDealParamsOrganizationId { - private final Object value; - - private final int type; - - private FlowActionPipedriveAddDealParamsOrganizationId(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((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 FlowActionPipedriveAddDealParamsOrganizationId - && equalTo((FlowActionPipedriveAddDealParamsOrganizationId) other); - } - - private boolean equalTo(FlowActionPipedriveAddDealParamsOrganizationId 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 FlowActionPipedriveAddDealParamsOrganizationId of(String value) { - return new FlowActionPipedriveAddDealParamsOrganizationId(value, 0); - } - - public static FlowActionPipedriveAddDealParamsOrganizationId of(double value) { - return new FlowActionPipedriveAddDealParamsOrganizationId(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(double value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionPipedriveAddDealParamsOrganizationId.class); - } - - @java.lang.Override - public FlowActionPipedriveAddDealParamsOrganizationId deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - if (value instanceof Double) { - return of((Double) value); - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParamsPersonId.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParamsPersonId.java deleted file mode 100644 index 1a7820d8a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParamsPersonId.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionPipedriveAddDealParamsPersonId.Deserializer.class) -public final class FlowActionPipedriveAddDealParamsPersonId { - private final Object value; - - private final int type; - - private FlowActionPipedriveAddDealParamsPersonId(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((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 FlowActionPipedriveAddDealParamsPersonId - && equalTo((FlowActionPipedriveAddDealParamsPersonId) other); - } - - private boolean equalTo(FlowActionPipedriveAddDealParamsPersonId 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 FlowActionPipedriveAddDealParamsPersonId of(String value) { - return new FlowActionPipedriveAddDealParamsPersonId(value, 0); - } - - public static FlowActionPipedriveAddDealParamsPersonId of(double value) { - return new FlowActionPipedriveAddDealParamsPersonId(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(double value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionPipedriveAddDealParamsPersonId.class); - } - - @java.lang.Override - public FlowActionPipedriveAddDealParamsPersonId deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - if (value instanceof Double) { - return of((Double) value); - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParamsStageId.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParamsStageId.java deleted file mode 100644 index 1cf4da94d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParamsStageId.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionPipedriveAddDealParamsStageId.Deserializer.class) -public final class FlowActionPipedriveAddDealParamsStageId { - private final Object value; - - private final int type; - - private FlowActionPipedriveAddDealParamsStageId(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((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 FlowActionPipedriveAddDealParamsStageId - && equalTo((FlowActionPipedriveAddDealParamsStageId) other); - } - - private boolean equalTo(FlowActionPipedriveAddDealParamsStageId 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 FlowActionPipedriveAddDealParamsStageId of(String value) { - return new FlowActionPipedriveAddDealParamsStageId(value, 0); - } - - public static FlowActionPipedriveAddDealParamsStageId of(double value) { - return new FlowActionPipedriveAddDealParamsStageId(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(double value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionPipedriveAddDealParamsStageId.class); - } - - @java.lang.Override - public FlowActionPipedriveAddDealParamsStageId deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - if (value instanceof Double) { - return of((Double) value); - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParamsUserId.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParamsUserId.java deleted file mode 100644 index 851d65915..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealParamsUserId.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionPipedriveAddDealParamsUserId.Deserializer.class) -public final class FlowActionPipedriveAddDealParamsUserId { - private final Object value; - - private final int type; - - private FlowActionPipedriveAddDealParamsUserId(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((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 FlowActionPipedriveAddDealParamsUserId - && equalTo((FlowActionPipedriveAddDealParamsUserId) other); - } - - private boolean equalTo(FlowActionPipedriveAddDealParamsUserId 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 FlowActionPipedriveAddDealParamsUserId of(String value) { - return new FlowActionPipedriveAddDealParamsUserId(value, 0); - } - - public static FlowActionPipedriveAddDealParamsUserId of(double value) { - return new FlowActionPipedriveAddDealParamsUserId(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(double value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionPipedriveAddDealParamsUserId.class); - } - - @java.lang.Override - public FlowActionPipedriveAddDealParamsUserId deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - if (value instanceof Double) { - return of((Double) value); - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealType.java deleted file mode 100644 index ca4845f44..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddDealType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionPipedriveAddDealType { - public static final FlowActionPipedriveAddDealType PIPEDRIVE = - new FlowActionPipedriveAddDealType(Value.PIPEDRIVE, "PIPEDRIVE"); - - private final Value value; - - private final String string; - - FlowActionPipedriveAddDealType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionPipedriveAddDealType - && this.string.equals(((FlowActionPipedriveAddDealType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PIPEDRIVE: - return visitor.visitPipedrive(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionPipedriveAddDealType valueOf(String value) { - switch (value) { - case "PIPEDRIVE": - return PIPEDRIVE; - default: - return new FlowActionPipedriveAddDealType(Value.UNKNOWN, value); - } - } - - public enum Value { - PIPEDRIVE, - - UNKNOWN - } - - public interface Visitor { - T visitPipedrive(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddOrganization.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddOrganization.java deleted file mode 100644 index efa685eb0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddOrganization.java +++ /dev/null @@ -1,271 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionPipedriveAddOrganization.Builder.class) -public final class FlowActionPipedriveAddOrganization { - private final String id; - - private final Optional alias; - - private final FlowActionPipedriveAddOrganizationType type; - - private final FlowActionPipedriveAddOrganizationAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionPipedriveAddOrganizationParams params; - - private final Map additionalProperties; - - private FlowActionPipedriveAddOrganization( - String id, - Optional alias, - FlowActionPipedriveAddOrganizationType type, - FlowActionPipedriveAddOrganizationAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionPipedriveAddOrganizationParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionPipedriveAddOrganizationType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionPipedriveAddOrganizationAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionPipedriveAddOrganizationParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionPipedriveAddOrganization - && equalTo((FlowActionPipedriveAddOrganization) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionPipedriveAddOrganization other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionPipedriveAddOrganization other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionPipedriveAddOrganizationType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionPipedriveAddOrganizationAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionPipedriveAddOrganizationParams params); - } - - public interface _FinalStage { - FlowActionPipedriveAddOrganization build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionPipedriveAddOrganizationType type; - - private FlowActionPipedriveAddOrganizationAction action; - - private FlowActionPipedriveAddOrganizationParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionPipedriveAddOrganization other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionPipedriveAddOrganizationType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionPipedriveAddOrganizationAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionPipedriveAddOrganizationParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionPipedriveAddOrganization build() { - return new FlowActionPipedriveAddOrganization( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddOrganizationAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddOrganizationAction.java deleted file mode 100644 index 9eda17f51..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddOrganizationAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionPipedriveAddOrganizationAction { - public static final FlowActionPipedriveAddOrganizationAction ADD_ORGANIZATION = - new FlowActionPipedriveAddOrganizationAction(Value.ADD_ORGANIZATION, "ADD_ORGANIZATION"); - - private final Value value; - - private final String string; - - FlowActionPipedriveAddOrganizationAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionPipedriveAddOrganizationAction - && this.string.equals(((FlowActionPipedriveAddOrganizationAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ADD_ORGANIZATION: - return visitor.visitAddOrganization(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionPipedriveAddOrganizationAction valueOf(String value) { - switch (value) { - case "ADD_ORGANIZATION": - return ADD_ORGANIZATION; - default: - return new FlowActionPipedriveAddOrganizationAction(Value.UNKNOWN, value); - } - } - - public enum Value { - ADD_ORGANIZATION, - - UNKNOWN - } - - public interface Visitor { - T visitAddOrganization(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddOrganizationParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddOrganizationParams.java deleted file mode 100644 index cd4e79869..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddOrganizationParams.java +++ /dev/null @@ -1,192 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionPipedriveAddOrganizationParams.Builder.class) -public final class FlowActionPipedriveAddOrganizationParams { - private final String connectionId; - - private final String name; - - private final Optional ownerId; - - private final Optional> fields; - - private final Map additionalProperties; - - private FlowActionPipedriveAddOrganizationParams( - String connectionId, - String name, - Optional ownerId, - Optional> fields, - Map additionalProperties) { - this.connectionId = connectionId; - this.name = name; - this.ownerId = ownerId; - this.fields = fields; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("owner_id") - public Optional getOwnerId() { - return ownerId; - } - - @JsonProperty("fields") - public Optional> getFields() { - return fields; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionPipedriveAddOrganizationParams - && equalTo((FlowActionPipedriveAddOrganizationParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionPipedriveAddOrganizationParams other) { - return connectionId.equals(other.connectionId) - && name.equals(other.name) - && ownerId.equals(other.ownerId) - && fields.equals(other.fields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.name, this.ownerId, this.fields); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - NameStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionPipedriveAddOrganizationParams other); - } - - public interface NameStage { - _FinalStage name(@NotNull String name); - } - - public interface _FinalStage { - FlowActionPipedriveAddOrganizationParams build(); - - _FinalStage ownerId(Optional ownerId); - - _FinalStage ownerId(FlowActionPipedriveAddOrganizationParamsOwnerId ownerId); - - _FinalStage fields(Optional> fields); - - _FinalStage fields(Map fields); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, NameStage, _FinalStage { - private String connectionId; - - private String name; - - private Optional> fields = Optional.empty(); - - private Optional ownerId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionPipedriveAddOrganizationParams other) { - connectionId(other.getConnectionId()); - name(other.getName()); - ownerId(other.getOwnerId()); - fields(other.getFields()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public NameStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @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 fields(Map fields) { - this.fields = Optional.ofNullable(fields); - return this; - } - - @java.lang.Override - @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public _FinalStage fields(Optional> fields) { - this.fields = fields; - return this; - } - - @java.lang.Override - public _FinalStage ownerId(FlowActionPipedriveAddOrganizationParamsOwnerId ownerId) { - this.ownerId = Optional.ofNullable(ownerId); - return this; - } - - @java.lang.Override - @JsonSetter(value = "owner_id", nulls = Nulls.SKIP) - public _FinalStage ownerId(Optional ownerId) { - this.ownerId = ownerId; - return this; - } - - @java.lang.Override - public FlowActionPipedriveAddOrganizationParams build() { - return new FlowActionPipedriveAddOrganizationParams( - connectionId, name, ownerId, fields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddOrganizationParamsOwnerId.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddOrganizationParamsOwnerId.java deleted file mode 100644 index b194e4aef..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddOrganizationParamsOwnerId.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionPipedriveAddOrganizationParamsOwnerId.Deserializer.class) -public final class FlowActionPipedriveAddOrganizationParamsOwnerId { - private final Object value; - - private final int type; - - private FlowActionPipedriveAddOrganizationParamsOwnerId(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((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 FlowActionPipedriveAddOrganizationParamsOwnerId - && equalTo((FlowActionPipedriveAddOrganizationParamsOwnerId) other); - } - - private boolean equalTo(FlowActionPipedriveAddOrganizationParamsOwnerId 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 FlowActionPipedriveAddOrganizationParamsOwnerId of(String value) { - return new FlowActionPipedriveAddOrganizationParamsOwnerId(value, 0); - } - - public static FlowActionPipedriveAddOrganizationParamsOwnerId of(double value) { - return new FlowActionPipedriveAddOrganizationParamsOwnerId(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(double value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionPipedriveAddOrganizationParamsOwnerId.class); - } - - @java.lang.Override - public FlowActionPipedriveAddOrganizationParamsOwnerId deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - if (value instanceof Double) { - return of((Double) value); - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddOrganizationType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddOrganizationType.java deleted file mode 100644 index def797d51..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddOrganizationType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionPipedriveAddOrganizationType { - public static final FlowActionPipedriveAddOrganizationType PIPEDRIVE = - new FlowActionPipedriveAddOrganizationType(Value.PIPEDRIVE, "PIPEDRIVE"); - - private final Value value; - - private final String string; - - FlowActionPipedriveAddOrganizationType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionPipedriveAddOrganizationType - && this.string.equals(((FlowActionPipedriveAddOrganizationType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PIPEDRIVE: - return visitor.visitPipedrive(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionPipedriveAddOrganizationType valueOf(String value) { - switch (value) { - case "PIPEDRIVE": - return PIPEDRIVE; - default: - return new FlowActionPipedriveAddOrganizationType(Value.UNKNOWN, value); - } - } - - public enum Value { - PIPEDRIVE, - - UNKNOWN - } - - public interface Visitor { - T visitPipedrive(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPerson.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPerson.java deleted file mode 100644 index 2763a1a9a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPerson.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionPipedriveAddPerson.Builder.class) -public final class FlowActionPipedriveAddPerson { - private final String id; - - private final Optional alias; - - private final FlowActionPipedriveAddPersonType type; - - private final FlowActionPipedriveAddPersonAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionPipedriveAddPersonParams params; - - private final Map additionalProperties; - - private FlowActionPipedriveAddPerson( - String id, - Optional alias, - FlowActionPipedriveAddPersonType type, - FlowActionPipedriveAddPersonAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionPipedriveAddPersonParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionPipedriveAddPersonType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionPipedriveAddPersonAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionPipedriveAddPersonParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionPipedriveAddPerson && equalTo((FlowActionPipedriveAddPerson) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionPipedriveAddPerson other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionPipedriveAddPerson other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionPipedriveAddPersonType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionPipedriveAddPersonAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionPipedriveAddPersonParams params); - } - - public interface _FinalStage { - FlowActionPipedriveAddPerson build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionPipedriveAddPersonType type; - - private FlowActionPipedriveAddPersonAction action; - - private FlowActionPipedriveAddPersonParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionPipedriveAddPerson other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionPipedriveAddPersonType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionPipedriveAddPersonAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionPipedriveAddPersonParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionPipedriveAddPerson build() { - return new FlowActionPipedriveAddPerson( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPersonAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPersonAction.java deleted file mode 100644 index 778c56de3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPersonAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionPipedriveAddPersonAction { - public static final FlowActionPipedriveAddPersonAction ADD_PERSON = - new FlowActionPipedriveAddPersonAction(Value.ADD_PERSON, "ADD_PERSON"); - - private final Value value; - - private final String string; - - FlowActionPipedriveAddPersonAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionPipedriveAddPersonAction - && this.string.equals(((FlowActionPipedriveAddPersonAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ADD_PERSON: - return visitor.visitAddPerson(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionPipedriveAddPersonAction valueOf(String value) { - switch (value) { - case "ADD_PERSON": - return ADD_PERSON; - default: - return new FlowActionPipedriveAddPersonAction(Value.UNKNOWN, value); - } - } - - public enum Value { - ADD_PERSON, - - UNKNOWN - } - - public interface Visitor { - T visitAddPerson(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPersonParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPersonParams.java deleted file mode 100644 index 27226c9ca..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPersonParams.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionPipedriveAddPersonParams.Builder.class) -public final class FlowActionPipedriveAddPersonParams { - private final String connectionId; - - private final String name; - - private final Optional email; - - private final Optional phone; - - private final Optional ownerId; - - private final Optional organizationId; - - private final Optional> fields; - - private final Map additionalProperties; - - private FlowActionPipedriveAddPersonParams( - String connectionId, - String name, - Optional email, - Optional phone, - Optional ownerId, - Optional organizationId, - Optional> fields, - Map additionalProperties) { - this.connectionId = connectionId; - this.name = name; - this.email = email; - this.phone = phone; - this.ownerId = ownerId; - this.organizationId = organizationId; - this.fields = fields; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - @JsonProperty("phone") - public Optional getPhone() { - return phone; - } - - @JsonProperty("owner_id") - public Optional getOwnerId() { - return ownerId; - } - - @JsonProperty("organization_id") - public Optional getOrganizationId() { - return organizationId; - } - - @JsonProperty("fields") - public Optional> getFields() { - return fields; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionPipedriveAddPersonParams - && equalTo((FlowActionPipedriveAddPersonParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionPipedriveAddPersonParams other) { - return connectionId.equals(other.connectionId) - && name.equals(other.name) - && email.equals(other.email) - && phone.equals(other.phone) - && ownerId.equals(other.ownerId) - && organizationId.equals(other.organizationId) - && fields.equals(other.fields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, this.name, this.email, this.phone, this.ownerId, this.organizationId, this.fields); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - NameStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionPipedriveAddPersonParams other); - } - - public interface NameStage { - _FinalStage name(@NotNull String name); - } - - public interface _FinalStage { - FlowActionPipedriveAddPersonParams build(); - - _FinalStage email(Optional email); - - _FinalStage email(String email); - - _FinalStage phone(Optional phone); - - _FinalStage phone(String phone); - - _FinalStage ownerId(Optional ownerId); - - _FinalStage ownerId(FlowActionPipedriveAddPersonParamsOwnerId ownerId); - - _FinalStage organizationId(Optional organizationId); - - _FinalStage organizationId(FlowActionPipedriveAddPersonParamsOrganizationId organizationId); - - _FinalStage fields(Optional> fields); - - _FinalStage fields(Map fields); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, NameStage, _FinalStage { - private String connectionId; - - private String name; - - private Optional> fields = Optional.empty(); - - private Optional organizationId = Optional.empty(); - - private Optional ownerId = Optional.empty(); - - private Optional phone = Optional.empty(); - - private Optional email = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionPipedriveAddPersonParams other) { - connectionId(other.getConnectionId()); - name(other.getName()); - email(other.getEmail()); - phone(other.getPhone()); - ownerId(other.getOwnerId()); - organizationId(other.getOrganizationId()); - fields(other.getFields()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public NameStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @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 fields(Map fields) { - this.fields = Optional.ofNullable(fields); - return this; - } - - @java.lang.Override - @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public _FinalStage fields(Optional> fields) { - this.fields = fields; - return this; - } - - @java.lang.Override - public _FinalStage organizationId(FlowActionPipedriveAddPersonParamsOrganizationId organizationId) { - this.organizationId = Optional.ofNullable(organizationId); - return this; - } - - @java.lang.Override - @JsonSetter(value = "organization_id", nulls = Nulls.SKIP) - public _FinalStage organizationId(Optional organizationId) { - this.organizationId = organizationId; - return this; - } - - @java.lang.Override - public _FinalStage ownerId(FlowActionPipedriveAddPersonParamsOwnerId ownerId) { - this.ownerId = Optional.ofNullable(ownerId); - return this; - } - - @java.lang.Override - @JsonSetter(value = "owner_id", nulls = Nulls.SKIP) - public _FinalStage ownerId(Optional ownerId) { - this.ownerId = ownerId; - return this; - } - - @java.lang.Override - public _FinalStage phone(String phone) { - this.phone = Optional.ofNullable(phone); - return this; - } - - @java.lang.Override - @JsonSetter(value = "phone", nulls = Nulls.SKIP) - public _FinalStage phone(Optional phone) { - this.phone = phone; - return this; - } - - @java.lang.Override - public _FinalStage email(String email) { - this.email = Optional.ofNullable(email); - return this; - } - - @java.lang.Override - @JsonSetter(value = "email", nulls = Nulls.SKIP) - public _FinalStage email(Optional email) { - this.email = email; - return this; - } - - @java.lang.Override - public FlowActionPipedriveAddPersonParams build() { - return new FlowActionPipedriveAddPersonParams( - connectionId, name, email, phone, ownerId, organizationId, fields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPersonParamsOrganizationId.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPersonParamsOrganizationId.java deleted file mode 100644 index 2a6aae3b7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPersonParamsOrganizationId.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionPipedriveAddPersonParamsOrganizationId.Deserializer.class) -public final class FlowActionPipedriveAddPersonParamsOrganizationId { - private final Object value; - - private final int type; - - private FlowActionPipedriveAddPersonParamsOrganizationId(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((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 FlowActionPipedriveAddPersonParamsOrganizationId - && equalTo((FlowActionPipedriveAddPersonParamsOrganizationId) other); - } - - private boolean equalTo(FlowActionPipedriveAddPersonParamsOrganizationId 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 FlowActionPipedriveAddPersonParamsOrganizationId of(String value) { - return new FlowActionPipedriveAddPersonParamsOrganizationId(value, 0); - } - - public static FlowActionPipedriveAddPersonParamsOrganizationId of(double value) { - return new FlowActionPipedriveAddPersonParamsOrganizationId(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(double value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionPipedriveAddPersonParamsOrganizationId.class); - } - - @java.lang.Override - public FlowActionPipedriveAddPersonParamsOrganizationId deserialize( - JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - if (value instanceof Double) { - return of((Double) value); - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPersonParamsOwnerId.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPersonParamsOwnerId.java deleted file mode 100644 index ac8340d2a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPersonParamsOwnerId.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionPipedriveAddPersonParamsOwnerId.Deserializer.class) -public final class FlowActionPipedriveAddPersonParamsOwnerId { - private final Object value; - - private final int type; - - private FlowActionPipedriveAddPersonParamsOwnerId(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((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 FlowActionPipedriveAddPersonParamsOwnerId - && equalTo((FlowActionPipedriveAddPersonParamsOwnerId) other); - } - - private boolean equalTo(FlowActionPipedriveAddPersonParamsOwnerId 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 FlowActionPipedriveAddPersonParamsOwnerId of(String value) { - return new FlowActionPipedriveAddPersonParamsOwnerId(value, 0); - } - - public static FlowActionPipedriveAddPersonParamsOwnerId of(double value) { - return new FlowActionPipedriveAddPersonParamsOwnerId(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(double value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionPipedriveAddPersonParamsOwnerId.class); - } - - @java.lang.Override - public FlowActionPipedriveAddPersonParamsOwnerId deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - if (value instanceof Double) { - return of((Double) value); - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPersonType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPersonType.java deleted file mode 100644 index 3e97aac95..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionPipedriveAddPersonType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionPipedriveAddPersonType { - public static final FlowActionPipedriveAddPersonType PIPEDRIVE = - new FlowActionPipedriveAddPersonType(Value.PIPEDRIVE, "PIPEDRIVE"); - - private final Value value; - - private final String string; - - FlowActionPipedriveAddPersonType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionPipedriveAddPersonType - && this.string.equals(((FlowActionPipedriveAddPersonType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PIPEDRIVE: - return visitor.visitPipedrive(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionPipedriveAddPersonType valueOf(String value) { - switch (value) { - case "PIPEDRIVE": - return PIPEDRIVE; - default: - return new FlowActionPipedriveAddPersonType(Value.UNKNOWN, value); - } - } - - public enum Value { - PIPEDRIVE, - - UNKNOWN - } - - public interface Visitor { - T visitPipedrive(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforce.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforce.java deleted file mode 100644 index c26e43cca..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforce.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionSalesforce.Deserializer.class) -public final class FlowActionSalesforce { - private final Object value; - - private final int type; - - private FlowActionSalesforce(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((FlowActionSalesforceCreateLead) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowActionSalesforceGetLead) this.value); - } else if (this.type == 2) { - return visitor.visit((FlowActionSalesforceSearchLeads) this.value); - } else if (this.type == 3) { - return visitor.visit((FlowActionSalesforceUpdateLead) 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 FlowActionSalesforce && equalTo((FlowActionSalesforce) other); - } - - private boolean equalTo(FlowActionSalesforce 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 FlowActionSalesforce of(FlowActionSalesforceCreateLead value) { - return new FlowActionSalesforce(value, 0); - } - - public static FlowActionSalesforce of(FlowActionSalesforceGetLead value) { - return new FlowActionSalesforce(value, 1); - } - - public static FlowActionSalesforce of(FlowActionSalesforceSearchLeads value) { - return new FlowActionSalesforce(value, 2); - } - - public static FlowActionSalesforce of(FlowActionSalesforceUpdateLead value) { - return new FlowActionSalesforce(value, 3); - } - - public interface Visitor { - T visit(FlowActionSalesforceCreateLead value); - - T visit(FlowActionSalesforceGetLead value); - - T visit(FlowActionSalesforceSearchLeads value); - - T visit(FlowActionSalesforceUpdateLead value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionSalesforce.class); - } - - @java.lang.Override - public FlowActionSalesforce deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSalesforceCreateLead.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSalesforceGetLead.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSalesforceSearchLeads.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionSalesforceUpdateLead.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceCreateLead.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceCreateLead.java deleted file mode 100644 index 645538f8d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceCreateLead.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionSalesforceCreateLead.Builder.class) -public final class FlowActionSalesforceCreateLead { - private final String id; - - private final Optional alias; - - private final FlowActionSalesforceCreateLeadType type; - - private final FlowActionSalesforceCreateLeadAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionSalesforceCreateLeadParams params; - - private final Map additionalProperties; - - private FlowActionSalesforceCreateLead( - String id, - Optional alias, - FlowActionSalesforceCreateLeadType type, - FlowActionSalesforceCreateLeadAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionSalesforceCreateLeadParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionSalesforceCreateLeadType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionSalesforceCreateLeadAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionSalesforceCreateLeadParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionSalesforceCreateLead && equalTo((FlowActionSalesforceCreateLead) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionSalesforceCreateLead other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionSalesforceCreateLead other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionSalesforceCreateLeadType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionSalesforceCreateLeadAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionSalesforceCreateLeadParams params); - } - - public interface _FinalStage { - FlowActionSalesforceCreateLead build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionSalesforceCreateLeadType type; - - private FlowActionSalesforceCreateLeadAction action; - - private FlowActionSalesforceCreateLeadParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionSalesforceCreateLead other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionSalesforceCreateLeadType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionSalesforceCreateLeadAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionSalesforceCreateLeadParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionSalesforceCreateLead build() { - return new FlowActionSalesforceCreateLead( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceCreateLeadAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceCreateLeadAction.java deleted file mode 100644 index b855d9b1f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceCreateLeadAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionSalesforceCreateLeadAction { - public static final FlowActionSalesforceCreateLeadAction CREATE_LEAD = - new FlowActionSalesforceCreateLeadAction(Value.CREATE_LEAD, "CREATE_LEAD"); - - private final Value value; - - private final String string; - - FlowActionSalesforceCreateLeadAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionSalesforceCreateLeadAction - && this.string.equals(((FlowActionSalesforceCreateLeadAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CREATE_LEAD: - return visitor.visitCreateLead(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionSalesforceCreateLeadAction valueOf(String value) { - switch (value) { - case "CREATE_LEAD": - return CREATE_LEAD; - default: - return new FlowActionSalesforceCreateLeadAction(Value.UNKNOWN, value); - } - } - - public enum Value { - CREATE_LEAD, - - UNKNOWN - } - - public interface Visitor { - T visitCreateLead(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceCreateLeadParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceCreateLeadParams.java deleted file mode 100644 index 65a1ab1e4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceCreateLeadParams.java +++ /dev/null @@ -1,277 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionSalesforceCreateLeadParams.Builder.class) -public final class FlowActionSalesforceCreateLeadParams { - private final String connectionId; - - private final Optional firstName; - - private final String lastName; - - private final String company; - - private final Optional email; - - private final Optional phone; - - private final Optional> payload; - - private final Map additionalProperties; - - private FlowActionSalesforceCreateLeadParams( - String connectionId, - Optional firstName, - String lastName, - String company, - Optional email, - Optional phone, - Optional> payload, - Map additionalProperties) { - this.connectionId = connectionId; - this.firstName = firstName; - this.lastName = lastName; - this.company = company; - this.email = email; - this.phone = phone; - this.payload = payload; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("first_name") - public Optional getFirstName() { - return firstName; - } - - @JsonProperty("last_name") - public String getLastName() { - return lastName; - } - - @JsonProperty("company") - public String getCompany() { - return company; - } - - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - @JsonProperty("phone") - public Optional getPhone() { - return phone; - } - - @JsonProperty("payload") - public Optional> getPayload() { - return payload; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionSalesforceCreateLeadParams - && equalTo((FlowActionSalesforceCreateLeadParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionSalesforceCreateLeadParams other) { - return connectionId.equals(other.connectionId) - && firstName.equals(other.firstName) - && lastName.equals(other.lastName) - && company.equals(other.company) - && email.equals(other.email) - && phone.equals(other.phone) - && payload.equals(other.payload); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, this.firstName, this.lastName, this.company, this.email, this.phone, this.payload); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - LastNameStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionSalesforceCreateLeadParams other); - } - - public interface LastNameStage { - CompanyStage lastName(@NotNull String lastName); - } - - public interface CompanyStage { - _FinalStage company(@NotNull String company); - } - - public interface _FinalStage { - FlowActionSalesforceCreateLeadParams build(); - - _FinalStage firstName(Optional firstName); - - _FinalStage firstName(String firstName); - - _FinalStage email(Optional email); - - _FinalStage email(String email); - - _FinalStage phone(Optional phone); - - _FinalStage phone(String phone); - - _FinalStage payload(Optional> payload); - - _FinalStage payload(Map payload); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, LastNameStage, CompanyStage, _FinalStage { - private String connectionId; - - private String lastName; - - private String company; - - private Optional> payload = Optional.empty(); - - private Optional phone = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional firstName = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionSalesforceCreateLeadParams other) { - connectionId(other.getConnectionId()); - firstName(other.getFirstName()); - lastName(other.getLastName()); - company(other.getCompany()); - email(other.getEmail()); - phone(other.getPhone()); - payload(other.getPayload()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public LastNameStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("last_name") - public CompanyStage lastName(@NotNull String lastName) { - this.lastName = Objects.requireNonNull(lastName, "lastName must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("company") - public _FinalStage company(@NotNull String company) { - this.company = Objects.requireNonNull(company, "company must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage payload(Map payload) { - this.payload = Optional.ofNullable(payload); - return this; - } - - @java.lang.Override - @JsonSetter(value = "payload", nulls = Nulls.SKIP) - public _FinalStage payload(Optional> payload) { - this.payload = payload; - return this; - } - - @java.lang.Override - public _FinalStage phone(String phone) { - this.phone = Optional.ofNullable(phone); - return this; - } - - @java.lang.Override - @JsonSetter(value = "phone", nulls = Nulls.SKIP) - public _FinalStage phone(Optional phone) { - this.phone = phone; - return this; - } - - @java.lang.Override - public _FinalStage email(String email) { - this.email = Optional.ofNullable(email); - return this; - } - - @java.lang.Override - @JsonSetter(value = "email", nulls = Nulls.SKIP) - public _FinalStage email(Optional email) { - this.email = email; - return this; - } - - @java.lang.Override - public _FinalStage firstName(String firstName) { - this.firstName = Optional.ofNullable(firstName); - return this; - } - - @java.lang.Override - @JsonSetter(value = "first_name", nulls = Nulls.SKIP) - public _FinalStage firstName(Optional firstName) { - this.firstName = firstName; - return this; - } - - @java.lang.Override - public FlowActionSalesforceCreateLeadParams build() { - return new FlowActionSalesforceCreateLeadParams( - connectionId, firstName, lastName, company, email, phone, payload, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceCreateLeadType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceCreateLeadType.java deleted file mode 100644 index fb6ae5e95..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceCreateLeadType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionSalesforceCreateLeadType { - public static final FlowActionSalesforceCreateLeadType SALESFORCE = - new FlowActionSalesforceCreateLeadType(Value.SALESFORCE, "SALESFORCE"); - - private final Value value; - - private final String string; - - FlowActionSalesforceCreateLeadType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionSalesforceCreateLeadType - && this.string.equals(((FlowActionSalesforceCreateLeadType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SALESFORCE: - return visitor.visitSalesforce(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionSalesforceCreateLeadType valueOf(String value) { - switch (value) { - case "SALESFORCE": - return SALESFORCE; - default: - return new FlowActionSalesforceCreateLeadType(Value.UNKNOWN, value); - } - } - - public enum Value { - SALESFORCE, - - UNKNOWN - } - - public interface Visitor { - T visitSalesforce(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceGetLead.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceGetLead.java deleted file mode 100644 index 5b2b9ee42..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceGetLead.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionSalesforceGetLead.Builder.class) -public final class FlowActionSalesforceGetLead { - private final String id; - - private final Optional alias; - - private final FlowActionSalesforceGetLeadType type; - - private final FlowActionSalesforceGetLeadAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionSalesforceGetLeadParams params; - - private final Map additionalProperties; - - private FlowActionSalesforceGetLead( - String id, - Optional alias, - FlowActionSalesforceGetLeadType type, - FlowActionSalesforceGetLeadAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionSalesforceGetLeadParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionSalesforceGetLeadType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionSalesforceGetLeadAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionSalesforceGetLeadParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionSalesforceGetLead && equalTo((FlowActionSalesforceGetLead) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionSalesforceGetLead other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionSalesforceGetLead other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionSalesforceGetLeadType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionSalesforceGetLeadAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionSalesforceGetLeadParams params); - } - - public interface _FinalStage { - FlowActionSalesforceGetLead build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionSalesforceGetLeadType type; - - private FlowActionSalesforceGetLeadAction action; - - private FlowActionSalesforceGetLeadParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionSalesforceGetLead other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionSalesforceGetLeadType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionSalesforceGetLeadAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionSalesforceGetLeadParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionSalesforceGetLead build() { - return new FlowActionSalesforceGetLead( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceGetLeadAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceGetLeadAction.java deleted file mode 100644 index 72f0bbc12..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceGetLeadAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionSalesforceGetLeadAction { - public static final FlowActionSalesforceGetLeadAction GET_LEAD = - new FlowActionSalesforceGetLeadAction(Value.GET_LEAD, "GET_LEAD"); - - private final Value value; - - private final String string; - - FlowActionSalesforceGetLeadAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionSalesforceGetLeadAction - && this.string.equals(((FlowActionSalesforceGetLeadAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GET_LEAD: - return visitor.visitGetLead(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionSalesforceGetLeadAction valueOf(String value) { - switch (value) { - case "GET_LEAD": - return GET_LEAD; - default: - return new FlowActionSalesforceGetLeadAction(Value.UNKNOWN, value); - } - } - - public enum Value { - GET_LEAD, - - UNKNOWN - } - - public interface Visitor { - T visitGetLead(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceGetLeadParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceGetLeadParams.java deleted file mode 100644 index e6cd077ff..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceGetLeadParams.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionSalesforceGetLeadParams.Builder.class) -public final class FlowActionSalesforceGetLeadParams { - private final String connectionId; - - private final String leadId; - - private final Map additionalProperties; - - private FlowActionSalesforceGetLeadParams( - String connectionId, String leadId, Map additionalProperties) { - this.connectionId = connectionId; - this.leadId = leadId; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("lead_id") - public String getLeadId() { - return leadId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionSalesforceGetLeadParams && equalTo((FlowActionSalesforceGetLeadParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionSalesforceGetLeadParams other) { - return connectionId.equals(other.connectionId) && leadId.equals(other.leadId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.leadId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - LeadIdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionSalesforceGetLeadParams other); - } - - public interface LeadIdStage { - _FinalStage leadId(@NotNull String leadId); - } - - public interface _FinalStage { - FlowActionSalesforceGetLeadParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, LeadIdStage, _FinalStage { - private String connectionId; - - private String leadId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionSalesforceGetLeadParams other) { - connectionId(other.getConnectionId()); - leadId(other.getLeadId()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public LeadIdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("lead_id") - public _FinalStage leadId(@NotNull String leadId) { - this.leadId = Objects.requireNonNull(leadId, "leadId must not be null"); - return this; - } - - @java.lang.Override - public FlowActionSalesforceGetLeadParams build() { - return new FlowActionSalesforceGetLeadParams(connectionId, leadId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceGetLeadType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceGetLeadType.java deleted file mode 100644 index 8b3231850..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceGetLeadType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionSalesforceGetLeadType { - public static final FlowActionSalesforceGetLeadType SALESFORCE = - new FlowActionSalesforceGetLeadType(Value.SALESFORCE, "SALESFORCE"); - - private final Value value; - - private final String string; - - FlowActionSalesforceGetLeadType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionSalesforceGetLeadType - && this.string.equals(((FlowActionSalesforceGetLeadType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SALESFORCE: - return visitor.visitSalesforce(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionSalesforceGetLeadType valueOf(String value) { - switch (value) { - case "SALESFORCE": - return SALESFORCE; - default: - return new FlowActionSalesforceGetLeadType(Value.UNKNOWN, value); - } - } - - public enum Value { - SALESFORCE, - - UNKNOWN - } - - public interface Visitor { - T visitSalesforce(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceSearchLeads.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceSearchLeads.java deleted file mode 100644 index 4108cfa49..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceSearchLeads.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionSalesforceSearchLeads.Builder.class) -public final class FlowActionSalesforceSearchLeads { - private final String id; - - private final Optional alias; - - private final FlowActionSalesforceSearchLeadsType type; - - private final FlowActionSalesforceSearchLeadsAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionSalesforceSearchLeadsParams params; - - private final Map additionalProperties; - - private FlowActionSalesforceSearchLeads( - String id, - Optional alias, - FlowActionSalesforceSearchLeadsType type, - FlowActionSalesforceSearchLeadsAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionSalesforceSearchLeadsParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionSalesforceSearchLeadsType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionSalesforceSearchLeadsAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionSalesforceSearchLeadsParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionSalesforceSearchLeads && equalTo((FlowActionSalesforceSearchLeads) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionSalesforceSearchLeads other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionSalesforceSearchLeads other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionSalesforceSearchLeadsType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionSalesforceSearchLeadsAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionSalesforceSearchLeadsParams params); - } - - public interface _FinalStage { - FlowActionSalesforceSearchLeads build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionSalesforceSearchLeadsType type; - - private FlowActionSalesforceSearchLeadsAction action; - - private FlowActionSalesforceSearchLeadsParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionSalesforceSearchLeads other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionSalesforceSearchLeadsType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionSalesforceSearchLeadsAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionSalesforceSearchLeadsParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionSalesforceSearchLeads build() { - return new FlowActionSalesforceSearchLeads( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceSearchLeadsAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceSearchLeadsAction.java deleted file mode 100644 index 5c97f1e1d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceSearchLeadsAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionSalesforceSearchLeadsAction { - public static final FlowActionSalesforceSearchLeadsAction SEARCH_LEADS = - new FlowActionSalesforceSearchLeadsAction(Value.SEARCH_LEADS, "SEARCH_LEADS"); - - private final Value value; - - private final String string; - - FlowActionSalesforceSearchLeadsAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionSalesforceSearchLeadsAction - && this.string.equals(((FlowActionSalesforceSearchLeadsAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SEARCH_LEADS: - return visitor.visitSearchLeads(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionSalesforceSearchLeadsAction valueOf(String value) { - switch (value) { - case "SEARCH_LEADS": - return SEARCH_LEADS; - default: - return new FlowActionSalesforceSearchLeadsAction(Value.UNKNOWN, value); - } - } - - public enum Value { - SEARCH_LEADS, - - UNKNOWN - } - - public interface Visitor { - T visitSearchLeads(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceSearchLeadsParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceSearchLeadsParams.java deleted file mode 100644 index aedef7c4f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceSearchLeadsParams.java +++ /dev/null @@ -1,200 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = FlowActionSalesforceSearchLeadsParams.Builder.class) -public final class FlowActionSalesforceSearchLeadsParams { - private final String connectionId; - - private final FlowActionSalesforceSearchLeadsParamsSearchField searchField; - - private final String searchValue; - - private final List leadFields; - - private final Map additionalProperties; - - private FlowActionSalesforceSearchLeadsParams( - String connectionId, - FlowActionSalesforceSearchLeadsParamsSearchField searchField, - String searchValue, - List leadFields, - Map additionalProperties) { - this.connectionId = connectionId; - this.searchField = searchField; - this.searchValue = searchValue; - this.leadFields = leadFields; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("search_field") - public FlowActionSalesforceSearchLeadsParamsSearchField getSearchField() { - return searchField; - } - - @JsonProperty("search_value") - public String getSearchValue() { - return searchValue; - } - - @JsonProperty("lead_fields") - public List getLeadFields() { - return leadFields; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionSalesforceSearchLeadsParams - && equalTo((FlowActionSalesforceSearchLeadsParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionSalesforceSearchLeadsParams other) { - return connectionId.equals(other.connectionId) - && searchField.equals(other.searchField) - && searchValue.equals(other.searchValue) - && leadFields.equals(other.leadFields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.searchField, this.searchValue, this.leadFields); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - SearchFieldStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionSalesforceSearchLeadsParams other); - } - - public interface SearchFieldStage { - SearchValueStage searchField(@NotNull FlowActionSalesforceSearchLeadsParamsSearchField searchField); - } - - public interface SearchValueStage { - _FinalStage searchValue(@NotNull String searchValue); - } - - public interface _FinalStage { - FlowActionSalesforceSearchLeadsParams build(); - - _FinalStage leadFields(List leadFields); - - _FinalStage addLeadFields(String leadFields); - - _FinalStage addAllLeadFields(List leadFields); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, SearchFieldStage, SearchValueStage, _FinalStage { - private String connectionId; - - private FlowActionSalesforceSearchLeadsParamsSearchField searchField; - - private String searchValue; - - private List leadFields = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionSalesforceSearchLeadsParams other) { - connectionId(other.getConnectionId()); - searchField(other.getSearchField()); - searchValue(other.getSearchValue()); - leadFields(other.getLeadFields()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public SearchFieldStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("search_field") - public SearchValueStage searchField(@NotNull FlowActionSalesforceSearchLeadsParamsSearchField searchField) { - this.searchField = Objects.requireNonNull(searchField, "searchField must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("search_value") - public _FinalStage searchValue(@NotNull String searchValue) { - this.searchValue = Objects.requireNonNull(searchValue, "searchValue must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage addAllLeadFields(List leadFields) { - if (leadFields != null) { - this.leadFields.addAll(leadFields); - } - return this; - } - - @java.lang.Override - public _FinalStage addLeadFields(String leadFields) { - this.leadFields.add(leadFields); - return this; - } - - @java.lang.Override - @JsonSetter(value = "lead_fields", nulls = Nulls.SKIP) - public _FinalStage leadFields(List leadFields) { - this.leadFields.clear(); - if (leadFields != null) { - this.leadFields.addAll(leadFields); - } - return this; - } - - @java.lang.Override - public FlowActionSalesforceSearchLeadsParams build() { - return new FlowActionSalesforceSearchLeadsParams( - connectionId, searchField, searchValue, leadFields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceSearchLeadsParamsSearchField.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceSearchLeadsParamsSearchField.java deleted file mode 100644 index e0a4c7c75..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceSearchLeadsParamsSearchField.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionSalesforceSearchLeadsParamsSearchField { - public static final FlowActionSalesforceSearchLeadsParamsSearchField EMAIL = - new FlowActionSalesforceSearchLeadsParamsSearchField(Value.EMAIL, "email"); - - public static final FlowActionSalesforceSearchLeadsParamsSearchField ALL = - new FlowActionSalesforceSearchLeadsParamsSearchField(Value.ALL, "all"); - - public static final FlowActionSalesforceSearchLeadsParamsSearchField PHONE = - new FlowActionSalesforceSearchLeadsParamsSearchField(Value.PHONE, "phone"); - - public static final FlowActionSalesforceSearchLeadsParamsSearchField NAME = - new FlowActionSalesforceSearchLeadsParamsSearchField(Value.NAME, "name"); - - private final Value value; - - private final String string; - - FlowActionSalesforceSearchLeadsParamsSearchField(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionSalesforceSearchLeadsParamsSearchField - && this.string.equals(((FlowActionSalesforceSearchLeadsParamsSearchField) 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 ALL: - return visitor.visitAll(); - case PHONE: - return visitor.visitPhone(); - case NAME: - return visitor.visitName(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionSalesforceSearchLeadsParamsSearchField valueOf(String value) { - switch (value) { - case "email": - return EMAIL; - case "all": - return ALL; - case "phone": - return PHONE; - case "name": - return NAME; - default: - return new FlowActionSalesforceSearchLeadsParamsSearchField(Value.UNKNOWN, value); - } - } - - public enum Value { - EMAIL, - - NAME, - - PHONE, - - ALL, - - UNKNOWN - } - - public interface Visitor { - T visitEmail(); - - T visitName(); - - T visitPhone(); - - T visitAll(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceSearchLeadsType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceSearchLeadsType.java deleted file mode 100644 index c129ef347..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceSearchLeadsType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionSalesforceSearchLeadsType { - public static final FlowActionSalesforceSearchLeadsType SALESFORCE = - new FlowActionSalesforceSearchLeadsType(Value.SALESFORCE, "SALESFORCE"); - - private final Value value; - - private final String string; - - FlowActionSalesforceSearchLeadsType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionSalesforceSearchLeadsType - && this.string.equals(((FlowActionSalesforceSearchLeadsType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SALESFORCE: - return visitor.visitSalesforce(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionSalesforceSearchLeadsType valueOf(String value) { - switch (value) { - case "SALESFORCE": - return SALESFORCE; - default: - return new FlowActionSalesforceSearchLeadsType(Value.UNKNOWN, value); - } - } - - public enum Value { - SALESFORCE, - - UNKNOWN - } - - public interface Visitor { - T visitSalesforce(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceUpdateLead.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceUpdateLead.java deleted file mode 100644 index 59d38ff52..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceUpdateLead.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionSalesforceUpdateLead.Builder.class) -public final class FlowActionSalesforceUpdateLead { - private final String id; - - private final Optional alias; - - private final FlowActionSalesforceUpdateLeadType type; - - private final FlowActionSalesforceUpdateLeadAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionSalesforceUpdateLeadParams params; - - private final Map additionalProperties; - - private FlowActionSalesforceUpdateLead( - String id, - Optional alias, - FlowActionSalesforceUpdateLeadType type, - FlowActionSalesforceUpdateLeadAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionSalesforceUpdateLeadParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionSalesforceUpdateLeadType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionSalesforceUpdateLeadAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionSalesforceUpdateLeadParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionSalesforceUpdateLead && equalTo((FlowActionSalesforceUpdateLead) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionSalesforceUpdateLead other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionSalesforceUpdateLead other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionSalesforceUpdateLeadType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionSalesforceUpdateLeadAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionSalesforceUpdateLeadParams params); - } - - public interface _FinalStage { - FlowActionSalesforceUpdateLead build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionSalesforceUpdateLeadType type; - - private FlowActionSalesforceUpdateLeadAction action; - - private FlowActionSalesforceUpdateLeadParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionSalesforceUpdateLead other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionSalesforceUpdateLeadType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionSalesforceUpdateLeadAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionSalesforceUpdateLeadParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionSalesforceUpdateLead build() { - return new FlowActionSalesforceUpdateLead( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceUpdateLeadAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceUpdateLeadAction.java deleted file mode 100644 index fc9136e21..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceUpdateLeadAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionSalesforceUpdateLeadAction { - public static final FlowActionSalesforceUpdateLeadAction UPDATE_LEAD = - new FlowActionSalesforceUpdateLeadAction(Value.UPDATE_LEAD, "UPDATE_LEAD"); - - private final Value value; - - private final String string; - - FlowActionSalesforceUpdateLeadAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionSalesforceUpdateLeadAction - && this.string.equals(((FlowActionSalesforceUpdateLeadAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case UPDATE_LEAD: - return visitor.visitUpdateLead(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionSalesforceUpdateLeadAction valueOf(String value) { - switch (value) { - case "UPDATE_LEAD": - return UPDATE_LEAD; - default: - return new FlowActionSalesforceUpdateLeadAction(Value.UNKNOWN, value); - } - } - - public enum Value { - UPDATE_LEAD, - - UNKNOWN - } - - public interface Visitor { - T visitUpdateLead(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceUpdateLeadParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceUpdateLeadParams.java deleted file mode 100644 index 1cbcaf10a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceUpdateLeadParams.java +++ /dev/null @@ -1,159 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionSalesforceUpdateLeadParams.Builder.class) -public final class FlowActionSalesforceUpdateLeadParams { - private final String connectionId; - - private final String leadId; - - private final Optional> payload; - - private final Map additionalProperties; - - private FlowActionSalesforceUpdateLeadParams( - String connectionId, - String leadId, - Optional> payload, - Map additionalProperties) { - this.connectionId = connectionId; - this.leadId = leadId; - this.payload = payload; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("lead_id") - public String getLeadId() { - return leadId; - } - - @JsonProperty("payload") - public Optional> getPayload() { - return payload; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionSalesforceUpdateLeadParams - && equalTo((FlowActionSalesforceUpdateLeadParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionSalesforceUpdateLeadParams other) { - return connectionId.equals(other.connectionId) && leadId.equals(other.leadId) && payload.equals(other.payload); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.leadId, this.payload); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - LeadIdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionSalesforceUpdateLeadParams other); - } - - public interface LeadIdStage { - _FinalStage leadId(@NotNull String leadId); - } - - public interface _FinalStage { - FlowActionSalesforceUpdateLeadParams build(); - - _FinalStage payload(Optional> payload); - - _FinalStage payload(Map payload); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, LeadIdStage, _FinalStage { - private String connectionId; - - private String leadId; - - private Optional> payload = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionSalesforceUpdateLeadParams other) { - connectionId(other.getConnectionId()); - leadId(other.getLeadId()); - payload(other.getPayload()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public LeadIdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("lead_id") - public _FinalStage leadId(@NotNull String leadId) { - this.leadId = Objects.requireNonNull(leadId, "leadId must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage payload(Map payload) { - this.payload = Optional.ofNullable(payload); - return this; - } - - @java.lang.Override - @JsonSetter(value = "payload", nulls = Nulls.SKIP) - public _FinalStage payload(Optional> payload) { - this.payload = payload; - return this; - } - - @java.lang.Override - public FlowActionSalesforceUpdateLeadParams build() { - return new FlowActionSalesforceUpdateLeadParams(connectionId, leadId, payload, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceUpdateLeadType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceUpdateLeadType.java deleted file mode 100644 index 27349c039..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSalesforceUpdateLeadType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionSalesforceUpdateLeadType { - public static final FlowActionSalesforceUpdateLeadType SALESFORCE = - new FlowActionSalesforceUpdateLeadType(Value.SALESFORCE, "SALESFORCE"); - - private final Value value; - - private final String string; - - FlowActionSalesforceUpdateLeadType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionSalesforceUpdateLeadType - && this.string.equals(((FlowActionSalesforceUpdateLeadType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SALESFORCE: - return visitor.visitSalesforce(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionSalesforceUpdateLeadType valueOf(String value) { - switch (value) { - case "SALESFORCE": - return SALESFORCE; - default: - return new FlowActionSalesforceUpdateLeadType(Value.UNKNOWN, value); - } - } - - public enum Value { - SALESFORCE, - - UNKNOWN - } - - public interface Visitor { - T visitSalesforce(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSendgridSendEmail.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSendgridSendEmail.java deleted file mode 100644 index 774a33e0e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSendgridSendEmail.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionSendgridSendEmail.Builder.class) -public final class FlowActionSendgridSendEmail { - private final String id; - - private final Optional alias; - - private final FlowActionSendgridSendEmailType type; - - private final FlowActionSendgridSendEmailAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionSendgridSendEmailParams params; - - private final Map additionalProperties; - - private FlowActionSendgridSendEmail( - String id, - Optional alias, - FlowActionSendgridSendEmailType type, - FlowActionSendgridSendEmailAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionSendgridSendEmailParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionSendgridSendEmailType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionSendgridSendEmailAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionSendgridSendEmailParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionSendgridSendEmail && equalTo((FlowActionSendgridSendEmail) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionSendgridSendEmail other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionSendgridSendEmail other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionSendgridSendEmailType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionSendgridSendEmailAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionSendgridSendEmailParams params); - } - - public interface _FinalStage { - FlowActionSendgridSendEmail build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionSendgridSendEmailType type; - - private FlowActionSendgridSendEmailAction action; - - private FlowActionSendgridSendEmailParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionSendgridSendEmail other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionSendgridSendEmailType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionSendgridSendEmailAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionSendgridSendEmailParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionSendgridSendEmail build() { - return new FlowActionSendgridSendEmail( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSendgridSendEmailAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSendgridSendEmailAction.java deleted file mode 100644 index a562f8176..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSendgridSendEmailAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionSendgridSendEmailAction { - public static final FlowActionSendgridSendEmailAction SEND_EMAIL = - new FlowActionSendgridSendEmailAction(Value.SEND_EMAIL, "SEND_EMAIL"); - - private final Value value; - - private final String string; - - FlowActionSendgridSendEmailAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionSendgridSendEmailAction - && this.string.equals(((FlowActionSendgridSendEmailAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SEND_EMAIL: - return visitor.visitSendEmail(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionSendgridSendEmailAction valueOf(String value) { - switch (value) { - case "SEND_EMAIL": - return SEND_EMAIL; - default: - return new FlowActionSendgridSendEmailAction(Value.UNKNOWN, value); - } - } - - public enum Value { - SEND_EMAIL, - - UNKNOWN - } - - public interface Visitor { - T visitSendEmail(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSendgridSendEmailParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSendgridSendEmailParams.java deleted file mode 100644 index 6fed0ff60..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSendgridSendEmailParams.java +++ /dev/null @@ -1,174 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = FlowActionSendgridSendEmailParams.Builder.class) -public final class FlowActionSendgridSendEmailParams { - private final String connectionId; - - private final FlowActionSendgridSendEmailParamsPerson from; - - private final List personalizations; - - private final Map additionalProperties; - - private FlowActionSendgridSendEmailParams( - String connectionId, - FlowActionSendgridSendEmailParamsPerson from, - List personalizations, - Map additionalProperties) { - this.connectionId = connectionId; - this.from = from; - this.personalizations = personalizations; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("from") - public FlowActionSendgridSendEmailParamsPerson getFrom() { - return from; - } - - @JsonProperty("personalizations") - public List getPersonalizations() { - return personalizations; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionSendgridSendEmailParams && equalTo((FlowActionSendgridSendEmailParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionSendgridSendEmailParams other) { - return connectionId.equals(other.connectionId) - && from.equals(other.from) - && personalizations.equals(other.personalizations); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.from, this.personalizations); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - FromStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionSendgridSendEmailParams other); - } - - public interface FromStage { - _FinalStage from(@NotNull FlowActionSendgridSendEmailParamsPerson from); - } - - public interface _FinalStage { - FlowActionSendgridSendEmailParams build(); - - _FinalStage personalizations(List personalizations); - - _FinalStage addPersonalizations(Object personalizations); - - _FinalStage addAllPersonalizations(List personalizations); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, FromStage, _FinalStage { - private String connectionId; - - private FlowActionSendgridSendEmailParamsPerson from; - - private List personalizations = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionSendgridSendEmailParams other) { - connectionId(other.getConnectionId()); - from(other.getFrom()); - personalizations(other.getPersonalizations()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public FromStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("from") - public _FinalStage from(@NotNull FlowActionSendgridSendEmailParamsPerson from) { - this.from = Objects.requireNonNull(from, "from must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage addAllPersonalizations(List personalizations) { - if (personalizations != null) { - this.personalizations.addAll(personalizations); - } - return this; - } - - @java.lang.Override - public _FinalStage addPersonalizations(Object personalizations) { - this.personalizations.add(personalizations); - return this; - } - - @java.lang.Override - @JsonSetter(value = "personalizations", nulls = Nulls.SKIP) - public _FinalStage personalizations(List personalizations) { - this.personalizations.clear(); - if (personalizations != null) { - this.personalizations.addAll(personalizations); - } - return this; - } - - @java.lang.Override - public FlowActionSendgridSendEmailParams build() { - return new FlowActionSendgridSendEmailParams(connectionId, from, personalizations, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSendgridSendEmailParamsPerson.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSendgridSendEmailParamsPerson.java deleted file mode 100644 index 17c898bcd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSendgridSendEmailParamsPerson.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionSendgridSendEmailParamsPerson.Builder.class) -public final class FlowActionSendgridSendEmailParamsPerson { - private final Optional name; - - private final String email; - - private final Map additionalProperties; - - private FlowActionSendgridSendEmailParamsPerson( - Optional name, String email, Map additionalProperties) { - this.name = name; - this.email = email; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("email") - public String getEmail() { - return email; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionSendgridSendEmailParamsPerson - && equalTo((FlowActionSendgridSendEmailParamsPerson) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionSendgridSendEmailParamsPerson other) { - return name.equals(other.name) && email.equals(other.email); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.email); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EmailStage builder() { - return new Builder(); - } - - public interface EmailStage { - _FinalStage email(@NotNull String email); - - Builder from(FlowActionSendgridSendEmailParamsPerson other); - } - - public interface _FinalStage { - FlowActionSendgridSendEmailParamsPerson build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EmailStage, _FinalStage { - private String email; - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionSendgridSendEmailParamsPerson other) { - name(other.getName()); - email(other.getEmail()); - return this; - } - - @java.lang.Override - @JsonSetter("email") - public _FinalStage email(@NotNull String email) { - this.email = Objects.requireNonNull(email, "email must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public FlowActionSendgridSendEmailParamsPerson build() { - return new FlowActionSendgridSendEmailParamsPerson(name, email, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSendgridSendEmailType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSendgridSendEmailType.java deleted file mode 100644 index fea23c886..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSendgridSendEmailType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionSendgridSendEmailType { - public static final FlowActionSendgridSendEmailType SENDGRID = - new FlowActionSendgridSendEmailType(Value.SENDGRID, "SENDGRID"); - - private final Value value; - - private final String string; - - FlowActionSendgridSendEmailType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionSendgridSendEmailType - && this.string.equals(((FlowActionSendgridSendEmailType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SENDGRID: - return visitor.visitSendgrid(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionSendgridSendEmailType valueOf(String value) { - switch (value) { - case "SENDGRID": - return SENDGRID; - default: - return new FlowActionSendgridSendEmailType(Value.UNKNOWN, value); - } - } - - public enum Value { - SENDGRID, - - UNKNOWN - } - - public interface Visitor { - T visitSendgrid(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessage.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessage.java deleted file mode 100644 index bdeaea8a3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessage.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionSlackPostMessage.Builder.class) -public final class FlowActionSlackPostMessage { - private final String id; - - private final Optional alias; - - private final FlowActionSlackPostMessageType type; - - private final FlowActionSlackPostMessageAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionSlackPostMessageParams params; - - private final Map additionalProperties; - - private FlowActionSlackPostMessage( - String id, - Optional alias, - FlowActionSlackPostMessageType type, - FlowActionSlackPostMessageAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionSlackPostMessageParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionSlackPostMessageType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionSlackPostMessageAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionSlackPostMessageParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionSlackPostMessage && equalTo((FlowActionSlackPostMessage) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionSlackPostMessage other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionSlackPostMessage other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionSlackPostMessageType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionSlackPostMessageAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionSlackPostMessageParams params); - } - - public interface _FinalStage { - FlowActionSlackPostMessage build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionSlackPostMessageType type; - - private FlowActionSlackPostMessageAction action; - - private FlowActionSlackPostMessageParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionSlackPostMessage other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionSlackPostMessageType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionSlackPostMessageAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionSlackPostMessageParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionSlackPostMessage build() { - return new FlowActionSlackPostMessage( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageAction.java deleted file mode 100644 index e35e448e6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionSlackPostMessageAction { - public static final FlowActionSlackPostMessageAction POST_MESSAGE = - new FlowActionSlackPostMessageAction(Value.POST_MESSAGE, "POST_MESSAGE"); - - private final Value value; - - private final String string; - - FlowActionSlackPostMessageAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionSlackPostMessageAction - && this.string.equals(((FlowActionSlackPostMessageAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case POST_MESSAGE: - return visitor.visitPostMessage(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionSlackPostMessageAction valueOf(String value) { - switch (value) { - case "POST_MESSAGE": - return POST_MESSAGE; - default: - return new FlowActionSlackPostMessageAction(Value.UNKNOWN, value); - } - } - - public enum Value { - POST_MESSAGE, - - UNKNOWN - } - - public interface Visitor { - T visitPostMessage(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageParams.java deleted file mode 100644 index 06aa70c05..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageParams.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionSlackPostMessageParams.Builder.class) -public final class FlowActionSlackPostMessageParams { - private final String connectionId; - - private final Optional text; - - private final Optional> attachments; - - private final Map additionalProperties; - - private FlowActionSlackPostMessageParams( - String connectionId, - Optional text, - Optional> attachments, - Map additionalProperties) { - this.connectionId = connectionId; - this.text = text; - this.attachments = attachments; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("text") - public Optional getText() { - return text; - } - - @JsonProperty("attachments") - public Optional> getAttachments() { - return attachments; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionSlackPostMessageParams && equalTo((FlowActionSlackPostMessageParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionSlackPostMessageParams other) { - return connectionId.equals(other.connectionId) - && text.equals(other.text) - && attachments.equals(other.attachments); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.text, this.attachments); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - _FinalStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionSlackPostMessageParams other); - } - - public interface _FinalStage { - FlowActionSlackPostMessageParams build(); - - _FinalStage text(Optional text); - - _FinalStage text(String text); - - _FinalStage attachments(Optional> attachments); - - _FinalStage attachments(List attachments); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, _FinalStage { - private String connectionId; - - private Optional> attachments = Optional.empty(); - - private Optional text = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionSlackPostMessageParams other) { - connectionId(other.getConnectionId()); - text(other.getText()); - attachments(other.getAttachments()); - return this; - } - - @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 _FinalStage attachments(List attachments) { - this.attachments = Optional.ofNullable(attachments); - return this; - } - - @java.lang.Override - @JsonSetter(value = "attachments", nulls = Nulls.SKIP) - public _FinalStage attachments(Optional> attachments) { - this.attachments = attachments; - return this; - } - - @java.lang.Override - public _FinalStage text(String text) { - this.text = Optional.ofNullable(text); - return this; - } - - @java.lang.Override - @JsonSetter(value = "text", nulls = Nulls.SKIP) - public _FinalStage text(Optional text) { - this.text = text; - return this; - } - - @java.lang.Override - public FlowActionSlackPostMessageParams build() { - return new FlowActionSlackPostMessageParams(connectionId, text, attachments, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageParamsAttachment.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageParamsAttachment.java deleted file mode 100644 index ab9ae9bad..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageParamsAttachment.java +++ /dev/null @@ -1,171 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionSlackPostMessageParamsAttachment.Builder.class) -public final class FlowActionSlackPostMessageParamsAttachment { - private final Optional color; - - private final Optional pretext; - - private final Optional text; - - private final Optional> fields; - - private final Map additionalProperties; - - private FlowActionSlackPostMessageParamsAttachment( - Optional color, - Optional pretext, - Optional text, - Optional> fields, - Map additionalProperties) { - this.color = color; - this.pretext = pretext; - this.text = text; - this.fields = fields; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("color") - public Optional getColor() { - return color; - } - - @JsonProperty("pretext") - public Optional getPretext() { - return pretext; - } - - @JsonProperty("text") - public Optional getText() { - return text; - } - - @JsonProperty("fields") - public Optional> getFields() { - return fields; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionSlackPostMessageParamsAttachment - && equalTo((FlowActionSlackPostMessageParamsAttachment) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionSlackPostMessageParamsAttachment other) { - return color.equals(other.color) - && pretext.equals(other.pretext) - && text.equals(other.text) - && fields.equals(other.fields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.color, this.pretext, this.text, this.fields); - } - - @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 color = Optional.empty(); - - private Optional pretext = Optional.empty(); - - private Optional text = Optional.empty(); - - private Optional> fields = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FlowActionSlackPostMessageParamsAttachment other) { - color(other.getColor()); - pretext(other.getPretext()); - text(other.getText()); - fields(other.getFields()); - return this; - } - - @JsonSetter(value = "color", nulls = Nulls.SKIP) - public Builder color(Optional color) { - this.color = color; - return this; - } - - public Builder color(FlowActionSlackPostMessageParamsAttachmentColor color) { - this.color = Optional.ofNullable(color); - return this; - } - - @JsonSetter(value = "pretext", nulls = Nulls.SKIP) - public Builder pretext(Optional pretext) { - this.pretext = pretext; - return this; - } - - public Builder pretext(String pretext) { - this.pretext = Optional.ofNullable(pretext); - return this; - } - - @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; - } - - @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public Builder fields(Optional> fields) { - this.fields = fields; - return this; - } - - public Builder fields(List fields) { - this.fields = Optional.ofNullable(fields); - return this; - } - - public FlowActionSlackPostMessageParamsAttachment build() { - return new FlowActionSlackPostMessageParamsAttachment(color, pretext, text, fields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageParamsAttachmentColor.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageParamsAttachmentColor.java deleted file mode 100644 index 842a7764b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageParamsAttachmentColor.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionSlackPostMessageParamsAttachmentColor { - public static final FlowActionSlackPostMessageParamsAttachmentColor DANGER = - new FlowActionSlackPostMessageParamsAttachmentColor(Value.DANGER, "DANGER"); - - public static final FlowActionSlackPostMessageParamsAttachmentColor GOOD = - new FlowActionSlackPostMessageParamsAttachmentColor(Value.GOOD, "GOOD"); - - public static final FlowActionSlackPostMessageParamsAttachmentColor WARNING = - new FlowActionSlackPostMessageParamsAttachmentColor(Value.WARNING, "WARNING"); - - private final Value value; - - private final String string; - - FlowActionSlackPostMessageParamsAttachmentColor(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionSlackPostMessageParamsAttachmentColor - && this.string.equals(((FlowActionSlackPostMessageParamsAttachmentColor) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DANGER: - return visitor.visitDanger(); - case GOOD: - return visitor.visitGood(); - case WARNING: - return visitor.visitWarning(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionSlackPostMessageParamsAttachmentColor valueOf(String value) { - switch (value) { - case "DANGER": - return DANGER; - case "GOOD": - return GOOD; - case "WARNING": - return WARNING; - default: - return new FlowActionSlackPostMessageParamsAttachmentColor(Value.UNKNOWN, value); - } - } - - public enum Value { - GOOD, - - WARNING, - - DANGER, - - UNKNOWN - } - - public interface Visitor { - T visitGood(); - - T visitWarning(); - - T visitDanger(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageParamsAttachmentField.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageParamsAttachmentField.java deleted file mode 100644 index 51cacf5ef..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageParamsAttachmentField.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionSlackPostMessageParamsAttachmentField.Builder.class) -public final class FlowActionSlackPostMessageParamsAttachmentField { - private final String title; - - private final Optional value; - - private final Optional short_; - - private final Map additionalProperties; - - private FlowActionSlackPostMessageParamsAttachmentField( - String title, Optional value, Optional short_, Map additionalProperties) { - this.title = title; - this.value = value; - this.short_ = short_; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("title") - public String getTitle() { - return title; - } - - @JsonProperty("value") - public Optional getValue() { - return value; - } - - @JsonProperty("short") - public Optional getShort() { - return short_; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionSlackPostMessageParamsAttachmentField - && equalTo((FlowActionSlackPostMessageParamsAttachmentField) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionSlackPostMessageParamsAttachmentField other) { - return title.equals(other.title) && value.equals(other.value) && short_.equals(other.short_); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.title, this.value, this.short_); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TitleStage builder() { - return new Builder(); - } - - public interface TitleStage { - _FinalStage title(@NotNull String title); - - Builder from(FlowActionSlackPostMessageParamsAttachmentField other); - } - - public interface _FinalStage { - FlowActionSlackPostMessageParamsAttachmentField build(); - - _FinalStage value(Optional value); - - _FinalStage value(String value); - - _FinalStage short_(Optional short_); - - _FinalStage short_(Boolean short_); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TitleStage, _FinalStage { - private String title; - - private Optional short_ = Optional.empty(); - - private Optional value = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionSlackPostMessageParamsAttachmentField other) { - title(other.getTitle()); - value(other.getValue()); - short_(other.getShort()); - return this; - } - - @java.lang.Override - @JsonSetter("title") - public _FinalStage title(@NotNull String title) { - this.title = Objects.requireNonNull(title, "title must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage short_(Boolean short_) { - this.short_ = Optional.ofNullable(short_); - return this; - } - - @java.lang.Override - @JsonSetter(value = "short", nulls = Nulls.SKIP) - public _FinalStage short_(Optional short_) { - this.short_ = short_; - return this; - } - - @java.lang.Override - public _FinalStage value(String value) { - this.value = Optional.ofNullable(value); - return this; - } - - @java.lang.Override - @JsonSetter(value = "value", nulls = Nulls.SKIP) - public _FinalStage value(Optional value) { - this.value = value; - return this; - } - - @java.lang.Override - public FlowActionSlackPostMessageParamsAttachmentField build() { - return new FlowActionSlackPostMessageParamsAttachmentField(title, value, short_, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageType.java deleted file mode 100644 index f8e82b24f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionSlackPostMessageType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionSlackPostMessageType { - public static final FlowActionSlackPostMessageType SLACK = new FlowActionSlackPostMessageType(Value.SLACK, "SLACK"); - - private final Value value; - - private final String string; - - FlowActionSlackPostMessageType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionSlackPostMessageType - && this.string.equals(((FlowActionSlackPostMessageType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SLACK: - return visitor.visitSlack(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionSlackPostMessageType valueOf(String value) { - switch (value) { - case "SLACK": - return SLACK; - default: - return new FlowActionSlackPostMessageType(Value.UNKNOWN, value); - } - } - - public enum Value { - SLACK, - - UNKNOWN - } - - public interface Visitor { - T visitSlack(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripe.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripe.java deleted file mode 100644 index 6496bccf0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripe.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionStripe.Deserializer.class) -public final class FlowActionStripe { - private final Object value; - - private final int type; - - private FlowActionStripe(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((FlowActionStripeAddTaxId) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowActionStripeCreateCustomer) this.value); - } else if (this.type == 2) { - return visitor.visit((FlowActionStripeCreatePortalSession) this.value); - } else if (this.type == 3) { - return visitor.visit((FlowActionStripeDeleteTaxId) this.value); - } else if (this.type == 4) { - return visitor.visit((FlowActionStripeFindCustomers) this.value); - } else if (this.type == 5) { - return visitor.visit((FlowActionStripeGetCustomer) this.value); - } else if (this.type == 6) { - return visitor.visit((FlowActionStripeUpdateCustomer) 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 FlowActionStripe && equalTo((FlowActionStripe) other); - } - - private boolean equalTo(FlowActionStripe 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 FlowActionStripe of(FlowActionStripeAddTaxId value) { - return new FlowActionStripe(value, 0); - } - - public static FlowActionStripe of(FlowActionStripeCreateCustomer value) { - return new FlowActionStripe(value, 1); - } - - public static FlowActionStripe of(FlowActionStripeCreatePortalSession value) { - return new FlowActionStripe(value, 2); - } - - public static FlowActionStripe of(FlowActionStripeDeleteTaxId value) { - return new FlowActionStripe(value, 3); - } - - public static FlowActionStripe of(FlowActionStripeFindCustomers value) { - return new FlowActionStripe(value, 4); - } - - public static FlowActionStripe of(FlowActionStripeGetCustomer value) { - return new FlowActionStripe(value, 5); - } - - public static FlowActionStripe of(FlowActionStripeUpdateCustomer value) { - return new FlowActionStripe(value, 6); - } - - public interface Visitor { - T visit(FlowActionStripeAddTaxId value); - - T visit(FlowActionStripeCreateCustomer value); - - T visit(FlowActionStripeCreatePortalSession value); - - T visit(FlowActionStripeDeleteTaxId value); - - T visit(FlowActionStripeFindCustomers value); - - T visit(FlowActionStripeGetCustomer value); - - T visit(FlowActionStripeUpdateCustomer value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionStripe.class); - } - - @java.lang.Override - public FlowActionStripe deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeAddTaxId.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeCreateCustomer.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeCreatePortalSession.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeDeleteTaxId.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeFindCustomers.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeGetCustomer.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionStripeUpdateCustomer.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeAddTaxId.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeAddTaxId.java deleted file mode 100644 index e22887a13..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeAddTaxId.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionStripeAddTaxId.Builder.class) -public final class FlowActionStripeAddTaxId { - private final String id; - - private final Optional alias; - - private final FlowActionStripeAddTaxIdType type; - - private final FlowActionStripeAddTaxIdAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionStripeAddTaxIdParams params; - - private final Map additionalProperties; - - private FlowActionStripeAddTaxId( - String id, - Optional alias, - FlowActionStripeAddTaxIdType type, - FlowActionStripeAddTaxIdAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionStripeAddTaxIdParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionStripeAddTaxIdType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionStripeAddTaxIdAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionStripeAddTaxIdParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionStripeAddTaxId && equalTo((FlowActionStripeAddTaxId) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionStripeAddTaxId other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionStripeAddTaxId other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionStripeAddTaxIdType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionStripeAddTaxIdAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionStripeAddTaxIdParams params); - } - - public interface _FinalStage { - FlowActionStripeAddTaxId build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionStripeAddTaxIdType type; - - private FlowActionStripeAddTaxIdAction action; - - private FlowActionStripeAddTaxIdParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionStripeAddTaxId other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionStripeAddTaxIdType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionStripeAddTaxIdAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionStripeAddTaxIdParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionStripeAddTaxId build() { - return new FlowActionStripeAddTaxId( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeAddTaxIdAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeAddTaxIdAction.java deleted file mode 100644 index dd8dfb69b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeAddTaxIdAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionStripeAddTaxIdAction { - public static final FlowActionStripeAddTaxIdAction ADD_TAX_ID = - new FlowActionStripeAddTaxIdAction(Value.ADD_TAX_ID, "ADD_TAX_ID"); - - private final Value value; - - private final String string; - - FlowActionStripeAddTaxIdAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionStripeAddTaxIdAction - && this.string.equals(((FlowActionStripeAddTaxIdAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ADD_TAX_ID: - return visitor.visitAddTaxId(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionStripeAddTaxIdAction valueOf(String value) { - switch (value) { - case "ADD_TAX_ID": - return ADD_TAX_ID; - default: - return new FlowActionStripeAddTaxIdAction(Value.UNKNOWN, value); - } - } - - public enum Value { - ADD_TAX_ID, - - UNKNOWN - } - - public interface Visitor { - T visitAddTaxId(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeAddTaxIdParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeAddTaxIdParams.java deleted file mode 100644 index dd86ca001..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeAddTaxIdParams.java +++ /dev/null @@ -1,177 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionStripeAddTaxIdParams.Builder.class) -public final class FlowActionStripeAddTaxIdParams { - private final String connectionId; - - private final String customerId; - - private final String type; - - private final String value; - - private final Map additionalProperties; - - private FlowActionStripeAddTaxIdParams( - String connectionId, - String customerId, - String type, - String value, - Map additionalProperties) { - this.connectionId = connectionId; - this.customerId = customerId; - this.type = type; - this.value = value; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("customer_id") - public String getCustomerId() { - return customerId; - } - - @JsonProperty("type") - public String getType() { - return type; - } - - @JsonProperty("value") - public String getValue() { - return value; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionStripeAddTaxIdParams && equalTo((FlowActionStripeAddTaxIdParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionStripeAddTaxIdParams other) { - return connectionId.equals(other.connectionId) - && customerId.equals(other.customerId) - && type.equals(other.type) - && value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.customerId, this.type, this.value); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - CustomerIdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionStripeAddTaxIdParams other); - } - - public interface CustomerIdStage { - TypeStage customerId(@NotNull String customerId); - } - - public interface TypeStage { - ValueStage type(@NotNull String type); - } - - public interface ValueStage { - _FinalStage value(@NotNull String value); - } - - public interface _FinalStage { - FlowActionStripeAddTaxIdParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements ConnectionIdStage, CustomerIdStage, TypeStage, ValueStage, _FinalStage { - private String connectionId; - - private String customerId; - - private String type; - - private String value; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionStripeAddTaxIdParams other) { - connectionId(other.getConnectionId()); - customerId(other.getCustomerId()); - type(other.getType()); - value(other.getValue()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public CustomerIdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("customer_id") - public TypeStage customerId(@NotNull String customerId) { - this.customerId = Objects.requireNonNull(customerId, "customerId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ValueStage type(@NotNull String type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @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 FlowActionStripeAddTaxIdParams build() { - return new FlowActionStripeAddTaxIdParams(connectionId, customerId, type, value, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeAddTaxIdType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeAddTaxIdType.java deleted file mode 100644 index 03e31da71..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeAddTaxIdType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionStripeAddTaxIdType { - public static final FlowActionStripeAddTaxIdType STRIPE = new FlowActionStripeAddTaxIdType(Value.STRIPE, "STRIPE"); - - private final Value value; - - private final String string; - - FlowActionStripeAddTaxIdType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionStripeAddTaxIdType - && this.string.equals(((FlowActionStripeAddTaxIdType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case STRIPE: - return visitor.visitStripe(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionStripeAddTaxIdType valueOf(String value) { - switch (value) { - case "STRIPE": - return STRIPE; - default: - return new FlowActionStripeAddTaxIdType(Value.UNKNOWN, value); - } - } - - public enum Value { - STRIPE, - - UNKNOWN - } - - public interface Visitor { - T visitStripe(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeAddress.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeAddress.java deleted file mode 100644 index f4eabdc3b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeAddress.java +++ /dev/null @@ -1,217 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionStripeAddress.Builder.class) -public final class FlowActionStripeAddress { - private final Optional line1; - - private final Optional line2; - - private final Optional postalCode; - - private final Optional city; - - private final Optional state; - - private final Optional country; - - private final Map additionalProperties; - - private FlowActionStripeAddress( - Optional line1, - Optional line2, - Optional postalCode, - Optional city, - Optional state, - Optional country, - Map additionalProperties) { - this.line1 = line1; - this.line2 = line2; - this.postalCode = postalCode; - this.city = city; - this.state = state; - this.country = country; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("line1") - public Optional getLine1() { - return line1; - } - - @JsonProperty("line2") - public Optional getLine2() { - return line2; - } - - @JsonProperty("postalCode") - public Optional getPostalCode() { - return postalCode; - } - - @JsonProperty("city") - public Optional getCity() { - return city; - } - - @JsonProperty("state") - public Optional getState() { - return state; - } - - @JsonProperty("country") - public Optional getCountry() { - return country; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionStripeAddress && equalTo((FlowActionStripeAddress) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionStripeAddress other) { - return line1.equals(other.line1) - && line2.equals(other.line2) - && postalCode.equals(other.postalCode) - && city.equals(other.city) - && state.equals(other.state) - && country.equals(other.country); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.line1, this.line2, this.postalCode, this.city, this.state, this.country); - } - - @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 line1 = Optional.empty(); - - private Optional line2 = Optional.empty(); - - private Optional postalCode = Optional.empty(); - - private Optional city = Optional.empty(); - - private Optional state = Optional.empty(); - - private Optional country = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FlowActionStripeAddress other) { - line1(other.getLine1()); - line2(other.getLine2()); - postalCode(other.getPostalCode()); - city(other.getCity()); - state(other.getState()); - country(other.getCountry()); - return this; - } - - @JsonSetter(value = "line1", nulls = Nulls.SKIP) - public Builder line1(Optional line1) { - this.line1 = line1; - return this; - } - - public Builder line1(String line1) { - this.line1 = Optional.ofNullable(line1); - return this; - } - - @JsonSetter(value = "line2", nulls = Nulls.SKIP) - public Builder line2(Optional line2) { - this.line2 = line2; - return this; - } - - public Builder line2(String line2) { - this.line2 = Optional.ofNullable(line2); - return this; - } - - @JsonSetter(value = "postalCode", nulls = Nulls.SKIP) - public Builder postalCode(Optional postalCode) { - this.postalCode = postalCode; - return this; - } - - public Builder postalCode(String postalCode) { - this.postalCode = Optional.ofNullable(postalCode); - return this; - } - - @JsonSetter(value = "city", nulls = Nulls.SKIP) - public Builder city(Optional city) { - this.city = city; - return this; - } - - public Builder city(String city) { - this.city = Optional.ofNullable(city); - return this; - } - - @JsonSetter(value = "state", nulls = Nulls.SKIP) - public Builder state(Optional state) { - this.state = state; - return this; - } - - public Builder state(String state) { - this.state = Optional.ofNullable(state); - return this; - } - - @JsonSetter(value = "country", nulls = Nulls.SKIP) - public Builder country(Optional country) { - this.country = country; - return this; - } - - public Builder country(String country) { - this.country = Optional.ofNullable(country); - return this; - } - - public FlowActionStripeAddress build() { - return new FlowActionStripeAddress(line1, line2, postalCode, city, state, country, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreateCustomer.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreateCustomer.java deleted file mode 100644 index 0197479b8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreateCustomer.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionStripeCreateCustomer.Builder.class) -public final class FlowActionStripeCreateCustomer { - private final String id; - - private final Optional alias; - - private final FlowActionStripeCreateCustomerType type; - - private final FlowActionStripeCreateCustomerAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionStripeCreateCustomerParams params; - - private final Map additionalProperties; - - private FlowActionStripeCreateCustomer( - String id, - Optional alias, - FlowActionStripeCreateCustomerType type, - FlowActionStripeCreateCustomerAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionStripeCreateCustomerParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionStripeCreateCustomerType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionStripeCreateCustomerAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionStripeCreateCustomerParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionStripeCreateCustomer && equalTo((FlowActionStripeCreateCustomer) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionStripeCreateCustomer other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionStripeCreateCustomer other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionStripeCreateCustomerType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionStripeCreateCustomerAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionStripeCreateCustomerParams params); - } - - public interface _FinalStage { - FlowActionStripeCreateCustomer build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionStripeCreateCustomerType type; - - private FlowActionStripeCreateCustomerAction action; - - private FlowActionStripeCreateCustomerParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionStripeCreateCustomer other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionStripeCreateCustomerType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionStripeCreateCustomerAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionStripeCreateCustomerParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionStripeCreateCustomer build() { - return new FlowActionStripeCreateCustomer( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreateCustomerAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreateCustomerAction.java deleted file mode 100644 index 52cf8a55e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreateCustomerAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionStripeCreateCustomerAction { - public static final FlowActionStripeCreateCustomerAction CREATE_CUSTOMER = - new FlowActionStripeCreateCustomerAction(Value.CREATE_CUSTOMER, "CREATE_CUSTOMER"); - - private final Value value; - - private final String string; - - FlowActionStripeCreateCustomerAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionStripeCreateCustomerAction - && this.string.equals(((FlowActionStripeCreateCustomerAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CREATE_CUSTOMER: - return visitor.visitCreateCustomer(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionStripeCreateCustomerAction valueOf(String value) { - switch (value) { - case "CREATE_CUSTOMER": - return CREATE_CUSTOMER; - default: - return new FlowActionStripeCreateCustomerAction(Value.UNKNOWN, value); - } - } - - public enum Value { - CREATE_CUSTOMER, - - UNKNOWN - } - - public interface Visitor { - T visitCreateCustomer(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreateCustomerParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreateCustomerParams.java deleted file mode 100644 index bf853a780..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreateCustomerParams.java +++ /dev/null @@ -1,366 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionStripeCreateCustomerParams.Builder.class) -public final class FlowActionStripeCreateCustomerParams { - private final String connectionId; - - private final Optional taxId; - - private final Optional name; - - private final Optional description; - - private final Optional email; - - private final Optional phone; - - private final Optional taxExempt; - - private final Optional address; - - private final Optional> metadata; - - private final Map additionalProperties; - - private FlowActionStripeCreateCustomerParams( - String connectionId, - Optional taxId, - Optional name, - Optional description, - Optional email, - Optional phone, - Optional taxExempt, - Optional address, - Optional> metadata, - Map additionalProperties) { - this.connectionId = connectionId; - this.taxId = taxId; - this.name = name; - this.description = description; - this.email = email; - this.phone = phone; - this.taxExempt = taxExempt; - this.address = address; - this.metadata = metadata; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("tax_id") - public Optional getTaxId() { - return taxId; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - @JsonProperty("phone") - public Optional getPhone() { - return phone; - } - - @JsonProperty("tax_exempt") - public Optional getTaxExempt() { - return taxExempt; - } - - @JsonProperty("address") - public Optional getAddress() { - return address; - } - - @JsonProperty("metadata") - public Optional> getMetadata() { - return metadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionStripeCreateCustomerParams - && equalTo((FlowActionStripeCreateCustomerParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionStripeCreateCustomerParams other) { - return connectionId.equals(other.connectionId) - && taxId.equals(other.taxId) - && name.equals(other.name) - && description.equals(other.description) - && email.equals(other.email) - && phone.equals(other.phone) - && taxExempt.equals(other.taxExempt) - && address.equals(other.address) - && metadata.equals(other.metadata); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.taxId, - this.name, - this.description, - this.email, - this.phone, - this.taxExempt, - this.address, - this.metadata); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - _FinalStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionStripeCreateCustomerParams other); - } - - public interface _FinalStage { - FlowActionStripeCreateCustomerParams build(); - - _FinalStage taxId(Optional taxId); - - _FinalStage taxId(FlowActionStripeTaxId taxId); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage description(Optional description); - - _FinalStage description(String description); - - _FinalStage email(Optional email); - - _FinalStage email(String email); - - _FinalStage phone(Optional phone); - - _FinalStage phone(String phone); - - _FinalStage taxExempt(Optional taxExempt); - - _FinalStage taxExempt(String taxExempt); - - _FinalStage address(Optional address); - - _FinalStage address(FlowActionStripeAddress address); - - _FinalStage metadata(Optional> metadata); - - _FinalStage metadata(Map metadata); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, _FinalStage { - private String connectionId; - - private Optional> metadata = Optional.empty(); - - private Optional address = Optional.empty(); - - private Optional taxExempt = Optional.empty(); - - private Optional phone = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional description = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional taxId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionStripeCreateCustomerParams other) { - connectionId(other.getConnectionId()); - taxId(other.getTaxId()); - name(other.getName()); - description(other.getDescription()); - email(other.getEmail()); - phone(other.getPhone()); - taxExempt(other.getTaxExempt()); - address(other.getAddress()); - metadata(other.getMetadata()); - return this; - } - - @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 _FinalStage metadata(Map metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional> metadata) { - this.metadata = metadata; - return this; - } - - @java.lang.Override - public _FinalStage address(FlowActionStripeAddress address) { - this.address = Optional.ofNullable(address); - return this; - } - - @java.lang.Override - @JsonSetter(value = "address", nulls = Nulls.SKIP) - public _FinalStage address(Optional address) { - this.address = address; - return this; - } - - @java.lang.Override - public _FinalStage taxExempt(String taxExempt) { - this.taxExempt = Optional.ofNullable(taxExempt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "tax_exempt", nulls = Nulls.SKIP) - public _FinalStage taxExempt(Optional taxExempt) { - this.taxExempt = taxExempt; - return this; - } - - @java.lang.Override - public _FinalStage phone(String phone) { - this.phone = Optional.ofNullable(phone); - return this; - } - - @java.lang.Override - @JsonSetter(value = "phone", nulls = Nulls.SKIP) - public _FinalStage phone(Optional phone) { - this.phone = phone; - return this; - } - - @java.lang.Override - public _FinalStage email(String email) { - this.email = Optional.ofNullable(email); - return this; - } - - @java.lang.Override - @JsonSetter(value = "email", nulls = Nulls.SKIP) - public _FinalStage email(Optional email) { - this.email = email; - 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 _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage taxId(FlowActionStripeTaxId taxId) { - this.taxId = Optional.ofNullable(taxId); - return this; - } - - @java.lang.Override - @JsonSetter(value = "tax_id", nulls = Nulls.SKIP) - public _FinalStage taxId(Optional taxId) { - this.taxId = taxId; - return this; - } - - @java.lang.Override - public FlowActionStripeCreateCustomerParams build() { - return new FlowActionStripeCreateCustomerParams( - connectionId, - taxId, - name, - description, - email, - phone, - taxExempt, - address, - metadata, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreateCustomerType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreateCustomerType.java deleted file mode 100644 index b48a692cc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreateCustomerType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionStripeCreateCustomerType { - public static final FlowActionStripeCreateCustomerType STRIPE = - new FlowActionStripeCreateCustomerType(Value.STRIPE, "STRIPE"); - - private final Value value; - - private final String string; - - FlowActionStripeCreateCustomerType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionStripeCreateCustomerType - && this.string.equals(((FlowActionStripeCreateCustomerType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case STRIPE: - return visitor.visitStripe(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionStripeCreateCustomerType valueOf(String value) { - switch (value) { - case "STRIPE": - return STRIPE; - default: - return new FlowActionStripeCreateCustomerType(Value.UNKNOWN, value); - } - } - - public enum Value { - STRIPE, - - UNKNOWN - } - - public interface Visitor { - T visitStripe(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreatePortalSession.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreatePortalSession.java deleted file mode 100644 index 1d0eda5a1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreatePortalSession.java +++ /dev/null @@ -1,271 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionStripeCreatePortalSession.Builder.class) -public final class FlowActionStripeCreatePortalSession { - private final String id; - - private final Optional alias; - - private final FlowActionStripeCreatePortalSessionType type; - - private final FlowActionStripeCreatePortalSessionAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionStripeCreatePortalSessionParams params; - - private final Map additionalProperties; - - private FlowActionStripeCreatePortalSession( - String id, - Optional alias, - FlowActionStripeCreatePortalSessionType type, - FlowActionStripeCreatePortalSessionAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionStripeCreatePortalSessionParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionStripeCreatePortalSessionType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionStripeCreatePortalSessionAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionStripeCreatePortalSessionParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionStripeCreatePortalSession - && equalTo((FlowActionStripeCreatePortalSession) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionStripeCreatePortalSession other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionStripeCreatePortalSession other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionStripeCreatePortalSessionType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionStripeCreatePortalSessionAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionStripeCreatePortalSessionParams params); - } - - public interface _FinalStage { - FlowActionStripeCreatePortalSession build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionStripeCreatePortalSessionType type; - - private FlowActionStripeCreatePortalSessionAction action; - - private FlowActionStripeCreatePortalSessionParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionStripeCreatePortalSession other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionStripeCreatePortalSessionType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionStripeCreatePortalSessionAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionStripeCreatePortalSessionParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionStripeCreatePortalSession build() { - return new FlowActionStripeCreatePortalSession( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreatePortalSessionAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreatePortalSessionAction.java deleted file mode 100644 index ab72dee0c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreatePortalSessionAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionStripeCreatePortalSessionAction { - public static final FlowActionStripeCreatePortalSessionAction CREATE_PORTAL_SESSION = - new FlowActionStripeCreatePortalSessionAction(Value.CREATE_PORTAL_SESSION, "CREATE_PORTAL_SESSION"); - - private final Value value; - - private final String string; - - FlowActionStripeCreatePortalSessionAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionStripeCreatePortalSessionAction - && this.string.equals(((FlowActionStripeCreatePortalSessionAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CREATE_PORTAL_SESSION: - return visitor.visitCreatePortalSession(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionStripeCreatePortalSessionAction valueOf(String value) { - switch (value) { - case "CREATE_PORTAL_SESSION": - return CREATE_PORTAL_SESSION; - default: - return new FlowActionStripeCreatePortalSessionAction(Value.UNKNOWN, value); - } - } - - public enum Value { - CREATE_PORTAL_SESSION, - - UNKNOWN - } - - public interface Visitor { - T visitCreatePortalSession(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreatePortalSessionParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreatePortalSessionParams.java deleted file mode 100644 index 77748d777..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreatePortalSessionParams.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionStripeCreatePortalSessionParams.Builder.class) -public final class FlowActionStripeCreatePortalSessionParams { - private final String connectionId; - - private final String customerId; - - private final Optional returnUrl; - - private final Map additionalProperties; - - private FlowActionStripeCreatePortalSessionParams( - String connectionId, - String customerId, - Optional returnUrl, - Map additionalProperties) { - this.connectionId = connectionId; - this.customerId = customerId; - this.returnUrl = returnUrl; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("customer_id") - public String getCustomerId() { - return customerId; - } - - @JsonProperty("return_url") - public Optional getReturnUrl() { - return returnUrl; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionStripeCreatePortalSessionParams - && equalTo((FlowActionStripeCreatePortalSessionParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionStripeCreatePortalSessionParams other) { - return connectionId.equals(other.connectionId) - && customerId.equals(other.customerId) - && returnUrl.equals(other.returnUrl); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.customerId, this.returnUrl); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - CustomerIdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionStripeCreatePortalSessionParams other); - } - - public interface CustomerIdStage { - _FinalStage customerId(@NotNull String customerId); - } - - public interface _FinalStage { - FlowActionStripeCreatePortalSessionParams build(); - - _FinalStage returnUrl(Optional returnUrl); - - _FinalStage returnUrl(String returnUrl); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, CustomerIdStage, _FinalStage { - private String connectionId; - - private String customerId; - - private Optional returnUrl = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionStripeCreatePortalSessionParams other) { - connectionId(other.getConnectionId()); - customerId(other.getCustomerId()); - returnUrl(other.getReturnUrl()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public CustomerIdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("customer_id") - public _FinalStage customerId(@NotNull String customerId) { - this.customerId = Objects.requireNonNull(customerId, "customerId must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage returnUrl(String returnUrl) { - this.returnUrl = Optional.ofNullable(returnUrl); - return this; - } - - @java.lang.Override - @JsonSetter(value = "return_url", nulls = Nulls.SKIP) - public _FinalStage returnUrl(Optional returnUrl) { - this.returnUrl = returnUrl; - return this; - } - - @java.lang.Override - public FlowActionStripeCreatePortalSessionParams build() { - return new FlowActionStripeCreatePortalSessionParams( - connectionId, customerId, returnUrl, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreatePortalSessionType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreatePortalSessionType.java deleted file mode 100644 index 85ab28937..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeCreatePortalSessionType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionStripeCreatePortalSessionType { - public static final FlowActionStripeCreatePortalSessionType STRIPE = - new FlowActionStripeCreatePortalSessionType(Value.STRIPE, "STRIPE"); - - private final Value value; - - private final String string; - - FlowActionStripeCreatePortalSessionType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionStripeCreatePortalSessionType - && this.string.equals(((FlowActionStripeCreatePortalSessionType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case STRIPE: - return visitor.visitStripe(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionStripeCreatePortalSessionType valueOf(String value) { - switch (value) { - case "STRIPE": - return STRIPE; - default: - return new FlowActionStripeCreatePortalSessionType(Value.UNKNOWN, value); - } - } - - public enum Value { - STRIPE, - - UNKNOWN - } - - public interface Visitor { - T visitStripe(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeDeleteTaxId.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeDeleteTaxId.java deleted file mode 100644 index f15b38b32..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeDeleteTaxId.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionStripeDeleteTaxId.Builder.class) -public final class FlowActionStripeDeleteTaxId { - private final String id; - - private final Optional alias; - - private final FlowActionStripeDeleteTaxIdType type; - - private final FlowActionStripeDeleteTaxIdAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionStripeDeleteTaxIdParams params; - - private final Map additionalProperties; - - private FlowActionStripeDeleteTaxId( - String id, - Optional alias, - FlowActionStripeDeleteTaxIdType type, - FlowActionStripeDeleteTaxIdAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionStripeDeleteTaxIdParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionStripeDeleteTaxIdType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionStripeDeleteTaxIdAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionStripeDeleteTaxIdParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionStripeDeleteTaxId && equalTo((FlowActionStripeDeleteTaxId) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionStripeDeleteTaxId other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionStripeDeleteTaxId other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionStripeDeleteTaxIdType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionStripeDeleteTaxIdAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionStripeDeleteTaxIdParams params); - } - - public interface _FinalStage { - FlowActionStripeDeleteTaxId build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionStripeDeleteTaxIdType type; - - private FlowActionStripeDeleteTaxIdAction action; - - private FlowActionStripeDeleteTaxIdParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionStripeDeleteTaxId other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionStripeDeleteTaxIdType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionStripeDeleteTaxIdAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionStripeDeleteTaxIdParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionStripeDeleteTaxId build() { - return new FlowActionStripeDeleteTaxId( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeDeleteTaxIdAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeDeleteTaxIdAction.java deleted file mode 100644 index e921ee8bb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeDeleteTaxIdAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionStripeDeleteTaxIdAction { - public static final FlowActionStripeDeleteTaxIdAction DELETE_TAX_ID = - new FlowActionStripeDeleteTaxIdAction(Value.DELETE_TAX_ID, "DELETE_TAX_ID"); - - private final Value value; - - private final String string; - - FlowActionStripeDeleteTaxIdAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionStripeDeleteTaxIdAction - && this.string.equals(((FlowActionStripeDeleteTaxIdAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DELETE_TAX_ID: - return visitor.visitDeleteTaxId(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionStripeDeleteTaxIdAction valueOf(String value) { - switch (value) { - case "DELETE_TAX_ID": - return DELETE_TAX_ID; - default: - return new FlowActionStripeDeleteTaxIdAction(Value.UNKNOWN, value); - } - } - - public enum Value { - DELETE_TAX_ID, - - UNKNOWN - } - - public interface Visitor { - T visitDeleteTaxId(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeDeleteTaxIdParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeDeleteTaxIdParams.java deleted file mode 100644 index f180442cf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeDeleteTaxIdParams.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionStripeDeleteTaxIdParams.Builder.class) -public final class FlowActionStripeDeleteTaxIdParams { - private final String connectionId; - - private final String customerId; - - private final String id; - - private final Map additionalProperties; - - private FlowActionStripeDeleteTaxIdParams( - String connectionId, String customerId, String id, Map additionalProperties) { - this.connectionId = connectionId; - this.customerId = customerId; - this.id = id; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("customer_id") - public String getCustomerId() { - return customerId; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionStripeDeleteTaxIdParams && equalTo((FlowActionStripeDeleteTaxIdParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionStripeDeleteTaxIdParams other) { - return connectionId.equals(other.connectionId) && customerId.equals(other.customerId) && id.equals(other.id); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.customerId, this.id); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - CustomerIdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionStripeDeleteTaxIdParams other); - } - - public interface CustomerIdStage { - IdStage customerId(@NotNull String customerId); - } - - public interface IdStage { - _FinalStage id(@NotNull String id); - } - - public interface _FinalStage { - FlowActionStripeDeleteTaxIdParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, CustomerIdStage, IdStage, _FinalStage { - private String connectionId; - - private String customerId; - - private String id; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionStripeDeleteTaxIdParams other) { - connectionId(other.getConnectionId()); - customerId(other.getCustomerId()); - id(other.getId()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public CustomerIdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("customer_id") - public IdStage customerId(@NotNull String customerId) { - this.customerId = Objects.requireNonNull(customerId, "customerId must not be null"); - return this; - } - - @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 FlowActionStripeDeleteTaxIdParams build() { - return new FlowActionStripeDeleteTaxIdParams(connectionId, customerId, id, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeDeleteTaxIdType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeDeleteTaxIdType.java deleted file mode 100644 index d09e138df..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeDeleteTaxIdType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionStripeDeleteTaxIdType { - public static final FlowActionStripeDeleteTaxIdType STRIPE = - new FlowActionStripeDeleteTaxIdType(Value.STRIPE, "STRIPE"); - - private final Value value; - - private final String string; - - FlowActionStripeDeleteTaxIdType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionStripeDeleteTaxIdType - && this.string.equals(((FlowActionStripeDeleteTaxIdType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case STRIPE: - return visitor.visitStripe(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionStripeDeleteTaxIdType valueOf(String value) { - switch (value) { - case "STRIPE": - return STRIPE; - default: - return new FlowActionStripeDeleteTaxIdType(Value.UNKNOWN, value); - } - } - - public enum Value { - STRIPE, - - UNKNOWN - } - - public interface Visitor { - T visitStripe(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeFindCustomers.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeFindCustomers.java deleted file mode 100644 index f7042b976..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeFindCustomers.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionStripeFindCustomers.Builder.class) -public final class FlowActionStripeFindCustomers { - private final String id; - - private final Optional alias; - - private final FlowActionStripeFindCustomersType type; - - private final FlowActionStripeFindCustomersAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionStripeFindCustomersParams params; - - private final Map additionalProperties; - - private FlowActionStripeFindCustomers( - String id, - Optional alias, - FlowActionStripeFindCustomersType type, - FlowActionStripeFindCustomersAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionStripeFindCustomersParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionStripeFindCustomersType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionStripeFindCustomersAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionStripeFindCustomersParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionStripeFindCustomers && equalTo((FlowActionStripeFindCustomers) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionStripeFindCustomers other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionStripeFindCustomers other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionStripeFindCustomersType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionStripeFindCustomersAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionStripeFindCustomersParams params); - } - - public interface _FinalStage { - FlowActionStripeFindCustomers build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionStripeFindCustomersType type; - - private FlowActionStripeFindCustomersAction action; - - private FlowActionStripeFindCustomersParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionStripeFindCustomers other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionStripeFindCustomersType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionStripeFindCustomersAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionStripeFindCustomersParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionStripeFindCustomers build() { - return new FlowActionStripeFindCustomers( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeFindCustomersAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeFindCustomersAction.java deleted file mode 100644 index aefa9029a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeFindCustomersAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionStripeFindCustomersAction { - public static final FlowActionStripeFindCustomersAction FIND_CUSTOMERS = - new FlowActionStripeFindCustomersAction(Value.FIND_CUSTOMERS, "FIND_CUSTOMERS"); - - private final Value value; - - private final String string; - - FlowActionStripeFindCustomersAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionStripeFindCustomersAction - && this.string.equals(((FlowActionStripeFindCustomersAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FIND_CUSTOMERS: - return visitor.visitFindCustomers(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionStripeFindCustomersAction valueOf(String value) { - switch (value) { - case "FIND_CUSTOMERS": - return FIND_CUSTOMERS; - default: - return new FlowActionStripeFindCustomersAction(Value.UNKNOWN, value); - } - } - - public enum Value { - FIND_CUSTOMERS, - - UNKNOWN - } - - public interface Visitor { - T visitFindCustomers(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeFindCustomersParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeFindCustomersParams.java deleted file mode 100644 index 3d72d5a63..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeFindCustomersParams.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionStripeFindCustomersParams.Builder.class) -public final class FlowActionStripeFindCustomersParams { - private final String connectionId; - - private final String email; - - private final Map additionalProperties; - - private FlowActionStripeFindCustomersParams( - String connectionId, String email, Map additionalProperties) { - this.connectionId = connectionId; - this.email = email; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("email") - public String getEmail() { - return email; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionStripeFindCustomersParams - && equalTo((FlowActionStripeFindCustomersParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionStripeFindCustomersParams other) { - return connectionId.equals(other.connectionId) && email.equals(other.email); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.email); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - EmailStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionStripeFindCustomersParams other); - } - - public interface EmailStage { - _FinalStage email(@NotNull String email); - } - - public interface _FinalStage { - FlowActionStripeFindCustomersParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, EmailStage, _FinalStage { - private String connectionId; - - private String email; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionStripeFindCustomersParams other) { - connectionId(other.getConnectionId()); - email(other.getEmail()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public EmailStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("email") - public _FinalStage email(@NotNull String email) { - this.email = Objects.requireNonNull(email, "email must not be null"); - return this; - } - - @java.lang.Override - public FlowActionStripeFindCustomersParams build() { - return new FlowActionStripeFindCustomersParams(connectionId, email, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeFindCustomersType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeFindCustomersType.java deleted file mode 100644 index f2adce753..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeFindCustomersType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionStripeFindCustomersType { - public static final FlowActionStripeFindCustomersType STRIPE = - new FlowActionStripeFindCustomersType(Value.STRIPE, "STRIPE"); - - private final Value value; - - private final String string; - - FlowActionStripeFindCustomersType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionStripeFindCustomersType - && this.string.equals(((FlowActionStripeFindCustomersType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case STRIPE: - return visitor.visitStripe(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionStripeFindCustomersType valueOf(String value) { - switch (value) { - case "STRIPE": - return STRIPE; - default: - return new FlowActionStripeFindCustomersType(Value.UNKNOWN, value); - } - } - - public enum Value { - STRIPE, - - UNKNOWN - } - - public interface Visitor { - T visitStripe(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeGetCustomer.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeGetCustomer.java deleted file mode 100644 index c098931fd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeGetCustomer.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionStripeGetCustomer.Builder.class) -public final class FlowActionStripeGetCustomer { - private final String id; - - private final Optional alias; - - private final FlowActionStripeGetCustomerType type; - - private final FlowActionStripeGetCustomerAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionStripeGetCustomerParams params; - - private final Map additionalProperties; - - private FlowActionStripeGetCustomer( - String id, - Optional alias, - FlowActionStripeGetCustomerType type, - FlowActionStripeGetCustomerAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionStripeGetCustomerParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionStripeGetCustomerType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionStripeGetCustomerAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionStripeGetCustomerParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionStripeGetCustomer && equalTo((FlowActionStripeGetCustomer) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionStripeGetCustomer other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionStripeGetCustomer other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionStripeGetCustomerType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionStripeGetCustomerAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionStripeGetCustomerParams params); - } - - public interface _FinalStage { - FlowActionStripeGetCustomer build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionStripeGetCustomerType type; - - private FlowActionStripeGetCustomerAction action; - - private FlowActionStripeGetCustomerParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionStripeGetCustomer other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionStripeGetCustomerType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionStripeGetCustomerAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionStripeGetCustomerParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionStripeGetCustomer build() { - return new FlowActionStripeGetCustomer( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeGetCustomerAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeGetCustomerAction.java deleted file mode 100644 index e7bebf1dc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeGetCustomerAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionStripeGetCustomerAction { - public static final FlowActionStripeGetCustomerAction GET_CUSTOMER = - new FlowActionStripeGetCustomerAction(Value.GET_CUSTOMER, "GET_CUSTOMER"); - - private final Value value; - - private final String string; - - FlowActionStripeGetCustomerAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionStripeGetCustomerAction - && this.string.equals(((FlowActionStripeGetCustomerAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GET_CUSTOMER: - return visitor.visitGetCustomer(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionStripeGetCustomerAction valueOf(String value) { - switch (value) { - case "GET_CUSTOMER": - return GET_CUSTOMER; - default: - return new FlowActionStripeGetCustomerAction(Value.UNKNOWN, value); - } - } - - public enum Value { - GET_CUSTOMER, - - UNKNOWN - } - - public interface Visitor { - T visitGetCustomer(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeGetCustomerParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeGetCustomerParams.java deleted file mode 100644 index 0964cf72c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeGetCustomerParams.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionStripeGetCustomerParams.Builder.class) -public final class FlowActionStripeGetCustomerParams { - private final String connectionId; - - private final String id; - - private final Map additionalProperties; - - private FlowActionStripeGetCustomerParams( - String connectionId, String id, Map additionalProperties) { - this.connectionId = connectionId; - this.id = id; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionStripeGetCustomerParams && equalTo((FlowActionStripeGetCustomerParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionStripeGetCustomerParams other) { - return connectionId.equals(other.connectionId) && id.equals(other.id); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.id); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - IdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionStripeGetCustomerParams other); - } - - public interface IdStage { - _FinalStage id(@NotNull String id); - } - - public interface _FinalStage { - FlowActionStripeGetCustomerParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, IdStage, _FinalStage { - private String connectionId; - - private String id; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionStripeGetCustomerParams other) { - connectionId(other.getConnectionId()); - id(other.getId()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public IdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @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 FlowActionStripeGetCustomerParams build() { - return new FlowActionStripeGetCustomerParams(connectionId, id, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeGetCustomerType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeGetCustomerType.java deleted file mode 100644 index e15493f35..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeGetCustomerType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionStripeGetCustomerType { - public static final FlowActionStripeGetCustomerType STRIPE = - new FlowActionStripeGetCustomerType(Value.STRIPE, "STRIPE"); - - private final Value value; - - private final String string; - - FlowActionStripeGetCustomerType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionStripeGetCustomerType - && this.string.equals(((FlowActionStripeGetCustomerType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case STRIPE: - return visitor.visitStripe(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionStripeGetCustomerType valueOf(String value) { - switch (value) { - case "STRIPE": - return STRIPE; - default: - return new FlowActionStripeGetCustomerType(Value.UNKNOWN, value); - } - } - - public enum Value { - STRIPE, - - UNKNOWN - } - - public interface Visitor { - T visitStripe(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeTaxId.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeTaxId.java deleted file mode 100644 index 195ec6824..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeTaxId.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionStripeTaxId.Builder.class) -public final class FlowActionStripeTaxId { - private final String type; - - private final String value; - - private final Map additionalProperties; - - private FlowActionStripeTaxId(String type, String value, Map additionalProperties) { - this.type = type; - this.value = value; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public String getType() { - return type; - } - - @JsonProperty("value") - public String getValue() { - return value; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionStripeTaxId && equalTo((FlowActionStripeTaxId) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionStripeTaxId 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 ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - ValueStage type(@NotNull String type); - - Builder from(FlowActionStripeTaxId other); - } - - public interface ValueStage { - _FinalStage value(@NotNull String value); - } - - public interface _FinalStage { - FlowActionStripeTaxId build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, ValueStage, _FinalStage { - private String type; - - private String value; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionStripeTaxId other) { - type(other.getType()); - value(other.getValue()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ValueStage type(@NotNull String type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @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 FlowActionStripeTaxId build() { - return new FlowActionStripeTaxId(type, value, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeUpdateCustomer.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeUpdateCustomer.java deleted file mode 100644 index e9c46e575..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeUpdateCustomer.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionStripeUpdateCustomer.Builder.class) -public final class FlowActionStripeUpdateCustomer { - private final String id; - - private final Optional alias; - - private final FlowActionStripeUpdateCustomerType type; - - private final FlowActionStripeUpdateCustomerAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionStripeUpdateCustomerParams params; - - private final Map additionalProperties; - - private FlowActionStripeUpdateCustomer( - String id, - Optional alias, - FlowActionStripeUpdateCustomerType type, - FlowActionStripeUpdateCustomerAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionStripeUpdateCustomerParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionStripeUpdateCustomerType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionStripeUpdateCustomerAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionStripeUpdateCustomerParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionStripeUpdateCustomer && equalTo((FlowActionStripeUpdateCustomer) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionStripeUpdateCustomer other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionStripeUpdateCustomer other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionStripeUpdateCustomerType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionStripeUpdateCustomerAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionStripeUpdateCustomerParams params); - } - - public interface _FinalStage { - FlowActionStripeUpdateCustomer build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionStripeUpdateCustomerType type; - - private FlowActionStripeUpdateCustomerAction action; - - private FlowActionStripeUpdateCustomerParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionStripeUpdateCustomer other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionStripeUpdateCustomerType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionStripeUpdateCustomerAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionStripeUpdateCustomerParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionStripeUpdateCustomer build() { - return new FlowActionStripeUpdateCustomer( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeUpdateCustomerAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeUpdateCustomerAction.java deleted file mode 100644 index c0b4a9bc3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeUpdateCustomerAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionStripeUpdateCustomerAction { - public static final FlowActionStripeUpdateCustomerAction UPDATE_CUSTOMER = - new FlowActionStripeUpdateCustomerAction(Value.UPDATE_CUSTOMER, "UPDATE_CUSTOMER"); - - private final Value value; - - private final String string; - - FlowActionStripeUpdateCustomerAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionStripeUpdateCustomerAction - && this.string.equals(((FlowActionStripeUpdateCustomerAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case UPDATE_CUSTOMER: - return visitor.visitUpdateCustomer(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionStripeUpdateCustomerAction valueOf(String value) { - switch (value) { - case "UPDATE_CUSTOMER": - return UPDATE_CUSTOMER; - default: - return new FlowActionStripeUpdateCustomerAction(Value.UNKNOWN, value); - } - } - - public enum Value { - UPDATE_CUSTOMER, - - UNKNOWN - } - - public interface Visitor { - T visitUpdateCustomer(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeUpdateCustomerParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeUpdateCustomerParams.java deleted file mode 100644 index 8e48c2502..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeUpdateCustomerParams.java +++ /dev/null @@ -1,360 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionStripeUpdateCustomerParams.Builder.class) -public final class FlowActionStripeUpdateCustomerParams { - private final String connectionId; - - private final String id; - - private final Optional name; - - private final Optional description; - - private final Optional email; - - private final Optional phone; - - private final Optional taxExempt; - - private final Optional address; - - private final Optional> metadata; - - private final Map additionalProperties; - - private FlowActionStripeUpdateCustomerParams( - String connectionId, - String id, - Optional name, - Optional description, - Optional email, - Optional phone, - Optional taxExempt, - Optional address, - Optional> metadata, - Map additionalProperties) { - this.connectionId = connectionId; - this.id = id; - this.name = name; - this.description = description; - this.email = email; - this.phone = phone; - this.taxExempt = taxExempt; - this.address = address; - this.metadata = metadata; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - @JsonProperty("phone") - public Optional getPhone() { - return phone; - } - - @JsonProperty("tax_exempt") - public Optional getTaxExempt() { - return taxExempt; - } - - @JsonProperty("address") - public Optional getAddress() { - return address; - } - - @JsonProperty("metadata") - public Optional> getMetadata() { - return metadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionStripeUpdateCustomerParams - && equalTo((FlowActionStripeUpdateCustomerParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionStripeUpdateCustomerParams other) { - return connectionId.equals(other.connectionId) - && id.equals(other.id) - && name.equals(other.name) - && description.equals(other.description) - && email.equals(other.email) - && phone.equals(other.phone) - && taxExempt.equals(other.taxExempt) - && address.equals(other.address) - && metadata.equals(other.metadata); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.id, - this.name, - this.description, - this.email, - this.phone, - this.taxExempt, - this.address, - this.metadata); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - IdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionStripeUpdateCustomerParams other); - } - - public interface IdStage { - _FinalStage id(@NotNull String id); - } - - public interface _FinalStage { - FlowActionStripeUpdateCustomerParams build(); - - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage description(Optional description); - - _FinalStage description(String description); - - _FinalStage email(Optional email); - - _FinalStage email(String email); - - _FinalStage phone(Optional phone); - - _FinalStage phone(String phone); - - _FinalStage taxExempt(Optional taxExempt); - - _FinalStage taxExempt(String taxExempt); - - _FinalStage address(Optional address); - - _FinalStage address(FlowActionStripeAddress address); - - _FinalStage metadata(Optional> metadata); - - _FinalStage metadata(Map metadata); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, IdStage, _FinalStage { - private String connectionId; - - private String id; - - private Optional> metadata = Optional.empty(); - - private Optional address = Optional.empty(); - - private Optional taxExempt = Optional.empty(); - - private Optional phone = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional description = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionStripeUpdateCustomerParams other) { - connectionId(other.getConnectionId()); - id(other.getId()); - name(other.getName()); - description(other.getDescription()); - email(other.getEmail()); - phone(other.getPhone()); - taxExempt(other.getTaxExempt()); - address(other.getAddress()); - metadata(other.getMetadata()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public IdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @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; - } - - @java.lang.Override - public _FinalStage address(FlowActionStripeAddress address) { - this.address = Optional.ofNullable(address); - return this; - } - - @java.lang.Override - @JsonSetter(value = "address", nulls = Nulls.SKIP) - public _FinalStage address(Optional address) { - this.address = address; - return this; - } - - @java.lang.Override - public _FinalStage taxExempt(String taxExempt) { - this.taxExempt = Optional.ofNullable(taxExempt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "tax_exempt", nulls = Nulls.SKIP) - public _FinalStage taxExempt(Optional taxExempt) { - this.taxExempt = taxExempt; - return this; - } - - @java.lang.Override - public _FinalStage phone(String phone) { - this.phone = Optional.ofNullable(phone); - return this; - } - - @java.lang.Override - @JsonSetter(value = "phone", nulls = Nulls.SKIP) - public _FinalStage phone(Optional phone) { - this.phone = phone; - return this; - } - - @java.lang.Override - public _FinalStage email(String email) { - this.email = Optional.ofNullable(email); - return this; - } - - @java.lang.Override - @JsonSetter(value = "email", nulls = Nulls.SKIP) - public _FinalStage email(Optional email) { - this.email = email; - 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 _FinalStage name(String name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public FlowActionStripeUpdateCustomerParams build() { - return new FlowActionStripeUpdateCustomerParams( - connectionId, - id, - name, - description, - email, - phone, - taxExempt, - address, - metadata, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeUpdateCustomerType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeUpdateCustomerType.java deleted file mode 100644 index 5cc5c471b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionStripeUpdateCustomerType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionStripeUpdateCustomerType { - public static final FlowActionStripeUpdateCustomerType STRIPE = - new FlowActionStripeUpdateCustomerType(Value.STRIPE, "STRIPE"); - - private final Value value; - - private final String string; - - FlowActionStripeUpdateCustomerType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionStripeUpdateCustomerType - && this.string.equals(((FlowActionStripeUpdateCustomerType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case STRIPE: - return visitor.visitStripe(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionStripeUpdateCustomerType valueOf(String value) { - switch (value) { - case "STRIPE": - return STRIPE; - default: - return new FlowActionStripeUpdateCustomerType(Value.UNKNOWN, value); - } - } - - public enum Value { - STRIPE, - - UNKNOWN - } - - public interface Visitor { - T visitStripe(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionTelegramSendMessage.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionTelegramSendMessage.java deleted file mode 100644 index 830f7a3a0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionTelegramSendMessage.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionTelegramSendMessage.Builder.class) -public final class FlowActionTelegramSendMessage { - private final String id; - - private final Optional alias; - - private final FlowActionTelegramSendMessageType type; - - private final FlowActionTelegramSendMessageAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionTelegramSendMessageParams params; - - private final Map additionalProperties; - - private FlowActionTelegramSendMessage( - String id, - Optional alias, - FlowActionTelegramSendMessageType type, - FlowActionTelegramSendMessageAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionTelegramSendMessageParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionTelegramSendMessageType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionTelegramSendMessageAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionTelegramSendMessageParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionTelegramSendMessage && equalTo((FlowActionTelegramSendMessage) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionTelegramSendMessage other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionTelegramSendMessage other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionTelegramSendMessageType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionTelegramSendMessageAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionTelegramSendMessageParams params); - } - - public interface _FinalStage { - FlowActionTelegramSendMessage build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionTelegramSendMessageType type; - - private FlowActionTelegramSendMessageAction action; - - private FlowActionTelegramSendMessageParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionTelegramSendMessage other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionTelegramSendMessageType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionTelegramSendMessageAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionTelegramSendMessageParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionTelegramSendMessage build() { - return new FlowActionTelegramSendMessage( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionTelegramSendMessageAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionTelegramSendMessageAction.java deleted file mode 100644 index de664da29..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionTelegramSendMessageAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionTelegramSendMessageAction { - public static final FlowActionTelegramSendMessageAction SEND_MESSAGE = - new FlowActionTelegramSendMessageAction(Value.SEND_MESSAGE, "SEND_MESSAGE"); - - private final Value value; - - private final String string; - - FlowActionTelegramSendMessageAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionTelegramSendMessageAction - && this.string.equals(((FlowActionTelegramSendMessageAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SEND_MESSAGE: - return visitor.visitSendMessage(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionTelegramSendMessageAction valueOf(String value) { - switch (value) { - case "SEND_MESSAGE": - return SEND_MESSAGE; - default: - return new FlowActionTelegramSendMessageAction(Value.UNKNOWN, value); - } - } - - public enum Value { - SEND_MESSAGE, - - UNKNOWN - } - - public interface Visitor { - T visitSendMessage(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionTelegramSendMessageParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionTelegramSendMessageParams.java deleted file mode 100644 index d33f13ad6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionTelegramSendMessageParams.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionTelegramSendMessageParams.Builder.class) -public final class FlowActionTelegramSendMessageParams { - private final String connectionId; - - private final String chatId; - - private final String text; - - private final Map additionalProperties; - - private FlowActionTelegramSendMessageParams( - String connectionId, String chatId, String text, Map additionalProperties) { - this.connectionId = connectionId; - this.chatId = chatId; - this.text = text; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("chat_id") - public String getChatId() { - return chatId; - } - - @JsonProperty("text") - public String getText() { - return text; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionTelegramSendMessageParams - && equalTo((FlowActionTelegramSendMessageParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionTelegramSendMessageParams other) { - return connectionId.equals(other.connectionId) && chatId.equals(other.chatId) && text.equals(other.text); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.chatId, this.text); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - ChatIdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionTelegramSendMessageParams other); - } - - public interface ChatIdStage { - TextStage chatId(@NotNull String chatId); - } - - public interface TextStage { - _FinalStage text(@NotNull String text); - } - - public interface _FinalStage { - FlowActionTelegramSendMessageParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, ChatIdStage, TextStage, _FinalStage { - private String connectionId; - - private String chatId; - - private String text; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionTelegramSendMessageParams other) { - connectionId(other.getConnectionId()); - chatId(other.getChatId()); - text(other.getText()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public ChatIdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("chat_id") - public TextStage chatId(@NotNull String chatId) { - this.chatId = Objects.requireNonNull(chatId, "chatId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("text") - public _FinalStage text(@NotNull String text) { - this.text = Objects.requireNonNull(text, "text must not be null"); - return this; - } - - @java.lang.Override - public FlowActionTelegramSendMessageParams build() { - return new FlowActionTelegramSendMessageParams(connectionId, chatId, text, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionTelegramSendMessageType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionTelegramSendMessageType.java deleted file mode 100644 index 7580ad62d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionTelegramSendMessageType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionTelegramSendMessageType { - public static final FlowActionTelegramSendMessageType TELEGRAM = - new FlowActionTelegramSendMessageType(Value.TELEGRAM, "TELEGRAM"); - - private final Value value; - - private final String string; - - FlowActionTelegramSendMessageType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionTelegramSendMessageType - && this.string.equals(((FlowActionTelegramSendMessageType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TELEGRAM: - return visitor.visitTelegram(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionTelegramSendMessageType valueOf(String value) { - switch (value) { - case "TELEGRAM": - return TELEGRAM; - default: - return new FlowActionTelegramSendMessageType(Value.UNKNOWN, value); - } - } - - public enum Value { - TELEGRAM, - - UNKNOWN - } - - public interface Visitor { - T visitTelegram(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilio.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilio.java deleted file mode 100644 index 7f91ca908..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilio.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionTwilio.Deserializer.class) -public final class FlowActionTwilio { - private final Object value; - - private final int type; - - private FlowActionTwilio(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((FlowActionTwilioMakeCall) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowActionTwilioSendSms) 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 FlowActionTwilio && equalTo((FlowActionTwilio) other); - } - - private boolean equalTo(FlowActionTwilio 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 FlowActionTwilio of(FlowActionTwilioMakeCall value) { - return new FlowActionTwilio(value, 0); - } - - public static FlowActionTwilio of(FlowActionTwilioSendSms value) { - return new FlowActionTwilio(value, 1); - } - - public interface Visitor { - T visit(FlowActionTwilioMakeCall value); - - T visit(FlowActionTwilioSendSms value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionTwilio.class); - } - - @java.lang.Override - public FlowActionTwilio deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionTwilioMakeCall.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionTwilioSendSms.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioMakeCall.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioMakeCall.java deleted file mode 100644 index 207c11380..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioMakeCall.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionTwilioMakeCall.Builder.class) -public final class FlowActionTwilioMakeCall { - private final String id; - - private final Optional alias; - - private final FlowActionTwilioMakeCallType type; - - private final FlowActionTwilioMakeCallAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionTwilioMakeCallParams params; - - private final Map additionalProperties; - - private FlowActionTwilioMakeCall( - String id, - Optional alias, - FlowActionTwilioMakeCallType type, - FlowActionTwilioMakeCallAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionTwilioMakeCallParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionTwilioMakeCallType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionTwilioMakeCallAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionTwilioMakeCallParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionTwilioMakeCall && equalTo((FlowActionTwilioMakeCall) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionTwilioMakeCall other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionTwilioMakeCall other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionTwilioMakeCallType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionTwilioMakeCallAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionTwilioMakeCallParams params); - } - - public interface _FinalStage { - FlowActionTwilioMakeCall build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionTwilioMakeCallType type; - - private FlowActionTwilioMakeCallAction action; - - private FlowActionTwilioMakeCallParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionTwilioMakeCall other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionTwilioMakeCallType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionTwilioMakeCallAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionTwilioMakeCallParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionTwilioMakeCall build() { - return new FlowActionTwilioMakeCall( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioMakeCallAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioMakeCallAction.java deleted file mode 100644 index 7ddd31f91..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioMakeCallAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionTwilioMakeCallAction { - public static final FlowActionTwilioMakeCallAction MAKE_CALL = - new FlowActionTwilioMakeCallAction(Value.MAKE_CALL, "MAKE_CALL"); - - private final Value value; - - private final String string; - - FlowActionTwilioMakeCallAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionTwilioMakeCallAction - && this.string.equals(((FlowActionTwilioMakeCallAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MAKE_CALL: - return visitor.visitMakeCall(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionTwilioMakeCallAction valueOf(String value) { - switch (value) { - case "MAKE_CALL": - return MAKE_CALL; - default: - return new FlowActionTwilioMakeCallAction(Value.UNKNOWN, value); - } - } - - public enum Value { - MAKE_CALL, - - UNKNOWN - } - - public interface Visitor { - T visitMakeCall(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioMakeCallParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioMakeCallParams.java deleted file mode 100644 index 8d4aa1b6c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioMakeCallParams.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionTwilioMakeCallParams.Builder.class) -public final class FlowActionTwilioMakeCallParams { - private final String connectionId; - - private final String from; - - private final String to; - - private final String payload; - - private final Map additionalProperties; - - private FlowActionTwilioMakeCallParams( - String connectionId, String from, String to, String payload, Map additionalProperties) { - this.connectionId = connectionId; - this.from = from; - this.to = to; - this.payload = payload; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("from") - public String getFrom() { - return from; - } - - @JsonProperty("to") - public String getTo() { - return to; - } - - @JsonProperty("payload") - public String getPayload() { - return payload; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionTwilioMakeCallParams && equalTo((FlowActionTwilioMakeCallParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionTwilioMakeCallParams other) { - return connectionId.equals(other.connectionId) - && from.equals(other.from) - && to.equals(other.to) - && payload.equals(other.payload); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.from, this.to, this.payload); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - FromStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionTwilioMakeCallParams other); - } - - public interface FromStage { - ToStage from(@NotNull String from); - } - - public interface ToStage { - PayloadStage to(@NotNull String to); - } - - public interface PayloadStage { - _FinalStage payload(@NotNull String payload); - } - - public interface _FinalStage { - FlowActionTwilioMakeCallParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, FromStage, ToStage, PayloadStage, _FinalStage { - private String connectionId; - - private String from; - - private String to; - - private String payload; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionTwilioMakeCallParams other) { - connectionId(other.getConnectionId()); - from(other.getFrom()); - to(other.getTo()); - payload(other.getPayload()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public FromStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("from") - public ToStage from(@NotNull String from) { - this.from = Objects.requireNonNull(from, "from must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("to") - public PayloadStage to(@NotNull String to) { - this.to = Objects.requireNonNull(to, "to must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("payload") - public _FinalStage payload(@NotNull String payload) { - this.payload = Objects.requireNonNull(payload, "payload must not be null"); - return this; - } - - @java.lang.Override - public FlowActionTwilioMakeCallParams build() { - return new FlowActionTwilioMakeCallParams(connectionId, from, to, payload, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioMakeCallType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioMakeCallType.java deleted file mode 100644 index 87e447994..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioMakeCallType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionTwilioMakeCallType { - public static final FlowActionTwilioMakeCallType TWILIO = new FlowActionTwilioMakeCallType(Value.TWILIO, "TWILIO"); - - private final Value value; - - private final String string; - - FlowActionTwilioMakeCallType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionTwilioMakeCallType - && this.string.equals(((FlowActionTwilioMakeCallType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TWILIO: - return visitor.visitTwilio(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionTwilioMakeCallType valueOf(String value) { - switch (value) { - case "TWILIO": - return TWILIO; - default: - return new FlowActionTwilioMakeCallType(Value.UNKNOWN, value); - } - } - - public enum Value { - TWILIO, - - UNKNOWN - } - - public interface Visitor { - T visitTwilio(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioSendSms.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioSendSms.java deleted file mode 100644 index 41f18328d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioSendSms.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionTwilioSendSms.Builder.class) -public final class FlowActionTwilioSendSms { - private final String id; - - private final Optional alias; - - private final FlowActionTwilioSendSmsType type; - - private final FlowActionTwilioSendSmsAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionTwilioSendSmsParams params; - - private final Map additionalProperties; - - private FlowActionTwilioSendSms( - String id, - Optional alias, - FlowActionTwilioSendSmsType type, - FlowActionTwilioSendSmsAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionTwilioSendSmsParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionTwilioSendSmsType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionTwilioSendSmsAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionTwilioSendSmsParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionTwilioSendSms && equalTo((FlowActionTwilioSendSms) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionTwilioSendSms other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionTwilioSendSms other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionTwilioSendSmsType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionTwilioSendSmsAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionTwilioSendSmsParams params); - } - - public interface _FinalStage { - FlowActionTwilioSendSms build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionTwilioSendSmsType type; - - private FlowActionTwilioSendSmsAction action; - - private FlowActionTwilioSendSmsParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionTwilioSendSms other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionTwilioSendSmsType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionTwilioSendSmsAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionTwilioSendSmsParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionTwilioSendSms build() { - return new FlowActionTwilioSendSms( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioSendSmsAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioSendSmsAction.java deleted file mode 100644 index 8c91632ba..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioSendSmsAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionTwilioSendSmsAction { - public static final FlowActionTwilioSendSmsAction SEND_SMS = - new FlowActionTwilioSendSmsAction(Value.SEND_SMS, "SEND_SMS"); - - private final Value value; - - private final String string; - - FlowActionTwilioSendSmsAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionTwilioSendSmsAction - && this.string.equals(((FlowActionTwilioSendSmsAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SEND_SMS: - return visitor.visitSendSms(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionTwilioSendSmsAction valueOf(String value) { - switch (value) { - case "SEND_SMS": - return SEND_SMS; - default: - return new FlowActionTwilioSendSmsAction(Value.UNKNOWN, value); - } - } - - public enum Value { - SEND_SMS, - - UNKNOWN - } - - public interface Visitor { - T visitSendSms(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioSendSmsParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioSendSmsParams.java deleted file mode 100644 index 0cce55f3c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioSendSmsParams.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionTwilioSendSmsParams.Builder.class) -public final class FlowActionTwilioSendSmsParams { - private final String connectionId; - - private final String from; - - private final String to; - - private final String message; - - private final Map additionalProperties; - - private FlowActionTwilioSendSmsParams( - String connectionId, String from, String to, String message, Map additionalProperties) { - this.connectionId = connectionId; - this.from = from; - this.to = to; - this.message = message; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("from") - public String getFrom() { - return from; - } - - @JsonProperty("to") - public String getTo() { - return to; - } - - @JsonProperty("message") - public String getMessage() { - return message; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionTwilioSendSmsParams && equalTo((FlowActionTwilioSendSmsParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionTwilioSendSmsParams other) { - return connectionId.equals(other.connectionId) - && from.equals(other.from) - && to.equals(other.to) - && message.equals(other.message); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.from, this.to, this.message); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - FromStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionTwilioSendSmsParams other); - } - - public interface FromStage { - ToStage from(@NotNull String from); - } - - public interface ToStage { - MessageStage to(@NotNull String to); - } - - public interface MessageStage { - _FinalStage message(@NotNull String message); - } - - public interface _FinalStage { - FlowActionTwilioSendSmsParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, FromStage, ToStage, MessageStage, _FinalStage { - private String connectionId; - - private String from; - - private String to; - - private String message; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionTwilioSendSmsParams other) { - connectionId(other.getConnectionId()); - from(other.getFrom()); - to(other.getTo()); - message(other.getMessage()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public FromStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("from") - public ToStage from(@NotNull String from) { - this.from = Objects.requireNonNull(from, "from must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("to") - public MessageStage to(@NotNull String to) { - this.to = Objects.requireNonNull(to, "to must not be null"); - return this; - } - - @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 FlowActionTwilioSendSmsParams build() { - return new FlowActionTwilioSendSmsParams(connectionId, from, to, message, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioSendSmsType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioSendSmsType.java deleted file mode 100644 index 3f50758ed..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionTwilioSendSmsType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionTwilioSendSmsType { - public static final FlowActionTwilioSendSmsType TWILIO = new FlowActionTwilioSendSmsType(Value.TWILIO, "TWILIO"); - - private final Value value; - - private final String string; - - FlowActionTwilioSendSmsType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionTwilioSendSmsType - && this.string.equals(((FlowActionTwilioSendSmsType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TWILIO: - return visitor.visitTwilio(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionTwilioSendSmsType valueOf(String value) { - switch (value) { - case "TWILIO": - return TWILIO; - default: - return new FlowActionTwilioSendSmsType(Value.UNKNOWN, value); - } - } - - public enum Value { - TWILIO, - - UNKNOWN - } - - public interface Visitor { - T visitTwilio(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessage.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessage.java deleted file mode 100644 index e421ed462..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessage.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionWhatsappSendMessage.Builder.class) -public final class FlowActionWhatsappSendMessage { - private final String id; - - private final Optional alias; - - private final FlowActionWhatsappSendMessageType type; - - private final FlowActionWhatsappSendMessageAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionWhatsappSendMessageParams params; - - private final Map additionalProperties; - - private FlowActionWhatsappSendMessage( - String id, - Optional alias, - FlowActionWhatsappSendMessageType type, - FlowActionWhatsappSendMessageAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionWhatsappSendMessageParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionWhatsappSendMessageType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionWhatsappSendMessageAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionWhatsappSendMessageParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionWhatsappSendMessage && equalTo((FlowActionWhatsappSendMessage) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionWhatsappSendMessage other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionWhatsappSendMessage other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionWhatsappSendMessageType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionWhatsappSendMessageAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionWhatsappSendMessageParams params); - } - - public interface _FinalStage { - FlowActionWhatsappSendMessage build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionWhatsappSendMessageType type; - - private FlowActionWhatsappSendMessageAction action; - - private FlowActionWhatsappSendMessageParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionWhatsappSendMessage other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionWhatsappSendMessageType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionWhatsappSendMessageAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionWhatsappSendMessageParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionWhatsappSendMessage build() { - return new FlowActionWhatsappSendMessage( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageAction.java deleted file mode 100644 index c0688c899..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionWhatsappSendMessageAction { - public static final FlowActionWhatsappSendMessageAction SEND_MESSAGE = - new FlowActionWhatsappSendMessageAction(Value.SEND_MESSAGE, "SEND_MESSAGE"); - - private final Value value; - - private final String string; - - FlowActionWhatsappSendMessageAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionWhatsappSendMessageAction - && this.string.equals(((FlowActionWhatsappSendMessageAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SEND_MESSAGE: - return visitor.visitSendMessage(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionWhatsappSendMessageAction valueOf(String value) { - switch (value) { - case "SEND_MESSAGE": - return SEND_MESSAGE; - default: - return new FlowActionWhatsappSendMessageAction(Value.UNKNOWN, value); - } - } - - public enum Value { - SEND_MESSAGE, - - UNKNOWN - } - - public interface Visitor { - T visitSendMessage(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageParams.java deleted file mode 100644 index 18fd44671..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageParams.java +++ /dev/null @@ -1,203 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionWhatsappSendMessageParams.Builder.class) -public final class FlowActionWhatsappSendMessageParams { - private final String connectionId; - - private final String senderId; - - private final String recipientNumber; - - private final FlowActionWhatsappSendMessageParamsType type; - - private final FlowActionWhatsappSendMessageParamsPayload payload; - - private final Map additionalProperties; - - private FlowActionWhatsappSendMessageParams( - String connectionId, - String senderId, - String recipientNumber, - FlowActionWhatsappSendMessageParamsType type, - FlowActionWhatsappSendMessageParamsPayload payload, - Map additionalProperties) { - this.connectionId = connectionId; - this.senderId = senderId; - this.recipientNumber = recipientNumber; - this.type = type; - this.payload = payload; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("sender_id") - public String getSenderId() { - return senderId; - } - - @JsonProperty("recipient_number") - public String getRecipientNumber() { - return recipientNumber; - } - - @JsonProperty("type") - public FlowActionWhatsappSendMessageParamsType getType() { - return type; - } - - @JsonProperty("payload") - public FlowActionWhatsappSendMessageParamsPayload getPayload() { - return payload; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionWhatsappSendMessageParams - && equalTo((FlowActionWhatsappSendMessageParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionWhatsappSendMessageParams other) { - return connectionId.equals(other.connectionId) - && senderId.equals(other.senderId) - && recipientNumber.equals(other.recipientNumber) - && type.equals(other.type) - && payload.equals(other.payload); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.senderId, this.recipientNumber, this.type, this.payload); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - SenderIdStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionWhatsappSendMessageParams other); - } - - public interface SenderIdStage { - RecipientNumberStage senderId(@NotNull String senderId); - } - - public interface RecipientNumberStage { - TypeStage recipientNumber(@NotNull String recipientNumber); - } - - public interface TypeStage { - PayloadStage type(@NotNull FlowActionWhatsappSendMessageParamsType type); - } - - public interface PayloadStage { - _FinalStage payload(@NotNull FlowActionWhatsappSendMessageParamsPayload payload); - } - - public interface _FinalStage { - FlowActionWhatsappSendMessageParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements ConnectionIdStage, SenderIdStage, RecipientNumberStage, TypeStage, PayloadStage, _FinalStage { - private String connectionId; - - private String senderId; - - private String recipientNumber; - - private FlowActionWhatsappSendMessageParamsType type; - - private FlowActionWhatsappSendMessageParamsPayload payload; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionWhatsappSendMessageParams other) { - connectionId(other.getConnectionId()); - senderId(other.getSenderId()); - recipientNumber(other.getRecipientNumber()); - type(other.getType()); - payload(other.getPayload()); - return this; - } - - @java.lang.Override - @JsonSetter("connection_id") - public SenderIdStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("sender_id") - public RecipientNumberStage senderId(@NotNull String senderId) { - this.senderId = Objects.requireNonNull(senderId, "senderId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("recipient_number") - public TypeStage recipientNumber(@NotNull String recipientNumber) { - this.recipientNumber = Objects.requireNonNull(recipientNumber, "recipientNumber must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public PayloadStage type(@NotNull FlowActionWhatsappSendMessageParamsType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("payload") - public _FinalStage payload(@NotNull FlowActionWhatsappSendMessageParamsPayload payload) { - this.payload = Objects.requireNonNull(payload, "payload must not be null"); - return this; - } - - @java.lang.Override - public FlowActionWhatsappSendMessageParams build() { - return new FlowActionWhatsappSendMessageParams( - connectionId, senderId, recipientNumber, type, payload, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageParamsPayload.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageParamsPayload.java deleted file mode 100644 index ad46169cf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageParamsPayload.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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.Map; -import java.util.Objects; - -@JsonDeserialize(using = FlowActionWhatsappSendMessageParamsPayload.Deserializer.class) -public final class FlowActionWhatsappSendMessageParamsPayload { - private final Object value; - - private final int type; - - private FlowActionWhatsappSendMessageParamsPayload(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((Map) this.value); - } else if (this.type == 1) { - return visitor.visit((String) 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 FlowActionWhatsappSendMessageParamsPayload - && equalTo((FlowActionWhatsappSendMessageParamsPayload) other); - } - - private boolean equalTo(FlowActionWhatsappSendMessageParamsPayload 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 FlowActionWhatsappSendMessageParamsPayload of(Map value) { - return new FlowActionWhatsappSendMessageParamsPayload(value, 0); - } - - public static FlowActionWhatsappSendMessageParamsPayload of(String value) { - return new FlowActionWhatsappSendMessageParamsPayload(value, 1); - } - - public interface Visitor { - T visit(Map value); - - T visit(String value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionWhatsappSendMessageParamsPayload.class); - } - - @java.lang.Override - public FlowActionWhatsappSendMessageParamsPayload 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) { - } - 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/FlowActionWhatsappSendMessageParamsType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageParamsType.java deleted file mode 100644 index 96951c41d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageParamsType.java +++ /dev/null @@ -1,163 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionWhatsappSendMessageParamsType { - public static final FlowActionWhatsappSendMessageParamsType INTERACTIVE = - new FlowActionWhatsappSendMessageParamsType(Value.INTERACTIVE, "INTERACTIVE"); - - public static final FlowActionWhatsappSendMessageParamsType DOCUMENT = - new FlowActionWhatsappSendMessageParamsType(Value.DOCUMENT, "DOCUMENT"); - - public static final FlowActionWhatsappSendMessageParamsType TEMPLATE = - new FlowActionWhatsappSendMessageParamsType(Value.TEMPLATE, "TEMPLATE"); - - public static final FlowActionWhatsappSendMessageParamsType TEXT = - new FlowActionWhatsappSendMessageParamsType(Value.TEXT, "TEXT"); - - public static final FlowActionWhatsappSendMessageParamsType AUDIO = - new FlowActionWhatsappSendMessageParamsType(Value.AUDIO, "AUDIO"); - - public static final FlowActionWhatsappSendMessageParamsType CONTACTS = - new FlowActionWhatsappSendMessageParamsType(Value.CONTACTS, "CONTACTS"); - - public static final FlowActionWhatsappSendMessageParamsType LOCATION = - new FlowActionWhatsappSendMessageParamsType(Value.LOCATION, "LOCATION"); - - public static final FlowActionWhatsappSendMessageParamsType STICKER = - new FlowActionWhatsappSendMessageParamsType(Value.STICKER, "STICKER"); - - public static final FlowActionWhatsappSendMessageParamsType IMAGE = - new FlowActionWhatsappSendMessageParamsType(Value.IMAGE, "IMAGE"); - - private final Value value; - - private final String string; - - FlowActionWhatsappSendMessageParamsType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionWhatsappSendMessageParamsType - && this.string.equals(((FlowActionWhatsappSendMessageParamsType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case INTERACTIVE: - return visitor.visitInteractive(); - case DOCUMENT: - return visitor.visitDocument(); - case TEMPLATE: - return visitor.visitTemplate(); - case TEXT: - return visitor.visitText(); - case AUDIO: - return visitor.visitAudio(); - case CONTACTS: - return visitor.visitContacts(); - case LOCATION: - return visitor.visitLocation(); - case STICKER: - return visitor.visitSticker(); - case IMAGE: - return visitor.visitImage(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionWhatsappSendMessageParamsType valueOf(String value) { - switch (value) { - case "INTERACTIVE": - return INTERACTIVE; - case "DOCUMENT": - return DOCUMENT; - case "TEMPLATE": - return TEMPLATE; - case "TEXT": - return TEXT; - case "AUDIO": - return AUDIO; - case "CONTACTS": - return CONTACTS; - case "LOCATION": - return LOCATION; - case "STICKER": - return STICKER; - case "IMAGE": - return IMAGE; - default: - return new FlowActionWhatsappSendMessageParamsType(Value.UNKNOWN, value); - } - } - - public enum Value { - AUDIO, - - CONTACTS, - - DOCUMENT, - - IMAGE, - - INTERACTIVE, - - LOCATION, - - STICKER, - - TEMPLATE, - - TEXT, - - UNKNOWN - } - - public interface Visitor { - T visitAudio(); - - T visitContacts(); - - T visitDocument(); - - T visitImage(); - - T visitInteractive(); - - T visitLocation(); - - T visitSticker(); - - T visitTemplate(); - - T visitText(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageType.java deleted file mode 100644 index 6d17d7fad..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionWhatsappSendMessageType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionWhatsappSendMessageType { - public static final FlowActionWhatsappSendMessageType WHATSAPP = - new FlowActionWhatsappSendMessageType(Value.WHATSAPP, "WHATSAPP"); - - private final Value value; - - private final String string; - - FlowActionWhatsappSendMessageType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionWhatsappSendMessageType - && this.string.equals(((FlowActionWhatsappSendMessageType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case WHATSAPP: - return visitor.visitWhatsapp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionWhatsappSendMessageType valueOf(String value) { - switch (value) { - case "WHATSAPP": - return WHATSAPP; - default: - return new FlowActionWhatsappSendMessageType(Value.UNKNOWN, value); - } - } - - public enum Value { - WHATSAPP, - - UNKNOWN - } - - public interface Visitor { - T visitWhatsapp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionXml.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionXml.java deleted file mode 100644 index f182e2e9c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionXml.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FlowActionXml.Deserializer.class) -public final class FlowActionXml { - private final Object value; - - private final int type; - - private FlowActionXml(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((FlowActionXmlParseXml) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowActionXmlSerializeXml) 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 FlowActionXml && equalTo((FlowActionXml) other); - } - - private boolean equalTo(FlowActionXml 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 FlowActionXml of(FlowActionXmlParseXml value) { - return new FlowActionXml(value, 0); - } - - public static FlowActionXml of(FlowActionXmlSerializeXml value) { - return new FlowActionXml(value, 1); - } - - public interface Visitor { - T visit(FlowActionXmlParseXml value); - - T visit(FlowActionXmlSerializeXml value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionXml.class); - } - - @java.lang.Override - public FlowActionXml deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionXmlParseXml.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowActionXmlSerializeXml.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlParseXml.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlParseXml.java deleted file mode 100644 index da78abd17..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlParseXml.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionXmlParseXml.Builder.class) -public final class FlowActionXmlParseXml { - private final String id; - - private final Optional alias; - - private final FlowActionXmlParseXmlType type; - - private final FlowActionXmlParseXmlAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionXmlParseXmlParams params; - - private final Map additionalProperties; - - private FlowActionXmlParseXml( - String id, - Optional alias, - FlowActionXmlParseXmlType type, - FlowActionXmlParseXmlAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionXmlParseXmlParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionXmlParseXmlType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionXmlParseXmlAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionXmlParseXmlParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionXmlParseXml && equalTo((FlowActionXmlParseXml) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionXmlParseXml other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionXmlParseXml other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionXmlParseXmlType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionXmlParseXmlAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionXmlParseXmlParams params); - } - - public interface _FinalStage { - FlowActionXmlParseXml build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionXmlParseXmlType type; - - private FlowActionXmlParseXmlAction action; - - private FlowActionXmlParseXmlParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionXmlParseXml other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionXmlParseXmlType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionXmlParseXmlAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionXmlParseXmlParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionXmlParseXml build() { - return new FlowActionXmlParseXml( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlParseXmlAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlParseXmlAction.java deleted file mode 100644 index 55a61f3dc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlParseXmlAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionXmlParseXmlAction { - public static final FlowActionXmlParseXmlAction PARSE_XML = - new FlowActionXmlParseXmlAction(Value.PARSE_XML, "PARSE_XML"); - - private final Value value; - - private final String string; - - FlowActionXmlParseXmlAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionXmlParseXmlAction - && this.string.equals(((FlowActionXmlParseXmlAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PARSE_XML: - return visitor.visitParseXml(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionXmlParseXmlAction valueOf(String value) { - switch (value) { - case "PARSE_XML": - return PARSE_XML; - default: - return new FlowActionXmlParseXmlAction(Value.UNKNOWN, value); - } - } - - public enum Value { - PARSE_XML, - - UNKNOWN - } - - public interface Visitor { - T visitParseXml(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlParseXmlParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlParseXmlParams.java deleted file mode 100644 index 9c97b5312..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlParseXmlParams.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionXmlParseXmlParams.Builder.class) -public final class FlowActionXmlParseXmlParams { - private final String xml; - - private final Map additionalProperties; - - private FlowActionXmlParseXmlParams(String xml, Map additionalProperties) { - this.xml = xml; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("xml") - public String getXml() { - return xml; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionXmlParseXmlParams && equalTo((FlowActionXmlParseXmlParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionXmlParseXmlParams other) { - return xml.equals(other.xml); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.xml); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XmlStage builder() { - return new Builder(); - } - - public interface XmlStage { - _FinalStage xml(@NotNull String xml); - - Builder from(FlowActionXmlParseXmlParams other); - } - - public interface _FinalStage { - FlowActionXmlParseXmlParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XmlStage, _FinalStage { - private String xml; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionXmlParseXmlParams other) { - xml(other.getXml()); - return this; - } - - @java.lang.Override - @JsonSetter("xml") - public _FinalStage xml(@NotNull String xml) { - this.xml = Objects.requireNonNull(xml, "xml must not be null"); - return this; - } - - @java.lang.Override - public FlowActionXmlParseXmlParams build() { - return new FlowActionXmlParseXmlParams(xml, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlParseXmlType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlParseXmlType.java deleted file mode 100644 index 3d3576f3b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlParseXmlType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionXmlParseXmlType { - public static final FlowActionXmlParseXmlType XML = new FlowActionXmlParseXmlType(Value.XML, "XML"); - - private final Value value; - - private final String string; - - FlowActionXmlParseXmlType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionXmlParseXmlType - && this.string.equals(((FlowActionXmlParseXmlType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case XML: - return visitor.visitXml(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionXmlParseXmlType valueOf(String value) { - switch (value) { - case "XML": - return XML; - default: - return new FlowActionXmlParseXmlType(Value.UNKNOWN, value); - } - } - - public enum Value { - XML, - - UNKNOWN - } - - public interface Visitor { - T visitXml(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlSerializeXml.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlSerializeXml.java deleted file mode 100644 index 2d5a8d556..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlSerializeXml.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionXmlSerializeXml.Builder.class) -public final class FlowActionXmlSerializeXml { - private final String id; - - private final Optional alias; - - private final FlowActionXmlSerializeXmlType type; - - private final FlowActionXmlSerializeXmlAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionXmlSerializeXmlParams params; - - private final Map additionalProperties; - - private FlowActionXmlSerializeXml( - String id, - Optional alias, - FlowActionXmlSerializeXmlType type, - FlowActionXmlSerializeXmlAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionXmlSerializeXmlParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionXmlSerializeXmlType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionXmlSerializeXmlAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionXmlSerializeXmlParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionXmlSerializeXml && equalTo((FlowActionXmlSerializeXml) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionXmlSerializeXml other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionXmlSerializeXml other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionXmlSerializeXmlType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionXmlSerializeXmlAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionXmlSerializeXmlParams params); - } - - public interface _FinalStage { - FlowActionXmlSerializeXml build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionXmlSerializeXmlType type; - - private FlowActionXmlSerializeXmlAction action; - - private FlowActionXmlSerializeXmlParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionXmlSerializeXml other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionXmlSerializeXmlType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionXmlSerializeXmlAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionXmlSerializeXmlParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionXmlSerializeXml build() { - return new FlowActionXmlSerializeXml( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlSerializeXmlAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlSerializeXmlAction.java deleted file mode 100644 index 0f49a4665..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlSerializeXmlAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionXmlSerializeXmlAction { - public static final FlowActionXmlSerializeXmlAction SERIALIZE_XML = - new FlowActionXmlSerializeXmlAction(Value.SERIALIZE_XML, "SERIALIZE_XML"); - - private final Value value; - - private final String string; - - FlowActionXmlSerializeXmlAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionXmlSerializeXmlAction - && this.string.equals(((FlowActionXmlSerializeXmlAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SERIALIZE_XML: - return visitor.visitSerializeXml(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionXmlSerializeXmlAction valueOf(String value) { - switch (value) { - case "SERIALIZE_XML": - return SERIALIZE_XML; - default: - return new FlowActionXmlSerializeXmlAction(Value.UNKNOWN, value); - } - } - - public enum Value { - SERIALIZE_XML, - - UNKNOWN - } - - public interface Visitor { - T visitSerializeXml(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlSerializeXmlParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlSerializeXmlParams.java deleted file mode 100644 index f061b36a6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlSerializeXmlParams.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowActionXmlSerializeXmlParams.Builder.class) -public final class FlowActionXmlSerializeXmlParams { - private final FlowActionXmlSerializeXmlParamsObject object; - - private final Map additionalProperties; - - private FlowActionXmlSerializeXmlParams( - FlowActionXmlSerializeXmlParamsObject object, Map additionalProperties) { - this.object = object; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("object") - public FlowActionXmlSerializeXmlParamsObject getObject() { - return object; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionXmlSerializeXmlParams && equalTo((FlowActionXmlSerializeXmlParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionXmlSerializeXmlParams other) { - return object.equals(other.object); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.object); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ObjectStage builder() { - return new Builder(); - } - - public interface ObjectStage { - _FinalStage object(@NotNull FlowActionXmlSerializeXmlParamsObject object); - - Builder from(FlowActionXmlSerializeXmlParams other); - } - - public interface _FinalStage { - FlowActionXmlSerializeXmlParams build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ObjectStage, _FinalStage { - private FlowActionXmlSerializeXmlParamsObject object; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionXmlSerializeXmlParams other) { - object(other.getObject()); - return this; - } - - @java.lang.Override - @JsonSetter("object") - public _FinalStage object(@NotNull FlowActionXmlSerializeXmlParamsObject object) { - this.object = Objects.requireNonNull(object, "object must not be null"); - return this; - } - - @java.lang.Override - public FlowActionXmlSerializeXmlParams build() { - return new FlowActionXmlSerializeXmlParams(object, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlSerializeXmlParamsObject.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlSerializeXmlParamsObject.java deleted file mode 100644 index abba5fb24..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlSerializeXmlParamsObject.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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.Map; -import java.util.Objects; - -@JsonDeserialize(using = FlowActionXmlSerializeXmlParamsObject.Deserializer.class) -public final class FlowActionXmlSerializeXmlParamsObject { - private final Object value; - - private final int type; - - private FlowActionXmlSerializeXmlParamsObject(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((Map) 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 FlowActionXmlSerializeXmlParamsObject - && equalTo((FlowActionXmlSerializeXmlParamsObject) other); - } - - private boolean equalTo(FlowActionXmlSerializeXmlParamsObject 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 FlowActionXmlSerializeXmlParamsObject of(String value) { - return new FlowActionXmlSerializeXmlParamsObject(value, 0); - } - - public static FlowActionXmlSerializeXmlParamsObject of(Map value) { - return new FlowActionXmlSerializeXmlParamsObject(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(Map value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FlowActionXmlSerializeXmlParamsObject.class); - } - - @java.lang.Override - public FlowActionXmlSerializeXmlParamsObject deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.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/FlowActionXmlSerializeXmlType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlSerializeXmlType.java deleted file mode 100644 index d85706fd2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionXmlSerializeXmlType.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionXmlSerializeXmlType { - public static final FlowActionXmlSerializeXmlType XML = new FlowActionXmlSerializeXmlType(Value.XML, "XML"); - - private final Value value; - - private final String string; - - FlowActionXmlSerializeXmlType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionXmlSerializeXmlType - && this.string.equals(((FlowActionXmlSerializeXmlType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case XML: - return visitor.visitXml(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionXmlSerializeXmlType valueOf(String value) { - switch (value) { - case "XML": - return XML; - default: - return new FlowActionXmlSerializeXmlType(Value.UNKNOWN, value); - } - } - - public enum Value { - XML, - - UNKNOWN - } - - public interface Visitor { - T visitXml(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionZapierTriggerWebhook.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionZapierTriggerWebhook.java deleted file mode 100644 index aee497b88..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionZapierTriggerWebhook.java +++ /dev/null @@ -1,270 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionZapierTriggerWebhook.Builder.class) -public final class FlowActionZapierTriggerWebhook { - private final String id; - - private final Optional alias; - - private final FlowActionZapierTriggerWebhookType type; - - private final FlowActionZapierTriggerWebhookAction action; - - private final Optional allowFailure; - - private final Optional maskOutput; - - private final FlowActionZapierTriggerWebhookParams params; - - private final Map additionalProperties; - - private FlowActionZapierTriggerWebhook( - String id, - Optional alias, - FlowActionZapierTriggerWebhookType type, - FlowActionZapierTriggerWebhookAction action, - Optional allowFailure, - Optional maskOutput, - FlowActionZapierTriggerWebhookParams params, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.type = type; - this.action = action; - this.allowFailure = allowFailure; - this.maskOutput = maskOutput; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("type") - public FlowActionZapierTriggerWebhookType getType() { - return type; - } - - @JsonProperty("action") - public FlowActionZapierTriggerWebhookAction getAction() { - return action; - } - - @JsonProperty("allow_failure") - public Optional getAllowFailure() { - return allowFailure; - } - - @JsonProperty("mask_output") - public Optional getMaskOutput() { - return maskOutput; - } - - @JsonProperty("params") - public FlowActionZapierTriggerWebhookParams getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionZapierTriggerWebhook && equalTo((FlowActionZapierTriggerWebhook) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionZapierTriggerWebhook other) { - return id.equals(other.id) - && alias.equals(other.alias) - && type.equals(other.type) - && action.equals(other.action) - && allowFailure.equals(other.allowFailure) - && maskOutput.equals(other.maskOutput) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.alias, this.type, this.action, this.allowFailure, this.maskOutput, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FlowActionZapierTriggerWebhook other); - } - - public interface TypeStage { - ActionStage type(@NotNull FlowActionZapierTriggerWebhookType type); - } - - public interface ActionStage { - ParamsStage action(@NotNull FlowActionZapierTriggerWebhookAction action); - } - - public interface ParamsStage { - _FinalStage params(@NotNull FlowActionZapierTriggerWebhookParams params); - } - - public interface _FinalStage { - FlowActionZapierTriggerWebhook build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage allowFailure(Optional allowFailure); - - _FinalStage allowFailure(Boolean allowFailure); - - _FinalStage maskOutput(Optional maskOutput); - - _FinalStage maskOutput(Boolean maskOutput); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ActionStage, ParamsStage, _FinalStage { - private String id; - - private FlowActionZapierTriggerWebhookType type; - - private FlowActionZapierTriggerWebhookAction action; - - private FlowActionZapierTriggerWebhookParams params; - - private Optional maskOutput = Optional.empty(); - - private Optional allowFailure = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionZapierTriggerWebhook other) { - id(other.getId()); - alias(other.getAlias()); - type(other.getType()); - action(other.getAction()); - allowFailure(other.getAllowFailure()); - maskOutput(other.getMaskOutput()); - params(other.getParams()); - return this; - } - - @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 ActionStage type(@NotNull FlowActionZapierTriggerWebhookType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ParamsStage action(@NotNull FlowActionZapierTriggerWebhookAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("params") - public _FinalStage params(@NotNull FlowActionZapierTriggerWebhookParams params) { - this.params = Objects.requireNonNull(params, "params must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maskOutput(Boolean maskOutput) { - this.maskOutput = Optional.ofNullable(maskOutput); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mask_output", nulls = Nulls.SKIP) - public _FinalStage maskOutput(Optional maskOutput) { - this.maskOutput = maskOutput; - return this; - } - - @java.lang.Override - public _FinalStage allowFailure(Boolean allowFailure) { - this.allowFailure = Optional.ofNullable(allowFailure); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allow_failure", nulls = Nulls.SKIP) - public _FinalStage allowFailure(Optional allowFailure) { - this.allowFailure = allowFailure; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FlowActionZapierTriggerWebhook build() { - return new FlowActionZapierTriggerWebhook( - id, alias, type, action, allowFailure, maskOutput, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionZapierTriggerWebhookAction.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionZapierTriggerWebhookAction.java deleted file mode 100644 index 1513417dd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionZapierTriggerWebhookAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionZapierTriggerWebhookAction { - public static final FlowActionZapierTriggerWebhookAction TRIGGER_WEBHOOK = - new FlowActionZapierTriggerWebhookAction(Value.TRIGGER_WEBHOOK, "TRIGGER_WEBHOOK"); - - private final Value value; - - private final String string; - - FlowActionZapierTriggerWebhookAction(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionZapierTriggerWebhookAction - && this.string.equals(((FlowActionZapierTriggerWebhookAction) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TRIGGER_WEBHOOK: - return visitor.visitTriggerWebhook(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionZapierTriggerWebhookAction valueOf(String value) { - switch (value) { - case "TRIGGER_WEBHOOK": - return TRIGGER_WEBHOOK; - default: - return new FlowActionZapierTriggerWebhookAction(Value.UNKNOWN, value); - } - } - - public enum Value { - TRIGGER_WEBHOOK, - - UNKNOWN - } - - public interface Visitor { - T visitTriggerWebhook(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionZapierTriggerWebhookParams.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionZapierTriggerWebhookParams.java deleted file mode 100644 index 1a30886e3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionZapierTriggerWebhookParams.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowActionZapierTriggerWebhookParams.Builder.class) -public final class FlowActionZapierTriggerWebhookParams { - private final String connectionId; - - private final Optional method; - - private final Map additionalProperties; - - private FlowActionZapierTriggerWebhookParams( - String connectionId, - Optional method, - Map additionalProperties) { - this.connectionId = connectionId; - this.method = method; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - @JsonProperty("method") - public Optional getMethod() { - return method; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowActionZapierTriggerWebhookParams - && equalTo((FlowActionZapierTriggerWebhookParams) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowActionZapierTriggerWebhookParams other) { - return connectionId.equals(other.connectionId) && method.equals(other.method); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionId, this.method); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - _FinalStage connectionId(@NotNull String connectionId); - - Builder from(FlowActionZapierTriggerWebhookParams other); - } - - public interface _FinalStage { - FlowActionZapierTriggerWebhookParams build(); - - _FinalStage method(Optional method); - - _FinalStage method(FlowActionZapierTriggerWebhookParamsMethod method); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionIdStage, _FinalStage { - private String connectionId; - - private Optional method = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowActionZapierTriggerWebhookParams other) { - connectionId(other.getConnectionId()); - method(other.getMethod()); - return this; - } - - @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 _FinalStage method(FlowActionZapierTriggerWebhookParamsMethod method) { - this.method = Optional.ofNullable(method); - return this; - } - - @java.lang.Override - @JsonSetter(value = "method", nulls = Nulls.SKIP) - public _FinalStage method(Optional method) { - this.method = method; - return this; - } - - @java.lang.Override - public FlowActionZapierTriggerWebhookParams build() { - return new FlowActionZapierTriggerWebhookParams(connectionId, method, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionZapierTriggerWebhookParamsMethod.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionZapierTriggerWebhookParamsMethod.java deleted file mode 100644 index bd0e8036a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionZapierTriggerWebhookParamsMethod.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionZapierTriggerWebhookParamsMethod { - public static final FlowActionZapierTriggerWebhookParamsMethod GET = - new FlowActionZapierTriggerWebhookParamsMethod(Value.GET, "GET"); - - public static final FlowActionZapierTriggerWebhookParamsMethod PUT = - new FlowActionZapierTriggerWebhookParamsMethod(Value.PUT, "PUT"); - - public static final FlowActionZapierTriggerWebhookParamsMethod POST = - new FlowActionZapierTriggerWebhookParamsMethod(Value.POST, "POST"); - - private final Value value; - - private final String string; - - FlowActionZapierTriggerWebhookParamsMethod(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionZapierTriggerWebhookParamsMethod - && this.string.equals(((FlowActionZapierTriggerWebhookParamsMethod) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GET: - return visitor.visitGet(); - case PUT: - return visitor.visitPut(); - case POST: - return visitor.visitPost(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionZapierTriggerWebhookParamsMethod valueOf(String value) { - switch (value) { - case "GET": - return GET; - case "PUT": - return PUT; - case "POST": - return POST; - default: - return new FlowActionZapierTriggerWebhookParamsMethod(Value.UNKNOWN, value); - } - } - - public enum Value { - GET, - - POST, - - PUT, - - UNKNOWN - } - - public interface Visitor { - T visitGet(); - - T visitPost(); - - T visitPut(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowActionZapierTriggerWebhookType.java b/src/main/java/com/auth0/client/mgmt/types/FlowActionZapierTriggerWebhookType.java deleted file mode 100644 index 49892fb15..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowActionZapierTriggerWebhookType.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowActionZapierTriggerWebhookType { - public static final FlowActionZapierTriggerWebhookType ZAPIER = - new FlowActionZapierTriggerWebhookType(Value.ZAPIER, "ZAPIER"); - - private final Value value; - - private final String string; - - FlowActionZapierTriggerWebhookType(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowActionZapierTriggerWebhookType - && this.string.equals(((FlowActionZapierTriggerWebhookType) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ZAPIER: - return visitor.visitZapier(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowActionZapierTriggerWebhookType valueOf(String value) { - switch (value) { - case "ZAPIER": - return ZAPIER; - default: - return new FlowActionZapierTriggerWebhookType(Value.UNKNOWN, value); - } - } - - public enum Value { - ZAPIER, - - UNKNOWN - } - - public interface Visitor { - T visitZapier(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowExecutionSummary.java b/src/main/java/com/auth0/client/mgmt/types/FlowExecutionSummary.java deleted file mode 100644 index 0f85945d1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowExecutionSummary.java +++ /dev/null @@ -1,397 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = FlowExecutionSummary.Builder.class) -public final class FlowExecutionSummary { - private final String id; - - private final String traceId; - - private final Optional journeyId; - - private final String status; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional startedAt; - - private final Optional endedAt; - - private final Map additionalProperties; - - private FlowExecutionSummary( - String id, - String traceId, - Optional journeyId, - String status, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional startedAt, - Optional endedAt, - Map additionalProperties) { - this.id = id; - this.traceId = traceId; - this.journeyId = journeyId; - this.status = status; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.startedAt = startedAt; - this.endedAt = endedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flow execution identifier - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return Trace id - */ - @JsonProperty("trace_id") - public String getTraceId() { - return traceId; - } - - /** - * @return Journey id - */ - @JsonProperty("journey_id") - public Optional getJourneyId() { - return journeyId; - } - - /** - * @return Execution status - */ - @JsonProperty("status") - public String getStatus() { - return status; - } - - /** - * @return The ISO 8601 formatted date when this flow execution was created. - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return The ISO 8601 formatted date when this flow execution was updated. - */ - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - /** - * @return The ISO 8601 formatted date when this flow execution started. - */ - @JsonProperty("started_at") - public Optional getStartedAt() { - return startedAt; - } - - /** - * @return The ISO 8601 formatted date when this flow execution ended. - */ - @JsonProperty("ended_at") - public Optional getEndedAt() { - return endedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowExecutionSummary && equalTo((FlowExecutionSummary) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowExecutionSummary other) { - return id.equals(other.id) - && traceId.equals(other.traceId) - && journeyId.equals(other.journeyId) - && status.equals(other.status) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && startedAt.equals(other.startedAt) - && endedAt.equals(other.endedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.traceId, - this.journeyId, - this.status, - this.createdAt, - this.updatedAt, - this.startedAt, - this.endedAt); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

Flow execution identifier

- */ - TraceIdStage id(@NotNull String id); - - Builder from(FlowExecutionSummary other); - } - - public interface TraceIdStage { - /** - *

Trace id

- */ - StatusStage traceId(@NotNull String traceId); - } - - public interface StatusStage { - /** - *

Execution status

- */ - CreatedAtStage status(@NotNull String status); - } - - public interface CreatedAtStage { - /** - *

The ISO 8601 formatted date when this flow execution was created.

- */ - UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); - } - - public interface UpdatedAtStage { - /** - *

The ISO 8601 formatted date when this flow execution was updated.

- */ - _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); - } - - public interface _FinalStage { - FlowExecutionSummary build(); - - /** - *

Journey id

- */ - _FinalStage journeyId(Optional journeyId); - - _FinalStage journeyId(String journeyId); - - /** - *

The ISO 8601 formatted date when this flow execution started.

- */ - _FinalStage startedAt(Optional startedAt); - - _FinalStage startedAt(OffsetDateTime startedAt); - - /** - *

The ISO 8601 formatted date when this flow execution ended.

- */ - _FinalStage endedAt(Optional endedAt); - - _FinalStage endedAt(OffsetDateTime endedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements IdStage, TraceIdStage, StatusStage, CreatedAtStage, UpdatedAtStage, _FinalStage { - private String id; - - private String traceId; - - private String status; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private Optional endedAt = Optional.empty(); - - private Optional startedAt = Optional.empty(); - - private Optional journeyId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowExecutionSummary other) { - id(other.getId()); - traceId(other.getTraceId()); - journeyId(other.getJourneyId()); - status(other.getStatus()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - startedAt(other.getStartedAt()); - endedAt(other.getEndedAt()); - return this; - } - - /** - *

Flow execution identifier

- *

Flow execution identifier

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("id") - public TraceIdStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - /** - *

Trace id

- *

Trace id

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("trace_id") - public StatusStage traceId(@NotNull String traceId) { - this.traceId = Objects.requireNonNull(traceId, "traceId must not be null"); - return this; - } - - /** - *

Execution status

- *

Execution status

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("status") - public CreatedAtStage status(@NotNull String status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("created_at") - public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { - this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); - return this; - } - - /** - *

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. - */ - @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 ISO 8601 formatted date when this flow execution ended.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage endedAt(OffsetDateTime endedAt) { - this.endedAt = Optional.ofNullable(endedAt); - return this; - } - - /** - *

The ISO 8601 formatted date when this flow execution ended.

- */ - @java.lang.Override - @JsonSetter(value = "ended_at", nulls = Nulls.SKIP) - public _FinalStage endedAt(Optional endedAt) { - this.endedAt = endedAt; - return this; - } - - /** - *

The ISO 8601 formatted date when this flow execution started.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage startedAt(OffsetDateTime startedAt) { - this.startedAt = Optional.ofNullable(startedAt); - return this; - } - - /** - *

The ISO 8601 formatted date when this flow execution started.

- */ - @java.lang.Override - @JsonSetter(value = "started_at", nulls = Nulls.SKIP) - public _FinalStage startedAt(Optional startedAt) { - this.startedAt = startedAt; - return this; - } - - /** - *

Journey id

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage journeyId(String journeyId) { - this.journeyId = Optional.ofNullable(journeyId); - return this; - } - - /** - *

Journey id

- */ - @java.lang.Override - @JsonSetter(value = "journey_id", nulls = Nulls.SKIP) - public _FinalStage journeyId(Optional journeyId) { - this.journeyId = journeyId; - return this; - } - - @java.lang.Override - public FlowExecutionSummary build() { - return new FlowExecutionSummary( - id, traceId, journeyId, status, createdAt, updatedAt, startedAt, endedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowSummary.java b/src/main/java/com/auth0/client/mgmt/types/FlowSummary.java deleted file mode 100644 index ad5d7050b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowSummary.java +++ /dev/null @@ -1,209 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = FlowSummary.Builder.class) -public final class FlowSummary { - private final String id; - - private final String name; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional executedAt; - - private final Map additionalProperties; - - private FlowSummary( - String id, - String name, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional executedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.executedAt = executedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("executed_at") - public Optional getExecutedAt() { - return executedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowSummary && equalTo((FlowSummary) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowSummary other) { - return id.equals(other.id) - && name.equals(other.name) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && executedAt.equals(other.executedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.createdAt, this.updatedAt, this.executedAt); - } - - @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(FlowSummary other); - } - - 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 { - FlowSummary build(); - - _FinalStage executedAt(Optional executedAt); - - _FinalStage executedAt(String executedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, CreatedAtStage, UpdatedAtStage, _FinalStage { - private String id; - - private String name; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private Optional executedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowSummary other) { - id(other.getId()); - name(other.getName()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - executedAt(other.getExecutedAt()); - 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 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 executedAt(String executedAt) { - this.executedAt = Optional.ofNullable(executedAt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "executed_at", nulls = Nulls.SKIP) - public _FinalStage executedAt(Optional executedAt) { - this.executedAt = executedAt; - return this; - } - - @java.lang.Override - public FlowSummary build() { - return new FlowSummary(id, name, createdAt, updatedAt, executedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupApiKey.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupApiKey.java deleted file mode 100644 index 354c61ffd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupApiKey.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowsVaultConnectioSetupApiKey.Builder.class) -public final class FlowsVaultConnectioSetupApiKey { - private final FlowsVaultConnectioSetupTypeApiKeyEnum type; - - private final String apiKey; - - private final Map additionalProperties; - - private FlowsVaultConnectioSetupApiKey( - FlowsVaultConnectioSetupTypeApiKeyEnum type, String apiKey, Map additionalProperties) { - this.type = type; - this.apiKey = apiKey; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FlowsVaultConnectioSetupTypeApiKeyEnum getType() { - return type; - } - - @JsonProperty("api_key") - public String getApiKey() { - return apiKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectioSetupApiKey && equalTo((FlowsVaultConnectioSetupApiKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectioSetupApiKey other) { - return type.equals(other.type) && apiKey.equals(other.apiKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.apiKey); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - ApiKeyStage type(@NotNull FlowsVaultConnectioSetupTypeApiKeyEnum type); - - Builder from(FlowsVaultConnectioSetupApiKey other); - } - - public interface ApiKeyStage { - _FinalStage apiKey(@NotNull String apiKey); - } - - public interface _FinalStage { - FlowsVaultConnectioSetupApiKey build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, ApiKeyStage, _FinalStage { - private FlowsVaultConnectioSetupTypeApiKeyEnum type; - - private String apiKey; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowsVaultConnectioSetupApiKey other) { - type(other.getType()); - apiKey(other.getApiKey()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ApiKeyStage type(@NotNull FlowsVaultConnectioSetupTypeApiKeyEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("api_key") - public _FinalStage apiKey(@NotNull String apiKey) { - this.apiKey = Objects.requireNonNull(apiKey, "apiKey must not be null"); - return this; - } - - @java.lang.Override - public FlowsVaultConnectioSetupApiKey build() { - return new FlowsVaultConnectioSetupApiKey(type, apiKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupApiKeyWithBaseUrl.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupApiKeyWithBaseUrl.java deleted file mode 100644 index c70109703..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupApiKeyWithBaseUrl.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowsVaultConnectioSetupApiKeyWithBaseUrl.Builder.class) -public final class FlowsVaultConnectioSetupApiKeyWithBaseUrl { - private final FlowsVaultConnectioSetupTypeApiKeyEnum type; - - private final String apiKey; - - private final String baseUrl; - - private final Map additionalProperties; - - private FlowsVaultConnectioSetupApiKeyWithBaseUrl( - FlowsVaultConnectioSetupTypeApiKeyEnum type, - String apiKey, - String baseUrl, - Map additionalProperties) { - this.type = type; - this.apiKey = apiKey; - this.baseUrl = baseUrl; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FlowsVaultConnectioSetupTypeApiKeyEnum getType() { - return type; - } - - @JsonProperty("api_key") - public String getApiKey() { - return apiKey; - } - - @JsonProperty("base_url") - public String getBaseUrl() { - return baseUrl; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectioSetupApiKeyWithBaseUrl - && equalTo((FlowsVaultConnectioSetupApiKeyWithBaseUrl) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectioSetupApiKeyWithBaseUrl other) { - return type.equals(other.type) && apiKey.equals(other.apiKey) && baseUrl.equals(other.baseUrl); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.apiKey, this.baseUrl); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - ApiKeyStage type(@NotNull FlowsVaultConnectioSetupTypeApiKeyEnum type); - - Builder from(FlowsVaultConnectioSetupApiKeyWithBaseUrl other); - } - - public interface ApiKeyStage { - BaseUrlStage apiKey(@NotNull String apiKey); - } - - public interface BaseUrlStage { - _FinalStage baseUrl(@NotNull String baseUrl); - } - - public interface _FinalStage { - FlowsVaultConnectioSetupApiKeyWithBaseUrl build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, ApiKeyStage, BaseUrlStage, _FinalStage { - private FlowsVaultConnectioSetupTypeApiKeyEnum type; - - private String apiKey; - - private String baseUrl; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowsVaultConnectioSetupApiKeyWithBaseUrl other) { - type(other.getType()); - apiKey(other.getApiKey()); - baseUrl(other.getBaseUrl()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ApiKeyStage type(@NotNull FlowsVaultConnectioSetupTypeApiKeyEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("api_key") - public BaseUrlStage apiKey(@NotNull String apiKey) { - this.apiKey = Objects.requireNonNull(apiKey, "apiKey must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("base_url") - public _FinalStage baseUrl(@NotNull String baseUrl) { - this.baseUrl = Objects.requireNonNull(baseUrl, "baseUrl must not be null"); - return this; - } - - @java.lang.Override - public FlowsVaultConnectioSetupApiKeyWithBaseUrl build() { - return new FlowsVaultConnectioSetupApiKeyWithBaseUrl(type, apiKey, baseUrl, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupBigqueryOauthJwt.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupBigqueryOauthJwt.java deleted file mode 100644 index 073ee9fd1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupBigqueryOauthJwt.java +++ /dev/null @@ -1,171 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowsVaultConnectioSetupBigqueryOauthJwt.Builder.class) -public final class FlowsVaultConnectioSetupBigqueryOauthJwt { - private final Optional type; - - private final Optional projectId; - - private final Optional privateKey; - - private final Optional clientEmail; - - private final Map additionalProperties; - - private FlowsVaultConnectioSetupBigqueryOauthJwt( - Optional type, - Optional projectId, - Optional privateKey, - Optional clientEmail, - Map additionalProperties) { - this.type = type; - this.projectId = projectId; - this.privateKey = privateKey; - this.clientEmail = clientEmail; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - @JsonProperty("project_id") - public Optional getProjectId() { - return projectId; - } - - @JsonProperty("private_key") - public Optional getPrivateKey() { - return privateKey; - } - - @JsonProperty("client_email") - public Optional getClientEmail() { - return clientEmail; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectioSetupBigqueryOauthJwt - && equalTo((FlowsVaultConnectioSetupBigqueryOauthJwt) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectioSetupBigqueryOauthJwt other) { - return type.equals(other.type) - && projectId.equals(other.projectId) - && privateKey.equals(other.privateKey) - && clientEmail.equals(other.clientEmail); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.projectId, this.privateKey, this.clientEmail); - } - - @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 type = Optional.empty(); - - private Optional projectId = Optional.empty(); - - private Optional privateKey = Optional.empty(); - - private Optional clientEmail = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FlowsVaultConnectioSetupBigqueryOauthJwt other) { - type(other.getType()); - projectId(other.getProjectId()); - privateKey(other.getPrivateKey()); - clientEmail(other.getClientEmail()); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(FlowsVaultConnectioSetupTypeOauthJwtEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - @JsonSetter(value = "project_id", nulls = Nulls.SKIP) - public Builder projectId(Optional projectId) { - this.projectId = projectId; - return this; - } - - public Builder projectId(String projectId) { - this.projectId = Optional.ofNullable(projectId); - return this; - } - - @JsonSetter(value = "private_key", nulls = Nulls.SKIP) - public Builder privateKey(Optional privateKey) { - this.privateKey = privateKey; - return this; - } - - public Builder privateKey(String privateKey) { - this.privateKey = Optional.ofNullable(privateKey); - return this; - } - - @JsonSetter(value = "client_email", nulls = Nulls.SKIP) - public Builder clientEmail(Optional clientEmail) { - this.clientEmail = clientEmail; - return this; - } - - public Builder clientEmail(String clientEmail) { - this.clientEmail = Optional.ofNullable(clientEmail); - return this; - } - - public FlowsVaultConnectioSetupBigqueryOauthJwt build() { - return new FlowsVaultConnectioSetupBigqueryOauthJwt( - type, projectId, privateKey, clientEmail, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupHttpBearer.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupHttpBearer.java deleted file mode 100644 index 9164e4ff5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupHttpBearer.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowsVaultConnectioSetupHttpBearer.Builder.class) -public final class FlowsVaultConnectioSetupHttpBearer { - private final FlowsVaultConnectioSetupTypeBearerEnum type; - - private final String token; - - private final Map additionalProperties; - - private FlowsVaultConnectioSetupHttpBearer( - FlowsVaultConnectioSetupTypeBearerEnum type, String token, Map additionalProperties) { - this.type = type; - this.token = token; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FlowsVaultConnectioSetupTypeBearerEnum getType() { - return type; - } - - @JsonProperty("token") - public String getToken() { - return token; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectioSetupHttpBearer - && equalTo((FlowsVaultConnectioSetupHttpBearer) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectioSetupHttpBearer other) { - return type.equals(other.type) && token.equals(other.token); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.token); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - TokenStage type(@NotNull FlowsVaultConnectioSetupTypeBearerEnum type); - - Builder from(FlowsVaultConnectioSetupHttpBearer other); - } - - public interface TokenStage { - _FinalStage token(@NotNull String token); - } - - public interface _FinalStage { - FlowsVaultConnectioSetupHttpBearer build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, TokenStage, _FinalStage { - private FlowsVaultConnectioSetupTypeBearerEnum type; - - private String token; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowsVaultConnectioSetupHttpBearer other) { - type(other.getType()); - token(other.getToken()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public TokenStage type(@NotNull FlowsVaultConnectioSetupTypeBearerEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("token") - public _FinalStage token(@NotNull String token) { - this.token = Objects.requireNonNull(token, "token must not be null"); - return this; - } - - @java.lang.Override - public FlowsVaultConnectioSetupHttpBearer build() { - return new FlowsVaultConnectioSetupHttpBearer(type, token, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupJwt.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupJwt.java deleted file mode 100644 index 729e31b10..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupJwt.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowsVaultConnectioSetupJwt.Builder.class) -public final class FlowsVaultConnectioSetupJwt { - private final FlowsVaultConnectioSetupTypeJwtEnum type; - - private final FlowsVaultConnectioSetupJwtAlgorithmEnum algorithm; - - private final Map additionalProperties; - - private FlowsVaultConnectioSetupJwt( - FlowsVaultConnectioSetupTypeJwtEnum type, - FlowsVaultConnectioSetupJwtAlgorithmEnum algorithm, - Map additionalProperties) { - this.type = type; - this.algorithm = algorithm; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FlowsVaultConnectioSetupTypeJwtEnum getType() { - return type; - } - - @JsonProperty("algorithm") - public FlowsVaultConnectioSetupJwtAlgorithmEnum getAlgorithm() { - return algorithm; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectioSetupJwt && equalTo((FlowsVaultConnectioSetupJwt) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectioSetupJwt other) { - return type.equals(other.type) && algorithm.equals(other.algorithm); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.algorithm); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - AlgorithmStage type(@NotNull FlowsVaultConnectioSetupTypeJwtEnum type); - - Builder from(FlowsVaultConnectioSetupJwt other); - } - - public interface AlgorithmStage { - _FinalStage algorithm(@NotNull FlowsVaultConnectioSetupJwtAlgorithmEnum algorithm); - } - - public interface _FinalStage { - FlowsVaultConnectioSetupJwt build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, AlgorithmStage, _FinalStage { - private FlowsVaultConnectioSetupTypeJwtEnum type; - - private FlowsVaultConnectioSetupJwtAlgorithmEnum algorithm; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowsVaultConnectioSetupJwt other) { - type(other.getType()); - algorithm(other.getAlgorithm()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public AlgorithmStage type(@NotNull FlowsVaultConnectioSetupTypeJwtEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("algorithm") - public _FinalStage algorithm(@NotNull FlowsVaultConnectioSetupJwtAlgorithmEnum algorithm) { - this.algorithm = Objects.requireNonNull(algorithm, "algorithm must not be null"); - return this; - } - - @java.lang.Override - public FlowsVaultConnectioSetupJwt build() { - return new FlowsVaultConnectioSetupJwt(type, algorithm, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupJwtAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupJwtAlgorithmEnum.java deleted file mode 100644 index 5ad6528ba..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupJwtAlgorithmEnum.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectioSetupJwtAlgorithmEnum { - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum RS512 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.RS512, "RS512"); - - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum ES256 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.ES256, "ES256"); - - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum PS256 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.PS256, "PS256"); - - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum ES384 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.ES384, "ES384"); - - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum PS384 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.PS384, "PS384"); - - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum HS256 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.HS256, "HS256"); - - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum ES512 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.ES512, "ES512"); - - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum HS384 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.HS384, "HS384"); - - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum PS512 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.PS512, "PS512"); - - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum HS512 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.HS512, "HS512"); - - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum RS256 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.RS256, "RS256"); - - public static final FlowsVaultConnectioSetupJwtAlgorithmEnum RS384 = - new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.RS384, "RS384"); - - private final Value value; - - private final String string; - - FlowsVaultConnectioSetupJwtAlgorithmEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectioSetupJwtAlgorithmEnum - && this.string.equals(((FlowsVaultConnectioSetupJwtAlgorithmEnum) 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 ES256: - return visitor.visitEs256(); - case PS256: - return visitor.visitPs256(); - case ES384: - return visitor.visitEs384(); - case PS384: - return visitor.visitPs384(); - case HS256: - return visitor.visitHs256(); - case ES512: - return visitor.visitEs512(); - case HS384: - return visitor.visitHs384(); - case PS512: - return visitor.visitPs512(); - case HS512: - return visitor.visitHs512(); - case RS256: - return visitor.visitRs256(); - case RS384: - return visitor.visitRs384(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectioSetupJwtAlgorithmEnum valueOf(String value) { - switch (value) { - case "RS512": - return RS512; - case "ES256": - return ES256; - case "PS256": - return PS256; - case "ES384": - return ES384; - case "PS384": - return PS384; - case "HS256": - return HS256; - case "ES512": - return ES512; - case "HS384": - return HS384; - case "PS512": - return PS512; - case "HS512": - return HS512; - case "RS256": - return RS256; - case "RS384": - return RS384; - default: - return new FlowsVaultConnectioSetupJwtAlgorithmEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - HS256, - - HS384, - - HS512, - - RS256, - - RS384, - - RS512, - - ES256, - - ES384, - - ES512, - - PS256, - - PS384, - - PS512, - - UNKNOWN - } - - public interface Visitor { - T visitHs256(); - - T visitHs384(); - - T visitHs512(); - - T visitRs256(); - - T visitRs384(); - - T visitRs512(); - - T visitEs256(); - - T visitEs384(); - - T visitEs512(); - - T visitPs256(); - - T visitPs384(); - - T visitPs512(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupMailjetApiKey.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupMailjetApiKey.java deleted file mode 100644 index b356f3cfa..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupMailjetApiKey.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowsVaultConnectioSetupMailjetApiKey.Builder.class) -public final class FlowsVaultConnectioSetupMailjetApiKey { - private final FlowsVaultConnectioSetupTypeApiKeyEnum type; - - private final String apiKey; - - private final String secretKey; - - private final Map additionalProperties; - - private FlowsVaultConnectioSetupMailjetApiKey( - FlowsVaultConnectioSetupTypeApiKeyEnum type, - String apiKey, - String secretKey, - Map additionalProperties) { - this.type = type; - this.apiKey = apiKey; - this.secretKey = secretKey; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FlowsVaultConnectioSetupTypeApiKeyEnum getType() { - return type; - } - - @JsonProperty("api_key") - public String getApiKey() { - return apiKey; - } - - @JsonProperty("secret_key") - public String getSecretKey() { - return secretKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectioSetupMailjetApiKey - && equalTo((FlowsVaultConnectioSetupMailjetApiKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectioSetupMailjetApiKey other) { - return type.equals(other.type) && apiKey.equals(other.apiKey) && secretKey.equals(other.secretKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.apiKey, this.secretKey); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - ApiKeyStage type(@NotNull FlowsVaultConnectioSetupTypeApiKeyEnum type); - - Builder from(FlowsVaultConnectioSetupMailjetApiKey other); - } - - public interface ApiKeyStage { - SecretKeyStage apiKey(@NotNull String apiKey); - } - - public interface SecretKeyStage { - _FinalStage secretKey(@NotNull String secretKey); - } - - public interface _FinalStage { - FlowsVaultConnectioSetupMailjetApiKey build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, ApiKeyStage, SecretKeyStage, _FinalStage { - private FlowsVaultConnectioSetupTypeApiKeyEnum type; - - private String apiKey; - - private String secretKey; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowsVaultConnectioSetupMailjetApiKey other) { - type(other.getType()); - apiKey(other.getApiKey()); - secretKey(other.getSecretKey()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ApiKeyStage type(@NotNull FlowsVaultConnectioSetupTypeApiKeyEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("api_key") - public SecretKeyStage apiKey(@NotNull String apiKey) { - this.apiKey = Objects.requireNonNull(apiKey, "apiKey must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("secret_key") - public _FinalStage secretKey(@NotNull String secretKey) { - this.secretKey = Objects.requireNonNull(secretKey, "secretKey must not be null"); - return this; - } - - @java.lang.Override - public FlowsVaultConnectioSetupMailjetApiKey build() { - return new FlowsVaultConnectioSetupMailjetApiKey(type, apiKey, secretKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupOauthApp.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupOauthApp.java deleted file mode 100644 index a877c37de..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupOauthApp.java +++ /dev/null @@ -1,209 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowsVaultConnectioSetupOauthApp.Builder.class) -public final class FlowsVaultConnectioSetupOauthApp { - private final FlowsVaultConnectioSetupTypeOauthAppEnum type; - - private final String clientId; - - private final String clientSecret; - - private final String domain; - - private final Optional audience; - - private final Map additionalProperties; - - private FlowsVaultConnectioSetupOauthApp( - FlowsVaultConnectioSetupTypeOauthAppEnum type, - String clientId, - String clientSecret, - String domain, - Optional audience, - Map additionalProperties) { - this.type = type; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.domain = domain; - this.audience = audience; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FlowsVaultConnectioSetupTypeOauthAppEnum getType() { - return type; - } - - @JsonProperty("client_id") - public String getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public String getClientSecret() { - return clientSecret; - } - - @JsonProperty("domain") - public String getDomain() { - return domain; - } - - @JsonProperty("audience") - public Optional getAudience() { - return audience; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectioSetupOauthApp && equalTo((FlowsVaultConnectioSetupOauthApp) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectioSetupOauthApp other) { - return type.equals(other.type) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && domain.equals(other.domain) - && audience.equals(other.audience); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.clientId, this.clientSecret, this.domain, this.audience); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - ClientIdStage type(@NotNull FlowsVaultConnectioSetupTypeOauthAppEnum type); - - Builder from(FlowsVaultConnectioSetupOauthApp other); - } - - public interface ClientIdStage { - ClientSecretStage clientId(@NotNull String clientId); - } - - public interface ClientSecretStage { - DomainStage clientSecret(@NotNull String clientSecret); - } - - public interface DomainStage { - _FinalStage domain(@NotNull String domain); - } - - public interface _FinalStage { - FlowsVaultConnectioSetupOauthApp build(); - - _FinalStage audience(Optional audience); - - _FinalStage audience(String audience); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, ClientIdStage, ClientSecretStage, DomainStage, _FinalStage { - private FlowsVaultConnectioSetupTypeOauthAppEnum type; - - private String clientId; - - private String clientSecret; - - private String domain; - - private Optional audience = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowsVaultConnectioSetupOauthApp other) { - type(other.getType()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - domain(other.getDomain()); - audience(other.getAudience()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ClientIdStage type(@NotNull FlowsVaultConnectioSetupTypeOauthAppEnum type) { - this.type = Objects.requireNonNull(type, "type 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 DomainStage clientSecret(@NotNull String clientSecret) { - this.clientSecret = Objects.requireNonNull(clientSecret, "clientSecret must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("domain") - public _FinalStage domain(@NotNull String domain) { - this.domain = Objects.requireNonNull(domain, "domain must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage audience(String audience) { - this.audience = Optional.ofNullable(audience); - return this; - } - - @java.lang.Override - @JsonSetter(value = "audience", nulls = Nulls.SKIP) - public _FinalStage audience(Optional audience) { - this.audience = audience; - return this; - } - - @java.lang.Override - public FlowsVaultConnectioSetupOauthApp build() { - return new FlowsVaultConnectioSetupOauthApp( - type, clientId, clientSecret, domain, audience, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupOauthCode.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupOauthCode.java deleted file mode 100644 index b130fead4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupOauthCode.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowsVaultConnectioSetupOauthCode.Builder.class) -public final class FlowsVaultConnectioSetupOauthCode { - private final Optional type; - - private final Optional code; - - private final Map additionalProperties; - - private FlowsVaultConnectioSetupOauthCode( - Optional type, - Optional code, - Map additionalProperties) { - this.type = type; - this.code = code; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - @JsonProperty("code") - public Optional getCode() { - return code; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectioSetupOauthCode && equalTo((FlowsVaultConnectioSetupOauthCode) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectioSetupOauthCode other) { - return type.equals(other.type) && code.equals(other.code); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.code); - } - - @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 type = Optional.empty(); - - private Optional code = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FlowsVaultConnectioSetupOauthCode other) { - type(other.getType()); - code(other.getCode()); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(FlowsVaultConnectioSetupTypeOauthCodeEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - @JsonSetter(value = "code", nulls = Nulls.SKIP) - public Builder code(Optional code) { - this.code = code; - return this; - } - - public Builder code(String code) { - this.code = Optional.ofNullable(code); - return this; - } - - public FlowsVaultConnectioSetupOauthCode build() { - return new FlowsVaultConnectioSetupOauthCode(type, code, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupSecretApiKey.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupSecretApiKey.java deleted file mode 100644 index 1e7d81846..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupSecretApiKey.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowsVaultConnectioSetupSecretApiKey.Builder.class) -public final class FlowsVaultConnectioSetupSecretApiKey { - private final FlowsVaultConnectioSetupTypeApiKeyEnum type; - - private final String secretKey; - - private final Map additionalProperties; - - private FlowsVaultConnectioSetupSecretApiKey( - FlowsVaultConnectioSetupTypeApiKeyEnum type, String secretKey, Map additionalProperties) { - this.type = type; - this.secretKey = secretKey; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FlowsVaultConnectioSetupTypeApiKeyEnum getType() { - return type; - } - - @JsonProperty("secret_key") - public String getSecretKey() { - return secretKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectioSetupSecretApiKey - && equalTo((FlowsVaultConnectioSetupSecretApiKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectioSetupSecretApiKey other) { - return type.equals(other.type) && secretKey.equals(other.secretKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.secretKey); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - SecretKeyStage type(@NotNull FlowsVaultConnectioSetupTypeApiKeyEnum type); - - Builder from(FlowsVaultConnectioSetupSecretApiKey other); - } - - public interface SecretKeyStage { - _FinalStage secretKey(@NotNull String secretKey); - } - - public interface _FinalStage { - FlowsVaultConnectioSetupSecretApiKey build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, SecretKeyStage, _FinalStage { - private FlowsVaultConnectioSetupTypeApiKeyEnum type; - - private String secretKey; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowsVaultConnectioSetupSecretApiKey other) { - type(other.getType()); - secretKey(other.getSecretKey()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public SecretKeyStage type(@NotNull FlowsVaultConnectioSetupTypeApiKeyEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("secret_key") - public _FinalStage secretKey(@NotNull String secretKey) { - this.secretKey = Objects.requireNonNull(secretKey, "secretKey must not be null"); - return this; - } - - @java.lang.Override - public FlowsVaultConnectioSetupSecretApiKey build() { - return new FlowsVaultConnectioSetupSecretApiKey(type, secretKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupStripeKeyPair.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupStripeKeyPair.java deleted file mode 100644 index 0c8751940..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupStripeKeyPair.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowsVaultConnectioSetupStripeKeyPair.Builder.class) -public final class FlowsVaultConnectioSetupStripeKeyPair { - private final FlowsVaultConnectioSetupTypeKeyPairEnum type; - - private final String privateKey; - - private final String publicKey; - - private final Map additionalProperties; - - private FlowsVaultConnectioSetupStripeKeyPair( - FlowsVaultConnectioSetupTypeKeyPairEnum type, - String privateKey, - String publicKey, - Map additionalProperties) { - this.type = type; - this.privateKey = privateKey; - this.publicKey = publicKey; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FlowsVaultConnectioSetupTypeKeyPairEnum getType() { - return type; - } - - @JsonProperty("private_key") - public String getPrivateKey() { - return privateKey; - } - - @JsonProperty("public_key") - public String getPublicKey() { - return publicKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectioSetupStripeKeyPair - && equalTo((FlowsVaultConnectioSetupStripeKeyPair) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectioSetupStripeKeyPair other) { - return type.equals(other.type) && privateKey.equals(other.privateKey) && publicKey.equals(other.publicKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.privateKey, this.publicKey); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - PrivateKeyStage type(@NotNull FlowsVaultConnectioSetupTypeKeyPairEnum type); - - Builder from(FlowsVaultConnectioSetupStripeKeyPair other); - } - - public interface PrivateKeyStage { - PublicKeyStage privateKey(@NotNull String privateKey); - } - - public interface PublicKeyStage { - _FinalStage publicKey(@NotNull String publicKey); - } - - public interface _FinalStage { - FlowsVaultConnectioSetupStripeKeyPair build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, PrivateKeyStage, PublicKeyStage, _FinalStage { - private FlowsVaultConnectioSetupTypeKeyPairEnum type; - - private String privateKey; - - private String publicKey; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowsVaultConnectioSetupStripeKeyPair other) { - type(other.getType()); - privateKey(other.getPrivateKey()); - publicKey(other.getPublicKey()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public PrivateKeyStage type(@NotNull FlowsVaultConnectioSetupTypeKeyPairEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("private_key") - public PublicKeyStage privateKey(@NotNull String privateKey) { - this.privateKey = Objects.requireNonNull(privateKey, "privateKey must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("public_key") - public _FinalStage publicKey(@NotNull String publicKey) { - this.publicKey = Objects.requireNonNull(publicKey, "publicKey must not be null"); - return this; - } - - @java.lang.Override - public FlowsVaultConnectioSetupStripeKeyPair build() { - return new FlowsVaultConnectioSetupStripeKeyPair(type, privateKey, publicKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupToken.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupToken.java deleted file mode 100644 index 39c9aee83..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupToken.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowsVaultConnectioSetupToken.Builder.class) -public final class FlowsVaultConnectioSetupToken { - private final FlowsVaultConnectioSetupTypeTokenEnum type; - - private final String token; - - private final Map additionalProperties; - - private FlowsVaultConnectioSetupToken( - FlowsVaultConnectioSetupTypeTokenEnum type, String token, Map additionalProperties) { - this.type = type; - this.token = token; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FlowsVaultConnectioSetupTypeTokenEnum getType() { - return type; - } - - @JsonProperty("token") - public String getToken() { - return token; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectioSetupToken && equalTo((FlowsVaultConnectioSetupToken) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectioSetupToken other) { - return type.equals(other.type) && token.equals(other.token); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.token); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - TokenStage type(@NotNull FlowsVaultConnectioSetupTypeTokenEnum type); - - Builder from(FlowsVaultConnectioSetupToken other); - } - - public interface TokenStage { - _FinalStage token(@NotNull String token); - } - - public interface _FinalStage { - FlowsVaultConnectioSetupToken build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, TokenStage, _FinalStage { - private FlowsVaultConnectioSetupTypeTokenEnum type; - - private String token; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowsVaultConnectioSetupToken other) { - type(other.getType()); - token(other.getToken()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public TokenStage type(@NotNull FlowsVaultConnectioSetupTypeTokenEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("token") - public _FinalStage token(@NotNull String token) { - this.token = Objects.requireNonNull(token, "token must not be null"); - return this; - } - - @java.lang.Override - public FlowsVaultConnectioSetupToken build() { - return new FlowsVaultConnectioSetupToken(type, token, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTwilioApiKey.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTwilioApiKey.java deleted file mode 100644 index fbdb08489..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTwilioApiKey.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowsVaultConnectioSetupTwilioApiKey.Builder.class) -public final class FlowsVaultConnectioSetupTwilioApiKey { - private final FlowsVaultConnectioSetupTypeApiKeyEnum type; - - private final String accountId; - - private final String apiKey; - - private final Map additionalProperties; - - private FlowsVaultConnectioSetupTwilioApiKey( - FlowsVaultConnectioSetupTypeApiKeyEnum type, - String accountId, - String apiKey, - Map additionalProperties) { - this.type = type; - this.accountId = accountId; - this.apiKey = apiKey; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FlowsVaultConnectioSetupTypeApiKeyEnum getType() { - return type; - } - - @JsonProperty("account_id") - public String getAccountId() { - return accountId; - } - - @JsonProperty("api_key") - public String getApiKey() { - return apiKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectioSetupTwilioApiKey - && equalTo((FlowsVaultConnectioSetupTwilioApiKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectioSetupTwilioApiKey other) { - return type.equals(other.type) && accountId.equals(other.accountId) && apiKey.equals(other.apiKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.accountId, this.apiKey); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - AccountIdStage type(@NotNull FlowsVaultConnectioSetupTypeApiKeyEnum type); - - Builder from(FlowsVaultConnectioSetupTwilioApiKey other); - } - - public interface AccountIdStage { - ApiKeyStage accountId(@NotNull String accountId); - } - - public interface ApiKeyStage { - _FinalStage apiKey(@NotNull String apiKey); - } - - public interface _FinalStage { - FlowsVaultConnectioSetupTwilioApiKey build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, AccountIdStage, ApiKeyStage, _FinalStage { - private FlowsVaultConnectioSetupTypeApiKeyEnum type; - - private String accountId; - - private String apiKey; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowsVaultConnectioSetupTwilioApiKey other) { - type(other.getType()); - accountId(other.getAccountId()); - apiKey(other.getApiKey()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public AccountIdStage type(@NotNull FlowsVaultConnectioSetupTypeApiKeyEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("account_id") - public ApiKeyStage accountId(@NotNull String accountId) { - this.accountId = Objects.requireNonNull(accountId, "accountId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("api_key") - public _FinalStage apiKey(@NotNull String apiKey) { - this.apiKey = Objects.requireNonNull(apiKey, "apiKey must not be null"); - return this; - } - - @java.lang.Override - public FlowsVaultConnectioSetupTwilioApiKey build() { - return new FlowsVaultConnectioSetupTwilioApiKey(type, accountId, apiKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeApiKeyEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeApiKeyEnum.java deleted file mode 100644 index ea35cb8aa..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeApiKeyEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectioSetupTypeApiKeyEnum { - public static final FlowsVaultConnectioSetupTypeApiKeyEnum API_KEY = - new FlowsVaultConnectioSetupTypeApiKeyEnum(Value.API_KEY, "API_KEY"); - - private final Value value; - - private final String string; - - FlowsVaultConnectioSetupTypeApiKeyEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectioSetupTypeApiKeyEnum - && this.string.equals(((FlowsVaultConnectioSetupTypeApiKeyEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case API_KEY: - return visitor.visitApiKey(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectioSetupTypeApiKeyEnum valueOf(String value) { - switch (value) { - case "API_KEY": - return API_KEY; - default: - return new FlowsVaultConnectioSetupTypeApiKeyEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - API_KEY, - - UNKNOWN - } - - public interface Visitor { - T visitApiKey(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeBearerEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeBearerEnum.java deleted file mode 100644 index 8f77394d1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeBearerEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectioSetupTypeBearerEnum { - public static final FlowsVaultConnectioSetupTypeBearerEnum BEARER = - new FlowsVaultConnectioSetupTypeBearerEnum(Value.BEARER, "BEARER"); - - private final Value value; - - private final String string; - - FlowsVaultConnectioSetupTypeBearerEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectioSetupTypeBearerEnum - && this.string.equals(((FlowsVaultConnectioSetupTypeBearerEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case BEARER: - return visitor.visitBearer(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectioSetupTypeBearerEnum valueOf(String value) { - switch (value) { - case "BEARER": - return BEARER; - default: - return new FlowsVaultConnectioSetupTypeBearerEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - BEARER, - - UNKNOWN - } - - public interface Visitor { - T visitBearer(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeJwtEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeJwtEnum.java deleted file mode 100644 index 298f8686a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeJwtEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectioSetupTypeJwtEnum { - public static final FlowsVaultConnectioSetupTypeJwtEnum JWT = - new FlowsVaultConnectioSetupTypeJwtEnum(Value.JWT, "JWT"); - - private final Value value; - - private final String string; - - FlowsVaultConnectioSetupTypeJwtEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectioSetupTypeJwtEnum - && this.string.equals(((FlowsVaultConnectioSetupTypeJwtEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case JWT: - return visitor.visitJwt(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectioSetupTypeJwtEnum valueOf(String value) { - switch (value) { - case "JWT": - return JWT; - default: - return new FlowsVaultConnectioSetupTypeJwtEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - JWT, - - UNKNOWN - } - - public interface Visitor { - T visitJwt(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeKeyPairEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeKeyPairEnum.java deleted file mode 100644 index 716a97dc9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeKeyPairEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectioSetupTypeKeyPairEnum { - public static final FlowsVaultConnectioSetupTypeKeyPairEnum KEY_PAIR = - new FlowsVaultConnectioSetupTypeKeyPairEnum(Value.KEY_PAIR, "KEY_PAIR"); - - private final Value value; - - private final String string; - - FlowsVaultConnectioSetupTypeKeyPairEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectioSetupTypeKeyPairEnum - && this.string.equals(((FlowsVaultConnectioSetupTypeKeyPairEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case KEY_PAIR: - return visitor.visitKeyPair(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectioSetupTypeKeyPairEnum valueOf(String value) { - switch (value) { - case "KEY_PAIR": - return KEY_PAIR; - default: - return new FlowsVaultConnectioSetupTypeKeyPairEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - KEY_PAIR, - - UNKNOWN - } - - public interface Visitor { - T visitKeyPair(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeOauthAppEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeOauthAppEnum.java deleted file mode 100644 index fbf7e0a13..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeOauthAppEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectioSetupTypeOauthAppEnum { - public static final FlowsVaultConnectioSetupTypeOauthAppEnum OAUTH_APP = - new FlowsVaultConnectioSetupTypeOauthAppEnum(Value.OAUTH_APP, "OAUTH_APP"); - - private final Value value; - - private final String string; - - FlowsVaultConnectioSetupTypeOauthAppEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectioSetupTypeOauthAppEnum - && this.string.equals(((FlowsVaultConnectioSetupTypeOauthAppEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case OAUTH_APP: - return visitor.visitOauthApp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectioSetupTypeOauthAppEnum valueOf(String value) { - switch (value) { - case "OAUTH_APP": - return OAUTH_APP; - default: - return new FlowsVaultConnectioSetupTypeOauthAppEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - OAUTH_APP, - - UNKNOWN - } - - public interface Visitor { - T visitOauthApp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeOauthCodeEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeOauthCodeEnum.java deleted file mode 100644 index e64948e4e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeOauthCodeEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectioSetupTypeOauthCodeEnum { - public static final FlowsVaultConnectioSetupTypeOauthCodeEnum OAUTH_CODE = - new FlowsVaultConnectioSetupTypeOauthCodeEnum(Value.OAUTH_CODE, "OAUTH_CODE"); - - private final Value value; - - private final String string; - - FlowsVaultConnectioSetupTypeOauthCodeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectioSetupTypeOauthCodeEnum - && this.string.equals(((FlowsVaultConnectioSetupTypeOauthCodeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case OAUTH_CODE: - return visitor.visitOauthCode(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectioSetupTypeOauthCodeEnum valueOf(String value) { - switch (value) { - case "OAUTH_CODE": - return OAUTH_CODE; - default: - return new FlowsVaultConnectioSetupTypeOauthCodeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - OAUTH_CODE, - - UNKNOWN - } - - public interface Visitor { - T visitOauthCode(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeOauthJwtEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeOauthJwtEnum.java deleted file mode 100644 index 33ba1064d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeOauthJwtEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectioSetupTypeOauthJwtEnum { - public static final FlowsVaultConnectioSetupTypeOauthJwtEnum OAUTH_JWT = - new FlowsVaultConnectioSetupTypeOauthJwtEnum(Value.OAUTH_JWT, "OAUTH_JWT"); - - private final Value value; - - private final String string; - - FlowsVaultConnectioSetupTypeOauthJwtEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectioSetupTypeOauthJwtEnum - && this.string.equals(((FlowsVaultConnectioSetupTypeOauthJwtEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case OAUTH_JWT: - return visitor.visitOauthJwt(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectioSetupTypeOauthJwtEnum valueOf(String value) { - switch (value) { - case "OAUTH_JWT": - return OAUTH_JWT; - default: - return new FlowsVaultConnectioSetupTypeOauthJwtEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - OAUTH_JWT, - - UNKNOWN - } - - public interface Visitor { - T visitOauthJwt(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeTokenEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeTokenEnum.java deleted file mode 100644 index 812d0ccf8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeTokenEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectioSetupTypeTokenEnum { - public static final FlowsVaultConnectioSetupTypeTokenEnum TOKEN = - new FlowsVaultConnectioSetupTypeTokenEnum(Value.TOKEN, "TOKEN"); - - private final Value value; - - private final String string; - - FlowsVaultConnectioSetupTypeTokenEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectioSetupTypeTokenEnum - && this.string.equals(((FlowsVaultConnectioSetupTypeTokenEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TOKEN: - return visitor.visitToken(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectioSetupTypeTokenEnum valueOf(String value) { - switch (value) { - case "TOKEN": - return TOKEN; - default: - return new FlowsVaultConnectioSetupTypeTokenEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - TOKEN, - - UNKNOWN - } - - public interface Visitor { - T visitToken(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeWebhookEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeWebhookEnum.java deleted file mode 100644 index be64fb230..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupTypeWebhookEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectioSetupTypeWebhookEnum { - public static final FlowsVaultConnectioSetupTypeWebhookEnum WEBHOOK = - new FlowsVaultConnectioSetupTypeWebhookEnum(Value.WEBHOOK, "WEBHOOK"); - - private final Value value; - - private final String string; - - FlowsVaultConnectioSetupTypeWebhookEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectioSetupTypeWebhookEnum - && this.string.equals(((FlowsVaultConnectioSetupTypeWebhookEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case WEBHOOK: - return visitor.visitWebhook(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectioSetupTypeWebhookEnum valueOf(String value) { - switch (value) { - case "WEBHOOK": - return WEBHOOK; - default: - return new FlowsVaultConnectioSetupTypeWebhookEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - WEBHOOK, - - UNKNOWN - } - - public interface Visitor { - T visitWebhook(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupWebhook.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupWebhook.java deleted file mode 100644 index 8d2c5c857..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectioSetupWebhook.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowsVaultConnectioSetupWebhook.Builder.class) -public final class FlowsVaultConnectioSetupWebhook { - private final FlowsVaultConnectioSetupTypeWebhookEnum type; - - private final String url; - - private final Map additionalProperties; - - private FlowsVaultConnectioSetupWebhook( - FlowsVaultConnectioSetupTypeWebhookEnum type, String url, Map additionalProperties) { - this.type = type; - this.url = url; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FlowsVaultConnectioSetupTypeWebhookEnum getType() { - return type; - } - - @JsonProperty("url") - public String getUrl() { - return url; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectioSetupWebhook && equalTo((FlowsVaultConnectioSetupWebhook) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectioSetupWebhook other) { - return type.equals(other.type) && url.equals(other.url); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.url); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - UrlStage type(@NotNull FlowsVaultConnectioSetupTypeWebhookEnum type); - - Builder from(FlowsVaultConnectioSetupWebhook other); - } - - public interface UrlStage { - _FinalStage url(@NotNull String url); - } - - public interface _FinalStage { - FlowsVaultConnectioSetupWebhook build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, UrlStage, _FinalStage { - private FlowsVaultConnectioSetupTypeWebhookEnum type; - - private String url; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowsVaultConnectioSetupWebhook other) { - type(other.getType()); - url(other.getUrl()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public UrlStage type(@NotNull FlowsVaultConnectioSetupTypeWebhookEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("url") - public _FinalStage url(@NotNull String url) { - this.url = Objects.requireNonNull(url, "url must not be null"); - return this; - } - - @java.lang.Override - public FlowsVaultConnectioSetupWebhook build() { - return new FlowsVaultConnectioSetupWebhook(type, url, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdActivecampaignEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdActivecampaignEnum.java deleted file mode 100644 index 18ac7de16..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdActivecampaignEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdActivecampaignEnum { - public static final FlowsVaultConnectionAppIdActivecampaignEnum ACTIVECAMPAIGN = - new FlowsVaultConnectionAppIdActivecampaignEnum(Value.ACTIVECAMPAIGN, "ACTIVECAMPAIGN"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdActivecampaignEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdActivecampaignEnum - && this.string.equals(((FlowsVaultConnectionAppIdActivecampaignEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ACTIVECAMPAIGN: - return visitor.visitActivecampaign(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdActivecampaignEnum valueOf(String value) { - switch (value) { - case "ACTIVECAMPAIGN": - return ACTIVECAMPAIGN; - default: - return new FlowsVaultConnectionAppIdActivecampaignEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - ACTIVECAMPAIGN, - - UNKNOWN - } - - public interface Visitor { - T visitActivecampaign(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdAirtableEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdAirtableEnum.java deleted file mode 100644 index f75c02ab9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdAirtableEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdAirtableEnum { - public static final FlowsVaultConnectionAppIdAirtableEnum AIRTABLE = - new FlowsVaultConnectionAppIdAirtableEnum(Value.AIRTABLE, "AIRTABLE"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdAirtableEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdAirtableEnum - && this.string.equals(((FlowsVaultConnectionAppIdAirtableEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AIRTABLE: - return visitor.visitAirtable(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdAirtableEnum valueOf(String value) { - switch (value) { - case "AIRTABLE": - return AIRTABLE; - default: - return new FlowsVaultConnectionAppIdAirtableEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AIRTABLE, - - UNKNOWN - } - - public interface Visitor { - T visitAirtable(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdAuth0Enum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdAuth0Enum.java deleted file mode 100644 index 1e55b8302..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdAuth0Enum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdAuth0Enum { - public static final FlowsVaultConnectionAppIdAuth0Enum AUTH0 = - new FlowsVaultConnectionAppIdAuth0Enum(Value.AUTH0, "AUTH0"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdAuth0Enum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdAuth0Enum - && this.string.equals(((FlowsVaultConnectionAppIdAuth0Enum) 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 FlowsVaultConnectionAppIdAuth0Enum valueOf(String value) { - switch (value) { - case "AUTH0": - return AUTH0; - default: - return new FlowsVaultConnectionAppIdAuth0Enum(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/FlowsVaultConnectionAppIdBigqueryEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdBigqueryEnum.java deleted file mode 100644 index 12d24794d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdBigqueryEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdBigqueryEnum { - public static final FlowsVaultConnectionAppIdBigqueryEnum BIGQUERY = - new FlowsVaultConnectionAppIdBigqueryEnum(Value.BIGQUERY, "BIGQUERY"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdBigqueryEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdBigqueryEnum - && this.string.equals(((FlowsVaultConnectionAppIdBigqueryEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case BIGQUERY: - return visitor.visitBigquery(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdBigqueryEnum valueOf(String value) { - switch (value) { - case "BIGQUERY": - return BIGQUERY; - default: - return new FlowsVaultConnectionAppIdBigqueryEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - BIGQUERY, - - UNKNOWN - } - - public interface Visitor { - T visitBigquery(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdClearbitEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdClearbitEnum.java deleted file mode 100644 index aa4b8555e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdClearbitEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdClearbitEnum { - public static final FlowsVaultConnectionAppIdClearbitEnum CLEARBIT = - new FlowsVaultConnectionAppIdClearbitEnum(Value.CLEARBIT, "CLEARBIT"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdClearbitEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdClearbitEnum - && this.string.equals(((FlowsVaultConnectionAppIdClearbitEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CLEARBIT: - return visitor.visitClearbit(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdClearbitEnum valueOf(String value) { - switch (value) { - case "CLEARBIT": - return CLEARBIT; - default: - return new FlowsVaultConnectionAppIdClearbitEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - CLEARBIT, - - UNKNOWN - } - - public interface Visitor { - T visitClearbit(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdDocusignEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdDocusignEnum.java deleted file mode 100644 index c25abd453..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdDocusignEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdDocusignEnum { - public static final FlowsVaultConnectionAppIdDocusignEnum DOCUSIGN = - new FlowsVaultConnectionAppIdDocusignEnum(Value.DOCUSIGN, "DOCUSIGN"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdDocusignEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdDocusignEnum - && this.string.equals(((FlowsVaultConnectionAppIdDocusignEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DOCUSIGN: - return visitor.visitDocusign(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdDocusignEnum valueOf(String value) { - switch (value) { - case "DOCUSIGN": - return DOCUSIGN; - default: - return new FlowsVaultConnectionAppIdDocusignEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - DOCUSIGN, - - UNKNOWN - } - - public interface Visitor { - T visitDocusign(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdGoogleSheetsEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdGoogleSheetsEnum.java deleted file mode 100644 index 1796990e6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdGoogleSheetsEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdGoogleSheetsEnum { - public static final FlowsVaultConnectionAppIdGoogleSheetsEnum GOOGLE_SHEETS = - new FlowsVaultConnectionAppIdGoogleSheetsEnum(Value.GOOGLE_SHEETS, "GOOGLE_SHEETS"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdGoogleSheetsEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdGoogleSheetsEnum - && this.string.equals(((FlowsVaultConnectionAppIdGoogleSheetsEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GOOGLE_SHEETS: - return visitor.visitGoogleSheets(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdGoogleSheetsEnum valueOf(String value) { - switch (value) { - case "GOOGLE_SHEETS": - return GOOGLE_SHEETS; - default: - return new FlowsVaultConnectionAppIdGoogleSheetsEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - GOOGLE_SHEETS, - - UNKNOWN - } - - public interface Visitor { - T visitGoogleSheets(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdHttpEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdHttpEnum.java deleted file mode 100644 index d45dab2e1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdHttpEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdHttpEnum { - public static final FlowsVaultConnectionAppIdHttpEnum HTTP = - new FlowsVaultConnectionAppIdHttpEnum(Value.HTTP, "HTTP"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdHttpEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdHttpEnum - && this.string.equals(((FlowsVaultConnectionAppIdHttpEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case HTTP: - return visitor.visitHttp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdHttpEnum valueOf(String value) { - switch (value) { - case "HTTP": - return HTTP; - default: - return new FlowsVaultConnectionAppIdHttpEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - HTTP, - - UNKNOWN - } - - public interface Visitor { - T visitHttp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdHubspotEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdHubspotEnum.java deleted file mode 100644 index bafa2d1d7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdHubspotEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdHubspotEnum { - public static final FlowsVaultConnectionAppIdHubspotEnum HUBSPOT = - new FlowsVaultConnectionAppIdHubspotEnum(Value.HUBSPOT, "HUBSPOT"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdHubspotEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdHubspotEnum - && this.string.equals(((FlowsVaultConnectionAppIdHubspotEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case HUBSPOT: - return visitor.visitHubspot(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdHubspotEnum valueOf(String value) { - switch (value) { - case "HUBSPOT": - return HUBSPOT; - default: - return new FlowsVaultConnectionAppIdHubspotEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - HUBSPOT, - - UNKNOWN - } - - public interface Visitor { - T visitHubspot(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdJwtEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdJwtEnum.java deleted file mode 100644 index 2679e3bf3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdJwtEnum.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdJwtEnum { - public static final FlowsVaultConnectionAppIdJwtEnum JWT = new FlowsVaultConnectionAppIdJwtEnum(Value.JWT, "JWT"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdJwtEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdJwtEnum - && this.string.equals(((FlowsVaultConnectionAppIdJwtEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case JWT: - return visitor.visitJwt(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdJwtEnum valueOf(String value) { - switch (value) { - case "JWT": - return JWT; - default: - return new FlowsVaultConnectionAppIdJwtEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - JWT, - - UNKNOWN - } - - public interface Visitor { - T visitJwt(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdMailchimpEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdMailchimpEnum.java deleted file mode 100644 index e411c06bf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdMailchimpEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdMailchimpEnum { - public static final FlowsVaultConnectionAppIdMailchimpEnum MAILCHIMP = - new FlowsVaultConnectionAppIdMailchimpEnum(Value.MAILCHIMP, "MAILCHIMP"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdMailchimpEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdMailchimpEnum - && this.string.equals(((FlowsVaultConnectionAppIdMailchimpEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MAILCHIMP: - return visitor.visitMailchimp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdMailchimpEnum valueOf(String value) { - switch (value) { - case "MAILCHIMP": - return MAILCHIMP; - default: - return new FlowsVaultConnectionAppIdMailchimpEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - MAILCHIMP, - - UNKNOWN - } - - public interface Visitor { - T visitMailchimp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdMailjetEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdMailjetEnum.java deleted file mode 100644 index 35385bd92..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdMailjetEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdMailjetEnum { - public static final FlowsVaultConnectionAppIdMailjetEnum MAILJET = - new FlowsVaultConnectionAppIdMailjetEnum(Value.MAILJET, "MAILJET"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdMailjetEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdMailjetEnum - && this.string.equals(((FlowsVaultConnectionAppIdMailjetEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MAILJET: - return visitor.visitMailjet(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdMailjetEnum valueOf(String value) { - switch (value) { - case "MAILJET": - return MAILJET; - default: - return new FlowsVaultConnectionAppIdMailjetEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - MAILJET, - - UNKNOWN - } - - public interface Visitor { - T visitMailjet(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdPipedriveEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdPipedriveEnum.java deleted file mode 100644 index 29c7dd625..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdPipedriveEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdPipedriveEnum { - public static final FlowsVaultConnectionAppIdPipedriveEnum PIPEDRIVE = - new FlowsVaultConnectionAppIdPipedriveEnum(Value.PIPEDRIVE, "PIPEDRIVE"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdPipedriveEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdPipedriveEnum - && this.string.equals(((FlowsVaultConnectionAppIdPipedriveEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PIPEDRIVE: - return visitor.visitPipedrive(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdPipedriveEnum valueOf(String value) { - switch (value) { - case "PIPEDRIVE": - return PIPEDRIVE; - default: - return new FlowsVaultConnectionAppIdPipedriveEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PIPEDRIVE, - - UNKNOWN - } - - public interface Visitor { - T visitPipedrive(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdSalesforceEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdSalesforceEnum.java deleted file mode 100644 index 7ed8005a3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdSalesforceEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdSalesforceEnum { - public static final FlowsVaultConnectionAppIdSalesforceEnum SALESFORCE = - new FlowsVaultConnectionAppIdSalesforceEnum(Value.SALESFORCE, "SALESFORCE"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdSalesforceEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdSalesforceEnum - && this.string.equals(((FlowsVaultConnectionAppIdSalesforceEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SALESFORCE: - return visitor.visitSalesforce(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdSalesforceEnum valueOf(String value) { - switch (value) { - case "SALESFORCE": - return SALESFORCE; - default: - return new FlowsVaultConnectionAppIdSalesforceEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - SALESFORCE, - - UNKNOWN - } - - public interface Visitor { - T visitSalesforce(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdSendgridEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdSendgridEnum.java deleted file mode 100644 index b7e68abab..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdSendgridEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdSendgridEnum { - public static final FlowsVaultConnectionAppIdSendgridEnum SENDGRID = - new FlowsVaultConnectionAppIdSendgridEnum(Value.SENDGRID, "SENDGRID"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdSendgridEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdSendgridEnum - && this.string.equals(((FlowsVaultConnectionAppIdSendgridEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SENDGRID: - return visitor.visitSendgrid(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdSendgridEnum valueOf(String value) { - switch (value) { - case "SENDGRID": - return SENDGRID; - default: - return new FlowsVaultConnectionAppIdSendgridEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - SENDGRID, - - UNKNOWN - } - - public interface Visitor { - T visitSendgrid(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdSlackEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdSlackEnum.java deleted file mode 100644 index 42135f417..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdSlackEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdSlackEnum { - public static final FlowsVaultConnectionAppIdSlackEnum SLACK = - new FlowsVaultConnectionAppIdSlackEnum(Value.SLACK, "SLACK"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdSlackEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdSlackEnum - && this.string.equals(((FlowsVaultConnectionAppIdSlackEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SLACK: - return visitor.visitSlack(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdSlackEnum valueOf(String value) { - switch (value) { - case "SLACK": - return SLACK; - default: - return new FlowsVaultConnectionAppIdSlackEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - SLACK, - - UNKNOWN - } - - public interface Visitor { - T visitSlack(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdStripeEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdStripeEnum.java deleted file mode 100644 index 5ac3185f0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdStripeEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdStripeEnum { - public static final FlowsVaultConnectionAppIdStripeEnum STRIPE = - new FlowsVaultConnectionAppIdStripeEnum(Value.STRIPE, "STRIPE"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdStripeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdStripeEnum - && this.string.equals(((FlowsVaultConnectionAppIdStripeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case STRIPE: - return visitor.visitStripe(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdStripeEnum valueOf(String value) { - switch (value) { - case "STRIPE": - return STRIPE; - default: - return new FlowsVaultConnectionAppIdStripeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - STRIPE, - - UNKNOWN - } - - public interface Visitor { - T visitStripe(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdTelegramEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdTelegramEnum.java deleted file mode 100644 index a65eaf5a0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdTelegramEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdTelegramEnum { - public static final FlowsVaultConnectionAppIdTelegramEnum TELEGRAM = - new FlowsVaultConnectionAppIdTelegramEnum(Value.TELEGRAM, "TELEGRAM"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdTelegramEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdTelegramEnum - && this.string.equals(((FlowsVaultConnectionAppIdTelegramEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TELEGRAM: - return visitor.visitTelegram(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdTelegramEnum valueOf(String value) { - switch (value) { - case "TELEGRAM": - return TELEGRAM; - default: - return new FlowsVaultConnectionAppIdTelegramEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - TELEGRAM, - - UNKNOWN - } - - public interface Visitor { - T visitTelegram(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdTwilioEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdTwilioEnum.java deleted file mode 100644 index fccc2ac54..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdTwilioEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdTwilioEnum { - public static final FlowsVaultConnectionAppIdTwilioEnum TWILIO = - new FlowsVaultConnectionAppIdTwilioEnum(Value.TWILIO, "TWILIO"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdTwilioEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdTwilioEnum - && this.string.equals(((FlowsVaultConnectionAppIdTwilioEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TWILIO: - return visitor.visitTwilio(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdTwilioEnum valueOf(String value) { - switch (value) { - case "TWILIO": - return TWILIO; - default: - return new FlowsVaultConnectionAppIdTwilioEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - TWILIO, - - UNKNOWN - } - - public interface Visitor { - T visitTwilio(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdWhatsappEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdWhatsappEnum.java deleted file mode 100644 index 3d437b93f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdWhatsappEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdWhatsappEnum { - public static final FlowsVaultConnectionAppIdWhatsappEnum WHATSAPP = - new FlowsVaultConnectionAppIdWhatsappEnum(Value.WHATSAPP, "WHATSAPP"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdWhatsappEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdWhatsappEnum - && this.string.equals(((FlowsVaultConnectionAppIdWhatsappEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case WHATSAPP: - return visitor.visitWhatsapp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdWhatsappEnum valueOf(String value) { - switch (value) { - case "WHATSAPP": - return WHATSAPP; - default: - return new FlowsVaultConnectionAppIdWhatsappEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - WHATSAPP, - - UNKNOWN - } - - public interface Visitor { - T visitWhatsapp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdZapierEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdZapierEnum.java deleted file mode 100644 index 06b0ec303..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionAppIdZapierEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionAppIdZapierEnum { - public static final FlowsVaultConnectionAppIdZapierEnum ZAPIER = - new FlowsVaultConnectionAppIdZapierEnum(Value.ZAPIER, "ZAPIER"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionAppIdZapierEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionAppIdZapierEnum - && this.string.equals(((FlowsVaultConnectionAppIdZapierEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ZAPIER: - return visitor.visitZapier(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionAppIdZapierEnum valueOf(String value) { - switch (value) { - case "ZAPIER": - return ZAPIER; - default: - return new FlowsVaultConnectionAppIdZapierEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - ZAPIER, - - UNKNOWN - } - - public interface Visitor { - T visitZapier(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionHttpApiKeySetup.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionHttpApiKeySetup.java deleted file mode 100644 index 3e593b907..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionHttpApiKeySetup.java +++ /dev/null @@ -1,174 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FlowsVaultConnectionHttpApiKeySetup.Builder.class) -public final class FlowsVaultConnectionHttpApiKeySetup { - private final FlowsVaultConnectionSetupTypeApiKeyEnum type; - - private final String name; - - private final String value; - - private final FlowsVaultConnectionHttpApiKeySetupInEnum in; - - private final Map additionalProperties; - - private FlowsVaultConnectionHttpApiKeySetup( - FlowsVaultConnectionSetupTypeApiKeyEnum type, - String name, - String value, - FlowsVaultConnectionHttpApiKeySetupInEnum in, - Map additionalProperties) { - this.type = type; - this.name = name; - this.value = value; - this.in = in; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FlowsVaultConnectionSetupTypeApiKeyEnum getType() { - return type; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("value") - public String getValue() { - return value; - } - - @JsonProperty("in") - public FlowsVaultConnectionHttpApiKeySetupInEnum getIn() { - return in; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectionHttpApiKeySetup - && equalTo((FlowsVaultConnectionHttpApiKeySetup) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectionHttpApiKeySetup other) { - return type.equals(other.type) && name.equals(other.name) && value.equals(other.value) && in.equals(other.in); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.name, this.value, this.in); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - NameStage type(@NotNull FlowsVaultConnectionSetupTypeApiKeyEnum type); - - Builder from(FlowsVaultConnectionHttpApiKeySetup other); - } - - public interface NameStage { - ValueStage name(@NotNull String name); - } - - public interface ValueStage { - InStage value(@NotNull String value); - } - - public interface InStage { - _FinalStage in(@NotNull FlowsVaultConnectionHttpApiKeySetupInEnum in); - } - - public interface _FinalStage { - FlowsVaultConnectionHttpApiKeySetup build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, NameStage, ValueStage, InStage, _FinalStage { - private FlowsVaultConnectionSetupTypeApiKeyEnum type; - - private String name; - - private String value; - - private FlowsVaultConnectionHttpApiKeySetupInEnum in; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowsVaultConnectionHttpApiKeySetup other) { - type(other.getType()); - name(other.getName()); - value(other.getValue()); - in(other.getIn()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public NameStage type(@NotNull FlowsVaultConnectionSetupTypeApiKeyEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public ValueStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("value") - public InStage value(@NotNull String value) { - this.value = Objects.requireNonNull(value, "value must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("in") - public _FinalStage in(@NotNull FlowsVaultConnectionHttpApiKeySetupInEnum in) { - this.in = Objects.requireNonNull(in, "in must not be null"); - return this; - } - - @java.lang.Override - public FlowsVaultConnectionHttpApiKeySetup build() { - return new FlowsVaultConnectionHttpApiKeySetup(type, name, value, in, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionHttpApiKeySetupInEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionHttpApiKeySetupInEnum.java deleted file mode 100644 index e2f8c9fbd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionHttpApiKeySetupInEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionHttpApiKeySetupInEnum { - public static final FlowsVaultConnectionHttpApiKeySetupInEnum QUERY = - new FlowsVaultConnectionHttpApiKeySetupInEnum(Value.QUERY, "QUERY"); - - public static final FlowsVaultConnectionHttpApiKeySetupInEnum HEADER = - new FlowsVaultConnectionHttpApiKeySetupInEnum(Value.HEADER, "HEADER"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionHttpApiKeySetupInEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionHttpApiKeySetupInEnum - && this.string.equals(((FlowsVaultConnectionHttpApiKeySetupInEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case QUERY: - return visitor.visitQuery(); - case HEADER: - return visitor.visitHeader(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionHttpApiKeySetupInEnum valueOf(String value) { - switch (value) { - case "QUERY": - return QUERY; - case "HEADER": - return HEADER; - default: - return new FlowsVaultConnectionHttpApiKeySetupInEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - HEADER, - - QUERY, - - UNKNOWN - } - - public interface Visitor { - T visitHeader(); - - T visitQuery(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionHttpBasicAuthSetup.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionHttpBasicAuthSetup.java deleted file mode 100644 index 82ec482d5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionHttpBasicAuthSetup.java +++ /dev/null @@ -1,159 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowsVaultConnectionHttpBasicAuthSetup.Builder.class) -public final class FlowsVaultConnectionHttpBasicAuthSetup { - private final FlowsVaultConnectionSetupTypeBasicAuthEnum type; - - private final String username; - - private final Optional password; - - private final Map additionalProperties; - - private FlowsVaultConnectionHttpBasicAuthSetup( - FlowsVaultConnectionSetupTypeBasicAuthEnum type, - String username, - Optional password, - Map additionalProperties) { - this.type = type; - this.username = username; - this.password = password; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FlowsVaultConnectionSetupTypeBasicAuthEnum getType() { - return type; - } - - @JsonProperty("username") - public String getUsername() { - return username; - } - - @JsonProperty("password") - public Optional getPassword() { - return password; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectionHttpBasicAuthSetup - && equalTo((FlowsVaultConnectionHttpBasicAuthSetup) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectionHttpBasicAuthSetup other) { - return type.equals(other.type) && username.equals(other.username) && password.equals(other.password); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.username, this.password); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - UsernameStage type(@NotNull FlowsVaultConnectionSetupTypeBasicAuthEnum type); - - Builder from(FlowsVaultConnectionHttpBasicAuthSetup other); - } - - public interface UsernameStage { - _FinalStage username(@NotNull String username); - } - - public interface _FinalStage { - FlowsVaultConnectionHttpBasicAuthSetup build(); - - _FinalStage password(Optional password); - - _FinalStage password(String password); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, UsernameStage, _FinalStage { - private FlowsVaultConnectionSetupTypeBasicAuthEnum type; - - private String username; - - private Optional password = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowsVaultConnectionHttpBasicAuthSetup other) { - type(other.getType()); - username(other.getUsername()); - password(other.getPassword()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public UsernameStage type(@NotNull FlowsVaultConnectionSetupTypeBasicAuthEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("username") - public _FinalStage username(@NotNull String username) { - this.username = Objects.requireNonNull(username, "username must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage password(String password) { - this.password = Optional.ofNullable(password); - return this; - } - - @java.lang.Override - @JsonSetter(value = "password", nulls = Nulls.SKIP) - public _FinalStage password(Optional password) { - this.password = password; - return this; - } - - @java.lang.Override - public FlowsVaultConnectionHttpBasicAuthSetup build() { - return new FlowsVaultConnectionHttpBasicAuthSetup(type, username, password, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionHttpOauthClientCredentialsSetup.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionHttpOauthClientCredentialsSetup.java deleted file mode 100644 index 83c55fb09..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionHttpOauthClientCredentialsSetup.java +++ /dev/null @@ -1,278 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FlowsVaultConnectionHttpOauthClientCredentialsSetup.Builder.class) -public final class FlowsVaultConnectionHttpOauthClientCredentialsSetup { - private final FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum type; - - private final String clientId; - - private final String clientSecret; - - private final String tokenEndpoint; - - private final Optional audience; - - private final Optional resource; - - private final Optional scope; - - private final Map additionalProperties; - - private FlowsVaultConnectionHttpOauthClientCredentialsSetup( - FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum type, - String clientId, - String clientSecret, - String tokenEndpoint, - Optional audience, - Optional resource, - Optional scope, - Map additionalProperties) { - this.type = type; - this.clientId = clientId; - this.clientSecret = clientSecret; - this.tokenEndpoint = tokenEndpoint; - this.audience = audience; - this.resource = resource; - this.scope = scope; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum getType() { - return type; - } - - @JsonProperty("client_id") - public String getClientId() { - return clientId; - } - - @JsonProperty("client_secret") - public String getClientSecret() { - return clientSecret; - } - - @JsonProperty("token_endpoint") - public String getTokenEndpoint() { - return tokenEndpoint; - } - - @JsonProperty("audience") - public Optional getAudience() { - return audience; - } - - @JsonProperty("resource") - public Optional getResource() { - return resource; - } - - @JsonProperty("scope") - public Optional getScope() { - return scope; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectionHttpOauthClientCredentialsSetup - && equalTo((FlowsVaultConnectionHttpOauthClientCredentialsSetup) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectionHttpOauthClientCredentialsSetup other) { - return type.equals(other.type) - && clientId.equals(other.clientId) - && clientSecret.equals(other.clientSecret) - && tokenEndpoint.equals(other.tokenEndpoint) - && audience.equals(other.audience) - && resource.equals(other.resource) - && scope.equals(other.scope); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.type, - this.clientId, - this.clientSecret, - this.tokenEndpoint, - this.audience, - this.resource, - this.scope); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - ClientIdStage type(@NotNull FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum type); - - Builder from(FlowsVaultConnectionHttpOauthClientCredentialsSetup other); - } - - public interface ClientIdStage { - ClientSecretStage clientId(@NotNull String clientId); - } - - public interface ClientSecretStage { - TokenEndpointStage clientSecret(@NotNull String clientSecret); - } - - public interface TokenEndpointStage { - _FinalStage tokenEndpoint(@NotNull String tokenEndpoint); - } - - public interface _FinalStage { - FlowsVaultConnectionHttpOauthClientCredentialsSetup build(); - - _FinalStage audience(Optional audience); - - _FinalStage audience(String audience); - - _FinalStage resource(Optional resource); - - _FinalStage resource(String resource); - - _FinalStage scope(Optional scope); - - _FinalStage scope(String scope); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements TypeStage, ClientIdStage, ClientSecretStage, TokenEndpointStage, _FinalStage { - private FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum type; - - private String clientId; - - private String clientSecret; - - private String tokenEndpoint; - - private Optional scope = Optional.empty(); - - private Optional resource = Optional.empty(); - - private Optional audience = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowsVaultConnectionHttpOauthClientCredentialsSetup other) { - type(other.getType()); - clientId(other.getClientId()); - clientSecret(other.getClientSecret()); - tokenEndpoint(other.getTokenEndpoint()); - audience(other.getAudience()); - resource(other.getResource()); - scope(other.getScope()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ClientIdStage type(@NotNull FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum type) { - this.type = Objects.requireNonNull(type, "type 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 TokenEndpointStage clientSecret(@NotNull String clientSecret) { - this.clientSecret = Objects.requireNonNull(clientSecret, "clientSecret must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("token_endpoint") - public _FinalStage tokenEndpoint(@NotNull String tokenEndpoint) { - this.tokenEndpoint = Objects.requireNonNull(tokenEndpoint, "tokenEndpoint must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage scope(String scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @java.lang.Override - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public _FinalStage scope(Optional scope) { - this.scope = scope; - return this; - } - - @java.lang.Override - public _FinalStage resource(String resource) { - this.resource = Optional.ofNullable(resource); - return this; - } - - @java.lang.Override - @JsonSetter(value = "resource", nulls = Nulls.SKIP) - public _FinalStage resource(Optional resource) { - this.resource = resource; - return this; - } - - @java.lang.Override - public _FinalStage audience(String audience) { - this.audience = Optional.ofNullable(audience); - return this; - } - - @java.lang.Override - @JsonSetter(value = "audience", nulls = Nulls.SKIP) - public _FinalStage audience(Optional audience) { - this.audience = audience; - return this; - } - - @java.lang.Override - public FlowsVaultConnectionHttpOauthClientCredentialsSetup build() { - return new FlowsVaultConnectionHttpOauthClientCredentialsSetup( - type, clientId, clientSecret, tokenEndpoint, audience, resource, scope, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionSetupTypeApiKeyEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionSetupTypeApiKeyEnum.java deleted file mode 100644 index a8472c065..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionSetupTypeApiKeyEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionSetupTypeApiKeyEnum { - public static final FlowsVaultConnectionSetupTypeApiKeyEnum API_KEY = - new FlowsVaultConnectionSetupTypeApiKeyEnum(Value.API_KEY, "API_KEY"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionSetupTypeApiKeyEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionSetupTypeApiKeyEnum - && this.string.equals(((FlowsVaultConnectionSetupTypeApiKeyEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case API_KEY: - return visitor.visitApiKey(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionSetupTypeApiKeyEnum valueOf(String value) { - switch (value) { - case "API_KEY": - return API_KEY; - default: - return new FlowsVaultConnectionSetupTypeApiKeyEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - API_KEY, - - UNKNOWN - } - - public interface Visitor { - T visitApiKey(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionSetupTypeBasicAuthEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionSetupTypeBasicAuthEnum.java deleted file mode 100644 index 112cf04ab..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionSetupTypeBasicAuthEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionSetupTypeBasicAuthEnum { - public static final FlowsVaultConnectionSetupTypeBasicAuthEnum BASIC_AUTH = - new FlowsVaultConnectionSetupTypeBasicAuthEnum(Value.BASIC_AUTH, "BASIC_AUTH"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionSetupTypeBasicAuthEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionSetupTypeBasicAuthEnum - && this.string.equals(((FlowsVaultConnectionSetupTypeBasicAuthEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case BASIC_AUTH: - return visitor.visitBasicAuth(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionSetupTypeBasicAuthEnum valueOf(String value) { - switch (value) { - case "BASIC_AUTH": - return BASIC_AUTH; - default: - return new FlowsVaultConnectionSetupTypeBasicAuthEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - BASIC_AUTH, - - UNKNOWN - } - - public interface Visitor { - T visitBasicAuth(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum.java deleted file mode 100644 index a630ab3e8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum { - public static final FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum OAUTH_CLIENT_CREDENTIALS = - new FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum( - Value.OAUTH_CLIENT_CREDENTIALS, "OAUTH_CLIENT_CREDENTIALS"); - - private final Value value; - - private final String string; - - FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum - && this.string.equals( - ((FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case OAUTH_CLIENT_CREDENTIALS: - return visitor.visitOauthClientCredentials(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum valueOf(String value) { - switch (value) { - case "OAUTH_CLIENT_CREDENTIALS": - return OAUTH_CLIENT_CREDENTIALS; - default: - return new FlowsVaultConnectionSetupTypeOauthClientCredentialsEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - OAUTH_CLIENT_CREDENTIALS, - - UNKNOWN - } - - public interface Visitor { - T visitOauthClientCredentials(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionSummary.java b/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionSummary.java deleted file mode 100644 index 5aad48008..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FlowsVaultConnectionSummary.java +++ /dev/null @@ -1,430 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = FlowsVaultConnectionSummary.Builder.class) -public final class FlowsVaultConnectionSummary { - private final String id; - - private final String appId; - - private final String name; - - private final Optional accountName; - - private final boolean ready; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional refreshedAt; - - private final String fingerprint; - - private final Map additionalProperties; - - private FlowsVaultConnectionSummary( - String id, - String appId, - String name, - Optional accountName, - boolean ready, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional refreshedAt, - String fingerprint, - Map additionalProperties) { - this.id = id; - this.appId = appId; - this.name = name; - this.accountName = accountName; - this.ready = ready; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.refreshedAt = refreshedAt; - this.fingerprint = fingerprint; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection identifier. - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return Flows Vault Connection app identifier. - */ - @JsonProperty("app_id") - public String getAppId() { - return appId; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return Flows Vault Connection custom account name. - */ - @JsonProperty("account_name") - public Optional getAccountName() { - return accountName; - } - - /** - * @return Whether the Flows Vault Connection is configured. - */ - @JsonProperty("ready") - public boolean getReady() { - return ready; - } - - /** - * @return The ISO 8601 formatted date when this Flows Vault Connection was created. - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return The ISO 8601 formatted date when this Flows Vault Connection was updated. - */ - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - /** - * @return The ISO 8601 formatted date when this Flows Vault Connection was refreshed. - */ - @JsonProperty("refreshed_at") - public Optional getRefreshedAt() { - return refreshedAt; - } - - @JsonProperty("fingerprint") - public String getFingerprint() { - return fingerprint; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FlowsVaultConnectionSummary && equalTo((FlowsVaultConnectionSummary) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FlowsVaultConnectionSummary other) { - return id.equals(other.id) - && appId.equals(other.appId) - && name.equals(other.name) - && accountName.equals(other.accountName) - && ready == other.ready - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && refreshedAt.equals(other.refreshedAt) - && fingerprint.equals(other.fingerprint); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.appId, - this.name, - this.accountName, - this.ready, - this.createdAt, - this.updatedAt, - this.refreshedAt, - this.fingerprint); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

Flows Vault Connection identifier.

- */ - AppIdStage id(@NotNull String id); - - Builder from(FlowsVaultConnectionSummary other); - } - - public interface AppIdStage { - /** - *

Flows Vault Connection app identifier.

- */ - NameStage appId(@NotNull String appId); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - ReadyStage name(@NotNull String name); - } - - public interface ReadyStage { - /** - *

Whether the Flows Vault Connection is configured.

- */ - CreatedAtStage ready(boolean ready); - } - - public interface CreatedAtStage { - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was created.

- */ - UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); - } - - public interface UpdatedAtStage { - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was updated.

- */ - FingerprintStage updatedAt(@NotNull OffsetDateTime updatedAt); - } - - public interface FingerprintStage { - _FinalStage fingerprint(@NotNull String fingerprint); - } - - public interface _FinalStage { - FlowsVaultConnectionSummary build(); - - /** - *

Flows Vault Connection custom account name.

- */ - _FinalStage accountName(Optional accountName); - - _FinalStage accountName(String accountName); - - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was refreshed.

- */ - _FinalStage refreshedAt(Optional refreshedAt); - - _FinalStage refreshedAt(OffsetDateTime refreshedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements IdStage, - AppIdStage, - NameStage, - ReadyStage, - CreatedAtStage, - UpdatedAtStage, - FingerprintStage, - _FinalStage { - private String id; - - private String appId; - - private String name; - - private boolean ready; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private String fingerprint; - - private Optional refreshedAt = Optional.empty(); - - private Optional accountName = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FlowsVaultConnectionSummary other) { - id(other.getId()); - appId(other.getAppId()); - name(other.getName()); - accountName(other.getAccountName()); - ready(other.getReady()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - refreshedAt(other.getRefreshedAt()); - fingerprint(other.getFingerprint()); - return this; - } - - /** - *

Flows Vault Connection identifier.

- *

Flows Vault Connection identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("id") - public AppIdStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - /** - *

Flows Vault Connection app identifier.

- *

Flows Vault Connection app identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("app_id") - public NameStage appId(@NotNull String appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public ReadyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("ready") - public CreatedAtStage ready(boolean ready) { - this.ready = ready; - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("created_at") - public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { - this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("updated_at") - public FingerprintStage updatedAt(@NotNull OffsetDateTime updatedAt) { - this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("fingerprint") - public _FinalStage fingerprint(@NotNull String fingerprint) { - this.fingerprint = Objects.requireNonNull(fingerprint, "fingerprint must not be null"); - return this; - } - - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was refreshed.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage refreshedAt(OffsetDateTime refreshedAt) { - this.refreshedAt = Optional.ofNullable(refreshedAt); - return this; - } - - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was refreshed.

- */ - @java.lang.Override - @JsonSetter(value = "refreshed_at", nulls = Nulls.SKIP) - public _FinalStage refreshedAt(Optional refreshedAt) { - this.refreshedAt = refreshedAt; - return this; - } - - /** - *

Flows Vault Connection custom account name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage accountName(String accountName) { - this.accountName = Optional.ofNullable(accountName); - return this; - } - - /** - *

Flows Vault Connection custom account name.

- */ - @java.lang.Override - @JsonSetter(value = "account_name", nulls = Nulls.SKIP) - public _FinalStage accountName(Optional accountName) { - this.accountName = accountName; - return this; - } - - @java.lang.Override - public FlowsVaultConnectionSummary build() { - return new FlowsVaultConnectionSummary( - id, - appId, - name, - accountName, - ready, - createdAt, - updatedAt, - refreshedAt, - fingerprint, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlock.java b/src/main/java/com/auth0/client/mgmt/types/FormBlock.java deleted file mode 100644 index e12842dd3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlock.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FormBlock.Deserializer.class) -public final class FormBlock { - private final Object value; - - private final int type; - - private FormBlock(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((FormBlockDivider) this.value); - } else if (this.type == 1) { - return visitor.visit((FormBlockHtml) this.value); - } else if (this.type == 2) { - return visitor.visit((FormBlockImage) this.value); - } else if (this.type == 3) { - return visitor.visit((FormBlockJumpButton) this.value); - } else if (this.type == 4) { - return visitor.visit((FormBlockResendButton) this.value); - } else if (this.type == 5) { - return visitor.visit((FormBlockNextButton) this.value); - } else if (this.type == 6) { - return visitor.visit((FormBlockPreviousButton) this.value); - } else if (this.type == 7) { - return visitor.visit((FormBlockRichText) 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 FormBlock && equalTo((FormBlock) other); - } - - private boolean equalTo(FormBlock 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 FormBlock of(FormBlockDivider value) { - return new FormBlock(value, 0); - } - - public static FormBlock of(FormBlockHtml value) { - return new FormBlock(value, 1); - } - - public static FormBlock of(FormBlockImage value) { - return new FormBlock(value, 2); - } - - public static FormBlock of(FormBlockJumpButton value) { - return new FormBlock(value, 3); - } - - public static FormBlock of(FormBlockResendButton value) { - return new FormBlock(value, 4); - } - - public static FormBlock of(FormBlockNextButton value) { - return new FormBlock(value, 5); - } - - public static FormBlock of(FormBlockPreviousButton value) { - return new FormBlock(value, 6); - } - - public static FormBlock of(FormBlockRichText value) { - return new FormBlock(value, 7); - } - - public interface Visitor { - T visit(FormBlockDivider value); - - T visit(FormBlockHtml value); - - T visit(FormBlockImage value); - - T visit(FormBlockJumpButton value); - - T visit(FormBlockResendButton value); - - T visit(FormBlockNextButton value); - - T visit(FormBlockPreviousButton value); - - T visit(FormBlockRichText value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FormBlock.class); - } - - @java.lang.Override - public FormBlock deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockDivider.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockHtml.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockImage.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockJumpButton.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockResendButton.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockNextButton.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockPreviousButton.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlockRichText.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockDivider.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockDivider.java deleted file mode 100644 index 796a042ed..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockDivider.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormBlockDivider.Builder.class) -public final class FormBlockDivider { - private final String id; - - private final FormComponentCategoryBlockConst category; - - private final FormBlockTypeDividerConst type; - - private final Optional config; - - private final Map additionalProperties; - - private FormBlockDivider( - String id, - FormComponentCategoryBlockConst category, - FormBlockTypeDividerConst type, - Optional config, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryBlockConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormBlockTypeDividerConst getType() { - return type; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockDivider && equalTo((FormBlockDivider) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockDivider other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.category, this.type, this.config); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormBlockDivider other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryBlockConst category); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormBlockTypeDividerConst type); - } - - public interface _FinalStage { - FormBlockDivider build(); - - _FinalStage config(Optional config); - - _FinalStage config(FormBlockDividerConfig config); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, _FinalStage { - private String id; - - private FormComponentCategoryBlockConst category; - - private FormBlockTypeDividerConst type; - - private Optional config = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormBlockDivider other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryBlockConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormBlockTypeDividerConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage config(FormBlockDividerConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public FormBlockDivider build() { - return new FormBlockDivider(id, category, type, config, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockDividerConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockDividerConfig.java deleted file mode 100644 index a5183c3a3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockDividerConfig.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormBlockDividerConfig.Builder.class) -public final class FormBlockDividerConfig { - private final Optional text; - - private final Map additionalProperties; - - private FormBlockDividerConfig(Optional text, Map additionalProperties) { - this.text = text; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("text") - public Optional getText() { - return text; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockDividerConfig && equalTo((FormBlockDividerConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockDividerConfig other) { - return text.equals(other.text); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 text = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormBlockDividerConfig other) { - text(other.getText()); - return this; - } - - @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 FormBlockDividerConfig build() { - return new FormBlockDividerConfig(text, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockHtml.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockHtml.java deleted file mode 100644 index 5852cc83d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockHtml.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormBlockHtml.Builder.class) -public final class FormBlockHtml { - private final String id; - - private final FormComponentCategoryBlockConst category; - - private final FormBlockTypeHtmlConst type; - - private final Optional config; - - private final Map additionalProperties; - - private FormBlockHtml( - String id, - FormComponentCategoryBlockConst category, - FormBlockTypeHtmlConst type, - Optional config, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryBlockConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormBlockTypeHtmlConst getType() { - return type; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockHtml && equalTo((FormBlockHtml) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockHtml other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.category, this.type, this.config); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormBlockHtml other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryBlockConst category); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormBlockTypeHtmlConst type); - } - - public interface _FinalStage { - FormBlockHtml build(); - - _FinalStage config(Optional config); - - _FinalStage config(FormBlockHtmlConfig config); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, _FinalStage { - private String id; - - private FormComponentCategoryBlockConst category; - - private FormBlockTypeHtmlConst type; - - private Optional config = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormBlockHtml other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryBlockConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormBlockTypeHtmlConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage config(FormBlockHtmlConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public FormBlockHtml build() { - return new FormBlockHtml(id, category, type, config, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockHtmlConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockHtmlConfig.java deleted file mode 100644 index 1a3622c5e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockHtmlConfig.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormBlockHtmlConfig.Builder.class) -public final class FormBlockHtmlConfig { - private final Optional content; - - private final Map additionalProperties; - - private FormBlockHtmlConfig(Optional content, Map additionalProperties) { - this.content = content; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("content") - public Optional getContent() { - return content; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockHtmlConfig && equalTo((FormBlockHtmlConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockHtmlConfig 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 Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional content = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormBlockHtmlConfig other) { - content(other.getContent()); - return this; - } - - @JsonSetter(value = "content", nulls = Nulls.SKIP) - public Builder content(Optional content) { - this.content = content; - return this; - } - - public Builder content(String content) { - this.content = Optional.ofNullable(content); - return this; - } - - public FormBlockHtmlConfig build() { - return new FormBlockHtmlConfig(content, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockImage.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockImage.java deleted file mode 100644 index 599a369e8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockImage.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormBlockImage.Builder.class) -public final class FormBlockImage { - private final String id; - - private final FormComponentCategoryBlockConst category; - - private final FormBlockTypeImageConst type; - - private final Optional config; - - private final Map additionalProperties; - - private FormBlockImage( - String id, - FormComponentCategoryBlockConst category, - FormBlockTypeImageConst type, - Optional config, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryBlockConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormBlockTypeImageConst getType() { - return type; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockImage && equalTo((FormBlockImage) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockImage other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.category, this.type, this.config); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormBlockImage other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryBlockConst category); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormBlockTypeImageConst type); - } - - public interface _FinalStage { - FormBlockImage build(); - - _FinalStage config(Optional config); - - _FinalStage config(FormBlockImageConfig config); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, _FinalStage { - private String id; - - private FormComponentCategoryBlockConst category; - - private FormBlockTypeImageConst type; - - private Optional config = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormBlockImage other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryBlockConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormBlockTypeImageConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage config(FormBlockImageConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public FormBlockImage build() { - return new FormBlockImage(id, category, type, config, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockImageConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockImageConfig.java deleted file mode 100644 index 88372a4b3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockImageConfig.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormBlockImageConfig.Builder.class) -public final class FormBlockImageConfig { - private final String src; - - private final Optional position; - - private final Optional height; - - private final Map additionalProperties; - - private FormBlockImageConfig( - String src, - Optional position, - Optional height, - Map additionalProperties) { - this.src = src; - this.position = position; - this.height = height; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("src") - public String getSrc() { - return src; - } - - @JsonProperty("position") - public Optional getPosition() { - return position; - } - - @JsonProperty("height") - public Optional getHeight() { - return height; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockImageConfig && equalTo((FormBlockImageConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockImageConfig 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 { - _FinalStage src(@NotNull String src); - - Builder from(FormBlockImageConfig other); - } - - public interface _FinalStage { - FormBlockImageConfig build(); - - _FinalStage position(Optional position); - - _FinalStage position(FormBlockImageConfigPositionEnum position); - - _FinalStage height(Optional height); - - _FinalStage height(Double 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(FormBlockImageConfig other) { - src(other.getSrc()); - position(other.getPosition()); - height(other.getHeight()); - return this; - } - - @java.lang.Override - @JsonSetter("src") - public _FinalStage src(@NotNull String src) { - this.src = Objects.requireNonNull(src, "src must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage height(Double height) { - this.height = Optional.ofNullable(height); - return this; - } - - @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(FormBlockImageConfigPositionEnum 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 FormBlockImageConfig build() { - return new FormBlockImageConfig(src, position, height, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockImageConfigPositionEnum.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockImageConfigPositionEnum.java deleted file mode 100644 index ecc7f7dd9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockImageConfigPositionEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormBlockImageConfigPositionEnum { - public static final FormBlockImageConfigPositionEnum RIGHT = - new FormBlockImageConfigPositionEnum(Value.RIGHT, "RIGHT"); - - public static final FormBlockImageConfigPositionEnum LEFT = - new FormBlockImageConfigPositionEnum(Value.LEFT, "LEFT"); - - public static final FormBlockImageConfigPositionEnum CENTER = - new FormBlockImageConfigPositionEnum(Value.CENTER, "CENTER"); - - private final Value value; - - private final String string; - - FormBlockImageConfigPositionEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormBlockImageConfigPositionEnum - && this.string.equals(((FormBlockImageConfigPositionEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case RIGHT: - return visitor.visitRight(); - case LEFT: - return visitor.visitLeft(); - case CENTER: - return visitor.visitCenter(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormBlockImageConfigPositionEnum valueOf(String value) { - switch (value) { - case "RIGHT": - return RIGHT; - case "LEFT": - return LEFT; - case "CENTER": - return CENTER; - default: - return new FormBlockImageConfigPositionEnum(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/FormBlockJumpButton.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockJumpButton.java deleted file mode 100644 index 80e37187e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockJumpButton.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FormBlockJumpButton.Builder.class) -public final class FormBlockJumpButton { - private final String id; - - private final FormComponentCategoryBlockConst category; - - private final FormBlockTypeJumpButtonConst type; - - private final FormBlockJumpButtonConfig config; - - private final Map additionalProperties; - - private FormBlockJumpButton( - String id, - FormComponentCategoryBlockConst category, - FormBlockTypeJumpButtonConst type, - FormBlockJumpButtonConfig config, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryBlockConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormBlockTypeJumpButtonConst getType() { - return type; - } - - @JsonProperty("config") - public FormBlockJumpButtonConfig getConfig() { - return config; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockJumpButton && equalTo((FormBlockJumpButton) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockJumpButton other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.category, this.type, this.config); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormBlockJumpButton other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryBlockConst category); - } - - public interface TypeStage { - ConfigStage type(@NotNull FormBlockTypeJumpButtonConst type); - } - - public interface ConfigStage { - _FinalStage config(@NotNull FormBlockJumpButtonConfig config); - } - - public interface _FinalStage { - FormBlockJumpButton build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, ConfigStage, _FinalStage { - private String id; - - private FormComponentCategoryBlockConst category; - - private FormBlockTypeJumpButtonConst type; - - private FormBlockJumpButtonConfig config; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormBlockJumpButton other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryBlockConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ConfigStage type(@NotNull FormBlockTypeJumpButtonConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("config") - public _FinalStage config(@NotNull FormBlockJumpButtonConfig config) { - this.config = Objects.requireNonNull(config, "config must not be null"); - return this; - } - - @java.lang.Override - public FormBlockJumpButton build() { - return new FormBlockJumpButton(id, category, type, config, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockJumpButtonConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockJumpButtonConfig.java deleted file mode 100644 index 9f6282db1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockJumpButtonConfig.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormBlockJumpButtonConfig.Builder.class) -public final class FormBlockJumpButtonConfig { - private final String text; - - private final FormNodePointer nextNode; - - private final Optional style; - - private final Map additionalProperties; - - private FormBlockJumpButtonConfig( - String text, - FormNodePointer nextNode, - Optional style, - Map additionalProperties) { - this.text = text; - this.nextNode = nextNode; - this.style = style; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("text") - public String getText() { - return text; - } - - @JsonProperty("next_node") - public FormNodePointer getNextNode() { - return nextNode; - } - - @JsonProperty("style") - public Optional getStyle() { - return style; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockJumpButtonConfig && equalTo((FormBlockJumpButtonConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockJumpButtonConfig other) { - return text.equals(other.text) && nextNode.equals(other.nextNode) && style.equals(other.style); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.text, this.nextNode, this.style); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TextStage builder() { - return new Builder(); - } - - public interface TextStage { - NextNodeStage text(@NotNull String text); - - Builder from(FormBlockJumpButtonConfig other); - } - - public interface NextNodeStage { - _FinalStage nextNode(@NotNull FormNodePointer nextNode); - } - - public interface _FinalStage { - FormBlockJumpButtonConfig build(); - - _FinalStage style(Optional style); - - _FinalStage style(FormBlockJumpButtonConfigStyle style); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TextStage, NextNodeStage, _FinalStage { - private String text; - - private FormNodePointer nextNode; - - private Optional style = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormBlockJumpButtonConfig other) { - text(other.getText()); - nextNode(other.getNextNode()); - style(other.getStyle()); - return this; - } - - @java.lang.Override - @JsonSetter("text") - public NextNodeStage text(@NotNull String text) { - this.text = Objects.requireNonNull(text, "text must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("next_node") - public _FinalStage nextNode(@NotNull FormNodePointer nextNode) { - this.nextNode = Objects.requireNonNull(nextNode, "nextNode must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage style(FormBlockJumpButtonConfigStyle style) { - this.style = Optional.ofNullable(style); - return this; - } - - @java.lang.Override - @JsonSetter(value = "style", nulls = Nulls.SKIP) - public _FinalStage style(Optional style) { - this.style = style; - return this; - } - - @java.lang.Override - public FormBlockJumpButtonConfig build() { - return new FormBlockJumpButtonConfig(text, nextNode, style, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockJumpButtonConfigStyle.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockJumpButtonConfigStyle.java deleted file mode 100644 index ffd730672..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockJumpButtonConfigStyle.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormBlockJumpButtonConfigStyle.Builder.class) -public final class FormBlockJumpButtonConfigStyle { - private final Optional backgroundColor; - - private final Map additionalProperties; - - private FormBlockJumpButtonConfigStyle(Optional backgroundColor, Map additionalProperties) { - this.backgroundColor = backgroundColor; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("background_color") - public Optional getBackgroundColor() { - return backgroundColor; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockJumpButtonConfigStyle && equalTo((FormBlockJumpButtonConfigStyle) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockJumpButtonConfigStyle other) { - return backgroundColor.equals(other.backgroundColor); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.backgroundColor); - } - - @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 backgroundColor = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormBlockJumpButtonConfigStyle other) { - backgroundColor(other.getBackgroundColor()); - return this; - } - - @JsonSetter(value = "background_color", nulls = Nulls.SKIP) - public Builder backgroundColor(Optional backgroundColor) { - this.backgroundColor = backgroundColor; - return this; - } - - public Builder backgroundColor(String backgroundColor) { - this.backgroundColor = Optional.ofNullable(backgroundColor); - return this; - } - - public FormBlockJumpButtonConfigStyle build() { - return new FormBlockJumpButtonConfigStyle(backgroundColor, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockNextButton.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockNextButton.java deleted file mode 100644 index 43353c004..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockNextButton.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FormBlockNextButton.Builder.class) -public final class FormBlockNextButton { - private final String id; - - private final FormComponentCategoryBlockConst category; - - private final FormBlockTypeNextButtonConst type; - - private final FormBlockNextButtonConfig config; - - private final Map additionalProperties; - - private FormBlockNextButton( - String id, - FormComponentCategoryBlockConst category, - FormBlockTypeNextButtonConst type, - FormBlockNextButtonConfig config, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryBlockConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormBlockTypeNextButtonConst getType() { - return type; - } - - @JsonProperty("config") - public FormBlockNextButtonConfig getConfig() { - return config; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockNextButton && equalTo((FormBlockNextButton) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockNextButton other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.category, this.type, this.config); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormBlockNextButton other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryBlockConst category); - } - - public interface TypeStage { - ConfigStage type(@NotNull FormBlockTypeNextButtonConst type); - } - - public interface ConfigStage { - _FinalStage config(@NotNull FormBlockNextButtonConfig config); - } - - public interface _FinalStage { - FormBlockNextButton build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, ConfigStage, _FinalStage { - private String id; - - private FormComponentCategoryBlockConst category; - - private FormBlockTypeNextButtonConst type; - - private FormBlockNextButtonConfig config; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormBlockNextButton other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryBlockConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ConfigStage type(@NotNull FormBlockTypeNextButtonConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("config") - public _FinalStage config(@NotNull FormBlockNextButtonConfig config) { - this.config = Objects.requireNonNull(config, "config must not be null"); - return this; - } - - @java.lang.Override - public FormBlockNextButton build() { - return new FormBlockNextButton(id, category, type, config, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockNextButtonConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockNextButtonConfig.java deleted file mode 100644 index 6d24c23bf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockNextButtonConfig.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FormBlockNextButtonConfig.Builder.class) -public final class FormBlockNextButtonConfig { - private final String text; - - private final Map additionalProperties; - - private FormBlockNextButtonConfig(String text, Map additionalProperties) { - this.text = text; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("text") - public String getText() { - return text; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockNextButtonConfig && equalTo((FormBlockNextButtonConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockNextButtonConfig other) { - return text.equals(other.text); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.text); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TextStage builder() { - return new Builder(); - } - - public interface TextStage { - _FinalStage text(@NotNull String text); - - Builder from(FormBlockNextButtonConfig other); - } - - public interface _FinalStage { - FormBlockNextButtonConfig build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TextStage, _FinalStage { - private String text; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormBlockNextButtonConfig other) { - text(other.getText()); - return this; - } - - @java.lang.Override - @JsonSetter("text") - public _FinalStage text(@NotNull String text) { - this.text = Objects.requireNonNull(text, "text must not be null"); - return this; - } - - @java.lang.Override - public FormBlockNextButtonConfig build() { - return new FormBlockNextButtonConfig(text, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockPreviousButton.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockPreviousButton.java deleted file mode 100644 index 15cd22082..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockPreviousButton.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FormBlockPreviousButton.Builder.class) -public final class FormBlockPreviousButton { - private final String id; - - private final FormComponentCategoryBlockConst category; - - private final FormBlockTypePreviousButtonConst type; - - private final FormBlockPreviousButtonConfig config; - - private final Map additionalProperties; - - private FormBlockPreviousButton( - String id, - FormComponentCategoryBlockConst category, - FormBlockTypePreviousButtonConst type, - FormBlockPreviousButtonConfig config, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryBlockConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormBlockTypePreviousButtonConst getType() { - return type; - } - - @JsonProperty("config") - public FormBlockPreviousButtonConfig getConfig() { - return config; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockPreviousButton && equalTo((FormBlockPreviousButton) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockPreviousButton other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.category, this.type, this.config); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormBlockPreviousButton other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryBlockConst category); - } - - public interface TypeStage { - ConfigStage type(@NotNull FormBlockTypePreviousButtonConst type); - } - - public interface ConfigStage { - _FinalStage config(@NotNull FormBlockPreviousButtonConfig config); - } - - public interface _FinalStage { - FormBlockPreviousButton build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, ConfigStage, _FinalStage { - private String id; - - private FormComponentCategoryBlockConst category; - - private FormBlockTypePreviousButtonConst type; - - private FormBlockPreviousButtonConfig config; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormBlockPreviousButton other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryBlockConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ConfigStage type(@NotNull FormBlockTypePreviousButtonConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("config") - public _FinalStage config(@NotNull FormBlockPreviousButtonConfig config) { - this.config = Objects.requireNonNull(config, "config must not be null"); - return this; - } - - @java.lang.Override - public FormBlockPreviousButton build() { - return new FormBlockPreviousButton(id, category, type, config, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockPreviousButtonConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockPreviousButtonConfig.java deleted file mode 100644 index 60fb63e51..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockPreviousButtonConfig.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FormBlockPreviousButtonConfig.Builder.class) -public final class FormBlockPreviousButtonConfig { - private final String text; - - private final Map additionalProperties; - - private FormBlockPreviousButtonConfig(String text, Map additionalProperties) { - this.text = text; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("text") - public String getText() { - return text; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockPreviousButtonConfig && equalTo((FormBlockPreviousButtonConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockPreviousButtonConfig other) { - return text.equals(other.text); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.text); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TextStage builder() { - return new Builder(); - } - - public interface TextStage { - _FinalStage text(@NotNull String text); - - Builder from(FormBlockPreviousButtonConfig other); - } - - public interface _FinalStage { - FormBlockPreviousButtonConfig build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TextStage, _FinalStage { - private String text; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormBlockPreviousButtonConfig other) { - text(other.getText()); - return this; - } - - @java.lang.Override - @JsonSetter("text") - public _FinalStage text(@NotNull String text) { - this.text = Objects.requireNonNull(text, "text must not be null"); - return this; - } - - @java.lang.Override - public FormBlockPreviousButtonConfig build() { - return new FormBlockPreviousButtonConfig(text, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockResendButton.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockResendButton.java deleted file mode 100644 index 1c0e5fb2d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockResendButton.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FormBlockResendButton.Builder.class) -public final class FormBlockResendButton { - private final String id; - - private final FormComponentCategoryBlockConst category; - - private final FormBlockTypeResendButtonConst type; - - private final FormBlockResendButtonConfig config; - - private final Map additionalProperties; - - private FormBlockResendButton( - String id, - FormComponentCategoryBlockConst category, - FormBlockTypeResendButtonConst type, - FormBlockResendButtonConfig config, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryBlockConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormBlockTypeResendButtonConst getType() { - return type; - } - - @JsonProperty("config") - public FormBlockResendButtonConfig getConfig() { - return config; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockResendButton && equalTo((FormBlockResendButton) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockResendButton other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.category, this.type, this.config); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormBlockResendButton other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryBlockConst category); - } - - public interface TypeStage { - ConfigStage type(@NotNull FormBlockTypeResendButtonConst type); - } - - public interface ConfigStage { - _FinalStage config(@NotNull FormBlockResendButtonConfig config); - } - - public interface _FinalStage { - FormBlockResendButton build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, ConfigStage, _FinalStage { - private String id; - - private FormComponentCategoryBlockConst category; - - private FormBlockTypeResendButtonConst type; - - private FormBlockResendButtonConfig config; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormBlockResendButton other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryBlockConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ConfigStage type(@NotNull FormBlockTypeResendButtonConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("config") - public _FinalStage config(@NotNull FormBlockResendButtonConfig config) { - this.config = Objects.requireNonNull(config, "config must not be null"); - return this; - } - - @java.lang.Override - public FormBlockResendButton build() { - return new FormBlockResendButton(id, category, type, config, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockResendButtonConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockResendButtonConfig.java deleted file mode 100644 index d899c55c3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockResendButtonConfig.java +++ /dev/null @@ -1,284 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormBlockResendButtonConfig.Builder.class) -public final class FormBlockResendButtonConfig { - private final String activeText; - - private final String buttonText; - - private final String waitingText; - - private final Optional textAlignment; - - private final String flowId; - - private final Optional maxAttempts; - - private final Optional waitingTime; - - private final Map additionalProperties; - - private FormBlockResendButtonConfig( - String activeText, - String buttonText, - String waitingText, - Optional textAlignment, - String flowId, - Optional maxAttempts, - Optional waitingTime, - Map additionalProperties) { - this.activeText = activeText; - this.buttonText = buttonText; - this.waitingText = waitingText; - this.textAlignment = textAlignment; - this.flowId = flowId; - this.maxAttempts = maxAttempts; - this.waitingTime = waitingTime; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("active_text") - public String getActiveText() { - return activeText; - } - - @JsonProperty("button_text") - public String getButtonText() { - return buttonText; - } - - @JsonProperty("waiting_text") - public String getWaitingText() { - return waitingText; - } - - @JsonProperty("text_alignment") - public Optional getTextAlignment() { - return textAlignment; - } - - @JsonProperty("flow_id") - public String getFlowId() { - return flowId; - } - - @JsonProperty("max_attempts") - public Optional getMaxAttempts() { - return maxAttempts; - } - - @JsonProperty("waiting_time") - public Optional getWaitingTime() { - return waitingTime; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockResendButtonConfig && equalTo((FormBlockResendButtonConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockResendButtonConfig other) { - return activeText.equals(other.activeText) - && buttonText.equals(other.buttonText) - && waitingText.equals(other.waitingText) - && textAlignment.equals(other.textAlignment) - && flowId.equals(other.flowId) - && maxAttempts.equals(other.maxAttempts) - && waitingTime.equals(other.waitingTime); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.activeText, - this.buttonText, - this.waitingText, - this.textAlignment, - this.flowId, - this.maxAttempts, - this.waitingTime); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ActiveTextStage builder() { - return new Builder(); - } - - public interface ActiveTextStage { - ButtonTextStage activeText(@NotNull String activeText); - - Builder from(FormBlockResendButtonConfig other); - } - - public interface ButtonTextStage { - WaitingTextStage buttonText(@NotNull String buttonText); - } - - public interface WaitingTextStage { - FlowIdStage waitingText(@NotNull String waitingText); - } - - public interface FlowIdStage { - _FinalStage flowId(@NotNull String flowId); - } - - public interface _FinalStage { - FormBlockResendButtonConfig build(); - - _FinalStage textAlignment(Optional textAlignment); - - _FinalStage textAlignment(FormBlockResendButtonConfigTextAlignmentEnum textAlignment); - - _FinalStage maxAttempts(Optional maxAttempts); - - _FinalStage maxAttempts(Double maxAttempts); - - _FinalStage waitingTime(Optional waitingTime); - - _FinalStage waitingTime(Double waitingTime); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements ActiveTextStage, ButtonTextStage, WaitingTextStage, FlowIdStage, _FinalStage { - private String activeText; - - private String buttonText; - - private String waitingText; - - private String flowId; - - private Optional waitingTime = Optional.empty(); - - private Optional maxAttempts = Optional.empty(); - - private Optional textAlignment = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormBlockResendButtonConfig other) { - activeText(other.getActiveText()); - buttonText(other.getButtonText()); - waitingText(other.getWaitingText()); - textAlignment(other.getTextAlignment()); - flowId(other.getFlowId()); - maxAttempts(other.getMaxAttempts()); - waitingTime(other.getWaitingTime()); - return this; - } - - @java.lang.Override - @JsonSetter("active_text") - public ButtonTextStage activeText(@NotNull String activeText) { - this.activeText = Objects.requireNonNull(activeText, "activeText must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("button_text") - public WaitingTextStage buttonText(@NotNull String buttonText) { - this.buttonText = Objects.requireNonNull(buttonText, "buttonText must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("waiting_text") - public FlowIdStage waitingText(@NotNull String waitingText) { - this.waitingText = Objects.requireNonNull(waitingText, "waitingText must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("flow_id") - public _FinalStage flowId(@NotNull String flowId) { - this.flowId = Objects.requireNonNull(flowId, "flowId must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage waitingTime(Double waitingTime) { - this.waitingTime = Optional.ofNullable(waitingTime); - return this; - } - - @java.lang.Override - @JsonSetter(value = "waiting_time", nulls = Nulls.SKIP) - public _FinalStage waitingTime(Optional waitingTime) { - this.waitingTime = waitingTime; - return this; - } - - @java.lang.Override - public _FinalStage maxAttempts(Double maxAttempts) { - this.maxAttempts = Optional.ofNullable(maxAttempts); - return this; - } - - @java.lang.Override - @JsonSetter(value = "max_attempts", nulls = Nulls.SKIP) - public _FinalStage maxAttempts(Optional maxAttempts) { - this.maxAttempts = maxAttempts; - return this; - } - - @java.lang.Override - public _FinalStage textAlignment(FormBlockResendButtonConfigTextAlignmentEnum textAlignment) { - this.textAlignment = Optional.ofNullable(textAlignment); - return this; - } - - @java.lang.Override - @JsonSetter(value = "text_alignment", nulls = Nulls.SKIP) - public _FinalStage textAlignment(Optional textAlignment) { - this.textAlignment = textAlignment; - return this; - } - - @java.lang.Override - public FormBlockResendButtonConfig build() { - return new FormBlockResendButtonConfig( - activeText, - buttonText, - waitingText, - textAlignment, - flowId, - maxAttempts, - waitingTime, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockResendButtonConfigTextAlignmentEnum.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockResendButtonConfigTextAlignmentEnum.java deleted file mode 100644 index b98a7331a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockResendButtonConfigTextAlignmentEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormBlockResendButtonConfigTextAlignmentEnum { - public static final FormBlockResendButtonConfigTextAlignmentEnum RIGHT = - new FormBlockResendButtonConfigTextAlignmentEnum(Value.RIGHT, "RIGHT"); - - public static final FormBlockResendButtonConfigTextAlignmentEnum LEFT = - new FormBlockResendButtonConfigTextAlignmentEnum(Value.LEFT, "LEFT"); - - public static final FormBlockResendButtonConfigTextAlignmentEnum CENTER = - new FormBlockResendButtonConfigTextAlignmentEnum(Value.CENTER, "CENTER"); - - private final Value value; - - private final String string; - - FormBlockResendButtonConfigTextAlignmentEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormBlockResendButtonConfigTextAlignmentEnum - && this.string.equals(((FormBlockResendButtonConfigTextAlignmentEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case RIGHT: - return visitor.visitRight(); - case LEFT: - return visitor.visitLeft(); - case CENTER: - return visitor.visitCenter(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormBlockResendButtonConfigTextAlignmentEnum valueOf(String value) { - switch (value) { - case "RIGHT": - return RIGHT; - case "LEFT": - return LEFT; - case "CENTER": - return CENTER; - default: - return new FormBlockResendButtonConfigTextAlignmentEnum(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/FormBlockRichText.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockRichText.java deleted file mode 100644 index 03b4745a5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockRichText.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormBlockRichText.Builder.class) -public final class FormBlockRichText { - private final String id; - - private final FormComponentCategoryBlockConst category; - - private final FormBlockTypeRichTextConst type; - - private final Optional config; - - private final Map additionalProperties; - - private FormBlockRichText( - String id, - FormComponentCategoryBlockConst category, - FormBlockTypeRichTextConst type, - Optional config, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryBlockConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormBlockTypeRichTextConst getType() { - return type; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockRichText && equalTo((FormBlockRichText) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockRichText other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.category, this.type, this.config); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormBlockRichText other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryBlockConst category); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormBlockTypeRichTextConst type); - } - - public interface _FinalStage { - FormBlockRichText build(); - - _FinalStage config(Optional config); - - _FinalStage config(FormBlockRichTextConfig config); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, _FinalStage { - private String id; - - private FormComponentCategoryBlockConst category; - - private FormBlockTypeRichTextConst type; - - private Optional config = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormBlockRichText other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryBlockConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormBlockTypeRichTextConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage config(FormBlockRichTextConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public FormBlockRichText build() { - return new FormBlockRichText(id, category, type, config, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockRichTextConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockRichTextConfig.java deleted file mode 100644 index a4986d07b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockRichTextConfig.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormBlockRichTextConfig.Builder.class) -public final class FormBlockRichTextConfig { - private final Optional content; - - private final Map additionalProperties; - - private FormBlockRichTextConfig(Optional content, Map additionalProperties) { - this.content = content; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("content") - public Optional getContent() { - return content; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormBlockRichTextConfig && equalTo((FormBlockRichTextConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormBlockRichTextConfig 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 Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional content = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormBlockRichTextConfig other) { - content(other.getContent()); - return this; - } - - @JsonSetter(value = "content", nulls = Nulls.SKIP) - public Builder content(Optional content) { - this.content = content; - return this; - } - - public Builder content(String content) { - this.content = Optional.ofNullable(content); - return this; - } - - public FormBlockRichTextConfig build() { - return new FormBlockRichTextConfig(content, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeDividerConst.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeDividerConst.java deleted file mode 100644 index 75034cda7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeDividerConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormBlockTypeDividerConst { - public static final FormBlockTypeDividerConst DIVIDER = new FormBlockTypeDividerConst(Value.DIVIDER, "DIVIDER"); - - private final Value value; - - private final String string; - - FormBlockTypeDividerConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormBlockTypeDividerConst - && this.string.equals(((FormBlockTypeDividerConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DIVIDER: - return visitor.visitDivider(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormBlockTypeDividerConst valueOf(String value) { - switch (value) { - case "DIVIDER": - return DIVIDER; - default: - return new FormBlockTypeDividerConst(Value.UNKNOWN, value); - } - } - - public enum Value { - DIVIDER, - - UNKNOWN - } - - public interface Visitor { - T visitDivider(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeHtmlConst.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeHtmlConst.java deleted file mode 100644 index 91d132e94..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeHtmlConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormBlockTypeHtmlConst { - public static final FormBlockTypeHtmlConst HTML = new FormBlockTypeHtmlConst(Value.HTML, "HTML"); - - private final Value value; - - private final String string; - - FormBlockTypeHtmlConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormBlockTypeHtmlConst - && this.string.equals(((FormBlockTypeHtmlConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case HTML: - return visitor.visitHtml(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormBlockTypeHtmlConst valueOf(String value) { - switch (value) { - case "HTML": - return HTML; - default: - return new FormBlockTypeHtmlConst(Value.UNKNOWN, value); - } - } - - public enum Value { - HTML, - - UNKNOWN - } - - public interface Visitor { - T visitHtml(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeImageConst.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeImageConst.java deleted file mode 100644 index 22b2fef2e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeImageConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormBlockTypeImageConst { - public static final FormBlockTypeImageConst IMAGE = new FormBlockTypeImageConst(Value.IMAGE, "IMAGE"); - - private final Value value; - - private final String string; - - FormBlockTypeImageConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormBlockTypeImageConst - && this.string.equals(((FormBlockTypeImageConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case IMAGE: - return visitor.visitImage(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormBlockTypeImageConst valueOf(String value) { - switch (value) { - case "IMAGE": - return IMAGE; - default: - return new FormBlockTypeImageConst(Value.UNKNOWN, value); - } - } - - public enum Value { - IMAGE, - - UNKNOWN - } - - public interface Visitor { - T visitImage(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeJumpButtonConst.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeJumpButtonConst.java deleted file mode 100644 index 921a80324..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeJumpButtonConst.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormBlockTypeJumpButtonConst { - public static final FormBlockTypeJumpButtonConst JUMP_BUTTON = - new FormBlockTypeJumpButtonConst(Value.JUMP_BUTTON, "JUMP_BUTTON"); - - private final Value value; - - private final String string; - - FormBlockTypeJumpButtonConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormBlockTypeJumpButtonConst - && this.string.equals(((FormBlockTypeJumpButtonConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case JUMP_BUTTON: - return visitor.visitJumpButton(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormBlockTypeJumpButtonConst valueOf(String value) { - switch (value) { - case "JUMP_BUTTON": - return JUMP_BUTTON; - default: - return new FormBlockTypeJumpButtonConst(Value.UNKNOWN, value); - } - } - - public enum Value { - JUMP_BUTTON, - - UNKNOWN - } - - public interface Visitor { - T visitJumpButton(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeNextButtonConst.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeNextButtonConst.java deleted file mode 100644 index c757e6535..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeNextButtonConst.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormBlockTypeNextButtonConst { - public static final FormBlockTypeNextButtonConst NEXT_BUTTON = - new FormBlockTypeNextButtonConst(Value.NEXT_BUTTON, "NEXT_BUTTON"); - - private final Value value; - - private final String string; - - FormBlockTypeNextButtonConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormBlockTypeNextButtonConst - && this.string.equals(((FormBlockTypeNextButtonConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case NEXT_BUTTON: - return visitor.visitNextButton(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormBlockTypeNextButtonConst valueOf(String value) { - switch (value) { - case "NEXT_BUTTON": - return NEXT_BUTTON; - default: - return new FormBlockTypeNextButtonConst(Value.UNKNOWN, value); - } - } - - public enum Value { - NEXT_BUTTON, - - UNKNOWN - } - - public interface Visitor { - T visitNextButton(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockTypePreviousButtonConst.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockTypePreviousButtonConst.java deleted file mode 100644 index 135ad74c5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockTypePreviousButtonConst.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormBlockTypePreviousButtonConst { - public static final FormBlockTypePreviousButtonConst PREVIOUS_BUTTON = - new FormBlockTypePreviousButtonConst(Value.PREVIOUS_BUTTON, "PREVIOUS_BUTTON"); - - private final Value value; - - private final String string; - - FormBlockTypePreviousButtonConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormBlockTypePreviousButtonConst - && this.string.equals(((FormBlockTypePreviousButtonConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PREVIOUS_BUTTON: - return visitor.visitPreviousButton(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormBlockTypePreviousButtonConst valueOf(String value) { - switch (value) { - case "PREVIOUS_BUTTON": - return PREVIOUS_BUTTON; - default: - return new FormBlockTypePreviousButtonConst(Value.UNKNOWN, value); - } - } - - public enum Value { - PREVIOUS_BUTTON, - - UNKNOWN - } - - public interface Visitor { - T visitPreviousButton(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeResendButtonConst.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeResendButtonConst.java deleted file mode 100644 index 3c3c31da1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeResendButtonConst.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormBlockTypeResendButtonConst { - public static final FormBlockTypeResendButtonConst RESEND_BUTTON = - new FormBlockTypeResendButtonConst(Value.RESEND_BUTTON, "RESEND_BUTTON"); - - private final Value value; - - private final String string; - - FormBlockTypeResendButtonConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormBlockTypeResendButtonConst - && this.string.equals(((FormBlockTypeResendButtonConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case RESEND_BUTTON: - return visitor.visitResendButton(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormBlockTypeResendButtonConst valueOf(String value) { - switch (value) { - case "RESEND_BUTTON": - return RESEND_BUTTON; - default: - return new FormBlockTypeResendButtonConst(Value.UNKNOWN, value); - } - } - - public enum Value { - RESEND_BUTTON, - - UNKNOWN - } - - public interface Visitor { - T visitResendButton(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeRichTextConst.java b/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeRichTextConst.java deleted file mode 100644 index 97d8a637f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormBlockTypeRichTextConst.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormBlockTypeRichTextConst { - public static final FormBlockTypeRichTextConst RICH_TEXT = - new FormBlockTypeRichTextConst(Value.RICH_TEXT, "RICH_TEXT"); - - private final Value value; - - private final String string; - - FormBlockTypeRichTextConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormBlockTypeRichTextConst - && this.string.equals(((FormBlockTypeRichTextConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case RICH_TEXT: - return visitor.visitRichText(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormBlockTypeRichTextConst valueOf(String value) { - switch (value) { - case "RICH_TEXT": - return RICH_TEXT; - default: - return new FormBlockTypeRichTextConst(Value.UNKNOWN, value); - } - } - - public enum Value { - RICH_TEXT, - - UNKNOWN - } - - public interface Visitor { - T visitRichText(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormComponent.java b/src/main/java/com/auth0/client/mgmt/types/FormComponent.java deleted file mode 100644 index 62c7f133a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormComponent.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FormComponent.Deserializer.class) -public final class FormComponent { - private final Object value; - - private final int type; - - private FormComponent(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((FormBlock) this.value); - } else if (this.type == 1) { - return visitor.visit((FormWidget) this.value); - } else if (this.type == 2) { - return visitor.visit((FormField) 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 FormComponent && equalTo((FormComponent) other); - } - - private boolean equalTo(FormComponent 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 FormComponent of(FormBlock value) { - return new FormComponent(value, 0); - } - - public static FormComponent of(FormWidget value) { - return new FormComponent(value, 1); - } - - public static FormComponent of(FormField value) { - return new FormComponent(value, 2); - } - - public interface Visitor { - T visit(FormBlock value); - - T visit(FormWidget value); - - T visit(FormField value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FormComponent.class); - } - - @java.lang.Override - public FormComponent deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormBlock.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormWidget.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormField.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormComponentCategoryBlockConst.java b/src/main/java/com/auth0/client/mgmt/types/FormComponentCategoryBlockConst.java deleted file mode 100644 index daeb3a22c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormComponentCategoryBlockConst.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormComponentCategoryBlockConst { - public static final FormComponentCategoryBlockConst BLOCK = - new FormComponentCategoryBlockConst(Value.BLOCK, "BLOCK"); - - private final Value value; - - private final String string; - - FormComponentCategoryBlockConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormComponentCategoryBlockConst - && this.string.equals(((FormComponentCategoryBlockConst) 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 FormComponentCategoryBlockConst valueOf(String value) { - switch (value) { - case "BLOCK": - return BLOCK; - default: - return new FormComponentCategoryBlockConst(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/FormComponentCategoryFieldConst.java b/src/main/java/com/auth0/client/mgmt/types/FormComponentCategoryFieldConst.java deleted file mode 100644 index 6a9390960..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormComponentCategoryFieldConst.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormComponentCategoryFieldConst { - public static final FormComponentCategoryFieldConst FIELD = - new FormComponentCategoryFieldConst(Value.FIELD, "FIELD"); - - private final Value value; - - private final String string; - - FormComponentCategoryFieldConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormComponentCategoryFieldConst - && this.string.equals(((FormComponentCategoryFieldConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FIELD: - return visitor.visitField(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormComponentCategoryFieldConst valueOf(String value) { - switch (value) { - case "FIELD": - return FIELD; - default: - return new FormComponentCategoryFieldConst(Value.UNKNOWN, value); - } - } - - public enum Value { - FIELD, - - UNKNOWN - } - - public interface Visitor { - T visitField(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormComponentCategoryWidgetConst.java b/src/main/java/com/auth0/client/mgmt/types/FormComponentCategoryWidgetConst.java deleted file mode 100644 index 3d13308cc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormComponentCategoryWidgetConst.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormComponentCategoryWidgetConst { - public static final FormComponentCategoryWidgetConst WIDGET = - new FormComponentCategoryWidgetConst(Value.WIDGET, "WIDGET"); - - private final Value value; - - private final String string; - - FormComponentCategoryWidgetConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormComponentCategoryWidgetConst - && this.string.equals(((FormComponentCategoryWidgetConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case WIDGET: - return visitor.visitWidget(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormComponentCategoryWidgetConst valueOf(String value) { - switch (value) { - case "WIDGET": - return WIDGET; - default: - return new FormComponentCategoryWidgetConst(Value.UNKNOWN, value); - } - } - - public enum Value { - WIDGET, - - UNKNOWN - } - - public interface Visitor { - T visitWidget(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormEndingNode.java b/src/main/java/com/auth0/client/mgmt/types/FormEndingNode.java deleted file mode 100644 index e6e50def2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormEndingNode.java +++ /dev/null @@ -1,169 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormEndingNode.Builder.class) -public final class FormEndingNode { - private final Optional redirection; - - private final Optional afterSubmit; - - private final Optional coordinates; - - private final Optional resumeFlow; - - private final Map additionalProperties; - - private FormEndingNode( - Optional redirection, - Optional afterSubmit, - Optional coordinates, - Optional resumeFlow, - Map additionalProperties) { - this.redirection = redirection; - this.afterSubmit = afterSubmit; - this.coordinates = coordinates; - this.resumeFlow = resumeFlow; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("redirection") - public Optional getRedirection() { - return redirection; - } - - @JsonProperty("after_submit") - public Optional getAfterSubmit() { - return afterSubmit; - } - - @JsonProperty("coordinates") - public Optional getCoordinates() { - return coordinates; - } - - @JsonProperty("resume_flow") - public Optional getResumeFlow() { - return resumeFlow; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormEndingNode && equalTo((FormEndingNode) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormEndingNode other) { - return redirection.equals(other.redirection) - && afterSubmit.equals(other.afterSubmit) - && coordinates.equals(other.coordinates) - && resumeFlow.equals(other.resumeFlow); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.redirection, this.afterSubmit, this.coordinates, this.resumeFlow); - } - - @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 redirection = Optional.empty(); - - private Optional afterSubmit = Optional.empty(); - - private Optional coordinates = Optional.empty(); - - private Optional resumeFlow = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormEndingNode other) { - redirection(other.getRedirection()); - afterSubmit(other.getAfterSubmit()); - coordinates(other.getCoordinates()); - resumeFlow(other.getResumeFlow()); - return this; - } - - @JsonSetter(value = "redirection", nulls = Nulls.SKIP) - public Builder redirection(Optional redirection) { - this.redirection = redirection; - return this; - } - - public Builder redirection(FormEndingNodeRedirection redirection) { - this.redirection = Optional.ofNullable(redirection); - return this; - } - - @JsonSetter(value = "after_submit", nulls = Nulls.SKIP) - public Builder afterSubmit(Optional afterSubmit) { - this.afterSubmit = afterSubmit; - return this; - } - - public Builder afterSubmit(FormEndingNodeAfterSubmit afterSubmit) { - this.afterSubmit = Optional.ofNullable(afterSubmit); - return this; - } - - @JsonSetter(value = "coordinates", nulls = Nulls.SKIP) - public Builder coordinates(Optional coordinates) { - this.coordinates = coordinates; - return this; - } - - public Builder coordinates(FormNodeCoordinates coordinates) { - this.coordinates = Optional.ofNullable(coordinates); - return this; - } - - @JsonSetter(value = "resume_flow", nulls = Nulls.SKIP) - public Builder resumeFlow(Optional resumeFlow) { - this.resumeFlow = resumeFlow; - return this; - } - - public Builder resumeFlow(Boolean resumeFlow) { - this.resumeFlow = Optional.ofNullable(resumeFlow); - return this; - } - - public FormEndingNode build() { - return new FormEndingNode(redirection, afterSubmit, coordinates, resumeFlow, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormEndingNodeAfterSubmit.java b/src/main/java/com/auth0/client/mgmt/types/FormEndingNodeAfterSubmit.java deleted file mode 100644 index 9cb34292c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormEndingNodeAfterSubmit.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormEndingNodeAfterSubmit.Builder.class) -public final class FormEndingNodeAfterSubmit { - private final Optional flowId; - - private final Map additionalProperties; - - private FormEndingNodeAfterSubmit(Optional flowId, Map additionalProperties) { - this.flowId = flowId; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("flow_id") - public Optional getFlowId() { - return flowId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormEndingNodeAfterSubmit && equalTo((FormEndingNodeAfterSubmit) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormEndingNodeAfterSubmit other) { - return flowId.equals(other.flowId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.flowId); - } - - @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 flowId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormEndingNodeAfterSubmit other) { - flowId(other.getFlowId()); - return this; - } - - @JsonSetter(value = "flow_id", nulls = Nulls.SKIP) - public Builder flowId(Optional flowId) { - this.flowId = flowId; - return this; - } - - public Builder flowId(String flowId) { - this.flowId = Optional.ofNullable(flowId); - return this; - } - - public FormEndingNodeAfterSubmit build() { - return new FormEndingNodeAfterSubmit(flowId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormEndingNodeId.java b/src/main/java/com/auth0/client/mgmt/types/FormEndingNodeId.java deleted file mode 100644 index 069476be9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormEndingNodeId.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormEndingNodeId { - public static final FormEndingNodeId ENDING = new FormEndingNodeId(Value.ENDING, "$ending"); - - private final Value value; - - private final String string; - - FormEndingNodeId(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormEndingNodeId && this.string.equals(((FormEndingNodeId) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ENDING: - return visitor.visitEnding(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormEndingNodeId valueOf(String value) { - switch (value) { - case "$ending": - return ENDING; - default: - return new FormEndingNodeId(Value.UNKNOWN, value); - } - } - - public enum Value { - ENDING, - - UNKNOWN - } - - public interface Visitor { - T visitEnding(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormEndingNodeRedirection.java b/src/main/java/com/auth0/client/mgmt/types/FormEndingNodeRedirection.java deleted file mode 100644 index c7f3601f3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormEndingNodeRedirection.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormEndingNodeRedirection.Builder.class) -public final class FormEndingNodeRedirection { - private final Optional delay; - - private final String target; - - private final Map additionalProperties; - - private FormEndingNodeRedirection( - Optional delay, String target, Map additionalProperties) { - this.delay = delay; - this.target = target; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("delay") - public Optional getDelay() { - return delay; - } - - @JsonProperty("target") - public String getTarget() { - return target; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormEndingNodeRedirection && equalTo((FormEndingNodeRedirection) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormEndingNodeRedirection other) { - return delay.equals(other.delay) && target.equals(other.target); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.delay, this.target); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TargetStage builder() { - return new Builder(); - } - - public interface TargetStage { - _FinalStage target(@NotNull String target); - - Builder from(FormEndingNodeRedirection other); - } - - public interface _FinalStage { - FormEndingNodeRedirection build(); - - _FinalStage delay(Optional delay); - - _FinalStage delay(Integer delay); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TargetStage, _FinalStage { - private String target; - - private Optional delay = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormEndingNodeRedirection other) { - delay(other.getDelay()); - target(other.getTarget()); - return this; - } - - @java.lang.Override - @JsonSetter("target") - public _FinalStage target(@NotNull String target) { - this.target = Objects.requireNonNull(target, "target must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage delay(Integer delay) { - this.delay = Optional.ofNullable(delay); - return this; - } - - @java.lang.Override - @JsonSetter(value = "delay", nulls = Nulls.SKIP) - public _FinalStage delay(Optional delay) { - this.delay = delay; - return this; - } - - @java.lang.Override - public FormEndingNodeRedirection build() { - return new FormEndingNodeRedirection(delay, target, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormField.java b/src/main/java/com/auth0/client/mgmt/types/FormField.java deleted file mode 100644 index 2efcc642c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormField.java +++ /dev/null @@ -1,263 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FormField.Deserializer.class) -public final class FormField { - private final Object value; - - private final int type; - - private FormField(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((FormFieldBoolean) this.value); - } else if (this.type == 1) { - return visitor.visit((FormFieldCards) this.value); - } else if (this.type == 2) { - return visitor.visit((FormFieldChoice) this.value); - } else if (this.type == 3) { - return visitor.visit((FormFieldCustom) this.value); - } else if (this.type == 4) { - return visitor.visit((FormFieldDate) this.value); - } else if (this.type == 5) { - return visitor.visit((FormFieldDropdown) this.value); - } else if (this.type == 6) { - return visitor.visit((FormFieldEmail) this.value); - } else if (this.type == 7) { - return visitor.visit((FormFieldFile) this.value); - } else if (this.type == 8) { - return visitor.visit((FormFieldLegal) this.value); - } else if (this.type == 9) { - return visitor.visit((FormFieldNumber) this.value); - } else if (this.type == 10) { - return visitor.visit((FormFieldPassword) this.value); - } else if (this.type == 11) { - return visitor.visit((FormFieldPayment) this.value); - } else if (this.type == 12) { - return visitor.visit((FormFieldSocial) this.value); - } else if (this.type == 13) { - return visitor.visit((FormFieldTel) this.value); - } else if (this.type == 14) { - return visitor.visit((FormFieldText) this.value); - } else if (this.type == 15) { - return visitor.visit((FormFieldUrl) 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 FormField && equalTo((FormField) other); - } - - private boolean equalTo(FormField 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 FormField of(FormFieldBoolean value) { - return new FormField(value, 0); - } - - public static FormField of(FormFieldCards value) { - return new FormField(value, 1); - } - - public static FormField of(FormFieldChoice value) { - return new FormField(value, 2); - } - - public static FormField of(FormFieldCustom value) { - return new FormField(value, 3); - } - - public static FormField of(FormFieldDate value) { - return new FormField(value, 4); - } - - public static FormField of(FormFieldDropdown value) { - return new FormField(value, 5); - } - - public static FormField of(FormFieldEmail value) { - return new FormField(value, 6); - } - - public static FormField of(FormFieldFile value) { - return new FormField(value, 7); - } - - public static FormField of(FormFieldLegal value) { - return new FormField(value, 8); - } - - public static FormField of(FormFieldNumber value) { - return new FormField(value, 9); - } - - public static FormField of(FormFieldPassword value) { - return new FormField(value, 10); - } - - public static FormField of(FormFieldPayment value) { - return new FormField(value, 11); - } - - public static FormField of(FormFieldSocial value) { - return new FormField(value, 12); - } - - public static FormField of(FormFieldTel value) { - return new FormField(value, 13); - } - - public static FormField of(FormFieldText value) { - return new FormField(value, 14); - } - - public static FormField of(FormFieldUrl value) { - return new FormField(value, 15); - } - - public interface Visitor { - T visit(FormFieldBoolean value); - - T visit(FormFieldCards value); - - T visit(FormFieldChoice value); - - T visit(FormFieldCustom value); - - T visit(FormFieldDate value); - - T visit(FormFieldDropdown value); - - T visit(FormFieldEmail value); - - T visit(FormFieldFile value); - - T visit(FormFieldLegal value); - - T visit(FormFieldNumber value); - - T visit(FormFieldPassword value); - - T visit(FormFieldPayment value); - - T visit(FormFieldSocial value); - - T visit(FormFieldTel value); - - T visit(FormFieldText value); - - T visit(FormFieldUrl value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FormField.class); - } - - @java.lang.Override - public FormField deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldBoolean.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldCards.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldChoice.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldCustom.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldDate.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldDropdown.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldEmail.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldFile.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldLegal.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldNumber.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldPassword.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldPayment.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldSocial.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldTel.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldText.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldUrl.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldBoolean.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldBoolean.java deleted file mode 100644 index 316f02a87..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldBoolean.java +++ /dev/null @@ -1,300 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldBoolean.Builder.class) -public final class FormFieldBoolean { - private final String id; - - private final FormComponentCategoryFieldConst category; - - private final FormFieldTypeBooleanConst type; - - private final FormFieldBooleanConfig config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormFieldBoolean( - String id, - FormComponentCategoryFieldConst category, - FormFieldTypeBooleanConst type, - FormFieldBooleanConfig config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryFieldConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormFieldTypeBooleanConst getType() { - return type; - } - - @JsonProperty("config") - public FormFieldBooleanConfig getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldBoolean && equalTo((FormFieldBoolean) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldBoolean other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormFieldBoolean other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryFieldConst category); - } - - public interface TypeStage { - ConfigStage type(@NotNull FormFieldTypeBooleanConst type); - } - - public interface ConfigStage { - _FinalStage config(@NotNull FormFieldBooleanConfig config); - } - - public interface _FinalStage { - FormFieldBoolean build(); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, ConfigStage, _FinalStage { - private String id; - - private FormComponentCategoryFieldConst category; - - private FormFieldTypeBooleanConst type; - - private FormFieldBooleanConfig config; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldBoolean other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryFieldConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ConfigStage type(@NotNull FormFieldTypeBooleanConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("config") - public _FinalStage config(@NotNull FormFieldBooleanConfig config) { - this.config = Objects.requireNonNull(config, "config must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public FormFieldBoolean build() { - return new FormFieldBoolean( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldBooleanConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldBooleanConfig.java deleted file mode 100644 index 6901ba78e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldBooleanConfig.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldBooleanConfig.Builder.class) -public final class FormFieldBooleanConfig { - private final Optional defaultValue; - - private final Optional options; - - private final Map additionalProperties; - - private FormFieldBooleanConfig( - Optional defaultValue, - Optional options, - Map additionalProperties) { - this.defaultValue = defaultValue; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("default_value") - public Optional getDefaultValue() { - return defaultValue; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldBooleanConfig && equalTo((FormFieldBooleanConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldBooleanConfig other) { - return defaultValue.equals(other.defaultValue) && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.defaultValue, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional defaultValue = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldBooleanConfig other) { - defaultValue(other.getDefaultValue()); - options(other.getOptions()); - 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; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(FormFieldBooleanConfigOptions options) { - this.options = Optional.ofNullable(options); - return this; - } - - public FormFieldBooleanConfig build() { - return new FormFieldBooleanConfig(defaultValue, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldBooleanConfigOptions.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldBooleanConfigOptions.java deleted file mode 100644 index 4303222fc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldBooleanConfigOptions.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldBooleanConfigOptions.Builder.class) -public final class FormFieldBooleanConfigOptions { - private final Optional true_; - - private final Optional false_; - - private final Map additionalProperties; - - private FormFieldBooleanConfigOptions( - Optional true_, Optional false_, Map additionalProperties) { - this.true_ = true_; - this.false_ = false_; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("true") - public Optional getTrue() { - return true_; - } - - @JsonProperty("false") - public Optional getFalse() { - return false_; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldBooleanConfigOptions && equalTo((FormFieldBooleanConfigOptions) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldBooleanConfigOptions other) { - return true_.equals(other.true_) && false_.equals(other.false_); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.true_, this.false_); - } - - @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 true_ = Optional.empty(); - - private Optional false_ = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldBooleanConfigOptions other) { - true_(other.getTrue()); - false_(other.getFalse()); - return this; - } - - @JsonSetter(value = "true", nulls = Nulls.SKIP) - public Builder true_(Optional true_) { - this.true_ = true_; - return this; - } - - public Builder true_(String true_) { - this.true_ = Optional.ofNullable(true_); - return this; - } - - @JsonSetter(value = "false", nulls = Nulls.SKIP) - public Builder false_(Optional false_) { - this.false_ = false_; - return this; - } - - public Builder false_(String false_) { - this.false_ = Optional.ofNullable(false_); - return this; - } - - public FormFieldBooleanConfigOptions build() { - return new FormFieldBooleanConfigOptions(true_, false_, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldCards.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldCards.java deleted file mode 100644 index 3c7c1a698..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldCards.java +++ /dev/null @@ -1,306 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldCards.Builder.class) -public final class FormFieldCards { - private final String id; - - private final FormComponentCategoryFieldConst category; - - private final FormFieldTypeCardsConst type; - - private final Optional config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormFieldCards( - String id, - FormComponentCategoryFieldConst category, - FormFieldTypeCardsConst type, - Optional config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryFieldConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormFieldTypeCardsConst getType() { - return type; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldCards && equalTo((FormFieldCards) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldCards other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormFieldCards other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryFieldConst category); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormFieldTypeCardsConst type); - } - - public interface _FinalStage { - FormFieldCards build(); - - _FinalStage config(Optional config); - - _FinalStage config(FormFieldCardsConfig config); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, _FinalStage { - private String id; - - private FormComponentCategoryFieldConst category; - - private FormFieldTypeCardsConst type; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - private Optional config = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldCards other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryFieldConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormFieldTypeCardsConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public _FinalStage config(FormFieldCardsConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public FormFieldCards build() { - return new FormFieldCards( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldCardsConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldCardsConfig.java deleted file mode 100644 index a526bc8b9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldCardsConfig.java +++ /dev/null @@ -1,144 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldCardsConfig.Builder.class) -public final class FormFieldCardsConfig { - private final Optional hideLabels; - - private final Optional multiple; - - private final Optional> options; - - private final Map additionalProperties; - - private FormFieldCardsConfig( - Optional hideLabels, - Optional multiple, - Optional> options, - Map additionalProperties) { - this.hideLabels = hideLabels; - this.multiple = multiple; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("hide_labels") - public Optional getHideLabels() { - return hideLabels; - } - - @JsonProperty("multiple") - public Optional getMultiple() { - return multiple; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldCardsConfig && equalTo((FormFieldCardsConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldCardsConfig other) { - return hideLabels.equals(other.hideLabels) && multiple.equals(other.multiple) && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.hideLabels, this.multiple, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional hideLabels = Optional.empty(); - - private Optional multiple = Optional.empty(); - - private Optional> options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldCardsConfig other) { - hideLabels(other.getHideLabels()); - multiple(other.getMultiple()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "hide_labels", nulls = Nulls.SKIP) - public Builder hideLabels(Optional hideLabels) { - this.hideLabels = hideLabels; - return this; - } - - public Builder hideLabels(Boolean hideLabels) { - this.hideLabels = Optional.ofNullable(hideLabels); - return this; - } - - @JsonSetter(value = "multiple", nulls = Nulls.SKIP) - public Builder multiple(Optional multiple) { - this.multiple = multiple; - return this; - } - - public Builder multiple(Boolean multiple) { - this.multiple = Optional.ofNullable(multiple); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional> options) { - this.options = options; - return this; - } - - public Builder options(List options) { - this.options = Optional.ofNullable(options); - return this; - } - - public FormFieldCardsConfig build() { - return new FormFieldCardsConfig(hideLabels, multiple, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldCardsConfigOption.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldCardsConfigOption.java deleted file mode 100644 index e85a6ccea..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldCardsConfigOption.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FormFieldCardsConfigOption.Builder.class) -public final class FormFieldCardsConfigOption { - private final String value; - - private final String label; - - private final String imageUrl; - - private final Map additionalProperties; - - private FormFieldCardsConfigOption( - String value, String label, String imageUrl, Map additionalProperties) { - this.value = value; - this.label = label; - this.imageUrl = imageUrl; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("value") - public String getValue() { - return value; - } - - @JsonProperty("label") - public String getLabel() { - return label; - } - - @JsonProperty("image_url") - public String getImageUrl() { - return imageUrl; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldCardsConfigOption && equalTo((FormFieldCardsConfigOption) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldCardsConfigOption other) { - return value.equals(other.value) && label.equals(other.label) && imageUrl.equals(other.imageUrl); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value, this.label, this.imageUrl); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ValueStage builder() { - return new Builder(); - } - - public interface ValueStage { - LabelStage value(@NotNull String value); - - Builder from(FormFieldCardsConfigOption other); - } - - public interface LabelStage { - ImageUrlStage label(@NotNull String label); - } - - public interface ImageUrlStage { - _FinalStage imageUrl(@NotNull String imageUrl); - } - - public interface _FinalStage { - FormFieldCardsConfigOption build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ValueStage, LabelStage, ImageUrlStage, _FinalStage { - private String value; - - private String label; - - private String imageUrl; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldCardsConfigOption other) { - value(other.getValue()); - label(other.getLabel()); - imageUrl(other.getImageUrl()); - return this; - } - - @java.lang.Override - @JsonSetter("value") - public LabelStage value(@NotNull String value) { - this.value = Objects.requireNonNull(value, "value must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("label") - public ImageUrlStage label(@NotNull String label) { - this.label = Objects.requireNonNull(label, "label must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("image_url") - public _FinalStage imageUrl(@NotNull String imageUrl) { - this.imageUrl = Objects.requireNonNull(imageUrl, "imageUrl must not be null"); - return this; - } - - @java.lang.Override - public FormFieldCardsConfigOption build() { - return new FormFieldCardsConfigOption(value, label, imageUrl, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldChoice.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldChoice.java deleted file mode 100644 index 6d6e9197e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldChoice.java +++ /dev/null @@ -1,306 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldChoice.Builder.class) -public final class FormFieldChoice { - private final String id; - - private final FormComponentCategoryFieldConst category; - - private final FormFieldTypeChoiceConst type; - - private final Optional config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormFieldChoice( - String id, - FormComponentCategoryFieldConst category, - FormFieldTypeChoiceConst type, - Optional config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryFieldConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormFieldTypeChoiceConst getType() { - return type; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldChoice && equalTo((FormFieldChoice) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldChoice other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormFieldChoice other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryFieldConst category); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormFieldTypeChoiceConst type); - } - - public interface _FinalStage { - FormFieldChoice build(); - - _FinalStage config(Optional config); - - _FinalStage config(FormFieldChoiceConfig config); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, _FinalStage { - private String id; - - private FormComponentCategoryFieldConst category; - - private FormFieldTypeChoiceConst type; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - private Optional config = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldChoice other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryFieldConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormFieldTypeChoiceConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public _FinalStage config(FormFieldChoiceConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public FormFieldChoice build() { - return new FormFieldChoice( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldChoiceConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldChoiceConfig.java deleted file mode 100644 index 181bab370..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldChoiceConfig.java +++ /dev/null @@ -1,144 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldChoiceConfig.Builder.class) -public final class FormFieldChoiceConfig { - private final Optional multiple; - - private final Optional> options; - - private final Optional allowOther; - - private final Map additionalProperties; - - private FormFieldChoiceConfig( - Optional multiple, - Optional> options, - Optional allowOther, - Map additionalProperties) { - this.multiple = multiple; - this.options = options; - this.allowOther = allowOther; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("multiple") - public Optional getMultiple() { - return multiple; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - - @JsonProperty("allow_other") - public Optional getAllowOther() { - return allowOther; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldChoiceConfig && equalTo((FormFieldChoiceConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldChoiceConfig other) { - return multiple.equals(other.multiple) && options.equals(other.options) && allowOther.equals(other.allowOther); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.multiple, this.options, this.allowOther); - } - - @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 multiple = Optional.empty(); - - private Optional> options = Optional.empty(); - - private Optional allowOther = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldChoiceConfig other) { - multiple(other.getMultiple()); - options(other.getOptions()); - allowOther(other.getAllowOther()); - return this; - } - - @JsonSetter(value = "multiple", nulls = Nulls.SKIP) - public Builder multiple(Optional multiple) { - this.multiple = multiple; - return this; - } - - public Builder multiple(Boolean multiple) { - this.multiple = Optional.ofNullable(multiple); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional> options) { - this.options = options; - return this; - } - - public Builder options(List options) { - this.options = Optional.ofNullable(options); - return this; - } - - @JsonSetter(value = "allow_other", nulls = Nulls.SKIP) - public Builder allowOther(Optional allowOther) { - this.allowOther = allowOther; - return this; - } - - public Builder allowOther(FormFieldChoiceConfigAllowOther allowOther) { - this.allowOther = Optional.ofNullable(allowOther); - return this; - } - - public FormFieldChoiceConfig build() { - return new FormFieldChoiceConfig(multiple, options, allowOther, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldChoiceConfigAllowOther.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldChoiceConfigAllowOther.java deleted file mode 100644 index 49c6d7e81..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldChoiceConfigAllowOther.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldChoiceConfigAllowOther.Builder.class) -public final class FormFieldChoiceConfigAllowOther { - private final Optional enabled; - - private final Optional label; - - private final Optional placeholder; - - private final Map additionalProperties; - - private FormFieldChoiceConfigAllowOther( - Optional enabled, - Optional label, - Optional placeholder, - Map additionalProperties) { - this.enabled = enabled; - this.label = label; - this.placeholder = placeholder; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("placeholder") - public Optional getPlaceholder() { - return placeholder; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldChoiceConfigAllowOther && equalTo((FormFieldChoiceConfigAllowOther) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldChoiceConfigAllowOther other) { - return enabled.equals(other.enabled) && label.equals(other.label) && placeholder.equals(other.placeholder); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled, this.label, this.placeholder); - } - - @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 enabled = Optional.empty(); - - private Optional label = Optional.empty(); - - private Optional placeholder = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldChoiceConfigAllowOther other) { - enabled(other.getEnabled()); - label(other.getLabel()); - placeholder(other.getPlaceholder()); - return this; - } - - @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; - } - - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public Builder label(Optional label) { - this.label = label; - return this; - } - - public Builder label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @JsonSetter(value = "placeholder", nulls = Nulls.SKIP) - public Builder placeholder(Optional placeholder) { - this.placeholder = placeholder; - return this; - } - - public Builder placeholder(String placeholder) { - this.placeholder = Optional.ofNullable(placeholder); - return this; - } - - public FormFieldChoiceConfigAllowOther build() { - return new FormFieldChoiceConfigAllowOther(enabled, label, placeholder, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldChoiceConfigOption.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldChoiceConfigOption.java deleted file mode 100644 index a7b0cf35b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldChoiceConfigOption.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FormFieldChoiceConfigOption.Builder.class) -public final class FormFieldChoiceConfigOption { - private final String value; - - private final String label; - - private final Map additionalProperties; - - private FormFieldChoiceConfigOption(String value, String label, Map additionalProperties) { - this.value = value; - this.label = label; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("value") - public String getValue() { - return value; - } - - @JsonProperty("label") - public String getLabel() { - return label; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldChoiceConfigOption && equalTo((FormFieldChoiceConfigOption) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldChoiceConfigOption other) { - return value.equals(other.value) && label.equals(other.label); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value, this.label); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ValueStage builder() { - return new Builder(); - } - - public interface ValueStage { - LabelStage value(@NotNull String value); - - Builder from(FormFieldChoiceConfigOption other); - } - - public interface LabelStage { - _FinalStage label(@NotNull String label); - } - - public interface _FinalStage { - FormFieldChoiceConfigOption build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ValueStage, LabelStage, _FinalStage { - private String value; - - private String label; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldChoiceConfigOption other) { - value(other.getValue()); - label(other.getLabel()); - return this; - } - - @java.lang.Override - @JsonSetter("value") - public LabelStage value(@NotNull String value) { - this.value = Objects.requireNonNull(value, "value must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("label") - public _FinalStage label(@NotNull String label) { - this.label = Objects.requireNonNull(label, "label must not be null"); - return this; - } - - @java.lang.Override - public FormFieldChoiceConfigOption build() { - return new FormFieldChoiceConfigOption(value, label, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldCustom.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldCustom.java deleted file mode 100644 index 7ea82eb7f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldCustom.java +++ /dev/null @@ -1,300 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldCustom.Builder.class) -public final class FormFieldCustom { - private final String id; - - private final FormComponentCategoryFieldConst category; - - private final FormFieldTypeCustomConst type; - - private final FormFieldCustomConfig config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormFieldCustom( - String id, - FormComponentCategoryFieldConst category, - FormFieldTypeCustomConst type, - FormFieldCustomConfig config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryFieldConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormFieldTypeCustomConst getType() { - return type; - } - - @JsonProperty("config") - public FormFieldCustomConfig getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldCustom && equalTo((FormFieldCustom) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldCustom other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormFieldCustom other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryFieldConst category); - } - - public interface TypeStage { - ConfigStage type(@NotNull FormFieldTypeCustomConst type); - } - - public interface ConfigStage { - _FinalStage config(@NotNull FormFieldCustomConfig config); - } - - public interface _FinalStage { - FormFieldCustom build(); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, ConfigStage, _FinalStage { - private String id; - - private FormComponentCategoryFieldConst category; - - private FormFieldTypeCustomConst type; - - private FormFieldCustomConfig config; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldCustom other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryFieldConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ConfigStage type(@NotNull FormFieldTypeCustomConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("config") - public _FinalStage config(@NotNull FormFieldCustomConfig config) { - this.config = Objects.requireNonNull(config, "config must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public FormFieldCustom build() { - return new FormFieldCustom( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldCustomConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldCustomConfig.java deleted file mode 100644 index 721e611c7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldCustomConfig.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldCustomConfig.Builder.class) -public final class FormFieldCustomConfig { - private final Map schema; - - private final String code; - - private final Optional css; - - private final Optional> params; - - private final Map additionalProperties; - - private FormFieldCustomConfig( - Map schema, - String code, - Optional css, - Optional> params, - Map additionalProperties) { - this.schema = schema; - this.code = code; - this.css = css; - this.params = params; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("schema") - public Map getSchema() { - return schema; - } - - @JsonProperty("code") - public String getCode() { - return code; - } - - @JsonProperty("css") - public Optional getCss() { - return css; - } - - @JsonProperty("params") - public Optional> getParams() { - return params; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldCustomConfig && equalTo((FormFieldCustomConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldCustomConfig other) { - return schema.equals(other.schema) - && code.equals(other.code) - && css.equals(other.css) - && params.equals(other.params); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.schema, this.code, this.css, this.params); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static CodeStage builder() { - return new Builder(); - } - - public interface CodeStage { - _FinalStage code(@NotNull String code); - - Builder from(FormFieldCustomConfig other); - } - - public interface _FinalStage { - FormFieldCustomConfig build(); - - _FinalStage schema(Map schema); - - _FinalStage putAllSchema(Map schema); - - _FinalStage schema(String key, Object value); - - _FinalStage css(Optional css); - - _FinalStage css(String css); - - _FinalStage params(Optional> params); - - _FinalStage params(Map params); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements CodeStage, _FinalStage { - private String code; - - private Optional> params = Optional.empty(); - - private Optional css = Optional.empty(); - - private Map schema = new LinkedHashMap<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldCustomConfig other) { - schema(other.getSchema()); - code(other.getCode()); - css(other.getCss()); - params(other.getParams()); - return this; - } - - @java.lang.Override - @JsonSetter("code") - public _FinalStage code(@NotNull String code) { - this.code = Objects.requireNonNull(code, "code must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage params(Map params) { - this.params = Optional.ofNullable(params); - return this; - } - - @java.lang.Override - @JsonSetter(value = "params", nulls = Nulls.SKIP) - public _FinalStage params(Optional> params) { - this.params = params; - return this; - } - - @java.lang.Override - public _FinalStage css(String css) { - this.css = Optional.ofNullable(css); - return this; - } - - @java.lang.Override - @JsonSetter(value = "css", nulls = Nulls.SKIP) - public _FinalStage css(Optional css) { - this.css = css; - return this; - } - - @java.lang.Override - public _FinalStage schema(String key, Object value) { - this.schema.put(key, value); - return this; - } - - @java.lang.Override - public _FinalStage putAllSchema(Map schema) { - if (schema != null) { - this.schema.putAll(schema); - } - return this; - } - - @java.lang.Override - @JsonSetter(value = "schema", nulls = Nulls.SKIP) - public _FinalStage schema(Map schema) { - this.schema.clear(); - if (schema != null) { - this.schema.putAll(schema); - } - return this; - } - - @java.lang.Override - public FormFieldCustomConfig build() { - return new FormFieldCustomConfig(schema, code, css, params, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldDate.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldDate.java deleted file mode 100644 index 3bfc154f0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldDate.java +++ /dev/null @@ -1,300 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldDate.Builder.class) -public final class FormFieldDate { - private final String id; - - private final FormComponentCategoryFieldConst category; - - private final FormFieldTypeDateConst type; - - private final FormFieldDateConfig config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormFieldDate( - String id, - FormComponentCategoryFieldConst category, - FormFieldTypeDateConst type, - FormFieldDateConfig config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryFieldConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormFieldTypeDateConst getType() { - return type; - } - - @JsonProperty("config") - public FormFieldDateConfig getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldDate && equalTo((FormFieldDate) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldDate other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormFieldDate other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryFieldConst category); - } - - public interface TypeStage { - ConfigStage type(@NotNull FormFieldTypeDateConst type); - } - - public interface ConfigStage { - _FinalStage config(@NotNull FormFieldDateConfig config); - } - - public interface _FinalStage { - FormFieldDate build(); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, ConfigStage, _FinalStage { - private String id; - - private FormComponentCategoryFieldConst category; - - private FormFieldTypeDateConst type; - - private FormFieldDateConfig config; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldDate other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryFieldConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ConfigStage type(@NotNull FormFieldTypeDateConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("config") - public _FinalStage config(@NotNull FormFieldDateConfig config) { - this.config = Objects.requireNonNull(config, "config must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public FormFieldDate build() { - return new FormFieldDate( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldDateConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldDateConfig.java deleted file mode 100644 index 11f4bdb32..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldDateConfig.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldDateConfig.Builder.class) -public final class FormFieldDateConfig { - private final Optional format; - - private final Optional defaultValue; - - private final Map additionalProperties; - - private FormFieldDateConfig( - Optional format, - Optional defaultValue, - Map additionalProperties) { - this.format = format; - this.defaultValue = defaultValue; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("format") - public Optional getFormat() { - return format; - } - - @JsonProperty("default_value") - public Optional getDefaultValue() { - return defaultValue; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldDateConfig && equalTo((FormFieldDateConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldDateConfig other) { - return format.equals(other.format) && defaultValue.equals(other.defaultValue); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.format, 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 format = Optional.empty(); - - private Optional defaultValue = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldDateConfig other) { - format(other.getFormat()); - defaultValue(other.getDefaultValue()); - return this; - } - - @JsonSetter(value = "format", nulls = Nulls.SKIP) - public Builder format(Optional format) { - this.format = format; - return this; - } - - public Builder format(FormFieldDateConfigFormatEnum format) { - this.format = Optional.ofNullable(format); - return this; - } - - @JsonSetter(value = "default_value", nulls = Nulls.SKIP) - public Builder defaultValue(Optional defaultValue) { - this.defaultValue = defaultValue; - return this; - } - - public Builder defaultValue(String defaultValue) { - this.defaultValue = Optional.ofNullable(defaultValue); - return this; - } - - public FormFieldDateConfig build() { - return new FormFieldDateConfig(format, defaultValue, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldDateConfigFormatEnum.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldDateConfigFormatEnum.java deleted file mode 100644 index 1bc0f9a37..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldDateConfigFormatEnum.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldDateConfigFormatEnum { - public static final FormFieldDateConfigFormatEnum TIME = new FormFieldDateConfigFormatEnum(Value.TIME, "TIME"); - - public static final FormFieldDateConfigFormatEnum DATE = new FormFieldDateConfigFormatEnum(Value.DATE, "DATE"); - - private final Value value; - - private final String string; - - FormFieldDateConfigFormatEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldDateConfigFormatEnum - && this.string.equals(((FormFieldDateConfigFormatEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TIME: - return visitor.visitTime(); - case DATE: - return visitor.visitDate(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldDateConfigFormatEnum valueOf(String value) { - switch (value) { - case "TIME": - return TIME; - case "DATE": - return DATE; - default: - return new FormFieldDateConfigFormatEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - DATE, - - TIME, - - UNKNOWN - } - - public interface Visitor { - T visitDate(); - - T visitTime(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldDropdown.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldDropdown.java deleted file mode 100644 index 1596665ec..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldDropdown.java +++ /dev/null @@ -1,306 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldDropdown.Builder.class) -public final class FormFieldDropdown { - private final String id; - - private final FormComponentCategoryFieldConst category; - - private final FormFieldTypeDropdownConst type; - - private final Optional config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormFieldDropdown( - String id, - FormComponentCategoryFieldConst category, - FormFieldTypeDropdownConst type, - Optional config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryFieldConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormFieldTypeDropdownConst getType() { - return type; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldDropdown && equalTo((FormFieldDropdown) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldDropdown other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormFieldDropdown other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryFieldConst category); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormFieldTypeDropdownConst type); - } - - public interface _FinalStage { - FormFieldDropdown build(); - - _FinalStage config(Optional config); - - _FinalStage config(FormFieldDropdownConfig config); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, _FinalStage { - private String id; - - private FormComponentCategoryFieldConst category; - - private FormFieldTypeDropdownConst type; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - private Optional config = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldDropdown other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryFieldConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormFieldTypeDropdownConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public _FinalStage config(FormFieldDropdownConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public FormFieldDropdown build() { - return new FormFieldDropdown( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldDropdownConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldDropdownConfig.java deleted file mode 100644 index 5a1efa85e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldDropdownConfig.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldDropdownConfig.Builder.class) -public final class FormFieldDropdownConfig { - private final Optional multiple; - - private final Optional> options; - - private final Optional placeholder; - - private final Map additionalProperties; - - private FormFieldDropdownConfig( - Optional multiple, - Optional> options, - Optional placeholder, - Map additionalProperties) { - this.multiple = multiple; - this.options = options; - this.placeholder = placeholder; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("multiple") - public Optional getMultiple() { - return multiple; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - - @JsonProperty("placeholder") - public Optional getPlaceholder() { - return placeholder; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldDropdownConfig && equalTo((FormFieldDropdownConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldDropdownConfig other) { - return multiple.equals(other.multiple) - && options.equals(other.options) - && placeholder.equals(other.placeholder); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.multiple, this.options, this.placeholder); - } - - @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 multiple = Optional.empty(); - - private Optional> options = Optional.empty(); - - private Optional placeholder = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldDropdownConfig other) { - multiple(other.getMultiple()); - options(other.getOptions()); - placeholder(other.getPlaceholder()); - return this; - } - - @JsonSetter(value = "multiple", nulls = Nulls.SKIP) - public Builder multiple(Optional multiple) { - this.multiple = multiple; - return this; - } - - public Builder multiple(Boolean multiple) { - this.multiple = Optional.ofNullable(multiple); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional> options) { - this.options = options; - return this; - } - - public Builder options(List options) { - this.options = Optional.ofNullable(options); - return this; - } - - @JsonSetter(value = "placeholder", nulls = Nulls.SKIP) - public Builder placeholder(Optional placeholder) { - this.placeholder = placeholder; - return this; - } - - public Builder placeholder(String placeholder) { - this.placeholder = Optional.ofNullable(placeholder); - return this; - } - - public FormFieldDropdownConfig build() { - return new FormFieldDropdownConfig(multiple, options, placeholder, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldDropdownConfigOption.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldDropdownConfigOption.java deleted file mode 100644 index 49965c866..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldDropdownConfigOption.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FormFieldDropdownConfigOption.Builder.class) -public final class FormFieldDropdownConfigOption { - private final String value; - - private final String label; - - private final Map additionalProperties; - - private FormFieldDropdownConfigOption(String value, String label, Map additionalProperties) { - this.value = value; - this.label = label; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("value") - public String getValue() { - return value; - } - - @JsonProperty("label") - public String getLabel() { - return label; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldDropdownConfigOption && equalTo((FormFieldDropdownConfigOption) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldDropdownConfigOption other) { - return value.equals(other.value) && label.equals(other.label); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value, this.label); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ValueStage builder() { - return new Builder(); - } - - public interface ValueStage { - LabelStage value(@NotNull String value); - - Builder from(FormFieldDropdownConfigOption other); - } - - public interface LabelStage { - _FinalStage label(@NotNull String label); - } - - public interface _FinalStage { - FormFieldDropdownConfigOption build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ValueStage, LabelStage, _FinalStage { - private String value; - - private String label; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldDropdownConfigOption other) { - value(other.getValue()); - label(other.getLabel()); - return this; - } - - @java.lang.Override - @JsonSetter("value") - public LabelStage value(@NotNull String value) { - this.value = Objects.requireNonNull(value, "value must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("label") - public _FinalStage label(@NotNull String label) { - this.label = Objects.requireNonNull(label, "label must not be null"); - return this; - } - - @java.lang.Override - public FormFieldDropdownConfigOption build() { - return new FormFieldDropdownConfigOption(value, label, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldEmail.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldEmail.java deleted file mode 100644 index 6adb0a4bf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldEmail.java +++ /dev/null @@ -1,306 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldEmail.Builder.class) -public final class FormFieldEmail { - private final String id; - - private final FormComponentCategoryFieldConst category; - - private final FormFieldTypeEmailConst type; - - private final Optional config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormFieldEmail( - String id, - FormComponentCategoryFieldConst category, - FormFieldTypeEmailConst type, - Optional config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryFieldConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormFieldTypeEmailConst getType() { - return type; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldEmail && equalTo((FormFieldEmail) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldEmail other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormFieldEmail other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryFieldConst category); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormFieldTypeEmailConst type); - } - - public interface _FinalStage { - FormFieldEmail build(); - - _FinalStage config(Optional config); - - _FinalStage config(FormFieldEmailConfig config); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, _FinalStage { - private String id; - - private FormComponentCategoryFieldConst category; - - private FormFieldTypeEmailConst type; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - private Optional config = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldEmail other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryFieldConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormFieldTypeEmailConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public _FinalStage config(FormFieldEmailConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public FormFieldEmail build() { - return new FormFieldEmail( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldEmailConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldEmailConfig.java deleted file mode 100644 index 6cf5817fe..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldEmailConfig.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldEmailConfig.Builder.class) -public final class FormFieldEmailConfig { - private final Optional defaultValue; - - private final Optional placeholder; - - private final Map additionalProperties; - - private FormFieldEmailConfig( - Optional defaultValue, Optional placeholder, Map additionalProperties) { - this.defaultValue = defaultValue; - this.placeholder = placeholder; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("default_value") - public Optional getDefaultValue() { - return defaultValue; - } - - @JsonProperty("placeholder") - public Optional getPlaceholder() { - return placeholder; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldEmailConfig && equalTo((FormFieldEmailConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldEmailConfig other) { - return defaultValue.equals(other.defaultValue) && placeholder.equals(other.placeholder); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.defaultValue, this.placeholder); - } - - @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(); - - private Optional placeholder = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldEmailConfig other) { - defaultValue(other.getDefaultValue()); - placeholder(other.getPlaceholder()); - return this; - } - - @JsonSetter(value = "default_value", nulls = Nulls.SKIP) - public Builder defaultValue(Optional defaultValue) { - this.defaultValue = defaultValue; - return this; - } - - public Builder defaultValue(String defaultValue) { - this.defaultValue = Optional.ofNullable(defaultValue); - return this; - } - - @JsonSetter(value = "placeholder", nulls = Nulls.SKIP) - public Builder placeholder(Optional placeholder) { - this.placeholder = placeholder; - return this; - } - - public Builder placeholder(String placeholder) { - this.placeholder = Optional.ofNullable(placeholder); - return this; - } - - public FormFieldEmailConfig build() { - return new FormFieldEmailConfig(defaultValue, placeholder, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldFile.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldFile.java deleted file mode 100644 index 270c8cbb3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldFile.java +++ /dev/null @@ -1,306 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldFile.Builder.class) -public final class FormFieldFile { - private final String id; - - private final FormComponentCategoryFieldConst category; - - private final FormFieldTypeFileConst type; - - private final Optional config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormFieldFile( - String id, - FormComponentCategoryFieldConst category, - FormFieldTypeFileConst type, - Optional config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryFieldConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormFieldTypeFileConst getType() { - return type; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldFile && equalTo((FormFieldFile) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldFile other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormFieldFile other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryFieldConst category); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormFieldTypeFileConst type); - } - - public interface _FinalStage { - FormFieldFile build(); - - _FinalStage config(Optional config); - - _FinalStage config(FormFieldFileConfig config); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, _FinalStage { - private String id; - - private FormComponentCategoryFieldConst category; - - private FormFieldTypeFileConst type; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - private Optional config = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldFile other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryFieldConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormFieldTypeFileConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public _FinalStage config(FormFieldFileConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public FormFieldFile build() { - return new FormFieldFile( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldFileConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldFileConfig.java deleted file mode 100644 index 29a77e1e3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldFileConfig.java +++ /dev/null @@ -1,219 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldFileConfig.Builder.class) -public final class FormFieldFileConfig { - private final Optional multiple; - - private final Optional storage; - - private final Optional> categories; - - private final Optional> extensions; - - private final Optional maxSize; - - private final Optional maxFiles; - - private final Map additionalProperties; - - private FormFieldFileConfig( - Optional multiple, - Optional storage, - Optional> categories, - Optional> extensions, - Optional maxSize, - Optional maxFiles, - Map additionalProperties) { - this.multiple = multiple; - this.storage = storage; - this.categories = categories; - this.extensions = extensions; - this.maxSize = maxSize; - this.maxFiles = maxFiles; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("multiple") - public Optional getMultiple() { - return multiple; - } - - @JsonProperty("storage") - public Optional getStorage() { - return storage; - } - - @JsonProperty("categories") - public Optional> getCategories() { - return categories; - } - - @JsonProperty("extensions") - public Optional> getExtensions() { - return extensions; - } - - @JsonProperty("maxSize") - public Optional getMaxSize() { - return maxSize; - } - - @JsonProperty("maxFiles") - public Optional getMaxFiles() { - return maxFiles; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldFileConfig && equalTo((FormFieldFileConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldFileConfig other) { - return multiple.equals(other.multiple) - && storage.equals(other.storage) - && categories.equals(other.categories) - && extensions.equals(other.extensions) - && maxSize.equals(other.maxSize) - && maxFiles.equals(other.maxFiles); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.multiple, this.storage, this.categories, this.extensions, this.maxSize, this.maxFiles); - } - - @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 multiple = Optional.empty(); - - private Optional storage = Optional.empty(); - - private Optional> categories = Optional.empty(); - - private Optional> extensions = Optional.empty(); - - private Optional maxSize = Optional.empty(); - - private Optional maxFiles = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldFileConfig other) { - multiple(other.getMultiple()); - storage(other.getStorage()); - categories(other.getCategories()); - extensions(other.getExtensions()); - maxSize(other.getMaxSize()); - maxFiles(other.getMaxFiles()); - return this; - } - - @JsonSetter(value = "multiple", nulls = Nulls.SKIP) - public Builder multiple(Optional multiple) { - this.multiple = multiple; - return this; - } - - public Builder multiple(Boolean multiple) { - this.multiple = Optional.ofNullable(multiple); - return this; - } - - @JsonSetter(value = "storage", nulls = Nulls.SKIP) - public Builder storage(Optional storage) { - this.storage = storage; - return this; - } - - public Builder storage(FormFieldFileConfigStorage storage) { - this.storage = Optional.ofNullable(storage); - return this; - } - - @JsonSetter(value = "categories", nulls = Nulls.SKIP) - public Builder categories(Optional> categories) { - this.categories = categories; - return this; - } - - public Builder categories(List categories) { - this.categories = Optional.ofNullable(categories); - return this; - } - - @JsonSetter(value = "extensions", nulls = Nulls.SKIP) - public Builder extensions(Optional> extensions) { - this.extensions = extensions; - return this; - } - - public Builder extensions(List extensions) { - this.extensions = Optional.ofNullable(extensions); - return this; - } - - @JsonSetter(value = "maxSize", nulls = Nulls.SKIP) - public Builder maxSize(Optional maxSize) { - this.maxSize = maxSize; - return this; - } - - public Builder maxSize(Integer maxSize) { - this.maxSize = Optional.ofNullable(maxSize); - return this; - } - - @JsonSetter(value = "maxFiles", nulls = Nulls.SKIP) - public Builder maxFiles(Optional maxFiles) { - this.maxFiles = maxFiles; - return this; - } - - public Builder maxFiles(Integer maxFiles) { - this.maxFiles = Optional.ofNullable(maxFiles); - return this; - } - - public FormFieldFileConfig build() { - return new FormFieldFileConfig( - multiple, storage, categories, extensions, maxSize, maxFiles, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldFileConfigCategoryEnum.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldFileConfigCategoryEnum.java deleted file mode 100644 index e28d21e68..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldFileConfigCategoryEnum.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldFileConfigCategoryEnum { - public static final FormFieldFileConfigCategoryEnum VIDEO = - new FormFieldFileConfigCategoryEnum(Value.VIDEO, "VIDEO"); - - public static final FormFieldFileConfigCategoryEnum DOCUMENT = - new FormFieldFileConfigCategoryEnum(Value.DOCUMENT, "DOCUMENT"); - - public static final FormFieldFileConfigCategoryEnum AUDIO = - new FormFieldFileConfigCategoryEnum(Value.AUDIO, "AUDIO"); - - public static final FormFieldFileConfigCategoryEnum ARCHIVE = - new FormFieldFileConfigCategoryEnum(Value.ARCHIVE, "ARCHIVE"); - - public static final FormFieldFileConfigCategoryEnum IMAGE = - new FormFieldFileConfigCategoryEnum(Value.IMAGE, "IMAGE"); - - private final Value value; - - private final String string; - - FormFieldFileConfigCategoryEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldFileConfigCategoryEnum - && this.string.equals(((FormFieldFileConfigCategoryEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case VIDEO: - return visitor.visitVideo(); - case DOCUMENT: - return visitor.visitDocument(); - case AUDIO: - return visitor.visitAudio(); - case ARCHIVE: - return visitor.visitArchive(); - case IMAGE: - return visitor.visitImage(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldFileConfigCategoryEnum valueOf(String value) { - switch (value) { - case "VIDEO": - return VIDEO; - case "DOCUMENT": - return DOCUMENT; - case "AUDIO": - return AUDIO; - case "ARCHIVE": - return ARCHIVE; - case "IMAGE": - return IMAGE; - default: - return new FormFieldFileConfigCategoryEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AUDIO, - - VIDEO, - - IMAGE, - - DOCUMENT, - - ARCHIVE, - - UNKNOWN - } - - public interface Visitor { - T visitAudio(); - - T visitVideo(); - - T visitImage(); - - T visitDocument(); - - T visitArchive(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldFileConfigStorage.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldFileConfigStorage.java deleted file mode 100644 index 56854c2b6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldFileConfigStorage.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FormFieldFileConfigStorage.Builder.class) -public final class FormFieldFileConfigStorage { - private final FormFieldFileConfigStorageTypeEnum type; - - private final Map additionalProperties; - - private FormFieldFileConfigStorage( - FormFieldFileConfigStorageTypeEnum type, Map additionalProperties) { - this.type = type; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FormFieldFileConfigStorageTypeEnum getType() { - return type; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldFileConfigStorage && equalTo((FormFieldFileConfigStorage) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldFileConfigStorage other) { - return type.equals(other.type); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormFieldFileConfigStorageTypeEnum type); - - Builder from(FormFieldFileConfigStorage other); - } - - public interface _FinalStage { - FormFieldFileConfigStorage build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, _FinalStage { - private FormFieldFileConfigStorageTypeEnum type; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldFileConfigStorage other) { - type(other.getType()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormFieldFileConfigStorageTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public FormFieldFileConfigStorage build() { - return new FormFieldFileConfigStorage(type, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldFileConfigStorageTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldFileConfigStorageTypeEnum.java deleted file mode 100644 index 363cb3796..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldFileConfigStorageTypeEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldFileConfigStorageTypeEnum { - public static final FormFieldFileConfigStorageTypeEnum CUSTOM = - new FormFieldFileConfigStorageTypeEnum(Value.CUSTOM, "CUSTOM"); - - public static final FormFieldFileConfigStorageTypeEnum MANAGED = - new FormFieldFileConfigStorageTypeEnum(Value.MANAGED, "MANAGED"); - - private final Value value; - - private final String string; - - FormFieldFileConfigStorageTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldFileConfigStorageTypeEnum - && this.string.equals(((FormFieldFileConfigStorageTypeEnum) 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 MANAGED: - return visitor.visitManaged(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldFileConfigStorageTypeEnum valueOf(String value) { - switch (value) { - case "CUSTOM": - return CUSTOM; - case "MANAGED": - return MANAGED; - default: - return new FormFieldFileConfigStorageTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - MANAGED, - - CUSTOM, - - UNKNOWN - } - - public interface Visitor { - T visitManaged(); - - T visitCustom(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldLegal.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldLegal.java deleted file mode 100644 index c25dff2e1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldLegal.java +++ /dev/null @@ -1,306 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldLegal.Builder.class) -public final class FormFieldLegal { - private final String id; - - private final FormComponentCategoryFieldConst category; - - private final FormFieldTypeLegalConst type; - - private final Optional config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormFieldLegal( - String id, - FormComponentCategoryFieldConst category, - FormFieldTypeLegalConst type, - Optional config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryFieldConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormFieldTypeLegalConst getType() { - return type; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldLegal && equalTo((FormFieldLegal) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldLegal other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormFieldLegal other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryFieldConst category); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormFieldTypeLegalConst type); - } - - public interface _FinalStage { - FormFieldLegal build(); - - _FinalStage config(Optional config); - - _FinalStage config(FormFieldLegalConfig config); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, _FinalStage { - private String id; - - private FormComponentCategoryFieldConst category; - - private FormFieldTypeLegalConst type; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - private Optional config = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldLegal other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryFieldConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormFieldTypeLegalConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public _FinalStage config(FormFieldLegalConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public FormFieldLegal build() { - return new FormFieldLegal( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldLegalConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldLegalConfig.java deleted file mode 100644 index 482a6c4d0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldLegalConfig.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldLegalConfig.Builder.class) -public final class FormFieldLegalConfig { - private final Optional text; - - private final Map additionalProperties; - - private FormFieldLegalConfig(Optional text, Map additionalProperties) { - this.text = text; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("text") - public Optional getText() { - return text; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldLegalConfig && equalTo((FormFieldLegalConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldLegalConfig other) { - return text.equals(other.text); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 text = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldLegalConfig other) { - text(other.getText()); - return this; - } - - @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 FormFieldLegalConfig build() { - return new FormFieldLegalConfig(text, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldNumber.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldNumber.java deleted file mode 100644 index 5da57da10..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldNumber.java +++ /dev/null @@ -1,306 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldNumber.Builder.class) -public final class FormFieldNumber { - private final String id; - - private final FormComponentCategoryFieldConst category; - - private final FormFieldTypeNumberConst type; - - private final Optional config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormFieldNumber( - String id, - FormComponentCategoryFieldConst category, - FormFieldTypeNumberConst type, - Optional config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryFieldConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormFieldTypeNumberConst getType() { - return type; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldNumber && equalTo((FormFieldNumber) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldNumber other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormFieldNumber other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryFieldConst category); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormFieldTypeNumberConst type); - } - - public interface _FinalStage { - FormFieldNumber build(); - - _FinalStage config(Optional config); - - _FinalStage config(FormFieldNumberConfig config); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, _FinalStage { - private String id; - - private FormComponentCategoryFieldConst category; - - private FormFieldTypeNumberConst type; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - private Optional config = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldNumber other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryFieldConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormFieldTypeNumberConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public _FinalStage config(FormFieldNumberConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public FormFieldNumber build() { - return new FormFieldNumber( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldNumberConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldNumberConfig.java deleted file mode 100644 index 3f25a6c1a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldNumberConfig.java +++ /dev/null @@ -1,169 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldNumberConfig.Builder.class) -public final class FormFieldNumberConfig { - private final Optional defaultValue; - - private final Optional placeholder; - - private final Optional minValue; - - private final Optional maxValue; - - private final Map additionalProperties; - - private FormFieldNumberConfig( - Optional defaultValue, - Optional placeholder, - Optional minValue, - Optional maxValue, - Map additionalProperties) { - this.defaultValue = defaultValue; - this.placeholder = placeholder; - this.minValue = minValue; - this.maxValue = maxValue; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("default_value") - public Optional getDefaultValue() { - return defaultValue; - } - - @JsonProperty("placeholder") - public Optional getPlaceholder() { - return placeholder; - } - - @JsonProperty("min_value") - public Optional getMinValue() { - return minValue; - } - - @JsonProperty("max_value") - public Optional getMaxValue() { - return maxValue; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldNumberConfig && equalTo((FormFieldNumberConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldNumberConfig other) { - return defaultValue.equals(other.defaultValue) - && placeholder.equals(other.placeholder) - && minValue.equals(other.minValue) - && maxValue.equals(other.maxValue); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.defaultValue, this.placeholder, this.minValue, this.maxValue); - } - - @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(); - - private Optional placeholder = Optional.empty(); - - private Optional minValue = Optional.empty(); - - private Optional maxValue = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldNumberConfig other) { - defaultValue(other.getDefaultValue()); - placeholder(other.getPlaceholder()); - minValue(other.getMinValue()); - maxValue(other.getMaxValue()); - return this; - } - - @JsonSetter(value = "default_value", nulls = Nulls.SKIP) - public Builder defaultValue(Optional defaultValue) { - this.defaultValue = defaultValue; - return this; - } - - public Builder defaultValue(Double defaultValue) { - this.defaultValue = Optional.ofNullable(defaultValue); - return this; - } - - @JsonSetter(value = "placeholder", nulls = Nulls.SKIP) - public Builder placeholder(Optional placeholder) { - this.placeholder = placeholder; - return this; - } - - public Builder placeholder(String placeholder) { - this.placeholder = Optional.ofNullable(placeholder); - return this; - } - - @JsonSetter(value = "min_value", nulls = Nulls.SKIP) - public Builder minValue(Optional minValue) { - this.minValue = minValue; - return this; - } - - public Builder minValue(Double minValue) { - this.minValue = Optional.ofNullable(minValue); - return this; - } - - @JsonSetter(value = "max_value", nulls = Nulls.SKIP) - public Builder maxValue(Optional maxValue) { - this.maxValue = maxValue; - return this; - } - - public Builder maxValue(Double maxValue) { - this.maxValue = Optional.ofNullable(maxValue); - return this; - } - - public FormFieldNumberConfig build() { - return new FormFieldNumberConfig(defaultValue, placeholder, minValue, maxValue, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPassword.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPassword.java deleted file mode 100644 index c680e7cb2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPassword.java +++ /dev/null @@ -1,300 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldPassword.Builder.class) -public final class FormFieldPassword { - private final String id; - - private final FormComponentCategoryFieldConst category; - - private final FormFieldTypePasswordConst type; - - private final FormFieldPasswordConfig config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormFieldPassword( - String id, - FormComponentCategoryFieldConst category, - FormFieldTypePasswordConst type, - FormFieldPasswordConfig config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryFieldConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormFieldTypePasswordConst getType() { - return type; - } - - @JsonProperty("config") - public FormFieldPasswordConfig getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldPassword && equalTo((FormFieldPassword) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldPassword other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormFieldPassword other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryFieldConst category); - } - - public interface TypeStage { - ConfigStage type(@NotNull FormFieldTypePasswordConst type); - } - - public interface ConfigStage { - _FinalStage config(@NotNull FormFieldPasswordConfig config); - } - - public interface _FinalStage { - FormFieldPassword build(); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, ConfigStage, _FinalStage { - private String id; - - private FormComponentCategoryFieldConst category; - - private FormFieldTypePasswordConst type; - - private FormFieldPasswordConfig config; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldPassword other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryFieldConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ConfigStage type(@NotNull FormFieldTypePasswordConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("config") - public _FinalStage config(@NotNull FormFieldPasswordConfig config) { - this.config = Objects.requireNonNull(config, "config must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public FormFieldPassword build() { - return new FormFieldPassword( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPasswordConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPasswordConfig.java deleted file mode 100644 index 9c0a9a4dc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPasswordConfig.java +++ /dev/null @@ -1,249 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldPasswordConfig.Builder.class) -public final class FormFieldPasswordConfig { - private final Optional hash; - - private final Optional placeholder; - - private final Optional minLength; - - private final Optional maxLength; - - private final Optional complexity; - - private final Optional nist; - - private final Optional strengthMeter; - - private final Map additionalProperties; - - private FormFieldPasswordConfig( - Optional hash, - Optional placeholder, - Optional minLength, - Optional maxLength, - Optional complexity, - Optional nist, - Optional strengthMeter, - Map additionalProperties) { - this.hash = hash; - this.placeholder = placeholder; - this.minLength = minLength; - this.maxLength = maxLength; - this.complexity = complexity; - this.nist = nist; - this.strengthMeter = strengthMeter; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("hash") - public Optional getHash() { - return hash; - } - - @JsonProperty("placeholder") - public Optional getPlaceholder() { - return placeholder; - } - - @JsonProperty("min_length") - public Optional getMinLength() { - return minLength; - } - - @JsonProperty("max_length") - public Optional getMaxLength() { - return maxLength; - } - - @JsonProperty("complexity") - public Optional getComplexity() { - return complexity; - } - - @JsonProperty("nist") - public Optional getNist() { - return nist; - } - - @JsonProperty("strength_meter") - public Optional getStrengthMeter() { - return strengthMeter; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldPasswordConfig && equalTo((FormFieldPasswordConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldPasswordConfig other) { - return hash.equals(other.hash) - && placeholder.equals(other.placeholder) - && minLength.equals(other.minLength) - && maxLength.equals(other.maxLength) - && complexity.equals(other.complexity) - && nist.equals(other.nist) - && strengthMeter.equals(other.strengthMeter); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.hash, - this.placeholder, - this.minLength, - this.maxLength, - this.complexity, - this.nist, - this.strengthMeter); - } - - @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 hash = Optional.empty(); - - private Optional placeholder = Optional.empty(); - - private Optional minLength = Optional.empty(); - - private Optional maxLength = Optional.empty(); - - private Optional complexity = Optional.empty(); - - private Optional nist = Optional.empty(); - - private Optional strengthMeter = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldPasswordConfig other) { - hash(other.getHash()); - placeholder(other.getPlaceholder()); - minLength(other.getMinLength()); - maxLength(other.getMaxLength()); - complexity(other.getComplexity()); - nist(other.getNist()); - strengthMeter(other.getStrengthMeter()); - return this; - } - - @JsonSetter(value = "hash", nulls = Nulls.SKIP) - public Builder hash(Optional hash) { - this.hash = hash; - return this; - } - - public Builder hash(FormFieldPasswordConfigHashEnum hash) { - this.hash = Optional.ofNullable(hash); - return this; - } - - @JsonSetter(value = "placeholder", nulls = Nulls.SKIP) - public Builder placeholder(Optional placeholder) { - this.placeholder = placeholder; - return this; - } - - public Builder placeholder(String placeholder) { - this.placeholder = Optional.ofNullable(placeholder); - return this; - } - - @JsonSetter(value = "min_length", nulls = Nulls.SKIP) - public Builder minLength(Optional minLength) { - this.minLength = minLength; - return this; - } - - public Builder minLength(Integer minLength) { - this.minLength = Optional.ofNullable(minLength); - return this; - } - - @JsonSetter(value = "max_length", nulls = Nulls.SKIP) - public Builder maxLength(Optional maxLength) { - this.maxLength = maxLength; - return this; - } - - public Builder maxLength(Integer maxLength) { - this.maxLength = Optional.ofNullable(maxLength); - return this; - } - - @JsonSetter(value = "complexity", nulls = Nulls.SKIP) - public Builder complexity(Optional complexity) { - this.complexity = complexity; - return this; - } - - public Builder complexity(Boolean complexity) { - this.complexity = Optional.ofNullable(complexity); - return this; - } - - @JsonSetter(value = "nist", nulls = Nulls.SKIP) - public Builder nist(Optional nist) { - this.nist = nist; - return this; - } - - public Builder nist(Boolean nist) { - this.nist = Optional.ofNullable(nist); - return this; - } - - @JsonSetter(value = "strength_meter", nulls = Nulls.SKIP) - public Builder strengthMeter(Optional strengthMeter) { - this.strengthMeter = strengthMeter; - return this; - } - - public Builder strengthMeter(Boolean strengthMeter) { - this.strengthMeter = Optional.ofNullable(strengthMeter); - return this; - } - - public FormFieldPasswordConfig build() { - return new FormFieldPasswordConfig( - hash, placeholder, minLength, maxLength, complexity, nist, strengthMeter, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPasswordConfigHashEnum.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPasswordConfigHashEnum.java deleted file mode 100644 index b61d4c088..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPasswordConfigHashEnum.java +++ /dev/null @@ -1,116 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldPasswordConfigHashEnum { - public static final FormFieldPasswordConfigHashEnum SHA1 = new FormFieldPasswordConfigHashEnum(Value.SHA1, "SHA1"); - - public static final FormFieldPasswordConfigHashEnum SHA256 = - new FormFieldPasswordConfigHashEnum(Value.SHA256, "SHA256"); - - public static final FormFieldPasswordConfigHashEnum NONE = new FormFieldPasswordConfigHashEnum(Value.NONE, "NONE"); - - public static final FormFieldPasswordConfigHashEnum SHA512 = - new FormFieldPasswordConfigHashEnum(Value.SHA512, "SHA512"); - - public static final FormFieldPasswordConfigHashEnum MD5 = new FormFieldPasswordConfigHashEnum(Value.MD5, "MD5"); - - private final Value value; - - private final String string; - - FormFieldPasswordConfigHashEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldPasswordConfigHashEnum - && this.string.equals(((FormFieldPasswordConfigHashEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SHA1: - return visitor.visitSha1(); - case SHA256: - return visitor.visitSha256(); - case NONE: - return visitor.visitNone(); - case SHA512: - return visitor.visitSha512(); - case MD5: - return visitor.visitMd5(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldPasswordConfigHashEnum valueOf(String value) { - switch (value) { - case "SHA1": - return SHA1; - case "SHA256": - return SHA256; - case "NONE": - return NONE; - case "SHA512": - return SHA512; - case "MD5": - return MD5; - default: - return new FormFieldPasswordConfigHashEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - NONE, - - MD5, - - SHA1, - - SHA256, - - SHA512, - - UNKNOWN - } - - public interface Visitor { - T visitNone(); - - T visitMd5(); - - T visitSha1(); - - T visitSha256(); - - T visitSha512(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPayment.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPayment.java deleted file mode 100644 index 46773133e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPayment.java +++ /dev/null @@ -1,300 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldPayment.Builder.class) -public final class FormFieldPayment { - private final String id; - - private final FormComponentCategoryFieldConst category; - - private final FormFieldTypePaymentConst type; - - private final FormFieldPaymentConfig config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormFieldPayment( - String id, - FormComponentCategoryFieldConst category, - FormFieldTypePaymentConst type, - FormFieldPaymentConfig config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryFieldConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormFieldTypePaymentConst getType() { - return type; - } - - @JsonProperty("config") - public FormFieldPaymentConfig getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldPayment && equalTo((FormFieldPayment) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldPayment other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormFieldPayment other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryFieldConst category); - } - - public interface TypeStage { - ConfigStage type(@NotNull FormFieldTypePaymentConst type); - } - - public interface ConfigStage { - _FinalStage config(@NotNull FormFieldPaymentConfig config); - } - - public interface _FinalStage { - FormFieldPayment build(); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, ConfigStage, _FinalStage { - private String id; - - private FormComponentCategoryFieldConst category; - - private FormFieldTypePaymentConst type; - - private FormFieldPaymentConfig config; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldPayment other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryFieldConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ConfigStage type(@NotNull FormFieldTypePaymentConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("config") - public _FinalStage config(@NotNull FormFieldPaymentConfig config) { - this.config = Objects.requireNonNull(config, "config must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public FormFieldPayment build() { - return new FormFieldPayment( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfig.java deleted file mode 100644 index e39c92cca..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfig.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldPaymentConfig.Builder.class) -public final class FormFieldPaymentConfig { - private final Optional provider; - - private final FormFieldPaymentConfigCharge charge; - - private final FormFieldPaymentConfigCredentials credentials; - - private final Optional> customer; - - private final Optional fields; - - private final Map additionalProperties; - - private FormFieldPaymentConfig( - Optional provider, - FormFieldPaymentConfigCharge charge, - FormFieldPaymentConfigCredentials credentials, - Optional> customer, - Optional fields, - Map additionalProperties) { - this.provider = provider; - this.charge = charge; - this.credentials = credentials; - this.customer = customer; - this.fields = fields; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("provider") - public Optional getProvider() { - return provider; - } - - @JsonProperty("charge") - public FormFieldPaymentConfigCharge getCharge() { - return charge; - } - - @JsonProperty("credentials") - public FormFieldPaymentConfigCredentials getCredentials() { - return credentials; - } - - @JsonProperty("customer") - public Optional> getCustomer() { - return customer; - } - - @JsonProperty("fields") - public Optional getFields() { - return fields; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldPaymentConfig && equalTo((FormFieldPaymentConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldPaymentConfig other) { - return provider.equals(other.provider) - && charge.equals(other.charge) - && credentials.equals(other.credentials) - && customer.equals(other.customer) - && fields.equals(other.fields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.provider, this.charge, this.credentials, this.customer, this.fields); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ChargeStage builder() { - return new Builder(); - } - - public interface ChargeStage { - CredentialsStage charge(@NotNull FormFieldPaymentConfigCharge charge); - - Builder from(FormFieldPaymentConfig other); - } - - public interface CredentialsStage { - _FinalStage credentials(@NotNull FormFieldPaymentConfigCredentials credentials); - } - - public interface _FinalStage { - FormFieldPaymentConfig build(); - - _FinalStage provider(Optional provider); - - _FinalStage provider(FormFieldPaymentConfigProviderEnum provider); - - _FinalStage customer(Optional> customer); - - _FinalStage customer(Map customer); - - _FinalStage fields(Optional fields); - - _FinalStage fields(FormFieldPaymentConfigFields fields); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ChargeStage, CredentialsStage, _FinalStage { - private FormFieldPaymentConfigCharge charge; - - private FormFieldPaymentConfigCredentials credentials; - - private Optional fields = Optional.empty(); - - private Optional> customer = Optional.empty(); - - private Optional provider = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldPaymentConfig other) { - provider(other.getProvider()); - charge(other.getCharge()); - credentials(other.getCredentials()); - customer(other.getCustomer()); - fields(other.getFields()); - return this; - } - - @java.lang.Override - @JsonSetter("charge") - public CredentialsStage charge(@NotNull FormFieldPaymentConfigCharge charge) { - this.charge = Objects.requireNonNull(charge, "charge must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("credentials") - public _FinalStage credentials(@NotNull FormFieldPaymentConfigCredentials credentials) { - this.credentials = Objects.requireNonNull(credentials, "credentials must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage fields(FormFieldPaymentConfigFields fields) { - this.fields = Optional.ofNullable(fields); - return this; - } - - @java.lang.Override - @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public _FinalStage fields(Optional fields) { - this.fields = fields; - return this; - } - - @java.lang.Override - public _FinalStage customer(Map customer) { - this.customer = Optional.ofNullable(customer); - return this; - } - - @java.lang.Override - @JsonSetter(value = "customer", nulls = Nulls.SKIP) - public _FinalStage customer(Optional> customer) { - this.customer = customer; - return this; - } - - @java.lang.Override - public _FinalStage provider(FormFieldPaymentConfigProviderEnum provider) { - this.provider = Optional.ofNullable(provider); - return this; - } - - @java.lang.Override - @JsonSetter(value = "provider", nulls = Nulls.SKIP) - public _FinalStage provider(Optional provider) { - this.provider = provider; - return this; - } - - @java.lang.Override - public FormFieldPaymentConfig build() { - return new FormFieldPaymentConfig(provider, charge, credentials, customer, fields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigCharge.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigCharge.java deleted file mode 100644 index f9fbb95ac..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigCharge.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FormFieldPaymentConfigCharge.Deserializer.class) -public final class FormFieldPaymentConfigCharge { - private final Object value; - - private final int type; - - private FormFieldPaymentConfigCharge(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((FormFieldPaymentConfigChargeOneOff) this.value); - } else if (this.type == 1) { - return visitor.visit((FormFieldPaymentConfigChargeSubscription) 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 FormFieldPaymentConfigCharge && equalTo((FormFieldPaymentConfigCharge) other); - } - - private boolean equalTo(FormFieldPaymentConfigCharge 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 FormFieldPaymentConfigCharge of(FormFieldPaymentConfigChargeOneOff value) { - return new FormFieldPaymentConfigCharge(value, 0); - } - - public static FormFieldPaymentConfigCharge of(FormFieldPaymentConfigChargeSubscription value) { - return new FormFieldPaymentConfigCharge(value, 1); - } - - public interface Visitor { - T visit(FormFieldPaymentConfigChargeOneOff value); - - T visit(FormFieldPaymentConfigChargeSubscription value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FormFieldPaymentConfigCharge.class); - } - - @java.lang.Override - public FormFieldPaymentConfigCharge deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldPaymentConfigChargeOneOff.class)); - } catch (RuntimeException e) { - } - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, FormFieldPaymentConfigChargeSubscription.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOff.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOff.java deleted file mode 100644 index 8eab8f260..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOff.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FormFieldPaymentConfigChargeOneOff.Builder.class) -public final class FormFieldPaymentConfigChargeOneOff { - private final FormFieldPaymentConfigChargeTypeOneOffConst type; - - private final FormFieldPaymentConfigChargeOneOffOneOff oneOff; - - private final Map additionalProperties; - - private FormFieldPaymentConfigChargeOneOff( - FormFieldPaymentConfigChargeTypeOneOffConst type, - FormFieldPaymentConfigChargeOneOffOneOff oneOff, - Map additionalProperties) { - this.type = type; - this.oneOff = oneOff; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FormFieldPaymentConfigChargeTypeOneOffConst getType() { - return type; - } - - @JsonProperty("one_off") - public FormFieldPaymentConfigChargeOneOffOneOff getOneOff() { - return oneOff; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldPaymentConfigChargeOneOff - && equalTo((FormFieldPaymentConfigChargeOneOff) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldPaymentConfigChargeOneOff other) { - return type.equals(other.type) && oneOff.equals(other.oneOff); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.oneOff); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - OneOffStage type(@NotNull FormFieldPaymentConfigChargeTypeOneOffConst type); - - Builder from(FormFieldPaymentConfigChargeOneOff other); - } - - public interface OneOffStage { - _FinalStage oneOff(@NotNull FormFieldPaymentConfigChargeOneOffOneOff oneOff); - } - - public interface _FinalStage { - FormFieldPaymentConfigChargeOneOff build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, OneOffStage, _FinalStage { - private FormFieldPaymentConfigChargeTypeOneOffConst type; - - private FormFieldPaymentConfigChargeOneOffOneOff oneOff; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldPaymentConfigChargeOneOff other) { - type(other.getType()); - oneOff(other.getOneOff()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public OneOffStage type(@NotNull FormFieldPaymentConfigChargeTypeOneOffConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("one_off") - public _FinalStage oneOff(@NotNull FormFieldPaymentConfigChargeOneOffOneOff oneOff) { - this.oneOff = Objects.requireNonNull(oneOff, "oneOff must not be null"); - return this; - } - - @java.lang.Override - public FormFieldPaymentConfigChargeOneOff build() { - return new FormFieldPaymentConfigChargeOneOff(type, oneOff, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffCurrencyEnum.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffCurrencyEnum.java deleted file mode 100644 index 6743e7c97..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffCurrencyEnum.java +++ /dev/null @@ -1,163 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldPaymentConfigChargeOneOffCurrencyEnum { - public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum AUD = - new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.AUD, "AUD"); - - public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum CAD = - new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.CAD, "CAD"); - - public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum USD = - new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.USD, "USD"); - - public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum CHF = - new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.CHF, "CHF"); - - public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum EUR = - new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.EUR, "EUR"); - - public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum INR = - new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.INR, "INR"); - - public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum MXN = - new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.MXN, "MXN"); - - public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum GBP = - new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.GBP, "GBP"); - - public static final FormFieldPaymentConfigChargeOneOffCurrencyEnum SEK = - new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.SEK, "SEK"); - - private final Value value; - - private final String string; - - FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldPaymentConfigChargeOneOffCurrencyEnum - && this.string.equals(((FormFieldPaymentConfigChargeOneOffCurrencyEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AUD: - return visitor.visitAud(); - case CAD: - return visitor.visitCad(); - case USD: - return visitor.visitUsd(); - case CHF: - return visitor.visitChf(); - case EUR: - return visitor.visitEur(); - case INR: - return visitor.visitInr(); - case MXN: - return visitor.visitMxn(); - case GBP: - return visitor.visitGbp(); - case SEK: - return visitor.visitSek(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldPaymentConfigChargeOneOffCurrencyEnum valueOf(String value) { - switch (value) { - case "AUD": - return AUD; - case "CAD": - return CAD; - case "USD": - return USD; - case "CHF": - return CHF; - case "EUR": - return EUR; - case "INR": - return INR; - case "MXN": - return MXN; - case "GBP": - return GBP; - case "SEK": - return SEK; - default: - return new FormFieldPaymentConfigChargeOneOffCurrencyEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AUD, - - CAD, - - CHF, - - EUR, - - GBP, - - INR, - - MXN, - - SEK, - - USD, - - UNKNOWN - } - - public interface Visitor { - T visitAud(); - - T visitCad(); - - T visitChf(); - - T visitEur(); - - T visitGbp(); - - T visitInr(); - - T visitMxn(); - - T visitSek(); - - T visitUsd(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffOneOff.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffOneOff.java deleted file mode 100644 index fec664046..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffOneOff.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FormFieldPaymentConfigChargeOneOffOneOff.Builder.class) -public final class FormFieldPaymentConfigChargeOneOffOneOff { - private final FormFieldPaymentConfigChargeOneOffOneOffAmount amount; - - private final FormFieldPaymentConfigChargeOneOffCurrencyEnum currency; - - private final Map additionalProperties; - - private FormFieldPaymentConfigChargeOneOffOneOff( - FormFieldPaymentConfigChargeOneOffOneOffAmount amount, - FormFieldPaymentConfigChargeOneOffCurrencyEnum currency, - Map additionalProperties) { - this.amount = amount; - this.currency = currency; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("amount") - public FormFieldPaymentConfigChargeOneOffOneOffAmount getAmount() { - return amount; - } - - @JsonProperty("currency") - public FormFieldPaymentConfigChargeOneOffCurrencyEnum getCurrency() { - return currency; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldPaymentConfigChargeOneOffOneOff - && equalTo((FormFieldPaymentConfigChargeOneOffOneOff) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldPaymentConfigChargeOneOffOneOff other) { - return amount.equals(other.amount) && currency.equals(other.currency); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.amount, this.currency); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static AmountStage builder() { - return new Builder(); - } - - public interface AmountStage { - CurrencyStage amount(@NotNull FormFieldPaymentConfigChargeOneOffOneOffAmount amount); - - Builder from(FormFieldPaymentConfigChargeOneOffOneOff other); - } - - public interface CurrencyStage { - _FinalStage currency(@NotNull FormFieldPaymentConfigChargeOneOffCurrencyEnum currency); - } - - public interface _FinalStage { - FormFieldPaymentConfigChargeOneOffOneOff build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements AmountStage, CurrencyStage, _FinalStage { - private FormFieldPaymentConfigChargeOneOffOneOffAmount amount; - - private FormFieldPaymentConfigChargeOneOffCurrencyEnum currency; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldPaymentConfigChargeOneOffOneOff other) { - amount(other.getAmount()); - currency(other.getCurrency()); - return this; - } - - @java.lang.Override - @JsonSetter("amount") - public CurrencyStage amount(@NotNull FormFieldPaymentConfigChargeOneOffOneOffAmount amount) { - this.amount = Objects.requireNonNull(amount, "amount must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("currency") - public _FinalStage currency(@NotNull FormFieldPaymentConfigChargeOneOffCurrencyEnum currency) { - this.currency = Objects.requireNonNull(currency, "currency must not be null"); - return this; - } - - @java.lang.Override - public FormFieldPaymentConfigChargeOneOffOneOff build() { - return new FormFieldPaymentConfigChargeOneOffOneOff(amount, currency, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffOneOffAmount.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffOneOffAmount.java deleted file mode 100644 index 20aa4f64f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeOneOffOneOffAmount.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FormFieldPaymentConfigChargeOneOffOneOffAmount.Deserializer.class) -public final class FormFieldPaymentConfigChargeOneOffOneOffAmount { - private final Object value; - - private final int type; - - private FormFieldPaymentConfigChargeOneOffOneOffAmount(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((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 FormFieldPaymentConfigChargeOneOffOneOffAmount - && equalTo((FormFieldPaymentConfigChargeOneOffOneOffAmount) other); - } - - private boolean equalTo(FormFieldPaymentConfigChargeOneOffOneOffAmount 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 FormFieldPaymentConfigChargeOneOffOneOffAmount of(String value) { - return new FormFieldPaymentConfigChargeOneOffOneOffAmount(value, 0); - } - - public static FormFieldPaymentConfigChargeOneOffOneOffAmount of(double value) { - return new FormFieldPaymentConfigChargeOneOffOneOffAmount(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(double value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FormFieldPaymentConfigChargeOneOffOneOffAmount.class); - } - - @java.lang.Override - public FormFieldPaymentConfigChargeOneOffOneOffAmount deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - if (value instanceof Double) { - return of((Double) value); - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeSubscription.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeSubscription.java deleted file mode 100644 index 2f4aeb76e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeSubscription.java +++ /dev/null @@ -1,149 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 org.jetbrains.annotations.NotNull; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = FormFieldPaymentConfigChargeSubscription.Builder.class) -public final class FormFieldPaymentConfigChargeSubscription { - private final FormFieldPaymentConfigChargeTypeSubscriptionConst type; - - private final Map subscription; - - private final Map additionalProperties; - - private FormFieldPaymentConfigChargeSubscription( - FormFieldPaymentConfigChargeTypeSubscriptionConst type, - Map subscription, - Map additionalProperties) { - this.type = type; - this.subscription = subscription; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public FormFieldPaymentConfigChargeTypeSubscriptionConst getType() { - return type; - } - - @JsonProperty("subscription") - public Map getSubscription() { - return subscription; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldPaymentConfigChargeSubscription - && equalTo((FormFieldPaymentConfigChargeSubscription) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldPaymentConfigChargeSubscription other) { - return type.equals(other.type) && subscription.equals(other.subscription); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.subscription); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormFieldPaymentConfigChargeTypeSubscriptionConst type); - - Builder from(FormFieldPaymentConfigChargeSubscription other); - } - - public interface _FinalStage { - FormFieldPaymentConfigChargeSubscription build(); - - _FinalStage subscription(Map subscription); - - _FinalStage putAllSubscription(Map subscription); - - _FinalStage subscription(String key, Object value); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, _FinalStage { - private FormFieldPaymentConfigChargeTypeSubscriptionConst type; - - private Map subscription = new LinkedHashMap<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldPaymentConfigChargeSubscription other) { - type(other.getType()); - subscription(other.getSubscription()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormFieldPaymentConfigChargeTypeSubscriptionConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage subscription(String key, Object value) { - this.subscription.put(key, value); - return this; - } - - @java.lang.Override - public _FinalStage putAllSubscription(Map subscription) { - if (subscription != null) { - this.subscription.putAll(subscription); - } - return this; - } - - @java.lang.Override - @JsonSetter(value = "subscription", nulls = Nulls.SKIP) - public _FinalStage subscription(Map subscription) { - this.subscription.clear(); - if (subscription != null) { - this.subscription.putAll(subscription); - } - return this; - } - - @java.lang.Override - public FormFieldPaymentConfigChargeSubscription build() { - return new FormFieldPaymentConfigChargeSubscription(type, subscription, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeTypeOneOffConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeTypeOneOffConst.java deleted file mode 100644 index 03190d0a7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeTypeOneOffConst.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldPaymentConfigChargeTypeOneOffConst { - public static final FormFieldPaymentConfigChargeTypeOneOffConst ONE_OFF = - new FormFieldPaymentConfigChargeTypeOneOffConst(Value.ONE_OFF, "ONE_OFF"); - - private final Value value; - - private final String string; - - FormFieldPaymentConfigChargeTypeOneOffConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldPaymentConfigChargeTypeOneOffConst - && this.string.equals(((FormFieldPaymentConfigChargeTypeOneOffConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ONE_OFF: - return visitor.visitOneOff(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldPaymentConfigChargeTypeOneOffConst valueOf(String value) { - switch (value) { - case "ONE_OFF": - return ONE_OFF; - default: - return new FormFieldPaymentConfigChargeTypeOneOffConst(Value.UNKNOWN, value); - } - } - - public enum Value { - ONE_OFF, - - UNKNOWN - } - - public interface Visitor { - T visitOneOff(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeTypeSubscriptionConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeTypeSubscriptionConst.java deleted file mode 100644 index d3b259a7c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigChargeTypeSubscriptionConst.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldPaymentConfigChargeTypeSubscriptionConst { - public static final FormFieldPaymentConfigChargeTypeSubscriptionConst SUBSCRIPTION = - new FormFieldPaymentConfigChargeTypeSubscriptionConst(Value.SUBSCRIPTION, "SUBSCRIPTION"); - - private final Value value; - - private final String string; - - FormFieldPaymentConfigChargeTypeSubscriptionConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldPaymentConfigChargeTypeSubscriptionConst - && this.string.equals(((FormFieldPaymentConfigChargeTypeSubscriptionConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SUBSCRIPTION: - return visitor.visitSubscription(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldPaymentConfigChargeTypeSubscriptionConst valueOf(String value) { - switch (value) { - case "SUBSCRIPTION": - return SUBSCRIPTION; - default: - return new FormFieldPaymentConfigChargeTypeSubscriptionConst(Value.UNKNOWN, value); - } - } - - public enum Value { - SUBSCRIPTION, - - UNKNOWN - } - - public interface Visitor { - T visitSubscription(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigCredentials.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigCredentials.java deleted file mode 100644 index 4bfc3ba15..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigCredentials.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FormFieldPaymentConfigCredentials.Builder.class) -public final class FormFieldPaymentConfigCredentials { - private final String publicKey; - - private final String privateKey; - - private final Map additionalProperties; - - private FormFieldPaymentConfigCredentials( - String publicKey, String privateKey, Map additionalProperties) { - this.publicKey = publicKey; - this.privateKey = privateKey; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("public_key") - public String getPublicKey() { - return publicKey; - } - - @JsonProperty("private_key") - public String getPrivateKey() { - return privateKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldPaymentConfigCredentials && equalTo((FormFieldPaymentConfigCredentials) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldPaymentConfigCredentials other) { - return publicKey.equals(other.publicKey) && privateKey.equals(other.privateKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.publicKey, this.privateKey); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static PublicKeyStage builder() { - return new Builder(); - } - - public interface PublicKeyStage { - PrivateKeyStage publicKey(@NotNull String publicKey); - - Builder from(FormFieldPaymentConfigCredentials other); - } - - public interface PrivateKeyStage { - _FinalStage privateKey(@NotNull String privateKey); - } - - public interface _FinalStage { - FormFieldPaymentConfigCredentials build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements PublicKeyStage, PrivateKeyStage, _FinalStage { - private String publicKey; - - private String privateKey; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldPaymentConfigCredentials other) { - publicKey(other.getPublicKey()); - privateKey(other.getPrivateKey()); - return this; - } - - @java.lang.Override - @JsonSetter("public_key") - public PrivateKeyStage publicKey(@NotNull String publicKey) { - this.publicKey = Objects.requireNonNull(publicKey, "publicKey must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("private_key") - public _FinalStage privateKey(@NotNull String privateKey) { - this.privateKey = Objects.requireNonNull(privateKey, "privateKey must not be null"); - return this; - } - - @java.lang.Override - public FormFieldPaymentConfigCredentials build() { - return new FormFieldPaymentConfigCredentials(publicKey, privateKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigFieldProperties.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigFieldProperties.java deleted file mode 100644 index e60ac1a8c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigFieldProperties.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldPaymentConfigFieldProperties.Builder.class) -public final class FormFieldPaymentConfigFieldProperties { - private final Optional label; - - private final Optional placeholder; - - private final Map additionalProperties; - - private FormFieldPaymentConfigFieldProperties( - Optional label, Optional placeholder, Map additionalProperties) { - this.label = label; - this.placeholder = placeholder; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("placeholder") - public Optional getPlaceholder() { - return placeholder; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldPaymentConfigFieldProperties - && equalTo((FormFieldPaymentConfigFieldProperties) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldPaymentConfigFieldProperties other) { - return label.equals(other.label) && placeholder.equals(other.placeholder); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.label, this.placeholder); - } - - @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 label = Optional.empty(); - - private Optional placeholder = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldPaymentConfigFieldProperties other) { - label(other.getLabel()); - placeholder(other.getPlaceholder()); - return this; - } - - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public Builder label(Optional label) { - this.label = label; - return this; - } - - public Builder label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @JsonSetter(value = "placeholder", nulls = Nulls.SKIP) - public Builder placeholder(Optional placeholder) { - this.placeholder = placeholder; - return this; - } - - public Builder placeholder(String placeholder) { - this.placeholder = Optional.ofNullable(placeholder); - return this; - } - - public FormFieldPaymentConfigFieldProperties build() { - return new FormFieldPaymentConfigFieldProperties(label, placeholder, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigFields.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigFields.java deleted file mode 100644 index cf2cae117..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigFields.java +++ /dev/null @@ -1,170 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldPaymentConfigFields.Builder.class) -public final class FormFieldPaymentConfigFields { - private final Optional cardNumber; - - private final Optional expirationDate; - - private final Optional securityCode; - - private final Optional trustmarks; - - private final Map additionalProperties; - - private FormFieldPaymentConfigFields( - Optional cardNumber, - Optional expirationDate, - Optional securityCode, - Optional trustmarks, - Map additionalProperties) { - this.cardNumber = cardNumber; - this.expirationDate = expirationDate; - this.securityCode = securityCode; - this.trustmarks = trustmarks; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("card_number") - public Optional getCardNumber() { - return cardNumber; - } - - @JsonProperty("expiration_date") - public Optional getExpirationDate() { - return expirationDate; - } - - @JsonProperty("security_code") - public Optional getSecurityCode() { - return securityCode; - } - - @JsonProperty("trustmarks") - public Optional getTrustmarks() { - return trustmarks; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldPaymentConfigFields && equalTo((FormFieldPaymentConfigFields) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldPaymentConfigFields other) { - return cardNumber.equals(other.cardNumber) - && expirationDate.equals(other.expirationDate) - && securityCode.equals(other.securityCode) - && trustmarks.equals(other.trustmarks); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.cardNumber, this.expirationDate, this.securityCode, this.trustmarks); - } - - @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 cardNumber = Optional.empty(); - - private Optional expirationDate = Optional.empty(); - - private Optional securityCode = Optional.empty(); - - private Optional trustmarks = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldPaymentConfigFields other) { - cardNumber(other.getCardNumber()); - expirationDate(other.getExpirationDate()); - securityCode(other.getSecurityCode()); - trustmarks(other.getTrustmarks()); - return this; - } - - @JsonSetter(value = "card_number", nulls = Nulls.SKIP) - public Builder cardNumber(Optional cardNumber) { - this.cardNumber = cardNumber; - return this; - } - - public Builder cardNumber(FormFieldPaymentConfigFieldProperties cardNumber) { - this.cardNumber = Optional.ofNullable(cardNumber); - return this; - } - - @JsonSetter(value = "expiration_date", nulls = Nulls.SKIP) - public Builder expirationDate(Optional expirationDate) { - this.expirationDate = expirationDate; - return this; - } - - public Builder expirationDate(FormFieldPaymentConfigFieldProperties expirationDate) { - this.expirationDate = Optional.ofNullable(expirationDate); - return this; - } - - @JsonSetter(value = "security_code", nulls = Nulls.SKIP) - public Builder securityCode(Optional securityCode) { - this.securityCode = securityCode; - return this; - } - - public Builder securityCode(FormFieldPaymentConfigFieldProperties securityCode) { - this.securityCode = Optional.ofNullable(securityCode); - return this; - } - - @JsonSetter(value = "trustmarks", nulls = Nulls.SKIP) - public Builder trustmarks(Optional trustmarks) { - this.trustmarks = trustmarks; - return this; - } - - public Builder trustmarks(Boolean trustmarks) { - this.trustmarks = Optional.ofNullable(trustmarks); - return this; - } - - public FormFieldPaymentConfigFields build() { - return new FormFieldPaymentConfigFields( - cardNumber, expirationDate, securityCode, trustmarks, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigProviderEnum.java deleted file mode 100644 index 4ada9ade2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldPaymentConfigProviderEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldPaymentConfigProviderEnum { - public static final FormFieldPaymentConfigProviderEnum STRIPE = - new FormFieldPaymentConfigProviderEnum(Value.STRIPE, "STRIPE"); - - private final Value value; - - private final String string; - - FormFieldPaymentConfigProviderEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldPaymentConfigProviderEnum - && this.string.equals(((FormFieldPaymentConfigProviderEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case STRIPE: - return visitor.visitStripe(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldPaymentConfigProviderEnum valueOf(String value) { - switch (value) { - case "STRIPE": - return STRIPE; - default: - return new FormFieldPaymentConfigProviderEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - STRIPE, - - UNKNOWN - } - - public interface Visitor { - T visitStripe(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldSocial.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldSocial.java deleted file mode 100644 index 9cc8337a4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldSocial.java +++ /dev/null @@ -1,306 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldSocial.Builder.class) -public final class FormFieldSocial { - private final String id; - - private final FormComponentCategoryFieldConst category; - - private final FormFieldTypeSocialConst type; - - private final Optional config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormFieldSocial( - String id, - FormComponentCategoryFieldConst category, - FormFieldTypeSocialConst type, - Optional config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryFieldConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormFieldTypeSocialConst getType() { - return type; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldSocial && equalTo((FormFieldSocial) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldSocial other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormFieldSocial other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryFieldConst category); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormFieldTypeSocialConst type); - } - - public interface _FinalStage { - FormFieldSocial build(); - - _FinalStage config(Optional config); - - _FinalStage config(FormFieldSocialConfig config); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, _FinalStage { - private String id; - - private FormComponentCategoryFieldConst category; - - private FormFieldTypeSocialConst type; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - private Optional config = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldSocial other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryFieldConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormFieldTypeSocialConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public _FinalStage config(FormFieldSocialConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public FormFieldSocial build() { - return new FormFieldSocial( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldSocialConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldSocialConfig.java deleted file mode 100644 index 8148ad2df..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldSocialConfig.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.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 = FormFieldSocialConfig.Builder.class) -public final class FormFieldSocialConfig { - private final Map additionalProperties; - - private FormFieldSocialConfig(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldSocialConfig; - } - - @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(FormFieldSocialConfig other) { - return this; - } - - public FormFieldSocialConfig build() { - return new FormFieldSocialConfig(additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTel.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTel.java deleted file mode 100644 index 656d52c18..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTel.java +++ /dev/null @@ -1,305 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldTel.Builder.class) -public final class FormFieldTel { - private final String id; - - private final FormComponentCategoryFieldConst category; - - private final FormFieldTypeTelConst type; - - private final Optional config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormFieldTel( - String id, - FormComponentCategoryFieldConst category, - FormFieldTypeTelConst type, - Optional config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryFieldConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormFieldTypeTelConst getType() { - return type; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldTel && equalTo((FormFieldTel) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldTel other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormFieldTel other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryFieldConst category); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormFieldTypeTelConst type); - } - - public interface _FinalStage { - FormFieldTel build(); - - _FinalStage config(Optional config); - - _FinalStage config(FormFieldTelConfig config); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, _FinalStage { - private String id; - - private FormComponentCategoryFieldConst category; - - private FormFieldTypeTelConst type; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - private Optional config = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldTel other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryFieldConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormFieldTypeTelConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public _FinalStage config(FormFieldTelConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public FormFieldTel build() { - return new FormFieldTel(id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTelConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTelConfig.java deleted file mode 100644 index 850208153..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTelConfig.java +++ /dev/null @@ -1,219 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldTelConfig.Builder.class) -public final class FormFieldTelConfig { - private final Optional defaultValue; - - private final Optional placeholder; - - private final Optional minLength; - - private final Optional maxLength; - - private final Optional countryPicker; - - private final Optional strings; - - private final Map additionalProperties; - - private FormFieldTelConfig( - Optional defaultValue, - Optional placeholder, - Optional minLength, - Optional maxLength, - Optional countryPicker, - Optional strings, - Map additionalProperties) { - this.defaultValue = defaultValue; - this.placeholder = placeholder; - this.minLength = minLength; - this.maxLength = maxLength; - this.countryPicker = countryPicker; - this.strings = strings; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("default_value") - public Optional getDefaultValue() { - return defaultValue; - } - - @JsonProperty("placeholder") - public Optional getPlaceholder() { - return placeholder; - } - - @JsonProperty("min_length") - public Optional getMinLength() { - return minLength; - } - - @JsonProperty("max_length") - public Optional getMaxLength() { - return maxLength; - } - - @JsonProperty("country_picker") - public Optional getCountryPicker() { - return countryPicker; - } - - @JsonProperty("strings") - public Optional getStrings() { - return strings; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldTelConfig && equalTo((FormFieldTelConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldTelConfig other) { - return defaultValue.equals(other.defaultValue) - && placeholder.equals(other.placeholder) - && minLength.equals(other.minLength) - && maxLength.equals(other.maxLength) - && countryPicker.equals(other.countryPicker) - && strings.equals(other.strings); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.defaultValue, this.placeholder, this.minLength, this.maxLength, this.countryPicker, this.strings); - } - - @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(); - - private Optional placeholder = Optional.empty(); - - private Optional minLength = Optional.empty(); - - private Optional maxLength = Optional.empty(); - - private Optional countryPicker = Optional.empty(); - - private Optional strings = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldTelConfig other) { - defaultValue(other.getDefaultValue()); - placeholder(other.getPlaceholder()); - minLength(other.getMinLength()); - maxLength(other.getMaxLength()); - countryPicker(other.getCountryPicker()); - strings(other.getStrings()); - return this; - } - - @JsonSetter(value = "default_value", nulls = Nulls.SKIP) - public Builder defaultValue(Optional defaultValue) { - this.defaultValue = defaultValue; - return this; - } - - public Builder defaultValue(String defaultValue) { - this.defaultValue = Optional.ofNullable(defaultValue); - return this; - } - - @JsonSetter(value = "placeholder", nulls = Nulls.SKIP) - public Builder placeholder(Optional placeholder) { - this.placeholder = placeholder; - return this; - } - - public Builder placeholder(String placeholder) { - this.placeholder = Optional.ofNullable(placeholder); - return this; - } - - @JsonSetter(value = "min_length", nulls = Nulls.SKIP) - public Builder minLength(Optional minLength) { - this.minLength = minLength; - return this; - } - - public Builder minLength(Integer minLength) { - this.minLength = Optional.ofNullable(minLength); - return this; - } - - @JsonSetter(value = "max_length", nulls = Nulls.SKIP) - public Builder maxLength(Optional maxLength) { - this.maxLength = maxLength; - return this; - } - - public Builder maxLength(Integer maxLength) { - this.maxLength = Optional.ofNullable(maxLength); - return this; - } - - @JsonSetter(value = "country_picker", nulls = Nulls.SKIP) - public Builder countryPicker(Optional countryPicker) { - this.countryPicker = countryPicker; - return this; - } - - public Builder countryPicker(Boolean countryPicker) { - this.countryPicker = Optional.ofNullable(countryPicker); - return this; - } - - @JsonSetter(value = "strings", nulls = Nulls.SKIP) - public Builder strings(Optional strings) { - this.strings = strings; - return this; - } - - public Builder strings(FormFieldTelConfigStrings strings) { - this.strings = Optional.ofNullable(strings); - return this; - } - - public FormFieldTelConfig build() { - return new FormFieldTelConfig( - defaultValue, placeholder, minLength, maxLength, countryPicker, strings, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTelConfigStrings.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTelConfigStrings.java deleted file mode 100644 index b142adc2f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTelConfigStrings.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldTelConfigStrings.Builder.class) -public final class FormFieldTelConfigStrings { - private final Optional filterPlaceholder; - - private final Map additionalProperties; - - private FormFieldTelConfigStrings(Optional filterPlaceholder, Map additionalProperties) { - this.filterPlaceholder = filterPlaceholder; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("filter_placeholder") - public Optional getFilterPlaceholder() { - return filterPlaceholder; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldTelConfigStrings && equalTo((FormFieldTelConfigStrings) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldTelConfigStrings other) { - return filterPlaceholder.equals(other.filterPlaceholder); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.filterPlaceholder); - } - - @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 filterPlaceholder = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldTelConfigStrings other) { - filterPlaceholder(other.getFilterPlaceholder()); - return this; - } - - @JsonSetter(value = "filter_placeholder", nulls = Nulls.SKIP) - public Builder filterPlaceholder(Optional filterPlaceholder) { - this.filterPlaceholder = filterPlaceholder; - return this; - } - - public Builder filterPlaceholder(String filterPlaceholder) { - this.filterPlaceholder = Optional.ofNullable(filterPlaceholder); - return this; - } - - public FormFieldTelConfigStrings build() { - return new FormFieldTelConfigStrings(filterPlaceholder, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldText.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldText.java deleted file mode 100644 index 7c1b0458b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldText.java +++ /dev/null @@ -1,306 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldText.Builder.class) -public final class FormFieldText { - private final String id; - - private final FormComponentCategoryFieldConst category; - - private final FormFieldTypeTextConst type; - - private final Optional config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormFieldText( - String id, - FormComponentCategoryFieldConst category, - FormFieldTypeTextConst type, - Optional config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryFieldConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormFieldTypeTextConst getType() { - return type; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldText && equalTo((FormFieldText) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldText other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormFieldText other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryFieldConst category); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormFieldTypeTextConst type); - } - - public interface _FinalStage { - FormFieldText build(); - - _FinalStage config(Optional config); - - _FinalStage config(FormFieldTextConfig config); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, _FinalStage { - private String id; - - private FormComponentCategoryFieldConst category; - - private FormFieldTypeTextConst type; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - private Optional config = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldText other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryFieldConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormFieldTypeTextConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public _FinalStage config(FormFieldTextConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public FormFieldText build() { - return new FormFieldText( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTextConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTextConfig.java deleted file mode 100644 index 18acecdba..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTextConfig.java +++ /dev/null @@ -1,194 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldTextConfig.Builder.class) -public final class FormFieldTextConfig { - private final Optional multiline; - - private final Optional defaultValue; - - private final Optional placeholder; - - private final Optional minLength; - - private final Optional maxLength; - - private final Map additionalProperties; - - private FormFieldTextConfig( - Optional multiline, - Optional defaultValue, - Optional placeholder, - Optional minLength, - Optional maxLength, - Map additionalProperties) { - this.multiline = multiline; - this.defaultValue = defaultValue; - this.placeholder = placeholder; - this.minLength = minLength; - this.maxLength = maxLength; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("multiline") - public Optional getMultiline() { - return multiline; - } - - @JsonProperty("default_value") - public Optional getDefaultValue() { - return defaultValue; - } - - @JsonProperty("placeholder") - public Optional getPlaceholder() { - return placeholder; - } - - @JsonProperty("min_length") - public Optional getMinLength() { - return minLength; - } - - @JsonProperty("max_length") - public Optional getMaxLength() { - return maxLength; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldTextConfig && equalTo((FormFieldTextConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldTextConfig other) { - return multiline.equals(other.multiline) - && defaultValue.equals(other.defaultValue) - && placeholder.equals(other.placeholder) - && minLength.equals(other.minLength) - && maxLength.equals(other.maxLength); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.multiline, this.defaultValue, this.placeholder, this.minLength, this.maxLength); - } - - @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 multiline = Optional.empty(); - - private Optional defaultValue = Optional.empty(); - - private Optional placeholder = Optional.empty(); - - private Optional minLength = Optional.empty(); - - private Optional maxLength = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldTextConfig other) { - multiline(other.getMultiline()); - defaultValue(other.getDefaultValue()); - placeholder(other.getPlaceholder()); - minLength(other.getMinLength()); - maxLength(other.getMaxLength()); - return this; - } - - @JsonSetter(value = "multiline", nulls = Nulls.SKIP) - public Builder multiline(Optional multiline) { - this.multiline = multiline; - return this; - } - - public Builder multiline(Boolean multiline) { - this.multiline = Optional.ofNullable(multiline); - return this; - } - - @JsonSetter(value = "default_value", nulls = Nulls.SKIP) - public Builder defaultValue(Optional defaultValue) { - this.defaultValue = defaultValue; - return this; - } - - public Builder defaultValue(String defaultValue) { - this.defaultValue = Optional.ofNullable(defaultValue); - return this; - } - - @JsonSetter(value = "placeholder", nulls = Nulls.SKIP) - public Builder placeholder(Optional placeholder) { - this.placeholder = placeholder; - return this; - } - - public Builder placeholder(String placeholder) { - this.placeholder = Optional.ofNullable(placeholder); - return this; - } - - @JsonSetter(value = "min_length", nulls = Nulls.SKIP) - public Builder minLength(Optional minLength) { - this.minLength = minLength; - return this; - } - - public Builder minLength(Integer minLength) { - this.minLength = Optional.ofNullable(minLength); - return this; - } - - @JsonSetter(value = "max_length", nulls = Nulls.SKIP) - public Builder maxLength(Optional maxLength) { - this.maxLength = maxLength; - return this; - } - - public Builder maxLength(Integer maxLength) { - this.maxLength = Optional.ofNullable(maxLength); - return this; - } - - public FormFieldTextConfig build() { - return new FormFieldTextConfig( - multiline, defaultValue, placeholder, minLength, maxLength, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeBooleanConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeBooleanConst.java deleted file mode 100644 index a119d2ac9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeBooleanConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldTypeBooleanConst { - public static final FormFieldTypeBooleanConst BOOLEAN = new FormFieldTypeBooleanConst(Value.BOOLEAN, "BOOLEAN"); - - private final Value value; - - private final String string; - - FormFieldTypeBooleanConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldTypeBooleanConst - && this.string.equals(((FormFieldTypeBooleanConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case BOOLEAN: - return visitor.visitBoolean(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldTypeBooleanConst valueOf(String value) { - switch (value) { - case "BOOLEAN": - return BOOLEAN; - default: - return new FormFieldTypeBooleanConst(Value.UNKNOWN, value); - } - } - - public enum Value { - BOOLEAN, - - UNKNOWN - } - - public interface Visitor { - T visitBoolean(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeCardsConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeCardsConst.java deleted file mode 100644 index 8c35231ba..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeCardsConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldTypeCardsConst { - public static final FormFieldTypeCardsConst CARDS = new FormFieldTypeCardsConst(Value.CARDS, "CARDS"); - - private final Value value; - - private final String string; - - FormFieldTypeCardsConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldTypeCardsConst - && this.string.equals(((FormFieldTypeCardsConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CARDS: - return visitor.visitCards(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldTypeCardsConst valueOf(String value) { - switch (value) { - case "CARDS": - return CARDS; - default: - return new FormFieldTypeCardsConst(Value.UNKNOWN, value); - } - } - - public enum Value { - CARDS, - - UNKNOWN - } - - public interface Visitor { - T visitCards(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeChoiceConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeChoiceConst.java deleted file mode 100644 index 6fa763790..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeChoiceConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldTypeChoiceConst { - public static final FormFieldTypeChoiceConst CHOICE = new FormFieldTypeChoiceConst(Value.CHOICE, "CHOICE"); - - private final Value value; - - private final String string; - - FormFieldTypeChoiceConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldTypeChoiceConst - && this.string.equals(((FormFieldTypeChoiceConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CHOICE: - return visitor.visitChoice(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldTypeChoiceConst valueOf(String value) { - switch (value) { - case "CHOICE": - return CHOICE; - default: - return new FormFieldTypeChoiceConst(Value.UNKNOWN, value); - } - } - - public enum Value { - CHOICE, - - UNKNOWN - } - - public interface Visitor { - T visitChoice(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeCustomConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeCustomConst.java deleted file mode 100644 index ce5c913f3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeCustomConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldTypeCustomConst { - public static final FormFieldTypeCustomConst CUSTOM = new FormFieldTypeCustomConst(Value.CUSTOM, "CUSTOM"); - - private final Value value; - - private final String string; - - FormFieldTypeCustomConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldTypeCustomConst - && this.string.equals(((FormFieldTypeCustomConst) 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 FormFieldTypeCustomConst valueOf(String value) { - switch (value) { - case "CUSTOM": - return CUSTOM; - default: - return new FormFieldTypeCustomConst(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/FormFieldTypeDateConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeDateConst.java deleted file mode 100644 index 910b300fc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeDateConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldTypeDateConst { - public static final FormFieldTypeDateConst DATE = new FormFieldTypeDateConst(Value.DATE, "DATE"); - - private final Value value; - - private final String string; - - FormFieldTypeDateConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldTypeDateConst - && this.string.equals(((FormFieldTypeDateConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DATE: - return visitor.visitDate(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldTypeDateConst valueOf(String value) { - switch (value) { - case "DATE": - return DATE; - default: - return new FormFieldTypeDateConst(Value.UNKNOWN, value); - } - } - - public enum Value { - DATE, - - UNKNOWN - } - - public interface Visitor { - T visitDate(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeDropdownConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeDropdownConst.java deleted file mode 100644 index a51d8a202..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeDropdownConst.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldTypeDropdownConst { - public static final FormFieldTypeDropdownConst DROPDOWN = - new FormFieldTypeDropdownConst(Value.DROPDOWN, "DROPDOWN"); - - private final Value value; - - private final String string; - - FormFieldTypeDropdownConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldTypeDropdownConst - && this.string.equals(((FormFieldTypeDropdownConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DROPDOWN: - return visitor.visitDropdown(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldTypeDropdownConst valueOf(String value) { - switch (value) { - case "DROPDOWN": - return DROPDOWN; - default: - return new FormFieldTypeDropdownConst(Value.UNKNOWN, value); - } - } - - public enum Value { - DROPDOWN, - - UNKNOWN - } - - public interface Visitor { - T visitDropdown(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeEmailConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeEmailConst.java deleted file mode 100644 index f9cdcafc6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeEmailConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldTypeEmailConst { - public static final FormFieldTypeEmailConst EMAIL = new FormFieldTypeEmailConst(Value.EMAIL, "EMAIL"); - - private final Value value; - - private final String string; - - FormFieldTypeEmailConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldTypeEmailConst - && this.string.equals(((FormFieldTypeEmailConst) 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 UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldTypeEmailConst valueOf(String value) { - switch (value) { - case "EMAIL": - return EMAIL; - default: - return new FormFieldTypeEmailConst(Value.UNKNOWN, value); - } - } - - public enum Value { - EMAIL, - - UNKNOWN - } - - public interface Visitor { - T visitEmail(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeFileConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeFileConst.java deleted file mode 100644 index 4d82a6544..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeFileConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldTypeFileConst { - public static final FormFieldTypeFileConst FILE = new FormFieldTypeFileConst(Value.FILE, "FILE"); - - private final Value value; - - private final String string; - - FormFieldTypeFileConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldTypeFileConst - && this.string.equals(((FormFieldTypeFileConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FILE: - return visitor.visitFile(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldTypeFileConst valueOf(String value) { - switch (value) { - case "FILE": - return FILE; - default: - return new FormFieldTypeFileConst(Value.UNKNOWN, value); - } - } - - public enum Value { - FILE, - - UNKNOWN - } - - public interface Visitor { - T visitFile(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeLegalConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeLegalConst.java deleted file mode 100644 index 916c59e50..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeLegalConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldTypeLegalConst { - public static final FormFieldTypeLegalConst LEGAL = new FormFieldTypeLegalConst(Value.LEGAL, "LEGAL"); - - private final Value value; - - private final String string; - - FormFieldTypeLegalConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldTypeLegalConst - && this.string.equals(((FormFieldTypeLegalConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case LEGAL: - return visitor.visitLegal(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldTypeLegalConst valueOf(String value) { - switch (value) { - case "LEGAL": - return LEGAL; - default: - return new FormFieldTypeLegalConst(Value.UNKNOWN, value); - } - } - - public enum Value { - LEGAL, - - UNKNOWN - } - - public interface Visitor { - T visitLegal(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeNumberConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeNumberConst.java deleted file mode 100644 index ddf13356a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeNumberConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldTypeNumberConst { - public static final FormFieldTypeNumberConst NUMBER = new FormFieldTypeNumberConst(Value.NUMBER, "NUMBER"); - - private final Value value; - - private final String string; - - FormFieldTypeNumberConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldTypeNumberConst - && this.string.equals(((FormFieldTypeNumberConst) 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 UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldTypeNumberConst valueOf(String value) { - switch (value) { - case "NUMBER": - return NUMBER; - default: - return new FormFieldTypeNumberConst(Value.UNKNOWN, value); - } - } - - public enum Value { - NUMBER, - - UNKNOWN - } - - public interface Visitor { - T visitNumber(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypePasswordConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTypePasswordConst.java deleted file mode 100644 index 891e05645..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypePasswordConst.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldTypePasswordConst { - public static final FormFieldTypePasswordConst PASSWORD = - new FormFieldTypePasswordConst(Value.PASSWORD, "PASSWORD"); - - private final Value value; - - private final String string; - - FormFieldTypePasswordConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldTypePasswordConst - && this.string.equals(((FormFieldTypePasswordConst) 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 UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldTypePasswordConst valueOf(String value) { - switch (value) { - case "PASSWORD": - return PASSWORD; - default: - return new FormFieldTypePasswordConst(Value.UNKNOWN, value); - } - } - - public enum Value { - PASSWORD, - - UNKNOWN - } - - public interface Visitor { - T visitPassword(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypePaymentConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTypePaymentConst.java deleted file mode 100644 index 0af8bcc4b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypePaymentConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldTypePaymentConst { - public static final FormFieldTypePaymentConst PAYMENT = new FormFieldTypePaymentConst(Value.PAYMENT, "PAYMENT"); - - private final Value value; - - private final String string; - - FormFieldTypePaymentConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldTypePaymentConst - && this.string.equals(((FormFieldTypePaymentConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PAYMENT: - return visitor.visitPayment(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldTypePaymentConst valueOf(String value) { - switch (value) { - case "PAYMENT": - return PAYMENT; - default: - return new FormFieldTypePaymentConst(Value.UNKNOWN, value); - } - } - - public enum Value { - PAYMENT, - - UNKNOWN - } - - public interface Visitor { - T visitPayment(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeSocialConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeSocialConst.java deleted file mode 100644 index 7d8686e95..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeSocialConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldTypeSocialConst { - public static final FormFieldTypeSocialConst SOCIAL = new FormFieldTypeSocialConst(Value.SOCIAL, "SOCIAL"); - - private final Value value; - - private final String string; - - FormFieldTypeSocialConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldTypeSocialConst - && this.string.equals(((FormFieldTypeSocialConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SOCIAL: - return visitor.visitSocial(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldTypeSocialConst valueOf(String value) { - switch (value) { - case "SOCIAL": - return SOCIAL; - default: - return new FormFieldTypeSocialConst(Value.UNKNOWN, value); - } - } - - public enum Value { - SOCIAL, - - UNKNOWN - } - - public interface Visitor { - T visitSocial(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeTelConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeTelConst.java deleted file mode 100644 index 4b1b1be70..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeTelConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldTypeTelConst { - public static final FormFieldTypeTelConst TEL = new FormFieldTypeTelConst(Value.TEL, "TEL"); - - private final Value value; - - private final String string; - - FormFieldTypeTelConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldTypeTelConst - && this.string.equals(((FormFieldTypeTelConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TEL: - return visitor.visitTel(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldTypeTelConst valueOf(String value) { - switch (value) { - case "TEL": - return TEL; - default: - return new FormFieldTypeTelConst(Value.UNKNOWN, value); - } - } - - public enum Value { - TEL, - - UNKNOWN - } - - public interface Visitor { - T visitTel(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeTextConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeTextConst.java deleted file mode 100644 index adfab8c06..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeTextConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldTypeTextConst { - public static final FormFieldTypeTextConst TEXT = new FormFieldTypeTextConst(Value.TEXT, "TEXT"); - - private final Value value; - - private final String string; - - FormFieldTypeTextConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldTypeTextConst - && this.string.equals(((FormFieldTypeTextConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TEXT: - return visitor.visitText(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldTypeTextConst valueOf(String value) { - switch (value) { - case "TEXT": - return TEXT; - default: - return new FormFieldTypeTextConst(Value.UNKNOWN, value); - } - } - - public enum Value { - TEXT, - - UNKNOWN - } - - public interface Visitor { - T visitText(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeUrlConst.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeUrlConst.java deleted file mode 100644 index 7e40044b7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldTypeUrlConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormFieldTypeUrlConst { - public static final FormFieldTypeUrlConst URL = new FormFieldTypeUrlConst(Value.URL, "URL"); - - private final Value value; - - private final String string; - - FormFieldTypeUrlConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormFieldTypeUrlConst - && this.string.equals(((FormFieldTypeUrlConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case URL: - return visitor.visitUrl(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormFieldTypeUrlConst valueOf(String value) { - switch (value) { - case "URL": - return URL; - default: - return new FormFieldTypeUrlConst(Value.UNKNOWN, value); - } - } - - public enum Value { - URL, - - UNKNOWN - } - - public interface Visitor { - T visitUrl(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldUrl.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldUrl.java deleted file mode 100644 index 6e84e9825..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldUrl.java +++ /dev/null @@ -1,305 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldUrl.Builder.class) -public final class FormFieldUrl { - private final String id; - - private final FormComponentCategoryFieldConst category; - - private final FormFieldTypeUrlConst type; - - private final Optional config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormFieldUrl( - String id, - FormComponentCategoryFieldConst category, - FormFieldTypeUrlConst type, - Optional config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryFieldConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormFieldTypeUrlConst getType() { - return type; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldUrl && equalTo((FormFieldUrl) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldUrl other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormFieldUrl other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryFieldConst category); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormFieldTypeUrlConst type); - } - - public interface _FinalStage { - FormFieldUrl build(); - - _FinalStage config(Optional config); - - _FinalStage config(FormFieldUrlConfig config); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, _FinalStage { - private String id; - - private FormComponentCategoryFieldConst category; - - private FormFieldTypeUrlConst type; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - private Optional config = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFieldUrl other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryFieldConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull FormFieldTypeUrlConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public _FinalStage config(FormFieldUrlConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public FormFieldUrl build() { - return new FormFieldUrl(id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFieldUrlConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFieldUrlConfig.java deleted file mode 100644 index 3ade6fdbd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFieldUrlConfig.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFieldUrlConfig.Builder.class) -public final class FormFieldUrlConfig { - private final Optional defaultValue; - - private final Optional placeholder; - - private final Map additionalProperties; - - private FormFieldUrlConfig( - Optional defaultValue, Optional placeholder, Map additionalProperties) { - this.defaultValue = defaultValue; - this.placeholder = placeholder; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("default_value") - public Optional getDefaultValue() { - return defaultValue; - } - - @JsonProperty("placeholder") - public Optional getPlaceholder() { - return placeholder; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFieldUrlConfig && equalTo((FormFieldUrlConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFieldUrlConfig other) { - return defaultValue.equals(other.defaultValue) && placeholder.equals(other.placeholder); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.defaultValue, this.placeholder); - } - - @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(); - - private Optional placeholder = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormFieldUrlConfig other) { - defaultValue(other.getDefaultValue()); - placeholder(other.getPlaceholder()); - return this; - } - - @JsonSetter(value = "default_value", nulls = Nulls.SKIP) - public Builder defaultValue(Optional defaultValue) { - this.defaultValue = defaultValue; - return this; - } - - public Builder defaultValue(String defaultValue) { - this.defaultValue = Optional.ofNullable(defaultValue); - return this; - } - - @JsonSetter(value = "placeholder", nulls = Nulls.SKIP) - public Builder placeholder(Optional placeholder) { - this.placeholder = placeholder; - return this; - } - - public Builder placeholder(String placeholder) { - this.placeholder = Optional.ofNullable(placeholder); - return this; - } - - public FormFieldUrlConfig build() { - return new FormFieldUrlConfig(defaultValue, placeholder, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFlow.java b/src/main/java/com/auth0/client/mgmt/types/FormFlow.java deleted file mode 100644 index a6edf66e4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFlow.java +++ /dev/null @@ -1,214 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFlow.Builder.class) -public final class FormFlow { - private final String id; - - private final FormNodeTypeFlowConst type; - - private final Optional coordinates; - - private final Optional alias; - - private final FormFlowConfig config; - - private final Map additionalProperties; - - private FormFlow( - String id, - FormNodeTypeFlowConst type, - Optional coordinates, - Optional alias, - FormFlowConfig config, - Map additionalProperties) { - this.id = id; - this.type = type; - this.coordinates = coordinates; - this.alias = alias; - this.config = config; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("type") - public FormNodeTypeFlowConst getType() { - return type; - } - - @JsonProperty("coordinates") - public Optional getCoordinates() { - return coordinates; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("config") - public FormFlowConfig getConfig() { - return config; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFlow && equalTo((FormFlow) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFlow other) { - return id.equals(other.id) - && type.equals(other.type) - && coordinates.equals(other.coordinates) - && alias.equals(other.alias) - && config.equals(other.config); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.type, this.coordinates, this.alias, this.config); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FormFlow other); - } - - public interface TypeStage { - ConfigStage type(@NotNull FormNodeTypeFlowConst type); - } - - public interface ConfigStage { - _FinalStage config(@NotNull FormFlowConfig config); - } - - public interface _FinalStage { - FormFlow build(); - - _FinalStage coordinates(Optional coordinates); - - _FinalStage coordinates(FormNodeCoordinates coordinates); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, ConfigStage, _FinalStage { - private String id; - - private FormNodeTypeFlowConst type; - - private FormFlowConfig config; - - private Optional alias = Optional.empty(); - - private Optional coordinates = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFlow other) { - id(other.getId()); - type(other.getType()); - coordinates(other.getCoordinates()); - alias(other.getAlias()); - config(other.getConfig()); - return this; - } - - @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 ConfigStage type(@NotNull FormNodeTypeFlowConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("config") - public _FinalStage config(@NotNull FormFlowConfig config) { - this.config = Objects.requireNonNull(config, "config must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public _FinalStage coordinates(FormNodeCoordinates coordinates) { - this.coordinates = Optional.ofNullable(coordinates); - return this; - } - - @java.lang.Override - @JsonSetter(value = "coordinates", nulls = Nulls.SKIP) - public _FinalStage coordinates(Optional coordinates) { - this.coordinates = coordinates; - return this; - } - - @java.lang.Override - public FormFlow build() { - return new FormFlow(id, type, coordinates, alias, config, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormFlowConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormFlowConfig.java deleted file mode 100644 index 27e810319..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormFlowConfig.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormFlowConfig.Builder.class) -public final class FormFlowConfig { - private final String flowId; - - private final Optional nextNode; - - private final Map additionalProperties; - - private FormFlowConfig( - String flowId, Optional nextNode, Map additionalProperties) { - this.flowId = flowId; - this.nextNode = nextNode; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("flow_id") - public String getFlowId() { - return flowId; - } - - @JsonProperty("next_node") - public Optional getNextNode() { - return nextNode; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormFlowConfig && equalTo((FormFlowConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormFlowConfig other) { - return flowId.equals(other.flowId) && nextNode.equals(other.nextNode); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.flowId, this.nextNode); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FlowIdStage builder() { - return new Builder(); - } - - public interface FlowIdStage { - _FinalStage flowId(@NotNull String flowId); - - Builder from(FormFlowConfig other); - } - - public interface _FinalStage { - FormFlowConfig build(); - - _FinalStage nextNode(Optional nextNode); - - _FinalStage nextNode(FormNodePointer nextNode); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements FlowIdStage, _FinalStage { - private String flowId; - - private Optional nextNode = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormFlowConfig other) { - flowId(other.getFlowId()); - nextNode(other.getNextNode()); - return this; - } - - @java.lang.Override - @JsonSetter("flow_id") - public _FinalStage flowId(@NotNull String flowId) { - this.flowId = Objects.requireNonNull(flowId, "flowId must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage nextNode(FormNodePointer nextNode) { - this.nextNode = Optional.ofNullable(nextNode); - return this; - } - - @java.lang.Override - @JsonSetter(value = "next_node", nulls = Nulls.SKIP) - public _FinalStage nextNode(Optional nextNode) { - this.nextNode = nextNode; - return this; - } - - @java.lang.Override - public FormFlowConfig build() { - return new FormFlowConfig(flowId, nextNode, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormHiddenField.java b/src/main/java/com/auth0/client/mgmt/types/FormHiddenField.java deleted file mode 100644 index 04a0f3ec3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormHiddenField.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormHiddenField.Builder.class) -public final class FormHiddenField { - private final String key; - - private final Optional value; - - private final Map additionalProperties; - - private FormHiddenField(String key, Optional value, Map additionalProperties) { - this.key = key; - this.value = value; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("key") - public String getKey() { - return key; - } - - @JsonProperty("value") - public Optional getValue() { - return value; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormHiddenField && equalTo((FormHiddenField) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormHiddenField other) { - return key.equals(other.key) && value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.key, this.value); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static KeyStage builder() { - return new Builder(); - } - - public interface KeyStage { - _FinalStage key(@NotNull String key); - - Builder from(FormHiddenField other); - } - - public interface _FinalStage { - FormHiddenField build(); - - _FinalStage value(Optional value); - - _FinalStage value(String value); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements KeyStage, _FinalStage { - private String key; - - private Optional value = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormHiddenField other) { - key(other.getKey()); - value(other.getValue()); - return this; - } - - @java.lang.Override - @JsonSetter("key") - public _FinalStage key(@NotNull String key) { - this.key = Objects.requireNonNull(key, "key must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage value(String value) { - this.value = Optional.ofNullable(value); - return this; - } - - @java.lang.Override - @JsonSetter(value = "value", nulls = Nulls.SKIP) - public _FinalStage value(Optional value) { - this.value = value; - return this; - } - - @java.lang.Override - public FormHiddenField build() { - return new FormHiddenField(key, value, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormLanguages.java b/src/main/java/com/auth0/client/mgmt/types/FormLanguages.java deleted file mode 100644 index 747cf6895..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormLanguages.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormLanguages.Builder.class) -public final class FormLanguages { - private final Optional primary; - - private final Optional default_; - - private final Map additionalProperties; - - private FormLanguages( - Optional primary, Optional default_, Map additionalProperties) { - this.primary = primary; - this.default_ = default_; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("primary") - public Optional getPrimary() { - return primary; - } - - @JsonProperty("default") - public Optional getDefault() { - return default_; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormLanguages && equalTo((FormLanguages) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormLanguages other) { - return primary.equals(other.primary) && default_.equals(other.default_); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.primary, this.default_); - } - - @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 default_ = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormLanguages other) { - primary(other.getPrimary()); - default_(other.getDefault()); - return this; - } - - @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; - } - - @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; - } - - public FormLanguages build() { - return new FormLanguages(primary, default_, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormMessages.java b/src/main/java/com/auth0/client/mgmt/types/FormMessages.java deleted file mode 100644 index 5cb40b113..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormMessages.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormMessages.Builder.class) -public final class FormMessages { - private final Optional> errors; - - private final Optional> custom; - - private final Map additionalProperties; - - private FormMessages( - Optional> errors, - Optional> custom, - Map additionalProperties) { - this.errors = errors; - this.custom = custom; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("errors") - public Optional> getErrors() { - return errors; - } - - @JsonProperty("custom") - public Optional> getCustom() { - return custom; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormMessages && equalTo((FormMessages) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormMessages other) { - return errors.equals(other.errors) && custom.equals(other.custom); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.errors, this.custom); - } - - @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> errors = Optional.empty(); - - private Optional> custom = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormMessages other) { - errors(other.getErrors()); - custom(other.getCustom()); - return this; - } - - @JsonSetter(value = "errors", nulls = Nulls.SKIP) - public Builder errors(Optional> errors) { - this.errors = errors; - return this; - } - - public Builder errors(Map errors) { - this.errors = Optional.ofNullable(errors); - return this; - } - - @JsonSetter(value = "custom", nulls = Nulls.SKIP) - public Builder custom(Optional> custom) { - this.custom = custom; - return this; - } - - public Builder custom(Map custom) { - this.custom = Optional.ofNullable(custom); - return this; - } - - public FormMessages build() { - return new FormMessages(errors, custom, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormNode.java b/src/main/java/com/auth0/client/mgmt/types/FormNode.java deleted file mode 100644 index 7e0be4d13..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormNode.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FormNode.Deserializer.class) -public final class FormNode { - private final Object value; - - private final int type; - - private FormNode(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((FormFlow) this.value); - } else if (this.type == 1) { - return visitor.visit((FormRouter) this.value); - } else if (this.type == 2) { - return visitor.visit((FormStep) 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 FormNode && equalTo((FormNode) other); - } - - private boolean equalTo(FormNode 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 FormNode of(FormFlow value) { - return new FormNode(value, 0); - } - - public static FormNode of(FormRouter value) { - return new FormNode(value, 1); - } - - public static FormNode of(FormStep value) { - return new FormNode(value, 2); - } - - public interface Visitor { - T visit(FormFlow value); - - T visit(FormRouter value); - - T visit(FormStep value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FormNode.class); - } - - @java.lang.Override - public FormNode deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormFlow.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormRouter.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormStep.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormNodeCoordinates.java b/src/main/java/com/auth0/client/mgmt/types/FormNodeCoordinates.java deleted file mode 100644 index 3dd9fcf17..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormNodeCoordinates.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FormNodeCoordinates.Builder.class) -public final class FormNodeCoordinates { - private final int x; - - private final int y; - - private final Map additionalProperties; - - private FormNodeCoordinates(int x, int y, Map additionalProperties) { - this.x = x; - this.y = y; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("x") - public int getX() { - return x; - } - - @JsonProperty("y") - public int getY() { - return y; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormNodeCoordinates && equalTo((FormNodeCoordinates) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormNodeCoordinates other) { - return x == other.x && y == other.y; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.x, this.y); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static XStage builder() { - return new Builder(); - } - - public interface XStage { - YStage x(int x); - - Builder from(FormNodeCoordinates other); - } - - public interface YStage { - _FinalStage y(int y); - } - - public interface _FinalStage { - FormNodeCoordinates build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements XStage, YStage, _FinalStage { - private int x; - - private int y; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormNodeCoordinates other) { - x(other.getX()); - y(other.getY()); - return this; - } - - @java.lang.Override - @JsonSetter("x") - public YStage x(int x) { - this.x = x; - return this; - } - - @java.lang.Override - @JsonSetter("y") - public _FinalStage y(int y) { - this.y = y; - return this; - } - - @java.lang.Override - public FormNodeCoordinates build() { - return new FormNodeCoordinates(x, y, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormNodePointer.java b/src/main/java/com/auth0/client/mgmt/types/FormNodePointer.java deleted file mode 100644 index 350f6c9c1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormNodePointer.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FormNodePointer.Deserializer.class) -public final class FormNodePointer { - private final Object value; - - private final int type; - - private FormNodePointer(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((FormEndingNodeId) 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 FormNodePointer && equalTo((FormNodePointer) other); - } - - private boolean equalTo(FormNodePointer 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 FormNodePointer of(String value) { - return new FormNodePointer(value, 0); - } - - public static FormNodePointer of(FormEndingNodeId value) { - return new FormNodePointer(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(FormEndingNodeId value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FormNodePointer.class); - } - - @java.lang.Override - public FormNodePointer deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormEndingNodeId.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormNodeTypeFlowConst.java b/src/main/java/com/auth0/client/mgmt/types/FormNodeTypeFlowConst.java deleted file mode 100644 index 2a6e736bb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormNodeTypeFlowConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormNodeTypeFlowConst { - public static final FormNodeTypeFlowConst FLOW = new FormNodeTypeFlowConst(Value.FLOW, "FLOW"); - - private final Value value; - - private final String string; - - FormNodeTypeFlowConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormNodeTypeFlowConst - && this.string.equals(((FormNodeTypeFlowConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FLOW: - return visitor.visitFlow(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormNodeTypeFlowConst valueOf(String value) { - switch (value) { - case "FLOW": - return FLOW; - default: - return new FormNodeTypeFlowConst(Value.UNKNOWN, value); - } - } - - public enum Value { - FLOW, - - UNKNOWN - } - - public interface Visitor { - T visitFlow(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormNodeTypeRouterConst.java b/src/main/java/com/auth0/client/mgmt/types/FormNodeTypeRouterConst.java deleted file mode 100644 index de81b2334..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormNodeTypeRouterConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormNodeTypeRouterConst { - public static final FormNodeTypeRouterConst ROUTER = new FormNodeTypeRouterConst(Value.ROUTER, "ROUTER"); - - private final Value value; - - private final String string; - - FormNodeTypeRouterConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormNodeTypeRouterConst - && this.string.equals(((FormNodeTypeRouterConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ROUTER: - return visitor.visitRouter(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormNodeTypeRouterConst valueOf(String value) { - switch (value) { - case "ROUTER": - return ROUTER; - default: - return new FormNodeTypeRouterConst(Value.UNKNOWN, value); - } - } - - public enum Value { - ROUTER, - - UNKNOWN - } - - public interface Visitor { - T visitRouter(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormNodeTypeStepConst.java b/src/main/java/com/auth0/client/mgmt/types/FormNodeTypeStepConst.java deleted file mode 100644 index 2f1cb51dc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormNodeTypeStepConst.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormNodeTypeStepConst { - public static final FormNodeTypeStepConst STEP = new FormNodeTypeStepConst(Value.STEP, "STEP"); - - private final Value value; - - private final String string; - - FormNodeTypeStepConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormNodeTypeStepConst - && this.string.equals(((FormNodeTypeStepConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case STEP: - return visitor.visitStep(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormNodeTypeStepConst valueOf(String value) { - switch (value) { - case "STEP": - return STEP; - default: - return new FormNodeTypeStepConst(Value.UNKNOWN, value); - } - } - - public enum Value { - STEP, - - UNKNOWN - } - - public interface Visitor { - T visitStep(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormRouter.java b/src/main/java/com/auth0/client/mgmt/types/FormRouter.java deleted file mode 100644 index 8bce78719..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormRouter.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormRouter.Builder.class) -public final class FormRouter { - private final String id; - - private final FormNodeTypeRouterConst type; - - private final Optional coordinates; - - private final Optional alias; - - private final Optional config; - - private final Map additionalProperties; - - private FormRouter( - String id, - FormNodeTypeRouterConst type, - Optional coordinates, - Optional alias, - Optional config, - Map additionalProperties) { - this.id = id; - this.type = type; - this.coordinates = coordinates; - this.alias = alias; - this.config = config; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("type") - public FormNodeTypeRouterConst getType() { - return type; - } - - @JsonProperty("coordinates") - public Optional getCoordinates() { - return coordinates; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormRouter && equalTo((FormRouter) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormRouter other) { - return id.equals(other.id) - && type.equals(other.type) - && coordinates.equals(other.coordinates) - && alias.equals(other.alias) - && config.equals(other.config); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.type, this.coordinates, this.alias, this.config); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FormRouter other); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormNodeTypeRouterConst type); - } - - public interface _FinalStage { - FormRouter build(); - - _FinalStage coordinates(Optional coordinates); - - _FinalStage coordinates(FormNodeCoordinates coordinates); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage config(Optional config); - - _FinalStage config(FormRouterConfig config); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, _FinalStage { - private String id; - - private FormNodeTypeRouterConst type; - - private Optional config = Optional.empty(); - - private Optional alias = Optional.empty(); - - private Optional coordinates = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormRouter other) { - id(other.getId()); - type(other.getType()); - coordinates(other.getCoordinates()); - alias(other.getAlias()); - config(other.getConfig()); - return this; - } - - @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 FormNodeTypeRouterConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage config(FormRouterConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public _FinalStage coordinates(FormNodeCoordinates coordinates) { - this.coordinates = Optional.ofNullable(coordinates); - return this; - } - - @java.lang.Override - @JsonSetter(value = "coordinates", nulls = Nulls.SKIP) - public _FinalStage coordinates(Optional coordinates) { - this.coordinates = coordinates; - return this; - } - - @java.lang.Override - public FormRouter build() { - return new FormRouter(id, type, coordinates, alias, config, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormRouterConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormRouterConfig.java deleted file mode 100644 index a6c450ea7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormRouterConfig.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormRouterConfig.Builder.class) -public final class FormRouterConfig { - private final Optional> rules; - - private final Optional fallback; - - private final Map additionalProperties; - - private FormRouterConfig( - Optional> rules, - Optional fallback, - Map additionalProperties) { - this.rules = rules; - this.fallback = fallback; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("rules") - public Optional> getRules() { - return rules; - } - - @JsonProperty("fallback") - public Optional getFallback() { - return fallback; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormRouterConfig && equalTo((FormRouterConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormRouterConfig other) { - return rules.equals(other.rules) && fallback.equals(other.fallback); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.rules, this.fallback); - } - - @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> rules = Optional.empty(); - - private Optional fallback = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormRouterConfig other) { - rules(other.getRules()); - fallback(other.getFallback()); - return this; - } - - @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; - } - - @JsonSetter(value = "fallback", nulls = Nulls.SKIP) - public Builder fallback(Optional fallback) { - this.fallback = fallback; - return this; - } - - public Builder fallback(FormNodePointer fallback) { - this.fallback = Optional.ofNullable(fallback); - return this; - } - - public FormRouterConfig build() { - return new FormRouterConfig(rules, fallback, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormRouterRule.java b/src/main/java/com/auth0/client/mgmt/types/FormRouterRule.java deleted file mode 100644 index ea3f83563..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormRouterRule.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormRouterRule.Builder.class) -public final class FormRouterRule { - private final String id; - - private final Optional alias; - - private final Optional nextNode; - - private final Map additionalProperties; - - private FormRouterRule( - String id, - Optional alias, - Optional nextNode, - Map additionalProperties) { - this.id = id; - this.alias = alias; - this.nextNode = nextNode; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("next_node") - public Optional getNextNode() { - return nextNode; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormRouterRule && equalTo((FormRouterRule) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormRouterRule other) { - return id.equals(other.id) && alias.equals(other.alias) && nextNode.equals(other.nextNode); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.alias, this.nextNode); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - _FinalStage id(@NotNull String id); - - Builder from(FormRouterRule other); - } - - public interface _FinalStage { - FormRouterRule build(); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage nextNode(Optional nextNode); - - _FinalStage nextNode(FormNodePointer nextNode); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, _FinalStage { - private String id; - - private Optional nextNode = Optional.empty(); - - private Optional alias = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormRouterRule other) { - id(other.getId()); - alias(other.getAlias()); - nextNode(other.getNextNode()); - return this; - } - - @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 nextNode(FormNodePointer nextNode) { - this.nextNode = Optional.ofNullable(nextNode); - return this; - } - - @java.lang.Override - @JsonSetter(value = "next_node", nulls = Nulls.SKIP) - public _FinalStage nextNode(Optional nextNode) { - this.nextNode = nextNode; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public FormRouterRule build() { - return new FormRouterRule(id, alias, nextNode, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormStartNode.java b/src/main/java/com/auth0/client/mgmt/types/FormStartNode.java deleted file mode 100644 index 5777adaad..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormStartNode.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormStartNode.Builder.class) -public final class FormStartNode { - private final Optional> hiddenFields; - - private final Optional nextNode; - - private final Optional coordinates; - - private final Map additionalProperties; - - private FormStartNode( - Optional> hiddenFields, - Optional nextNode, - Optional coordinates, - Map additionalProperties) { - this.hiddenFields = hiddenFields; - this.nextNode = nextNode; - this.coordinates = coordinates; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("hidden_fields") - public Optional> getHiddenFields() { - return hiddenFields; - } - - @JsonProperty("next_node") - public Optional getNextNode() { - return nextNode; - } - - @JsonProperty("coordinates") - public Optional getCoordinates() { - return coordinates; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormStartNode && equalTo((FormStartNode) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormStartNode other) { - return hiddenFields.equals(other.hiddenFields) - && nextNode.equals(other.nextNode) - && coordinates.equals(other.coordinates); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.hiddenFields, this.nextNode, this.coordinates); - } - - @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> hiddenFields = Optional.empty(); - - private Optional nextNode = Optional.empty(); - - private Optional coordinates = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormStartNode other) { - hiddenFields(other.getHiddenFields()); - nextNode(other.getNextNode()); - coordinates(other.getCoordinates()); - return this; - } - - @JsonSetter(value = "hidden_fields", nulls = Nulls.SKIP) - public Builder hiddenFields(Optional> hiddenFields) { - this.hiddenFields = hiddenFields; - return this; - } - - public Builder hiddenFields(List hiddenFields) { - this.hiddenFields = Optional.ofNullable(hiddenFields); - return this; - } - - @JsonSetter(value = "next_node", nulls = Nulls.SKIP) - public Builder nextNode(Optional nextNode) { - this.nextNode = nextNode; - return this; - } - - public Builder nextNode(FormNodePointer nextNode) { - this.nextNode = Optional.ofNullable(nextNode); - return this; - } - - @JsonSetter(value = "coordinates", nulls = Nulls.SKIP) - public Builder coordinates(Optional coordinates) { - this.coordinates = coordinates; - return this; - } - - public Builder coordinates(FormNodeCoordinates coordinates) { - this.coordinates = Optional.ofNullable(coordinates); - return this; - } - - public FormStartNode build() { - return new FormStartNode(hiddenFields, nextNode, coordinates, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormStep.java b/src/main/java/com/auth0/client/mgmt/types/FormStep.java deleted file mode 100644 index c2ab7ef63..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormStep.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormStep.Builder.class) -public final class FormStep { - private final String id; - - private final FormNodeTypeStepConst type; - - private final Optional coordinates; - - private final Optional alias; - - private final Optional config; - - private final Map additionalProperties; - - private FormStep( - String id, - FormNodeTypeStepConst type, - Optional coordinates, - Optional alias, - Optional config, - Map additionalProperties) { - this.id = id; - this.type = type; - this.coordinates = coordinates; - this.alias = alias; - this.config = config; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("type") - public FormNodeTypeStepConst getType() { - return type; - } - - @JsonProperty("coordinates") - public Optional getCoordinates() { - return coordinates; - } - - @JsonProperty("alias") - public Optional getAlias() { - return alias; - } - - @JsonProperty("config") - public Optional getConfig() { - return config; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormStep && equalTo((FormStep) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormStep other) { - return id.equals(other.id) - && type.equals(other.type) - && coordinates.equals(other.coordinates) - && alias.equals(other.alias) - && config.equals(other.config); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.type, this.coordinates, this.alias, this.config); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - TypeStage id(@NotNull String id); - - Builder from(FormStep other); - } - - public interface TypeStage { - _FinalStage type(@NotNull FormNodeTypeStepConst type); - } - - public interface _FinalStage { - FormStep build(); - - _FinalStage coordinates(Optional coordinates); - - _FinalStage coordinates(FormNodeCoordinates coordinates); - - _FinalStage alias(Optional alias); - - _FinalStage alias(String alias); - - _FinalStage config(Optional config); - - _FinalStage config(FormStepConfig config); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, _FinalStage { - private String id; - - private FormNodeTypeStepConst type; - - private Optional config = Optional.empty(); - - private Optional alias = Optional.empty(); - - private Optional coordinates = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormStep other) { - id(other.getId()); - type(other.getType()); - coordinates(other.getCoordinates()); - alias(other.getAlias()); - config(other.getConfig()); - return this; - } - - @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 FormNodeTypeStepConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage config(FormStepConfig config) { - this.config = Optional.ofNullable(config); - return this; - } - - @java.lang.Override - @JsonSetter(value = "config", nulls = Nulls.SKIP) - public _FinalStage config(Optional config) { - this.config = config; - return this; - } - - @java.lang.Override - public _FinalStage alias(String alias) { - this.alias = Optional.ofNullable(alias); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alias", nulls = Nulls.SKIP) - public _FinalStage alias(Optional alias) { - this.alias = alias; - return this; - } - - @java.lang.Override - public _FinalStage coordinates(FormNodeCoordinates coordinates) { - this.coordinates = Optional.ofNullable(coordinates); - return this; - } - - @java.lang.Override - @JsonSetter(value = "coordinates", nulls = Nulls.SKIP) - public _FinalStage coordinates(Optional coordinates) { - this.coordinates = coordinates; - return this; - } - - @java.lang.Override - public FormStep build() { - return new FormStep(id, type, coordinates, alias, config, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormStepConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormStepConfig.java deleted file mode 100644 index 7b61890cf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormStepConfig.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormStepConfig.Builder.class) -public final class FormStepConfig { - private final Optional> components; - - private final Optional nextNode; - - private final Map additionalProperties; - - private FormStepConfig( - Optional> components, - Optional nextNode, - Map additionalProperties) { - this.components = components; - this.nextNode = nextNode; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("components") - public Optional> getComponents() { - return components; - } - - @JsonProperty("next_node") - public Optional getNextNode() { - return nextNode; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormStepConfig && equalTo((FormStepConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormStepConfig other) { - return components.equals(other.components) && nextNode.equals(other.nextNode); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.components, this.nextNode); - } - - @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(); - - private Optional nextNode = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormStepConfig other) { - components(other.getComponents()); - nextNode(other.getNextNode()); - 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; - } - - @JsonSetter(value = "next_node", nulls = Nulls.SKIP) - public Builder nextNode(Optional nextNode) { - this.nextNode = nextNode; - return this; - } - - public Builder nextNode(FormNodePointer nextNode) { - this.nextNode = Optional.ofNullable(nextNode); - return this; - } - - public FormStepConfig build() { - return new FormStepConfig(components, nextNode, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormStyle.java b/src/main/java/com/auth0/client/mgmt/types/FormStyle.java deleted file mode 100644 index f90d8dbbd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormStyle.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormStyle.Builder.class) -public final class FormStyle { - private final Optional css; - - private final Map additionalProperties; - - private FormStyle(Optional css, Map additionalProperties) { - this.css = css; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("css") - public Optional getCss() { - return css; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormStyle && equalTo((FormStyle) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormStyle other) { - return css.equals(other.css); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.css); - } - - @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 css = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(FormStyle other) { - css(other.getCss()); - return this; - } - - @JsonSetter(value = "css", nulls = Nulls.SKIP) - public Builder css(Optional css) { - this.css = css; - return this; - } - - public Builder css(String css) { - this.css = Optional.ofNullable(css); - return this; - } - - public FormStyle build() { - return new FormStyle(css, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormSummary.java b/src/main/java/com/auth0/client/mgmt/types/FormSummary.java deleted file mode 100644 index e7dca63d4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormSummary.java +++ /dev/null @@ -1,239 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = FormSummary.Builder.class) -public final class FormSummary { - private final String id; - - private final String name; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional embeddedAt; - - private final Optional submittedAt; - - private final Map additionalProperties; - - private FormSummary( - String id, - String name, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional embeddedAt, - Optional submittedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.embeddedAt = embeddedAt; - this.submittedAt = submittedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("embedded_at") - public Optional getEmbeddedAt() { - return embeddedAt; - } - - @JsonProperty("submitted_at") - public Optional getSubmittedAt() { - return submittedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormSummary && equalTo((FormSummary) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormSummary other) { - return id.equals(other.id) - && name.equals(other.name) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && embeddedAt.equals(other.embeddedAt) - && submittedAt.equals(other.submittedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.createdAt, this.updatedAt, this.embeddedAt, this.submittedAt); - } - - @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(FormSummary other); - } - - 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 { - FormSummary build(); - - _FinalStage embeddedAt(Optional embeddedAt); - - _FinalStage embeddedAt(String embeddedAt); - - _FinalStage submittedAt(Optional submittedAt); - - _FinalStage submittedAt(String submittedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, CreatedAtStage, UpdatedAtStage, _FinalStage { - private String id; - - private String name; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private Optional submittedAt = Optional.empty(); - - private Optional embeddedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormSummary other) { - id(other.getId()); - name(other.getName()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - embeddedAt(other.getEmbeddedAt()); - submittedAt(other.getSubmittedAt()); - 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 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 submittedAt(String submittedAt) { - this.submittedAt = Optional.ofNullable(submittedAt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "submitted_at", nulls = Nulls.SKIP) - public _FinalStage submittedAt(Optional submittedAt) { - this.submittedAt = submittedAt; - return this; - } - - @java.lang.Override - public _FinalStage embeddedAt(String embeddedAt) { - this.embeddedAt = Optional.ofNullable(embeddedAt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "embedded_at", nulls = Nulls.SKIP) - public _FinalStage embeddedAt(Optional embeddedAt) { - this.embeddedAt = embeddedAt; - return this; - } - - @java.lang.Override - public FormSummary build() { - return new FormSummary(id, name, createdAt, updatedAt, embeddedAt, submittedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormWidget.java b/src/main/java/com/auth0/client/mgmt/types/FormWidget.java deleted file mode 100644 index 7fc550a16..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormWidget.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = FormWidget.Deserializer.class) -public final class FormWidget { - private final Object value; - - private final int type; - - private FormWidget(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((FormWidgetAuth0VerifiableCredentials) this.value); - } else if (this.type == 1) { - return visitor.visit((FormWidgetGMapsAddress) this.value); - } else if (this.type == 2) { - return visitor.visit((FormWidgetRecaptcha) 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 FormWidget && equalTo((FormWidget) other); - } - - private boolean equalTo(FormWidget 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 FormWidget of(FormWidgetAuth0VerifiableCredentials value) { - return new FormWidget(value, 0); - } - - public static FormWidget of(FormWidgetGMapsAddress value) { - return new FormWidget(value, 1); - } - - public static FormWidget of(FormWidgetRecaptcha value) { - return new FormWidget(value, 2); - } - - public interface Visitor { - T visit(FormWidgetAuth0VerifiableCredentials value); - - T visit(FormWidgetGMapsAddress value); - - T visit(FormWidgetRecaptcha value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(FormWidget.class); - } - - @java.lang.Override - public FormWidget deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormWidgetAuth0VerifiableCredentials.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormWidgetGMapsAddress.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FormWidgetRecaptcha.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormWidgetAuth0VerifiableCredentials.java b/src/main/java/com/auth0/client/mgmt/types/FormWidgetAuth0VerifiableCredentials.java deleted file mode 100644 index 5b282abf6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormWidgetAuth0VerifiableCredentials.java +++ /dev/null @@ -1,301 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormWidgetAuth0VerifiableCredentials.Builder.class) -public final class FormWidgetAuth0VerifiableCredentials { - private final String id; - - private final FormComponentCategoryWidgetConst category; - - private final FormWidgetTypeAuth0VerifiableCredentialsConst type; - - private final FormWidgetAuth0VerifiableCredentialsConfig config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormWidgetAuth0VerifiableCredentials( - String id, - FormComponentCategoryWidgetConst category, - FormWidgetTypeAuth0VerifiableCredentialsConst type, - FormWidgetAuth0VerifiableCredentialsConfig config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryWidgetConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormWidgetTypeAuth0VerifiableCredentialsConst getType() { - return type; - } - - @JsonProperty("config") - public FormWidgetAuth0VerifiableCredentialsConfig getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormWidgetAuth0VerifiableCredentials - && equalTo((FormWidgetAuth0VerifiableCredentials) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormWidgetAuth0VerifiableCredentials other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormWidgetAuth0VerifiableCredentials other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryWidgetConst category); - } - - public interface TypeStage { - ConfigStage type(@NotNull FormWidgetTypeAuth0VerifiableCredentialsConst type); - } - - public interface ConfigStage { - _FinalStage config(@NotNull FormWidgetAuth0VerifiableCredentialsConfig config); - } - - public interface _FinalStage { - FormWidgetAuth0VerifiableCredentials build(); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, ConfigStage, _FinalStage { - private String id; - - private FormComponentCategoryWidgetConst category; - - private FormWidgetTypeAuth0VerifiableCredentialsConst type; - - private FormWidgetAuth0VerifiableCredentialsConfig config; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormWidgetAuth0VerifiableCredentials other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryWidgetConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ConfigStage type(@NotNull FormWidgetTypeAuth0VerifiableCredentialsConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("config") - public _FinalStage config(@NotNull FormWidgetAuth0VerifiableCredentialsConfig config) { - this.config = Objects.requireNonNull(config, "config must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public FormWidgetAuth0VerifiableCredentials build() { - return new FormWidgetAuth0VerifiableCredentials( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormWidgetAuth0VerifiableCredentialsConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormWidgetAuth0VerifiableCredentialsConfig.java deleted file mode 100644 index 89fe92e76..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormWidgetAuth0VerifiableCredentialsConfig.java +++ /dev/null @@ -1,242 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormWidgetAuth0VerifiableCredentialsConfig.Builder.class) -public final class FormWidgetAuth0VerifiableCredentialsConfig { - private final String url; - - private final Optional size; - - private final String alternateText; - - private final String accessToken; - - private final String verificationId; - - private final Optional maxWait; - - private final Map additionalProperties; - - private FormWidgetAuth0VerifiableCredentialsConfig( - String url, - Optional size, - String alternateText, - String accessToken, - String verificationId, - Optional maxWait, - Map additionalProperties) { - this.url = url; - this.size = size; - this.alternateText = alternateText; - this.accessToken = accessToken; - this.verificationId = verificationId; - this.maxWait = maxWait; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("url") - public String getUrl() { - return url; - } - - @JsonProperty("size") - public Optional getSize() { - return size; - } - - @JsonProperty("alternate_text") - public String getAlternateText() { - return alternateText; - } - - @JsonProperty("access_token") - public String getAccessToken() { - return accessToken; - } - - @JsonProperty("verification_id") - public String getVerificationId() { - return verificationId; - } - - @JsonProperty("max_wait") - public Optional getMaxWait() { - return maxWait; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormWidgetAuth0VerifiableCredentialsConfig - && equalTo((FormWidgetAuth0VerifiableCredentialsConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormWidgetAuth0VerifiableCredentialsConfig other) { - return url.equals(other.url) - && size.equals(other.size) - && alternateText.equals(other.alternateText) - && accessToken.equals(other.accessToken) - && verificationId.equals(other.verificationId) - && maxWait.equals(other.maxWait); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.url, this.size, this.alternateText, this.accessToken, this.verificationId, this.maxWait); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static UrlStage builder() { - return new Builder(); - } - - public interface UrlStage { - AlternateTextStage url(@NotNull String url); - - Builder from(FormWidgetAuth0VerifiableCredentialsConfig other); - } - - public interface AlternateTextStage { - AccessTokenStage alternateText(@NotNull String alternateText); - } - - public interface AccessTokenStage { - VerificationIdStage accessToken(@NotNull String accessToken); - } - - public interface VerificationIdStage { - _FinalStage verificationId(@NotNull String verificationId); - } - - public interface _FinalStage { - FormWidgetAuth0VerifiableCredentialsConfig build(); - - _FinalStage size(Optional size); - - _FinalStage size(Double size); - - _FinalStage maxWait(Optional maxWait); - - _FinalStage maxWait(Double maxWait); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements UrlStage, AlternateTextStage, AccessTokenStage, VerificationIdStage, _FinalStage { - private String url; - - private String alternateText; - - private String accessToken; - - private String verificationId; - - private Optional maxWait = Optional.empty(); - - private Optional size = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormWidgetAuth0VerifiableCredentialsConfig other) { - url(other.getUrl()); - size(other.getSize()); - alternateText(other.getAlternateText()); - accessToken(other.getAccessToken()); - verificationId(other.getVerificationId()); - maxWait(other.getMaxWait()); - return this; - } - - @java.lang.Override - @JsonSetter("url") - public AlternateTextStage url(@NotNull String url) { - this.url = Objects.requireNonNull(url, "url must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("alternate_text") - public AccessTokenStage alternateText(@NotNull String alternateText) { - this.alternateText = Objects.requireNonNull(alternateText, "alternateText must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("access_token") - public VerificationIdStage accessToken(@NotNull String accessToken) { - this.accessToken = Objects.requireNonNull(accessToken, "accessToken must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("verification_id") - public _FinalStage verificationId(@NotNull String verificationId) { - this.verificationId = Objects.requireNonNull(verificationId, "verificationId must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage maxWait(Double maxWait) { - this.maxWait = Optional.ofNullable(maxWait); - return this; - } - - @java.lang.Override - @JsonSetter(value = "max_wait", nulls = Nulls.SKIP) - public _FinalStage maxWait(Optional maxWait) { - this.maxWait = maxWait; - return this; - } - - @java.lang.Override - public _FinalStage size(Double size) { - this.size = Optional.ofNullable(size); - return this; - } - - @java.lang.Override - @JsonSetter(value = "size", nulls = Nulls.SKIP) - public _FinalStage size(Optional size) { - this.size = size; - return this; - } - - @java.lang.Override - public FormWidgetAuth0VerifiableCredentialsConfig build() { - return new FormWidgetAuth0VerifiableCredentialsConfig( - url, size, alternateText, accessToken, verificationId, maxWait, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormWidgetGMapsAddress.java b/src/main/java/com/auth0/client/mgmt/types/FormWidgetGMapsAddress.java deleted file mode 100644 index 47b5d5d22..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormWidgetGMapsAddress.java +++ /dev/null @@ -1,300 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormWidgetGMapsAddress.Builder.class) -public final class FormWidgetGMapsAddress { - private final String id; - - private final FormComponentCategoryWidgetConst category; - - private final FormWidgetTypeGMapsAddressConst type; - - private final FormWidgetGMapsAddressConfig config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormWidgetGMapsAddress( - String id, - FormComponentCategoryWidgetConst category, - FormWidgetTypeGMapsAddressConst type, - FormWidgetGMapsAddressConfig config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryWidgetConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormWidgetTypeGMapsAddressConst getType() { - return type; - } - - @JsonProperty("config") - public FormWidgetGMapsAddressConfig getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormWidgetGMapsAddress && equalTo((FormWidgetGMapsAddress) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormWidgetGMapsAddress other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormWidgetGMapsAddress other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryWidgetConst category); - } - - public interface TypeStage { - ConfigStage type(@NotNull FormWidgetTypeGMapsAddressConst type); - } - - public interface ConfigStage { - _FinalStage config(@NotNull FormWidgetGMapsAddressConfig config); - } - - public interface _FinalStage { - FormWidgetGMapsAddress build(); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, ConfigStage, _FinalStage { - private String id; - - private FormComponentCategoryWidgetConst category; - - private FormWidgetTypeGMapsAddressConst type; - - private FormWidgetGMapsAddressConfig config; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormWidgetGMapsAddress other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryWidgetConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ConfigStage type(@NotNull FormWidgetTypeGMapsAddressConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("config") - public _FinalStage config(@NotNull FormWidgetGMapsAddressConfig config) { - this.config = Objects.requireNonNull(config, "config must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public FormWidgetGMapsAddress build() { - return new FormWidgetGMapsAddress( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormWidgetGMapsAddressConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormWidgetGMapsAddressConfig.java deleted file mode 100644 index 380619e1e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormWidgetGMapsAddressConfig.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FormWidgetGMapsAddressConfig.Builder.class) -public final class FormWidgetGMapsAddressConfig { - private final String apiKey; - - private final Map additionalProperties; - - private FormWidgetGMapsAddressConfig(String apiKey, Map additionalProperties) { - this.apiKey = apiKey; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("api_key") - public String getApiKey() { - return apiKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormWidgetGMapsAddressConfig && equalTo((FormWidgetGMapsAddressConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormWidgetGMapsAddressConfig other) { - return apiKey.equals(other.apiKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.apiKey); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ApiKeyStage builder() { - return new Builder(); - } - - public interface ApiKeyStage { - _FinalStage apiKey(@NotNull String apiKey); - - Builder from(FormWidgetGMapsAddressConfig other); - } - - public interface _FinalStage { - FormWidgetGMapsAddressConfig build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ApiKeyStage, _FinalStage { - private String apiKey; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormWidgetGMapsAddressConfig other) { - apiKey(other.getApiKey()); - return this; - } - - @java.lang.Override - @JsonSetter("api_key") - public _FinalStage apiKey(@NotNull String apiKey) { - this.apiKey = Objects.requireNonNull(apiKey, "apiKey must not be null"); - return this; - } - - @java.lang.Override - public FormWidgetGMapsAddressConfig build() { - return new FormWidgetGMapsAddressConfig(apiKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormWidgetRecaptcha.java b/src/main/java/com/auth0/client/mgmt/types/FormWidgetRecaptcha.java deleted file mode 100644 index b7de0b48c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormWidgetRecaptcha.java +++ /dev/null @@ -1,300 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = FormWidgetRecaptcha.Builder.class) -public final class FormWidgetRecaptcha { - private final String id; - - private final FormComponentCategoryWidgetConst category; - - private final FormWidgetTypeRecaptchaConst type; - - private final FormWidgetRecaptchaConfig config; - - private final Optional label; - - private final Optional hint; - - private final Optional required; - - private final Optional sensitive; - - private final Map additionalProperties; - - private FormWidgetRecaptcha( - String id, - FormComponentCategoryWidgetConst category, - FormWidgetTypeRecaptchaConst type, - FormWidgetRecaptchaConfig config, - Optional label, - Optional hint, - Optional required, - Optional sensitive, - Map additionalProperties) { - this.id = id; - this.category = category; - this.type = type; - this.config = config; - this.label = label; - this.hint = hint; - this.required = required; - this.sensitive = sensitive; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("category") - public FormComponentCategoryWidgetConst getCategory() { - return category; - } - - @JsonProperty("type") - public FormWidgetTypeRecaptchaConst getType() { - return type; - } - - @JsonProperty("config") - public FormWidgetRecaptchaConfig getConfig() { - return config; - } - - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @JsonProperty("hint") - public Optional getHint() { - return hint; - } - - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - @JsonProperty("sensitive") - public Optional getSensitive() { - return sensitive; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormWidgetRecaptcha && equalTo((FormWidgetRecaptcha) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormWidgetRecaptcha other) { - return id.equals(other.id) - && category.equals(other.category) - && type.equals(other.type) - && config.equals(other.config) - && label.equals(other.label) - && hint.equals(other.hint) - && required.equals(other.required) - && sensitive.equals(other.sensitive); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.category, this.type, this.config, this.label, this.hint, this.required, this.sensitive); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - CategoryStage id(@NotNull String id); - - Builder from(FormWidgetRecaptcha other); - } - - public interface CategoryStage { - TypeStage category(@NotNull FormComponentCategoryWidgetConst category); - } - - public interface TypeStage { - ConfigStage type(@NotNull FormWidgetTypeRecaptchaConst type); - } - - public interface ConfigStage { - _FinalStage config(@NotNull FormWidgetRecaptchaConfig config); - } - - public interface _FinalStage { - FormWidgetRecaptcha build(); - - _FinalStage label(Optional label); - - _FinalStage label(String label); - - _FinalStage hint(Optional hint); - - _FinalStage hint(String hint); - - _FinalStage required(Optional required); - - _FinalStage required(Boolean required); - - _FinalStage sensitive(Optional sensitive); - - _FinalStage sensitive(Boolean sensitive); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, CategoryStage, TypeStage, ConfigStage, _FinalStage { - private String id; - - private FormComponentCategoryWidgetConst category; - - private FormWidgetTypeRecaptchaConst type; - - private FormWidgetRecaptchaConfig config; - - private Optional sensitive = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional hint = Optional.empty(); - - private Optional label = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormWidgetRecaptcha other) { - id(other.getId()); - category(other.getCategory()); - type(other.getType()); - config(other.getConfig()); - label(other.getLabel()); - hint(other.getHint()); - required(other.getRequired()); - sensitive(other.getSensitive()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public CategoryStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("category") - public TypeStage category(@NotNull FormComponentCategoryWidgetConst category) { - this.category = Objects.requireNonNull(category, "category must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public ConfigStage type(@NotNull FormWidgetTypeRecaptchaConst type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("config") - public _FinalStage config(@NotNull FormWidgetRecaptchaConfig config) { - this.config = Objects.requireNonNull(config, "config must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage sensitive(Boolean sensitive) { - this.sensitive = Optional.ofNullable(sensitive); - return this; - } - - @java.lang.Override - @JsonSetter(value = "sensitive", nulls = Nulls.SKIP) - public _FinalStage sensitive(Optional sensitive) { - this.sensitive = sensitive; - return this; - } - - @java.lang.Override - public _FinalStage required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public _FinalStage required(Optional required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage hint(String hint) { - this.hint = Optional.ofNullable(hint); - return this; - } - - @java.lang.Override - @JsonSetter(value = "hint", nulls = Nulls.SKIP) - public _FinalStage hint(Optional hint) { - this.hint = hint; - return this; - } - - @java.lang.Override - public _FinalStage label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - @java.lang.Override - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public _FinalStage label(Optional label) { - this.label = label; - return this; - } - - @java.lang.Override - public FormWidgetRecaptcha build() { - return new FormWidgetRecaptcha( - id, category, type, config, label, hint, required, sensitive, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormWidgetRecaptchaConfig.java b/src/main/java/com/auth0/client/mgmt/types/FormWidgetRecaptchaConfig.java deleted file mode 100644 index eb3212400..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormWidgetRecaptchaConfig.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = FormWidgetRecaptchaConfig.Builder.class) -public final class FormWidgetRecaptchaConfig { - private final String siteKey; - - private final String secretKey; - - private final Map additionalProperties; - - private FormWidgetRecaptchaConfig(String siteKey, String secretKey, Map additionalProperties) { - this.siteKey = siteKey; - this.secretKey = secretKey; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("site_key") - public String getSiteKey() { - return siteKey; - } - - @JsonProperty("secret_key") - public String getSecretKey() { - return secretKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof FormWidgetRecaptchaConfig && equalTo((FormWidgetRecaptchaConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(FormWidgetRecaptchaConfig other) { - return siteKey.equals(other.siteKey) && secretKey.equals(other.secretKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.siteKey, this.secretKey); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static SiteKeyStage builder() { - return new Builder(); - } - - public interface SiteKeyStage { - SecretKeyStage siteKey(@NotNull String siteKey); - - Builder from(FormWidgetRecaptchaConfig other); - } - - public interface SecretKeyStage { - _FinalStage secretKey(@NotNull String secretKey); - } - - public interface _FinalStage { - FormWidgetRecaptchaConfig build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements SiteKeyStage, SecretKeyStage, _FinalStage { - private String siteKey; - - private String secretKey; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(FormWidgetRecaptchaConfig other) { - siteKey(other.getSiteKey()); - secretKey(other.getSecretKey()); - return this; - } - - @java.lang.Override - @JsonSetter("site_key") - public SecretKeyStage siteKey(@NotNull String siteKey) { - this.siteKey = Objects.requireNonNull(siteKey, "siteKey must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("secret_key") - public _FinalStage secretKey(@NotNull String secretKey) { - this.secretKey = Objects.requireNonNull(secretKey, "secretKey must not be null"); - return this; - } - - @java.lang.Override - public FormWidgetRecaptchaConfig build() { - return new FormWidgetRecaptchaConfig(siteKey, secretKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormWidgetTypeAuth0VerifiableCredentialsConst.java b/src/main/java/com/auth0/client/mgmt/types/FormWidgetTypeAuth0VerifiableCredentialsConst.java deleted file mode 100644 index de8b825ef..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormWidgetTypeAuth0VerifiableCredentialsConst.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormWidgetTypeAuth0VerifiableCredentialsConst { - public static final FormWidgetTypeAuth0VerifiableCredentialsConst AUTH0VERIFIABLE_CREDENTIALS = - new FormWidgetTypeAuth0VerifiableCredentialsConst( - Value.AUTH0VERIFIABLE_CREDENTIALS, "AUTH0_VERIFIABLE_CREDENTIALS"); - - private final Value value; - - private final String string; - - FormWidgetTypeAuth0VerifiableCredentialsConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormWidgetTypeAuth0VerifiableCredentialsConst - && this.string.equals(((FormWidgetTypeAuth0VerifiableCredentialsConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AUTH0VERIFIABLE_CREDENTIALS: - return visitor.visitAuth0VerifiableCredentials(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormWidgetTypeAuth0VerifiableCredentialsConst valueOf(String value) { - switch (value) { - case "AUTH0_VERIFIABLE_CREDENTIALS": - return AUTH0VERIFIABLE_CREDENTIALS; - default: - return new FormWidgetTypeAuth0VerifiableCredentialsConst(Value.UNKNOWN, value); - } - } - - public enum Value { - AUTH0VERIFIABLE_CREDENTIALS, - - UNKNOWN - } - - public interface Visitor { - T visitAuth0VerifiableCredentials(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormWidgetTypeGMapsAddressConst.java b/src/main/java/com/auth0/client/mgmt/types/FormWidgetTypeGMapsAddressConst.java deleted file mode 100644 index 5bcfb9706..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormWidgetTypeGMapsAddressConst.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormWidgetTypeGMapsAddressConst { - public static final FormWidgetTypeGMapsAddressConst GMAPS_ADDRESS = - new FormWidgetTypeGMapsAddressConst(Value.GMAPS_ADDRESS, "GMAPS_ADDRESS"); - - private final Value value; - - private final String string; - - FormWidgetTypeGMapsAddressConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormWidgetTypeGMapsAddressConst - && this.string.equals(((FormWidgetTypeGMapsAddressConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GMAPS_ADDRESS: - return visitor.visitGmapsAddress(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormWidgetTypeGMapsAddressConst valueOf(String value) { - switch (value) { - case "GMAPS_ADDRESS": - return GMAPS_ADDRESS; - default: - return new FormWidgetTypeGMapsAddressConst(Value.UNKNOWN, value); - } - } - - public enum Value { - GMAPS_ADDRESS, - - UNKNOWN - } - - public interface Visitor { - T visitGmapsAddress(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormWidgetTypeRecaptchaConst.java b/src/main/java/com/auth0/client/mgmt/types/FormWidgetTypeRecaptchaConst.java deleted file mode 100644 index 4516c7852..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormWidgetTypeRecaptchaConst.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormWidgetTypeRecaptchaConst { - public static final FormWidgetTypeRecaptchaConst RECAPTCHA = - new FormWidgetTypeRecaptchaConst(Value.RECAPTCHA, "RECAPTCHA"); - - private final Value value; - - private final String string; - - FormWidgetTypeRecaptchaConst(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormWidgetTypeRecaptchaConst - && this.string.equals(((FormWidgetTypeRecaptchaConst) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case RECAPTCHA: - return visitor.visitRecaptcha(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormWidgetTypeRecaptchaConst valueOf(String value) { - switch (value) { - case "RECAPTCHA": - return RECAPTCHA; - default: - return new FormWidgetTypeRecaptchaConst(Value.UNKNOWN, value); - } - } - - public enum Value { - RECAPTCHA, - - UNKNOWN - } - - public interface Visitor { - T visitRecaptcha(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/FormsRequestParametersHydrateEnum.java b/src/main/java/com/auth0/client/mgmt/types/FormsRequestParametersHydrateEnum.java deleted file mode 100644 index b0d8f710c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/FormsRequestParametersHydrateEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class FormsRequestParametersHydrateEnum { - public static final FormsRequestParametersHydrateEnum LINKS = - new FormsRequestParametersHydrateEnum(Value.LINKS, "links"); - - public static final FormsRequestParametersHydrateEnum FLOW_COUNT = - new FormsRequestParametersHydrateEnum(Value.FLOW_COUNT, "flow_count"); - - private final Value value; - - private final String string; - - FormsRequestParametersHydrateEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof FormsRequestParametersHydrateEnum - && this.string.equals(((FormsRequestParametersHydrateEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case LINKS: - return visitor.visitLinks(); - case FLOW_COUNT: - return visitor.visitFlowCount(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static FormsRequestParametersHydrateEnum valueOf(String value) { - switch (value) { - case "links": - return LINKS; - case "flow_count": - return FLOW_COUNT; - default: - return new FormsRequestParametersHydrateEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - FLOW_COUNT, - - LINKS, - - UNKNOWN - } - - public interface Visitor { - T visitFlowCount(); - - T visitLinks(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetActionExecutionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetActionExecutionResponseContent.java deleted file mode 100644 index 676cf76ab..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetActionExecutionResponseContent.java +++ /dev/null @@ -1,238 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = GetActionExecutionResponseContent.Builder.class) -public final class GetActionExecutionResponseContent { - private final Optional id; - - private final Optional triggerId; - - private final Optional status; - - private final Optional> results; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private GetActionExecutionResponseContent( - Optional id, - Optional triggerId, - Optional status, - Optional> results, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.triggerId = triggerId; - this.status = status; - this.results = results; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID identifies this specific execution simulation. These IDs would resemble real executions in production. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("trigger_id") - public Optional getTriggerId() { - return triggerId; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - @JsonProperty("results") - public Optional> getResults() { - return results; - } - - /** - * @return The time that the execution was started. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time that the exeution finished executing. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetActionExecutionResponseContent && equalTo((GetActionExecutionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetActionExecutionResponseContent other) { - return id.equals(other.id) - && triggerId.equals(other.triggerId) - && status.equals(other.status) - && results.equals(other.results) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.triggerId, this.status, this.results, this.createdAt, this.updatedAt); - } - - @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 triggerId = Optional.empty(); - - private Optional status = Optional.empty(); - - private Optional> results = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetActionExecutionResponseContent other) { - id(other.getId()); - triggerId(other.getTriggerId()); - status(other.getStatus()); - results(other.getResults()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

ID identifies this specific execution simulation. These IDs would resemble real executions in production.

- */ - @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 = "trigger_id", nulls = Nulls.SKIP) - public Builder triggerId(Optional triggerId) { - this.triggerId = triggerId; - return this; - } - - public Builder triggerId(String triggerId) { - this.triggerId = Optional.ofNullable(triggerId); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(ActionExecutionStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - @JsonSetter(value = "results", nulls = Nulls.SKIP) - public Builder results(Optional> results) { - this.results = results; - return this; - } - - public Builder results(List results) { - this.results = Optional.ofNullable(results); - return this; - } - - /** - *

The time that the execution was started.

- */ - @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 time that the exeution finished executing.

- */ - @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; - } - - public GetActionExecutionResponseContent build() { - return new GetActionExecutionResponseContent( - id, triggerId, status, results, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetActionModuleActionsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetActionModuleActionsResponseContent.java deleted file mode 100644 index b336a3441..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetActionModuleActionsResponseContent.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetActionModuleActionsResponseContent.Builder.class) -public final class GetActionModuleActionsResponseContent { - private final Optional> actions; - - private final Optional total; - - private final Optional page; - - private final Optional perPage; - - private final Map additionalProperties; - - private GetActionModuleActionsResponseContent( - Optional> actions, - Optional total, - Optional page, - Optional perPage, - Map additionalProperties) { - this.actions = actions; - this.total = total; - this.page = page; - this.perPage = perPage; - this.additionalProperties = additionalProperties; - } - - /** - * @return A list of action references. - */ - @JsonProperty("actions") - public Optional> getActions() { - return actions; - } - - /** - * @return The total number of actions using this module. - */ - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - /** - * @return The page index of the returned results. - */ - @JsonProperty("page") - public Optional getPage() { - return page; - } - - /** - * @return The number of results requested per page. - */ - @JsonProperty("per_page") - public Optional getPerPage() { - return perPage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetActionModuleActionsResponseContent - && equalTo((GetActionModuleActionsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetActionModuleActionsResponseContent other) { - return actions.equals(other.actions) - && total.equals(other.total) - && page.equals(other.page) - && perPage.equals(other.perPage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.actions, this.total, this.page, this.perPage); - } - - @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> actions = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional page = Optional.empty(); - - private Optional perPage = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetActionModuleActionsResponseContent other) { - actions(other.getActions()); - total(other.getTotal()); - page(other.getPage()); - perPage(other.getPerPage()); - return this; - } - - /** - *

A list of action references.

- */ - @JsonSetter(value = "actions", nulls = Nulls.SKIP) - public Builder actions(Optional> actions) { - this.actions = actions; - return this; - } - - public Builder actions(List actions) { - this.actions = Optional.ofNullable(actions); - return this; - } - - /** - *

The total number of actions using this module.

- */ - @JsonSetter(value = "total", nulls = Nulls.SKIP) - public Builder total(Optional total) { - this.total = total; - return this; - } - - public Builder total(Integer total) { - this.total = Optional.ofNullable(total); - return this; - } - - /** - *

The page index of the returned results.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(Optional page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = Optional.ofNullable(page); - return this; - } - - /** - *

The number of results requested per page.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(Optional perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = Optional.ofNullable(perPage); - return this; - } - - public GetActionModuleActionsResponseContent build() { - return new GetActionModuleActionsResponseContent(actions, total, page, perPage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetActionModuleResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetActionModuleResponseContent.java deleted file mode 100644 index 746d4ef8b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetActionModuleResponseContent.java +++ /dev/null @@ -1,422 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = GetActionModuleResponseContent.Builder.class) -public final class GetActionModuleResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional> secrets; - - private final Optional actionsUsingModuleTotal; - - private final Optional allChangesPublished; - - private final Optional latestVersionNumber; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional latestVersion; - - private final Map additionalProperties; - - private GetActionModuleResponseContent( - Optional id, - Optional name, - Optional code, - Optional> dependencies, - Optional> secrets, - Optional actionsUsingModuleTotal, - Optional allChangesPublished, - Optional latestVersionNumber, - Optional createdAt, - Optional updatedAt, - Optional latestVersion, - Map additionalProperties) { - this.id = id; - this.name = name; - this.code = code; - this.dependencies = dependencies; - this.secrets = secrets; - this.actionsUsingModuleTotal = actionsUsingModuleTotal; - this.allChangesPublished = allChangesPublished; - this.latestVersionNumber = latestVersionNumber; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.latestVersion = latestVersion; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the module. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the module. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The source code from the module's draft version. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The npm dependencies from the module's draft version. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return The secrets from the module's draft version (names and timestamps only, values never returned). - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - /** - * @return The number of deployed actions using this module. - */ - @JsonProperty("actions_using_module_total") - public Optional getActionsUsingModuleTotal() { - return actionsUsingModuleTotal; - } - - /** - * @return Whether all draft changes have been published as a version. - */ - @JsonProperty("all_changes_published") - public Optional getAllChangesPublished() { - return allChangesPublished; - } - - /** - * @return The version number of the latest published version. Omitted if no versions have been published. - */ - @JsonProperty("latest_version_number") - public Optional getLatestVersionNumber() { - return latestVersionNumber; - } - - /** - * @return Timestamp when the module was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return Timestamp when the module was last updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("latest_version") - public Optional getLatestVersion() { - return latestVersion; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetActionModuleResponseContent && equalTo((GetActionModuleResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetActionModuleResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && secrets.equals(other.secrets) - && actionsUsingModuleTotal.equals(other.actionsUsingModuleTotal) - && allChangesPublished.equals(other.allChangesPublished) - && latestVersionNumber.equals(other.latestVersionNumber) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && latestVersion.equals(other.latestVersion); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.code, - this.dependencies, - this.secrets, - this.actionsUsingModuleTotal, - this.allChangesPublished, - this.latestVersionNumber, - this.createdAt, - this.updatedAt, - this.latestVersion); - } - - @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 code = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional actionsUsingModuleTotal = Optional.empty(); - - private Optional allChangesPublished = Optional.empty(); - - private Optional latestVersionNumber = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional latestVersion = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetActionModuleResponseContent other) { - id(other.getId()); - name(other.getName()); - code(other.getCode()); - dependencies(other.getDependencies()); - secrets(other.getSecrets()); - actionsUsingModuleTotal(other.getActionsUsingModuleTotal()); - allChangesPublished(other.getAllChangesPublished()); - latestVersionNumber(other.getLatestVersionNumber()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - latestVersion(other.getLatestVersion()); - return this; - } - - /** - *

The unique ID of the module.

- */ - @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 the module.

- */ - @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 source code from the module's draft version.

- */ - @JsonSetter(value = "code", nulls = Nulls.SKIP) - public Builder code(Optional code) { - this.code = code; - return this; - } - - public Builder code(String code) { - this.code = Optional.ofNullable(code); - return this; - } - - /** - *

The npm dependencies from the module's draft version.

- */ - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public Builder dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - public Builder dependencies(List dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - /** - *

The secrets from the module's draft version (names and timestamps only, values never returned).

- */ - @JsonSetter(value = "secrets", nulls = Nulls.SKIP) - public Builder secrets(Optional> secrets) { - this.secrets = secrets; - return this; - } - - public Builder secrets(List secrets) { - this.secrets = Optional.ofNullable(secrets); - return this; - } - - /** - *

The number of deployed actions using this module.

- */ - @JsonSetter(value = "actions_using_module_total", nulls = Nulls.SKIP) - public Builder actionsUsingModuleTotal(Optional actionsUsingModuleTotal) { - this.actionsUsingModuleTotal = actionsUsingModuleTotal; - return this; - } - - public Builder actionsUsingModuleTotal(Integer actionsUsingModuleTotal) { - this.actionsUsingModuleTotal = Optional.ofNullable(actionsUsingModuleTotal); - return this; - } - - /** - *

Whether all draft changes have been published as a version.

- */ - @JsonSetter(value = "all_changes_published", nulls = Nulls.SKIP) - public Builder allChangesPublished(Optional allChangesPublished) { - this.allChangesPublished = allChangesPublished; - return this; - } - - public Builder allChangesPublished(Boolean allChangesPublished) { - this.allChangesPublished = Optional.ofNullable(allChangesPublished); - return this; - } - - /** - *

The version number of the latest published version. Omitted if no versions have been published.

- */ - @JsonSetter(value = "latest_version_number", nulls = Nulls.SKIP) - public Builder latestVersionNumber(Optional latestVersionNumber) { - this.latestVersionNumber = latestVersionNumber; - return this; - } - - public Builder latestVersionNumber(Integer latestVersionNumber) { - this.latestVersionNumber = Optional.ofNullable(latestVersionNumber); - return this; - } - - /** - *

Timestamp when the module 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; - } - - /** - *

Timestamp when the module 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; - } - - @JsonSetter(value = "latest_version", nulls = Nulls.SKIP) - public Builder latestVersion(Optional latestVersion) { - this.latestVersion = latestVersion; - return this; - } - - public Builder latestVersion(ActionModuleVersionReference latestVersion) { - this.latestVersion = Optional.ofNullable(latestVersion); - return this; - } - - public GetActionModuleResponseContent build() { - return new GetActionModuleResponseContent( - id, - name, - code, - dependencies, - secrets, - actionsUsingModuleTotal, - allChangesPublished, - latestVersionNumber, - createdAt, - updatedAt, - latestVersion, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetActionModuleVersionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetActionModuleVersionResponseContent.java deleted file mode 100644 index 693038097..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetActionModuleVersionResponseContent.java +++ /dev/null @@ -1,288 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = GetActionModuleVersionResponseContent.Builder.class) -public final class GetActionModuleVersionResponseContent { - private final Optional id; - - private final Optional moduleId; - - private final Optional versionNumber; - - private final Optional code; - - private final Optional> secrets; - - private final Optional> dependencies; - - private final Optional createdAt; - - private final Map additionalProperties; - - private GetActionModuleVersionResponseContent( - Optional id, - Optional moduleId, - Optional versionNumber, - Optional code, - Optional> secrets, - Optional> dependencies, - Optional createdAt, - Map additionalProperties) { - this.id = id; - this.moduleId = moduleId; - this.versionNumber = versionNumber; - this.code = code; - this.secrets = secrets; - this.dependencies = dependencies; - this.createdAt = createdAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID for this version. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The ID of the parent module. - */ - @JsonProperty("module_id") - public Optional getModuleId() { - return moduleId; - } - - /** - * @return The sequential version number. - */ - @JsonProperty("version_number") - public Optional getVersionNumber() { - return versionNumber; - } - - /** - * @return The exact source code that was published with this version. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return Secrets available to this version (name and updated_at only, values never returned). - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - /** - * @return Dependencies locked to this version. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return The timestamp when this version was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetActionModuleVersionResponseContent - && equalTo((GetActionModuleVersionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetActionModuleVersionResponseContent other) { - return id.equals(other.id) - && moduleId.equals(other.moduleId) - && versionNumber.equals(other.versionNumber) - && code.equals(other.code) - && secrets.equals(other.secrets) - && dependencies.equals(other.dependencies) - && createdAt.equals(other.createdAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.moduleId, this.versionNumber, this.code, this.secrets, this.dependencies, this.createdAt); - } - - @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 moduleId = Optional.empty(); - - private Optional versionNumber = Optional.empty(); - - private Optional code = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetActionModuleVersionResponseContent other) { - id(other.getId()); - moduleId(other.getModuleId()); - versionNumber(other.getVersionNumber()); - code(other.getCode()); - secrets(other.getSecrets()); - dependencies(other.getDependencies()); - createdAt(other.getCreatedAt()); - return this; - } - - /** - *

The unique ID for this version.

- */ - @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 ID of the parent module.

- */ - @JsonSetter(value = "module_id", nulls = Nulls.SKIP) - public Builder moduleId(Optional moduleId) { - this.moduleId = moduleId; - return this; - } - - public Builder moduleId(String moduleId) { - this.moduleId = Optional.ofNullable(moduleId); - return this; - } - - /** - *

The sequential version number.

- */ - @JsonSetter(value = "version_number", nulls = Nulls.SKIP) - public Builder versionNumber(Optional versionNumber) { - this.versionNumber = versionNumber; - return this; - } - - public Builder versionNumber(Integer versionNumber) { - this.versionNumber = Optional.ofNullable(versionNumber); - return this; - } - - /** - *

The exact source code that was published with this version.

- */ - @JsonSetter(value = "code", nulls = Nulls.SKIP) - public Builder code(Optional code) { - this.code = code; - return this; - } - - public Builder code(String code) { - this.code = Optional.ofNullable(code); - return this; - } - - /** - *

Secrets available to this version (name and updated_at only, values never returned).

- */ - @JsonSetter(value = "secrets", nulls = Nulls.SKIP) - public Builder secrets(Optional> secrets) { - this.secrets = secrets; - return this; - } - - public Builder secrets(List secrets) { - this.secrets = Optional.ofNullable(secrets); - return this; - } - - /** - *

Dependencies locked to this version.

- */ - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public Builder dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - public Builder dependencies(List dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - /** - *

The timestamp when this version 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; - } - - public GetActionModuleVersionResponseContent build() { - return new GetActionModuleVersionResponseContent( - id, moduleId, versionNumber, code, secrets, dependencies, createdAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetActionModuleVersionsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetActionModuleVersionsResponseContent.java deleted file mode 100644 index 0c9be064c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetActionModuleVersionsResponseContent.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetActionModuleVersionsResponseContent.Builder.class) -public final class GetActionModuleVersionsResponseContent { - private final Optional> versions; - - private final Optional total; - - private final Optional page; - - private final Optional perPage; - - private final Map additionalProperties; - - private GetActionModuleVersionsResponseContent( - Optional> versions, - Optional total, - Optional page, - Optional perPage, - Map additionalProperties) { - this.versions = versions; - this.total = total; - this.page = page; - this.perPage = perPage; - this.additionalProperties = additionalProperties; - } - - /** - * @return A list of ActionsModuleVersion objects. - */ - @JsonProperty("versions") - public Optional> getVersions() { - return versions; - } - - /** - * @return The total number of versions for this module. - */ - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - /** - * @return The page index of the returned results. - */ - @JsonProperty("page") - public Optional getPage() { - return page; - } - - /** - * @return The number of results requested per page. - */ - @JsonProperty("per_page") - public Optional getPerPage() { - return perPage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetActionModuleVersionsResponseContent - && equalTo((GetActionModuleVersionsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetActionModuleVersionsResponseContent other) { - return versions.equals(other.versions) - && total.equals(other.total) - && page.equals(other.page) - && perPage.equals(other.perPage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.versions, this.total, this.page, this.perPage); - } - - @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> versions = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional page = Optional.empty(); - - private Optional perPage = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetActionModuleVersionsResponseContent other) { - versions(other.getVersions()); - total(other.getTotal()); - page(other.getPage()); - perPage(other.getPerPage()); - return this; - } - - /** - *

A list of ActionsModuleVersion objects.

- */ - @JsonSetter(value = "versions", nulls = Nulls.SKIP) - public Builder versions(Optional> versions) { - this.versions = versions; - return this; - } - - public Builder versions(List versions) { - this.versions = Optional.ofNullable(versions); - return this; - } - - /** - *

The total number of versions for this module.

- */ - @JsonSetter(value = "total", nulls = Nulls.SKIP) - public Builder total(Optional total) { - this.total = total; - return this; - } - - public Builder total(Integer total) { - this.total = Optional.ofNullable(total); - return this; - } - - /** - *

The page index of the returned results.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(Optional page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = Optional.ofNullable(page); - return this; - } - - /** - *

The number of results requested per page.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(Optional perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = Optional.ofNullable(perPage); - return this; - } - - public GetActionModuleVersionsResponseContent build() { - return new GetActionModuleVersionsResponseContent(versions, total, page, perPage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetActionModulesResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetActionModulesResponseContent.java deleted file mode 100644 index d7b04d4ef..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetActionModulesResponseContent.java +++ /dev/null @@ -1,194 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetActionModulesResponseContent.Builder.class) -public final class GetActionModulesResponseContent { - private final Optional> modules; - - private final Optional total; - - private final Optional page; - - private final Optional perPage; - - private final Map additionalProperties; - - private GetActionModulesResponseContent( - Optional> modules, - Optional total, - Optional page, - Optional perPage, - Map additionalProperties) { - this.modules = modules; - this.total = total; - this.page = page; - this.perPage = perPage; - this.additionalProperties = additionalProperties; - } - - /** - * @return A list of ActionsModule objects. - */ - @JsonProperty("modules") - public Optional> getModules() { - return modules; - } - - /** - * @return The total number of modules in the tenant. - */ - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - /** - * @return The page index of the returned results. - */ - @JsonProperty("page") - public Optional getPage() { - return page; - } - - /** - * @return The number of results requested per page. - */ - @JsonProperty("per_page") - public Optional getPerPage() { - return perPage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetActionModulesResponseContent && equalTo((GetActionModulesResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetActionModulesResponseContent other) { - return modules.equals(other.modules) - && total.equals(other.total) - && page.equals(other.page) - && perPage.equals(other.perPage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.modules, this.total, this.page, this.perPage); - } - - @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> modules = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional page = Optional.empty(); - - private Optional perPage = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetActionModulesResponseContent other) { - modules(other.getModules()); - total(other.getTotal()); - page(other.getPage()); - perPage(other.getPerPage()); - return this; - } - - /** - *

A list of ActionsModule objects.

- */ - @JsonSetter(value = "modules", nulls = Nulls.SKIP) - public Builder modules(Optional> modules) { - this.modules = modules; - return this; - } - - public Builder modules(List modules) { - this.modules = Optional.ofNullable(modules); - return this; - } - - /** - *

The total number of modules in the tenant.

- */ - @JsonSetter(value = "total", nulls = Nulls.SKIP) - public Builder total(Optional total) { - this.total = total; - return this; - } - - public Builder total(Integer total) { - this.total = Optional.ofNullable(total); - return this; - } - - /** - *

The page index of the returned results.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(Optional page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = Optional.ofNullable(page); - return this; - } - - /** - *

The number of results requested per page.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(Optional perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = Optional.ofNullable(perPage); - return this; - } - - public GetActionModulesResponseContent build() { - return new GetActionModulesResponseContent(modules, total, page, perPage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetActionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetActionResponseContent.java deleted file mode 100644 index b2808f546..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetActionResponseContent.java +++ /dev/null @@ -1,602 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = GetActionResponseContent.Builder.class) -public final class GetActionResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional> supportedTriggers; - - private final Optional allChangesDeployed; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional runtime; - - private final Optional> secrets; - - private final Optional deployedVersion; - - private final Optional installedIntegrationId; - - private final Optional integration; - - private final Optional status; - - private final Optional builtAt; - - private final Optional deploy; - - private final Optional> modules; - - private final Map additionalProperties; - - private GetActionResponseContent( - Optional id, - Optional name, - Optional> supportedTriggers, - Optional allChangesDeployed, - Optional createdAt, - Optional updatedAt, - Optional code, - Optional> dependencies, - Optional runtime, - Optional> secrets, - Optional deployedVersion, - Optional installedIntegrationId, - Optional integration, - Optional status, - Optional builtAt, - Optional deploy, - Optional> modules, - Map additionalProperties) { - this.id = id; - this.name = name; - this.supportedTriggers = supportedTriggers; - this.allChangesDeployed = allChangesDeployed; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.code = code; - this.dependencies = dependencies; - this.runtime = runtime; - this.secrets = secrets; - this.deployedVersion = deployedVersion; - this.installedIntegrationId = installedIntegrationId; - this.integration = integration; - this.status = status; - this.builtAt = builtAt; - this.deploy = deploy; - this.modules = modules; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the action. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of an action. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The list of triggers that this action supports. At this time, an action can only target a single trigger at a time. - */ - @JsonProperty("supported_triggers") - public Optional> getSupportedTriggers() { - return supportedTriggers; - } - - /** - * @return True if all of an Action's contents have been deployed. - */ - @JsonProperty("all_changes_deployed") - public Optional getAllChangesDeployed() { - return allChangesDeployed; - } - - /** - * @return The time when this action was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when this action was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return The source code of the action. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The list of third party npm modules, and their versions, that this action depends on. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return The Node runtime. For example: node22, defaults to node22 - */ - @JsonProperty("runtime") - public Optional getRuntime() { - return runtime; - } - - /** - * @return The list of secrets that are included in an action or a version of an action. - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - @JsonProperty("deployed_version") - public Optional getDeployedVersion() { - return deployedVersion; - } - - /** - * @return installed_integration_id is the fk reference to the InstalledIntegration entity. - */ - @JsonProperty("installed_integration_id") - public Optional getInstalledIntegrationId() { - return installedIntegrationId; - } - - @JsonProperty("integration") - public Optional getIntegration() { - return integration; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return The time when this action was built successfully. - */ - @JsonProperty("built_at") - public Optional getBuiltAt() { - return builtAt; - } - - /** - * @return True if the action should be deployed after creation. - */ - @JsonProperty("deploy") - public Optional getDeploy() { - return deploy; - } - - /** - * @return The list of action modules and their versions used by this action. - */ - @JsonProperty("modules") - public Optional> getModules() { - return modules; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetActionResponseContent && equalTo((GetActionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetActionResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && supportedTriggers.equals(other.supportedTriggers) - && allChangesDeployed.equals(other.allChangesDeployed) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && runtime.equals(other.runtime) - && secrets.equals(other.secrets) - && deployedVersion.equals(other.deployedVersion) - && installedIntegrationId.equals(other.installedIntegrationId) - && integration.equals(other.integration) - && status.equals(other.status) - && builtAt.equals(other.builtAt) - && deploy.equals(other.deploy) - && modules.equals(other.modules); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.supportedTriggers, - this.allChangesDeployed, - this.createdAt, - this.updatedAt, - this.code, - this.dependencies, - this.runtime, - this.secrets, - this.deployedVersion, - this.installedIntegrationId, - this.integration, - this.status, - this.builtAt, - this.deploy, - this.modules); - } - - @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> supportedTriggers = Optional.empty(); - - private Optional allChangesDeployed = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional code = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional runtime = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional deployedVersion = Optional.empty(); - - private Optional installedIntegrationId = Optional.empty(); - - private Optional integration = Optional.empty(); - - private Optional status = Optional.empty(); - - private Optional builtAt = Optional.empty(); - - private Optional deploy = Optional.empty(); - - private Optional> modules = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetActionResponseContent other) { - id(other.getId()); - name(other.getName()); - supportedTriggers(other.getSupportedTriggers()); - allChangesDeployed(other.getAllChangesDeployed()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - code(other.getCode()); - dependencies(other.getDependencies()); - runtime(other.getRuntime()); - secrets(other.getSecrets()); - deployedVersion(other.getDeployedVersion()); - installedIntegrationId(other.getInstalledIntegrationId()); - integration(other.getIntegration()); - status(other.getStatus()); - builtAt(other.getBuiltAt()); - deploy(other.getDeploy()); - modules(other.getModules()); - return this; - } - - /** - *

The unique ID of the action.

- */ - @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 an action.

- */ - @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 list of triggers that this action supports. At this time, an action can only target a single trigger at a time.

- */ - @JsonSetter(value = "supported_triggers", nulls = Nulls.SKIP) - public Builder supportedTriggers(Optional> supportedTriggers) { - this.supportedTriggers = supportedTriggers; - return this; - } - - public Builder supportedTriggers(List supportedTriggers) { - this.supportedTriggers = Optional.ofNullable(supportedTriggers); - return this; - } - - /** - *

True if all of an Action's contents have been deployed.

- */ - @JsonSetter(value = "all_changes_deployed", nulls = Nulls.SKIP) - public Builder allChangesDeployed(Optional allChangesDeployed) { - this.allChangesDeployed = allChangesDeployed; - return this; - } - - public Builder allChangesDeployed(Boolean allChangesDeployed) { - this.allChangesDeployed = Optional.ofNullable(allChangesDeployed); - return this; - } - - /** - *

The time when this action 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 time when this action was 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; - } - - /** - *

The source code of the action.

- */ - @JsonSetter(value = "code", nulls = Nulls.SKIP) - public Builder code(Optional code) { - this.code = code; - return this; - } - - public Builder code(String code) { - this.code = Optional.ofNullable(code); - return this; - } - - /** - *

The list of third party npm modules, and their versions, that this action depends on.

- */ - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public Builder dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - public Builder dependencies(List dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - /** - *

The Node runtime. For example: node22, defaults to node22

- */ - @JsonSetter(value = "runtime", nulls = Nulls.SKIP) - public Builder runtime(Optional runtime) { - this.runtime = runtime; - return this; - } - - public Builder runtime(String runtime) { - this.runtime = Optional.ofNullable(runtime); - return this; - } - - /** - *

The list of secrets that are included in an action or a version of an action.

- */ - @JsonSetter(value = "secrets", nulls = Nulls.SKIP) - public Builder secrets(Optional> secrets) { - this.secrets = secrets; - return this; - } - - public Builder secrets(List secrets) { - this.secrets = Optional.ofNullable(secrets); - return this; - } - - @JsonSetter(value = "deployed_version", nulls = Nulls.SKIP) - public Builder deployedVersion(Optional deployedVersion) { - this.deployedVersion = deployedVersion; - return this; - } - - public Builder deployedVersion(ActionDeployedVersion deployedVersion) { - this.deployedVersion = Optional.ofNullable(deployedVersion); - return this; - } - - /** - *

installed_integration_id is the fk reference to the InstalledIntegration entity.

- */ - @JsonSetter(value = "installed_integration_id", nulls = Nulls.SKIP) - public Builder installedIntegrationId(Optional installedIntegrationId) { - this.installedIntegrationId = installedIntegrationId; - return this; - } - - public Builder installedIntegrationId(String installedIntegrationId) { - this.installedIntegrationId = Optional.ofNullable(installedIntegrationId); - return this; - } - - @JsonSetter(value = "integration", nulls = Nulls.SKIP) - public Builder integration(Optional integration) { - this.integration = integration; - return this; - } - - public Builder integration(Integration integration) { - this.integration = Optional.ofNullable(integration); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(ActionBuildStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - /** - *

The time when this action was built successfully.

- */ - @JsonSetter(value = "built_at", nulls = Nulls.SKIP) - public Builder builtAt(Optional builtAt) { - this.builtAt = builtAt; - return this; - } - - public Builder builtAt(OffsetDateTime builtAt) { - this.builtAt = Optional.ofNullable(builtAt); - return this; - } - - /** - *

True if the action should be deployed after creation.

- */ - @JsonSetter(value = "deploy", nulls = Nulls.SKIP) - public Builder deploy(Optional deploy) { - this.deploy = deploy; - return this; - } - - public Builder deploy(Boolean deploy) { - this.deploy = Optional.ofNullable(deploy); - return this; - } - - /** - *

The list of action modules and their versions used by this action.

- */ - @JsonSetter(value = "modules", nulls = Nulls.SKIP) - public Builder modules(Optional> modules) { - this.modules = modules; - return this; - } - - public Builder modules(List modules) { - this.modules = Optional.ofNullable(modules); - return this; - } - - public GetActionResponseContent build() { - return new GetActionResponseContent( - id, - name, - supportedTriggers, - allChangesDeployed, - createdAt, - updatedAt, - code, - dependencies, - runtime, - secrets, - deployedVersion, - installedIntegrationId, - integration, - status, - builtAt, - deploy, - modules, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetActionVersionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetActionVersionResponseContent.java deleted file mode 100644 index b734effce..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetActionVersionResponseContent.java +++ /dev/null @@ -1,576 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = GetActionVersionResponseContent.Builder.class) -public final class GetActionVersionResponseContent { - private final Optional id; - - private final Optional actionId; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional deployed; - - private final Optional runtime; - - private final Optional> secrets; - - private final Optional status; - - private final Optional number; - - private final Optional> errors; - - private final Optional action; - - private final Optional builtAt; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional> supportedTriggers; - - private final Optional> modules; - - private final Map additionalProperties; - - private GetActionVersionResponseContent( - Optional id, - Optional actionId, - Optional code, - Optional> dependencies, - Optional deployed, - Optional runtime, - Optional> secrets, - Optional status, - Optional number, - Optional> errors, - Optional action, - Optional builtAt, - Optional createdAt, - Optional updatedAt, - Optional> supportedTriggers, - Optional> modules, - Map additionalProperties) { - this.id = id; - this.actionId = actionId; - this.code = code; - this.dependencies = dependencies; - this.deployed = deployed; - this.runtime = runtime; - this.secrets = secrets; - this.status = status; - this.number = number; - this.errors = errors; - this.action = action; - this.builtAt = builtAt; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.supportedTriggers = supportedTriggers; - this.modules = modules; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique id of an action version. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The id of the action to which this version belongs. - */ - @JsonProperty("action_id") - public Optional getActionId() { - return actionId; - } - - /** - * @return The source code of this specific version of the action. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The list of third party npm modules, and their versions, that this specific version depends on. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return Indicates if this specific version is the currently one deployed. - */ - @JsonProperty("deployed") - public Optional getDeployed() { - return deployed; - } - - /** - * @return The Node runtime. For example: node22 - */ - @JsonProperty("runtime") - public Optional getRuntime() { - return runtime; - } - - /** - * @return The list of secrets that are included in an action or a version of an action. - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return The index of this version in list of versions for the action. - */ - @JsonProperty("number") - public Optional getNumber() { - return number; - } - - /** - * @return Any errors that occurred while the version was being built. - */ - @JsonProperty("errors") - public Optional> getErrors() { - return errors; - } - - @JsonProperty("action") - public Optional getAction() { - return action; - } - - /** - * @return The time when this version was built successfully. - */ - @JsonProperty("built_at") - public Optional getBuiltAt() { - return builtAt; - } - - /** - * @return The time when this version was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when a version was updated. Versions are never updated externally. Only Auth0 will update an action version as it is being built. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return The list of triggers that this version supports. At this time, a version can only target a single trigger at a time. - */ - @JsonProperty("supported_triggers") - public Optional> getSupportedTriggers() { - return supportedTriggers; - } - - /** - * @return The list of action modules and their versions used by this action version. - */ - @JsonProperty("modules") - public Optional> getModules() { - return modules; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetActionVersionResponseContent && equalTo((GetActionVersionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetActionVersionResponseContent other) { - return id.equals(other.id) - && actionId.equals(other.actionId) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && deployed.equals(other.deployed) - && runtime.equals(other.runtime) - && secrets.equals(other.secrets) - && status.equals(other.status) - && number.equals(other.number) - && errors.equals(other.errors) - && action.equals(other.action) - && builtAt.equals(other.builtAt) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && supportedTriggers.equals(other.supportedTriggers) - && modules.equals(other.modules); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.actionId, - this.code, - this.dependencies, - this.deployed, - this.runtime, - this.secrets, - this.status, - this.number, - this.errors, - this.action, - this.builtAt, - this.createdAt, - this.updatedAt, - this.supportedTriggers, - this.modules); - } - - @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 actionId = Optional.empty(); - - private Optional code = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional deployed = Optional.empty(); - - private Optional runtime = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional status = Optional.empty(); - - private Optional number = Optional.empty(); - - private Optional> errors = Optional.empty(); - - private Optional action = Optional.empty(); - - private Optional builtAt = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional> supportedTriggers = Optional.empty(); - - private Optional> modules = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetActionVersionResponseContent other) { - id(other.getId()); - actionId(other.getActionId()); - code(other.getCode()); - dependencies(other.getDependencies()); - deployed(other.getDeployed()); - runtime(other.getRuntime()); - secrets(other.getSecrets()); - status(other.getStatus()); - number(other.getNumber()); - errors(other.getErrors()); - action(other.getAction()); - builtAt(other.getBuiltAt()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - supportedTriggers(other.getSupportedTriggers()); - modules(other.getModules()); - return this; - } - - /** - *

The unique id of an action version.

- */ - @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 id of the action to which this version belongs.

- */ - @JsonSetter(value = "action_id", nulls = Nulls.SKIP) - public Builder actionId(Optional actionId) { - this.actionId = actionId; - return this; - } - - public Builder actionId(String actionId) { - this.actionId = Optional.ofNullable(actionId); - return this; - } - - /** - *

The source code of this specific version of the action.

- */ - @JsonSetter(value = "code", nulls = Nulls.SKIP) - public Builder code(Optional code) { - this.code = code; - return this; - } - - public Builder code(String code) { - this.code = Optional.ofNullable(code); - return this; - } - - /** - *

The list of third party npm modules, and their versions, that this specific version depends on.

- */ - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public Builder dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - public Builder dependencies(List dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - /** - *

Indicates if this specific version is the currently one deployed.

- */ - @JsonSetter(value = "deployed", nulls = Nulls.SKIP) - public Builder deployed(Optional deployed) { - this.deployed = deployed; - return this; - } - - public Builder deployed(Boolean deployed) { - this.deployed = Optional.ofNullable(deployed); - return this; - } - - /** - *

The Node runtime. For example: node22

- */ - @JsonSetter(value = "runtime", nulls = Nulls.SKIP) - public Builder runtime(Optional runtime) { - this.runtime = runtime; - return this; - } - - public Builder runtime(String runtime) { - this.runtime = Optional.ofNullable(runtime); - return this; - } - - /** - *

The list of secrets that are included in an action or a version of an action.

- */ - @JsonSetter(value = "secrets", nulls = Nulls.SKIP) - public Builder secrets(Optional> secrets) { - this.secrets = secrets; - return this; - } - - public Builder secrets(List secrets) { - this.secrets = Optional.ofNullable(secrets); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(ActionVersionBuildStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - /** - *

The index of this version in list of versions for the action.

- */ - @JsonSetter(value = "number", nulls = Nulls.SKIP) - public Builder number(Optional number) { - this.number = number; - return this; - } - - public Builder number(Double number) { - this.number = Optional.ofNullable(number); - return this; - } - - /** - *

Any errors that occurred while the version was being built.

- */ - @JsonSetter(value = "errors", nulls = Nulls.SKIP) - public Builder errors(Optional> errors) { - this.errors = errors; - return this; - } - - public Builder errors(List errors) { - this.errors = Optional.ofNullable(errors); - return this; - } - - @JsonSetter(value = "action", nulls = Nulls.SKIP) - public Builder action(Optional action) { - this.action = action; - return this; - } - - public Builder action(ActionBase action) { - this.action = Optional.ofNullable(action); - return this; - } - - /** - *

The time when this version was built successfully.

- */ - @JsonSetter(value = "built_at", nulls = Nulls.SKIP) - public Builder builtAt(Optional builtAt) { - this.builtAt = builtAt; - return this; - } - - public Builder builtAt(OffsetDateTime builtAt) { - this.builtAt = Optional.ofNullable(builtAt); - return this; - } - - /** - *

The time when this version 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 time when a version was updated. Versions are never updated externally. Only Auth0 will update an action version as it is being built.

- */ - @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; - } - - /** - *

The list of triggers that this version supports. At this time, a version can only target a single trigger at a time.

- */ - @JsonSetter(value = "supported_triggers", nulls = Nulls.SKIP) - public Builder supportedTriggers(Optional> supportedTriggers) { - this.supportedTriggers = supportedTriggers; - return this; - } - - public Builder supportedTriggers(List supportedTriggers) { - this.supportedTriggers = Optional.ofNullable(supportedTriggers); - return this; - } - - /** - *

The list of action modules and their versions used by this action version.

- */ - @JsonSetter(value = "modules", nulls = Nulls.SKIP) - public Builder modules(Optional> modules) { - this.modules = modules; - return this; - } - - public Builder modules(List modules) { - this.modules = Optional.ofNullable(modules); - return this; - } - - public GetActionVersionResponseContent build() { - return new GetActionVersionResponseContent( - id, - actionId, - code, - dependencies, - deployed, - runtime, - secrets, - status, - number, - errors, - action, - builtAt, - createdAt, - updatedAt, - supportedTriggers, - modules, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetAculResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetAculResponseContent.java deleted file mode 100644 index 9c53ce7a5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetAculResponseContent.java +++ /dev/null @@ -1,438 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetAculResponseContent.Builder.class) -public final class GetAculResponseContent { - private final Optional tenant; - - private final Optional prompt; - - private final Optional screen; - - private final Optional renderingMode; - - private final Optional> contextConfiguration; - - private final OptionalNullable defaultHeadTagsDisabled; - - private final OptionalNullable usePageTemplate; - - private final Optional> headTags; - - private final OptionalNullable filters; - - private final Map additionalProperties; - - private GetAculResponseContent( - Optional tenant, - Optional prompt, - Optional screen, - Optional renderingMode, - Optional> contextConfiguration, - OptionalNullable defaultHeadTagsDisabled, - OptionalNullable usePageTemplate, - Optional> headTags, - OptionalNullable filters, - Map additionalProperties) { - this.tenant = tenant; - this.prompt = prompt; - this.screen = screen; - this.renderingMode = renderingMode; - this.contextConfiguration = contextConfiguration; - this.defaultHeadTagsDisabled = defaultHeadTagsDisabled; - this.usePageTemplate = usePageTemplate; - this.headTags = headTags; - this.filters = filters; - this.additionalProperties = additionalProperties; - } - - /** - * @return Tenant ID - */ - @JsonProperty("tenant") - public Optional getTenant() { - return tenant; - } - - /** - * @return Name of the prompt - */ - @JsonProperty("prompt") - public Optional getPrompt() { - return prompt; - } - - /** - * @return Name of the screen - */ - @JsonProperty("screen") - public Optional getScreen() { - return screen; - } - - @JsonProperty("rendering_mode") - public Optional getRenderingMode() { - return renderingMode; - } - - @JsonProperty("context_configuration") - public Optional> getContextConfiguration() { - return contextConfiguration; - } - - /** - * @return Override Universal Login default head tags - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("default_head_tags_disabled") - public OptionalNullable getDefaultHeadTagsDisabled() { - if (defaultHeadTagsDisabled == null) { - return OptionalNullable.absent(); - } - return defaultHeadTagsDisabled; - } - - /** - * @return Use page template with ACUL - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("use_page_template") - public OptionalNullable getUsePageTemplate() { - if (usePageTemplate == null) { - return OptionalNullable.absent(); - } - return usePageTemplate; - } - - /** - * @return An array of head tags - */ - @JsonProperty("head_tags") - public Optional> getHeadTags() { - return headTags; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("filters") - public OptionalNullable getFilters() { - if (filters == null) { - return OptionalNullable.absent(); - } - return filters; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("default_head_tags_disabled") - private OptionalNullable _getDefaultHeadTagsDisabled() { - return defaultHeadTagsDisabled; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("use_page_template") - private OptionalNullable _getUsePageTemplate() { - return usePageTemplate; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("filters") - private OptionalNullable _getFilters() { - return filters; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetAculResponseContent && equalTo((GetAculResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetAculResponseContent other) { - return tenant.equals(other.tenant) - && prompt.equals(other.prompt) - && screen.equals(other.screen) - && renderingMode.equals(other.renderingMode) - && contextConfiguration.equals(other.contextConfiguration) - && defaultHeadTagsDisabled.equals(other.defaultHeadTagsDisabled) - && usePageTemplate.equals(other.usePageTemplate) - && headTags.equals(other.headTags) - && filters.equals(other.filters); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.tenant, - this.prompt, - this.screen, - this.renderingMode, - this.contextConfiguration, - this.defaultHeadTagsDisabled, - this.usePageTemplate, - this.headTags, - this.filters); - } - - @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 tenant = Optional.empty(); - - private Optional prompt = Optional.empty(); - - private Optional screen = Optional.empty(); - - private Optional renderingMode = Optional.empty(); - - private Optional> contextConfiguration = Optional.empty(); - - private OptionalNullable defaultHeadTagsDisabled = OptionalNullable.absent(); - - private OptionalNullable usePageTemplate = OptionalNullable.absent(); - - private Optional> headTags = Optional.empty(); - - private OptionalNullable filters = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetAculResponseContent other) { - tenant(other.getTenant()); - prompt(other.getPrompt()); - screen(other.getScreen()); - renderingMode(other.getRenderingMode()); - contextConfiguration(other.getContextConfiguration()); - defaultHeadTagsDisabled(other.getDefaultHeadTagsDisabled()); - usePageTemplate(other.getUsePageTemplate()); - headTags(other.getHeadTags()); - filters(other.getFilters()); - return this; - } - - /** - *

Tenant ID

- */ - @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 the prompt

- */ - @JsonSetter(value = "prompt", nulls = Nulls.SKIP) - public Builder prompt(Optional prompt) { - this.prompt = prompt; - return this; - } - - public Builder prompt(String prompt) { - this.prompt = Optional.ofNullable(prompt); - return this; - } - - /** - *

Name of the screen

- */ - @JsonSetter(value = "screen", nulls = Nulls.SKIP) - public Builder screen(Optional screen) { - this.screen = screen; - return this; - } - - public Builder screen(String screen) { - this.screen = Optional.ofNullable(screen); - return this; - } - - @JsonSetter(value = "rendering_mode", nulls = Nulls.SKIP) - public Builder renderingMode(Optional renderingMode) { - this.renderingMode = renderingMode; - return this; - } - - public Builder renderingMode(AculRenderingModeEnum renderingMode) { - this.renderingMode = Optional.ofNullable(renderingMode); - return this; - } - - @JsonSetter(value = "context_configuration", nulls = Nulls.SKIP) - public Builder contextConfiguration(Optional> contextConfiguration) { - this.contextConfiguration = contextConfiguration; - return this; - } - - public Builder contextConfiguration(List contextConfiguration) { - this.contextConfiguration = Optional.ofNullable(contextConfiguration); - return this; - } - - /** - *

Override Universal Login default head tags

- */ - @JsonSetter(value = "default_head_tags_disabled", nulls = Nulls.SKIP) - public Builder defaultHeadTagsDisabled(@Nullable OptionalNullable defaultHeadTagsDisabled) { - this.defaultHeadTagsDisabled = defaultHeadTagsDisabled; - return this; - } - - public Builder defaultHeadTagsDisabled(Boolean defaultHeadTagsDisabled) { - this.defaultHeadTagsDisabled = OptionalNullable.of(defaultHeadTagsDisabled); - return this; - } - - public Builder defaultHeadTagsDisabled(Optional defaultHeadTagsDisabled) { - if (defaultHeadTagsDisabled.isPresent()) { - this.defaultHeadTagsDisabled = OptionalNullable.of(defaultHeadTagsDisabled.get()); - } else { - this.defaultHeadTagsDisabled = OptionalNullable.absent(); - } - return this; - } - - public Builder defaultHeadTagsDisabled(com.auth0.client.mgmt.core.Nullable defaultHeadTagsDisabled) { - if (defaultHeadTagsDisabled.isNull()) { - this.defaultHeadTagsDisabled = OptionalNullable.ofNull(); - } else if (defaultHeadTagsDisabled.isEmpty()) { - this.defaultHeadTagsDisabled = OptionalNullable.absent(); - } else { - this.defaultHeadTagsDisabled = OptionalNullable.of(defaultHeadTagsDisabled.get()); - } - return this; - } - - /** - *

Use page template with ACUL

- */ - @JsonSetter(value = "use_page_template", nulls = Nulls.SKIP) - public Builder usePageTemplate(@Nullable OptionalNullable usePageTemplate) { - this.usePageTemplate = usePageTemplate; - return this; - } - - public Builder usePageTemplate(Boolean usePageTemplate) { - this.usePageTemplate = OptionalNullable.of(usePageTemplate); - return this; - } - - public Builder usePageTemplate(Optional usePageTemplate) { - if (usePageTemplate.isPresent()) { - this.usePageTemplate = OptionalNullable.of(usePageTemplate.get()); - } else { - this.usePageTemplate = OptionalNullable.absent(); - } - return this; - } - - public Builder usePageTemplate(com.auth0.client.mgmt.core.Nullable usePageTemplate) { - if (usePageTemplate.isNull()) { - this.usePageTemplate = OptionalNullable.ofNull(); - } else if (usePageTemplate.isEmpty()) { - this.usePageTemplate = OptionalNullable.absent(); - } else { - this.usePageTemplate = OptionalNullable.of(usePageTemplate.get()); - } - return this; - } - - /** - *

An array of head tags

- */ - @JsonSetter(value = "head_tags", nulls = Nulls.SKIP) - public Builder headTags(Optional> headTags) { - this.headTags = headTags; - return this; - } - - public Builder headTags(List headTags) { - this.headTags = Optional.ofNullable(headTags); - return this; - } - - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public Builder filters(@Nullable OptionalNullable filters) { - this.filters = filters; - return this; - } - - public Builder filters(AculFilters filters) { - this.filters = OptionalNullable.of(filters); - return this; - } - - public Builder filters(Optional filters) { - if (filters.isPresent()) { - this.filters = OptionalNullable.of(filters.get()); - } else { - this.filters = OptionalNullable.absent(); - } - return this; - } - - public Builder filters(com.auth0.client.mgmt.core.Nullable filters) { - if (filters.isNull()) { - this.filters = OptionalNullable.ofNull(); - } else if (filters.isEmpty()) { - this.filters = OptionalNullable.absent(); - } else { - this.filters = OptionalNullable.of(filters.get()); - } - return this; - } - - public GetAculResponseContent build() { - return new GetAculResponseContent( - tenant, - prompt, - screen, - renderingMode, - contextConfiguration, - defaultHeadTagsDisabled, - usePageTemplate, - headTags, - filters, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetAttackProtectionCaptchaResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetAttackProtectionCaptchaResponseContent.java deleted file mode 100644 index 06ae4b92b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetAttackProtectionCaptchaResponseContent.java +++ /dev/null @@ -1,287 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetAttackProtectionCaptchaResponseContent.Builder.class) -public final class GetAttackProtectionCaptchaResponseContent { - private final Optional activeProviderId; - - private final Optional arkose; - - private final Optional authChallenge; - - private final Optional hcaptcha; - - private final Optional friendlyCaptcha; - - private final Optional recaptchaEnterprise; - - private final Optional recaptchaV2; - - private final Optional> simpleCaptcha; - - private final Map additionalProperties; - - private GetAttackProtectionCaptchaResponseContent( - Optional activeProviderId, - Optional arkose, - Optional authChallenge, - Optional hcaptcha, - Optional friendlyCaptcha, - Optional recaptchaEnterprise, - Optional recaptchaV2, - Optional> simpleCaptcha, - Map additionalProperties) { - this.activeProviderId = activeProviderId; - this.arkose = arkose; - this.authChallenge = authChallenge; - this.hcaptcha = hcaptcha; - this.friendlyCaptcha = friendlyCaptcha; - this.recaptchaEnterprise = recaptchaEnterprise; - this.recaptchaV2 = recaptchaV2; - this.simpleCaptcha = simpleCaptcha; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("active_provider_id") - public Optional getActiveProviderId() { - return activeProviderId; - } - - @JsonProperty("arkose") - public Optional getArkose() { - return arkose; - } - - @JsonProperty("auth_challenge") - public Optional getAuthChallenge() { - return authChallenge; - } - - @JsonProperty("hcaptcha") - public Optional getHcaptcha() { - return hcaptcha; - } - - @JsonProperty("friendly_captcha") - public Optional getFriendlyCaptcha() { - return friendlyCaptcha; - } - - @JsonProperty("recaptcha_enterprise") - public Optional getRecaptchaEnterprise() { - return recaptchaEnterprise; - } - - @JsonProperty("recaptcha_v2") - public Optional getRecaptchaV2() { - return recaptchaV2; - } - - @JsonProperty("simple_captcha") - public Optional> getSimpleCaptcha() { - return simpleCaptcha; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetAttackProtectionCaptchaResponseContent - && equalTo((GetAttackProtectionCaptchaResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetAttackProtectionCaptchaResponseContent other) { - return activeProviderId.equals(other.activeProviderId) - && arkose.equals(other.arkose) - && authChallenge.equals(other.authChallenge) - && hcaptcha.equals(other.hcaptcha) - && friendlyCaptcha.equals(other.friendlyCaptcha) - && recaptchaEnterprise.equals(other.recaptchaEnterprise) - && recaptchaV2.equals(other.recaptchaV2) - && simpleCaptcha.equals(other.simpleCaptcha); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.activeProviderId, - this.arkose, - this.authChallenge, - this.hcaptcha, - this.friendlyCaptcha, - this.recaptchaEnterprise, - this.recaptchaV2, - this.simpleCaptcha); - } - - @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 activeProviderId = Optional.empty(); - - private Optional arkose = Optional.empty(); - - private Optional authChallenge = Optional.empty(); - - private Optional hcaptcha = Optional.empty(); - - private Optional friendlyCaptcha = Optional.empty(); - - private Optional recaptchaEnterprise = - Optional.empty(); - - private Optional recaptchaV2 = Optional.empty(); - - private Optional> simpleCaptcha = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetAttackProtectionCaptchaResponseContent other) { - activeProviderId(other.getActiveProviderId()); - arkose(other.getArkose()); - authChallenge(other.getAuthChallenge()); - hcaptcha(other.getHcaptcha()); - friendlyCaptcha(other.getFriendlyCaptcha()); - recaptchaEnterprise(other.getRecaptchaEnterprise()); - recaptchaV2(other.getRecaptchaV2()); - simpleCaptcha(other.getSimpleCaptcha()); - return this; - } - - @JsonSetter(value = "active_provider_id", nulls = Nulls.SKIP) - public Builder activeProviderId(Optional activeProviderId) { - this.activeProviderId = activeProviderId; - return this; - } - - public Builder activeProviderId(String activeProviderId) { - this.activeProviderId = Optional.ofNullable(activeProviderId); - return this; - } - - @JsonSetter(value = "arkose", nulls = Nulls.SKIP) - public Builder arkose(Optional arkose) { - this.arkose = arkose; - return this; - } - - public Builder arkose(AttackProtectionCaptchaArkoseResponseContent arkose) { - this.arkose = Optional.ofNullable(arkose); - return this; - } - - @JsonSetter(value = "auth_challenge", nulls = Nulls.SKIP) - public Builder authChallenge(Optional authChallenge) { - this.authChallenge = authChallenge; - return this; - } - - public Builder authChallenge(AttackProtectionCaptchaAuthChallengeResponseContent authChallenge) { - this.authChallenge = Optional.ofNullable(authChallenge); - return this; - } - - @JsonSetter(value = "hcaptcha", nulls = Nulls.SKIP) - public Builder hcaptcha(Optional hcaptcha) { - this.hcaptcha = hcaptcha; - return this; - } - - public Builder hcaptcha(AttackProtectionCaptchaHcaptchaResponseContent hcaptcha) { - this.hcaptcha = Optional.ofNullable(hcaptcha); - return this; - } - - @JsonSetter(value = "friendly_captcha", nulls = Nulls.SKIP) - public Builder friendlyCaptcha( - Optional friendlyCaptcha) { - this.friendlyCaptcha = friendlyCaptcha; - return this; - } - - public Builder friendlyCaptcha(AttackProtectionCaptchaFriendlyCaptchaResponseContent friendlyCaptcha) { - this.friendlyCaptcha = Optional.ofNullable(friendlyCaptcha); - return this; - } - - @JsonSetter(value = "recaptcha_enterprise", nulls = Nulls.SKIP) - public Builder recaptchaEnterprise( - Optional recaptchaEnterprise) { - this.recaptchaEnterprise = recaptchaEnterprise; - return this; - } - - public Builder recaptchaEnterprise( - AttackProtectionCaptchaRecaptchaEnterpriseResponseContent recaptchaEnterprise) { - this.recaptchaEnterprise = Optional.ofNullable(recaptchaEnterprise); - return this; - } - - @JsonSetter(value = "recaptcha_v2", nulls = Nulls.SKIP) - public Builder recaptchaV2(Optional recaptchaV2) { - this.recaptchaV2 = recaptchaV2; - return this; - } - - public Builder recaptchaV2(AttackProtectionCaptchaRecaptchaV2ResponseContent recaptchaV2) { - this.recaptchaV2 = Optional.ofNullable(recaptchaV2); - return this; - } - - @JsonSetter(value = "simple_captcha", nulls = Nulls.SKIP) - public Builder simpleCaptcha(Optional> simpleCaptcha) { - this.simpleCaptcha = simpleCaptcha; - return this; - } - - public Builder simpleCaptcha(Map simpleCaptcha) { - this.simpleCaptcha = Optional.ofNullable(simpleCaptcha); - return this; - } - - public GetAttackProtectionCaptchaResponseContent build() { - return new GetAttackProtectionCaptchaResponseContent( - activeProviderId, - arkose, - authChallenge, - hcaptcha, - friendlyCaptcha, - recaptchaEnterprise, - recaptchaV2, - simpleCaptcha, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetBotDetectionSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetBotDetectionSettingsResponseContent.java deleted file mode 100644 index d5eb50df4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetBotDetectionSettingsResponseContent.java +++ /dev/null @@ -1,275 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = GetBotDetectionSettingsResponseContent.Builder.class) -public final class GetBotDetectionSettingsResponseContent { - private final BotDetectionLevelEnum botDetectionLevel; - - private final BotDetectionChallengePolicyPasswordFlowEnum challengePasswordPolicy; - - private final BotDetectionChallengePolicyPasswordlessFlowEnum challengePasswordlessPolicy; - - private final BotDetectionChallengePolicyPasswordResetFlowEnum challengePasswordResetPolicy; - - private final List allowlist; - - private final boolean monitoringModeEnabled; - - private final Map additionalProperties; - - private GetBotDetectionSettingsResponseContent( - BotDetectionLevelEnum botDetectionLevel, - BotDetectionChallengePolicyPasswordFlowEnum challengePasswordPolicy, - BotDetectionChallengePolicyPasswordlessFlowEnum challengePasswordlessPolicy, - BotDetectionChallengePolicyPasswordResetFlowEnum challengePasswordResetPolicy, - List allowlist, - boolean monitoringModeEnabled, - Map additionalProperties) { - this.botDetectionLevel = botDetectionLevel; - this.challengePasswordPolicy = challengePasswordPolicy; - this.challengePasswordlessPolicy = challengePasswordlessPolicy; - this.challengePasswordResetPolicy = challengePasswordResetPolicy; - this.allowlist = allowlist; - this.monitoringModeEnabled = monitoringModeEnabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("bot_detection_level") - public BotDetectionLevelEnum getBotDetectionLevel() { - return botDetectionLevel; - } - - @JsonProperty("challenge_password_policy") - public BotDetectionChallengePolicyPasswordFlowEnum getChallengePasswordPolicy() { - return challengePasswordPolicy; - } - - @JsonProperty("challenge_passwordless_policy") - public BotDetectionChallengePolicyPasswordlessFlowEnum getChallengePasswordlessPolicy() { - return challengePasswordlessPolicy; - } - - @JsonProperty("challenge_password_reset_policy") - public BotDetectionChallengePolicyPasswordResetFlowEnum getChallengePasswordResetPolicy() { - return challengePasswordResetPolicy; - } - - @JsonProperty("allowlist") - public List getAllowlist() { - return allowlist; - } - - @JsonProperty("monitoring_mode_enabled") - public boolean getMonitoringModeEnabled() { - return monitoringModeEnabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetBotDetectionSettingsResponseContent - && equalTo((GetBotDetectionSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetBotDetectionSettingsResponseContent other) { - return botDetectionLevel.equals(other.botDetectionLevel) - && challengePasswordPolicy.equals(other.challengePasswordPolicy) - && challengePasswordlessPolicy.equals(other.challengePasswordlessPolicy) - && challengePasswordResetPolicy.equals(other.challengePasswordResetPolicy) - && allowlist.equals(other.allowlist) - && monitoringModeEnabled == other.monitoringModeEnabled; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.botDetectionLevel, - this.challengePasswordPolicy, - this.challengePasswordlessPolicy, - this.challengePasswordResetPolicy, - this.allowlist, - this.monitoringModeEnabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BotDetectionLevelStage builder() { - return new Builder(); - } - - public interface BotDetectionLevelStage { - ChallengePasswordPolicyStage botDetectionLevel(@NotNull BotDetectionLevelEnum botDetectionLevel); - - Builder from(GetBotDetectionSettingsResponseContent other); - } - - public interface ChallengePasswordPolicyStage { - ChallengePasswordlessPolicyStage challengePasswordPolicy( - @NotNull BotDetectionChallengePolicyPasswordFlowEnum challengePasswordPolicy); - } - - public interface ChallengePasswordlessPolicyStage { - ChallengePasswordResetPolicyStage challengePasswordlessPolicy( - @NotNull BotDetectionChallengePolicyPasswordlessFlowEnum challengePasswordlessPolicy); - } - - public interface ChallengePasswordResetPolicyStage { - MonitoringModeEnabledStage challengePasswordResetPolicy( - @NotNull BotDetectionChallengePolicyPasswordResetFlowEnum challengePasswordResetPolicy); - } - - public interface MonitoringModeEnabledStage { - _FinalStage monitoringModeEnabled(boolean monitoringModeEnabled); - } - - public interface _FinalStage { - GetBotDetectionSettingsResponseContent build(); - - _FinalStage allowlist(List allowlist); - - _FinalStage addAllowlist(String allowlist); - - _FinalStage addAllAllowlist(List allowlist); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements BotDetectionLevelStage, - ChallengePasswordPolicyStage, - ChallengePasswordlessPolicyStage, - ChallengePasswordResetPolicyStage, - MonitoringModeEnabledStage, - _FinalStage { - private BotDetectionLevelEnum botDetectionLevel; - - private BotDetectionChallengePolicyPasswordFlowEnum challengePasswordPolicy; - - private BotDetectionChallengePolicyPasswordlessFlowEnum challengePasswordlessPolicy; - - private BotDetectionChallengePolicyPasswordResetFlowEnum challengePasswordResetPolicy; - - private boolean monitoringModeEnabled; - - private List allowlist = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetBotDetectionSettingsResponseContent other) { - botDetectionLevel(other.getBotDetectionLevel()); - challengePasswordPolicy(other.getChallengePasswordPolicy()); - challengePasswordlessPolicy(other.getChallengePasswordlessPolicy()); - challengePasswordResetPolicy(other.getChallengePasswordResetPolicy()); - allowlist(other.getAllowlist()); - monitoringModeEnabled(other.getMonitoringModeEnabled()); - return this; - } - - @java.lang.Override - @JsonSetter("bot_detection_level") - public ChallengePasswordPolicyStage botDetectionLevel(@NotNull BotDetectionLevelEnum botDetectionLevel) { - this.botDetectionLevel = Objects.requireNonNull(botDetectionLevel, "botDetectionLevel must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("challenge_password_policy") - public ChallengePasswordlessPolicyStage challengePasswordPolicy( - @NotNull BotDetectionChallengePolicyPasswordFlowEnum challengePasswordPolicy) { - this.challengePasswordPolicy = - Objects.requireNonNull(challengePasswordPolicy, "challengePasswordPolicy must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("challenge_passwordless_policy") - public ChallengePasswordResetPolicyStage challengePasswordlessPolicy( - @NotNull BotDetectionChallengePolicyPasswordlessFlowEnum challengePasswordlessPolicy) { - this.challengePasswordlessPolicy = - Objects.requireNonNull(challengePasswordlessPolicy, "challengePasswordlessPolicy must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("challenge_password_reset_policy") - public MonitoringModeEnabledStage challengePasswordResetPolicy( - @NotNull BotDetectionChallengePolicyPasswordResetFlowEnum challengePasswordResetPolicy) { - this.challengePasswordResetPolicy = Objects.requireNonNull( - challengePasswordResetPolicy, "challengePasswordResetPolicy must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("monitoring_mode_enabled") - public _FinalStage monitoringModeEnabled(boolean monitoringModeEnabled) { - this.monitoringModeEnabled = monitoringModeEnabled; - return this; - } - - @java.lang.Override - public _FinalStage addAllAllowlist(List allowlist) { - if (allowlist != null) { - this.allowlist.addAll(allowlist); - } - return this; - } - - @java.lang.Override - public _FinalStage addAllowlist(String allowlist) { - this.allowlist.add(allowlist); - return this; - } - - @java.lang.Override - @JsonSetter(value = "allowlist", nulls = Nulls.SKIP) - public _FinalStage allowlist(List allowlist) { - this.allowlist.clear(); - if (allowlist != null) { - this.allowlist.addAll(allowlist); - } - return this; - } - - @java.lang.Override - public GetBotDetectionSettingsResponseContent build() { - return new GetBotDetectionSettingsResponseContent( - botDetectionLevel, - challengePasswordPolicy, - challengePasswordlessPolicy, - challengePasswordResetPolicy, - allowlist, - monitoringModeEnabled, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetBrandingDefaultThemeResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetBrandingDefaultThemeResponseContent.java deleted file mode 100644 index 3309725f6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetBrandingDefaultThemeResponseContent.java +++ /dev/null @@ -1,287 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = GetBrandingDefaultThemeResponseContent.Builder.class) -public final class GetBrandingDefaultThemeResponseContent { - private final BrandingThemeBorders borders; - - private final BrandingThemeColors colors; - - private final String displayName; - - private final BrandingThemeFonts fonts; - - private final BrandingThemePageBackground pageBackground; - - private final String themeId; - - private final BrandingThemeWidget widget; - - private final Map additionalProperties; - - private GetBrandingDefaultThemeResponseContent( - BrandingThemeBorders borders, - BrandingThemeColors colors, - String displayName, - BrandingThemeFonts fonts, - BrandingThemePageBackground pageBackground, - String themeId, - BrandingThemeWidget widget, - Map additionalProperties) { - this.borders = borders; - this.colors = colors; - this.displayName = displayName; - this.fonts = fonts; - this.pageBackground = pageBackground; - this.themeId = themeId; - this.widget = widget; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("borders") - public BrandingThemeBorders getBorders() { - return borders; - } - - @JsonProperty("colors") - public BrandingThemeColors getColors() { - return colors; - } - - /** - * @return Display Name - */ - @JsonProperty("displayName") - public String getDisplayName() { - return displayName; - } - - @JsonProperty("fonts") - public BrandingThemeFonts getFonts() { - return fonts; - } - - @JsonProperty("page_background") - public BrandingThemePageBackground getPageBackground() { - return pageBackground; - } - - /** - * @return Theme Id - */ - @JsonProperty("themeId") - public String getThemeId() { - return themeId; - } - - @JsonProperty("widget") - public BrandingThemeWidget getWidget() { - return widget; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetBrandingDefaultThemeResponseContent - && equalTo((GetBrandingDefaultThemeResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetBrandingDefaultThemeResponseContent other) { - return borders.equals(other.borders) - && colors.equals(other.colors) - && displayName.equals(other.displayName) - && fonts.equals(other.fonts) - && pageBackground.equals(other.pageBackground) - && themeId.equals(other.themeId) - && widget.equals(other.widget); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.borders, - this.colors, - this.displayName, - this.fonts, - this.pageBackground, - this.themeId, - this.widget); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BordersStage builder() { - return new Builder(); - } - - public interface BordersStage { - ColorsStage borders(@NotNull BrandingThemeBorders borders); - - Builder from(GetBrandingDefaultThemeResponseContent other); - } - - public interface ColorsStage { - DisplayNameStage colors(@NotNull BrandingThemeColors colors); - } - - public interface DisplayNameStage { - /** - *

Display Name

- */ - FontsStage displayName(@NotNull String displayName); - } - - public interface FontsStage { - PageBackgroundStage fonts(@NotNull BrandingThemeFonts fonts); - } - - public interface PageBackgroundStage { - ThemeIdStage pageBackground(@NotNull BrandingThemePageBackground pageBackground); - } - - public interface ThemeIdStage { - /** - *

Theme Id

- */ - WidgetStage themeId(@NotNull String themeId); - } - - public interface WidgetStage { - _FinalStage widget(@NotNull BrandingThemeWidget widget); - } - - public interface _FinalStage { - GetBrandingDefaultThemeResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements BordersStage, - ColorsStage, - DisplayNameStage, - FontsStage, - PageBackgroundStage, - ThemeIdStage, - WidgetStage, - _FinalStage { - private BrandingThemeBorders borders; - - private BrandingThemeColors colors; - - private String displayName; - - private BrandingThemeFonts fonts; - - private BrandingThemePageBackground pageBackground; - - private String themeId; - - private BrandingThemeWidget widget; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetBrandingDefaultThemeResponseContent other) { - borders(other.getBorders()); - colors(other.getColors()); - displayName(other.getDisplayName()); - fonts(other.getFonts()); - pageBackground(other.getPageBackground()); - themeId(other.getThemeId()); - widget(other.getWidget()); - return this; - } - - @java.lang.Override - @JsonSetter("borders") - public ColorsStage borders(@NotNull BrandingThemeBorders borders) { - this.borders = Objects.requireNonNull(borders, "borders must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("colors") - public DisplayNameStage colors(@NotNull BrandingThemeColors colors) { - this.colors = Objects.requireNonNull(colors, "colors must not be null"); - return this; - } - - /** - *

Display Name

- *

Display Name

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("displayName") - public FontsStage displayName(@NotNull String displayName) { - this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("fonts") - public PageBackgroundStage fonts(@NotNull BrandingThemeFonts fonts) { - this.fonts = Objects.requireNonNull(fonts, "fonts must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("page_background") - public ThemeIdStage pageBackground(@NotNull BrandingThemePageBackground pageBackground) { - this.pageBackground = Objects.requireNonNull(pageBackground, "pageBackground must not be null"); - return this; - } - - /** - *

Theme Id

- *

Theme Id

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("themeId") - public WidgetStage themeId(@NotNull String themeId) { - this.themeId = Objects.requireNonNull(themeId, "themeId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("widget") - public _FinalStage widget(@NotNull BrandingThemeWidget widget) { - this.widget = Objects.requireNonNull(widget, "widget must not be null"); - return this; - } - - @java.lang.Override - public GetBrandingDefaultThemeResponseContent build() { - return new GetBrandingDefaultThemeResponseContent( - borders, colors, displayName, fonts, pageBackground, themeId, widget, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetBrandingPhoneProviderResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetBrandingPhoneProviderResponseContent.java deleted file mode 100644 index 117d4c670..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetBrandingPhoneProviderResponseContent.java +++ /dev/null @@ -1,379 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = GetBrandingPhoneProviderResponseContent.Builder.class) -public final class GetBrandingPhoneProviderResponseContent { - private final Optional id; - - private final Optional tenant; - - private final PhoneProviderNameEnum name; - - private final Optional channel; - - private final Optional disabled; - - private final Optional configuration; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private GetBrandingPhoneProviderResponseContent( - Optional id, - Optional tenant, - PhoneProviderNameEnum name, - Optional channel, - Optional disabled, - Optional configuration, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.tenant = tenant; - this.name = name; - this.channel = channel; - this.disabled = disabled; - this.configuration = configuration; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the tenant - */ - @JsonProperty("tenant") - public Optional getTenant() { - return tenant; - } - - @JsonProperty("name") - public PhoneProviderNameEnum getName() { - return name; - } - - @JsonProperty("channel") - public Optional getChannel() { - return channel; - } - - /** - * @return Whether the provider is enabled (false) or disabled (true). - */ - @JsonProperty("disabled") - public Optional getDisabled() { - return disabled; - } - - @JsonProperty("configuration") - public Optional getConfiguration() { - return configuration; - } - - /** - * @return The provider's creation date and time in ISO 8601 format - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The date and time of the last update to the provider in ISO 8601 format - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetBrandingPhoneProviderResponseContent - && equalTo((GetBrandingPhoneProviderResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetBrandingPhoneProviderResponseContent other) { - return id.equals(other.id) - && tenant.equals(other.tenant) - && name.equals(other.name) - && channel.equals(other.channel) - && disabled.equals(other.disabled) - && configuration.equals(other.configuration) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.tenant, - this.name, - this.channel, - this.disabled, - this.configuration, - this.createdAt, - this.updatedAt); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - _FinalStage name(@NotNull PhoneProviderNameEnum name); - - Builder from(GetBrandingPhoneProviderResponseContent other); - } - - public interface _FinalStage { - GetBrandingPhoneProviderResponseContent build(); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - /** - *

The name of the tenant

- */ - _FinalStage tenant(Optional tenant); - - _FinalStage tenant(String tenant); - - _FinalStage channel(Optional channel); - - _FinalStage channel(PhoneProviderChannelEnum channel); - - /** - *

Whether the provider is enabled (false) or disabled (true).

- */ - _FinalStage disabled(Optional disabled); - - _FinalStage disabled(Boolean disabled); - - _FinalStage configuration(Optional configuration); - - _FinalStage configuration(PhoneProviderConfiguration configuration); - - /** - *

The provider's creation date and time in ISO 8601 format

- */ - _FinalStage createdAt(Optional createdAt); - - _FinalStage createdAt(OffsetDateTime createdAt); - - /** - *

The date and time of the last update to the provider in ISO 8601 format

- */ - _FinalStage updatedAt(Optional updatedAt); - - _FinalStage updatedAt(OffsetDateTime updatedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private PhoneProviderNameEnum name; - - private Optional updatedAt = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional configuration = Optional.empty(); - - private Optional disabled = Optional.empty(); - - private Optional channel = Optional.empty(); - - private Optional tenant = Optional.empty(); - - private Optional id = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetBrandingPhoneProviderResponseContent other) { - id(other.getId()); - tenant(other.getTenant()); - name(other.getName()); - channel(other.getChannel()); - disabled(other.getDisabled()); - configuration(other.getConfiguration()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public _FinalStage name(@NotNull PhoneProviderNameEnum name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - /** - *

The date and time of the last update to the provider in ISO 8601 format

- * @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; - } - - /** - *

The date and time of the last update to the provider in ISO 8601 format

- */ - @java.lang.Override - @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public _FinalStage updatedAt(Optional updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - *

The provider's creation date and time in ISO 8601 format

- * @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; - } - - /** - *

The provider's creation date and time in ISO 8601 format

- */ - @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 configuration(PhoneProviderConfiguration configuration) { - this.configuration = Optional.ofNullable(configuration); - return this; - } - - @java.lang.Override - @JsonSetter(value = "configuration", nulls = Nulls.SKIP) - public _FinalStage configuration(Optional configuration) { - this.configuration = configuration; - return this; - } - - /** - *

Whether the provider is enabled (false) or disabled (true).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage disabled(Boolean disabled) { - this.disabled = Optional.ofNullable(disabled); - return this; - } - - /** - *

Whether the provider is enabled (false) or disabled (true).

- */ - @java.lang.Override - @JsonSetter(value = "disabled", nulls = Nulls.SKIP) - public _FinalStage disabled(Optional disabled) { - this.disabled = disabled; - return this; - } - - @java.lang.Override - public _FinalStage channel(PhoneProviderChannelEnum channel) { - this.channel = Optional.ofNullable(channel); - return this; - } - - @java.lang.Override - @JsonSetter(value = "channel", nulls = Nulls.SKIP) - public _FinalStage channel(Optional channel) { - this.channel = channel; - return this; - } - - /** - *

The name of the tenant

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage tenant(String tenant) { - this.tenant = Optional.ofNullable(tenant); - return this; - } - - /** - *

The name of the tenant

- */ - @java.lang.Override - @JsonSetter(value = "tenant", nulls = Nulls.SKIP) - public _FinalStage tenant(Optional tenant) { - this.tenant = tenant; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public GetBrandingPhoneProviderResponseContent build() { - return new GetBrandingPhoneProviderResponseContent( - id, tenant, name, channel, disabled, configuration, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetBrandingResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetBrandingResponseContent.java deleted file mode 100644 index a647a9d18..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetBrandingResponseContent.java +++ /dev/null @@ -1,181 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetBrandingResponseContent.Builder.class) -public final class GetBrandingResponseContent { - private final Optional colors; - - private final Optional faviconUrl; - - private final Optional logoUrl; - - private final Optional font; - - private final Map additionalProperties; - - private GetBrandingResponseContent( - Optional colors, - Optional faviconUrl, - Optional logoUrl, - Optional font, - Map additionalProperties) { - this.colors = colors; - this.faviconUrl = faviconUrl; - this.logoUrl = logoUrl; - this.font = font; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("colors") - public Optional getColors() { - return colors; - } - - /** - * @return URL for the favicon. Must use HTTPS. - */ - @JsonProperty("favicon_url") - public Optional getFaviconUrl() { - return faviconUrl; - } - - /** - * @return URL for the logo. Must use HTTPS. - */ - @JsonProperty("logo_url") - public Optional getLogoUrl() { - return logoUrl; - } - - @JsonProperty("font") - public Optional getFont() { - return font; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetBrandingResponseContent && equalTo((GetBrandingResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetBrandingResponseContent other) { - return colors.equals(other.colors) - && faviconUrl.equals(other.faviconUrl) - && logoUrl.equals(other.logoUrl) - && font.equals(other.font); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.colors, this.faviconUrl, this.logoUrl, this.font); - } - - @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 colors = Optional.empty(); - - private Optional faviconUrl = Optional.empty(); - - private Optional logoUrl = Optional.empty(); - - private Optional font = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetBrandingResponseContent other) { - colors(other.getColors()); - faviconUrl(other.getFaviconUrl()); - logoUrl(other.getLogoUrl()); - font(other.getFont()); - return this; - } - - @JsonSetter(value = "colors", nulls = Nulls.SKIP) - public Builder colors(Optional colors) { - this.colors = colors; - return this; - } - - public Builder colors(BrandingColors colors) { - this.colors = Optional.ofNullable(colors); - return this; - } - - /** - *

URL for the favicon. Must use HTTPS.

- */ - @JsonSetter(value = "favicon_url", nulls = Nulls.SKIP) - public Builder faviconUrl(Optional faviconUrl) { - this.faviconUrl = faviconUrl; - return this; - } - - public Builder faviconUrl(String faviconUrl) { - this.faviconUrl = Optional.ofNullable(faviconUrl); - return this; - } - - /** - *

URL for the logo. Must use HTTPS.

- */ - @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 = "font", nulls = Nulls.SKIP) - public Builder font(Optional font) { - this.font = font; - return this; - } - - public Builder font(BrandingFont font) { - this.font = Optional.ofNullable(font); - return this; - } - - public GetBrandingResponseContent build() { - return new GetBrandingResponseContent(colors, faviconUrl, logoUrl, font, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetBrandingThemeResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetBrandingThemeResponseContent.java deleted file mode 100644 index 6bf26326d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetBrandingThemeResponseContent.java +++ /dev/null @@ -1,286 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = GetBrandingThemeResponseContent.Builder.class) -public final class GetBrandingThemeResponseContent { - private final BrandingThemeBorders borders; - - private final BrandingThemeColors colors; - - private final String displayName; - - private final BrandingThemeFonts fonts; - - private final BrandingThemePageBackground pageBackground; - - private final String themeId; - - private final BrandingThemeWidget widget; - - private final Map additionalProperties; - - private GetBrandingThemeResponseContent( - BrandingThemeBorders borders, - BrandingThemeColors colors, - String displayName, - BrandingThemeFonts fonts, - BrandingThemePageBackground pageBackground, - String themeId, - BrandingThemeWidget widget, - Map additionalProperties) { - this.borders = borders; - this.colors = colors; - this.displayName = displayName; - this.fonts = fonts; - this.pageBackground = pageBackground; - this.themeId = themeId; - this.widget = widget; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("borders") - public BrandingThemeBorders getBorders() { - return borders; - } - - @JsonProperty("colors") - public BrandingThemeColors getColors() { - return colors; - } - - /** - * @return Display Name - */ - @JsonProperty("displayName") - public String getDisplayName() { - return displayName; - } - - @JsonProperty("fonts") - public BrandingThemeFonts getFonts() { - return fonts; - } - - @JsonProperty("page_background") - public BrandingThemePageBackground getPageBackground() { - return pageBackground; - } - - /** - * @return Theme Id - */ - @JsonProperty("themeId") - public String getThemeId() { - return themeId; - } - - @JsonProperty("widget") - public BrandingThemeWidget getWidget() { - return widget; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetBrandingThemeResponseContent && equalTo((GetBrandingThemeResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetBrandingThemeResponseContent other) { - return borders.equals(other.borders) - && colors.equals(other.colors) - && displayName.equals(other.displayName) - && fonts.equals(other.fonts) - && pageBackground.equals(other.pageBackground) - && themeId.equals(other.themeId) - && widget.equals(other.widget); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.borders, - this.colors, - this.displayName, - this.fonts, - this.pageBackground, - this.themeId, - this.widget); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BordersStage builder() { - return new Builder(); - } - - public interface BordersStage { - ColorsStage borders(@NotNull BrandingThemeBorders borders); - - Builder from(GetBrandingThemeResponseContent other); - } - - public interface ColorsStage { - DisplayNameStage colors(@NotNull BrandingThemeColors colors); - } - - public interface DisplayNameStage { - /** - *

Display Name

- */ - FontsStage displayName(@NotNull String displayName); - } - - public interface FontsStage { - PageBackgroundStage fonts(@NotNull BrandingThemeFonts fonts); - } - - public interface PageBackgroundStage { - ThemeIdStage pageBackground(@NotNull BrandingThemePageBackground pageBackground); - } - - public interface ThemeIdStage { - /** - *

Theme Id

- */ - WidgetStage themeId(@NotNull String themeId); - } - - public interface WidgetStage { - _FinalStage widget(@NotNull BrandingThemeWidget widget); - } - - public interface _FinalStage { - GetBrandingThemeResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements BordersStage, - ColorsStage, - DisplayNameStage, - FontsStage, - PageBackgroundStage, - ThemeIdStage, - WidgetStage, - _FinalStage { - private BrandingThemeBorders borders; - - private BrandingThemeColors colors; - - private String displayName; - - private BrandingThemeFonts fonts; - - private BrandingThemePageBackground pageBackground; - - private String themeId; - - private BrandingThemeWidget widget; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetBrandingThemeResponseContent other) { - borders(other.getBorders()); - colors(other.getColors()); - displayName(other.getDisplayName()); - fonts(other.getFonts()); - pageBackground(other.getPageBackground()); - themeId(other.getThemeId()); - widget(other.getWidget()); - return this; - } - - @java.lang.Override - @JsonSetter("borders") - public ColorsStage borders(@NotNull BrandingThemeBorders borders) { - this.borders = Objects.requireNonNull(borders, "borders must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("colors") - public DisplayNameStage colors(@NotNull BrandingThemeColors colors) { - this.colors = Objects.requireNonNull(colors, "colors must not be null"); - return this; - } - - /** - *

Display Name

- *

Display Name

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("displayName") - public FontsStage displayName(@NotNull String displayName) { - this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("fonts") - public PageBackgroundStage fonts(@NotNull BrandingThemeFonts fonts) { - this.fonts = Objects.requireNonNull(fonts, "fonts must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("page_background") - public ThemeIdStage pageBackground(@NotNull BrandingThemePageBackground pageBackground) { - this.pageBackground = Objects.requireNonNull(pageBackground, "pageBackground must not be null"); - return this; - } - - /** - *

Theme Id

- *

Theme Id

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("themeId") - public WidgetStage themeId(@NotNull String themeId) { - this.themeId = Objects.requireNonNull(themeId, "themeId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("widget") - public _FinalStage widget(@NotNull BrandingThemeWidget widget) { - this.widget = Objects.requireNonNull(widget, "widget must not be null"); - return this; - } - - @java.lang.Override - public GetBrandingThemeResponseContent build() { - return new GetBrandingThemeResponseContent( - borders, colors, displayName, fonts, pageBackground, themeId, widget, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetBreachedPasswordDetectionSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetBreachedPasswordDetectionSettingsResponseContent.java deleted file mode 100644 index 125b7d2cb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetBreachedPasswordDetectionSettingsResponseContent.java +++ /dev/null @@ -1,221 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetBreachedPasswordDetectionSettingsResponseContent.Builder.class) -public final class GetBreachedPasswordDetectionSettingsResponseContent { - private final Optional enabled; - - private final Optional> shields; - - private final Optional> adminNotificationFrequency; - - private final Optional method; - - private final Optional stage; - - private final Map additionalProperties; - - private GetBreachedPasswordDetectionSettingsResponseContent( - Optional enabled, - Optional> shields, - Optional> adminNotificationFrequency, - Optional method, - Optional stage, - Map additionalProperties) { - this.enabled = enabled; - this.shields = shields; - this.adminNotificationFrequency = adminNotificationFrequency; - this.method = method; - this.stage = stage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether or not breached password detection is active. - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Action to take when a breached password is detected during a login. - * Possible values: <code>block</code>, <code>user_notification</code>, <code>admin_notification</code>. - */ - @JsonProperty("shields") - public Optional> getShields() { - return shields; - } - - /** - * @return When "admin_notification" is enabled, determines how often email notifications are sent. - * Possible values: <code>immediately</code>, <code>daily</code>, <code>weekly</code>, <code>monthly</code>. - */ - @JsonProperty("admin_notification_frequency") - public Optional> getAdminNotificationFrequency() { - return adminNotificationFrequency; - } - - @JsonProperty("method") - public Optional getMethod() { - return method; - } - - @JsonProperty("stage") - public Optional getStage() { - return stage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetBreachedPasswordDetectionSettingsResponseContent - && equalTo((GetBreachedPasswordDetectionSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetBreachedPasswordDetectionSettingsResponseContent other) { - return enabled.equals(other.enabled) - && shields.equals(other.shields) - && adminNotificationFrequency.equals(other.adminNotificationFrequency) - && method.equals(other.method) - && stage.equals(other.stage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled, this.shields, this.adminNotificationFrequency, this.method, this.stage); - } - - @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 enabled = Optional.empty(); - - private Optional> shields = Optional.empty(); - - private Optional> adminNotificationFrequency = - Optional.empty(); - - private Optional method = Optional.empty(); - - private Optional stage = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetBreachedPasswordDetectionSettingsResponseContent other) { - enabled(other.getEnabled()); - shields(other.getShields()); - adminNotificationFrequency(other.getAdminNotificationFrequency()); - method(other.getMethod()); - stage(other.getStage()); - return this; - } - - /** - *

Whether or not breached password detection is active.

- */ - @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; - } - - /** - *

Action to take when a breached password is detected during a login. - * Possible values: <code>block</code>, <code>user_notification</code>, <code>admin_notification</code>.

- */ - @JsonSetter(value = "shields", nulls = Nulls.SKIP) - public Builder shields(Optional> shields) { - this.shields = shields; - return this; - } - - public Builder shields(List shields) { - this.shields = Optional.ofNullable(shields); - return this; - } - - /** - *

When "admin_notification" is enabled, determines how often email notifications are sent. - * Possible values: <code>immediately</code>, <code>daily</code>, <code>weekly</code>, <code>monthly</code>.

- */ - @JsonSetter(value = "admin_notification_frequency", nulls = Nulls.SKIP) - public Builder adminNotificationFrequency( - Optional> adminNotificationFrequency) { - this.adminNotificationFrequency = adminNotificationFrequency; - return this; - } - - public Builder adminNotificationFrequency( - List adminNotificationFrequency) { - this.adminNotificationFrequency = Optional.ofNullable(adminNotificationFrequency); - return this; - } - - @JsonSetter(value = "method", nulls = Nulls.SKIP) - public Builder method(Optional method) { - this.method = method; - return this; - } - - public Builder method(BreachedPasswordDetectionMethodEnum method) { - this.method = Optional.ofNullable(method); - return this; - } - - @JsonSetter(value = "stage", nulls = Nulls.SKIP) - public Builder stage(Optional stage) { - this.stage = stage; - return this; - } - - public Builder stage(BreachedPasswordDetectionStage stage) { - this.stage = Optional.ofNullable(stage); - return this; - } - - public GetBreachedPasswordDetectionSettingsResponseContent build() { - return new GetBreachedPasswordDetectionSettingsResponseContent( - enabled, shields, adminNotificationFrequency, method, stage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetBruteForceSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetBruteForceSettingsResponseContent.java deleted file mode 100644 index 45519ac67..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetBruteForceSettingsResponseContent.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetBruteForceSettingsResponseContent.Builder.class) -public final class GetBruteForceSettingsResponseContent { - private final Optional enabled; - - private final Optional> shields; - - private final Optional> allowlist; - - private final Optional mode; - - private final Optional maxAttempts; - - private final Map additionalProperties; - - private GetBruteForceSettingsResponseContent( - Optional enabled, - Optional> shields, - Optional> allowlist, - Optional mode, - Optional maxAttempts, - Map additionalProperties) { - this.enabled = enabled; - this.shields = shields; - this.allowlist = allowlist; - this.mode = mode; - this.maxAttempts = maxAttempts; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether or not brute force attack protections are active. - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Action to take when a brute force protection threshold is violated. - * Possible values: <code>block</code>, <code>user_notification</code>. - */ - @JsonProperty("shields") - public Optional> getShields() { - return shields; - } - - /** - * @return List of trusted IP addresses that will not have attack protection enforced against them. - */ - @JsonProperty("allowlist") - public Optional> getAllowlist() { - return allowlist; - } - - @JsonProperty("mode") - public Optional getMode() { - return mode; - } - - /** - * @return Maximum number of unsuccessful attempts. - */ - @JsonProperty("max_attempts") - public Optional getMaxAttempts() { - return maxAttempts; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetBruteForceSettingsResponseContent - && equalTo((GetBruteForceSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetBruteForceSettingsResponseContent other) { - return enabled.equals(other.enabled) - && shields.equals(other.shields) - && allowlist.equals(other.allowlist) - && mode.equals(other.mode) - && maxAttempts.equals(other.maxAttempts); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled, this.shields, this.allowlist, this.mode, this.maxAttempts); - } - - @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 enabled = Optional.empty(); - - private Optional> shields = Optional.empty(); - - private Optional> allowlist = Optional.empty(); - - private Optional mode = Optional.empty(); - - private Optional maxAttempts = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetBruteForceSettingsResponseContent other) { - enabled(other.getEnabled()); - shields(other.getShields()); - allowlist(other.getAllowlist()); - mode(other.getMode()); - maxAttempts(other.getMaxAttempts()); - return this; - } - - /** - *

Whether or not brute force attack protections are active.

- */ - @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; - } - - /** - *

Action to take when a brute force protection threshold is violated. - * Possible values: <code>block</code>, <code>user_notification</code>.

- */ - @JsonSetter(value = "shields", nulls = Nulls.SKIP) - public Builder shields(Optional> shields) { - this.shields = shields; - return this; - } - - public Builder shields(List shields) { - this.shields = Optional.ofNullable(shields); - return this; - } - - /** - *

List of trusted IP addresses that will not have attack protection enforced against them.

- */ - @JsonSetter(value = "allowlist", nulls = Nulls.SKIP) - public Builder allowlist(Optional> allowlist) { - this.allowlist = allowlist; - return this; - } - - public Builder allowlist(List allowlist) { - this.allowlist = Optional.ofNullable(allowlist); - return this; - } - - @JsonSetter(value = "mode", nulls = Nulls.SKIP) - public Builder mode(Optional mode) { - this.mode = mode; - return this; - } - - public Builder mode(BruteForceProtectionModeEnum mode) { - this.mode = Optional.ofNullable(mode); - return this; - } - - /** - *

Maximum number of unsuccessful attempts.

- */ - @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; - } - - public GetBruteForceSettingsResponseContent build() { - return new GetBruteForceSettingsResponseContent( - enabled, shields, allowlist, mode, maxAttempts, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetClientCredentialResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetClientCredentialResponseContent.java deleted file mode 100644 index 413a65ae1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetClientCredentialResponseContent.java +++ /dev/null @@ -1,384 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetClientCredentialResponseContent.Builder.class) -public final class GetClientCredentialResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional kid; - - private final Optional alg; - - private final Optional credentialType; - - private final Optional subjectDn; - - private final Optional thumbprintSha256; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional expiresAt; - - private final Map additionalProperties; - - private GetClientCredentialResponseContent( - Optional id, - Optional name, - Optional kid, - Optional alg, - Optional credentialType, - Optional subjectDn, - Optional thumbprintSha256, - Optional createdAt, - Optional updatedAt, - Optional expiresAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.kid = kid; - this.alg = alg; - this.credentialType = credentialType; - this.subjectDn = subjectDn; - this.thumbprintSha256 = thumbprintSha256; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.expiresAt = expiresAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the credential. Generated on creation. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name given to the credential by the user. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The key identifier of the credential, generated on creation. - */ - @JsonProperty("kid") - public Optional getKid() { - return kid; - } - - @JsonProperty("alg") - public Optional getAlg() { - return alg; - } - - @JsonProperty("credential_type") - public Optional getCredentialType() { - return credentialType; - } - - /** - * @return The X509 certificate's Subject Distinguished Name - */ - @JsonProperty("subject_dn") - public Optional getSubjectDn() { - return subjectDn; - } - - /** - * @return The X509 certificate's SHA256 thumbprint - */ - @JsonProperty("thumbprint_sha256") - public Optional getThumbprintSha256() { - return thumbprintSha256; - } - - /** - * @return The ISO 8601 formatted date the credential was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The ISO 8601 formatted date the credential was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return The ISO 8601 formatted date representing the expiration of the credential. - */ - @JsonProperty("expires_at") - public Optional getExpiresAt() { - return expiresAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetClientCredentialResponseContent - && equalTo((GetClientCredentialResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetClientCredentialResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && kid.equals(other.kid) - && alg.equals(other.alg) - && credentialType.equals(other.credentialType) - && subjectDn.equals(other.subjectDn) - && thumbprintSha256.equals(other.thumbprintSha256) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && expiresAt.equals(other.expiresAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.kid, - this.alg, - this.credentialType, - this.subjectDn, - this.thumbprintSha256, - this.createdAt, - this.updatedAt, - this.expiresAt); - } - - @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 kid = Optional.empty(); - - private Optional alg = Optional.empty(); - - private Optional credentialType = Optional.empty(); - - private Optional subjectDn = Optional.empty(); - - private Optional thumbprintSha256 = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional expiresAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetClientCredentialResponseContent other) { - id(other.getId()); - name(other.getName()); - kid(other.getKid()); - alg(other.getAlg()); - credentialType(other.getCredentialType()); - subjectDn(other.getSubjectDn()); - thumbprintSha256(other.getThumbprintSha256()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - expiresAt(other.getExpiresAt()); - return this; - } - - /** - *

ID of the credential. Generated on creation.

- */ - @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 given to the credential by the 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; - } - - /** - *

The key identifier of the credential, generated on creation.

- */ - @JsonSetter(value = "kid", nulls = Nulls.SKIP) - public Builder kid(Optional kid) { - this.kid = kid; - return this; - } - - public Builder kid(String kid) { - this.kid = Optional.ofNullable(kid); - return this; - } - - @JsonSetter(value = "alg", nulls = Nulls.SKIP) - public Builder alg(Optional alg) { - this.alg = alg; - return this; - } - - public Builder alg(ClientCredentialAlgorithmEnum alg) { - this.alg = Optional.ofNullable(alg); - return this; - } - - @JsonSetter(value = "credential_type", nulls = Nulls.SKIP) - public Builder credentialType(Optional credentialType) { - this.credentialType = credentialType; - return this; - } - - public Builder credentialType(ClientCredentialTypeEnum credentialType) { - this.credentialType = Optional.ofNullable(credentialType); - return this; - } - - /** - *

The X509 certificate's Subject Distinguished Name

- */ - @JsonSetter(value = "subject_dn", nulls = Nulls.SKIP) - public Builder subjectDn(Optional subjectDn) { - this.subjectDn = subjectDn; - return this; - } - - public Builder subjectDn(String subjectDn) { - this.subjectDn = Optional.ofNullable(subjectDn); - return this; - } - - /** - *

The X509 certificate's SHA256 thumbprint

- */ - @JsonSetter(value = "thumbprint_sha256", nulls = Nulls.SKIP) - public Builder thumbprintSha256(Optional thumbprintSha256) { - this.thumbprintSha256 = thumbprintSha256; - return this; - } - - public Builder thumbprintSha256(String thumbprintSha256) { - this.thumbprintSha256 = Optional.ofNullable(thumbprintSha256); - return this; - } - - /** - *

The ISO 8601 formatted date the credential 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 formatted date the credential was 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; - } - - /** - *

The ISO 8601 formatted date representing the expiration of the credential.

- */ - @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - public Builder expiresAt(OffsetDateTime expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); - return this; - } - - public GetClientCredentialResponseContent build() { - return new GetClientCredentialResponseContent( - id, - name, - kid, - alg, - credentialType, - subjectDn, - thumbprintSha256, - createdAt, - updatedAt, - expiresAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetClientGrantResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetClientGrantResponseContent.java deleted file mode 100644 index 4cf6bf0c6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetClientGrantResponseContent.java +++ /dev/null @@ -1,383 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetClientGrantResponseContent.Builder.class) -public final class GetClientGrantResponseContent { - private final Optional id; - - private final Optional clientId; - - private final Optional audience; - - private final Optional> scope; - - private final Optional organizationUsage; - - private final Optional allowAnyOrganization; - - private final Optional isSystem; - - private final Optional subjectType; - - private final Optional> authorizationDetailsTypes; - - private final Optional allowAllScopes; - - private final Map additionalProperties; - - private GetClientGrantResponseContent( - Optional id, - Optional clientId, - Optional audience, - Optional> scope, - Optional organizationUsage, - Optional allowAnyOrganization, - Optional isSystem, - Optional subjectType, - Optional> authorizationDetailsTypes, - Optional allowAllScopes, - Map additionalProperties) { - this.id = id; - this.clientId = clientId; - this.audience = audience; - this.scope = scope; - this.organizationUsage = organizationUsage; - this.allowAnyOrganization = allowAnyOrganization; - this.isSystem = isSystem; - this.subjectType = subjectType; - this.authorizationDetailsTypes = authorizationDetailsTypes; - this.allowAllScopes = allowAllScopes; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the client grant. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return ID of the client. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @return The audience (API identifier) of this client grant. - */ - @JsonProperty("audience") - public Optional getAudience() { - return audience; - } - - /** - * @return Scopes allowed for this client grant. - */ - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonProperty("organization_usage") - public Optional getOrganizationUsage() { - return organizationUsage; - } - - /** - * @return If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations. - */ - @JsonProperty("allow_any_organization") - public Optional getAllowAnyOrganization() { - return allowAnyOrganization; - } - - /** - * @return If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly. - */ - @JsonProperty("is_system") - public Optional getIsSystem() { - return isSystem; - } - - @JsonProperty("subject_type") - public Optional getSubjectType() { - return subjectType; - } - - /** - * @return Types of authorization_details allowed for this client grant. - */ - @JsonProperty("authorization_details_types") - public Optional> getAuthorizationDetailsTypes() { - return authorizationDetailsTypes; - } - - /** - * @return If enabled, all scopes configured on the resource server are allowed for this grant. - */ - @JsonProperty("allow_all_scopes") - public Optional getAllowAllScopes() { - return allowAllScopes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetClientGrantResponseContent && equalTo((GetClientGrantResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetClientGrantResponseContent other) { - return id.equals(other.id) - && clientId.equals(other.clientId) - && audience.equals(other.audience) - && scope.equals(other.scope) - && organizationUsage.equals(other.organizationUsage) - && allowAnyOrganization.equals(other.allowAnyOrganization) - && isSystem.equals(other.isSystem) - && subjectType.equals(other.subjectType) - && authorizationDetailsTypes.equals(other.authorizationDetailsTypes) - && allowAllScopes.equals(other.allowAllScopes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.clientId, - this.audience, - this.scope, - this.organizationUsage, - this.allowAnyOrganization, - this.isSystem, - this.subjectType, - this.authorizationDetailsTypes, - this.allowAllScopes); - } - - @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 clientId = Optional.empty(); - - private Optional audience = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional organizationUsage = Optional.empty(); - - private Optional allowAnyOrganization = Optional.empty(); - - private Optional isSystem = Optional.empty(); - - private Optional subjectType = Optional.empty(); - - private Optional> authorizationDetailsTypes = Optional.empty(); - - private Optional allowAllScopes = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetClientGrantResponseContent other) { - id(other.getId()); - clientId(other.getClientId()); - audience(other.getAudience()); - scope(other.getScope()); - organizationUsage(other.getOrganizationUsage()); - allowAnyOrganization(other.getAllowAnyOrganization()); - isSystem(other.getIsSystem()); - subjectType(other.getSubjectType()); - authorizationDetailsTypes(other.getAuthorizationDetailsTypes()); - allowAllScopes(other.getAllowAllScopes()); - return this; - } - - /** - *

ID of the client grant.

- */ - @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; - } - - /** - *

ID of the 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 audience (API identifier) of this client grant.

- */ - @JsonSetter(value = "audience", nulls = Nulls.SKIP) - public Builder audience(Optional audience) { - this.audience = audience; - return this; - } - - public Builder audience(String audience) { - this.audience = Optional.ofNullable(audience); - return this; - } - - /** - *

Scopes allowed for this client grant.

- */ - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "organization_usage", nulls = Nulls.SKIP) - public Builder organizationUsage(Optional organizationUsage) { - this.organizationUsage = organizationUsage; - return this; - } - - public Builder organizationUsage(ClientGrantOrganizationUsageEnum organizationUsage) { - this.organizationUsage = Optional.ofNullable(organizationUsage); - return this; - } - - /** - *

If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.

- */ - @JsonSetter(value = "allow_any_organization", nulls = Nulls.SKIP) - public Builder allowAnyOrganization(Optional allowAnyOrganization) { - this.allowAnyOrganization = allowAnyOrganization; - return this; - } - - public Builder allowAnyOrganization(Boolean allowAnyOrganization) { - this.allowAnyOrganization = Optional.ofNullable(allowAnyOrganization); - return this; - } - - /** - *

If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly.

- */ - @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; - } - - @JsonSetter(value = "subject_type", nulls = Nulls.SKIP) - public Builder subjectType(Optional subjectType) { - this.subjectType = subjectType; - return this; - } - - public Builder subjectType(ClientGrantSubjectTypeEnum subjectType) { - this.subjectType = Optional.ofNullable(subjectType); - return this; - } - - /** - *

Types of authorization_details allowed for this client grant.

- */ - @JsonSetter(value = "authorization_details_types", nulls = Nulls.SKIP) - public Builder authorizationDetailsTypes(Optional> authorizationDetailsTypes) { - this.authorizationDetailsTypes = authorizationDetailsTypes; - return this; - } - - public Builder authorizationDetailsTypes(List authorizationDetailsTypes) { - this.authorizationDetailsTypes = Optional.ofNullable(authorizationDetailsTypes); - return this; - } - - /** - *

If enabled, all scopes configured on the resource server are allowed for this grant.

- */ - @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; - } - - public GetClientGrantResponseContent build() { - return new GetClientGrantResponseContent( - id, - clientId, - audience, - scope, - organizationUsage, - allowAnyOrganization, - isSystem, - subjectType, - authorizationDetailsTypes, - allowAllScopes, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetClientRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetClientRequestParameters.java deleted file mode 100644 index de80034af..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetClientRequestParameters.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetClientRequestParameters.Builder.class) -public final class GetClientRequestParameters { - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final Map additionalProperties; - - private GetClientRequestParameters( - OptionalNullable fields, - OptionalNullable includeFields, - Map additionalProperties) { - this.fields = fields; - this.includeFields = includeFields; - this.additionalProperties = additionalProperties; - } - - /** - * @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). - */ - @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("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 GetClientRequestParameters && equalTo((GetClientRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetClientRequestParameters other) { - return fields.equals(other.fields) && includeFields.equals(other.includeFields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetClientRequestParameters other) { - fields(other.getFields()); - includeFields(other.getIncludeFields()); - 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).

- */ - @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 GetClientRequestParameters build() { - return new GetClientRequestParameters(fields, includeFields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java deleted file mode 100644 index 4a2fc277e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java +++ /dev/null @@ -1,1876 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetClientResponseContent.Builder.class) -public final class GetClientResponseContent { - private final Optional clientId; - - private final Optional tenant; - - private final Optional name; - - private final Optional description; - - private final Optional global; - - private final Optional clientSecret; - - 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> signingKeys; - - private final OptionalNullable encryptionKey; - - 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 addons; - - private final Optional tokenEndpointAuthMethod; - - private final Optional isTokenEndpointIpHeaderTrusted; - - private final Optional> clientMetadata; - - private final Optional mobile; - - private final Optional initiateLoginUri; - - 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 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 resourceServerIdentifier; - - private final Optional> asyncApprovalNotificationChannels; - - private final Map additionalProperties; - - private GetClientResponseContent( - Optional clientId, - Optional tenant, - Optional name, - Optional description, - Optional global, - Optional clientSecret, - 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> signingKeys, - OptionalNullable encryptionKey, - Optional sso, - Optional ssoDisabled, - Optional crossOriginAuthentication, - Optional crossOriginLoc, - Optional customLoginPageOn, - Optional customLoginPage, - Optional customLoginPagePreview, - Optional formTemplate, - Optional addons, - Optional tokenEndpointAuthMethod, - Optional isTokenEndpointIpHeaderTrusted, - Optional> clientMetadata, - Optional mobile, - Optional initiateLoginUri, - OptionalNullable refreshToken, - OptionalNullable defaultOrganization, - Optional organizationUsage, - Optional organizationRequireBehavior, - Optional> organizationDiscoveryMethods, - OptionalNullable clientAuthenticationMethods, - Optional requirePushedAuthorizationRequests, - Optional requireProofOfPossession, - Optional signedRequestObject, - OptionalNullable complianceLevel, - Optional skipNonVerifiableCallbackUriConfirmationPrompt, - Optional tokenExchange, - OptionalNullable parRequestExpiry, - Optional tokenQuota, - Optional expressConfiguration, - Optional resourceServerIdentifier, - Optional> asyncApprovalNotificationChannels, - Map additionalProperties) { - this.clientId = clientId; - this.tenant = tenant; - this.name = name; - this.description = description; - this.global = global; - this.clientSecret = clientSecret; - 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.signingKeys = signingKeys; - this.encryptionKey = encryptionKey; - 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.addons = addons; - this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; - this.isTokenEndpointIpHeaderTrusted = isTokenEndpointIpHeaderTrusted; - this.clientMetadata = clientMetadata; - this.mobile = mobile; - this.initiateLoginUri = initiateLoginUri; - 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.complianceLevel = complianceLevel; - this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; - this.tokenExchange = tokenExchange; - this.parRequestExpiry = parRequestExpiry; - this.tokenQuota = tokenQuota; - this.expressConfiguration = expressConfiguration; - this.resourceServerIdentifier = resourceServerIdentifier; - this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of this client. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @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; - } - - /** - * @return Client secret (which you must not make public). - */ - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @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 <a href='https://auth0.com/docs/api-auth/tutorials/adoption'>strict OIDC specifications</a> (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 <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>. - */ - @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; - } - - @JsonProperty("signing_keys") - public Optional> getSigningKeys() { - return signingKeys; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("encryption_key") - public OptionalNullable getEncryptionKey() { - if (encryptionKey == null) { - return OptionalNullable.absent(); - } - return encryptionKey; - } - - /** - * @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("addons") - public Optional getAddons() { - return addons; - } - - @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; - } - - @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; - } - - @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; - } - - /** - * @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; - } - - @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("encryption_key") - private OptionalNullable _getEncryptionKey() { - return encryptionKey; - } - - @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 GetClientResponseContent && equalTo((GetClientResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetClientResponseContent other) { - return clientId.equals(other.clientId) - && tenant.equals(other.tenant) - && name.equals(other.name) - && description.equals(other.description) - && global.equals(other.global) - && clientSecret.equals(other.clientSecret) - && 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) - && signingKeys.equals(other.signingKeys) - && encryptionKey.equals(other.encryptionKey) - && 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) - && addons.equals(other.addons) - && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) - && isTokenEndpointIpHeaderTrusted.equals(other.isTokenEndpointIpHeaderTrusted) - && clientMetadata.equals(other.clientMetadata) - && mobile.equals(other.mobile) - && initiateLoginUri.equals(other.initiateLoginUri) - && 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) - && complianceLevel.equals(other.complianceLevel) - && skipNonVerifiableCallbackUriConfirmationPrompt.equals( - other.skipNonVerifiableCallbackUriConfirmationPrompt) - && tokenExchange.equals(other.tokenExchange) - && parRequestExpiry.equals(other.parRequestExpiry) - && tokenQuota.equals(other.tokenQuota) - && expressConfiguration.equals(other.expressConfiguration) - && resourceServerIdentifier.equals(other.resourceServerIdentifier) - && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.tenant, - this.name, - this.description, - this.global, - this.clientSecret, - 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.signingKeys, - this.encryptionKey, - this.sso, - this.ssoDisabled, - this.crossOriginAuthentication, - this.crossOriginLoc, - this.customLoginPageOn, - this.customLoginPage, - this.customLoginPagePreview, - this.formTemplate, - this.addons, - this.tokenEndpointAuthMethod, - this.isTokenEndpointIpHeaderTrusted, - this.clientMetadata, - this.mobile, - this.initiateLoginUri, - this.refreshToken, - this.defaultOrganization, - this.organizationUsage, - this.organizationRequireBehavior, - this.organizationDiscoveryMethods, - this.clientAuthenticationMethods, - this.requirePushedAuthorizationRequests, - this.requireProofOfPossession, - this.signedRequestObject, - this.complianceLevel, - this.skipNonVerifiableCallbackUriConfirmationPrompt, - this.tokenExchange, - this.parRequestExpiry, - this.tokenQuota, - this.expressConfiguration, - this.resourceServerIdentifier, - this.asyncApprovalNotificationChannels); - } - - @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 tenant = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional description = Optional.empty(); - - private Optional global = Optional.empty(); - - private Optional clientSecret = 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> signingKeys = Optional.empty(); - - private OptionalNullable encryptionKey = OptionalNullable.absent(); - - 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 addons = 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 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 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 resourceServerIdentifier = Optional.empty(); - - private Optional> asyncApprovalNotificationChannels = - Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetClientResponseContent other) { - clientId(other.getClientId()); - tenant(other.getTenant()); - name(other.getName()); - description(other.getDescription()); - global(other.getGlobal()); - clientSecret(other.getClientSecret()); - 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()); - signingKeys(other.getSigningKeys()); - encryptionKey(other.getEncryptionKey()); - sso(other.getSso()); - ssoDisabled(other.getSsoDisabled()); - crossOriginAuthentication(other.getCrossOriginAuthentication()); - crossOriginLoc(other.getCrossOriginLoc()); - customLoginPageOn(other.getCustomLoginPageOn()); - customLoginPage(other.getCustomLoginPage()); - customLoginPagePreview(other.getCustomLoginPagePreview()); - formTemplate(other.getFormTemplate()); - addons(other.getAddons()); - tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); - isTokenEndpointIpHeaderTrusted(other.getIsTokenEndpointIpHeaderTrusted()); - clientMetadata(other.getClientMetadata()); - mobile(other.getMobile()); - initiateLoginUri(other.getInitiateLoginUri()); - 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()); - complianceLevel(other.getComplianceLevel()); - skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); - tokenExchange(other.getTokenExchange()); - parRequestExpiry(other.getParRequestExpiry()); - tokenQuota(other.getTokenQuota()); - expressConfiguration(other.getExpressConfiguration()); - resourceServerIdentifier(other.getResourceServerIdentifier()); - asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); - 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; - } - - /** - *

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; - } - - /** - *

Client secret (which you must not make public).

- */ - @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 = "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 <a href='https://auth0.com/docs/api-auth/tutorials/adoption'>strict OIDC specifications</a> (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 <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>.

- */ - @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; - } - - @JsonSetter(value = "signing_keys", nulls = Nulls.SKIP) - public Builder signingKeys(Optional> signingKeys) { - this.signingKeys = signingKeys; - return this; - } - - public Builder signingKeys(List signingKeys) { - this.signingKeys = Optional.ofNullable(signingKeys); - return this; - } - - @JsonSetter(value = "encryption_key", nulls = Nulls.SKIP) - public Builder encryptionKey(@Nullable OptionalNullable encryptionKey) { - this.encryptionKey = encryptionKey; - return this; - } - - public Builder encryptionKey(ClientEncryptionKey encryptionKey) { - this.encryptionKey = OptionalNullable.of(encryptionKey); - return this; - } - - public Builder encryptionKey(Optional encryptionKey) { - if (encryptionKey.isPresent()) { - this.encryptionKey = OptionalNullable.of(encryptionKey.get()); - } else { - this.encryptionKey = OptionalNullable.absent(); - } - return this; - } - - public Builder encryptionKey(com.auth0.client.mgmt.core.Nullable encryptionKey) { - if (encryptionKey.isNull()) { - this.encryptionKey = OptionalNullable.ofNull(); - } else if (encryptionKey.isEmpty()) { - this.encryptionKey = OptionalNullable.absent(); - } else { - this.encryptionKey = OptionalNullable.of(encryptionKey.get()); - } - 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 = "addons", nulls = Nulls.SKIP) - public Builder addons(Optional addons) { - this.addons = addons; - return this; - } - - public Builder addons(ClientAddons addons) { - this.addons = Optional.ofNullable(addons); - 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 = "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 = "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; - } - - /** - *

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; - } - - public GetClientResponseContent build() { - return new GetClientResponseContent( - clientId, - tenant, - name, - description, - global, - clientSecret, - appType, - logoUri, - isFirstParty, - oidcConformant, - callbacks, - allowedOrigins, - webOrigins, - clientAliases, - allowedClients, - allowedLogoutUrls, - sessionTransfer, - oidcLogout, - grantTypes, - jwtConfiguration, - signingKeys, - encryptionKey, - sso, - ssoDisabled, - crossOriginAuthentication, - crossOriginLoc, - customLoginPageOn, - customLoginPage, - customLoginPagePreview, - formTemplate, - addons, - tokenEndpointAuthMethod, - isTokenEndpointIpHeaderTrusted, - clientMetadata, - mobile, - initiateLoginUri, - refreshToken, - defaultOrganization, - organizationUsage, - organizationRequireBehavior, - organizationDiscoveryMethods, - clientAuthenticationMethods, - requirePushedAuthorizationRequests, - requireProofOfPossession, - signedRequestObject, - complianceLevel, - skipNonVerifiableCallbackUriConfirmationPrompt, - tokenExchange, - parRequestExpiry, - tokenQuota, - expressConfiguration, - resourceServerIdentifier, - asyncApprovalNotificationChannels, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetConnectionEnabledClientsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetConnectionEnabledClientsResponseContent.java deleted file mode 100644 index bb84d0ac9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetConnectionEnabledClientsResponseContent.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = GetConnectionEnabledClientsResponseContent.Builder.class) -public final class GetConnectionEnabledClientsResponseContent { - private final List clients; - - private final Optional next; - - private final Map additionalProperties; - - private GetConnectionEnabledClientsResponseContent( - List clients, Optional next, Map additionalProperties) { - this.clients = clients; - this.next = next; - this.additionalProperties = additionalProperties; - } - - /** - * @return Clients for which the connection is enabled - */ - @JsonProperty("clients") - public List getClients() { - return clients; - } - - /** - * @return Encoded next token - */ - @JsonProperty("next") - public Optional getNext() { - return next; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetConnectionEnabledClientsResponseContent - && equalTo((GetConnectionEnabledClientsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetConnectionEnabledClientsResponseContent 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(GetConnectionEnabledClientsResponseContent other) { - clients(other.getClients()); - next(other.getNext()); - return this; - } - - /** - *

Clients for which the connection is enabled

- */ - @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(ConnectionEnabledClient clients) { - this.clients.add(clients); - return this; - } - - public Builder addAllClients(List clients) { - if (clients != null) { - this.clients.addAll(clients); - } - return this; - } - - /** - *

Encoded next token

- */ - @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 GetConnectionEnabledClientsResponseContent build() { - return new GetConnectionEnabledClientsResponseContent(clients, next, 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 deleted file mode 100644 index 36042f5e8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetConnectionProfileResponseContent.java +++ /dev/null @@ -1,258 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetConnectionProfileResponseContent.Builder.class) -public final class GetConnectionProfileResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional organization; - - private final Optional connectionNamePrefixTemplate; - - private final Optional> enabledFeatures; - - private final Optional connectionConfig; - - private final Optional strategyOverrides; - - private final Map additionalProperties; - - private GetConnectionProfileResponseContent( - Optional id, - Optional name, - Optional organization, - Optional connectionNamePrefixTemplate, - Optional> enabledFeatures, - Optional connectionConfig, - Optional strategyOverrides, - Map additionalProperties) { - this.id = id; - this.name = name; - this.organization = organization; - this.connectionNamePrefixTemplate = connectionNamePrefixTemplate; - this.enabledFeatures = enabledFeatures; - this.connectionConfig = connectionConfig; - this.strategyOverrides = strategyOverrides; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("organization") - public Optional getOrganization() { - return organization; - } - - @JsonProperty("connection_name_prefix_template") - public Optional getConnectionNamePrefixTemplate() { - return connectionNamePrefixTemplate; - } - - @JsonProperty("enabled_features") - public Optional> getEnabledFeatures() { - return enabledFeatures; - } - - @JsonProperty("connection_config") - public Optional getConnectionConfig() { - return connectionConfig; - } - - @JsonProperty("strategy_overrides") - public Optional getStrategyOverrides() { - return strategyOverrides; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetConnectionProfileResponseContent - && equalTo((GetConnectionProfileResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetConnectionProfileResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && organization.equals(other.organization) - && connectionNamePrefixTemplate.equals(other.connectionNamePrefixTemplate) - && enabledFeatures.equals(other.enabledFeatures) - && connectionConfig.equals(other.connectionConfig) - && strategyOverrides.equals(other.strategyOverrides); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.organization, - this.connectionNamePrefixTemplate, - this.enabledFeatures, - this.connectionConfig, - this.strategyOverrides); - } - - @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 organization = Optional.empty(); - - private Optional connectionNamePrefixTemplate = Optional.empty(); - - private Optional> enabledFeatures = Optional.empty(); - - private Optional connectionConfig = Optional.empty(); - - private Optional strategyOverrides = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetConnectionProfileResponseContent other) { - id(other.getId()); - name(other.getName()); - organization(other.getOrganization()); - connectionNamePrefixTemplate(other.getConnectionNamePrefixTemplate()); - enabledFeatures(other.getEnabledFeatures()); - connectionConfig(other.getConnectionConfig()); - strategyOverrides(other.getStrategyOverrides()); - 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 = "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 = "organization", nulls = Nulls.SKIP) - public Builder organization(Optional organization) { - this.organization = organization; - return this; - } - - public Builder organization(ConnectionProfileOrganization organization) { - this.organization = Optional.ofNullable(organization); - return this; - } - - @JsonSetter(value = "connection_name_prefix_template", nulls = Nulls.SKIP) - public Builder connectionNamePrefixTemplate(Optional connectionNamePrefixTemplate) { - this.connectionNamePrefixTemplate = connectionNamePrefixTemplate; - return this; - } - - public Builder connectionNamePrefixTemplate(String connectionNamePrefixTemplate) { - this.connectionNamePrefixTemplate = Optional.ofNullable(connectionNamePrefixTemplate); - return this; - } - - @JsonSetter(value = "enabled_features", nulls = Nulls.SKIP) - public Builder enabledFeatures(Optional> enabledFeatures) { - this.enabledFeatures = enabledFeatures; - return this; - } - - public Builder enabledFeatures(List enabledFeatures) { - this.enabledFeatures = Optional.ofNullable(enabledFeatures); - return this; - } - - @JsonSetter(value = "connection_config", nulls = Nulls.SKIP) - public Builder connectionConfig(Optional connectionConfig) { - this.connectionConfig = connectionConfig; - return this; - } - - public Builder connectionConfig(ConnectionProfileConfig connectionConfig) { - this.connectionConfig = Optional.ofNullable(connectionConfig); - return this; - } - - @JsonSetter(value = "strategy_overrides", nulls = Nulls.SKIP) - public Builder strategyOverrides(Optional strategyOverrides) { - this.strategyOverrides = strategyOverrides; - return this; - } - - public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOverrides) { - this.strategyOverrides = Optional.ofNullable(strategyOverrides); - return this; - } - - public GetConnectionProfileResponseContent build() { - return new GetConnectionProfileResponseContent( - id, - name, - organization, - connectionNamePrefixTemplate, - enabledFeatures, - connectionConfig, - strategyOverrides, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetConnectionProfileTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetConnectionProfileTemplateResponseContent.java deleted file mode 100644 index dd5a95274..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetConnectionProfileTemplateResponseContent.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetConnectionProfileTemplateResponseContent.Builder.class) -public final class GetConnectionProfileTemplateResponseContent { - private final Optional id; - - private final Optional displayName; - - private final Optional template; - - private final Map additionalProperties; - - private GetConnectionProfileTemplateResponseContent( - Optional id, - Optional displayName, - Optional template, - Map additionalProperties) { - this.id = id; - this.displayName = displayName; - this.template = template; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the template. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The user-friendly name of the template displayed in the UI. - */ - @JsonProperty("display_name") - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("template") - public Optional getTemplate() { - return template; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetConnectionProfileTemplateResponseContent - && equalTo((GetConnectionProfileTemplateResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetConnectionProfileTemplateResponseContent other) { - return id.equals(other.id) && displayName.equals(other.displayName) && template.equals(other.template); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.displayName, this.template); - } - - @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 displayName = Optional.empty(); - - private Optional template = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetConnectionProfileTemplateResponseContent other) { - id(other.getId()); - displayName(other.getDisplayName()); - template(other.getTemplate()); - return this; - } - - /** - *

The id of the template.

- */ - @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 user-friendly name of the template displayed in the UI.

- */ - @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 = "template", nulls = Nulls.SKIP) - public Builder template(Optional template) { - this.template = template; - return this; - } - - public Builder template(ConnectionProfileTemplate template) { - this.template = Optional.ofNullable(template); - return this; - } - - public GetConnectionProfileTemplateResponseContent build() { - return new GetConnectionProfileTemplateResponseContent(id, displayName, template, 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 deleted file mode 100644 index 51b0465ae..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetConnectionRequestParameters.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetConnectionRequestParameters.Builder.class) -public final class GetConnectionRequestParameters { - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final Map additionalProperties; - - private GetConnectionRequestParameters( - OptionalNullable fields, - OptionalNullable includeFields, - Map additionalProperties) { - this.fields = fields; - this.includeFields = includeFields; - this.additionalProperties = additionalProperties; - } - - /** - * @return A comma separated list of fields to include or exclude (depending on include_fields) from the result, 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 <code>true</code> if the fields specified are to be included in the result, <code>false</code> otherwise (defaults to <code>true</code>) - */ - @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("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 GetConnectionRequestParameters && equalTo((GetConnectionRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetConnectionRequestParameters other) { - return fields.equals(other.fields) && includeFields.equals(other.includeFields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetConnectionRequestParameters other) { - fields(other.getFields()); - includeFields(other.getIncludeFields()); - return this; - } - - /** - *

A comma separated list of fields to include or exclude (depending on include_fields) from the result, 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; - } - - /** - *

<code>true</code> if the fields specified are to be included in the result, <code>false</code> otherwise (defaults to <code>true</code>)

- */ - @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 GetConnectionRequestParameters build() { - return new GetConnectionRequestParameters(fields, includeFields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetConnectionResponseContent.java deleted file mode 100644 index d3ca8697b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetConnectionResponseContent.java +++ /dev/null @@ -1,436 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetConnectionResponseContent.Builder.class) -public final class GetConnectionResponseContent { - private final Optional name; - - private final Optional displayName; - - private final Optional> options; - - private final Optional id; - - private final Optional strategy; - - private final Optional> realms; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional showAsButton; - - private final Optional>> metadata; - - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Map additionalProperties; - - private GetConnectionResponseContent( - Optional name, - Optional displayName, - Optional> options, - Optional id, - Optional strategy, - Optional> realms, - Optional> enabledClients, - Optional isDomainConnection, - Optional showAsButton, - Optional>> metadata, - Optional authentication, - Optional connectedAccounts, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.options = options; - this.id = id; - this.strategy = strategy; - this.realms = realms; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.showAsButton = showAsButton; - this.metadata = metadata; - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the connection - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Connection name used in login screen - */ - @JsonProperty("display_name") - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - - /** - * @return The connection's identifier - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The type of the connection, related to the identity provider - */ - @JsonProperty("strategy") - public Optional getStrategy() { - return strategy; - } - - /** - * @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; - } - - /** - * @return DEPRECATED property. Use the GET /connections/:id/clients endpoint to get the ids of the clients for which the connection is enabled - */ - @JsonProperty("enabled_clients") - public Optional> getEnabledClients() { - return enabledClients; - } - - /** - * @return True if the connection is domain level - */ - @JsonProperty("is_domain_connection") - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - /** - * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. - */ - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @JsonProperty("metadata") - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("authentication") - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetConnectionResponseContent && equalTo((GetConnectionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetConnectionResponseContent other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && options.equals(other.options) - && id.equals(other.id) - && strategy.equals(other.strategy) - && realms.equals(other.realms) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && showAsButton.equals(other.showAsButton) - && metadata.equals(other.metadata) - && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.options, - this.id, - this.strategy, - this.realms, - this.enabledClients, - this.isDomainConnection, - this.showAsButton, - this.metadata, - this.authentication, - this.connectedAccounts); - } - - @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 displayName = Optional.empty(); - - private Optional> options = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional strategy = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetConnectionResponseContent other) { - name(other.getName()); - displayName(other.getDisplayName()); - options(other.getOptions()); - id(other.getId()); - strategy(other.getStrategy()); - realms(other.getRealms()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - showAsButton(other.getShowAsButton()); - metadata(other.getMetadata()); - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - return this; - } - - /** - *

The name of the connection

- */ - @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; - } - - /** - *

Connection name used in login screen

- */ - @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 = "options", nulls = Nulls.SKIP) - public Builder options(Optional> options) { - this.options = options; - return this; - } - - public Builder options(Map options) { - this.options = Optional.ofNullable(options); - return this; - } - - /** - *

The connection's 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 type of the connection, related to the identity provider

- */ - @JsonSetter(value = "strategy", nulls = Nulls.SKIP) - public Builder strategy(Optional strategy) { - this.strategy = strategy; - return this; - } - - public Builder strategy(String strategy) { - this.strategy = Optional.ofNullable(strategy); - 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.

- */ - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public Builder realms(Optional> realms) { - this.realms = realms; - return this; - } - - public Builder realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - /** - *

DEPRECATED property. Use the GET /connections/:id/clients endpoint to get the ids of the clients for which the connection is enabled

- */ - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - /** - *

True if the connection is domain level

- */ - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - /** - *

Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD.

- */ - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public Builder authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - public Builder authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public Builder connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - public Builder connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - public GetConnectionResponseContent build() { - return new GetConnectionResponseContent( - name, - displayName, - options, - id, - strategy, - realms, - enabledClients, - isDomainConnection, - showAsButton, - metadata, - authentication, - connectedAccounts, - 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 deleted file mode 100644 index fe0448bb0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetCustomDomainResponseContent.java +++ /dev/null @@ -1,615 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.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 = GetCustomDomainResponseContent.Builder.class) -public final class GetCustomDomainResponseContent { - private final String customDomainId; - - private final String domain; - - private final boolean primary; - - private final Optional isDefault; - - private final CustomDomainStatusFilterEnum status; - - private final CustomDomainTypeEnum type; - - private final Optional originDomainName; - - private final Optional verification; - - private final OptionalNullable customClientIpHeader; - - private final Optional tlsPolicy; - - private final Optional>> domainMetadata; - - private final Optional certificate; - - private final Optional relyingPartyIdentifier; - - private final Map additionalProperties; - - private GetCustomDomainResponseContent( - String customDomainId, - String domain, - boolean primary, - Optional isDefault, - CustomDomainStatusFilterEnum status, - CustomDomainTypeEnum type, - Optional originDomainName, - Optional verification, - OptionalNullable customClientIpHeader, - Optional tlsPolicy, - Optional>> domainMetadata, - Optional certificate, - Optional relyingPartyIdentifier, - Map additionalProperties) { - this.customDomainId = customDomainId; - this.domain = domain; - this.primary = primary; - this.isDefault = isDefault; - this.status = status; - this.type = type; - this.originDomainName = originDomainName; - this.verification = verification; - this.customClientIpHeader = customClientIpHeader; - this.tlsPolicy = tlsPolicy; - this.domainMetadata = domainMetadata; - this.certificate = certificate; - this.relyingPartyIdentifier = relyingPartyIdentifier; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the custom domain. - */ - @JsonProperty("custom_domain_id") - public String getCustomDomainId() { - return customDomainId; - } - - /** - * @return Domain name. - */ - @JsonProperty("domain") - public String getDomain() { - return domain; - } - - /** - * @return Whether this is a primary domain (true) or not (false). - */ - @JsonProperty("primary") - public boolean getPrimary() { - return primary; - } - - /** - * @return Whether this is the default custom domain (true) or not (false). - */ - @JsonProperty("is_default") - public Optional getIsDefault() { - return isDefault; - } - - @JsonProperty("status") - public CustomDomainStatusFilterEnum getStatus() { - return status; - } - - @JsonProperty("type") - public CustomDomainTypeEnum getType() { - return type; - } - - /** - * @return Intermediate address. - */ - @JsonProperty("origin_domain_name") - public Optional getOriginDomainName() { - return originDomainName; - } - - @JsonProperty("verification") - public Optional getVerification() { - return verification; - } - - /** - * @return The HTTP header to fetch the client's IP address - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_client_ip_header") - public OptionalNullable getCustomClientIpHeader() { - if (customClientIpHeader == null) { - return OptionalNullable.absent(); - } - return customClientIpHeader; - } - - /** - * @return The TLS version policy - */ - @JsonProperty("tls_policy") - public Optional getTlsPolicy() { - return tlsPolicy; - } - - @JsonProperty("domain_metadata") - public Optional>> getDomainMetadata() { - return domainMetadata; - } - - @JsonProperty("certificate") - public Optional getCertificate() { - return certificate; - } - - /** - * @return Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used. - */ - @JsonProperty("relying_party_identifier") - public Optional getRelyingPartyIdentifier() { - return relyingPartyIdentifier; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_client_ip_header") - private OptionalNullable _getCustomClientIpHeader() { - return customClientIpHeader; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetCustomDomainResponseContent && equalTo((GetCustomDomainResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetCustomDomainResponseContent other) { - return customDomainId.equals(other.customDomainId) - && domain.equals(other.domain) - && primary == other.primary - && isDefault.equals(other.isDefault) - && status.equals(other.status) - && type.equals(other.type) - && originDomainName.equals(other.originDomainName) - && verification.equals(other.verification) - && customClientIpHeader.equals(other.customClientIpHeader) - && tlsPolicy.equals(other.tlsPolicy) - && domainMetadata.equals(other.domainMetadata) - && certificate.equals(other.certificate) - && relyingPartyIdentifier.equals(other.relyingPartyIdentifier); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.customDomainId, - this.domain, - this.primary, - this.isDefault, - this.status, - this.type, - this.originDomainName, - this.verification, - this.customClientIpHeader, - this.tlsPolicy, - this.domainMetadata, - this.certificate, - this.relyingPartyIdentifier); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static CustomDomainIdStage builder() { - return new Builder(); - } - - public interface CustomDomainIdStage { - /** - *

ID of the custom domain.

- */ - DomainStage customDomainId(@NotNull String customDomainId); - - Builder from(GetCustomDomainResponseContent other); - } - - public interface DomainStage { - /** - *

Domain name.

- */ - PrimaryStage domain(@NotNull String domain); - } - - public interface PrimaryStage { - /** - *

Whether this is a primary domain (true) or not (false).

- */ - StatusStage primary(boolean primary); - } - - public interface StatusStage { - TypeStage status(@NotNull CustomDomainStatusFilterEnum status); - } - - public interface TypeStage { - _FinalStage type(@NotNull CustomDomainTypeEnum type); - } - - public interface _FinalStage { - GetCustomDomainResponseContent build(); - - /** - *

Whether this is the default custom domain (true) or not (false).

- */ - _FinalStage isDefault(Optional isDefault); - - _FinalStage isDefault(Boolean isDefault); - - /** - *

Intermediate address.

- */ - _FinalStage originDomainName(Optional originDomainName); - - _FinalStage originDomainName(String originDomainName); - - _FinalStage verification(Optional verification); - - _FinalStage verification(DomainVerification verification); - - /** - *

The HTTP header to fetch the client's IP address

- */ - _FinalStage customClientIpHeader(@Nullable OptionalNullable customClientIpHeader); - - _FinalStage customClientIpHeader(String customClientIpHeader); - - _FinalStage customClientIpHeader(Optional customClientIpHeader); - - _FinalStage customClientIpHeader(com.auth0.client.mgmt.core.Nullable customClientIpHeader); - - /** - *

The TLS version policy

- */ - _FinalStage tlsPolicy(Optional tlsPolicy); - - _FinalStage tlsPolicy(String tlsPolicy); - - _FinalStage domainMetadata(Optional>> domainMetadata); - - _FinalStage domainMetadata(Map> domainMetadata); - - _FinalStage certificate(Optional certificate); - - _FinalStage certificate(DomainCertificate certificate); - - /** - *

Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used.

- */ - _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier); - - _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements CustomDomainIdStage, DomainStage, PrimaryStage, StatusStage, TypeStage, _FinalStage { - private String customDomainId; - - private String domain; - - private boolean primary; - - private CustomDomainStatusFilterEnum status; - - private CustomDomainTypeEnum type; - - private Optional relyingPartyIdentifier = Optional.empty(); - - private Optional certificate = Optional.empty(); - - private Optional>> domainMetadata = Optional.empty(); - - private Optional tlsPolicy = Optional.empty(); - - private OptionalNullable customClientIpHeader = OptionalNullable.absent(); - - private Optional verification = Optional.empty(); - - private Optional originDomainName = Optional.empty(); - - private Optional isDefault = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetCustomDomainResponseContent other) { - customDomainId(other.getCustomDomainId()); - domain(other.getDomain()); - primary(other.getPrimary()); - isDefault(other.getIsDefault()); - status(other.getStatus()); - type(other.getType()); - originDomainName(other.getOriginDomainName()); - verification(other.getVerification()); - customClientIpHeader(other.getCustomClientIpHeader()); - tlsPolicy(other.getTlsPolicy()); - domainMetadata(other.getDomainMetadata()); - certificate(other.getCertificate()); - relyingPartyIdentifier(other.getRelyingPartyIdentifier()); - return this; - } - - /** - *

ID of the custom domain.

- *

ID of the custom domain.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("custom_domain_id") - public DomainStage customDomainId(@NotNull String customDomainId) { - this.customDomainId = Objects.requireNonNull(customDomainId, "customDomainId must not be null"); - return this; - } - - /** - *

Domain name.

- *

Domain name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("domain") - public PrimaryStage domain(@NotNull String domain) { - this.domain = Objects.requireNonNull(domain, "domain must not be null"); - return this; - } - - /** - *

Whether this is a primary domain (true) or not (false).

- *

Whether this is a primary domain (true) or not (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("primary") - public StatusStage primary(boolean primary) { - this.primary = primary; - return this; - } - - @java.lang.Override - @JsonSetter("status") - public TypeStage status(@NotNull CustomDomainStatusFilterEnum status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull CustomDomainTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier) { - this.relyingPartyIdentifier = Optional.ofNullable(relyingPartyIdentifier); - return this; - } - - /** - *

Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used.

- */ - @java.lang.Override - @JsonSetter(value = "relying_party_identifier", nulls = Nulls.SKIP) - public _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier) { - this.relyingPartyIdentifier = relyingPartyIdentifier; - return this; - } - - @java.lang.Override - public _FinalStage certificate(DomainCertificate certificate) { - this.certificate = Optional.ofNullable(certificate); - return this; - } - - @java.lang.Override - @JsonSetter(value = "certificate", nulls = Nulls.SKIP) - public _FinalStage certificate(Optional certificate) { - this.certificate = certificate; - return this; - } - - @java.lang.Override - public _FinalStage domainMetadata(Map> domainMetadata) { - this.domainMetadata = Optional.ofNullable(domainMetadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "domain_metadata", nulls = Nulls.SKIP) - public _FinalStage domainMetadata(Optional>> domainMetadata) { - this.domainMetadata = domainMetadata; - return this; - } - - /** - *

The TLS version policy

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage tlsPolicy(String tlsPolicy) { - this.tlsPolicy = Optional.ofNullable(tlsPolicy); - return this; - } - - /** - *

The TLS version policy

- */ - @java.lang.Override - @JsonSetter(value = "tls_policy", nulls = Nulls.SKIP) - public _FinalStage tlsPolicy(Optional tlsPolicy) { - this.tlsPolicy = tlsPolicy; - return this; - } - - /** - *

The HTTP header to fetch the client's IP address

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage customClientIpHeader(com.auth0.client.mgmt.core.Nullable customClientIpHeader) { - if (customClientIpHeader.isNull()) { - this.customClientIpHeader = OptionalNullable.ofNull(); - } else if (customClientIpHeader.isEmpty()) { - this.customClientIpHeader = OptionalNullable.absent(); - } else { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader.get()); - } - return this; - } - - /** - *

The HTTP header to fetch the client's IP address

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage customClientIpHeader(Optional customClientIpHeader) { - if (customClientIpHeader.isPresent()) { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader.get()); - } else { - this.customClientIpHeader = OptionalNullable.absent(); - } - return this; - } - - /** - *

The HTTP header to fetch the client's IP address

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage customClientIpHeader(String customClientIpHeader) { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader); - return this; - } - - /** - *

The HTTP header to fetch the client's IP address

- */ - @java.lang.Override - @JsonSetter(value = "custom_client_ip_header", nulls = Nulls.SKIP) - public _FinalStage customClientIpHeader(@Nullable OptionalNullable customClientIpHeader) { - this.customClientIpHeader = customClientIpHeader; - return this; - } - - @java.lang.Override - public _FinalStage verification(DomainVerification verification) { - this.verification = Optional.ofNullable(verification); - return this; - } - - @java.lang.Override - @JsonSetter(value = "verification", nulls = Nulls.SKIP) - public _FinalStage verification(Optional verification) { - this.verification = verification; - return this; - } - - /** - *

Intermediate address.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage originDomainName(String originDomainName) { - this.originDomainName = Optional.ofNullable(originDomainName); - return this; - } - - /** - *

Intermediate address.

- */ - @java.lang.Override - @JsonSetter(value = "origin_domain_name", nulls = Nulls.SKIP) - public _FinalStage originDomainName(Optional originDomainName) { - this.originDomainName = originDomainName; - return this; - } - - /** - *

Whether this is the default custom domain (true) or not (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage isDefault(Boolean isDefault) { - this.isDefault = Optional.ofNullable(isDefault); - return this; - } - - /** - *

Whether this is the default custom domain (true) or not (false).

- */ - @java.lang.Override - @JsonSetter(value = "is_default", nulls = Nulls.SKIP) - public _FinalStage isDefault(Optional isDefault) { - this.isDefault = isDefault; - return this; - } - - @java.lang.Override - public GetCustomDomainResponseContent build() { - return new GetCustomDomainResponseContent( - customDomainId, - domain, - primary, - isDefault, - status, - type, - originDomainName, - verification, - customClientIpHeader, - tlsPolicy, - domainMetadata, - certificate, - relyingPartyIdentifier, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetCustomSigningKeysResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetCustomSigningKeysResponseContent.java deleted file mode 100644 index a7392658e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetCustomSigningKeysResponseContent.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetCustomSigningKeysResponseContent.Builder.class) -public final class GetCustomSigningKeysResponseContent { - private final Optional> keys; - - private final Map additionalProperties; - - private GetCustomSigningKeysResponseContent( - Optional> keys, Map additionalProperties) { - this.keys = keys; - this.additionalProperties = additionalProperties; - } - - /** - * @return An array of custom public signing keys. - */ - @JsonProperty("keys") - public Optional> getKeys() { - return keys; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetCustomSigningKeysResponseContent - && equalTo((GetCustomSigningKeysResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetCustomSigningKeysResponseContent 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 Optional> keys = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetCustomSigningKeysResponseContent other) { - keys(other.getKeys()); - return this; - } - - /** - *

An array of custom public signing keys.

- */ - @JsonSetter(value = "keys", nulls = Nulls.SKIP) - public Builder keys(Optional> keys) { - this.keys = keys; - return this; - } - - public Builder keys(List keys) { - this.keys = Optional.ofNullable(keys); - return this; - } - - public GetCustomSigningKeysResponseContent build() { - return new GetCustomSigningKeysResponseContent(keys, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetDailyStatsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetDailyStatsRequestParameters.java deleted file mode 100644 index 5c044597e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetDailyStatsRequestParameters.java +++ /dev/null @@ -1,193 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetDailyStatsRequestParameters.Builder.class) -public final class GetDailyStatsRequestParameters { - private final OptionalNullable from; - - private final OptionalNullable to; - - private final Map additionalProperties; - - private GetDailyStatsRequestParameters( - OptionalNullable from, OptionalNullable to, Map additionalProperties) { - this.from = from; - this.to = to; - this.additionalProperties = additionalProperties; - } - - /** - * @return Optional first day of the date range (inclusive) in YYYYMMDD format. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - public OptionalNullable getFrom() { - if (from == null) { - return OptionalNullable.absent(); - } - return from; - } - - /** - * @return Optional last day of the date range (inclusive) in YYYYMMDD format. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("to") - public OptionalNullable getTo() { - if (to == null) { - return OptionalNullable.absent(); - } - 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; - return other instanceof GetDailyStatsRequestParameters && equalTo((GetDailyStatsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetDailyStatsRequestParameters other) { - return from.equals(other.from) && to.equals(other.to); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.from, this.to); - } - - @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 to = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetDailyStatsRequestParameters other) { - from(other.getFrom()); - to(other.getTo()); - return this; - } - - /** - *

Optional first day of the date range (inclusive) in YYYYMMDD format.

- */ - @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; - } - - /** - *

Optional last day of the date range (inclusive) in YYYYMMDD format.

- */ - @JsonSetter(value = "to", nulls = Nulls.SKIP) - public Builder to(@Nullable OptionalNullable to) { - this.to = to; - return this; - } - - public Builder to(String to) { - this.to = OptionalNullable.of(to); - return this; - } - - public Builder to(Optional to) { - if (to.isPresent()) { - this.to = OptionalNullable.of(to.get()); - } else { - this.to = OptionalNullable.absent(); - } - return this; - } - - public Builder to(com.auth0.client.mgmt.core.Nullable to) { - if (to.isNull()) { - this.to = OptionalNullable.ofNull(); - } else if (to.isEmpty()) { - this.to = OptionalNullable.absent(); - } else { - this.to = OptionalNullable.of(to.get()); - } - return this; - } - - public GetDailyStatsRequestParameters build() { - return new GetDailyStatsRequestParameters(from, to, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningDefaultMappingResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningDefaultMappingResponseContent.java deleted file mode 100644 index 150848431..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningDefaultMappingResponseContent.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetDirectoryProvisioningDefaultMappingResponseContent.Builder.class) -public final class GetDirectoryProvisioningDefaultMappingResponseContent { - private final Optional> mapping; - - private final Map additionalProperties; - - private GetDirectoryProvisioningDefaultMappingResponseContent( - Optional> mapping, Map additionalProperties) { - this.mapping = mapping; - this.additionalProperties = additionalProperties; - } - - /** - * @return The mapping between Auth0 and IDP user attributes - */ - @JsonProperty("mapping") - public Optional> getMapping() { - return mapping; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetDirectoryProvisioningDefaultMappingResponseContent - && equalTo((GetDirectoryProvisioningDefaultMappingResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetDirectoryProvisioningDefaultMappingResponseContent other) { - return mapping.equals(other.mapping); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.mapping); - } - - @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> mapping = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetDirectoryProvisioningDefaultMappingResponseContent other) { - mapping(other.getMapping()); - return this; - } - - /** - *

The mapping between Auth0 and IDP user attributes

- */ - @JsonSetter(value = "mapping", nulls = Nulls.SKIP) - public Builder mapping(Optional> mapping) { - this.mapping = mapping; - return this; - } - - public Builder mapping(List mapping) { - this.mapping = Optional.ofNullable(mapping); - return this; - } - - public GetDirectoryProvisioningDefaultMappingResponseContent build() { - return new GetDirectoryProvisioningDefaultMappingResponseContent(mapping, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningResponseContent.java deleted file mode 100644 index 0fc87627a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetDirectoryProvisioningResponseContent.java +++ /dev/null @@ -1,513 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = GetDirectoryProvisioningResponseContent.Builder.class) -public final class GetDirectoryProvisioningResponseContent { - private final String connectionId; - - private final String connectionName; - - private final String strategy; - - private final List mapping; - - private final boolean synchronizeAutomatically; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional lastSynchronizationAt; - - private final Optional lastSynchronizationStatus; - - private final Optional lastSynchronizationError; - - private final Map additionalProperties; - - private GetDirectoryProvisioningResponseContent( - String connectionId, - String connectionName, - String strategy, - List mapping, - boolean synchronizeAutomatically, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional lastSynchronizationAt, - Optional lastSynchronizationStatus, - Optional lastSynchronizationError, - Map additionalProperties) { - this.connectionId = connectionId; - this.connectionName = connectionName; - this.strategy = strategy; - this.mapping = mapping; - this.synchronizeAutomatically = synchronizeAutomatically; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.lastSynchronizationAt = lastSynchronizationAt; - this.lastSynchronizationStatus = lastSynchronizationStatus; - this.lastSynchronizationError = lastSynchronizationError; - this.additionalProperties = additionalProperties; - } - - /** - * @return The connection's identifier - */ - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - /** - * @return The connection's name - */ - @JsonProperty("connection_name") - public String getConnectionName() { - return connectionName; - } - - /** - * @return The connection's strategy - */ - @JsonProperty("strategy") - public String getStrategy() { - return strategy; - } - - /** - * @return The mapping between Auth0 and IDP user attributes - */ - @JsonProperty("mapping") - public List getMapping() { - return mapping; - } - - /** - * @return Whether periodic automatic synchronization is enabled - */ - @JsonProperty("synchronize_automatically") - public boolean getSynchronizeAutomatically() { - return synchronizeAutomatically; - } - - /** - * @return The timestamp at which the directory provisioning configuration was created - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return The timestamp at which the directory provisioning configuration was last updated - */ - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - /** - * @return The timestamp at which the connection was last synchronized - */ - @JsonProperty("last_synchronization_at") - public Optional getLastSynchronizationAt() { - return lastSynchronizationAt; - } - - /** - * @return The status of the last synchronization - */ - @JsonProperty("last_synchronization_status") - public Optional getLastSynchronizationStatus() { - return lastSynchronizationStatus; - } - - /** - * @return The error message of the last synchronization, if any - */ - @JsonProperty("last_synchronization_error") - public Optional getLastSynchronizationError() { - return lastSynchronizationError; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetDirectoryProvisioningResponseContent - && equalTo((GetDirectoryProvisioningResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetDirectoryProvisioningResponseContent other) { - return connectionId.equals(other.connectionId) - && connectionName.equals(other.connectionName) - && strategy.equals(other.strategy) - && mapping.equals(other.mapping) - && synchronizeAutomatically == other.synchronizeAutomatically - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && lastSynchronizationAt.equals(other.lastSynchronizationAt) - && lastSynchronizationStatus.equals(other.lastSynchronizationStatus) - && lastSynchronizationError.equals(other.lastSynchronizationError); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.connectionName, - this.strategy, - this.mapping, - this.synchronizeAutomatically, - this.createdAt, - this.updatedAt, - this.lastSynchronizationAt, - this.lastSynchronizationStatus, - this.lastSynchronizationError); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - /** - *

The connection's identifier

- */ - ConnectionNameStage connectionId(@NotNull String connectionId); - - Builder from(GetDirectoryProvisioningResponseContent other); - } - - public interface ConnectionNameStage { - /** - *

The connection's name

- */ - StrategyStage connectionName(@NotNull String connectionName); - } - - public interface StrategyStage { - /** - *

The connection's strategy

- */ - SynchronizeAutomaticallyStage strategy(@NotNull String strategy); - } - - public interface SynchronizeAutomaticallyStage { - /** - *

Whether periodic automatic synchronization is enabled

- */ - CreatedAtStage synchronizeAutomatically(boolean synchronizeAutomatically); - } - - public interface CreatedAtStage { - /** - *

The timestamp at which the directory provisioning configuration was created

- */ - UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); - } - - public interface UpdatedAtStage { - /** - *

The timestamp at which the directory provisioning configuration was last updated

- */ - _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); - } - - public interface _FinalStage { - GetDirectoryProvisioningResponseContent build(); - - /** - *

The mapping between Auth0 and IDP user attributes

- */ - _FinalStage mapping(List mapping); - - _FinalStage addMapping(DirectoryProvisioningMappingItem mapping); - - _FinalStage addAllMapping(List mapping); - - /** - *

The timestamp at which the connection was last synchronized

- */ - _FinalStage lastSynchronizationAt(Optional lastSynchronizationAt); - - _FinalStage lastSynchronizationAt(OffsetDateTime lastSynchronizationAt); - - /** - *

The status of the last synchronization

- */ - _FinalStage lastSynchronizationStatus(Optional lastSynchronizationStatus); - - _FinalStage lastSynchronizationStatus(String lastSynchronizationStatus); - - /** - *

The error message of the last synchronization, if any

- */ - _FinalStage lastSynchronizationError(Optional lastSynchronizationError); - - _FinalStage lastSynchronizationError(String lastSynchronizationError); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements ConnectionIdStage, - ConnectionNameStage, - StrategyStage, - SynchronizeAutomaticallyStage, - CreatedAtStage, - UpdatedAtStage, - _FinalStage { - private String connectionId; - - private String connectionName; - - private String strategy; - - private boolean synchronizeAutomatically; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private Optional lastSynchronizationError = Optional.empty(); - - private Optional lastSynchronizationStatus = Optional.empty(); - - private Optional lastSynchronizationAt = Optional.empty(); - - private List mapping = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetDirectoryProvisioningResponseContent other) { - connectionId(other.getConnectionId()); - connectionName(other.getConnectionName()); - strategy(other.getStrategy()); - mapping(other.getMapping()); - synchronizeAutomatically(other.getSynchronizeAutomatically()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - lastSynchronizationAt(other.getLastSynchronizationAt()); - lastSynchronizationStatus(other.getLastSynchronizationStatus()); - lastSynchronizationError(other.getLastSynchronizationError()); - return this; - } - - /** - *

The connection's identifier

- *

The connection's identifier

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("connection_id") - public ConnectionNameStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - /** - *

The connection's name

- *

The connection's name

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("connection_name") - public StrategyStage connectionName(@NotNull String connectionName) { - this.connectionName = Objects.requireNonNull(connectionName, "connectionName must not be null"); - return this; - } - - /** - *

The connection's strategy

- *

The connection's strategy

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("strategy") - public SynchronizeAutomaticallyStage strategy(@NotNull String strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("synchronize_automatically") - public CreatedAtStage synchronizeAutomatically(boolean synchronizeAutomatically) { - this.synchronizeAutomatically = synchronizeAutomatically; - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("created_at") - public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { - this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); - return this; - } - - /** - *

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. - */ - @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 error message of the last synchronization, if any

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage lastSynchronizationError(String lastSynchronizationError) { - this.lastSynchronizationError = Optional.ofNullable(lastSynchronizationError); - return this; - } - - /** - *

The error message of the last synchronization, if any

- */ - @java.lang.Override - @JsonSetter(value = "last_synchronization_error", nulls = Nulls.SKIP) - public _FinalStage lastSynchronizationError(Optional lastSynchronizationError) { - this.lastSynchronizationError = lastSynchronizationError; - return this; - } - - /** - *

The status of the last synchronization

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage lastSynchronizationStatus(String lastSynchronizationStatus) { - this.lastSynchronizationStatus = Optional.ofNullable(lastSynchronizationStatus); - return this; - } - - /** - *

The status of the last synchronization

- */ - @java.lang.Override - @JsonSetter(value = "last_synchronization_status", nulls = Nulls.SKIP) - public _FinalStage lastSynchronizationStatus(Optional lastSynchronizationStatus) { - this.lastSynchronizationStatus = lastSynchronizationStatus; - return this; - } - - /** - *

The timestamp at which the connection was last synchronized

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage lastSynchronizationAt(OffsetDateTime lastSynchronizationAt) { - this.lastSynchronizationAt = Optional.ofNullable(lastSynchronizationAt); - return this; - } - - /** - *

The timestamp at which the connection was last synchronized

- */ - @java.lang.Override - @JsonSetter(value = "last_synchronization_at", nulls = Nulls.SKIP) - public _FinalStage lastSynchronizationAt(Optional lastSynchronizationAt) { - this.lastSynchronizationAt = lastSynchronizationAt; - return this; - } - - /** - *

The mapping between Auth0 and IDP user attributes

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addAllMapping(List mapping) { - if (mapping != null) { - this.mapping.addAll(mapping); - } - return this; - } - - /** - *

The mapping between Auth0 and IDP user attributes

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addMapping(DirectoryProvisioningMappingItem mapping) { - this.mapping.add(mapping); - return this; - } - - /** - *

The mapping between Auth0 and IDP user attributes

- */ - @java.lang.Override - @JsonSetter(value = "mapping", nulls = Nulls.SKIP) - public _FinalStage mapping(List mapping) { - this.mapping.clear(); - if (mapping != null) { - this.mapping.addAll(mapping); - } - return this; - } - - @java.lang.Override - public GetDirectoryProvisioningResponseContent build() { - return new GetDirectoryProvisioningResponseContent( - connectionId, - connectionName, - strategy, - mapping, - synchronizeAutomatically, - createdAt, - updatedAt, - lastSynchronizationAt, - lastSynchronizationStatus, - lastSynchronizationError, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetEmailProviderResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetEmailProviderResponseContent.java deleted file mode 100644 index 33b76c557..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetEmailProviderResponseContent.java +++ /dev/null @@ -1,212 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetEmailProviderResponseContent.Builder.class) -public final class GetEmailProviderResponseContent { - private final Optional name; - - private final Optional enabled; - - private final Optional defaultFromAddress; - - private final Optional credentials; - - private final Optional> settings; - - private final Map additionalProperties; - - private GetEmailProviderResponseContent( - Optional name, - Optional enabled, - Optional defaultFromAddress, - Optional credentials, - Optional> settings, - Map additionalProperties) { - this.name = name; - this.enabled = enabled; - this.defaultFromAddress = defaultFromAddress; - this.credentials = credentials; - this.settings = settings; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of the email provider. Can be mailgun, mandrill, sendgrid, ses, sparkpost, smtp, azure_cs, ms365, or custom. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Whether the provider is enabled (true) or disabled (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Email address to use as "from" when no other address specified. - */ - @JsonProperty("default_from_address") - public Optional getDefaultFromAddress() { - return defaultFromAddress; - } - - @JsonProperty("credentials") - public Optional getCredentials() { - return credentials; - } - - @JsonProperty("settings") - public Optional> getSettings() { - return settings; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetEmailProviderResponseContent && equalTo((GetEmailProviderResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetEmailProviderResponseContent other) { - return name.equals(other.name) - && enabled.equals(other.enabled) - && defaultFromAddress.equals(other.defaultFromAddress) - && credentials.equals(other.credentials) - && settings.equals(other.settings); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.enabled, this.defaultFromAddress, this.credentials, this.settings); - } - - @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 enabled = Optional.empty(); - - private Optional defaultFromAddress = Optional.empty(); - - private Optional credentials = Optional.empty(); - - private Optional> settings = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetEmailProviderResponseContent other) { - name(other.getName()); - enabled(other.getEnabled()); - defaultFromAddress(other.getDefaultFromAddress()); - credentials(other.getCredentials()); - settings(other.getSettings()); - return this; - } - - /** - *

Name of the email provider. Can be mailgun, mandrill, sendgrid, ses, sparkpost, smtp, azure_cs, ms365, or custom.

- */ - @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 the provider is enabled (true) or disabled (false).

- */ - @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; - } - - /** - *

Email address to use as "from" when no other address specified.

- */ - @JsonSetter(value = "default_from_address", nulls = Nulls.SKIP) - public Builder defaultFromAddress(Optional defaultFromAddress) { - this.defaultFromAddress = defaultFromAddress; - return this; - } - - public Builder defaultFromAddress(String defaultFromAddress) { - this.defaultFromAddress = Optional.ofNullable(defaultFromAddress); - return this; - } - - @JsonSetter(value = "credentials", nulls = Nulls.SKIP) - public Builder credentials(Optional credentials) { - this.credentials = credentials; - return this; - } - - public Builder credentials(EmailProviderCredentials credentials) { - this.credentials = Optional.ofNullable(credentials); - return this; - } - - @JsonSetter(value = "settings", nulls = Nulls.SKIP) - public Builder settings(Optional> settings) { - this.settings = settings; - return this; - } - - public Builder settings(Map settings) { - this.settings = Optional.ofNullable(settings); - return this; - } - - public GetEmailProviderResponseContent build() { - return new GetEmailProviderResponseContent( - name, enabled, defaultFromAddress, credentials, settings, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetEmailTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetEmailTemplateResponseContent.java deleted file mode 100644 index 8907b4e80..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetEmailTemplateResponseContent.java +++ /dev/null @@ -1,569 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetEmailTemplateResponseContent.Builder.class) -public final class GetEmailTemplateResponseContent { - private final Optional template; - - private final OptionalNullable body; - - private final OptionalNullable from; - - private final OptionalNullable resultUrl; - - private final OptionalNullable subject; - - private final OptionalNullable syntax; - - private final OptionalNullable urlLifetimeInSeconds; - - private final Optional includeEmailInRedirect; - - private final OptionalNullable enabled; - - private final Map additionalProperties; - - private GetEmailTemplateResponseContent( - Optional template, - OptionalNullable body, - OptionalNullable from, - OptionalNullable resultUrl, - OptionalNullable subject, - OptionalNullable syntax, - OptionalNullable urlLifetimeInSeconds, - Optional includeEmailInRedirect, - OptionalNullable enabled, - Map additionalProperties) { - this.template = template; - this.body = body; - this.from = from; - this.resultUrl = resultUrl; - this.subject = subject; - this.syntax = syntax; - this.urlLifetimeInSeconds = urlLifetimeInSeconds; - this.includeEmailInRedirect = includeEmailInRedirect; - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("template") - public Optional getTemplate() { - return template; - } - - /** - * @return Body of the email template. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("body") - public OptionalNullable getBody() { - if (body == null) { - return OptionalNullable.absent(); - } - return body; - } - - /** - * @return Senders from email address. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - public OptionalNullable getFrom() { - if (from == null) { - return OptionalNullable.absent(); - } - return from; - } - - /** - * @return URL to redirect the user to after a successful action. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("resultUrl") - public OptionalNullable getResultUrl() { - if (resultUrl == null) { - return OptionalNullable.absent(); - } - return resultUrl; - } - - /** - * @return Subject line of the email. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("subject") - public OptionalNullable getSubject() { - if (subject == null) { - return OptionalNullable.absent(); - } - return subject; - } - - /** - * @return Syntax of the template body. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("syntax") - public OptionalNullable getSyntax() { - if (syntax == null) { - return OptionalNullable.absent(); - } - return syntax; - } - - /** - * @return Lifetime in seconds that the link within the email will be valid for. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("urlLifetimeInSeconds") - public OptionalNullable getUrlLifetimeInSeconds() { - if (urlLifetimeInSeconds == null) { - return OptionalNullable.absent(); - } - return urlLifetimeInSeconds; - } - - /** - * @return Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. - */ - @JsonProperty("includeEmailInRedirect") - public Optional getIncludeEmailInRedirect() { - return includeEmailInRedirect; - } - - /** - * @return Whether the template is enabled (true) or disabled (false). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("enabled") - public OptionalNullable getEnabled() { - if (enabled == null) { - return OptionalNullable.absent(); - } - return enabled; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("body") - private OptionalNullable _getBody() { - return body; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - private OptionalNullable _getFrom() { - return from; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("resultUrl") - private OptionalNullable _getResultUrl() { - return resultUrl; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("subject") - private OptionalNullable _getSubject() { - return subject; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("syntax") - private OptionalNullable _getSyntax() { - return syntax; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("urlLifetimeInSeconds") - private OptionalNullable _getUrlLifetimeInSeconds() { - return urlLifetimeInSeconds; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("enabled") - private OptionalNullable _getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetEmailTemplateResponseContent && equalTo((GetEmailTemplateResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetEmailTemplateResponseContent other) { - return template.equals(other.template) - && body.equals(other.body) - && from.equals(other.from) - && resultUrl.equals(other.resultUrl) - && subject.equals(other.subject) - && syntax.equals(other.syntax) - && urlLifetimeInSeconds.equals(other.urlLifetimeInSeconds) - && includeEmailInRedirect.equals(other.includeEmailInRedirect) - && enabled.equals(other.enabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.template, - this.body, - this.from, - this.resultUrl, - this.subject, - this.syntax, - this.urlLifetimeInSeconds, - this.includeEmailInRedirect, - 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 template = Optional.empty(); - - private OptionalNullable body = OptionalNullable.absent(); - - private OptionalNullable from = OptionalNullable.absent(); - - private OptionalNullable resultUrl = OptionalNullable.absent(); - - private OptionalNullable subject = OptionalNullable.absent(); - - private OptionalNullable syntax = OptionalNullable.absent(); - - private OptionalNullable urlLifetimeInSeconds = OptionalNullable.absent(); - - private Optional includeEmailInRedirect = Optional.empty(); - - private OptionalNullable enabled = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetEmailTemplateResponseContent other) { - template(other.getTemplate()); - body(other.getBody()); - from(other.getFrom()); - resultUrl(other.getResultUrl()); - subject(other.getSubject()); - syntax(other.getSyntax()); - urlLifetimeInSeconds(other.getUrlLifetimeInSeconds()); - includeEmailInRedirect(other.getIncludeEmailInRedirect()); - enabled(other.getEnabled()); - return this; - } - - @JsonSetter(value = "template", nulls = Nulls.SKIP) - public Builder template(Optional template) { - this.template = template; - return this; - } - - public Builder template(EmailTemplateNameEnum template) { - this.template = Optional.ofNullable(template); - return this; - } - - /** - *

Body of the email template.

- */ - @JsonSetter(value = "body", nulls = Nulls.SKIP) - public Builder body(@Nullable OptionalNullable body) { - this.body = body; - return this; - } - - public Builder body(String body) { - this.body = OptionalNullable.of(body); - return this; - } - - public Builder body(Optional body) { - if (body.isPresent()) { - this.body = OptionalNullable.of(body.get()); - } else { - this.body = OptionalNullable.absent(); - } - return this; - } - - public Builder body(com.auth0.client.mgmt.core.Nullable body) { - if (body.isNull()) { - this.body = OptionalNullable.ofNull(); - } else if (body.isEmpty()) { - this.body = OptionalNullable.absent(); - } else { - this.body = OptionalNullable.of(body.get()); - } - return this; - } - - /** - *

Senders from email address.

- */ - @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; - } - - /** - *

URL to redirect the user to after a successful action.

- */ - @JsonSetter(value = "resultUrl", nulls = Nulls.SKIP) - public Builder resultUrl(@Nullable OptionalNullable resultUrl) { - this.resultUrl = resultUrl; - return this; - } - - public Builder resultUrl(String resultUrl) { - this.resultUrl = OptionalNullable.of(resultUrl); - return this; - } - - public Builder resultUrl(Optional resultUrl) { - if (resultUrl.isPresent()) { - this.resultUrl = OptionalNullable.of(resultUrl.get()); - } else { - this.resultUrl = OptionalNullable.absent(); - } - return this; - } - - public Builder resultUrl(com.auth0.client.mgmt.core.Nullable resultUrl) { - if (resultUrl.isNull()) { - this.resultUrl = OptionalNullable.ofNull(); - } else if (resultUrl.isEmpty()) { - this.resultUrl = OptionalNullable.absent(); - } else { - this.resultUrl = OptionalNullable.of(resultUrl.get()); - } - return this; - } - - /** - *

Subject line of the email.

- */ - @JsonSetter(value = "subject", nulls = Nulls.SKIP) - public Builder subject(@Nullable OptionalNullable subject) { - this.subject = subject; - return this; - } - - public Builder subject(String subject) { - this.subject = OptionalNullable.of(subject); - return this; - } - - public Builder subject(Optional subject) { - if (subject.isPresent()) { - this.subject = OptionalNullable.of(subject.get()); - } else { - this.subject = OptionalNullable.absent(); - } - return this; - } - - public Builder subject(com.auth0.client.mgmt.core.Nullable subject) { - if (subject.isNull()) { - this.subject = OptionalNullable.ofNull(); - } else if (subject.isEmpty()) { - this.subject = OptionalNullable.absent(); - } else { - this.subject = OptionalNullable.of(subject.get()); - } - return this; - } - - /** - *

Syntax of the template body.

- */ - @JsonSetter(value = "syntax", nulls = Nulls.SKIP) - public Builder syntax(@Nullable OptionalNullable syntax) { - this.syntax = syntax; - return this; - } - - public Builder syntax(String syntax) { - this.syntax = OptionalNullable.of(syntax); - return this; - } - - public Builder syntax(Optional syntax) { - if (syntax.isPresent()) { - this.syntax = OptionalNullable.of(syntax.get()); - } else { - this.syntax = OptionalNullable.absent(); - } - return this; - } - - public Builder syntax(com.auth0.client.mgmt.core.Nullable syntax) { - if (syntax.isNull()) { - this.syntax = OptionalNullable.ofNull(); - } else if (syntax.isEmpty()) { - this.syntax = OptionalNullable.absent(); - } else { - this.syntax = OptionalNullable.of(syntax.get()); - } - return this; - } - - /** - *

Lifetime in seconds that the link within the email will be valid for.

- */ - @JsonSetter(value = "urlLifetimeInSeconds", nulls = Nulls.SKIP) - public Builder urlLifetimeInSeconds(@Nullable OptionalNullable urlLifetimeInSeconds) { - this.urlLifetimeInSeconds = urlLifetimeInSeconds; - return this; - } - - public Builder urlLifetimeInSeconds(Double urlLifetimeInSeconds) { - this.urlLifetimeInSeconds = OptionalNullable.of(urlLifetimeInSeconds); - return this; - } - - public Builder urlLifetimeInSeconds(Optional urlLifetimeInSeconds) { - if (urlLifetimeInSeconds.isPresent()) { - this.urlLifetimeInSeconds = OptionalNullable.of(urlLifetimeInSeconds.get()); - } else { - this.urlLifetimeInSeconds = OptionalNullable.absent(); - } - return this; - } - - public Builder urlLifetimeInSeconds(com.auth0.client.mgmt.core.Nullable urlLifetimeInSeconds) { - if (urlLifetimeInSeconds.isNull()) { - this.urlLifetimeInSeconds = OptionalNullable.ofNull(); - } else if (urlLifetimeInSeconds.isEmpty()) { - this.urlLifetimeInSeconds = OptionalNullable.absent(); - } else { - this.urlLifetimeInSeconds = OptionalNullable.of(urlLifetimeInSeconds.get()); - } - return this; - } - - /** - *

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

- */ - @JsonSetter(value = "includeEmailInRedirect", nulls = Nulls.SKIP) - public Builder includeEmailInRedirect(Optional includeEmailInRedirect) { - this.includeEmailInRedirect = includeEmailInRedirect; - return this; - } - - public Builder includeEmailInRedirect(Boolean includeEmailInRedirect) { - this.includeEmailInRedirect = Optional.ofNullable(includeEmailInRedirect); - return this; - } - - /** - *

Whether the template is enabled (true) or disabled (false).

- */ - @JsonSetter(value = "enabled", nulls = Nulls.SKIP) - public Builder enabled(@Nullable OptionalNullable enabled) { - this.enabled = enabled; - return this; - } - - public Builder enabled(Boolean enabled) { - this.enabled = OptionalNullable.of(enabled); - return this; - } - - public Builder enabled(Optional enabled) { - if (enabled.isPresent()) { - this.enabled = OptionalNullable.of(enabled.get()); - } else { - this.enabled = OptionalNullable.absent(); - } - return this; - } - - public Builder enabled(com.auth0.client.mgmt.core.Nullable enabled) { - if (enabled.isNull()) { - this.enabled = OptionalNullable.ofNull(); - } else if (enabled.isEmpty()) { - this.enabled = OptionalNullable.absent(); - } else { - this.enabled = OptionalNullable.of(enabled.get()); - } - return this; - } - - public GetEmailTemplateResponseContent build() { - return new GetEmailTemplateResponseContent( - template, - body, - from, - resultUrl, - subject, - syntax, - urlLifetimeInSeconds, - includeEmailInRedirect, - enabled, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetEncryptionKeyResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetEncryptionKeyResponseContent.java deleted file mode 100644 index 82364113d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetEncryptionKeyResponseContent.java +++ /dev/null @@ -1,416 +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.NotNull; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetEncryptionKeyResponseContent.Builder.class) -public final class GetEncryptionKeyResponseContent { - private final String kid; - - private final EncryptionKeyType type; - - private final EncryptionKeyState state; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final OptionalNullable parentKid; - - private final OptionalNullable publicKey; - - private final Map additionalProperties; - - private GetEncryptionKeyResponseContent( - String kid, - EncryptionKeyType type, - EncryptionKeyState state, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - OptionalNullable parentKid, - OptionalNullable publicKey, - Map additionalProperties) { - this.kid = kid; - this.type = type; - this.state = state; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.parentKid = parentKid; - this.publicKey = publicKey; - this.additionalProperties = additionalProperties; - } - - /** - * @return Key ID - */ - @JsonProperty("kid") - public String getKid() { - return kid; - } - - @JsonProperty("type") - public EncryptionKeyType getType() { - return type; - } - - @JsonProperty("state") - public EncryptionKeyState getState() { - return state; - } - - /** - * @return Key creation timestamp - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return Key update timestamp - */ - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - /** - * @return ID of parent wrapping key - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("parent_kid") - public OptionalNullable getParentKid() { - if (parentKid == null) { - return OptionalNullable.absent(); - } - return parentKid; - } - - /** - * @return Public key in PEM format - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("public_key") - public OptionalNullable getPublicKey() { - if (publicKey == null) { - return OptionalNullable.absent(); - } - return publicKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("parent_kid") - private OptionalNullable _getParentKid() { - return parentKid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("public_key") - private OptionalNullable _getPublicKey() { - return publicKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetEncryptionKeyResponseContent && equalTo((GetEncryptionKeyResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetEncryptionKeyResponseContent other) { - return kid.equals(other.kid) - && type.equals(other.type) - && state.equals(other.state) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && parentKid.equals(other.parentKid) - && publicKey.equals(other.publicKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.kid, this.type, this.state, this.createdAt, this.updatedAt, this.parentKid, this.publicKey); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static KidStage builder() { - return new Builder(); - } - - public interface KidStage { - /** - *

Key ID

- */ - TypeStage kid(@NotNull String kid); - - Builder from(GetEncryptionKeyResponseContent other); - } - - public interface TypeStage { - StateStage type(@NotNull EncryptionKeyType type); - } - - public interface StateStage { - CreatedAtStage state(@NotNull EncryptionKeyState state); - } - - public interface CreatedAtStage { - /** - *

Key creation timestamp

- */ - UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); - } - - public interface UpdatedAtStage { - /** - *

Key update timestamp

- */ - _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); - } - - public interface _FinalStage { - GetEncryptionKeyResponseContent build(); - - /** - *

ID of parent wrapping key

- */ - _FinalStage parentKid(@Nullable OptionalNullable parentKid); - - _FinalStage parentKid(String parentKid); - - _FinalStage parentKid(Optional parentKid); - - _FinalStage parentKid(com.auth0.client.mgmt.core.Nullable parentKid); - - /** - *

Public key in PEM format

- */ - _FinalStage publicKey(@Nullable OptionalNullable publicKey); - - _FinalStage publicKey(String publicKey); - - _FinalStage publicKey(Optional publicKey); - - _FinalStage publicKey(com.auth0.client.mgmt.core.Nullable publicKey); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements KidStage, TypeStage, StateStage, CreatedAtStage, UpdatedAtStage, _FinalStage { - private String kid; - - private EncryptionKeyType type; - - private EncryptionKeyState state; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private OptionalNullable publicKey = OptionalNullable.absent(); - - private OptionalNullable parentKid = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetEncryptionKeyResponseContent other) { - kid(other.getKid()); - type(other.getType()); - state(other.getState()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - parentKid(other.getParentKid()); - publicKey(other.getPublicKey()); - return this; - } - - /** - *

Key ID

- *

Key ID

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("kid") - public TypeStage kid(@NotNull String kid) { - this.kid = Objects.requireNonNull(kid, "kid must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public StateStage type(@NotNull EncryptionKeyType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("state") - public CreatedAtStage state(@NotNull EncryptionKeyState state) { - this.state = Objects.requireNonNull(state, "state must not be null"); - return this; - } - - /** - *

Key creation timestamp

- *

Key creation timestamp

- * @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; - } - - /** - *

Key update timestamp

- *

Key update timestamp

- * @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; - } - - /** - *

Public key in PEM format

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage publicKey(com.auth0.client.mgmt.core.Nullable publicKey) { - if (publicKey.isNull()) { - this.publicKey = OptionalNullable.ofNull(); - } else if (publicKey.isEmpty()) { - this.publicKey = OptionalNullable.absent(); - } else { - this.publicKey = OptionalNullable.of(publicKey.get()); - } - return this; - } - - /** - *

Public key in PEM format

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage publicKey(Optional publicKey) { - if (publicKey.isPresent()) { - this.publicKey = OptionalNullable.of(publicKey.get()); - } else { - this.publicKey = OptionalNullable.absent(); - } - return this; - } - - /** - *

Public key in PEM format

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage publicKey(String publicKey) { - this.publicKey = OptionalNullable.of(publicKey); - return this; - } - - /** - *

Public key in PEM format

- */ - @java.lang.Override - @JsonSetter(value = "public_key", nulls = Nulls.SKIP) - public _FinalStage publicKey(@Nullable OptionalNullable publicKey) { - this.publicKey = publicKey; - return this; - } - - /** - *

ID of parent wrapping key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage parentKid(com.auth0.client.mgmt.core.Nullable parentKid) { - if (parentKid.isNull()) { - this.parentKid = OptionalNullable.ofNull(); - } else if (parentKid.isEmpty()) { - this.parentKid = OptionalNullable.absent(); - } else { - this.parentKid = OptionalNullable.of(parentKid.get()); - } - return this; - } - - /** - *

ID of parent wrapping key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage parentKid(Optional parentKid) { - if (parentKid.isPresent()) { - this.parentKid = OptionalNullable.of(parentKid.get()); - } else { - this.parentKid = OptionalNullable.absent(); - } - return this; - } - - /** - *

ID of parent wrapping key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage parentKid(String parentKid) { - this.parentKid = OptionalNullable.of(parentKid); - return this; - } - - /** - *

ID of parent wrapping key

- */ - @java.lang.Override - @JsonSetter(value = "parent_kid", nulls = Nulls.SKIP) - public _FinalStage parentKid(@Nullable OptionalNullable parentKid) { - this.parentKid = parentKid; - return this; - } - - @java.lang.Override - public GetEncryptionKeyResponseContent build() { - return new GetEncryptionKeyResponseContent( - kid, type, state, createdAt, updatedAt, parentKid, publicKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetEventStreamDeliveryHistoryResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetEventStreamDeliveryHistoryResponseContent.java deleted file mode 100644 index 4c7b22948..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetEventStreamDeliveryHistoryResponseContent.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = GetEventStreamDeliveryHistoryResponseContent.Builder.class) -public final class GetEventStreamDeliveryHistoryResponseContent { - private final String id; - - private final String eventStreamId; - - private final EventStreamDeliveryStatusEnum status; - - private final EventStreamDeliveryEventTypeEnum eventType; - - private final List attempts; - - private final Optional event; - - private final Map additionalProperties; - - private GetEventStreamDeliveryHistoryResponseContent( - String id, - String eventStreamId, - EventStreamDeliveryStatusEnum status, - EventStreamDeliveryEventTypeEnum eventType, - List attempts, - Optional event, - Map additionalProperties) { - this.id = id; - this.eventStreamId = eventStreamId; - this.status = status; - this.eventType = eventType; - this.attempts = attempts; - this.event = event; - this.additionalProperties = additionalProperties; - } - - /** - * @return Unique identifier for the delivery - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return Unique identifier for the event stream. - */ - @JsonProperty("event_stream_id") - public String getEventStreamId() { - return eventStreamId; - } - - @JsonProperty("status") - public EventStreamDeliveryStatusEnum getStatus() { - return status; - } - - @JsonProperty("event_type") - public EventStreamDeliveryEventTypeEnum getEventType() { - return eventType; - } - - /** - * @return Results of delivery attempts - */ - @JsonProperty("attempts") - public List getAttempts() { - return attempts; - } - - @JsonProperty("event") - public Optional getEvent() { - return event; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetEventStreamDeliveryHistoryResponseContent - && equalTo((GetEventStreamDeliveryHistoryResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetEventStreamDeliveryHistoryResponseContent other) { - return id.equals(other.id) - && eventStreamId.equals(other.eventStreamId) - && status.equals(other.status) - && eventType.equals(other.eventType) - && attempts.equals(other.attempts) - && event.equals(other.event); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.eventStreamId, this.status, this.eventType, this.attempts, this.event); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

Unique identifier for the delivery

- */ - EventStreamIdStage id(@NotNull String id); - - Builder from(GetEventStreamDeliveryHistoryResponseContent other); - } - - public interface EventStreamIdStage { - /** - *

Unique identifier for the event stream.

- */ - StatusStage eventStreamId(@NotNull String eventStreamId); - } - - public interface StatusStage { - EventTypeStage status(@NotNull EventStreamDeliveryStatusEnum status); - } - - public interface EventTypeStage { - _FinalStage eventType(@NotNull EventStreamDeliveryEventTypeEnum eventType); - } - - public interface _FinalStage { - GetEventStreamDeliveryHistoryResponseContent build(); - - /** - *

Results of delivery attempts

- */ - _FinalStage attempts(List attempts); - - _FinalStage addAttempts(EventStreamDeliveryAttempt attempts); - - _FinalStage addAllAttempts(List attempts); - - _FinalStage event(Optional event); - - _FinalStage event(EventStreamCloudEvent event); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, EventStreamIdStage, StatusStage, EventTypeStage, _FinalStage { - private String id; - - private String eventStreamId; - - private EventStreamDeliveryStatusEnum status; - - private EventStreamDeliveryEventTypeEnum eventType; - - private Optional event = Optional.empty(); - - private List attempts = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetEventStreamDeliveryHistoryResponseContent other) { - id(other.getId()); - eventStreamId(other.getEventStreamId()); - status(other.getStatus()); - eventType(other.getEventType()); - attempts(other.getAttempts()); - event(other.getEvent()); - return this; - } - - /** - *

Unique identifier for the delivery

- *

Unique identifier for the delivery

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("id") - public EventStreamIdStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("event_stream_id") - public StatusStage eventStreamId(@NotNull String eventStreamId) { - this.eventStreamId = Objects.requireNonNull(eventStreamId, "eventStreamId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("status") - public EventTypeStage status(@NotNull EventStreamDeliveryStatusEnum status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("event_type") - public _FinalStage eventType(@NotNull EventStreamDeliveryEventTypeEnum eventType) { - this.eventType = Objects.requireNonNull(eventType, "eventType must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage event(EventStreamCloudEvent event) { - this.event = Optional.ofNullable(event); - return this; - } - - @java.lang.Override - @JsonSetter(value = "event", nulls = Nulls.SKIP) - public _FinalStage event(Optional event) { - this.event = event; - return this; - } - - /** - *

Results of delivery attempts

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addAllAttempts(List attempts) { - if (attempts != null) { - this.attempts.addAll(attempts); - } - return this; - } - - /** - *

Results of delivery attempts

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addAttempts(EventStreamDeliveryAttempt attempts) { - this.attempts.add(attempts); - return this; - } - - /** - *

Results of delivery attempts

- */ - @java.lang.Override - @JsonSetter(value = "attempts", nulls = Nulls.SKIP) - public _FinalStage attempts(List attempts) { - this.attempts.clear(); - if (attempts != null) { - this.attempts.addAll(attempts); - } - return this; - } - - @java.lang.Override - public GetEventStreamDeliveryHistoryResponseContent build() { - return new GetEventStreamDeliveryHistoryResponseContent( - id, eventStreamId, status, eventType, attempts, event, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetEventStreamResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetEventStreamResponseContent.java deleted file mode 100644 index ca3fd3d8e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetEventStreamResponseContent.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = GetEventStreamResponseContent.Deserializer.class) -public final class GetEventStreamResponseContent { - private final Object value; - - private final int type; - - private GetEventStreamResponseContent(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((EventStreamWebhookResponseContent) this.value); - } else if (this.type == 1) { - return visitor.visit((EventStreamEventBridgeResponseContent) this.value); - } else if (this.type == 2) { - return visitor.visit((EventStreamActionResponseContent) 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 GetEventStreamResponseContent && equalTo((GetEventStreamResponseContent) other); - } - - private boolean equalTo(GetEventStreamResponseContent 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 GetEventStreamResponseContent of(EventStreamWebhookResponseContent value) { - return new GetEventStreamResponseContent(value, 0); - } - - public static GetEventStreamResponseContent of(EventStreamEventBridgeResponseContent value) { - return new GetEventStreamResponseContent(value, 1); - } - - public static GetEventStreamResponseContent of(EventStreamActionResponseContent value) { - return new GetEventStreamResponseContent(value, 2); - } - - public interface Visitor { - T visit(EventStreamWebhookResponseContent value); - - T visit(EventStreamEventBridgeResponseContent value); - - T visit(EventStreamActionResponseContent value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(GetEventStreamResponseContent.class); - } - - @java.lang.Override - public GetEventStreamResponseContent deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamWebhookResponseContent.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamEventBridgeResponseContent.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamActionResponseContent.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetFlowExecutionRequestParametersHydrateEnum.java b/src/main/java/com/auth0/client/mgmt/types/GetFlowExecutionRequestParametersHydrateEnum.java deleted file mode 100644 index aa8661dd0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetFlowExecutionRequestParametersHydrateEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class GetFlowExecutionRequestParametersHydrateEnum { - public static final GetFlowExecutionRequestParametersHydrateEnum DEBUG = - new GetFlowExecutionRequestParametersHydrateEnum(Value.DEBUG, "debug"); - - private final Value value; - - private final String string; - - GetFlowExecutionRequestParametersHydrateEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof GetFlowExecutionRequestParametersHydrateEnum - && this.string.equals(((GetFlowExecutionRequestParametersHydrateEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DEBUG: - return visitor.visitDebug(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static GetFlowExecutionRequestParametersHydrateEnum valueOf(String value) { - switch (value) { - case "debug": - return DEBUG; - default: - return new GetFlowExecutionRequestParametersHydrateEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - DEBUG, - - UNKNOWN - } - - public interface Visitor { - T visitDebug(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetFlowExecutionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetFlowExecutionResponseContent.java deleted file mode 100644 index c30bb03d9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetFlowExecutionResponseContent.java +++ /dev/null @@ -1,437 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = GetFlowExecutionResponseContent.Builder.class) -public final class GetFlowExecutionResponseContent { - private final String id; - - private final String traceId; - - private final Optional journeyId; - - private final String status; - - private final Optional> debug; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional startedAt; - - private final Optional endedAt; - - private final Map additionalProperties; - - private GetFlowExecutionResponseContent( - String id, - String traceId, - Optional journeyId, - String status, - Optional> debug, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional startedAt, - Optional endedAt, - Map additionalProperties) { - this.id = id; - this.traceId = traceId; - this.journeyId = journeyId; - this.status = status; - this.debug = debug; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.startedAt = startedAt; - this.endedAt = endedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flow execution identifier - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return Trace id - */ - @JsonProperty("trace_id") - public String getTraceId() { - return traceId; - } - - /** - * @return Journey id - */ - @JsonProperty("journey_id") - public Optional getJourneyId() { - return journeyId; - } - - /** - * @return Execution status - */ - @JsonProperty("status") - public String getStatus() { - return status; - } - - @JsonProperty("debug") - public Optional> getDebug() { - return debug; - } - - /** - * @return The ISO 8601 formatted date when this flow execution was created. - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return The ISO 8601 formatted date when this flow execution was updated. - */ - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - /** - * @return The ISO 8601 formatted date when this flow execution started. - */ - @JsonProperty("started_at") - public Optional getStartedAt() { - return startedAt; - } - - /** - * @return The ISO 8601 formatted date when this flow execution ended. - */ - @JsonProperty("ended_at") - public Optional getEndedAt() { - return endedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetFlowExecutionResponseContent && equalTo((GetFlowExecutionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetFlowExecutionResponseContent other) { - return id.equals(other.id) - && traceId.equals(other.traceId) - && journeyId.equals(other.journeyId) - && status.equals(other.status) - && debug.equals(other.debug) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && startedAt.equals(other.startedAt) - && endedAt.equals(other.endedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.traceId, - this.journeyId, - this.status, - this.debug, - this.createdAt, - this.updatedAt, - this.startedAt, - this.endedAt); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

Flow execution identifier

- */ - TraceIdStage id(@NotNull String id); - - Builder from(GetFlowExecutionResponseContent other); - } - - public interface TraceIdStage { - /** - *

Trace id

- */ - StatusStage traceId(@NotNull String traceId); - } - - public interface StatusStage { - /** - *

Execution status

- */ - CreatedAtStage status(@NotNull String status); - } - - public interface CreatedAtStage { - /** - *

The ISO 8601 formatted date when this flow execution was created.

- */ - UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); - } - - public interface UpdatedAtStage { - /** - *

The ISO 8601 formatted date when this flow execution was updated.

- */ - _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); - } - - public interface _FinalStage { - GetFlowExecutionResponseContent build(); - - /** - *

Journey id

- */ - _FinalStage journeyId(Optional journeyId); - - _FinalStage journeyId(String journeyId); - - _FinalStage debug(Optional> debug); - - _FinalStage debug(Map debug); - - /** - *

The ISO 8601 formatted date when this flow execution started.

- */ - _FinalStage startedAt(Optional startedAt); - - _FinalStage startedAt(OffsetDateTime startedAt); - - /** - *

The ISO 8601 formatted date when this flow execution ended.

- */ - _FinalStage endedAt(Optional endedAt); - - _FinalStage endedAt(OffsetDateTime endedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements IdStage, TraceIdStage, StatusStage, CreatedAtStage, UpdatedAtStage, _FinalStage { - private String id; - - private String traceId; - - private String status; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private Optional endedAt = Optional.empty(); - - private Optional startedAt = Optional.empty(); - - private Optional> debug = Optional.empty(); - - private Optional journeyId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetFlowExecutionResponseContent other) { - id(other.getId()); - traceId(other.getTraceId()); - journeyId(other.getJourneyId()); - status(other.getStatus()); - debug(other.getDebug()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - startedAt(other.getStartedAt()); - endedAt(other.getEndedAt()); - return this; - } - - /** - *

Flow execution identifier

- *

Flow execution identifier

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("id") - public TraceIdStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - /** - *

Trace id

- *

Trace id

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("trace_id") - public StatusStage traceId(@NotNull String traceId) { - this.traceId = Objects.requireNonNull(traceId, "traceId must not be null"); - return this; - } - - /** - *

Execution status

- *

Execution status

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("status") - public CreatedAtStage status(@NotNull String status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("created_at") - public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { - this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); - return this; - } - - /** - *

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. - */ - @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 ISO 8601 formatted date when this flow execution ended.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage endedAt(OffsetDateTime endedAt) { - this.endedAt = Optional.ofNullable(endedAt); - return this; - } - - /** - *

The ISO 8601 formatted date when this flow execution ended.

- */ - @java.lang.Override - @JsonSetter(value = "ended_at", nulls = Nulls.SKIP) - public _FinalStage endedAt(Optional endedAt) { - this.endedAt = endedAt; - return this; - } - - /** - *

The ISO 8601 formatted date when this flow execution started.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage startedAt(OffsetDateTime startedAt) { - this.startedAt = Optional.ofNullable(startedAt); - return this; - } - - /** - *

The ISO 8601 formatted date when this flow execution started.

- */ - @java.lang.Override - @JsonSetter(value = "started_at", nulls = Nulls.SKIP) - public _FinalStage startedAt(Optional startedAt) { - this.startedAt = startedAt; - return this; - } - - @java.lang.Override - public _FinalStage debug(Map debug) { - this.debug = Optional.ofNullable(debug); - return this; - } - - @java.lang.Override - @JsonSetter(value = "debug", nulls = Nulls.SKIP) - public _FinalStage debug(Optional> debug) { - this.debug = debug; - return this; - } - - /** - *

Journey id

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage journeyId(String journeyId) { - this.journeyId = Optional.ofNullable(journeyId); - return this; - } - - /** - *

Journey id

- */ - @java.lang.Override - @JsonSetter(value = "journey_id", nulls = Nulls.SKIP) - public _FinalStage journeyId(Optional journeyId) { - this.journeyId = journeyId; - return this; - } - - @java.lang.Override - public GetFlowExecutionResponseContent build() { - return new GetFlowExecutionResponseContent( - id, - traceId, - journeyId, - status, - debug, - createdAt, - updatedAt, - startedAt, - endedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetFlowRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetFlowRequestParameters.java deleted file mode 100644 index e526c2f07..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetFlowRequestParameters.java +++ /dev/null @@ -1,132 +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.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; -import java.util.Collections; -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 = GetFlowRequestParameters.Builder.class) -public final class GetFlowRequestParameters { - private final Optional> hydrate; - - private final Map additionalProperties; - - private GetFlowRequestParameters( - Optional> hydrate, Map additionalProperties) { - this.hydrate = hydrate; - this.additionalProperties = additionalProperties; - } - - /** - * @return hydration param - */ - @JsonIgnore - public Optional> getHydrate() { - if (hydrate == null) { - return Optional.empty(); - } - 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; - return other instanceof GetFlowRequestParameters && equalTo((GetFlowRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetFlowRequestParameters other) { - return hydrate.equals(other.hydrate); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.hydrate); - } - - @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> hydrate = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetFlowRequestParameters other) { - hydrate(other.getHydrate()); - return this; - } - - /** - *

hydration param

- */ - @JsonSetter(value = "hydrate", nulls = Nulls.SKIP) - public Builder hydrate(@Nullable Optional> hydrate) { - this.hydrate = hydrate; - return this; - } - - public Builder hydrate(List hydrate) { - this.hydrate = Optional.ofNullable(hydrate); - return this; - } - - public Builder hydrate(com.auth0.client.mgmt.core.Nullable> hydrate) { - if (hydrate.isNull()) { - this.hydrate = null; - } else if (hydrate.isEmpty()) { - this.hydrate = Optional.empty(); - } else { - this.hydrate = Optional.of(hydrate.get()); - } - return this; - } - - public Builder hydrate(GetFlowRequestParametersHydrateEnum hydrate) { - this.hydrate = Optional.of(Collections.singletonList(hydrate)); - return this; - } - - public GetFlowRequestParameters build() { - return new GetFlowRequestParameters(hydrate, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetFlowRequestParametersHydrateEnum.java b/src/main/java/com/auth0/client/mgmt/types/GetFlowRequestParametersHydrateEnum.java deleted file mode 100644 index cbed07c94..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetFlowRequestParametersHydrateEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class GetFlowRequestParametersHydrateEnum { - public static final GetFlowRequestParametersHydrateEnum FORM_COUNT = - new GetFlowRequestParametersHydrateEnum(Value.FORM_COUNT, "form_count"); - - public static final GetFlowRequestParametersHydrateEnum FORMS = - new GetFlowRequestParametersHydrateEnum(Value.FORMS, "forms"); - - private final Value value; - - private final String string; - - GetFlowRequestParametersHydrateEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof GetFlowRequestParametersHydrateEnum - && this.string.equals(((GetFlowRequestParametersHydrateEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FORM_COUNT: - return visitor.visitFormCount(); - case FORMS: - return visitor.visitForms(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static GetFlowRequestParametersHydrateEnum valueOf(String value) { - switch (value) { - case "form_count": - return FORM_COUNT; - case "forms": - return FORMS; - default: - return new GetFlowRequestParametersHydrateEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - FORM_COUNT, - - FORMS, - - UNKNOWN - } - - public interface Visitor { - T visitFormCount(); - - T visitForms(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetFlowResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetFlowResponseContent.java deleted file mode 100644 index 5f7ca895d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetFlowResponseContent.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = GetFlowResponseContent.Builder.class) -public final class GetFlowResponseContent { - private final String id; - - private final String name; - - private final Optional> actions; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional executedAt; - - private final Map additionalProperties; - - private GetFlowResponseContent( - String id, - String name, - Optional> actions, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional executedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.actions = actions; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.executedAt = executedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("actions") - public Optional> getActions() { - return actions; - } - - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("executed_at") - public Optional getExecutedAt() { - return executedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetFlowResponseContent && equalTo((GetFlowResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetFlowResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && actions.equals(other.actions) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && executedAt.equals(other.executedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.actions, this.createdAt, this.updatedAt, this.executedAt); - } - - @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(GetFlowResponseContent other); - } - - 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 { - GetFlowResponseContent build(); - - _FinalStage actions(Optional> actions); - - _FinalStage actions(List actions); - - _FinalStage executedAt(Optional executedAt); - - _FinalStage executedAt(String executedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, CreatedAtStage, UpdatedAtStage, _FinalStage { - private String id; - - private String name; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private Optional executedAt = Optional.empty(); - - private Optional> actions = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetFlowResponseContent other) { - id(other.getId()); - name(other.getName()); - actions(other.getActions()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - executedAt(other.getExecutedAt()); - 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 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 executedAt(String executedAt) { - this.executedAt = Optional.ofNullable(executedAt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "executed_at", nulls = Nulls.SKIP) - public _FinalStage executedAt(Optional executedAt) { - this.executedAt = executedAt; - return this; - } - - @java.lang.Override - public _FinalStage actions(List actions) { - this.actions = Optional.ofNullable(actions); - return this; - } - - @java.lang.Override - @JsonSetter(value = "actions", nulls = Nulls.SKIP) - public _FinalStage actions(Optional> actions) { - this.actions = actions; - return this; - } - - @java.lang.Override - public GetFlowResponseContent build() { - return new GetFlowResponseContent( - id, name, actions, createdAt, updatedAt, executedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetFlowsVaultConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetFlowsVaultConnectionResponseContent.java deleted file mode 100644 index 1effc5c7f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetFlowsVaultConnectionResponseContent.java +++ /dev/null @@ -1,476 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = GetFlowsVaultConnectionResponseContent.Builder.class) -public final class GetFlowsVaultConnectionResponseContent { - private final String id; - - private final String appId; - - private final Optional environment; - - private final String name; - - private final Optional accountName; - - private final boolean ready; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional refreshedAt; - - private final String fingerprint; - - private final Map additionalProperties; - - private GetFlowsVaultConnectionResponseContent( - String id, - String appId, - Optional environment, - String name, - Optional accountName, - boolean ready, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional refreshedAt, - String fingerprint, - Map additionalProperties) { - this.id = id; - this.appId = appId; - this.environment = environment; - this.name = name; - this.accountName = accountName; - this.ready = ready; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.refreshedAt = refreshedAt; - this.fingerprint = fingerprint; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection identifier. - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return Flows Vault Connection app identifier. - */ - @JsonProperty("app_id") - public String getAppId() { - return appId; - } - - /** - * @return Flows Vault Connection environment. - */ - @JsonProperty("environment") - public Optional getEnvironment() { - return environment; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return Flows Vault Connection custom account name. - */ - @JsonProperty("account_name") - public Optional getAccountName() { - return accountName; - } - - /** - * @return Whether the Flows Vault Connection is configured. - */ - @JsonProperty("ready") - public boolean getReady() { - return ready; - } - - /** - * @return The ISO 8601 formatted date when this Flows Vault Connection was created. - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return The ISO 8601 formatted date when this Flows Vault Connection was updated. - */ - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - /** - * @return The ISO 8601 formatted date when this Flows Vault Connection was refreshed. - */ - @JsonProperty("refreshed_at") - public Optional getRefreshedAt() { - return refreshedAt; - } - - @JsonProperty("fingerprint") - public String getFingerprint() { - return fingerprint; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetFlowsVaultConnectionResponseContent - && equalTo((GetFlowsVaultConnectionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetFlowsVaultConnectionResponseContent other) { - return id.equals(other.id) - && appId.equals(other.appId) - && environment.equals(other.environment) - && name.equals(other.name) - && accountName.equals(other.accountName) - && ready == other.ready - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && refreshedAt.equals(other.refreshedAt) - && fingerprint.equals(other.fingerprint); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.appId, - this.environment, - this.name, - this.accountName, - this.ready, - this.createdAt, - this.updatedAt, - this.refreshedAt, - this.fingerprint); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

Flows Vault Connection identifier.

- */ - AppIdStage id(@NotNull String id); - - Builder from(GetFlowsVaultConnectionResponseContent other); - } - - public interface AppIdStage { - /** - *

Flows Vault Connection app identifier.

- */ - NameStage appId(@NotNull String appId); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - ReadyStage name(@NotNull String name); - } - - public interface ReadyStage { - /** - *

Whether the Flows Vault Connection is configured.

- */ - CreatedAtStage ready(boolean ready); - } - - public interface CreatedAtStage { - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was created.

- */ - UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); - } - - public interface UpdatedAtStage { - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was updated.

- */ - FingerprintStage updatedAt(@NotNull OffsetDateTime updatedAt); - } - - public interface FingerprintStage { - _FinalStage fingerprint(@NotNull String fingerprint); - } - - public interface _FinalStage { - GetFlowsVaultConnectionResponseContent build(); - - /** - *

Flows Vault Connection environment.

- */ - _FinalStage environment(Optional environment); - - _FinalStage environment(String environment); - - /** - *

Flows Vault Connection custom account name.

- */ - _FinalStage accountName(Optional accountName); - - _FinalStage accountName(String accountName); - - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was refreshed.

- */ - _FinalStage refreshedAt(Optional refreshedAt); - - _FinalStage refreshedAt(OffsetDateTime refreshedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements IdStage, - AppIdStage, - NameStage, - ReadyStage, - CreatedAtStage, - UpdatedAtStage, - FingerprintStage, - _FinalStage { - private String id; - - private String appId; - - private String name; - - private boolean ready; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private String fingerprint; - - private Optional refreshedAt = Optional.empty(); - - private Optional accountName = Optional.empty(); - - private Optional environment = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetFlowsVaultConnectionResponseContent other) { - id(other.getId()); - appId(other.getAppId()); - environment(other.getEnvironment()); - name(other.getName()); - accountName(other.getAccountName()); - ready(other.getReady()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - refreshedAt(other.getRefreshedAt()); - fingerprint(other.getFingerprint()); - return this; - } - - /** - *

Flows Vault Connection identifier.

- *

Flows Vault Connection identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("id") - public AppIdStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - /** - *

Flows Vault Connection app identifier.

- *

Flows Vault Connection app identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("app_id") - public NameStage appId(@NotNull String appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public ReadyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("ready") - public CreatedAtStage ready(boolean ready) { - this.ready = ready; - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("created_at") - public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { - this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("updated_at") - public FingerprintStage updatedAt(@NotNull OffsetDateTime updatedAt) { - this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("fingerprint") - public _FinalStage fingerprint(@NotNull String fingerprint) { - this.fingerprint = Objects.requireNonNull(fingerprint, "fingerprint must not be null"); - return this; - } - - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was refreshed.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage refreshedAt(OffsetDateTime refreshedAt) { - this.refreshedAt = Optional.ofNullable(refreshedAt); - return this; - } - - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was refreshed.

- */ - @java.lang.Override - @JsonSetter(value = "refreshed_at", nulls = Nulls.SKIP) - public _FinalStage refreshedAt(Optional refreshedAt) { - this.refreshedAt = refreshedAt; - return this; - } - - /** - *

Flows Vault Connection custom account name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage accountName(String accountName) { - this.accountName = Optional.ofNullable(accountName); - return this; - } - - /** - *

Flows Vault Connection custom account name.

- */ - @java.lang.Override - @JsonSetter(value = "account_name", nulls = Nulls.SKIP) - public _FinalStage accountName(Optional accountName) { - this.accountName = accountName; - return this; - } - - /** - *

Flows Vault Connection environment.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage environment(String environment) { - this.environment = Optional.ofNullable(environment); - return this; - } - - /** - *

Flows Vault Connection environment.

- */ - @java.lang.Override - @JsonSetter(value = "environment", nulls = Nulls.SKIP) - public _FinalStage environment(Optional environment) { - this.environment = environment; - return this; - } - - @java.lang.Override - public GetFlowsVaultConnectionResponseContent build() { - return new GetFlowsVaultConnectionResponseContent( - id, - appId, - environment, - name, - accountName, - ready, - createdAt, - updatedAt, - refreshedAt, - fingerprint, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetFormRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetFormRequestParameters.java deleted file mode 100644 index 0370436da..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetFormRequestParameters.java +++ /dev/null @@ -1,132 +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.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; -import java.util.Collections; -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 = GetFormRequestParameters.Builder.class) -public final class GetFormRequestParameters { - private final Optional> hydrate; - - private final Map additionalProperties; - - private GetFormRequestParameters( - Optional> hydrate, Map additionalProperties) { - this.hydrate = hydrate; - this.additionalProperties = additionalProperties; - } - - /** - * @return Query parameter to hydrate the response with additional data - */ - @JsonIgnore - public Optional> getHydrate() { - if (hydrate == null) { - return Optional.empty(); - } - 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; - return other instanceof GetFormRequestParameters && equalTo((GetFormRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetFormRequestParameters other) { - return hydrate.equals(other.hydrate); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.hydrate); - } - - @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> hydrate = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetFormRequestParameters other) { - hydrate(other.getHydrate()); - return this; - } - - /** - *

Query parameter to hydrate the response with additional data

- */ - @JsonSetter(value = "hydrate", nulls = Nulls.SKIP) - public Builder hydrate(@Nullable Optional> hydrate) { - this.hydrate = hydrate; - return this; - } - - public Builder hydrate(List hydrate) { - this.hydrate = Optional.ofNullable(hydrate); - return this; - } - - public Builder hydrate(com.auth0.client.mgmt.core.Nullable> hydrate) { - if (hydrate.isNull()) { - this.hydrate = null; - } else if (hydrate.isEmpty()) { - this.hydrate = Optional.empty(); - } else { - this.hydrate = Optional.of(hydrate.get()); - } - return this; - } - - public Builder hydrate(FormsRequestParametersHydrateEnum hydrate) { - this.hydrate = Optional.of(Collections.singletonList(hydrate)); - return this; - } - - public GetFormRequestParameters build() { - return new GetFormRequestParameters(hydrate, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetFormResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetFormResponseContent.java deleted file mode 100644 index fda4b7a33..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetFormResponseContent.java +++ /dev/null @@ -1,477 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = GetFormResponseContent.Builder.class) -public final class GetFormResponseContent { - private final String id; - - private final String name; - - private final Optional messages; - - private final Optional languages; - - private final Optional>> translations; - - private final Optional> nodes; - - private final Optional start; - - private final Optional ending; - - private final Optional style; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional embeddedAt; - - private final Optional submittedAt; - - private final Map additionalProperties; - - private GetFormResponseContent( - String id, - String name, - Optional messages, - Optional languages, - Optional>> translations, - Optional> nodes, - Optional start, - Optional ending, - Optional style, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional embeddedAt, - Optional submittedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.messages = messages; - this.languages = languages; - this.translations = translations; - this.nodes = nodes; - this.start = start; - this.ending = ending; - this.style = style; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.embeddedAt = embeddedAt; - this.submittedAt = submittedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("messages") - public Optional getMessages() { - return messages; - } - - @JsonProperty("languages") - public Optional getLanguages() { - return languages; - } - - @JsonProperty("translations") - public Optional>> getTranslations() { - return translations; - } - - @JsonProperty("nodes") - public Optional> getNodes() { - return nodes; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("ending") - public Optional getEnding() { - return ending; - } - - @JsonProperty("style") - public Optional getStyle() { - return style; - } - - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("embedded_at") - public Optional getEmbeddedAt() { - return embeddedAt; - } - - @JsonProperty("submitted_at") - public Optional getSubmittedAt() { - return submittedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetFormResponseContent && equalTo((GetFormResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetFormResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && messages.equals(other.messages) - && languages.equals(other.languages) - && translations.equals(other.translations) - && nodes.equals(other.nodes) - && start.equals(other.start) - && ending.equals(other.ending) - && style.equals(other.style) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && embeddedAt.equals(other.embeddedAt) - && submittedAt.equals(other.submittedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.messages, - this.languages, - this.translations, - this.nodes, - this.start, - this.ending, - this.style, - this.createdAt, - this.updatedAt, - this.embeddedAt, - this.submittedAt); - } - - @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(GetFormResponseContent other); - } - - 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 { - GetFormResponseContent build(); - - _FinalStage messages(Optional messages); - - _FinalStage messages(FormMessages messages); - - _FinalStage languages(Optional languages); - - _FinalStage languages(FormLanguages languages); - - _FinalStage translations(Optional>> translations); - - _FinalStage translations(Map> translations); - - _FinalStage nodes(Optional> nodes); - - _FinalStage nodes(List nodes); - - _FinalStage start(Optional start); - - _FinalStage start(FormStartNode start); - - _FinalStage ending(Optional ending); - - _FinalStage ending(FormEndingNode ending); - - _FinalStage style(Optional style); - - _FinalStage style(FormStyle style); - - _FinalStage embeddedAt(Optional embeddedAt); - - _FinalStage embeddedAt(String embeddedAt); - - _FinalStage submittedAt(Optional submittedAt); - - _FinalStage submittedAt(String submittedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, CreatedAtStage, UpdatedAtStage, _FinalStage { - private String id; - - private String name; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private Optional submittedAt = Optional.empty(); - - private Optional embeddedAt = Optional.empty(); - - private Optional style = Optional.empty(); - - private Optional ending = Optional.empty(); - - private Optional start = Optional.empty(); - - private Optional> nodes = Optional.empty(); - - private Optional>> translations = Optional.empty(); - - private Optional languages = Optional.empty(); - - private Optional messages = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetFormResponseContent other) { - id(other.getId()); - name(other.getName()); - messages(other.getMessages()); - languages(other.getLanguages()); - translations(other.getTranslations()); - nodes(other.getNodes()); - start(other.getStart()); - ending(other.getEnding()); - style(other.getStyle()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - embeddedAt(other.getEmbeddedAt()); - submittedAt(other.getSubmittedAt()); - 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 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 submittedAt(String submittedAt) { - this.submittedAt = Optional.ofNullable(submittedAt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "submitted_at", nulls = Nulls.SKIP) - public _FinalStage submittedAt(Optional submittedAt) { - this.submittedAt = submittedAt; - return this; - } - - @java.lang.Override - public _FinalStage embeddedAt(String embeddedAt) { - this.embeddedAt = Optional.ofNullable(embeddedAt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "embedded_at", nulls = Nulls.SKIP) - public _FinalStage embeddedAt(Optional embeddedAt) { - this.embeddedAt = embeddedAt; - return this; - } - - @java.lang.Override - public _FinalStage style(FormStyle style) { - this.style = Optional.ofNullable(style); - return this; - } - - @java.lang.Override - @JsonSetter(value = "style", nulls = Nulls.SKIP) - public _FinalStage style(Optional style) { - this.style = style; - return this; - } - - @java.lang.Override - public _FinalStage ending(FormEndingNode ending) { - this.ending = Optional.ofNullable(ending); - return this; - } - - @java.lang.Override - @JsonSetter(value = "ending", nulls = Nulls.SKIP) - public _FinalStage ending(Optional ending) { - this.ending = ending; - return this; - } - - @java.lang.Override - public _FinalStage start(FormStartNode start) { - this.start = Optional.ofNullable(start); - return this; - } - - @java.lang.Override - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public _FinalStage start(Optional start) { - this.start = start; - return this; - } - - @java.lang.Override - public _FinalStage nodes(List nodes) { - this.nodes = Optional.ofNullable(nodes); - return this; - } - - @java.lang.Override - @JsonSetter(value = "nodes", nulls = Nulls.SKIP) - public _FinalStage nodes(Optional> nodes) { - this.nodes = nodes; - return this; - } - - @java.lang.Override - public _FinalStage translations(Map> translations) { - this.translations = Optional.ofNullable(translations); - return this; - } - - @java.lang.Override - @JsonSetter(value = "translations", nulls = Nulls.SKIP) - public _FinalStage translations(Optional>> translations) { - this.translations = translations; - return this; - } - - @java.lang.Override - public _FinalStage languages(FormLanguages languages) { - this.languages = Optional.ofNullable(languages); - return this; - } - - @java.lang.Override - @JsonSetter(value = "languages", nulls = Nulls.SKIP) - public _FinalStage languages(Optional languages) { - this.languages = languages; - return this; - } - - @java.lang.Override - public _FinalStage messages(FormMessages messages) { - this.messages = Optional.ofNullable(messages); - return this; - } - - @java.lang.Override - @JsonSetter(value = "messages", nulls = Nulls.SKIP) - public _FinalStage messages(Optional messages) { - this.messages = messages; - return this; - } - - @java.lang.Override - public GetFormResponseContent build() { - return new GetFormResponseContent( - id, - name, - messages, - languages, - translations, - nodes, - start, - ending, - style, - createdAt, - updatedAt, - embeddedAt, - submittedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGroupMembersResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGroupMembersResponseContent.java deleted file mode 100644 index 6baabfb08..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetGroupMembersResponseContent.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = GetGroupMembersResponseContent.Builder.class) -public final class GetGroupMembersResponseContent { - private final List members; - - private final Optional next; - - private final Map additionalProperties; - - private GetGroupMembersResponseContent( - List members, Optional next, Map additionalProperties) { - this.members = members; - this.next = next; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("members") - public List getMembers() { - return members; - } - - /** - * @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 GetGroupMembersResponseContent && equalTo((GetGroupMembersResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetGroupMembersResponseContent 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(GetGroupMembersResponseContent other) { - members(other.getMembers()); - next(other.getNext()); - return this; - } - - @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(GroupMember members) { - this.members.add(members); - return this; - } - - public Builder addAllMembers(List members) { - if (members != null) { - this.members.addAll(members); - } - 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 GetGroupMembersResponseContent build() { - return new GetGroupMembersResponseContent(members, next, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGroupResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGroupResponseContent.java deleted file mode 100644 index 68c342ed5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetGroupResponseContent.java +++ /dev/null @@ -1,520 +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.NotNull; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetGroupResponseContent.Builder.class) -public final class GetGroupResponseContent { - private final String id; - - private final String name; - - private final Optional externalId; - - private final Optional connectionId; - - private final OptionalNullable organizationId; - - private final String tenantName; - - private final OptionalNullable description; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Map additionalProperties; - - private GetGroupResponseContent( - String id, - String name, - Optional externalId, - Optional connectionId, - OptionalNullable organizationId, - String tenantName, - OptionalNullable description, - OffsetDateTime createdAt, - OffsetDateTime 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 scope (connection, organization, or tenant). 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 String getTenantName() { - return tenantName; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("description") - public OptionalNullable getDescription() { - if (description == null) { - return OptionalNullable.absent(); - } - return description; - } - - /** - * @return Timestamp of when the group was created. - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return Timestamp of when the group was last updated. - */ - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("organization_id") - private OptionalNullable _getOrganizationId() { - return organizationId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("description") - private OptionalNullable _getDescription() { - return description; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetGroupResponseContent && equalTo((GetGroupResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetGroupResponseContent 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(GetGroupResponseContent other); - } - - public interface NameStage { - /** - *

Name of the group. Must be unique within its scope (connection, organization, or tenant). Must contain between 1 and 128 printable ASCII characters.

- */ - TenantNameStage name(@NotNull String name); - } - - public interface TenantNameStage { - /** - *

Identifier for the tenant this group belongs to.

- */ - CreatedAtStage tenantName(@NotNull String tenantName); - } - - public interface CreatedAtStage { - /** - *

Timestamp of when the group was created.

- */ - UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); - } - - public interface UpdatedAtStage { - /** - *

Timestamp of when the group was last updated.

- */ - _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); - } - - public interface _FinalStage { - GetGroupResponseContent build(); - - /** - *

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); - - _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 IdStage, NameStage, TenantNameStage, CreatedAtStage, UpdatedAtStage, _FinalStage { - private String id; - - private String name; - - private String tenantName; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private OptionalNullable description = OptionalNullable.absent(); - - 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(GetGroupResponseContent 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).

- *

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 scope (connection, organization, or tenant). Must contain between 1 and 128 printable ASCII characters.

- *

Name of the group. Must be unique within its scope (connection, organization, or tenant). Must contain between 1 and 128 printable ASCII characters.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public TenantNameStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("tenant_name") - public CreatedAtStage tenantName(@NotNull String tenantName) { - this.tenantName = Objects.requireNonNull(tenantName, "tenantName must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("created_at") - public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { - this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); - return this; - } - - /** - *

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. - */ - @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 description(com.auth0.client.mgmt.core.Nullable description) { - if (description.isNull()) { - this.description = OptionalNullable.ofNull(); - } else if (description.isEmpty()) { - this.description = OptionalNullable.absent(); - } else { - this.description = OptionalNullable.of(description.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage description(Optional description) { - if (description.isPresent()) { - this.description = OptionalNullable.of(description.get()); - } else { - this.description = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage description(String description) { - this.description = OptionalNullable.of(description); - return this; - } - - @java.lang.Override - @JsonSetter(value = "description", nulls = Nulls.SKIP) - public _FinalStage description(@Nullable OptionalNullable description) { - this.description = description; - return this; - } - - /** - *

Identifier for the organization this group belongs to (if an organization group).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage organizationId(com.auth0.client.mgmt.core.Nullable organizationId) { - if (organizationId.isNull()) { - this.organizationId = OptionalNullable.ofNull(); - } else if (organizationId.isEmpty()) { - this.organizationId = OptionalNullable.absent(); - } else { - this.organizationId = OptionalNullable.of(organizationId.get()); - } - return this; - } - - /** - *

Identifier for the organization this group belongs to (if an organization group).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage organizationId(Optional organizationId) { - if (organizationId.isPresent()) { - this.organizationId = OptionalNullable.of(organizationId.get()); - } else { - this.organizationId = OptionalNullable.absent(); - } - return this; - } - - /** - *

Identifier for the organization this group belongs to (if an organization group).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage organizationId(String organizationId) { - this.organizationId = OptionalNullable.of(organizationId); - return this; - } - - /** - *

Identifier for the organization this group belongs to (if an organization group).

- */ - @java.lang.Override - @JsonSetter(value = "organization_id", nulls = Nulls.SKIP) - public _FinalStage organizationId(@Nullable OptionalNullable organizationId) { - this.organizationId = organizationId; - return this; - } - - /** - *

Identifier for the connection this group belongs to (if a connection group).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @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 GetGroupResponseContent build() { - return new GetGroupResponseContent( - id, - name, - externalId, - connectionId, - organizationId, - tenantName, - description, - createdAt, - updatedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGuardianEnrollmentResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGuardianEnrollmentResponseContent.java deleted file mode 100644 index bf2dcd0a7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetGuardianEnrollmentResponseContent.java +++ /dev/null @@ -1,339 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetGuardianEnrollmentResponseContent.Builder.class) -public final class GetGuardianEnrollmentResponseContent { - private final String id; - - private final Optional status; - - private final Optional name; - - private final Optional identifier; - - private final Optional phoneNumber; - - private final Optional enrolledAt; - - private final Optional lastAuth; - - private final Map additionalProperties; - - private GetGuardianEnrollmentResponseContent( - String id, - Optional status, - Optional name, - Optional identifier, - Optional phoneNumber, - Optional enrolledAt, - Optional lastAuth, - Map additionalProperties) { - this.id = id; - this.status = status; - this.name = name; - this.identifier = identifier; - this.phoneNumber = phoneNumber; - this.enrolledAt = enrolledAt; - this.lastAuth = lastAuth; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID for this enrollment. - */ - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return Device name (only for push notification). - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Device identifier. This is usually the phone identifier. - */ - @JsonProperty("identifier") - public Optional getIdentifier() { - return identifier; - } - - /** - * @return Phone number. - */ - @JsonProperty("phone_number") - public Optional getPhoneNumber() { - return phoneNumber; - } - - @JsonProperty("enrolled_at") - public Optional getEnrolledAt() { - return enrolledAt; - } - - @JsonProperty("last_auth") - public Optional getLastAuth() { - return lastAuth; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetGuardianEnrollmentResponseContent - && equalTo((GetGuardianEnrollmentResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetGuardianEnrollmentResponseContent other) { - return id.equals(other.id) - && status.equals(other.status) - && name.equals(other.name) - && identifier.equals(other.identifier) - && phoneNumber.equals(other.phoneNumber) - && enrolledAt.equals(other.enrolledAt) - && lastAuth.equals(other.lastAuth); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.status, this.name, this.identifier, this.phoneNumber, this.enrolledAt, this.lastAuth); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

ID for this enrollment.

- */ - _FinalStage id(@NotNull String id); - - Builder from(GetGuardianEnrollmentResponseContent other); - } - - public interface _FinalStage { - GetGuardianEnrollmentResponseContent build(); - - _FinalStage status(Optional status); - - _FinalStage status(GuardianEnrollmentStatus status); - - /** - *

Device name (only for push notification).

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

Device identifier. This is usually the phone identifier.

- */ - _FinalStage identifier(Optional identifier); - - _FinalStage identifier(String identifier); - - /** - *

Phone number.

- */ - _FinalStage phoneNumber(Optional phoneNumber); - - _FinalStage phoneNumber(String phoneNumber); - - _FinalStage enrolledAt(Optional enrolledAt); - - _FinalStage enrolledAt(String enrolledAt); - - _FinalStage lastAuth(Optional lastAuth); - - _FinalStage lastAuth(String lastAuth); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, _FinalStage { - private String id; - - private Optional lastAuth = Optional.empty(); - - private Optional enrolledAt = Optional.empty(); - - private Optional phoneNumber = Optional.empty(); - - private Optional identifier = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional status = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetGuardianEnrollmentResponseContent other) { - id(other.getId()); - status(other.getStatus()); - name(other.getName()); - identifier(other.getIdentifier()); - phoneNumber(other.getPhoneNumber()); - enrolledAt(other.getEnrolledAt()); - lastAuth(other.getLastAuth()); - return this; - } - - /** - *

ID for this enrollment.

- *

ID for this enrollment.

- * @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 lastAuth(String lastAuth) { - this.lastAuth = Optional.ofNullable(lastAuth); - return this; - } - - @java.lang.Override - @JsonSetter(value = "last_auth", nulls = Nulls.SKIP) - public _FinalStage lastAuth(Optional lastAuth) { - this.lastAuth = lastAuth; - return this; - } - - @java.lang.Override - public _FinalStage enrolledAt(String enrolledAt) { - this.enrolledAt = Optional.ofNullable(enrolledAt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "enrolled_at", nulls = Nulls.SKIP) - public _FinalStage enrolledAt(Optional enrolledAt) { - this.enrolledAt = enrolledAt; - return this; - } - - /** - *

Phone number.

- * @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.

- */ - @java.lang.Override - @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) - public _FinalStage phoneNumber(Optional phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - *

Device identifier. This is usually the phone identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage identifier(String identifier) { - this.identifier = Optional.ofNullable(identifier); - return this; - } - - /** - *

Device identifier. This is usually the phone identifier.

- */ - @java.lang.Override - @JsonSetter(value = "identifier", nulls = Nulls.SKIP) - public _FinalStage identifier(Optional identifier) { - this.identifier = identifier; - return this; - } - - /** - *

Device name (only for push notification).

- * @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; - } - - /** - *

Device name (only for push notification).

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage status(GuardianEnrollmentStatus status) { - this.status = Optional.ofNullable(status); - return this; - } - - @java.lang.Override - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public _FinalStage status(Optional status) { - this.status = status; - return this; - } - - @java.lang.Override - public GetGuardianEnrollmentResponseContent build() { - return new GetGuardianEnrollmentResponseContent( - id, status, name, identifier, phoneNumber, enrolledAt, lastAuth, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorDuoSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorDuoSettingsResponseContent.java deleted file mode 100644 index a400b0fd0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorDuoSettingsResponseContent.java +++ /dev/null @@ -1,144 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetGuardianFactorDuoSettingsResponseContent.Builder.class) -public final class GetGuardianFactorDuoSettingsResponseContent { - private final Optional ikey; - - private final Optional skey; - - private final Optional host; - - private final Map additionalProperties; - - private GetGuardianFactorDuoSettingsResponseContent( - Optional ikey, - Optional skey, - Optional host, - Map additionalProperties) { - this.ikey = ikey; - this.skey = skey; - this.host = host; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("ikey") - public Optional getIkey() { - return ikey; - } - - @JsonProperty("skey") - public Optional getSkey() { - return skey; - } - - @JsonProperty("host") - public Optional getHost() { - return host; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetGuardianFactorDuoSettingsResponseContent - && equalTo((GetGuardianFactorDuoSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetGuardianFactorDuoSettingsResponseContent other) { - return ikey.equals(other.ikey) && skey.equals(other.skey) && host.equals(other.host); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.ikey, this.skey, this.host); - } - - @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 ikey = Optional.empty(); - - private Optional skey = Optional.empty(); - - private Optional host = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetGuardianFactorDuoSettingsResponseContent other) { - ikey(other.getIkey()); - skey(other.getSkey()); - host(other.getHost()); - return this; - } - - @JsonSetter(value = "ikey", nulls = Nulls.SKIP) - public Builder ikey(Optional ikey) { - this.ikey = ikey; - return this; - } - - public Builder ikey(String ikey) { - this.ikey = Optional.ofNullable(ikey); - return this; - } - - @JsonSetter(value = "skey", nulls = Nulls.SKIP) - public Builder skey(Optional skey) { - this.skey = skey; - return this; - } - - public Builder skey(String skey) { - this.skey = Optional.ofNullable(skey); - return this; - } - - @JsonSetter(value = "host", nulls = Nulls.SKIP) - public Builder host(Optional host) { - this.host = host; - return this; - } - - public Builder host(String host) { - this.host = Optional.ofNullable(host); - return this; - } - - public GetGuardianFactorDuoSettingsResponseContent build() { - return new GetGuardianFactorDuoSettingsResponseContent(ikey, skey, host, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorPhoneMessageTypesResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorPhoneMessageTypesResponseContent.java deleted file mode 100644 index 9cd64efc5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorPhoneMessageTypesResponseContent.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetGuardianFactorPhoneMessageTypesResponseContent.Builder.class) -public final class GetGuardianFactorPhoneMessageTypesResponseContent { - private final Optional> messageTypes; - - private final Map additionalProperties; - - private GetGuardianFactorPhoneMessageTypesResponseContent( - Optional> messageTypes, - Map additionalProperties) { - this.messageTypes = messageTypes; - this.additionalProperties = additionalProperties; - } - - /** - * @return The list of phone factors to enable on the tenant. Can include sms and voice. - */ - @JsonProperty("message_types") - public Optional> getMessageTypes() { - return messageTypes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetGuardianFactorPhoneMessageTypesResponseContent - && equalTo((GetGuardianFactorPhoneMessageTypesResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetGuardianFactorPhoneMessageTypesResponseContent other) { - return messageTypes.equals(other.messageTypes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.messageTypes); - } - - @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> messageTypes = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetGuardianFactorPhoneMessageTypesResponseContent other) { - messageTypes(other.getMessageTypes()); - return this; - } - - /** - *

The list of phone factors to enable on the tenant. Can include sms and voice.

- */ - @JsonSetter(value = "message_types", nulls = Nulls.SKIP) - public Builder messageTypes(Optional> messageTypes) { - this.messageTypes = messageTypes; - return this; - } - - public Builder messageTypes(List messageTypes) { - this.messageTypes = Optional.ofNullable(messageTypes); - return this; - } - - public GetGuardianFactorPhoneMessageTypesResponseContent build() { - return new GetGuardianFactorPhoneMessageTypesResponseContent(messageTypes, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorPhoneTemplatesResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorPhoneTemplatesResponseContent.java deleted file mode 100644 index 5a1c1ca0a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorPhoneTemplatesResponseContent.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = GetGuardianFactorPhoneTemplatesResponseContent.Builder.class) -public final class GetGuardianFactorPhoneTemplatesResponseContent { - private final String enrollmentMessage; - - private final String verificationMessage; - - private final Map additionalProperties; - - private GetGuardianFactorPhoneTemplatesResponseContent( - String enrollmentMessage, String verificationMessage, Map additionalProperties) { - this.enrollmentMessage = enrollmentMessage; - this.verificationMessage = verificationMessage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Message sent to the user when they are invited to enroll with a phone number. - */ - @JsonProperty("enrollment_message") - public String getEnrollmentMessage() { - return enrollmentMessage; - } - - /** - * @return Message sent to the user when they are prompted to verify their account. - */ - @JsonProperty("verification_message") - public String getVerificationMessage() { - return verificationMessage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetGuardianFactorPhoneTemplatesResponseContent - && equalTo((GetGuardianFactorPhoneTemplatesResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetGuardianFactorPhoneTemplatesResponseContent other) { - return enrollmentMessage.equals(other.enrollmentMessage) - && verificationMessage.equals(other.verificationMessage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enrollmentMessage, this.verificationMessage); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EnrollmentMessageStage builder() { - return new Builder(); - } - - public interface EnrollmentMessageStage { - /** - *

Message sent to the user when they are invited to enroll with a phone number.

- */ - VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMessage); - - Builder from(GetGuardianFactorPhoneTemplatesResponseContent other); - } - - public interface VerificationMessageStage { - /** - *

Message sent to the user when they are prompted to verify their account.

- */ - _FinalStage verificationMessage(@NotNull String verificationMessage); - } - - public interface _FinalStage { - GetGuardianFactorPhoneTemplatesResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EnrollmentMessageStage, VerificationMessageStage, _FinalStage { - private String enrollmentMessage; - - private String verificationMessage; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetGuardianFactorPhoneTemplatesResponseContent other) { - enrollmentMessage(other.getEnrollmentMessage()); - verificationMessage(other.getVerificationMessage()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("enrollment_message") - public VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMessage) { - this.enrollmentMessage = Objects.requireNonNull(enrollmentMessage, "enrollmentMessage must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("verification_message") - public _FinalStage verificationMessage(@NotNull String verificationMessage) { - this.verificationMessage = - Objects.requireNonNull(verificationMessage, "verificationMessage must not be null"); - return this; - } - - @java.lang.Override - public GetGuardianFactorPhoneTemplatesResponseContent build() { - return new GetGuardianFactorPhoneTemplatesResponseContent( - enrollmentMessage, verificationMessage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorSmsTemplatesResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorSmsTemplatesResponseContent.java deleted file mode 100644 index e6402e537..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorSmsTemplatesResponseContent.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = GetGuardianFactorSmsTemplatesResponseContent.Builder.class) -public final class GetGuardianFactorSmsTemplatesResponseContent { - private final String enrollmentMessage; - - private final String verificationMessage; - - private final Map additionalProperties; - - private GetGuardianFactorSmsTemplatesResponseContent( - String enrollmentMessage, String verificationMessage, Map additionalProperties) { - this.enrollmentMessage = enrollmentMessage; - this.verificationMessage = verificationMessage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Message sent to the user when they are invited to enroll with a phone number. - */ - @JsonProperty("enrollment_message") - public String getEnrollmentMessage() { - return enrollmentMessage; - } - - /** - * @return Message sent to the user when they are prompted to verify their account. - */ - @JsonProperty("verification_message") - public String getVerificationMessage() { - return verificationMessage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetGuardianFactorSmsTemplatesResponseContent - && equalTo((GetGuardianFactorSmsTemplatesResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetGuardianFactorSmsTemplatesResponseContent other) { - return enrollmentMessage.equals(other.enrollmentMessage) - && verificationMessage.equals(other.verificationMessage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enrollmentMessage, this.verificationMessage); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EnrollmentMessageStage builder() { - return new Builder(); - } - - public interface EnrollmentMessageStage { - /** - *

Message sent to the user when they are invited to enroll with a phone number.

- */ - VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMessage); - - Builder from(GetGuardianFactorSmsTemplatesResponseContent other); - } - - public interface VerificationMessageStage { - /** - *

Message sent to the user when they are prompted to verify their account.

- */ - _FinalStage verificationMessage(@NotNull String verificationMessage); - } - - public interface _FinalStage { - GetGuardianFactorSmsTemplatesResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EnrollmentMessageStage, VerificationMessageStage, _FinalStage { - private String enrollmentMessage; - - private String verificationMessage; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetGuardianFactorSmsTemplatesResponseContent other) { - enrollmentMessage(other.getEnrollmentMessage()); - verificationMessage(other.getVerificationMessage()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("enrollment_message") - public VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMessage) { - this.enrollmentMessage = Objects.requireNonNull(enrollmentMessage, "enrollmentMessage must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("verification_message") - public _FinalStage verificationMessage(@NotNull String verificationMessage) { - this.verificationMessage = - Objects.requireNonNull(verificationMessage, "verificationMessage must not be null"); - return this; - } - - @java.lang.Override - public GetGuardianFactorSmsTemplatesResponseContent build() { - return new GetGuardianFactorSmsTemplatesResponseContent( - enrollmentMessage, verificationMessage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderApnsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderApnsResponseContent.java deleted file mode 100644 index 96f717c2b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderApnsResponseContent.java +++ /dev/null @@ -1,177 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetGuardianFactorsProviderApnsResponseContent.Builder.class) -public final class GetGuardianFactorsProviderApnsResponseContent { - private final OptionalNullable bundleId; - - private final Optional sandbox; - - private final Optional enabled; - - private final Map additionalProperties; - - private GetGuardianFactorsProviderApnsResponseContent( - OptionalNullable bundleId, - Optional sandbox, - Optional enabled, - Map additionalProperties) { - this.bundleId = bundleId; - this.sandbox = sandbox; - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("bundle_id") - public OptionalNullable getBundleId() { - if (bundleId == null) { - return OptionalNullable.absent(); - } - return bundleId; - } - - @JsonProperty("sandbox") - public Optional getSandbox() { - return sandbox; - } - - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("bundle_id") - private OptionalNullable _getBundleId() { - return bundleId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetGuardianFactorsProviderApnsResponseContent - && equalTo((GetGuardianFactorsProviderApnsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetGuardianFactorsProviderApnsResponseContent other) { - return bundleId.equals(other.bundleId) && sandbox.equals(other.sandbox) && enabled.equals(other.enabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.bundleId, this.sandbox, 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 OptionalNullable bundleId = OptionalNullable.absent(); - - private Optional sandbox = Optional.empty(); - - private Optional enabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetGuardianFactorsProviderApnsResponseContent other) { - bundleId(other.getBundleId()); - sandbox(other.getSandbox()); - enabled(other.getEnabled()); - return this; - } - - @JsonSetter(value = "bundle_id", nulls = Nulls.SKIP) - public Builder bundleId(@Nullable OptionalNullable bundleId) { - this.bundleId = bundleId; - return this; - } - - public Builder bundleId(String bundleId) { - this.bundleId = OptionalNullable.of(bundleId); - return this; - } - - public Builder bundleId(Optional bundleId) { - if (bundleId.isPresent()) { - this.bundleId = OptionalNullable.of(bundleId.get()); - } else { - this.bundleId = OptionalNullable.absent(); - } - return this; - } - - public Builder bundleId(com.auth0.client.mgmt.core.Nullable bundleId) { - if (bundleId.isNull()) { - this.bundleId = OptionalNullable.ofNull(); - } else if (bundleId.isEmpty()) { - this.bundleId = OptionalNullable.absent(); - } else { - this.bundleId = OptionalNullable.of(bundleId.get()); - } - return this; - } - - @JsonSetter(value = "sandbox", nulls = Nulls.SKIP) - public Builder sandbox(Optional sandbox) { - this.sandbox = sandbox; - return this; - } - - public Builder sandbox(Boolean sandbox) { - this.sandbox = Optional.ofNullable(sandbox); - return this; - } - - @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 GetGuardianFactorsProviderApnsResponseContent build() { - return new GetGuardianFactorsProviderApnsResponseContent(bundleId, sandbox, enabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderPhoneResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderPhoneResponseContent.java deleted file mode 100644 index 5b13c1cc4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderPhoneResponseContent.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetGuardianFactorsProviderPhoneResponseContent.Builder.class) -public final class GetGuardianFactorsProviderPhoneResponseContent { - private final Optional provider; - - private final Map additionalProperties; - - private GetGuardianFactorsProviderPhoneResponseContent( - Optional provider, Map additionalProperties) { - this.provider = provider; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("provider") - public Optional getProvider() { - return provider; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetGuardianFactorsProviderPhoneResponseContent - && equalTo((GetGuardianFactorsProviderPhoneResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetGuardianFactorsProviderPhoneResponseContent other) { - return provider.equals(other.provider); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.provider); - } - - @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 provider = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetGuardianFactorsProviderPhoneResponseContent other) { - provider(other.getProvider()); - return this; - } - - @JsonSetter(value = "provider", nulls = Nulls.SKIP) - public Builder provider(Optional provider) { - this.provider = provider; - return this; - } - - public Builder provider(GuardianFactorsProviderSmsProviderEnum provider) { - this.provider = Optional.ofNullable(provider); - return this; - } - - public GetGuardianFactorsProviderPhoneResponseContent build() { - return new GetGuardianFactorsProviderPhoneResponseContent(provider, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderPhoneTwilioResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderPhoneTwilioResponseContent.java deleted file mode 100644 index 7d7d0543f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderPhoneTwilioResponseContent.java +++ /dev/null @@ -1,318 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetGuardianFactorsProviderPhoneTwilioResponseContent.Builder.class) -public final class GetGuardianFactorsProviderPhoneTwilioResponseContent { - private final OptionalNullable from; - - private final OptionalNullable messagingServiceSid; - - private final OptionalNullable authToken; - - private final OptionalNullable sid; - - private final Map additionalProperties; - - private GetGuardianFactorsProviderPhoneTwilioResponseContent( - OptionalNullable from, - OptionalNullable messagingServiceSid, - OptionalNullable authToken, - OptionalNullable sid, - Map additionalProperties) { - this.from = from; - this.messagingServiceSid = messagingServiceSid; - this.authToken = authToken; - this.sid = sid; - this.additionalProperties = additionalProperties; - } - - /** - * @return From number - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - public OptionalNullable getFrom() { - if (from == null) { - return OptionalNullable.absent(); - } - return from; - } - - /** - * @return Copilot SID - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("messaging_service_sid") - public OptionalNullable getMessagingServiceSid() { - if (messagingServiceSid == null) { - return OptionalNullable.absent(); - } - return messagingServiceSid; - } - - /** - * @return Twilio Authentication token - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("auth_token") - public OptionalNullable getAuthToken() { - if (authToken == null) { - return OptionalNullable.absent(); - } - return authToken; - } - - /** - * @return Twilio SID - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sid") - public OptionalNullable getSid() { - if (sid == null) { - return OptionalNullable.absent(); - } - return sid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - private OptionalNullable _getFrom() { - return from; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("messaging_service_sid") - private OptionalNullable _getMessagingServiceSid() { - return messagingServiceSid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("auth_token") - private OptionalNullable _getAuthToken() { - return authToken; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sid") - private OptionalNullable _getSid() { - return sid; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetGuardianFactorsProviderPhoneTwilioResponseContent - && equalTo((GetGuardianFactorsProviderPhoneTwilioResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetGuardianFactorsProviderPhoneTwilioResponseContent other) { - return from.equals(other.from) - && messagingServiceSid.equals(other.messagingServiceSid) - && authToken.equals(other.authToken) - && sid.equals(other.sid); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.from, this.messagingServiceSid, this.authToken, this.sid); - } - - @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 messagingServiceSid = OptionalNullable.absent(); - - private OptionalNullable authToken = OptionalNullable.absent(); - - private OptionalNullable sid = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetGuardianFactorsProviderPhoneTwilioResponseContent other) { - from(other.getFrom()); - messagingServiceSid(other.getMessagingServiceSid()); - authToken(other.getAuthToken()); - sid(other.getSid()); - return this; - } - - /** - *

From number

- */ - @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; - } - - /** - *

Copilot SID

- */ - @JsonSetter(value = "messaging_service_sid", nulls = Nulls.SKIP) - public Builder messagingServiceSid(@Nullable OptionalNullable messagingServiceSid) { - this.messagingServiceSid = messagingServiceSid; - return this; - } - - public Builder messagingServiceSid(String messagingServiceSid) { - this.messagingServiceSid = OptionalNullable.of(messagingServiceSid); - return this; - } - - public Builder messagingServiceSid(Optional messagingServiceSid) { - if (messagingServiceSid.isPresent()) { - this.messagingServiceSid = OptionalNullable.of(messagingServiceSid.get()); - } else { - this.messagingServiceSid = OptionalNullable.absent(); - } - return this; - } - - public Builder messagingServiceSid(com.auth0.client.mgmt.core.Nullable messagingServiceSid) { - if (messagingServiceSid.isNull()) { - this.messagingServiceSid = OptionalNullable.ofNull(); - } else if (messagingServiceSid.isEmpty()) { - this.messagingServiceSid = OptionalNullable.absent(); - } else { - this.messagingServiceSid = OptionalNullable.of(messagingServiceSid.get()); - } - return this; - } - - /** - *

Twilio Authentication token

- */ - @JsonSetter(value = "auth_token", nulls = Nulls.SKIP) - public Builder authToken(@Nullable OptionalNullable authToken) { - this.authToken = authToken; - return this; - } - - public Builder authToken(String authToken) { - this.authToken = OptionalNullable.of(authToken); - return this; - } - - public Builder authToken(Optional authToken) { - if (authToken.isPresent()) { - this.authToken = OptionalNullable.of(authToken.get()); - } else { - this.authToken = OptionalNullable.absent(); - } - return this; - } - - public Builder authToken(com.auth0.client.mgmt.core.Nullable authToken) { - if (authToken.isNull()) { - this.authToken = OptionalNullable.ofNull(); - } else if (authToken.isEmpty()) { - this.authToken = OptionalNullable.absent(); - } else { - this.authToken = OptionalNullable.of(authToken.get()); - } - return this; - } - - /** - *

Twilio SID

- */ - @JsonSetter(value = "sid", nulls = Nulls.SKIP) - public Builder sid(@Nullable OptionalNullable sid) { - this.sid = sid; - return this; - } - - public Builder sid(String sid) { - this.sid = OptionalNullable.of(sid); - return this; - } - - public Builder sid(Optional sid) { - if (sid.isPresent()) { - this.sid = OptionalNullable.of(sid.get()); - } else { - this.sid = OptionalNullable.absent(); - } - return this; - } - - public Builder sid(com.auth0.client.mgmt.core.Nullable sid) { - if (sid.isNull()) { - this.sid = OptionalNullable.ofNull(); - } else if (sid.isEmpty()) { - this.sid = OptionalNullable.absent(); - } else { - this.sid = OptionalNullable.of(sid.get()); - } - return this; - } - - public GetGuardianFactorsProviderPhoneTwilioResponseContent build() { - return new GetGuardianFactorsProviderPhoneTwilioResponseContent( - from, messagingServiceSid, authToken, sid, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderPushNotificationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderPushNotificationResponseContent.java deleted file mode 100644 index ac65d4e65..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderPushNotificationResponseContent.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetGuardianFactorsProviderPushNotificationResponseContent.Builder.class) -public final class GetGuardianFactorsProviderPushNotificationResponseContent { - private final Optional provider; - - private final Map additionalProperties; - - private GetGuardianFactorsProviderPushNotificationResponseContent( - Optional provider, - Map additionalProperties) { - this.provider = provider; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("provider") - public Optional getProvider() { - return provider; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetGuardianFactorsProviderPushNotificationResponseContent - && equalTo((GetGuardianFactorsProviderPushNotificationResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetGuardianFactorsProviderPushNotificationResponseContent other) { - return provider.equals(other.provider); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.provider); - } - - @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 provider = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetGuardianFactorsProviderPushNotificationResponseContent other) { - provider(other.getProvider()); - return this; - } - - @JsonSetter(value = "provider", nulls = Nulls.SKIP) - public Builder provider(Optional provider) { - this.provider = provider; - return this; - } - - public Builder provider(GuardianFactorsProviderPushNotificationProviderDataEnum provider) { - this.provider = Optional.ofNullable(provider); - return this; - } - - public GetGuardianFactorsProviderPushNotificationResponseContent build() { - return new GetGuardianFactorsProviderPushNotificationResponseContent(provider, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderSmsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderSmsResponseContent.java deleted file mode 100644 index 3a720f8c7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderSmsResponseContent.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetGuardianFactorsProviderSmsResponseContent.Builder.class) -public final class GetGuardianFactorsProviderSmsResponseContent { - private final Optional provider; - - private final Map additionalProperties; - - private GetGuardianFactorsProviderSmsResponseContent( - Optional provider, Map additionalProperties) { - this.provider = provider; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("provider") - public Optional getProvider() { - return provider; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetGuardianFactorsProviderSmsResponseContent - && equalTo((GetGuardianFactorsProviderSmsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetGuardianFactorsProviderSmsResponseContent other) { - return provider.equals(other.provider); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.provider); - } - - @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 provider = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetGuardianFactorsProviderSmsResponseContent other) { - provider(other.getProvider()); - return this; - } - - @JsonSetter(value = "provider", nulls = Nulls.SKIP) - public Builder provider(Optional provider) { - this.provider = provider; - return this; - } - - public Builder provider(GuardianFactorsProviderSmsProviderEnum provider) { - this.provider = Optional.ofNullable(provider); - return this; - } - - public GetGuardianFactorsProviderSmsResponseContent build() { - return new GetGuardianFactorsProviderSmsResponseContent(provider, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderSmsTwilioResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderSmsTwilioResponseContent.java deleted file mode 100644 index 49e7e495c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderSmsTwilioResponseContent.java +++ /dev/null @@ -1,318 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetGuardianFactorsProviderSmsTwilioResponseContent.Builder.class) -public final class GetGuardianFactorsProviderSmsTwilioResponseContent { - private final OptionalNullable from; - - private final OptionalNullable messagingServiceSid; - - private final OptionalNullable authToken; - - private final OptionalNullable sid; - - private final Map additionalProperties; - - private GetGuardianFactorsProviderSmsTwilioResponseContent( - OptionalNullable from, - OptionalNullable messagingServiceSid, - OptionalNullable authToken, - OptionalNullable sid, - Map additionalProperties) { - this.from = from; - this.messagingServiceSid = messagingServiceSid; - this.authToken = authToken; - this.sid = sid; - this.additionalProperties = additionalProperties; - } - - /** - * @return From number - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - public OptionalNullable getFrom() { - if (from == null) { - return OptionalNullable.absent(); - } - return from; - } - - /** - * @return Copilot SID - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("messaging_service_sid") - public OptionalNullable getMessagingServiceSid() { - if (messagingServiceSid == null) { - return OptionalNullable.absent(); - } - return messagingServiceSid; - } - - /** - * @return Twilio Authentication token - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("auth_token") - public OptionalNullable getAuthToken() { - if (authToken == null) { - return OptionalNullable.absent(); - } - return authToken; - } - - /** - * @return Twilio SID - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sid") - public OptionalNullable getSid() { - if (sid == null) { - return OptionalNullable.absent(); - } - return sid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - private OptionalNullable _getFrom() { - return from; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("messaging_service_sid") - private OptionalNullable _getMessagingServiceSid() { - return messagingServiceSid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("auth_token") - private OptionalNullable _getAuthToken() { - return authToken; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sid") - private OptionalNullable _getSid() { - return sid; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetGuardianFactorsProviderSmsTwilioResponseContent - && equalTo((GetGuardianFactorsProviderSmsTwilioResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetGuardianFactorsProviderSmsTwilioResponseContent other) { - return from.equals(other.from) - && messagingServiceSid.equals(other.messagingServiceSid) - && authToken.equals(other.authToken) - && sid.equals(other.sid); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.from, this.messagingServiceSid, this.authToken, this.sid); - } - - @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 messagingServiceSid = OptionalNullable.absent(); - - private OptionalNullable authToken = OptionalNullable.absent(); - - private OptionalNullable sid = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetGuardianFactorsProviderSmsTwilioResponseContent other) { - from(other.getFrom()); - messagingServiceSid(other.getMessagingServiceSid()); - authToken(other.getAuthToken()); - sid(other.getSid()); - return this; - } - - /** - *

From number

- */ - @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; - } - - /** - *

Copilot SID

- */ - @JsonSetter(value = "messaging_service_sid", nulls = Nulls.SKIP) - public Builder messagingServiceSid(@Nullable OptionalNullable messagingServiceSid) { - this.messagingServiceSid = messagingServiceSid; - return this; - } - - public Builder messagingServiceSid(String messagingServiceSid) { - this.messagingServiceSid = OptionalNullable.of(messagingServiceSid); - return this; - } - - public Builder messagingServiceSid(Optional messagingServiceSid) { - if (messagingServiceSid.isPresent()) { - this.messagingServiceSid = OptionalNullable.of(messagingServiceSid.get()); - } else { - this.messagingServiceSid = OptionalNullable.absent(); - } - return this; - } - - public Builder messagingServiceSid(com.auth0.client.mgmt.core.Nullable messagingServiceSid) { - if (messagingServiceSid.isNull()) { - this.messagingServiceSid = OptionalNullable.ofNull(); - } else if (messagingServiceSid.isEmpty()) { - this.messagingServiceSid = OptionalNullable.absent(); - } else { - this.messagingServiceSid = OptionalNullable.of(messagingServiceSid.get()); - } - return this; - } - - /** - *

Twilio Authentication token

- */ - @JsonSetter(value = "auth_token", nulls = Nulls.SKIP) - public Builder authToken(@Nullable OptionalNullable authToken) { - this.authToken = authToken; - return this; - } - - public Builder authToken(String authToken) { - this.authToken = OptionalNullable.of(authToken); - return this; - } - - public Builder authToken(Optional authToken) { - if (authToken.isPresent()) { - this.authToken = OptionalNullable.of(authToken.get()); - } else { - this.authToken = OptionalNullable.absent(); - } - return this; - } - - public Builder authToken(com.auth0.client.mgmt.core.Nullable authToken) { - if (authToken.isNull()) { - this.authToken = OptionalNullable.ofNull(); - } else if (authToken.isEmpty()) { - this.authToken = OptionalNullable.absent(); - } else { - this.authToken = OptionalNullable.of(authToken.get()); - } - return this; - } - - /** - *

Twilio SID

- */ - @JsonSetter(value = "sid", nulls = Nulls.SKIP) - public Builder sid(@Nullable OptionalNullable sid) { - this.sid = sid; - return this; - } - - public Builder sid(String sid) { - this.sid = OptionalNullable.of(sid); - return this; - } - - public Builder sid(Optional sid) { - if (sid.isPresent()) { - this.sid = OptionalNullable.of(sid.get()); - } else { - this.sid = OptionalNullable.absent(); - } - return this; - } - - public Builder sid(com.auth0.client.mgmt.core.Nullable sid) { - if (sid.isNull()) { - this.sid = OptionalNullable.ofNull(); - } else if (sid.isEmpty()) { - this.sid = OptionalNullable.absent(); - } else { - this.sid = OptionalNullable.of(sid.get()); - } - return this; - } - - public GetGuardianFactorsProviderSmsTwilioResponseContent build() { - return new GetGuardianFactorsProviderSmsTwilioResponseContent( - from, messagingServiceSid, authToken, sid, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderSnsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderSnsResponseContent.java deleted file mode 100644 index 7cc96727d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetGuardianFactorsProviderSnsResponseContent.java +++ /dev/null @@ -1,360 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetGuardianFactorsProviderSnsResponseContent.Builder.class) -public final class GetGuardianFactorsProviderSnsResponseContent { - private final OptionalNullable awsAccessKeyId; - - private final OptionalNullable awsSecretAccessKey; - - private final OptionalNullable awsRegion; - - private final OptionalNullable snsApnsPlatformApplicationArn; - - private final OptionalNullable snsGcmPlatformApplicationArn; - - private final Map additionalProperties; - - private GetGuardianFactorsProviderSnsResponseContent( - OptionalNullable awsAccessKeyId, - OptionalNullable awsSecretAccessKey, - OptionalNullable awsRegion, - OptionalNullable snsApnsPlatformApplicationArn, - OptionalNullable snsGcmPlatformApplicationArn, - Map additionalProperties) { - this.awsAccessKeyId = awsAccessKeyId; - this.awsSecretAccessKey = awsSecretAccessKey; - this.awsRegion = awsRegion; - this.snsApnsPlatformApplicationArn = snsApnsPlatformApplicationArn; - this.snsGcmPlatformApplicationArn = snsGcmPlatformApplicationArn; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_access_key_id") - public OptionalNullable getAwsAccessKeyId() { - if (awsAccessKeyId == null) { - return OptionalNullable.absent(); - } - return awsAccessKeyId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_secret_access_key") - public OptionalNullable getAwsSecretAccessKey() { - if (awsSecretAccessKey == null) { - return OptionalNullable.absent(); - } - return awsSecretAccessKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_region") - public OptionalNullable getAwsRegion() { - if (awsRegion == null) { - return OptionalNullable.absent(); - } - return awsRegion; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_apns_platform_application_arn") - public OptionalNullable getSnsApnsPlatformApplicationArn() { - if (snsApnsPlatformApplicationArn == null) { - return OptionalNullable.absent(); - } - return snsApnsPlatformApplicationArn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_gcm_platform_application_arn") - public OptionalNullable getSnsGcmPlatformApplicationArn() { - if (snsGcmPlatformApplicationArn == null) { - return OptionalNullable.absent(); - } - return snsGcmPlatformApplicationArn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_access_key_id") - private OptionalNullable _getAwsAccessKeyId() { - return awsAccessKeyId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_secret_access_key") - private OptionalNullable _getAwsSecretAccessKey() { - return awsSecretAccessKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_region") - private OptionalNullable _getAwsRegion() { - return awsRegion; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_apns_platform_application_arn") - private OptionalNullable _getSnsApnsPlatformApplicationArn() { - return snsApnsPlatformApplicationArn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_gcm_platform_application_arn") - private OptionalNullable _getSnsGcmPlatformApplicationArn() { - return snsGcmPlatformApplicationArn; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetGuardianFactorsProviderSnsResponseContent - && equalTo((GetGuardianFactorsProviderSnsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetGuardianFactorsProviderSnsResponseContent other) { - return awsAccessKeyId.equals(other.awsAccessKeyId) - && awsSecretAccessKey.equals(other.awsSecretAccessKey) - && awsRegion.equals(other.awsRegion) - && snsApnsPlatformApplicationArn.equals(other.snsApnsPlatformApplicationArn) - && snsGcmPlatformApplicationArn.equals(other.snsGcmPlatformApplicationArn); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.awsAccessKeyId, - this.awsSecretAccessKey, - this.awsRegion, - this.snsApnsPlatformApplicationArn, - this.snsGcmPlatformApplicationArn); - } - - @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 awsAccessKeyId = OptionalNullable.absent(); - - private OptionalNullable awsSecretAccessKey = OptionalNullable.absent(); - - private OptionalNullable awsRegion = OptionalNullable.absent(); - - private OptionalNullable snsApnsPlatformApplicationArn = OptionalNullable.absent(); - - private OptionalNullable snsGcmPlatformApplicationArn = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetGuardianFactorsProviderSnsResponseContent other) { - awsAccessKeyId(other.getAwsAccessKeyId()); - awsSecretAccessKey(other.getAwsSecretAccessKey()); - awsRegion(other.getAwsRegion()); - snsApnsPlatformApplicationArn(other.getSnsApnsPlatformApplicationArn()); - snsGcmPlatformApplicationArn(other.getSnsGcmPlatformApplicationArn()); - return this; - } - - @JsonSetter(value = "aws_access_key_id", nulls = Nulls.SKIP) - public Builder awsAccessKeyId(@Nullable OptionalNullable awsAccessKeyId) { - this.awsAccessKeyId = awsAccessKeyId; - return this; - } - - public Builder awsAccessKeyId(String awsAccessKeyId) { - this.awsAccessKeyId = OptionalNullable.of(awsAccessKeyId); - return this; - } - - public Builder awsAccessKeyId(Optional awsAccessKeyId) { - if (awsAccessKeyId.isPresent()) { - this.awsAccessKeyId = OptionalNullable.of(awsAccessKeyId.get()); - } else { - this.awsAccessKeyId = OptionalNullable.absent(); - } - return this; - } - - public Builder awsAccessKeyId(com.auth0.client.mgmt.core.Nullable awsAccessKeyId) { - if (awsAccessKeyId.isNull()) { - this.awsAccessKeyId = OptionalNullable.ofNull(); - } else if (awsAccessKeyId.isEmpty()) { - this.awsAccessKeyId = OptionalNullable.absent(); - } else { - this.awsAccessKeyId = OptionalNullable.of(awsAccessKeyId.get()); - } - return this; - } - - @JsonSetter(value = "aws_secret_access_key", nulls = Nulls.SKIP) - public Builder awsSecretAccessKey(@Nullable OptionalNullable awsSecretAccessKey) { - this.awsSecretAccessKey = awsSecretAccessKey; - return this; - } - - public Builder awsSecretAccessKey(String awsSecretAccessKey) { - this.awsSecretAccessKey = OptionalNullable.of(awsSecretAccessKey); - return this; - } - - public Builder awsSecretAccessKey(Optional awsSecretAccessKey) { - if (awsSecretAccessKey.isPresent()) { - this.awsSecretAccessKey = OptionalNullable.of(awsSecretAccessKey.get()); - } else { - this.awsSecretAccessKey = OptionalNullable.absent(); - } - return this; - } - - public Builder awsSecretAccessKey(com.auth0.client.mgmt.core.Nullable awsSecretAccessKey) { - if (awsSecretAccessKey.isNull()) { - this.awsSecretAccessKey = OptionalNullable.ofNull(); - } else if (awsSecretAccessKey.isEmpty()) { - this.awsSecretAccessKey = OptionalNullable.absent(); - } else { - this.awsSecretAccessKey = OptionalNullable.of(awsSecretAccessKey.get()); - } - return this; - } - - @JsonSetter(value = "aws_region", nulls = Nulls.SKIP) - public Builder awsRegion(@Nullable OptionalNullable awsRegion) { - this.awsRegion = awsRegion; - return this; - } - - public Builder awsRegion(String awsRegion) { - this.awsRegion = OptionalNullable.of(awsRegion); - return this; - } - - public Builder awsRegion(Optional awsRegion) { - if (awsRegion.isPresent()) { - this.awsRegion = OptionalNullable.of(awsRegion.get()); - } else { - this.awsRegion = OptionalNullable.absent(); - } - return this; - } - - public Builder awsRegion(com.auth0.client.mgmt.core.Nullable awsRegion) { - if (awsRegion.isNull()) { - this.awsRegion = OptionalNullable.ofNull(); - } else if (awsRegion.isEmpty()) { - this.awsRegion = OptionalNullable.absent(); - } else { - this.awsRegion = OptionalNullable.of(awsRegion.get()); - } - return this; - } - - @JsonSetter(value = "sns_apns_platform_application_arn", nulls = Nulls.SKIP) - public Builder snsApnsPlatformApplicationArn(@Nullable OptionalNullable snsApnsPlatformApplicationArn) { - this.snsApnsPlatformApplicationArn = snsApnsPlatformApplicationArn; - return this; - } - - public Builder snsApnsPlatformApplicationArn(String snsApnsPlatformApplicationArn) { - this.snsApnsPlatformApplicationArn = OptionalNullable.of(snsApnsPlatformApplicationArn); - return this; - } - - public Builder snsApnsPlatformApplicationArn(Optional snsApnsPlatformApplicationArn) { - if (snsApnsPlatformApplicationArn.isPresent()) { - this.snsApnsPlatformApplicationArn = OptionalNullable.of(snsApnsPlatformApplicationArn.get()); - } else { - this.snsApnsPlatformApplicationArn = OptionalNullable.absent(); - } - return this; - } - - public Builder snsApnsPlatformApplicationArn( - com.auth0.client.mgmt.core.Nullable snsApnsPlatformApplicationArn) { - if (snsApnsPlatformApplicationArn.isNull()) { - this.snsApnsPlatformApplicationArn = OptionalNullable.ofNull(); - } else if (snsApnsPlatformApplicationArn.isEmpty()) { - this.snsApnsPlatformApplicationArn = OptionalNullable.absent(); - } else { - this.snsApnsPlatformApplicationArn = OptionalNullable.of(snsApnsPlatformApplicationArn.get()); - } - return this; - } - - @JsonSetter(value = "sns_gcm_platform_application_arn", nulls = Nulls.SKIP) - public Builder snsGcmPlatformApplicationArn(@Nullable OptionalNullable snsGcmPlatformApplicationArn) { - this.snsGcmPlatformApplicationArn = snsGcmPlatformApplicationArn; - return this; - } - - public Builder snsGcmPlatformApplicationArn(String snsGcmPlatformApplicationArn) { - this.snsGcmPlatformApplicationArn = OptionalNullable.of(snsGcmPlatformApplicationArn); - return this; - } - - public Builder snsGcmPlatformApplicationArn(Optional snsGcmPlatformApplicationArn) { - if (snsGcmPlatformApplicationArn.isPresent()) { - this.snsGcmPlatformApplicationArn = OptionalNullable.of(snsGcmPlatformApplicationArn.get()); - } else { - this.snsGcmPlatformApplicationArn = OptionalNullable.absent(); - } - return this; - } - - public Builder snsGcmPlatformApplicationArn( - com.auth0.client.mgmt.core.Nullable snsGcmPlatformApplicationArn) { - if (snsGcmPlatformApplicationArn.isNull()) { - this.snsGcmPlatformApplicationArn = OptionalNullable.ofNull(); - } else if (snsGcmPlatformApplicationArn.isEmpty()) { - this.snsGcmPlatformApplicationArn = OptionalNullable.absent(); - } else { - this.snsGcmPlatformApplicationArn = OptionalNullable.of(snsGcmPlatformApplicationArn.get()); - } - return this; - } - - public GetGuardianFactorsProviderSnsResponseContent build() { - return new GetGuardianFactorsProviderSnsResponseContent( - awsAccessKeyId, - awsSecretAccessKey, - awsRegion, - snsApnsPlatformApplicationArn, - snsGcmPlatformApplicationArn, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetHookRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetHookRequestParameters.java deleted file mode 100644 index 3c3c39176..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetHookRequestParameters.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetHookRequestParameters.Builder.class) -public final class GetHookRequestParameters { - private final OptionalNullable fields; - - private final Map additionalProperties; - - private GetHookRequestParameters(OptionalNullable fields, Map additionalProperties) { - this.fields = fields; - this.additionalProperties = additionalProperties; - } - - /** - * @return Comma-separated list of fields to include 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; - } - - @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; - return other instanceof GetHookRequestParameters && equalTo((GetHookRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetHookRequestParameters other) { - return fields.equals(other.fields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.fields); - } - - @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 fields = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetHookRequestParameters other) { - fields(other.getFields()); - return this; - } - - /** - *

Comma-separated list of fields to include 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; - } - - public GetHookRequestParameters build() { - return new GetHookRequestParameters(fields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetHookResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetHookResponseContent.java deleted file mode 100644 index d7ad3bea4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetHookResponseContent.java +++ /dev/null @@ -1,247 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetHookResponseContent.Builder.class) -public final class GetHookResponseContent { - private final Optional triggerId; - - private final Optional id; - - private final Optional name; - - private final Optional enabled; - - private final Optional script; - - private final Optional> dependencies; - - private final Map additionalProperties; - - private GetHookResponseContent( - Optional triggerId, - Optional id, - Optional name, - Optional enabled, - Optional script, - Optional> dependencies, - Map additionalProperties) { - this.triggerId = triggerId; - this.id = id; - this.name = name; - this.enabled = enabled; - this.script = script; - this.dependencies = dependencies; - this.additionalProperties = additionalProperties; - } - - /** - * @return Trigger ID - */ - @JsonProperty("triggerId") - public Optional getTriggerId() { - return triggerId; - } - - /** - * @return ID of this hook. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Name of this hook. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Whether this hook will be executed (true) or ignored (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Code to be executed when this hook runs. - */ - @JsonProperty("script") - public Optional getScript() { - return script; - } - - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetHookResponseContent && equalTo((GetHookResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetHookResponseContent other) { - return triggerId.equals(other.triggerId) - && id.equals(other.id) - && name.equals(other.name) - && enabled.equals(other.enabled) - && script.equals(other.script) - && dependencies.equals(other.dependencies); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.triggerId, this.id, this.name, this.enabled, this.script, this.dependencies); - } - - @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 triggerId = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional enabled = Optional.empty(); - - private Optional script = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetHookResponseContent other) { - triggerId(other.getTriggerId()); - id(other.getId()); - name(other.getName()); - enabled(other.getEnabled()); - script(other.getScript()); - dependencies(other.getDependencies()); - return this; - } - - /** - *

Trigger ID

- */ - @JsonSetter(value = "triggerId", nulls = Nulls.SKIP) - public Builder triggerId(Optional triggerId) { - this.triggerId = triggerId; - return this; - } - - public Builder triggerId(String triggerId) { - this.triggerId = Optional.ofNullable(triggerId); - return this; - } - - /** - *

ID of this hook.

- */ - @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; - } - - /** - *

Name of this hook.

- */ - @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 hook will be executed (true) or ignored (false).

- */ - @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; - } - - /** - *

Code to be executed when this hook runs.

- */ - @JsonSetter(value = "script", nulls = Nulls.SKIP) - public Builder script(Optional script) { - this.script = script; - return this; - } - - public Builder script(String script) { - this.script = Optional.ofNullable(script); - return this; - } - - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public Builder dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - public Builder dependencies(Map dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - public GetHookResponseContent build() { - return new GetHookResponseContent(triggerId, id, name, enabled, script, dependencies, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetJobErrorResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetJobErrorResponseContent.java deleted file mode 100644 index 032a6928c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetJobErrorResponseContent.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetJobErrorResponseContent.Builder.class) -public final class GetJobErrorResponseContent { - private final Optional> user; - - private final Optional> errors; - - private final Map additionalProperties; - - private GetJobErrorResponseContent( - Optional> user, - Optional> errors, - Map additionalProperties) { - this.user = user; - this.errors = errors; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("user") - public Optional> getUser() { - return user; - } - - /** - * @return Errors importing the user. - */ - @JsonProperty("errors") - public Optional> getErrors() { - return errors; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetJobErrorResponseContent && equalTo((GetJobErrorResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetJobErrorResponseContent other) { - return user.equals(other.user) && errors.equals(other.errors); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.user, this.errors); - } - - @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> user = Optional.empty(); - - private Optional> errors = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetJobErrorResponseContent other) { - user(other.getUser()); - errors(other.getErrors()); - return this; - } - - @JsonSetter(value = "user", nulls = Nulls.SKIP) - public Builder user(Optional> user) { - this.user = user; - return this; - } - - public Builder user(Map user) { - this.user = Optional.ofNullable(user); - return this; - } - - /** - *

Errors importing the user.

- */ - @JsonSetter(value = "errors", nulls = Nulls.SKIP) - public Builder errors(Optional> errors) { - this.errors = errors; - return this; - } - - public Builder errors(List errors) { - this.errors = Optional.ofNullable(errors); - return this; - } - - public GetJobErrorResponseContent build() { - return new GetJobErrorResponseContent(user, errors, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetJobGenericErrorResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetJobGenericErrorResponseContent.java deleted file mode 100644 index 54163273a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetJobGenericErrorResponseContent.java +++ /dev/null @@ -1,317 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetJobGenericErrorResponseContent.Builder.class) -public final class GetJobGenericErrorResponseContent { - private final String status; - - private final String type; - - private final Optional createdAt; - - private final String id; - - private final Optional connectionId; - - private final Optional statusDetails; - - private final Map additionalProperties; - - private GetJobGenericErrorResponseContent( - String status, - String type, - Optional createdAt, - String id, - Optional connectionId, - Optional statusDetails, - Map additionalProperties) { - this.status = status; - this.type = type; - this.createdAt = createdAt; - this.id = id; - this.connectionId = connectionId; - this.statusDetails = statusDetails; - this.additionalProperties = additionalProperties; - } - - /** - * @return Status of this job. - */ - @JsonProperty("status") - public String getStatus() { - return status; - } - - /** - * @return Type of job this is. - */ - @JsonProperty("type") - public String getType() { - return type; - } - - /** - * @return When this job was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return ID of this job. - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return connection_id of the connection this job uses. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - /** - * @return Status details. - */ - @JsonProperty("status_details") - public Optional getStatusDetails() { - return statusDetails; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetJobGenericErrorResponseContent && equalTo((GetJobGenericErrorResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetJobGenericErrorResponseContent other) { - return status.equals(other.status) - && type.equals(other.type) - && createdAt.equals(other.createdAt) - && id.equals(other.id) - && connectionId.equals(other.connectionId) - && statusDetails.equals(other.statusDetails); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.status, this.type, this.createdAt, this.id, this.connectionId, this.statusDetails); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StatusStage builder() { - return new Builder(); - } - - public interface StatusStage { - /** - *

Status of this job.

- */ - TypeStage status(@NotNull String status); - - Builder from(GetJobGenericErrorResponseContent other); - } - - public interface TypeStage { - /** - *

Type of job this is.

- */ - IdStage type(@NotNull String type); - } - - public interface IdStage { - /** - *

ID of this job.

- */ - _FinalStage id(@NotNull String id); - } - - public interface _FinalStage { - GetJobGenericErrorResponseContent build(); - - /** - *

When this job was created.

- */ - _FinalStage createdAt(Optional createdAt); - - _FinalStage createdAt(String createdAt); - - /** - *

connection_id of the connection this job uses.

- */ - _FinalStage connectionId(Optional connectionId); - - _FinalStage connectionId(String connectionId); - - /** - *

Status details.

- */ - _FinalStage statusDetails(Optional statusDetails); - - _FinalStage statusDetails(String statusDetails); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StatusStage, TypeStage, IdStage, _FinalStage { - private String status; - - private String type; - - private String id; - - private Optional statusDetails = Optional.empty(); - - private Optional connectionId = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetJobGenericErrorResponseContent other) { - status(other.getStatus()); - type(other.getType()); - createdAt(other.getCreatedAt()); - id(other.getId()); - connectionId(other.getConnectionId()); - statusDetails(other.getStatusDetails()); - return this; - } - - /** - *

Status of this job.

- *

Status of this job.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("status") - public TypeStage status(@NotNull String status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - /** - *

Type of job this is.

- *

Type of job this is.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("type") - public IdStage type(@NotNull String type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

ID of this job.

- *

ID of this job.

- * @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; - } - - /** - *

Status details.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage statusDetails(String statusDetails) { - this.statusDetails = Optional.ofNullable(statusDetails); - return this; - } - - /** - *

Status details.

- */ - @java.lang.Override - @JsonSetter(value = "status_details", nulls = Nulls.SKIP) - public _FinalStage statusDetails(Optional statusDetails) { - this.statusDetails = statusDetails; - return this; - } - - /** - *

connection_id of the connection this job uses.

- * @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; - } - - /** - *

connection_id of the connection this job uses.

- */ - @java.lang.Override - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public _FinalStage connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - /** - *

When this job was created.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage createdAt(String createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - /** - *

When this job was created.

- */ - @java.lang.Override - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public _FinalStage createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - @java.lang.Override - public GetJobGenericErrorResponseContent build() { - return new GetJobGenericErrorResponseContent( - status, type, createdAt, id, connectionId, statusDetails, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetJobImportUserError.java b/src/main/java/com/auth0/client/mgmt/types/GetJobImportUserError.java deleted file mode 100644 index 679232e11..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetJobImportUserError.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetJobImportUserError.Builder.class) -public final class GetJobImportUserError { - private final Optional code; - - private final Optional message; - - private final Optional path; - - private final Map additionalProperties; - - private GetJobImportUserError( - Optional code, - Optional message, - Optional path, - Map additionalProperties) { - this.code = code; - this.message = message; - this.path = path; - this.additionalProperties = additionalProperties; - } - - /** - * @return Error code. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return Error message. - */ - @JsonProperty("message") - public Optional getMessage() { - return message; - } - - /** - * @return Error field. - */ - @JsonProperty("path") - public Optional getPath() { - return path; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetJobImportUserError && equalTo((GetJobImportUserError) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetJobImportUserError other) { - return code.equals(other.code) && message.equals(other.message) && path.equals(other.path); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.code, this.message, this.path); - } - - @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 code = Optional.empty(); - - private Optional message = Optional.empty(); - - private Optional path = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetJobImportUserError other) { - code(other.getCode()); - message(other.getMessage()); - path(other.getPath()); - return this; - } - - /** - *

Error code.

- */ - @JsonSetter(value = "code", nulls = Nulls.SKIP) - public Builder code(Optional code) { - this.code = code; - return this; - } - - public Builder code(String code) { - this.code = Optional.ofNullable(code); - return this; - } - - /** - *

Error message.

- */ - @JsonSetter(value = "message", nulls = Nulls.SKIP) - public Builder message(Optional message) { - this.message = message; - return this; - } - - public Builder message(String message) { - this.message = Optional.ofNullable(message); - return this; - } - - /** - *

Error field.

- */ - @JsonSetter(value = "path", nulls = Nulls.SKIP) - public Builder path(Optional path) { - this.path = path; - return this; - } - - public Builder path(String path) { - this.path = Optional.ofNullable(path); - return this; - } - - public GetJobImportUserError build() { - return new GetJobImportUserError(code, message, path, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetJobResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetJobResponseContent.java deleted file mode 100644 index ff0eb0d0e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetJobResponseContent.java +++ /dev/null @@ -1,528 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetJobResponseContent.Builder.class) -public final class GetJobResponseContent { - private final String status; - - private final String type; - - private final Optional createdAt; - - private final String id; - - private final Optional connectionId; - - private final Optional location; - - private final Optional percentageDone; - - private final Optional timeLeftSeconds; - - private final Optional format; - - private final Optional statusDetails; - - private final Optional summary; - - private final Map additionalProperties; - - private GetJobResponseContent( - String status, - String type, - Optional createdAt, - String id, - Optional connectionId, - Optional location, - Optional percentageDone, - Optional timeLeftSeconds, - Optional format, - Optional statusDetails, - Optional summary, - Map additionalProperties) { - this.status = status; - this.type = type; - this.createdAt = createdAt; - this.id = id; - this.connectionId = connectionId; - this.location = location; - this.percentageDone = percentageDone; - this.timeLeftSeconds = timeLeftSeconds; - this.format = format; - this.statusDetails = statusDetails; - this.summary = summary; - this.additionalProperties = additionalProperties; - } - - /** - * @return Status of this job. - */ - @JsonProperty("status") - public String getStatus() { - return status; - } - - /** - * @return Type of job this is. - */ - @JsonProperty("type") - public String getType() { - return type; - } - - /** - * @return When this job was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return ID of this job. - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return connection_id of the connection this job uses. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - /** - * @return URL to download the result of this job. - */ - @JsonProperty("location") - public Optional getLocation() { - return location; - } - - /** - * @return Completion percentage of this job. - */ - @JsonProperty("percentage_done") - public Optional getPercentageDone() { - return percentageDone; - } - - /** - * @return Estimated time remaining before job completes. - */ - @JsonProperty("time_left_seconds") - public Optional getTimeLeftSeconds() { - return timeLeftSeconds; - } - - @JsonProperty("format") - public Optional getFormat() { - return format; - } - - /** - * @return Status details. - */ - @JsonProperty("status_details") - public Optional getStatusDetails() { - return statusDetails; - } - - @JsonProperty("summary") - public Optional getSummary() { - return summary; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetJobResponseContent && equalTo((GetJobResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetJobResponseContent other) { - return status.equals(other.status) - && type.equals(other.type) - && createdAt.equals(other.createdAt) - && id.equals(other.id) - && connectionId.equals(other.connectionId) - && location.equals(other.location) - && percentageDone.equals(other.percentageDone) - && timeLeftSeconds.equals(other.timeLeftSeconds) - && format.equals(other.format) - && statusDetails.equals(other.statusDetails) - && summary.equals(other.summary); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.status, - this.type, - this.createdAt, - this.id, - this.connectionId, - this.location, - this.percentageDone, - this.timeLeftSeconds, - this.format, - this.statusDetails, - this.summary); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static StatusStage builder() { - return new Builder(); - } - - public interface StatusStage { - /** - *

Status of this job.

- */ - TypeStage status(@NotNull String status); - - Builder from(GetJobResponseContent other); - } - - public interface TypeStage { - /** - *

Type of job this is.

- */ - IdStage type(@NotNull String type); - } - - public interface IdStage { - /** - *

ID of this job.

- */ - _FinalStage id(@NotNull String id); - } - - public interface _FinalStage { - GetJobResponseContent build(); - - /** - *

When this job was created.

- */ - _FinalStage createdAt(Optional createdAt); - - _FinalStage createdAt(String createdAt); - - /** - *

connection_id of the connection this job uses.

- */ - _FinalStage connectionId(Optional connectionId); - - _FinalStage connectionId(String connectionId); - - /** - *

URL to download the result of this job.

- */ - _FinalStage location(Optional location); - - _FinalStage location(String location); - - /** - *

Completion percentage of this job.

- */ - _FinalStage percentageDone(Optional percentageDone); - - _FinalStage percentageDone(Integer percentageDone); - - /** - *

Estimated time remaining before job completes.

- */ - _FinalStage timeLeftSeconds(Optional timeLeftSeconds); - - _FinalStage timeLeftSeconds(Integer timeLeftSeconds); - - _FinalStage format(Optional format); - - _FinalStage format(JobFileFormatEnum format); - - /** - *

Status details.

- */ - _FinalStage statusDetails(Optional statusDetails); - - _FinalStage statusDetails(String statusDetails); - - _FinalStage summary(Optional summary); - - _FinalStage summary(GetJobSummary summary); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements StatusStage, TypeStage, IdStage, _FinalStage { - private String status; - - private String type; - - private String id; - - private Optional summary = Optional.empty(); - - private Optional statusDetails = Optional.empty(); - - private Optional format = Optional.empty(); - - private Optional timeLeftSeconds = Optional.empty(); - - private Optional percentageDone = Optional.empty(); - - private Optional location = Optional.empty(); - - private Optional connectionId = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetJobResponseContent other) { - status(other.getStatus()); - type(other.getType()); - createdAt(other.getCreatedAt()); - id(other.getId()); - connectionId(other.getConnectionId()); - location(other.getLocation()); - percentageDone(other.getPercentageDone()); - timeLeftSeconds(other.getTimeLeftSeconds()); - format(other.getFormat()); - statusDetails(other.getStatusDetails()); - summary(other.getSummary()); - return this; - } - - /** - *

Status of this job.

- *

Status of this job.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("status") - public TypeStage status(@NotNull String status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - /** - *

Type of job this is.

- *

Type of job this is.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("type") - public IdStage type(@NotNull String type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

ID of this job.

- *

ID of this job.

- * @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 summary(GetJobSummary summary) { - this.summary = Optional.ofNullable(summary); - return this; - } - - @java.lang.Override - @JsonSetter(value = "summary", nulls = Nulls.SKIP) - public _FinalStage summary(Optional summary) { - this.summary = summary; - return this; - } - - /** - *

Status details.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage statusDetails(String statusDetails) { - this.statusDetails = Optional.ofNullable(statusDetails); - return this; - } - - /** - *

Status details.

- */ - @java.lang.Override - @JsonSetter(value = "status_details", nulls = Nulls.SKIP) - public _FinalStage statusDetails(Optional statusDetails) { - this.statusDetails = statusDetails; - return this; - } - - @java.lang.Override - public _FinalStage format(JobFileFormatEnum format) { - this.format = Optional.ofNullable(format); - return this; - } - - @java.lang.Override - @JsonSetter(value = "format", nulls = Nulls.SKIP) - public _FinalStage format(Optional format) { - this.format = format; - return this; - } - - /** - *

Estimated time remaining before job completes.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage timeLeftSeconds(Integer timeLeftSeconds) { - this.timeLeftSeconds = Optional.ofNullable(timeLeftSeconds); - return this; - } - - /** - *

Estimated time remaining before job completes.

- */ - @java.lang.Override - @JsonSetter(value = "time_left_seconds", nulls = Nulls.SKIP) - public _FinalStage timeLeftSeconds(Optional timeLeftSeconds) { - this.timeLeftSeconds = timeLeftSeconds; - return this; - } - - /** - *

Completion percentage of this job.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage percentageDone(Integer percentageDone) { - this.percentageDone = Optional.ofNullable(percentageDone); - return this; - } - - /** - *

Completion percentage of this job.

- */ - @java.lang.Override - @JsonSetter(value = "percentage_done", nulls = Nulls.SKIP) - public _FinalStage percentageDone(Optional percentageDone) { - this.percentageDone = percentageDone; - return this; - } - - /** - *

URL to download the result of this job.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage location(String location) { - this.location = Optional.ofNullable(location); - return this; - } - - /** - *

URL to download the result of this job.

- */ - @java.lang.Override - @JsonSetter(value = "location", nulls = Nulls.SKIP) - public _FinalStage location(Optional location) { - this.location = location; - return this; - } - - /** - *

connection_id of the connection this job uses.

- * @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; - } - - /** - *

connection_id of the connection this job uses.

- */ - @java.lang.Override - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public _FinalStage connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - /** - *

When this job was created.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage createdAt(String createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - /** - *

When this job was created.

- */ - @java.lang.Override - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public _FinalStage createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - @java.lang.Override - public GetJobResponseContent build() { - return new GetJobResponseContent( - status, - type, - createdAt, - id, - connectionId, - location, - percentageDone, - timeLeftSeconds, - format, - statusDetails, - summary, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetJobSummary.java b/src/main/java/com/auth0/client/mgmt/types/GetJobSummary.java deleted file mode 100644 index 7c0f86247..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetJobSummary.java +++ /dev/null @@ -1,193 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetJobSummary.Builder.class) -public final class GetJobSummary { - private final Optional failed; - - private final Optional updated; - - private final Optional inserted; - - private final Optional total; - - private final Map additionalProperties; - - private GetJobSummary( - Optional failed, - Optional updated, - Optional inserted, - Optional total, - Map additionalProperties) { - this.failed = failed; - this.updated = updated; - this.inserted = inserted; - this.total = total; - this.additionalProperties = additionalProperties; - } - - /** - * @return Number of failed operations. - */ - @JsonProperty("failed") - public Optional getFailed() { - return failed; - } - - /** - * @return Number of updated records. - */ - @JsonProperty("updated") - public Optional getUpdated() { - return updated; - } - - /** - * @return Number of inserted records. - */ - @JsonProperty("inserted") - public Optional getInserted() { - return inserted; - } - - /** - * @return Total number of operations. - */ - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetJobSummary && equalTo((GetJobSummary) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetJobSummary other) { - return failed.equals(other.failed) - && updated.equals(other.updated) - && inserted.equals(other.inserted) - && total.equals(other.total); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.failed, this.updated, this.inserted, this.total); - } - - @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 failed = Optional.empty(); - - private Optional updated = Optional.empty(); - - private Optional inserted = Optional.empty(); - - private Optional total = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetJobSummary other) { - failed(other.getFailed()); - updated(other.getUpdated()); - inserted(other.getInserted()); - total(other.getTotal()); - return this; - } - - /** - *

Number of failed operations.

- */ - @JsonSetter(value = "failed", nulls = Nulls.SKIP) - public Builder failed(Optional failed) { - this.failed = failed; - return this; - } - - public Builder failed(Integer failed) { - this.failed = Optional.ofNullable(failed); - return this; - } - - /** - *

Number of updated records.

- */ - @JsonSetter(value = "updated", nulls = Nulls.SKIP) - public Builder updated(Optional updated) { - this.updated = updated; - return this; - } - - public Builder updated(Integer updated) { - this.updated = Optional.ofNullable(updated); - return this; - } - - /** - *

Number of inserted records.

- */ - @JsonSetter(value = "inserted", nulls = Nulls.SKIP) - public Builder inserted(Optional inserted) { - this.inserted = inserted; - return this; - } - - public Builder inserted(Integer inserted) { - this.inserted = Optional.ofNullable(inserted); - return this; - } - - /** - *

Total number of operations.

- */ - @JsonSetter(value = "total", nulls = Nulls.SKIP) - public Builder total(Optional total) { - this.total = total; - return this; - } - - public Builder total(Integer total) { - this.total = Optional.ofNullable(total); - return this; - } - - public GetJobSummary build() { - return new GetJobSummary(failed, updated, inserted, total, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetLogResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetLogResponseContent.java deleted file mode 100644 index 4c479c269..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetLogResponseContent.java +++ /dev/null @@ -1,755 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetLogResponseContent.Builder.class) -public final class GetLogResponseContent { - private final Optional date; - - private final Optional type; - - private final OptionalNullable description; - - private final Optional connection; - - private final Optional connectionId; - - private final Optional clientId; - - private final Optional clientName; - - private final Optional ip; - - private final Optional hostname; - - private final Optional userId; - - private final Optional userName; - - private final Optional audience; - - private final Optional scope; - - private final Optional strategy; - - private final Optional strategyType; - - private final Optional logId; - - private final Optional isMobile; - - private final Optional> details; - - private final Optional userAgent; - - private final Optional securityContext; - - private final Optional locationInfo; - - private final Map additionalProperties; - - private GetLogResponseContent( - Optional date, - Optional type, - OptionalNullable description, - Optional connection, - Optional connectionId, - Optional clientId, - Optional clientName, - Optional ip, - Optional hostname, - Optional userId, - Optional userName, - Optional audience, - Optional scope, - Optional strategy, - Optional strategyType, - Optional logId, - Optional isMobile, - Optional> details, - Optional userAgent, - Optional securityContext, - Optional locationInfo, - Map additionalProperties) { - this.date = date; - this.type = type; - this.description = description; - this.connection = connection; - this.connectionId = connectionId; - this.clientId = clientId; - this.clientName = clientName; - this.ip = ip; - this.hostname = hostname; - this.userId = userId; - this.userName = userName; - this.audience = audience; - this.scope = scope; - this.strategy = strategy; - this.strategyType = strategyType; - this.logId = logId; - this.isMobile = isMobile; - this.details = details; - this.userAgent = userAgent; - this.securityContext = securityContext; - this.locationInfo = locationInfo; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("date") - public Optional getDate() { - return date; - } - - /** - * @return Type of event. - */ - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return Description of this event. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("description") - public OptionalNullable getDescription() { - if (description == null) { - return OptionalNullable.absent(); - } - return description; - } - - /** - * @return Name of the connection the event relates to. - */ - @JsonProperty("connection") - public Optional getConnection() { - return connection; - } - - /** - * @return ID of the connection the event relates to. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - /** - * @return ID of the client (application). - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @return Name of the client (application). - */ - @JsonProperty("client_name") - public Optional getClientName() { - return clientName; - } - - /** - * @return IP address of the log event source. - */ - @JsonProperty("ip") - public Optional getIp() { - return ip; - } - - /** - * @return Hostname the event applies to. - */ - @JsonProperty("hostname") - public Optional getHostname() { - return hostname; - } - - /** - * @return ID of the user involved in the event. - */ - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - /** - * @return Name of the user involved in the event. - */ - @JsonProperty("user_name") - public Optional getUserName() { - return userName; - } - - /** - * @return API audience the event applies to. - */ - @JsonProperty("audience") - public Optional getAudience() { - return audience; - } - - /** - * @return Scope permissions applied to the event. - */ - @JsonProperty("scope") - public Optional getScope() { - return scope; - } - - /** - * @return Name of the strategy involved in the event. - */ - @JsonProperty("strategy") - public Optional getStrategy() { - return strategy; - } - - /** - * @return Type of strategy involved in the event. - */ - @JsonProperty("strategy_type") - public Optional getStrategyType() { - return strategyType; - } - - /** - * @return Unique ID of the event. - */ - @JsonProperty("log_id") - public Optional getLogId() { - return logId; - } - - /** - * @return Whether the client was a mobile device (true) or desktop/laptop/server (false). - */ - @JsonProperty("isMobile") - public Optional getIsMobile() { - return isMobile; - } - - @JsonProperty("details") - public Optional> getDetails() { - return details; - } - - /** - * @return User agent string from the client device that caused the event. - */ - @JsonProperty("user_agent") - public Optional getUserAgent() { - return userAgent; - } - - @JsonProperty("security_context") - public Optional getSecurityContext() { - return securityContext; - } - - @JsonProperty("location_info") - public Optional getLocationInfo() { - return locationInfo; - } - - @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 GetLogResponseContent && equalTo((GetLogResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetLogResponseContent other) { - return date.equals(other.date) - && type.equals(other.type) - && description.equals(other.description) - && connection.equals(other.connection) - && connectionId.equals(other.connectionId) - && clientId.equals(other.clientId) - && clientName.equals(other.clientName) - && ip.equals(other.ip) - && hostname.equals(other.hostname) - && userId.equals(other.userId) - && userName.equals(other.userName) - && audience.equals(other.audience) - && scope.equals(other.scope) - && strategy.equals(other.strategy) - && strategyType.equals(other.strategyType) - && logId.equals(other.logId) - && isMobile.equals(other.isMobile) - && details.equals(other.details) - && userAgent.equals(other.userAgent) - && securityContext.equals(other.securityContext) - && locationInfo.equals(other.locationInfo); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.date, - this.type, - this.description, - this.connection, - this.connectionId, - this.clientId, - this.clientName, - this.ip, - this.hostname, - this.userId, - this.userName, - this.audience, - this.scope, - this.strategy, - this.strategyType, - this.logId, - this.isMobile, - this.details, - this.userAgent, - this.securityContext, - this.locationInfo); - } - - @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 date = Optional.empty(); - - private Optional type = Optional.empty(); - - private OptionalNullable description = OptionalNullable.absent(); - - private Optional connection = Optional.empty(); - - private Optional connectionId = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional clientName = Optional.empty(); - - private Optional ip = Optional.empty(); - - private Optional hostname = Optional.empty(); - - private Optional userId = Optional.empty(); - - private Optional userName = Optional.empty(); - - private Optional audience = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional strategy = Optional.empty(); - - private Optional strategyType = Optional.empty(); - - private Optional logId = Optional.empty(); - - private Optional isMobile = Optional.empty(); - - private Optional> details = Optional.empty(); - - private Optional userAgent = Optional.empty(); - - private Optional securityContext = Optional.empty(); - - private Optional locationInfo = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetLogResponseContent other) { - date(other.getDate()); - type(other.getType()); - description(other.getDescription()); - connection(other.getConnection()); - connectionId(other.getConnectionId()); - clientId(other.getClientId()); - clientName(other.getClientName()); - ip(other.getIp()); - hostname(other.getHostname()); - userId(other.getUserId()); - userName(other.getUserName()); - audience(other.getAudience()); - scope(other.getScope()); - strategy(other.getStrategy()); - strategyType(other.getStrategyType()); - logId(other.getLogId()); - isMobile(other.getIsMobile()); - details(other.getDetails()); - userAgent(other.getUserAgent()); - securityContext(other.getSecurityContext()); - locationInfo(other.getLocationInfo()); - return this; - } - - @JsonSetter(value = "date", nulls = Nulls.SKIP) - public Builder date(Optional date) { - this.date = date; - return this; - } - - public Builder date(LogDate date) { - this.date = Optional.ofNullable(date); - return this; - } - - /** - *

Type of event.

- */ - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(String type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

Description of this event.

- */ - @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; - } - - /** - *

Name of the connection the event relates to.

- */ - @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; - } - - /** - *

ID of the connection the event relates to.

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - return this; - } - - /** - *

ID of the client (application).

- */ - @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; - } - - /** - *

Name of the client (application).

- */ - @JsonSetter(value = "client_name", nulls = Nulls.SKIP) - public Builder clientName(Optional clientName) { - this.clientName = clientName; - return this; - } - - public Builder clientName(String clientName) { - this.clientName = Optional.ofNullable(clientName); - return this; - } - - /** - *

IP address of the log event source.

- */ - @JsonSetter(value = "ip", nulls = Nulls.SKIP) - public Builder ip(Optional ip) { - this.ip = ip; - return this; - } - - public Builder ip(String ip) { - this.ip = Optional.ofNullable(ip); - return this; - } - - /** - *

Hostname the event applies to.

- */ - @JsonSetter(value = "hostname", nulls = Nulls.SKIP) - public Builder hostname(Optional hostname) { - this.hostname = hostname; - return this; - } - - public Builder hostname(String hostname) { - this.hostname = Optional.ofNullable(hostname); - return this; - } - - /** - *

ID of the user involved in the event.

- */ - @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; - } - - /** - *

Name of the user involved in the event.

- */ - @JsonSetter(value = "user_name", 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; - } - - /** - *

API audience the event applies to.

- */ - @JsonSetter(value = "audience", nulls = Nulls.SKIP) - public Builder audience(Optional audience) { - this.audience = audience; - return this; - } - - public Builder audience(String audience) { - this.audience = Optional.ofNullable(audience); - return this; - } - - /** - *

Scope permissions applied to the event.

- */ - @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; - } - - /** - *

Name of the strategy involved in the event.

- */ - @JsonSetter(value = "strategy", nulls = Nulls.SKIP) - public Builder strategy(Optional strategy) { - this.strategy = strategy; - return this; - } - - public Builder strategy(String strategy) { - this.strategy = Optional.ofNullable(strategy); - return this; - } - - /** - *

Type of strategy involved in the event.

- */ - @JsonSetter(value = "strategy_type", nulls = Nulls.SKIP) - public Builder strategyType(Optional strategyType) { - this.strategyType = strategyType; - return this; - } - - public Builder strategyType(String strategyType) { - this.strategyType = Optional.ofNullable(strategyType); - return this; - } - - /** - *

Unique ID of the event.

- */ - @JsonSetter(value = "log_id", nulls = Nulls.SKIP) - public Builder logId(Optional logId) { - this.logId = logId; - return this; - } - - public Builder logId(String logId) { - this.logId = Optional.ofNullable(logId); - return this; - } - - /** - *

Whether the client was a mobile device (true) or desktop/laptop/server (false).

- */ - @JsonSetter(value = "isMobile", nulls = Nulls.SKIP) - public Builder isMobile(Optional isMobile) { - this.isMobile = isMobile; - return this; - } - - public Builder isMobile(Boolean isMobile) { - this.isMobile = Optional.ofNullable(isMobile); - return this; - } - - @JsonSetter(value = "details", nulls = Nulls.SKIP) - public Builder details(Optional> details) { - this.details = details; - return this; - } - - public Builder details(Map details) { - this.details = Optional.ofNullable(details); - return this; - } - - /** - *

User agent string from the client device that caused the event.

- */ - @JsonSetter(value = "user_agent", nulls = Nulls.SKIP) - public Builder userAgent(Optional userAgent) { - this.userAgent = userAgent; - return this; - } - - public Builder userAgent(String userAgent) { - this.userAgent = Optional.ofNullable(userAgent); - return this; - } - - @JsonSetter(value = "security_context", nulls = Nulls.SKIP) - public Builder securityContext(Optional securityContext) { - this.securityContext = securityContext; - return this; - } - - public Builder securityContext(LogSecurityContext securityContext) { - this.securityContext = Optional.ofNullable(securityContext); - return this; - } - - @JsonSetter(value = "location_info", nulls = Nulls.SKIP) - public Builder locationInfo(Optional locationInfo) { - this.locationInfo = locationInfo; - return this; - } - - public Builder locationInfo(LogLocationInfo locationInfo) { - this.locationInfo = Optional.ofNullable(locationInfo); - return this; - } - - public GetLogResponseContent build() { - return new GetLogResponseContent( - date, - type, - description, - connection, - connectionId, - clientId, - clientName, - ip, - hostname, - userId, - userName, - audience, - scope, - strategy, - strategyType, - logId, - isMobile, - details, - userAgent, - securityContext, - locationInfo, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetLogStreamResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetLogStreamResponseContent.java deleted file mode 100644 index d2995b77f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetLogStreamResponseContent.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = GetLogStreamResponseContent.Deserializer.class) -public final class GetLogStreamResponseContent { - private final Object value; - - private final int type; - - private GetLogStreamResponseContent(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((LogStreamHttpResponseSchema) this.value); - } else if (this.type == 1) { - return visitor.visit((LogStreamEventBridgeResponseSchema) this.value); - } else if (this.type == 2) { - return visitor.visit((LogStreamEventGridResponseSchema) this.value); - } else if (this.type == 3) { - return visitor.visit((LogStreamDatadogResponseSchema) this.value); - } else if (this.type == 4) { - return visitor.visit((LogStreamSplunkResponseSchema) this.value); - } else if (this.type == 5) { - return visitor.visit((LogStreamSumoResponseSchema) this.value); - } else if (this.type == 6) { - return visitor.visit((LogStreamSegmentResponseSchema) this.value); - } else if (this.type == 7) { - return visitor.visit((LogStreamMixpanelResponseSchema) 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 GetLogStreamResponseContent && equalTo((GetLogStreamResponseContent) other); - } - - private boolean equalTo(GetLogStreamResponseContent 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 GetLogStreamResponseContent of(LogStreamHttpResponseSchema value) { - return new GetLogStreamResponseContent(value, 0); - } - - public static GetLogStreamResponseContent of(LogStreamEventBridgeResponseSchema value) { - return new GetLogStreamResponseContent(value, 1); - } - - public static GetLogStreamResponseContent of(LogStreamEventGridResponseSchema value) { - return new GetLogStreamResponseContent(value, 2); - } - - public static GetLogStreamResponseContent of(LogStreamDatadogResponseSchema value) { - return new GetLogStreamResponseContent(value, 3); - } - - public static GetLogStreamResponseContent of(LogStreamSplunkResponseSchema value) { - return new GetLogStreamResponseContent(value, 4); - } - - public static GetLogStreamResponseContent of(LogStreamSumoResponseSchema value) { - return new GetLogStreamResponseContent(value, 5); - } - - public static GetLogStreamResponseContent of(LogStreamSegmentResponseSchema value) { - return new GetLogStreamResponseContent(value, 6); - } - - public static GetLogStreamResponseContent of(LogStreamMixpanelResponseSchema value) { - return new GetLogStreamResponseContent(value, 7); - } - - public interface Visitor { - T visit(LogStreamHttpResponseSchema value); - - T visit(LogStreamEventBridgeResponseSchema value); - - T visit(LogStreamEventGridResponseSchema value); - - T visit(LogStreamDatadogResponseSchema value); - - T visit(LogStreamSplunkResponseSchema value); - - T visit(LogStreamSumoResponseSchema value); - - T visit(LogStreamSegmentResponseSchema value); - - T visit(LogStreamMixpanelResponseSchema value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(GetLogStreamResponseContent.class); - } - - @java.lang.Override - public GetLogStreamResponseContent deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamHttpResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamEventBridgeResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamEventGridResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamDatadogResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSplunkResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSumoResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSegmentResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamMixpanelResponseSchema.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetNetworkAclsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetNetworkAclsResponseContent.java deleted file mode 100644 index f4cf25ce1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetNetworkAclsResponseContent.java +++ /dev/null @@ -1,255 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetNetworkAclsResponseContent.Builder.class) -public final class GetNetworkAclsResponseContent { - private final Optional id; - - private final Optional description; - - private final Optional active; - - private final Optional priority; - - private final Optional rule; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private GetNetworkAclsResponseContent( - Optional id, - Optional description, - Optional active, - Optional priority, - Optional rule, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.description = description; - this.active = active; - this.priority = priority; - this.rule = rule; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - @JsonProperty("active") - public Optional getActive() { - return active; - } - - @JsonProperty("priority") - public Optional getPriority() { - return priority; - } - - @JsonProperty("rule") - public Optional getRule() { - return rule; - } - - /** - * @return The timestamp when the Network ACL Configuration was created - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The timestamp when the Network ACL Configuration was last updated - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetNetworkAclsResponseContent && equalTo((GetNetworkAclsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetNetworkAclsResponseContent other) { - return id.equals(other.id) - && description.equals(other.description) - && active.equals(other.active) - && priority.equals(other.priority) - && rule.equals(other.rule) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.description, this.active, this.priority, this.rule, this.createdAt, this.updatedAt); - } - - @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 description = Optional.empty(); - - private Optional active = Optional.empty(); - - private Optional priority = Optional.empty(); - - private Optional rule = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetNetworkAclsResponseContent other) { - id(other.getId()); - description(other.getDescription()); - active(other.getActive()); - priority(other.getPriority()); - rule(other.getRule()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - 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 = "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; - } - - @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 = "priority", nulls = Nulls.SKIP) - public Builder priority(Optional priority) { - this.priority = priority; - return this; - } - - public Builder priority(Double priority) { - this.priority = Optional.ofNullable(priority); - return this; - } - - @JsonSetter(value = "rule", nulls = Nulls.SKIP) - public Builder rule(Optional rule) { - this.rule = rule; - return this; - } - - public Builder rule(NetworkAclRule rule) { - this.rule = Optional.ofNullable(rule); - return this; - } - - /** - *

The timestamp when the Network ACL Configuration was created

- */ - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(String createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - /** - *

The timestamp when the Network ACL Configuration was last updated

- */ - @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - public Builder updatedAt(String updatedAt) { - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - public GetNetworkAclsResponseContent build() { - return new GetNetworkAclsResponseContent( - id, description, active, priority, rule, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationByNameResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationByNameResponseContent.java deleted file mode 100644 index cddbd693e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationByNameResponseContent.java +++ /dev/null @@ -1,238 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetOrganizationByNameResponseContent.Builder.class) -public final class GetOrganizationByNameResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional displayName; - - private final Optional branding; - - private final Optional>> metadata; - - private final Optional tokenQuota; - - private final Map additionalProperties; - - private GetOrganizationByNameResponseContent( - Optional id, - Optional name, - Optional displayName, - Optional branding, - Optional>> metadata, - Optional tokenQuota, - Map additionalProperties) { - this.id = id; - this.name = name; - this.displayName = displayName; - this.branding = branding; - this.metadata = metadata; - this.tokenQuota = tokenQuota; - 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("metadata") - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("token_quota") - public Optional getTokenQuota() { - return tokenQuota; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetOrganizationByNameResponseContent - && equalTo((GetOrganizationByNameResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetOrganizationByNameResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && displayName.equals(other.displayName) - && branding.equals(other.branding) - && metadata.equals(other.metadata) - && tokenQuota.equals(other.tokenQuota); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.displayName, this.branding, this.metadata, this.tokenQuota); - } - - @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>> metadata = Optional.empty(); - - private Optional tokenQuota = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetOrganizationByNameResponseContent other) { - id(other.getId()); - name(other.getName()); - displayName(other.getDisplayName()); - branding(other.getBranding()); - metadata(other.getMetadata()); - tokenQuota(other.getTokenQuota()); - 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 = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "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; - } - - public GetOrganizationByNameResponseContent build() { - return new GetOrganizationByNameResponseContent( - id, name, displayName, branding, metadata, tokenQuota, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationConnectionResponseContent.java deleted file mode 100644 index b9aaa3bb2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationConnectionResponseContent.java +++ /dev/null @@ -1,229 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetOrganizationConnectionResponseContent.Builder.class) -public final class GetOrganizationConnectionResponseContent { - private final Optional connectionId; - - private final Optional assignMembershipOnLogin; - - private final Optional showAsButton; - - private final Optional isSignupEnabled; - - private final Optional connection; - - private final Map additionalProperties; - - private GetOrganizationConnectionResponseContent( - Optional connectionId, - Optional assignMembershipOnLogin, - Optional showAsButton, - Optional isSignupEnabled, - Optional connection, - Map additionalProperties) { - this.connectionId = connectionId; - this.assignMembershipOnLogin = assignMembershipOnLogin; - this.showAsButton = showAsButton; - this.isSignupEnabled = isSignupEnabled; - this.connection = connection; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the connection. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - /** - * @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. Default: true. - */ - @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. Default: false. - */ - @JsonProperty("is_signup_enabled") - public Optional getIsSignupEnabled() { - return isSignupEnabled; - } - - @JsonProperty("connection") - public Optional getConnection() { - return connection; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetOrganizationConnectionResponseContent - && equalTo((GetOrganizationConnectionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetOrganizationConnectionResponseContent other) { - return connectionId.equals(other.connectionId) - && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) - && showAsButton.equals(other.showAsButton) - && isSignupEnabled.equals(other.isSignupEnabled) - && connection.equals(other.connection); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.assignMembershipOnLogin, - this.showAsButton, - this.isSignupEnabled, - this.connection); - } - - @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 connectionId = Optional.empty(); - - private Optional assignMembershipOnLogin = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - private Optional isSignupEnabled = Optional.empty(); - - private Optional connection = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetOrganizationConnectionResponseContent other) { - connectionId(other.getConnectionId()); - assignMembershipOnLogin(other.getAssignMembershipOnLogin()); - showAsButton(other.getShowAsButton()); - isSignupEnabled(other.getIsSignupEnabled()); - connection(other.getConnection()); - return this; - } - - /** - *

ID of the connection.

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - 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.

- */ - @JsonSetter(value = "assign_membership_on_login", nulls = Nulls.SKIP) - public Builder assignMembershipOnLogin(Optional assignMembershipOnLogin) { - this.assignMembershipOnLogin = assignMembershipOnLogin; - return this; - } - - public Builder assignMembershipOnLogin(Boolean assignMembershipOnLogin) { - this.assignMembershipOnLogin = Optional.ofNullable(assignMembershipOnLogin); - return this; - } - - /** - *

Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true.

- */ - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - /** - *

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

- */ - @JsonSetter(value = "is_signup_enabled", nulls = Nulls.SKIP) - public Builder isSignupEnabled(Optional isSignupEnabled) { - this.isSignupEnabled = isSignupEnabled; - return this; - } - - public Builder isSignupEnabled(Boolean isSignupEnabled) { - this.isSignupEnabled = Optional.ofNullable(isSignupEnabled); - return this; - } - - @JsonSetter(value = "connection", nulls = Nulls.SKIP) - public Builder connection(Optional connection) { - this.connection = connection; - return this; - } - - public Builder connection(OrganizationConnectionInformation connection) { - this.connection = Optional.ofNullable(connection); - return this; - } - - public GetOrganizationConnectionResponseContent build() { - return new GetOrganizationConnectionResponseContent( - connectionId, - assignMembershipOnLogin, - showAsButton, - isSignupEnabled, - connection, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationDiscoveryDomainByNameResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationDiscoveryDomainByNameResponseContent.java deleted file mode 100644 index 1d2e7cd29..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationDiscoveryDomainByNameResponseContent.java +++ /dev/null @@ -1,304 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetOrganizationDiscoveryDomainByNameResponseContent.Builder.class) -public final class GetOrganizationDiscoveryDomainByNameResponseContent { - private final String id; - - private final String domain; - - private final OrganizationDiscoveryDomainStatus status; - - private final Optional useForOrganizationDiscovery; - - private final String verificationTxt; - - private final String verificationHost; - - private final Map additionalProperties; - - private GetOrganizationDiscoveryDomainByNameResponseContent( - String id, - String domain, - OrganizationDiscoveryDomainStatus status, - Optional useForOrganizationDiscovery, - String verificationTxt, - String verificationHost, - Map additionalProperties) { - this.id = id; - this.domain = domain; - this.status = status; - this.useForOrganizationDiscovery = useForOrganizationDiscovery; - this.verificationTxt = verificationTxt; - this.verificationHost = verificationHost; - this.additionalProperties = additionalProperties; - } - - /** - * @return Organization discovery domain identifier. - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return The domain name to associate with the organization e.g. acme.com. - */ - @JsonProperty("domain") - public String getDomain() { - return domain; - } - - @JsonProperty("status") - public OrganizationDiscoveryDomainStatus getStatus() { - return status; - } - - /** - * @return Indicates whether this domain should be used for organization discovery. - */ - @JsonProperty("use_for_organization_discovery") - public Optional getUseForOrganizationDiscovery() { - return useForOrganizationDiscovery; - } - - /** - * @return 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. - */ - @JsonProperty("verification_txt") - public String getVerificationTxt() { - return verificationTxt; - } - - /** - * @return The full domain where the TXT record should be added. - */ - @JsonProperty("verification_host") - public String getVerificationHost() { - return verificationHost; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetOrganizationDiscoveryDomainByNameResponseContent - && equalTo((GetOrganizationDiscoveryDomainByNameResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetOrganizationDiscoveryDomainByNameResponseContent other) { - return id.equals(other.id) - && domain.equals(other.domain) - && status.equals(other.status) - && useForOrganizationDiscovery.equals(other.useForOrganizationDiscovery) - && verificationTxt.equals(other.verificationTxt) - && verificationHost.equals(other.verificationHost); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.domain, - this.status, - this.useForOrganizationDiscovery, - this.verificationTxt, - this.verificationHost); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

Organization discovery domain identifier.

- */ - DomainStage id(@NotNull String id); - - Builder from(GetOrganizationDiscoveryDomainByNameResponseContent other); - } - - public interface DomainStage { - /** - *

The domain name to associate with the organization e.g. acme.com.

- */ - StatusStage domain(@NotNull String domain); - } - - public interface StatusStage { - VerificationTxtStage status(@NotNull OrganizationDiscoveryDomainStatus status); - } - - public interface VerificationTxtStage { - /** - *

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.

- */ - VerificationHostStage verificationTxt(@NotNull String verificationTxt); - } - - public interface VerificationHostStage { - /** - *

The full domain where the TXT record should be added.

- */ - _FinalStage verificationHost(@NotNull String verificationHost); - } - - public interface _FinalStage { - GetOrganizationDiscoveryDomainByNameResponseContent build(); - - /** - *

Indicates whether this domain should be used for organization discovery.

- */ - _FinalStage useForOrganizationDiscovery(Optional useForOrganizationDiscovery); - - _FinalStage useForOrganizationDiscovery(Boolean useForOrganizationDiscovery); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements IdStage, DomainStage, StatusStage, VerificationTxtStage, VerificationHostStage, _FinalStage { - private String id; - - private String domain; - - private OrganizationDiscoveryDomainStatus status; - - private String verificationTxt; - - private String verificationHost; - - private Optional useForOrganizationDiscovery = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetOrganizationDiscoveryDomainByNameResponseContent other) { - id(other.getId()); - domain(other.getDomain()); - status(other.getStatus()); - useForOrganizationDiscovery(other.getUseForOrganizationDiscovery()); - verificationTxt(other.getVerificationTxt()); - verificationHost(other.getVerificationHost()); - return this; - } - - /** - *

Organization discovery domain identifier.

- *

Organization discovery domain identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("id") - public DomainStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("domain") - public StatusStage domain(@NotNull String domain) { - this.domain = Objects.requireNonNull(domain, "domain must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("status") - public VerificationTxtStage status(@NotNull OrganizationDiscoveryDomainStatus status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("verification_txt") - public VerificationHostStage verificationTxt(@NotNull String verificationTxt) { - this.verificationTxt = Objects.requireNonNull(verificationTxt, "verificationTxt must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("verification_host") - public _FinalStage verificationHost(@NotNull String verificationHost) { - this.verificationHost = Objects.requireNonNull(verificationHost, "verificationHost must not be null"); - return this; - } - - /** - *

Indicates whether this domain should be used for organization discovery.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage useForOrganizationDiscovery(Boolean useForOrganizationDiscovery) { - this.useForOrganizationDiscovery = Optional.ofNullable(useForOrganizationDiscovery); - return this; - } - - /** - *

Indicates whether this domain should be used for organization discovery.

- */ - @java.lang.Override - @JsonSetter(value = "use_for_organization_discovery", nulls = Nulls.SKIP) - public _FinalStage useForOrganizationDiscovery(Optional useForOrganizationDiscovery) { - this.useForOrganizationDiscovery = useForOrganizationDiscovery; - return this; - } - - @java.lang.Override - public GetOrganizationDiscoveryDomainByNameResponseContent build() { - return new GetOrganizationDiscoveryDomainByNameResponseContent( - id, - domain, - status, - useForOrganizationDiscovery, - verificationTxt, - verificationHost, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationDiscoveryDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationDiscoveryDomainResponseContent.java deleted file mode 100644 index cffdbe4dc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationDiscoveryDomainResponseContent.java +++ /dev/null @@ -1,304 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetOrganizationDiscoveryDomainResponseContent.Builder.class) -public final class GetOrganizationDiscoveryDomainResponseContent { - private final String id; - - private final String domain; - - private final OrganizationDiscoveryDomainStatus status; - - private final Optional useForOrganizationDiscovery; - - private final String verificationTxt; - - private final String verificationHost; - - private final Map additionalProperties; - - private GetOrganizationDiscoveryDomainResponseContent( - String id, - String domain, - OrganizationDiscoveryDomainStatus status, - Optional useForOrganizationDiscovery, - String verificationTxt, - String verificationHost, - Map additionalProperties) { - this.id = id; - this.domain = domain; - this.status = status; - this.useForOrganizationDiscovery = useForOrganizationDiscovery; - this.verificationTxt = verificationTxt; - this.verificationHost = verificationHost; - this.additionalProperties = additionalProperties; - } - - /** - * @return Organization discovery domain identifier. - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return The domain name to associate with the organization e.g. acme.com. - */ - @JsonProperty("domain") - public String getDomain() { - return domain; - } - - @JsonProperty("status") - public OrganizationDiscoveryDomainStatus getStatus() { - return status; - } - - /** - * @return Indicates whether this domain should be used for organization discovery. - */ - @JsonProperty("use_for_organization_discovery") - public Optional getUseForOrganizationDiscovery() { - return useForOrganizationDiscovery; - } - - /** - * @return 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. - */ - @JsonProperty("verification_txt") - public String getVerificationTxt() { - return verificationTxt; - } - - /** - * @return The full domain where the TXT record should be added. - */ - @JsonProperty("verification_host") - public String getVerificationHost() { - return verificationHost; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetOrganizationDiscoveryDomainResponseContent - && equalTo((GetOrganizationDiscoveryDomainResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetOrganizationDiscoveryDomainResponseContent other) { - return id.equals(other.id) - && domain.equals(other.domain) - && status.equals(other.status) - && useForOrganizationDiscovery.equals(other.useForOrganizationDiscovery) - && verificationTxt.equals(other.verificationTxt) - && verificationHost.equals(other.verificationHost); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.domain, - this.status, - this.useForOrganizationDiscovery, - this.verificationTxt, - this.verificationHost); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

Organization discovery domain identifier.

- */ - DomainStage id(@NotNull String id); - - Builder from(GetOrganizationDiscoveryDomainResponseContent other); - } - - public interface DomainStage { - /** - *

The domain name to associate with the organization e.g. acme.com.

- */ - StatusStage domain(@NotNull String domain); - } - - public interface StatusStage { - VerificationTxtStage status(@NotNull OrganizationDiscoveryDomainStatus status); - } - - public interface VerificationTxtStage { - /** - *

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.

- */ - VerificationHostStage verificationTxt(@NotNull String verificationTxt); - } - - public interface VerificationHostStage { - /** - *

The full domain where the TXT record should be added.

- */ - _FinalStage verificationHost(@NotNull String verificationHost); - } - - public interface _FinalStage { - GetOrganizationDiscoveryDomainResponseContent build(); - - /** - *

Indicates whether this domain should be used for organization discovery.

- */ - _FinalStage useForOrganizationDiscovery(Optional useForOrganizationDiscovery); - - _FinalStage useForOrganizationDiscovery(Boolean useForOrganizationDiscovery); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements IdStage, DomainStage, StatusStage, VerificationTxtStage, VerificationHostStage, _FinalStage { - private String id; - - private String domain; - - private OrganizationDiscoveryDomainStatus status; - - private String verificationTxt; - - private String verificationHost; - - private Optional useForOrganizationDiscovery = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetOrganizationDiscoveryDomainResponseContent other) { - id(other.getId()); - domain(other.getDomain()); - status(other.getStatus()); - useForOrganizationDiscovery(other.getUseForOrganizationDiscovery()); - verificationTxt(other.getVerificationTxt()); - verificationHost(other.getVerificationHost()); - return this; - } - - /** - *

Organization discovery domain identifier.

- *

Organization discovery domain identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("id") - public DomainStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("domain") - public StatusStage domain(@NotNull String domain) { - this.domain = Objects.requireNonNull(domain, "domain must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("status") - public VerificationTxtStage status(@NotNull OrganizationDiscoveryDomainStatus status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("verification_txt") - public VerificationHostStage verificationTxt(@NotNull String verificationTxt) { - this.verificationTxt = Objects.requireNonNull(verificationTxt, "verificationTxt must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("verification_host") - public _FinalStage verificationHost(@NotNull String verificationHost) { - this.verificationHost = Objects.requireNonNull(verificationHost, "verificationHost must not be null"); - return this; - } - - /** - *

Indicates whether this domain should be used for organization discovery.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage useForOrganizationDiscovery(Boolean useForOrganizationDiscovery) { - this.useForOrganizationDiscovery = Optional.ofNullable(useForOrganizationDiscovery); - return this; - } - - /** - *

Indicates whether this domain should be used for organization discovery.

- */ - @java.lang.Override - @JsonSetter(value = "use_for_organization_discovery", nulls = Nulls.SKIP) - public _FinalStage useForOrganizationDiscovery(Optional useForOrganizationDiscovery) { - this.useForOrganizationDiscovery = useForOrganizationDiscovery; - return this; - } - - @java.lang.Override - public GetOrganizationDiscoveryDomainResponseContent build() { - return new GetOrganizationDiscoveryDomainResponseContent( - id, - domain, - status, - useForOrganizationDiscovery, - verificationTxt, - verificationHost, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationInvitationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationInvitationResponseContent.java deleted file mode 100644 index 9e33abce2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationInvitationResponseContent.java +++ /dev/null @@ -1,469 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = GetOrganizationInvitationResponseContent.Builder.class) -public final class GetOrganizationInvitationResponseContent { - private final Optional id; - - private final Optional organizationId; - - private final Optional inviter; - - private final Optional invitee; - - private final Optional invitationUrl; - - private final Optional createdAt; - - private final Optional expiresAt; - - private final Optional clientId; - - private final Optional connectionId; - - private final Optional> appMetadata; - - private final Optional> userMetadata; - - private final Optional> roles; - - private final Optional ticketId; - - private final Map additionalProperties; - - private GetOrganizationInvitationResponseContent( - Optional id, - Optional organizationId, - Optional inviter, - Optional invitee, - Optional invitationUrl, - Optional createdAt, - Optional expiresAt, - Optional clientId, - Optional connectionId, - Optional> appMetadata, - Optional> userMetadata, - Optional> roles, - Optional ticketId, - Map additionalProperties) { - this.id = id; - this.organizationId = organizationId; - this.inviter = inviter; - this.invitee = invitee; - this.invitationUrl = invitationUrl; - this.createdAt = createdAt; - this.expiresAt = expiresAt; - this.clientId = clientId; - this.connectionId = connectionId; - this.appMetadata = appMetadata; - this.userMetadata = userMetadata; - this.roles = roles; - this.ticketId = ticketId; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the user invitation. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Organization identifier. - */ - @JsonProperty("organization_id") - public Optional getOrganizationId() { - return organizationId; - } - - @JsonProperty("inviter") - public Optional getInviter() { - return inviter; - } - - @JsonProperty("invitee") - public Optional getInvitee() { - return invitee; - } - - /** - * @return The invitation url to be send to the invitee. - */ - @JsonProperty("invitation_url") - public Optional getInvitationUrl() { - return invitationUrl; - } - - /** - * @return The ISO 8601 formatted timestamp representing the creation time of the invitation. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The ISO 8601 formatted timestamp representing the expiration time of the invitation. - */ - @JsonProperty("expires_at") - public Optional getExpiresAt() { - return expiresAt; - } - - /** - * @return Auth0 client ID. Used to resolve the application's login initiation endpoint. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @return The id of the connection to force invitee to authenticate with. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - @JsonProperty("app_metadata") - public Optional> getAppMetadata() { - return appMetadata; - } - - @JsonProperty("user_metadata") - public Optional> getUserMetadata() { - return userMetadata; - } - - /** - * @return List of roles IDs to associated with the user. - */ - @JsonProperty("roles") - public Optional> getRoles() { - return roles; - } - - /** - * @return The id of the invitation ticket - */ - @JsonProperty("ticket_id") - public Optional getTicketId() { - return ticketId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetOrganizationInvitationResponseContent - && equalTo((GetOrganizationInvitationResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetOrganizationInvitationResponseContent other) { - return id.equals(other.id) - && organizationId.equals(other.organizationId) - && inviter.equals(other.inviter) - && invitee.equals(other.invitee) - && invitationUrl.equals(other.invitationUrl) - && createdAt.equals(other.createdAt) - && expiresAt.equals(other.expiresAt) - && clientId.equals(other.clientId) - && connectionId.equals(other.connectionId) - && appMetadata.equals(other.appMetadata) - && userMetadata.equals(other.userMetadata) - && roles.equals(other.roles) - && ticketId.equals(other.ticketId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.organizationId, - this.inviter, - this.invitee, - this.invitationUrl, - this.createdAt, - this.expiresAt, - this.clientId, - this.connectionId, - this.appMetadata, - this.userMetadata, - this.roles, - this.ticketId); - } - - @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 organizationId = Optional.empty(); - - private Optional inviter = Optional.empty(); - - private Optional invitee = Optional.empty(); - - private Optional invitationUrl = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional expiresAt = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional connectionId = Optional.empty(); - - private Optional> appMetadata = Optional.empty(); - - private Optional> userMetadata = Optional.empty(); - - private Optional> roles = Optional.empty(); - - private Optional ticketId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetOrganizationInvitationResponseContent other) { - id(other.getId()); - organizationId(other.getOrganizationId()); - inviter(other.getInviter()); - invitee(other.getInvitee()); - invitationUrl(other.getInvitationUrl()); - createdAt(other.getCreatedAt()); - expiresAt(other.getExpiresAt()); - clientId(other.getClientId()); - connectionId(other.getConnectionId()); - appMetadata(other.getAppMetadata()); - userMetadata(other.getUserMetadata()); - roles(other.getRoles()); - ticketId(other.getTicketId()); - return this; - } - - /** - *

The id of the user invitation.

- */ - @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; - } - - /** - *

Organization identifier.

- */ - @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; - } - - @JsonSetter(value = "inviter", nulls = Nulls.SKIP) - public Builder inviter(Optional inviter) { - this.inviter = inviter; - return this; - } - - public Builder inviter(OrganizationInvitationInviter inviter) { - this.inviter = Optional.ofNullable(inviter); - return this; - } - - @JsonSetter(value = "invitee", nulls = Nulls.SKIP) - public Builder invitee(Optional invitee) { - this.invitee = invitee; - return this; - } - - public Builder invitee(OrganizationInvitationInvitee invitee) { - this.invitee = Optional.ofNullable(invitee); - return this; - } - - /** - *

The invitation url to be send to the invitee.

- */ - @JsonSetter(value = "invitation_url", nulls = Nulls.SKIP) - public Builder invitationUrl(Optional invitationUrl) { - this.invitationUrl = invitationUrl; - return this; - } - - public Builder invitationUrl(String invitationUrl) { - this.invitationUrl = Optional.ofNullable(invitationUrl); - return this; - } - - /** - *

The ISO 8601 formatted timestamp representing the creation time of the invitation.

- */ - @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 formatted timestamp representing the expiration time of the invitation.

- */ - @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - public Builder expiresAt(OffsetDateTime expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); - return this; - } - - /** - *

Auth0 client ID. Used to resolve the application's login initiation endpoint.

- */ - @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 id of the connection to force invitee to authenticate with.

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - return this; - } - - @JsonSetter(value = "app_metadata", nulls = Nulls.SKIP) - public Builder appMetadata(Optional> appMetadata) { - this.appMetadata = appMetadata; - return this; - } - - public Builder appMetadata(Map appMetadata) { - this.appMetadata = Optional.ofNullable(appMetadata); - return this; - } - - @JsonSetter(value = "user_metadata", nulls = Nulls.SKIP) - public Builder userMetadata(Optional> userMetadata) { - this.userMetadata = userMetadata; - return this; - } - - public Builder userMetadata(Map userMetadata) { - this.userMetadata = Optional.ofNullable(userMetadata); - return this; - } - - /** - *

List of roles IDs to associated with the user.

- */ - @JsonSetter(value = "roles", nulls = Nulls.SKIP) - public Builder roles(Optional> roles) { - this.roles = roles; - return this; - } - - public Builder roles(List roles) { - this.roles = Optional.ofNullable(roles); - return this; - } - - /** - *

The id of the invitation ticket

- */ - @JsonSetter(value = "ticket_id", nulls = Nulls.SKIP) - public Builder ticketId(Optional ticketId) { - this.ticketId = ticketId; - return this; - } - - public Builder ticketId(String ticketId) { - this.ticketId = Optional.ofNullable(ticketId); - return this; - } - - public GetOrganizationInvitationResponseContent build() { - return new GetOrganizationInvitationResponseContent( - id, - organizationId, - inviter, - invitee, - invitationUrl, - createdAt, - expiresAt, - clientId, - connectionId, - appMetadata, - userMetadata, - roles, - ticketId, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetOrganizationResponseContent.java deleted file mode 100644 index 7c383c987..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetOrganizationResponseContent.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetOrganizationResponseContent.Builder.class) -public final class GetOrganizationResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional displayName; - - private final Optional branding; - - private final Optional>> metadata; - - private final Optional tokenQuota; - - private final Map additionalProperties; - - private GetOrganizationResponseContent( - Optional id, - Optional name, - Optional displayName, - Optional branding, - Optional>> metadata, - Optional tokenQuota, - Map additionalProperties) { - this.id = id; - this.name = name; - this.displayName = displayName; - this.branding = branding; - this.metadata = metadata; - this.tokenQuota = tokenQuota; - 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("metadata") - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("token_quota") - public Optional getTokenQuota() { - return tokenQuota; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetOrganizationResponseContent && equalTo((GetOrganizationResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetOrganizationResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && displayName.equals(other.displayName) - && branding.equals(other.branding) - && metadata.equals(other.metadata) - && tokenQuota.equals(other.tokenQuota); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.displayName, this.branding, this.metadata, this.tokenQuota); - } - - @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>> metadata = Optional.empty(); - - private Optional tokenQuota = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetOrganizationResponseContent other) { - id(other.getId()); - name(other.getName()); - displayName(other.getDisplayName()); - branding(other.getBranding()); - metadata(other.getMetadata()); - tokenQuota(other.getTokenQuota()); - 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 = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "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; - } - - public GetOrganizationResponseContent build() { - return new GetOrganizationResponseContent( - id, name, displayName, branding, metadata, tokenQuota, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetPhoneTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetPhoneTemplateResponseContent.java deleted file mode 100644 index 501d59b70..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetPhoneTemplateResponseContent.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetPhoneTemplateResponseContent.Builder.class) -public final class GetPhoneTemplateResponseContent { - private final String id; - - private final Optional channel; - - private final Optional customizable; - - private final Optional tenant; - - private final PhoneTemplateContent content; - - private final PhoneTemplateNotificationTypeEnum type; - - private final boolean disabled; - - private final Map additionalProperties; - - private GetPhoneTemplateResponseContent( - String id, - Optional channel, - Optional customizable, - Optional tenant, - PhoneTemplateContent content, - PhoneTemplateNotificationTypeEnum type, - boolean disabled, - Map additionalProperties) { - this.id = id; - this.channel = channel; - this.customizable = customizable; - this.tenant = tenant; - this.content = content; - this.type = type; - this.disabled = disabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("channel") - public Optional getChannel() { - return channel; - } - - @JsonProperty("customizable") - public Optional getCustomizable() { - return customizable; - } - - @JsonProperty("tenant") - public Optional getTenant() { - return tenant; - } - - @JsonProperty("content") - public PhoneTemplateContent getContent() { - return content; - } - - @JsonProperty("type") - public PhoneTemplateNotificationTypeEnum getType() { - return type; - } - - /** - * @return Whether the template is enabled (false) or disabled (true). - */ - @JsonProperty("disabled") - public boolean getDisabled() { - return disabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetPhoneTemplateResponseContent && equalTo((GetPhoneTemplateResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetPhoneTemplateResponseContent other) { - return id.equals(other.id) - && channel.equals(other.channel) - && customizable.equals(other.customizable) - && tenant.equals(other.tenant) - && content.equals(other.content) - && type.equals(other.type) - && disabled == other.disabled; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.channel, this.customizable, this.tenant, this.content, this.type, this.disabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - ContentStage id(@NotNull String id); - - Builder from(GetPhoneTemplateResponseContent other); - } - - public interface ContentStage { - TypeStage content(@NotNull PhoneTemplateContent content); - } - - public interface TypeStage { - DisabledStage type(@NotNull PhoneTemplateNotificationTypeEnum type); - } - - public interface DisabledStage { - /** - *

Whether the template is enabled (false) or disabled (true).

- */ - _FinalStage disabled(boolean disabled); - } - - public interface _FinalStage { - GetPhoneTemplateResponseContent build(); - - _FinalStage channel(Optional channel); - - _FinalStage channel(String channel); - - _FinalStage customizable(Optional customizable); - - _FinalStage customizable(Boolean customizable); - - _FinalStage tenant(Optional tenant); - - _FinalStage tenant(String tenant); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, ContentStage, TypeStage, DisabledStage, _FinalStage { - private String id; - - private PhoneTemplateContent content; - - private PhoneTemplateNotificationTypeEnum type; - - private boolean disabled; - - private Optional tenant = Optional.empty(); - - private Optional customizable = Optional.empty(); - - private Optional channel = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetPhoneTemplateResponseContent other) { - id(other.getId()); - channel(other.getChannel()); - customizable(other.getCustomizable()); - tenant(other.getTenant()); - content(other.getContent()); - type(other.getType()); - disabled(other.getDisabled()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public ContentStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("content") - public TypeStage content(@NotNull PhoneTemplateContent content) { - this.content = Objects.requireNonNull(content, "content must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public DisabledStage type(@NotNull PhoneTemplateNotificationTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("disabled") - public _FinalStage disabled(boolean disabled) { - this.disabled = disabled; - return this; - } - - @java.lang.Override - public _FinalStage tenant(String tenant) { - this.tenant = Optional.ofNullable(tenant); - return this; - } - - @java.lang.Override - @JsonSetter(value = "tenant", nulls = Nulls.SKIP) - public _FinalStage tenant(Optional tenant) { - this.tenant = tenant; - return this; - } - - @java.lang.Override - public _FinalStage customizable(Boolean customizable) { - this.customizable = Optional.ofNullable(customizable); - return this; - } - - @java.lang.Override - @JsonSetter(value = "customizable", nulls = Nulls.SKIP) - public _FinalStage customizable(Optional customizable) { - this.customizable = customizable; - return this; - } - - @java.lang.Override - public _FinalStage channel(String channel) { - this.channel = Optional.ofNullable(channel); - return this; - } - - @java.lang.Override - @JsonSetter(value = "channel", nulls = Nulls.SKIP) - public _FinalStage channel(Optional channel) { - this.channel = channel; - return this; - } - - @java.lang.Override - public GetPhoneTemplateResponseContent build() { - return new GetPhoneTemplateResponseContent( - id, channel, customizable, tenant, content, type, disabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetRefreshTokenResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetRefreshTokenResponseContent.java deleted file mode 100644 index 91857abc6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetRefreshTokenResponseContent.java +++ /dev/null @@ -1,481 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetRefreshTokenResponseContent.Builder.class) -public final class GetRefreshTokenResponseContent { - private final Optional id; - - private final Optional userId; - - private final Optional createdAt; - - private final Optional idleExpiresAt; - - private final Optional expiresAt; - - private final Optional device; - - private final Optional clientId; - - private final OptionalNullable sessionId; - - private final Optional rotating; - - private final Optional> resourceServers; - - private final OptionalNullable> refreshTokenMetadata; - - private final Optional lastExchangedAt; - - private final Map additionalProperties; - - private GetRefreshTokenResponseContent( - Optional id, - Optional userId, - Optional createdAt, - Optional idleExpiresAt, - Optional expiresAt, - Optional device, - Optional clientId, - OptionalNullable sessionId, - Optional rotating, - Optional> resourceServers, - OptionalNullable> refreshTokenMetadata, - Optional lastExchangedAt, - Map additionalProperties) { - this.id = id; - this.userId = userId; - this.createdAt = createdAt; - this.idleExpiresAt = idleExpiresAt; - this.expiresAt = expiresAt; - this.device = device; - this.clientId = clientId; - this.sessionId = sessionId; - this.rotating = rotating; - this.resourceServers = resourceServers; - this.refreshTokenMetadata = refreshTokenMetadata; - this.lastExchangedAt = lastExchangedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The ID of the refresh token - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return ID of the user which can be used when interacting with other APIs. - */ - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @JsonProperty("idle_expires_at") - public Optional getIdleExpiresAt() { - return idleExpiresAt; - } - - @JsonProperty("expires_at") - public Optional getExpiresAt() { - return expiresAt; - } - - @JsonProperty("device") - public Optional getDevice() { - return device; - } - - /** - * @return ID of the client application granted with this refresh token - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_id") - public OptionalNullable getSessionId() { - if (sessionId == null) { - return OptionalNullable.absent(); - } - return sessionId; - } - - /** - * @return True if the token is a rotating refresh token - */ - @JsonProperty("rotating") - public Optional getRotating() { - return rotating; - } - - /** - * @return A list of the resource server IDs associated to this refresh-token and their granted scopes - */ - @JsonProperty("resource_servers") - public Optional> getResourceServers() { - return resourceServers; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("refresh_token_metadata") - public OptionalNullable> getRefreshTokenMetadata() { - if (refreshTokenMetadata == null) { - return OptionalNullable.absent(); - } - return refreshTokenMetadata; - } - - @JsonProperty("last_exchanged_at") - public Optional getLastExchangedAt() { - return lastExchangedAt; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_id") - private OptionalNullable _getSessionId() { - return sessionId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("refresh_token_metadata") - private OptionalNullable> _getRefreshTokenMetadata() { - return refreshTokenMetadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetRefreshTokenResponseContent && equalTo((GetRefreshTokenResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetRefreshTokenResponseContent other) { - return id.equals(other.id) - && userId.equals(other.userId) - && createdAt.equals(other.createdAt) - && idleExpiresAt.equals(other.idleExpiresAt) - && expiresAt.equals(other.expiresAt) - && device.equals(other.device) - && clientId.equals(other.clientId) - && sessionId.equals(other.sessionId) - && rotating.equals(other.rotating) - && resourceServers.equals(other.resourceServers) - && refreshTokenMetadata.equals(other.refreshTokenMetadata) - && lastExchangedAt.equals(other.lastExchangedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.userId, - this.createdAt, - this.idleExpiresAt, - this.expiresAt, - this.device, - this.clientId, - this.sessionId, - this.rotating, - this.resourceServers, - this.refreshTokenMetadata, - this.lastExchangedAt); - } - - @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 userId = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional idleExpiresAt = Optional.empty(); - - private Optional expiresAt = Optional.empty(); - - private Optional device = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private OptionalNullable sessionId = OptionalNullable.absent(); - - private Optional rotating = Optional.empty(); - - private Optional> resourceServers = Optional.empty(); - - private OptionalNullable> refreshTokenMetadata = OptionalNullable.absent(); - - private Optional lastExchangedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetRefreshTokenResponseContent other) { - id(other.getId()); - userId(other.getUserId()); - createdAt(other.getCreatedAt()); - idleExpiresAt(other.getIdleExpiresAt()); - expiresAt(other.getExpiresAt()); - device(other.getDevice()); - clientId(other.getClientId()); - sessionId(other.getSessionId()); - rotating(other.getRotating()); - resourceServers(other.getResourceServers()); - refreshTokenMetadata(other.getRefreshTokenMetadata()); - lastExchangedAt(other.getLastExchangedAt()); - return this; - } - - /** - *

The ID of the refresh token

- */ - @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; - } - - /** - *

ID of the user which can be used when interacting with other APIs.

- */ - @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; - } - - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(RefreshTokenDate createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - @JsonSetter(value = "idle_expires_at", nulls = Nulls.SKIP) - public Builder idleExpiresAt(Optional idleExpiresAt) { - this.idleExpiresAt = idleExpiresAt; - return this; - } - - public Builder idleExpiresAt(RefreshTokenDate idleExpiresAt) { - this.idleExpiresAt = Optional.ofNullable(idleExpiresAt); - return this; - } - - @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - public Builder expiresAt(RefreshTokenDate expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); - return this; - } - - @JsonSetter(value = "device", nulls = Nulls.SKIP) - public Builder device(Optional device) { - this.device = device; - return this; - } - - public Builder device(RefreshTokenDevice device) { - this.device = Optional.ofNullable(device); - return this; - } - - /** - *

ID of the client application granted with this refresh token

- */ - @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 = "session_id", nulls = Nulls.SKIP) - public Builder sessionId(@Nullable OptionalNullable sessionId) { - this.sessionId = sessionId; - return this; - } - - public Builder sessionId(String sessionId) { - this.sessionId = OptionalNullable.of(sessionId); - return this; - } - - public Builder sessionId(Optional sessionId) { - if (sessionId.isPresent()) { - this.sessionId = OptionalNullable.of(sessionId.get()); - } else { - this.sessionId = OptionalNullable.absent(); - } - return this; - } - - public Builder sessionId(com.auth0.client.mgmt.core.Nullable sessionId) { - if (sessionId.isNull()) { - this.sessionId = OptionalNullable.ofNull(); - } else if (sessionId.isEmpty()) { - this.sessionId = OptionalNullable.absent(); - } else { - this.sessionId = OptionalNullable.of(sessionId.get()); - } - return this; - } - - /** - *

True if the token is a rotating refresh token

- */ - @JsonSetter(value = "rotating", nulls = Nulls.SKIP) - public Builder rotating(Optional rotating) { - this.rotating = rotating; - return this; - } - - public Builder rotating(Boolean rotating) { - this.rotating = Optional.ofNullable(rotating); - return this; - } - - /** - *

A list of the resource server IDs associated to this refresh-token and their granted scopes

- */ - @JsonSetter(value = "resource_servers", nulls = Nulls.SKIP) - public Builder resourceServers(Optional> resourceServers) { - this.resourceServers = resourceServers; - return this; - } - - public Builder resourceServers(List resourceServers) { - this.resourceServers = Optional.ofNullable(resourceServers); - return this; - } - - @JsonSetter(value = "refresh_token_metadata", nulls = Nulls.SKIP) - public Builder refreshTokenMetadata(@Nullable OptionalNullable> refreshTokenMetadata) { - this.refreshTokenMetadata = refreshTokenMetadata; - return this; - } - - public Builder refreshTokenMetadata(Map refreshTokenMetadata) { - this.refreshTokenMetadata = OptionalNullable.of(refreshTokenMetadata); - return this; - } - - public Builder refreshTokenMetadata(Optional> refreshTokenMetadata) { - if (refreshTokenMetadata.isPresent()) { - this.refreshTokenMetadata = OptionalNullable.of(refreshTokenMetadata.get()); - } else { - this.refreshTokenMetadata = OptionalNullable.absent(); - } - return this; - } - - public Builder refreshTokenMetadata( - com.auth0.client.mgmt.core.Nullable> refreshTokenMetadata) { - if (refreshTokenMetadata.isNull()) { - this.refreshTokenMetadata = OptionalNullable.ofNull(); - } else if (refreshTokenMetadata.isEmpty()) { - this.refreshTokenMetadata = OptionalNullable.absent(); - } else { - this.refreshTokenMetadata = OptionalNullable.of(refreshTokenMetadata.get()); - } - return this; - } - - @JsonSetter(value = "last_exchanged_at", nulls = Nulls.SKIP) - public Builder lastExchangedAt(Optional lastExchangedAt) { - this.lastExchangedAt = lastExchangedAt; - return this; - } - - public Builder lastExchangedAt(RefreshTokenDate lastExchangedAt) { - this.lastExchangedAt = Optional.ofNullable(lastExchangedAt); - return this; - } - - public GetRefreshTokenResponseContent build() { - return new GetRefreshTokenResponseContent( - id, - userId, - createdAt, - idleExpiresAt, - expiresAt, - device, - clientId, - sessionId, - rotating, - resourceServers, - refreshTokenMetadata, - lastExchangedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetResourceServerRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetResourceServerRequestParameters.java deleted file mode 100644 index 3012356f2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetResourceServerRequestParameters.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetResourceServerRequestParameters.Builder.class) -public final class GetResourceServerRequestParameters { - private final OptionalNullable includeFields; - - private final Map additionalProperties; - - private GetResourceServerRequestParameters( - OptionalNullable includeFields, Map additionalProperties) { - this.includeFields = includeFields; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether specified fields are to be included (true) or excluded (false). - */ - @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("include_fields") - private OptionalNullable _getIncludeFields() { - return includeFields; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetResourceServerRequestParameters - && equalTo((GetResourceServerRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetResourceServerRequestParameters other) { - return includeFields.equals(other.includeFields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 includeFields = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetResourceServerRequestParameters other) { - includeFields(other.getIncludeFields()); - return this; - } - - /** - *

Whether specified fields are to be included (true) or excluded (false).

- */ - @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 GetResourceServerRequestParameters build() { - return new GetResourceServerRequestParameters(includeFields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetResourceServerResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetResourceServerResponseContent.java deleted file mode 100644 index 17b8a5c81..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetResourceServerResponseContent.java +++ /dev/null @@ -1,741 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetResourceServerResponseContent.Builder.class) -public final class GetResourceServerResponseContent { - 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 signingSecret; - - private final Optional allowOfflineAccess; - - private final Optional skipConsentForVerifiableFirstPartyClients; - - private final Optional tokenLifetime; - - private final Optional tokenLifetimeForWeb; - - private final Optional enforcePolicies; - - private final Optional tokenDialect; - - private final OptionalNullable tokenEncryption; - - private final OptionalNullable consentPolicy; - - private final Optional> authorizationDetails; - - private final OptionalNullable proofOfPossession; - - private final Optional subjectTypeAuthorization; - - private final Optional clientId; - - private final Map additionalProperties; - - private GetResourceServerResponseContent( - Optional id, - Optional name, - Optional isSystem, - Optional identifier, - Optional> scopes, - Optional signingAlg, - Optional signingSecret, - Optional allowOfflineAccess, - Optional skipConsentForVerifiableFirstPartyClients, - Optional tokenLifetime, - Optional tokenLifetimeForWeb, - Optional enforcePolicies, - Optional tokenDialect, - OptionalNullable tokenEncryption, - OptionalNullable consentPolicy, - Optional> authorizationDetails, - OptionalNullable proofOfPossession, - Optional subjectTypeAuthorization, - Optional clientId, - Map additionalProperties) { - this.id = id; - this.name = name; - this.isSystem = isSystem; - this.identifier = identifier; - this.scopes = scopes; - this.signingAlg = signingAlg; - this.signingSecret = signingSecret; - this.allowOfflineAccess = allowOfflineAccess; - this.skipConsentForVerifiableFirstPartyClients = skipConsentForVerifiableFirstPartyClients; - this.tokenLifetime = tokenLifetime; - this.tokenLifetimeForWeb = tokenLifetimeForWeb; - this.enforcePolicies = enforcePolicies; - this.tokenDialect = tokenDialect; - this.tokenEncryption = tokenEncryption; - this.consentPolicy = consentPolicy; - this.authorizationDetails = authorizationDetails; - this.proofOfPossession = proofOfPossession; - this.subjectTypeAuthorization = subjectTypeAuthorization; - this.clientId = clientId; - 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 Secret used to sign tokens when using symmetric algorithms (HS256). - */ - @JsonProperty("signing_secret") - public Optional getSigningSecret() { - return signingSecret; - } - - /** - * @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 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; - } - - @JsonProperty("token_dialect") - public Optional getTokenDialect() { - return tokenDialect; - } - - @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; - } - - @JsonProperty("authorization_details") - public Optional> getAuthorizationDetails() { - 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; - } - - /** - * @return The client ID of the client that this resource server is linked to - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @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("proof_of_possession") - private OptionalNullable _getProofOfPossession() { - return proofOfPossession; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetResourceServerResponseContent && equalTo((GetResourceServerResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetResourceServerResponseContent 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) - && signingSecret.equals(other.signingSecret) - && allowOfflineAccess.equals(other.allowOfflineAccess) - && skipConsentForVerifiableFirstPartyClients.equals(other.skipConsentForVerifiableFirstPartyClients) - && tokenLifetime.equals(other.tokenLifetime) - && tokenLifetimeForWeb.equals(other.tokenLifetimeForWeb) - && enforcePolicies.equals(other.enforcePolicies) - && tokenDialect.equals(other.tokenDialect) - && tokenEncryption.equals(other.tokenEncryption) - && consentPolicy.equals(other.consentPolicy) - && authorizationDetails.equals(other.authorizationDetails) - && proofOfPossession.equals(other.proofOfPossession) - && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) - && clientId.equals(other.clientId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.isSystem, - this.identifier, - this.scopes, - this.signingAlg, - this.signingSecret, - this.allowOfflineAccess, - this.skipConsentForVerifiableFirstPartyClients, - this.tokenLifetime, - this.tokenLifetimeForWeb, - this.enforcePolicies, - this.tokenDialect, - this.tokenEncryption, - this.consentPolicy, - this.authorizationDetails, - this.proofOfPossession, - this.subjectTypeAuthorization, - this.clientId); - } - - @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 signingSecret = Optional.empty(); - - private Optional allowOfflineAccess = Optional.empty(); - - private Optional skipConsentForVerifiableFirstPartyClients = Optional.empty(); - - private Optional tokenLifetime = Optional.empty(); - - private Optional tokenLifetimeForWeb = Optional.empty(); - - private Optional enforcePolicies = Optional.empty(); - - private Optional tokenDialect = Optional.empty(); - - private OptionalNullable tokenEncryption = OptionalNullable.absent(); - - private OptionalNullable consentPolicy = OptionalNullable.absent(); - - private Optional> authorizationDetails = Optional.empty(); - - private OptionalNullable proofOfPossession = OptionalNullable.absent(); - - private Optional subjectTypeAuthorization = Optional.empty(); - - private Optional clientId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetResourceServerResponseContent other) { - id(other.getId()); - name(other.getName()); - isSystem(other.getIsSystem()); - identifier(other.getIdentifier()); - scopes(other.getScopes()); - signingAlg(other.getSigningAlg()); - signingSecret(other.getSigningSecret()); - allowOfflineAccess(other.getAllowOfflineAccess()); - skipConsentForVerifiableFirstPartyClients(other.getSkipConsentForVerifiableFirstPartyClients()); - tokenLifetime(other.getTokenLifetime()); - tokenLifetimeForWeb(other.getTokenLifetimeForWeb()); - enforcePolicies(other.getEnforcePolicies()); - tokenDialect(other.getTokenDialect()); - tokenEncryption(other.getTokenEncryption()); - consentPolicy(other.getConsentPolicy()); - authorizationDetails(other.getAuthorizationDetails()); - proofOfPossession(other.getProofOfPossession()); - subjectTypeAuthorization(other.getSubjectTypeAuthorization()); - clientId(other.getClientId()); - 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; - } - - /** - *

Secret used to sign tokens when using symmetric algorithms (HS256).

- */ - @JsonSetter(value = "signing_secret", nulls = Nulls.SKIP) - public Builder signingSecret(Optional signingSecret) { - this.signingSecret = signingSecret; - return this; - } - - public Builder signingSecret(String signingSecret) { - this.signingSecret = Optional.ofNullable(signingSecret); - 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 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; - } - - @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 = "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; - } - - @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) - public Builder authorizationDetails(Optional> authorizationDetails) { - this.authorizationDetails = authorizationDetails; - return this; - } - - public Builder authorizationDetails(List authorizationDetails) { - this.authorizationDetails = Optional.ofNullable(authorizationDetails); - 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; - } - - /** - *

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; - } - - public GetResourceServerResponseContent build() { - return new GetResourceServerResponseContent( - id, - name, - isSystem, - identifier, - scopes, - signingAlg, - signingSecret, - allowOfflineAccess, - skipConsentForVerifiableFirstPartyClients, - tokenLifetime, - tokenLifetimeForWeb, - enforcePolicies, - tokenDialect, - tokenEncryption, - consentPolicy, - authorizationDetails, - proofOfPossession, - subjectTypeAuthorization, - clientId, - 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 deleted file mode 100644 index e3ac98df6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetRiskAssessmentsSettingsNewDeviceResponseContent.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = GetRiskAssessmentsSettingsNewDeviceResponseContent.Builder.class) -public final class GetRiskAssessmentsSettingsNewDeviceResponseContent { - private final int rememberFor; - - private final Map additionalProperties; - - private GetRiskAssessmentsSettingsNewDeviceResponseContent( - int rememberFor, Map additionalProperties) { - this.rememberFor = rememberFor; - this.additionalProperties = additionalProperties; - } - - /** - * @return Length of time to remember devices for, in days. - */ - @JsonProperty("remember_for") - public int getRememberFor() { - return rememberFor; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetRiskAssessmentsSettingsNewDeviceResponseContent - && equalTo((GetRiskAssessmentsSettingsNewDeviceResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetRiskAssessmentsSettingsNewDeviceResponseContent other) { - return rememberFor == other.rememberFor; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.rememberFor); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static RememberForStage builder() { - return new Builder(); - } - - public interface RememberForStage { - /** - *

Length of time to remember devices for, in days.

- */ - _FinalStage rememberFor(int rememberFor); - - Builder from(GetRiskAssessmentsSettingsNewDeviceResponseContent other); - } - - public interface _FinalStage { - GetRiskAssessmentsSettingsNewDeviceResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements RememberForStage, _FinalStage { - private int rememberFor; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetRiskAssessmentsSettingsNewDeviceResponseContent other) { - rememberFor(other.getRememberFor()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("remember_for") - public _FinalStage rememberFor(int rememberFor) { - this.rememberFor = rememberFor; - return this; - } - - @java.lang.Override - public GetRiskAssessmentsSettingsNewDeviceResponseContent build() { - return new GetRiskAssessmentsSettingsNewDeviceResponseContent(rememberFor, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetRiskAssessmentsSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetRiskAssessmentsSettingsResponseContent.java deleted file mode 100644 index b670eed95..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetRiskAssessmentsSettingsResponseContent.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = GetRiskAssessmentsSettingsResponseContent.Builder.class) -public final class GetRiskAssessmentsSettingsResponseContent { - private final boolean enabled; - - private final Map additionalProperties; - - private GetRiskAssessmentsSettingsResponseContent(boolean enabled, Map additionalProperties) { - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether or not risk assessment is enabled. - */ - @JsonProperty("enabled") - public boolean getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetRiskAssessmentsSettingsResponseContent - && equalTo((GetRiskAssessmentsSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetRiskAssessmentsSettingsResponseContent other) { - return enabled == other.enabled; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EnabledStage builder() { - return new Builder(); - } - - public interface EnabledStage { - /** - *

Whether or not risk assessment is enabled.

- */ - _FinalStage enabled(boolean enabled); - - Builder from(GetRiskAssessmentsSettingsResponseContent other); - } - - public interface _FinalStage { - GetRiskAssessmentsSettingsResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EnabledStage, _FinalStage { - private boolean enabled; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetRiskAssessmentsSettingsResponseContent other) { - enabled(other.getEnabled()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("enabled") - public _FinalStage enabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - @java.lang.Override - public GetRiskAssessmentsSettingsResponseContent build() { - return new GetRiskAssessmentsSettingsResponseContent(enabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetRoleResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetRoleResponseContent.java deleted file mode 100644 index 4b04ade20..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetRoleResponseContent.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetRoleResponseContent.Builder.class) -public final class GetRoleResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional description; - - private final Map additionalProperties; - - private GetRoleResponseContent( - Optional id, - Optional name, - Optional description, - Map additionalProperties) { - this.id = id; - this.name = name; - this.description = description; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID for this role. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Name of this role. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Description of this role. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetRoleResponseContent && equalTo((GetRoleResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetRoleResponseContent other) { - return id.equals(other.id) && name.equals(other.name) && description.equals(other.description); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.description); - } - - @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 description = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetRoleResponseContent other) { - id(other.getId()); - name(other.getName()); - description(other.getDescription()); - return this; - } - - /** - *

ID for this role.

- */ - @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; - } - - /** - *

Name of this role.

- */ - @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; - } - - /** - *

Description of this role.

- */ - @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; - } - - public GetRoleResponseContent build() { - return new GetRoleResponseContent(id, name, description, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetRuleRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetRuleRequestParameters.java deleted file mode 100644 index 0b9e31fa6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetRuleRequestParameters.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetRuleRequestParameters.Builder.class) -public final class GetRuleRequestParameters { - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final Map additionalProperties; - - private GetRuleRequestParameters( - OptionalNullable fields, - OptionalNullable includeFields, - Map additionalProperties) { - this.fields = fields; - this.includeFields = includeFields; - this.additionalProperties = additionalProperties; - } - - /** - * @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). - */ - @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("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 GetRuleRequestParameters && equalTo((GetRuleRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetRuleRequestParameters other) { - return fields.equals(other.fields) && includeFields.equals(other.includeFields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetRuleRequestParameters other) { - fields(other.getFields()); - includeFields(other.getIncludeFields()); - 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).

- */ - @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 GetRuleRequestParameters build() { - return new GetRuleRequestParameters(fields, includeFields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetRuleResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetRuleResponseContent.java deleted file mode 100644 index 716fd9d72..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetRuleResponseContent.java +++ /dev/null @@ -1,253 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetRuleResponseContent.Builder.class) -public final class GetRuleResponseContent { - private final Optional name; - - private final Optional id; - - private final Optional enabled; - - private final Optional script; - - private final Optional order; - - private final Optional stage; - - private final Map additionalProperties; - - private GetRuleResponseContent( - Optional name, - Optional id, - Optional enabled, - Optional script, - Optional order, - Optional stage, - Map additionalProperties) { - this.name = name; - this.id = id; - this.enabled = enabled; - this.script = script; - this.order = order; - this.stage = stage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of this rule. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return ID of this rule. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Whether the rule is enabled (true), or disabled (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Code to be executed when this rule runs. - */ - @JsonProperty("script") - public Optional getScript() { - return script; - } - - /** - * @return Order that this rule should execute in relative to other rules. Lower-valued rules execute first. - */ - @JsonProperty("order") - public Optional getOrder() { - return order; - } - - /** - * @return Execution stage of this rule. Can be login_success, login_failure, or pre_authorize. - */ - @JsonProperty("stage") - public Optional getStage() { - return stage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetRuleResponseContent && equalTo((GetRuleResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetRuleResponseContent other) { - return name.equals(other.name) - && id.equals(other.id) - && enabled.equals(other.enabled) - && script.equals(other.script) - && order.equals(other.order) - && stage.equals(other.stage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.id, this.enabled, this.script, this.order, this.stage); - } - - @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 id = Optional.empty(); - - private Optional enabled = Optional.empty(); - - private Optional script = Optional.empty(); - - private Optional order = Optional.empty(); - - private Optional stage = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetRuleResponseContent other) { - name(other.getName()); - id(other.getId()); - enabled(other.getEnabled()); - script(other.getScript()); - order(other.getOrder()); - stage(other.getStage()); - return this; - } - - /** - *

Name of this rule.

- */ - @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; - } - - /** - *

ID of this rule.

- */ - @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; - } - - /** - *

Whether the rule is enabled (true), or disabled (false).

- */ - @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; - } - - /** - *

Code to be executed when this rule runs.

- */ - @JsonSetter(value = "script", nulls = Nulls.SKIP) - public Builder script(Optional script) { - this.script = script; - return this; - } - - public Builder script(String script) { - this.script = Optional.ofNullable(script); - return this; - } - - /** - *

Order that this rule should execute in relative to other rules. Lower-valued rules execute first.

- */ - @JsonSetter(value = "order", nulls = Nulls.SKIP) - public Builder order(Optional order) { - this.order = order; - return this; - } - - public Builder order(Double order) { - this.order = Optional.ofNullable(order); - return this; - } - - /** - *

Execution stage of this rule. Can be login_success, login_failure, or pre_authorize.

- */ - @JsonSetter(value = "stage", nulls = Nulls.SKIP) - public Builder stage(Optional stage) { - this.stage = stage; - return this; - } - - public Builder stage(String stage) { - this.stage = Optional.ofNullable(stage); - return this; - } - - public GetRuleResponseContent build() { - return new GetRuleResponseContent(name, id, enabled, script, order, stage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetScimConfigurationDefaultMappingResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetScimConfigurationDefaultMappingResponseContent.java deleted file mode 100644 index 856daa884..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetScimConfigurationDefaultMappingResponseContent.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetScimConfigurationDefaultMappingResponseContent.Builder.class) -public final class GetScimConfigurationDefaultMappingResponseContent { - private final Optional> mapping; - - private final Map additionalProperties; - - private GetScimConfigurationDefaultMappingResponseContent( - Optional> mapping, Map additionalProperties) { - this.mapping = mapping; - this.additionalProperties = additionalProperties; - } - - /** - * @return The mapping between auth0 and SCIM - */ - @JsonProperty("mapping") - public Optional> getMapping() { - return mapping; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetScimConfigurationDefaultMappingResponseContent - && equalTo((GetScimConfigurationDefaultMappingResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetScimConfigurationDefaultMappingResponseContent other) { - return mapping.equals(other.mapping); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.mapping); - } - - @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> mapping = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetScimConfigurationDefaultMappingResponseContent other) { - mapping(other.getMapping()); - return this; - } - - /** - *

The mapping between auth0 and SCIM

- */ - @JsonSetter(value = "mapping", nulls = Nulls.SKIP) - public Builder mapping(Optional> mapping) { - this.mapping = mapping; - return this; - } - - public Builder mapping(List mapping) { - this.mapping = Optional.ofNullable(mapping); - return this; - } - - public GetScimConfigurationDefaultMappingResponseContent build() { - return new GetScimConfigurationDefaultMappingResponseContent(mapping, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetScimConfigurationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetScimConfigurationResponseContent.java deleted file mode 100644 index a3da02aeb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetScimConfigurationResponseContent.java +++ /dev/null @@ -1,332 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetScimConfigurationResponseContent.Builder.class) -public final class GetScimConfigurationResponseContent { - private final Optional connectionId; - - private final Optional connectionName; - - private final Optional strategy; - - private final Optional tenantName; - - private final Optional userIdAttribute; - - private final Optional> mapping; - - private final Optional createdAt; - - private final Optional updatedOn; - - private final Map additionalProperties; - - private GetScimConfigurationResponseContent( - Optional connectionId, - Optional connectionName, - Optional strategy, - Optional tenantName, - Optional userIdAttribute, - Optional> mapping, - Optional createdAt, - Optional updatedOn, - Map additionalProperties) { - this.connectionId = connectionId; - this.connectionName = connectionName; - this.strategy = strategy; - this.tenantName = tenantName; - this.userIdAttribute = userIdAttribute; - this.mapping = mapping; - this.createdAt = createdAt; - this.updatedOn = updatedOn; - this.additionalProperties = additionalProperties; - } - - /** - * @return The connection's identifier - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - /** - * @return The connection's identifier - */ - @JsonProperty("connection_name") - public Optional getConnectionName() { - return connectionName; - } - - /** - * @return The connection's strategy - */ - @JsonProperty("strategy") - public Optional getStrategy() { - return strategy; - } - - /** - * @return The tenant's name - */ - @JsonProperty("tenant_name") - public Optional getTenantName() { - return tenantName; - } - - /** - * @return User ID attribute for generating unique user ids - */ - @JsonProperty("user_id_attribute") - public Optional getUserIdAttribute() { - return userIdAttribute; - } - - /** - * @return The mapping between auth0 and SCIM - */ - @JsonProperty("mapping") - public Optional> getMapping() { - return mapping; - } - - /** - * @return The Date Time Scim Configuration was created - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The Date Time Scim Configuration was last updated - */ - @JsonProperty("updated_on") - public Optional getUpdatedOn() { - return updatedOn; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetScimConfigurationResponseContent - && equalTo((GetScimConfigurationResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetScimConfigurationResponseContent other) { - return connectionId.equals(other.connectionId) - && connectionName.equals(other.connectionName) - && strategy.equals(other.strategy) - && tenantName.equals(other.tenantName) - && userIdAttribute.equals(other.userIdAttribute) - && mapping.equals(other.mapping) - && createdAt.equals(other.createdAt) - && updatedOn.equals(other.updatedOn); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.connectionName, - this.strategy, - this.tenantName, - this.userIdAttribute, - this.mapping, - this.createdAt, - this.updatedOn); - } - - @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 connectionId = Optional.empty(); - - private Optional connectionName = Optional.empty(); - - private Optional strategy = Optional.empty(); - - private Optional tenantName = Optional.empty(); - - private Optional userIdAttribute = Optional.empty(); - - private Optional> mapping = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedOn = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetScimConfigurationResponseContent other) { - connectionId(other.getConnectionId()); - connectionName(other.getConnectionName()); - strategy(other.getStrategy()); - tenantName(other.getTenantName()); - userIdAttribute(other.getUserIdAttribute()); - mapping(other.getMapping()); - createdAt(other.getCreatedAt()); - updatedOn(other.getUpdatedOn()); - return this; - } - - /** - *

The connection's identifier

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - return this; - } - - /** - *

The connection's identifier

- */ - @JsonSetter(value = "connection_name", nulls = Nulls.SKIP) - public Builder connectionName(Optional connectionName) { - this.connectionName = connectionName; - return this; - } - - public Builder connectionName(String connectionName) { - this.connectionName = Optional.ofNullable(connectionName); - return this; - } - - /** - *

The connection's strategy

- */ - @JsonSetter(value = "strategy", nulls = Nulls.SKIP) - public Builder strategy(Optional strategy) { - this.strategy = strategy; - return this; - } - - public Builder strategy(String strategy) { - this.strategy = Optional.ofNullable(strategy); - return this; - } - - /** - *

The tenant's name

- */ - @JsonSetter(value = "tenant_name", nulls = Nulls.SKIP) - public Builder tenantName(Optional tenantName) { - this.tenantName = tenantName; - return this; - } - - public Builder tenantName(String tenantName) { - this.tenantName = Optional.ofNullable(tenantName); - return this; - } - - /** - *

User ID attribute for generating unique user ids

- */ - @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; - } - - /** - *

The mapping between auth0 and SCIM

- */ - @JsonSetter(value = "mapping", nulls = Nulls.SKIP) - public Builder mapping(Optional> mapping) { - this.mapping = mapping; - return this; - } - - public Builder mapping(List mapping) { - this.mapping = Optional.ofNullable(mapping); - return this; - } - - /** - *

The Date Time Scim Configuration was created

- */ - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(String createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - /** - *

The Date Time Scim Configuration was last updated

- */ - @JsonSetter(value = "updated_on", nulls = Nulls.SKIP) - public Builder updatedOn(Optional updatedOn) { - this.updatedOn = updatedOn; - return this; - } - - public Builder updatedOn(String updatedOn) { - this.updatedOn = Optional.ofNullable(updatedOn); - return this; - } - - public GetScimConfigurationResponseContent build() { - return new GetScimConfigurationResponseContent( - connectionId, - connectionName, - strategy, - tenantName, - userIdAttribute, - mapping, - createdAt, - updatedOn, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetSelfServiceProfileResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetSelfServiceProfileResponseContent.java deleted file mode 100644 index 506791b7b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetSelfServiceProfileResponseContent.java +++ /dev/null @@ -1,359 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = GetSelfServiceProfileResponseContent.Builder.class) -public final class GetSelfServiceProfileResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional description; - - private final Optional> userAttributes; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional branding; - - private final Optional> allowedStrategies; - - private final Optional userAttributeProfileId; - - private final Map additionalProperties; - - private GetSelfServiceProfileResponseContent( - Optional id, - Optional name, - Optional description, - Optional> userAttributes, - Optional createdAt, - Optional updatedAt, - Optional branding, - Optional> allowedStrategies, - Optional userAttributeProfileId, - Map additionalProperties) { - this.id = id; - this.name = name; - this.description = description; - this.userAttributes = userAttributes; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.branding = branding; - this.allowedStrategies = allowedStrategies; - this.userAttributeProfileId = userAttributeProfileId; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the self-service Profile. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the self-service Profile. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The description of the self-service Profile. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - /** - * @return List of attributes to be mapped that will be shown to the user during the SS-SSO flow. - */ - @JsonProperty("user_attributes") - public Optional> getUserAttributes() { - return userAttributes; - } - - /** - * @return The time when this self-service Profile was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when this self-service Profile was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("branding") - public Optional getBranding() { - return branding; - } - - /** - * @return List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, keycloak-samlp, pingfederate] - */ - @JsonProperty("allowed_strategies") - public Optional> getAllowedStrategies() { - return allowedStrategies; - } - - /** - * @return ID of the user-attribute-profile to associate with this self-service profile. - */ - @JsonProperty("user_attribute_profile_id") - public Optional getUserAttributeProfileId() { - return userAttributeProfileId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetSelfServiceProfileResponseContent - && equalTo((GetSelfServiceProfileResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetSelfServiceProfileResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && description.equals(other.description) - && userAttributes.equals(other.userAttributes) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && branding.equals(other.branding) - && allowedStrategies.equals(other.allowedStrategies) - && userAttributeProfileId.equals(other.userAttributeProfileId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.description, - this.userAttributes, - this.createdAt, - this.updatedAt, - this.branding, - this.allowedStrategies, - this.userAttributeProfileId); - } - - @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 description = Optional.empty(); - - private Optional> userAttributes = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional branding = Optional.empty(); - - private Optional> allowedStrategies = Optional.empty(); - - private Optional userAttributeProfileId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetSelfServiceProfileResponseContent other) { - id(other.getId()); - name(other.getName()); - description(other.getDescription()); - userAttributes(other.getUserAttributes()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - branding(other.getBranding()); - allowedStrategies(other.getAllowedStrategies()); - userAttributeProfileId(other.getUserAttributeProfileId()); - return this; - } - - /** - *

The unique ID of the self-service Profile.

- */ - @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 the self-service Profile.

- */ - @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 description of the self-service Profile.

- */ - @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; - } - - /** - *

List of attributes to be mapped that will be shown to the user during the SS-SSO flow.

- */ - @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) - public Builder userAttributes(Optional> userAttributes) { - this.userAttributes = userAttributes; - return this; - } - - public Builder userAttributes(List userAttributes) { - this.userAttributes = Optional.ofNullable(userAttributes); - return this; - } - - /** - *

The time when this self-service Profile 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 time when this self-service Profile was 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; - } - - @JsonSetter(value = "branding", nulls = Nulls.SKIP) - public Builder branding(Optional branding) { - this.branding = branding; - return this; - } - - public Builder branding(SelfServiceProfileBrandingProperties branding) { - this.branding = Optional.ofNullable(branding); - return this; - } - - /** - *

List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, keycloak-samlp, pingfederate]

- */ - @JsonSetter(value = "allowed_strategies", nulls = Nulls.SKIP) - public Builder allowedStrategies(Optional> allowedStrategies) { - this.allowedStrategies = allowedStrategies; - return this; - } - - public Builder allowedStrategies(List allowedStrategies) { - this.allowedStrategies = Optional.ofNullable(allowedStrategies); - return this; - } - - /** - *

ID of the user-attribute-profile to associate with this self-service profile.

- */ - @JsonSetter(value = "user_attribute_profile_id", nulls = Nulls.SKIP) - public Builder userAttributeProfileId(Optional userAttributeProfileId) { - this.userAttributeProfileId = userAttributeProfileId; - return this; - } - - public Builder userAttributeProfileId(String userAttributeProfileId) { - this.userAttributeProfileId = Optional.ofNullable(userAttributeProfileId); - return this; - } - - public GetSelfServiceProfileResponseContent build() { - return new GetSelfServiceProfileResponseContent( - id, - name, - description, - userAttributes, - createdAt, - updatedAt, - branding, - allowedStrategies, - userAttributeProfileId, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetSessionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetSessionResponseContent.java deleted file mode 100644 index 3f7ebba29..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetSessionResponseContent.java +++ /dev/null @@ -1,464 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetSessionResponseContent.Builder.class) -public final class GetSessionResponseContent { - private final Optional id; - - private final Optional userId; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional authenticatedAt; - - private final Optional idleExpiresAt; - - private final Optional expiresAt; - - private final Optional lastInteractedAt; - - private final Optional device; - - private final Optional> clients; - - private final Optional authentication; - - private final Optional cookie; - - private final OptionalNullable> sessionMetadata; - - private final Map additionalProperties; - - private GetSessionResponseContent( - Optional id, - Optional userId, - Optional createdAt, - Optional updatedAt, - Optional authenticatedAt, - Optional idleExpiresAt, - Optional expiresAt, - Optional lastInteractedAt, - Optional device, - Optional> clients, - Optional authentication, - Optional cookie, - OptionalNullable> sessionMetadata, - Map additionalProperties) { - this.id = id; - this.userId = userId; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.authenticatedAt = authenticatedAt; - this.idleExpiresAt = idleExpiresAt; - this.expiresAt = expiresAt; - this.lastInteractedAt = lastInteractedAt; - this.device = device; - this.clients = clients; - this.authentication = authentication; - this.cookie = cookie; - this.sessionMetadata = sessionMetadata; - this.additionalProperties = additionalProperties; - } - - /** - * @return The ID of the session - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return ID of the user which can be used when interacting with other APIs. - */ - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("authenticated_at") - public Optional getAuthenticatedAt() { - return authenticatedAt; - } - - @JsonProperty("idle_expires_at") - public Optional getIdleExpiresAt() { - return idleExpiresAt; - } - - @JsonProperty("expires_at") - public Optional getExpiresAt() { - return expiresAt; - } - - @JsonProperty("last_interacted_at") - public Optional getLastInteractedAt() { - return lastInteractedAt; - } - - @JsonProperty("device") - public Optional getDevice() { - return device; - } - - /** - * @return List of client details for the session - */ - @JsonProperty("clients") - public Optional> getClients() { - return clients; - } - - @JsonProperty("authentication") - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("cookie") - public Optional getCookie() { - return cookie; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_metadata") - public OptionalNullable> getSessionMetadata() { - if (sessionMetadata == null) { - return OptionalNullable.absent(); - } - return sessionMetadata; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_metadata") - private OptionalNullable> _getSessionMetadata() { - return sessionMetadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetSessionResponseContent && equalTo((GetSessionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetSessionResponseContent other) { - return id.equals(other.id) - && userId.equals(other.userId) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && authenticatedAt.equals(other.authenticatedAt) - && idleExpiresAt.equals(other.idleExpiresAt) - && expiresAt.equals(other.expiresAt) - && lastInteractedAt.equals(other.lastInteractedAt) - && device.equals(other.device) - && clients.equals(other.clients) - && authentication.equals(other.authentication) - && cookie.equals(other.cookie) - && sessionMetadata.equals(other.sessionMetadata); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.userId, - this.createdAt, - this.updatedAt, - this.authenticatedAt, - this.idleExpiresAt, - this.expiresAt, - this.lastInteractedAt, - this.device, - this.clients, - this.authentication, - this.cookie, - this.sessionMetadata); - } - - @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 userId = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional authenticatedAt = Optional.empty(); - - private Optional idleExpiresAt = Optional.empty(); - - private Optional expiresAt = Optional.empty(); - - private Optional lastInteractedAt = Optional.empty(); - - private Optional device = Optional.empty(); - - private Optional> clients = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional cookie = Optional.empty(); - - private OptionalNullable> sessionMetadata = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetSessionResponseContent other) { - id(other.getId()); - userId(other.getUserId()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - authenticatedAt(other.getAuthenticatedAt()); - idleExpiresAt(other.getIdleExpiresAt()); - expiresAt(other.getExpiresAt()); - lastInteractedAt(other.getLastInteractedAt()); - device(other.getDevice()); - clients(other.getClients()); - authentication(other.getAuthentication()); - cookie(other.getCookie()); - sessionMetadata(other.getSessionMetadata()); - return this; - } - - /** - *

The ID of the session

- */ - @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; - } - - /** - *

ID of the user which can be used when interacting with other APIs.

- */ - @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; - } - - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(SessionDate createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - public Builder updatedAt(SessionDate updatedAt) { - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - @JsonSetter(value = "authenticated_at", nulls = Nulls.SKIP) - public Builder authenticatedAt(Optional authenticatedAt) { - this.authenticatedAt = authenticatedAt; - return this; - } - - public Builder authenticatedAt(SessionDate authenticatedAt) { - this.authenticatedAt = Optional.ofNullable(authenticatedAt); - return this; - } - - @JsonSetter(value = "idle_expires_at", nulls = Nulls.SKIP) - public Builder idleExpiresAt(Optional idleExpiresAt) { - this.idleExpiresAt = idleExpiresAt; - return this; - } - - public Builder idleExpiresAt(SessionDate idleExpiresAt) { - this.idleExpiresAt = Optional.ofNullable(idleExpiresAt); - return this; - } - - @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - public Builder expiresAt(SessionDate expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); - return this; - } - - @JsonSetter(value = "last_interacted_at", nulls = Nulls.SKIP) - public Builder lastInteractedAt(Optional lastInteractedAt) { - this.lastInteractedAt = lastInteractedAt; - return this; - } - - public Builder lastInteractedAt(SessionDate lastInteractedAt) { - this.lastInteractedAt = Optional.ofNullable(lastInteractedAt); - return this; - } - - @JsonSetter(value = "device", nulls = Nulls.SKIP) - public Builder device(Optional device) { - this.device = device; - return this; - } - - public Builder device(SessionDeviceMetadata device) { - this.device = Optional.ofNullable(device); - return this; - } - - /** - *

List of client details for the session

- */ - @JsonSetter(value = "clients", nulls = Nulls.SKIP) - public Builder clients(Optional> clients) { - this.clients = clients; - return this; - } - - public Builder clients(List clients) { - this.clients = Optional.ofNullable(clients); - return this; - } - - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public Builder authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - public Builder authentication(SessionAuthenticationSignals authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @JsonSetter(value = "cookie", nulls = Nulls.SKIP) - public Builder cookie(Optional cookie) { - this.cookie = cookie; - return this; - } - - public Builder cookie(SessionCookieMetadata cookie) { - this.cookie = Optional.ofNullable(cookie); - return this; - } - - @JsonSetter(value = "session_metadata", nulls = Nulls.SKIP) - public Builder sessionMetadata(@Nullable OptionalNullable> sessionMetadata) { - this.sessionMetadata = sessionMetadata; - return this; - } - - public Builder sessionMetadata(Map sessionMetadata) { - this.sessionMetadata = OptionalNullable.of(sessionMetadata); - return this; - } - - public Builder sessionMetadata(Optional> sessionMetadata) { - if (sessionMetadata.isPresent()) { - this.sessionMetadata = OptionalNullable.of(sessionMetadata.get()); - } else { - this.sessionMetadata = OptionalNullable.absent(); - } - return this; - } - - public Builder sessionMetadata(com.auth0.client.mgmt.core.Nullable> sessionMetadata) { - if (sessionMetadata.isNull()) { - this.sessionMetadata = OptionalNullable.ofNull(); - } else if (sessionMetadata.isEmpty()) { - this.sessionMetadata = OptionalNullable.absent(); - } else { - this.sessionMetadata = OptionalNullable.of(sessionMetadata.get()); - } - return this; - } - - public GetSessionResponseContent build() { - return new GetSessionResponseContent( - id, - userId, - createdAt, - updatedAt, - authenticatedAt, - idleExpiresAt, - expiresAt, - lastInteractedAt, - device, - clients, - authentication, - cookie, - sessionMetadata, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetSettingsResponseContent.java deleted file mode 100644 index 7a588405f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetSettingsResponseContent.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetSettingsResponseContent.Builder.class) -public final class GetSettingsResponseContent { - private final Optional universalLoginExperience; - - private final Optional identifierFirst; - - private final Optional webauthnPlatformFirstFactor; - - private final Map additionalProperties; - - private GetSettingsResponseContent( - Optional universalLoginExperience, - Optional identifierFirst, - Optional webauthnPlatformFirstFactor, - Map additionalProperties) { - this.universalLoginExperience = universalLoginExperience; - this.identifierFirst = identifierFirst; - this.webauthnPlatformFirstFactor = webauthnPlatformFirstFactor; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("universal_login_experience") - public Optional getUniversalLoginExperience() { - return universalLoginExperience; - } - - /** - * @return Whether identifier first is enabled or not - */ - @JsonProperty("identifier_first") - public Optional getIdentifierFirst() { - return identifierFirst; - } - - /** - * @return Use WebAuthn with Device Biometrics as the first authentication factor - */ - @JsonProperty("webauthn_platform_first_factor") - public Optional getWebauthnPlatformFirstFactor() { - return webauthnPlatformFirstFactor; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetSettingsResponseContent && equalTo((GetSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetSettingsResponseContent other) { - return universalLoginExperience.equals(other.universalLoginExperience) - && identifierFirst.equals(other.identifierFirst) - && webauthnPlatformFirstFactor.equals(other.webauthnPlatformFirstFactor); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.universalLoginExperience, this.identifierFirst, this.webauthnPlatformFirstFactor); - } - - @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 universalLoginExperience = Optional.empty(); - - private Optional identifierFirst = Optional.empty(); - - private Optional webauthnPlatformFirstFactor = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetSettingsResponseContent other) { - universalLoginExperience(other.getUniversalLoginExperience()); - identifierFirst(other.getIdentifierFirst()); - webauthnPlatformFirstFactor(other.getWebauthnPlatformFirstFactor()); - return this; - } - - @JsonSetter(value = "universal_login_experience", nulls = Nulls.SKIP) - public Builder universalLoginExperience(Optional universalLoginExperience) { - this.universalLoginExperience = universalLoginExperience; - return this; - } - - public Builder universalLoginExperience(UniversalLoginExperienceEnum universalLoginExperience) { - this.universalLoginExperience = Optional.ofNullable(universalLoginExperience); - return this; - } - - /** - *

Whether identifier first is enabled or not

- */ - @JsonSetter(value = "identifier_first", nulls = Nulls.SKIP) - public Builder identifierFirst(Optional identifierFirst) { - this.identifierFirst = identifierFirst; - return this; - } - - public Builder identifierFirst(Boolean identifierFirst) { - this.identifierFirst = Optional.ofNullable(identifierFirst); - return this; - } - - /** - *

Use WebAuthn with Device Biometrics as the first authentication factor

- */ - @JsonSetter(value = "webauthn_platform_first_factor", nulls = Nulls.SKIP) - public Builder webauthnPlatformFirstFactor(Optional webauthnPlatformFirstFactor) { - this.webauthnPlatformFirstFactor = webauthnPlatformFirstFactor; - return this; - } - - public Builder webauthnPlatformFirstFactor(Boolean webauthnPlatformFirstFactor) { - this.webauthnPlatformFirstFactor = Optional.ofNullable(webauthnPlatformFirstFactor); - return this; - } - - public GetSettingsResponseContent build() { - return new GetSettingsResponseContent( - universalLoginExperience, identifierFirst, webauthnPlatformFirstFactor, 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 deleted file mode 100644 index c53de182e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetSigningKeysResponseContent.java +++ /dev/null @@ -1,552 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetSigningKeysResponseContent.Builder.class) -public final class GetSigningKeysResponseContent { - private final String kid; - - private final String cert; - - private final Optional pkcs7; - - private final Optional current; - - private final Optional next; - - private final Optional previous; - - private final Optional currentSince; - - private final Optional currentUntil; - - private final String fingerprint; - - private final String thumbprint; - - private final Optional revoked; - - private final Optional revokedAt; - - private final Map additionalProperties; - - private GetSigningKeysResponseContent( - String kid, - String cert, - Optional pkcs7, - Optional current, - Optional next, - Optional previous, - Optional currentSince, - Optional currentUntil, - String fingerprint, - String thumbprint, - Optional revoked, - Optional revokedAt, - Map additionalProperties) { - this.kid = kid; - this.cert = cert; - this.pkcs7 = pkcs7; - this.current = current; - this.next = next; - this.previous = previous; - this.currentSince = currentSince; - this.currentUntil = currentUntil; - this.fingerprint = fingerprint; - this.thumbprint = thumbprint; - this.revoked = revoked; - this.revokedAt = revokedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The key id of the signing key - */ - @JsonProperty("kid") - public String getKid() { - return kid; - } - - /** - * @return The public certificate of the signing key - */ - @JsonProperty("cert") - public String getCert() { - return cert; - } - - /** - * @return The public certificate of the signing key in pkcs7 format - */ - @JsonProperty("pkcs7") - public Optional getPkcs7() { - return pkcs7; - } - - /** - * @return True if the key is the the current key - */ - @JsonProperty("current") - public Optional getCurrent() { - return current; - } - - /** - * @return True if the key is the the next key - */ - @JsonProperty("next") - public Optional getNext() { - return next; - } - - /** - * @return True if the key is the the previous key - */ - @JsonProperty("previous") - public Optional getPrevious() { - return previous; - } - - @JsonProperty("current_since") - public Optional getCurrentSince() { - return currentSince; - } - - @JsonProperty("current_until") - public Optional getCurrentUntil() { - return currentUntil; - } - - /** - * @return The cert fingerprint - */ - @JsonProperty("fingerprint") - public String getFingerprint() { - return fingerprint; - } - - /** - * @return The cert thumbprint - */ - @JsonProperty("thumbprint") - public String getThumbprint() { - return thumbprint; - } - - /** - * @return True if the key is revoked - */ - @JsonProperty("revoked") - public Optional getRevoked() { - return revoked; - } - - @JsonProperty("revoked_at") - public Optional getRevokedAt() { - return revokedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetSigningKeysResponseContent && equalTo((GetSigningKeysResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetSigningKeysResponseContent other) { - return kid.equals(other.kid) - && cert.equals(other.cert) - && pkcs7.equals(other.pkcs7) - && current.equals(other.current) - && next.equals(other.next) - && previous.equals(other.previous) - && currentSince.equals(other.currentSince) - && currentUntil.equals(other.currentUntil) - && fingerprint.equals(other.fingerprint) - && thumbprint.equals(other.thumbprint) - && revoked.equals(other.revoked) - && revokedAt.equals(other.revokedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.kid, - this.cert, - this.pkcs7, - this.current, - this.next, - this.previous, - this.currentSince, - this.currentUntil, - this.fingerprint, - this.thumbprint, - this.revoked, - this.revokedAt); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static KidStage builder() { - return new Builder(); - } - - public interface KidStage { - /** - *

The key id of the signing key

- */ - CertStage kid(@NotNull String kid); - - Builder from(GetSigningKeysResponseContent other); - } - - public interface CertStage { - /** - *

The public certificate of the signing key

- */ - FingerprintStage cert(@NotNull String cert); - } - - public interface FingerprintStage { - /** - *

The cert fingerprint

- */ - ThumbprintStage fingerprint(@NotNull String fingerprint); - } - - public interface ThumbprintStage { - /** - *

The cert thumbprint

- */ - _FinalStage thumbprint(@NotNull String thumbprint); - } - - public interface _FinalStage { - GetSigningKeysResponseContent build(); - - /** - *

The public certificate of the signing key in pkcs7 format

- */ - _FinalStage pkcs7(Optional pkcs7); - - _FinalStage pkcs7(String pkcs7); - - /** - *

True if the key is the the current key

- */ - _FinalStage current(Optional current); - - _FinalStage current(Boolean current); - - /** - *

True if the key is the the next key

- */ - _FinalStage next(Optional next); - - _FinalStage next(Boolean next); - - /** - *

True if the key is the the previous key

- */ - _FinalStage previous(Optional previous); - - _FinalStage previous(Boolean previous); - - _FinalStage currentSince(Optional currentSince); - - _FinalStage currentSince(SigningKeysDate currentSince); - - _FinalStage currentUntil(Optional currentUntil); - - _FinalStage currentUntil(SigningKeysDate currentUntil); - - /** - *

True if the key is revoked

- */ - _FinalStage revoked(Optional revoked); - - _FinalStage revoked(Boolean revoked); - - _FinalStage revokedAt(Optional revokedAt); - - _FinalStage revokedAt(SigningKeysDate revokedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements KidStage, CertStage, FingerprintStage, ThumbprintStage, _FinalStage { - private String kid; - - private String cert; - - private String fingerprint; - - private String thumbprint; - - private Optional revokedAt = Optional.empty(); - - private Optional revoked = Optional.empty(); - - private Optional currentUntil = Optional.empty(); - - private Optional currentSince = Optional.empty(); - - private Optional previous = Optional.empty(); - - private Optional next = Optional.empty(); - - private Optional current = Optional.empty(); - - private Optional pkcs7 = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetSigningKeysResponseContent other) { - kid(other.getKid()); - cert(other.getCert()); - pkcs7(other.getPkcs7()); - current(other.getCurrent()); - next(other.getNext()); - previous(other.getPrevious()); - currentSince(other.getCurrentSince()); - currentUntil(other.getCurrentUntil()); - fingerprint(other.getFingerprint()); - thumbprint(other.getThumbprint()); - revoked(other.getRevoked()); - revokedAt(other.getRevokedAt()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("kid") - public CertStage kid(@NotNull String kid) { - this.kid = Objects.requireNonNull(kid, "kid must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("cert") - public FingerprintStage cert(@NotNull String cert) { - this.cert = Objects.requireNonNull(cert, "cert must not be null"); - return this; - } - - /** - *

The cert fingerprint

- *

The cert fingerprint

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("fingerprint") - public ThumbprintStage fingerprint(@NotNull String fingerprint) { - this.fingerprint = Objects.requireNonNull(fingerprint, "fingerprint must not be null"); - return this; - } - - /** - *

The cert thumbprint

- *

The cert thumbprint

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("thumbprint") - public _FinalStage thumbprint(@NotNull String thumbprint) { - this.thumbprint = Objects.requireNonNull(thumbprint, "thumbprint must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage revokedAt(SigningKeysDate revokedAt) { - this.revokedAt = Optional.ofNullable(revokedAt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "revoked_at", nulls = Nulls.SKIP) - public _FinalStage revokedAt(Optional revokedAt) { - this.revokedAt = revokedAt; - return this; - } - - /** - *

True if the key is revoked

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage revoked(Boolean revoked) { - this.revoked = Optional.ofNullable(revoked); - return this; - } - - /** - *

True if the key is revoked

- */ - @java.lang.Override - @JsonSetter(value = "revoked", nulls = Nulls.SKIP) - public _FinalStage revoked(Optional revoked) { - this.revoked = revoked; - return this; - } - - @java.lang.Override - public _FinalStage currentUntil(SigningKeysDate currentUntil) { - this.currentUntil = Optional.ofNullable(currentUntil); - return this; - } - - @java.lang.Override - @JsonSetter(value = "current_until", nulls = Nulls.SKIP) - public _FinalStage currentUntil(Optional currentUntil) { - this.currentUntil = currentUntil; - return this; - } - - @java.lang.Override - public _FinalStage currentSince(SigningKeysDate currentSince) { - this.currentSince = Optional.ofNullable(currentSince); - return this; - } - - @java.lang.Override - @JsonSetter(value = "current_since", nulls = Nulls.SKIP) - public _FinalStage currentSince(Optional currentSince) { - this.currentSince = currentSince; - return this; - } - - /** - *

True if the key is the the previous key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage previous(Boolean previous) { - this.previous = Optional.ofNullable(previous); - return this; - } - - /** - *

True if the key is the the previous key

- */ - @java.lang.Override - @JsonSetter(value = "previous", nulls = Nulls.SKIP) - public _FinalStage previous(Optional previous) { - this.previous = previous; - return this; - } - - /** - *

True if the key is the the next key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage next(Boolean next) { - this.next = Optional.ofNullable(next); - return this; - } - - /** - *

True if the key is the the next key

- */ - @java.lang.Override - @JsonSetter(value = "next", nulls = Nulls.SKIP) - public _FinalStage next(Optional next) { - this.next = next; - return this; - } - - /** - *

True if the key is the the current key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage current(Boolean current) { - this.current = Optional.ofNullable(current); - return this; - } - - /** - *

True if the key is the the current key

- */ - @java.lang.Override - @JsonSetter(value = "current", nulls = Nulls.SKIP) - public _FinalStage current(Optional current) { - this.current = current; - return this; - } - - /** - *

The public certificate of the signing key in pkcs7 format

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage pkcs7(String pkcs7) { - this.pkcs7 = Optional.ofNullable(pkcs7); - return this; - } - - /** - *

The public certificate of the signing key in pkcs7 format

- */ - @java.lang.Override - @JsonSetter(value = "pkcs7", nulls = Nulls.SKIP) - public _FinalStage pkcs7(Optional pkcs7) { - this.pkcs7 = pkcs7; - return this; - } - - @java.lang.Override - public GetSigningKeysResponseContent build() { - return new GetSigningKeysResponseContent( - kid, - cert, - pkcs7, - current, - next, - previous, - currentSince, - currentUntil, - fingerprint, - thumbprint, - revoked, - revokedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetSupplementalSignalsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetSupplementalSignalsResponseContent.java deleted file mode 100644 index e8571ce80..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetSupplementalSignalsResponseContent.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetSupplementalSignalsResponseContent.Builder.class) -public final class GetSupplementalSignalsResponseContent { - private final Optional akamaiEnabled; - - private final Map additionalProperties; - - private GetSupplementalSignalsResponseContent( - Optional akamaiEnabled, Map additionalProperties) { - this.akamaiEnabled = akamaiEnabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Indicates if incoming Akamai Headers should be processed - */ - @JsonProperty("akamai_enabled") - public Optional getAkamaiEnabled() { - return akamaiEnabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetSupplementalSignalsResponseContent - && equalTo((GetSupplementalSignalsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetSupplementalSignalsResponseContent other) { - return akamaiEnabled.equals(other.akamaiEnabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.akamaiEnabled); - } - - @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 akamaiEnabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetSupplementalSignalsResponseContent other) { - akamaiEnabled(other.getAkamaiEnabled()); - return this; - } - - /** - *

Indicates if incoming Akamai Headers should be processed

- */ - @JsonSetter(value = "akamai_enabled", nulls = Nulls.SKIP) - public Builder akamaiEnabled(Optional akamaiEnabled) { - this.akamaiEnabled = akamaiEnabled; - return this; - } - - public Builder akamaiEnabled(Boolean akamaiEnabled) { - this.akamaiEnabled = Optional.ofNullable(akamaiEnabled); - return this; - } - - public GetSupplementalSignalsResponseContent build() { - return new GetSupplementalSignalsResponseContent(akamaiEnabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetSuspiciousIpThrottlingSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetSuspiciousIpThrottlingSettingsResponseContent.java deleted file mode 100644 index a73e05b88..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetSuspiciousIpThrottlingSettingsResponseContent.java +++ /dev/null @@ -1,186 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetSuspiciousIpThrottlingSettingsResponseContent.Builder.class) -public final class GetSuspiciousIpThrottlingSettingsResponseContent { - private final Optional enabled; - - private final Optional> shields; - - private final Optional> allowlist; - - private final Optional stage; - - private final Map additionalProperties; - - private GetSuspiciousIpThrottlingSettingsResponseContent( - Optional enabled, - Optional> shields, - Optional> allowlist, - Optional stage, - Map additionalProperties) { - this.enabled = enabled; - this.shields = shields; - this.allowlist = allowlist; - this.stage = stage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether or not suspicious IP throttling attack protections are active. - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Action to take when a suspicious IP throttling threshold is violated. - * Possible values: <code>block</code>, <code>admin_notification</code>. - */ - @JsonProperty("shields") - public Optional> getShields() { - return shields; - } - - @JsonProperty("allowlist") - public Optional> getAllowlist() { - return allowlist; - } - - @JsonProperty("stage") - public Optional getStage() { - return stage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetSuspiciousIpThrottlingSettingsResponseContent - && equalTo((GetSuspiciousIpThrottlingSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetSuspiciousIpThrottlingSettingsResponseContent other) { - return enabled.equals(other.enabled) - && shields.equals(other.shields) - && allowlist.equals(other.allowlist) - && stage.equals(other.stage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled, this.shields, this.allowlist, this.stage); - } - - @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 enabled = Optional.empty(); - - private Optional> shields = Optional.empty(); - - private Optional> allowlist = Optional.empty(); - - private Optional stage = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetSuspiciousIpThrottlingSettingsResponseContent other) { - enabled(other.getEnabled()); - shields(other.getShields()); - allowlist(other.getAllowlist()); - stage(other.getStage()); - return this; - } - - /** - *

Whether or not suspicious IP throttling attack protections are active.

- */ - @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; - } - - /** - *

Action to take when a suspicious IP throttling threshold is violated. - * Possible values: <code>block</code>, <code>admin_notification</code>.

- */ - @JsonSetter(value = "shields", nulls = Nulls.SKIP) - public Builder shields(Optional> shields) { - this.shields = shields; - return this; - } - - public Builder shields(List shields) { - this.shields = Optional.ofNullable(shields); - return this; - } - - @JsonSetter(value = "allowlist", nulls = Nulls.SKIP) - public Builder allowlist(Optional> allowlist) { - this.allowlist = allowlist; - return this; - } - - public Builder allowlist(List allowlist) { - this.allowlist = Optional.ofNullable(allowlist); - return this; - } - - @JsonSetter(value = "stage", nulls = Nulls.SKIP) - public Builder stage(Optional stage) { - this.stage = stage; - return this; - } - - public Builder stage(SuspiciousIpThrottlingStage stage) { - this.stage = Optional.ofNullable(stage); - return this; - } - - public GetSuspiciousIpThrottlingSettingsResponseContent build() { - return new GetSuspiciousIpThrottlingSettingsResponseContent( - enabled, shields, allowlist, stage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetTenantSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetTenantSettingsResponseContent.java deleted file mode 100644 index 0e7f904d7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetTenantSettingsResponseContent.java +++ /dev/null @@ -1,1454 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetTenantSettingsResponseContent.Builder.class) -public final class GetTenantSettingsResponseContent { - private final OptionalNullable changePassword; - - private final OptionalNullable guardianMfaPage; - - private final Optional defaultAudience; - - private final Optional defaultDirectory; - - private final OptionalNullable errorPage; - - private final OptionalNullable deviceFlow; - - private final OptionalNullable defaultTokenQuota; - - private final Optional flags; - - private final Optional friendlyName; - - private final Optional pictureUrl; - - private final Optional supportEmail; - - private final Optional supportUrl; - - private final Optional> allowedLogoutUrls; - - private final Optional sessionLifetime; - - private final Optional idleSessionLifetime; - - private final Optional ephemeralSessionLifetime; - - private final Optional idleEphemeralSessionLifetime; - - private final Optional sandboxVersion; - - private final Optional legacySandboxVersion; - - private final Optional> sandboxVersionsAvailable; - - private final Optional defaultRedirectionUri; - - private final Optional> enabledLocales; - - private final OptionalNullable sessionCookie; - - private final OptionalNullable sessions; - - private final Optional oidcLogout; - - private final Optional allowOrganizationNameInAuthenticationApi; - - private final Optional customizeMfaInPostloginAction; - - private final Optional> acrValuesSupported; - - private final OptionalNullable mtls; - - private final Optional pushedAuthorizationRequestsSupported; - - private final OptionalNullable authorizationResponseIssParameterSupported; - - private final OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt; - - private final Optional resourceParameterProfile; - - private final Optional phoneConsolidatedExperience; - - private final Optional enableAiGuide; - - private final Map additionalProperties; - - private GetTenantSettingsResponseContent( - OptionalNullable changePassword, - OptionalNullable guardianMfaPage, - Optional defaultAudience, - Optional defaultDirectory, - OptionalNullable errorPage, - OptionalNullable deviceFlow, - OptionalNullable defaultTokenQuota, - Optional flags, - Optional friendlyName, - Optional pictureUrl, - Optional supportEmail, - Optional supportUrl, - Optional> allowedLogoutUrls, - Optional sessionLifetime, - Optional idleSessionLifetime, - Optional ephemeralSessionLifetime, - Optional idleEphemeralSessionLifetime, - Optional sandboxVersion, - Optional legacySandboxVersion, - Optional> sandboxVersionsAvailable, - Optional defaultRedirectionUri, - Optional> enabledLocales, - OptionalNullable sessionCookie, - OptionalNullable sessions, - Optional oidcLogout, - Optional allowOrganizationNameInAuthenticationApi, - Optional customizeMfaInPostloginAction, - Optional> acrValuesSupported, - OptionalNullable mtls, - Optional pushedAuthorizationRequestsSupported, - OptionalNullable authorizationResponseIssParameterSupported, - OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt, - Optional resourceParameterProfile, - Optional phoneConsolidatedExperience, - Optional enableAiGuide, - Map additionalProperties) { - this.changePassword = changePassword; - this.guardianMfaPage = guardianMfaPage; - this.defaultAudience = defaultAudience; - this.defaultDirectory = defaultDirectory; - this.errorPage = errorPage; - this.deviceFlow = deviceFlow; - this.defaultTokenQuota = defaultTokenQuota; - this.flags = flags; - this.friendlyName = friendlyName; - this.pictureUrl = pictureUrl; - this.supportEmail = supportEmail; - this.supportUrl = supportUrl; - this.allowedLogoutUrls = allowedLogoutUrls; - this.sessionLifetime = sessionLifetime; - this.idleSessionLifetime = idleSessionLifetime; - this.ephemeralSessionLifetime = ephemeralSessionLifetime; - this.idleEphemeralSessionLifetime = idleEphemeralSessionLifetime; - this.sandboxVersion = sandboxVersion; - this.legacySandboxVersion = legacySandboxVersion; - this.sandboxVersionsAvailable = sandboxVersionsAvailable; - this.defaultRedirectionUri = defaultRedirectionUri; - this.enabledLocales = enabledLocales; - this.sessionCookie = sessionCookie; - this.sessions = sessions; - this.oidcLogout = oidcLogout; - this.allowOrganizationNameInAuthenticationApi = allowOrganizationNameInAuthenticationApi; - this.customizeMfaInPostloginAction = customizeMfaInPostloginAction; - this.acrValuesSupported = acrValuesSupported; - this.mtls = mtls; - this.pushedAuthorizationRequestsSupported = pushedAuthorizationRequestsSupported; - this.authorizationResponseIssParameterSupported = authorizationResponseIssParameterSupported; - this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; - this.resourceParameterProfile = resourceParameterProfile; - this.phoneConsolidatedExperience = phoneConsolidatedExperience; - this.enableAiGuide = enableAiGuide; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("change_password") - public OptionalNullable getChangePassword() { - if (changePassword == null) { - return OptionalNullable.absent(); - } - return changePassword; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("guardian_mfa_page") - public OptionalNullable getGuardianMfaPage() { - if (guardianMfaPage == null) { - return OptionalNullable.absent(); - } - return guardianMfaPage; - } - - /** - * @return Default audience for API authorization. - */ - @JsonProperty("default_audience") - public Optional getDefaultAudience() { - return defaultAudience; - } - - /** - * @return Name of connection used for password grants at the /tokenendpoint. The following connection types are supported: LDAP, AD, Database Connections, Passwordless, Windows Azure Active Directory, ADFS. - */ - @JsonProperty("default_directory") - public Optional getDefaultDirectory() { - return defaultDirectory; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("error_page") - public OptionalNullable getErrorPage() { - if (errorPage == null) { - return OptionalNullable.absent(); - } - return errorPage; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("device_flow") - public OptionalNullable getDeviceFlow() { - if (deviceFlow == null) { - return OptionalNullable.absent(); - } - return deviceFlow; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("default_token_quota") - public OptionalNullable getDefaultTokenQuota() { - if (defaultTokenQuota == null) { - return OptionalNullable.absent(); - } - return defaultTokenQuota; - } - - @JsonProperty("flags") - public Optional getFlags() { - return flags; - } - - /** - * @return Friendly name for this tenant. - */ - @JsonProperty("friendly_name") - public Optional getFriendlyName() { - return friendlyName; - } - - /** - * @return URL of logo to be shown for this tenant (recommended size: 150x150) - */ - @JsonProperty("picture_url") - public Optional getPictureUrl() { - return pictureUrl; - } - - /** - * @return End-user support email address. - */ - @JsonProperty("support_email") - public Optional getSupportEmail() { - return supportEmail; - } - - /** - * @return End-user support URL. - */ - @JsonProperty("support_url") - public Optional getSupportUrl() { - return supportUrl; - } - - /** - * @return URLs that are valid to redirect to after logout from Auth0. - */ - @JsonProperty("allowed_logout_urls") - public Optional> getAllowedLogoutUrls() { - return allowedLogoutUrls; - } - - /** - * @return Number of hours a session will stay valid. - */ - @JsonProperty("session_lifetime") - public Optional getSessionLifetime() { - return sessionLifetime; - } - - /** - * @return Number of hours for which a session can be inactive before the user must log in again. - */ - @JsonProperty("idle_session_lifetime") - public Optional getIdleSessionLifetime() { - return idleSessionLifetime; - } - - /** - * @return Number of hours an ephemeral (non-persistent) session will stay valid. - */ - @JsonProperty("ephemeral_session_lifetime") - public Optional getEphemeralSessionLifetime() { - return ephemeralSessionLifetime; - } - - /** - * @return Number of hours for which an ephemeral (non-persistent) session can be inactive before the user must log in again. - */ - @JsonProperty("idle_ephemeral_session_lifetime") - public Optional getIdleEphemeralSessionLifetime() { - return idleEphemeralSessionLifetime; - } - - /** - * @return Selected sandbox version for the extensibility environment. - */ - @JsonProperty("sandbox_version") - public Optional getSandboxVersion() { - return sandboxVersion; - } - - /** - * @return Selected sandbox version for rules and hooks extensibility. - */ - @JsonProperty("legacy_sandbox_version") - public Optional getLegacySandboxVersion() { - return legacySandboxVersion; - } - - /** - * @return Available sandbox versions for the extensibility environment. - */ - @JsonProperty("sandbox_versions_available") - public Optional> getSandboxVersionsAvailable() { - return sandboxVersionsAvailable; - } - - /** - * @return The default absolute redirection uri, must be https - */ - @JsonProperty("default_redirection_uri") - public Optional getDefaultRedirectionUri() { - return defaultRedirectionUri; - } - - /** - * @return Supported locales for the user interface. - */ - @JsonProperty("enabled_locales") - public Optional> getEnabledLocales() { - return enabledLocales; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_cookie") - public OptionalNullable getSessionCookie() { - if (sessionCookie == null) { - return OptionalNullable.absent(); - } - return sessionCookie; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sessions") - public OptionalNullable getSessions() { - if (sessions == null) { - return OptionalNullable.absent(); - } - return sessions; - } - - @JsonProperty("oidc_logout") - public Optional getOidcLogout() { - return oidcLogout; - } - - /** - * @return Whether to accept an organization name instead of an ID on auth endpoints - */ - @JsonProperty("allow_organization_name_in_authentication_api") - public Optional getAllowOrganizationNameInAuthenticationApi() { - return allowOrganizationNameInAuthenticationApi; - } - - /** - * @return Whether to enable flexible factors for MFA in the PostLogin action - */ - @JsonProperty("customize_mfa_in_postlogin_action") - public Optional getCustomizeMfaInPostloginAction() { - return customizeMfaInPostloginAction; - } - - /** - * @return Supported ACR values - */ - @JsonProperty("acr_values_supported") - public Optional> getAcrValuesSupported() { - return acrValuesSupported; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("mtls") - public OptionalNullable getMtls() { - if (mtls == null) { - return OptionalNullable.absent(); - } - return mtls; - } - - /** - * @return Enables the use of Pushed Authorization Requests - */ - @JsonProperty("pushed_authorization_requests_supported") - public Optional getPushedAuthorizationRequestsSupported() { - return pushedAuthorizationRequestsSupported; - } - - /** - * @return Supports iss parameter in authorization responses - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("authorization_response_iss_parameter_supported") - public OptionalNullable getAuthorizationResponseIssParameterSupported() { - if (authorizationResponseIssParameterSupported == null) { - return OptionalNullable.absent(); - } - return authorizationResponseIssParameterSupported; - } - - /** - * @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. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("skip_non_verifiable_callback_uri_confirmation_prompt") - public OptionalNullable getSkipNonVerifiableCallbackUriConfirmationPrompt() { - if (skipNonVerifiableCallbackUriConfirmationPrompt == null) { - return OptionalNullable.absent(); - } - return skipNonVerifiableCallbackUriConfirmationPrompt; - } - - @JsonProperty("resource_parameter_profile") - public Optional getResourceParameterProfile() { - return resourceParameterProfile; - } - - /** - * @return Whether Phone Consolidated Experience is enabled for this tenant. - */ - @JsonProperty("phone_consolidated_experience") - public Optional getPhoneConsolidatedExperience() { - return phoneConsolidatedExperience; - } - - /** - * @return Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant. - */ - @JsonProperty("enable_ai_guide") - public Optional getEnableAiGuide() { - return enableAiGuide; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("change_password") - private OptionalNullable _getChangePassword() { - return changePassword; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("guardian_mfa_page") - private OptionalNullable _getGuardianMfaPage() { - return guardianMfaPage; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("error_page") - private OptionalNullable _getErrorPage() { - return errorPage; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("device_flow") - private OptionalNullable _getDeviceFlow() { - return deviceFlow; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("default_token_quota") - private OptionalNullable _getDefaultTokenQuota() { - return defaultTokenQuota; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_cookie") - private OptionalNullable _getSessionCookie() { - return sessionCookie; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sessions") - private OptionalNullable _getSessions() { - return sessions; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("mtls") - private OptionalNullable _getMtls() { - return mtls; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("authorization_response_iss_parameter_supported") - private OptionalNullable _getAuthorizationResponseIssParameterSupported() { - return authorizationResponseIssParameterSupported; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("skip_non_verifiable_callback_uri_confirmation_prompt") - private OptionalNullable _getSkipNonVerifiableCallbackUriConfirmationPrompt() { - return skipNonVerifiableCallbackUriConfirmationPrompt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetTenantSettingsResponseContent && equalTo((GetTenantSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetTenantSettingsResponseContent other) { - return changePassword.equals(other.changePassword) - && guardianMfaPage.equals(other.guardianMfaPage) - && defaultAudience.equals(other.defaultAudience) - && defaultDirectory.equals(other.defaultDirectory) - && errorPage.equals(other.errorPage) - && deviceFlow.equals(other.deviceFlow) - && defaultTokenQuota.equals(other.defaultTokenQuota) - && flags.equals(other.flags) - && friendlyName.equals(other.friendlyName) - && pictureUrl.equals(other.pictureUrl) - && supportEmail.equals(other.supportEmail) - && supportUrl.equals(other.supportUrl) - && allowedLogoutUrls.equals(other.allowedLogoutUrls) - && sessionLifetime.equals(other.sessionLifetime) - && idleSessionLifetime.equals(other.idleSessionLifetime) - && ephemeralSessionLifetime.equals(other.ephemeralSessionLifetime) - && idleEphemeralSessionLifetime.equals(other.idleEphemeralSessionLifetime) - && sandboxVersion.equals(other.sandboxVersion) - && legacySandboxVersion.equals(other.legacySandboxVersion) - && sandboxVersionsAvailable.equals(other.sandboxVersionsAvailable) - && defaultRedirectionUri.equals(other.defaultRedirectionUri) - && enabledLocales.equals(other.enabledLocales) - && sessionCookie.equals(other.sessionCookie) - && sessions.equals(other.sessions) - && oidcLogout.equals(other.oidcLogout) - && allowOrganizationNameInAuthenticationApi.equals(other.allowOrganizationNameInAuthenticationApi) - && customizeMfaInPostloginAction.equals(other.customizeMfaInPostloginAction) - && acrValuesSupported.equals(other.acrValuesSupported) - && mtls.equals(other.mtls) - && pushedAuthorizationRequestsSupported.equals(other.pushedAuthorizationRequestsSupported) - && authorizationResponseIssParameterSupported.equals(other.authorizationResponseIssParameterSupported) - && skipNonVerifiableCallbackUriConfirmationPrompt.equals( - other.skipNonVerifiableCallbackUriConfirmationPrompt) - && resourceParameterProfile.equals(other.resourceParameterProfile) - && phoneConsolidatedExperience.equals(other.phoneConsolidatedExperience) - && enableAiGuide.equals(other.enableAiGuide); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.changePassword, - this.guardianMfaPage, - this.defaultAudience, - this.defaultDirectory, - this.errorPage, - this.deviceFlow, - this.defaultTokenQuota, - this.flags, - this.friendlyName, - this.pictureUrl, - this.supportEmail, - this.supportUrl, - this.allowedLogoutUrls, - this.sessionLifetime, - this.idleSessionLifetime, - this.ephemeralSessionLifetime, - this.idleEphemeralSessionLifetime, - this.sandboxVersion, - this.legacySandboxVersion, - this.sandboxVersionsAvailable, - this.defaultRedirectionUri, - this.enabledLocales, - this.sessionCookie, - this.sessions, - this.oidcLogout, - this.allowOrganizationNameInAuthenticationApi, - this.customizeMfaInPostloginAction, - this.acrValuesSupported, - this.mtls, - this.pushedAuthorizationRequestsSupported, - this.authorizationResponseIssParameterSupported, - this.skipNonVerifiableCallbackUriConfirmationPrompt, - this.resourceParameterProfile, - this.phoneConsolidatedExperience, - this.enableAiGuide); - } - - @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 changePassword = OptionalNullable.absent(); - - private OptionalNullable guardianMfaPage = OptionalNullable.absent(); - - private Optional defaultAudience = Optional.empty(); - - private Optional defaultDirectory = Optional.empty(); - - private OptionalNullable errorPage = OptionalNullable.absent(); - - private OptionalNullable deviceFlow = OptionalNullable.absent(); - - private OptionalNullable defaultTokenQuota = OptionalNullable.absent(); - - private Optional flags = Optional.empty(); - - private Optional friendlyName = Optional.empty(); - - private Optional pictureUrl = Optional.empty(); - - private Optional supportEmail = Optional.empty(); - - private Optional supportUrl = Optional.empty(); - - private Optional> allowedLogoutUrls = Optional.empty(); - - private Optional sessionLifetime = Optional.empty(); - - private Optional idleSessionLifetime = Optional.empty(); - - private Optional ephemeralSessionLifetime = Optional.empty(); - - private Optional idleEphemeralSessionLifetime = Optional.empty(); - - private Optional sandboxVersion = Optional.empty(); - - private Optional legacySandboxVersion = Optional.empty(); - - private Optional> sandboxVersionsAvailable = Optional.empty(); - - private Optional defaultRedirectionUri = Optional.empty(); - - private Optional> enabledLocales = Optional.empty(); - - private OptionalNullable sessionCookie = OptionalNullable.absent(); - - private OptionalNullable sessions = OptionalNullable.absent(); - - private Optional oidcLogout = Optional.empty(); - - private Optional allowOrganizationNameInAuthenticationApi = Optional.empty(); - - private Optional customizeMfaInPostloginAction = Optional.empty(); - - private Optional> acrValuesSupported = Optional.empty(); - - private OptionalNullable mtls = OptionalNullable.absent(); - - private Optional pushedAuthorizationRequestsSupported = Optional.empty(); - - private OptionalNullable authorizationResponseIssParameterSupported = OptionalNullable.absent(); - - private OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.absent(); - - private Optional resourceParameterProfile = Optional.empty(); - - private Optional phoneConsolidatedExperience = Optional.empty(); - - private Optional enableAiGuide = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetTenantSettingsResponseContent other) { - changePassword(other.getChangePassword()); - guardianMfaPage(other.getGuardianMfaPage()); - defaultAudience(other.getDefaultAudience()); - defaultDirectory(other.getDefaultDirectory()); - errorPage(other.getErrorPage()); - deviceFlow(other.getDeviceFlow()); - defaultTokenQuota(other.getDefaultTokenQuota()); - flags(other.getFlags()); - friendlyName(other.getFriendlyName()); - pictureUrl(other.getPictureUrl()); - supportEmail(other.getSupportEmail()); - supportUrl(other.getSupportUrl()); - allowedLogoutUrls(other.getAllowedLogoutUrls()); - sessionLifetime(other.getSessionLifetime()); - idleSessionLifetime(other.getIdleSessionLifetime()); - ephemeralSessionLifetime(other.getEphemeralSessionLifetime()); - idleEphemeralSessionLifetime(other.getIdleEphemeralSessionLifetime()); - sandboxVersion(other.getSandboxVersion()); - legacySandboxVersion(other.getLegacySandboxVersion()); - sandboxVersionsAvailable(other.getSandboxVersionsAvailable()); - defaultRedirectionUri(other.getDefaultRedirectionUri()); - enabledLocales(other.getEnabledLocales()); - sessionCookie(other.getSessionCookie()); - sessions(other.getSessions()); - oidcLogout(other.getOidcLogout()); - allowOrganizationNameInAuthenticationApi(other.getAllowOrganizationNameInAuthenticationApi()); - customizeMfaInPostloginAction(other.getCustomizeMfaInPostloginAction()); - acrValuesSupported(other.getAcrValuesSupported()); - mtls(other.getMtls()); - pushedAuthorizationRequestsSupported(other.getPushedAuthorizationRequestsSupported()); - authorizationResponseIssParameterSupported(other.getAuthorizationResponseIssParameterSupported()); - skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); - resourceParameterProfile(other.getResourceParameterProfile()); - phoneConsolidatedExperience(other.getPhoneConsolidatedExperience()); - enableAiGuide(other.getEnableAiGuide()); - return this; - } - - @JsonSetter(value = "change_password", nulls = Nulls.SKIP) - public Builder changePassword(@Nullable OptionalNullable changePassword) { - this.changePassword = changePassword; - return this; - } - - public Builder changePassword(TenantSettingsPasswordPage changePassword) { - this.changePassword = OptionalNullable.of(changePassword); - return this; - } - - public Builder changePassword(Optional changePassword) { - if (changePassword.isPresent()) { - this.changePassword = OptionalNullable.of(changePassword.get()); - } else { - this.changePassword = OptionalNullable.absent(); - } - return this; - } - - public Builder changePassword(com.auth0.client.mgmt.core.Nullable changePassword) { - if (changePassword.isNull()) { - this.changePassword = OptionalNullable.ofNull(); - } else if (changePassword.isEmpty()) { - this.changePassword = OptionalNullable.absent(); - } else { - this.changePassword = OptionalNullable.of(changePassword.get()); - } - return this; - } - - @JsonSetter(value = "guardian_mfa_page", nulls = Nulls.SKIP) - public Builder guardianMfaPage(@Nullable OptionalNullable guardianMfaPage) { - this.guardianMfaPage = guardianMfaPage; - return this; - } - - public Builder guardianMfaPage(TenantSettingsGuardianPage guardianMfaPage) { - this.guardianMfaPage = OptionalNullable.of(guardianMfaPage); - return this; - } - - public Builder guardianMfaPage(Optional guardianMfaPage) { - if (guardianMfaPage.isPresent()) { - this.guardianMfaPage = OptionalNullable.of(guardianMfaPage.get()); - } else { - this.guardianMfaPage = OptionalNullable.absent(); - } - return this; - } - - public Builder guardianMfaPage( - com.auth0.client.mgmt.core.Nullable guardianMfaPage) { - if (guardianMfaPage.isNull()) { - this.guardianMfaPage = OptionalNullable.ofNull(); - } else if (guardianMfaPage.isEmpty()) { - this.guardianMfaPage = OptionalNullable.absent(); - } else { - this.guardianMfaPage = OptionalNullable.of(guardianMfaPage.get()); - } - return this; - } - - /** - *

Default audience for API authorization.

- */ - @JsonSetter(value = "default_audience", nulls = Nulls.SKIP) - public Builder defaultAudience(Optional defaultAudience) { - this.defaultAudience = defaultAudience; - return this; - } - - public Builder defaultAudience(String defaultAudience) { - this.defaultAudience = Optional.ofNullable(defaultAudience); - return this; - } - - /** - *

Name of connection used for password grants at the /tokenendpoint. The following connection types are supported: LDAP, AD, Database Connections, Passwordless, Windows Azure Active Directory, ADFS.

- */ - @JsonSetter(value = "default_directory", nulls = Nulls.SKIP) - public Builder defaultDirectory(Optional defaultDirectory) { - this.defaultDirectory = defaultDirectory; - return this; - } - - public Builder defaultDirectory(String defaultDirectory) { - this.defaultDirectory = Optional.ofNullable(defaultDirectory); - return this; - } - - @JsonSetter(value = "error_page", nulls = Nulls.SKIP) - public Builder errorPage(@Nullable OptionalNullable errorPage) { - this.errorPage = errorPage; - return this; - } - - public Builder errorPage(TenantSettingsErrorPage errorPage) { - this.errorPage = OptionalNullable.of(errorPage); - return this; - } - - public Builder errorPage(Optional errorPage) { - if (errorPage.isPresent()) { - this.errorPage = OptionalNullable.of(errorPage.get()); - } else { - this.errorPage = OptionalNullable.absent(); - } - return this; - } - - public Builder errorPage(com.auth0.client.mgmt.core.Nullable errorPage) { - if (errorPage.isNull()) { - this.errorPage = OptionalNullable.ofNull(); - } else if (errorPage.isEmpty()) { - this.errorPage = OptionalNullable.absent(); - } else { - this.errorPage = OptionalNullable.of(errorPage.get()); - } - return this; - } - - @JsonSetter(value = "device_flow", nulls = Nulls.SKIP) - public Builder deviceFlow(@Nullable OptionalNullable deviceFlow) { - this.deviceFlow = deviceFlow; - return this; - } - - public Builder deviceFlow(TenantSettingsDeviceFlow deviceFlow) { - this.deviceFlow = OptionalNullable.of(deviceFlow); - return this; - } - - public Builder deviceFlow(Optional deviceFlow) { - if (deviceFlow.isPresent()) { - this.deviceFlow = OptionalNullable.of(deviceFlow.get()); - } else { - this.deviceFlow = OptionalNullable.absent(); - } - return this; - } - - public Builder deviceFlow(com.auth0.client.mgmt.core.Nullable deviceFlow) { - if (deviceFlow.isNull()) { - this.deviceFlow = OptionalNullable.ofNull(); - } else if (deviceFlow.isEmpty()) { - this.deviceFlow = OptionalNullable.absent(); - } else { - this.deviceFlow = OptionalNullable.of(deviceFlow.get()); - } - return this; - } - - @JsonSetter(value = "default_token_quota", nulls = Nulls.SKIP) - public Builder defaultTokenQuota(@Nullable OptionalNullable defaultTokenQuota) { - this.defaultTokenQuota = defaultTokenQuota; - return this; - } - - public Builder defaultTokenQuota(DefaultTokenQuota defaultTokenQuota) { - this.defaultTokenQuota = OptionalNullable.of(defaultTokenQuota); - return this; - } - - public Builder defaultTokenQuota(Optional defaultTokenQuota) { - if (defaultTokenQuota.isPresent()) { - this.defaultTokenQuota = OptionalNullable.of(defaultTokenQuota.get()); - } else { - this.defaultTokenQuota = OptionalNullable.absent(); - } - return this; - } - - public Builder defaultTokenQuota(com.auth0.client.mgmt.core.Nullable defaultTokenQuota) { - if (defaultTokenQuota.isNull()) { - this.defaultTokenQuota = OptionalNullable.ofNull(); - } else if (defaultTokenQuota.isEmpty()) { - this.defaultTokenQuota = OptionalNullable.absent(); - } else { - this.defaultTokenQuota = OptionalNullable.of(defaultTokenQuota.get()); - } - return this; - } - - @JsonSetter(value = "flags", nulls = Nulls.SKIP) - public Builder flags(Optional flags) { - this.flags = flags; - return this; - } - - public Builder flags(TenantSettingsFlags flags) { - this.flags = Optional.ofNullable(flags); - return this; - } - - /** - *

Friendly name for this tenant.

- */ - @JsonSetter(value = "friendly_name", nulls = Nulls.SKIP) - public Builder friendlyName(Optional friendlyName) { - this.friendlyName = friendlyName; - return this; - } - - public Builder friendlyName(String friendlyName) { - this.friendlyName = Optional.ofNullable(friendlyName); - return this; - } - - /** - *

URL of logo to be shown for this tenant (recommended size: 150x150)

- */ - @JsonSetter(value = "picture_url", nulls = Nulls.SKIP) - public Builder pictureUrl(Optional pictureUrl) { - this.pictureUrl = pictureUrl; - return this; - } - - public Builder pictureUrl(String pictureUrl) { - this.pictureUrl = Optional.ofNullable(pictureUrl); - return this; - } - - /** - *

End-user support email address.

- */ - @JsonSetter(value = "support_email", nulls = Nulls.SKIP) - public Builder supportEmail(Optional supportEmail) { - this.supportEmail = supportEmail; - return this; - } - - public Builder supportEmail(String supportEmail) { - this.supportEmail = Optional.ofNullable(supportEmail); - return this; - } - - /** - *

End-user support URL.

- */ - @JsonSetter(value = "support_url", nulls = Nulls.SKIP) - public Builder supportUrl(Optional supportUrl) { - this.supportUrl = supportUrl; - return this; - } - - public Builder supportUrl(String supportUrl) { - this.supportUrl = Optional.ofNullable(supportUrl); - return this; - } - - /** - *

URLs that are valid to redirect to after logout from Auth0.

- */ - @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; - } - - /** - *

Number of hours a session will stay valid.

- */ - @JsonSetter(value = "session_lifetime", nulls = Nulls.SKIP) - public Builder sessionLifetime(Optional sessionLifetime) { - this.sessionLifetime = sessionLifetime; - return this; - } - - public Builder sessionLifetime(Double sessionLifetime) { - this.sessionLifetime = Optional.ofNullable(sessionLifetime); - return this; - } - - /** - *

Number of hours for which a session can be inactive before the user must log in again.

- */ - @JsonSetter(value = "idle_session_lifetime", nulls = Nulls.SKIP) - public Builder idleSessionLifetime(Optional idleSessionLifetime) { - this.idleSessionLifetime = idleSessionLifetime; - return this; - } - - public Builder idleSessionLifetime(Double idleSessionLifetime) { - this.idleSessionLifetime = Optional.ofNullable(idleSessionLifetime); - return this; - } - - /** - *

Number of hours an ephemeral (non-persistent) session will stay valid.

- */ - @JsonSetter(value = "ephemeral_session_lifetime", nulls = Nulls.SKIP) - public Builder ephemeralSessionLifetime(Optional ephemeralSessionLifetime) { - this.ephemeralSessionLifetime = ephemeralSessionLifetime; - return this; - } - - public Builder ephemeralSessionLifetime(Double ephemeralSessionLifetime) { - this.ephemeralSessionLifetime = Optional.ofNullable(ephemeralSessionLifetime); - return this; - } - - /** - *

Number of hours for which an ephemeral (non-persistent) session can be inactive before the user must log in again.

- */ - @JsonSetter(value = "idle_ephemeral_session_lifetime", nulls = Nulls.SKIP) - public Builder idleEphemeralSessionLifetime(Optional idleEphemeralSessionLifetime) { - this.idleEphemeralSessionLifetime = idleEphemeralSessionLifetime; - return this; - } - - public Builder idleEphemeralSessionLifetime(Double idleEphemeralSessionLifetime) { - this.idleEphemeralSessionLifetime = Optional.ofNullable(idleEphemeralSessionLifetime); - return this; - } - - /** - *

Selected sandbox version for the extensibility environment.

- */ - @JsonSetter(value = "sandbox_version", nulls = Nulls.SKIP) - public Builder sandboxVersion(Optional sandboxVersion) { - this.sandboxVersion = sandboxVersion; - return this; - } - - public Builder sandboxVersion(String sandboxVersion) { - this.sandboxVersion = Optional.ofNullable(sandboxVersion); - return this; - } - - /** - *

Selected sandbox version for rules and hooks extensibility.

- */ - @JsonSetter(value = "legacy_sandbox_version", nulls = Nulls.SKIP) - public Builder legacySandboxVersion(Optional legacySandboxVersion) { - this.legacySandboxVersion = legacySandboxVersion; - return this; - } - - public Builder legacySandboxVersion(String legacySandboxVersion) { - this.legacySandboxVersion = Optional.ofNullable(legacySandboxVersion); - return this; - } - - /** - *

Available sandbox versions for the extensibility environment.

- */ - @JsonSetter(value = "sandbox_versions_available", nulls = Nulls.SKIP) - public Builder sandboxVersionsAvailable(Optional> sandboxVersionsAvailable) { - this.sandboxVersionsAvailable = sandboxVersionsAvailable; - return this; - } - - public Builder sandboxVersionsAvailable(List sandboxVersionsAvailable) { - this.sandboxVersionsAvailable = Optional.ofNullable(sandboxVersionsAvailable); - return this; - } - - /** - *

The default absolute redirection uri, must be https

- */ - @JsonSetter(value = "default_redirection_uri", nulls = Nulls.SKIP) - public Builder defaultRedirectionUri(Optional defaultRedirectionUri) { - this.defaultRedirectionUri = defaultRedirectionUri; - return this; - } - - public Builder defaultRedirectionUri(String defaultRedirectionUri) { - this.defaultRedirectionUri = Optional.ofNullable(defaultRedirectionUri); - return this; - } - - /** - *

Supported locales for the user interface.

- */ - @JsonSetter(value = "enabled_locales", nulls = Nulls.SKIP) - public Builder enabledLocales(Optional> enabledLocales) { - this.enabledLocales = enabledLocales; - return this; - } - - public Builder enabledLocales(List enabledLocales) { - this.enabledLocales = Optional.ofNullable(enabledLocales); - return this; - } - - @JsonSetter(value = "session_cookie", nulls = Nulls.SKIP) - public Builder sessionCookie(@Nullable OptionalNullable sessionCookie) { - this.sessionCookie = sessionCookie; - return this; - } - - public Builder sessionCookie(SessionCookieSchema sessionCookie) { - this.sessionCookie = OptionalNullable.of(sessionCookie); - return this; - } - - public Builder sessionCookie(Optional sessionCookie) { - if (sessionCookie.isPresent()) { - this.sessionCookie = OptionalNullable.of(sessionCookie.get()); - } else { - this.sessionCookie = OptionalNullable.absent(); - } - return this; - } - - public Builder sessionCookie(com.auth0.client.mgmt.core.Nullable sessionCookie) { - if (sessionCookie.isNull()) { - this.sessionCookie = OptionalNullable.ofNull(); - } else if (sessionCookie.isEmpty()) { - this.sessionCookie = OptionalNullable.absent(); - } else { - this.sessionCookie = OptionalNullable.of(sessionCookie.get()); - } - return this; - } - - @JsonSetter(value = "sessions", nulls = Nulls.SKIP) - public Builder sessions(@Nullable OptionalNullable sessions) { - this.sessions = sessions; - return this; - } - - public Builder sessions(TenantSettingsSessions sessions) { - this.sessions = OptionalNullable.of(sessions); - return this; - } - - public Builder sessions(Optional sessions) { - if (sessions.isPresent()) { - this.sessions = OptionalNullable.of(sessions.get()); - } else { - this.sessions = OptionalNullable.absent(); - } - return this; - } - - public Builder sessions(com.auth0.client.mgmt.core.Nullable sessions) { - if (sessions.isNull()) { - this.sessions = OptionalNullable.ofNull(); - } else if (sessions.isEmpty()) { - this.sessions = OptionalNullable.absent(); - } else { - this.sessions = OptionalNullable.of(sessions.get()); - } - return this; - } - - @JsonSetter(value = "oidc_logout", nulls = Nulls.SKIP) - public Builder oidcLogout(Optional oidcLogout) { - this.oidcLogout = oidcLogout; - return this; - } - - public Builder oidcLogout(TenantOidcLogoutSettings oidcLogout) { - this.oidcLogout = Optional.ofNullable(oidcLogout); - return this; - } - - /** - *

Whether to accept an organization name instead of an ID on auth endpoints

- */ - @JsonSetter(value = "allow_organization_name_in_authentication_api", nulls = Nulls.SKIP) - public Builder allowOrganizationNameInAuthenticationApi( - Optional allowOrganizationNameInAuthenticationApi) { - this.allowOrganizationNameInAuthenticationApi = allowOrganizationNameInAuthenticationApi; - return this; - } - - public Builder allowOrganizationNameInAuthenticationApi(Boolean allowOrganizationNameInAuthenticationApi) { - this.allowOrganizationNameInAuthenticationApi = - Optional.ofNullable(allowOrganizationNameInAuthenticationApi); - return this; - } - - /** - *

Whether to enable flexible factors for MFA in the PostLogin action

- */ - @JsonSetter(value = "customize_mfa_in_postlogin_action", nulls = Nulls.SKIP) - public Builder customizeMfaInPostloginAction(Optional customizeMfaInPostloginAction) { - this.customizeMfaInPostloginAction = customizeMfaInPostloginAction; - return this; - } - - public Builder customizeMfaInPostloginAction(Boolean customizeMfaInPostloginAction) { - this.customizeMfaInPostloginAction = Optional.ofNullable(customizeMfaInPostloginAction); - return this; - } - - /** - *

Supported ACR values

- */ - @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; - } - - @JsonSetter(value = "mtls", nulls = Nulls.SKIP) - public Builder mtls(@Nullable OptionalNullable mtls) { - this.mtls = mtls; - return this; - } - - public Builder mtls(TenantSettingsMtls mtls) { - this.mtls = OptionalNullable.of(mtls); - return this; - } - - public Builder mtls(Optional mtls) { - if (mtls.isPresent()) { - this.mtls = OptionalNullable.of(mtls.get()); - } else { - this.mtls = OptionalNullable.absent(); - } - return this; - } - - public Builder mtls(com.auth0.client.mgmt.core.Nullable mtls) { - if (mtls.isNull()) { - this.mtls = OptionalNullable.ofNull(); - } else if (mtls.isEmpty()) { - this.mtls = OptionalNullable.absent(); - } else { - this.mtls = OptionalNullable.of(mtls.get()); - } - return this; - } - - /** - *

Enables the use of Pushed Authorization Requests

- */ - @JsonSetter(value = "pushed_authorization_requests_supported", nulls = Nulls.SKIP) - public Builder pushedAuthorizationRequestsSupported(Optional pushedAuthorizationRequestsSupported) { - this.pushedAuthorizationRequestsSupported = pushedAuthorizationRequestsSupported; - return this; - } - - public Builder pushedAuthorizationRequestsSupported(Boolean pushedAuthorizationRequestsSupported) { - this.pushedAuthorizationRequestsSupported = Optional.ofNullable(pushedAuthorizationRequestsSupported); - return this; - } - - /** - *

Supports iss parameter in authorization responses

- */ - @JsonSetter(value = "authorization_response_iss_parameter_supported", nulls = Nulls.SKIP) - public Builder authorizationResponseIssParameterSupported( - @Nullable OptionalNullable authorizationResponseIssParameterSupported) { - this.authorizationResponseIssParameterSupported = authorizationResponseIssParameterSupported; - return this; - } - - public Builder authorizationResponseIssParameterSupported(Boolean authorizationResponseIssParameterSupported) { - this.authorizationResponseIssParameterSupported = - OptionalNullable.of(authorizationResponseIssParameterSupported); - return this; - } - - public Builder authorizationResponseIssParameterSupported( - Optional authorizationResponseIssParameterSupported) { - if (authorizationResponseIssParameterSupported.isPresent()) { - this.authorizationResponseIssParameterSupported = - OptionalNullable.of(authorizationResponseIssParameterSupported.get()); - } else { - this.authorizationResponseIssParameterSupported = OptionalNullable.absent(); - } - return this; - } - - public Builder authorizationResponseIssParameterSupported( - com.auth0.client.mgmt.core.Nullable authorizationResponseIssParameterSupported) { - if (authorizationResponseIssParameterSupported.isNull()) { - this.authorizationResponseIssParameterSupported = OptionalNullable.ofNull(); - } else if (authorizationResponseIssParameterSupported.isEmpty()) { - this.authorizationResponseIssParameterSupported = OptionalNullable.absent(); - } else { - this.authorizationResponseIssParameterSupported = - OptionalNullable.of(authorizationResponseIssParameterSupported.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( - @Nullable OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; - return this; - } - - public Builder skipNonVerifiableCallbackUriConfirmationPrompt( - Boolean skipNonVerifiableCallbackUriConfirmationPrompt) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = - OptionalNullable.of(skipNonVerifiableCallbackUriConfirmationPrompt); - return this; - } - - public Builder skipNonVerifiableCallbackUriConfirmationPrompt( - Optional skipNonVerifiableCallbackUriConfirmationPrompt) { - if (skipNonVerifiableCallbackUriConfirmationPrompt.isPresent()) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = - OptionalNullable.of(skipNonVerifiableCallbackUriConfirmationPrompt.get()); - } else { - this.skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.absent(); - } - return this; - } - - public Builder skipNonVerifiableCallbackUriConfirmationPrompt( - com.auth0.client.mgmt.core.Nullable skipNonVerifiableCallbackUriConfirmationPrompt) { - if (skipNonVerifiableCallbackUriConfirmationPrompt.isNull()) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.ofNull(); - } else if (skipNonVerifiableCallbackUriConfirmationPrompt.isEmpty()) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.absent(); - } else { - this.skipNonVerifiableCallbackUriConfirmationPrompt = - OptionalNullable.of(skipNonVerifiableCallbackUriConfirmationPrompt.get()); - } - return this; - } - - @JsonSetter(value = "resource_parameter_profile", nulls = Nulls.SKIP) - public Builder resourceParameterProfile( - Optional resourceParameterProfile) { - this.resourceParameterProfile = resourceParameterProfile; - return this; - } - - public Builder resourceParameterProfile(TenantSettingsResourceParameterProfile resourceParameterProfile) { - this.resourceParameterProfile = Optional.ofNullable(resourceParameterProfile); - return this; - } - - /** - *

Whether Phone Consolidated Experience is enabled for this tenant.

- */ - @JsonSetter(value = "phone_consolidated_experience", nulls = Nulls.SKIP) - public Builder phoneConsolidatedExperience(Optional phoneConsolidatedExperience) { - this.phoneConsolidatedExperience = phoneConsolidatedExperience; - return this; - } - - public Builder phoneConsolidatedExperience(Boolean phoneConsolidatedExperience) { - this.phoneConsolidatedExperience = Optional.ofNullable(phoneConsolidatedExperience); - return this; - } - - /** - *

Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant.

- */ - @JsonSetter(value = "enable_ai_guide", nulls = Nulls.SKIP) - public Builder enableAiGuide(Optional enableAiGuide) { - this.enableAiGuide = enableAiGuide; - return this; - } - - public Builder enableAiGuide(Boolean enableAiGuide) { - this.enableAiGuide = Optional.ofNullable(enableAiGuide); - return this; - } - - public GetTenantSettingsResponseContent build() { - return new GetTenantSettingsResponseContent( - changePassword, - guardianMfaPage, - defaultAudience, - defaultDirectory, - errorPage, - deviceFlow, - defaultTokenQuota, - flags, - friendlyName, - pictureUrl, - supportEmail, - supportUrl, - allowedLogoutUrls, - sessionLifetime, - idleSessionLifetime, - ephemeralSessionLifetime, - idleEphemeralSessionLifetime, - sandboxVersion, - legacySandboxVersion, - sandboxVersionsAvailable, - defaultRedirectionUri, - enabledLocales, - sessionCookie, - sessions, - oidcLogout, - allowOrganizationNameInAuthenticationApi, - customizeMfaInPostloginAction, - acrValuesSupported, - mtls, - pushedAuthorizationRequestsSupported, - authorizationResponseIssParameterSupported, - skipNonVerifiableCallbackUriConfirmationPrompt, - resourceParameterProfile, - phoneConsolidatedExperience, - enableAiGuide, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetTokenExchangeProfileResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetTokenExchangeProfileResponseContent.java deleted file mode 100644 index 7ffc478d4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetTokenExchangeProfileResponseContent.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetTokenExchangeProfileResponseContent.Builder.class) -public final class GetTokenExchangeProfileResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional subjectTokenType; - - private final Optional actionId; - - private final Optional type; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private GetTokenExchangeProfileResponseContent( - Optional id, - Optional name, - Optional subjectTokenType, - Optional actionId, - Optional type, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.subjectTokenType = subjectTokenType; - this.actionId = actionId; - this.type = type; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the token exchange profile. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Friendly name of this profile. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return 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. - */ - @JsonProperty("subject_token_type") - public Optional getSubjectTokenType() { - return subjectTokenType; - } - - /** - * @return 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. - */ - @JsonProperty("action_id") - public Optional getActionId() { - return actionId; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return The time when this profile was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when this profile was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetTokenExchangeProfileResponseContent - && equalTo((GetTokenExchangeProfileResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetTokenExchangeProfileResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && subjectTokenType.equals(other.subjectTokenType) - && actionId.equals(other.actionId) - && type.equals(other.type) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.name, this.subjectTokenType, this.actionId, this.type, this.createdAt, this.updatedAt); - } - - @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 subjectTokenType = Optional.empty(); - - private Optional actionId = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetTokenExchangeProfileResponseContent other) { - id(other.getId()); - name(other.getName()); - subjectTokenType(other.getSubjectTokenType()); - actionId(other.getActionId()); - type(other.getType()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

The unique ID of the token exchange profile.

- */ - @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 of this profile.

- */ - @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; - } - - /** - *

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.

- */ - @JsonSetter(value = "subject_token_type", nulls = Nulls.SKIP) - public Builder subjectTokenType(Optional subjectTokenType) { - this.subjectTokenType = subjectTokenType; - return this; - } - - public Builder subjectTokenType(String subjectTokenType) { - this.subjectTokenType = Optional.ofNullable(subjectTokenType); - return this; - } - - /** - *

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.

- */ - @JsonSetter(value = "action_id", nulls = Nulls.SKIP) - public Builder actionId(Optional actionId) { - this.actionId = actionId; - return this; - } - - public Builder actionId(String actionId) { - this.actionId = Optional.ofNullable(actionId); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(TokenExchangeProfileTypeEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

The time when this profile 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 time when this profile was 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; - } - - public GetTokenExchangeProfileResponseContent build() { - return new GetTokenExchangeProfileResponseContent( - id, name, subjectTokenType, actionId, type, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetUniversalLoginTemplate.java b/src/main/java/com/auth0/client/mgmt/types/GetUniversalLoginTemplate.java deleted file mode 100644 index 1af8321d2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetUniversalLoginTemplate.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetUniversalLoginTemplate.Builder.class) -public final class GetUniversalLoginTemplate { - private final Optional body; - - private final Map additionalProperties; - - private GetUniversalLoginTemplate(Optional body, Map additionalProperties) { - this.body = body; - this.additionalProperties = additionalProperties; - } - - /** - * @return The custom page template for the New Universal Login Experience - */ - @JsonProperty("body") - public Optional getBody() { - return body; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetUniversalLoginTemplate && equalTo((GetUniversalLoginTemplate) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetUniversalLoginTemplate other) { - return body.equals(other.body); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.body); - } - - @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 body = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetUniversalLoginTemplate other) { - body(other.getBody()); - return this; - } - - /** - *

The custom page template for the New Universal Login Experience

- */ - @JsonSetter(value = "body", nulls = Nulls.SKIP) - public Builder body(Optional body) { - this.body = body; - return this; - } - - public Builder body(String body) { - this.body = Optional.ofNullable(body); - return this; - } - - public GetUniversalLoginTemplate build() { - return new GetUniversalLoginTemplate(body, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetUniversalLoginTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetUniversalLoginTemplateResponseContent.java deleted file mode 100644 index aa54a7fad..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetUniversalLoginTemplateResponseContent.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = GetUniversalLoginTemplateResponseContent.Deserializer.class) -public final class GetUniversalLoginTemplateResponseContent { - private final Object value; - - private final int type; - - private GetUniversalLoginTemplateResponseContent(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((GetUniversalLoginTemplate) this.value); - } else if (this.type == 1) { - return visitor.visit((String) 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 GetUniversalLoginTemplateResponseContent - && equalTo((GetUniversalLoginTemplateResponseContent) other); - } - - private boolean equalTo(GetUniversalLoginTemplateResponseContent 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 GetUniversalLoginTemplateResponseContent of(GetUniversalLoginTemplate value) { - return new GetUniversalLoginTemplateResponseContent(value, 0); - } - - public static GetUniversalLoginTemplateResponseContent of(String value) { - return new GetUniversalLoginTemplateResponseContent(value, 1); - } - - public interface Visitor { - T visit(GetUniversalLoginTemplate value); - - T visit(String value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(GetUniversalLoginTemplateResponseContent.class); - } - - @java.lang.Override - public GetUniversalLoginTemplateResponseContent deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, GetUniversalLoginTemplate.class)); - } 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/GetUserAttributeProfileResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetUserAttributeProfileResponseContent.java deleted file mode 100644 index 750030c22..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetUserAttributeProfileResponseContent.java +++ /dev/null @@ -1,173 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetUserAttributeProfileResponseContent.Builder.class) -public final class GetUserAttributeProfileResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional userId; - - private final Optional> userAttributes; - - private final Map additionalProperties; - - private GetUserAttributeProfileResponseContent( - Optional id, - Optional name, - Optional userId, - Optional> userAttributes, - Map additionalProperties) { - this.id = id; - this.name = name; - this.userId = userId; - this.userAttributes = userAttributes; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - @JsonProperty("user_attributes") - public Optional> getUserAttributes() { - return userAttributes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetUserAttributeProfileResponseContent - && equalTo((GetUserAttributeProfileResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetUserAttributeProfileResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && userId.equals(other.userId) - && userAttributes.equals(other.userAttributes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.userId, this.userAttributes); - } - - @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 userId = Optional.empty(); - - private Optional> userAttributes = - Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetUserAttributeProfileResponseContent other) { - id(other.getId()); - name(other.getName()); - userId(other.getUserId()); - userAttributes(other.getUserAttributes()); - 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 = "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 = "user_id", nulls = Nulls.SKIP) - public Builder userId(Optional userId) { - this.userId = userId; - return this; - } - - public Builder userId(UserAttributeProfileUserId userId) { - this.userId = Optional.ofNullable(userId); - return this; - } - - @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) - public Builder userAttributes( - Optional> userAttributes) { - this.userAttributes = userAttributes; - return this; - } - - public Builder userAttributes( - Map userAttributes) { - this.userAttributes = Optional.ofNullable(userAttributes); - return this; - } - - public GetUserAttributeProfileResponseContent build() { - return new GetUserAttributeProfileResponseContent(id, name, userId, userAttributes, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetUserAttributeProfileTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetUserAttributeProfileTemplateResponseContent.java deleted file mode 100644 index 5abc901a1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetUserAttributeProfileTemplateResponseContent.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetUserAttributeProfileTemplateResponseContent.Builder.class) -public final class GetUserAttributeProfileTemplateResponseContent { - private final Optional id; - - private final Optional displayName; - - private final Optional template; - - private final Map additionalProperties; - - private GetUserAttributeProfileTemplateResponseContent( - Optional id, - Optional displayName, - Optional template, - Map additionalProperties) { - this.id = id; - this.displayName = displayName; - this.template = template; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the template. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The user-friendly name of the template displayed in the UI. - */ - @JsonProperty("display_name") - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("template") - public Optional getTemplate() { - return template; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetUserAttributeProfileTemplateResponseContent - && equalTo((GetUserAttributeProfileTemplateResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetUserAttributeProfileTemplateResponseContent other) { - return id.equals(other.id) && displayName.equals(other.displayName) && template.equals(other.template); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.displayName, this.template); - } - - @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 displayName = Optional.empty(); - - private Optional template = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetUserAttributeProfileTemplateResponseContent other) { - id(other.getId()); - displayName(other.getDisplayName()); - template(other.getTemplate()); - return this; - } - - /** - *

The id of the template.

- */ - @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 user-friendly name of the template displayed in the UI.

- */ - @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 = "template", nulls = Nulls.SKIP) - public Builder template(Optional template) { - this.template = template; - return this; - } - - public Builder template(UserAttributeProfileTemplate template) { - this.template = Optional.ofNullable(template); - return this; - } - - public GetUserAttributeProfileTemplateResponseContent build() { - return new GetUserAttributeProfileTemplateResponseContent(id, displayName, template, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetUserAuthenticationMethodResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetUserAuthenticationMethodResponseContent.java deleted file mode 100644 index 1b7f4ea83..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetUserAuthenticationMethodResponseContent.java +++ /dev/null @@ -1,929 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = GetUserAuthenticationMethodResponseContent.Builder.class) -public final class GetUserAuthenticationMethodResponseContent { - private final String id; - - private final AuthenticationMethodTypeEnum type; - - private final Optional confirmed; - - private final Optional name; - - private final Optional> authenticationMethods; - - private final Optional preferredAuthenticationMethod; - - private final Optional linkId; - - private final Optional phoneNumber; - - private final Optional email; - - private final Optional keyId; - - private final Optional publicKey; - - private final OffsetDateTime createdAt; - - private final Optional enrolledAt; - - private final Optional lastAuthAt; - - private final Optional credentialDeviceType; - - private final Optional credentialBackedUp; - - private final Optional identityUserId; - - private final Optional userAgent; - - private final Optional aaguid; - - private final Optional relyingPartyIdentifier; - - private final Map additionalProperties; - - private GetUserAuthenticationMethodResponseContent( - String id, - AuthenticationMethodTypeEnum type, - Optional confirmed, - Optional name, - Optional> authenticationMethods, - Optional preferredAuthenticationMethod, - Optional linkId, - Optional phoneNumber, - Optional email, - Optional keyId, - Optional publicKey, - OffsetDateTime createdAt, - Optional enrolledAt, - Optional lastAuthAt, - Optional credentialDeviceType, - Optional credentialBackedUp, - Optional identityUserId, - Optional userAgent, - Optional aaguid, - Optional relyingPartyIdentifier, - Map additionalProperties) { - this.id = id; - this.type = type; - this.confirmed = confirmed; - this.name = name; - this.authenticationMethods = authenticationMethods; - this.preferredAuthenticationMethod = preferredAuthenticationMethod; - this.linkId = linkId; - this.phoneNumber = phoneNumber; - this.email = email; - this.keyId = keyId; - this.publicKey = publicKey; - this.createdAt = createdAt; - this.enrolledAt = enrolledAt; - this.lastAuthAt = lastAuthAt; - this.credentialDeviceType = credentialDeviceType; - this.credentialBackedUp = credentialBackedUp; - this.identityUserId = identityUserId; - this.userAgent = userAgent; - this.aaguid = aaguid; - this.relyingPartyIdentifier = relyingPartyIdentifier; - this.additionalProperties = additionalProperties; - } - - /** - * @return The ID of the authentication method (auto generated) - */ - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("type") - public AuthenticationMethodTypeEnum getType() { - return type; - } - - /** - * @return The authentication method status - */ - @JsonProperty("confirmed") - public Optional getConfirmed() { - return confirmed; - } - - /** - * @return A human-readable label to identify the authentication method - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("authentication_methods") - public Optional> getAuthenticationMethods() { - return authenticationMethods; - } - - @JsonProperty("preferred_authentication_method") - public Optional getPreferredAuthenticationMethod() { - return preferredAuthenticationMethod; - } - - /** - * @return The ID of a linked authentication method. Linked authentication methods will be deleted together. - */ - @JsonProperty("link_id") - public Optional getLinkId() { - return linkId; - } - - /** - * @return Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice. - */ - @JsonProperty("phone_number") - public Optional getPhoneNumber() { - return phoneNumber; - } - - /** - * @return Applies to email and email-verification authentication methods only. The email address used to send verification messages. - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - /** - * @return Applies to webauthn authentication methods only. The ID of the generated credential. - */ - @JsonProperty("key_id") - public Optional getKeyId() { - return keyId; - } - - /** - * @return Applies to webauthn authentication methods only. The public key. - */ - @JsonProperty("public_key") - public Optional getPublicKey() { - return publicKey; - } - - /** - * @return Authenticator creation date - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return Enrollment date - */ - @JsonProperty("enrolled_at") - public Optional getEnrolledAt() { - return enrolledAt; - } - - /** - * @return Last authentication - */ - @JsonProperty("last_auth_at") - public Optional getLastAuthAt() { - return lastAuthAt; - } - - /** - * @return Applies to passkeys only. The kind of device the credential is stored on as defined by backup eligibility. "single_device" credentials cannot be backed up and synced to another device, "multi_device" credentials can be backed up if enabled by the end-user. - */ - @JsonProperty("credential_device_type") - public Optional getCredentialDeviceType() { - return credentialDeviceType; - } - - /** - * @return Applies to passkeys only. Whether the credential was backed up. - */ - @JsonProperty("credential_backed_up") - public Optional getCredentialBackedUp() { - return credentialBackedUp; - } - - /** - * @return Applies to passkeys only. The ID of the user identity linked with the authentication method. - */ - @JsonProperty("identity_user_id") - public Optional getIdentityUserId() { - return identityUserId; - } - - /** - * @return Applies to passkeys only. The user-agent of the browser used to create the passkey. - */ - @JsonProperty("user_agent") - public Optional getUserAgent() { - return userAgent; - } - - /** - * @return Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier. - */ - @JsonProperty("aaguid") - public Optional getAaguid() { - return aaguid; - } - - /** - * @return Applies to webauthn/passkey authentication methods only. The credential's relying party identifier. - */ - @JsonProperty("relying_party_identifier") - public Optional getRelyingPartyIdentifier() { - return relyingPartyIdentifier; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetUserAuthenticationMethodResponseContent - && equalTo((GetUserAuthenticationMethodResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetUserAuthenticationMethodResponseContent other) { - return id.equals(other.id) - && type.equals(other.type) - && confirmed.equals(other.confirmed) - && name.equals(other.name) - && authenticationMethods.equals(other.authenticationMethods) - && preferredAuthenticationMethod.equals(other.preferredAuthenticationMethod) - && linkId.equals(other.linkId) - && phoneNumber.equals(other.phoneNumber) - && email.equals(other.email) - && keyId.equals(other.keyId) - && publicKey.equals(other.publicKey) - && createdAt.equals(other.createdAt) - && enrolledAt.equals(other.enrolledAt) - && lastAuthAt.equals(other.lastAuthAt) - && credentialDeviceType.equals(other.credentialDeviceType) - && credentialBackedUp.equals(other.credentialBackedUp) - && identityUserId.equals(other.identityUserId) - && userAgent.equals(other.userAgent) - && aaguid.equals(other.aaguid) - && relyingPartyIdentifier.equals(other.relyingPartyIdentifier); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.type, - this.confirmed, - this.name, - this.authenticationMethods, - this.preferredAuthenticationMethod, - this.linkId, - this.phoneNumber, - this.email, - this.keyId, - this.publicKey, - this.createdAt, - this.enrolledAt, - this.lastAuthAt, - this.credentialDeviceType, - this.credentialBackedUp, - this.identityUserId, - this.userAgent, - this.aaguid, - this.relyingPartyIdentifier); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

The ID of the authentication method (auto generated)

- */ - TypeStage id(@NotNull String id); - - Builder from(GetUserAuthenticationMethodResponseContent other); - } - - public interface TypeStage { - CreatedAtStage type(@NotNull AuthenticationMethodTypeEnum type); - } - - public interface CreatedAtStage { - /** - *

Authenticator creation date

- */ - _FinalStage createdAt(@NotNull OffsetDateTime createdAt); - } - - public interface _FinalStage { - GetUserAuthenticationMethodResponseContent build(); - - /** - *

The authentication method status

- */ - _FinalStage confirmed(Optional confirmed); - - _FinalStage confirmed(Boolean confirmed); - - /** - *

A human-readable label to identify the authentication method

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage authenticationMethods(Optional> authenticationMethods); - - _FinalStage authenticationMethods(List authenticationMethods); - - _FinalStage preferredAuthenticationMethod( - Optional preferredAuthenticationMethod); - - _FinalStage preferredAuthenticationMethod(PreferredAuthenticationMethodEnum preferredAuthenticationMethod); - - /** - *

The ID of a linked authentication method. Linked authentication methods will be deleted together.

- */ - _FinalStage linkId(Optional linkId); - - _FinalStage linkId(String linkId); - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- */ - _FinalStage phoneNumber(Optional phoneNumber); - - _FinalStage phoneNumber(String phoneNumber); - - /** - *

Applies to email and email-verification authentication methods only. The email address used to send verification messages.

- */ - _FinalStage email(Optional email); - - _FinalStage email(String email); - - /** - *

Applies to webauthn authentication methods only. The ID of the generated credential.

- */ - _FinalStage keyId(Optional keyId); - - _FinalStage keyId(String keyId); - - /** - *

Applies to webauthn authentication methods only. The public key.

- */ - _FinalStage publicKey(Optional publicKey); - - _FinalStage publicKey(String publicKey); - - /** - *

Enrollment date

- */ - _FinalStage enrolledAt(Optional enrolledAt); - - _FinalStage enrolledAt(OffsetDateTime enrolledAt); - - /** - *

Last authentication

- */ - _FinalStage lastAuthAt(Optional lastAuthAt); - - _FinalStage lastAuthAt(OffsetDateTime lastAuthAt); - - /** - *

Applies to passkeys only. The kind of device the credential is stored on as defined by backup eligibility. "single_device" credentials cannot be backed up and synced to another device, "multi_device" credentials can be backed up if enabled by the end-user.

- */ - _FinalStage credentialDeviceType(Optional credentialDeviceType); - - _FinalStage credentialDeviceType(String credentialDeviceType); - - /** - *

Applies to passkeys only. Whether the credential was backed up.

- */ - _FinalStage credentialBackedUp(Optional credentialBackedUp); - - _FinalStage credentialBackedUp(Boolean credentialBackedUp); - - /** - *

Applies to passkeys only. The ID of the user identity linked with the authentication method.

- */ - _FinalStage identityUserId(Optional identityUserId); - - _FinalStage identityUserId(String identityUserId); - - /** - *

Applies to passkeys only. The user-agent of the browser used to create the passkey.

- */ - _FinalStage userAgent(Optional userAgent); - - _FinalStage userAgent(String userAgent); - - /** - *

Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier.

- */ - _FinalStage aaguid(Optional aaguid); - - _FinalStage aaguid(String aaguid); - - /** - *

Applies to webauthn/passkey authentication methods only. The credential's relying party identifier.

- */ - _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier); - - _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, CreatedAtStage, _FinalStage { - private String id; - - private AuthenticationMethodTypeEnum type; - - private OffsetDateTime createdAt; - - private Optional relyingPartyIdentifier = Optional.empty(); - - private Optional aaguid = Optional.empty(); - - private Optional userAgent = Optional.empty(); - - private Optional identityUserId = Optional.empty(); - - private Optional credentialBackedUp = Optional.empty(); - - private Optional credentialDeviceType = Optional.empty(); - - private Optional lastAuthAt = Optional.empty(); - - private Optional enrolledAt = Optional.empty(); - - private Optional publicKey = Optional.empty(); - - private Optional keyId = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional phoneNumber = Optional.empty(); - - private Optional linkId = Optional.empty(); - - private Optional preferredAuthenticationMethod = Optional.empty(); - - private Optional> authenticationMethods = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional confirmed = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GetUserAuthenticationMethodResponseContent other) { - id(other.getId()); - type(other.getType()); - confirmed(other.getConfirmed()); - name(other.getName()); - authenticationMethods(other.getAuthenticationMethods()); - preferredAuthenticationMethod(other.getPreferredAuthenticationMethod()); - linkId(other.getLinkId()); - phoneNumber(other.getPhoneNumber()); - email(other.getEmail()); - keyId(other.getKeyId()); - publicKey(other.getPublicKey()); - createdAt(other.getCreatedAt()); - enrolledAt(other.getEnrolledAt()); - lastAuthAt(other.getLastAuthAt()); - credentialDeviceType(other.getCredentialDeviceType()); - credentialBackedUp(other.getCredentialBackedUp()); - identityUserId(other.getIdentityUserId()); - userAgent(other.getUserAgent()); - aaguid(other.getAaguid()); - relyingPartyIdentifier(other.getRelyingPartyIdentifier()); - return this; - } - - /** - *

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. - */ - @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 CreatedAtStage type(@NotNull AuthenticationMethodTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

Authenticator creation date

- *

Authenticator creation date

- * @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; - } - - /** - *

Applies to webauthn/passkey authentication methods only. The credential's relying party identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier) { - this.relyingPartyIdentifier = Optional.ofNullable(relyingPartyIdentifier); - return this; - } - - /** - *

Applies to webauthn/passkey authentication methods only. The credential's relying party identifier.

- */ - @java.lang.Override - @JsonSetter(value = "relying_party_identifier", nulls = Nulls.SKIP) - public _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier) { - this.relyingPartyIdentifier = relyingPartyIdentifier; - return this; - } - - /** - *

Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage aaguid(String aaguid) { - this.aaguid = Optional.ofNullable(aaguid); - return this; - } - - /** - *

Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier.

- */ - @java.lang.Override - @JsonSetter(value = "aaguid", nulls = Nulls.SKIP) - public _FinalStage aaguid(Optional aaguid) { - this.aaguid = aaguid; - return this; - } - - /** - *

Applies to passkeys only. The user-agent of the browser used to create the passkey.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage userAgent(String userAgent) { - this.userAgent = Optional.ofNullable(userAgent); - return this; - } - - /** - *

Applies to passkeys only. The user-agent of the browser used to create the passkey.

- */ - @java.lang.Override - @JsonSetter(value = "user_agent", nulls = Nulls.SKIP) - public _FinalStage userAgent(Optional userAgent) { - this.userAgent = userAgent; - return this; - } - - /** - *

Applies to passkeys only. The ID of the user identity linked with the authentication method.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage identityUserId(String identityUserId) { - this.identityUserId = Optional.ofNullable(identityUserId); - return this; - } - - /** - *

Applies to passkeys only. The ID of the user identity linked with the authentication method.

- */ - @java.lang.Override - @JsonSetter(value = "identity_user_id", nulls = Nulls.SKIP) - public _FinalStage identityUserId(Optional identityUserId) { - this.identityUserId = identityUserId; - return this; - } - - /** - *

Applies to passkeys only. Whether the credential was backed up.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage credentialBackedUp(Boolean credentialBackedUp) { - this.credentialBackedUp = Optional.ofNullable(credentialBackedUp); - return this; - } - - /** - *

Applies to passkeys only. Whether the credential was backed up.

- */ - @java.lang.Override - @JsonSetter(value = "credential_backed_up", nulls = Nulls.SKIP) - public _FinalStage credentialBackedUp(Optional credentialBackedUp) { - this.credentialBackedUp = credentialBackedUp; - return this; - } - - /** - *

Applies to passkeys only. The kind of device the credential is stored on as defined by backup eligibility. "single_device" credentials cannot be backed up and synced to another device, "multi_device" credentials can be backed up if enabled by the end-user.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage credentialDeviceType(String credentialDeviceType) { - this.credentialDeviceType = Optional.ofNullable(credentialDeviceType); - return this; - } - - /** - *

Applies to passkeys only. The kind of device the credential is stored on as defined by backup eligibility. "single_device" credentials cannot be backed up and synced to another device, "multi_device" credentials can be backed up if enabled by the end-user.

- */ - @java.lang.Override - @JsonSetter(value = "credential_device_type", nulls = Nulls.SKIP) - public _FinalStage credentialDeviceType(Optional credentialDeviceType) { - this.credentialDeviceType = credentialDeviceType; - return this; - } - - /** - *

Last authentication

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage lastAuthAt(OffsetDateTime lastAuthAt) { - this.lastAuthAt = Optional.ofNullable(lastAuthAt); - return this; - } - - /** - *

Last authentication

- */ - @java.lang.Override - @JsonSetter(value = "last_auth_at", nulls = Nulls.SKIP) - public _FinalStage lastAuthAt(Optional lastAuthAt) { - this.lastAuthAt = lastAuthAt; - return this; - } - - /** - *

Enrollment date

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage enrolledAt(OffsetDateTime enrolledAt) { - this.enrolledAt = Optional.ofNullable(enrolledAt); - return this; - } - - /** - *

Enrollment date

- */ - @java.lang.Override - @JsonSetter(value = "enrolled_at", nulls = Nulls.SKIP) - public _FinalStage enrolledAt(Optional enrolledAt) { - this.enrolledAt = enrolledAt; - return this; - } - - /** - *

Applies to webauthn authentication methods only. The public key.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage publicKey(String publicKey) { - this.publicKey = Optional.ofNullable(publicKey); - return this; - } - - /** - *

Applies to webauthn authentication methods only. The public key.

- */ - @java.lang.Override - @JsonSetter(value = "public_key", nulls = Nulls.SKIP) - public _FinalStage publicKey(Optional publicKey) { - this.publicKey = publicKey; - return this; - } - - /** - *

Applies to webauthn authentication methods only. The ID of the generated credential.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage keyId(String keyId) { - this.keyId = Optional.ofNullable(keyId); - return this; - } - - /** - *

Applies to webauthn authentication methods only. The ID of the generated credential.

- */ - @java.lang.Override - @JsonSetter(value = "key_id", nulls = Nulls.SKIP) - public _FinalStage keyId(Optional keyId) { - this.keyId = keyId; - return this; - } - - /** - *

Applies to email and email-verification authentication methods only. The email address used to send verification messages.

- * @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; - } - - /** - *

Applies to email and email-verification authentication methods only. The email address used to send verification messages.

- */ - @java.lang.Override - @JsonSetter(value = "email", nulls = Nulls.SKIP) - public _FinalStage email(Optional email) { - this.email = email; - return this; - } - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- * @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; - } - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- */ - @java.lang.Override - @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) - public _FinalStage phoneNumber(Optional phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - *

The ID of a linked authentication method. Linked authentication methods will be deleted together.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage linkId(String linkId) { - this.linkId = Optional.ofNullable(linkId); - return this; - } - - /** - *

The ID of a linked authentication method. Linked authentication methods will be deleted together.

- */ - @java.lang.Override - @JsonSetter(value = "link_id", nulls = Nulls.SKIP) - public _FinalStage linkId(Optional linkId) { - this.linkId = linkId; - return this; - } - - @java.lang.Override - public _FinalStage preferredAuthenticationMethod( - PreferredAuthenticationMethodEnum preferredAuthenticationMethod) { - this.preferredAuthenticationMethod = Optional.ofNullable(preferredAuthenticationMethod); - return this; - } - - @java.lang.Override - @JsonSetter(value = "preferred_authentication_method", nulls = Nulls.SKIP) - public _FinalStage preferredAuthenticationMethod( - Optional preferredAuthenticationMethod) { - this.preferredAuthenticationMethod = preferredAuthenticationMethod; - return this; - } - - @java.lang.Override - public _FinalStage authenticationMethods(List authenticationMethods) { - this.authenticationMethods = Optional.ofNullable(authenticationMethods); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication_methods", nulls = Nulls.SKIP) - public _FinalStage authenticationMethods( - Optional> authenticationMethods) { - this.authenticationMethods = authenticationMethods; - return this; - } - - /** - *

A human-readable label to identify the authentication method

- * @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; - } - - /** - *

A human-readable label to identify the authentication method

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - /** - *

The authentication method status

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage confirmed(Boolean confirmed) { - this.confirmed = Optional.ofNullable(confirmed); - return this; - } - - /** - *

The authentication method status

- */ - @java.lang.Override - @JsonSetter(value = "confirmed", nulls = Nulls.SKIP) - public _FinalStage confirmed(Optional confirmed) { - this.confirmed = confirmed; - return this; - } - - @java.lang.Override - public GetUserAuthenticationMethodResponseContent build() { - return new GetUserAuthenticationMethodResponseContent( - id, - type, - confirmed, - name, - authenticationMethods, - preferredAuthenticationMethod, - linkId, - phoneNumber, - email, - keyId, - publicKey, - createdAt, - enrolledAt, - lastAuthAt, - credentialDeviceType, - credentialBackedUp, - identityUserId, - userAgent, - aaguid, - relyingPartyIdentifier, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetUserGroupsPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetUserGroupsPaginatedResponseContent.java deleted file mode 100644 index b4c15799a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetUserGroupsPaginatedResponseContent.java +++ /dev/null @@ -1,212 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = GetUserGroupsPaginatedResponseContent.Builder.class) -public final class GetUserGroupsPaginatedResponseContent { - private final List groups; - - private final Optional next; - - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Map additionalProperties; - - private GetUserGroupsPaginatedResponseContent( - List groups, - Optional next, - Optional start, - Optional limit, - Optional total, - Map additionalProperties) { - this.groups = groups; - this.next = next; - this.start = start; - this.limit = limit; - this.total = total; - 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; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetUserGroupsPaginatedResponseContent - && equalTo((GetUserGroupsPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetUserGroupsPaginatedResponseContent other) { - return groups.equals(other.groups) - && next.equals(other.next) - && start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.groups, this.next, this.start, this.limit, this.total); - } - - @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(); - - private Optional start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetUserGroupsPaginatedResponseContent other) { - groups(other.getGroups()); - next(other.getNext()); - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - 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(UserGroupsResponseSchema 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; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - public GetUserGroupsPaginatedResponseContent build() { - return new GetUserGroupsPaginatedResponseContent(groups, next, start, limit, total, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetUserRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/GetUserRequestParameters.java deleted file mode 100644 index a95706d17..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetUserRequestParameters.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GetUserRequestParameters.Builder.class) -public final class GetUserRequestParameters { - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final Map additionalProperties; - - private GetUserRequestParameters( - OptionalNullable fields, - OptionalNullable includeFields, - Map additionalProperties) { - this.fields = fields; - this.includeFields = includeFields; - this.additionalProperties = additionalProperties; - } - - /** - * @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). - */ - @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("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 GetUserRequestParameters && equalTo((GetUserRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetUserRequestParameters other) { - return fields.equals(other.fields) && includeFields.equals(other.includeFields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetUserRequestParameters other) { - fields(other.getFields()); - includeFields(other.getIncludeFields()); - 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).

- */ - @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 GetUserRequestParameters build() { - return new GetUserRequestParameters(fields, includeFields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetUserResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetUserResponseContent.java deleted file mode 100644 index 497df4221..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetUserResponseContent.java +++ /dev/null @@ -1,717 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetUserResponseContent.Builder.class) -public final class GetUserResponseContent { - private final Optional userId; - - private final Optional email; - - private final Optional emailVerified; - - private final Optional username; - - private final Optional phoneNumber; - - private final Optional phoneVerified; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional> 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 GetUserResponseContent( - Optional userId, - Optional email, - Optional emailVerified, - Optional username, - Optional phoneNumber, - Optional phoneVerified, - Optional createdAt, - Optional updatedAt, - Optional> 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 Optional 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 for this user. Follows the <a href="https://en.wikipedia.org/wiki/E.164">E.164 recommendation</a>. - */ - @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; - } - - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return Array of user identity objects when accounts are linked. - */ - @JsonProperty("identities") - public Optional> 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; - } - - @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 GetUserResponseContent && equalTo((GetUserResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetUserResponseContent 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 Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional userId = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional emailVerified = Optional.empty(); - - private Optional username = Optional.empty(); - - private Optional phoneNumber = Optional.empty(); - - private Optional phoneVerified = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional> identities = Optional.empty(); - - private Optional> appMetadata = Optional.empty(); - - private Optional> userMetadata = Optional.empty(); - - private Optional picture = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional nickname = Optional.empty(); - - private Optional> multifactor = Optional.empty(); - - private Optional lastIp = Optional.empty(); - - private Optional lastLogin = Optional.empty(); - - private Optional loginsCount = Optional.empty(); - - private Optional blocked = Optional.empty(); - - private Optional givenName = Optional.empty(); - - private Optional familyName = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetUserResponseContent 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.

- */ - @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; - } - - /** - *

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; - } - - /** - *

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; - } - - /** - *

Phone number for this user. Follows the <a href="https://en.wikipedia.org/wiki/E.164">E.164 recommendation</a>.

- */ - @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; - } - - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(UserDateSchema createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - public Builder updatedAt(UserDateSchema updatedAt) { - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - /** - *

Array of user identity objects when accounts are linked.

- */ - @JsonSetter(value = "identities", nulls = Nulls.SKIP) - public Builder identities(Optional> identities) { - this.identities = identities; - return this; - } - - public Builder identities(List identities) { - this.identities = Optional.ofNullable(identities); - return this; - } - - @JsonSetter(value = "app_metadata", nulls = Nulls.SKIP) - public Builder appMetadata(Optional> appMetadata) { - this.appMetadata = appMetadata; - return this; - } - - public Builder appMetadata(Map appMetadata) { - this.appMetadata = Optional.ofNullable(appMetadata); - return this; - } - - @JsonSetter(value = "user_metadata", nulls = Nulls.SKIP) - public Builder userMetadata(Optional> userMetadata) { - this.userMetadata = userMetadata; - return this; - } - - public Builder userMetadata(Map userMetadata) { - this.userMetadata = Optional.ofNullable(userMetadata); - return this; - } - - /** - *

URL to picture, photo, or avatar of 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; - } - - /** - *

Preferred nickname or alias of this user.

- */ - @JsonSetter(value = "nickname", nulls = Nulls.SKIP) - public Builder nickname(Optional nickname) { - this.nickname = nickname; - return this; - } - - public Builder nickname(String nickname) { - this.nickname = Optional.ofNullable(nickname); - return this; - } - - /** - *

List of multi-factor authentication providers with which this user has enrolled.

- */ - @JsonSetter(value = "multifactor", nulls = Nulls.SKIP) - public Builder multifactor(Optional> multifactor) { - this.multifactor = multifactor; - return this; - } - - public Builder multifactor(List multifactor) { - this.multifactor = Optional.ofNullable(multifactor); - return this; - } - - /** - *

Last IP address from which this user logged in.

- */ - @JsonSetter(value = "last_ip", nulls = Nulls.SKIP) - public Builder lastIp(Optional lastIp) { - this.lastIp = lastIp; - return this; - } - - public Builder lastIp(String lastIp) { - this.lastIp = Optional.ofNullable(lastIp); - return this; - } - - @JsonSetter(value = "last_login", nulls = Nulls.SKIP) - public Builder lastLogin(Optional lastLogin) { - this.lastLogin = lastLogin; - return this; - } - - public Builder lastLogin(UserDateSchema lastLogin) { - this.lastLogin = Optional.ofNullable(lastLogin); - return this; - } - - /** - *

Total number of logins this user has performed.

- */ - @JsonSetter(value = "logins_count", nulls = Nulls.SKIP) - public Builder loginsCount(Optional loginsCount) { - this.loginsCount = loginsCount; - return this; - } - - public Builder loginsCount(Integer loginsCount) { - this.loginsCount = Optional.ofNullable(loginsCount); - return this; - } - - /** - *

Whether this user was blocked by an administrator (true) or is not (false).

- */ - @JsonSetter(value = "blocked", nulls = Nulls.SKIP) - public Builder blocked(Optional blocked) { - this.blocked = blocked; - return this; - } - - public Builder blocked(Boolean blocked) { - this.blocked = Optional.ofNullable(blocked); - 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; - } - - public GetUserResponseContent build() { - return new GetUserResponseContent( - userId, - email, - emailVerified, - username, - phoneNumber, - phoneVerified, - createdAt, - updatedAt, - identities, - appMetadata, - userMetadata, - picture, - name, - nickname, - multifactor, - lastIp, - lastLogin, - loginsCount, - blocked, - givenName, - familyName, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GetVerifiableCredentialTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/GetVerifiableCredentialTemplateResponseContent.java deleted file mode 100644 index f17487c04..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GetVerifiableCredentialTemplateResponseContent.java +++ /dev/null @@ -1,422 +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 = GetVerifiableCredentialTemplateResponseContent.Builder.class) -public final class GetVerifiableCredentialTemplateResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional type; - - private final Optional dialect; - - private final Optional presentation; - - private final OptionalNullable customCertificateAuthority; - - private final OptionalNullable wellKnownTrustedIssuers; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private GetVerifiableCredentialTemplateResponseContent( - Optional id, - Optional name, - Optional type, - Optional dialect, - Optional presentation, - OptionalNullable customCertificateAuthority, - OptionalNullable wellKnownTrustedIssuers, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.type = type; - this.dialect = dialect; - this.presentation = presentation; - this.customCertificateAuthority = customCertificateAuthority; - this.wellKnownTrustedIssuers = wellKnownTrustedIssuers; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the template. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the template. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The type of the template. - */ - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return The dialect of the template. - */ - @JsonProperty("dialect") - public Optional getDialect() { - return dialect; - } - - @JsonProperty("presentation") - public Optional getPresentation() { - return presentation; - } - - /** - * @return The custom certificate authority. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_certificate_authority") - public OptionalNullable getCustomCertificateAuthority() { - if (customCertificateAuthority == null) { - return OptionalNullable.absent(); - } - return customCertificateAuthority; - } - - /** - * @return The well-known trusted issuers, comma separated. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("well_known_trusted_issuers") - public OptionalNullable getWellKnownTrustedIssuers() { - if (wellKnownTrustedIssuers == null) { - return OptionalNullable.absent(); - } - return wellKnownTrustedIssuers; - } - - /** - * @return The date and time the template was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The date and time the template was created. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_certificate_authority") - private OptionalNullable _getCustomCertificateAuthority() { - return customCertificateAuthority; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("well_known_trusted_issuers") - private OptionalNullable _getWellKnownTrustedIssuers() { - return wellKnownTrustedIssuers; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetVerifiableCredentialTemplateResponseContent - && equalTo((GetVerifiableCredentialTemplateResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetVerifiableCredentialTemplateResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && type.equals(other.type) - && dialect.equals(other.dialect) - && presentation.equals(other.presentation) - && customCertificateAuthority.equals(other.customCertificateAuthority) - && wellKnownTrustedIssuers.equals(other.wellKnownTrustedIssuers) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.type, - this.dialect, - this.presentation, - this.customCertificateAuthority, - this.wellKnownTrustedIssuers, - this.createdAt, - this.updatedAt); - } - - @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 type = Optional.empty(); - - private Optional dialect = Optional.empty(); - - private Optional presentation = Optional.empty(); - - private OptionalNullable customCertificateAuthority = OptionalNullable.absent(); - - private OptionalNullable wellKnownTrustedIssuers = OptionalNullable.absent(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetVerifiableCredentialTemplateResponseContent other) { - id(other.getId()); - name(other.getName()); - type(other.getType()); - dialect(other.getDialect()); - presentation(other.getPresentation()); - customCertificateAuthority(other.getCustomCertificateAuthority()); - wellKnownTrustedIssuers(other.getWellKnownTrustedIssuers()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

The id of the template.

- */ - @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 the template.

- */ - @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 template.

- */ - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(String type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

The dialect of the template.

- */ - @JsonSetter(value = "dialect", nulls = Nulls.SKIP) - public Builder dialect(Optional dialect) { - this.dialect = dialect; - return this; - } - - public Builder dialect(String dialect) { - this.dialect = Optional.ofNullable(dialect); - return this; - } - - @JsonSetter(value = "presentation", nulls = Nulls.SKIP) - public Builder presentation(Optional presentation) { - this.presentation = presentation; - return this; - } - - public Builder presentation(MdlPresentationRequest presentation) { - this.presentation = Optional.ofNullable(presentation); - return this; - } - - /** - *

The custom certificate authority.

- */ - @JsonSetter(value = "custom_certificate_authority", nulls = Nulls.SKIP) - public Builder customCertificateAuthority(@Nullable OptionalNullable customCertificateAuthority) { - this.customCertificateAuthority = customCertificateAuthority; - return this; - } - - public Builder customCertificateAuthority(String customCertificateAuthority) { - this.customCertificateAuthority = OptionalNullable.of(customCertificateAuthority); - return this; - } - - public Builder customCertificateAuthority(Optional customCertificateAuthority) { - if (customCertificateAuthority.isPresent()) { - this.customCertificateAuthority = OptionalNullable.of(customCertificateAuthority.get()); - } else { - this.customCertificateAuthority = OptionalNullable.absent(); - } - return this; - } - - public Builder customCertificateAuthority( - com.auth0.client.mgmt.core.Nullable customCertificateAuthority) { - if (customCertificateAuthority.isNull()) { - this.customCertificateAuthority = OptionalNullable.ofNull(); - } else if (customCertificateAuthority.isEmpty()) { - this.customCertificateAuthority = OptionalNullable.absent(); - } else { - this.customCertificateAuthority = OptionalNullable.of(customCertificateAuthority.get()); - } - return this; - } - - /** - *

The well-known trusted issuers, comma separated.

- */ - @JsonSetter(value = "well_known_trusted_issuers", nulls = Nulls.SKIP) - public Builder wellKnownTrustedIssuers(@Nullable OptionalNullable wellKnownTrustedIssuers) { - this.wellKnownTrustedIssuers = wellKnownTrustedIssuers; - return this; - } - - public Builder wellKnownTrustedIssuers(String wellKnownTrustedIssuers) { - this.wellKnownTrustedIssuers = OptionalNullable.of(wellKnownTrustedIssuers); - return this; - } - - public Builder wellKnownTrustedIssuers(Optional wellKnownTrustedIssuers) { - if (wellKnownTrustedIssuers.isPresent()) { - this.wellKnownTrustedIssuers = OptionalNullable.of(wellKnownTrustedIssuers.get()); - } else { - this.wellKnownTrustedIssuers = OptionalNullable.absent(); - } - return this; - } - - public Builder wellKnownTrustedIssuers(com.auth0.client.mgmt.core.Nullable wellKnownTrustedIssuers) { - if (wellKnownTrustedIssuers.isNull()) { - this.wellKnownTrustedIssuers = OptionalNullable.ofNull(); - } else if (wellKnownTrustedIssuers.isEmpty()) { - this.wellKnownTrustedIssuers = OptionalNullable.absent(); - } else { - this.wellKnownTrustedIssuers = OptionalNullable.of(wellKnownTrustedIssuers.get()); - } - return this; - } - - /** - *

The date and time the template 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 date and time the template was created.

- */ - @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; - } - - public GetVerifiableCredentialTemplateResponseContent build() { - return new GetVerifiableCredentialTemplateResponseContent( - id, - name, - type, - dialect, - presentation, - customCertificateAuthority, - wellKnownTrustedIssuers, - createdAt, - updatedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/Group.java b/src/main/java/com/auth0/client/mgmt/types/Group.java deleted file mode 100644 index 2026f9e55..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/Group.java +++ /dev/null @@ -1,429 +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 = Group.Builder.class) -public final class Group implements IGroup { - private final Optional id; - - private final Optional 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 Group( - Optional id, - Optional 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") - @java.lang.Override - public Optional getId() { - return id; - } - - /** - * @return Name of the group. Must be unique within its scope (connection, organization, or tenant). Must contain between 1 and 128 printable ASCII characters. - */ - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - /** - * @return External identifier for the group, often used for SCIM synchronization. Max length of 256 characters. - */ - @JsonProperty("external_id") - @java.lang.Override - public Optional getExternalId() { - return externalId; - } - - /** - * @return Identifier for the connection this group belongs to (if a connection group). - */ - @JsonProperty("connection_id") - @java.lang.Override - public Optional getConnectionId() { - return connectionId; - } - - /** - * @return Identifier for the organization this group belongs to (if an organization group). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("organization_id") - @java.lang.Override - public OptionalNullable getOrganizationId() { - if (organizationId == null) { - return OptionalNullable.absent(); - } - return organizationId; - } - - /** - * @return Identifier for the tenant this group belongs to. - */ - @JsonProperty("tenant_name") - @java.lang.Override - public Optional getTenantName() { - return tenantName; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("description") - @java.lang.Override - public OptionalNullable getDescription() { - if (description == null) { - return OptionalNullable.absent(); - } - return description; - } - - /** - * @return Timestamp of when the group was created. - */ - @JsonProperty("created_at") - @java.lang.Override - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return Timestamp of when the group was last updated. - */ - @JsonProperty("updated_at") - @java.lang.Override - 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 Group && equalTo((Group) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(Group 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 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 externalId = Optional.empty(); - - private Optional connectionId = Optional.empty(); - - private OptionalNullable organizationId = OptionalNullable.absent(); - - private Optional tenantName = Optional.empty(); - - private OptionalNullable description = OptionalNullable.absent(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(Group 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).

- */ - @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; - } - - /** - *

Name of the group. Must be unique within its scope (connection, organization, or tenant). Must contain between 1 and 128 printable ASCII 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; - } - - /** - *

External identifier for the group, often used for SCIM synchronization. Max length of 256 characters.

- */ - @JsonSetter(value = "external_id", nulls = Nulls.SKIP) - public Builder externalId(Optional externalId) { - this.externalId = externalId; - return this; - } - - public Builder externalId(String externalId) { - this.externalId = Optional.ofNullable(externalId); - return this; - } - - /** - *

Identifier for the connection this group belongs to (if a connection group).

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - return this; - } - - /** - *

Identifier for the organization this group belongs to (if an organization group).

- */ - @JsonSetter(value = "organization_id", nulls = Nulls.SKIP) - public Builder organizationId(@Nullable OptionalNullable organizationId) { - this.organizationId = organizationId; - return this; - } - - public Builder organizationId(String organizationId) { - this.organizationId = OptionalNullable.of(organizationId); - return this; - } - - public Builder organizationId(Optional organizationId) { - if (organizationId.isPresent()) { - this.organizationId = OptionalNullable.of(organizationId.get()); - } else { - this.organizationId = OptionalNullable.absent(); - } - return this; - } - - public Builder organizationId(com.auth0.client.mgmt.core.Nullable organizationId) { - if (organizationId.isNull()) { - this.organizationId = OptionalNullable.ofNull(); - } else if (organizationId.isEmpty()) { - this.organizationId = OptionalNullable.absent(); - } else { - this.organizationId = OptionalNullable.of(organizationId.get()); - } - return this; - } - - /** - *

Identifier for the tenant this group belongs to.

- */ - @JsonSetter(value = "tenant_name", nulls = Nulls.SKIP) - public Builder tenantName(Optional tenantName) { - this.tenantName = tenantName; - return this; - } - - public Builder tenantName(String tenantName) { - this.tenantName = Optional.ofNullable(tenantName); - return this; - } - - @JsonSetter(value = "description", nulls = Nulls.SKIP) - public Builder description(@Nullable OptionalNullable description) { - this.description = description; - return this; - } - - public Builder description(String description) { - this.description = OptionalNullable.of(description); - return this; - } - - public Builder description(Optional description) { - if (description.isPresent()) { - this.description = OptionalNullable.of(description.get()); - } else { - this.description = OptionalNullable.absent(); - } - return this; - } - - public Builder description(com.auth0.client.mgmt.core.Nullable description) { - if (description.isNull()) { - this.description = OptionalNullable.ofNull(); - } else if (description.isEmpty()) { - this.description = OptionalNullable.absent(); - } else { - this.description = OptionalNullable.of(description.get()); - } - return this; - } - - /** - *

Timestamp of when the group was created.

- */ - @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; - } - - /** - *

Timestamp of when the group 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; - } - - public Group build() { - return new Group( - id, - name, - externalId, - connectionId, - organizationId, - tenantName, - description, - createdAt, - updatedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GroupMember.java b/src/main/java/com/auth0/client/mgmt/types/GroupMember.java deleted file mode 100644 index 0b0880e42..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GroupMember.java +++ /dev/null @@ -1,212 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = GroupMember.Builder.class) -public final class GroupMember { - private final Optional id; - - private final Optional memberType; - - private final Optional type; - - private final Optional connectionId; - - private final Optional createdAt; - - private final Map additionalProperties; - - private GroupMember( - Optional id, - Optional memberType, - Optional type, - Optional connectionId, - Optional createdAt, - Map additionalProperties) { - this.id = id; - this.memberType = memberType; - this.type = type; - this.connectionId = connectionId; - this.createdAt = createdAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return Unique identifier for the member. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("member_type") - public Optional getMemberType() { - return memberType; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return Identifier for the connection this group belongs to (if a connection group). - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - /** - * @return Timestamp of when the membership was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GroupMember && equalTo((GroupMember) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GroupMember other) { - return id.equals(other.id) - && memberType.equals(other.memberType) - && type.equals(other.type) - && connectionId.equals(other.connectionId) - && createdAt.equals(other.createdAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.memberType, this.type, this.connectionId, this.createdAt); - } - - @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 memberType = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional connectionId = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GroupMember other) { - id(other.getId()); - memberType(other.getMemberType()); - type(other.getType()); - connectionId(other.getConnectionId()); - createdAt(other.getCreatedAt()); - return this; - } - - /** - *

Unique identifier for the member.

- */ - @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 = "member_type", nulls = Nulls.SKIP) - public Builder memberType(Optional memberType) { - this.memberType = memberType; - return this; - } - - public Builder memberType(GroupMemberTypeEnum memberType) { - this.memberType = Optional.ofNullable(memberType); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(GroupTypeEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

Identifier for the connection this group belongs to (if a connection group).

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - return this; - } - - /** - *

Timestamp of when the membership 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; - } - - public GroupMember build() { - return new GroupMember(id, memberType, type, connectionId, createdAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GroupMemberTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/GroupMemberTypeEnum.java deleted file mode 100644 index f0b923d9d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GroupMemberTypeEnum.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class GroupMemberTypeEnum { - public static final GroupMemberTypeEnum USER = new GroupMemberTypeEnum(Value.USER, "user"); - - public static final GroupMemberTypeEnum GROUP = new GroupMemberTypeEnum(Value.GROUP, "group"); - - private final Value value; - - private final String string; - - GroupMemberTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof GroupMemberTypeEnum && this.string.equals(((GroupMemberTypeEnum) 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 GROUP: - return visitor.visitGroup(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static GroupMemberTypeEnum valueOf(String value) { - switch (value) { - case "user": - return USER; - case "group": - return GROUP; - default: - return new GroupMemberTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - USER, - - GROUP, - - UNKNOWN - } - - public interface Visitor { - T visitUser(); - - T visitGroup(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GroupTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/GroupTypeEnum.java deleted file mode 100644 index 65f415174..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GroupTypeEnum.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class GroupTypeEnum { - public static final GroupTypeEnum ORGANIZATION = new GroupTypeEnum(Value.ORGANIZATION, "organization"); - - public static final GroupTypeEnum TENANT = new GroupTypeEnum(Value.TENANT, "tenant"); - - public static final GroupTypeEnum CONNECTION = new GroupTypeEnum(Value.CONNECTION, "connection"); - - private final Value value; - - private final String string; - - GroupTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof GroupTypeEnum && this.string.equals(((GroupTypeEnum) 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 TENANT: - return visitor.visitTenant(); - case CONNECTION: - return visitor.visitConnection(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static GroupTypeEnum valueOf(String value) { - switch (value) { - case "organization": - return ORGANIZATION; - case "tenant": - return TENANT; - case "connection": - return CONNECTION; - default: - return new GroupTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - CONNECTION, - - ORGANIZATION, - - TENANT, - - UNKNOWN - } - - public interface Visitor { - T visitConnection(); - - T visitOrganization(); - - T visitTenant(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GuardianEnrollmentFactorEnum.java b/src/main/java/com/auth0/client/mgmt/types/GuardianEnrollmentFactorEnum.java deleted file mode 100644 index 03409797d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GuardianEnrollmentFactorEnum.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class GuardianEnrollmentFactorEnum { - public static final GuardianEnrollmentFactorEnum EMAIL = new GuardianEnrollmentFactorEnum(Value.EMAIL, "email"); - - public static final GuardianEnrollmentFactorEnum OTP = new GuardianEnrollmentFactorEnum(Value.OTP, "otp"); - - public static final GuardianEnrollmentFactorEnum WEBAUTHN_PLATFORM = - new GuardianEnrollmentFactorEnum(Value.WEBAUTHN_PLATFORM, "webauthn-platform"); - - public static final GuardianEnrollmentFactorEnum PHONE = new GuardianEnrollmentFactorEnum(Value.PHONE, "phone"); - - public static final GuardianEnrollmentFactorEnum PUSH_NOTIFICATION = - new GuardianEnrollmentFactorEnum(Value.PUSH_NOTIFICATION, "push-notification"); - - public static final GuardianEnrollmentFactorEnum WEBAUTHN_ROAMING = - new GuardianEnrollmentFactorEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); - - private final Value value; - - private final String string; - - GuardianEnrollmentFactorEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof GuardianEnrollmentFactorEnum - && this.string.equals(((GuardianEnrollmentFactorEnum) 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 OTP: - return visitor.visitOtp(); - case WEBAUTHN_PLATFORM: - return visitor.visitWebauthnPlatform(); - case PHONE: - return visitor.visitPhone(); - case PUSH_NOTIFICATION: - return visitor.visitPushNotification(); - case WEBAUTHN_ROAMING: - return visitor.visitWebauthnRoaming(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static GuardianEnrollmentFactorEnum valueOf(String value) { - switch (value) { - case "email": - return EMAIL; - case "otp": - return OTP; - case "webauthn-platform": - return WEBAUTHN_PLATFORM; - case "phone": - return PHONE; - case "push-notification": - return PUSH_NOTIFICATION; - case "webauthn-roaming": - return WEBAUTHN_ROAMING; - default: - return new GuardianEnrollmentFactorEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PUSH_NOTIFICATION, - - PHONE, - - EMAIL, - - OTP, - - WEBAUTHN_ROAMING, - - WEBAUTHN_PLATFORM, - - UNKNOWN - } - - public interface Visitor { - T visitPushNotification(); - - T visitPhone(); - - T visitEmail(); - - T visitOtp(); - - T visitWebauthnRoaming(); - - T visitWebauthnPlatform(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GuardianEnrollmentStatus.java b/src/main/java/com/auth0/client/mgmt/types/GuardianEnrollmentStatus.java deleted file mode 100644 index 203f74178..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GuardianEnrollmentStatus.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class GuardianEnrollmentStatus { - public static final GuardianEnrollmentStatus PENDING = new GuardianEnrollmentStatus(Value.PENDING, "pending"); - - public static final GuardianEnrollmentStatus CONFIRMED = new GuardianEnrollmentStatus(Value.CONFIRMED, "confirmed"); - - private final Value value; - - private final String string; - - GuardianEnrollmentStatus(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof GuardianEnrollmentStatus - && this.string.equals(((GuardianEnrollmentStatus) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PENDING: - return visitor.visitPending(); - case CONFIRMED: - return visitor.visitConfirmed(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static GuardianEnrollmentStatus valueOf(String value) { - switch (value) { - case "pending": - return PENDING; - case "confirmed": - return CONFIRMED; - default: - return new GuardianEnrollmentStatus(Value.UNKNOWN, value); - } - } - - public enum Value { - PENDING, - - CONFIRMED, - - UNKNOWN - } - - public interface Visitor { - T visitPending(); - - T visitConfirmed(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GuardianFactor.java b/src/main/java/com/auth0/client/mgmt/types/GuardianFactor.java deleted file mode 100644 index 8cca5a606..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GuardianFactor.java +++ /dev/null @@ -1,187 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GuardianFactor.Builder.class) -public final class GuardianFactor { - private final boolean enabled; - - private final Optional trialExpired; - - private final Optional name; - - private final Map additionalProperties; - - private GuardianFactor( - boolean enabled, - Optional trialExpired, - Optional name, - Map additionalProperties) { - this.enabled = enabled; - this.trialExpired = trialExpired; - this.name = name; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether this factor is enabled (true) or disabled (false). - */ - @JsonProperty("enabled") - public boolean getEnabled() { - return enabled; - } - - /** - * @return Whether trial limits have been exceeded. - */ - @JsonProperty("trial_expired") - public Optional getTrialExpired() { - return trialExpired; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GuardianFactor && equalTo((GuardianFactor) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GuardianFactor other) { - return enabled == other.enabled && trialExpired.equals(other.trialExpired) && name.equals(other.name); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled, this.trialExpired, this.name); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EnabledStage builder() { - return new Builder(); - } - - public interface EnabledStage { - /** - *

Whether this factor is enabled (true) or disabled (false).

- */ - _FinalStage enabled(boolean enabled); - - Builder from(GuardianFactor other); - } - - public interface _FinalStage { - GuardianFactor build(); - - /** - *

Whether trial limits have been exceeded.

- */ - _FinalStage trialExpired(Optional trialExpired); - - _FinalStage trialExpired(Boolean trialExpired); - - _FinalStage name(Optional name); - - _FinalStage name(GuardianFactorNameEnum name); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EnabledStage, _FinalStage { - private boolean enabled; - - private Optional name = Optional.empty(); - - private Optional trialExpired = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GuardianFactor other) { - enabled(other.getEnabled()); - trialExpired(other.getTrialExpired()); - name(other.getName()); - 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. - */ - @java.lang.Override - @JsonSetter("enabled") - public _FinalStage enabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - @java.lang.Override - public _FinalStage name(GuardianFactorNameEnum name) { - this.name = Optional.ofNullable(name); - return this; - } - - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - /** - *

Whether trial limits have been exceeded.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage trialExpired(Boolean trialExpired) { - this.trialExpired = Optional.ofNullable(trialExpired); - return this; - } - - /** - *

Whether trial limits have been exceeded.

- */ - @java.lang.Override - @JsonSetter(value = "trial_expired", nulls = Nulls.SKIP) - public _FinalStage trialExpired(Optional trialExpired) { - this.trialExpired = trialExpired; - return this; - } - - @java.lang.Override - public GuardianFactor build() { - return new GuardianFactor(enabled, trialExpired, name, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GuardianFactorNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/GuardianFactorNameEnum.java deleted file mode 100644 index 4c9117e5d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GuardianFactorNameEnum.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class GuardianFactorNameEnum { - public static final GuardianFactorNameEnum EMAIL = new GuardianFactorNameEnum(Value.EMAIL, "email"); - - public static final GuardianFactorNameEnum DUO = new GuardianFactorNameEnum(Value.DUO, "duo"); - - public static final GuardianFactorNameEnum OTP = new GuardianFactorNameEnum(Value.OTP, "otp"); - - public static final GuardianFactorNameEnum WEBAUTHN_PLATFORM = - new GuardianFactorNameEnum(Value.WEBAUTHN_PLATFORM, "webauthn-platform"); - - public static final GuardianFactorNameEnum PUSH_NOTIFICATION = - new GuardianFactorNameEnum(Value.PUSH_NOTIFICATION, "push-notification"); - - public static final GuardianFactorNameEnum SMS = new GuardianFactorNameEnum(Value.SMS, "sms"); - - public static final GuardianFactorNameEnum WEBAUTHN_ROAMING = - new GuardianFactorNameEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); - - public static final GuardianFactorNameEnum RECOVERY_CODE = - new GuardianFactorNameEnum(Value.RECOVERY_CODE, "recovery-code"); - - private final Value value; - - private final String string; - - GuardianFactorNameEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof GuardianFactorNameEnum - && this.string.equals(((GuardianFactorNameEnum) 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 DUO: - return visitor.visitDuo(); - case OTP: - return visitor.visitOtp(); - case WEBAUTHN_PLATFORM: - return visitor.visitWebauthnPlatform(); - case PUSH_NOTIFICATION: - return visitor.visitPushNotification(); - case SMS: - return visitor.visitSms(); - case WEBAUTHN_ROAMING: - return visitor.visitWebauthnRoaming(); - case RECOVERY_CODE: - return visitor.visitRecoveryCode(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static GuardianFactorNameEnum valueOf(String value) { - switch (value) { - case "email": - return EMAIL; - case "duo": - return DUO; - case "otp": - return OTP; - case "webauthn-platform": - return WEBAUTHN_PLATFORM; - case "push-notification": - return PUSH_NOTIFICATION; - case "sms": - return SMS; - case "webauthn-roaming": - return WEBAUTHN_ROAMING; - case "recovery-code": - return RECOVERY_CODE; - default: - return new GuardianFactorNameEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PUSH_NOTIFICATION, - - SMS, - - EMAIL, - - DUO, - - OTP, - - WEBAUTHN_ROAMING, - - WEBAUTHN_PLATFORM, - - RECOVERY_CODE, - - UNKNOWN - } - - public interface Visitor { - T visitPushNotification(); - - T visitSms(); - - T visitEmail(); - - T visitDuo(); - - T visitOtp(); - - T visitWebauthnRoaming(); - - T visitWebauthnPlatform(); - - T visitRecoveryCode(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GuardianFactorPhoneFactorMessageTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/GuardianFactorPhoneFactorMessageTypeEnum.java deleted file mode 100644 index 028a2a4e7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GuardianFactorPhoneFactorMessageTypeEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class GuardianFactorPhoneFactorMessageTypeEnum { - public static final GuardianFactorPhoneFactorMessageTypeEnum VOICE = - new GuardianFactorPhoneFactorMessageTypeEnum(Value.VOICE, "voice"); - - public static final GuardianFactorPhoneFactorMessageTypeEnum SMS = - new GuardianFactorPhoneFactorMessageTypeEnum(Value.SMS, "sms"); - - private final Value value; - - private final String string; - - GuardianFactorPhoneFactorMessageTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof GuardianFactorPhoneFactorMessageTypeEnum - && this.string.equals(((GuardianFactorPhoneFactorMessageTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case VOICE: - return visitor.visitVoice(); - case SMS: - return visitor.visitSms(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static GuardianFactorPhoneFactorMessageTypeEnum valueOf(String value) { - switch (value) { - case "voice": - return VOICE; - case "sms": - return SMS; - default: - return new GuardianFactorPhoneFactorMessageTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - SMS, - - VOICE, - - UNKNOWN - } - - public interface Visitor { - T visitSms(); - - T visitVoice(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GuardianFactorsProviderPushNotificationProviderDataEnum.java b/src/main/java/com/auth0/client/mgmt/types/GuardianFactorsProviderPushNotificationProviderDataEnum.java deleted file mode 100644 index a960f2730..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GuardianFactorsProviderPushNotificationProviderDataEnum.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class GuardianFactorsProviderPushNotificationProviderDataEnum { - public static final GuardianFactorsProviderPushNotificationProviderDataEnum GUARDIAN = - new GuardianFactorsProviderPushNotificationProviderDataEnum(Value.GUARDIAN, "guardian"); - - public static final GuardianFactorsProviderPushNotificationProviderDataEnum SNS = - new GuardianFactorsProviderPushNotificationProviderDataEnum(Value.SNS, "sns"); - - public static final GuardianFactorsProviderPushNotificationProviderDataEnum DIRECT = - new GuardianFactorsProviderPushNotificationProviderDataEnum(Value.DIRECT, "direct"); - - private final Value value; - - private final String string; - - GuardianFactorsProviderPushNotificationProviderDataEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof GuardianFactorsProviderPushNotificationProviderDataEnum - && this.string.equals( - ((GuardianFactorsProviderPushNotificationProviderDataEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GUARDIAN: - return visitor.visitGuardian(); - case SNS: - return visitor.visitSns(); - case DIRECT: - return visitor.visitDirect(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static GuardianFactorsProviderPushNotificationProviderDataEnum valueOf(String value) { - switch (value) { - case "guardian": - return GUARDIAN; - case "sns": - return SNS; - case "direct": - return DIRECT; - default: - return new GuardianFactorsProviderPushNotificationProviderDataEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - GUARDIAN, - - SNS, - - DIRECT, - - UNKNOWN - } - - public interface Visitor { - T visitGuardian(); - - T visitSns(); - - T visitDirect(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/GuardianFactorsProviderSmsProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/GuardianFactorsProviderSmsProviderEnum.java deleted file mode 100644 index d56e13452..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/GuardianFactorsProviderSmsProviderEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class GuardianFactorsProviderSmsProviderEnum { - public static final GuardianFactorsProviderSmsProviderEnum PHONE_MESSAGE_HOOK = - new GuardianFactorsProviderSmsProviderEnum(Value.PHONE_MESSAGE_HOOK, "phone-message-hook"); - - public static final GuardianFactorsProviderSmsProviderEnum TWILIO = - new GuardianFactorsProviderSmsProviderEnum(Value.TWILIO, "twilio"); - - public static final GuardianFactorsProviderSmsProviderEnum AUTH0 = - new GuardianFactorsProviderSmsProviderEnum(Value.AUTH0, "auth0"); - - private final Value value; - - private final String string; - - GuardianFactorsProviderSmsProviderEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof GuardianFactorsProviderSmsProviderEnum - && this.string.equals(((GuardianFactorsProviderSmsProviderEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PHONE_MESSAGE_HOOK: - return visitor.visitPhoneMessageHook(); - case TWILIO: - return visitor.visitTwilio(); - case AUTH0: - return visitor.visitAuth0(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static GuardianFactorsProviderSmsProviderEnum valueOf(String value) { - switch (value) { - case "phone-message-hook": - return PHONE_MESSAGE_HOOK; - case "twilio": - return TWILIO; - case "auth0": - return AUTH0; - default: - return new GuardianFactorsProviderSmsProviderEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AUTH0, - - TWILIO, - - PHONE_MESSAGE_HOOK, - - UNKNOWN - } - - public interface Visitor { - T visitAuth0(); - - T visitTwilio(); - - T visitPhoneMessageHook(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/Hook.java b/src/main/java/com/auth0/client/mgmt/types/Hook.java deleted file mode 100644 index b29098a24..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/Hook.java +++ /dev/null @@ -1,247 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = Hook.Builder.class) -public final class Hook { - private final Optional triggerId; - - private final Optional id; - - private final Optional name; - - private final Optional enabled; - - private final Optional script; - - private final Optional> dependencies; - - private final Map additionalProperties; - - private Hook( - Optional triggerId, - Optional id, - Optional name, - Optional enabled, - Optional script, - Optional> dependencies, - Map additionalProperties) { - this.triggerId = triggerId; - this.id = id; - this.name = name; - this.enabled = enabled; - this.script = script; - this.dependencies = dependencies; - this.additionalProperties = additionalProperties; - } - - /** - * @return Trigger ID - */ - @JsonProperty("triggerId") - public Optional getTriggerId() { - return triggerId; - } - - /** - * @return ID of this hook. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Name of this hook. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Whether this hook will be executed (true) or ignored (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Code to be executed when this hook runs. - */ - @JsonProperty("script") - public Optional getScript() { - return script; - } - - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Hook && equalTo((Hook) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(Hook other) { - return triggerId.equals(other.triggerId) - && id.equals(other.id) - && name.equals(other.name) - && enabled.equals(other.enabled) - && script.equals(other.script) - && dependencies.equals(other.dependencies); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.triggerId, this.id, this.name, this.enabled, this.script, this.dependencies); - } - - @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 triggerId = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional enabled = Optional.empty(); - - private Optional script = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(Hook other) { - triggerId(other.getTriggerId()); - id(other.getId()); - name(other.getName()); - enabled(other.getEnabled()); - script(other.getScript()); - dependencies(other.getDependencies()); - return this; - } - - /** - *

Trigger ID

- */ - @JsonSetter(value = "triggerId", nulls = Nulls.SKIP) - public Builder triggerId(Optional triggerId) { - this.triggerId = triggerId; - return this; - } - - public Builder triggerId(String triggerId) { - this.triggerId = Optional.ofNullable(triggerId); - return this; - } - - /** - *

ID of this hook.

- */ - @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; - } - - /** - *

Name of this hook.

- */ - @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 hook will be executed (true) or ignored (false).

- */ - @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; - } - - /** - *

Code to be executed when this hook runs.

- */ - @JsonSetter(value = "script", nulls = Nulls.SKIP) - public Builder script(Optional script) { - this.script = script; - return this; - } - - public Builder script(String script) { - this.script = Optional.ofNullable(script); - return this; - } - - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public Builder dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - public Builder dependencies(Map dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - public Hook build() { - return new Hook(triggerId, id, name, enabled, script, dependencies, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/HookTriggerIdEnum.java b/src/main/java/com/auth0/client/mgmt/types/HookTriggerIdEnum.java deleted file mode 100644 index e90d154bd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/HookTriggerIdEnum.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class HookTriggerIdEnum { - public static final HookTriggerIdEnum CREDENTIALS_EXCHANGE = - new HookTriggerIdEnum(Value.CREDENTIALS_EXCHANGE, "credentials-exchange"); - - public static final HookTriggerIdEnum POST_USER_REGISTRATION = - new HookTriggerIdEnum(Value.POST_USER_REGISTRATION, "post-user-registration"); - - public static final HookTriggerIdEnum PRE_USER_REGISTRATION = - new HookTriggerIdEnum(Value.PRE_USER_REGISTRATION, "pre-user-registration"); - - public static final HookTriggerIdEnum POST_CHANGE_PASSWORD = - new HookTriggerIdEnum(Value.POST_CHANGE_PASSWORD, "post-change-password"); - - public static final HookTriggerIdEnum SEND_PHONE_MESSAGE = - new HookTriggerIdEnum(Value.SEND_PHONE_MESSAGE, "send-phone-message"); - - private final Value value; - - private final String string; - - HookTriggerIdEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof HookTriggerIdEnum && this.string.equals(((HookTriggerIdEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CREDENTIALS_EXCHANGE: - return visitor.visitCredentialsExchange(); - case POST_USER_REGISTRATION: - return visitor.visitPostUserRegistration(); - case PRE_USER_REGISTRATION: - return visitor.visitPreUserRegistration(); - case POST_CHANGE_PASSWORD: - return visitor.visitPostChangePassword(); - case SEND_PHONE_MESSAGE: - return visitor.visitSendPhoneMessage(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static HookTriggerIdEnum valueOf(String value) { - switch (value) { - case "credentials-exchange": - return CREDENTIALS_EXCHANGE; - case "post-user-registration": - return POST_USER_REGISTRATION; - case "pre-user-registration": - return PRE_USER_REGISTRATION; - case "post-change-password": - return POST_CHANGE_PASSWORD; - case "send-phone-message": - return SEND_PHONE_MESSAGE; - default: - return new HookTriggerIdEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - CREDENTIALS_EXCHANGE, - - PRE_USER_REGISTRATION, - - POST_USER_REGISTRATION, - - POST_CHANGE_PASSWORD, - - SEND_PHONE_MESSAGE, - - UNKNOWN - } - - public interface Visitor { - T visitCredentialsExchange(); - - T visitPreUserRegistration(); - - T visitPostUserRegistration(); - - T visitPostChangePassword(); - - T visitSendPhoneMessage(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/HttpCustomHeader.java b/src/main/java/com/auth0/client/mgmt/types/HttpCustomHeader.java deleted file mode 100644 index 1764d0864..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/HttpCustomHeader.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = HttpCustomHeader.Builder.class) -public final class HttpCustomHeader { - private final Optional header; - - private final Optional value; - - private final Map additionalProperties; - - private HttpCustomHeader( - Optional header, Optional value, Map additionalProperties) { - this.header = header; - this.value = value; - this.additionalProperties = additionalProperties; - } - - /** - * @return HTTP header name - */ - @JsonProperty("header") - public Optional getHeader() { - return header; - } - - /** - * @return HTTP header value - */ - @JsonProperty("value") - public Optional getValue() { - return value; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof HttpCustomHeader && equalTo((HttpCustomHeader) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(HttpCustomHeader other) { - return header.equals(other.header) && value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.header, this.value); - } - - @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 header = Optional.empty(); - - private Optional value = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(HttpCustomHeader other) { - header(other.getHeader()); - value(other.getValue()); - return this; - } - - /** - *

HTTP header name

- */ - @JsonSetter(value = "header", nulls = Nulls.SKIP) - public Builder header(Optional header) { - this.header = header; - return this; - } - - public Builder header(String header) { - this.header = Optional.ofNullable(header); - return this; - } - - /** - *

HTTP header value

- */ - @JsonSetter(value = "value", nulls = Nulls.SKIP) - public Builder value(Optional value) { - this.value = value; - return this; - } - - public Builder value(String value) { - this.value = Optional.ofNullable(value); - return this; - } - - public HttpCustomHeader build() { - return new HttpCustomHeader(header, value, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IConnectionCommon.java b/src/main/java/com/auth0/client/mgmt/types/IConnectionCommon.java deleted file mode 100644 index 51b04068e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionCommon.java +++ /dev/null @@ -1,19 +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.OptionalNullable; -import java.util.List; -import java.util.Map; -import java.util.Optional; - -public interface IConnectionCommon { - Optional getDisplayName(); - - Optional> getEnabledClients(); - - Optional getIsDomainConnection(); - - Optional>> getMetadata(); -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommon.java b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommon.java deleted file mode 100644 index cd00a9eca..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommon.java +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import java.util.List; -import java.util.Optional; - -public interface IConnectionOptionsCommon { - Optional> getNonPersistentAttrs(); -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonOidc.java b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonOidc.java deleted file mode 100644 index 8ca9481c1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonOidc.java +++ /dev/null @@ -1,51 +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.OptionalNullable; -import java.util.List; -import java.util.Map; -import java.util.Optional; - -public interface IConnectionOptionsCommonOidc { - Optional getAuthorizationEndpoint(); - - String getClientId(); - - Optional getClientSecret(); - - Optional getConnectionSettings(); - - OptionalNullable getFederatedConnectionsAccessTokens(); - - Optional> getDomainAliases(); - - Optional getIconUrl(); - - OptionalNullable> getIdTokenSignedResponseAlgs(); - - Optional getIssuer(); - - Optional getJwksUri(); - - Optional getOidcMetadata(); - - Optional getScope(); - - Optional getSendBackChannelNonce(); - - Optional getSetUserRootAttributes(); - - Optional getTenantDomain(); - - Optional getTokenEndpoint(); - - OptionalNullable getTokenEndpointAuthMethod(); - - OptionalNullable getTokenEndpointAuthSigningAlg(); - - OptionalNullable>> getUpstreamParams(); - - Optional getUserinfoEndpoint(); -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonSaml.java b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonSaml.java deleted file mode 100644 index 7283adea7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsCommonSaml.java +++ /dev/null @@ -1,41 +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.OptionalNullable; -import java.util.List; -import java.util.Map; -import java.util.Optional; - -public interface IConnectionOptionsCommonSaml { - Optional getCert(); - - Optional getDecryptionKey(); - - Optional getDigestAlgorithm(); - - Optional> getDomainAliases(); - - Optional getEntityId(); - - Optional getIconUrl(); - - Optional getIdpinitiated(); - - Optional getProtocolBinding(); - - Optional getSetUserRootAttributes(); - - Optional getSignInEndpoint(); - - Optional getSignSamlRequest(); - - Optional getSignatureAlgorithm(); - - Optional getTenantDomain(); - - Optional> getThumbprints(); - - OptionalNullable>> getUpstreamParams(); -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsOAuth1Common.java b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsOAuth1Common.java deleted file mode 100644 index 57a96499b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsOAuth1Common.java +++ /dev/null @@ -1,18 +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.OptionalNullable; -import java.util.Map; -import java.util.Optional; - -public interface IConnectionOptionsOAuth1Common extends IConnectionOptionsCommon { - Optional getClientId(); - - Optional getClientSecret(); - - Optional getSetUserRootAttributes(); - - OptionalNullable>> getUpstreamParams(); -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsOAuth2Common.java b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsOAuth2Common.java deleted file mode 100644 index 41b91b37f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsOAuth2Common.java +++ /dev/null @@ -1,20 +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.OptionalNullable; -import java.util.Map; -import java.util.Optional; - -public interface IConnectionOptionsOAuth2Common extends IConnectionOptionsCommon { - Optional getClientId(); - - Optional getClientSecret(); - - Optional getScope(); - - Optional getSetUserRootAttributes(); - - OptionalNullable>> getUpstreamParams(); -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsSalesforce.java b/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsSalesforce.java deleted file mode 100644 index 121608e1c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionOptionsSalesforce.java +++ /dev/null @@ -1,25 +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.OptionalNullable; -import java.util.List; -import java.util.Map; -import java.util.Optional; - -public interface IConnectionOptionsSalesforce extends IConnectionOptionsCommon { - Optional getClientId(); - - Optional getClientSecret(); - - Optional> getFreeformScopes(); - - Optional getProfile(); - - Optional> getScope(); - - Optional getSetUserRootAttributes(); - - OptionalNullable>> getUpstreamParams(); -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IConnectionPurposes.java b/src/main/java/com/auth0/client/mgmt/types/IConnectionPurposes.java deleted file mode 100644 index 45fc5c5c5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionPurposes.java +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import java.util.Optional; - -public interface IConnectionPurposes { - Optional getAuthentication(); - - Optional getConnectedAccounts(); -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IConnectionResponseCommon.java b/src/main/java/com/auth0/client/mgmt/types/IConnectionResponseCommon.java deleted file mode 100644 index e5676e6fa..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IConnectionResponseCommon.java +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import java.util.List; -import java.util.Optional; - -public interface IConnectionResponseCommon extends ICreateConnectionCommon { - Optional getId(); - - Optional> getRealms(); -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ICreateConnectionCommon.java b/src/main/java/com/auth0/client/mgmt/types/ICreateConnectionCommon.java deleted file mode 100644 index 4bc587b14..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ICreateConnectionCommon.java +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import java.util.Optional; - -public interface ICreateConnectionCommon extends IConnectionCommon { - Optional getName(); -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IGroup.java b/src/main/java/com/auth0/client/mgmt/types/IGroup.java deleted file mode 100644 index d73bc81f0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IGroup.java +++ /dev/null @@ -1,28 +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.OptionalNullable; -import java.time.OffsetDateTime; -import java.util.Optional; - -public interface IGroup { - Optional getId(); - - Optional getName(); - - Optional getExternalId(); - - Optional getConnectionId(); - - OptionalNullable getOrganizationId(); - - Optional getTenantName(); - - OptionalNullable getDescription(); - - Optional getCreatedAt(); - - Optional getUpdatedAt(); -} diff --git a/src/main/java/com/auth0/client/mgmt/types/Identity.java b/src/main/java/com/auth0/client/mgmt/types/Identity.java deleted file mode 100644 index 7be1f5779..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/Identity.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = Identity.Builder.class) -public final class Identity { - private final String userId; - - private final IdentityProviderEnum provider; - - private final Optional connectionId; - - private final Map additionalProperties; - - private Identity( - String userId, - IdentityProviderEnum provider, - Optional connectionId, - Map additionalProperties) { - this.userId = userId; - this.provider = provider; - this.connectionId = connectionId; - this.additionalProperties = additionalProperties; - } - - /** - * @return user_id of the identity to be verified. - */ - @JsonProperty("user_id") - public String getUserId() { - return userId; - } - - @JsonProperty("provider") - public IdentityProviderEnum getProvider() { - return provider; - } - - /** - * @return connection_id of the identity. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Identity && equalTo((Identity) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(Identity other) { - return userId.equals(other.userId) - && provider.equals(other.provider) - && connectionId.equals(other.connectionId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.userId, this.provider, this.connectionId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static UserIdStage builder() { - return new Builder(); - } - - public interface UserIdStage { - /** - *

user_id of the identity to be verified.

- */ - ProviderStage userId(@NotNull String userId); - - Builder from(Identity other); - } - - public interface ProviderStage { - _FinalStage provider(@NotNull IdentityProviderEnum provider); - } - - public interface _FinalStage { - Identity build(); - - /** - *

connection_id of the identity.

- */ - _FinalStage connectionId(Optional connectionId); - - _FinalStage connectionId(String connectionId); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements UserIdStage, ProviderStage, _FinalStage { - private String userId; - - private IdentityProviderEnum provider; - - private Optional connectionId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(Identity other) { - userId(other.getUserId()); - provider(other.getProvider()); - connectionId(other.getConnectionId()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("user_id") - public ProviderStage userId(@NotNull String userId) { - this.userId = Objects.requireNonNull(userId, "userId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("provider") - public _FinalStage provider(@NotNull IdentityProviderEnum provider) { - this.provider = Objects.requireNonNull(provider, "provider must not be null"); - return this; - } - - /** - *

connection_id of the identity.

- * @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; - } - - /** - *

connection_id of the identity.

- */ - @java.lang.Override - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public _FinalStage connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - @java.lang.Override - public Identity build() { - return new Identity(userId, provider, connectionId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IdentityProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/IdentityProviderEnum.java deleted file mode 100644 index 38a726017..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IdentityProviderEnum.java +++ /dev/null @@ -1,692 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class IdentityProviderEnum { - public static final IdentityProviderEnum SHOP = new IdentityProviderEnum(Value.SHOP, "shop"); - - public static final IdentityProviderEnum AUTH0OIDC = new IdentityProviderEnum(Value.AUTH0OIDC, "auth0-oidc"); - - public static final IdentityProviderEnum DWOLLA = new IdentityProviderEnum(Value.DWOLLA, "dwolla"); - - public static final IdentityProviderEnum FLICKR = new IdentityProviderEnum(Value.FLICKR, "flickr"); - - public static final IdentityProviderEnum OKTA = new IdentityProviderEnum(Value.OKTA, "okta"); - - public static final IdentityProviderEnum PLANNINGCENTER = - new IdentityProviderEnum(Value.PLANNINGCENTER, "planningcenter"); - - public static final IdentityProviderEnum GOOGLE_OAUTH2 = - new IdentityProviderEnum(Value.GOOGLE_OAUTH2, "google-oauth2"); - - public static final IdentityProviderEnum AUTH0 = new IdentityProviderEnum(Value.AUTH0, "auth0"); - - public static final IdentityProviderEnum EXACT = new IdentityProviderEnum(Value.EXACT, "exact"); - - public static final IdentityProviderEnum WORDPRESS = new IdentityProviderEnum(Value.WORDPRESS, "wordpress"); - - public static final IdentityProviderEnum FITBIT = new IdentityProviderEnum(Value.FITBIT, "fitbit"); - - public static final IdentityProviderEnum EVERNOTE = new IdentityProviderEnum(Value.EVERNOTE, "evernote"); - - public static final IdentityProviderEnum SHAREPOINT = new IdentityProviderEnum(Value.SHAREPOINT, "sharepoint"); - - public static final IdentityProviderEnum SHOPIFY = new IdentityProviderEnum(Value.SHOPIFY, "shopify"); - - public static final IdentityProviderEnum SALESFORCE_SANDBOX = - new IdentityProviderEnum(Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); - - public static final IdentityProviderEnum MIICARD = new IdentityProviderEnum(Value.MIICARD, "miicard"); - - public static final IdentityProviderEnum FACEBOOK = new IdentityProviderEnum(Value.FACEBOOK, "facebook"); - - public static final IdentityProviderEnum OAUTH1 = new IdentityProviderEnum(Value.OAUTH1, "oauth1"); - - public static final IdentityProviderEnum APPLE = new IdentityProviderEnum(Value.APPLE, "apple"); - - public static final IdentityProviderEnum UNTAPPD = new IdentityProviderEnum(Value.UNTAPPD, "untappd"); - - public static final IdentityProviderEnum AMAZON = new IdentityProviderEnum(Value.AMAZON, "amazon"); - - public static final IdentityProviderEnum LINE = new IdentityProviderEnum(Value.LINE, "line"); - - public static final IdentityProviderEnum BITBUCKET = new IdentityProviderEnum(Value.BITBUCKET, "bitbucket"); - - public static final IdentityProviderEnum GITHUB = new IdentityProviderEnum(Value.GITHUB, "github"); - - public static final IdentityProviderEnum SALESFORCE = new IdentityProviderEnum(Value.SALESFORCE, "salesforce"); - - public static final IdentityProviderEnum OFFICE365 = new IdentityProviderEnum(Value.OFFICE365, "office365"); - - public static final IdentityProviderEnum SMS = new IdentityProviderEnum(Value.SMS, "sms"); - - public static final IdentityProviderEnum AOL = new IdentityProviderEnum(Value.AOL, "aol"); - - public static final IdentityProviderEnum TWITTER = new IdentityProviderEnum(Value.TWITTER, "twitter"); - - public static final IdentityProviderEnum WINDOWSLIVE = new IdentityProviderEnum(Value.WINDOWSLIVE, "windowslive"); - - public static final IdentityProviderEnum YANDEX = new IdentityProviderEnum(Value.YANDEX, "yandex"); - - public static final IdentityProviderEnum AD = new IdentityProviderEnum(Value.AD, "ad"); - - public static final IdentityProviderEnum BAIDU = new IdentityProviderEnum(Value.BAIDU, "baidu"); - - public static final IdentityProviderEnum BITLY = new IdentityProviderEnum(Value.BITLY, "bitly"); - - public static final IdentityProviderEnum PAYPAL_SANDBOX = - new IdentityProviderEnum(Value.PAYPAL_SANDBOX, "paypal-sandbox"); - - public static final IdentityProviderEnum RENREN = new IdentityProviderEnum(Value.RENREN, "renren"); - - public static final IdentityProviderEnum SAMLP = new IdentityProviderEnum(Value.SAMLP, "samlp"); - - public static final IdentityProviderEnum DROPBOX = new IdentityProviderEnum(Value.DROPBOX, "dropbox"); - - public static final IdentityProviderEnum VKONTAKTE = new IdentityProviderEnum(Value.VKONTAKTE, "vkontakte"); - - public static final IdentityProviderEnum PINGFEDERATE = - new IdentityProviderEnum(Value.PINGFEDERATE, "pingfederate"); - - public static final IdentityProviderEnum INSTAGRAM = new IdentityProviderEnum(Value.INSTAGRAM, "instagram"); - - public static final IdentityProviderEnum THIRTYSEVENSIGNALS = - new IdentityProviderEnum(Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); - - public static final IdentityProviderEnum WAAD = new IdentityProviderEnum(Value.WAAD, "waad"); - - public static final IdentityProviderEnum THECITY_SANDBOX = - new IdentityProviderEnum(Value.THECITY_SANDBOX, "thecity-sandbox"); - - public static final IdentityProviderEnum OIDC = new IdentityProviderEnum(Value.OIDC, "oidc"); - - public static final IdentityProviderEnum YAMMER = new IdentityProviderEnum(Value.YAMMER, "yammer"); - - public static final IdentityProviderEnum EVERNOTE_SANDBOX = - new IdentityProviderEnum(Value.EVERNOTE_SANDBOX, "evernote-sandbox"); - - public static final IdentityProviderEnum SALESFORCE_COMMUNITY = - new IdentityProviderEnum(Value.SALESFORCE_COMMUNITY, "salesforce-community"); - - public static final IdentityProviderEnum DACCOUNT = new IdentityProviderEnum(Value.DACCOUNT, "daccount"); - - public static final IdentityProviderEnum SOUNDCLOUD = new IdentityProviderEnum(Value.SOUNDCLOUD, "soundcloud"); - - public static final IdentityProviderEnum OAUTH2 = new IdentityProviderEnum(Value.OAUTH2, "oauth2"); - - public static final IdentityProviderEnum BOX = new IdentityProviderEnum(Value.BOX, "box"); - - public static final IdentityProviderEnum IP = new IdentityProviderEnum(Value.IP, "ip"); - - public static final IdentityProviderEnum ADFS = new IdentityProviderEnum(Value.ADFS, "adfs"); - - public static final IdentityProviderEnum EMAIL = new IdentityProviderEnum(Value.EMAIL, "email"); - - public static final IdentityProviderEnum CUSTOM = new IdentityProviderEnum(Value.CUSTOM, "custom"); - - public static final IdentityProviderEnum YAHOO = new IdentityProviderEnum(Value.YAHOO, "yahoo"); - - public static final IdentityProviderEnum WEIBO = new IdentityProviderEnum(Value.WEIBO, "weibo"); - - public static final IdentityProviderEnum GOOGLE_APPS = new IdentityProviderEnum(Value.GOOGLE_APPS, "google-apps"); - - public static final IdentityProviderEnum PAYPAL = new IdentityProviderEnum(Value.PAYPAL, "paypal"); - - public static final IdentityProviderEnum LINKEDIN = new IdentityProviderEnum(Value.LINKEDIN, "linkedin"); - - public static final IdentityProviderEnum THECITY = new IdentityProviderEnum(Value.THECITY, "thecity"); - - private final Value value; - - private final String string; - - IdentityProviderEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof IdentityProviderEnum && this.string.equals(((IdentityProviderEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SHOP: - return visitor.visitShop(); - case AUTH0OIDC: - return visitor.visitAuth0Oidc(); - case DWOLLA: - return visitor.visitDwolla(); - case FLICKR: - return visitor.visitFlickr(); - case OKTA: - return visitor.visitOkta(); - case PLANNINGCENTER: - return visitor.visitPlanningcenter(); - case GOOGLE_OAUTH2: - return visitor.visitGoogleOauth2(); - case AUTH0: - return visitor.visitAuth0(); - case EXACT: - return visitor.visitExact(); - case WORDPRESS: - return visitor.visitWordpress(); - case FITBIT: - return visitor.visitFitbit(); - case EVERNOTE: - return visitor.visitEvernote(); - case SHAREPOINT: - return visitor.visitSharepoint(); - case SHOPIFY: - return visitor.visitShopify(); - case SALESFORCE_SANDBOX: - return visitor.visitSalesforceSandbox(); - case MIICARD: - return visitor.visitMiicard(); - case FACEBOOK: - return visitor.visitFacebook(); - case OAUTH1: - return visitor.visitOauth1(); - case APPLE: - return visitor.visitApple(); - case UNTAPPD: - return visitor.visitUntappd(); - case AMAZON: - return visitor.visitAmazon(); - case LINE: - return visitor.visitLine(); - case BITBUCKET: - return visitor.visitBitbucket(); - case GITHUB: - return visitor.visitGithub(); - case SALESFORCE: - return visitor.visitSalesforce(); - case OFFICE365: - return visitor.visitOffice365(); - case SMS: - return visitor.visitSms(); - case AOL: - return visitor.visitAol(); - case TWITTER: - return visitor.visitTwitter(); - case WINDOWSLIVE: - return visitor.visitWindowslive(); - case YANDEX: - return visitor.visitYandex(); - case AD: - return visitor.visitAd(); - case BAIDU: - return visitor.visitBaidu(); - case BITLY: - return visitor.visitBitly(); - case PAYPAL_SANDBOX: - return visitor.visitPaypalSandbox(); - case RENREN: - return visitor.visitRenren(); - case SAMLP: - return visitor.visitSamlp(); - case DROPBOX: - return visitor.visitDropbox(); - case VKONTAKTE: - return visitor.visitVkontakte(); - case PINGFEDERATE: - return visitor.visitPingfederate(); - case INSTAGRAM: - return visitor.visitInstagram(); - case THIRTYSEVENSIGNALS: - return visitor.visitThirtysevensignals(); - case WAAD: - return visitor.visitWaad(); - case THECITY_SANDBOX: - return visitor.visitThecitySandbox(); - case OIDC: - return visitor.visitOidc(); - case YAMMER: - return visitor.visitYammer(); - case EVERNOTE_SANDBOX: - return visitor.visitEvernoteSandbox(); - case SALESFORCE_COMMUNITY: - return visitor.visitSalesforceCommunity(); - case DACCOUNT: - return visitor.visitDaccount(); - case SOUNDCLOUD: - return visitor.visitSoundcloud(); - case OAUTH2: - return visitor.visitOauth2(); - case BOX: - return visitor.visitBox(); - case IP: - return visitor.visitIp(); - case ADFS: - return visitor.visitAdfs(); - case EMAIL: - return visitor.visitEmail(); - case CUSTOM: - return visitor.visitCustom(); - case YAHOO: - return visitor.visitYahoo(); - case WEIBO: - return visitor.visitWeibo(); - case GOOGLE_APPS: - return visitor.visitGoogleApps(); - case PAYPAL: - return visitor.visitPaypal(); - case LINKEDIN: - return visitor.visitLinkedin(); - case THECITY: - return visitor.visitThecity(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static IdentityProviderEnum valueOf(String value) { - switch (value) { - case "shop": - return SHOP; - case "auth0-oidc": - return AUTH0OIDC; - case "dwolla": - return DWOLLA; - case "flickr": - return FLICKR; - case "okta": - return OKTA; - case "planningcenter": - return PLANNINGCENTER; - case "google-oauth2": - return GOOGLE_OAUTH2; - case "auth0": - return AUTH0; - case "exact": - return EXACT; - case "wordpress": - return WORDPRESS; - case "fitbit": - return FITBIT; - case "evernote": - return EVERNOTE; - case "sharepoint": - return SHAREPOINT; - case "shopify": - return SHOPIFY; - case "salesforce-sandbox": - return SALESFORCE_SANDBOX; - case "miicard": - return MIICARD; - case "facebook": - return FACEBOOK; - case "oauth1": - return OAUTH1; - case "apple": - return APPLE; - case "untappd": - return UNTAPPD; - case "amazon": - return AMAZON; - case "line": - return LINE; - case "bitbucket": - return BITBUCKET; - case "github": - return GITHUB; - case "salesforce": - return SALESFORCE; - case "office365": - return OFFICE365; - case "sms": - return SMS; - case "aol": - return AOL; - case "twitter": - return TWITTER; - case "windowslive": - return WINDOWSLIVE; - case "yandex": - return YANDEX; - case "ad": - return AD; - case "baidu": - return BAIDU; - case "bitly": - return BITLY; - case "paypal-sandbox": - return PAYPAL_SANDBOX; - case "renren": - return RENREN; - case "samlp": - return SAMLP; - case "dropbox": - return DROPBOX; - case "vkontakte": - return VKONTAKTE; - case "pingfederate": - return PINGFEDERATE; - case "instagram": - return INSTAGRAM; - case "thirtysevensignals": - return THIRTYSEVENSIGNALS; - case "waad": - return WAAD; - case "thecity-sandbox": - return THECITY_SANDBOX; - case "oidc": - return OIDC; - case "yammer": - return YAMMER; - case "evernote-sandbox": - return EVERNOTE_SANDBOX; - case "salesforce-community": - return SALESFORCE_COMMUNITY; - case "daccount": - return DACCOUNT; - case "soundcloud": - return SOUNDCLOUD; - case "oauth2": - return OAUTH2; - case "box": - return BOX; - case "ip": - return IP; - case "adfs": - return ADFS; - case "email": - return EMAIL; - case "custom": - return CUSTOM; - case "yahoo": - return YAHOO; - case "weibo": - return WEIBO; - case "google-apps": - return GOOGLE_APPS; - case "paypal": - return PAYPAL; - case "linkedin": - return LINKEDIN; - case "thecity": - return THECITY; - default: - return new IdentityProviderEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AD, - - ADFS, - - AMAZON, - - APPLE, - - DROPBOX, - - BITBUCKET, - - AOL, - - AUTH0OIDC, - - AUTH0, - - BAIDU, - - BITLY, - - BOX, - - CUSTOM, - - DACCOUNT, - - DWOLLA, - - EMAIL, - - EVERNOTE_SANDBOX, - - EVERNOTE, - - EXACT, - - FACEBOOK, - - FITBIT, - - FLICKR, - - GITHUB, - - GOOGLE_APPS, - - GOOGLE_OAUTH2, - - INSTAGRAM, - - IP, - - LINE, - - LINKEDIN, - - MIICARD, - - OAUTH1, - - OAUTH2, - - OFFICE365, - - OIDC, - - OKTA, - - PAYPAL, - - PAYPAL_SANDBOX, - - PINGFEDERATE, - - PLANNINGCENTER, - - RENREN, - - SALESFORCE_COMMUNITY, - - SALESFORCE_SANDBOX, - - SALESFORCE, - - SAMLP, - - SHAREPOINT, - - SHOPIFY, - - SHOP, - - SMS, - - SOUNDCLOUD, - - THECITY_SANDBOX, - - THECITY, - - THIRTYSEVENSIGNALS, - - TWITTER, - - UNTAPPD, - - VKONTAKTE, - - WAAD, - - WEIBO, - - WINDOWSLIVE, - - WORDPRESS, - - YAHOO, - - YAMMER, - - YANDEX, - - UNKNOWN - } - - public interface Visitor { - T visitAd(); - - T visitAdfs(); - - T visitAmazon(); - - T visitApple(); - - T visitDropbox(); - - T visitBitbucket(); - - T visitAol(); - - T visitAuth0Oidc(); - - T visitAuth0(); - - T visitBaidu(); - - T visitBitly(); - - T visitBox(); - - T visitCustom(); - - T visitDaccount(); - - T visitDwolla(); - - T visitEmail(); - - T visitEvernoteSandbox(); - - T visitEvernote(); - - T visitExact(); - - T visitFacebook(); - - T visitFitbit(); - - T visitFlickr(); - - T visitGithub(); - - T visitGoogleApps(); - - T visitGoogleOauth2(); - - T visitInstagram(); - - T visitIp(); - - T visitLine(); - - T visitLinkedin(); - - T visitMiicard(); - - T visitOauth1(); - - T visitOauth2(); - - T visitOffice365(); - - T visitOidc(); - - T visitOkta(); - - T visitPaypal(); - - T visitPaypalSandbox(); - - T visitPingfederate(); - - T visitPlanningcenter(); - - T visitRenren(); - - T visitSalesforceCommunity(); - - T visitSalesforceSandbox(); - - T visitSalesforce(); - - T visitSamlp(); - - T visitSharepoint(); - - T visitShopify(); - - T visitShop(); - - T visitSms(); - - T visitSoundcloud(); - - T visitThecitySandbox(); - - T visitThecity(); - - T visitThirtysevensignals(); - - T visitTwitter(); - - T visitUntappd(); - - T visitVkontakte(); - - T visitWaad(); - - T visitWeibo(); - - T visitWindowslive(); - - T visitWordpress(); - - T visitYahoo(); - - T visitYammer(); - - T visitYandex(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IdentityProviderOnlyAuth0Enum.java b/src/main/java/com/auth0/client/mgmt/types/IdentityProviderOnlyAuth0Enum.java deleted file mode 100644 index 993009405..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IdentityProviderOnlyAuth0Enum.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class IdentityProviderOnlyAuth0Enum { - public static final IdentityProviderOnlyAuth0Enum AUTH0 = new IdentityProviderOnlyAuth0Enum(Value.AUTH0, "auth0"); - - private final Value value; - - private final String string; - - IdentityProviderOnlyAuth0Enum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof IdentityProviderOnlyAuth0Enum - && this.string.equals(((IdentityProviderOnlyAuth0Enum) 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 IdentityProviderOnlyAuth0Enum valueOf(String value) { - switch (value) { - case "auth0": - return AUTH0; - default: - return new IdentityProviderOnlyAuth0Enum(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/ImportEncryptionKeyResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ImportEncryptionKeyResponseContent.java deleted file mode 100644 index 588507ce7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ImportEncryptionKeyResponseContent.java +++ /dev/null @@ -1,417 +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.NotNull; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ImportEncryptionKeyResponseContent.Builder.class) -public final class ImportEncryptionKeyResponseContent { - private final String kid; - - private final EncryptionKeyType type; - - private final EncryptionKeyState state; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final OptionalNullable parentKid; - - private final OptionalNullable publicKey; - - private final Map additionalProperties; - - private ImportEncryptionKeyResponseContent( - String kid, - EncryptionKeyType type, - EncryptionKeyState state, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - OptionalNullable parentKid, - OptionalNullable publicKey, - Map additionalProperties) { - this.kid = kid; - this.type = type; - this.state = state; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.parentKid = parentKid; - this.publicKey = publicKey; - this.additionalProperties = additionalProperties; - } - - /** - * @return Key ID - */ - @JsonProperty("kid") - public String getKid() { - return kid; - } - - @JsonProperty("type") - public EncryptionKeyType getType() { - return type; - } - - @JsonProperty("state") - public EncryptionKeyState getState() { - return state; - } - - /** - * @return Key creation timestamp - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return Key update timestamp - */ - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - /** - * @return ID of parent wrapping key - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("parent_kid") - public OptionalNullable getParentKid() { - if (parentKid == null) { - return OptionalNullable.absent(); - } - return parentKid; - } - - /** - * @return Public key in PEM format - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("public_key") - public OptionalNullable getPublicKey() { - if (publicKey == null) { - return OptionalNullable.absent(); - } - return publicKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("parent_kid") - private OptionalNullable _getParentKid() { - return parentKid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("public_key") - private OptionalNullable _getPublicKey() { - return publicKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ImportEncryptionKeyResponseContent - && equalTo((ImportEncryptionKeyResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ImportEncryptionKeyResponseContent other) { - return kid.equals(other.kid) - && type.equals(other.type) - && state.equals(other.state) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && parentKid.equals(other.parentKid) - && publicKey.equals(other.publicKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.kid, this.type, this.state, this.createdAt, this.updatedAt, this.parentKid, this.publicKey); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static KidStage builder() { - return new Builder(); - } - - public interface KidStage { - /** - *

Key ID

- */ - TypeStage kid(@NotNull String kid); - - Builder from(ImportEncryptionKeyResponseContent other); - } - - public interface TypeStage { - StateStage type(@NotNull EncryptionKeyType type); - } - - public interface StateStage { - CreatedAtStage state(@NotNull EncryptionKeyState state); - } - - public interface CreatedAtStage { - /** - *

Key creation timestamp

- */ - UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); - } - - public interface UpdatedAtStage { - /** - *

Key update timestamp

- */ - _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); - } - - public interface _FinalStage { - ImportEncryptionKeyResponseContent build(); - - /** - *

ID of parent wrapping key

- */ - _FinalStage parentKid(@Nullable OptionalNullable parentKid); - - _FinalStage parentKid(String parentKid); - - _FinalStage parentKid(Optional parentKid); - - _FinalStage parentKid(com.auth0.client.mgmt.core.Nullable parentKid); - - /** - *

Public key in PEM format

- */ - _FinalStage publicKey(@Nullable OptionalNullable publicKey); - - _FinalStage publicKey(String publicKey); - - _FinalStage publicKey(Optional publicKey); - - _FinalStage publicKey(com.auth0.client.mgmt.core.Nullable publicKey); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements KidStage, TypeStage, StateStage, CreatedAtStage, UpdatedAtStage, _FinalStage { - private String kid; - - private EncryptionKeyType type; - - private EncryptionKeyState state; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private OptionalNullable publicKey = OptionalNullable.absent(); - - private OptionalNullable parentKid = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ImportEncryptionKeyResponseContent other) { - kid(other.getKid()); - type(other.getType()); - state(other.getState()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - parentKid(other.getParentKid()); - publicKey(other.getPublicKey()); - return this; - } - - /** - *

Key ID

- *

Key ID

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("kid") - public TypeStage kid(@NotNull String kid) { - this.kid = Objects.requireNonNull(kid, "kid must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public StateStage type(@NotNull EncryptionKeyType type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("state") - public CreatedAtStage state(@NotNull EncryptionKeyState state) { - this.state = Objects.requireNonNull(state, "state must not be null"); - return this; - } - - /** - *

Key creation timestamp

- *

Key creation timestamp

- * @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; - } - - /** - *

Key update timestamp

- *

Key update timestamp

- * @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; - } - - /** - *

Public key in PEM format

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage publicKey(com.auth0.client.mgmt.core.Nullable publicKey) { - if (publicKey.isNull()) { - this.publicKey = OptionalNullable.ofNull(); - } else if (publicKey.isEmpty()) { - this.publicKey = OptionalNullable.absent(); - } else { - this.publicKey = OptionalNullable.of(publicKey.get()); - } - return this; - } - - /** - *

Public key in PEM format

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage publicKey(Optional publicKey) { - if (publicKey.isPresent()) { - this.publicKey = OptionalNullable.of(publicKey.get()); - } else { - this.publicKey = OptionalNullable.absent(); - } - return this; - } - - /** - *

Public key in PEM format

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage publicKey(String publicKey) { - this.publicKey = OptionalNullable.of(publicKey); - return this; - } - - /** - *

Public key in PEM format

- */ - @java.lang.Override - @JsonSetter(value = "public_key", nulls = Nulls.SKIP) - public _FinalStage publicKey(@Nullable OptionalNullable publicKey) { - this.publicKey = publicKey; - return this; - } - - /** - *

ID of parent wrapping key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage parentKid(com.auth0.client.mgmt.core.Nullable parentKid) { - if (parentKid.isNull()) { - this.parentKid = OptionalNullable.ofNull(); - } else if (parentKid.isEmpty()) { - this.parentKid = OptionalNullable.absent(); - } else { - this.parentKid = OptionalNullable.of(parentKid.get()); - } - return this; - } - - /** - *

ID of parent wrapping key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage parentKid(Optional parentKid) { - if (parentKid.isPresent()) { - this.parentKid = OptionalNullable.of(parentKid.get()); - } else { - this.parentKid = OptionalNullable.absent(); - } - return this; - } - - /** - *

ID of parent wrapping key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage parentKid(String parentKid) { - this.parentKid = OptionalNullable.of(parentKid); - return this; - } - - /** - *

ID of parent wrapping key

- */ - @java.lang.Override - @JsonSetter(value = "parent_kid", nulls = Nulls.SKIP) - public _FinalStage parentKid(@Nullable OptionalNullable parentKid) { - this.parentKid = parentKid; - return this; - } - - @java.lang.Override - public ImportEncryptionKeyResponseContent build() { - return new ImportEncryptionKeyResponseContent( - kid, type, state, createdAt, updatedAt, parentKid, publicKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/Integration.java b/src/main/java/com/auth0/client/mgmt/types/Integration.java deleted file mode 100644 index 647537bc9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/Integration.java +++ /dev/null @@ -1,519 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = Integration.Builder.class) -public final class Integration { - private final Optional id; - - private final Optional catalogId; - - private final Optional urlSlug; - - private final Optional partnerId; - - private final Optional name; - - private final Optional description; - - private final Optional shortDescription; - - private final Optional logo; - - private final Optional featureType; - - private final Optional termsOfUseUrl; - - private final Optional privacyPolicyUrl; - - private final Optional publicSupportLink; - - private final Optional currentRelease; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private Integration( - Optional id, - Optional catalogId, - Optional urlSlug, - Optional partnerId, - Optional name, - Optional description, - Optional shortDescription, - Optional logo, - Optional featureType, - Optional termsOfUseUrl, - Optional privacyPolicyUrl, - Optional publicSupportLink, - Optional currentRelease, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.catalogId = catalogId; - this.urlSlug = urlSlug; - this.partnerId = partnerId; - this.name = name; - this.description = description; - this.shortDescription = shortDescription; - this.logo = logo; - this.featureType = featureType; - this.termsOfUseUrl = termsOfUseUrl; - this.privacyPolicyUrl = privacyPolicyUrl; - this.publicSupportLink = publicSupportLink; - this.currentRelease = currentRelease; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return id is a system generated GUID. This same ID is designed to be federated in - * all the applicable localities. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return catalog_id refers to the ID in the marketplace catalog - */ - @JsonProperty("catalog_id") - public Optional getCatalogId() { - return catalogId; - } - - /** - * @return url_slug refers to the url_slug in the marketplace catalog - */ - @JsonProperty("url_slug") - public Optional getUrlSlug() { - return urlSlug; - } - - /** - * @return partner_id is the foreign key reference to the partner account this - * integration belongs to. - */ - @JsonProperty("partner_id") - public Optional getPartnerId() { - return partnerId; - } - - /** - * @return name is the integration name, which will be used for display purposes in - * the marketplace. - *

To start we're going to make sure the display name is at least 3 - * characters. Can adjust this easily later.

- */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return description adds more text for the integration name -- also relevant for - * the marketplace listing. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - /** - * @return short_description is the brief description of the integration, which is used for display purposes in cards - */ - @JsonProperty("short_description") - public Optional getShortDescription() { - return shortDescription; - } - - @JsonProperty("logo") - public Optional getLogo() { - return logo; - } - - @JsonProperty("feature_type") - public Optional getFeatureType() { - return featureType; - } - - @JsonProperty("terms_of_use_url") - public Optional getTermsOfUseUrl() { - return termsOfUseUrl; - } - - @JsonProperty("privacy_policy_url") - public Optional getPrivacyPolicyUrl() { - return privacyPolicyUrl; - } - - @JsonProperty("public_support_link") - public Optional getPublicSupportLink() { - return publicSupportLink; - } - - @JsonProperty("current_release") - public Optional getCurrentRelease() { - return currentRelease; - } - - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Integration && equalTo((Integration) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(Integration other) { - return id.equals(other.id) - && catalogId.equals(other.catalogId) - && urlSlug.equals(other.urlSlug) - && partnerId.equals(other.partnerId) - && name.equals(other.name) - && description.equals(other.description) - && shortDescription.equals(other.shortDescription) - && logo.equals(other.logo) - && featureType.equals(other.featureType) - && termsOfUseUrl.equals(other.termsOfUseUrl) - && privacyPolicyUrl.equals(other.privacyPolicyUrl) - && publicSupportLink.equals(other.publicSupportLink) - && currentRelease.equals(other.currentRelease) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.catalogId, - this.urlSlug, - this.partnerId, - this.name, - this.description, - this.shortDescription, - this.logo, - this.featureType, - this.termsOfUseUrl, - this.privacyPolicyUrl, - this.publicSupportLink, - this.currentRelease, - this.createdAt, - this.updatedAt); - } - - @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 catalogId = Optional.empty(); - - private Optional urlSlug = Optional.empty(); - - private Optional partnerId = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional description = Optional.empty(); - - private Optional shortDescription = Optional.empty(); - - private Optional logo = Optional.empty(); - - private Optional featureType = Optional.empty(); - - private Optional termsOfUseUrl = Optional.empty(); - - private Optional privacyPolicyUrl = Optional.empty(); - - private Optional publicSupportLink = Optional.empty(); - - private Optional currentRelease = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(Integration other) { - id(other.getId()); - catalogId(other.getCatalogId()); - urlSlug(other.getUrlSlug()); - partnerId(other.getPartnerId()); - name(other.getName()); - description(other.getDescription()); - shortDescription(other.getShortDescription()); - logo(other.getLogo()); - featureType(other.getFeatureType()); - termsOfUseUrl(other.getTermsOfUseUrl()); - privacyPolicyUrl(other.getPrivacyPolicyUrl()); - publicSupportLink(other.getPublicSupportLink()); - currentRelease(other.getCurrentRelease()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

id is a system generated GUID. This same ID is designed to be federated in - * all the applicable localities.

- */ - @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; - } - - /** - *

catalog_id refers to the ID in the marketplace catalog

- */ - @JsonSetter(value = "catalog_id", nulls = Nulls.SKIP) - public Builder catalogId(Optional catalogId) { - this.catalogId = catalogId; - return this; - } - - public Builder catalogId(String catalogId) { - this.catalogId = Optional.ofNullable(catalogId); - return this; - } - - /** - *

url_slug refers to the url_slug in the marketplace catalog

- */ - @JsonSetter(value = "url_slug", nulls = Nulls.SKIP) - public Builder urlSlug(Optional urlSlug) { - this.urlSlug = urlSlug; - return this; - } - - public Builder urlSlug(String urlSlug) { - this.urlSlug = Optional.ofNullable(urlSlug); - return this; - } - - /** - *

partner_id is the foreign key reference to the partner account this - * integration belongs to.

- */ - @JsonSetter(value = "partner_id", nulls = Nulls.SKIP) - public Builder partnerId(Optional partnerId) { - this.partnerId = partnerId; - return this; - } - - public Builder partnerId(String partnerId) { - this.partnerId = Optional.ofNullable(partnerId); - return this; - } - - /** - *

name is the integration name, which will be used for display purposes in - * the marketplace.

- *

To start we're going to make sure the display name is at least 3 - * characters. Can adjust this easily later.

- */ - @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; - } - - /** - *

description adds more text for the integration name -- also relevant for - * the marketplace listing.

- */ - @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; - } - - /** - *

short_description is the brief description of the integration, which is used for display purposes in cards

- */ - @JsonSetter(value = "short_description", nulls = Nulls.SKIP) - public Builder shortDescription(Optional shortDescription) { - this.shortDescription = shortDescription; - return this; - } - - public Builder shortDescription(String shortDescription) { - this.shortDescription = Optional.ofNullable(shortDescription); - return this; - } - - @JsonSetter(value = "logo", nulls = Nulls.SKIP) - public Builder logo(Optional logo) { - this.logo = logo; - return this; - } - - public Builder logo(String logo) { - this.logo = Optional.ofNullable(logo); - return this; - } - - @JsonSetter(value = "feature_type", nulls = Nulls.SKIP) - public Builder featureType(Optional featureType) { - this.featureType = featureType; - return this; - } - - public Builder featureType(IntegrationFeatureTypeEnum featureType) { - this.featureType = Optional.ofNullable(featureType); - return this; - } - - @JsonSetter(value = "terms_of_use_url", nulls = Nulls.SKIP) - public Builder termsOfUseUrl(Optional termsOfUseUrl) { - this.termsOfUseUrl = termsOfUseUrl; - return this; - } - - public Builder termsOfUseUrl(String termsOfUseUrl) { - this.termsOfUseUrl = Optional.ofNullable(termsOfUseUrl); - return this; - } - - @JsonSetter(value = "privacy_policy_url", nulls = Nulls.SKIP) - public Builder privacyPolicyUrl(Optional privacyPolicyUrl) { - this.privacyPolicyUrl = privacyPolicyUrl; - return this; - } - - public Builder privacyPolicyUrl(String privacyPolicyUrl) { - this.privacyPolicyUrl = Optional.ofNullable(privacyPolicyUrl); - return this; - } - - @JsonSetter(value = "public_support_link", nulls = Nulls.SKIP) - public Builder publicSupportLink(Optional publicSupportLink) { - this.publicSupportLink = publicSupportLink; - return this; - } - - public Builder publicSupportLink(String publicSupportLink) { - this.publicSupportLink = Optional.ofNullable(publicSupportLink); - return this; - } - - @JsonSetter(value = "current_release", nulls = Nulls.SKIP) - public Builder currentRelease(Optional currentRelease) { - this.currentRelease = currentRelease; - return this; - } - - public Builder currentRelease(IntegrationRelease currentRelease) { - this.currentRelease = Optional.ofNullable(currentRelease); - return this; - } - - @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; - } - - @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; - } - - public Integration build() { - return new Integration( - id, - catalogId, - urlSlug, - partnerId, - name, - description, - shortDescription, - logo, - featureType, - termsOfUseUrl, - privacyPolicyUrl, - publicSupportLink, - currentRelease, - createdAt, - updatedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IntegrationFeatureTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/IntegrationFeatureTypeEnum.java deleted file mode 100644 index 378ce1601..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IntegrationFeatureTypeEnum.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class IntegrationFeatureTypeEnum { - public static final IntegrationFeatureTypeEnum UNSPECIFIED = - new IntegrationFeatureTypeEnum(Value.UNSPECIFIED, "unspecified"); - - public static final IntegrationFeatureTypeEnum SMS_PROVIDER = - new IntegrationFeatureTypeEnum(Value.SMS_PROVIDER, "sms_provider"); - - public static final IntegrationFeatureTypeEnum ACTION = new IntegrationFeatureTypeEnum(Value.ACTION, "action"); - - public static final IntegrationFeatureTypeEnum SSO_INTEGRATION = - new IntegrationFeatureTypeEnum(Value.SSO_INTEGRATION, "sso_integration"); - - public static final IntegrationFeatureTypeEnum SOCIAL_CONNECTION = - new IntegrationFeatureTypeEnum(Value.SOCIAL_CONNECTION, "social_connection"); - - public static final IntegrationFeatureTypeEnum LOG_STREAM = - new IntegrationFeatureTypeEnum(Value.LOG_STREAM, "log_stream"); - - private final Value value; - - private final String string; - - IntegrationFeatureTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof IntegrationFeatureTypeEnum - && this.string.equals(((IntegrationFeatureTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case UNSPECIFIED: - return visitor.visitUnspecified(); - case SMS_PROVIDER: - return visitor.visitSmsProvider(); - case ACTION: - return visitor.visitAction(); - case SSO_INTEGRATION: - return visitor.visitSsoIntegration(); - case SOCIAL_CONNECTION: - return visitor.visitSocialConnection(); - case LOG_STREAM: - return visitor.visitLogStream(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static IntegrationFeatureTypeEnum valueOf(String value) { - switch (value) { - case "unspecified": - return UNSPECIFIED; - case "sms_provider": - return SMS_PROVIDER; - case "action": - return ACTION; - case "sso_integration": - return SSO_INTEGRATION; - case "social_connection": - return SOCIAL_CONNECTION; - case "log_stream": - return LOG_STREAM; - default: - return new IntegrationFeatureTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - UNSPECIFIED, - - ACTION, - - SOCIAL_CONNECTION, - - LOG_STREAM, - - SSO_INTEGRATION, - - SMS_PROVIDER, - - UNKNOWN - } - - public interface Visitor { - T visitUnspecified(); - - T visitAction(); - - T visitSocialConnection(); - - T visitLogStream(); - - T visitSsoIntegration(); - - T visitSmsProvider(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IntegrationRelease.java b/src/main/java/com/auth0/client/mgmt/types/IntegrationRelease.java deleted file mode 100644 index 60f4838a4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IntegrationRelease.java +++ /dev/null @@ -1,215 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = IntegrationRelease.Builder.class) -public final class IntegrationRelease { - private final Optional id; - - private final Optional trigger; - - private final Optional semver; - - private final Optional> requiredSecrets; - - private final Optional> requiredConfiguration; - - private final Map additionalProperties; - - private IntegrationRelease( - Optional id, - Optional trigger, - Optional semver, - Optional> requiredSecrets, - Optional> requiredConfiguration, - Map additionalProperties) { - this.id = id; - this.trigger = trigger; - this.semver = semver; - this.requiredSecrets = requiredSecrets; - this.requiredConfiguration = requiredConfiguration; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the associated IntegrationRelease - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("trigger") - public Optional getTrigger() { - return trigger; - } - - @JsonProperty("semver") - public Optional getSemver() { - return semver; - } - - /** - * @return required_secrets declares all the necessary secrets for an integration to - * work. - */ - @JsonProperty("required_secrets") - public Optional> getRequiredSecrets() { - return requiredSecrets; - } - - /** - * @return required_configuration declares all the necessary configuration fields for an integration to work. - */ - @JsonProperty("required_configuration") - public Optional> getRequiredConfiguration() { - return requiredConfiguration; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof IntegrationRelease && equalTo((IntegrationRelease) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(IntegrationRelease other) { - return id.equals(other.id) - && trigger.equals(other.trigger) - && semver.equals(other.semver) - && requiredSecrets.equals(other.requiredSecrets) - && requiredConfiguration.equals(other.requiredConfiguration); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.trigger, this.semver, this.requiredSecrets, this.requiredConfiguration); - } - - @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 trigger = Optional.empty(); - - private Optional semver = Optional.empty(); - - private Optional> requiredSecrets = Optional.empty(); - - private Optional> requiredConfiguration = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(IntegrationRelease other) { - id(other.getId()); - trigger(other.getTrigger()); - semver(other.getSemver()); - requiredSecrets(other.getRequiredSecrets()); - requiredConfiguration(other.getRequiredConfiguration()); - return this; - } - - /** - *

The id of the associated IntegrationRelease

- */ - @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 = "trigger", nulls = Nulls.SKIP) - public Builder trigger(Optional trigger) { - this.trigger = trigger; - return this; - } - - public Builder trigger(ActionTrigger trigger) { - this.trigger = Optional.ofNullable(trigger); - return this; - } - - @JsonSetter(value = "semver", nulls = Nulls.SKIP) - public Builder semver(Optional semver) { - this.semver = semver; - return this; - } - - public Builder semver(IntegrationSemVer semver) { - this.semver = Optional.ofNullable(semver); - return this; - } - - /** - *

required_secrets declares all the necessary secrets for an integration to - * work.

- */ - @JsonSetter(value = "required_secrets", nulls = Nulls.SKIP) - public Builder requiredSecrets(Optional> requiredSecrets) { - this.requiredSecrets = requiredSecrets; - return this; - } - - public Builder requiredSecrets(List requiredSecrets) { - this.requiredSecrets = Optional.ofNullable(requiredSecrets); - return this; - } - - /** - *

required_configuration declares all the necessary configuration fields for an integration to work.

- */ - @JsonSetter(value = "required_configuration", nulls = Nulls.SKIP) - public Builder requiredConfiguration(Optional> requiredConfiguration) { - this.requiredConfiguration = requiredConfiguration; - return this; - } - - public Builder requiredConfiguration(List requiredConfiguration) { - this.requiredConfiguration = Optional.ofNullable(requiredConfiguration); - return this; - } - - public IntegrationRelease build() { - return new IntegrationRelease( - id, trigger, semver, requiredSecrets, requiredConfiguration, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IntegrationRequiredParam.java b/src/main/java/com/auth0/client/mgmt/types/IntegrationRequiredParam.java deleted file mode 100644 index 8a8356603..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IntegrationRequiredParam.java +++ /dev/null @@ -1,357 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = IntegrationRequiredParam.Builder.class) -public final class IntegrationRequiredParam { - private final Optional type; - - private final Optional name; - - private final Optional required; - - private final Optional optional; - - private final Optional label; - - private final Optional description; - - private final Optional defaultValue; - - private final Optional placeholder; - - private final Optional> options; - - private final Map additionalProperties; - - private IntegrationRequiredParam( - Optional type, - Optional name, - Optional required, - Optional optional, - Optional label, - Optional description, - Optional defaultValue, - Optional placeholder, - Optional> options, - Map additionalProperties) { - this.type = type; - this.name = name; - this.required = required; - this.optional = optional; - this.label = label; - this.description = description; - this.defaultValue = defaultValue; - this.placeholder = placeholder; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return The name of the parameter. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The flag for if this parameter is required. - */ - @JsonProperty("required") - public Optional getRequired() { - return required; - } - - /** - * @return The temp flag for if this parameter is required (experimental; for Labs use only). - */ - @JsonProperty("optional") - public Optional getOptional() { - return optional; - } - - /** - * @return The short label for this parameter. - */ - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - /** - * @return The lengthier description for this parameter. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - /** - * @return The default value for this parameter. - */ - @JsonProperty("default_value") - public Optional getDefaultValue() { - return defaultValue; - } - - /** - * @return Placeholder text for this parameter. - */ - @JsonProperty("placeholder") - public Optional getPlaceholder() { - return placeholder; - } - - /** - * @return The allowable options for this param. - */ - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof IntegrationRequiredParam && equalTo((IntegrationRequiredParam) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(IntegrationRequiredParam other) { - return type.equals(other.type) - && name.equals(other.name) - && required.equals(other.required) - && optional.equals(other.optional) - && label.equals(other.label) - && description.equals(other.description) - && defaultValue.equals(other.defaultValue) - && placeholder.equals(other.placeholder) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.type, - this.name, - this.required, - this.optional, - this.label, - this.description, - this.defaultValue, - this.placeholder, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional type = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional required = Optional.empty(); - - private Optional optional = Optional.empty(); - - private Optional label = Optional.empty(); - - private Optional description = Optional.empty(); - - private Optional defaultValue = Optional.empty(); - - private Optional placeholder = Optional.empty(); - - private Optional> options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(IntegrationRequiredParam other) { - type(other.getType()); - name(other.getName()); - required(other.getRequired()); - optional(other.getOptional()); - label(other.getLabel()); - description(other.getDescription()); - defaultValue(other.getDefaultValue()); - placeholder(other.getPlaceholder()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(IntegrationRequiredParamTypeEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

The name of the parameter.

- */ - @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 flag for if this parameter is required.

- */ - @JsonSetter(value = "required", nulls = Nulls.SKIP) - public Builder required(Optional required) { - this.required = required; - return this; - } - - public Builder required(Boolean required) { - this.required = Optional.ofNullable(required); - return this; - } - - /** - *

The temp flag for if this parameter is required (experimental; for Labs use only).

- */ - @JsonSetter(value = "optional", nulls = Nulls.SKIP) - public Builder optional(Optional optional) { - this.optional = optional; - return this; - } - - public Builder optional(Boolean optional) { - this.optional = Optional.ofNullable(optional); - return this; - } - - /** - *

The short label for this parameter.

- */ - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public Builder label(Optional label) { - this.label = label; - return this; - } - - public Builder label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - /** - *

The lengthier description for this parameter.

- */ - @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; - } - - /** - *

The default value for this parameter.

- */ - @JsonSetter(value = "default_value", nulls = Nulls.SKIP) - public Builder defaultValue(Optional defaultValue) { - this.defaultValue = defaultValue; - return this; - } - - public Builder defaultValue(String defaultValue) { - this.defaultValue = Optional.ofNullable(defaultValue); - return this; - } - - /** - *

Placeholder text for this parameter.

- */ - @JsonSetter(value = "placeholder", nulls = Nulls.SKIP) - public Builder placeholder(Optional placeholder) { - this.placeholder = placeholder; - return this; - } - - public Builder placeholder(String placeholder) { - this.placeholder = Optional.ofNullable(placeholder); - return this; - } - - /** - *

The allowable options for this param.

- */ - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional> options) { - this.options = options; - return this; - } - - public Builder options(List options) { - this.options = Optional.ofNullable(options); - return this; - } - - public IntegrationRequiredParam build() { - return new IntegrationRequiredParam( - type, - name, - required, - optional, - label, - description, - defaultValue, - placeholder, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IntegrationRequiredParamOption.java b/src/main/java/com/auth0/client/mgmt/types/IntegrationRequiredParamOption.java deleted file mode 100644 index 29cd5ccc1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IntegrationRequiredParamOption.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = IntegrationRequiredParamOption.Builder.class) -public final class IntegrationRequiredParamOption { - private final Optional value; - - private final Optional label; - - private final Map additionalProperties; - - private IntegrationRequiredParamOption( - Optional value, Optional label, Map additionalProperties) { - this.value = value; - this.label = label; - this.additionalProperties = additionalProperties; - } - - /** - * @return The value of an option that will be used within the application. - */ - @JsonProperty("value") - public Optional getValue() { - return value; - } - - /** - * @return The display value of an option suitable for displaying in a UI. - */ - @JsonProperty("label") - public Optional getLabel() { - return label; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof IntegrationRequiredParamOption && equalTo((IntegrationRequiredParamOption) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(IntegrationRequiredParamOption other) { - return value.equals(other.value) && label.equals(other.label); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value, this.label); - } - - @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 value = Optional.empty(); - - private Optional label = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(IntegrationRequiredParamOption other) { - value(other.getValue()); - label(other.getLabel()); - return this; - } - - /** - *

The value of an option that will be used within the application.

- */ - @JsonSetter(value = "value", nulls = Nulls.SKIP) - public Builder value(Optional value) { - this.value = value; - return this; - } - - public Builder value(String value) { - this.value = Optional.ofNullable(value); - return this; - } - - /** - *

The display value of an option suitable for displaying in a UI.

- */ - @JsonSetter(value = "label", nulls = Nulls.SKIP) - public Builder label(Optional label) { - this.label = label; - return this; - } - - public Builder label(String label) { - this.label = Optional.ofNullable(label); - return this; - } - - public IntegrationRequiredParamOption build() { - return new IntegrationRequiredParamOption(value, label, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IntegrationRequiredParamTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/IntegrationRequiredParamTypeEnum.java deleted file mode 100644 index 9c421852a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IntegrationRequiredParamTypeEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class IntegrationRequiredParamTypeEnum { - public static final IntegrationRequiredParamTypeEnum UNSPECIFIED = - new IntegrationRequiredParamTypeEnum(Value.UNSPECIFIED, "UNSPECIFIED"); - - public static final IntegrationRequiredParamTypeEnum STRING = - new IntegrationRequiredParamTypeEnum(Value.STRING, "STRING"); - - private final Value value; - - private final String string; - - IntegrationRequiredParamTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof IntegrationRequiredParamTypeEnum - && this.string.equals(((IntegrationRequiredParamTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case UNSPECIFIED: - return visitor.visitUnspecified(); - case STRING: - return visitor.visitString(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static IntegrationRequiredParamTypeEnum valueOf(String value) { - switch (value) { - case "UNSPECIFIED": - return UNSPECIFIED; - case "STRING": - return STRING; - default: - return new IntegrationRequiredParamTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - UNSPECIFIED, - - STRING, - - UNKNOWN - } - - public interface Visitor { - T visitUnspecified(); - - T visitString(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/IntegrationSemVer.java b/src/main/java/com/auth0/client/mgmt/types/IntegrationSemVer.java deleted file mode 100644 index 62f0972f6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/IntegrationSemVer.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = IntegrationSemVer.Builder.class) -public final class IntegrationSemVer { - private final Optional major; - - private final Optional minor; - - private final Map additionalProperties; - - private IntegrationSemVer( - Optional major, Optional minor, Map additionalProperties) { - this.major = major; - this.minor = minor; - this.additionalProperties = additionalProperties; - } - - /** - * @return Major is the major number of a semver - */ - @JsonProperty("major") - public Optional getMajor() { - return major; - } - - /** - * @return Minior is the minior number of a semver - */ - @JsonProperty("minor") - public Optional getMinor() { - return minor; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof IntegrationSemVer && equalTo((IntegrationSemVer) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(IntegrationSemVer other) { - return major.equals(other.major) && minor.equals(other.minor); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.major, this.minor); - } - - @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 major = Optional.empty(); - - private Optional minor = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(IntegrationSemVer other) { - major(other.getMajor()); - minor(other.getMinor()); - return this; - } - - /** - *

Major is the major number of a semver

- */ - @JsonSetter(value = "major", nulls = Nulls.SKIP) - public Builder major(Optional major) { - this.major = major; - return this; - } - - public Builder major(Integer major) { - this.major = Optional.ofNullable(major); - return this; - } - - /** - *

Minior is the minior number of a semver

- */ - @JsonSetter(value = "minor", nulls = Nulls.SKIP) - public Builder minor(Optional minor) { - this.minor = minor; - return this; - } - - public Builder minor(Integer minor) { - this.minor = Optional.ofNullable(minor); - return this; - } - - public IntegrationSemVer build() { - return new IntegrationSemVer(major, minor, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/JobFileFormatEnum.java b/src/main/java/com/auth0/client/mgmt/types/JobFileFormatEnum.java deleted file mode 100644 index 5030eb5da..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/JobFileFormatEnum.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class JobFileFormatEnum { - public static final JobFileFormatEnum CSV = new JobFileFormatEnum(Value.CSV, "csv"); - - public static final JobFileFormatEnum JSON = new JobFileFormatEnum(Value.JSON, "json"); - - private final Value value; - - private final String string; - - JobFileFormatEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof JobFileFormatEnum && this.string.equals(((JobFileFormatEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CSV: - return visitor.visitCsv(); - case JSON: - return visitor.visitJson(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static JobFileFormatEnum valueOf(String value) { - switch (value) { - case "csv": - return CSV; - case "json": - return JSON; - default: - return new JobFileFormatEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - JSON, - - CSV, - - UNKNOWN - } - - public interface Visitor { - T visitJson(); - - T visitCsv(); - - 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 deleted file mode 100644 index 37a8fb6e6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LinkedClientConfiguration.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = LinkedClientConfiguration.Builder.class) -public final class LinkedClientConfiguration { - private final String clientId; - - private final Map additionalProperties; - - private LinkedClientConfiguration(String clientId, Map additionalProperties) { - this.clientId = clientId; - this.additionalProperties = additionalProperties; - } - - /** - * @return The ID of the linked client. - */ - @JsonProperty("client_id") - public String getClientId() { - return clientId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LinkedClientConfiguration && equalTo((LinkedClientConfiguration) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LinkedClientConfiguration other) { - return clientId.equals(other.clientId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.clientId); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ClientIdStage builder() { - return new Builder(); - } - - public interface ClientIdStage { - /** - *

The ID of the linked client.

- */ - _FinalStage clientId(@NotNull String clientId); - - Builder from(LinkedClientConfiguration other); - } - - public interface _FinalStage { - LinkedClientConfiguration build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ClientIdStage, _FinalStage { - private String clientId; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(LinkedClientConfiguration other) { - clientId(other.getClientId()); - return this; - } - - /** - *

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. - */ - @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 LinkedClientConfiguration build() { - return new LinkedClientConfiguration(clientId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListActionBindingsPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListActionBindingsPaginatedResponseContent.java deleted file mode 100644 index 3f2a5dadd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListActionBindingsPaginatedResponseContent.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListActionBindingsPaginatedResponseContent.Builder.class) -public final class ListActionBindingsPaginatedResponseContent { - private final Optional total; - - private final Optional page; - - private final Optional perPage; - - private final Optional> bindings; - - private final Map additionalProperties; - - private ListActionBindingsPaginatedResponseContent( - Optional total, - Optional page, - Optional perPage, - Optional> bindings, - Map additionalProperties) { - this.total = total; - this.page = page; - this.perPage = perPage; - this.bindings = bindings; - this.additionalProperties = additionalProperties; - } - - /** - * @return The total result count. - */ - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - /** - * @return Page index of the results being returned. First page is 0. - */ - @JsonProperty("page") - public Optional getPage() { - return page; - } - - /** - * @return Number of results per page. - */ - @JsonProperty("per_page") - public Optional getPerPage() { - return perPage; - } - - /** - * @return The list of actions that are bound to this trigger in the order in which they will be executed. - */ - @JsonProperty("bindings") - public Optional> getBindings() { - return bindings; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListActionBindingsPaginatedResponseContent - && equalTo((ListActionBindingsPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListActionBindingsPaginatedResponseContent other) { - return total.equals(other.total) - && page.equals(other.page) - && perPage.equals(other.perPage) - && bindings.equals(other.bindings); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.total, this.page, this.perPage, this.bindings); - } - - @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 total = Optional.empty(); - - private Optional page = Optional.empty(); - - private Optional perPage = Optional.empty(); - - private Optional> bindings = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListActionBindingsPaginatedResponseContent other) { - total(other.getTotal()); - page(other.getPage()); - perPage(other.getPerPage()); - bindings(other.getBindings()); - return this; - } - - /** - *

The total result count.

- */ - @JsonSetter(value = "total", nulls = Nulls.SKIP) - public Builder total(Optional total) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - /** - *

Page index of the results being returned. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(Optional page) { - this.page = page; - return this; - } - - public Builder page(Double page) { - this.page = Optional.ofNullable(page); - return this; - } - - /** - *

Number of results per page.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(Optional perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Double perPage) { - this.perPage = Optional.ofNullable(perPage); - return this; - } - - /** - *

The list of actions that are bound to this trigger in the order in which they will be executed.

- */ - @JsonSetter(value = "bindings", nulls = Nulls.SKIP) - public Builder bindings(Optional> bindings) { - this.bindings = bindings; - return this; - } - - public Builder bindings(List bindings) { - this.bindings = Optional.ofNullable(bindings); - return this; - } - - public ListActionBindingsPaginatedResponseContent build() { - return new ListActionBindingsPaginatedResponseContent(total, page, perPage, bindings, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListActionTriggersResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListActionTriggersResponseContent.java deleted file mode 100644 index 85b7426c1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListActionTriggersResponseContent.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListActionTriggersResponseContent.Builder.class) -public final class ListActionTriggersResponseContent { - private final Optional> triggers; - - private final Map additionalProperties; - - private ListActionTriggersResponseContent( - Optional> triggers, Map additionalProperties) { - this.triggers = triggers; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("triggers") - public Optional> getTriggers() { - return triggers; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListActionTriggersResponseContent && equalTo((ListActionTriggersResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListActionTriggersResponseContent other) { - return triggers.equals(other.triggers); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.triggers); - } - - @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> triggers = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListActionTriggersResponseContent other) { - triggers(other.getTriggers()); - return this; - } - - @JsonSetter(value = "triggers", nulls = Nulls.SKIP) - public Builder triggers(Optional> triggers) { - this.triggers = triggers; - return this; - } - - public Builder triggers(List triggers) { - this.triggers = Optional.ofNullable(triggers); - return this; - } - - public ListActionTriggersResponseContent build() { - return new ListActionTriggersResponseContent(triggers, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListActionVersionsPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListActionVersionsPaginatedResponseContent.java deleted file mode 100644 index ecc1418e3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListActionVersionsPaginatedResponseContent.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListActionVersionsPaginatedResponseContent.Builder.class) -public final class ListActionVersionsPaginatedResponseContent { - private final Optional total; - - private final Optional page; - - private final Optional perPage; - - private final Optional> versions; - - private final Map additionalProperties; - - private ListActionVersionsPaginatedResponseContent( - Optional total, - Optional page, - Optional perPage, - Optional> versions, - Map additionalProperties) { - this.total = total; - this.page = page; - this.perPage = perPage; - this.versions = versions; - this.additionalProperties = additionalProperties; - } - - /** - * @return The total result count. - */ - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - /** - * @return Page index of the results being returned. First page is 0. - */ - @JsonProperty("page") - public Optional getPage() { - return page; - } - - /** - * @return Number of results per page. - */ - @JsonProperty("per_page") - public Optional getPerPage() { - return perPage; - } - - @JsonProperty("versions") - public Optional> getVersions() { - return versions; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListActionVersionsPaginatedResponseContent - && equalTo((ListActionVersionsPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListActionVersionsPaginatedResponseContent other) { - return total.equals(other.total) - && page.equals(other.page) - && perPage.equals(other.perPage) - && versions.equals(other.versions); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.total, this.page, this.perPage, this.versions); - } - - @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 total = Optional.empty(); - - private Optional page = Optional.empty(); - - private Optional perPage = Optional.empty(); - - private Optional> versions = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListActionVersionsPaginatedResponseContent other) { - total(other.getTotal()); - page(other.getPage()); - perPage(other.getPerPage()); - versions(other.getVersions()); - return this; - } - - /** - *

The total result count.

- */ - @JsonSetter(value = "total", nulls = Nulls.SKIP) - public Builder total(Optional total) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - /** - *

Page index of the results being returned. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(Optional page) { - this.page = page; - return this; - } - - public Builder page(Double page) { - this.page = Optional.ofNullable(page); - return this; - } - - /** - *

Number of results per page.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(Optional perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Double perPage) { - this.perPage = Optional.ofNullable(perPage); - return this; - } - - @JsonSetter(value = "versions", nulls = Nulls.SKIP) - public Builder versions(Optional> versions) { - this.versions = versions; - return this; - } - - public Builder versions(List versions) { - this.versions = Optional.ofNullable(versions); - return this; - } - - public ListActionVersionsPaginatedResponseContent build() { - return new ListActionVersionsPaginatedResponseContent(total, page, perPage, versions, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListActionsPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListActionsPaginatedResponseContent.java deleted file mode 100644 index bca8a2104..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListActionsPaginatedResponseContent.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListActionsPaginatedResponseContent.Builder.class) -public final class ListActionsPaginatedResponseContent { - private final Optional total; - - private final Optional page; - - private final Optional perPage; - - private final Optional> actions; - - private final Map additionalProperties; - - private ListActionsPaginatedResponseContent( - Optional total, - Optional page, - Optional perPage, - Optional> actions, - Map additionalProperties) { - this.total = total; - this.page = page; - this.perPage = perPage; - this.actions = actions; - this.additionalProperties = additionalProperties; - } - - /** - * @return The total result count. - */ - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - /** - * @return Page index of the results being returned. First page is 0. - */ - @JsonProperty("page") - public Optional getPage() { - return page; - } - - /** - * @return Number of results per page. - */ - @JsonProperty("per_page") - public Optional getPerPage() { - return perPage; - } - - /** - * @return The list of actions. - */ - @JsonProperty("actions") - public Optional> getActions() { - return actions; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListActionsPaginatedResponseContent - && equalTo((ListActionsPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListActionsPaginatedResponseContent other) { - return total.equals(other.total) - && page.equals(other.page) - && perPage.equals(other.perPage) - && actions.equals(other.actions); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.total, this.page, this.perPage, this.actions); - } - - @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 total = Optional.empty(); - - private Optional page = Optional.empty(); - - private Optional perPage = Optional.empty(); - - private Optional> actions = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListActionsPaginatedResponseContent other) { - total(other.getTotal()); - page(other.getPage()); - perPage(other.getPerPage()); - actions(other.getActions()); - return this; - } - - /** - *

The total result count.

- */ - @JsonSetter(value = "total", nulls = Nulls.SKIP) - public Builder total(Optional total) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - /** - *

Page index of the results being returned. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(Optional page) { - this.page = page; - return this; - } - - public Builder page(Double page) { - this.page = Optional.ofNullable(page); - return this; - } - - /** - *

Number of results per page.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(Optional perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Double perPage) { - this.perPage = Optional.ofNullable(perPage); - return this; - } - - /** - *

The list of actions.

- */ - @JsonSetter(value = "actions", nulls = Nulls.SKIP) - public Builder actions(Optional> actions) { - this.actions = actions; - return this; - } - - public Builder actions(List actions) { - this.actions = Optional.ofNullable(actions); - return this; - } - - public ListActionsPaginatedResponseContent build() { - return new ListActionsPaginatedResponseContent(total, page, perPage, actions, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListActionsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListActionsRequestParameters.java deleted file mode 100644 index 677299d8d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListActionsRequestParameters.java +++ /dev/null @@ -1,419 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListActionsRequestParameters.Builder.class) -public final class ListActionsRequestParameters { - private final OptionalNullable triggerId; - - private final OptionalNullable actionName; - - private final OptionalNullable deployed; - - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable installed; - - private final Map additionalProperties; - - private ListActionsRequestParameters( - OptionalNullable triggerId, - OptionalNullable actionName, - OptionalNullable deployed, - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable installed, - Map additionalProperties) { - this.triggerId = triggerId; - this.actionName = actionName; - this.deployed = deployed; - this.page = page; - this.perPage = perPage; - this.installed = installed; - this.additionalProperties = additionalProperties; - } - - /** - * @return An actions extensibility point. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("triggerId") - public OptionalNullable getTriggerId() { - if (triggerId == null) { - return OptionalNullable.absent(); - } - return triggerId; - } - - /** - * @return The name of the action to retrieve. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("actionName") - public OptionalNullable getActionName() { - if (actionName == null) { - return OptionalNullable.absent(); - } - return actionName; - } - - /** - * @return Optional filter to only retrieve actions that are deployed. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("deployed") - public OptionalNullable getDeployed() { - if (deployed == null) { - return OptionalNullable.absent(); - } - return deployed; - } - - /** - * @return Use this field to request a specific page of the list results. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return The maximum number of results to be returned by the server in single response. 20 by default - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @return Optional. When true, return only installed actions. When false, return only custom actions. Returns all actions by default. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("installed") - public OptionalNullable getInstalled() { - if (installed == null) { - return OptionalNullable.absent(); - } - 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("installed") - private OptionalNullable _getInstalled() { - return installed; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListActionsRequestParameters && equalTo((ListActionsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListActionsRequestParameters other) { - return triggerId.equals(other.triggerId) - && actionName.equals(other.actionName) - && deployed.equals(other.deployed) - && page.equals(other.page) - && perPage.equals(other.perPage) - && installed.equals(other.installed); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.triggerId, this.actionName, this.deployed, this.page, this.perPage, this.installed); - } - - @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 triggerId = OptionalNullable.absent(); - - private OptionalNullable actionName = OptionalNullable.absent(); - - private OptionalNullable deployed = OptionalNullable.absent(); - - private OptionalNullable page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable installed = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListActionsRequestParameters other) { - triggerId(other.getTriggerId()); - actionName(other.getActionName()); - deployed(other.getDeployed()); - page(other.getPage()); - perPage(other.getPerPage()); - installed(other.getInstalled()); - return this; - } - - /** - *

An actions extensibility point.

- */ - @JsonSetter(value = "triggerId", nulls = Nulls.SKIP) - public Builder triggerId(@Nullable OptionalNullable triggerId) { - this.triggerId = triggerId; - return this; - } - - public Builder triggerId(String triggerId) { - this.triggerId = OptionalNullable.of(triggerId); - return this; - } - - public Builder triggerId(Optional triggerId) { - if (triggerId.isPresent()) { - this.triggerId = OptionalNullable.of(triggerId.get()); - } else { - this.triggerId = OptionalNullable.absent(); - } - return this; - } - - public Builder triggerId(com.auth0.client.mgmt.core.Nullable triggerId) { - if (triggerId.isNull()) { - this.triggerId = OptionalNullable.ofNull(); - } else if (triggerId.isEmpty()) { - this.triggerId = OptionalNullable.absent(); - } else { - this.triggerId = OptionalNullable.of(triggerId.get()); - } - return this; - } - - /** - *

The name of the action to retrieve.

- */ - @JsonSetter(value = "actionName", nulls = Nulls.SKIP) - public Builder actionName(@Nullable OptionalNullable actionName) { - this.actionName = actionName; - return this; - } - - public Builder actionName(String actionName) { - this.actionName = OptionalNullable.of(actionName); - return this; - } - - public Builder actionName(Optional actionName) { - if (actionName.isPresent()) { - this.actionName = OptionalNullable.of(actionName.get()); - } else { - this.actionName = OptionalNullable.absent(); - } - return this; - } - - public Builder actionName(com.auth0.client.mgmt.core.Nullable actionName) { - if (actionName.isNull()) { - this.actionName = OptionalNullable.ofNull(); - } else if (actionName.isEmpty()) { - this.actionName = OptionalNullable.absent(); - } else { - this.actionName = OptionalNullable.of(actionName.get()); - } - return this; - } - - /** - *

Optional filter to only retrieve actions that are deployed.

- */ - @JsonSetter(value = "deployed", nulls = Nulls.SKIP) - public Builder deployed(@Nullable OptionalNullable deployed) { - this.deployed = deployed; - return this; - } - - public Builder deployed(Boolean deployed) { - this.deployed = OptionalNullable.of(deployed); - return this; - } - - public Builder deployed(Optional deployed) { - if (deployed.isPresent()) { - this.deployed = OptionalNullable.of(deployed.get()); - } else { - this.deployed = OptionalNullable.absent(); - } - return this; - } - - public Builder deployed(com.auth0.client.mgmt.core.Nullable deployed) { - if (deployed.isNull()) { - this.deployed = OptionalNullable.ofNull(); - } else if (deployed.isEmpty()) { - this.deployed = OptionalNullable.absent(); - } else { - this.deployed = OptionalNullable.of(deployed.get()); - } - return this; - } - - /** - *

Use this field to request a specific page of the list results.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(com.auth0.client.mgmt.core.Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

The maximum number of results to be returned by the server in single response. 20 by default

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - return this; - } - - /** - *

Optional. When true, return only installed actions. When false, return only custom actions. Returns all actions by default.

- */ - @JsonSetter(value = "installed", nulls = Nulls.SKIP) - public Builder installed(@Nullable OptionalNullable installed) { - this.installed = installed; - return this; - } - - public Builder installed(Boolean installed) { - this.installed = OptionalNullable.of(installed); - return this; - } - - public Builder installed(Optional installed) { - if (installed.isPresent()) { - this.installed = OptionalNullable.of(installed.get()); - } else { - this.installed = OptionalNullable.absent(); - } - return this; - } - - public Builder installed(com.auth0.client.mgmt.core.Nullable installed) { - if (installed.isNull()) { - this.installed = OptionalNullable.ofNull(); - } else if (installed.isEmpty()) { - this.installed = OptionalNullable.absent(); - } else { - this.installed = OptionalNullable.of(installed.get()); - } - return this; - } - - public ListActionsRequestParameters build() { - return new ListActionsRequestParameters( - triggerId, actionName, deployed, page, perPage, installed, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListAculsOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListAculsOffsetPaginatedResponseContent.java deleted file mode 100644 index 0bb4607fd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListAculsOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListAculsOffsetPaginatedResponseContent.Builder.class) -public final class ListAculsOffsetPaginatedResponseContent { - private final Optional> configs; - - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Map additionalProperties; - - private ListAculsOffsetPaginatedResponseContent( - Optional> configs, - Optional start, - Optional limit, - Optional total, - Map additionalProperties) { - this.configs = configs; - this.start = start; - this.limit = limit; - this.total = total; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("configs") - public Optional> getConfigs() { - return configs; - } - - /** - * @return the index of the first configuration in the response (before filtering) - */ - @JsonProperty("start") - public Optional getStart() { - return start; - } - - /** - * @return the maximum number of configurations shown per page (before filtering) - */ - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - /** - * @return the total number of configurations on this tenant - */ - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListAculsOffsetPaginatedResponseContent - && equalTo((ListAculsOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListAculsOffsetPaginatedResponseContent other) { - return configs.equals(other.configs) - && start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.configs, this.start, this.limit, this.total); - } - - @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> configs = Optional.empty(); - - private Optional start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListAculsOffsetPaginatedResponseContent other) { - configs(other.getConfigs()); - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - return this; - } - - @JsonSetter(value = "configs", nulls = Nulls.SKIP) - public Builder configs(Optional> configs) { - this.configs = configs; - return this; - } - - public Builder configs(List configs) { - this.configs = Optional.ofNullable(configs); - return this; - } - - /** - *

the index of the first configuration in the response (before filtering)

- */ - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional start) { - this.start = start; - return this; - } - - public Builder start(Double start) { - this.start = Optional.ofNullable(start); - return this; - } - - /** - *

the maximum number of configurations shown per page (before filtering)

- */ - @JsonSetter(value = "limit", nulls = Nulls.SKIP) - public Builder limit(Optional limit) { - this.limit = limit; - return this; - } - - public Builder limit(Double limit) { - this.limit = Optional.ofNullable(limit); - return this; - } - - /** - *

the total number of configurations on this tenant

- */ - @JsonSetter(value = "total", nulls = Nulls.SKIP) - public Builder total(Optional total) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - public ListAculsOffsetPaginatedResponseContent build() { - return new ListAculsOffsetPaginatedResponseContent(configs, start, limit, total, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListAculsResponseContentItem.java b/src/main/java/com/auth0/client/mgmt/types/ListAculsResponseContentItem.java deleted file mode 100644 index 28ab28cc6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListAculsResponseContentItem.java +++ /dev/null @@ -1,438 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListAculsResponseContentItem.Builder.class) -public final class ListAculsResponseContentItem { - private final Optional tenant; - - private final Optional prompt; - - private final Optional screen; - - private final Optional renderingMode; - - private final Optional> contextConfiguration; - - private final OptionalNullable defaultHeadTagsDisabled; - - private final OptionalNullable usePageTemplate; - - private final Optional> headTags; - - private final OptionalNullable filters; - - private final Map additionalProperties; - - private ListAculsResponseContentItem( - Optional tenant, - Optional prompt, - Optional screen, - Optional renderingMode, - Optional> contextConfiguration, - OptionalNullable defaultHeadTagsDisabled, - OptionalNullable usePageTemplate, - Optional> headTags, - OptionalNullable filters, - Map additionalProperties) { - this.tenant = tenant; - this.prompt = prompt; - this.screen = screen; - this.renderingMode = renderingMode; - this.contextConfiguration = contextConfiguration; - this.defaultHeadTagsDisabled = defaultHeadTagsDisabled; - this.usePageTemplate = usePageTemplate; - this.headTags = headTags; - this.filters = filters; - this.additionalProperties = additionalProperties; - } - - /** - * @return Tenant ID - */ - @JsonProperty("tenant") - public Optional getTenant() { - return tenant; - } - - /** - * @return Name of the prompt - */ - @JsonProperty("prompt") - public Optional getPrompt() { - return prompt; - } - - /** - * @return Name of the screen - */ - @JsonProperty("screen") - public Optional getScreen() { - return screen; - } - - @JsonProperty("rendering_mode") - public Optional getRenderingMode() { - return renderingMode; - } - - @JsonProperty("context_configuration") - public Optional> getContextConfiguration() { - return contextConfiguration; - } - - /** - * @return Override Universal Login default head tags - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("default_head_tags_disabled") - public OptionalNullable getDefaultHeadTagsDisabled() { - if (defaultHeadTagsDisabled == null) { - return OptionalNullable.absent(); - } - return defaultHeadTagsDisabled; - } - - /** - * @return Use page template with ACUL - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("use_page_template") - public OptionalNullable getUsePageTemplate() { - if (usePageTemplate == null) { - return OptionalNullable.absent(); - } - return usePageTemplate; - } - - /** - * @return An array of head tags - */ - @JsonProperty("head_tags") - public Optional> getHeadTags() { - return headTags; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("filters") - public OptionalNullable getFilters() { - if (filters == null) { - return OptionalNullable.absent(); - } - return filters; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("default_head_tags_disabled") - private OptionalNullable _getDefaultHeadTagsDisabled() { - return defaultHeadTagsDisabled; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("use_page_template") - private OptionalNullable _getUsePageTemplate() { - return usePageTemplate; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("filters") - private OptionalNullable _getFilters() { - return filters; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListAculsResponseContentItem && equalTo((ListAculsResponseContentItem) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListAculsResponseContentItem other) { - return tenant.equals(other.tenant) - && prompt.equals(other.prompt) - && screen.equals(other.screen) - && renderingMode.equals(other.renderingMode) - && contextConfiguration.equals(other.contextConfiguration) - && defaultHeadTagsDisabled.equals(other.defaultHeadTagsDisabled) - && usePageTemplate.equals(other.usePageTemplate) - && headTags.equals(other.headTags) - && filters.equals(other.filters); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.tenant, - this.prompt, - this.screen, - this.renderingMode, - this.contextConfiguration, - this.defaultHeadTagsDisabled, - this.usePageTemplate, - this.headTags, - this.filters); - } - - @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 tenant = Optional.empty(); - - private Optional prompt = Optional.empty(); - - private Optional screen = Optional.empty(); - - private Optional renderingMode = Optional.empty(); - - private Optional> contextConfiguration = Optional.empty(); - - private OptionalNullable defaultHeadTagsDisabled = OptionalNullable.absent(); - - private OptionalNullable usePageTemplate = OptionalNullable.absent(); - - private Optional> headTags = Optional.empty(); - - private OptionalNullable filters = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListAculsResponseContentItem other) { - tenant(other.getTenant()); - prompt(other.getPrompt()); - screen(other.getScreen()); - renderingMode(other.getRenderingMode()); - contextConfiguration(other.getContextConfiguration()); - defaultHeadTagsDisabled(other.getDefaultHeadTagsDisabled()); - usePageTemplate(other.getUsePageTemplate()); - headTags(other.getHeadTags()); - filters(other.getFilters()); - return this; - } - - /** - *

Tenant ID

- */ - @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 the prompt

- */ - @JsonSetter(value = "prompt", nulls = Nulls.SKIP) - public Builder prompt(Optional prompt) { - this.prompt = prompt; - return this; - } - - public Builder prompt(String prompt) { - this.prompt = Optional.ofNullable(prompt); - return this; - } - - /** - *

Name of the screen

- */ - @JsonSetter(value = "screen", nulls = Nulls.SKIP) - public Builder screen(Optional screen) { - this.screen = screen; - return this; - } - - public Builder screen(String screen) { - this.screen = Optional.ofNullable(screen); - return this; - } - - @JsonSetter(value = "rendering_mode", nulls = Nulls.SKIP) - public Builder renderingMode(Optional renderingMode) { - this.renderingMode = renderingMode; - return this; - } - - public Builder renderingMode(AculRenderingModeEnum renderingMode) { - this.renderingMode = Optional.ofNullable(renderingMode); - return this; - } - - @JsonSetter(value = "context_configuration", nulls = Nulls.SKIP) - public Builder contextConfiguration(Optional> contextConfiguration) { - this.contextConfiguration = contextConfiguration; - return this; - } - - public Builder contextConfiguration(List contextConfiguration) { - this.contextConfiguration = Optional.ofNullable(contextConfiguration); - return this; - } - - /** - *

Override Universal Login default head tags

- */ - @JsonSetter(value = "default_head_tags_disabled", nulls = Nulls.SKIP) - public Builder defaultHeadTagsDisabled(@Nullable OptionalNullable defaultHeadTagsDisabled) { - this.defaultHeadTagsDisabled = defaultHeadTagsDisabled; - return this; - } - - public Builder defaultHeadTagsDisabled(Boolean defaultHeadTagsDisabled) { - this.defaultHeadTagsDisabled = OptionalNullable.of(defaultHeadTagsDisabled); - return this; - } - - public Builder defaultHeadTagsDisabled(Optional defaultHeadTagsDisabled) { - if (defaultHeadTagsDisabled.isPresent()) { - this.defaultHeadTagsDisabled = OptionalNullable.of(defaultHeadTagsDisabled.get()); - } else { - this.defaultHeadTagsDisabled = OptionalNullable.absent(); - } - return this; - } - - public Builder defaultHeadTagsDisabled(com.auth0.client.mgmt.core.Nullable defaultHeadTagsDisabled) { - if (defaultHeadTagsDisabled.isNull()) { - this.defaultHeadTagsDisabled = OptionalNullable.ofNull(); - } else if (defaultHeadTagsDisabled.isEmpty()) { - this.defaultHeadTagsDisabled = OptionalNullable.absent(); - } else { - this.defaultHeadTagsDisabled = OptionalNullable.of(defaultHeadTagsDisabled.get()); - } - return this; - } - - /** - *

Use page template with ACUL

- */ - @JsonSetter(value = "use_page_template", nulls = Nulls.SKIP) - public Builder usePageTemplate(@Nullable OptionalNullable usePageTemplate) { - this.usePageTemplate = usePageTemplate; - return this; - } - - public Builder usePageTemplate(Boolean usePageTemplate) { - this.usePageTemplate = OptionalNullable.of(usePageTemplate); - return this; - } - - public Builder usePageTemplate(Optional usePageTemplate) { - if (usePageTemplate.isPresent()) { - this.usePageTemplate = OptionalNullable.of(usePageTemplate.get()); - } else { - this.usePageTemplate = OptionalNullable.absent(); - } - return this; - } - - public Builder usePageTemplate(com.auth0.client.mgmt.core.Nullable usePageTemplate) { - if (usePageTemplate.isNull()) { - this.usePageTemplate = OptionalNullable.ofNull(); - } else if (usePageTemplate.isEmpty()) { - this.usePageTemplate = OptionalNullable.absent(); - } else { - this.usePageTemplate = OptionalNullable.of(usePageTemplate.get()); - } - return this; - } - - /** - *

An array of head tags

- */ - @JsonSetter(value = "head_tags", nulls = Nulls.SKIP) - public Builder headTags(Optional> headTags) { - this.headTags = headTags; - return this; - } - - public Builder headTags(List headTags) { - this.headTags = Optional.ofNullable(headTags); - return this; - } - - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public Builder filters(@Nullable OptionalNullable filters) { - this.filters = filters; - return this; - } - - public Builder filters(AculFilters filters) { - this.filters = OptionalNullable.of(filters); - return this; - } - - public Builder filters(Optional filters) { - if (filters.isPresent()) { - this.filters = OptionalNullable.of(filters.get()); - } else { - this.filters = OptionalNullable.absent(); - } - return this; - } - - public Builder filters(com.auth0.client.mgmt.core.Nullable filters) { - if (filters.isNull()) { - this.filters = OptionalNullable.ofNull(); - } else if (filters.isEmpty()) { - this.filters = OptionalNullable.absent(); - } else { - this.filters = OptionalNullable.of(filters.get()); - } - return this; - } - - public ListAculsResponseContentItem build() { - return new ListAculsResponseContentItem( - tenant, - prompt, - screen, - renderingMode, - contextConfiguration, - defaultHeadTagsDisabled, - usePageTemplate, - headTags, - filters, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListBrandingPhoneProvidersResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListBrandingPhoneProvidersResponseContent.java deleted file mode 100644 index fba219f29..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListBrandingPhoneProvidersResponseContent.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListBrandingPhoneProvidersResponseContent.Builder.class) -public final class ListBrandingPhoneProvidersResponseContent { - private final Optional> providers; - - private final Map additionalProperties; - - private ListBrandingPhoneProvidersResponseContent( - Optional> providers, Map additionalProperties) { - this.providers = providers; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("providers") - public Optional> getProviders() { - return providers; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListBrandingPhoneProvidersResponseContent - && equalTo((ListBrandingPhoneProvidersResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListBrandingPhoneProvidersResponseContent other) { - return providers.equals(other.providers); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.providers); - } - - @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> providers = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListBrandingPhoneProvidersResponseContent other) { - providers(other.getProviders()); - return this; - } - - @JsonSetter(value = "providers", nulls = Nulls.SKIP) - public Builder providers(Optional> providers) { - this.providers = providers; - return this; - } - - public Builder providers(List providers) { - this.providers = Optional.ofNullable(providers); - return this; - } - - public ListBrandingPhoneProvidersResponseContent build() { - return new ListBrandingPhoneProvidersResponseContent(providers, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListClientConnectionsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListClientConnectionsResponseContent.java deleted file mode 100644 index e9bb942a4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListClientConnectionsResponseContent.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = ListClientConnectionsResponseContent.Builder.class) -public final class ListClientConnectionsResponseContent { - private final List connections; - - private final Optional next; - - private final Map additionalProperties; - - private ListClientConnectionsResponseContent( - List connections, Optional next, Map additionalProperties) { - this.connections = connections; - this.next = next; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connections") - public List getConnections() { - return connections; - } - - /** - * @return Encoded next token - */ - @JsonProperty("next") - public Optional getNext() { - return next; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListClientConnectionsResponseContent - && equalTo((ListClientConnectionsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListClientConnectionsResponseContent other) { - return connections.equals(other.connections) && next.equals(other.next); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connections, 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 connections = new ArrayList<>(); - - private Optional next = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListClientConnectionsResponseContent other) { - connections(other.getConnections()); - next(other.getNext()); - return this; - } - - @JsonSetter(value = "connections", nulls = Nulls.SKIP) - public Builder connections(List connections) { - this.connections.clear(); - if (connections != null) { - this.connections.addAll(connections); - } - return this; - } - - public Builder addConnections(ConnectionForList connections) { - this.connections.add(connections); - return this; - } - - public Builder addAllConnections(List connections) { - if (connections != null) { - this.connections.addAll(connections); - } - return this; - } - - /** - *

Encoded next token

- */ - @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 ListClientConnectionsResponseContent build() { - return new ListClientConnectionsResponseContent(connections, next, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListClientGrantOrganizationsPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListClientGrantOrganizationsPaginatedResponseContent.java deleted file mode 100644 index b356b3512..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListClientGrantOrganizationsPaginatedResponseContent.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListClientGrantOrganizationsPaginatedResponseContent.Builder.class) -public final class ListClientGrantOrganizationsPaginatedResponseContent { - private final Optional next; - - private final Optional> organizations; - - private final Map additionalProperties; - - private ListClientGrantOrganizationsPaginatedResponseContent( - Optional next, - Optional> organizations, - Map additionalProperties) { - this.next = next; - this.organizations = organizations; - this.additionalProperties = additionalProperties; - } - - /** - * @return Opaque identifier for use with the <i>from</i> query parameter for the next page of results.<br/>This identifier is valid for 24 hours. - */ - @JsonProperty("next") - public Optional getNext() { - return next; - } - - @JsonProperty("organizations") - public Optional> getOrganizations() { - return organizations; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListClientGrantOrganizationsPaginatedResponseContent - && equalTo((ListClientGrantOrganizationsPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListClientGrantOrganizationsPaginatedResponseContent other) { - return next.equals(other.next) && organizations.equals(other.organizations); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.next, this.organizations); - } - - @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 Optional> organizations = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListClientGrantOrganizationsPaginatedResponseContent other) { - next(other.getNext()); - organizations(other.getOrganizations()); - return this; - } - - /** - *

Opaque identifier for use with the <i>from</i> query parameter for the next page of results.<br/>This identifier is valid for 24 hours.

- */ - @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 = "organizations", nulls = Nulls.SKIP) - public Builder organizations(Optional> organizations) { - this.organizations = organizations; - return this; - } - - public Builder organizations(List organizations) { - this.organizations = Optional.ofNullable(organizations); - return this; - } - - public ListClientGrantOrganizationsPaginatedResponseContent build() { - return new ListClientGrantOrganizationsPaginatedResponseContent(next, organizations, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListClientGrantPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListClientGrantPaginatedResponseContent.java deleted file mode 100644 index 4fddd9cf4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListClientGrantPaginatedResponseContent.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListClientGrantPaginatedResponseContent.Builder.class) -public final class ListClientGrantPaginatedResponseContent { - private final Optional next; - - private final Optional> clientGrants; - - private final Map additionalProperties; - - private ListClientGrantPaginatedResponseContent( - Optional next, - Optional> clientGrants, - Map additionalProperties) { - this.next = next; - this.clientGrants = clientGrants; - this.additionalProperties = additionalProperties; - } - - /** - * @return Opaque identifier for use with the <i>from</i> query parameter for the next page of results.<br/>This identifier is valid for 24 hours. - */ - @JsonProperty("next") - public Optional getNext() { - return next; - } - - @JsonProperty("client_grants") - public Optional> getClientGrants() { - return clientGrants; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListClientGrantPaginatedResponseContent - && equalTo((ListClientGrantPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListClientGrantPaginatedResponseContent other) { - return next.equals(other.next) && clientGrants.equals(other.clientGrants); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.next, this.clientGrants); - } - - @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 Optional> clientGrants = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListClientGrantPaginatedResponseContent other) { - next(other.getNext()); - clientGrants(other.getClientGrants()); - return this; - } - - /** - *

Opaque identifier for use with the <i>from</i> query parameter for the next page of results.<br/>This identifier is valid for 24 hours.

- */ - @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_grants", nulls = Nulls.SKIP) - public Builder clientGrants(Optional> clientGrants) { - this.clientGrants = clientGrants; - return this; - } - - public Builder clientGrants(List clientGrants) { - this.clientGrants = Optional.ofNullable(clientGrants); - return this; - } - - public ListClientGrantPaginatedResponseContent build() { - return new ListClientGrantPaginatedResponseContent(next, clientGrants, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListClientGrantsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListClientGrantsRequestParameters.java deleted file mode 100644 index 149328dac..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListClientGrantsRequestParameters.java +++ /dev/null @@ -1,429 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListClientGrantsRequestParameters.Builder.class) -public final class ListClientGrantsRequestParameters { - private final OptionalNullable from; - - private final OptionalNullable take; - - private final OptionalNullable audience; - - private final OptionalNullable clientId; - - private final OptionalNullable allowAnyOrganization; - - private final OptionalNullable subjectType; - - private final Map additionalProperties; - - private ListClientGrantsRequestParameters( - OptionalNullable from, - OptionalNullable take, - OptionalNullable audience, - OptionalNullable clientId, - OptionalNullable allowAnyOrganization, - OptionalNullable subjectType, - Map additionalProperties) { - this.from = from; - this.take = take; - this.audience = audience; - this.clientId = clientId; - this.allowAnyOrganization = allowAnyOrganization; - this.subjectType = subjectType; - 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() { - return take; - } - - /** - * @return Optional filter on audience. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("audience") - public OptionalNullable getAudience() { - if (audience == null) { - return OptionalNullable.absent(); - } - return audience; - } - - /** - * @return Optional filter on client_id. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("client_id") - public OptionalNullable getClientId() { - if (clientId == null) { - return OptionalNullable.absent(); - } - return clientId; - } - - /** - * @return Optional filter on allow_any_organization. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("allow_any_organization") - public OptionalNullable getAllowAnyOrganization() { - if (allowAnyOrganization == null) { - return OptionalNullable.absent(); - } - return allowAnyOrganization; - } - - /** - * @return The type of application access the client grant allows. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("subject_type") - public OptionalNullable getSubjectType() { - if (subjectType == null) { - return OptionalNullable.absent(); - } - return subjectType; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - private OptionalNullable _getFrom() { - return from; - } - - @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; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListClientGrantsRequestParameters && equalTo((ListClientGrantsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListClientGrantsRequestParameters other) { - return from.equals(other.from) - && take.equals(other.take) - && audience.equals(other.audience) - && clientId.equals(other.clientId) - && allowAnyOrganization.equals(other.allowAnyOrganization) - && subjectType.equals(other.subjectType); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.from, this.take, this.audience, this.clientId, this.allowAnyOrganization, this.subjectType); - } - - @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 audience = OptionalNullable.absent(); - - private OptionalNullable clientId = OptionalNullable.absent(); - - private OptionalNullable allowAnyOrganization = OptionalNullable.absent(); - - private OptionalNullable subjectType = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListClientGrantsRequestParameters other) { - from(other.getFrom()); - take(other.getTake()); - audience(other.getAudience()); - clientId(other.getClientId()); - allowAnyOrganization(other.getAllowAnyOrganization()); - subjectType(other.getSubjectType()); - 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(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; - } - - /** - *

Optional filter on audience.

- */ - @JsonSetter(value = "audience", nulls = Nulls.SKIP) - public Builder audience(@Nullable OptionalNullable audience) { - this.audience = audience; - return this; - } - - public Builder audience(String audience) { - this.audience = OptionalNullable.of(audience); - return this; - } - - public Builder audience(Optional audience) { - if (audience.isPresent()) { - this.audience = OptionalNullable.of(audience.get()); - } else { - this.audience = OptionalNullable.absent(); - } - return this; - } - - public Builder audience(com.auth0.client.mgmt.core.Nullable audience) { - if (audience.isNull()) { - this.audience = OptionalNullable.ofNull(); - } else if (audience.isEmpty()) { - this.audience = OptionalNullable.absent(); - } else { - this.audience = OptionalNullable.of(audience.get()); - } - return this; - } - - /** - *

Optional filter on client_id.

- */ - @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; - } - - /** - *

Optional filter on allow_any_organization.

- */ - @JsonSetter(value = "allow_any_organization", nulls = Nulls.SKIP) - public Builder allowAnyOrganization(@Nullable OptionalNullable allowAnyOrganization) { - this.allowAnyOrganization = allowAnyOrganization; - return this; - } - - public Builder allowAnyOrganization(Boolean allowAnyOrganization) { - this.allowAnyOrganization = OptionalNullable.of(allowAnyOrganization); - return this; - } - - public Builder allowAnyOrganization(Optional allowAnyOrganization) { - if (allowAnyOrganization.isPresent()) { - this.allowAnyOrganization = OptionalNullable.of(allowAnyOrganization.get()); - } else { - this.allowAnyOrganization = OptionalNullable.absent(); - } - return this; - } - - public Builder allowAnyOrganization(com.auth0.client.mgmt.core.Nullable allowAnyOrganization) { - if (allowAnyOrganization.isNull()) { - this.allowAnyOrganization = OptionalNullable.ofNull(); - } else if (allowAnyOrganization.isEmpty()) { - this.allowAnyOrganization = OptionalNullable.absent(); - } else { - this.allowAnyOrganization = OptionalNullable.of(allowAnyOrganization.get()); - } - return this; - } - - /** - *

The type of application access the client grant allows.

- */ - @JsonSetter(value = "subject_type", nulls = Nulls.SKIP) - public Builder subjectType(@Nullable OptionalNullable subjectType) { - this.subjectType = subjectType; - return this; - } - - public Builder subjectType(ClientGrantSubjectTypeEnum subjectType) { - this.subjectType = OptionalNullable.of(subjectType); - return this; - } - - public Builder subjectType(Optional subjectType) { - if (subjectType.isPresent()) { - this.subjectType = OptionalNullable.of(subjectType.get()); - } else { - this.subjectType = OptionalNullable.absent(); - } - return this; - } - - public Builder subjectType(com.auth0.client.mgmt.core.Nullable subjectType) { - if (subjectType.isNull()) { - this.subjectType = OptionalNullable.ofNull(); - } else if (subjectType.isEmpty()) { - this.subjectType = OptionalNullable.absent(); - } else { - this.subjectType = OptionalNullable.of(subjectType.get()); - } - return this; - } - - public ListClientGrantsRequestParameters build() { - return new ListClientGrantsRequestParameters( - from, take, audience, clientId, allowAnyOrganization, subjectType, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListClientsOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListClientsOffsetPaginatedResponseContent.java deleted file mode 100644 index b1a490f66..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListClientsOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,171 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListClientsOffsetPaginatedResponseContent.Builder.class) -public final class ListClientsOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> clients; - - private final Map additionalProperties; - - private ListClientsOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> clients, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.clients = clients; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("clients") - public Optional> getClients() { - return clients; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListClientsOffsetPaginatedResponseContent - && equalTo((ListClientsOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListClientsOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && clients.equals(other.clients); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, 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 Optional start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> clients = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListClientsOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - clients(other.getClients()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "clients", nulls = Nulls.SKIP) - public Builder clients(Optional> clients) { - this.clients = clients; - return this; - } - - public Builder clients(List clients) { - this.clients = Optional.ofNullable(clients); - return this; - } - - public ListClientsOffsetPaginatedResponseContent build() { - return new ListClientsOffsetPaginatedResponseContent(start, limit, total, clients, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListClientsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListClientsRequestParameters.java deleted file mode 100644 index 83ef25b3e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListClientsRequestParameters.java +++ /dev/null @@ -1,608 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListClientsRequestParameters.Builder.class) -public final class ListClientsRequestParameters { - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final OptionalNullable isGlobal; - - private final OptionalNullable isFirstParty; - - private final OptionalNullable appType; - - private final OptionalNullable q; - - private final Map additionalProperties; - - private ListClientsRequestParameters( - OptionalNullable fields, - OptionalNullable includeFields, - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - OptionalNullable isGlobal, - OptionalNullable isFirstParty, - OptionalNullable appType, - OptionalNullable q, - Map additionalProperties) { - this.fields = fields; - this.includeFields = includeFields; - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.isGlobal = isGlobal; - this.isFirstParty = isFirstParty; - this.appType = appType; - this.q = q; - this.additionalProperties = additionalProperties; - } - - /** - * @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). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("include_fields") - public OptionalNullable getIncludeFields() { - if (includeFields == null) { - return OptionalNullable.absent(); - } - return includeFields; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. Default value is 50, maximum value is 100 - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - return includeTotals; - } - - /** - * @return Optional filter on the global client parameter. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("is_global") - public OptionalNullable getIsGlobal() { - if (isGlobal == null) { - return OptionalNullable.absent(); - } - return isGlobal; - } - - /** - * @return Optional filter on whether or not a client is a first-party client. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("is_first_party") - public OptionalNullable getIsFirstParty() { - if (isFirstParty == null) { - return OptionalNullable.absent(); - } - return isFirstParty; - } - - /** - * @return Optional filter by a comma-separated list of application types. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("app_type") - public OptionalNullable getAppType() { - if (appType == null) { - return OptionalNullable.absent(); - } - return appType; - } - - /** - * @return Advanced Query in <a href="http://www.lucenetutorial.com/lucene-query-syntax.html">Lucene</a> syntax.<br /><b>Permitted Queries</b>:<br /><ul><li><i>client_grant.organization_id:{organization_id}</i></li><li><i>client_grant.allow_any_organization:true</i></li></ul><b>Additional Restrictions</b>:<br /><ul><li>Cannot be used in combination with other filters</li><li>Requires use of the <i>from</i> and <i>take</i> paging parameters (checkpoint paginatinon)</li><li>Reduced rate limits apply. See <a href="https://auth0.com/docs/troubleshoot/customer-support/operational-policies/rate-limit-policy/rate-limit-configurations/enterprise-public">Rate Limit Configurations</a></li></ul><i><b>Note</b>: Recent updates may not be immediately reflected in query results</i> - */ - @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("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("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("q") - private OptionalNullable _getQ() { - return q; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListClientsRequestParameters && equalTo((ListClientsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListClientsRequestParameters other) { - return fields.equals(other.fields) - && includeFields.equals(other.includeFields) - && page.equals(other.page) - && perPage.equals(other.perPage) - && includeTotals.equals(other.includeTotals) - && isGlobal.equals(other.isGlobal) - && isFirstParty.equals(other.isFirstParty) - && appType.equals(other.appType) - && q.equals(other.q); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.fields, - this.includeFields, - this.page, - this.perPage, - this.includeTotals, - this.isGlobal, - this.isFirstParty, - this.appType, - this.q); - } - - @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 fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - private OptionalNullable page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - private OptionalNullable isGlobal = OptionalNullable.absent(); - - private OptionalNullable isFirstParty = OptionalNullable.absent(); - - private OptionalNullable appType = OptionalNullable.absent(); - - private OptionalNullable q = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListClientsRequestParameters other) { - fields(other.getFields()); - includeFields(other.getIncludeFields()); - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - isGlobal(other.getIsGlobal()); - isFirstParty(other.getIsFirstParty()); - appType(other.getAppType()); - q(other.getQ()); - 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).

- */ - @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; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(com.auth0.client.mgmt.core.Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page. Default value is 50, maximum value is 100

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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 filter on the global client parameter.

- */ - @JsonSetter(value = "is_global", nulls = Nulls.SKIP) - public Builder isGlobal(@Nullable OptionalNullable isGlobal) { - this.isGlobal = isGlobal; - return this; - } - - public Builder isGlobal(Boolean isGlobal) { - this.isGlobal = OptionalNullable.of(isGlobal); - return this; - } - - public Builder isGlobal(Optional isGlobal) { - if (isGlobal.isPresent()) { - this.isGlobal = OptionalNullable.of(isGlobal.get()); - } else { - this.isGlobal = OptionalNullable.absent(); - } - return this; - } - - public Builder isGlobal(com.auth0.client.mgmt.core.Nullable isGlobal) { - if (isGlobal.isNull()) { - this.isGlobal = OptionalNullable.ofNull(); - } else if (isGlobal.isEmpty()) { - this.isGlobal = OptionalNullable.absent(); - } else { - this.isGlobal = OptionalNullable.of(isGlobal.get()); - } - return this; - } - - /** - *

Optional filter on whether or not a client is a first-party client.

- */ - @JsonSetter(value = "is_first_party", nulls = Nulls.SKIP) - public Builder isFirstParty(@Nullable OptionalNullable isFirstParty) { - this.isFirstParty = isFirstParty; - return this; - } - - public Builder isFirstParty(Boolean isFirstParty) { - this.isFirstParty = OptionalNullable.of(isFirstParty); - return this; - } - - public Builder isFirstParty(Optional isFirstParty) { - if (isFirstParty.isPresent()) { - this.isFirstParty = OptionalNullable.of(isFirstParty.get()); - } else { - this.isFirstParty = OptionalNullable.absent(); - } - return this; - } - - public Builder isFirstParty(com.auth0.client.mgmt.core.Nullable isFirstParty) { - if (isFirstParty.isNull()) { - this.isFirstParty = OptionalNullable.ofNull(); - } else if (isFirstParty.isEmpty()) { - this.isFirstParty = OptionalNullable.absent(); - } else { - this.isFirstParty = OptionalNullable.of(isFirstParty.get()); - } - return this; - } - - /** - *

Optional filter by a comma-separated list of application types.

- */ - @JsonSetter(value = "app_type", nulls = Nulls.SKIP) - public Builder appType(@Nullable OptionalNullable appType) { - this.appType = appType; - return this; - } - - public Builder appType(String appType) { - this.appType = OptionalNullable.of(appType); - return this; - } - - public Builder appType(Optional appType) { - if (appType.isPresent()) { - this.appType = OptionalNullable.of(appType.get()); - } else { - this.appType = OptionalNullable.absent(); - } - return this; - } - - public Builder appType(com.auth0.client.mgmt.core.Nullable appType) { - if (appType.isNull()) { - this.appType = OptionalNullable.ofNull(); - } else if (appType.isEmpty()) { - this.appType = OptionalNullable.absent(); - } else { - this.appType = OptionalNullable.of(appType.get()); - } - return this; - } - - /** - *

Advanced Query in <a href="http://www.lucenetutorial.com/lucene-query-syntax.html">Lucene</a> syntax.<br /><b>Permitted Queries</b>:<br /><ul><li><i>client_grant.organization_id:{organization_id}</i></li><li><i>client_grant.allow_any_organization:true</i></li></ul><b>Additional Restrictions</b>:<br /><ul><li>Cannot be used in combination with other filters</li><li>Requires use of the <i>from</i> and <i>take</i> paging parameters (checkpoint paginatinon)</li><li>Reduced rate limits apply. See <a href="https://auth0.com/docs/troubleshoot/customer-support/operational-policies/rate-limit-policy/rate-limit-configurations/enterprise-public">Rate Limit Configurations</a></li></ul><i><b>Note</b>: Recent updates may not be immediately reflected in query results</i>

- */ - @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 ListClientsRequestParameters build() { - return new ListClientsRequestParameters( - fields, - includeFields, - page, - perPage, - includeTotals, - isGlobal, - isFirstParty, - appType, - 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 deleted file mode 100644 index 05a7d1b71..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListConnectionProfileRequestParameters.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListConnectionProfileRequestParameters.Builder.class) -public final class ListConnectionProfileRequestParameters { - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private ListConnectionProfileRequestParameters( - 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 5. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("take") - public 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; - return other instanceof ListConnectionProfileRequestParameters - && equalTo((ListConnectionProfileRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListConnectionProfileRequestParameters 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(ListConnectionProfileRequestParameters 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 5.

- */ - @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(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 ListConnectionProfileRequestParameters build() { - return new ListConnectionProfileRequestParameters(from, take, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListConnectionProfileTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListConnectionProfileTemplateResponseContent.java deleted file mode 100644 index fba212a2b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListConnectionProfileTemplateResponseContent.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListConnectionProfileTemplateResponseContent.Builder.class) -public final class ListConnectionProfileTemplateResponseContent { - private final Optional> connectionProfileTemplates; - - private final Map additionalProperties; - - private ListConnectionProfileTemplateResponseContent( - Optional> connectionProfileTemplates, - Map additionalProperties) { - this.connectionProfileTemplates = connectionProfileTemplates; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connection_profile_templates") - public Optional> getConnectionProfileTemplates() { - return connectionProfileTemplates; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListConnectionProfileTemplateResponseContent - && equalTo((ListConnectionProfileTemplateResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListConnectionProfileTemplateResponseContent other) { - return connectionProfileTemplates.equals(other.connectionProfileTemplates); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectionProfileTemplates); - } - - @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> connectionProfileTemplates = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListConnectionProfileTemplateResponseContent other) { - connectionProfileTemplates(other.getConnectionProfileTemplates()); - return this; - } - - @JsonSetter(value = "connection_profile_templates", nulls = Nulls.SKIP) - public Builder connectionProfileTemplates( - Optional> connectionProfileTemplates) { - this.connectionProfileTemplates = connectionProfileTemplates; - return this; - } - - public Builder connectionProfileTemplates(List connectionProfileTemplates) { - this.connectionProfileTemplates = Optional.ofNullable(connectionProfileTemplates); - return this; - } - - public ListConnectionProfileTemplateResponseContent build() { - return new ListConnectionProfileTemplateResponseContent(connectionProfileTemplates, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListConnectionProfilesPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListConnectionProfilesPaginatedResponseContent.java deleted file mode 100644 index d0a16859b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListConnectionProfilesPaginatedResponseContent.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListConnectionProfilesPaginatedResponseContent.Builder.class) -public final class ListConnectionProfilesPaginatedResponseContent { - private final Optional next; - - private final Optional> connectionProfiles; - - private final Map additionalProperties; - - private ListConnectionProfilesPaginatedResponseContent( - Optional next, - Optional> connectionProfiles, - Map additionalProperties) { - this.next = next; - this.connectionProfiles = connectionProfiles; - 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("connection_profiles") - public Optional> getConnectionProfiles() { - return connectionProfiles; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListConnectionProfilesPaginatedResponseContent - && equalTo((ListConnectionProfilesPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListConnectionProfilesPaginatedResponseContent other) { - return next.equals(other.next) && connectionProfiles.equals(other.connectionProfiles); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.next, this.connectionProfiles); - } - - @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 Optional> connectionProfiles = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListConnectionProfilesPaginatedResponseContent other) { - next(other.getNext()); - connectionProfiles(other.getConnectionProfiles()); - 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 = "connection_profiles", nulls = Nulls.SKIP) - public Builder connectionProfiles(Optional> connectionProfiles) { - this.connectionProfiles = connectionProfiles; - return this; - } - - public Builder connectionProfiles(List connectionProfiles) { - this.connectionProfiles = Optional.ofNullable(connectionProfiles); - return this; - } - - public ListConnectionProfilesPaginatedResponseContent build() { - return new ListConnectionProfilesPaginatedResponseContent(next, connectionProfiles, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListConnectionsCheckpointPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListConnectionsCheckpointPaginatedResponseContent.java deleted file mode 100644 index 7b7e04dcd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListConnectionsCheckpointPaginatedResponseContent.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListConnectionsCheckpointPaginatedResponseContent.Builder.class) -public final class ListConnectionsCheckpointPaginatedResponseContent { - private final Optional next; - - private final Optional> connections; - - private final Map additionalProperties; - - private ListConnectionsCheckpointPaginatedResponseContent( - Optional next, - Optional> connections, - Map additionalProperties) { - this.next = next; - this.connections = connections; - this.additionalProperties = additionalProperties; - } - - /** - * @return Opaque identifier for use with the <i>from</i> query parameter for the next page of results. - */ - @JsonProperty("next") - public Optional getNext() { - return next; - } - - @JsonProperty("connections") - public Optional> getConnections() { - return connections; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListConnectionsCheckpointPaginatedResponseContent - && equalTo((ListConnectionsCheckpointPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListConnectionsCheckpointPaginatedResponseContent other) { - return next.equals(other.next) && connections.equals(other.connections); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.next, this.connections); - } - - @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 Optional> connections = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListConnectionsCheckpointPaginatedResponseContent other) { - next(other.getNext()); - connections(other.getConnections()); - return this; - } - - /** - *

Opaque identifier for use with the <i>from</i> 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 = "connections", nulls = Nulls.SKIP) - public Builder connections(Optional> connections) { - this.connections = connections; - return this; - } - - public Builder connections(List connections) { - this.connections = Optional.ofNullable(connections); - return this; - } - - public ListConnectionsCheckpointPaginatedResponseContent build() { - return new ListConnectionsCheckpointPaginatedResponseContent(next, connections, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListConnectionsQueryParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListConnectionsQueryParameters.java deleted file mode 100644 index a4f64a988..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListConnectionsQueryParameters.java +++ /dev/null @@ -1,426 +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.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; -import java.util.Collections; -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 = ListConnectionsQueryParameters.Builder.class) -public final class ListConnectionsQueryParameters { - private final Optional> strategy; - - private final OptionalNullable from; - - private final OptionalNullable take; - - private final OptionalNullable name; - - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final Map additionalProperties; - - private ListConnectionsQueryParameters( - Optional> strategy, - OptionalNullable from, - OptionalNullable take, - OptionalNullable name, - OptionalNullable fields, - OptionalNullable includeFields, - Map additionalProperties) { - this.strategy = strategy; - this.from = from; - this.take = take; - this.name = name; - this.fields = fields; - this.includeFields = includeFields; - this.additionalProperties = additionalProperties; - } - - /** - * @return Provide strategies to only retrieve connections with such strategies - */ - @JsonIgnore - public Optional> getStrategy() { - if (strategy == null) { - return Optional.empty(); - } - return strategy; - } - - /** - * @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() { - return take; - } - - /** - * @return Provide the name of the connection to retrieve - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("name") - public OptionalNullable getName() { - if (name == null) { - return OptionalNullable.absent(); - } - return name; - } - - /** - * @return A comma separated list of fields to include or exclude (depending on include_fields) from the result, 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 <code>true</code> if the fields specified are to be included in the result, <code>false</code> otherwise (defaults to <code>true</code>) - */ - @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("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("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; - return other instanceof ListConnectionsQueryParameters && equalTo((ListConnectionsQueryParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListConnectionsQueryParameters other) { - return strategy.equals(other.strategy) - && from.equals(other.from) - && take.equals(other.take) - && name.equals(other.name) - && fields.equals(other.fields) - && includeFields.equals(other.includeFields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.strategy, this.from, this.take, this.name, 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 Optional> strategy = Optional.empty(); - - private OptionalNullable from = OptionalNullable.absent(); - - private OptionalNullable take = OptionalNullable.absent(); - - private OptionalNullable name = OptionalNullable.absent(); - - private OptionalNullable fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListConnectionsQueryParameters other) { - strategy(other.getStrategy()); - from(other.getFrom()); - take(other.getTake()); - name(other.getName()); - fields(other.getFields()); - includeFields(other.getIncludeFields()); - return this; - } - - /** - *

Provide strategies to only retrieve connections with such strategies

- */ - @JsonSetter(value = "strategy", nulls = Nulls.SKIP) - public Builder strategy(@Nullable Optional> strategy) { - this.strategy = strategy; - return this; - } - - public Builder strategy(List strategy) { - this.strategy = Optional.ofNullable(strategy); - return this; - } - - public Builder strategy(com.auth0.client.mgmt.core.Nullable> strategy) { - if (strategy.isNull()) { - this.strategy = null; - } else if (strategy.isEmpty()) { - this.strategy = Optional.empty(); - } else { - this.strategy = Optional.of(strategy.get()); - } - return this; - } - - public Builder strategy(ConnectionStrategyEnum strategy) { - this.strategy = Optional.of(Collections.singletonList(strategy)); - 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(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; - } - - /** - *

Provide the name of the connection to retrieve

- */ - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public Builder name(@Nullable OptionalNullable name) { - this.name = name; - return this; - } - - public Builder name(String name) { - this.name = OptionalNullable.of(name); - return this; - } - - public Builder name(Optional name) { - if (name.isPresent()) { - this.name = OptionalNullable.of(name.get()); - } else { - this.name = OptionalNullable.absent(); - } - return this; - } - - public Builder name(com.auth0.client.mgmt.core.Nullable name) { - if (name.isNull()) { - this.name = OptionalNullable.ofNull(); - } else if (name.isEmpty()) { - this.name = OptionalNullable.absent(); - } else { - this.name = OptionalNullable.of(name.get()); - } - return this; - } - - /** - *

A comma separated list of fields to include or exclude (depending on include_fields) from the result, 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; - } - - /** - *

<code>true</code> if the fields specified are to be included in the result, <code>false</code> otherwise (defaults to <code>true</code>)

- */ - @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 ListConnectionsQueryParameters build() { - return new ListConnectionsQueryParameters( - strategy, from, take, name, fields, includeFields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListCustomDomainsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListCustomDomainsRequestParameters.java deleted file mode 100644 index 662c4a03e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListCustomDomainsRequestParameters.java +++ /dev/null @@ -1,317 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListCustomDomainsRequestParameters.Builder.class) -public final class ListCustomDomainsRequestParameters { - private final OptionalNullable q; - - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final OptionalNullable sort; - - private final Map additionalProperties; - - private ListCustomDomainsRequestParameters( - OptionalNullable q, - OptionalNullable fields, - OptionalNullable includeFields, - OptionalNullable sort, - Map additionalProperties) { - this.q = q; - this.fields = fields; - this.includeFields = includeFields; - this.sort = sort; - this.additionalProperties = additionalProperties; - } - - /** - * @return Query in <a href ="http://www.lucenetutorial.com/lucene-query-syntax.html">Lucene query string syntax</a>. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("q") - public OptionalNullable getQ() { - if (q == null) { - return OptionalNullable.absent(); - } - return q; - } - - /** - * @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). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("include_fields") - public OptionalNullable getIncludeFields() { - if (includeFields == null) { - return OptionalNullable.absent(); - } - return includeFields; - } - - /** - * @return Field to sort by. Only <code>domain:1</code> (ascending order by domain) is supported at this time. - */ - @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("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; - return other instanceof ListCustomDomainsRequestParameters - && equalTo((ListCustomDomainsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListCustomDomainsRequestParameters other) { - return q.equals(other.q) - && fields.equals(other.fields) - && includeFields.equals(other.includeFields) - && sort.equals(other.sort); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.q, this.fields, this.includeFields, 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 fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - private OptionalNullable sort = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListCustomDomainsRequestParameters other) { - q(other.getQ()); - fields(other.getFields()); - includeFields(other.getIncludeFields()); - sort(other.getSort()); - return this; - } - - /** - *

Query in <a href ="http://www.lucenetutorial.com/lucene-query-syntax.html">Lucene query string syntax</a>.

- */ - @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; - } - - /** - *

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).

- */ - @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; - } - - /** - *

Field to sort by. Only <code>domain:1</code> (ascending order by domain) is supported at this time.

- */ - @JsonSetter(value = "sort", nulls = Nulls.SKIP) - public Builder sort(@Nullable OptionalNullable sort) { - this.sort = sort; - return this; - } - - public Builder sort(String 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 ListCustomDomainsRequestParameters build() { - return new ListCustomDomainsRequestParameters(q, fields, includeFields, sort, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListDeviceCredentialsOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListDeviceCredentialsOffsetPaginatedResponseContent.java deleted file mode 100644 index c97ba3c8d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListDeviceCredentialsOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListDeviceCredentialsOffsetPaginatedResponseContent.Builder.class) -public final class ListDeviceCredentialsOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> deviceCredentials; - - private final Map additionalProperties; - - private ListDeviceCredentialsOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> deviceCredentials, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.deviceCredentials = deviceCredentials; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("device_credentials") - public Optional> getDeviceCredentials() { - return deviceCredentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListDeviceCredentialsOffsetPaginatedResponseContent - && equalTo((ListDeviceCredentialsOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListDeviceCredentialsOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && deviceCredentials.equals(other.deviceCredentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.deviceCredentials); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> deviceCredentials = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListDeviceCredentialsOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - deviceCredentials(other.getDeviceCredentials()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "device_credentials", nulls = Nulls.SKIP) - public Builder deviceCredentials(Optional> deviceCredentials) { - this.deviceCredentials = deviceCredentials; - return this; - } - - public Builder deviceCredentials(List deviceCredentials) { - this.deviceCredentials = Optional.ofNullable(deviceCredentials); - return this; - } - - public ListDeviceCredentialsOffsetPaginatedResponseContent build() { - return new ListDeviceCredentialsOffsetPaginatedResponseContent( - start, limit, total, deviceCredentials, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListDeviceCredentialsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListDeviceCredentialsRequestParameters.java deleted file mode 100644 index 4bf65f863..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListDeviceCredentialsRequestParameters.java +++ /dev/null @@ -1,539 +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.Nullable; -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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListDeviceCredentialsRequestParameters.Builder.class) -public final class ListDeviceCredentialsRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final OptionalNullable userId; - - private final OptionalNullable clientId; - - private final OptionalNullable type; - - private final Map additionalProperties; - - private ListDeviceCredentialsRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - OptionalNullable fields, - OptionalNullable includeFields, - OptionalNullable userId, - OptionalNullable clientId, - OptionalNullable type, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.fields = fields; - this.includeFields = includeFields; - this.userId = userId; - this.clientId = clientId; - this.type = type; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. There is a maximum of 1000 results allowed from this endpoint. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - return includeTotals; - } - - /** - * @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). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("include_fields") - public OptionalNullable getIncludeFields() { - if (includeFields == null) { - return OptionalNullable.absent(); - } - return includeFields; - } - - /** - * @return user_id of the devices to retrieve. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("user_id") - public OptionalNullable getUserId() { - if (userId == null) { - return OptionalNullable.absent(); - } - return userId; - } - - /** - * @return client_id of the devices to retrieve. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("client_id") - public OptionalNullable getClientId() { - if (clientId == null) { - return OptionalNullable.absent(); - } - return clientId; - } - - /** - * @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 - */ - @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("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; - return other instanceof ListDeviceCredentialsRequestParameters - && equalTo((ListDeviceCredentialsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListDeviceCredentialsRequestParameters other) { - return page.equals(other.page) - && perPage.equals(other.perPage) - && includeTotals.equals(other.includeTotals) - && fields.equals(other.fields) - && includeFields.equals(other.includeFields) - && userId.equals(other.userId) - && clientId.equals(other.clientId) - && type.equals(other.type); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.page, - this.perPage, - this.includeTotals, - this.fields, - this.includeFields, - this.userId, - this.clientId, - 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 OptionalNullable page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - private OptionalNullable fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - private OptionalNullable userId = OptionalNullable.absent(); - - private OptionalNullable clientId = OptionalNullable.absent(); - - private OptionalNullable type = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListDeviceCredentialsRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - fields(other.getFields()); - includeFields(other.getIncludeFields()); - userId(other.getUserId()); - clientId(other.getClientId()); - type(other.getType()); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page. There is a maximum of 1000 results allowed from this endpoint.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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(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; - } - - /** - *

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(@org.jetbrains.annotations.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(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).

- */ - @JsonSetter(value = "include_fields", nulls = Nulls.SKIP) - public Builder includeFields(@org.jetbrains.annotations.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(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; - } - - /** - *

user_id of the devices to retrieve.

- */ - @JsonSetter(value = "user_id", nulls = Nulls.SKIP) - public Builder userId(@org.jetbrains.annotations.Nullable OptionalNullable userId) { - this.userId = userId; - return this; - } - - public Builder userId(String userId) { - this.userId = OptionalNullable.of(userId); - return this; - } - - public Builder userId(Optional userId) { - if (userId.isPresent()) { - this.userId = OptionalNullable.of(userId.get()); - } else { - this.userId = OptionalNullable.absent(); - } - return this; - } - - public Builder userId(Nullable userId) { - if (userId.isNull()) { - this.userId = OptionalNullable.ofNull(); - } else if (userId.isEmpty()) { - this.userId = OptionalNullable.absent(); - } else { - this.userId = OptionalNullable.of(userId.get()); - } - return this; - } - - /** - *

client_id of the devices to retrieve.

- */ - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(@org.jetbrains.annotations.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(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; - } - - /** - *

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

- */ - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(@org.jetbrains.annotations.Nullable OptionalNullable type) { - this.type = type; - return this; - } - - public Builder type(DeviceCredentialTypeEnum 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(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 ListDeviceCredentialsRequestParameters build() { - return new ListDeviceCredentialsRequestParameters( - page, perPage, includeTotals, fields, includeFields, userId, clientId, type, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListDirectoryProvisioningsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListDirectoryProvisioningsResponseContent.java deleted file mode 100644 index d0a8040e6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListDirectoryProvisioningsResponseContent.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = ListDirectoryProvisioningsResponseContent.Builder.class) -public final class ListDirectoryProvisioningsResponseContent { - private final List directoryProvisionings; - - private final Optional next; - - private final Map additionalProperties; - - private ListDirectoryProvisioningsResponseContent( - List directoryProvisionings, - Optional next, - Map additionalProperties) { - this.directoryProvisionings = directoryProvisionings; - this.next = next; - this.additionalProperties = additionalProperties; - } - - /** - * @return List of directory provisioning configurations - */ - @JsonProperty("directory_provisionings") - public List getDirectoryProvisionings() { - return directoryProvisionings; - } - - /** - * @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 ListDirectoryProvisioningsResponseContent - && equalTo((ListDirectoryProvisioningsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListDirectoryProvisioningsResponseContent other) { - return directoryProvisionings.equals(other.directoryProvisionings) && next.equals(other.next); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.directoryProvisionings, 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 directoryProvisionings = new ArrayList<>(); - - private Optional next = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListDirectoryProvisioningsResponseContent other) { - directoryProvisionings(other.getDirectoryProvisionings()); - next(other.getNext()); - return this; - } - - /** - *

List of directory provisioning configurations

- */ - @JsonSetter(value = "directory_provisionings", nulls = Nulls.SKIP) - public Builder directoryProvisionings(List directoryProvisionings) { - this.directoryProvisionings.clear(); - if (directoryProvisionings != null) { - this.directoryProvisionings.addAll(directoryProvisionings); - } - return this; - } - - public Builder addDirectoryProvisionings(DirectoryProvisioning directoryProvisionings) { - this.directoryProvisionings.add(directoryProvisionings); - return this; - } - - public Builder addAllDirectoryProvisionings(List directoryProvisionings) { - if (directoryProvisionings != null) { - this.directoryProvisionings.addAll(directoryProvisionings); - } - 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 ListDirectoryProvisioningsResponseContent build() { - return new ListDirectoryProvisioningsResponseContent(directoryProvisionings, next, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListEncryptionKeyOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListEncryptionKeyOffsetPaginatedResponseContent.java deleted file mode 100644 index 8b4abaab5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListEncryptionKeyOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListEncryptionKeyOffsetPaginatedResponseContent.Builder.class) -public final class ListEncryptionKeyOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> keys; - - private final Map additionalProperties; - - private ListEncryptionKeyOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> keys, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.keys = keys; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonProperty("start") - public Optional getStart() { - return start; - } - - /** - * @return Number of results per page. - */ - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - /** - * @return Total amount of encryption keys. - */ - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - /** - * @return Encryption keys. - */ - @JsonProperty("keys") - public Optional> getKeys() { - return keys; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListEncryptionKeyOffsetPaginatedResponseContent - && equalTo((ListEncryptionKeyOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListEncryptionKeyOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && keys.equals(other.keys); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, 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 Optional start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> keys = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListEncryptionKeyOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - keys(other.getKeys()); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional start) { - this.start = start; - return this; - } - - public Builder start(Integer start) { - this.start = Optional.ofNullable(start); - return this; - } - - /** - *

Number of results per page.

- */ - @JsonSetter(value = "limit", nulls = Nulls.SKIP) - public Builder limit(Optional limit) { - this.limit = limit; - return this; - } - - public Builder limit(Integer limit) { - this.limit = Optional.ofNullable(limit); - return this; - } - - /** - *

Total amount of encryption keys.

- */ - @JsonSetter(value = "total", nulls = Nulls.SKIP) - public Builder total(Optional total) { - this.total = total; - return this; - } - - public Builder total(Integer total) { - this.total = Optional.ofNullable(total); - return this; - } - - /** - *

Encryption keys.

- */ - @JsonSetter(value = "keys", nulls = Nulls.SKIP) - public Builder keys(Optional> keys) { - this.keys = keys; - return this; - } - - public Builder keys(List keys) { - this.keys = Optional.ofNullable(keys); - return this; - } - - public ListEncryptionKeyOffsetPaginatedResponseContent build() { - return new ListEncryptionKeyOffsetPaginatedResponseContent(start, limit, total, keys, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListEventStreamsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListEventStreamsRequestParameters.java deleted file mode 100644 index 0dffe8000..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListEventStreamsRequestParameters.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListEventStreamsRequestParameters.Builder.class) -public final class ListEventStreamsRequestParameters { - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private ListEventStreamsRequestParameters( - 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() { - 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; - return other instanceof ListEventStreamsRequestParameters && equalTo((ListEventStreamsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListEventStreamsRequestParameters 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(ListEventStreamsRequestParameters 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(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 ListEventStreamsRequestParameters build() { - return new ListEventStreamsRequestParameters(from, take, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListEventStreamsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListEventStreamsResponseContent.java deleted file mode 100644 index fb24218ab..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListEventStreamsResponseContent.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListEventStreamsResponseContent.Builder.class) -public final class ListEventStreamsResponseContent { - private final Optional> eventStreams; - - private final Optional next; - - private final Map additionalProperties; - - private ListEventStreamsResponseContent( - Optional> eventStreams, - Optional next, - Map additionalProperties) { - this.eventStreams = eventStreams; - this.next = next; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("eventStreams") - public Optional> getEventStreams() { - return eventStreams; - } - - /** - * @return Opaque identifier for use with the <i>from</i> 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 ListEventStreamsResponseContent && equalTo((ListEventStreamsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListEventStreamsResponseContent other) { - return eventStreams.equals(other.eventStreams) && next.equals(other.next); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.eventStreams, 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 Optional> eventStreams = Optional.empty(); - - private Optional next = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListEventStreamsResponseContent other) { - eventStreams(other.getEventStreams()); - next(other.getNext()); - return this; - } - - @JsonSetter(value = "eventStreams", nulls = Nulls.SKIP) - public Builder eventStreams(Optional> eventStreams) { - this.eventStreams = eventStreams; - return this; - } - - public Builder eventStreams(List eventStreams) { - this.eventStreams = Optional.ofNullable(eventStreams); - return this; - } - - /** - *

Opaque identifier for use with the <i>from</i> 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 ListEventStreamsResponseContent build() { - return new ListEventStreamsResponseContent(eventStreams, next, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListFlowExecutionsPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListFlowExecutionsPaginatedResponseContent.java deleted file mode 100644 index af0d6c733..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListFlowExecutionsPaginatedResponseContent.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListFlowExecutionsPaginatedResponseContent.Builder.class) -public final class ListFlowExecutionsPaginatedResponseContent { - private final Optional next; - - private final Optional> executions; - - private final Map additionalProperties; - - private ListFlowExecutionsPaginatedResponseContent( - Optional next, - Optional> executions, - Map additionalProperties) { - this.next = next; - this.executions = executions; - this.additionalProperties = additionalProperties; - } - - /** - * @return Opaque identifier for use with the <i>from</i> query parameter for the next page of results.<br/>This identifier is valid for 24 hours. - */ - @JsonProperty("next") - public Optional getNext() { - return next; - } - - @JsonProperty("executions") - public Optional> getExecutions() { - return executions; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListFlowExecutionsPaginatedResponseContent - && equalTo((ListFlowExecutionsPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListFlowExecutionsPaginatedResponseContent other) { - return next.equals(other.next) && executions.equals(other.executions); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.next, this.executions); - } - - @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 Optional> executions = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListFlowExecutionsPaginatedResponseContent other) { - next(other.getNext()); - executions(other.getExecutions()); - return this; - } - - /** - *

Opaque identifier for use with the <i>from</i> query parameter for the next page of results.<br/>This identifier is valid for 24 hours.

- */ - @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 = "executions", nulls = Nulls.SKIP) - public Builder executions(Optional> executions) { - this.executions = executions; - return this; - } - - public Builder executions(List executions) { - this.executions = Optional.ofNullable(executions); - return this; - } - - public ListFlowExecutionsPaginatedResponseContent build() { - return new ListFlowExecutionsPaginatedResponseContent(next, executions, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListFlowsOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListFlowsOffsetPaginatedResponseContent.java deleted file mode 100644 index 94bce6bc6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListFlowsOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,171 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListFlowsOffsetPaginatedResponseContent.Builder.class) -public final class ListFlowsOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> flows; - - private final Map additionalProperties; - - private ListFlowsOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> flows, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.flows = flows; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("flows") - public Optional> getFlows() { - return flows; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListFlowsOffsetPaginatedResponseContent - && equalTo((ListFlowsOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListFlowsOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && flows.equals(other.flows); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.flows); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> flows = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListFlowsOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - flows(other.getFlows()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "flows", nulls = Nulls.SKIP) - public Builder flows(Optional> flows) { - this.flows = flows; - return this; - } - - public Builder flows(List flows) { - this.flows = Optional.ofNullable(flows); - return this; - } - - public ListFlowsOffsetPaginatedResponseContent build() { - return new ListFlowsOffsetPaginatedResponseContent(start, limit, total, flows, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListFlowsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListFlowsRequestParameters.java deleted file mode 100644 index c012c50a9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListFlowsRequestParameters.java +++ /dev/null @@ -1,349 +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.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; -import java.util.Collections; -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 = ListFlowsRequestParameters.Builder.class) -public final class ListFlowsRequestParameters { - private final Optional> hydrate; - - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final OptionalNullable synchronous; - - private final Map additionalProperties; - - private ListFlowsRequestParameters( - Optional> hydrate, - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - OptionalNullable synchronous, - Map additionalProperties) { - this.hydrate = hydrate; - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.synchronous = synchronous; - this.additionalProperties = additionalProperties; - } - - /** - * @return hydration param - */ - @JsonIgnore - public Optional> getHydrate() { - if (hydrate == null) { - return Optional.empty(); - } - return hydrate; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. Defaults to 50. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - return includeTotals; - } - - /** - * @return flag to filter by sync/async flows - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("synchronous") - public OptionalNullable getSynchronous() { - if (synchronous == null) { - return OptionalNullable.absent(); - } - 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("synchronous") - private OptionalNullable _getSynchronous() { - return synchronous; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListFlowsRequestParameters && equalTo((ListFlowsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListFlowsRequestParameters other) { - return hydrate.equals(other.hydrate) - && page.equals(other.page) - && perPage.equals(other.perPage) - && includeTotals.equals(other.includeTotals) - && synchronous.equals(other.synchronous); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.hydrate, this.page, this.perPage, this.includeTotals, this.synchronous); - } - - @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> hydrate = Optional.empty(); - - private OptionalNullable page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - private OptionalNullable synchronous = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListFlowsRequestParameters other) { - hydrate(other.getHydrate()); - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - synchronous(other.getSynchronous()); - return this; - } - - /** - *

hydration param

- */ - @JsonSetter(value = "hydrate", nulls = Nulls.SKIP) - public Builder hydrate(@Nullable Optional> hydrate) { - this.hydrate = hydrate; - return this; - } - - public Builder hydrate(List hydrate) { - this.hydrate = Optional.ofNullable(hydrate); - return this; - } - - public Builder hydrate( - com.auth0.client.mgmt.core.Nullable> hydrate) { - if (hydrate.isNull()) { - this.hydrate = null; - } else if (hydrate.isEmpty()) { - this.hydrate = Optional.empty(); - } else { - this.hydrate = Optional.of(hydrate.get()); - } - return this; - } - - public Builder hydrate(ListFlowsRequestParametersHydrateEnum hydrate) { - this.hydrate = Optional.of(Collections.singletonList(hydrate)); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(com.auth0.client.mgmt.core.Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page. Defaults to 50.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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; - } - - /** - *

flag to filter by sync/async flows

- */ - @JsonSetter(value = "synchronous", nulls = Nulls.SKIP) - public Builder synchronous(@Nullable OptionalNullable synchronous) { - this.synchronous = synchronous; - return this; - } - - public Builder synchronous(Boolean synchronous) { - this.synchronous = OptionalNullable.of(synchronous); - return this; - } - - public Builder synchronous(Optional synchronous) { - if (synchronous.isPresent()) { - this.synchronous = OptionalNullable.of(synchronous.get()); - } else { - this.synchronous = OptionalNullable.absent(); - } - return this; - } - - public Builder synchronous(com.auth0.client.mgmt.core.Nullable synchronous) { - if (synchronous.isNull()) { - this.synchronous = OptionalNullable.ofNull(); - } else if (synchronous.isEmpty()) { - this.synchronous = OptionalNullable.absent(); - } else { - this.synchronous = OptionalNullable.of(synchronous.get()); - } - return this; - } - - public ListFlowsRequestParameters build() { - return new ListFlowsRequestParameters( - hydrate, page, perPage, includeTotals, synchronous, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListFlowsRequestParametersHydrateEnum.java b/src/main/java/com/auth0/client/mgmt/types/ListFlowsRequestParametersHydrateEnum.java deleted file mode 100644 index aa8b8f74a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListFlowsRequestParametersHydrateEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ListFlowsRequestParametersHydrateEnum { - public static final ListFlowsRequestParametersHydrateEnum FORM_COUNT = - new ListFlowsRequestParametersHydrateEnum(Value.FORM_COUNT, "form_count"); - - private final Value value; - - private final String string; - - ListFlowsRequestParametersHydrateEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ListFlowsRequestParametersHydrateEnum - && this.string.equals(((ListFlowsRequestParametersHydrateEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case FORM_COUNT: - return visitor.visitFormCount(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ListFlowsRequestParametersHydrateEnum valueOf(String value) { - switch (value) { - case "form_count": - return FORM_COUNT; - default: - return new ListFlowsRequestParametersHydrateEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - FORM_COUNT, - - UNKNOWN - } - - public interface Visitor { - T visitFormCount(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListFlowsVaultConnectionsOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListFlowsVaultConnectionsOffsetPaginatedResponseContent.java deleted file mode 100644 index a52a3a21c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListFlowsVaultConnectionsOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListFlowsVaultConnectionsOffsetPaginatedResponseContent.Builder.class) -public final class ListFlowsVaultConnectionsOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> connections; - - private final Map additionalProperties; - - private ListFlowsVaultConnectionsOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> connections, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.connections = connections; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("connections") - public Optional> getConnections() { - return connections; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListFlowsVaultConnectionsOffsetPaginatedResponseContent - && equalTo((ListFlowsVaultConnectionsOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListFlowsVaultConnectionsOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && connections.equals(other.connections); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.connections); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> connections = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListFlowsVaultConnectionsOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - connections(other.getConnections()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "connections", nulls = Nulls.SKIP) - public Builder connections(Optional> connections) { - this.connections = connections; - return this; - } - - public Builder connections(List connections) { - this.connections = Optional.ofNullable(connections); - return this; - } - - public ListFlowsVaultConnectionsOffsetPaginatedResponseContent build() { - return new ListFlowsVaultConnectionsOffsetPaginatedResponseContent( - start, limit, total, connections, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListFormsOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListFormsOffsetPaginatedResponseContent.java deleted file mode 100644 index 39ce76c65..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListFormsOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,171 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListFormsOffsetPaginatedResponseContent.Builder.class) -public final class ListFormsOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> forms; - - private final Map additionalProperties; - - private ListFormsOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> forms, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.forms = forms; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("forms") - public Optional> getForms() { - return forms; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListFormsOffsetPaginatedResponseContent - && equalTo((ListFormsOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListFormsOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && forms.equals(other.forms); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.forms); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> forms = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListFormsOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - forms(other.getForms()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "forms", nulls = Nulls.SKIP) - public Builder forms(Optional> forms) { - this.forms = forms; - return this; - } - - public Builder forms(List forms) { - this.forms = Optional.ofNullable(forms); - return this; - } - - public ListFormsOffsetPaginatedResponseContent build() { - return new ListFormsOffsetPaginatedResponseContent(start, limit, total, forms, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListFormsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListFormsRequestParameters.java deleted file mode 100644 index 8bedcddfc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListFormsRequestParameters.java +++ /dev/null @@ -1,287 +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.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; -import java.util.Collections; -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 = ListFormsRequestParameters.Builder.class) -public final class ListFormsRequestParameters { - private final Optional> hydrate; - - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final Map additionalProperties; - - private ListFormsRequestParameters( - Optional> hydrate, - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - Map additionalProperties) { - this.hydrate = hydrate; - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.additionalProperties = additionalProperties; - } - - /** - * @return Query parameter to hydrate the response with additional data - */ - @JsonIgnore - public Optional> getHydrate() { - if (hydrate == null) { - return Optional.empty(); - } - return hydrate; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. Defaults to 50. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - return includeTotals; - } - - @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; - return other instanceof ListFormsRequestParameters && equalTo((ListFormsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListFormsRequestParameters other) { - return hydrate.equals(other.hydrate) - && page.equals(other.page) - && perPage.equals(other.perPage) - && includeTotals.equals(other.includeTotals); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.hydrate, this.page, this.perPage, this.includeTotals); - } - - @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> hydrate = Optional.empty(); - - private OptionalNullable page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListFormsRequestParameters other) { - hydrate(other.getHydrate()); - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - return this; - } - - /** - *

Query parameter to hydrate the response with additional data

- */ - @JsonSetter(value = "hydrate", nulls = Nulls.SKIP) - public Builder hydrate(@Nullable Optional> hydrate) { - this.hydrate = hydrate; - return this; - } - - public Builder hydrate(List hydrate) { - this.hydrate = Optional.ofNullable(hydrate); - return this; - } - - public Builder hydrate(com.auth0.client.mgmt.core.Nullable> hydrate) { - if (hydrate.isNull()) { - this.hydrate = null; - } else if (hydrate.isEmpty()) { - this.hydrate = Optional.empty(); - } else { - this.hydrate = Optional.of(hydrate.get()); - } - return this; - } - - public Builder hydrate(FormsRequestParametersHydrateEnum hydrate) { - this.hydrate = Optional.of(Collections.singletonList(hydrate)); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(com.auth0.client.mgmt.core.Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page. Defaults to 50.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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; - } - - public ListFormsRequestParameters build() { - return new ListFormsRequestParameters(hydrate, page, perPage, includeTotals, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListGroupsPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListGroupsPaginatedResponseContent.java deleted file mode 100644 index 1ff98e7e5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListGroupsPaginatedResponseContent.java +++ /dev/null @@ -1,212 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = ListGroupsPaginatedResponseContent.Builder.class) -public final class ListGroupsPaginatedResponseContent { - private final List groups; - - private final Optional next; - - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Map additionalProperties; - - private ListGroupsPaginatedResponseContent( - List groups, - Optional next, - Optional start, - Optional limit, - Optional total, - Map additionalProperties) { - this.groups = groups; - this.next = next; - this.start = start; - this.limit = limit; - this.total = total; - 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; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListGroupsPaginatedResponseContent - && equalTo((ListGroupsPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListGroupsPaginatedResponseContent other) { - return groups.equals(other.groups) - && next.equals(other.next) - && start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.groups, this.next, this.start, this.limit, this.total); - } - - @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(); - - private Optional start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListGroupsPaginatedResponseContent other) { - groups(other.getGroups()); - next(other.getNext()); - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - 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(Group 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; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - public ListGroupsPaginatedResponseContent build() { - return new ListGroupsPaginatedResponseContent(groups, next, start, limit, total, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListGroupsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListGroupsRequestParameters.java deleted file mode 100644 index 5cf0c078e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListGroupsRequestParameters.java +++ /dev/null @@ -1,489 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListGroupsRequestParameters.Builder.class) -public final class ListGroupsRequestParameters { - private final OptionalNullable connectionId; - - private final OptionalNullable name; - - private final OptionalNullable externalId; - - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private ListGroupsRequestParameters( - OptionalNullable connectionId, - OptionalNullable name, - OptionalNullable externalId, - OptionalNullable fields, - OptionalNullable includeFields, - OptionalNullable from, - OptionalNullable take, - Map additionalProperties) { - this.connectionId = connectionId; - this.name = name; - this.externalId = externalId; - this.fields = fields; - this.includeFields = includeFields; - this.from = from; - this.take = take; - this.additionalProperties = additionalProperties; - } - - /** - * @return Filter groups by connection ID. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("connection_id") - public OptionalNullable getConnectionId() { - if (connectionId == null) { - return OptionalNullable.absent(); - } - return connectionId; - } - - /** - * @return Filter groups by name. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("name") - public OptionalNullable getName() { - if (name == null) { - return OptionalNullable.absent(); - } - return name; - } - - /** - * @return Filter groups by external ID. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("external_id") - public OptionalNullable getExternalId() { - if (externalId == null) { - return OptionalNullable.absent(); - } - return externalId; - } - - /** - * @return A comma separated list of fields to include or exclude (depending on include_fields) from the result, 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). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("include_fields") - public OptionalNullable getIncludeFields() { - if (includeFields == null) { - return OptionalNullable.absent(); - } - return includeFields; - } - - /** - * @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() { - 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("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; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListGroupsRequestParameters && equalTo((ListGroupsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListGroupsRequestParameters other) { - return connectionId.equals(other.connectionId) - && name.equals(other.name) - && externalId.equals(other.externalId) - && fields.equals(other.fields) - && includeFields.equals(other.includeFields) - && from.equals(other.from) - && take.equals(other.take); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, this.name, this.externalId, this.fields, this.includeFields, 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 connectionId = OptionalNullable.absent(); - - private OptionalNullable name = OptionalNullable.absent(); - - private OptionalNullable externalId = OptionalNullable.absent(); - - private OptionalNullable fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - private OptionalNullable from = OptionalNullable.absent(); - - private OptionalNullable take = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListGroupsRequestParameters other) { - connectionId(other.getConnectionId()); - name(other.getName()); - externalId(other.getExternalId()); - fields(other.getFields()); - includeFields(other.getIncludeFields()); - from(other.getFrom()); - take(other.getTake()); - return this; - } - - /** - *

Filter groups by connection ID.

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(@Nullable OptionalNullable connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = OptionalNullable.of(connectionId); - return this; - } - - public Builder connectionId(Optional connectionId) { - if (connectionId.isPresent()) { - this.connectionId = OptionalNullable.of(connectionId.get()); - } else { - this.connectionId = OptionalNullable.absent(); - } - return this; - } - - public Builder connectionId(com.auth0.client.mgmt.core.Nullable connectionId) { - if (connectionId.isNull()) { - this.connectionId = OptionalNullable.ofNull(); - } else if (connectionId.isEmpty()) { - this.connectionId = OptionalNullable.absent(); - } else { - this.connectionId = OptionalNullable.of(connectionId.get()); - } - return this; - } - - /** - *

Filter groups by name.

- */ - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public Builder name(@Nullable OptionalNullable name) { - this.name = name; - return this; - } - - public Builder name(String name) { - this.name = OptionalNullable.of(name); - return this; - } - - public Builder name(Optional name) { - if (name.isPresent()) { - this.name = OptionalNullable.of(name.get()); - } else { - this.name = OptionalNullable.absent(); - } - return this; - } - - public Builder name(com.auth0.client.mgmt.core.Nullable name) { - if (name.isNull()) { - this.name = OptionalNullable.ofNull(); - } else if (name.isEmpty()) { - this.name = OptionalNullable.absent(); - } else { - this.name = OptionalNullable.of(name.get()); - } - return this; - } - - /** - *

Filter groups by external ID.

- */ - @JsonSetter(value = "external_id", nulls = Nulls.SKIP) - public Builder externalId(@Nullable OptionalNullable externalId) { - this.externalId = externalId; - return this; - } - - public Builder externalId(String externalId) { - this.externalId = OptionalNullable.of(externalId); - return this; - } - - public Builder externalId(Optional externalId) { - if (externalId.isPresent()) { - this.externalId = OptionalNullable.of(externalId.get()); - } else { - this.externalId = OptionalNullable.absent(); - } - return this; - } - - public Builder externalId(com.auth0.client.mgmt.core.Nullable externalId) { - if (externalId.isNull()) { - this.externalId = OptionalNullable.ofNull(); - } else if (externalId.isEmpty()) { - this.externalId = OptionalNullable.absent(); - } else { - this.externalId = OptionalNullable.of(externalId.get()); - } - return this; - } - - /** - *

A comma separated list of fields to include or exclude (depending on include_fields) from the result, 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).

- */ - @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; - } - - /** - *

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(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 ListGroupsRequestParameters build() { - return new ListGroupsRequestParameters( - connectionId, name, externalId, fields, includeFields, from, take, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListHooksOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListHooksOffsetPaginatedResponseContent.java deleted file mode 100644 index 58d7d6974..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListHooksOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,171 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListHooksOffsetPaginatedResponseContent.Builder.class) -public final class ListHooksOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> hooks; - - private final Map additionalProperties; - - private ListHooksOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> hooks, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.hooks = hooks; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("hooks") - public Optional> getHooks() { - return hooks; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListHooksOffsetPaginatedResponseContent - && equalTo((ListHooksOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListHooksOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && hooks.equals(other.hooks); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.hooks); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> hooks = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListHooksOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - hooks(other.getHooks()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "hooks", nulls = Nulls.SKIP) - public Builder hooks(Optional> hooks) { - this.hooks = hooks; - return this; - } - - public Builder hooks(List hooks) { - this.hooks = Optional.ofNullable(hooks); - return this; - } - - public ListHooksOffsetPaginatedResponseContent build() { - return new ListHooksOffsetPaginatedResponseContent(start, limit, total, hooks, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListHooksRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListHooksRequestParameters.java deleted file mode 100644 index 4f14df2d0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListHooksRequestParameters.java +++ /dev/null @@ -1,410 +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.Nullable; -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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListHooksRequestParameters.Builder.class) -public final class ListHooksRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final OptionalNullable enabled; - - private final OptionalNullable fields; - - private final OptionalNullable triggerId; - - private final Map additionalProperties; - - private ListHooksRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - OptionalNullable enabled, - OptionalNullable fields, - OptionalNullable triggerId, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.enabled = enabled; - this.fields = fields; - this.triggerId = triggerId; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - return includeTotals; - } - - /** - * @return Optional filter on whether a hook is enabled (true) or disabled (false). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("enabled") - public OptionalNullable getEnabled() { - if (enabled == null) { - return OptionalNullable.absent(); - } - return enabled; - } - - /** - * @return Comma-separated list of fields to include 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 Retrieves hooks that match the trigger - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("triggerId") - public OptionalNullable getTriggerId() { - if (triggerId == null) { - return OptionalNullable.absent(); - } - return triggerId; - } - - @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; - return other instanceof ListHooksRequestParameters && equalTo((ListHooksRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListHooksRequestParameters other) { - return page.equals(other.page) - && perPage.equals(other.perPage) - && includeTotals.equals(other.includeTotals) - && enabled.equals(other.enabled) - && fields.equals(other.fields) - && triggerId.equals(other.triggerId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage, this.includeTotals, this.enabled, this.fields, this.triggerId); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - private OptionalNullable enabled = OptionalNullable.absent(); - - private OptionalNullable fields = OptionalNullable.absent(); - - private OptionalNullable triggerId = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListHooksRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - enabled(other.getEnabled()); - fields(other.getFields()); - triggerId(other.getTriggerId()); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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(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 filter on whether a hook is enabled (true) or disabled (false).

- */ - @JsonSetter(value = "enabled", nulls = Nulls.SKIP) - public Builder enabled(@org.jetbrains.annotations.Nullable OptionalNullable enabled) { - this.enabled = enabled; - return this; - } - - public Builder enabled(Boolean enabled) { - this.enabled = OptionalNullable.of(enabled); - return this; - } - - public Builder enabled(Optional enabled) { - if (enabled.isPresent()) { - this.enabled = OptionalNullable.of(enabled.get()); - } else { - this.enabled = OptionalNullable.absent(); - } - return this; - } - - public Builder enabled(Nullable enabled) { - if (enabled.isNull()) { - this.enabled = OptionalNullable.ofNull(); - } else if (enabled.isEmpty()) { - this.enabled = OptionalNullable.absent(); - } else { - this.enabled = OptionalNullable.of(enabled.get()); - } - return this; - } - - /** - *

Comma-separated list of fields to include in the result. Leave empty to retrieve all fields.

- */ - @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public Builder fields(@org.jetbrains.annotations.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(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; - } - - /** - *

Retrieves hooks that match the trigger

- */ - @JsonSetter(value = "triggerId", nulls = Nulls.SKIP) - public Builder triggerId(@org.jetbrains.annotations.Nullable OptionalNullable triggerId) { - this.triggerId = triggerId; - return this; - } - - public Builder triggerId(HookTriggerIdEnum triggerId) { - this.triggerId = OptionalNullable.of(triggerId); - return this; - } - - public Builder triggerId(Optional triggerId) { - if (triggerId.isPresent()) { - this.triggerId = OptionalNullable.of(triggerId.get()); - } else { - this.triggerId = OptionalNullable.absent(); - } - return this; - } - - public Builder triggerId(Nullable triggerId) { - if (triggerId.isNull()) { - this.triggerId = OptionalNullable.ofNull(); - } else if (triggerId.isEmpty()) { - this.triggerId = OptionalNullable.absent(); - } else { - this.triggerId = OptionalNullable.of(triggerId.get()); - } - return this; - } - - public ListHooksRequestParameters build() { - return new ListHooksRequestParameters( - page, perPage, includeTotals, enabled, fields, triggerId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListLogOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListLogOffsetPaginatedResponseContent.java deleted file mode 100644 index 1acead10e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListLogOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListLogOffsetPaginatedResponseContent.Builder.class) -public final class ListLogOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional length; - - private final Optional total; - - private final Optional> logs; - - private final Map additionalProperties; - - private ListLogOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional length, - Optional total, - Optional> logs, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.length = length; - this.total = total; - this.logs = logs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("length") - public Optional getLength() { - return length; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("logs") - public Optional> getLogs() { - return logs; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListLogOffsetPaginatedResponseContent - && equalTo((ListLogOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListLogOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && length.equals(other.length) - && total.equals(other.total) - && logs.equals(other.logs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.length, this.total, this.logs); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional length = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> logs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListLogOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - length(other.getLength()); - total(other.getTotal()); - logs(other.getLogs()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - this.limit = limit; - return this; - } - - public Builder limit(Double limit) { - this.limit = Optional.ofNullable(limit); - return this; - } - - @JsonSetter(value = "length", nulls = Nulls.SKIP) - public Builder length(Optional length) { - this.length = length; - return this; - } - - public Builder length(Double length) { - this.length = Optional.ofNullable(length); - return this; - } - - @JsonSetter(value = "total", nulls = Nulls.SKIP) - public Builder total(Optional total) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "logs", nulls = Nulls.SKIP) - public Builder logs(Optional> logs) { - this.logs = logs; - return this; - } - - public Builder logs(List logs) { - this.logs = Optional.ofNullable(logs); - return this; - } - - public ListLogOffsetPaginatedResponseContent build() { - return new ListLogOffsetPaginatedResponseContent(start, limit, length, total, logs, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListLogsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListLogsRequestParameters.java deleted file mode 100644 index a6a3d2d09..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListLogsRequestParameters.java +++ /dev/null @@ -1,475 +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.Nullable; -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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListLogsRequestParameters.Builder.class) -public final class ListLogsRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable sort; - - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final OptionalNullable includeTotals; - - private final OptionalNullable search; - - private final Map additionalProperties; - - private ListLogsRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable sort, - OptionalNullable fields, - OptionalNullable includeFields, - OptionalNullable includeTotals, - OptionalNullable search, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.sort = sort; - this.fields = fields; - this.includeFields = includeFields; - this.includeTotals = includeTotals; - this.search = search; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. Paging is disabled if parameter not sent. Default: <code>50</code>. Max value: <code>100</code> - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @return Field to use for sorting appended with <code>:1</code> for ascending and <code>:-1</code> for descending. e.g. <code>date:-1</code> - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sort") - public OptionalNullable getSort() { - if (sort == null) { - return OptionalNullable.absent(); - } - return sort; - } - - /** - * @return Comma-separated list of fields to include or exclude (based on value provided for <code>include_fields</code>) 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 (<code>true</code>) or excluded (<code>false</code>) - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("include_fields") - public OptionalNullable getIncludeFields() { - if (includeFields == null) { - return OptionalNullable.absent(); - } - return includeFields; - } - - /** - * @return Return results as an array when false (default). Return results inside an object that also contains a total result count when true. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("include_totals") - public OptionalNullable getIncludeTotals() { - return includeTotals; - } - - /** - * @return Retrieves logs that match the specified search criteria. This parameter can be combined with all the others in the /api/logs endpoint but is specified separately for clarity. - * 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. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("search") - public OptionalNullable getSearch() { - if (search == null) { - return OptionalNullable.absent(); - } - return search; - } - - @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("search") - private OptionalNullable _getSearch() { - return search; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListLogsRequestParameters && equalTo((ListLogsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListLogsRequestParameters other) { - return page.equals(other.page) - && perPage.equals(other.perPage) - && sort.equals(other.sort) - && fields.equals(other.fields) - && includeFields.equals(other.includeFields) - && includeTotals.equals(other.includeTotals) - && search.equals(other.search); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.page, this.perPage, this.sort, this.fields, this.includeFields, this.includeTotals, this.search); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable sort = OptionalNullable.absent(); - - private OptionalNullable fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - private OptionalNullable search = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListLogsRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - sort(other.getSort()); - fields(other.getFields()); - includeFields(other.getIncludeFields()); - includeTotals(other.getIncludeTotals()); - search(other.getSearch()); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page. Paging is disabled if parameter not sent. Default: <code>50</code>. Max value: <code>100</code>

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - return this; - } - - /** - *

Field to use for sorting appended with <code>:1</code> for ascending and <code>:-1</code> for descending. e.g. <code>date:-1</code>

- */ - @JsonSetter(value = "sort", nulls = Nulls.SKIP) - public Builder sort(@org.jetbrains.annotations.Nullable OptionalNullable sort) { - this.sort = sort; - return this; - } - - public Builder sort(String 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(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; - } - - /** - *

Comma-separated list of fields to include or exclude (based on value provided for <code>include_fields</code>) in the result. Leave empty to retrieve all fields.

- */ - @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public Builder fields(@org.jetbrains.annotations.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(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 (<code>true</code>) or excluded (<code>false</code>)

- */ - @JsonSetter(value = "include_fields", nulls = Nulls.SKIP) - public Builder includeFields(@org.jetbrains.annotations.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(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; - } - - /** - *

Return results as an array when false (default). Return results inside an object that also contains a total result count when true.

- */ - @JsonSetter(value = "include_totals", nulls = Nulls.SKIP) - public Builder includeTotals(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(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; - } - - /** - *

Retrieves logs that match the specified search criteria. This parameter can be combined with all the others in the /api/logs endpoint but is specified separately for clarity. - * 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.

- */ - @JsonSetter(value = "search", nulls = Nulls.SKIP) - public Builder search(@org.jetbrains.annotations.Nullable OptionalNullable search) { - this.search = search; - return this; - } - - public Builder search(String search) { - this.search = OptionalNullable.of(search); - return this; - } - - public Builder search(Optional search) { - if (search.isPresent()) { - this.search = OptionalNullable.of(search.get()); - } else { - this.search = OptionalNullable.absent(); - } - return this; - } - - public Builder search(Nullable search) { - if (search.isNull()) { - this.search = OptionalNullable.ofNull(); - } else if (search.isEmpty()) { - this.search = OptionalNullable.absent(); - } else { - this.search = OptionalNullable.of(search.get()); - } - return this; - } - - public ListLogsRequestParameters build() { - return new ListLogsRequestParameters( - page, perPage, sort, fields, includeFields, includeTotals, search, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListNetworkAclsOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListNetworkAclsOffsetPaginatedResponseContent.java deleted file mode 100644 index c6f098161..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListNetworkAclsOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListNetworkAclsOffsetPaginatedResponseContent.Builder.class) -public final class ListNetworkAclsOffsetPaginatedResponseContent { - private final Optional> networkAcls; - - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Map additionalProperties; - - private ListNetworkAclsOffsetPaginatedResponseContent( - Optional> networkAcls, - Optional start, - Optional limit, - Optional total, - Map additionalProperties) { - this.networkAcls = networkAcls; - this.start = start; - this.limit = limit; - this.total = total; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("network_acls") - public Optional> getNetworkAcls() { - return networkAcls; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListNetworkAclsOffsetPaginatedResponseContent - && equalTo((ListNetworkAclsOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListNetworkAclsOffsetPaginatedResponseContent other) { - return networkAcls.equals(other.networkAcls) - && start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.networkAcls, this.start, this.limit, this.total); - } - - @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> networkAcls = Optional.empty(); - - private Optional start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListNetworkAclsOffsetPaginatedResponseContent other) { - networkAcls(other.getNetworkAcls()); - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - return this; - } - - @JsonSetter(value = "network_acls", nulls = Nulls.SKIP) - public Builder networkAcls(Optional> networkAcls) { - this.networkAcls = networkAcls; - return this; - } - - public Builder networkAcls(List networkAcls) { - this.networkAcls = Optional.ofNullable(networkAcls); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - public ListNetworkAclsOffsetPaginatedResponseContent build() { - return new ListNetworkAclsOffsetPaginatedResponseContent( - networkAcls, start, limit, total, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListNetworkAclsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListNetworkAclsRequestParameters.java deleted file mode 100644 index c0384bdc5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListNetworkAclsRequestParameters.java +++ /dev/null @@ -1,227 +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.Nullable; -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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListNetworkAclsRequestParameters.Builder.class) -public final class ListNetworkAclsRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final Map additionalProperties; - - private ListNetworkAclsRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.additionalProperties = additionalProperties; - } - - /** - * @return Use this field to request a specific page of the list results. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return The amount of results per page. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - return includeTotals; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListNetworkAclsRequestParameters && equalTo((ListNetworkAclsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListNetworkAclsRequestParameters other) { - return page.equals(other.page) && perPage.equals(other.perPage) && includeTotals.equals(other.includeTotals); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage, this.includeTotals); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListNetworkAclsRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - return this; - } - - /** - *

Use this field to request a specific page of the list results.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

The amount of results per page.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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(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; - } - - public ListNetworkAclsRequestParameters build() { - return new ListNetworkAclsRequestParameters(page, perPage, includeTotals, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationClientGrantsOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationClientGrantsOffsetPaginatedResponseContent.java deleted file mode 100644 index 758e7980c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationClientGrantsOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListOrganizationClientGrantsOffsetPaginatedResponseContent.Builder.class) -public final class ListOrganizationClientGrantsOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> clientGrants; - - private final Map additionalProperties; - - private ListOrganizationClientGrantsOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> clientGrants, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.clientGrants = clientGrants; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("client_grants") - public Optional> getClientGrants() { - return clientGrants; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListOrganizationClientGrantsOffsetPaginatedResponseContent - && equalTo((ListOrganizationClientGrantsOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListOrganizationClientGrantsOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && clientGrants.equals(other.clientGrants); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.clientGrants); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> clientGrants = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListOrganizationClientGrantsOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - clientGrants(other.getClientGrants()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "client_grants", nulls = Nulls.SKIP) - public Builder clientGrants(Optional> clientGrants) { - this.clientGrants = clientGrants; - return this; - } - - public Builder clientGrants(List clientGrants) { - this.clientGrants = Optional.ofNullable(clientGrants); - return this; - } - - public ListOrganizationClientGrantsOffsetPaginatedResponseContent build() { - return new ListOrganizationClientGrantsOffsetPaginatedResponseContent( - start, limit, total, clientGrants, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationConnectionsOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationConnectionsOffsetPaginatedResponseContent.java deleted file mode 100644 index 29935e032..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationConnectionsOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListOrganizationConnectionsOffsetPaginatedResponseContent.Builder.class) -public final class ListOrganizationConnectionsOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> enabledConnections; - - private final Map additionalProperties; - - private ListOrganizationConnectionsOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> enabledConnections, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.enabledConnections = enabledConnections; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("enabled_connections") - public Optional> getEnabledConnections() { - return enabledConnections; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListOrganizationConnectionsOffsetPaginatedResponseContent - && equalTo((ListOrganizationConnectionsOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListOrganizationConnectionsOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && enabledConnections.equals(other.enabledConnections); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.enabledConnections); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> enabledConnections = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListOrganizationConnectionsOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - enabledConnections(other.getEnabledConnections()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "enabled_connections", nulls = Nulls.SKIP) - public Builder enabledConnections(Optional> enabledConnections) { - this.enabledConnections = enabledConnections; - return this; - } - - public Builder enabledConnections(List enabledConnections) { - this.enabledConnections = Optional.ofNullable(enabledConnections); - return this; - } - - public ListOrganizationConnectionsOffsetPaginatedResponseContent build() { - return new ListOrganizationConnectionsOffsetPaginatedResponseContent( - start, limit, total, enabledConnections, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationDiscoveryDomainsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationDiscoveryDomainsResponseContent.java deleted file mode 100644 index 1164613b0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationDiscoveryDomainsResponseContent.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = ListOrganizationDiscoveryDomainsResponseContent.Builder.class) -public final class ListOrganizationDiscoveryDomainsResponseContent { - private final Optional next; - - private final List domains; - - private final Map additionalProperties; - - private ListOrganizationDiscoveryDomainsResponseContent( - Optional next, - List domains, - Map additionalProperties) { - this.next = next; - this.domains = domains; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("next") - public Optional getNext() { - return next; - } - - @JsonProperty("domains") - public List getDomains() { - return domains; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListOrganizationDiscoveryDomainsResponseContent - && equalTo((ListOrganizationDiscoveryDomainsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListOrganizationDiscoveryDomainsResponseContent other) { - return next.equals(other.next) && domains.equals(other.domains); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.next, this.domains); - } - - @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 domains = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListOrganizationDiscoveryDomainsResponseContent other) { - next(other.getNext()); - domains(other.getDomains()); - return this; - } - - @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 = "domains", nulls = Nulls.SKIP) - public Builder domains(List domains) { - this.domains.clear(); - if (domains != null) { - this.domains.addAll(domains); - } - return this; - } - - public Builder addDomains(OrganizationDiscoveryDomain domains) { - this.domains.add(domains); - return this; - } - - public Builder addAllDomains(List domains) { - if (domains != null) { - this.domains.addAll(domains); - } - return this; - } - - public ListOrganizationDiscoveryDomainsResponseContent build() { - return new ListOrganizationDiscoveryDomainsResponseContent(next, domains, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationInvitationsOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationInvitationsOffsetPaginatedResponseContent.java deleted file mode 100644 index 211d4a4cf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationInvitationsOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListOrganizationInvitationsOffsetPaginatedResponseContent.Builder.class) -public final class ListOrganizationInvitationsOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional> invitations; - - private final Map additionalProperties; - - private ListOrganizationInvitationsOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional> invitations, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.invitations = invitations; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("invitations") - public Optional> getInvitations() { - return invitations; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListOrganizationInvitationsOffsetPaginatedResponseContent - && equalTo((ListOrganizationInvitationsOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListOrganizationInvitationsOffsetPaginatedResponseContent other) { - return start.equals(other.start) && limit.equals(other.limit) && invitations.equals(other.invitations); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.invitations); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional> invitations = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListOrganizationInvitationsOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - invitations(other.getInvitations()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - this.limit = limit; - return this; - } - - public Builder limit(Double limit) { - this.limit = Optional.ofNullable(limit); - return this; - } - - @JsonSetter(value = "invitations", nulls = Nulls.SKIP) - public Builder invitations(Optional> invitations) { - this.invitations = invitations; - return this; - } - - public Builder invitations(List invitations) { - this.invitations = Optional.ofNullable(invitations); - return this; - } - - public ListOrganizationInvitationsOffsetPaginatedResponseContent build() { - return new ListOrganizationInvitationsOffsetPaginatedResponseContent( - start, limit, invitations, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationMemberRolesOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationMemberRolesOffsetPaginatedResponseContent.java deleted file mode 100644 index d0bc8b685..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationMemberRolesOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListOrganizationMemberRolesOffsetPaginatedResponseContent.Builder.class) -public final class ListOrganizationMemberRolesOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> roles; - - private final Map additionalProperties; - - private ListOrganizationMemberRolesOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> roles, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.roles = roles; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("roles") - public Optional> getRoles() { - return roles; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListOrganizationMemberRolesOffsetPaginatedResponseContent - && equalTo((ListOrganizationMemberRolesOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListOrganizationMemberRolesOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && roles.equals(other.roles); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.roles); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> roles = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListOrganizationMemberRolesOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - roles(other.getRoles()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "roles", nulls = Nulls.SKIP) - public Builder roles(Optional> roles) { - this.roles = roles; - return this; - } - - public Builder roles(List roles) { - this.roles = Optional.ofNullable(roles); - return this; - } - - public ListOrganizationMemberRolesOffsetPaginatedResponseContent build() { - return new ListOrganizationMemberRolesOffsetPaginatedResponseContent( - start, limit, total, roles, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationMembersPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationMembersPaginatedResponseContent.java deleted file mode 100644 index f04ca1ef3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationMembersPaginatedResponseContent.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListOrganizationMembersPaginatedResponseContent.Builder.class) -public final class ListOrganizationMembersPaginatedResponseContent { - private final Optional next; - - private final Optional> members; - - private final Map additionalProperties; - - private ListOrganizationMembersPaginatedResponseContent( - Optional next, - Optional> members, - Map additionalProperties) { - this.next = next; - this.members = members; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("next") - public Optional getNext() { - return next; - } - - @JsonProperty("members") - public Optional> getMembers() { - return members; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListOrganizationMembersPaginatedResponseContent - && equalTo((ListOrganizationMembersPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListOrganizationMembersPaginatedResponseContent other) { - return next.equals(other.next) && members.equals(other.members); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.next, this.members); - } - - @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 Optional> members = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListOrganizationMembersPaginatedResponseContent other) { - next(other.getNext()); - members(other.getMembers()); - return this; - } - - @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 = "members", nulls = Nulls.SKIP) - public Builder members(Optional> members) { - this.members = members; - return this; - } - - public Builder members(List members) { - this.members = Optional.ofNullable(members); - return this; - } - - public ListOrganizationMembersPaginatedResponseContent build() { - return new ListOrganizationMembersPaginatedResponseContent(next, members, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationsPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationsPaginatedResponseContent.java deleted file mode 100644 index f299d9278..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationsPaginatedResponseContent.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListOrganizationsPaginatedResponseContent.Builder.class) -public final class ListOrganizationsPaginatedResponseContent { - private final Optional next; - - private final Optional> organizations; - - private final Map additionalProperties; - - private ListOrganizationsPaginatedResponseContent( - Optional next, - Optional> organizations, - Map additionalProperties) { - this.next = next; - this.organizations = organizations; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("next") - public Optional getNext() { - return next; - } - - @JsonProperty("organizations") - public Optional> getOrganizations() { - return organizations; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListOrganizationsPaginatedResponseContent - && equalTo((ListOrganizationsPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListOrganizationsPaginatedResponseContent other) { - return next.equals(other.next) && organizations.equals(other.organizations); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.next, this.organizations); - } - - @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 Optional> organizations = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListOrganizationsPaginatedResponseContent other) { - next(other.getNext()); - organizations(other.getOrganizations()); - return this; - } - - @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 = "organizations", nulls = Nulls.SKIP) - public Builder organizations(Optional> organizations) { - this.organizations = organizations; - return this; - } - - public Builder organizations(List organizations) { - this.organizations = Optional.ofNullable(organizations); - return this; - } - - public ListOrganizationsPaginatedResponseContent build() { - return new ListOrganizationsPaginatedResponseContent(next, organizations, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListOrganizationsRequestParameters.java deleted file mode 100644 index 36cbf3e96..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListOrganizationsRequestParameters.java +++ /dev/null @@ -1,246 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListOrganizationsRequestParameters.Builder.class) -public final class ListOrganizationsRequestParameters { - private final OptionalNullable from; - - private final OptionalNullable take; - - private final OptionalNullable sort; - - private final Map additionalProperties; - - private ListOrganizationsRequestParameters( - OptionalNullable from, - OptionalNullable take, - OptionalNullable sort, - Map additionalProperties) { - this.from = from; - this.take = take; - this.sort = sort; - 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() { - return take; - } - - /** - * @return Field to sort by. Use <code>field:order</code> where order is <code>1</code> for ascending and <code>-1</code> for descending. e.g. <code>created_at:1</code>. We currently support sorting by the following fields: <code>name</code>, <code>display_name</code> and <code>created_at</code>. - */ - @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("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 ListOrganizationsRequestParameters - && equalTo((ListOrganizationsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListOrganizationsRequestParameters other) { - return from.equals(other.from) && take.equals(other.take) && sort.equals(other.sort); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.from, this.take, 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 from = OptionalNullable.absent(); - - private OptionalNullable take = OptionalNullable.absent(); - - private OptionalNullable sort = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListOrganizationsRequestParameters other) { - from(other.getFrom()); - take(other.getTake()); - sort(other.getSort()); - 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(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; - } - - /** - *

Field to sort by. Use <code>field:order</code> where order is <code>1</code> for ascending and <code>-1</code> for descending. e.g. <code>created_at:1</code>. We currently support sorting by the following fields: <code>name</code>, <code>display_name</code> and <code>created_at</code>.

- */ - @JsonSetter(value = "sort", nulls = Nulls.SKIP) - public Builder sort(@Nullable OptionalNullable sort) { - this.sort = sort; - return this; - } - - public Builder sort(String 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 ListOrganizationsRequestParameters build() { - return new ListOrganizationsRequestParameters(from, take, sort, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListPhoneTemplatesResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListPhoneTemplatesResponseContent.java deleted file mode 100644 index a01528c7b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListPhoneTemplatesResponseContent.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListPhoneTemplatesResponseContent.Builder.class) -public final class ListPhoneTemplatesResponseContent { - private final Optional> templates; - - private final Map additionalProperties; - - private ListPhoneTemplatesResponseContent( - Optional> templates, Map additionalProperties) { - this.templates = templates; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("templates") - public Optional> getTemplates() { - return templates; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListPhoneTemplatesResponseContent && equalTo((ListPhoneTemplatesResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListPhoneTemplatesResponseContent other) { - return templates.equals(other.templates); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.templates); - } - - @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> templates = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListPhoneTemplatesResponseContent other) { - templates(other.getTemplates()); - return this; - } - - @JsonSetter(value = "templates", nulls = Nulls.SKIP) - public Builder templates(Optional> templates) { - this.templates = templates; - return this; - } - - public Builder templates(List templates) { - this.templates = Optional.ofNullable(templates); - return this; - } - - public ListPhoneTemplatesResponseContent build() { - return new ListPhoneTemplatesResponseContent(templates, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListRefreshTokensPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListRefreshTokensPaginatedResponseContent.java deleted file mode 100644 index 15d627177..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListRefreshTokensPaginatedResponseContent.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListRefreshTokensPaginatedResponseContent.Builder.class) -public final class ListRefreshTokensPaginatedResponseContent { - private final Optional> tokens; - - private final Optional next; - - private final Map additionalProperties; - - private ListRefreshTokensPaginatedResponseContent( - Optional> tokens, - Optional next, - Map additionalProperties) { - this.tokens = tokens; - this.next = next; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("tokens") - public Optional> getTokens() { - return tokens; - } - - /** - * @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 ListRefreshTokensPaginatedResponseContent - && equalTo((ListRefreshTokensPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListRefreshTokensPaginatedResponseContent other) { - return tokens.equals(other.tokens) && next.equals(other.next); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.tokens, 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 Optional> tokens = Optional.empty(); - - private Optional next = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListRefreshTokensPaginatedResponseContent other) { - tokens(other.getTokens()); - next(other.getNext()); - return this; - } - - @JsonSetter(value = "tokens", nulls = Nulls.SKIP) - public Builder tokens(Optional> tokens) { - this.tokens = tokens; - return this; - } - - public Builder tokens(List tokens) { - this.tokens = Optional.ofNullable(tokens); - 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 ListRefreshTokensPaginatedResponseContent build() { - return new ListRefreshTokensPaginatedResponseContent(tokens, next, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListResourceServerOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListResourceServerOffsetPaginatedResponseContent.java deleted file mode 100644 index 9d78cdf54..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListResourceServerOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListResourceServerOffsetPaginatedResponseContent.Builder.class) -public final class ListResourceServerOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> resourceServers; - - private final Map additionalProperties; - - private ListResourceServerOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> resourceServers, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.resourceServers = resourceServers; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("resource_servers") - public Optional> getResourceServers() { - return resourceServers; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListResourceServerOffsetPaginatedResponseContent - && equalTo((ListResourceServerOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListResourceServerOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && resourceServers.equals(other.resourceServers); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.resourceServers); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> resourceServers = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListResourceServerOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - resourceServers(other.getResourceServers()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "resource_servers", nulls = Nulls.SKIP) - public Builder resourceServers(Optional> resourceServers) { - this.resourceServers = resourceServers; - return this; - } - - public Builder resourceServers(List resourceServers) { - this.resourceServers = Optional.ofNullable(resourceServers); - return this; - } - - public ListResourceServerOffsetPaginatedResponseContent build() { - return new ListResourceServerOffsetPaginatedResponseContent( - start, limit, total, resourceServers, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListResourceServerRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListResourceServerRequestParameters.java deleted file mode 100644 index d145eeb9c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListResourceServerRequestParameters.java +++ /dev/null @@ -1,349 +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.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; -import java.util.Collections; -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 = ListResourceServerRequestParameters.Builder.class) -public final class ListResourceServerRequestParameters { - private final Optional> identifiers; - - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final OptionalNullable includeFields; - - private final Map additionalProperties; - - private ListResourceServerRequestParameters( - Optional> identifiers, - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - OptionalNullable includeFields, - Map additionalProperties) { - this.identifiers = identifiers; - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.includeFields = includeFields; - this.additionalProperties = additionalProperties; - } - - /** - * @return An optional filter on the resource server identifier. Must be URL encoded and may be specified multiple times (max 10).<br /><b>e.g.</b> <i>../resource-servers?identifiers=id1&identifiers=id2</i> - */ - @JsonIgnore - public Optional> getIdentifiers() { - if (identifiers == null) { - return Optional.empty(); - } - return identifiers; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - return includeTotals; - } - - /** - * @return Whether specified fields are to be included (true) or excluded (false). - */ - @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("identifiers") - private Optional> _getIdentifiers() { - return identifiers; - } - - @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 ListResourceServerRequestParameters - && equalTo((ListResourceServerRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListResourceServerRequestParameters other) { - return identifiers.equals(other.identifiers) - && page.equals(other.page) - && perPage.equals(other.perPage) - && includeTotals.equals(other.includeTotals) - && includeFields.equals(other.includeFields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.identifiers, this.page, this.perPage, this.includeTotals, 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 Optional> identifiers = Optional.empty(); - - private OptionalNullable page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListResourceServerRequestParameters other) { - identifiers(other.getIdentifiers()); - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - includeFields(other.getIncludeFields()); - return this; - } - - /** - *

An optional filter on the resource server identifier. Must be URL encoded and may be specified multiple times (max 10).<br /><b>e.g.</b> <i>../resource-servers?identifiers=id1&identifiers=id2</i>

- */ - @JsonSetter(value = "identifiers", nulls = Nulls.SKIP) - public Builder identifiers(@Nullable Optional> identifiers) { - this.identifiers = identifiers; - return this; - } - - public Builder identifiers(List identifiers) { - this.identifiers = Optional.ofNullable(identifiers); - return this; - } - - public Builder identifiers(com.auth0.client.mgmt.core.Nullable> identifiers) { - if (identifiers.isNull()) { - this.identifiers = null; - } else if (identifiers.isEmpty()) { - this.identifiers = Optional.empty(); - } else { - this.identifiers = Optional.of(identifiers.get()); - } - return this; - } - - public Builder identifiers(String identifiers) { - this.identifiers = Optional.of(Collections.singletonList(identifiers)); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(com.auth0.client.mgmt.core.Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(com.auth0.client.mgmt.core.Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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; - } - - /** - *

Whether specified fields are to be included (true) or excluded (false).

- */ - @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 ListResourceServerRequestParameters build() { - return new ListResourceServerRequestParameters( - identifiers, page, perPage, includeTotals, includeFields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListRolePermissionsOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListRolePermissionsOffsetPaginatedResponseContent.java deleted file mode 100644 index bc8acae9b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListRolePermissionsOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListRolePermissionsOffsetPaginatedResponseContent.Builder.class) -public final class ListRolePermissionsOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> permissions; - - private final Map additionalProperties; - - private ListRolePermissionsOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> permissions, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.permissions = permissions; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("permissions") - public Optional> getPermissions() { - return permissions; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListRolePermissionsOffsetPaginatedResponseContent - && equalTo((ListRolePermissionsOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListRolePermissionsOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && permissions.equals(other.permissions); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.permissions); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> permissions = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListRolePermissionsOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - permissions(other.getPermissions()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "permissions", nulls = Nulls.SKIP) - public Builder permissions(Optional> permissions) { - this.permissions = permissions; - return this; - } - - public Builder permissions(List permissions) { - this.permissions = Optional.ofNullable(permissions); - return this; - } - - public ListRolePermissionsOffsetPaginatedResponseContent build() { - return new ListRolePermissionsOffsetPaginatedResponseContent( - start, limit, total, permissions, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListRoleUsersPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListRoleUsersPaginatedResponseContent.java deleted file mode 100644 index a489c2d16..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListRoleUsersPaginatedResponseContent.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListRoleUsersPaginatedResponseContent.Builder.class) -public final class ListRoleUsersPaginatedResponseContent { - private final Optional next; - - private final Optional> users; - - private final Map additionalProperties; - - private ListRoleUsersPaginatedResponseContent( - Optional next, Optional> users, Map additionalProperties) { - this.next = next; - this.users = users; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("next") - public Optional getNext() { - return next; - } - - @JsonProperty("users") - public Optional> getUsers() { - return users; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListRoleUsersPaginatedResponseContent - && equalTo((ListRoleUsersPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListRoleUsersPaginatedResponseContent other) { - return next.equals(other.next) && users.equals(other.users); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.next, this.users); - } - - @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 Optional> users = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListRoleUsersPaginatedResponseContent other) { - next(other.getNext()); - users(other.getUsers()); - return this; - } - - @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 = "users", nulls = Nulls.SKIP) - public Builder users(Optional> users) { - this.users = users; - return this; - } - - public Builder users(List users) { - this.users = Optional.ofNullable(users); - return this; - } - - public ListRoleUsersPaginatedResponseContent build() { - return new ListRoleUsersPaginatedResponseContent(next, users, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListRolesOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListRolesOffsetPaginatedResponseContent.java deleted file mode 100644 index 9fbe5e5f1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListRolesOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,171 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListRolesOffsetPaginatedResponseContent.Builder.class) -public final class ListRolesOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> roles; - - private final Map additionalProperties; - - private ListRolesOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> roles, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.roles = roles; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("roles") - public Optional> getRoles() { - return roles; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListRolesOffsetPaginatedResponseContent - && equalTo((ListRolesOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListRolesOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && roles.equals(other.roles); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.roles); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> roles = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListRolesOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - roles(other.getRoles()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "roles", nulls = Nulls.SKIP) - public Builder roles(Optional> roles) { - this.roles = roles; - return this; - } - - public Builder roles(List roles) { - this.roles = Optional.ofNullable(roles); - return this; - } - - public ListRolesOffsetPaginatedResponseContent build() { - return new ListRolesOffsetPaginatedResponseContent(start, limit, total, roles, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListRolesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListRolesRequestParameters.java deleted file mode 100644 index a96db8291..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListRolesRequestParameters.java +++ /dev/null @@ -1,289 +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.Nullable; -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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListRolesRequestParameters.Builder.class) -public final class ListRolesRequestParameters { - private final OptionalNullable perPage; - - private final OptionalNullable page; - - private final OptionalNullable includeTotals; - - private final OptionalNullable nameFilter; - - private final Map additionalProperties; - - private ListRolesRequestParameters( - OptionalNullable perPage, - OptionalNullable page, - OptionalNullable includeTotals, - OptionalNullable nameFilter, - Map additionalProperties) { - this.perPage = perPage; - this.page = page; - this.includeTotals = includeTotals; - this.nameFilter = nameFilter; - this.additionalProperties = additionalProperties; - } - - /** - * @return Number of results per page. Defaults to 50. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @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() { - return includeTotals; - } - - /** - * @return Optional filter on name (case-insensitive). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("name_filter") - public OptionalNullable getNameFilter() { - if (nameFilter == null) { - return OptionalNullable.absent(); - } - return nameFilter; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("name_filter") - private OptionalNullable _getNameFilter() { - return nameFilter; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListRolesRequestParameters && equalTo((ListRolesRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListRolesRequestParameters other) { - return perPage.equals(other.perPage) - && page.equals(other.page) - && includeTotals.equals(other.includeTotals) - && nameFilter.equals(other.nameFilter); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.perPage, this.page, this.includeTotals, this.nameFilter); - } - - @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 perPage = OptionalNullable.absent(); - - private OptionalNullable page = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - private OptionalNullable nameFilter = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListRolesRequestParameters other) { - perPage(other.getPerPage()); - page(other.getPage()); - includeTotals(other.getIncludeTotals()); - nameFilter(other.getNameFilter()); - return this; - } - - /** - *

Number of results per page. Defaults to 50.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - 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(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(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 filter on name (case-insensitive).

- */ - @JsonSetter(value = "name_filter", nulls = Nulls.SKIP) - public Builder nameFilter(@org.jetbrains.annotations.Nullable OptionalNullable nameFilter) { - this.nameFilter = nameFilter; - return this; - } - - public Builder nameFilter(String nameFilter) { - this.nameFilter = OptionalNullable.of(nameFilter); - return this; - } - - public Builder nameFilter(Optional nameFilter) { - if (nameFilter.isPresent()) { - this.nameFilter = OptionalNullable.of(nameFilter.get()); - } else { - this.nameFilter = OptionalNullable.absent(); - } - return this; - } - - public Builder nameFilter(Nullable nameFilter) { - if (nameFilter.isNull()) { - this.nameFilter = OptionalNullable.ofNull(); - } else if (nameFilter.isEmpty()) { - this.nameFilter = OptionalNullable.absent(); - } else { - this.nameFilter = OptionalNullable.of(nameFilter.get()); - } - return this; - } - - public ListRolesRequestParameters build() { - return new ListRolesRequestParameters(perPage, page, includeTotals, nameFilter, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListRulesOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListRulesOffsetPaginatedResponseContent.java deleted file mode 100644 index c1a0726c0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListRulesOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,171 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListRulesOffsetPaginatedResponseContent.Builder.class) -public final class ListRulesOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> rules; - - private final Map additionalProperties; - - private ListRulesOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> rules, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.rules = rules; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("rules") - public Optional> getRules() { - return rules; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListRulesOffsetPaginatedResponseContent - && equalTo((ListRulesOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListRulesOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && rules.equals(other.rules); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.rules); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> rules = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListRulesOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - rules(other.getRules()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @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; - } - - public ListRulesOffsetPaginatedResponseContent build() { - return new ListRulesOffsetPaginatedResponseContent(start, limit, total, rules, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListRulesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListRulesRequestParameters.java deleted file mode 100644 index 4175ace55..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListRulesRequestParameters.java +++ /dev/null @@ -1,410 +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.Nullable; -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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListRulesRequestParameters.Builder.class) -public final class ListRulesRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final OptionalNullable enabled; - - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final Map additionalProperties; - - private ListRulesRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - OptionalNullable enabled, - OptionalNullable fields, - OptionalNullable includeFields, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.enabled = enabled; - this.fields = fields; - this.includeFields = includeFields; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - return includeTotals; - } - - /** - * @return Optional filter on whether a rule is enabled (true) or disabled (false). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("enabled") - public OptionalNullable getEnabled() { - if (enabled == null) { - return OptionalNullable.absent(); - } - return enabled; - } - - /** - * @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). - */ - @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("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; - return other instanceof ListRulesRequestParameters && equalTo((ListRulesRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListRulesRequestParameters other) { - return page.equals(other.page) - && perPage.equals(other.perPage) - && includeTotals.equals(other.includeTotals) - && enabled.equals(other.enabled) - && fields.equals(other.fields) - && includeFields.equals(other.includeFields); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage, this.includeTotals, this.enabled, 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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - private OptionalNullable enabled = OptionalNullable.absent(); - - private OptionalNullable fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListRulesRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - enabled(other.getEnabled()); - fields(other.getFields()); - includeFields(other.getIncludeFields()); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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(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 filter on whether a rule is enabled (true) or disabled (false).

- */ - @JsonSetter(value = "enabled", nulls = Nulls.SKIP) - public Builder enabled(@org.jetbrains.annotations.Nullable OptionalNullable enabled) { - this.enabled = enabled; - return this; - } - - public Builder enabled(Boolean enabled) { - this.enabled = OptionalNullable.of(enabled); - return this; - } - - public Builder enabled(Optional enabled) { - if (enabled.isPresent()) { - this.enabled = OptionalNullable.of(enabled.get()); - } else { - this.enabled = OptionalNullable.absent(); - } - return this; - } - - public Builder enabled(Nullable enabled) { - if (enabled.isNull()) { - this.enabled = OptionalNullable.ofNull(); - } else if (enabled.isEmpty()) { - this.enabled = OptionalNullable.absent(); - } else { - this.enabled = OptionalNullable.of(enabled.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(@org.jetbrains.annotations.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(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).

- */ - @JsonSetter(value = "include_fields", nulls = Nulls.SKIP) - public Builder includeFields(@org.jetbrains.annotations.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(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 ListRulesRequestParameters build() { - return new ListRulesRequestParameters( - page, perPage, includeTotals, enabled, fields, includeFields, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListSelfServiceProfilesPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListSelfServiceProfilesPaginatedResponseContent.java deleted file mode 100644 index 54a43729b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListSelfServiceProfilesPaginatedResponseContent.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListSelfServiceProfilesPaginatedResponseContent.Builder.class) -public final class ListSelfServiceProfilesPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> selfServiceProfiles; - - private final Map additionalProperties; - - private ListSelfServiceProfilesPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> selfServiceProfiles, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.selfServiceProfiles = selfServiceProfiles; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("self_service_profiles") - public Optional> getSelfServiceProfiles() { - return selfServiceProfiles; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListSelfServiceProfilesPaginatedResponseContent - && equalTo((ListSelfServiceProfilesPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListSelfServiceProfilesPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && selfServiceProfiles.equals(other.selfServiceProfiles); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.selfServiceProfiles); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> selfServiceProfiles = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListSelfServiceProfilesPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - selfServiceProfiles(other.getSelfServiceProfiles()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "self_service_profiles", nulls = Nulls.SKIP) - public Builder selfServiceProfiles(Optional> selfServiceProfiles) { - this.selfServiceProfiles = selfServiceProfiles; - return this; - } - - public Builder selfServiceProfiles(List selfServiceProfiles) { - this.selfServiceProfiles = Optional.ofNullable(selfServiceProfiles); - return this; - } - - public ListSelfServiceProfilesPaginatedResponseContent build() { - return new ListSelfServiceProfilesPaginatedResponseContent( - start, limit, total, selfServiceProfiles, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListSelfServiceProfilesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListSelfServiceProfilesRequestParameters.java deleted file mode 100644 index 0416c385f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListSelfServiceProfilesRequestParameters.java +++ /dev/null @@ -1,228 +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.Nullable; -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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListSelfServiceProfilesRequestParameters.Builder.class) -public final class ListSelfServiceProfilesRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final Map additionalProperties; - - private ListSelfServiceProfilesRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. Defaults to 50. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - return includeTotals; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListSelfServiceProfilesRequestParameters - && equalTo((ListSelfServiceProfilesRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListSelfServiceProfilesRequestParameters other) { - return page.equals(other.page) && perPage.equals(other.perPage) && includeTotals.equals(other.includeTotals); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage, this.includeTotals); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListSelfServiceProfilesRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page. Defaults to 50.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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(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; - } - - public ListSelfServiceProfilesRequestParameters build() { - return new ListSelfServiceProfilesRequestParameters(page, perPage, includeTotals, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListTokenExchangeProfileResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListTokenExchangeProfileResponseContent.java deleted file mode 100644 index 6c03ca1f6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListTokenExchangeProfileResponseContent.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListTokenExchangeProfileResponseContent.Builder.class) -public final class ListTokenExchangeProfileResponseContent { - private final Optional next; - - private final Optional> tokenExchangeProfiles; - - private final Map additionalProperties; - - private ListTokenExchangeProfileResponseContent( - Optional next, - Optional> tokenExchangeProfiles, - Map additionalProperties) { - this.next = next; - this.tokenExchangeProfiles = tokenExchangeProfiles; - this.additionalProperties = additionalProperties; - } - - /** - * @return Opaque identifier for use with the <i>from</i> query parameter for the next page of results.<br/>This identifier is valid for 24 hours. - */ - @JsonProperty("next") - public Optional getNext() { - return next; - } - - @JsonProperty("token_exchange_profiles") - public Optional> getTokenExchangeProfiles() { - return tokenExchangeProfiles; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListTokenExchangeProfileResponseContent - && equalTo((ListTokenExchangeProfileResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListTokenExchangeProfileResponseContent other) { - return next.equals(other.next) && tokenExchangeProfiles.equals(other.tokenExchangeProfiles); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.next, this.tokenExchangeProfiles); - } - - @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 Optional> tokenExchangeProfiles = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListTokenExchangeProfileResponseContent other) { - next(other.getNext()); - tokenExchangeProfiles(other.getTokenExchangeProfiles()); - return this; - } - - /** - *

Opaque identifier for use with the <i>from</i> query parameter for the next page of results.<br/>This identifier is valid for 24 hours.

- */ - @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 = "token_exchange_profiles", nulls = Nulls.SKIP) - public Builder tokenExchangeProfiles( - Optional> tokenExchangeProfiles) { - this.tokenExchangeProfiles = tokenExchangeProfiles; - return this; - } - - public Builder tokenExchangeProfiles(List tokenExchangeProfiles) { - this.tokenExchangeProfiles = Optional.ofNullable(tokenExchangeProfiles); - return this; - } - - public ListTokenExchangeProfileResponseContent build() { - return new ListTokenExchangeProfileResponseContent(next, tokenExchangeProfiles, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfileRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfileRequestParameters.java deleted file mode 100644 index 38bd827f2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfileRequestParameters.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListUserAttributeProfileRequestParameters.Builder.class) -public final class ListUserAttributeProfileRequestParameters { - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private ListUserAttributeProfileRequestParameters( - 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 5. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("take") - public 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; - return other instanceof ListUserAttributeProfileRequestParameters - && equalTo((ListUserAttributeProfileRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserAttributeProfileRequestParameters 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(ListUserAttributeProfileRequestParameters 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 5.

- */ - @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(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 ListUserAttributeProfileRequestParameters build() { - return new ListUserAttributeProfileRequestParameters(from, take, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfileTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfileTemplateResponseContent.java deleted file mode 100644 index 065719d3e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfileTemplateResponseContent.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUserAttributeProfileTemplateResponseContent.Builder.class) -public final class ListUserAttributeProfileTemplateResponseContent { - private final Optional> userAttributeProfileTemplates; - - private final Map additionalProperties; - - private ListUserAttributeProfileTemplateResponseContent( - Optional> userAttributeProfileTemplates, - Map additionalProperties) { - this.userAttributeProfileTemplates = userAttributeProfileTemplates; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("user_attribute_profile_templates") - public Optional> getUserAttributeProfileTemplates() { - return userAttributeProfileTemplates; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListUserAttributeProfileTemplateResponseContent - && equalTo((ListUserAttributeProfileTemplateResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserAttributeProfileTemplateResponseContent other) { - return userAttributeProfileTemplates.equals(other.userAttributeProfileTemplates); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.userAttributeProfileTemplates); - } - - @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> userAttributeProfileTemplates = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserAttributeProfileTemplateResponseContent other) { - userAttributeProfileTemplates(other.getUserAttributeProfileTemplates()); - return this; - } - - @JsonSetter(value = "user_attribute_profile_templates", nulls = Nulls.SKIP) - public Builder userAttributeProfileTemplates( - Optional> userAttributeProfileTemplates) { - this.userAttributeProfileTemplates = userAttributeProfileTemplates; - return this; - } - - public Builder userAttributeProfileTemplates( - List userAttributeProfileTemplates) { - this.userAttributeProfileTemplates = Optional.ofNullable(userAttributeProfileTemplates); - return this; - } - - public ListUserAttributeProfileTemplateResponseContent build() { - return new ListUserAttributeProfileTemplateResponseContent( - userAttributeProfileTemplates, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfilesPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfilesPaginatedResponseContent.java deleted file mode 100644 index b22b02d43..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserAttributeProfilesPaginatedResponseContent.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUserAttributeProfilesPaginatedResponseContent.Builder.class) -public final class ListUserAttributeProfilesPaginatedResponseContent { - private final Optional next; - - private final Optional> userAttributeProfiles; - - private final Map additionalProperties; - - private ListUserAttributeProfilesPaginatedResponseContent( - Optional next, - Optional> userAttributeProfiles, - Map additionalProperties) { - this.next = next; - this.userAttributeProfiles = userAttributeProfiles; - 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("user_attribute_profiles") - public Optional> getUserAttributeProfiles() { - return userAttributeProfiles; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListUserAttributeProfilesPaginatedResponseContent - && equalTo((ListUserAttributeProfilesPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserAttributeProfilesPaginatedResponseContent other) { - return next.equals(other.next) && userAttributeProfiles.equals(other.userAttributeProfiles); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.next, this.userAttributeProfiles); - } - - @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 Optional> userAttributeProfiles = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserAttributeProfilesPaginatedResponseContent other) { - next(other.getNext()); - userAttributeProfiles(other.getUserAttributeProfiles()); - 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 = "user_attribute_profiles", nulls = Nulls.SKIP) - public Builder userAttributeProfiles(Optional> userAttributeProfiles) { - this.userAttributeProfiles = userAttributeProfiles; - return this; - } - - public Builder userAttributeProfiles(List userAttributeProfiles) { - this.userAttributeProfiles = Optional.ofNullable(userAttributeProfiles); - return this; - } - - public ListUserAttributeProfilesPaginatedResponseContent build() { - return new ListUserAttributeProfilesPaginatedResponseContent( - next, userAttributeProfiles, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserAuthenticationMethodsOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListUserAuthenticationMethodsOffsetPaginatedResponseContent.java deleted file mode 100644 index 832aba447..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserAuthenticationMethodsOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUserAuthenticationMethodsOffsetPaginatedResponseContent.Builder.class) -public final class ListUserAuthenticationMethodsOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> authenticators; - - private final Map additionalProperties; - - private ListUserAuthenticationMethodsOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> authenticators, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.authenticators = authenticators; - this.additionalProperties = additionalProperties; - } - - /** - * @return Index of the starting record. Derived from the page and per_page parameters. - */ - @JsonProperty("start") - public Optional getStart() { - return start; - } - - /** - * @return Maximum amount of records to return. - */ - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - /** - * @return Total number of pageable records. - */ - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - /** - * @return The paginated authentication methods. Returned in this structure when include_totals is true. - */ - @JsonProperty("authenticators") - public Optional> getAuthenticators() { - return authenticators; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListUserAuthenticationMethodsOffsetPaginatedResponseContent - && equalTo((ListUserAuthenticationMethodsOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserAuthenticationMethodsOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && authenticators.equals(other.authenticators); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.authenticators); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> authenticators = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserAuthenticationMethodsOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - authenticators(other.getAuthenticators()); - return this; - } - - /** - *

Index of the starting record. Derived from the page and per_page parameters.

- */ - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional start) { - this.start = start; - return this; - } - - public Builder start(Double start) { - this.start = Optional.ofNullable(start); - return this; - } - - /** - *

Maximum amount of records to return.

- */ - @JsonSetter(value = "limit", nulls = Nulls.SKIP) - public Builder limit(Optional limit) { - this.limit = limit; - return this; - } - - public Builder limit(Double limit) { - this.limit = Optional.ofNullable(limit); - return this; - } - - /** - *

Total number of pageable records.

- */ - @JsonSetter(value = "total", nulls = Nulls.SKIP) - public Builder total(Optional total) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - /** - *

The paginated authentication methods. Returned in this structure when include_totals is true.

- */ - @JsonSetter(value = "authenticators", nulls = Nulls.SKIP) - public Builder authenticators(Optional> authenticators) { - this.authenticators = authenticators; - return this; - } - - public Builder authenticators(List authenticators) { - this.authenticators = Optional.ofNullable(authenticators); - return this; - } - - public ListUserAuthenticationMethodsOffsetPaginatedResponseContent build() { - return new ListUserAuthenticationMethodsOffsetPaginatedResponseContent( - start, limit, total, authenticators, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksByIdentifierRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksByIdentifierRequestParameters.java deleted file mode 100644 index a99680925..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksByIdentifierRequestParameters.java +++ /dev/null @@ -1,218 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.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 = ListUserBlocksByIdentifierRequestParameters.Builder.class) -public final class ListUserBlocksByIdentifierRequestParameters { - private final String identifier; - - private final OptionalNullable considerBruteForceEnablement; - - private final Map additionalProperties; - - private ListUserBlocksByIdentifierRequestParameters( - String identifier, - OptionalNullable considerBruteForceEnablement, - Map additionalProperties) { - this.identifier = identifier; - this.considerBruteForceEnablement = considerBruteForceEnablement; - this.additionalProperties = additionalProperties; - } - - /** - * @return Should be any of a username, phone number, or email. - */ - @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. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("consider_brute_force_enablement") - public OptionalNullable getConsiderBruteForceEnablement() { - if (considerBruteForceEnablement == null) { - return OptionalNullable.absent(); - } - 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; - return other instanceof ListUserBlocksByIdentifierRequestParameters - && equalTo((ListUserBlocksByIdentifierRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserBlocksByIdentifierRequestParameters other) { - return identifier.equals(other.identifier) - && considerBruteForceEnablement.equals(other.considerBruteForceEnablement); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.identifier, this.considerBruteForceEnablement); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdentifierStage builder() { - return new Builder(); - } - - public interface IdentifierStage { - /** - *

Should be any of a username, phone number, or email.

- */ - _FinalStage identifier(@NotNull String identifier); - - Builder from(ListUserBlocksByIdentifierRequestParameters other); - } - - public interface _FinalStage { - ListUserBlocksByIdentifierRequestParameters build(); - - /** - *

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.

- */ - _FinalStage considerBruteForceEnablement(@Nullable OptionalNullable considerBruteForceEnablement); - - _FinalStage considerBruteForceEnablement(Boolean considerBruteForceEnablement); - - _FinalStage considerBruteForceEnablement(Optional considerBruteForceEnablement); - - _FinalStage considerBruteForceEnablement( - com.auth0.client.mgmt.core.Nullable considerBruteForceEnablement); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdentifierStage, _FinalStage { - private String identifier; - - private OptionalNullable considerBruteForceEnablement = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ListUserBlocksByIdentifierRequestParameters other) { - identifier(other.getIdentifier()); - considerBruteForceEnablement(other.getConsiderBruteForceEnablement()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("identifier") - public _FinalStage identifier(@NotNull String identifier) { - this.identifier = Objects.requireNonNull(identifier, "identifier must not be null"); - return this; - } - - /** - *

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 Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage considerBruteForceEnablement( - com.auth0.client.mgmt.core.Nullable considerBruteForceEnablement) { - if (considerBruteForceEnablement.isNull()) { - this.considerBruteForceEnablement = OptionalNullable.ofNull(); - } else if (considerBruteForceEnablement.isEmpty()) { - this.considerBruteForceEnablement = OptionalNullable.absent(); - } else { - this.considerBruteForceEnablement = OptionalNullable.of(considerBruteForceEnablement.get()); - } - return this; - } - - /** - *

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 Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage considerBruteForceEnablement(Optional considerBruteForceEnablement) { - if (considerBruteForceEnablement.isPresent()) { - this.considerBruteForceEnablement = OptionalNullable.of(considerBruteForceEnablement.get()); - } else { - this.considerBruteForceEnablement = OptionalNullable.absent(); - } - return this; - } - - /** - *

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 Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage considerBruteForceEnablement(Boolean considerBruteForceEnablement) { - this.considerBruteForceEnablement = OptionalNullable.of(considerBruteForceEnablement); - return this; - } - - /** - *

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.

- */ - @java.lang.Override - @JsonSetter(value = "consider_brute_force_enablement", nulls = Nulls.SKIP) - public _FinalStage considerBruteForceEnablement( - @Nullable OptionalNullable considerBruteForceEnablement) { - this.considerBruteForceEnablement = considerBruteForceEnablement; - return this; - } - - @java.lang.Override - public ListUserBlocksByIdentifierRequestParameters build() { - return new ListUserBlocksByIdentifierRequestParameters( - identifier, considerBruteForceEnablement, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksByIdentifierResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksByIdentifierResponseContent.java deleted file mode 100644 index 1e92989df..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksByIdentifierResponseContent.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUserBlocksByIdentifierResponseContent.Builder.class) -public final class ListUserBlocksByIdentifierResponseContent { - private final Optional> blockedFor; - - private final Map additionalProperties; - - private ListUserBlocksByIdentifierResponseContent( - Optional> blockedFor, Map additionalProperties) { - this.blockedFor = blockedFor; - this.additionalProperties = additionalProperties; - } - - /** - * @return Array of identifier + IP address pairs. IP address is optional, and may be omitted in certain circumstances (such as Account Lockout mode). - */ - @JsonProperty("blocked_for") - public Optional> getBlockedFor() { - return blockedFor; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListUserBlocksByIdentifierResponseContent - && equalTo((ListUserBlocksByIdentifierResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserBlocksByIdentifierResponseContent other) { - return blockedFor.equals(other.blockedFor); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.blockedFor); - } - - @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> blockedFor = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserBlocksByIdentifierResponseContent other) { - blockedFor(other.getBlockedFor()); - return this; - } - - /** - *

Array of identifier + IP address pairs. IP address is optional, and may be omitted in certain circumstances (such as Account Lockout mode).

- */ - @JsonSetter(value = "blocked_for", nulls = Nulls.SKIP) - public Builder blockedFor(Optional> blockedFor) { - this.blockedFor = blockedFor; - return this; - } - - public Builder blockedFor(List blockedFor) { - this.blockedFor = Optional.ofNullable(blockedFor); - return this; - } - - public ListUserBlocksByIdentifierResponseContent build() { - return new ListUserBlocksByIdentifierResponseContent(blockedFor, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksRequestParameters.java deleted file mode 100644 index d7df16883..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksRequestParameters.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListUserBlocksRequestParameters.Builder.class) -public final class ListUserBlocksRequestParameters { - private final OptionalNullable considerBruteForceEnablement; - - private final Map additionalProperties; - - private ListUserBlocksRequestParameters( - OptionalNullable considerBruteForceEnablement, Map additionalProperties) { - this.considerBruteForceEnablement = considerBruteForceEnablement; - this.additionalProperties = additionalProperties; - } - - /** - * @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. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("consider_brute_force_enablement") - public OptionalNullable getConsiderBruteForceEnablement() { - if (considerBruteForceEnablement == null) { - return OptionalNullable.absent(); - } - 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; - return other instanceof ListUserBlocksRequestParameters && equalTo((ListUserBlocksRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserBlocksRequestParameters other) { - return considerBruteForceEnablement.equals(other.considerBruteForceEnablement); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.considerBruteForceEnablement); - } - - @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 considerBruteForceEnablement = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserBlocksRequestParameters other) { - considerBruteForceEnablement(other.getConsiderBruteForceEnablement()); - return this; - } - - /** - *

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.

- */ - @JsonSetter(value = "consider_brute_force_enablement", nulls = Nulls.SKIP) - public Builder considerBruteForceEnablement(@Nullable OptionalNullable considerBruteForceEnablement) { - this.considerBruteForceEnablement = considerBruteForceEnablement; - return this; - } - - public Builder considerBruteForceEnablement(Boolean considerBruteForceEnablement) { - this.considerBruteForceEnablement = OptionalNullable.of(considerBruteForceEnablement); - return this; - } - - public Builder considerBruteForceEnablement(Optional considerBruteForceEnablement) { - if (considerBruteForceEnablement.isPresent()) { - this.considerBruteForceEnablement = OptionalNullable.of(considerBruteForceEnablement.get()); - } else { - this.considerBruteForceEnablement = OptionalNullable.absent(); - } - return this; - } - - public Builder considerBruteForceEnablement( - com.auth0.client.mgmt.core.Nullable considerBruteForceEnablement) { - if (considerBruteForceEnablement.isNull()) { - this.considerBruteForceEnablement = OptionalNullable.ofNull(); - } else if (considerBruteForceEnablement.isEmpty()) { - this.considerBruteForceEnablement = OptionalNullable.absent(); - } else { - this.considerBruteForceEnablement = OptionalNullable.of(considerBruteForceEnablement.get()); - } - return this; - } - - public ListUserBlocksRequestParameters build() { - return new ListUserBlocksRequestParameters(considerBruteForceEnablement, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksResponseContent.java deleted file mode 100644 index 1ac2c96b1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserBlocksResponseContent.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUserBlocksResponseContent.Builder.class) -public final class ListUserBlocksResponseContent { - private final Optional> blockedFor; - - private final Map additionalProperties; - - private ListUserBlocksResponseContent( - Optional> blockedFor, Map additionalProperties) { - this.blockedFor = blockedFor; - this.additionalProperties = additionalProperties; - } - - /** - * @return Array of identifier + IP address pairs. IP address is optional, and may be omitted in certain circumstances (such as Account Lockout mode). - */ - @JsonProperty("blocked_for") - public Optional> getBlockedFor() { - return blockedFor; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListUserBlocksResponseContent && equalTo((ListUserBlocksResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserBlocksResponseContent other) { - return blockedFor.equals(other.blockedFor); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.blockedFor); - } - - @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> blockedFor = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserBlocksResponseContent other) { - blockedFor(other.getBlockedFor()); - return this; - } - - /** - *

Array of identifier + IP address pairs. IP address is optional, and may be omitted in certain circumstances (such as Account Lockout mode).

- */ - @JsonSetter(value = "blocked_for", nulls = Nulls.SKIP) - public Builder blockedFor(Optional> blockedFor) { - this.blockedFor = blockedFor; - return this; - } - - public Builder blockedFor(List blockedFor) { - this.blockedFor = Optional.ofNullable(blockedFor); - return this; - } - - public ListUserBlocksResponseContent build() { - return new ListUserBlocksResponseContent(blockedFor, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserConnectedAccountsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListUserConnectedAccountsResponseContent.java deleted file mode 100644 index c6c74c3af..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserConnectedAccountsResponseContent.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = ListUserConnectedAccountsResponseContent.Builder.class) -public final class ListUserConnectedAccountsResponseContent { - private final List connectedAccounts; - - private final Optional next; - - private final Map additionalProperties; - - private ListUserConnectedAccountsResponseContent( - List connectedAccounts, Optional next, Map additionalProperties) { - this.connectedAccounts = connectedAccounts; - this.next = next; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("connected_accounts") - public List getConnectedAccounts() { - return connectedAccounts; - } - - /** - * @return The token to retrieve the next page of connected accounts (if there is one) - */ - @JsonProperty("next") - public Optional getNext() { - return next; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListUserConnectedAccountsResponseContent - && equalTo((ListUserConnectedAccountsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserConnectedAccountsResponseContent other) { - return connectedAccounts.equals(other.connectedAccounts) && next.equals(other.next); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connectedAccounts, 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 connectedAccounts = new ArrayList<>(); - - private Optional next = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserConnectedAccountsResponseContent other) { - connectedAccounts(other.getConnectedAccounts()); - next(other.getNext()); - return this; - } - - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public Builder connectedAccounts(List connectedAccounts) { - this.connectedAccounts.clear(); - if (connectedAccounts != null) { - this.connectedAccounts.addAll(connectedAccounts); - } - return this; - } - - public Builder addConnectedAccounts(ConnectedAccount connectedAccounts) { - this.connectedAccounts.add(connectedAccounts); - return this; - } - - public Builder addAllConnectedAccounts(List connectedAccounts) { - if (connectedAccounts != null) { - this.connectedAccounts.addAll(connectedAccounts); - } - return this; - } - - /** - *

The token to retrieve the next page of connected accounts (if there is one)

- */ - @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 ListUserConnectedAccountsResponseContent build() { - return new ListUserConnectedAccountsResponseContent(connectedAccounts, next, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserGrantsOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListUserGrantsOffsetPaginatedResponseContent.java deleted file mode 100644 index ae55daad1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserGrantsOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,171 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUserGrantsOffsetPaginatedResponseContent.Builder.class) -public final class ListUserGrantsOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> grants; - - private final Map additionalProperties; - - private ListUserGrantsOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> grants, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.grants = grants; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("grants") - public Optional> getGrants() { - return grants; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListUserGrantsOffsetPaginatedResponseContent - && equalTo((ListUserGrantsOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserGrantsOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && grants.equals(other.grants); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.grants); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> grants = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserGrantsOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - grants(other.getGrants()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - 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 ListUserGrantsOffsetPaginatedResponseContent build() { - return new ListUserGrantsOffsetPaginatedResponseContent(start, limit, total, grants, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserGrantsRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListUserGrantsRequestParameters.java deleted file mode 100644 index 9ea2cc9f2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserGrantsRequestParameters.java +++ /dev/null @@ -1,410 +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.Nullable; -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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListUserGrantsRequestParameters.Builder.class) -public final class ListUserGrantsRequestParameters { - private final OptionalNullable perPage; - - private final OptionalNullable page; - - private final OptionalNullable includeTotals; - - private final OptionalNullable userId; - - private final OptionalNullable clientId; - - private final OptionalNullable audience; - - private final Map additionalProperties; - - private ListUserGrantsRequestParameters( - OptionalNullable perPage, - OptionalNullable page, - OptionalNullable includeTotals, - OptionalNullable userId, - OptionalNullable clientId, - OptionalNullable audience, - Map additionalProperties) { - this.perPage = perPage; - this.page = page; - this.includeTotals = includeTotals; - this.userId = userId; - this.clientId = clientId; - this.audience = audience; - this.additionalProperties = additionalProperties; - } - - /** - * @return Number of results per page. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @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() { - return includeTotals; - } - - /** - * @return user_id of the grants to retrieve. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("user_id") - public OptionalNullable getUserId() { - if (userId == null) { - return OptionalNullable.absent(); - } - return userId; - } - - /** - * @return client_id of the grants to retrieve. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("client_id") - public OptionalNullable getClientId() { - if (clientId == null) { - return OptionalNullable.absent(); - } - return clientId; - } - - /** - * @return audience of the grants to retrieve. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("audience") - public OptionalNullable getAudience() { - if (audience == null) { - return OptionalNullable.absent(); - } - return audience; - } - - @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; - return other instanceof ListUserGrantsRequestParameters && equalTo((ListUserGrantsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserGrantsRequestParameters other) { - return perPage.equals(other.perPage) - && page.equals(other.page) - && includeTotals.equals(other.includeTotals) - && userId.equals(other.userId) - && clientId.equals(other.clientId) - && audience.equals(other.audience); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.perPage, this.page, this.includeTotals, this.userId, this.clientId, this.audience); - } - - @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 perPage = OptionalNullable.absent(); - - private OptionalNullable page = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - private OptionalNullable userId = OptionalNullable.absent(); - - private OptionalNullable clientId = OptionalNullable.absent(); - - private OptionalNullable audience = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserGrantsRequestParameters other) { - perPage(other.getPerPage()); - page(other.getPage()); - includeTotals(other.getIncludeTotals()); - userId(other.getUserId()); - clientId(other.getClientId()); - audience(other.getAudience()); - return this; - } - - /** - *

Number of results per page.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - 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(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(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; - } - - /** - *

user_id of the grants to retrieve.

- */ - @JsonSetter(value = "user_id", nulls = Nulls.SKIP) - public Builder userId(@org.jetbrains.annotations.Nullable OptionalNullable userId) { - this.userId = userId; - return this; - } - - public Builder userId(String userId) { - this.userId = OptionalNullable.of(userId); - return this; - } - - public Builder userId(Optional userId) { - if (userId.isPresent()) { - this.userId = OptionalNullable.of(userId.get()); - } else { - this.userId = OptionalNullable.absent(); - } - return this; - } - - public Builder userId(Nullable userId) { - if (userId.isNull()) { - this.userId = OptionalNullable.ofNull(); - } else if (userId.isEmpty()) { - this.userId = OptionalNullable.absent(); - } else { - this.userId = OptionalNullable.of(userId.get()); - } - return this; - } - - /** - *

client_id of the grants to retrieve.

- */ - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public Builder clientId(@org.jetbrains.annotations.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(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; - } - - /** - *

audience of the grants to retrieve.

- */ - @JsonSetter(value = "audience", nulls = Nulls.SKIP) - public Builder audience(@org.jetbrains.annotations.Nullable OptionalNullable audience) { - this.audience = audience; - return this; - } - - public Builder audience(String audience) { - this.audience = OptionalNullable.of(audience); - return this; - } - - public Builder audience(Optional audience) { - if (audience.isPresent()) { - this.audience = OptionalNullable.of(audience.get()); - } else { - this.audience = OptionalNullable.absent(); - } - return this; - } - - public Builder audience(Nullable audience) { - if (audience.isNull()) { - this.audience = OptionalNullable.ofNull(); - } else if (audience.isEmpty()) { - this.audience = OptionalNullable.absent(); - } else { - this.audience = OptionalNullable.of(audience.get()); - } - return this; - } - - public ListUserGrantsRequestParameters build() { - return new ListUserGrantsRequestParameters( - perPage, page, includeTotals, userId, clientId, audience, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserOrganizationsOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListUserOrganizationsOffsetPaginatedResponseContent.java deleted file mode 100644 index 9c9d1d39a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserOrganizationsOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUserOrganizationsOffsetPaginatedResponseContent.Builder.class) -public final class ListUserOrganizationsOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> organizations; - - private final Map additionalProperties; - - private ListUserOrganizationsOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> organizations, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.organizations = organizations; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("organizations") - public Optional> getOrganizations() { - return organizations; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListUserOrganizationsOffsetPaginatedResponseContent - && equalTo((ListUserOrganizationsOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserOrganizationsOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && organizations.equals(other.organizations); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.organizations); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> organizations = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserOrganizationsOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - organizations(other.getOrganizations()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "organizations", nulls = Nulls.SKIP) - public Builder organizations(Optional> organizations) { - this.organizations = organizations; - return this; - } - - public Builder organizations(List organizations) { - this.organizations = Optional.ofNullable(organizations); - return this; - } - - public ListUserOrganizationsOffsetPaginatedResponseContent build() { - return new ListUserOrganizationsOffsetPaginatedResponseContent( - start, limit, total, organizations, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserPermissionsOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListUserPermissionsOffsetPaginatedResponseContent.java deleted file mode 100644 index 8cc2bba3e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserPermissionsOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUserPermissionsOffsetPaginatedResponseContent.Builder.class) -public final class ListUserPermissionsOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> permissions; - - private final Map additionalProperties; - - private ListUserPermissionsOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> permissions, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.permissions = permissions; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("permissions") - public Optional> getPermissions() { - return permissions; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListUserPermissionsOffsetPaginatedResponseContent - && equalTo((ListUserPermissionsOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserPermissionsOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && permissions.equals(other.permissions); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.permissions); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> permissions = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserPermissionsOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - permissions(other.getPermissions()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "permissions", nulls = Nulls.SKIP) - public Builder permissions(Optional> permissions) { - this.permissions = permissions; - return this; - } - - public Builder permissions(List permissions) { - this.permissions = Optional.ofNullable(permissions); - return this; - } - - public ListUserPermissionsOffsetPaginatedResponseContent build() { - return new ListUserPermissionsOffsetPaginatedResponseContent( - start, limit, total, permissions, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserRolesOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListUserRolesOffsetPaginatedResponseContent.java deleted file mode 100644 index 80f924308..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserRolesOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,171 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUserRolesOffsetPaginatedResponseContent.Builder.class) -public final class ListUserRolesOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional total; - - private final Optional> roles; - - private final Map additionalProperties; - - private ListUserRolesOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional total, - Optional> roles, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.total = total; - this.roles = roles; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("roles") - public Optional> getRoles() { - return roles; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListUserRolesOffsetPaginatedResponseContent - && equalTo((ListUserRolesOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserRolesOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && total.equals(other.total) - && roles.equals(other.roles); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.total, this.roles); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> roles = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserRolesOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - total(other.getTotal()); - roles(other.getRoles()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - 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) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "roles", nulls = Nulls.SKIP) - public Builder roles(Optional> roles) { - this.roles = roles; - return this; - } - - public Builder roles(List roles) { - this.roles = Optional.ofNullable(roles); - return this; - } - - public ListUserRolesOffsetPaginatedResponseContent build() { - return new ListUserRolesOffsetPaginatedResponseContent(start, limit, total, roles, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUserSessionsPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListUserSessionsPaginatedResponseContent.java deleted file mode 100644 index 55c248c5b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUserSessionsPaginatedResponseContent.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUserSessionsPaginatedResponseContent.Builder.class) -public final class ListUserSessionsPaginatedResponseContent { - private final Optional> sessions; - - private final Optional next; - - private final Map additionalProperties; - - private ListUserSessionsPaginatedResponseContent( - Optional> sessions, - Optional next, - Map additionalProperties) { - this.sessions = sessions; - this.next = next; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("sessions") - public Optional> getSessions() { - return sessions; - } - - /** - * @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 ListUserSessionsPaginatedResponseContent - && equalTo((ListUserSessionsPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserSessionsPaginatedResponseContent other) { - return sessions.equals(other.sessions) && next.equals(other.next); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.sessions, 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 Optional> sessions = Optional.empty(); - - private Optional next = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserSessionsPaginatedResponseContent other) { - sessions(other.getSessions()); - next(other.getNext()); - return this; - } - - @JsonSetter(value = "sessions", nulls = Nulls.SKIP) - public Builder sessions(Optional> sessions) { - this.sessions = sessions; - return this; - } - - public Builder sessions(List sessions) { - this.sessions = Optional.ofNullable(sessions); - 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 ListUserSessionsPaginatedResponseContent build() { - return new ListUserSessionsPaginatedResponseContent(sessions, next, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUsersByEmailRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListUsersByEmailRequestParameters.java deleted file mode 100644 index c66fe3a64..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUsersByEmailRequestParameters.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.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 = ListUsersByEmailRequestParameters.Builder.class) -public final class ListUsersByEmailRequestParameters { - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final String email; - - private final Map additionalProperties; - - private ListUsersByEmailRequestParameters( - OptionalNullable fields, - OptionalNullable includeFields, - String email, - Map additionalProperties) { - this.fields = fields; - this.includeFields = includeFields; - this.email = email; - this.additionalProperties = additionalProperties; - } - - /** - * @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; - } - - /** - * @return Email address to search for (case-sensitive). - */ - @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; - return other instanceof ListUsersByEmailRequestParameters && equalTo((ListUsersByEmailRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUsersByEmailRequestParameters other) { - return fields.equals(other.fields) && includeFields.equals(other.includeFields) && email.equals(other.email); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.fields, this.includeFields, this.email); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EmailStage builder() { - return new Builder(); - } - - public interface EmailStage { - /** - *

Email address to search for (case-sensitive).

- */ - _FinalStage email(@NotNull String email); - - Builder from(ListUsersByEmailRequestParameters other); - } - - public interface _FinalStage { - ListUsersByEmailRequestParameters build(); - - /** - *

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.

- */ - _FinalStage fields(@Nullable OptionalNullable fields); - - _FinalStage fields(String fields); - - _FinalStage fields(Optional fields); - - _FinalStage fields(com.auth0.client.mgmt.core.Nullable fields); - - /** - *

Whether specified fields are to be included (true) or excluded (false). Defaults to true.

- */ - _FinalStage includeFields(@Nullable OptionalNullable includeFields); - - _FinalStage includeFields(Boolean includeFields); - - _FinalStage includeFields(Optional includeFields); - - _FinalStage includeFields(com.auth0.client.mgmt.core.Nullable includeFields); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EmailStage, _FinalStage { - private String email; - - private OptionalNullable includeFields = OptionalNullable.absent(); - - private OptionalNullable fields = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ListUsersByEmailRequestParameters other) { - fields(other.getFields()); - includeFields(other.getIncludeFields()); - email(other.getEmail()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("email") - public _FinalStage email(@NotNull String email) { - this.email = Objects.requireNonNull(email, "email must not be null"); - return this; - } - - /** - *

Whether specified fields are to be included (true) or excluded (false). Defaults to true.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage 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; - } - - /** - *

Whether specified fields are to be included (true) or excluded (false). Defaults to true.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage includeFields(Optional includeFields) { - if (includeFields.isPresent()) { - this.includeFields = OptionalNullable.of(includeFields.get()); - } else { - this.includeFields = OptionalNullable.absent(); - } - return this; - } - - /** - *

Whether specified fields are to be included (true) or excluded (false). Defaults to true.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage includeFields(Boolean includeFields) { - this.includeFields = OptionalNullable.of(includeFields); - return this; - } - - /** - *

Whether specified fields are to be included (true) or excluded (false). Defaults to true.

- */ - @java.lang.Override - @JsonSetter(value = "include_fields", nulls = Nulls.SKIP) - public _FinalStage includeFields(@Nullable OptionalNullable includeFields) { - this.includeFields = includeFields; - 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.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage 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; - } - - /** - *

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.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage fields(Optional fields) { - if (fields.isPresent()) { - this.fields = OptionalNullable.of(fields.get()); - } else { - this.fields = OptionalNullable.absent(); - } - 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.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage fields(String fields) { - this.fields = OptionalNullable.of(fields); - 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.

- */ - @java.lang.Override - @JsonSetter(value = "fields", nulls = Nulls.SKIP) - public _FinalStage fields(@Nullable OptionalNullable fields) { - this.fields = fields; - return this; - } - - @java.lang.Override - public ListUsersByEmailRequestParameters build() { - return new ListUsersByEmailRequestParameters(fields, includeFields, email, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUsersOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListUsersOffsetPaginatedResponseContent.java deleted file mode 100644 index 6367d2130..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUsersOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUsersOffsetPaginatedResponseContent.Builder.class) -public final class ListUsersOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional length; - - private final Optional total; - - private final Optional> users; - - private final Map additionalProperties; - - private ListUsersOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional length, - Optional total, - Optional> users, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.length = length; - this.total = total; - this.users = users; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("length") - public Optional getLength() { - return length; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("users") - public Optional> getUsers() { - return users; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListUsersOffsetPaginatedResponseContent - && equalTo((ListUsersOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUsersOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && length.equals(other.length) - && total.equals(other.total) - && users.equals(other.users); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.length, this.total, this.users); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional length = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> users = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUsersOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - length(other.getLength()); - total(other.getTotal()); - users(other.getUsers()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - this.limit = limit; - return this; - } - - public Builder limit(Double limit) { - this.limit = Optional.ofNullable(limit); - return this; - } - - @JsonSetter(value = "length", nulls = Nulls.SKIP) - public Builder length(Optional length) { - this.length = length; - return this; - } - - public Builder length(Double length) { - this.length = Optional.ofNullable(length); - return this; - } - - @JsonSetter(value = "total", nulls = Nulls.SKIP) - public Builder total(Optional total) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "users", nulls = Nulls.SKIP) - public Builder users(Optional> users) { - this.users = users; - return this; - } - - public Builder users(List users) { - this.users = Optional.ofNullable(users); - return this; - } - - public ListUsersOffsetPaginatedResponseContent build() { - return new ListUsersOffsetPaginatedResponseContent( - start, limit, length, total, users, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListUsersRequestParameters.java b/src/main/java/com/auth0/client/mgmt/types/ListUsersRequestParameters.java deleted file mode 100644 index b1d3bf064..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListUsersRequestParameters.java +++ /dev/null @@ -1,671 +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.Nullable; -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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListUsersRequestParameters.Builder.class) -public final class ListUsersRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final OptionalNullable sort; - - private final OptionalNullable connection; - - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final OptionalNullable q; - - private final OptionalNullable searchEngine; - - private final OptionalNullable primaryOrder; - - private final Map additionalProperties; - - private ListUsersRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - OptionalNullable sort, - OptionalNullable connection, - OptionalNullable fields, - OptionalNullable includeFields, - OptionalNullable q, - OptionalNullable searchEngine, - OptionalNullable primaryOrder, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.sort = sort; - this.connection = connection; - this.fields = fields; - this.includeFields = includeFields; - this.q = q; - this.searchEngine = searchEngine; - this.primaryOrder = primaryOrder; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - return includeTotals; - } - - /** - * @return Field to sort by. Use <code>field:order</code> where order is <code>1</code> for ascending and <code>-1</code> for descending. e.g. <code>created_at:1</code> - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sort") - public OptionalNullable getSort() { - if (sort == null) { - return OptionalNullable.absent(); - } - return sort; - } - - /** - * @return Connection filter. Only applies when using <code>search_engine=v1</code>. To filter by connection with <code>search_engine=v2|v3</code>, use <code>q=identities.connection:"connection_name"</code> - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("connection") - public OptionalNullable getConnection() { - if (connection == null) { - return OptionalNullable.absent(); - } - return connection; - } - - /** - * @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). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("include_fields") - public OptionalNullable getIncludeFields() { - if (includeFields == null) { - return OptionalNullable.absent(); - } - return includeFields; - } - - /** - * @return Query in <a target='_new' href ='http://www.lucenetutorial.com/lucene-query-syntax.html'>Lucene query string syntax</a>. Some query types cannot be used on metadata fields, for details see <a href='https://auth0.com/docs/users/search/v3/query-syntax#searchable-fields'>Searchable Fields</a>. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("q") - public OptionalNullable getQ() { - if (q == null) { - return OptionalNullable.absent(); - } - return q; - } - - /** - * @return The version of the search engine - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("search_engine") - public OptionalNullable getSearchEngine() { - if (searchEngine == null) { - return OptionalNullable.absent(); - } - return searchEngine; - } - - /** - * @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. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("primary_order") - public OptionalNullable getPrimaryOrder() { - if (primaryOrder == null) { - return OptionalNullable.absent(); - } - return primaryOrder; - } - - @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; - return other instanceof ListUsersRequestParameters && equalTo((ListUsersRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUsersRequestParameters other) { - return page.equals(other.page) - && perPage.equals(other.perPage) - && includeTotals.equals(other.includeTotals) - && sort.equals(other.sort) - && connection.equals(other.connection) - && fields.equals(other.fields) - && includeFields.equals(other.includeFields) - && q.equals(other.q) - && searchEngine.equals(other.searchEngine) - && primaryOrder.equals(other.primaryOrder); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.page, - this.perPage, - this.includeTotals, - this.sort, - this.connection, - this.fields, - this.includeFields, - this.q, - this.searchEngine, - this.primaryOrder); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - private OptionalNullable sort = OptionalNullable.absent(); - - private OptionalNullable connection = OptionalNullable.absent(); - - private OptionalNullable fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - private OptionalNullable q = OptionalNullable.absent(); - - private OptionalNullable searchEngine = OptionalNullable.absent(); - - private OptionalNullable primaryOrder = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUsersRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - sort(other.getSort()); - connection(other.getConnection()); - fields(other.getFields()); - includeFields(other.getIncludeFields()); - q(other.getQ()); - searchEngine(other.getSearchEngine()); - primaryOrder(other.getPrimaryOrder()); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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(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; - } - - /** - *

Field to sort by. Use <code>field:order</code> where order is <code>1</code> for ascending and <code>-1</code> for descending. e.g. <code>created_at:1</code>

- */ - @JsonSetter(value = "sort", nulls = Nulls.SKIP) - public Builder sort(@org.jetbrains.annotations.Nullable OptionalNullable sort) { - this.sort = sort; - return this; - } - - public Builder sort(String 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(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; - } - - /** - *

Connection filter. Only applies when using <code>search_engine=v1</code>. To filter by connection with <code>search_engine=v2|v3</code>, use <code>q=identities.connection:"connection_name"</code>

- */ - @JsonSetter(value = "connection", nulls = Nulls.SKIP) - public Builder connection(@org.jetbrains.annotations.Nullable OptionalNullable connection) { - this.connection = connection; - return this; - } - - public Builder connection(String connection) { - this.connection = OptionalNullable.of(connection); - return this; - } - - public Builder connection(Optional connection) { - if (connection.isPresent()) { - this.connection = OptionalNullable.of(connection.get()); - } else { - this.connection = OptionalNullable.absent(); - } - return this; - } - - public Builder connection(Nullable connection) { - if (connection.isNull()) { - this.connection = OptionalNullable.ofNull(); - } else if (connection.isEmpty()) { - this.connection = OptionalNullable.absent(); - } else { - this.connection = OptionalNullable.of(connection.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(@org.jetbrains.annotations.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(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).

- */ - @JsonSetter(value = "include_fields", nulls = Nulls.SKIP) - public Builder includeFields(@org.jetbrains.annotations.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(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; - } - - /** - *

Query in <a target='_new' href ='http://www.lucenetutorial.com/lucene-query-syntax.html'>Lucene query string syntax</a>. Some query types cannot be used on metadata fields, for details see <a href='https://auth0.com/docs/users/search/v3/query-syntax#searchable-fields'>Searchable Fields</a>.

- */ - @JsonSetter(value = "q", nulls = Nulls.SKIP) - public Builder q(@org.jetbrains.annotations.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(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; - } - - /** - *

The version of the search engine

- */ - @JsonSetter(value = "search_engine", nulls = Nulls.SKIP) - public Builder searchEngine( - @org.jetbrains.annotations.Nullable OptionalNullable searchEngine) { - this.searchEngine = searchEngine; - return this; - } - - public Builder searchEngine(SearchEngineVersionsEnum searchEngine) { - this.searchEngine = OptionalNullable.of(searchEngine); - return this; - } - - public Builder searchEngine(Optional searchEngine) { - if (searchEngine.isPresent()) { - this.searchEngine = OptionalNullable.of(searchEngine.get()); - } else { - this.searchEngine = OptionalNullable.absent(); - } - return this; - } - - public Builder searchEngine(Nullable searchEngine) { - if (searchEngine.isNull()) { - this.searchEngine = OptionalNullable.ofNull(); - } else if (searchEngine.isEmpty()) { - this.searchEngine = OptionalNullable.absent(); - } else { - this.searchEngine = OptionalNullable.of(searchEngine.get()); - } - return this; - } - - /** - *

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.

- */ - @JsonSetter(value = "primary_order", nulls = Nulls.SKIP) - public Builder primaryOrder(@org.jetbrains.annotations.Nullable OptionalNullable primaryOrder) { - this.primaryOrder = primaryOrder; - return this; - } - - public Builder primaryOrder(Boolean primaryOrder) { - this.primaryOrder = OptionalNullable.of(primaryOrder); - return this; - } - - public Builder primaryOrder(Optional primaryOrder) { - if (primaryOrder.isPresent()) { - this.primaryOrder = OptionalNullable.of(primaryOrder.get()); - } else { - this.primaryOrder = OptionalNullable.absent(); - } - return this; - } - - public Builder primaryOrder(Nullable primaryOrder) { - if (primaryOrder.isNull()) { - this.primaryOrder = OptionalNullable.ofNull(); - } else if (primaryOrder.isEmpty()) { - this.primaryOrder = OptionalNullable.absent(); - } else { - this.primaryOrder = OptionalNullable.of(primaryOrder.get()); - } - return this; - } - - public ListUsersRequestParameters build() { - return new ListUsersRequestParameters( - page, - perPage, - includeTotals, - sort, - connection, - fields, - includeFields, - q, - searchEngine, - primaryOrder, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ListVerifiableCredentialTemplatesPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ListVerifiableCredentialTemplatesPaginatedResponseContent.java deleted file mode 100644 index e5b669b78..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ListVerifiableCredentialTemplatesPaginatedResponseContent.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ListVerifiableCredentialTemplatesPaginatedResponseContent.Builder.class) -public final class ListVerifiableCredentialTemplatesPaginatedResponseContent { - private final OptionalNullable next; - - private final Optional> templates; - - private final Map additionalProperties; - - private ListVerifiableCredentialTemplatesPaginatedResponseContent( - OptionalNullable next, - Optional> templates, - Map additionalProperties) { - this.next = next; - this.templates = templates; - this.additionalProperties = additionalProperties; - } - - /** - * @return Opaque identifier for use with the <i>from</i> query parameter for the next page of results.<br/>This identifier is valid for 24 hours. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("next") - public OptionalNullable getNext() { - if (next == null) { - return OptionalNullable.absent(); - } - return next; - } - - @JsonProperty("templates") - public Optional> getTemplates() { - return templates; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("next") - private OptionalNullable _getNext() { - return next; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListVerifiableCredentialTemplatesPaginatedResponseContent - && equalTo((ListVerifiableCredentialTemplatesPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListVerifiableCredentialTemplatesPaginatedResponseContent other) { - return next.equals(other.next) && templates.equals(other.templates); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.next, this.templates); - } - - @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 next = OptionalNullable.absent(); - - private Optional> templates = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListVerifiableCredentialTemplatesPaginatedResponseContent other) { - next(other.getNext()); - templates(other.getTemplates()); - return this; - } - - /** - *

Opaque identifier for use with the <i>from</i> query parameter for the next page of results.<br/>This identifier is valid for 24 hours.

- */ - @JsonSetter(value = "next", nulls = Nulls.SKIP) - public Builder next(@Nullable OptionalNullable next) { - this.next = next; - return this; - } - - public Builder next(String next) { - this.next = OptionalNullable.of(next); - return this; - } - - public Builder next(Optional next) { - if (next.isPresent()) { - this.next = OptionalNullable.of(next.get()); - } else { - this.next = OptionalNullable.absent(); - } - return this; - } - - public Builder next(com.auth0.client.mgmt.core.Nullable next) { - if (next.isNull()) { - this.next = OptionalNullable.ofNull(); - } else if (next.isEmpty()) { - this.next = OptionalNullable.absent(); - } else { - this.next = OptionalNullable.of(next.get()); - } - return this; - } - - @JsonSetter(value = "templates", nulls = Nulls.SKIP) - public Builder templates(Optional> templates) { - this.templates = templates; - return this; - } - - public Builder templates(List templates) { - this.templates = Optional.ofNullable(templates); - return this; - } - - public ListVerifiableCredentialTemplatesPaginatedResponseContent build() { - return new ListVerifiableCredentialTemplatesPaginatedResponseContent(next, templates, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/Log.java b/src/main/java/com/auth0/client/mgmt/types/Log.java deleted file mode 100644 index 27dd1c32b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/Log.java +++ /dev/null @@ -1,755 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = Log.Builder.class) -public final class Log { - private final Optional date; - - private final Optional type; - - private final OptionalNullable description; - - private final Optional connection; - - private final Optional connectionId; - - private final Optional clientId; - - private final Optional clientName; - - private final Optional ip; - - private final Optional hostname; - - private final Optional userId; - - private final Optional userName; - - private final Optional audience; - - private final Optional scope; - - private final Optional strategy; - - private final Optional strategyType; - - private final Optional logId; - - private final Optional isMobile; - - private final Optional> details; - - private final Optional userAgent; - - private final Optional securityContext; - - private final Optional locationInfo; - - private final Map additionalProperties; - - private Log( - Optional date, - Optional type, - OptionalNullable description, - Optional connection, - Optional connectionId, - Optional clientId, - Optional clientName, - Optional ip, - Optional hostname, - Optional userId, - Optional userName, - Optional audience, - Optional scope, - Optional strategy, - Optional strategyType, - Optional logId, - Optional isMobile, - Optional> details, - Optional userAgent, - Optional securityContext, - Optional locationInfo, - Map additionalProperties) { - this.date = date; - this.type = type; - this.description = description; - this.connection = connection; - this.connectionId = connectionId; - this.clientId = clientId; - this.clientName = clientName; - this.ip = ip; - this.hostname = hostname; - this.userId = userId; - this.userName = userName; - this.audience = audience; - this.scope = scope; - this.strategy = strategy; - this.strategyType = strategyType; - this.logId = logId; - this.isMobile = isMobile; - this.details = details; - this.userAgent = userAgent; - this.securityContext = securityContext; - this.locationInfo = locationInfo; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("date") - public Optional getDate() { - return date; - } - - /** - * @return Type of event. - */ - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return Description of this event. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("description") - public OptionalNullable getDescription() { - if (description == null) { - return OptionalNullable.absent(); - } - return description; - } - - /** - * @return Name of the connection the event relates to. - */ - @JsonProperty("connection") - public Optional getConnection() { - return connection; - } - - /** - * @return ID of the connection the event relates to. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - /** - * @return ID of the client (application). - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @return Name of the client (application). - */ - @JsonProperty("client_name") - public Optional getClientName() { - return clientName; - } - - /** - * @return IP address of the log event source. - */ - @JsonProperty("ip") - public Optional getIp() { - return ip; - } - - /** - * @return Hostname the event applies to. - */ - @JsonProperty("hostname") - public Optional getHostname() { - return hostname; - } - - /** - * @return ID of the user involved in the event. - */ - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - /** - * @return Name of the user involved in the event. - */ - @JsonProperty("user_name") - public Optional getUserName() { - return userName; - } - - /** - * @return API audience the event applies to. - */ - @JsonProperty("audience") - public Optional getAudience() { - return audience; - } - - /** - * @return Scope permissions applied to the event. - */ - @JsonProperty("scope") - public Optional getScope() { - return scope; - } - - /** - * @return Name of the strategy involved in the event. - */ - @JsonProperty("strategy") - public Optional getStrategy() { - return strategy; - } - - /** - * @return Type of strategy involved in the event. - */ - @JsonProperty("strategy_type") - public Optional getStrategyType() { - return strategyType; - } - - /** - * @return Unique ID of the event. - */ - @JsonProperty("log_id") - public Optional getLogId() { - return logId; - } - - /** - * @return Whether the client was a mobile device (true) or desktop/laptop/server (false). - */ - @JsonProperty("isMobile") - public Optional getIsMobile() { - return isMobile; - } - - @JsonProperty("details") - public Optional> getDetails() { - return details; - } - - /** - * @return User agent string from the client device that caused the event. - */ - @JsonProperty("user_agent") - public Optional getUserAgent() { - return userAgent; - } - - @JsonProperty("security_context") - public Optional getSecurityContext() { - return securityContext; - } - - @JsonProperty("location_info") - public Optional getLocationInfo() { - return locationInfo; - } - - @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 Log && equalTo((Log) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(Log other) { - return date.equals(other.date) - && type.equals(other.type) - && description.equals(other.description) - && connection.equals(other.connection) - && connectionId.equals(other.connectionId) - && clientId.equals(other.clientId) - && clientName.equals(other.clientName) - && ip.equals(other.ip) - && hostname.equals(other.hostname) - && userId.equals(other.userId) - && userName.equals(other.userName) - && audience.equals(other.audience) - && scope.equals(other.scope) - && strategy.equals(other.strategy) - && strategyType.equals(other.strategyType) - && logId.equals(other.logId) - && isMobile.equals(other.isMobile) - && details.equals(other.details) - && userAgent.equals(other.userAgent) - && securityContext.equals(other.securityContext) - && locationInfo.equals(other.locationInfo); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.date, - this.type, - this.description, - this.connection, - this.connectionId, - this.clientId, - this.clientName, - this.ip, - this.hostname, - this.userId, - this.userName, - this.audience, - this.scope, - this.strategy, - this.strategyType, - this.logId, - this.isMobile, - this.details, - this.userAgent, - this.securityContext, - this.locationInfo); - } - - @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 date = Optional.empty(); - - private Optional type = Optional.empty(); - - private OptionalNullable description = OptionalNullable.absent(); - - private Optional connection = Optional.empty(); - - private Optional connectionId = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional clientName = Optional.empty(); - - private Optional ip = Optional.empty(); - - private Optional hostname = Optional.empty(); - - private Optional userId = Optional.empty(); - - private Optional userName = Optional.empty(); - - private Optional audience = Optional.empty(); - - private Optional scope = Optional.empty(); - - private Optional strategy = Optional.empty(); - - private Optional strategyType = Optional.empty(); - - private Optional logId = Optional.empty(); - - private Optional isMobile = Optional.empty(); - - private Optional> details = Optional.empty(); - - private Optional userAgent = Optional.empty(); - - private Optional securityContext = Optional.empty(); - - private Optional locationInfo = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(Log other) { - date(other.getDate()); - type(other.getType()); - description(other.getDescription()); - connection(other.getConnection()); - connectionId(other.getConnectionId()); - clientId(other.getClientId()); - clientName(other.getClientName()); - ip(other.getIp()); - hostname(other.getHostname()); - userId(other.getUserId()); - userName(other.getUserName()); - audience(other.getAudience()); - scope(other.getScope()); - strategy(other.getStrategy()); - strategyType(other.getStrategyType()); - logId(other.getLogId()); - isMobile(other.getIsMobile()); - details(other.getDetails()); - userAgent(other.getUserAgent()); - securityContext(other.getSecurityContext()); - locationInfo(other.getLocationInfo()); - return this; - } - - @JsonSetter(value = "date", nulls = Nulls.SKIP) - public Builder date(Optional date) { - this.date = date; - return this; - } - - public Builder date(LogDate date) { - this.date = Optional.ofNullable(date); - return this; - } - - /** - *

Type of event.

- */ - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(String type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

Description of this event.

- */ - @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; - } - - /** - *

Name of the connection the event relates to.

- */ - @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; - } - - /** - *

ID of the connection the event relates to.

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - return this; - } - - /** - *

ID of the client (application).

- */ - @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; - } - - /** - *

Name of the client (application).

- */ - @JsonSetter(value = "client_name", nulls = Nulls.SKIP) - public Builder clientName(Optional clientName) { - this.clientName = clientName; - return this; - } - - public Builder clientName(String clientName) { - this.clientName = Optional.ofNullable(clientName); - return this; - } - - /** - *

IP address of the log event source.

- */ - @JsonSetter(value = "ip", nulls = Nulls.SKIP) - public Builder ip(Optional ip) { - this.ip = ip; - return this; - } - - public Builder ip(String ip) { - this.ip = Optional.ofNullable(ip); - return this; - } - - /** - *

Hostname the event applies to.

- */ - @JsonSetter(value = "hostname", nulls = Nulls.SKIP) - public Builder hostname(Optional hostname) { - this.hostname = hostname; - return this; - } - - public Builder hostname(String hostname) { - this.hostname = Optional.ofNullable(hostname); - return this; - } - - /** - *

ID of the user involved in the event.

- */ - @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; - } - - /** - *

Name of the user involved in the event.

- */ - @JsonSetter(value = "user_name", 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; - } - - /** - *

API audience the event applies to.

- */ - @JsonSetter(value = "audience", nulls = Nulls.SKIP) - public Builder audience(Optional audience) { - this.audience = audience; - return this; - } - - public Builder audience(String audience) { - this.audience = Optional.ofNullable(audience); - return this; - } - - /** - *

Scope permissions applied to the event.

- */ - @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; - } - - /** - *

Name of the strategy involved in the event.

- */ - @JsonSetter(value = "strategy", nulls = Nulls.SKIP) - public Builder strategy(Optional strategy) { - this.strategy = strategy; - return this; - } - - public Builder strategy(String strategy) { - this.strategy = Optional.ofNullable(strategy); - return this; - } - - /** - *

Type of strategy involved in the event.

- */ - @JsonSetter(value = "strategy_type", nulls = Nulls.SKIP) - public Builder strategyType(Optional strategyType) { - this.strategyType = strategyType; - return this; - } - - public Builder strategyType(String strategyType) { - this.strategyType = Optional.ofNullable(strategyType); - return this; - } - - /** - *

Unique ID of the event.

- */ - @JsonSetter(value = "log_id", nulls = Nulls.SKIP) - public Builder logId(Optional logId) { - this.logId = logId; - return this; - } - - public Builder logId(String logId) { - this.logId = Optional.ofNullable(logId); - return this; - } - - /** - *

Whether the client was a mobile device (true) or desktop/laptop/server (false).

- */ - @JsonSetter(value = "isMobile", nulls = Nulls.SKIP) - public Builder isMobile(Optional isMobile) { - this.isMobile = isMobile; - return this; - } - - public Builder isMobile(Boolean isMobile) { - this.isMobile = Optional.ofNullable(isMobile); - return this; - } - - @JsonSetter(value = "details", nulls = Nulls.SKIP) - public Builder details(Optional> details) { - this.details = details; - return this; - } - - public Builder details(Map details) { - this.details = Optional.ofNullable(details); - return this; - } - - /** - *

User agent string from the client device that caused the event.

- */ - @JsonSetter(value = "user_agent", nulls = Nulls.SKIP) - public Builder userAgent(Optional userAgent) { - this.userAgent = userAgent; - return this; - } - - public Builder userAgent(String userAgent) { - this.userAgent = Optional.ofNullable(userAgent); - return this; - } - - @JsonSetter(value = "security_context", nulls = Nulls.SKIP) - public Builder securityContext(Optional securityContext) { - this.securityContext = securityContext; - return this; - } - - public Builder securityContext(LogSecurityContext securityContext) { - this.securityContext = Optional.ofNullable(securityContext); - return this; - } - - @JsonSetter(value = "location_info", nulls = Nulls.SKIP) - public Builder locationInfo(Optional locationInfo) { - this.locationInfo = locationInfo; - return this; - } - - public Builder locationInfo(LogLocationInfo locationInfo) { - this.locationInfo = Optional.ofNullable(locationInfo); - return this; - } - - public Log build() { - return new Log( - date, - type, - description, - connection, - connectionId, - clientId, - clientName, - ip, - hostname, - userId, - userName, - audience, - scope, - strategy, - strategyType, - logId, - isMobile, - details, - userAgent, - securityContext, - locationInfo, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogDate.java b/src/main/java/com/auth0/client/mgmt/types/LogDate.java deleted file mode 100644 index 5dca4f02f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogDate.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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.Map; -import java.util.Objects; - -@JsonDeserialize(using = LogDate.Deserializer.class) -public final class LogDate { - private final Object value; - - private final int type; - - private LogDate(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((Map) 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 LogDate && equalTo((LogDate) other); - } - - private boolean equalTo(LogDate 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 LogDate of(String value) { - return new LogDate(value, 0); - } - - public static LogDate of(Map value) { - return new LogDate(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(Map value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(LogDate.class); - } - - @java.lang.Override - public LogDate deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.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/LogLocationInfo.java b/src/main/java/com/auth0/client/mgmt/types/LogLocationInfo.java deleted file mode 100644 index 06eb8de09..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogLocationInfo.java +++ /dev/null @@ -1,330 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LogLocationInfo.Builder.class) -public final class LogLocationInfo { - private final Optional countryCode; - - private final Optional countryCode3; - - private final Optional countryName; - - private final Optional cityName; - - private final Optional latitude; - - private final Optional longitude; - - private final Optional timeZone; - - private final Optional continentCode; - - private final Map additionalProperties; - - private LogLocationInfo( - Optional countryCode, - Optional countryCode3, - Optional countryName, - Optional cityName, - Optional latitude, - Optional longitude, - Optional timeZone, - Optional continentCode, - Map additionalProperties) { - this.countryCode = countryCode; - this.countryCode3 = countryCode3; - this.countryName = countryName; - this.cityName = cityName; - this.latitude = latitude; - this.longitude = longitude; - this.timeZone = timeZone; - this.continentCode = continentCode; - this.additionalProperties = additionalProperties; - } - - /** - * @return Two-letter <a href="https://www.iso.org/iso-3166-country-codes.html">Alpha-2 ISO 3166-1</a> country code. - */ - @JsonProperty("country_code") - public Optional getCountryCode() { - return countryCode; - } - - /** - * @return Three-letter <a href="https://www.iso.org/iso-3166-country-codes.html">Alpha-3 ISO 3166-1</a> country code. - */ - @JsonProperty("country_code3") - public Optional getCountryCode3() { - return countryCode3; - } - - /** - * @return Full country name in English. - */ - @JsonProperty("country_name") - public Optional getCountryName() { - return countryName; - } - - /** - * @return Full city name in English. - */ - @JsonProperty("city_name") - public Optional getCityName() { - return cityName; - } - - /** - * @return Global latitude (horizontal) position. - */ - @JsonProperty("latitude") - public Optional getLatitude() { - return latitude; - } - - /** - * @return Global longitude (vertical) position. - */ - @JsonProperty("longitude") - public Optional getLongitude() { - return longitude; - } - - /** - * @return Time zone name as found in the <a href="https://www.iana.org/time-zones">tz database</a>. - */ - @JsonProperty("time_zone") - public Optional getTimeZone() { - return timeZone; - } - - /** - * @return Continent the country is located within. Can be AF (Africa), AN (Antarctica), AS (Asia), EU (Europe), NA (North America), OC (Oceania) or SA (South America). - */ - @JsonProperty("continent_code") - public Optional getContinentCode() { - return continentCode; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogLocationInfo && equalTo((LogLocationInfo) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogLocationInfo other) { - return countryCode.equals(other.countryCode) - && countryCode3.equals(other.countryCode3) - && countryName.equals(other.countryName) - && cityName.equals(other.cityName) - && latitude.equals(other.latitude) - && longitude.equals(other.longitude) - && timeZone.equals(other.timeZone) - && continentCode.equals(other.continentCode); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.countryCode, - this.countryCode3, - this.countryName, - this.cityName, - this.latitude, - this.longitude, - this.timeZone, - this.continentCode); - } - - @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 countryCode = Optional.empty(); - - private Optional countryCode3 = Optional.empty(); - - private Optional countryName = Optional.empty(); - - private Optional cityName = Optional.empty(); - - private Optional latitude = Optional.empty(); - - private Optional longitude = Optional.empty(); - - private Optional timeZone = Optional.empty(); - - private Optional continentCode = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(LogLocationInfo other) { - countryCode(other.getCountryCode()); - countryCode3(other.getCountryCode3()); - countryName(other.getCountryName()); - cityName(other.getCityName()); - latitude(other.getLatitude()); - longitude(other.getLongitude()); - timeZone(other.getTimeZone()); - continentCode(other.getContinentCode()); - return this; - } - - /** - *

Two-letter <a href="https://www.iso.org/iso-3166-country-codes.html">Alpha-2 ISO 3166-1</a> country code.

- */ - @JsonSetter(value = "country_code", nulls = Nulls.SKIP) - public Builder countryCode(Optional countryCode) { - this.countryCode = countryCode; - return this; - } - - public Builder countryCode(String countryCode) { - this.countryCode = Optional.ofNullable(countryCode); - return this; - } - - /** - *

Three-letter <a href="https://www.iso.org/iso-3166-country-codes.html">Alpha-3 ISO 3166-1</a> country code.

- */ - @JsonSetter(value = "country_code3", nulls = Nulls.SKIP) - public Builder countryCode3(Optional countryCode3) { - this.countryCode3 = countryCode3; - return this; - } - - public Builder countryCode3(String countryCode3) { - this.countryCode3 = Optional.ofNullable(countryCode3); - return this; - } - - /** - *

Full country name in English.

- */ - @JsonSetter(value = "country_name", nulls = Nulls.SKIP) - public Builder countryName(Optional countryName) { - this.countryName = countryName; - return this; - } - - public Builder countryName(String countryName) { - this.countryName = Optional.ofNullable(countryName); - return this; - } - - /** - *

Full city name in English.

- */ - @JsonSetter(value = "city_name", nulls = Nulls.SKIP) - public Builder cityName(Optional cityName) { - this.cityName = cityName; - return this; - } - - public Builder cityName(String cityName) { - this.cityName = Optional.ofNullable(cityName); - return this; - } - - /** - *

Global latitude (horizontal) position.

- */ - @JsonSetter(value = "latitude", nulls = Nulls.SKIP) - public Builder latitude(Optional latitude) { - this.latitude = latitude; - return this; - } - - public Builder latitude(Double latitude) { - this.latitude = Optional.ofNullable(latitude); - return this; - } - - /** - *

Global longitude (vertical) position.

- */ - @JsonSetter(value = "longitude", nulls = Nulls.SKIP) - public Builder longitude(Optional longitude) { - this.longitude = longitude; - return this; - } - - public Builder longitude(Double longitude) { - this.longitude = Optional.ofNullable(longitude); - return this; - } - - /** - *

Time zone name as found in the <a href="https://www.iana.org/time-zones">tz database</a>.

- */ - @JsonSetter(value = "time_zone", nulls = Nulls.SKIP) - public Builder timeZone(Optional timeZone) { - this.timeZone = timeZone; - return this; - } - - public Builder timeZone(String timeZone) { - this.timeZone = Optional.ofNullable(timeZone); - return this; - } - - /** - *

Continent the country is located within. Can be AF (Africa), AN (Antarctica), AS (Asia), EU (Europe), NA (North America), OC (Oceania) or SA (South America).

- */ - @JsonSetter(value = "continent_code", nulls = Nulls.SKIP) - public Builder continentCode(Optional continentCode) { - this.continentCode = continentCode; - return this; - } - - public Builder continentCode(String continentCode) { - this.continentCode = Optional.ofNullable(continentCode); - return this; - } - - public LogLocationInfo build() { - return new LogLocationInfo( - countryCode, - countryCode3, - countryName, - cityName, - latitude, - longitude, - timeZone, - continentCode, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogSecurityContext.java b/src/main/java/com/auth0/client/mgmt/types/LogSecurityContext.java deleted file mode 100644 index d3e305a6b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogSecurityContext.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LogSecurityContext.Builder.class) -public final class LogSecurityContext { - private final Optional ja3; - - private final Optional ja4; - - private final Map additionalProperties; - - private LogSecurityContext(Optional ja3, Optional ja4, Map additionalProperties) { - this.ja3 = ja3; - this.ja4 = ja4; - this.additionalProperties = additionalProperties; - } - - /** - * @return JA3 fingerprint value. - */ - @JsonProperty("ja3") - public Optional getJa3() { - return ja3; - } - - /** - * @return JA4 fingerprint value. - */ - @JsonProperty("ja4") - public Optional getJa4() { - return ja4; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogSecurityContext && equalTo((LogSecurityContext) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogSecurityContext other) { - return ja3.equals(other.ja3) && ja4.equals(other.ja4); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.ja3, this.ja4); - } - - @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 ja3 = Optional.empty(); - - private Optional ja4 = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(LogSecurityContext other) { - ja3(other.getJa3()); - ja4(other.getJa4()); - return this; - } - - /** - *

JA3 fingerprint value.

- */ - @JsonSetter(value = "ja3", nulls = Nulls.SKIP) - public Builder ja3(Optional ja3) { - this.ja3 = ja3; - return this; - } - - public Builder ja3(String ja3) { - this.ja3 = Optional.ofNullable(ja3); - return this; - } - - /** - *

JA4 fingerprint value.

- */ - @JsonSetter(value = "ja4", nulls = Nulls.SKIP) - public Builder ja4(Optional ja4) { - this.ja4 = ja4; - return this; - } - - public Builder ja4(String ja4) { - this.ja4 = Optional.ofNullable(ja4); - return this; - } - - public LogSecurityContext build() { - return new LogSecurityContext(ja3, ja4, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamDatadogEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamDatadogEnum.java deleted file mode 100644 index 02c5cc27a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamDatadogEnum.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamDatadogEnum { - public static final LogStreamDatadogEnum DATADOG = new LogStreamDatadogEnum(Value.DATADOG, "datadog"); - - private final Value value; - - private final String string; - - LogStreamDatadogEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamDatadogEnum && this.string.equals(((LogStreamDatadogEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DATADOG: - return visitor.visitDatadog(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamDatadogEnum valueOf(String value) { - switch (value) { - case "datadog": - return DATADOG; - default: - return new LogStreamDatadogEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - DATADOG, - - UNKNOWN - } - - public interface Visitor { - T visitDatadog(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamDatadogRegionEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamDatadogRegionEnum.java deleted file mode 100644 index 73427a011..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamDatadogRegionEnum.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamDatadogRegionEnum { - public static final LogStreamDatadogRegionEnum US3 = new LogStreamDatadogRegionEnum(Value.US3, "us3"); - - public static final LogStreamDatadogRegionEnum US = new LogStreamDatadogRegionEnum(Value.US, "us"); - - public static final LogStreamDatadogRegionEnum EU = new LogStreamDatadogRegionEnum(Value.EU, "eu"); - - public static final LogStreamDatadogRegionEnum US5 = new LogStreamDatadogRegionEnum(Value.US5, "us5"); - - private final Value value; - - private final String string; - - LogStreamDatadogRegionEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamDatadogRegionEnum - && this.string.equals(((LogStreamDatadogRegionEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case US3: - return visitor.visitUs3(); - case US: - return visitor.visitUs(); - case EU: - return visitor.visitEu(); - case US5: - return visitor.visitUs5(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamDatadogRegionEnum valueOf(String value) { - switch (value) { - case "us3": - return US3; - case "us": - return US; - case "eu": - return EU; - case "us5": - return US5; - default: - return new LogStreamDatadogRegionEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - US, - - EU, - - US3, - - US5, - - UNKNOWN - } - - public interface Visitor { - T visitUs(); - - T visitEu(); - - T visitUs3(); - - T visitUs5(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamDatadogResponseSchema.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamDatadogResponseSchema.java deleted file mode 100644 index 4cd6f74d0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamDatadogResponseSchema.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.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LogStreamDatadogResponseSchema.Builder.class) -public final class LogStreamDatadogResponseSchema { - private final Optional id; - - private final Optional name; - - private final Optional status; - - private final Optional type; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final Optional sink; - - private final Map additionalProperties; - - private LogStreamDatadogResponseSchema( - Optional id, - Optional name, - Optional status, - Optional type, - Optional isPriority, - Optional> filters, - Optional piiConfig, - Optional sink, - Map additionalProperties) { - this.id = id; - this.name = name; - this.status = status; - this.type = type; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the log stream - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public Optional getSink() { - return sink; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamDatadogResponseSchema && equalTo((LogStreamDatadogResponseSchema) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamDatadogResponseSchema other) { - return id.equals(other.id) - && name.equals(other.name) - && status.equals(other.status) - && type.equals(other.type) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.name, this.status, this.type, this.isPriority, this.filters, this.piiConfig, this.sink); - } - - @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 status = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional sink = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(LogStreamDatadogResponseSchema other) { - id(other.getId()); - name(other.getName()); - status(other.getStatus()); - type(other.getType()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - return this; - } - - /** - *

The id of the log stream

- */ - @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; - } - - /** - *

log stream name

- */ - @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 = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(LogStreamStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(LogStreamDatadogEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public Builder isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - public Builder isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public Builder filters(Optional> filters) { - this.filters = filters; - return this; - } - - public Builder filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public Builder piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - public Builder piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @JsonSetter(value = "sink", nulls = Nulls.SKIP) - public Builder sink(Optional sink) { - this.sink = sink; - return this; - } - - public Builder sink(LogStreamDatadogSink sink) { - this.sink = Optional.ofNullable(sink); - return this; - } - - public LogStreamDatadogResponseSchema build() { - return new LogStreamDatadogResponseSchema( - id, name, status, type, isPriority, filters, piiConfig, sink, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamDatadogSink.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamDatadogSink.java deleted file mode 100644 index 98ca3b2d4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamDatadogSink.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = LogStreamDatadogSink.Builder.class) -public final class LogStreamDatadogSink { - private final String datadogApiKey; - - private final LogStreamDatadogRegionEnum datadogRegion; - - private final Map additionalProperties; - - private LogStreamDatadogSink( - String datadogApiKey, LogStreamDatadogRegionEnum datadogRegion, Map additionalProperties) { - this.datadogApiKey = datadogApiKey; - this.datadogRegion = datadogRegion; - this.additionalProperties = additionalProperties; - } - - /** - * @return Datadog API Key - */ - @JsonProperty("datadogApiKey") - public String getDatadogApiKey() { - return datadogApiKey; - } - - @JsonProperty("datadogRegion") - public LogStreamDatadogRegionEnum getDatadogRegion() { - return datadogRegion; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamDatadogSink && equalTo((LogStreamDatadogSink) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamDatadogSink other) { - return datadogApiKey.equals(other.datadogApiKey) && datadogRegion.equals(other.datadogRegion); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.datadogApiKey, this.datadogRegion); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static DatadogApiKeyStage builder() { - return new Builder(); - } - - public interface DatadogApiKeyStage { - /** - *

Datadog API Key

- */ - DatadogRegionStage datadogApiKey(@NotNull String datadogApiKey); - - Builder from(LogStreamDatadogSink other); - } - - public interface DatadogRegionStage { - _FinalStage datadogRegion(@NotNull LogStreamDatadogRegionEnum datadogRegion); - } - - public interface _FinalStage { - LogStreamDatadogSink build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements DatadogApiKeyStage, DatadogRegionStage, _FinalStage { - private String datadogApiKey; - - private LogStreamDatadogRegionEnum datadogRegion; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(LogStreamDatadogSink other) { - datadogApiKey(other.getDatadogApiKey()); - datadogRegion(other.getDatadogRegion()); - return this; - } - - /** - *

Datadog API Key

- *

Datadog API Key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("datadogApiKey") - public DatadogRegionStage datadogApiKey(@NotNull String datadogApiKey) { - this.datadogApiKey = Objects.requireNonNull(datadogApiKey, "datadogApiKey must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("datadogRegion") - public _FinalStage datadogRegion(@NotNull LogStreamDatadogRegionEnum datadogRegion) { - this.datadogRegion = Objects.requireNonNull(datadogRegion, "datadogRegion must not be null"); - return this; - } - - @java.lang.Override - public LogStreamDatadogSink build() { - return new LogStreamDatadogSink(datadogApiKey, datadogRegion, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeEnum.java deleted file mode 100644 index 55e4916c6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamEventBridgeEnum { - public static final LogStreamEventBridgeEnum EVENTBRIDGE = - new LogStreamEventBridgeEnum(Value.EVENTBRIDGE, "eventbridge"); - - private final Value value; - - private final String string; - - LogStreamEventBridgeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamEventBridgeEnum - && this.string.equals(((LogStreamEventBridgeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EVENTBRIDGE: - return visitor.visitEventbridge(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamEventBridgeEnum valueOf(String value) { - switch (value) { - case "eventbridge": - return EVENTBRIDGE; - default: - return new LogStreamEventBridgeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - EVENTBRIDGE, - - UNKNOWN - } - - public interface Visitor { - T visitEventbridge(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeResponseSchema.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeResponseSchema.java deleted file mode 100644 index 6a4554315..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeResponseSchema.java +++ /dev/null @@ -1,293 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LogStreamEventBridgeResponseSchema.Builder.class) -public final class LogStreamEventBridgeResponseSchema { - private final Optional id; - - private final Optional name; - - private final Optional status; - - private final Optional type; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final Optional sink; - - private final Map additionalProperties; - - private LogStreamEventBridgeResponseSchema( - Optional id, - Optional name, - Optional status, - Optional type, - Optional isPriority, - Optional> filters, - Optional piiConfig, - Optional sink, - Map additionalProperties) { - this.id = id; - this.name = name; - this.status = status; - this.type = type; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the log stream - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public Optional getSink() { - return sink; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamEventBridgeResponseSchema - && equalTo((LogStreamEventBridgeResponseSchema) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamEventBridgeResponseSchema other) { - return id.equals(other.id) - && name.equals(other.name) - && status.equals(other.status) - && type.equals(other.type) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.name, this.status, this.type, this.isPriority, this.filters, this.piiConfig, this.sink); - } - - @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 status = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional sink = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(LogStreamEventBridgeResponseSchema other) { - id(other.getId()); - name(other.getName()); - status(other.getStatus()); - type(other.getType()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - return this; - } - - /** - *

The id of the log stream

- */ - @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; - } - - /** - *

log stream name

- */ - @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 = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(LogStreamStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(LogStreamEventBridgeEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public Builder isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - public Builder isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public Builder filters(Optional> filters) { - this.filters = filters; - return this; - } - - public Builder filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public Builder piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - public Builder piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @JsonSetter(value = "sink", nulls = Nulls.SKIP) - public Builder sink(Optional sink) { - this.sink = sink; - return this; - } - - public Builder sink(LogStreamEventBridgeSink sink) { - this.sink = Optional.ofNullable(sink); - return this; - } - - public LogStreamEventBridgeResponseSchema build() { - return new LogStreamEventBridgeResponseSchema( - id, name, status, type, isPriority, filters, piiConfig, sink, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeSink.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeSink.java deleted file mode 100644 index 30d1188dc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeSink.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LogStreamEventBridgeSink.Builder.class) -public final class LogStreamEventBridgeSink { - private final String awsAccountId; - - private final LogStreamEventBridgeSinkRegionEnum awsRegion; - - private final Optional awsPartnerEventSource; - - private final Map additionalProperties; - - private LogStreamEventBridgeSink( - String awsAccountId, - LogStreamEventBridgeSinkRegionEnum awsRegion, - Optional awsPartnerEventSource, - Map additionalProperties) { - this.awsAccountId = awsAccountId; - this.awsRegion = awsRegion; - this.awsPartnerEventSource = awsPartnerEventSource; - this.additionalProperties = additionalProperties; - } - - /** - * @return AWS account ID - */ - @JsonProperty("awsAccountId") - public String getAwsAccountId() { - return awsAccountId; - } - - @JsonProperty("awsRegion") - public LogStreamEventBridgeSinkRegionEnum getAwsRegion() { - return awsRegion; - } - - /** - * @return AWS EventBridge partner event source - */ - @JsonProperty("awsPartnerEventSource") - public Optional getAwsPartnerEventSource() { - return awsPartnerEventSource; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamEventBridgeSink && equalTo((LogStreamEventBridgeSink) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamEventBridgeSink other) { - return awsAccountId.equals(other.awsAccountId) - && awsRegion.equals(other.awsRegion) - && awsPartnerEventSource.equals(other.awsPartnerEventSource); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.awsAccountId, this.awsRegion, this.awsPartnerEventSource); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static AwsAccountIdStage builder() { - return new Builder(); - } - - public interface AwsAccountIdStage { - /** - *

AWS account ID

- */ - AwsRegionStage awsAccountId(@NotNull String awsAccountId); - - Builder from(LogStreamEventBridgeSink other); - } - - public interface AwsRegionStage { - _FinalStage awsRegion(@NotNull LogStreamEventBridgeSinkRegionEnum awsRegion); - } - - public interface _FinalStage { - LogStreamEventBridgeSink build(); - - /** - *

AWS EventBridge partner event source

- */ - _FinalStage awsPartnerEventSource(Optional awsPartnerEventSource); - - _FinalStage awsPartnerEventSource(String awsPartnerEventSource); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements AwsAccountIdStage, AwsRegionStage, _FinalStage { - private String awsAccountId; - - private LogStreamEventBridgeSinkRegionEnum awsRegion; - - private Optional awsPartnerEventSource = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(LogStreamEventBridgeSink other) { - awsAccountId(other.getAwsAccountId()); - awsRegion(other.getAwsRegion()); - awsPartnerEventSource(other.getAwsPartnerEventSource()); - return this; - } - - /** - *

AWS account ID

- *

AWS account ID

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("awsAccountId") - public AwsRegionStage awsAccountId(@NotNull String awsAccountId) { - this.awsAccountId = Objects.requireNonNull(awsAccountId, "awsAccountId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("awsRegion") - public _FinalStage awsRegion(@NotNull LogStreamEventBridgeSinkRegionEnum awsRegion) { - this.awsRegion = Objects.requireNonNull(awsRegion, "awsRegion must not be null"); - return this; - } - - /** - *

AWS EventBridge partner event source

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage awsPartnerEventSource(String awsPartnerEventSource) { - this.awsPartnerEventSource = Optional.ofNullable(awsPartnerEventSource); - return this; - } - - /** - *

AWS EventBridge partner event source

- */ - @java.lang.Override - @JsonSetter(value = "awsPartnerEventSource", nulls = Nulls.SKIP) - public _FinalStage awsPartnerEventSource(Optional awsPartnerEventSource) { - this.awsPartnerEventSource = awsPartnerEventSource; - return this; - } - - @java.lang.Override - public LogStreamEventBridgeSink build() { - return new LogStreamEventBridgeSink(awsAccountId, awsRegion, awsPartnerEventSource, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeSinkRegionEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeSinkRegionEnum.java deleted file mode 100644 index c2d83884c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventBridgeSinkRegionEnum.java +++ /dev/null @@ -1,460 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamEventBridgeSinkRegionEnum { - public static final LogStreamEventBridgeSinkRegionEnum EU_SOUTH1 = - new LogStreamEventBridgeSinkRegionEnum(Value.EU_SOUTH1, "eu-south-1"); - - public static final LogStreamEventBridgeSinkRegionEnum AP_NORTHEAST2 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_NORTHEAST2, "ap-northeast-2"); - - public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST1 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST1, "ap-southeast-1"); - - public static final LogStreamEventBridgeSinkRegionEnum EU_SOUTH2 = - new LogStreamEventBridgeSinkRegionEnum(Value.EU_SOUTH2, "eu-south-2"); - - public static final LogStreamEventBridgeSinkRegionEnum AP_NORTHEAST3 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_NORTHEAST3, "ap-northeast-3"); - - public static final LogStreamEventBridgeSinkRegionEnum AP_NORTHEAST1 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_NORTHEAST1, "ap-northeast-1"); - - public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTH1 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTH1, "ap-south-1"); - - public static final LogStreamEventBridgeSinkRegionEnum CA_CENTRAL1 = - new LogStreamEventBridgeSinkRegionEnum(Value.CA_CENTRAL1, "ca-central-1"); - - public static final LogStreamEventBridgeSinkRegionEnum EU_NORTH1 = - new LogStreamEventBridgeSinkRegionEnum(Value.EU_NORTH1, "eu-north-1"); - - public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTH2 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTH2, "ap-south-2"); - - public static final LogStreamEventBridgeSinkRegionEnum US_GOV_WEST1 = - new LogStreamEventBridgeSinkRegionEnum(Value.US_GOV_WEST1, "us-gov-west-1"); - - public static final LogStreamEventBridgeSinkRegionEnum CA_WEST1 = - new LogStreamEventBridgeSinkRegionEnum(Value.CA_WEST1, "ca-west-1"); - - public static final LogStreamEventBridgeSinkRegionEnum ME_SOUTH1 = - new LogStreamEventBridgeSinkRegionEnum(Value.ME_SOUTH1, "me-south-1"); - - public static final LogStreamEventBridgeSinkRegionEnum MX_CENTRAL1 = - new LogStreamEventBridgeSinkRegionEnum(Value.MX_CENTRAL1, "mx-central-1"); - - public static final LogStreamEventBridgeSinkRegionEnum US_EAST1 = - new LogStreamEventBridgeSinkRegionEnum(Value.US_EAST1, "us-east-1"); - - public static final LogStreamEventBridgeSinkRegionEnum SA_EAST1 = - new LogStreamEventBridgeSinkRegionEnum(Value.SA_EAST1, "sa-east-1"); - - public static final LogStreamEventBridgeSinkRegionEnum AP_EAST2 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_EAST2, "ap-east-2"); - - public static final LogStreamEventBridgeSinkRegionEnum US_GOV_EAST1 = - new LogStreamEventBridgeSinkRegionEnum(Value.US_GOV_EAST1, "us-gov-east-1"); - - public static final LogStreamEventBridgeSinkRegionEnum US_EAST2 = - new LogStreamEventBridgeSinkRegionEnum(Value.US_EAST2, "us-east-2"); - - public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST5 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST5, "ap-southeast-5"); - - public static final LogStreamEventBridgeSinkRegionEnum AP_EAST1 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_EAST1, "ap-east-1"); - - public static final LogStreamEventBridgeSinkRegionEnum ME_CENTRAL1 = - new LogStreamEventBridgeSinkRegionEnum(Value.ME_CENTRAL1, "me-central-1"); - - public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST7 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST7, "ap-southeast-7"); - - public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST6 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST6, "ap-southeast-6"); - - public static final LogStreamEventBridgeSinkRegionEnum US_WEST2 = - new LogStreamEventBridgeSinkRegionEnum(Value.US_WEST2, "us-west-2"); - - public static final LogStreamEventBridgeSinkRegionEnum EU_WEST3 = - new LogStreamEventBridgeSinkRegionEnum(Value.EU_WEST3, "eu-west-3"); - - public static final LogStreamEventBridgeSinkRegionEnum AF_SOUTH1 = - new LogStreamEventBridgeSinkRegionEnum(Value.AF_SOUTH1, "af-south-1"); - - public static final LogStreamEventBridgeSinkRegionEnum EU_WEST2 = - new LogStreamEventBridgeSinkRegionEnum(Value.EU_WEST2, "eu-west-2"); - - public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST2 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST2, "ap-southeast-2"); - - public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST4 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST4, "ap-southeast-4"); - - public static final LogStreamEventBridgeSinkRegionEnum EU_CENTRAL1 = - new LogStreamEventBridgeSinkRegionEnum(Value.EU_CENTRAL1, "eu-central-1"); - - public static final LogStreamEventBridgeSinkRegionEnum IL_CENTRAL1 = - new LogStreamEventBridgeSinkRegionEnum(Value.IL_CENTRAL1, "il-central-1"); - - public static final LogStreamEventBridgeSinkRegionEnum US_WEST1 = - new LogStreamEventBridgeSinkRegionEnum(Value.US_WEST1, "us-west-1"); - - public static final LogStreamEventBridgeSinkRegionEnum AP_SOUTHEAST3 = - new LogStreamEventBridgeSinkRegionEnum(Value.AP_SOUTHEAST3, "ap-southeast-3"); - - public static final LogStreamEventBridgeSinkRegionEnum EU_CENTRAL2 = - new LogStreamEventBridgeSinkRegionEnum(Value.EU_CENTRAL2, "eu-central-2"); - - public static final LogStreamEventBridgeSinkRegionEnum EU_WEST1 = - new LogStreamEventBridgeSinkRegionEnum(Value.EU_WEST1, "eu-west-1"); - - private final Value value; - - private final String string; - - LogStreamEventBridgeSinkRegionEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamEventBridgeSinkRegionEnum - && this.string.equals(((LogStreamEventBridgeSinkRegionEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EU_SOUTH1: - return visitor.visitEuSouth1(); - case AP_NORTHEAST2: - return visitor.visitApNortheast2(); - case AP_SOUTHEAST1: - return visitor.visitApSoutheast1(); - case EU_SOUTH2: - return visitor.visitEuSouth2(); - case AP_NORTHEAST3: - return visitor.visitApNortheast3(); - case AP_NORTHEAST1: - return visitor.visitApNortheast1(); - case AP_SOUTH1: - return visitor.visitApSouth1(); - case CA_CENTRAL1: - return visitor.visitCaCentral1(); - case EU_NORTH1: - return visitor.visitEuNorth1(); - case AP_SOUTH2: - return visitor.visitApSouth2(); - case US_GOV_WEST1: - return visitor.visitUsGovWest1(); - case CA_WEST1: - return visitor.visitCaWest1(); - case ME_SOUTH1: - return visitor.visitMeSouth1(); - case MX_CENTRAL1: - return visitor.visitMxCentral1(); - case US_EAST1: - return visitor.visitUsEast1(); - case SA_EAST1: - return visitor.visitSaEast1(); - case AP_EAST2: - return visitor.visitApEast2(); - case US_GOV_EAST1: - return visitor.visitUsGovEast1(); - case US_EAST2: - return visitor.visitUsEast2(); - case AP_SOUTHEAST5: - return visitor.visitApSoutheast5(); - case AP_EAST1: - return visitor.visitApEast1(); - case ME_CENTRAL1: - return visitor.visitMeCentral1(); - case AP_SOUTHEAST7: - return visitor.visitApSoutheast7(); - case AP_SOUTHEAST6: - return visitor.visitApSoutheast6(); - case US_WEST2: - return visitor.visitUsWest2(); - case EU_WEST3: - return visitor.visitEuWest3(); - case AF_SOUTH1: - return visitor.visitAfSouth1(); - case EU_WEST2: - return visitor.visitEuWest2(); - case AP_SOUTHEAST2: - return visitor.visitApSoutheast2(); - case AP_SOUTHEAST4: - return visitor.visitApSoutheast4(); - case EU_CENTRAL1: - return visitor.visitEuCentral1(); - case IL_CENTRAL1: - return visitor.visitIlCentral1(); - case US_WEST1: - return visitor.visitUsWest1(); - case AP_SOUTHEAST3: - return visitor.visitApSoutheast3(); - case EU_CENTRAL2: - return visitor.visitEuCentral2(); - case EU_WEST1: - return visitor.visitEuWest1(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamEventBridgeSinkRegionEnum valueOf(String value) { - switch (value) { - case "eu-south-1": - return EU_SOUTH1; - case "ap-northeast-2": - return AP_NORTHEAST2; - case "ap-southeast-1": - return AP_SOUTHEAST1; - case "eu-south-2": - return EU_SOUTH2; - case "ap-northeast-3": - return AP_NORTHEAST3; - case "ap-northeast-1": - return AP_NORTHEAST1; - case "ap-south-1": - return AP_SOUTH1; - case "ca-central-1": - return CA_CENTRAL1; - case "eu-north-1": - return EU_NORTH1; - case "ap-south-2": - return AP_SOUTH2; - case "us-gov-west-1": - return US_GOV_WEST1; - case "ca-west-1": - return CA_WEST1; - case "me-south-1": - return ME_SOUTH1; - case "mx-central-1": - return MX_CENTRAL1; - case "us-east-1": - return US_EAST1; - case "sa-east-1": - return SA_EAST1; - case "ap-east-2": - return AP_EAST2; - case "us-gov-east-1": - return US_GOV_EAST1; - case "us-east-2": - return US_EAST2; - case "ap-southeast-5": - return AP_SOUTHEAST5; - case "ap-east-1": - return AP_EAST1; - case "me-central-1": - return ME_CENTRAL1; - case "ap-southeast-7": - return AP_SOUTHEAST7; - case "ap-southeast-6": - return AP_SOUTHEAST6; - case "us-west-2": - return US_WEST2; - case "eu-west-3": - return EU_WEST3; - case "af-south-1": - return AF_SOUTH1; - case "eu-west-2": - return EU_WEST2; - case "ap-southeast-2": - return AP_SOUTHEAST2; - case "ap-southeast-4": - return AP_SOUTHEAST4; - case "eu-central-1": - return EU_CENTRAL1; - case "il-central-1": - return IL_CENTRAL1; - case "us-west-1": - return US_WEST1; - case "ap-southeast-3": - return AP_SOUTHEAST3; - case "eu-central-2": - return EU_CENTRAL2; - case "eu-west-1": - return EU_WEST1; - default: - return new LogStreamEventBridgeSinkRegionEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AF_SOUTH1, - - AP_EAST1, - - AP_EAST2, - - AP_NORTHEAST1, - - AP_NORTHEAST2, - - AP_NORTHEAST3, - - AP_SOUTH1, - - AP_SOUTH2, - - AP_SOUTHEAST1, - - AP_SOUTHEAST2, - - AP_SOUTHEAST3, - - AP_SOUTHEAST4, - - AP_SOUTHEAST5, - - AP_SOUTHEAST6, - - AP_SOUTHEAST7, - - CA_CENTRAL1, - - CA_WEST1, - - EU_CENTRAL1, - - EU_CENTRAL2, - - EU_NORTH1, - - EU_SOUTH1, - - EU_SOUTH2, - - EU_WEST1, - - EU_WEST2, - - EU_WEST3, - - IL_CENTRAL1, - - ME_CENTRAL1, - - ME_SOUTH1, - - MX_CENTRAL1, - - SA_EAST1, - - US_GOV_EAST1, - - US_GOV_WEST1, - - US_EAST1, - - US_EAST2, - - US_WEST1, - - US_WEST2, - - UNKNOWN - } - - public interface Visitor { - T visitAfSouth1(); - - T visitApEast1(); - - T visitApEast2(); - - T visitApNortheast1(); - - T visitApNortheast2(); - - T visitApNortheast3(); - - T visitApSouth1(); - - T visitApSouth2(); - - T visitApSoutheast1(); - - T visitApSoutheast2(); - - T visitApSoutheast3(); - - T visitApSoutheast4(); - - T visitApSoutheast5(); - - T visitApSoutheast6(); - - T visitApSoutheast7(); - - T visitCaCentral1(); - - T visitCaWest1(); - - T visitEuCentral1(); - - T visitEuCentral2(); - - T visitEuNorth1(); - - T visitEuSouth1(); - - T visitEuSouth2(); - - T visitEuWest1(); - - T visitEuWest2(); - - T visitEuWest3(); - - T visitIlCentral1(); - - T visitMeCentral1(); - - T visitMeSouth1(); - - T visitMxCentral1(); - - T visitSaEast1(); - - T visitUsGovEast1(); - - T visitUsGovWest1(); - - T visitUsEast1(); - - T visitUsEast2(); - - T visitUsWest1(); - - T visitUsWest2(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridEnum.java deleted file mode 100644 index 720a01183..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridEnum.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamEventGridEnum { - public static final LogStreamEventGridEnum EVENTGRID = new LogStreamEventGridEnum(Value.EVENTGRID, "eventgrid"); - - private final Value value; - - private final String string; - - LogStreamEventGridEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamEventGridEnum - && this.string.equals(((LogStreamEventGridEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EVENTGRID: - return visitor.visitEventgrid(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamEventGridEnum valueOf(String value) { - switch (value) { - case "eventgrid": - return EVENTGRID; - default: - return new LogStreamEventGridEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - EVENTGRID, - - UNKNOWN - } - - public interface Visitor { - T visitEventgrid(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridRegionEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridRegionEnum.java deleted file mode 100644 index daae8ad22..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridRegionEnum.java +++ /dev/null @@ -1,435 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamEventGridRegionEnum { - public static final LogStreamEventGridRegionEnum GERMANYWESTCENTRAL = - new LogStreamEventGridRegionEnum(Value.GERMANYWESTCENTRAL, "germanywestcentral"); - - public static final LogStreamEventGridRegionEnum WESTINDIA = - new LogStreamEventGridRegionEnum(Value.WESTINDIA, "westindia"); - - public static final LogStreamEventGridRegionEnum SOUTHCENTRALUS = - new LogStreamEventGridRegionEnum(Value.SOUTHCENTRALUS, "southcentralus"); - - public static final LogStreamEventGridRegionEnum JAPANEAST = - new LogStreamEventGridRegionEnum(Value.JAPANEAST, "japaneast"); - - public static final LogStreamEventGridRegionEnum KOREACENTRAL = - new LogStreamEventGridRegionEnum(Value.KOREACENTRAL, "koreacentral"); - - public static final LogStreamEventGridRegionEnum AUSTRALIASOUTHEAST = - new LogStreamEventGridRegionEnum(Value.AUSTRALIASOUTHEAST, "australiasoutheast"); - - public static final LogStreamEventGridRegionEnum SOUTHAFRICANORTH = - new LogStreamEventGridRegionEnum(Value.SOUTHAFRICANORTH, "southafricanorth"); - - public static final LogStreamEventGridRegionEnum CANADACENTRAL = - new LogStreamEventGridRegionEnum(Value.CANADACENTRAL, "canadacentral"); - - public static final LogStreamEventGridRegionEnum CANADAEAST = - new LogStreamEventGridRegionEnum(Value.CANADAEAST, "canadaeast"); - - public static final LogStreamEventGridRegionEnum SOUTHINDIA = - new LogStreamEventGridRegionEnum(Value.SOUTHINDIA, "southindia"); - - public static final LogStreamEventGridRegionEnum KOREASOUTH = - new LogStreamEventGridRegionEnum(Value.KOREASOUTH, "koreasouth"); - - public static final LogStreamEventGridRegionEnum BRAZILSOUTH = - new LogStreamEventGridRegionEnum(Value.BRAZILSOUTH, "brazilsouth"); - - public static final LogStreamEventGridRegionEnum CENTRALINDIA = - new LogStreamEventGridRegionEnum(Value.CENTRALINDIA, "centralindia"); - - public static final LogStreamEventGridRegionEnum EASTUS2 = - new LogStreamEventGridRegionEnum(Value.EASTUS2, "eastus2"); - - public static final LogStreamEventGridRegionEnum SOUTHEASTASIA = - new LogStreamEventGridRegionEnum(Value.SOUTHEASTASIA, "southeastasia"); - - public static final LogStreamEventGridRegionEnum AUSTRALIAEAST = - new LogStreamEventGridRegionEnum(Value.AUSTRALIAEAST, "australiaeast"); - - public static final LogStreamEventGridRegionEnum EASTUS = new LogStreamEventGridRegionEnum(Value.EASTUS, "eastus"); - - public static final LogStreamEventGridRegionEnum FRANCECENTRAL = - new LogStreamEventGridRegionEnum(Value.FRANCECENTRAL, "francecentral"); - - public static final LogStreamEventGridRegionEnum SWITZERLANDNORTH = - new LogStreamEventGridRegionEnum(Value.SWITZERLANDNORTH, "switzerlandnorth"); - - public static final LogStreamEventGridRegionEnum UAENORTH = - new LogStreamEventGridRegionEnum(Value.UAENORTH, "uaenorth"); - - public static final LogStreamEventGridRegionEnum NORTHEUROPE = - new LogStreamEventGridRegionEnum(Value.NORTHEUROPE, "northeurope"); - - public static final LogStreamEventGridRegionEnum NORTHCENTRALUS = - new LogStreamEventGridRegionEnum(Value.NORTHCENTRALUS, "northcentralus"); - - public static final LogStreamEventGridRegionEnum UKWEST = new LogStreamEventGridRegionEnum(Value.UKWEST, "ukwest"); - - public static final LogStreamEventGridRegionEnum NORWAYEAST = - new LogStreamEventGridRegionEnum(Value.NORWAYEAST, "norwayeast"); - - public static final LogStreamEventGridRegionEnum WESTUS = new LogStreamEventGridRegionEnum(Value.WESTUS, "westus"); - - public static final LogStreamEventGridRegionEnum WESTCENTRALUS = - new LogStreamEventGridRegionEnum(Value.WESTCENTRALUS, "westcentralus"); - - public static final LogStreamEventGridRegionEnum EASTASIA = - new LogStreamEventGridRegionEnum(Value.EASTASIA, "eastasia"); - - public static final LogStreamEventGridRegionEnum AUSTRALIACENTRAL = - new LogStreamEventGridRegionEnum(Value.AUSTRALIACENTRAL, "australiacentral"); - - public static final LogStreamEventGridRegionEnum SWEDENCENTRAL = - new LogStreamEventGridRegionEnum(Value.SWEDENCENTRAL, "swedencentral"); - - public static final LogStreamEventGridRegionEnum CENTRALUS = - new LogStreamEventGridRegionEnum(Value.CENTRALUS, "centralus"); - - public static final LogStreamEventGridRegionEnum WESTEUROPE = - new LogStreamEventGridRegionEnum(Value.WESTEUROPE, "westeurope"); - - public static final LogStreamEventGridRegionEnum JAPANWEST = - new LogStreamEventGridRegionEnum(Value.JAPANWEST, "japanwest"); - - public static final LogStreamEventGridRegionEnum WESTUS2 = - new LogStreamEventGridRegionEnum(Value.WESTUS2, "westus2"); - - public static final LogStreamEventGridRegionEnum UKSOUTH = - new LogStreamEventGridRegionEnum(Value.UKSOUTH, "uksouth"); - - private final Value value; - - private final String string; - - LogStreamEventGridRegionEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamEventGridRegionEnum - && this.string.equals(((LogStreamEventGridRegionEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GERMANYWESTCENTRAL: - return visitor.visitGermanywestcentral(); - case WESTINDIA: - return visitor.visitWestindia(); - case SOUTHCENTRALUS: - return visitor.visitSouthcentralus(); - case JAPANEAST: - return visitor.visitJapaneast(); - case KOREACENTRAL: - return visitor.visitKoreacentral(); - case AUSTRALIASOUTHEAST: - return visitor.visitAustraliasoutheast(); - case SOUTHAFRICANORTH: - return visitor.visitSouthafricanorth(); - case CANADACENTRAL: - return visitor.visitCanadacentral(); - case CANADAEAST: - return visitor.visitCanadaeast(); - case SOUTHINDIA: - return visitor.visitSouthindia(); - case KOREASOUTH: - return visitor.visitKoreasouth(); - case BRAZILSOUTH: - return visitor.visitBrazilsouth(); - case CENTRALINDIA: - return visitor.visitCentralindia(); - case EASTUS2: - return visitor.visitEastus2(); - case SOUTHEASTASIA: - return visitor.visitSoutheastasia(); - case AUSTRALIAEAST: - return visitor.visitAustraliaeast(); - case EASTUS: - return visitor.visitEastus(); - case FRANCECENTRAL: - return visitor.visitFrancecentral(); - case SWITZERLANDNORTH: - return visitor.visitSwitzerlandnorth(); - case UAENORTH: - return visitor.visitUaenorth(); - case NORTHEUROPE: - return visitor.visitNortheurope(); - case NORTHCENTRALUS: - return visitor.visitNorthcentralus(); - case UKWEST: - return visitor.visitUkwest(); - case NORWAYEAST: - return visitor.visitNorwayeast(); - case WESTUS: - return visitor.visitWestus(); - case WESTCENTRALUS: - return visitor.visitWestcentralus(); - case EASTASIA: - return visitor.visitEastasia(); - case AUSTRALIACENTRAL: - return visitor.visitAustraliacentral(); - case SWEDENCENTRAL: - return visitor.visitSwedencentral(); - case CENTRALUS: - return visitor.visitCentralus(); - case WESTEUROPE: - return visitor.visitWesteurope(); - case JAPANWEST: - return visitor.visitJapanwest(); - case WESTUS2: - return visitor.visitWestus2(); - case UKSOUTH: - return visitor.visitUksouth(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamEventGridRegionEnum valueOf(String value) { - switch (value) { - case "germanywestcentral": - return GERMANYWESTCENTRAL; - case "westindia": - return WESTINDIA; - case "southcentralus": - return SOUTHCENTRALUS; - case "japaneast": - return JAPANEAST; - case "koreacentral": - return KOREACENTRAL; - case "australiasoutheast": - return AUSTRALIASOUTHEAST; - case "southafricanorth": - return SOUTHAFRICANORTH; - case "canadacentral": - return CANADACENTRAL; - case "canadaeast": - return CANADAEAST; - case "southindia": - return SOUTHINDIA; - case "koreasouth": - return KOREASOUTH; - case "brazilsouth": - return BRAZILSOUTH; - case "centralindia": - return CENTRALINDIA; - case "eastus2": - return EASTUS2; - case "southeastasia": - return SOUTHEASTASIA; - case "australiaeast": - return AUSTRALIAEAST; - case "eastus": - return EASTUS; - case "francecentral": - return FRANCECENTRAL; - case "switzerlandnorth": - return SWITZERLANDNORTH; - case "uaenorth": - return UAENORTH; - case "northeurope": - return NORTHEUROPE; - case "northcentralus": - return NORTHCENTRALUS; - case "ukwest": - return UKWEST; - case "norwayeast": - return NORWAYEAST; - case "westus": - return WESTUS; - case "westcentralus": - return WESTCENTRALUS; - case "eastasia": - return EASTASIA; - case "australiacentral": - return AUSTRALIACENTRAL; - case "swedencentral": - return SWEDENCENTRAL; - case "centralus": - return CENTRALUS; - case "westeurope": - return WESTEUROPE; - case "japanwest": - return JAPANWEST; - case "westus2": - return WESTUS2; - case "uksouth": - return UKSOUTH; - default: - return new LogStreamEventGridRegionEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AUSTRALIACENTRAL, - - AUSTRALIAEAST, - - AUSTRALIASOUTHEAST, - - BRAZILSOUTH, - - CANADACENTRAL, - - CANADAEAST, - - CENTRALINDIA, - - CENTRALUS, - - EASTASIA, - - EASTUS, - - EASTUS2, - - FRANCECENTRAL, - - GERMANYWESTCENTRAL, - - JAPANEAST, - - JAPANWEST, - - KOREACENTRAL, - - KOREASOUTH, - - NORTHCENTRALUS, - - NORTHEUROPE, - - NORWAYEAST, - - SOUTHAFRICANORTH, - - SOUTHCENTRALUS, - - SOUTHEASTASIA, - - SOUTHINDIA, - - SWEDENCENTRAL, - - SWITZERLANDNORTH, - - UAENORTH, - - UKSOUTH, - - UKWEST, - - WESTCENTRALUS, - - WESTEUROPE, - - WESTINDIA, - - WESTUS, - - WESTUS2, - - UNKNOWN - } - - public interface Visitor { - T visitAustraliacentral(); - - T visitAustraliaeast(); - - T visitAustraliasoutheast(); - - T visitBrazilsouth(); - - T visitCanadacentral(); - - T visitCanadaeast(); - - T visitCentralindia(); - - T visitCentralus(); - - T visitEastasia(); - - T visitEastus(); - - T visitEastus2(); - - T visitFrancecentral(); - - T visitGermanywestcentral(); - - T visitJapaneast(); - - T visitJapanwest(); - - T visitKoreacentral(); - - T visitKoreasouth(); - - T visitNorthcentralus(); - - T visitNortheurope(); - - T visitNorwayeast(); - - T visitSouthafricanorth(); - - T visitSouthcentralus(); - - T visitSoutheastasia(); - - T visitSouthindia(); - - T visitSwedencentral(); - - T visitSwitzerlandnorth(); - - T visitUaenorth(); - - T visitUksouth(); - - T visitUkwest(); - - T visitWestcentralus(); - - T visitWesteurope(); - - T visitWestindia(); - - T visitWestus(); - - T visitWestus2(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridResponseSchema.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridResponseSchema.java deleted file mode 100644 index 269cd1f98..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridResponseSchema.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.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LogStreamEventGridResponseSchema.Builder.class) -public final class LogStreamEventGridResponseSchema { - private final Optional id; - - private final Optional name; - - private final Optional status; - - private final Optional type; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final Optional sink; - - private final Map additionalProperties; - - private LogStreamEventGridResponseSchema( - Optional id, - Optional name, - Optional status, - Optional type, - Optional isPriority, - Optional> filters, - Optional piiConfig, - Optional sink, - Map additionalProperties) { - this.id = id; - this.name = name; - this.status = status; - this.type = type; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the log stream - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public Optional getSink() { - return sink; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamEventGridResponseSchema && equalTo((LogStreamEventGridResponseSchema) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamEventGridResponseSchema other) { - return id.equals(other.id) - && name.equals(other.name) - && status.equals(other.status) - && type.equals(other.type) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.name, this.status, this.type, this.isPriority, this.filters, this.piiConfig, this.sink); - } - - @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 status = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional sink = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(LogStreamEventGridResponseSchema other) { - id(other.getId()); - name(other.getName()); - status(other.getStatus()); - type(other.getType()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - return this; - } - - /** - *

The id of the log stream

- */ - @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; - } - - /** - *

log stream name

- */ - @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 = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(LogStreamStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(LogStreamEventGridEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public Builder isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - public Builder isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public Builder filters(Optional> filters) { - this.filters = filters; - return this; - } - - public Builder filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public Builder piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - public Builder piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @JsonSetter(value = "sink", nulls = Nulls.SKIP) - public Builder sink(Optional sink) { - this.sink = sink; - return this; - } - - public Builder sink(LogStreamEventGridSink sink) { - this.sink = Optional.ofNullable(sink); - return this; - } - - public LogStreamEventGridResponseSchema build() { - return new LogStreamEventGridResponseSchema( - id, name, status, type, isPriority, filters, piiConfig, sink, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridSink.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridSink.java deleted file mode 100644 index f15163dd5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamEventGridSink.java +++ /dev/null @@ -1,223 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LogStreamEventGridSink.Builder.class) -public final class LogStreamEventGridSink { - private final String azureSubscriptionId; - - private final LogStreamEventGridRegionEnum azureRegion; - - private final String azureResourceGroup; - - private final Optional azurePartnerTopic; - - private final Map additionalProperties; - - private LogStreamEventGridSink( - String azureSubscriptionId, - LogStreamEventGridRegionEnum azureRegion, - String azureResourceGroup, - Optional azurePartnerTopic, - Map additionalProperties) { - this.azureSubscriptionId = azureSubscriptionId; - this.azureRegion = azureRegion; - this.azureResourceGroup = azureResourceGroup; - this.azurePartnerTopic = azurePartnerTopic; - this.additionalProperties = additionalProperties; - } - - /** - * @return Subscription ID - */ - @JsonProperty("azureSubscriptionId") - public String getAzureSubscriptionId() { - return azureSubscriptionId; - } - - @JsonProperty("azureRegion") - public LogStreamEventGridRegionEnum getAzureRegion() { - return azureRegion; - } - - /** - * @return Resource Group - */ - @JsonProperty("azureResourceGroup") - public String getAzureResourceGroup() { - return azureResourceGroup; - } - - /** - * @return Partner Topic - */ - @JsonProperty("azurePartnerTopic") - public Optional getAzurePartnerTopic() { - return azurePartnerTopic; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamEventGridSink && equalTo((LogStreamEventGridSink) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamEventGridSink other) { - return azureSubscriptionId.equals(other.azureSubscriptionId) - && azureRegion.equals(other.azureRegion) - && azureResourceGroup.equals(other.azureResourceGroup) - && azurePartnerTopic.equals(other.azurePartnerTopic); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.azureSubscriptionId, this.azureRegion, this.azureResourceGroup, this.azurePartnerTopic); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static AzureSubscriptionIdStage builder() { - return new Builder(); - } - - public interface AzureSubscriptionIdStage { - /** - *

Subscription ID

- */ - AzureRegionStage azureSubscriptionId(@NotNull String azureSubscriptionId); - - Builder from(LogStreamEventGridSink other); - } - - public interface AzureRegionStage { - AzureResourceGroupStage azureRegion(@NotNull LogStreamEventGridRegionEnum azureRegion); - } - - public interface AzureResourceGroupStage { - /** - *

Resource Group

- */ - _FinalStage azureResourceGroup(@NotNull String azureResourceGroup); - } - - public interface _FinalStage { - LogStreamEventGridSink build(); - - /** - *

Partner Topic

- */ - _FinalStage azurePartnerTopic(Optional azurePartnerTopic); - - _FinalStage azurePartnerTopic(String azurePartnerTopic); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements AzureSubscriptionIdStage, AzureRegionStage, AzureResourceGroupStage, _FinalStage { - private String azureSubscriptionId; - - private LogStreamEventGridRegionEnum azureRegion; - - private String azureResourceGroup; - - private Optional azurePartnerTopic = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(LogStreamEventGridSink other) { - azureSubscriptionId(other.getAzureSubscriptionId()); - azureRegion(other.getAzureRegion()); - azureResourceGroup(other.getAzureResourceGroup()); - azurePartnerTopic(other.getAzurePartnerTopic()); - return this; - } - - /** - *

Subscription ID

- *

Subscription ID

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("azureSubscriptionId") - public AzureRegionStage azureSubscriptionId(@NotNull String azureSubscriptionId) { - this.azureSubscriptionId = - Objects.requireNonNull(azureSubscriptionId, "azureSubscriptionId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("azureRegion") - public AzureResourceGroupStage azureRegion(@NotNull LogStreamEventGridRegionEnum azureRegion) { - this.azureRegion = Objects.requireNonNull(azureRegion, "azureRegion must not be null"); - return this; - } - - /** - *

Resource Group

- *

Resource Group

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("azureResourceGroup") - public _FinalStage azureResourceGroup(@NotNull String azureResourceGroup) { - this.azureResourceGroup = Objects.requireNonNull(azureResourceGroup, "azureResourceGroup must not be null"); - return this; - } - - /** - *

Partner Topic

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage azurePartnerTopic(String azurePartnerTopic) { - this.azurePartnerTopic = Optional.ofNullable(azurePartnerTopic); - return this; - } - - /** - *

Partner Topic

- */ - @java.lang.Override - @JsonSetter(value = "azurePartnerTopic", nulls = Nulls.SKIP) - public _FinalStage azurePartnerTopic(Optional azurePartnerTopic) { - this.azurePartnerTopic = azurePartnerTopic; - return this; - } - - @java.lang.Override - public LogStreamEventGridSink build() { - return new LogStreamEventGridSink( - azureSubscriptionId, azureRegion, azureResourceGroup, azurePartnerTopic, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamFilter.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamFilter.java deleted file mode 100644 index b970c400a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamFilter.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LogStreamFilter.Builder.class) -public final class LogStreamFilter { - private final Optional type; - - private final Optional name; - - private final Map additionalProperties; - - private LogStreamFilter( - Optional type, - Optional name, - Map additionalProperties) { - this.type = type; - this.name = name; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamFilter && equalTo((LogStreamFilter) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamFilter other) { - return type.equals(other.type) && name.equals(other.name); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.name); - } - - @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 type = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(LogStreamFilter other) { - type(other.getType()); - name(other.getName()); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(LogStreamFilterTypeEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public Builder name(Optional name) { - this.name = name; - return this; - } - - public Builder name(LogStreamFilterGroupNameEnum name) { - this.name = Optional.ofNullable(name); - return this; - } - - public LogStreamFilter build() { - return new LogStreamFilter(type, name, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamFilterGroupNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamFilterGroupNameEnum.java deleted file mode 100644 index 5690aa6ca..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamFilterGroupNameEnum.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamFilterGroupNameEnum { - public static final LogStreamFilterGroupNameEnum AUTH_LOGIN_SUCCESS = - new LogStreamFilterGroupNameEnum(Value.AUTH_LOGIN_SUCCESS, "auth.login.success"); - - public static final LogStreamFilterGroupNameEnum AUTH_LOGOUT_SUCCESS = - new LogStreamFilterGroupNameEnum(Value.AUTH_LOGOUT_SUCCESS, "auth.logout.success"); - - public static final LogStreamFilterGroupNameEnum AUTH_TOKEN_EXCHANGE_FAIL = - new LogStreamFilterGroupNameEnum(Value.AUTH_TOKEN_EXCHANGE_FAIL, "auth.token_exchange.fail"); - - public static final LogStreamFilterGroupNameEnum SYSTEM_NOTIFICATION = - new LogStreamFilterGroupNameEnum(Value.SYSTEM_NOTIFICATION, "system.notification"); - - public static final LogStreamFilterGroupNameEnum ACTIONS = - new LogStreamFilterGroupNameEnum(Value.ACTIONS, "actions"); - - public static final LogStreamFilterGroupNameEnum AUTH_SILENT_AUTH_FAIL = - new LogStreamFilterGroupNameEnum(Value.AUTH_SILENT_AUTH_FAIL, "auth.silent_auth.fail"); - - public static final LogStreamFilterGroupNameEnum MANAGEMENT_FAIL = - new LogStreamFilterGroupNameEnum(Value.MANAGEMENT_FAIL, "management.fail"); - - public static final LogStreamFilterGroupNameEnum AUTH_TOKEN_EXCHANGE_SUCCESS = - new LogStreamFilterGroupNameEnum(Value.AUTH_TOKEN_EXCHANGE_SUCCESS, "auth.token_exchange.success"); - - public static final LogStreamFilterGroupNameEnum USER_NOTIFICATION = - new LogStreamFilterGroupNameEnum(Value.USER_NOTIFICATION, "user.notification"); - - public static final LogStreamFilterGroupNameEnum AUTH_SILENT_AUTH_SUCCESS = - new LogStreamFilterGroupNameEnum(Value.AUTH_SILENT_AUTH_SUCCESS, "auth.silent_auth.success"); - - public static final LogStreamFilterGroupNameEnum AUTH_LOGOUT_FAIL = - new LogStreamFilterGroupNameEnum(Value.AUTH_LOGOUT_FAIL, "auth.logout.fail"); - - public static final LogStreamFilterGroupNameEnum MANAGEMENT_SUCCESS = - new LogStreamFilterGroupNameEnum(Value.MANAGEMENT_SUCCESS, "management.success"); - - public static final LogStreamFilterGroupNameEnum OTHER = new LogStreamFilterGroupNameEnum(Value.OTHER, "other"); - - public static final LogStreamFilterGroupNameEnum AUTH_SIGNUP_FAIL = - new LogStreamFilterGroupNameEnum(Value.AUTH_SIGNUP_FAIL, "auth.signup.fail"); - - public static final LogStreamFilterGroupNameEnum AUTH_SIGNUP_SUCCESS = - new LogStreamFilterGroupNameEnum(Value.AUTH_SIGNUP_SUCCESS, "auth.signup.success"); - - public static final LogStreamFilterGroupNameEnum SCIM_EVENT = - new LogStreamFilterGroupNameEnum(Value.SCIM_EVENT, "scim.event"); - - public static final LogStreamFilterGroupNameEnum AUTH_LOGIN_FAIL = - new LogStreamFilterGroupNameEnum(Value.AUTH_LOGIN_FAIL, "auth.login.fail"); - - public static final LogStreamFilterGroupNameEnum AUTH_LOGIN_NOTIFICATION = - new LogStreamFilterGroupNameEnum(Value.AUTH_LOGIN_NOTIFICATION, "auth.login.notification"); - - public static final LogStreamFilterGroupNameEnum USER_FAIL = - new LogStreamFilterGroupNameEnum(Value.USER_FAIL, "user.fail"); - - public static final LogStreamFilterGroupNameEnum USER_SUCCESS = - new LogStreamFilterGroupNameEnum(Value.USER_SUCCESS, "user.success"); - - private final Value value; - - private final String string; - - LogStreamFilterGroupNameEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamFilterGroupNameEnum - && this.string.equals(((LogStreamFilterGroupNameEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AUTH_LOGIN_SUCCESS: - return visitor.visitAuthLoginSuccess(); - case AUTH_LOGOUT_SUCCESS: - return visitor.visitAuthLogoutSuccess(); - case AUTH_TOKEN_EXCHANGE_FAIL: - return visitor.visitAuthTokenExchangeFail(); - case SYSTEM_NOTIFICATION: - return visitor.visitSystemNotification(); - case ACTIONS: - return visitor.visitActions(); - case AUTH_SILENT_AUTH_FAIL: - return visitor.visitAuthSilentAuthFail(); - case MANAGEMENT_FAIL: - return visitor.visitManagementFail(); - case AUTH_TOKEN_EXCHANGE_SUCCESS: - return visitor.visitAuthTokenExchangeSuccess(); - case USER_NOTIFICATION: - return visitor.visitUserNotification(); - case AUTH_SILENT_AUTH_SUCCESS: - return visitor.visitAuthSilentAuthSuccess(); - case AUTH_LOGOUT_FAIL: - return visitor.visitAuthLogoutFail(); - case MANAGEMENT_SUCCESS: - return visitor.visitManagementSuccess(); - case OTHER: - return visitor.visitOther(); - case AUTH_SIGNUP_FAIL: - return visitor.visitAuthSignupFail(); - case AUTH_SIGNUP_SUCCESS: - return visitor.visitAuthSignupSuccess(); - case SCIM_EVENT: - return visitor.visitScimEvent(); - case AUTH_LOGIN_FAIL: - return visitor.visitAuthLoginFail(); - case AUTH_LOGIN_NOTIFICATION: - return visitor.visitAuthLoginNotification(); - case USER_FAIL: - return visitor.visitUserFail(); - case USER_SUCCESS: - return visitor.visitUserSuccess(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamFilterGroupNameEnum valueOf(String value) { - switch (value) { - case "auth.login.success": - return AUTH_LOGIN_SUCCESS; - case "auth.logout.success": - return AUTH_LOGOUT_SUCCESS; - case "auth.token_exchange.fail": - return AUTH_TOKEN_EXCHANGE_FAIL; - case "system.notification": - return SYSTEM_NOTIFICATION; - case "actions": - return ACTIONS; - case "auth.silent_auth.fail": - return AUTH_SILENT_AUTH_FAIL; - case "management.fail": - return MANAGEMENT_FAIL; - case "auth.token_exchange.success": - return AUTH_TOKEN_EXCHANGE_SUCCESS; - case "user.notification": - return USER_NOTIFICATION; - case "auth.silent_auth.success": - return AUTH_SILENT_AUTH_SUCCESS; - case "auth.logout.fail": - return AUTH_LOGOUT_FAIL; - case "management.success": - return MANAGEMENT_SUCCESS; - case "other": - return OTHER; - case "auth.signup.fail": - return AUTH_SIGNUP_FAIL; - case "auth.signup.success": - return AUTH_SIGNUP_SUCCESS; - case "scim.event": - return SCIM_EVENT; - case "auth.login.fail": - return AUTH_LOGIN_FAIL; - case "auth.login.notification": - return AUTH_LOGIN_NOTIFICATION; - case "user.fail": - return USER_FAIL; - case "user.success": - return USER_SUCCESS; - default: - return new LogStreamFilterGroupNameEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AUTH_LOGIN_FAIL, - - AUTH_LOGIN_NOTIFICATION, - - AUTH_LOGIN_SUCCESS, - - AUTH_LOGOUT_FAIL, - - AUTH_LOGOUT_SUCCESS, - - AUTH_SIGNUP_FAIL, - - AUTH_SIGNUP_SUCCESS, - - AUTH_SILENT_AUTH_FAIL, - - AUTH_SILENT_AUTH_SUCCESS, - - AUTH_TOKEN_EXCHANGE_FAIL, - - AUTH_TOKEN_EXCHANGE_SUCCESS, - - MANAGEMENT_FAIL, - - MANAGEMENT_SUCCESS, - - SCIM_EVENT, - - SYSTEM_NOTIFICATION, - - USER_FAIL, - - USER_NOTIFICATION, - - USER_SUCCESS, - - ACTIONS, - - OTHER, - - UNKNOWN - } - - public interface Visitor { - T visitAuthLoginFail(); - - T visitAuthLoginNotification(); - - T visitAuthLoginSuccess(); - - T visitAuthLogoutFail(); - - T visitAuthLogoutSuccess(); - - T visitAuthSignupFail(); - - T visitAuthSignupSuccess(); - - T visitAuthSilentAuthFail(); - - T visitAuthSilentAuthSuccess(); - - T visitAuthTokenExchangeFail(); - - T visitAuthTokenExchangeSuccess(); - - T visitManagementFail(); - - T visitManagementSuccess(); - - T visitScimEvent(); - - T visitSystemNotification(); - - T visitUserFail(); - - T visitUserNotification(); - - T visitUserSuccess(); - - T visitActions(); - - T visitOther(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamFilterTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamFilterTypeEnum.java deleted file mode 100644 index ea79d365e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamFilterTypeEnum.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamFilterTypeEnum { - public static final LogStreamFilterTypeEnum CATEGORY = new LogStreamFilterTypeEnum(Value.CATEGORY, "category"); - - private final Value value; - - private final String string; - - LogStreamFilterTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamFilterTypeEnum - && this.string.equals(((LogStreamFilterTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CATEGORY: - return visitor.visitCategory(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamFilterTypeEnum valueOf(String value) { - switch (value) { - case "category": - return CATEGORY; - default: - return new LogStreamFilterTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - CATEGORY, - - UNKNOWN - } - - public interface Visitor { - T visitCategory(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamHttpContentFormatEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamHttpContentFormatEnum.java deleted file mode 100644 index ff2a585bb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamHttpContentFormatEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamHttpContentFormatEnum { - public static final LogStreamHttpContentFormatEnum JSONOBJECT = - new LogStreamHttpContentFormatEnum(Value.JSONOBJECT, "JSONOBJECT"); - - public static final LogStreamHttpContentFormatEnum JSONARRAY = - new LogStreamHttpContentFormatEnum(Value.JSONARRAY, "JSONARRAY"); - - public static final LogStreamHttpContentFormatEnum JSONLINES = - new LogStreamHttpContentFormatEnum(Value.JSONLINES, "JSONLINES"); - - private final Value value; - - private final String string; - - LogStreamHttpContentFormatEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamHttpContentFormatEnum - && this.string.equals(((LogStreamHttpContentFormatEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case JSONOBJECT: - return visitor.visitJsonobject(); - case JSONARRAY: - return visitor.visitJsonarray(); - case JSONLINES: - return visitor.visitJsonlines(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamHttpContentFormatEnum valueOf(String value) { - switch (value) { - case "JSONOBJECT": - return JSONOBJECT; - case "JSONARRAY": - return JSONARRAY; - case "JSONLINES": - return JSONLINES; - default: - return new LogStreamHttpContentFormatEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - JSONARRAY, - - JSONLINES, - - JSONOBJECT, - - UNKNOWN - } - - public interface Visitor { - T visitJsonarray(); - - T visitJsonlines(); - - T visitJsonobject(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamHttpEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamHttpEnum.java deleted file mode 100644 index f4c6fdd32..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamHttpEnum.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamHttpEnum { - public static final LogStreamHttpEnum HTTP = new LogStreamHttpEnum(Value.HTTP, "http"); - - private final Value value; - - private final String string; - - LogStreamHttpEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamHttpEnum && this.string.equals(((LogStreamHttpEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case HTTP: - return visitor.visitHttp(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamHttpEnum valueOf(String value) { - switch (value) { - case "http": - return HTTP; - default: - return new LogStreamHttpEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - HTTP, - - UNKNOWN - } - - public interface Visitor { - T visitHttp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamHttpResponseSchema.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamHttpResponseSchema.java deleted file mode 100644 index 7ca4ad744..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamHttpResponseSchema.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.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LogStreamHttpResponseSchema.Builder.class) -public final class LogStreamHttpResponseSchema { - private final Optional id; - - private final Optional name; - - private final Optional status; - - private final Optional type; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final Optional sink; - - private final Map additionalProperties; - - private LogStreamHttpResponseSchema( - Optional id, - Optional name, - Optional status, - Optional type, - Optional isPriority, - Optional> filters, - Optional piiConfig, - Optional sink, - Map additionalProperties) { - this.id = id; - this.name = name; - this.status = status; - this.type = type; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the log stream - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public Optional getSink() { - return sink; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamHttpResponseSchema && equalTo((LogStreamHttpResponseSchema) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamHttpResponseSchema other) { - return id.equals(other.id) - && name.equals(other.name) - && status.equals(other.status) - && type.equals(other.type) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.name, this.status, this.type, this.isPriority, this.filters, this.piiConfig, this.sink); - } - - @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 status = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional sink = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(LogStreamHttpResponseSchema other) { - id(other.getId()); - name(other.getName()); - status(other.getStatus()); - type(other.getType()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - return this; - } - - /** - *

The id of the log stream

- */ - @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; - } - - /** - *

log stream name

- */ - @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 = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(LogStreamStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(LogStreamHttpEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public Builder isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - public Builder isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public Builder filters(Optional> filters) { - this.filters = filters; - return this; - } - - public Builder filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public Builder piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - public Builder piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @JsonSetter(value = "sink", nulls = Nulls.SKIP) - public Builder sink(Optional sink) { - this.sink = sink; - return this; - } - - public Builder sink(LogStreamHttpSink sink) { - this.sink = Optional.ofNullable(sink); - return this; - } - - public LogStreamHttpResponseSchema build() { - return new LogStreamHttpResponseSchema( - id, name, status, type, isPriority, filters, piiConfig, sink, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamHttpSink.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamHttpSink.java deleted file mode 100644 index 73ec671fe..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamHttpSink.java +++ /dev/null @@ -1,288 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LogStreamHttpSink.Builder.class) -public final class LogStreamHttpSink { - private final Optional httpAuthorization; - - private final Optional httpContentFormat; - - private final Optional httpContentType; - - private final String httpEndpoint; - - private final Optional> httpCustomHeaders; - - private final Map additionalProperties; - - private LogStreamHttpSink( - Optional httpAuthorization, - Optional httpContentFormat, - Optional httpContentType, - String httpEndpoint, - Optional> httpCustomHeaders, - Map additionalProperties) { - this.httpAuthorization = httpAuthorization; - this.httpContentFormat = httpContentFormat; - this.httpContentType = httpContentType; - this.httpEndpoint = httpEndpoint; - this.httpCustomHeaders = httpCustomHeaders; - this.additionalProperties = additionalProperties; - } - - /** - * @return HTTP Authorization header - */ - @JsonProperty("httpAuthorization") - public Optional getHttpAuthorization() { - return httpAuthorization; - } - - @JsonProperty("httpContentFormat") - public Optional getHttpContentFormat() { - return httpContentFormat; - } - - /** - * @return HTTP Content-Type header - */ - @JsonProperty("httpContentType") - public Optional getHttpContentType() { - return httpContentType; - } - - /** - * @return HTTP endpoint - */ - @JsonProperty("httpEndpoint") - public String getHttpEndpoint() { - return httpEndpoint; - } - - /** - * @return custom HTTP headers - */ - @JsonProperty("httpCustomHeaders") - public Optional> getHttpCustomHeaders() { - return httpCustomHeaders; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamHttpSink && equalTo((LogStreamHttpSink) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamHttpSink other) { - return httpAuthorization.equals(other.httpAuthorization) - && httpContentFormat.equals(other.httpContentFormat) - && httpContentType.equals(other.httpContentType) - && httpEndpoint.equals(other.httpEndpoint) - && httpCustomHeaders.equals(other.httpCustomHeaders); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.httpAuthorization, - this.httpContentFormat, - this.httpContentType, - this.httpEndpoint, - this.httpCustomHeaders); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static HttpEndpointStage builder() { - return new Builder(); - } - - public interface HttpEndpointStage { - /** - *

HTTP endpoint

- */ - _FinalStage httpEndpoint(@NotNull String httpEndpoint); - - Builder from(LogStreamHttpSink other); - } - - public interface _FinalStage { - LogStreamHttpSink build(); - - /** - *

HTTP Authorization header

- */ - _FinalStage httpAuthorization(Optional httpAuthorization); - - _FinalStage httpAuthorization(String httpAuthorization); - - _FinalStage httpContentFormat(Optional httpContentFormat); - - _FinalStage httpContentFormat(LogStreamHttpContentFormatEnum httpContentFormat); - - /** - *

HTTP Content-Type header

- */ - _FinalStage httpContentType(Optional httpContentType); - - _FinalStage httpContentType(String httpContentType); - - /** - *

custom HTTP headers

- */ - _FinalStage httpCustomHeaders(Optional> httpCustomHeaders); - - _FinalStage httpCustomHeaders(List httpCustomHeaders); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements HttpEndpointStage, _FinalStage { - private String httpEndpoint; - - private Optional> httpCustomHeaders = Optional.empty(); - - private Optional httpContentType = Optional.empty(); - - private Optional httpContentFormat = Optional.empty(); - - private Optional httpAuthorization = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(LogStreamHttpSink other) { - httpAuthorization(other.getHttpAuthorization()); - httpContentFormat(other.getHttpContentFormat()); - httpContentType(other.getHttpContentType()); - httpEndpoint(other.getHttpEndpoint()); - httpCustomHeaders(other.getHttpCustomHeaders()); - return this; - } - - /** - *

HTTP endpoint

- *

HTTP endpoint

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("httpEndpoint") - public _FinalStage httpEndpoint(@NotNull String httpEndpoint) { - this.httpEndpoint = Objects.requireNonNull(httpEndpoint, "httpEndpoint must not be null"); - return this; - } - - /** - *

custom HTTP headers

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage httpCustomHeaders(List httpCustomHeaders) { - this.httpCustomHeaders = Optional.ofNullable(httpCustomHeaders); - return this; - } - - /** - *

custom HTTP headers

- */ - @java.lang.Override - @JsonSetter(value = "httpCustomHeaders", nulls = Nulls.SKIP) - public _FinalStage httpCustomHeaders(Optional> httpCustomHeaders) { - this.httpCustomHeaders = httpCustomHeaders; - return this; - } - - /** - *

HTTP Content-Type header

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage httpContentType(String httpContentType) { - this.httpContentType = Optional.ofNullable(httpContentType); - return this; - } - - /** - *

HTTP Content-Type header

- */ - @java.lang.Override - @JsonSetter(value = "httpContentType", nulls = Nulls.SKIP) - public _FinalStage httpContentType(Optional httpContentType) { - this.httpContentType = httpContentType; - return this; - } - - @java.lang.Override - public _FinalStage httpContentFormat(LogStreamHttpContentFormatEnum httpContentFormat) { - this.httpContentFormat = Optional.ofNullable(httpContentFormat); - return this; - } - - @java.lang.Override - @JsonSetter(value = "httpContentFormat", nulls = Nulls.SKIP) - public _FinalStage httpContentFormat(Optional httpContentFormat) { - this.httpContentFormat = httpContentFormat; - return this; - } - - /** - *

HTTP Authorization header

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage httpAuthorization(String httpAuthorization) { - this.httpAuthorization = Optional.ofNullable(httpAuthorization); - return this; - } - - /** - *

HTTP Authorization header

- */ - @java.lang.Override - @JsonSetter(value = "httpAuthorization", nulls = Nulls.SKIP) - public _FinalStage httpAuthorization(Optional httpAuthorization) { - this.httpAuthorization = httpAuthorization; - return this; - } - - @java.lang.Override - public LogStreamHttpSink build() { - return new LogStreamHttpSink( - httpAuthorization, - httpContentFormat, - httpContentType, - httpEndpoint, - httpCustomHeaders, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelEnum.java deleted file mode 100644 index 8aa71cf9e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelEnum.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamMixpanelEnum { - public static final LogStreamMixpanelEnum MIXPANEL = new LogStreamMixpanelEnum(Value.MIXPANEL, "mixpanel"); - - private final Value value; - - private final String string; - - LogStreamMixpanelEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamMixpanelEnum - && this.string.equals(((LogStreamMixpanelEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MIXPANEL: - return visitor.visitMixpanel(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamMixpanelEnum valueOf(String value) { - switch (value) { - case "mixpanel": - return MIXPANEL; - default: - return new LogStreamMixpanelEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - MIXPANEL, - - UNKNOWN - } - - public interface Visitor { - T visitMixpanel(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelRegionEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelRegionEnum.java deleted file mode 100644 index ed11aaa74..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelRegionEnum.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamMixpanelRegionEnum { - public static final LogStreamMixpanelRegionEnum US = new LogStreamMixpanelRegionEnum(Value.US, "us"); - - public static final LogStreamMixpanelRegionEnum EU = new LogStreamMixpanelRegionEnum(Value.EU, "eu"); - - private final Value value; - - private final String string; - - LogStreamMixpanelRegionEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamMixpanelRegionEnum - && this.string.equals(((LogStreamMixpanelRegionEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case US: - return visitor.visitUs(); - case EU: - return visitor.visitEu(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamMixpanelRegionEnum valueOf(String value) { - switch (value) { - case "us": - return US; - case "eu": - return EU; - default: - return new LogStreamMixpanelRegionEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - US, - - EU, - - UNKNOWN - } - - public interface Visitor { - T visitUs(); - - T visitEu(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelResponseSchema.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelResponseSchema.java deleted file mode 100644 index f1ec52dbe..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelResponseSchema.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.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LogStreamMixpanelResponseSchema.Builder.class) -public final class LogStreamMixpanelResponseSchema { - private final Optional id; - - private final Optional name; - - private final Optional status; - - private final Optional type; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final Optional sink; - - private final Map additionalProperties; - - private LogStreamMixpanelResponseSchema( - Optional id, - Optional name, - Optional status, - Optional type, - Optional isPriority, - Optional> filters, - Optional piiConfig, - Optional sink, - Map additionalProperties) { - this.id = id; - this.name = name; - this.status = status; - this.type = type; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the log stream - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public Optional getSink() { - return sink; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamMixpanelResponseSchema && equalTo((LogStreamMixpanelResponseSchema) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamMixpanelResponseSchema other) { - return id.equals(other.id) - && name.equals(other.name) - && status.equals(other.status) - && type.equals(other.type) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.name, this.status, this.type, this.isPriority, this.filters, this.piiConfig, this.sink); - } - - @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 status = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional sink = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(LogStreamMixpanelResponseSchema other) { - id(other.getId()); - name(other.getName()); - status(other.getStatus()); - type(other.getType()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - return this; - } - - /** - *

The id of the log stream

- */ - @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; - } - - /** - *

log stream name

- */ - @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 = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(LogStreamStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(LogStreamMixpanelEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public Builder isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - public Builder isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public Builder filters(Optional> filters) { - this.filters = filters; - return this; - } - - public Builder filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public Builder piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - public Builder piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @JsonSetter(value = "sink", nulls = Nulls.SKIP) - public Builder sink(Optional sink) { - this.sink = sink; - return this; - } - - public Builder sink(LogStreamMixpanelSink sink) { - this.sink = Optional.ofNullable(sink); - return this; - } - - public LogStreamMixpanelResponseSchema build() { - return new LogStreamMixpanelResponseSchema( - id, name, status, type, isPriority, filters, piiConfig, sink, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelSink.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelSink.java deleted file mode 100644 index 0ca307704..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelSink.java +++ /dev/null @@ -1,227 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = LogStreamMixpanelSink.Builder.class) -public final class LogStreamMixpanelSink { - private final LogStreamMixpanelRegionEnum mixpanelRegion; - - private final String mixpanelProjectId; - - private final String mixpanelServiceAccountUsername; - - private final String mixpanelServiceAccountPassword; - - private final Map additionalProperties; - - private LogStreamMixpanelSink( - LogStreamMixpanelRegionEnum mixpanelRegion, - String mixpanelProjectId, - String mixpanelServiceAccountUsername, - String mixpanelServiceAccountPassword, - Map additionalProperties) { - this.mixpanelRegion = mixpanelRegion; - this.mixpanelProjectId = mixpanelProjectId; - this.mixpanelServiceAccountUsername = mixpanelServiceAccountUsername; - this.mixpanelServiceAccountPassword = mixpanelServiceAccountPassword; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("mixpanelRegion") - public LogStreamMixpanelRegionEnum getMixpanelRegion() { - return mixpanelRegion; - } - - /** - * @return Mixpanel Project Id - */ - @JsonProperty("mixpanelProjectId") - public String getMixpanelProjectId() { - return mixpanelProjectId; - } - - /** - * @return Mixpanel Service Account Username - */ - @JsonProperty("mixpanelServiceAccountUsername") - public String getMixpanelServiceAccountUsername() { - return mixpanelServiceAccountUsername; - } - - /** - * @return Mixpanel Service Account Password - */ - @JsonProperty("mixpanelServiceAccountPassword") - public String getMixpanelServiceAccountPassword() { - return mixpanelServiceAccountPassword; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamMixpanelSink && equalTo((LogStreamMixpanelSink) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamMixpanelSink other) { - return mixpanelRegion.equals(other.mixpanelRegion) - && mixpanelProjectId.equals(other.mixpanelProjectId) - && mixpanelServiceAccountUsername.equals(other.mixpanelServiceAccountUsername) - && mixpanelServiceAccountPassword.equals(other.mixpanelServiceAccountPassword); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.mixpanelRegion, - this.mixpanelProjectId, - this.mixpanelServiceAccountUsername, - this.mixpanelServiceAccountPassword); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static MixpanelRegionStage builder() { - return new Builder(); - } - - public interface MixpanelRegionStage { - MixpanelProjectIdStage mixpanelRegion(@NotNull LogStreamMixpanelRegionEnum mixpanelRegion); - - Builder from(LogStreamMixpanelSink other); - } - - public interface MixpanelProjectIdStage { - /** - *

Mixpanel Project Id

- */ - MixpanelServiceAccountUsernameStage mixpanelProjectId(@NotNull String mixpanelProjectId); - } - - public interface MixpanelServiceAccountUsernameStage { - /** - *

Mixpanel Service Account Username

- */ - MixpanelServiceAccountPasswordStage mixpanelServiceAccountUsername( - @NotNull String mixpanelServiceAccountUsername); - } - - public interface MixpanelServiceAccountPasswordStage { - /** - *

Mixpanel Service Account Password

- */ - _FinalStage mixpanelServiceAccountPassword(@NotNull String mixpanelServiceAccountPassword); - } - - public interface _FinalStage { - LogStreamMixpanelSink build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements MixpanelRegionStage, - MixpanelProjectIdStage, - MixpanelServiceAccountUsernameStage, - MixpanelServiceAccountPasswordStage, - _FinalStage { - private LogStreamMixpanelRegionEnum mixpanelRegion; - - private String mixpanelProjectId; - - private String mixpanelServiceAccountUsername; - - private String mixpanelServiceAccountPassword; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(LogStreamMixpanelSink other) { - mixpanelRegion(other.getMixpanelRegion()); - mixpanelProjectId(other.getMixpanelProjectId()); - mixpanelServiceAccountUsername(other.getMixpanelServiceAccountUsername()); - mixpanelServiceAccountPassword(other.getMixpanelServiceAccountPassword()); - return this; - } - - @java.lang.Override - @JsonSetter("mixpanelRegion") - public MixpanelProjectIdStage mixpanelRegion(@NotNull LogStreamMixpanelRegionEnum mixpanelRegion) { - this.mixpanelRegion = Objects.requireNonNull(mixpanelRegion, "mixpanelRegion must not be null"); - return this; - } - - /** - *

Mixpanel Project Id

- *

Mixpanel Project Id

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("mixpanelProjectId") - public MixpanelServiceAccountUsernameStage mixpanelProjectId(@NotNull String mixpanelProjectId) { - this.mixpanelProjectId = Objects.requireNonNull(mixpanelProjectId, "mixpanelProjectId must not be null"); - return this; - } - - /** - *

Mixpanel Service Account Username

- *

Mixpanel Service Account Username

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("mixpanelServiceAccountUsername") - public MixpanelServiceAccountPasswordStage mixpanelServiceAccountUsername( - @NotNull String mixpanelServiceAccountUsername) { - this.mixpanelServiceAccountUsername = Objects.requireNonNull( - mixpanelServiceAccountUsername, "mixpanelServiceAccountUsername must not be null"); - return this; - } - - /** - *

Mixpanel Service Account Password

- *

Mixpanel Service Account Password

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("mixpanelServiceAccountPassword") - public _FinalStage mixpanelServiceAccountPassword(@NotNull String mixpanelServiceAccountPassword) { - this.mixpanelServiceAccountPassword = Objects.requireNonNull( - mixpanelServiceAccountPassword, "mixpanelServiceAccountPassword must not be null"); - return this; - } - - @java.lang.Override - public LogStreamMixpanelSink build() { - return new LogStreamMixpanelSink( - mixpanelRegion, - mixpanelProjectId, - mixpanelServiceAccountUsername, - mixpanelServiceAccountPassword, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelSinkPatch.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelSinkPatch.java deleted file mode 100644 index c77a29061..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamMixpanelSinkPatch.java +++ /dev/null @@ -1,230 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LogStreamMixpanelSinkPatch.Builder.class) -public final class LogStreamMixpanelSinkPatch { - private final LogStreamMixpanelRegionEnum mixpanelRegion; - - private final String mixpanelProjectId; - - private final String mixpanelServiceAccountUsername; - - private final Optional mixpanelServiceAccountPassword; - - private final Map additionalProperties; - - private LogStreamMixpanelSinkPatch( - LogStreamMixpanelRegionEnum mixpanelRegion, - String mixpanelProjectId, - String mixpanelServiceAccountUsername, - Optional mixpanelServiceAccountPassword, - Map additionalProperties) { - this.mixpanelRegion = mixpanelRegion; - this.mixpanelProjectId = mixpanelProjectId; - this.mixpanelServiceAccountUsername = mixpanelServiceAccountUsername; - this.mixpanelServiceAccountPassword = mixpanelServiceAccountPassword; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("mixpanelRegion") - public LogStreamMixpanelRegionEnum getMixpanelRegion() { - return mixpanelRegion; - } - - /** - * @return Mixpanel Project Id - */ - @JsonProperty("mixpanelProjectId") - public String getMixpanelProjectId() { - return mixpanelProjectId; - } - - /** - * @return Mixpanel Service Account Username - */ - @JsonProperty("mixpanelServiceAccountUsername") - public String getMixpanelServiceAccountUsername() { - return mixpanelServiceAccountUsername; - } - - /** - * @return Mixpanel Service Account Password - */ - @JsonProperty("mixpanelServiceAccountPassword") - public Optional getMixpanelServiceAccountPassword() { - return mixpanelServiceAccountPassword; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamMixpanelSinkPatch && equalTo((LogStreamMixpanelSinkPatch) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamMixpanelSinkPatch other) { - return mixpanelRegion.equals(other.mixpanelRegion) - && mixpanelProjectId.equals(other.mixpanelProjectId) - && mixpanelServiceAccountUsername.equals(other.mixpanelServiceAccountUsername) - && mixpanelServiceAccountPassword.equals(other.mixpanelServiceAccountPassword); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.mixpanelRegion, - this.mixpanelProjectId, - this.mixpanelServiceAccountUsername, - this.mixpanelServiceAccountPassword); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static MixpanelRegionStage builder() { - return new Builder(); - } - - public interface MixpanelRegionStage { - MixpanelProjectIdStage mixpanelRegion(@NotNull LogStreamMixpanelRegionEnum mixpanelRegion); - - Builder from(LogStreamMixpanelSinkPatch other); - } - - public interface MixpanelProjectIdStage { - /** - *

Mixpanel Project Id

- */ - MixpanelServiceAccountUsernameStage mixpanelProjectId(@NotNull String mixpanelProjectId); - } - - public interface MixpanelServiceAccountUsernameStage { - /** - *

Mixpanel Service Account Username

- */ - _FinalStage mixpanelServiceAccountUsername(@NotNull String mixpanelServiceAccountUsername); - } - - public interface _FinalStage { - LogStreamMixpanelSinkPatch build(); - - /** - *

Mixpanel Service Account Password

- */ - _FinalStage mixpanelServiceAccountPassword(Optional mixpanelServiceAccountPassword); - - _FinalStage mixpanelServiceAccountPassword(String mixpanelServiceAccountPassword); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements MixpanelRegionStage, MixpanelProjectIdStage, MixpanelServiceAccountUsernameStage, _FinalStage { - private LogStreamMixpanelRegionEnum mixpanelRegion; - - private String mixpanelProjectId; - - private String mixpanelServiceAccountUsername; - - private Optional mixpanelServiceAccountPassword = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(LogStreamMixpanelSinkPatch other) { - mixpanelRegion(other.getMixpanelRegion()); - mixpanelProjectId(other.getMixpanelProjectId()); - mixpanelServiceAccountUsername(other.getMixpanelServiceAccountUsername()); - mixpanelServiceAccountPassword(other.getMixpanelServiceAccountPassword()); - return this; - } - - @java.lang.Override - @JsonSetter("mixpanelRegion") - public MixpanelProjectIdStage mixpanelRegion(@NotNull LogStreamMixpanelRegionEnum mixpanelRegion) { - this.mixpanelRegion = Objects.requireNonNull(mixpanelRegion, "mixpanelRegion must not be null"); - return this; - } - - /** - *

Mixpanel Project Id

- *

Mixpanel Project Id

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("mixpanelProjectId") - public MixpanelServiceAccountUsernameStage mixpanelProjectId(@NotNull String mixpanelProjectId) { - this.mixpanelProjectId = Objects.requireNonNull(mixpanelProjectId, "mixpanelProjectId must not be null"); - return this; - } - - /** - *

Mixpanel Service Account Username

- *

Mixpanel Service Account Username

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("mixpanelServiceAccountUsername") - public _FinalStage mixpanelServiceAccountUsername(@NotNull String mixpanelServiceAccountUsername) { - this.mixpanelServiceAccountUsername = Objects.requireNonNull( - mixpanelServiceAccountUsername, "mixpanelServiceAccountUsername must not be null"); - return this; - } - - /** - *

Mixpanel Service Account Password

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage mixpanelServiceAccountPassword(String mixpanelServiceAccountPassword) { - this.mixpanelServiceAccountPassword = Optional.ofNullable(mixpanelServiceAccountPassword); - return this; - } - - /** - *

Mixpanel Service Account Password

- */ - @java.lang.Override - @JsonSetter(value = "mixpanelServiceAccountPassword", nulls = Nulls.SKIP) - public _FinalStage mixpanelServiceAccountPassword(Optional mixpanelServiceAccountPassword) { - this.mixpanelServiceAccountPassword = mixpanelServiceAccountPassword; - return this; - } - - @java.lang.Override - public LogStreamMixpanelSinkPatch build() { - return new LogStreamMixpanelSinkPatch( - mixpanelRegion, - mixpanelProjectId, - mixpanelServiceAccountUsername, - mixpanelServiceAccountPassword, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamPiiAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamPiiAlgorithmEnum.java deleted file mode 100644 index 2e0dd1153..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamPiiAlgorithmEnum.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamPiiAlgorithmEnum { - public static final LogStreamPiiAlgorithmEnum XXHASH = new LogStreamPiiAlgorithmEnum(Value.XXHASH, "xxhash"); - - private final Value value; - - private final String string; - - LogStreamPiiAlgorithmEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamPiiAlgorithmEnum - && this.string.equals(((LogStreamPiiAlgorithmEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case XXHASH: - return visitor.visitXxhash(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamPiiAlgorithmEnum valueOf(String value) { - switch (value) { - case "xxhash": - return XXHASH; - default: - return new LogStreamPiiAlgorithmEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - XXHASH, - - UNKNOWN - } - - public interface Visitor { - T visitXxhash(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamPiiConfig.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamPiiConfig.java deleted file mode 100644 index 7db276a56..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamPiiConfig.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = LogStreamPiiConfig.Builder.class) -public final class LogStreamPiiConfig { - private final List logFields; - - private final Optional method; - - private final Optional algorithm; - - private final Map additionalProperties; - - private LogStreamPiiConfig( - List logFields, - Optional method, - Optional algorithm, - Map additionalProperties) { - this.logFields = logFields; - this.method = method; - this.algorithm = algorithm; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("log_fields") - public List getLogFields() { - return logFields; - } - - @JsonProperty("method") - public Optional getMethod() { - return method; - } - - @JsonProperty("algorithm") - public Optional getAlgorithm() { - return algorithm; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamPiiConfig && equalTo((LogStreamPiiConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamPiiConfig other) { - return logFields.equals(other.logFields) && method.equals(other.method) && algorithm.equals(other.algorithm); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.logFields, this.method, this.algorithm); - } - - @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 logFields = new ArrayList<>(); - - private Optional method = Optional.empty(); - - private Optional algorithm = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(LogStreamPiiConfig other) { - logFields(other.getLogFields()); - method(other.getMethod()); - algorithm(other.getAlgorithm()); - return this; - } - - @JsonSetter(value = "log_fields", nulls = Nulls.SKIP) - public Builder logFields(List logFields) { - this.logFields.clear(); - if (logFields != null) { - this.logFields.addAll(logFields); - } - return this; - } - - public Builder addLogFields(LogStreamPiiLogFieldsEnum logFields) { - this.logFields.add(logFields); - return this; - } - - public Builder addAllLogFields(List logFields) { - if (logFields != null) { - this.logFields.addAll(logFields); - } - return this; - } - - @JsonSetter(value = "method", nulls = Nulls.SKIP) - public Builder method(Optional method) { - this.method = method; - return this; - } - - public Builder method(LogStreamPiiMethodEnum method) { - this.method = Optional.ofNullable(method); - return this; - } - - @JsonSetter(value = "algorithm", nulls = Nulls.SKIP) - public Builder algorithm(Optional algorithm) { - this.algorithm = algorithm; - return this; - } - - public Builder algorithm(LogStreamPiiAlgorithmEnum algorithm) { - this.algorithm = Optional.ofNullable(algorithm); - return this; - } - - public LogStreamPiiConfig build() { - return new LogStreamPiiConfig(logFields, method, algorithm, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamPiiLogFieldsEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamPiiLogFieldsEnum.java deleted file mode 100644 index aa094af5b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamPiiLogFieldsEnum.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamPiiLogFieldsEnum { - public static final LogStreamPiiLogFieldsEnum EMAIL = new LogStreamPiiLogFieldsEnum(Value.EMAIL, "email"); - - public static final LogStreamPiiLogFieldsEnum LAST_NAME = - new LogStreamPiiLogFieldsEnum(Value.LAST_NAME, "last_name"); - - public static final LogStreamPiiLogFieldsEnum PHONE = new LogStreamPiiLogFieldsEnum(Value.PHONE, "phone"); - - public static final LogStreamPiiLogFieldsEnum USERNAME = new LogStreamPiiLogFieldsEnum(Value.USERNAME, "username"); - - public static final LogStreamPiiLogFieldsEnum FIRST_NAME = - new LogStreamPiiLogFieldsEnum(Value.FIRST_NAME, "first_name"); - - public static final LogStreamPiiLogFieldsEnum ADDRESS = new LogStreamPiiLogFieldsEnum(Value.ADDRESS, "address"); - - private final Value value; - - private final String string; - - LogStreamPiiLogFieldsEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamPiiLogFieldsEnum - && this.string.equals(((LogStreamPiiLogFieldsEnum) 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 LAST_NAME: - return visitor.visitLastName(); - case PHONE: - return visitor.visitPhone(); - case USERNAME: - return visitor.visitUsername(); - case FIRST_NAME: - return visitor.visitFirstName(); - case ADDRESS: - return visitor.visitAddress(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamPiiLogFieldsEnum valueOf(String value) { - switch (value) { - case "email": - return EMAIL; - case "last_name": - return LAST_NAME; - case "phone": - return PHONE; - case "username": - return USERNAME; - case "first_name": - return FIRST_NAME; - case "address": - return ADDRESS; - default: - return new LogStreamPiiLogFieldsEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - FIRST_NAME, - - LAST_NAME, - - USERNAME, - - EMAIL, - - PHONE, - - ADDRESS, - - UNKNOWN - } - - public interface Visitor { - T visitFirstName(); - - T visitLastName(); - - T visitUsername(); - - T visitEmail(); - - T visitPhone(); - - T visitAddress(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamPiiMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamPiiMethodEnum.java deleted file mode 100644 index d45d816df..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamPiiMethodEnum.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamPiiMethodEnum { - public static final LogStreamPiiMethodEnum MASK = new LogStreamPiiMethodEnum(Value.MASK, "mask"); - - public static final LogStreamPiiMethodEnum HASH = new LogStreamPiiMethodEnum(Value.HASH, "hash"); - - private final Value value; - - private final String string; - - LogStreamPiiMethodEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamPiiMethodEnum - && this.string.equals(((LogStreamPiiMethodEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MASK: - return visitor.visitMask(); - case HASH: - return visitor.visitHash(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamPiiMethodEnum valueOf(String value) { - switch (value) { - case "mask": - return MASK; - case "hash": - return HASH; - default: - return new LogStreamPiiMethodEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - MASK, - - HASH, - - UNKNOWN - } - - public interface Visitor { - T visitMask(); - - T visitHash(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamResponseSchema.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamResponseSchema.java deleted file mode 100644 index 0e7be12ef..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamResponseSchema.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = LogStreamResponseSchema.Deserializer.class) -public final class LogStreamResponseSchema { - private final Object value; - - private final int type; - - private LogStreamResponseSchema(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((LogStreamHttpResponseSchema) this.value); - } else if (this.type == 1) { - return visitor.visit((LogStreamEventBridgeResponseSchema) this.value); - } else if (this.type == 2) { - return visitor.visit((LogStreamEventGridResponseSchema) this.value); - } else if (this.type == 3) { - return visitor.visit((LogStreamDatadogResponseSchema) this.value); - } else if (this.type == 4) { - return visitor.visit((LogStreamSplunkResponseSchema) this.value); - } else if (this.type == 5) { - return visitor.visit((LogStreamSumoResponseSchema) this.value); - } else if (this.type == 6) { - return visitor.visit((LogStreamSegmentResponseSchema) this.value); - } else if (this.type == 7) { - return visitor.visit((LogStreamMixpanelResponseSchema) 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 LogStreamResponseSchema && equalTo((LogStreamResponseSchema) other); - } - - private boolean equalTo(LogStreamResponseSchema 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 LogStreamResponseSchema of(LogStreamHttpResponseSchema value) { - return new LogStreamResponseSchema(value, 0); - } - - public static LogStreamResponseSchema of(LogStreamEventBridgeResponseSchema value) { - return new LogStreamResponseSchema(value, 1); - } - - public static LogStreamResponseSchema of(LogStreamEventGridResponseSchema value) { - return new LogStreamResponseSchema(value, 2); - } - - public static LogStreamResponseSchema of(LogStreamDatadogResponseSchema value) { - return new LogStreamResponseSchema(value, 3); - } - - public static LogStreamResponseSchema of(LogStreamSplunkResponseSchema value) { - return new LogStreamResponseSchema(value, 4); - } - - public static LogStreamResponseSchema of(LogStreamSumoResponseSchema value) { - return new LogStreamResponseSchema(value, 5); - } - - public static LogStreamResponseSchema of(LogStreamSegmentResponseSchema value) { - return new LogStreamResponseSchema(value, 6); - } - - public static LogStreamResponseSchema of(LogStreamMixpanelResponseSchema value) { - return new LogStreamResponseSchema(value, 7); - } - - public interface Visitor { - T visit(LogStreamHttpResponseSchema value); - - T visit(LogStreamEventBridgeResponseSchema value); - - T visit(LogStreamEventGridResponseSchema value); - - T visit(LogStreamDatadogResponseSchema value); - - T visit(LogStreamSplunkResponseSchema value); - - T visit(LogStreamSumoResponseSchema value); - - T visit(LogStreamSegmentResponseSchema value); - - T visit(LogStreamMixpanelResponseSchema value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(LogStreamResponseSchema.class); - } - - @java.lang.Override - public LogStreamResponseSchema deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamHttpResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamEventBridgeResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamEventGridResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamDatadogResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSplunkResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSumoResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSegmentResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamMixpanelResponseSchema.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamSegmentEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamSegmentEnum.java deleted file mode 100644 index e005b5c63..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamSegmentEnum.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamSegmentEnum { - public static final LogStreamSegmentEnum SEGMENT = new LogStreamSegmentEnum(Value.SEGMENT, "segment"); - - private final Value value; - - private final String string; - - LogStreamSegmentEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamSegmentEnum && this.string.equals(((LogStreamSegmentEnum) 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 UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamSegmentEnum valueOf(String value) { - switch (value) { - case "segment": - return SEGMENT; - default: - return new LogStreamSegmentEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - SEGMENT, - - UNKNOWN - } - - public interface Visitor { - T visitSegment(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamSegmentResponseSchema.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamSegmentResponseSchema.java deleted file mode 100644 index e1f540cd7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamSegmentResponseSchema.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.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LogStreamSegmentResponseSchema.Builder.class) -public final class LogStreamSegmentResponseSchema { - private final Optional id; - - private final Optional name; - - private final Optional status; - - private final Optional type; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final Optional sink; - - private final Map additionalProperties; - - private LogStreamSegmentResponseSchema( - Optional id, - Optional name, - Optional status, - Optional type, - Optional isPriority, - Optional> filters, - Optional piiConfig, - Optional sink, - Map additionalProperties) { - this.id = id; - this.name = name; - this.status = status; - this.type = type; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the log stream - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public Optional getSink() { - return sink; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamSegmentResponseSchema && equalTo((LogStreamSegmentResponseSchema) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamSegmentResponseSchema other) { - return id.equals(other.id) - && name.equals(other.name) - && status.equals(other.status) - && type.equals(other.type) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.name, this.status, this.type, this.isPriority, this.filters, this.piiConfig, this.sink); - } - - @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 status = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional sink = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(LogStreamSegmentResponseSchema other) { - id(other.getId()); - name(other.getName()); - status(other.getStatus()); - type(other.getType()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - return this; - } - - /** - *

The id of the log stream

- */ - @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; - } - - /** - *

log stream name

- */ - @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 = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(LogStreamStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(LogStreamSegmentEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public Builder isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - public Builder isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public Builder filters(Optional> filters) { - this.filters = filters; - return this; - } - - public Builder filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public Builder piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - public Builder piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @JsonSetter(value = "sink", nulls = Nulls.SKIP) - public Builder sink(Optional sink) { - this.sink = sink; - return this; - } - - public Builder sink(LogStreamSegmentSinkWriteKey sink) { - this.sink = Optional.ofNullable(sink); - return this; - } - - public LogStreamSegmentResponseSchema build() { - return new LogStreamSegmentResponseSchema( - id, name, status, type, isPriority, filters, piiConfig, sink, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamSegmentSink.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamSegmentSink.java deleted file mode 100644 index 26b9a8047..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamSegmentSink.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LogStreamSegmentSink.Builder.class) -public final class LogStreamSegmentSink { - private final Optional segmentWriteKey; - - private final Map additionalProperties; - - private LogStreamSegmentSink(Optional segmentWriteKey, Map additionalProperties) { - this.segmentWriteKey = segmentWriteKey; - this.additionalProperties = additionalProperties; - } - - /** - * @return Segment write key - */ - @JsonProperty("segmentWriteKey") - public Optional getSegmentWriteKey() { - return segmentWriteKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamSegmentSink && equalTo((LogStreamSegmentSink) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamSegmentSink other) { - return segmentWriteKey.equals(other.segmentWriteKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.segmentWriteKey); - } - - @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 segmentWriteKey = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(LogStreamSegmentSink other) { - segmentWriteKey(other.getSegmentWriteKey()); - return this; - } - - /** - *

Segment write key

- */ - @JsonSetter(value = "segmentWriteKey", nulls = Nulls.SKIP) - public Builder segmentWriteKey(Optional segmentWriteKey) { - this.segmentWriteKey = segmentWriteKey; - return this; - } - - public Builder segmentWriteKey(String segmentWriteKey) { - this.segmentWriteKey = Optional.ofNullable(segmentWriteKey); - return this; - } - - public LogStreamSegmentSink build() { - return new LogStreamSegmentSink(segmentWriteKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamSegmentSinkWriteKey.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamSegmentSinkWriteKey.java deleted file mode 100644 index b349b869f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamSegmentSinkWriteKey.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = LogStreamSegmentSinkWriteKey.Builder.class) -public final class LogStreamSegmentSinkWriteKey { - private final String segmentWriteKey; - - private final Map additionalProperties; - - private LogStreamSegmentSinkWriteKey(String segmentWriteKey, Map additionalProperties) { - this.segmentWriteKey = segmentWriteKey; - this.additionalProperties = additionalProperties; - } - - /** - * @return Segment write key - */ - @JsonProperty("segmentWriteKey") - public String getSegmentWriteKey() { - return segmentWriteKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamSegmentSinkWriteKey && equalTo((LogStreamSegmentSinkWriteKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamSegmentSinkWriteKey other) { - return segmentWriteKey.equals(other.segmentWriteKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.segmentWriteKey); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static SegmentWriteKeyStage builder() { - return new Builder(); - } - - public interface SegmentWriteKeyStage { - /** - *

Segment write key

- */ - _FinalStage segmentWriteKey(@NotNull String segmentWriteKey); - - Builder from(LogStreamSegmentSinkWriteKey other); - } - - public interface _FinalStage { - LogStreamSegmentSinkWriteKey build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements SegmentWriteKeyStage, _FinalStage { - private String segmentWriteKey; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(LogStreamSegmentSinkWriteKey other) { - segmentWriteKey(other.getSegmentWriteKey()); - return this; - } - - /** - *

Segment write key

- *

Segment write key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("segmentWriteKey") - public _FinalStage segmentWriteKey(@NotNull String segmentWriteKey) { - this.segmentWriteKey = Objects.requireNonNull(segmentWriteKey, "segmentWriteKey must not be null"); - return this; - } - - @java.lang.Override - public LogStreamSegmentSinkWriteKey build() { - return new LogStreamSegmentSinkWriteKey(segmentWriteKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamSinkPatch.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamSinkPatch.java deleted file mode 100644 index 594e4516a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamSinkPatch.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = LogStreamSinkPatch.Deserializer.class) -public final class LogStreamSinkPatch { - private final Object value; - - private final int type; - - private LogStreamSinkPatch(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((LogStreamHttpSink) this.value); - } else if (this.type == 1) { - return visitor.visit((LogStreamDatadogSink) this.value); - } else if (this.type == 2) { - return visitor.visit((LogStreamSplunkSink) this.value); - } else if (this.type == 3) { - return visitor.visit((LogStreamSumoSink) this.value); - } else if (this.type == 4) { - return visitor.visit((LogStreamSegmentSink) this.value); - } else if (this.type == 5) { - return visitor.visit((LogStreamMixpanelSinkPatch) 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 LogStreamSinkPatch && equalTo((LogStreamSinkPatch) other); - } - - private boolean equalTo(LogStreamSinkPatch 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 LogStreamSinkPatch of(LogStreamHttpSink value) { - return new LogStreamSinkPatch(value, 0); - } - - public static LogStreamSinkPatch of(LogStreamDatadogSink value) { - return new LogStreamSinkPatch(value, 1); - } - - public static LogStreamSinkPatch of(LogStreamSplunkSink value) { - return new LogStreamSinkPatch(value, 2); - } - - public static LogStreamSinkPatch of(LogStreamSumoSink value) { - return new LogStreamSinkPatch(value, 3); - } - - public static LogStreamSinkPatch of(LogStreamSegmentSink value) { - return new LogStreamSinkPatch(value, 4); - } - - public static LogStreamSinkPatch of(LogStreamMixpanelSinkPatch value) { - return new LogStreamSinkPatch(value, 5); - } - - public interface Visitor { - T visit(LogStreamHttpSink value); - - T visit(LogStreamDatadogSink value); - - T visit(LogStreamSplunkSink value); - - T visit(LogStreamSumoSink value); - - T visit(LogStreamSegmentSink value); - - T visit(LogStreamMixpanelSinkPatch value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(LogStreamSinkPatch.class); - } - - @java.lang.Override - public LogStreamSinkPatch deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamHttpSink.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamDatadogSink.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSplunkSink.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSumoSink.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSegmentSink.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamMixpanelSinkPatch.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamSplunkEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamSplunkEnum.java deleted file mode 100644 index 488097166..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamSplunkEnum.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamSplunkEnum { - public static final LogStreamSplunkEnum SPLUNK = new LogStreamSplunkEnum(Value.SPLUNK, "splunk"); - - private final Value value; - - private final String string; - - LogStreamSplunkEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamSplunkEnum && this.string.equals(((LogStreamSplunkEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SPLUNK: - return visitor.visitSplunk(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamSplunkEnum valueOf(String value) { - switch (value) { - case "splunk": - return SPLUNK; - default: - return new LogStreamSplunkEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - SPLUNK, - - UNKNOWN - } - - public interface Visitor { - T visitSplunk(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamSplunkResponseSchema.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamSplunkResponseSchema.java deleted file mode 100644 index fb9746a58..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamSplunkResponseSchema.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.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LogStreamSplunkResponseSchema.Builder.class) -public final class LogStreamSplunkResponseSchema { - private final Optional id; - - private final Optional name; - - private final Optional status; - - private final Optional type; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final Optional sink; - - private final Map additionalProperties; - - private LogStreamSplunkResponseSchema( - Optional id, - Optional name, - Optional status, - Optional type, - Optional isPriority, - Optional> filters, - Optional piiConfig, - Optional sink, - Map additionalProperties) { - this.id = id; - this.name = name; - this.status = status; - this.type = type; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the log stream - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public Optional getSink() { - return sink; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamSplunkResponseSchema && equalTo((LogStreamSplunkResponseSchema) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamSplunkResponseSchema other) { - return id.equals(other.id) - && name.equals(other.name) - && status.equals(other.status) - && type.equals(other.type) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.name, this.status, this.type, this.isPriority, this.filters, this.piiConfig, this.sink); - } - - @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 status = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional sink = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(LogStreamSplunkResponseSchema other) { - id(other.getId()); - name(other.getName()); - status(other.getStatus()); - type(other.getType()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - return this; - } - - /** - *

The id of the log stream

- */ - @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; - } - - /** - *

log stream name

- */ - @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 = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(LogStreamStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(LogStreamSplunkEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public Builder isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - public Builder isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public Builder filters(Optional> filters) { - this.filters = filters; - return this; - } - - public Builder filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public Builder piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - public Builder piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @JsonSetter(value = "sink", nulls = Nulls.SKIP) - public Builder sink(Optional sink) { - this.sink = sink; - return this; - } - - public Builder sink(LogStreamSplunkSink sink) { - this.sink = Optional.ofNullable(sink); - return this; - } - - public LogStreamSplunkResponseSchema build() { - return new LogStreamSplunkResponseSchema( - id, name, status, type, isPriority, filters, piiConfig, sink, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamSplunkSink.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamSplunkSink.java deleted file mode 100644 index 46a046528..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamSplunkSink.java +++ /dev/null @@ -1,221 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = LogStreamSplunkSink.Builder.class) -public final class LogStreamSplunkSink { - private final String splunkDomain; - - private final String splunkPort; - - private final String splunkToken; - - private final boolean splunkSecure; - - private final Map additionalProperties; - - private LogStreamSplunkSink( - String splunkDomain, - String splunkPort, - String splunkToken, - boolean splunkSecure, - Map additionalProperties) { - this.splunkDomain = splunkDomain; - this.splunkPort = splunkPort; - this.splunkToken = splunkToken; - this.splunkSecure = splunkSecure; - this.additionalProperties = additionalProperties; - } - - /** - * @return Splunk URL Endpoint - */ - @JsonProperty("splunkDomain") - public String getSplunkDomain() { - return splunkDomain; - } - - /** - * @return Port - */ - @JsonProperty("splunkPort") - public String getSplunkPort() { - return splunkPort; - } - - /** - * @return Splunk token - */ - @JsonProperty("splunkToken") - public String getSplunkToken() { - return splunkToken; - } - - /** - * @return Verify TLS certificate - */ - @JsonProperty("splunkSecure") - public boolean getSplunkSecure() { - return splunkSecure; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamSplunkSink && equalTo((LogStreamSplunkSink) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamSplunkSink other) { - return splunkDomain.equals(other.splunkDomain) - && splunkPort.equals(other.splunkPort) - && splunkToken.equals(other.splunkToken) - && splunkSecure == other.splunkSecure; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.splunkDomain, this.splunkPort, this.splunkToken, this.splunkSecure); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static SplunkDomainStage builder() { - return new Builder(); - } - - public interface SplunkDomainStage { - /** - *

Splunk URL Endpoint

- */ - SplunkPortStage splunkDomain(@NotNull String splunkDomain); - - Builder from(LogStreamSplunkSink other); - } - - public interface SplunkPortStage { - /** - *

Port

- */ - SplunkTokenStage splunkPort(@NotNull String splunkPort); - } - - public interface SplunkTokenStage { - /** - *

Splunk token

- */ - SplunkSecureStage splunkToken(@NotNull String splunkToken); - } - - public interface SplunkSecureStage { - /** - *

Verify TLS certificate

- */ - _FinalStage splunkSecure(boolean splunkSecure); - } - - public interface _FinalStage { - LogStreamSplunkSink build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements SplunkDomainStage, SplunkPortStage, SplunkTokenStage, SplunkSecureStage, _FinalStage { - private String splunkDomain; - - private String splunkPort; - - private String splunkToken; - - private boolean splunkSecure; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(LogStreamSplunkSink other) { - splunkDomain(other.getSplunkDomain()); - splunkPort(other.getSplunkPort()); - splunkToken(other.getSplunkToken()); - splunkSecure(other.getSplunkSecure()); - return this; - } - - /** - *

Splunk URL Endpoint

- *

Splunk URL Endpoint

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("splunkDomain") - public SplunkPortStage splunkDomain(@NotNull String splunkDomain) { - this.splunkDomain = Objects.requireNonNull(splunkDomain, "splunkDomain must not be null"); - return this; - } - - /** - *

Port

- *

Port

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("splunkPort") - public SplunkTokenStage splunkPort(@NotNull String splunkPort) { - this.splunkPort = Objects.requireNonNull(splunkPort, "splunkPort must not be null"); - return this; - } - - /** - *

Splunk token

- *

Splunk token

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("splunkToken") - public SplunkSecureStage splunkToken(@NotNull String splunkToken) { - this.splunkToken = Objects.requireNonNull(splunkToken, "splunkToken must not be null"); - return this; - } - - /** - *

Verify TLS certificate

- *

Verify TLS certificate

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("splunkSecure") - public _FinalStage splunkSecure(boolean splunkSecure) { - this.splunkSecure = splunkSecure; - return this; - } - - @java.lang.Override - public LogStreamSplunkSink build() { - return new LogStreamSplunkSink(splunkDomain, splunkPort, splunkToken, splunkSecure, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamStatusEnum.java deleted file mode 100644 index 4fb5fa90b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamStatusEnum.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamStatusEnum { - public static final LogStreamStatusEnum PAUSED = new LogStreamStatusEnum(Value.PAUSED, "paused"); - - public static final LogStreamStatusEnum SUSPENDED = new LogStreamStatusEnum(Value.SUSPENDED, "suspended"); - - public static final LogStreamStatusEnum ACTIVE = new LogStreamStatusEnum(Value.ACTIVE, "active"); - - private final Value value; - - private final String string; - - LogStreamStatusEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamStatusEnum && this.string.equals(((LogStreamStatusEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PAUSED: - return visitor.visitPaused(); - case SUSPENDED: - return visitor.visitSuspended(); - case ACTIVE: - return visitor.visitActive(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamStatusEnum valueOf(String value) { - switch (value) { - case "paused": - return PAUSED; - case "suspended": - return SUSPENDED; - case "active": - return ACTIVE; - default: - return new LogStreamStatusEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - ACTIVE, - - PAUSED, - - SUSPENDED, - - UNKNOWN - } - - public interface Visitor { - T visitActive(); - - T visitPaused(); - - T visitSuspended(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamSumoEnum.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamSumoEnum.java deleted file mode 100644 index 396f34d26..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamSumoEnum.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class LogStreamSumoEnum { - public static final LogStreamSumoEnum SUMO = new LogStreamSumoEnum(Value.SUMO, "sumo"); - - private final Value value; - - private final String string; - - LogStreamSumoEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof LogStreamSumoEnum && this.string.equals(((LogStreamSumoEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SUMO: - return visitor.visitSumo(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static LogStreamSumoEnum valueOf(String value) { - switch (value) { - case "sumo": - return SUMO; - default: - return new LogStreamSumoEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - SUMO, - - UNKNOWN - } - - public interface Visitor { - T visitSumo(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamSumoResponseSchema.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamSumoResponseSchema.java deleted file mode 100644 index 85cd136e1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamSumoResponseSchema.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.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LogStreamSumoResponseSchema.Builder.class) -public final class LogStreamSumoResponseSchema { - private final Optional id; - - private final Optional name; - - private final Optional status; - - private final Optional type; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final Optional sink; - - private final Map additionalProperties; - - private LogStreamSumoResponseSchema( - Optional id, - Optional name, - Optional status, - Optional type, - Optional isPriority, - Optional> filters, - Optional piiConfig, - Optional sink, - Map additionalProperties) { - this.id = id; - this.name = name; - this.status = status; - this.type = type; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the log stream - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public Optional getSink() { - return sink; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamSumoResponseSchema && equalTo((LogStreamSumoResponseSchema) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamSumoResponseSchema other) { - return id.equals(other.id) - && name.equals(other.name) - && status.equals(other.status) - && type.equals(other.type) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.name, this.status, this.type, this.isPriority, this.filters, this.piiConfig, this.sink); - } - - @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 status = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional sink = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(LogStreamSumoResponseSchema other) { - id(other.getId()); - name(other.getName()); - status(other.getStatus()); - type(other.getType()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - return this; - } - - /** - *

The id of the log stream

- */ - @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; - } - - /** - *

log stream name

- */ - @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 = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(LogStreamStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(LogStreamSumoEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public Builder isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - public Builder isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public Builder filters(Optional> filters) { - this.filters = filters; - return this; - } - - public Builder filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public Builder piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - public Builder piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @JsonSetter(value = "sink", nulls = Nulls.SKIP) - public Builder sink(Optional sink) { - this.sink = sink; - return this; - } - - public Builder sink(LogStreamSumoSink sink) { - this.sink = Optional.ofNullable(sink); - return this; - } - - public LogStreamSumoResponseSchema build() { - return new LogStreamSumoResponseSchema( - id, name, status, type, isPriority, filters, piiConfig, sink, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/LogStreamSumoSink.java b/src/main/java/com/auth0/client/mgmt/types/LogStreamSumoSink.java deleted file mode 100644 index 5b26ddfea..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/LogStreamSumoSink.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = LogStreamSumoSink.Builder.class) -public final class LogStreamSumoSink { - private final String sumoSourceAddress; - - private final Map additionalProperties; - - private LogStreamSumoSink(String sumoSourceAddress, Map additionalProperties) { - this.sumoSourceAddress = sumoSourceAddress; - this.additionalProperties = additionalProperties; - } - - /** - * @return HTTP Source Address - */ - @JsonProperty("sumoSourceAddress") - public String getSumoSourceAddress() { - return sumoSourceAddress; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LogStreamSumoSink && equalTo((LogStreamSumoSink) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LogStreamSumoSink other) { - return sumoSourceAddress.equals(other.sumoSourceAddress); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.sumoSourceAddress); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static SumoSourceAddressStage builder() { - return new Builder(); - } - - public interface SumoSourceAddressStage { - /** - *

HTTP Source Address

- */ - _FinalStage sumoSourceAddress(@NotNull String sumoSourceAddress); - - Builder from(LogStreamSumoSink other); - } - - public interface _FinalStage { - LogStreamSumoSink build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements SumoSourceAddressStage, _FinalStage { - private String sumoSourceAddress; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(LogStreamSumoSink other) { - sumoSourceAddress(other.getSumoSourceAddress()); - return this; - } - - /** - *

HTTP Source Address

- *

HTTP Source Address

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("sumoSourceAddress") - public _FinalStage sumoSourceAddress(@NotNull String sumoSourceAddress) { - this.sumoSourceAddress = Objects.requireNonNull(sumoSourceAddress, "sumoSourceAddress must not be null"); - return this; - } - - @java.lang.Override - public LogStreamSumoSink build() { - return new LogStreamSumoSink(sumoSourceAddress, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/MdlPresentationProperties.java b/src/main/java/com/auth0/client/mgmt/types/MdlPresentationProperties.java deleted file mode 100644 index db2e7af83..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/MdlPresentationProperties.java +++ /dev/null @@ -1,746 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = MdlPresentationProperties.Builder.class) -public final class MdlPresentationProperties { - private final Optional familyName; - - private final Optional givenName; - - private final Optional birthDate; - - private final Optional issueDate; - - private final Optional expiryDate; - - private final Optional issuingCountry; - - private final Optional issuingAuthority; - - private final Optional portrait; - - private final Optional drivingPrivileges; - - private final Optional residentAddress; - - private final Optional portraitCaptureDate; - - private final Optional ageInYears; - - private final Optional ageBirthYear; - - private final Optional issuingJurisdiction; - - private final Optional nationality; - - private final Optional residentCity; - - private final Optional residentState; - - private final Optional residentPostalCode; - - private final Optional residentCountry; - - private final Optional familyNameNationalCharacter; - - private final Optional givenNameNationalCharacter; - - private final Map additionalProperties; - - private MdlPresentationProperties( - Optional familyName, - Optional givenName, - Optional birthDate, - Optional issueDate, - Optional expiryDate, - Optional issuingCountry, - Optional issuingAuthority, - Optional portrait, - Optional drivingPrivileges, - Optional residentAddress, - Optional portraitCaptureDate, - Optional ageInYears, - Optional ageBirthYear, - Optional issuingJurisdiction, - Optional nationality, - Optional residentCity, - Optional residentState, - Optional residentPostalCode, - Optional residentCountry, - Optional familyNameNationalCharacter, - Optional givenNameNationalCharacter, - Map additionalProperties) { - this.familyName = familyName; - this.givenName = givenName; - this.birthDate = birthDate; - this.issueDate = issueDate; - this.expiryDate = expiryDate; - this.issuingCountry = issuingCountry; - this.issuingAuthority = issuingAuthority; - this.portrait = portrait; - this.drivingPrivileges = drivingPrivileges; - this.residentAddress = residentAddress; - this.portraitCaptureDate = portraitCaptureDate; - this.ageInYears = ageInYears; - this.ageBirthYear = ageBirthYear; - this.issuingJurisdiction = issuingJurisdiction; - this.nationality = nationality; - this.residentCity = residentCity; - this.residentState = residentState; - this.residentPostalCode = residentPostalCode; - this.residentCountry = residentCountry; - this.familyNameNationalCharacter = familyNameNationalCharacter; - this.givenNameNationalCharacter = givenNameNationalCharacter; - this.additionalProperties = additionalProperties; - } - - /** - * @return Family Name - */ - @JsonProperty("family_name") - public Optional getFamilyName() { - return familyName; - } - - /** - * @return Given Name - */ - @JsonProperty("given_name") - public Optional getGivenName() { - return givenName; - } - - /** - * @return Birth Date - */ - @JsonProperty("birth_date") - public Optional getBirthDate() { - return birthDate; - } - - /** - * @return Issue Date - */ - @JsonProperty("issue_date") - public Optional getIssueDate() { - return issueDate; - } - - /** - * @return Expiry Date - */ - @JsonProperty("expiry_date") - public Optional getExpiryDate() { - return expiryDate; - } - - /** - * @return Issuing Country - */ - @JsonProperty("issuing_country") - public Optional getIssuingCountry() { - return issuingCountry; - } - - /** - * @return Issuing Authority - */ - @JsonProperty("issuing_authority") - public Optional getIssuingAuthority() { - return issuingAuthority; - } - - /** - * @return Portrait - */ - @JsonProperty("portrait") - public Optional getPortrait() { - return portrait; - } - - /** - * @return Driving Privileges - */ - @JsonProperty("driving_privileges") - public Optional getDrivingPrivileges() { - return drivingPrivileges; - } - - /** - * @return Resident Address - */ - @JsonProperty("resident_address") - public Optional getResidentAddress() { - return residentAddress; - } - - /** - * @return Portrait Capture Date - */ - @JsonProperty("portrait_capture_date") - public Optional getPortraitCaptureDate() { - return portraitCaptureDate; - } - - /** - * @return Age in Years - */ - @JsonProperty("age_in_years") - public Optional getAgeInYears() { - return ageInYears; - } - - /** - * @return Age Birth Year - */ - @JsonProperty("age_birth_year") - public Optional getAgeBirthYear() { - return ageBirthYear; - } - - /** - * @return Issuing Jurisdiction - */ - @JsonProperty("issuing_jurisdiction") - public Optional getIssuingJurisdiction() { - return issuingJurisdiction; - } - - /** - * @return Nationality - */ - @JsonProperty("nationality") - public Optional getNationality() { - return nationality; - } - - /** - * @return Resident City - */ - @JsonProperty("resident_city") - public Optional getResidentCity() { - return residentCity; - } - - /** - * @return Resident State - */ - @JsonProperty("resident_state") - public Optional getResidentState() { - return residentState; - } - - /** - * @return Resident Postal Code - */ - @JsonProperty("resident_postal_code") - public Optional getResidentPostalCode() { - return residentPostalCode; - } - - /** - * @return Resident Country - */ - @JsonProperty("resident_country") - public Optional getResidentCountry() { - return residentCountry; - } - - /** - * @return Family Name National Character - */ - @JsonProperty("family_name_national_character") - public Optional getFamilyNameNationalCharacter() { - return familyNameNationalCharacter; - } - - /** - * @return Given Name National Character - */ - @JsonProperty("given_name_national_character") - public Optional getGivenNameNationalCharacter() { - return givenNameNationalCharacter; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof MdlPresentationProperties && equalTo((MdlPresentationProperties) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(MdlPresentationProperties other) { - return familyName.equals(other.familyName) - && givenName.equals(other.givenName) - && birthDate.equals(other.birthDate) - && issueDate.equals(other.issueDate) - && expiryDate.equals(other.expiryDate) - && issuingCountry.equals(other.issuingCountry) - && issuingAuthority.equals(other.issuingAuthority) - && portrait.equals(other.portrait) - && drivingPrivileges.equals(other.drivingPrivileges) - && residentAddress.equals(other.residentAddress) - && portraitCaptureDate.equals(other.portraitCaptureDate) - && ageInYears.equals(other.ageInYears) - && ageBirthYear.equals(other.ageBirthYear) - && issuingJurisdiction.equals(other.issuingJurisdiction) - && nationality.equals(other.nationality) - && residentCity.equals(other.residentCity) - && residentState.equals(other.residentState) - && residentPostalCode.equals(other.residentPostalCode) - && residentCountry.equals(other.residentCountry) - && familyNameNationalCharacter.equals(other.familyNameNationalCharacter) - && givenNameNationalCharacter.equals(other.givenNameNationalCharacter); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.familyName, - this.givenName, - this.birthDate, - this.issueDate, - this.expiryDate, - this.issuingCountry, - this.issuingAuthority, - this.portrait, - this.drivingPrivileges, - this.residentAddress, - this.portraitCaptureDate, - this.ageInYears, - this.ageBirthYear, - this.issuingJurisdiction, - this.nationality, - this.residentCity, - this.residentState, - this.residentPostalCode, - this.residentCountry, - this.familyNameNationalCharacter, - this.givenNameNationalCharacter); - } - - @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 familyName = Optional.empty(); - - private Optional givenName = Optional.empty(); - - private Optional birthDate = Optional.empty(); - - private Optional issueDate = Optional.empty(); - - private Optional expiryDate = Optional.empty(); - - private Optional issuingCountry = Optional.empty(); - - private Optional issuingAuthority = Optional.empty(); - - private Optional portrait = Optional.empty(); - - private Optional drivingPrivileges = Optional.empty(); - - private Optional residentAddress = Optional.empty(); - - private Optional portraitCaptureDate = Optional.empty(); - - private Optional ageInYears = Optional.empty(); - - private Optional ageBirthYear = Optional.empty(); - - private Optional issuingJurisdiction = Optional.empty(); - - private Optional nationality = Optional.empty(); - - private Optional residentCity = Optional.empty(); - - private Optional residentState = Optional.empty(); - - private Optional residentPostalCode = Optional.empty(); - - private Optional residentCountry = Optional.empty(); - - private Optional familyNameNationalCharacter = Optional.empty(); - - private Optional givenNameNationalCharacter = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(MdlPresentationProperties other) { - familyName(other.getFamilyName()); - givenName(other.getGivenName()); - birthDate(other.getBirthDate()); - issueDate(other.getIssueDate()); - expiryDate(other.getExpiryDate()); - issuingCountry(other.getIssuingCountry()); - issuingAuthority(other.getIssuingAuthority()); - portrait(other.getPortrait()); - drivingPrivileges(other.getDrivingPrivileges()); - residentAddress(other.getResidentAddress()); - portraitCaptureDate(other.getPortraitCaptureDate()); - ageInYears(other.getAgeInYears()); - ageBirthYear(other.getAgeBirthYear()); - issuingJurisdiction(other.getIssuingJurisdiction()); - nationality(other.getNationality()); - residentCity(other.getResidentCity()); - residentState(other.getResidentState()); - residentPostalCode(other.getResidentPostalCode()); - residentCountry(other.getResidentCountry()); - familyNameNationalCharacter(other.getFamilyNameNationalCharacter()); - givenNameNationalCharacter(other.getGivenNameNationalCharacter()); - return this; - } - - /** - *

Family Name

- */ - @JsonSetter(value = "family_name", nulls = Nulls.SKIP) - public Builder familyName(Optional familyName) { - this.familyName = familyName; - return this; - } - - public Builder familyName(Boolean familyName) { - this.familyName = Optional.ofNullable(familyName); - return this; - } - - /** - *

Given Name

- */ - @JsonSetter(value = "given_name", nulls = Nulls.SKIP) - public Builder givenName(Optional givenName) { - this.givenName = givenName; - return this; - } - - public Builder givenName(Boolean givenName) { - this.givenName = Optional.ofNullable(givenName); - return this; - } - - /** - *

Birth Date

- */ - @JsonSetter(value = "birth_date", nulls = Nulls.SKIP) - public Builder birthDate(Optional birthDate) { - this.birthDate = birthDate; - return this; - } - - public Builder birthDate(Boolean birthDate) { - this.birthDate = Optional.ofNullable(birthDate); - return this; - } - - /** - *

Issue Date

- */ - @JsonSetter(value = "issue_date", nulls = Nulls.SKIP) - public Builder issueDate(Optional issueDate) { - this.issueDate = issueDate; - return this; - } - - public Builder issueDate(Boolean issueDate) { - this.issueDate = Optional.ofNullable(issueDate); - return this; - } - - /** - *

Expiry Date

- */ - @JsonSetter(value = "expiry_date", nulls = Nulls.SKIP) - public Builder expiryDate(Optional expiryDate) { - this.expiryDate = expiryDate; - return this; - } - - public Builder expiryDate(Boolean expiryDate) { - this.expiryDate = Optional.ofNullable(expiryDate); - return this; - } - - /** - *

Issuing Country

- */ - @JsonSetter(value = "issuing_country", nulls = Nulls.SKIP) - public Builder issuingCountry(Optional issuingCountry) { - this.issuingCountry = issuingCountry; - return this; - } - - public Builder issuingCountry(Boolean issuingCountry) { - this.issuingCountry = Optional.ofNullable(issuingCountry); - return this; - } - - /** - *

Issuing Authority

- */ - @JsonSetter(value = "issuing_authority", nulls = Nulls.SKIP) - public Builder issuingAuthority(Optional issuingAuthority) { - this.issuingAuthority = issuingAuthority; - return this; - } - - public Builder issuingAuthority(Boolean issuingAuthority) { - this.issuingAuthority = Optional.ofNullable(issuingAuthority); - return this; - } - - /** - *

Portrait

- */ - @JsonSetter(value = "portrait", nulls = Nulls.SKIP) - public Builder portrait(Optional portrait) { - this.portrait = portrait; - return this; - } - - public Builder portrait(Boolean portrait) { - this.portrait = Optional.ofNullable(portrait); - return this; - } - - /** - *

Driving Privileges

- */ - @JsonSetter(value = "driving_privileges", nulls = Nulls.SKIP) - public Builder drivingPrivileges(Optional drivingPrivileges) { - this.drivingPrivileges = drivingPrivileges; - return this; - } - - public Builder drivingPrivileges(Boolean drivingPrivileges) { - this.drivingPrivileges = Optional.ofNullable(drivingPrivileges); - return this; - } - - /** - *

Resident Address

- */ - @JsonSetter(value = "resident_address", nulls = Nulls.SKIP) - public Builder residentAddress(Optional residentAddress) { - this.residentAddress = residentAddress; - return this; - } - - public Builder residentAddress(Boolean residentAddress) { - this.residentAddress = Optional.ofNullable(residentAddress); - return this; - } - - /** - *

Portrait Capture Date

- */ - @JsonSetter(value = "portrait_capture_date", nulls = Nulls.SKIP) - public Builder portraitCaptureDate(Optional portraitCaptureDate) { - this.portraitCaptureDate = portraitCaptureDate; - return this; - } - - public Builder portraitCaptureDate(Boolean portraitCaptureDate) { - this.portraitCaptureDate = Optional.ofNullable(portraitCaptureDate); - return this; - } - - /** - *

Age in Years

- */ - @JsonSetter(value = "age_in_years", nulls = Nulls.SKIP) - public Builder ageInYears(Optional ageInYears) { - this.ageInYears = ageInYears; - return this; - } - - public Builder ageInYears(Boolean ageInYears) { - this.ageInYears = Optional.ofNullable(ageInYears); - return this; - } - - /** - *

Age Birth Year

- */ - @JsonSetter(value = "age_birth_year", nulls = Nulls.SKIP) - public Builder ageBirthYear(Optional ageBirthYear) { - this.ageBirthYear = ageBirthYear; - return this; - } - - public Builder ageBirthYear(Boolean ageBirthYear) { - this.ageBirthYear = Optional.ofNullable(ageBirthYear); - return this; - } - - /** - *

Issuing Jurisdiction

- */ - @JsonSetter(value = "issuing_jurisdiction", nulls = Nulls.SKIP) - public Builder issuingJurisdiction(Optional issuingJurisdiction) { - this.issuingJurisdiction = issuingJurisdiction; - return this; - } - - public Builder issuingJurisdiction(Boolean issuingJurisdiction) { - this.issuingJurisdiction = Optional.ofNullable(issuingJurisdiction); - return this; - } - - /** - *

Nationality

- */ - @JsonSetter(value = "nationality", nulls = Nulls.SKIP) - public Builder nationality(Optional nationality) { - this.nationality = nationality; - return this; - } - - public Builder nationality(Boolean nationality) { - this.nationality = Optional.ofNullable(nationality); - return this; - } - - /** - *

Resident City

- */ - @JsonSetter(value = "resident_city", nulls = Nulls.SKIP) - public Builder residentCity(Optional residentCity) { - this.residentCity = residentCity; - return this; - } - - public Builder residentCity(Boolean residentCity) { - this.residentCity = Optional.ofNullable(residentCity); - return this; - } - - /** - *

Resident State

- */ - @JsonSetter(value = "resident_state", nulls = Nulls.SKIP) - public Builder residentState(Optional residentState) { - this.residentState = residentState; - return this; - } - - public Builder residentState(Boolean residentState) { - this.residentState = Optional.ofNullable(residentState); - return this; - } - - /** - *

Resident Postal Code

- */ - @JsonSetter(value = "resident_postal_code", nulls = Nulls.SKIP) - public Builder residentPostalCode(Optional residentPostalCode) { - this.residentPostalCode = residentPostalCode; - return this; - } - - public Builder residentPostalCode(Boolean residentPostalCode) { - this.residentPostalCode = Optional.ofNullable(residentPostalCode); - return this; - } - - /** - *

Resident Country

- */ - @JsonSetter(value = "resident_country", nulls = Nulls.SKIP) - public Builder residentCountry(Optional residentCountry) { - this.residentCountry = residentCountry; - return this; - } - - public Builder residentCountry(Boolean residentCountry) { - this.residentCountry = Optional.ofNullable(residentCountry); - return this; - } - - /** - *

Family Name National Character

- */ - @JsonSetter(value = "family_name_national_character", nulls = Nulls.SKIP) - public Builder familyNameNationalCharacter(Optional familyNameNationalCharacter) { - this.familyNameNationalCharacter = familyNameNationalCharacter; - return this; - } - - public Builder familyNameNationalCharacter(Boolean familyNameNationalCharacter) { - this.familyNameNationalCharacter = Optional.ofNullable(familyNameNationalCharacter); - return this; - } - - /** - *

Given Name National Character

- */ - @JsonSetter(value = "given_name_national_character", nulls = Nulls.SKIP) - public Builder givenNameNationalCharacter(Optional givenNameNationalCharacter) { - this.givenNameNationalCharacter = givenNameNationalCharacter; - return this; - } - - public Builder givenNameNationalCharacter(Boolean givenNameNationalCharacter) { - this.givenNameNationalCharacter = Optional.ofNullable(givenNameNationalCharacter); - return this; - } - - public MdlPresentationProperties build() { - return new MdlPresentationProperties( - familyName, - givenName, - birthDate, - issueDate, - expiryDate, - issuingCountry, - issuingAuthority, - portrait, - drivingPrivileges, - residentAddress, - portraitCaptureDate, - ageInYears, - ageBirthYear, - issuingJurisdiction, - nationality, - residentCity, - residentState, - residentPostalCode, - residentCountry, - familyNameNationalCharacter, - givenNameNationalCharacter, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/MdlPresentationRequest.java b/src/main/java/com/auth0/client/mgmt/types/MdlPresentationRequest.java deleted file mode 100644 index e9eb58149..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/MdlPresentationRequest.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = MdlPresentationRequest.Builder.class) -public final class MdlPresentationRequest { - private final MdlPresentationRequestProperties orgIso1801351MDl; - - private final Map additionalProperties; - - private MdlPresentationRequest( - MdlPresentationRequestProperties orgIso1801351MDl, Map additionalProperties) { - this.orgIso1801351MDl = orgIso1801351MDl; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("org.iso.18013.5.1.mDL") - public MdlPresentationRequestProperties getOrgIso1801351MDl() { - return orgIso1801351MDl; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof MdlPresentationRequest && equalTo((MdlPresentationRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(MdlPresentationRequest other) { - return orgIso1801351MDl.equals(other.orgIso1801351MDl); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.orgIso1801351MDl); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static OrgIso1801351MDlStage builder() { - return new Builder(); - } - - public interface OrgIso1801351MDlStage { - _FinalStage orgIso1801351MDl(@NotNull MdlPresentationRequestProperties orgIso1801351MDl); - - Builder from(MdlPresentationRequest other); - } - - public interface _FinalStage { - MdlPresentationRequest build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements OrgIso1801351MDlStage, _FinalStage { - private MdlPresentationRequestProperties orgIso1801351MDl; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(MdlPresentationRequest other) { - orgIso1801351MDl(other.getOrgIso1801351MDl()); - return this; - } - - @java.lang.Override - @JsonSetter("org.iso.18013.5.1.mDL") - public _FinalStage orgIso1801351MDl(@NotNull MdlPresentationRequestProperties orgIso1801351MDl) { - this.orgIso1801351MDl = Objects.requireNonNull(orgIso1801351MDl, "orgIso1801351MDl must not be null"); - return this; - } - - @java.lang.Override - public MdlPresentationRequest build() { - return new MdlPresentationRequest(orgIso1801351MDl, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/MdlPresentationRequestProperties.java b/src/main/java/com/auth0/client/mgmt/types/MdlPresentationRequestProperties.java deleted file mode 100644 index dde377856..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/MdlPresentationRequestProperties.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = MdlPresentationRequestProperties.Builder.class) -public final class MdlPresentationRequestProperties { - private final MdlPresentationProperties orgIso1801351; - - private final Map additionalProperties; - - private MdlPresentationRequestProperties( - MdlPresentationProperties orgIso1801351, Map additionalProperties) { - this.orgIso1801351 = orgIso1801351; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("org.iso.18013.5.1") - public MdlPresentationProperties getOrgIso1801351() { - return orgIso1801351; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof MdlPresentationRequestProperties && equalTo((MdlPresentationRequestProperties) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(MdlPresentationRequestProperties other) { - return orgIso1801351.equals(other.orgIso1801351); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.orgIso1801351); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static OrgIso1801351Stage builder() { - return new Builder(); - } - - public interface OrgIso1801351Stage { - _FinalStage orgIso1801351(@NotNull MdlPresentationProperties orgIso1801351); - - Builder from(MdlPresentationRequestProperties other); - } - - public interface _FinalStage { - MdlPresentationRequestProperties build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements OrgIso1801351Stage, _FinalStage { - private MdlPresentationProperties orgIso1801351; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(MdlPresentationRequestProperties other) { - orgIso1801351(other.getOrgIso1801351()); - return this; - } - - @java.lang.Override - @JsonSetter("org.iso.18013.5.1") - public _FinalStage orgIso1801351(@NotNull MdlPresentationProperties orgIso1801351) { - this.orgIso1801351 = Objects.requireNonNull(orgIso1801351, "orgIso1801351 must not be null"); - return this; - } - - @java.lang.Override - public MdlPresentationRequestProperties build() { - return new MdlPresentationRequestProperties(orgIso1801351, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/MfaPolicyEnum.java b/src/main/java/com/auth0/client/mgmt/types/MfaPolicyEnum.java deleted file mode 100644 index 4acf60e81..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/MfaPolicyEnum.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class MfaPolicyEnum { - public static final MfaPolicyEnum CONFIDENCE_SCORE = new MfaPolicyEnum(Value.CONFIDENCE_SCORE, "confidence-score"); - - public static final MfaPolicyEnum ALL_APPLICATIONS = new MfaPolicyEnum(Value.ALL_APPLICATIONS, "all-applications"); - - private final Value value; - - private final String string; - - MfaPolicyEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof MfaPolicyEnum && this.string.equals(((MfaPolicyEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CONFIDENCE_SCORE: - return visitor.visitConfidenceScore(); - case ALL_APPLICATIONS: - return visitor.visitAllApplications(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static MfaPolicyEnum valueOf(String value) { - switch (value) { - case "confidence-score": - return CONFIDENCE_SCORE; - case "all-applications": - return ALL_APPLICATIONS; - default: - return new MfaPolicyEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - ALL_APPLICATIONS, - - CONFIDENCE_SCORE, - - UNKNOWN - } - - public interface Visitor { - T visitAllApplications(); - - T visitConfidenceScore(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/NativeSocialLogin.java b/src/main/java/com/auth0/client/mgmt/types/NativeSocialLogin.java deleted file mode 100644 index bef1b4f76..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/NativeSocialLogin.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = NativeSocialLogin.Builder.class) -public final class NativeSocialLogin { - private final Optional apple; - - private final Optional facebook; - - private final Optional google; - - private final Map additionalProperties; - - private NativeSocialLogin( - Optional apple, - Optional facebook, - Optional google, - Map additionalProperties) { - this.apple = apple; - this.facebook = facebook; - this.google = google; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("apple") - public Optional getApple() { - return apple; - } - - @JsonProperty("facebook") - public Optional getFacebook() { - return facebook; - } - - @JsonProperty("google") - public Optional getGoogle() { - return google; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof NativeSocialLogin && equalTo((NativeSocialLogin) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(NativeSocialLogin other) { - return apple.equals(other.apple) && facebook.equals(other.facebook) && google.equals(other.google); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.apple, this.facebook, this.google); - } - - @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 apple = Optional.empty(); - - private Optional facebook = Optional.empty(); - - private Optional google = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(NativeSocialLogin other) { - apple(other.getApple()); - facebook(other.getFacebook()); - google(other.getGoogle()); - return this; - } - - @JsonSetter(value = "apple", nulls = Nulls.SKIP) - public Builder apple(Optional apple) { - this.apple = apple; - return this; - } - - public Builder apple(NativeSocialLoginApple apple) { - this.apple = Optional.ofNullable(apple); - return this; - } - - @JsonSetter(value = "facebook", nulls = Nulls.SKIP) - public Builder facebook(Optional facebook) { - this.facebook = facebook; - return this; - } - - public Builder facebook(NativeSocialLoginFacebook facebook) { - this.facebook = Optional.ofNullable(facebook); - return this; - } - - @JsonSetter(value = "google", nulls = Nulls.SKIP) - public Builder google(Optional google) { - this.google = google; - return this; - } - - public Builder google(NativeSocialLoginGoogle google) { - this.google = Optional.ofNullable(google); - return this; - } - - public NativeSocialLogin build() { - return new NativeSocialLogin(apple, facebook, google, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginApple.java b/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginApple.java deleted file mode 100644 index ba6330302..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginApple.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = NativeSocialLoginApple.Builder.class) -public final class NativeSocialLoginApple { - private final Optional enabled; - - private final Map additionalProperties; - - private NativeSocialLoginApple(Optional enabled, Map additionalProperties) { - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Determine whether or not to allow signing in natively using an Apple authorization code - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof NativeSocialLoginApple && equalTo((NativeSocialLoginApple) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(NativeSocialLoginApple other) { - return enabled.equals(other.enabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 enabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(NativeSocialLoginApple other) { - enabled(other.getEnabled()); - return this; - } - - /** - *

Determine whether or not to allow signing in natively using an Apple authorization code

- */ - @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 NativeSocialLoginApple build() { - return new NativeSocialLoginApple(enabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginFacebook.java b/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginFacebook.java deleted file mode 100644 index 0af39c46e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginFacebook.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = NativeSocialLoginFacebook.Builder.class) -public final class NativeSocialLoginFacebook { - private final Optional enabled; - - private final Map additionalProperties; - - private NativeSocialLoginFacebook(Optional enabled, Map additionalProperties) { - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Determine whether or not to allow signing in natively using Facebook - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof NativeSocialLoginFacebook && equalTo((NativeSocialLoginFacebook) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(NativeSocialLoginFacebook other) { - return enabled.equals(other.enabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 enabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(NativeSocialLoginFacebook other) { - enabled(other.getEnabled()); - return this; - } - - /** - *

Determine whether or not to allow signing in natively using Facebook

- */ - @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 NativeSocialLoginFacebook build() { - return new NativeSocialLoginFacebook(enabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginGoogle.java b/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginGoogle.java deleted file mode 100644 index be456d506..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/NativeSocialLoginGoogle.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = NativeSocialLoginGoogle.Builder.class) -public final class NativeSocialLoginGoogle { - private final Optional enabled; - - private final Map additionalProperties; - - private NativeSocialLoginGoogle(Optional enabled, Map additionalProperties) { - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Determine whether or not to allow signing in natively using a Google ID token - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof NativeSocialLoginGoogle && equalTo((NativeSocialLoginGoogle) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(NativeSocialLoginGoogle other) { - return enabled.equals(other.enabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(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 enabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(NativeSocialLoginGoogle other) { - enabled(other.getEnabled()); - return this; - } - - /** - *

Determine whether or not to allow signing in natively using a Google ID token

- */ - @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 NativeSocialLoginGoogle build() { - return new NativeSocialLoginGoogle(enabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/NetworkAclAction.java b/src/main/java/com/auth0/client/mgmt/types/NetworkAclAction.java deleted file mode 100644 index 4a59f950e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/NetworkAclAction.java +++ /dev/null @@ -1,199 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = NetworkAclAction.Builder.class) -public final class NetworkAclAction { - private final Optional block; - - private final Optional allow; - - private final Optional log; - - private final Optional redirect; - - private final Optional redirectUri; - - private final Map additionalProperties; - - private NetworkAclAction( - Optional block, - Optional allow, - Optional log, - Optional redirect, - Optional redirectUri, - Map additionalProperties) { - this.block = block; - this.allow = allow; - this.log = log; - this.redirect = redirect; - this.redirectUri = redirectUri; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("block") - public Optional getBlock() { - return block; - } - - @JsonProperty("allow") - public Optional getAllow() { - return allow; - } - - @JsonProperty("log") - public Optional getLog() { - return log; - } - - @JsonProperty("redirect") - public Optional getRedirect() { - return redirect; - } - - /** - * @return The URI to which the match or not_match requests will be routed - */ - @JsonProperty("redirect_uri") - public Optional getRedirectUri() { - return redirectUri; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof NetworkAclAction && equalTo((NetworkAclAction) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(NetworkAclAction other) { - return block.equals(other.block) - && allow.equals(other.allow) - && log.equals(other.log) - && redirect.equals(other.redirect) - && redirectUri.equals(other.redirectUri); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.block, this.allow, this.log, this.redirect, this.redirectUri); - } - - @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 block = Optional.empty(); - - private Optional allow = Optional.empty(); - - private Optional log = Optional.empty(); - - private Optional redirect = Optional.empty(); - - private Optional redirectUri = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(NetworkAclAction other) { - block(other.getBlock()); - allow(other.getAllow()); - log(other.getLog()); - redirect(other.getRedirect()); - redirectUri(other.getRedirectUri()); - return this; - } - - @JsonSetter(value = "block", nulls = Nulls.SKIP) - public Builder block(Optional block) { - this.block = block; - return this; - } - - public Builder block(Boolean block) { - this.block = Optional.ofNullable(block); - return this; - } - - @JsonSetter(value = "allow", nulls = Nulls.SKIP) - public Builder allow(Optional allow) { - this.allow = allow; - return this; - } - - public Builder allow(Boolean allow) { - this.allow = Optional.ofNullable(allow); - return this; - } - - @JsonSetter(value = "log", nulls = Nulls.SKIP) - public Builder log(Optional log) { - this.log = log; - return this; - } - - public Builder log(Boolean log) { - this.log = Optional.ofNullable(log); - return this; - } - - @JsonSetter(value = "redirect", nulls = Nulls.SKIP) - public Builder redirect(Optional redirect) { - this.redirect = redirect; - return this; - } - - public Builder redirect(Boolean redirect) { - this.redirect = Optional.ofNullable(redirect); - return this; - } - - /** - *

The URI to which the match or not_match requests will be routed

- */ - @JsonSetter(value = "redirect_uri", nulls = Nulls.SKIP) - public Builder redirectUri(Optional redirectUri) { - this.redirectUri = redirectUri; - return this; - } - - public Builder redirectUri(String redirectUri) { - this.redirectUri = Optional.ofNullable(redirectUri); - return this; - } - - public NetworkAclAction build() { - return new NetworkAclAction(block, allow, log, redirect, redirectUri, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/NetworkAclMatch.java b/src/main/java/com/auth0/client/mgmt/types/NetworkAclMatch.java deleted file mode 100644 index d58a63488..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/NetworkAclMatch.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = NetworkAclMatch.Builder.class) -public final class NetworkAclMatch { - private final Optional> asns; - - private final Optional> geoCountryCodes; - - private final Optional> geoSubdivisionCodes; - - private final Optional> ipv4Cidrs; - - private final Optional> ipv6Cidrs; - - private final Optional> ja3Fingerprints; - - private final Optional> ja4Fingerprints; - - private final Optional> userAgents; - - private final Map additionalProperties; - - private NetworkAclMatch( - Optional> asns, - Optional> geoCountryCodes, - Optional> geoSubdivisionCodes, - Optional> ipv4Cidrs, - Optional> ipv6Cidrs, - Optional> ja3Fingerprints, - Optional> ja4Fingerprints, - Optional> userAgents, - Map additionalProperties) { - this.asns = asns; - this.geoCountryCodes = geoCountryCodes; - this.geoSubdivisionCodes = geoSubdivisionCodes; - this.ipv4Cidrs = ipv4Cidrs; - this.ipv6Cidrs = ipv6Cidrs; - this.ja3Fingerprints = ja3Fingerprints; - this.ja4Fingerprints = ja4Fingerprints; - this.userAgents = userAgents; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("asns") - public Optional> getAsns() { - return asns; - } - - @JsonProperty("geo_country_codes") - public Optional> getGeoCountryCodes() { - return geoCountryCodes; - } - - @JsonProperty("geo_subdivision_codes") - public Optional> getGeoSubdivisionCodes() { - return geoSubdivisionCodes; - } - - @JsonProperty("ipv4_cidrs") - public Optional> getIpv4Cidrs() { - return ipv4Cidrs; - } - - @JsonProperty("ipv6_cidrs") - public Optional> getIpv6Cidrs() { - return ipv6Cidrs; - } - - @JsonProperty("ja3_fingerprints") - public Optional> getJa3Fingerprints() { - return ja3Fingerprints; - } - - @JsonProperty("ja4_fingerprints") - public Optional> getJa4Fingerprints() { - return ja4Fingerprints; - } - - @JsonProperty("user_agents") - public Optional> getUserAgents() { - return userAgents; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof NetworkAclMatch && equalTo((NetworkAclMatch) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(NetworkAclMatch other) { - return asns.equals(other.asns) - && geoCountryCodes.equals(other.geoCountryCodes) - && geoSubdivisionCodes.equals(other.geoSubdivisionCodes) - && ipv4Cidrs.equals(other.ipv4Cidrs) - && ipv6Cidrs.equals(other.ipv6Cidrs) - && ja3Fingerprints.equals(other.ja3Fingerprints) - && ja4Fingerprints.equals(other.ja4Fingerprints) - && userAgents.equals(other.userAgents); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.asns, - this.geoCountryCodes, - this.geoSubdivisionCodes, - this.ipv4Cidrs, - this.ipv6Cidrs, - this.ja3Fingerprints, - this.ja4Fingerprints, - this.userAgents); - } - - @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> asns = Optional.empty(); - - private Optional> geoCountryCodes = Optional.empty(); - - private Optional> geoSubdivisionCodes = Optional.empty(); - - private Optional> ipv4Cidrs = Optional.empty(); - - private Optional> ipv6Cidrs = Optional.empty(); - - private Optional> ja3Fingerprints = Optional.empty(); - - private Optional> ja4Fingerprints = Optional.empty(); - - private Optional> userAgents = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(NetworkAclMatch other) { - asns(other.getAsns()); - geoCountryCodes(other.getGeoCountryCodes()); - geoSubdivisionCodes(other.getGeoSubdivisionCodes()); - ipv4Cidrs(other.getIpv4Cidrs()); - ipv6Cidrs(other.getIpv6Cidrs()); - ja3Fingerprints(other.getJa3Fingerprints()); - ja4Fingerprints(other.getJa4Fingerprints()); - userAgents(other.getUserAgents()); - return this; - } - - @JsonSetter(value = "asns", nulls = Nulls.SKIP) - public Builder asns(Optional> asns) { - this.asns = asns; - return this; - } - - public Builder asns(List asns) { - this.asns = Optional.ofNullable(asns); - return this; - } - - @JsonSetter(value = "geo_country_codes", nulls = Nulls.SKIP) - public Builder geoCountryCodes(Optional> geoCountryCodes) { - this.geoCountryCodes = geoCountryCodes; - return this; - } - - public Builder geoCountryCodes(List geoCountryCodes) { - this.geoCountryCodes = Optional.ofNullable(geoCountryCodes); - return this; - } - - @JsonSetter(value = "geo_subdivision_codes", nulls = Nulls.SKIP) - public Builder geoSubdivisionCodes(Optional> geoSubdivisionCodes) { - this.geoSubdivisionCodes = geoSubdivisionCodes; - return this; - } - - public Builder geoSubdivisionCodes(List geoSubdivisionCodes) { - this.geoSubdivisionCodes = Optional.ofNullable(geoSubdivisionCodes); - return this; - } - - @JsonSetter(value = "ipv4_cidrs", nulls = Nulls.SKIP) - public Builder ipv4Cidrs(Optional> ipv4Cidrs) { - this.ipv4Cidrs = ipv4Cidrs; - return this; - } - - public Builder ipv4Cidrs(List ipv4Cidrs) { - this.ipv4Cidrs = Optional.ofNullable(ipv4Cidrs); - return this; - } - - @JsonSetter(value = "ipv6_cidrs", nulls = Nulls.SKIP) - public Builder ipv6Cidrs(Optional> ipv6Cidrs) { - this.ipv6Cidrs = ipv6Cidrs; - return this; - } - - public Builder ipv6Cidrs(List ipv6Cidrs) { - this.ipv6Cidrs = Optional.ofNullable(ipv6Cidrs); - return this; - } - - @JsonSetter(value = "ja3_fingerprints", nulls = Nulls.SKIP) - public Builder ja3Fingerprints(Optional> ja3Fingerprints) { - this.ja3Fingerprints = ja3Fingerprints; - return this; - } - - public Builder ja3Fingerprints(List ja3Fingerprints) { - this.ja3Fingerprints = Optional.ofNullable(ja3Fingerprints); - return this; - } - - @JsonSetter(value = "ja4_fingerprints", nulls = Nulls.SKIP) - public Builder ja4Fingerprints(Optional> ja4Fingerprints) { - this.ja4Fingerprints = ja4Fingerprints; - return this; - } - - public Builder ja4Fingerprints(List ja4Fingerprints) { - this.ja4Fingerprints = Optional.ofNullable(ja4Fingerprints); - return this; - } - - @JsonSetter(value = "user_agents", nulls = Nulls.SKIP) - public Builder userAgents(Optional> userAgents) { - this.userAgents = userAgents; - return this; - } - - public Builder userAgents(List userAgents) { - this.userAgents = Optional.ofNullable(userAgents); - return this; - } - - public NetworkAclMatch build() { - return new NetworkAclMatch( - asns, - geoCountryCodes, - geoSubdivisionCodes, - ipv4Cidrs, - ipv6Cidrs, - ja3Fingerprints, - ja4Fingerprints, - userAgents, - 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 deleted file mode 100644 index 8511f8a3d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/NetworkAclRule.java +++ /dev/null @@ -1,190 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = NetworkAclRule.Builder.class) -public final class NetworkAclRule { - private final NetworkAclAction action; - - private final Optional match; - - private final Optional notMatch; - - private final NetworkAclRuleScopeEnum scope; - - private final Map additionalProperties; - - private NetworkAclRule( - NetworkAclAction action, - Optional match, - Optional notMatch, - NetworkAclRuleScopeEnum scope, - Map additionalProperties) { - this.action = action; - this.match = match; - this.notMatch = notMatch; - this.scope = scope; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("action") - public NetworkAclAction getAction() { - return action; - } - - @JsonProperty("match") - public Optional getMatch() { - return match; - } - - @JsonProperty("not_match") - public Optional getNotMatch() { - return notMatch; - } - - @JsonProperty("scope") - public NetworkAclRuleScopeEnum getScope() { - return scope; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof NetworkAclRule && equalTo((NetworkAclRule) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(NetworkAclRule other) { - return action.equals(other.action) - && match.equals(other.match) - && notMatch.equals(other.notMatch) - && scope.equals(other.scope); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.action, this.match, this.notMatch, this.scope); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ActionStage builder() { - return new Builder(); - } - - public interface ActionStage { - ScopeStage action(@NotNull NetworkAclAction action); - - Builder from(NetworkAclRule other); - } - - public interface ScopeStage { - _FinalStage scope(@NotNull NetworkAclRuleScopeEnum scope); - } - - public interface _FinalStage { - NetworkAclRule build(); - - _FinalStage match(Optional match); - - _FinalStage match(NetworkAclMatch match); - - _FinalStage notMatch(Optional notMatch); - - _FinalStage notMatch(NetworkAclMatch notMatch); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ActionStage, ScopeStage, _FinalStage { - private NetworkAclAction action; - - private NetworkAclRuleScopeEnum scope; - - private Optional notMatch = Optional.empty(); - - private Optional match = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(NetworkAclRule other) { - action(other.getAction()); - match(other.getMatch()); - notMatch(other.getNotMatch()); - scope(other.getScope()); - return this; - } - - @java.lang.Override - @JsonSetter("action") - public ScopeStage action(@NotNull NetworkAclAction action) { - this.action = Objects.requireNonNull(action, "action must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("scope") - public _FinalStage scope(@NotNull NetworkAclRuleScopeEnum scope) { - this.scope = Objects.requireNonNull(scope, "scope must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage notMatch(NetworkAclMatch notMatch) { - this.notMatch = Optional.ofNullable(notMatch); - return this; - } - - @java.lang.Override - @JsonSetter(value = "not_match", nulls = Nulls.SKIP) - public _FinalStage notMatch(Optional notMatch) { - this.notMatch = notMatch; - return this; - } - - @java.lang.Override - public _FinalStage match(NetworkAclMatch match) { - this.match = Optional.ofNullable(match); - return this; - } - - @java.lang.Override - @JsonSetter(value = "match", nulls = Nulls.SKIP) - public _FinalStage match(Optional match) { - this.match = match; - return this; - } - - @java.lang.Override - public NetworkAclRule build() { - return new NetworkAclRule(action, match, notMatch, scope, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/NetworkAclRuleScopeEnum.java b/src/main/java/com/auth0/client/mgmt/types/NetworkAclRuleScopeEnum.java deleted file mode 100644 index eb3c7ed21..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/NetworkAclRuleScopeEnum.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class NetworkAclRuleScopeEnum { - public static final NetworkAclRuleScopeEnum AUTHENTICATION = - new NetworkAclRuleScopeEnum(Value.AUTHENTICATION, "authentication"); - - public static final NetworkAclRuleScopeEnum MANAGEMENT = - new NetworkAclRuleScopeEnum(Value.MANAGEMENT, "management"); - - public static final NetworkAclRuleScopeEnum TENANT = new NetworkAclRuleScopeEnum(Value.TENANT, "tenant"); - - public static final NetworkAclRuleScopeEnum DYNAMIC_CLIENT_REGISTRATION = - new NetworkAclRuleScopeEnum(Value.DYNAMIC_CLIENT_REGISTRATION, "dynamic_client_registration"); - - private final Value value; - - private final String string; - - NetworkAclRuleScopeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof NetworkAclRuleScopeEnum - && this.string.equals(((NetworkAclRuleScopeEnum) 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 MANAGEMENT: - return visitor.visitManagement(); - case TENANT: - return visitor.visitTenant(); - case DYNAMIC_CLIENT_REGISTRATION: - return visitor.visitDynamicClientRegistration(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static NetworkAclRuleScopeEnum valueOf(String value) { - switch (value) { - case "authentication": - return AUTHENTICATION; - case "management": - return MANAGEMENT; - case "tenant": - return TENANT; - case "dynamic_client_registration": - return DYNAMIC_CLIENT_REGISTRATION; - default: - return new NetworkAclRuleScopeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - MANAGEMENT, - - AUTHENTICATION, - - TENANT, - - DYNAMIC_CLIENT_REGISTRATION, - - UNKNOWN - } - - public interface Visitor { - T visitManagement(); - - T visitAuthentication(); - - T visitTenant(); - - T visitDynamicClientRegistration(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/NetworkAclsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/NetworkAclsResponseContent.java deleted file mode 100644 index 6ab74dbe1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/NetworkAclsResponseContent.java +++ /dev/null @@ -1,255 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = NetworkAclsResponseContent.Builder.class) -public final class NetworkAclsResponseContent { - private final Optional id; - - private final Optional description; - - private final Optional active; - - private final Optional priority; - - private final Optional rule; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private NetworkAclsResponseContent( - Optional id, - Optional description, - Optional active, - Optional priority, - Optional rule, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.description = description; - this.active = active; - this.priority = priority; - this.rule = rule; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - @JsonProperty("active") - public Optional getActive() { - return active; - } - - @JsonProperty("priority") - public Optional getPriority() { - return priority; - } - - @JsonProperty("rule") - public Optional getRule() { - return rule; - } - - /** - * @return The timestamp when the Network ACL Configuration was created - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The timestamp when the Network ACL Configuration was last updated - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof NetworkAclsResponseContent && equalTo((NetworkAclsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(NetworkAclsResponseContent other) { - return id.equals(other.id) - && description.equals(other.description) - && active.equals(other.active) - && priority.equals(other.priority) - && rule.equals(other.rule) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.description, this.active, this.priority, this.rule, this.createdAt, this.updatedAt); - } - - @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 description = Optional.empty(); - - private Optional active = Optional.empty(); - - private Optional priority = Optional.empty(); - - private Optional rule = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(NetworkAclsResponseContent other) { - id(other.getId()); - description(other.getDescription()); - active(other.getActive()); - priority(other.getPriority()); - rule(other.getRule()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - 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 = "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; - } - - @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 = "priority", nulls = Nulls.SKIP) - public Builder priority(Optional priority) { - this.priority = priority; - return this; - } - - public Builder priority(Double priority) { - this.priority = Optional.ofNullable(priority); - return this; - } - - @JsonSetter(value = "rule", nulls = Nulls.SKIP) - public Builder rule(Optional rule) { - this.rule = rule; - return this; - } - - public Builder rule(NetworkAclRule rule) { - this.rule = Optional.ofNullable(rule); - return this; - } - - /** - *

The timestamp when the Network ACL Configuration was created

- */ - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(String createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - /** - *

The timestamp when the Network ACL Configuration was last updated

- */ - @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - public Builder updatedAt(String updatedAt) { - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - public NetworkAclsResponseContent build() { - return new NetworkAclsResponseContent( - id, description, active, priority, rule, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/OauthScope.java b/src/main/java/com/auth0/client/mgmt/types/OauthScope.java deleted file mode 100644 index fdc2f00ea..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/OauthScope.java +++ /dev/null @@ -1,2398 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class OauthScope { - public static final OauthScope READ_AUTHENTICATION_METHODS = - new OauthScope(Value.READ_AUTHENTICATION_METHODS, "read:authentication_methods"); - - public static final OauthScope UPDATE_CLIENT_TOKEN_VAULT_PRIVILEGED_ACCESS = new OauthScope( - Value.UPDATE_CLIENT_TOKEN_VAULT_PRIVILEGED_ACCESS, "update:client_token_vault_privileged_access"); - - public static final OauthScope UPDATE_USERS_APP_METADATA = - new OauthScope(Value.UPDATE_USERS_APP_METADATA, "update:users_app_metadata"); - - public static final OauthScope READ_ANOMALY_BLOCKS = - new OauthScope(Value.READ_ANOMALY_BLOCKS, "read:anomaly_blocks"); - - public static final OauthScope READ_CLIENT_SUMMARY = - new OauthScope(Value.READ_CLIENT_SUMMARY, "read:client_summary"); - - public static final OauthScope READ_SCIM_CONFIG = new OauthScope(Value.READ_SCIM_CONFIG, "read:scim_config"); - - public static final OauthScope CREATE_RULES = new OauthScope(Value.CREATE_RULES, "create:rules"); - - public static final OauthScope UPDATE_SCIM_CONFIG = new OauthScope(Value.UPDATE_SCIM_CONFIG, "update:scim_config"); - - public static final OauthScope READ_PROMPTS = new OauthScope(Value.READ_PROMPTS, "read:prompts"); - - public static final OauthScope CREATE_ORGANIZATION_DISCOVERY_DOMAINS = - new OauthScope(Value.CREATE_ORGANIZATION_DISCOVERY_DOMAINS, "create:organization_discovery_domains"); - - public static final OauthScope CREATE_PHONE_TEMPLATES = - new OauthScope(Value.CREATE_PHONE_TEMPLATES, "create:phone_templates"); - - public static final OauthScope UPDATE_PHONE_PROVIDERS = - new OauthScope(Value.UPDATE_PHONE_PROVIDERS, "update:phone_providers"); - - public static final OauthScope CREATE_ROLES = new OauthScope(Value.CREATE_ROLES, "create:roles"); - - public static final OauthScope DELETE_AUTHENTICATION_METHODS = - new OauthScope(Value.DELETE_AUTHENTICATION_METHODS, "delete:authentication_methods"); - - public static final OauthScope CREATE_CONNECTIONS_KEYS = - new OauthScope(Value.CREATE_CONNECTIONS_KEYS, "create:connections_keys"); - - public static final OauthScope UPDATE_RULES = new OauthScope(Value.UPDATE_RULES, "update:rules"); - - public static final OauthScope UPDATE_FLOWS_VAULT_CONNECTIONS = - new OauthScope(Value.UPDATE_FLOWS_VAULT_CONNECTIONS, "update:flows_vault_connections"); - - public static final OauthScope READ_ENCRYPTION_KEYS = - new OauthScope(Value.READ_ENCRYPTION_KEYS, "read:encryption_keys"); - - public static final OauthScope DELETE_SESSIONS = new OauthScope(Value.DELETE_SESSIONS, "delete:sessions"); - - public static final OauthScope UPDATE_ACTIONS = new OauthScope(Value.UPDATE_ACTIONS, "update:actions"); - - public static final OauthScope CREATE_EVENT_STREAMS = - new OauthScope(Value.CREATE_EVENT_STREAMS, "create:event_streams"); - - public static final OauthScope DELETE_EVENT_STREAMS = - new OauthScope(Value.DELETE_EVENT_STREAMS, "delete:event_streams"); - - public static final OauthScope DELETE_FLOWS = new OauthScope(Value.DELETE_FLOWS, "delete:flows"); - - public static final OauthScope DELETE_PHONE_PROVIDERS = - new OauthScope(Value.DELETE_PHONE_PROVIDERS, "delete:phone_providers"); - - public static final OauthScope DELETE_SELF_SERVICE_PROFILES = - new OauthScope(Value.DELETE_SELF_SERVICE_PROFILES, "delete:self_service_profiles"); - - public static final OauthScope READ_GROUP_MEMBERS = new OauthScope(Value.READ_GROUP_MEMBERS, "read:group_members"); - - public static final OauthScope CREATE_SIGNING_KEYS = - new OauthScope(Value.CREATE_SIGNING_KEYS, "create:signing_keys"); - - public static final OauthScope UPDATE_SIGNING_KEYS = - new OauthScope(Value.UPDATE_SIGNING_KEYS, "update:signing_keys"); - - public static final OauthScope CREATE_USER_TICKETS = - new OauthScope(Value.CREATE_USER_TICKETS, "create:user_tickets"); - - public static final OauthScope DELETE_GRANTS = new OauthScope(Value.DELETE_GRANTS, "delete:grants"); - - public static final OauthScope DELETE_REFRESH_TOKENS = - new OauthScope(Value.DELETE_REFRESH_TOKENS, "delete:refresh_tokens"); - - public static final OauthScope READ_RULES_CONFIGS = new OauthScope(Value.READ_RULES_CONFIGS, "read:rules_configs"); - - public static final OauthScope CREATE_SELF_SERVICE_PROFILES = - new OauthScope(Value.CREATE_SELF_SERVICE_PROFILES, "create:self_service_profiles"); - - public static final OauthScope UPDATE_REFRESH_TOKENS = - new OauthScope(Value.UPDATE_REFRESH_TOKENS, "update:refresh_tokens"); - - public static final OauthScope READ_USER_IDP_TOKENS = - new OauthScope(Value.READ_USER_IDP_TOKENS, "read:user_idp_tokens"); - - public static final OauthScope READ_CUSTOM_SIGNING_KEYS = - new OauthScope(Value.READ_CUSTOM_SIGNING_KEYS, "read:custom_signing_keys"); - - public static final OauthScope READ_HOOKS = new OauthScope(Value.READ_HOOKS, "read:hooks"); - - public static final OauthScope CREATE_CURRENT_USER_DEVICE_CREDENTIALS = - new OauthScope(Value.CREATE_CURRENT_USER_DEVICE_CREDENTIALS, "create:current_user_device_credentials"); - - public static final OauthScope DELETE_BRANDING = new OauthScope(Value.DELETE_BRANDING, "delete:branding"); - - public static final OauthScope DELETE_CLIENT_CREDENTIALS = - new OauthScope(Value.DELETE_CLIENT_CREDENTIALS, "delete:client_credentials"); - - public static final OauthScope UPDATE_TENANT_SETTINGS = - new OauthScope(Value.UPDATE_TENANT_SETTINGS, "update:tenant_settings"); - - public static final OauthScope READ_ORGANIZATION_INVITATIONS = - new OauthScope(Value.READ_ORGANIZATION_INVITATIONS, "read:organization_invitations"); - - public static final OauthScope READ_GRANTS = new OauthScope(Value.READ_GRANTS, "read:grants"); - - public static final OauthScope DELETE_ORGANIZATION_INVITATIONS = - new OauthScope(Value.DELETE_ORGANIZATION_INVITATIONS, "delete:organization_invitations"); - - public static final OauthScope UPDATE_RULES_CONFIGS = - new OauthScope(Value.UPDATE_RULES_CONFIGS, "update:rules_configs"); - - public static final OauthScope UPDATE_CONNECTION_PROFILES = - new OauthScope(Value.UPDATE_CONNECTION_PROFILES, "update:connection_profiles"); - - public static final OauthScope READ_GROUPS = new OauthScope(Value.READ_GROUPS, "read:groups"); - - public static final OauthScope DELETE_ACTIONS = new OauthScope(Value.DELETE_ACTIONS, "delete:actions"); - - public static final OauthScope UPDATE_AUTHENTICATION_METHODS = - new OauthScope(Value.UPDATE_AUTHENTICATION_METHODS, "update:authentication_methods"); - - public static final OauthScope CREATE_VDCS_TEMPLATES = - new OauthScope(Value.CREATE_VDCS_TEMPLATES, "create:vdcs_templates"); - - public static final OauthScope READ_ATTACK_PROTECTION = - new OauthScope(Value.READ_ATTACK_PROTECTION, "read:attack_protection"); - - public static final OauthScope READ_ORGANIZATION_DISCOVERY_DOMAINS = - new OauthScope(Value.READ_ORGANIZATION_DISCOVERY_DOMAINS, "read:organization_discovery_domains"); - - public static final OauthScope CREATE_CUSTOM_DOMAINS = - new OauthScope(Value.CREATE_CUSTOM_DOMAINS, "create:custom_domains"); - - public static final OauthScope READ_CURRENT_USER = new OauthScope(Value.READ_CURRENT_USER, "read:current_user"); - - public static final OauthScope DELETE_ORGANIZATION_CONNECTIONS = - new OauthScope(Value.DELETE_ORGANIZATION_CONNECTIONS, "delete:organization_connections"); - - public static final OauthScope READ_CLIENT_CREDENTIALS = - new OauthScope(Value.READ_CLIENT_CREDENTIALS, "read:client_credentials"); - - public static final OauthScope CREATE_ORGANIZATIONS = - new OauthScope(Value.CREATE_ORGANIZATIONS, "create:organizations"); - - public static final OauthScope READ_ORGANIZATIONS_SUMMARY = - new OauthScope(Value.READ_ORGANIZATIONS_SUMMARY, "read:organizations_summary"); - - public static final OauthScope DELETE_ORGANIZATIONS = - new OauthScope(Value.DELETE_ORGANIZATIONS, "delete:organizations"); - - public static final OauthScope READ_SCIM_TOKEN = new OauthScope(Value.READ_SCIM_TOKEN, "read:scim_token"); - - public static final OauthScope READ_CONNECTIONS = new OauthScope(Value.READ_CONNECTIONS, "read:connections"); - - public static final OauthScope READ_SIGNING_KEYS = new OauthScope(Value.READ_SIGNING_KEYS, "read:signing_keys"); - - public static final OauthScope DELETE_FEDERATED_CONNECTIONS_TOKENS = - new OauthScope(Value.DELETE_FEDERATED_CONNECTIONS_TOKENS, "delete:federated_connections_tokens"); - - public static final OauthScope DELETE_CONNECTIONS = new OauthScope(Value.DELETE_CONNECTIONS, "delete:connections"); - - public static final OauthScope UPDATE_RESOURCE_SERVERS = - new OauthScope(Value.UPDATE_RESOURCE_SERVERS, "update:resource_servers"); - - public static final OauthScope CREATE_USERS = new OauthScope(Value.CREATE_USERS, "create:users"); - - public static final OauthScope READ_PHONE_TEMPLATES = - new OauthScope(Value.READ_PHONE_TEMPLATES, "read:phone_templates"); - - public static final OauthScope UPDATE_ROLES = new OauthScope(Value.UPDATE_ROLES, "update:roles"); - - public static final OauthScope CREATE_SSO_ACCESS_TICKETS = - new OauthScope(Value.CREATE_SSO_ACCESS_TICKETS, "create:sso_access_tickets"); - - public static final OauthScope READ_SELF_SERVICE_PROFILE_CUSTOM_TEXTS = - new OauthScope(Value.READ_SELF_SERVICE_PROFILE_CUSTOM_TEXTS, "read:self_service_profile_custom_texts"); - - public static final OauthScope DELETE_SCIM_TOKEN = new OauthScope(Value.DELETE_SCIM_TOKEN, "delete:scim_token"); - - public static final OauthScope DELETE_FORMS = new OauthScope(Value.DELETE_FORMS, "delete:forms"); - - public static final OauthScope READ_SELF_SERVICE_PROFILES = - new OauthScope(Value.READ_SELF_SERVICE_PROFILES, "read:self_service_profiles"); - - public static final OauthScope DELETE_RULES_CONFIGS = - new OauthScope(Value.DELETE_RULES_CONFIGS, "delete:rules_configs"); - - public static final OauthScope CREATE_FORMS = new OauthScope(Value.CREATE_FORMS, "create:forms"); - - public static final OauthScope READ_USER_ATTRIBUTE_PROFILES = - new OauthScope(Value.READ_USER_ATTRIBUTE_PROFILES, "read:user_attribute_profiles"); - - public static final OauthScope READ_DIRECTORY_PROVISIONINGS = - new OauthScope(Value.READ_DIRECTORY_PROVISIONINGS, "read:directory_provisionings"); - - public static final OauthScope CREATE_AUTHENTICATION_METHODS = - new OauthScope(Value.CREATE_AUTHENTICATION_METHODS, "create:authentication_methods"); - - public static final OauthScope CREATE_PHONE_PROVIDERS = - new OauthScope(Value.CREATE_PHONE_PROVIDERS, "create:phone_providers"); - - public static final OauthScope DELETE_ORGANIZATION_CLIENT_GRANTS = - new OauthScope(Value.DELETE_ORGANIZATION_CLIENT_GRANTS, "delete:organization_client_grants"); - - public static final OauthScope CREATE_SCIM_CONFIG = new OauthScope(Value.CREATE_SCIM_CONFIG, "create:scim_config"); - - public static final OauthScope CREATE_CLIENTS = new OauthScope(Value.CREATE_CLIENTS, "create:clients"); - - public static final OauthScope UPDATE_USERS = new OauthScope(Value.UPDATE_USERS, "update:users"); - - public static final OauthScope READ_ORGANIZATION_MEMBERS = - new OauthScope(Value.READ_ORGANIZATION_MEMBERS, "read:organization_members"); - - public static final OauthScope UPDATE_EVENT_STREAMS = - new OauthScope(Value.UPDATE_EVENT_STREAMS, "update:event_streams"); - - public static final OauthScope UPDATE_CUSTOM_SIGNING_KEYS = - new OauthScope(Value.UPDATE_CUSTOM_SIGNING_KEYS, "update:custom_signing_keys"); - - public static final OauthScope READ_LOG_STREAMS = new OauthScope(Value.READ_LOG_STREAMS, "read:log_streams"); - - public static final OauthScope UPDATE_LOG_STREAMS = new OauthScope(Value.UPDATE_LOG_STREAMS, "update:log_streams"); - - public static final OauthScope READ_CLIENTS = new OauthScope(Value.READ_CLIENTS, "read:clients"); - - public static final OauthScope DELETE_ENCRYPTION_KEYS = - new OauthScope(Value.DELETE_ENCRYPTION_KEYS, "delete:encryption_keys"); - - public static final OauthScope UPDATE_USER_ATTRIBUTE_PROFILES = - new OauthScope(Value.UPDATE_USER_ATTRIBUTE_PROFILES, "update:user_attribute_profiles"); - - public static final OauthScope CREATE_CUSTOM_SIGNING_KEYS = - new OauthScope(Value.CREATE_CUSTOM_SIGNING_KEYS, "create:custom_signing_keys"); - - public static final OauthScope READ_CLIENT_KEYS = new OauthScope(Value.READ_CLIENT_KEYS, "read:client_keys"); - - public static final OauthScope CREATE_EMAIL_PROVIDER = - new OauthScope(Value.CREATE_EMAIL_PROVIDER, "create:email_provider"); - - public static final OauthScope UPDATE_NETWORK_ACLS = - new OauthScope(Value.UPDATE_NETWORK_ACLS, "update:network_acls"); - - public static final OauthScope DELETE_VDCS_TEMPLATES = - new OauthScope(Value.DELETE_VDCS_TEMPLATES, "delete:vdcs_templates"); - - public static final OauthScope READ_FLOWS = new OauthScope(Value.READ_FLOWS, "read:flows"); - - public static final OauthScope READ_SESSIONS = new OauthScope(Value.READ_SESSIONS, "read:sessions"); - - public static final OauthScope CREATE_ORGANIZATION_MEMBER_ROLES = - new OauthScope(Value.CREATE_ORGANIZATION_MEMBER_ROLES, "create:organization_member_roles"); - - public static final OauthScope CREATE_DIRECTORY_PROVISIONINGS = - new OauthScope(Value.CREATE_DIRECTORY_PROVISIONINGS, "create:directory_provisionings"); - - public static final OauthScope DELETE_ORGANIZATION_MEMBERS = - new OauthScope(Value.DELETE_ORGANIZATION_MEMBERS, "delete:organization_members"); - - public static final OauthScope UPDATE_FORMS = new OauthScope(Value.UPDATE_FORMS, "update:forms"); - - public static final OauthScope CREATE_RESOURCE_SERVERS = - new OauthScope(Value.CREATE_RESOURCE_SERVERS, "create:resource_servers"); - - public static final OauthScope READ_BRANDING = new OauthScope(Value.READ_BRANDING, "read:branding"); - - public static final OauthScope UPDATE_MFA_POLICIES = - new OauthScope(Value.UPDATE_MFA_POLICIES, "update:mfa_policies"); - - public static final OauthScope UPDATE_CURRENT_USER_METADATA = - new OauthScope(Value.UPDATE_CURRENT_USER_METADATA, "update:current_user_metadata"); - - public static final OauthScope READ_FLOWS_VAULT_CONNECTIONS = - new OauthScope(Value.READ_FLOWS_VAULT_CONNECTIONS, "read:flows_vault_connections"); - - public static final OauthScope READ_ORGANIZATION_CLIENT_GRANTS = - new OauthScope(Value.READ_ORGANIZATION_CLIENT_GRANTS, "read:organization_client_grants"); - - public static final OauthScope UPDATE_CLIENTS = new OauthScope(Value.UPDATE_CLIENTS, "update:clients"); - - public static final OauthScope DELETE_CLIENT_GRANTS = - new OauthScope(Value.DELETE_CLIENT_GRANTS, "delete:client_grants"); - - public static final OauthScope CREATE_ENCRYPTION_KEYS = - new OauthScope(Value.CREATE_ENCRYPTION_KEYS, "create:encryption_keys"); - - public static final OauthScope UPDATE_ENCRYPTION_KEYS = - new OauthScope(Value.UPDATE_ENCRYPTION_KEYS, "update:encryption_keys"); - - public static final OauthScope READ_ROLES = new OauthScope(Value.READ_ROLES, "read:roles"); - - public static final OauthScope READ_DEVICE_CREDENTIALS = - new OauthScope(Value.READ_DEVICE_CREDENTIALS, "read:device_credentials"); - - public static final OauthScope DELETE_DIRECTORY_PROVISIONINGS = - new OauthScope(Value.DELETE_DIRECTORY_PROVISIONINGS, "delete:directory_provisionings"); - - public static final OauthScope DELETE_TOKEN_EXCHANGE_PROFILES = - new OauthScope(Value.DELETE_TOKEN_EXCHANGE_PROFILES, "delete:token_exchange_profiles"); - - public static final OauthScope UPDATE_ORGANIZATION_DISCOVERY_DOMAINS = - new OauthScope(Value.UPDATE_ORGANIZATION_DISCOVERY_DOMAINS, "update:organization_discovery_domains"); - - public static final OauthScope READ_LOGS = new OauthScope(Value.READ_LOGS, "read:logs"); - - public static final OauthScope UPDATE_EMAIL_PROVIDER = - new OauthScope(Value.UPDATE_EMAIL_PROVIDER, "update:email_provider"); - - public static final OauthScope DELETE_FLOWS_VAULT_CONNECTIONS = - new OauthScope(Value.DELETE_FLOWS_VAULT_CONNECTIONS, "delete:flows_vault_connections"); - - public static final OauthScope DELETE_NETWORK_ACLS = - new OauthScope(Value.DELETE_NETWORK_ACLS, "delete:network_acls"); - - public static final OauthScope UPDATE_SELF_SERVICE_PROFILE_CUSTOM_TEXTS = - new OauthScope(Value.UPDATE_SELF_SERVICE_PROFILE_CUSTOM_TEXTS, "update:self_service_profile_custom_texts"); - - public static final OauthScope DELETE_ORGANIZATION_DISCOVERY_DOMAINS = - new OauthScope(Value.DELETE_ORGANIZATION_DISCOVERY_DOMAINS, "delete:organization_discovery_domains"); - - public static final OauthScope UPDATE_CLIENT_GRANTS = - new OauthScope(Value.UPDATE_CLIENT_GRANTS, "update:client_grants"); - - public static final OauthScope READ_EMAIL_TEMPLATES = - new OauthScope(Value.READ_EMAIL_TEMPLATES, "read:email_templates"); - - public static final OauthScope UPDATE_VDCS_TEMPLATES = - new OauthScope(Value.UPDATE_VDCS_TEMPLATES, "update:vdcs_templates"); - - public static final OauthScope CREATE_USER_ATTRIBUTE_PROFILES = - new OauthScope(Value.CREATE_USER_ATTRIBUTE_PROFILES, "create:user_attribute_profiles"); - - public static final OauthScope CREATE_ORGANIZATION_INVITATIONS = - new OauthScope(Value.CREATE_ORGANIZATION_INVITATIONS, "create:organization_invitations"); - - public static final OauthScope DELETE_LOG_STREAMS = new OauthScope(Value.DELETE_LOG_STREAMS, "delete:log_streams"); - - public static final OauthScope DELETE_CUSTOM_SIGNING_KEYS = - new OauthScope(Value.DELETE_CUSTOM_SIGNING_KEYS, "delete:custom_signing_keys"); - - public static final OauthScope DELETE_RESOURCE_SERVERS = - new OauthScope(Value.DELETE_RESOURCE_SERVERS, "delete:resource_servers"); - - public static final OauthScope UPDATE_GUARDIAN_FACTORS = - new OauthScope(Value.UPDATE_GUARDIAN_FACTORS, "update:guardian_factors"); - - public static final OauthScope DELETE_ORGANIZATION_MEMBER_ROLES = - new OauthScope(Value.DELETE_ORGANIZATION_MEMBER_ROLES, "delete:organization_member_roles"); - - public static final OauthScope READ_USERS = new OauthScope(Value.READ_USERS, "read:users"); - - public static final OauthScope UPDATE_BRANDING = new OauthScope(Value.UPDATE_BRANDING, "update:branding"); - - public static final OauthScope DELETE_SSO_ACCESS_TICKETS = - new OauthScope(Value.DELETE_SSO_ACCESS_TICKETS, "delete:sso_access_tickets"); - - public static final OauthScope UPDATE_ORGANIZATION_CONNECTIONS = - new OauthScope(Value.UPDATE_ORGANIZATION_CONNECTIONS, "update:organization_connections"); - - public static final OauthScope UPDATE_CUSTOM_DOMAINS = - new OauthScope(Value.UPDATE_CUSTOM_DOMAINS, "update:custom_domains"); - - public static final OauthScope READ_NETWORK_ACLS = new OauthScope(Value.READ_NETWORK_ACLS, "read:network_acls"); - - public static final OauthScope DELETE_EMAIL_PROVIDER = - new OauthScope(Value.DELETE_EMAIL_PROVIDER, "delete:email_provider"); - - public static final OauthScope READ_FORMS = new OauthScope(Value.READ_FORMS, "read:forms"); - - public static final OauthScope CREATE_GUARDIAN_ENROLLMENT_TICKETS = - new OauthScope(Value.CREATE_GUARDIAN_ENROLLMENT_TICKETS, "create:guardian_enrollment_tickets"); - - public static final OauthScope READ_EVENT_STREAMS = new OauthScope(Value.READ_EVENT_STREAMS, "read:event_streams"); - - public static final OauthScope CREATE_NETWORK_ACLS = - new OauthScope(Value.CREATE_NETWORK_ACLS, "create:network_acls"); - - public static final OauthScope DELETE_CUSTOM_DOMAINS = - new OauthScope(Value.DELETE_CUSTOM_DOMAINS, "delete:custom_domains"); - - public static final OauthScope CREATE_SCIM_TOKEN = new OauthScope(Value.CREATE_SCIM_TOKEN, "create:scim_token"); - - public static final OauthScope UPDATE_SESSIONS = new OauthScope(Value.UPDATE_SESSIONS, "update:sessions"); - - public static final OauthScope DELETE_CONNECTION_PROFILES = - new OauthScope(Value.DELETE_CONNECTION_PROFILES, "delete:connection_profiles"); - - public static final OauthScope UPDATE_CONNECTIONS = new OauthScope(Value.UPDATE_CONNECTIONS, "update:connections"); - - public static final OauthScope DELETE_DEVICE_CREDENTIALS = - new OauthScope(Value.DELETE_DEVICE_CREDENTIALS, "delete:device_credentials"); - - public static final OauthScope READ_GUARDIAN_FACTORS = - new OauthScope(Value.READ_GUARDIAN_FACTORS, "read:guardian_factors"); - - public static final OauthScope READ_TENANT_SETTINGS = - new OauthScope(Value.READ_TENANT_SETTINGS, "read:tenant_settings"); - - public static final OauthScope DELETE_SCIM_CONFIG = new OauthScope(Value.DELETE_SCIM_CONFIG, "delete:scim_config"); - - public static final OauthScope DELETE_RULES = new OauthScope(Value.DELETE_RULES, "delete:rules"); - - public static final OauthScope READ_ORGANIZATION_MEMBER_ROLES = - new OauthScope(Value.READ_ORGANIZATION_MEMBER_ROLES, "read:organization_member_roles"); - - public static final OauthScope READ_FEDERATED_CONNECTIONS_TOKENS = - new OauthScope(Value.READ_FEDERATED_CONNECTIONS_TOKENS, "read:federated_connections_tokens"); - - public static final OauthScope UPDATE_FLOWS = new OauthScope(Value.UPDATE_FLOWS, "update:flows"); - - public static final OauthScope CREATE_LOG_STREAMS = new OauthScope(Value.CREATE_LOG_STREAMS, "create:log_streams"); - - public static final OauthScope CREATE_CONNECTION_PROFILES = - new OauthScope(Value.CREATE_CONNECTION_PROFILES, "create:connection_profiles"); - - public static final OauthScope CREATE_FLOWS_VAULT_CONNECTIONS = - new OauthScope(Value.CREATE_FLOWS_VAULT_CONNECTIONS, "create:flows_vault_connections"); - - public static final OauthScope UPDATE_DIRECTORY_PROVISIONINGS = - new OauthScope(Value.UPDATE_DIRECTORY_PROVISIONINGS, "update:directory_provisionings"); - - public static final OauthScope DELETE_USER_ATTRIBUTE_PROFILES = - new OauthScope(Value.DELETE_USER_ATTRIBUTE_PROFILES, "delete:user_attribute_profiles"); - - public static final OauthScope READ_CLIENT_GRANTS = new OauthScope(Value.READ_CLIENT_GRANTS, "read:client_grants"); - - public static final OauthScope CREATE_TOKEN_EXCHANGE_PROFILES = - new OauthScope(Value.CREATE_TOKEN_EXCHANGE_PROFILES, "create:token_exchange_profiles"); - - public static final OauthScope READ_LOGS_USERS = new OauthScope(Value.READ_LOGS_USERS, "read:logs_users"); - - public static final OauthScope READ_RULES = new OauthScope(Value.READ_RULES, "read:rules"); - - public static final OauthScope DELETE_GUARDIAN_ENROLLMENTS = - new OauthScope(Value.DELETE_GUARDIAN_ENROLLMENTS, "delete:guardian_enrollments"); - - public static final OauthScope UPDATE_CLIENT_KEYS = new OauthScope(Value.UPDATE_CLIENT_KEYS, "update:client_keys"); - - public static final OauthScope UPDATE_CURRENT_USER_IDENTITIES = - new OauthScope(Value.UPDATE_CURRENT_USER_IDENTITIES, "update:current_user_identities"); - - public static final OauthScope CREATE_ORGANIZATION_CONNECTIONS = - new OauthScope(Value.CREATE_ORGANIZATION_CONNECTIONS, "create:organization_connections"); - - public static final OauthScope READ_EMAIL_PROVIDER = - new OauthScope(Value.READ_EMAIL_PROVIDER, "read:email_provider"); - - public static final OauthScope READ_FLOWS_EXECUTIONS = - new OauthScope(Value.READ_FLOWS_EXECUTIONS, "read:flows_executions"); - - public static final OauthScope DELETE_CLIENTS = new OauthScope(Value.DELETE_CLIENTS, "delete:clients"); - - public static final OauthScope CREATE_ROLE_MEMBERS = - new OauthScope(Value.CREATE_ROLE_MEMBERS, "create:role_members"); - - public static final OauthScope CREATE_FLOWS = new OauthScope(Value.CREATE_FLOWS, "create:flows"); - - public static final OauthScope DELETE_HOOKS = new OauthScope(Value.DELETE_HOOKS, "delete:hooks"); - - public static final OauthScope DELETE_CURRENT_USER = - new OauthScope(Value.DELETE_CURRENT_USER, "delete:current_user"); - - public static final OauthScope READ_ORGANIZATIONS = new OauthScope(Value.READ_ORGANIZATIONS, "read:organizations"); - - public static final OauthScope DELETE_ROLES = new OauthScope(Value.DELETE_ROLES, "delete:roles"); - - public static final OauthScope READ_CONNECTION_PROFILES = - new OauthScope(Value.READ_CONNECTION_PROFILES, "read:connection_profiles"); - - public static final OauthScope UPDATE_PHONE_TEMPLATES = - new OauthScope(Value.UPDATE_PHONE_TEMPLATES, "update:phone_templates"); - - public static final OauthScope READ_STATS = new OauthScope(Value.READ_STATS, "read:stats"); - - public static final OauthScope READ_CUSTOM_DOMAINS = - new OauthScope(Value.READ_CUSTOM_DOMAINS, "read:custom_domains"); - - public static final OauthScope READ_TOKEN_EXCHANGE_PROFILES = - new OauthScope(Value.READ_TOKEN_EXCHANGE_PROFILES, "read:token_exchange_profiles"); - - public static final OauthScope READ_GUARDIAN_ENROLLMENTS = - new OauthScope(Value.READ_GUARDIAN_ENROLLMENTS, "read:guardian_enrollments"); - - public static final OauthScope UPDATE_ORGANIZATIONS = - new OauthScope(Value.UPDATE_ORGANIZATIONS, "update:organizations"); - - public static final OauthScope UPDATE_SELF_SERVICE_PROFILES = - new OauthScope(Value.UPDATE_SELF_SERVICE_PROFILES, "update:self_service_profiles"); - - public static final OauthScope CREATE_ORGANIZATION_CLIENT_GRANTS = - new OauthScope(Value.CREATE_ORGANIZATION_CLIENT_GRANTS, "create:organization_client_grants"); - - public static final OauthScope DELETE_FLOWS_EXECUTIONS = - new OauthScope(Value.DELETE_FLOWS_EXECUTIONS, "delete:flows_executions"); - - public static final OauthScope UPDATE_CONNECTIONS_KEYS = - new OauthScope(Value.UPDATE_CONNECTIONS_KEYS, "update:connections_keys"); - - public static final OauthScope UPDATE_EVENT_DELIVERIES = - new OauthScope(Value.UPDATE_EVENT_DELIVERIES, "update:event_deliveries"); - - 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 READ_VDCS_TEMPLATES = - new OauthScope(Value.READ_VDCS_TEMPLATES, "read:vdcs_templates"); - - public static final OauthScope READ_PHONE_PROVIDERS = - new OauthScope(Value.READ_PHONE_PROVIDERS, "read:phone_providers"); - - public static final OauthScope CREATE_CLIENT_GRANTS = - new OauthScope(Value.CREATE_CLIENT_GRANTS, "create:client_grants"); - - public static final OauthScope DELETE_ANOMALY_BLOCKS = - new OauthScope(Value.DELETE_ANOMALY_BLOCKS, "delete:anomaly_blocks"); - - public static final OauthScope READ_CONNECTIONS_KEYS = - new OauthScope(Value.READ_CONNECTIONS_KEYS, "read:connections_keys"); - - public static final OauthScope READ_ACTIONS = new OauthScope(Value.READ_ACTIONS, "read:actions"); - - public static final OauthScope READ_RESOURCE_SERVERS = - new OauthScope(Value.READ_RESOURCE_SERVERS, "read:resource_servers"); - - public static final OauthScope UPDATE_TOKEN_EXCHANGE_PROFILES = - new OauthScope(Value.UPDATE_TOKEN_EXCHANGE_PROFILES, "update:token_exchange_profiles"); - - public static final OauthScope DELETE_ROLE_MEMBERS = - new OauthScope(Value.DELETE_ROLE_MEMBERS, "delete:role_members"); - - public static final OauthScope READ_ORGANIZATION_CONNECTIONS = - new OauthScope(Value.READ_ORGANIZATION_CONNECTIONS, "read:organization_connections"); - - public static final OauthScope UPDATE_PROMPTS = new OauthScope(Value.UPDATE_PROMPTS, "update:prompts"); - - public static final OauthScope CREATE_HOOKS = new OauthScope(Value.CREATE_HOOKS, "create:hooks"); - - public static final OauthScope CREATE_CONNECTIONS = new OauthScope(Value.CREATE_CONNECTIONS, "create:connections"); - - public static final OauthScope CREATE_EMAIL_TEMPLATES = - new OauthScope(Value.CREATE_EMAIL_TEMPLATES, "create:email_templates"); - - public static final OauthScope UPDATE_ATTACK_PROTECTION = - new OauthScope(Value.UPDATE_ATTACK_PROTECTION, "update:attack_protection"); - - public static final OauthScope READ_MFA_POLICIES = new OauthScope(Value.READ_MFA_POLICIES, "read:mfa_policies"); - - public static final OauthScope UPDATE_HOOKS = new OauthScope(Value.UPDATE_HOOKS, "update:hooks"); - - public static final OauthScope DELETE_USERS = new OauthScope(Value.DELETE_USERS, "delete:users"); - - public static final OauthScope CREATE_CLIENT_CREDENTIALS = - new OauthScope(Value.CREATE_CLIENT_CREDENTIALS, "create:client_credentials"); - - public static final OauthScope UPDATE_CLIENT_CREDENTIALS = - new OauthScope(Value.UPDATE_CLIENT_CREDENTIALS, "update:client_credentials"); - - public static final OauthScope CREATE_ACTIONS = new OauthScope(Value.CREATE_ACTIONS, "create:actions"); - - public static final OauthScope READ_EVENT_DELIVERIES = - new OauthScope(Value.READ_EVENT_DELIVERIES, "read:event_deliveries"); - - public static final OauthScope DELETE_PHONE_TEMPLATES = - new OauthScope(Value.DELETE_PHONE_TEMPLATES, "delete:phone_templates"); - - public static final OauthScope READ_REFRESH_TOKENS = - new OauthScope(Value.READ_REFRESH_TOKENS, "read:refresh_tokens"); - - public static final OauthScope UPDATE_EMAIL_TEMPLATES = - new OauthScope(Value.UPDATE_EMAIL_TEMPLATES, "update:email_templates"); - - public static final OauthScope READ_ROLE_MEMBERS = new OauthScope(Value.READ_ROLE_MEMBERS, "read:role_members"); - - public static final OauthScope CREATE_ORGANIZATION_MEMBERS = - new OauthScope(Value.CREATE_ORGANIZATION_MEMBERS, "create:organization_members"); - - private final Value value; - - private final String string; - - OauthScope(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) || (other instanceof OauthScope && this.string.equals(((OauthScope) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case READ_AUTHENTICATION_METHODS: - return visitor.visitReadAuthenticationMethods(); - case UPDATE_CLIENT_TOKEN_VAULT_PRIVILEGED_ACCESS: - return visitor.visitUpdateClientTokenVaultPrivilegedAccess(); - case UPDATE_USERS_APP_METADATA: - return visitor.visitUpdateUsersAppMetadata(); - case READ_ANOMALY_BLOCKS: - return visitor.visitReadAnomalyBlocks(); - case READ_CLIENT_SUMMARY: - return visitor.visitReadClientSummary(); - case READ_SCIM_CONFIG: - return visitor.visitReadScimConfig(); - case CREATE_RULES: - return visitor.visitCreateRules(); - case UPDATE_SCIM_CONFIG: - return visitor.visitUpdateScimConfig(); - case READ_PROMPTS: - return visitor.visitReadPrompts(); - case CREATE_ORGANIZATION_DISCOVERY_DOMAINS: - return visitor.visitCreateOrganizationDiscoveryDomains(); - case CREATE_PHONE_TEMPLATES: - return visitor.visitCreatePhoneTemplates(); - case UPDATE_PHONE_PROVIDERS: - return visitor.visitUpdatePhoneProviders(); - case CREATE_ROLES: - return visitor.visitCreateRoles(); - case DELETE_AUTHENTICATION_METHODS: - return visitor.visitDeleteAuthenticationMethods(); - case CREATE_CONNECTIONS_KEYS: - return visitor.visitCreateConnectionsKeys(); - case UPDATE_RULES: - return visitor.visitUpdateRules(); - case UPDATE_FLOWS_VAULT_CONNECTIONS: - return visitor.visitUpdateFlowsVaultConnections(); - case READ_ENCRYPTION_KEYS: - return visitor.visitReadEncryptionKeys(); - case DELETE_SESSIONS: - return visitor.visitDeleteSessions(); - case UPDATE_ACTIONS: - return visitor.visitUpdateActions(); - case CREATE_EVENT_STREAMS: - return visitor.visitCreateEventStreams(); - case DELETE_EVENT_STREAMS: - return visitor.visitDeleteEventStreams(); - case DELETE_FLOWS: - return visitor.visitDeleteFlows(); - case DELETE_PHONE_PROVIDERS: - return visitor.visitDeletePhoneProviders(); - case DELETE_SELF_SERVICE_PROFILES: - return visitor.visitDeleteSelfServiceProfiles(); - case READ_GROUP_MEMBERS: - return visitor.visitReadGroupMembers(); - case CREATE_SIGNING_KEYS: - return visitor.visitCreateSigningKeys(); - case UPDATE_SIGNING_KEYS: - return visitor.visitUpdateSigningKeys(); - case CREATE_USER_TICKETS: - return visitor.visitCreateUserTickets(); - case DELETE_GRANTS: - return visitor.visitDeleteGrants(); - case DELETE_REFRESH_TOKENS: - return visitor.visitDeleteRefreshTokens(); - case READ_RULES_CONFIGS: - return visitor.visitReadRulesConfigs(); - case CREATE_SELF_SERVICE_PROFILES: - return visitor.visitCreateSelfServiceProfiles(); - case UPDATE_REFRESH_TOKENS: - return visitor.visitUpdateRefreshTokens(); - case READ_USER_IDP_TOKENS: - return visitor.visitReadUserIdpTokens(); - case READ_CUSTOM_SIGNING_KEYS: - return visitor.visitReadCustomSigningKeys(); - case READ_HOOKS: - return visitor.visitReadHooks(); - case CREATE_CURRENT_USER_DEVICE_CREDENTIALS: - return visitor.visitCreateCurrentUserDeviceCredentials(); - case DELETE_BRANDING: - return visitor.visitDeleteBranding(); - case DELETE_CLIENT_CREDENTIALS: - return visitor.visitDeleteClientCredentials(); - case UPDATE_TENANT_SETTINGS: - return visitor.visitUpdateTenantSettings(); - case READ_ORGANIZATION_INVITATIONS: - return visitor.visitReadOrganizationInvitations(); - case READ_GRANTS: - return visitor.visitReadGrants(); - case DELETE_ORGANIZATION_INVITATIONS: - return visitor.visitDeleteOrganizationInvitations(); - case UPDATE_RULES_CONFIGS: - return visitor.visitUpdateRulesConfigs(); - case UPDATE_CONNECTION_PROFILES: - return visitor.visitUpdateConnectionProfiles(); - case READ_GROUPS: - return visitor.visitReadGroups(); - case DELETE_ACTIONS: - return visitor.visitDeleteActions(); - case UPDATE_AUTHENTICATION_METHODS: - return visitor.visitUpdateAuthenticationMethods(); - case CREATE_VDCS_TEMPLATES: - return visitor.visitCreateVdcsTemplates(); - case READ_ATTACK_PROTECTION: - return visitor.visitReadAttackProtection(); - case READ_ORGANIZATION_DISCOVERY_DOMAINS: - return visitor.visitReadOrganizationDiscoveryDomains(); - case CREATE_CUSTOM_DOMAINS: - return visitor.visitCreateCustomDomains(); - case READ_CURRENT_USER: - return visitor.visitReadCurrentUser(); - case DELETE_ORGANIZATION_CONNECTIONS: - return visitor.visitDeleteOrganizationConnections(); - case READ_CLIENT_CREDENTIALS: - return visitor.visitReadClientCredentials(); - case CREATE_ORGANIZATIONS: - return visitor.visitCreateOrganizations(); - case READ_ORGANIZATIONS_SUMMARY: - return visitor.visitReadOrganizationsSummary(); - case DELETE_ORGANIZATIONS: - return visitor.visitDeleteOrganizations(); - case READ_SCIM_TOKEN: - return visitor.visitReadScimToken(); - case READ_CONNECTIONS: - return visitor.visitReadConnections(); - case READ_SIGNING_KEYS: - return visitor.visitReadSigningKeys(); - case DELETE_FEDERATED_CONNECTIONS_TOKENS: - return visitor.visitDeleteFederatedConnectionsTokens(); - case DELETE_CONNECTIONS: - return visitor.visitDeleteConnections(); - case UPDATE_RESOURCE_SERVERS: - return visitor.visitUpdateResourceServers(); - case CREATE_USERS: - return visitor.visitCreateUsers(); - case READ_PHONE_TEMPLATES: - return visitor.visitReadPhoneTemplates(); - case UPDATE_ROLES: - return visitor.visitUpdateRoles(); - case CREATE_SSO_ACCESS_TICKETS: - return visitor.visitCreateSsoAccessTickets(); - case READ_SELF_SERVICE_PROFILE_CUSTOM_TEXTS: - return visitor.visitReadSelfServiceProfileCustomTexts(); - case DELETE_SCIM_TOKEN: - return visitor.visitDeleteScimToken(); - case DELETE_FORMS: - return visitor.visitDeleteForms(); - case READ_SELF_SERVICE_PROFILES: - return visitor.visitReadSelfServiceProfiles(); - case DELETE_RULES_CONFIGS: - return visitor.visitDeleteRulesConfigs(); - case CREATE_FORMS: - return visitor.visitCreateForms(); - case READ_USER_ATTRIBUTE_PROFILES: - return visitor.visitReadUserAttributeProfiles(); - case READ_DIRECTORY_PROVISIONINGS: - return visitor.visitReadDirectoryProvisionings(); - case CREATE_AUTHENTICATION_METHODS: - return visitor.visitCreateAuthenticationMethods(); - case CREATE_PHONE_PROVIDERS: - return visitor.visitCreatePhoneProviders(); - case DELETE_ORGANIZATION_CLIENT_GRANTS: - return visitor.visitDeleteOrganizationClientGrants(); - case CREATE_SCIM_CONFIG: - return visitor.visitCreateScimConfig(); - case CREATE_CLIENTS: - return visitor.visitCreateClients(); - case UPDATE_USERS: - return visitor.visitUpdateUsers(); - case READ_ORGANIZATION_MEMBERS: - return visitor.visitReadOrganizationMembers(); - case UPDATE_EVENT_STREAMS: - return visitor.visitUpdateEventStreams(); - case UPDATE_CUSTOM_SIGNING_KEYS: - return visitor.visitUpdateCustomSigningKeys(); - case READ_LOG_STREAMS: - return visitor.visitReadLogStreams(); - case UPDATE_LOG_STREAMS: - return visitor.visitUpdateLogStreams(); - case READ_CLIENTS: - return visitor.visitReadClients(); - case DELETE_ENCRYPTION_KEYS: - return visitor.visitDeleteEncryptionKeys(); - case UPDATE_USER_ATTRIBUTE_PROFILES: - return visitor.visitUpdateUserAttributeProfiles(); - case CREATE_CUSTOM_SIGNING_KEYS: - return visitor.visitCreateCustomSigningKeys(); - case READ_CLIENT_KEYS: - return visitor.visitReadClientKeys(); - case CREATE_EMAIL_PROVIDER: - return visitor.visitCreateEmailProvider(); - case UPDATE_NETWORK_ACLS: - return visitor.visitUpdateNetworkAcls(); - case DELETE_VDCS_TEMPLATES: - return visitor.visitDeleteVdcsTemplates(); - case READ_FLOWS: - return visitor.visitReadFlows(); - case READ_SESSIONS: - return visitor.visitReadSessions(); - case CREATE_ORGANIZATION_MEMBER_ROLES: - return visitor.visitCreateOrganizationMemberRoles(); - case CREATE_DIRECTORY_PROVISIONINGS: - return visitor.visitCreateDirectoryProvisionings(); - case DELETE_ORGANIZATION_MEMBERS: - return visitor.visitDeleteOrganizationMembers(); - case UPDATE_FORMS: - return visitor.visitUpdateForms(); - case CREATE_RESOURCE_SERVERS: - return visitor.visitCreateResourceServers(); - case READ_BRANDING: - return visitor.visitReadBranding(); - case UPDATE_MFA_POLICIES: - return visitor.visitUpdateMfaPolicies(); - case UPDATE_CURRENT_USER_METADATA: - return visitor.visitUpdateCurrentUserMetadata(); - case READ_FLOWS_VAULT_CONNECTIONS: - return visitor.visitReadFlowsVaultConnections(); - case READ_ORGANIZATION_CLIENT_GRANTS: - return visitor.visitReadOrganizationClientGrants(); - case UPDATE_CLIENTS: - return visitor.visitUpdateClients(); - case DELETE_CLIENT_GRANTS: - return visitor.visitDeleteClientGrants(); - case CREATE_ENCRYPTION_KEYS: - return visitor.visitCreateEncryptionKeys(); - case UPDATE_ENCRYPTION_KEYS: - return visitor.visitUpdateEncryptionKeys(); - case READ_ROLES: - return visitor.visitReadRoles(); - case READ_DEVICE_CREDENTIALS: - return visitor.visitReadDeviceCredentials(); - case DELETE_DIRECTORY_PROVISIONINGS: - return visitor.visitDeleteDirectoryProvisionings(); - case DELETE_TOKEN_EXCHANGE_PROFILES: - return visitor.visitDeleteTokenExchangeProfiles(); - case UPDATE_ORGANIZATION_DISCOVERY_DOMAINS: - return visitor.visitUpdateOrganizationDiscoveryDomains(); - case READ_LOGS: - return visitor.visitReadLogs(); - case UPDATE_EMAIL_PROVIDER: - return visitor.visitUpdateEmailProvider(); - case DELETE_FLOWS_VAULT_CONNECTIONS: - return visitor.visitDeleteFlowsVaultConnections(); - case DELETE_NETWORK_ACLS: - return visitor.visitDeleteNetworkAcls(); - case UPDATE_SELF_SERVICE_PROFILE_CUSTOM_TEXTS: - return visitor.visitUpdateSelfServiceProfileCustomTexts(); - case DELETE_ORGANIZATION_DISCOVERY_DOMAINS: - return visitor.visitDeleteOrganizationDiscoveryDomains(); - case UPDATE_CLIENT_GRANTS: - return visitor.visitUpdateClientGrants(); - case READ_EMAIL_TEMPLATES: - return visitor.visitReadEmailTemplates(); - case UPDATE_VDCS_TEMPLATES: - return visitor.visitUpdateVdcsTemplates(); - case CREATE_USER_ATTRIBUTE_PROFILES: - return visitor.visitCreateUserAttributeProfiles(); - case CREATE_ORGANIZATION_INVITATIONS: - return visitor.visitCreateOrganizationInvitations(); - case DELETE_LOG_STREAMS: - return visitor.visitDeleteLogStreams(); - case DELETE_CUSTOM_SIGNING_KEYS: - return visitor.visitDeleteCustomSigningKeys(); - case DELETE_RESOURCE_SERVERS: - return visitor.visitDeleteResourceServers(); - case UPDATE_GUARDIAN_FACTORS: - return visitor.visitUpdateGuardianFactors(); - case DELETE_ORGANIZATION_MEMBER_ROLES: - return visitor.visitDeleteOrganizationMemberRoles(); - case READ_USERS: - return visitor.visitReadUsers(); - case UPDATE_BRANDING: - return visitor.visitUpdateBranding(); - case DELETE_SSO_ACCESS_TICKETS: - return visitor.visitDeleteSsoAccessTickets(); - case UPDATE_ORGANIZATION_CONNECTIONS: - return visitor.visitUpdateOrganizationConnections(); - case UPDATE_CUSTOM_DOMAINS: - return visitor.visitUpdateCustomDomains(); - case READ_NETWORK_ACLS: - return visitor.visitReadNetworkAcls(); - case DELETE_EMAIL_PROVIDER: - return visitor.visitDeleteEmailProvider(); - case READ_FORMS: - return visitor.visitReadForms(); - case CREATE_GUARDIAN_ENROLLMENT_TICKETS: - return visitor.visitCreateGuardianEnrollmentTickets(); - case READ_EVENT_STREAMS: - return visitor.visitReadEventStreams(); - case CREATE_NETWORK_ACLS: - return visitor.visitCreateNetworkAcls(); - case DELETE_CUSTOM_DOMAINS: - return visitor.visitDeleteCustomDomains(); - case CREATE_SCIM_TOKEN: - return visitor.visitCreateScimToken(); - case UPDATE_SESSIONS: - return visitor.visitUpdateSessions(); - case DELETE_CONNECTION_PROFILES: - return visitor.visitDeleteConnectionProfiles(); - case UPDATE_CONNECTIONS: - return visitor.visitUpdateConnections(); - case DELETE_DEVICE_CREDENTIALS: - return visitor.visitDeleteDeviceCredentials(); - case READ_GUARDIAN_FACTORS: - return visitor.visitReadGuardianFactors(); - case READ_TENANT_SETTINGS: - return visitor.visitReadTenantSettings(); - case DELETE_SCIM_CONFIG: - return visitor.visitDeleteScimConfig(); - case DELETE_RULES: - return visitor.visitDeleteRules(); - case READ_ORGANIZATION_MEMBER_ROLES: - return visitor.visitReadOrganizationMemberRoles(); - case READ_FEDERATED_CONNECTIONS_TOKENS: - return visitor.visitReadFederatedConnectionsTokens(); - case UPDATE_FLOWS: - return visitor.visitUpdateFlows(); - case CREATE_LOG_STREAMS: - return visitor.visitCreateLogStreams(); - case CREATE_CONNECTION_PROFILES: - return visitor.visitCreateConnectionProfiles(); - case CREATE_FLOWS_VAULT_CONNECTIONS: - return visitor.visitCreateFlowsVaultConnections(); - case UPDATE_DIRECTORY_PROVISIONINGS: - return visitor.visitUpdateDirectoryProvisionings(); - case DELETE_USER_ATTRIBUTE_PROFILES: - return visitor.visitDeleteUserAttributeProfiles(); - case READ_CLIENT_GRANTS: - return visitor.visitReadClientGrants(); - case CREATE_TOKEN_EXCHANGE_PROFILES: - return visitor.visitCreateTokenExchangeProfiles(); - case READ_LOGS_USERS: - return visitor.visitReadLogsUsers(); - case READ_RULES: - return visitor.visitReadRules(); - case DELETE_GUARDIAN_ENROLLMENTS: - return visitor.visitDeleteGuardianEnrollments(); - case UPDATE_CLIENT_KEYS: - return visitor.visitUpdateClientKeys(); - case UPDATE_CURRENT_USER_IDENTITIES: - return visitor.visitUpdateCurrentUserIdentities(); - case CREATE_ORGANIZATION_CONNECTIONS: - return visitor.visitCreateOrganizationConnections(); - case READ_EMAIL_PROVIDER: - return visitor.visitReadEmailProvider(); - case READ_FLOWS_EXECUTIONS: - return visitor.visitReadFlowsExecutions(); - case DELETE_CLIENTS: - return visitor.visitDeleteClients(); - case CREATE_ROLE_MEMBERS: - return visitor.visitCreateRoleMembers(); - case CREATE_FLOWS: - return visitor.visitCreateFlows(); - case DELETE_HOOKS: - return visitor.visitDeleteHooks(); - case DELETE_CURRENT_USER: - return visitor.visitDeleteCurrentUser(); - case READ_ORGANIZATIONS: - return visitor.visitReadOrganizations(); - case DELETE_ROLES: - return visitor.visitDeleteRoles(); - case READ_CONNECTION_PROFILES: - return visitor.visitReadConnectionProfiles(); - case UPDATE_PHONE_TEMPLATES: - return visitor.visitUpdatePhoneTemplates(); - case READ_STATS: - return visitor.visitReadStats(); - case READ_CUSTOM_DOMAINS: - return visitor.visitReadCustomDomains(); - case READ_TOKEN_EXCHANGE_PROFILES: - return visitor.visitReadTokenExchangeProfiles(); - case READ_GUARDIAN_ENROLLMENTS: - return visitor.visitReadGuardianEnrollments(); - case UPDATE_ORGANIZATIONS: - return visitor.visitUpdateOrganizations(); - case UPDATE_SELF_SERVICE_PROFILES: - return visitor.visitUpdateSelfServiceProfiles(); - case CREATE_ORGANIZATION_CLIENT_GRANTS: - return visitor.visitCreateOrganizationClientGrants(); - case DELETE_FLOWS_EXECUTIONS: - return visitor.visitDeleteFlowsExecutions(); - case UPDATE_CONNECTIONS_KEYS: - return visitor.visitUpdateConnectionsKeys(); - case UPDATE_EVENT_DELIVERIES: - return visitor.visitUpdateEventDeliveries(); - case DELETE_CURRENT_USER_DEVICE_CREDENTIALS: - return visitor.visitDeleteCurrentUserDeviceCredentials(); - case READ_VDCS_TEMPLATES: - return visitor.visitReadVdcsTemplates(); - case READ_PHONE_PROVIDERS: - return visitor.visitReadPhoneProviders(); - case CREATE_CLIENT_GRANTS: - return visitor.visitCreateClientGrants(); - case DELETE_ANOMALY_BLOCKS: - return visitor.visitDeleteAnomalyBlocks(); - case READ_CONNECTIONS_KEYS: - return visitor.visitReadConnectionsKeys(); - case READ_ACTIONS: - return visitor.visitReadActions(); - case READ_RESOURCE_SERVERS: - return visitor.visitReadResourceServers(); - case UPDATE_TOKEN_EXCHANGE_PROFILES: - return visitor.visitUpdateTokenExchangeProfiles(); - case DELETE_ROLE_MEMBERS: - return visitor.visitDeleteRoleMembers(); - case READ_ORGANIZATION_CONNECTIONS: - return visitor.visitReadOrganizationConnections(); - case UPDATE_PROMPTS: - return visitor.visitUpdatePrompts(); - case CREATE_HOOKS: - return visitor.visitCreateHooks(); - case CREATE_CONNECTIONS: - return visitor.visitCreateConnections(); - case CREATE_EMAIL_TEMPLATES: - return visitor.visitCreateEmailTemplates(); - case UPDATE_ATTACK_PROTECTION: - return visitor.visitUpdateAttackProtection(); - case READ_MFA_POLICIES: - return visitor.visitReadMfaPolicies(); - case UPDATE_HOOKS: - return visitor.visitUpdateHooks(); - case DELETE_USERS: - return visitor.visitDeleteUsers(); - case CREATE_CLIENT_CREDENTIALS: - return visitor.visitCreateClientCredentials(); - case UPDATE_CLIENT_CREDENTIALS: - return visitor.visitUpdateClientCredentials(); - case CREATE_ACTIONS: - return visitor.visitCreateActions(); - case READ_EVENT_DELIVERIES: - return visitor.visitReadEventDeliveries(); - case DELETE_PHONE_TEMPLATES: - return visitor.visitDeletePhoneTemplates(); - case READ_REFRESH_TOKENS: - return visitor.visitReadRefreshTokens(); - case UPDATE_EMAIL_TEMPLATES: - return visitor.visitUpdateEmailTemplates(); - case READ_ROLE_MEMBERS: - return visitor.visitReadRoleMembers(); - case CREATE_ORGANIZATION_MEMBERS: - return visitor.visitCreateOrganizationMembers(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static OauthScope valueOf(String value) { - switch (value) { - case "read:authentication_methods": - return READ_AUTHENTICATION_METHODS; - case "update:client_token_vault_privileged_access": - return UPDATE_CLIENT_TOKEN_VAULT_PRIVILEGED_ACCESS; - case "update:users_app_metadata": - return UPDATE_USERS_APP_METADATA; - case "read:anomaly_blocks": - return READ_ANOMALY_BLOCKS; - case "read:client_summary": - return READ_CLIENT_SUMMARY; - case "read:scim_config": - return READ_SCIM_CONFIG; - case "create:rules": - return CREATE_RULES; - case "update:scim_config": - return UPDATE_SCIM_CONFIG; - case "read:prompts": - return READ_PROMPTS; - case "create:organization_discovery_domains": - return CREATE_ORGANIZATION_DISCOVERY_DOMAINS; - case "create:phone_templates": - return CREATE_PHONE_TEMPLATES; - case "update:phone_providers": - return UPDATE_PHONE_PROVIDERS; - case "create:roles": - return CREATE_ROLES; - case "delete:authentication_methods": - return DELETE_AUTHENTICATION_METHODS; - case "create:connections_keys": - return CREATE_CONNECTIONS_KEYS; - case "update:rules": - return UPDATE_RULES; - case "update:flows_vault_connections": - return UPDATE_FLOWS_VAULT_CONNECTIONS; - case "read:encryption_keys": - return READ_ENCRYPTION_KEYS; - case "delete:sessions": - return DELETE_SESSIONS; - case "update:actions": - return UPDATE_ACTIONS; - case "create:event_streams": - return CREATE_EVENT_STREAMS; - case "delete:event_streams": - return DELETE_EVENT_STREAMS; - case "delete:flows": - return DELETE_FLOWS; - case "delete:phone_providers": - return DELETE_PHONE_PROVIDERS; - case "delete:self_service_profiles": - return DELETE_SELF_SERVICE_PROFILES; - case "read:group_members": - return READ_GROUP_MEMBERS; - case "create:signing_keys": - return CREATE_SIGNING_KEYS; - case "update:signing_keys": - return UPDATE_SIGNING_KEYS; - case "create:user_tickets": - return CREATE_USER_TICKETS; - case "delete:grants": - return DELETE_GRANTS; - case "delete:refresh_tokens": - return DELETE_REFRESH_TOKENS; - case "read:rules_configs": - return READ_RULES_CONFIGS; - case "create:self_service_profiles": - return CREATE_SELF_SERVICE_PROFILES; - case "update:refresh_tokens": - return UPDATE_REFRESH_TOKENS; - case "read:user_idp_tokens": - return READ_USER_IDP_TOKENS; - case "read:custom_signing_keys": - return READ_CUSTOM_SIGNING_KEYS; - case "read:hooks": - return READ_HOOKS; - case "create:current_user_device_credentials": - return CREATE_CURRENT_USER_DEVICE_CREDENTIALS; - case "delete:branding": - return DELETE_BRANDING; - case "delete:client_credentials": - return DELETE_CLIENT_CREDENTIALS; - case "update:tenant_settings": - return UPDATE_TENANT_SETTINGS; - case "read:organization_invitations": - return READ_ORGANIZATION_INVITATIONS; - case "read:grants": - return READ_GRANTS; - case "delete:organization_invitations": - return DELETE_ORGANIZATION_INVITATIONS; - case "update:rules_configs": - return UPDATE_RULES_CONFIGS; - case "update:connection_profiles": - return UPDATE_CONNECTION_PROFILES; - case "read:groups": - return READ_GROUPS; - case "delete:actions": - return DELETE_ACTIONS; - case "update:authentication_methods": - return UPDATE_AUTHENTICATION_METHODS; - case "create:vdcs_templates": - return CREATE_VDCS_TEMPLATES; - case "read:attack_protection": - return READ_ATTACK_PROTECTION; - case "read:organization_discovery_domains": - return READ_ORGANIZATION_DISCOVERY_DOMAINS; - case "create:custom_domains": - return CREATE_CUSTOM_DOMAINS; - case "read:current_user": - return READ_CURRENT_USER; - case "delete:organization_connections": - return DELETE_ORGANIZATION_CONNECTIONS; - case "read:client_credentials": - return READ_CLIENT_CREDENTIALS; - case "create:organizations": - return CREATE_ORGANIZATIONS; - case "read:organizations_summary": - return READ_ORGANIZATIONS_SUMMARY; - case "delete:organizations": - return DELETE_ORGANIZATIONS; - case "read:scim_token": - return READ_SCIM_TOKEN; - case "read:connections": - return READ_CONNECTIONS; - case "read:signing_keys": - return READ_SIGNING_KEYS; - case "delete:federated_connections_tokens": - return DELETE_FEDERATED_CONNECTIONS_TOKENS; - case "delete:connections": - return DELETE_CONNECTIONS; - case "update:resource_servers": - return UPDATE_RESOURCE_SERVERS; - case "create:users": - return CREATE_USERS; - case "read:phone_templates": - return READ_PHONE_TEMPLATES; - case "update:roles": - return UPDATE_ROLES; - case "create:sso_access_tickets": - return CREATE_SSO_ACCESS_TICKETS; - case "read:self_service_profile_custom_texts": - return READ_SELF_SERVICE_PROFILE_CUSTOM_TEXTS; - case "delete:scim_token": - return DELETE_SCIM_TOKEN; - case "delete:forms": - return DELETE_FORMS; - case "read:self_service_profiles": - return READ_SELF_SERVICE_PROFILES; - case "delete:rules_configs": - return DELETE_RULES_CONFIGS; - case "create:forms": - return CREATE_FORMS; - case "read:user_attribute_profiles": - return READ_USER_ATTRIBUTE_PROFILES; - case "read:directory_provisionings": - return READ_DIRECTORY_PROVISIONINGS; - case "create:authentication_methods": - return CREATE_AUTHENTICATION_METHODS; - case "create:phone_providers": - return CREATE_PHONE_PROVIDERS; - case "delete:organization_client_grants": - return DELETE_ORGANIZATION_CLIENT_GRANTS; - case "create:scim_config": - return CREATE_SCIM_CONFIG; - case "create:clients": - return CREATE_CLIENTS; - case "update:users": - return UPDATE_USERS; - case "read:organization_members": - return READ_ORGANIZATION_MEMBERS; - case "update:event_streams": - return UPDATE_EVENT_STREAMS; - case "update:custom_signing_keys": - return UPDATE_CUSTOM_SIGNING_KEYS; - case "read:log_streams": - return READ_LOG_STREAMS; - case "update:log_streams": - return UPDATE_LOG_STREAMS; - case "read:clients": - return READ_CLIENTS; - case "delete:encryption_keys": - return DELETE_ENCRYPTION_KEYS; - case "update:user_attribute_profiles": - return UPDATE_USER_ATTRIBUTE_PROFILES; - case "create:custom_signing_keys": - return CREATE_CUSTOM_SIGNING_KEYS; - case "read:client_keys": - return READ_CLIENT_KEYS; - case "create:email_provider": - return CREATE_EMAIL_PROVIDER; - case "update:network_acls": - return UPDATE_NETWORK_ACLS; - case "delete:vdcs_templates": - return DELETE_VDCS_TEMPLATES; - case "read:flows": - return READ_FLOWS; - case "read:sessions": - return READ_SESSIONS; - case "create:organization_member_roles": - return CREATE_ORGANIZATION_MEMBER_ROLES; - case "create:directory_provisionings": - return CREATE_DIRECTORY_PROVISIONINGS; - case "delete:organization_members": - return DELETE_ORGANIZATION_MEMBERS; - case "update:forms": - return UPDATE_FORMS; - case "create:resource_servers": - return CREATE_RESOURCE_SERVERS; - case "read:branding": - return READ_BRANDING; - case "update:mfa_policies": - return UPDATE_MFA_POLICIES; - case "update:current_user_metadata": - return UPDATE_CURRENT_USER_METADATA; - case "read:flows_vault_connections": - return READ_FLOWS_VAULT_CONNECTIONS; - case "read:organization_client_grants": - return READ_ORGANIZATION_CLIENT_GRANTS; - case "update:clients": - return UPDATE_CLIENTS; - case "delete:client_grants": - return DELETE_CLIENT_GRANTS; - case "create:encryption_keys": - return CREATE_ENCRYPTION_KEYS; - case "update:encryption_keys": - return UPDATE_ENCRYPTION_KEYS; - case "read:roles": - return READ_ROLES; - case "read:device_credentials": - return READ_DEVICE_CREDENTIALS; - case "delete:directory_provisionings": - return DELETE_DIRECTORY_PROVISIONINGS; - case "delete:token_exchange_profiles": - return DELETE_TOKEN_EXCHANGE_PROFILES; - case "update:organization_discovery_domains": - return UPDATE_ORGANIZATION_DISCOVERY_DOMAINS; - case "read:logs": - return READ_LOGS; - case "update:email_provider": - return UPDATE_EMAIL_PROVIDER; - case "delete:flows_vault_connections": - return DELETE_FLOWS_VAULT_CONNECTIONS; - case "delete:network_acls": - return DELETE_NETWORK_ACLS; - case "update:self_service_profile_custom_texts": - return UPDATE_SELF_SERVICE_PROFILE_CUSTOM_TEXTS; - case "delete:organization_discovery_domains": - return DELETE_ORGANIZATION_DISCOVERY_DOMAINS; - case "update:client_grants": - return UPDATE_CLIENT_GRANTS; - case "read:email_templates": - return READ_EMAIL_TEMPLATES; - case "update:vdcs_templates": - return UPDATE_VDCS_TEMPLATES; - case "create:user_attribute_profiles": - return CREATE_USER_ATTRIBUTE_PROFILES; - case "create:organization_invitations": - return CREATE_ORGANIZATION_INVITATIONS; - case "delete:log_streams": - return DELETE_LOG_STREAMS; - case "delete:custom_signing_keys": - return DELETE_CUSTOM_SIGNING_KEYS; - case "delete:resource_servers": - return DELETE_RESOURCE_SERVERS; - case "update:guardian_factors": - return UPDATE_GUARDIAN_FACTORS; - case "delete:organization_member_roles": - return DELETE_ORGANIZATION_MEMBER_ROLES; - case "read:users": - return READ_USERS; - case "update:branding": - return UPDATE_BRANDING; - case "delete:sso_access_tickets": - return DELETE_SSO_ACCESS_TICKETS; - case "update:organization_connections": - return UPDATE_ORGANIZATION_CONNECTIONS; - case "update:custom_domains": - return UPDATE_CUSTOM_DOMAINS; - case "read:network_acls": - return READ_NETWORK_ACLS; - case "delete:email_provider": - return DELETE_EMAIL_PROVIDER; - case "read:forms": - return READ_FORMS; - case "create:guardian_enrollment_tickets": - return CREATE_GUARDIAN_ENROLLMENT_TICKETS; - case "read:event_streams": - return READ_EVENT_STREAMS; - case "create:network_acls": - return CREATE_NETWORK_ACLS; - case "delete:custom_domains": - return DELETE_CUSTOM_DOMAINS; - case "create:scim_token": - return CREATE_SCIM_TOKEN; - case "update:sessions": - return UPDATE_SESSIONS; - case "delete:connection_profiles": - return DELETE_CONNECTION_PROFILES; - case "update:connections": - return UPDATE_CONNECTIONS; - case "delete:device_credentials": - return DELETE_DEVICE_CREDENTIALS; - case "read:guardian_factors": - return READ_GUARDIAN_FACTORS; - case "read:tenant_settings": - return READ_TENANT_SETTINGS; - case "delete:scim_config": - return DELETE_SCIM_CONFIG; - case "delete:rules": - return DELETE_RULES; - case "read:organization_member_roles": - return READ_ORGANIZATION_MEMBER_ROLES; - case "read:federated_connections_tokens": - return READ_FEDERATED_CONNECTIONS_TOKENS; - case "update:flows": - return UPDATE_FLOWS; - case "create:log_streams": - return CREATE_LOG_STREAMS; - case "create:connection_profiles": - return CREATE_CONNECTION_PROFILES; - case "create:flows_vault_connections": - return CREATE_FLOWS_VAULT_CONNECTIONS; - case "update:directory_provisionings": - return UPDATE_DIRECTORY_PROVISIONINGS; - case "delete:user_attribute_profiles": - return DELETE_USER_ATTRIBUTE_PROFILES; - case "read:client_grants": - return READ_CLIENT_GRANTS; - case "create:token_exchange_profiles": - return CREATE_TOKEN_EXCHANGE_PROFILES; - case "read:logs_users": - return READ_LOGS_USERS; - case "read:rules": - return READ_RULES; - case "delete:guardian_enrollments": - return DELETE_GUARDIAN_ENROLLMENTS; - case "update:client_keys": - return UPDATE_CLIENT_KEYS; - case "update:current_user_identities": - return UPDATE_CURRENT_USER_IDENTITIES; - case "create:organization_connections": - return CREATE_ORGANIZATION_CONNECTIONS; - case "read:email_provider": - return READ_EMAIL_PROVIDER; - case "read:flows_executions": - return READ_FLOWS_EXECUTIONS; - case "delete:clients": - return DELETE_CLIENTS; - case "create:role_members": - return CREATE_ROLE_MEMBERS; - case "create:flows": - return CREATE_FLOWS; - case "delete:hooks": - return DELETE_HOOKS; - case "delete:current_user": - return DELETE_CURRENT_USER; - case "read:organizations": - return READ_ORGANIZATIONS; - case "delete:roles": - return DELETE_ROLES; - case "read:connection_profiles": - return READ_CONNECTION_PROFILES; - case "update:phone_templates": - return UPDATE_PHONE_TEMPLATES; - case "read:stats": - return READ_STATS; - case "read:custom_domains": - return READ_CUSTOM_DOMAINS; - case "read:token_exchange_profiles": - return READ_TOKEN_EXCHANGE_PROFILES; - case "read:guardian_enrollments": - return READ_GUARDIAN_ENROLLMENTS; - case "update:organizations": - return UPDATE_ORGANIZATIONS; - case "update:self_service_profiles": - return UPDATE_SELF_SERVICE_PROFILES; - case "create:organization_client_grants": - return CREATE_ORGANIZATION_CLIENT_GRANTS; - case "delete:flows_executions": - return DELETE_FLOWS_EXECUTIONS; - case "update:connections_keys": - return UPDATE_CONNECTIONS_KEYS; - case "update:event_deliveries": - return UPDATE_EVENT_DELIVERIES; - case "delete:current_user_device_credentials": - return DELETE_CURRENT_USER_DEVICE_CREDENTIALS; - case "read:vdcs_templates": - return READ_VDCS_TEMPLATES; - case "read:phone_providers": - return READ_PHONE_PROVIDERS; - case "create:client_grants": - return CREATE_CLIENT_GRANTS; - case "delete:anomaly_blocks": - return DELETE_ANOMALY_BLOCKS; - case "read:connections_keys": - return READ_CONNECTIONS_KEYS; - case "read:actions": - return READ_ACTIONS; - case "read:resource_servers": - return READ_RESOURCE_SERVERS; - case "update:token_exchange_profiles": - return UPDATE_TOKEN_EXCHANGE_PROFILES; - case "delete:role_members": - return DELETE_ROLE_MEMBERS; - case "read:organization_connections": - return READ_ORGANIZATION_CONNECTIONS; - case "update:prompts": - return UPDATE_PROMPTS; - case "create:hooks": - return CREATE_HOOKS; - case "create:connections": - return CREATE_CONNECTIONS; - case "create:email_templates": - return CREATE_EMAIL_TEMPLATES; - case "update:attack_protection": - return UPDATE_ATTACK_PROTECTION; - case "read:mfa_policies": - return READ_MFA_POLICIES; - case "update:hooks": - return UPDATE_HOOKS; - case "delete:users": - return DELETE_USERS; - case "create:client_credentials": - return CREATE_CLIENT_CREDENTIALS; - case "update:client_credentials": - return UPDATE_CLIENT_CREDENTIALS; - case "create:actions": - return CREATE_ACTIONS; - case "read:event_deliveries": - return READ_EVENT_DELIVERIES; - case "delete:phone_templates": - return DELETE_PHONE_TEMPLATES; - case "read:refresh_tokens": - return READ_REFRESH_TOKENS; - case "update:email_templates": - return UPDATE_EMAIL_TEMPLATES; - case "read:role_members": - return READ_ROLE_MEMBERS; - case "create:organization_members": - return CREATE_ORGANIZATION_MEMBERS; - default: - return new OauthScope(Value.UNKNOWN, value); - } - } - - public enum Value { - CREATE_ACTIONS, - - READ_ACTIONS, - - UPDATE_ACTIONS, - - DELETE_ACTIONS, - - READ_ANOMALY_BLOCKS, - - DELETE_ANOMALY_BLOCKS, - - READ_ATTACK_PROTECTION, - - UPDATE_ATTACK_PROTECTION, - - CREATE_AUTHENTICATION_METHODS, - - READ_AUTHENTICATION_METHODS, - - UPDATE_AUTHENTICATION_METHODS, - - DELETE_AUTHENTICATION_METHODS, - - READ_BRANDING, - - UPDATE_BRANDING, - - DELETE_BRANDING, - - CREATE_CLIENT_CREDENTIALS, - - READ_CLIENT_CREDENTIALS, - - UPDATE_CLIENT_CREDENTIALS, - - DELETE_CLIENT_CREDENTIALS, - - CREATE_CLIENT_GRANTS, - - READ_CLIENT_GRANTS, - - UPDATE_CLIENT_GRANTS, - - DELETE_CLIENT_GRANTS, - - READ_CLIENT_KEYS, - - UPDATE_CLIENT_KEYS, - - READ_CLIENT_SUMMARY, - - UPDATE_CLIENT_TOKEN_VAULT_PRIVILEGED_ACCESS, - - CREATE_CLIENTS, - - READ_CLIENTS, - - UPDATE_CLIENTS, - - DELETE_CLIENTS, - - CREATE_CONNECTION_PROFILES, - - READ_CONNECTION_PROFILES, - - UPDATE_CONNECTION_PROFILES, - - DELETE_CONNECTION_PROFILES, - - CREATE_CONNECTIONS, - - READ_CONNECTIONS, - - UPDATE_CONNECTIONS, - - DELETE_CONNECTIONS, - - CREATE_CONNECTIONS_KEYS, - - READ_CONNECTIONS_KEYS, - - UPDATE_CONNECTIONS_KEYS, - - READ_CURRENT_USER, - - DELETE_CURRENT_USER, - - CREATE_CURRENT_USER_DEVICE_CREDENTIALS, - - DELETE_CURRENT_USER_DEVICE_CREDENTIALS, - - UPDATE_CURRENT_USER_IDENTITIES, - - UPDATE_CURRENT_USER_METADATA, - - CREATE_CUSTOM_DOMAINS, - - READ_CUSTOM_DOMAINS, - - UPDATE_CUSTOM_DOMAINS, - - DELETE_CUSTOM_DOMAINS, - - CREATE_CUSTOM_SIGNING_KEYS, - - READ_CUSTOM_SIGNING_KEYS, - - UPDATE_CUSTOM_SIGNING_KEYS, - - DELETE_CUSTOM_SIGNING_KEYS, - - READ_DEVICE_CREDENTIALS, - - DELETE_DEVICE_CREDENTIALS, - - CREATE_DIRECTORY_PROVISIONINGS, - - READ_DIRECTORY_PROVISIONINGS, - - UPDATE_DIRECTORY_PROVISIONINGS, - - DELETE_DIRECTORY_PROVISIONINGS, - - CREATE_EMAIL_PROVIDER, - - READ_EMAIL_PROVIDER, - - UPDATE_EMAIL_PROVIDER, - - DELETE_EMAIL_PROVIDER, - - CREATE_EMAIL_TEMPLATES, - - READ_EMAIL_TEMPLATES, - - UPDATE_EMAIL_TEMPLATES, - - CREATE_ENCRYPTION_KEYS, - - READ_ENCRYPTION_KEYS, - - UPDATE_ENCRYPTION_KEYS, - - DELETE_ENCRYPTION_KEYS, - - READ_EVENT_DELIVERIES, - - UPDATE_EVENT_DELIVERIES, - - CREATE_EVENT_STREAMS, - - READ_EVENT_STREAMS, - - UPDATE_EVENT_STREAMS, - - DELETE_EVENT_STREAMS, - - READ_FEDERATED_CONNECTIONS_TOKENS, - - DELETE_FEDERATED_CONNECTIONS_TOKENS, - - CREATE_FLOWS, - - READ_FLOWS, - - UPDATE_FLOWS, - - DELETE_FLOWS, - - READ_FLOWS_EXECUTIONS, - - DELETE_FLOWS_EXECUTIONS, - - CREATE_FLOWS_VAULT_CONNECTIONS, - - READ_FLOWS_VAULT_CONNECTIONS, - - UPDATE_FLOWS_VAULT_CONNECTIONS, - - DELETE_FLOWS_VAULT_CONNECTIONS, - - CREATE_FORMS, - - READ_FORMS, - - UPDATE_FORMS, - - DELETE_FORMS, - - READ_GRANTS, - - DELETE_GRANTS, - - READ_GROUP_MEMBERS, - - READ_GROUPS, - - CREATE_GUARDIAN_ENROLLMENT_TICKETS, - - READ_GUARDIAN_ENROLLMENTS, - - DELETE_GUARDIAN_ENROLLMENTS, - - READ_GUARDIAN_FACTORS, - - UPDATE_GUARDIAN_FACTORS, - - CREATE_HOOKS, - - READ_HOOKS, - - UPDATE_HOOKS, - - DELETE_HOOKS, - - CREATE_LOG_STREAMS, - - READ_LOG_STREAMS, - - UPDATE_LOG_STREAMS, - - DELETE_LOG_STREAMS, - - READ_LOGS, - - READ_LOGS_USERS, - - READ_MFA_POLICIES, - - UPDATE_MFA_POLICIES, - - CREATE_NETWORK_ACLS, - - READ_NETWORK_ACLS, - - UPDATE_NETWORK_ACLS, - - DELETE_NETWORK_ACLS, - - CREATE_ORGANIZATION_CLIENT_GRANTS, - - READ_ORGANIZATION_CLIENT_GRANTS, - - DELETE_ORGANIZATION_CLIENT_GRANTS, - - CREATE_ORGANIZATION_CONNECTIONS, - - READ_ORGANIZATION_CONNECTIONS, - - UPDATE_ORGANIZATION_CONNECTIONS, - - DELETE_ORGANIZATION_CONNECTIONS, - - CREATE_ORGANIZATION_DISCOVERY_DOMAINS, - - READ_ORGANIZATION_DISCOVERY_DOMAINS, - - UPDATE_ORGANIZATION_DISCOVERY_DOMAINS, - - DELETE_ORGANIZATION_DISCOVERY_DOMAINS, - - CREATE_ORGANIZATION_INVITATIONS, - - READ_ORGANIZATION_INVITATIONS, - - DELETE_ORGANIZATION_INVITATIONS, - - CREATE_ORGANIZATION_MEMBER_ROLES, - - READ_ORGANIZATION_MEMBER_ROLES, - - DELETE_ORGANIZATION_MEMBER_ROLES, - - CREATE_ORGANIZATION_MEMBERS, - - READ_ORGANIZATION_MEMBERS, - - DELETE_ORGANIZATION_MEMBERS, - - CREATE_ORGANIZATIONS, - - READ_ORGANIZATIONS, - - UPDATE_ORGANIZATIONS, - - DELETE_ORGANIZATIONS, - - READ_ORGANIZATIONS_SUMMARY, - - CREATE_PHONE_PROVIDERS, - - READ_PHONE_PROVIDERS, - - UPDATE_PHONE_PROVIDERS, - - DELETE_PHONE_PROVIDERS, - - CREATE_PHONE_TEMPLATES, - - READ_PHONE_TEMPLATES, - - UPDATE_PHONE_TEMPLATES, - - DELETE_PHONE_TEMPLATES, - - READ_PROMPTS, - - UPDATE_PROMPTS, - - READ_REFRESH_TOKENS, - - UPDATE_REFRESH_TOKENS, - - DELETE_REFRESH_TOKENS, - - CREATE_RESOURCE_SERVERS, - - READ_RESOURCE_SERVERS, - - UPDATE_RESOURCE_SERVERS, - - DELETE_RESOURCE_SERVERS, - - CREATE_ROLE_MEMBERS, - - READ_ROLE_MEMBERS, - - DELETE_ROLE_MEMBERS, - - CREATE_ROLES, - - READ_ROLES, - - UPDATE_ROLES, - - DELETE_ROLES, - - CREATE_RULES, - - READ_RULES, - - UPDATE_RULES, - - DELETE_RULES, - - READ_RULES_CONFIGS, - - UPDATE_RULES_CONFIGS, - - DELETE_RULES_CONFIGS, - - CREATE_SCIM_CONFIG, - - READ_SCIM_CONFIG, - - UPDATE_SCIM_CONFIG, - - DELETE_SCIM_CONFIG, - - CREATE_SCIM_TOKEN, - - READ_SCIM_TOKEN, - - DELETE_SCIM_TOKEN, - - READ_SELF_SERVICE_PROFILE_CUSTOM_TEXTS, - - UPDATE_SELF_SERVICE_PROFILE_CUSTOM_TEXTS, - - CREATE_SELF_SERVICE_PROFILES, - - READ_SELF_SERVICE_PROFILES, - - UPDATE_SELF_SERVICE_PROFILES, - - DELETE_SELF_SERVICE_PROFILES, - - READ_SESSIONS, - - UPDATE_SESSIONS, - - DELETE_SESSIONS, - - CREATE_SIGNING_KEYS, - - READ_SIGNING_KEYS, - - UPDATE_SIGNING_KEYS, - - CREATE_SSO_ACCESS_TICKETS, - - DELETE_SSO_ACCESS_TICKETS, - - READ_STATS, - - READ_TENANT_SETTINGS, - - UPDATE_TENANT_SETTINGS, - - CREATE_TOKEN_EXCHANGE_PROFILES, - - READ_TOKEN_EXCHANGE_PROFILES, - - UPDATE_TOKEN_EXCHANGE_PROFILES, - - DELETE_TOKEN_EXCHANGE_PROFILES, - - CREATE_USER_ATTRIBUTE_PROFILES, - - READ_USER_ATTRIBUTE_PROFILES, - - UPDATE_USER_ATTRIBUTE_PROFILES, - - DELETE_USER_ATTRIBUTE_PROFILES, - - READ_USER_IDP_TOKENS, - - CREATE_USER_TICKETS, - - CREATE_USERS, - - READ_USERS, - - UPDATE_USERS, - - DELETE_USERS, - - UPDATE_USERS_APP_METADATA, - - CREATE_VDCS_TEMPLATES, - - READ_VDCS_TEMPLATES, - - UPDATE_VDCS_TEMPLATES, - - DELETE_VDCS_TEMPLATES, - - UNKNOWN - } - - public interface Visitor { - T visitCreateActions(); - - T visitReadActions(); - - T visitUpdateActions(); - - T visitDeleteActions(); - - T visitReadAnomalyBlocks(); - - T visitDeleteAnomalyBlocks(); - - T visitReadAttackProtection(); - - T visitUpdateAttackProtection(); - - T visitCreateAuthenticationMethods(); - - T visitReadAuthenticationMethods(); - - T visitUpdateAuthenticationMethods(); - - T visitDeleteAuthenticationMethods(); - - T visitReadBranding(); - - T visitUpdateBranding(); - - T visitDeleteBranding(); - - T visitCreateClientCredentials(); - - T visitReadClientCredentials(); - - T visitUpdateClientCredentials(); - - T visitDeleteClientCredentials(); - - T visitCreateClientGrants(); - - T visitReadClientGrants(); - - T visitUpdateClientGrants(); - - T visitDeleteClientGrants(); - - T visitReadClientKeys(); - - T visitUpdateClientKeys(); - - T visitReadClientSummary(); - - T visitUpdateClientTokenVaultPrivilegedAccess(); - - T visitCreateClients(); - - T visitReadClients(); - - T visitUpdateClients(); - - T visitDeleteClients(); - - T visitCreateConnectionProfiles(); - - T visitReadConnectionProfiles(); - - T visitUpdateConnectionProfiles(); - - T visitDeleteConnectionProfiles(); - - T visitCreateConnections(); - - T visitReadConnections(); - - T visitUpdateConnections(); - - T visitDeleteConnections(); - - T visitCreateConnectionsKeys(); - - T visitReadConnectionsKeys(); - - T visitUpdateConnectionsKeys(); - - T visitReadCurrentUser(); - - T visitDeleteCurrentUser(); - - T visitCreateCurrentUserDeviceCredentials(); - - T visitDeleteCurrentUserDeviceCredentials(); - - T visitUpdateCurrentUserIdentities(); - - T visitUpdateCurrentUserMetadata(); - - T visitCreateCustomDomains(); - - T visitReadCustomDomains(); - - T visitUpdateCustomDomains(); - - T visitDeleteCustomDomains(); - - T visitCreateCustomSigningKeys(); - - T visitReadCustomSigningKeys(); - - T visitUpdateCustomSigningKeys(); - - T visitDeleteCustomSigningKeys(); - - T visitReadDeviceCredentials(); - - T visitDeleteDeviceCredentials(); - - T visitCreateDirectoryProvisionings(); - - T visitReadDirectoryProvisionings(); - - T visitUpdateDirectoryProvisionings(); - - T visitDeleteDirectoryProvisionings(); - - T visitCreateEmailProvider(); - - T visitReadEmailProvider(); - - T visitUpdateEmailProvider(); - - T visitDeleteEmailProvider(); - - T visitCreateEmailTemplates(); - - T visitReadEmailTemplates(); - - T visitUpdateEmailTemplates(); - - T visitCreateEncryptionKeys(); - - T visitReadEncryptionKeys(); - - T visitUpdateEncryptionKeys(); - - T visitDeleteEncryptionKeys(); - - T visitReadEventDeliveries(); - - T visitUpdateEventDeliveries(); - - T visitCreateEventStreams(); - - T visitReadEventStreams(); - - T visitUpdateEventStreams(); - - T visitDeleteEventStreams(); - - T visitReadFederatedConnectionsTokens(); - - T visitDeleteFederatedConnectionsTokens(); - - T visitCreateFlows(); - - T visitReadFlows(); - - T visitUpdateFlows(); - - T visitDeleteFlows(); - - T visitReadFlowsExecutions(); - - T visitDeleteFlowsExecutions(); - - T visitCreateFlowsVaultConnections(); - - T visitReadFlowsVaultConnections(); - - T visitUpdateFlowsVaultConnections(); - - T visitDeleteFlowsVaultConnections(); - - T visitCreateForms(); - - T visitReadForms(); - - T visitUpdateForms(); - - T visitDeleteForms(); - - T visitReadGrants(); - - T visitDeleteGrants(); - - T visitReadGroupMembers(); - - T visitReadGroups(); - - T visitCreateGuardianEnrollmentTickets(); - - T visitReadGuardianEnrollments(); - - T visitDeleteGuardianEnrollments(); - - T visitReadGuardianFactors(); - - T visitUpdateGuardianFactors(); - - T visitCreateHooks(); - - T visitReadHooks(); - - T visitUpdateHooks(); - - T visitDeleteHooks(); - - T visitCreateLogStreams(); - - T visitReadLogStreams(); - - T visitUpdateLogStreams(); - - T visitDeleteLogStreams(); - - T visitReadLogs(); - - T visitReadLogsUsers(); - - T visitReadMfaPolicies(); - - T visitUpdateMfaPolicies(); - - T visitCreateNetworkAcls(); - - T visitReadNetworkAcls(); - - T visitUpdateNetworkAcls(); - - T visitDeleteNetworkAcls(); - - T visitCreateOrganizationClientGrants(); - - T visitReadOrganizationClientGrants(); - - T visitDeleteOrganizationClientGrants(); - - T visitCreateOrganizationConnections(); - - T visitReadOrganizationConnections(); - - T visitUpdateOrganizationConnections(); - - T visitDeleteOrganizationConnections(); - - T visitCreateOrganizationDiscoveryDomains(); - - T visitReadOrganizationDiscoveryDomains(); - - T visitUpdateOrganizationDiscoveryDomains(); - - T visitDeleteOrganizationDiscoveryDomains(); - - T visitCreateOrganizationInvitations(); - - T visitReadOrganizationInvitations(); - - T visitDeleteOrganizationInvitations(); - - T visitCreateOrganizationMemberRoles(); - - T visitReadOrganizationMemberRoles(); - - T visitDeleteOrganizationMemberRoles(); - - T visitCreateOrganizationMembers(); - - T visitReadOrganizationMembers(); - - T visitDeleteOrganizationMembers(); - - T visitCreateOrganizations(); - - T visitReadOrganizations(); - - T visitUpdateOrganizations(); - - T visitDeleteOrganizations(); - - T visitReadOrganizationsSummary(); - - T visitCreatePhoneProviders(); - - T visitReadPhoneProviders(); - - T visitUpdatePhoneProviders(); - - T visitDeletePhoneProviders(); - - T visitCreatePhoneTemplates(); - - T visitReadPhoneTemplates(); - - T visitUpdatePhoneTemplates(); - - T visitDeletePhoneTemplates(); - - T visitReadPrompts(); - - T visitUpdatePrompts(); - - T visitReadRefreshTokens(); - - T visitUpdateRefreshTokens(); - - T visitDeleteRefreshTokens(); - - T visitCreateResourceServers(); - - T visitReadResourceServers(); - - T visitUpdateResourceServers(); - - T visitDeleteResourceServers(); - - T visitCreateRoleMembers(); - - T visitReadRoleMembers(); - - T visitDeleteRoleMembers(); - - T visitCreateRoles(); - - T visitReadRoles(); - - T visitUpdateRoles(); - - T visitDeleteRoles(); - - T visitCreateRules(); - - T visitReadRules(); - - T visitUpdateRules(); - - T visitDeleteRules(); - - T visitReadRulesConfigs(); - - T visitUpdateRulesConfigs(); - - T visitDeleteRulesConfigs(); - - T visitCreateScimConfig(); - - T visitReadScimConfig(); - - T visitUpdateScimConfig(); - - T visitDeleteScimConfig(); - - T visitCreateScimToken(); - - T visitReadScimToken(); - - T visitDeleteScimToken(); - - T visitReadSelfServiceProfileCustomTexts(); - - T visitUpdateSelfServiceProfileCustomTexts(); - - T visitCreateSelfServiceProfiles(); - - T visitReadSelfServiceProfiles(); - - T visitUpdateSelfServiceProfiles(); - - T visitDeleteSelfServiceProfiles(); - - T visitReadSessions(); - - T visitUpdateSessions(); - - T visitDeleteSessions(); - - T visitCreateSigningKeys(); - - T visitReadSigningKeys(); - - T visitUpdateSigningKeys(); - - T visitCreateSsoAccessTickets(); - - T visitDeleteSsoAccessTickets(); - - T visitReadStats(); - - T visitReadTenantSettings(); - - T visitUpdateTenantSettings(); - - T visitCreateTokenExchangeProfiles(); - - T visitReadTokenExchangeProfiles(); - - T visitUpdateTokenExchangeProfiles(); - - T visitDeleteTokenExchangeProfiles(); - - T visitCreateUserAttributeProfiles(); - - T visitReadUserAttributeProfiles(); - - T visitUpdateUserAttributeProfiles(); - - T visitDeleteUserAttributeProfiles(); - - T visitReadUserIdpTokens(); - - T visitCreateUserTickets(); - - T visitCreateUsers(); - - T visitReadUsers(); - - T visitUpdateUsers(); - - T visitDeleteUsers(); - - T visitUpdateUsersAppMetadata(); - - T visitCreateVdcsTemplates(); - - T visitReadVdcsTemplates(); - - T visitUpdateVdcsTemplates(); - - T visitDeleteVdcsTemplates(); - - 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 deleted file mode 100644 index 4234f9c91..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/Organization.java +++ /dev/null @@ -1,236 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = Organization.Builder.class) -public final class Organization { - private final Optional id; - - private final Optional name; - - private final Optional displayName; - - private final Optional branding; - - private final Optional>> metadata; - - private final Optional tokenQuota; - - private final Map additionalProperties; - - private Organization( - Optional id, - Optional name, - Optional displayName, - Optional branding, - Optional>> metadata, - Optional tokenQuota, - Map additionalProperties) { - this.id = id; - this.name = name; - this.displayName = displayName; - this.branding = branding; - this.metadata = metadata; - this.tokenQuota = tokenQuota; - 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("metadata") - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("token_quota") - public Optional getTokenQuota() { - return tokenQuota; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Organization && equalTo((Organization) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(Organization other) { - return id.equals(other.id) - && name.equals(other.name) - && displayName.equals(other.displayName) - && branding.equals(other.branding) - && metadata.equals(other.metadata) - && tokenQuota.equals(other.tokenQuota); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.displayName, this.branding, this.metadata, this.tokenQuota); - } - - @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>> metadata = Optional.empty(); - - private Optional tokenQuota = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(Organization other) { - id(other.getId()); - name(other.getName()); - displayName(other.getDisplayName()); - branding(other.getBranding()); - metadata(other.getMetadata()); - tokenQuota(other.getTokenQuota()); - 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 = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "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; - } - - public Organization build() { - return new Organization(id, name, displayName, branding, metadata, tokenQuota, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationBranding.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationBranding.java deleted file mode 100644 index db58bbc39..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationBranding.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = OrganizationBranding.Builder.class) -public final class OrganizationBranding { - private final Optional logoUrl; - - private final Optional colors; - - private final Map additionalProperties; - - private OrganizationBranding( - 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 OrganizationBranding && equalTo((OrganizationBranding) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(OrganizationBranding 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(OrganizationBranding 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(OrganizationBrandingColors colors) { - this.colors = Optional.ofNullable(colors); - return this; - } - - public OrganizationBranding build() { - return new OrganizationBranding(logoUrl, colors, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationBrandingColors.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationBrandingColors.java deleted file mode 100644 index f4935915c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationBrandingColors.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = OrganizationBrandingColors.Builder.class) -public final class OrganizationBrandingColors { - private final String primary; - - private final String pageBackground; - - private final Map additionalProperties; - - private OrganizationBrandingColors( - String primary, String pageBackground, Map additionalProperties) { - this.primary = primary; - this.pageBackground = pageBackground; - this.additionalProperties = additionalProperties; - } - - /** - * @return HEX Color for primary elements. - */ - @JsonProperty("primary") - public String getPrimary() { - return primary; - } - - /** - * @return HEX Color for background. - */ - @JsonProperty("page_background") - public String getPageBackground() { - return pageBackground; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof OrganizationBrandingColors && equalTo((OrganizationBrandingColors) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(OrganizationBrandingColors 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 PrimaryStage builder() { - return new Builder(); - } - - public interface PrimaryStage { - /** - *

HEX Color for primary elements.

- */ - PageBackgroundStage primary(@NotNull String primary); - - Builder from(OrganizationBrandingColors other); - } - - public interface PageBackgroundStage { - /** - *

HEX Color for background.

- */ - _FinalStage pageBackground(@NotNull String pageBackground); - } - - public interface _FinalStage { - OrganizationBrandingColors build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements PrimaryStage, PageBackgroundStage, _FinalStage { - private String primary; - - private String pageBackground; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(OrganizationBrandingColors other) { - primary(other.getPrimary()); - pageBackground(other.getPageBackground()); - return this; - } - - /** - *

HEX Color for primary elements.

- *

HEX Color for primary elements.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("primary") - public PageBackgroundStage primary(@NotNull String primary) { - this.primary = Objects.requireNonNull(primary, "primary must not be null"); - return this; - } - - /** - *

HEX Color for background.

- *

HEX Color for background.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("page_background") - public _FinalStage pageBackground(@NotNull String pageBackground) { - this.pageBackground = Objects.requireNonNull(pageBackground, "pageBackground must not be null"); - return this; - } - - @java.lang.Override - public OrganizationBrandingColors build() { - return new OrganizationBrandingColors(primary, pageBackground, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationClientGrant.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationClientGrant.java deleted file mode 100644 index bb281b935..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationClientGrant.java +++ /dev/null @@ -1,250 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = OrganizationClientGrant.Builder.class) -public final class OrganizationClientGrant { - private final Optional id; - - private final Optional clientId; - - private final Optional audience; - - private final Optional> scope; - - private final Optional organizationUsage; - - private final Optional allowAnyOrganization; - - private final Map additionalProperties; - - private OrganizationClientGrant( - Optional id, - Optional clientId, - Optional audience, - Optional> scope, - Optional organizationUsage, - Optional allowAnyOrganization, - Map additionalProperties) { - this.id = id; - this.clientId = clientId; - this.audience = audience; - this.scope = scope; - this.organizationUsage = organizationUsage; - this.allowAnyOrganization = allowAnyOrganization; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the client grant. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return ID of the client. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @return The audience (API identifier) of this client grant - */ - @JsonProperty("audience") - public Optional getAudience() { - return audience; - } - - /** - * @return Scopes allowed for this client grant. - */ - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonProperty("organization_usage") - public Optional getOrganizationUsage() { - return organizationUsage; - } - - /** - * @return If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations. - */ - @JsonProperty("allow_any_organization") - public Optional getAllowAnyOrganization() { - return allowAnyOrganization; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof OrganizationClientGrant && equalTo((OrganizationClientGrant) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(OrganizationClientGrant other) { - return id.equals(other.id) - && clientId.equals(other.clientId) - && audience.equals(other.audience) - && scope.equals(other.scope) - && organizationUsage.equals(other.organizationUsage) - && allowAnyOrganization.equals(other.allowAnyOrganization); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.clientId, this.audience, this.scope, this.organizationUsage, this.allowAnyOrganization); - } - - @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 clientId = Optional.empty(); - - private Optional audience = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional organizationUsage = Optional.empty(); - - private Optional allowAnyOrganization = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(OrganizationClientGrant other) { - id(other.getId()); - clientId(other.getClientId()); - audience(other.getAudience()); - scope(other.getScope()); - organizationUsage(other.getOrganizationUsage()); - allowAnyOrganization(other.getAllowAnyOrganization()); - return this; - } - - /** - *

ID of the client grant.

- */ - @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; - } - - /** - *

ID of the 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 audience (API identifier) of this client grant

- */ - @JsonSetter(value = "audience", nulls = Nulls.SKIP) - public Builder audience(Optional audience) { - this.audience = audience; - return this; - } - - public Builder audience(String audience) { - this.audience = Optional.ofNullable(audience); - return this; - } - - /** - *

Scopes allowed for this client grant.

- */ - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "organization_usage", nulls = Nulls.SKIP) - public Builder organizationUsage(Optional organizationUsage) { - this.organizationUsage = organizationUsage; - return this; - } - - public Builder organizationUsage(OrganizationUsageEnum organizationUsage) { - this.organizationUsage = Optional.ofNullable(organizationUsage); - return this; - } - - /** - *

If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.

- */ - @JsonSetter(value = "allow_any_organization", nulls = Nulls.SKIP) - public Builder allowAnyOrganization(Optional allowAnyOrganization) { - this.allowAnyOrganization = allowAnyOrganization; - return this; - } - - public Builder allowAnyOrganization(Boolean allowAnyOrganization) { - this.allowAnyOrganization = Optional.ofNullable(allowAnyOrganization); - return this; - } - - public OrganizationClientGrant build() { - return new OrganizationClientGrant( - id, clientId, audience, scope, organizationUsage, allowAnyOrganization, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationConnection.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationConnection.java deleted file mode 100644 index 83b16d23f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationConnection.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = OrganizationConnection.Builder.class) -public final class OrganizationConnection { - private final Optional connectionId; - - private final Optional assignMembershipOnLogin; - - private final Optional showAsButton; - - private final Optional isSignupEnabled; - - private final Optional connection; - - private final Map additionalProperties; - - private OrganizationConnection( - Optional connectionId, - Optional assignMembershipOnLogin, - Optional showAsButton, - Optional isSignupEnabled, - Optional connection, - Map additionalProperties) { - this.connectionId = connectionId; - this.assignMembershipOnLogin = assignMembershipOnLogin; - this.showAsButton = showAsButton; - this.isSignupEnabled = isSignupEnabled; - this.connection = connection; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the connection. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - /** - * @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. Default: true. - */ - @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. Default: false. - */ - @JsonProperty("is_signup_enabled") - public Optional getIsSignupEnabled() { - return isSignupEnabled; - } - - @JsonProperty("connection") - public Optional getConnection() { - return connection; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof OrganizationConnection && equalTo((OrganizationConnection) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(OrganizationConnection other) { - return connectionId.equals(other.connectionId) - && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) - && showAsButton.equals(other.showAsButton) - && isSignupEnabled.equals(other.isSignupEnabled) - && connection.equals(other.connection); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.assignMembershipOnLogin, - this.showAsButton, - this.isSignupEnabled, - this.connection); - } - - @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 connectionId = Optional.empty(); - - private Optional assignMembershipOnLogin = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - private Optional isSignupEnabled = Optional.empty(); - - private Optional connection = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(OrganizationConnection other) { - connectionId(other.getConnectionId()); - assignMembershipOnLogin(other.getAssignMembershipOnLogin()); - showAsButton(other.getShowAsButton()); - isSignupEnabled(other.getIsSignupEnabled()); - connection(other.getConnection()); - return this; - } - - /** - *

ID of the connection.

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - 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.

- */ - @JsonSetter(value = "assign_membership_on_login", nulls = Nulls.SKIP) - public Builder assignMembershipOnLogin(Optional assignMembershipOnLogin) { - this.assignMembershipOnLogin = assignMembershipOnLogin; - return this; - } - - public Builder assignMembershipOnLogin(Boolean assignMembershipOnLogin) { - this.assignMembershipOnLogin = Optional.ofNullable(assignMembershipOnLogin); - return this; - } - - /** - *

Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true.

- */ - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - /** - *

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

- */ - @JsonSetter(value = "is_signup_enabled", nulls = Nulls.SKIP) - public Builder isSignupEnabled(Optional isSignupEnabled) { - this.isSignupEnabled = isSignupEnabled; - return this; - } - - public Builder isSignupEnabled(Boolean isSignupEnabled) { - this.isSignupEnabled = Optional.ofNullable(isSignupEnabled); - return this; - } - - @JsonSetter(value = "connection", nulls = Nulls.SKIP) - public Builder connection(Optional connection) { - this.connection = connection; - return this; - } - - public Builder connection(OrganizationConnectionInformation connection) { - this.connection = Optional.ofNullable(connection); - return this; - } - - public OrganizationConnection build() { - return new OrganizationConnection( - connectionId, - assignMembershipOnLogin, - showAsButton, - isSignupEnabled, - connection, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationConnectionInformation.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationConnectionInformation.java deleted file mode 100644 index 647c645d6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationConnectionInformation.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = OrganizationConnectionInformation.Builder.class) -public final class OrganizationConnectionInformation { - private final Optional name; - - private final Optional strategy; - - private final Map additionalProperties; - - private OrganizationConnectionInformation( - Optional name, Optional strategy, Map additionalProperties) { - this.name = name; - this.strategy = strategy; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the enabled connection. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The strategy of the enabled connection. - */ - @JsonProperty("strategy") - public Optional getStrategy() { - return strategy; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof OrganizationConnectionInformation && equalTo((OrganizationConnectionInformation) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(OrganizationConnectionInformation other) { - return name.equals(other.name) && strategy.equals(other.strategy); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.strategy); - } - - @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 strategy = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(OrganizationConnectionInformation other) { - name(other.getName()); - strategy(other.getStrategy()); - return this; - } - - /** - *

The name of the enabled connection.

- */ - @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 strategy of the enabled connection.

- */ - @JsonSetter(value = "strategy", nulls = Nulls.SKIP) - public Builder strategy(Optional strategy) { - this.strategy = strategy; - return this; - } - - public Builder strategy(String strategy) { - this.strategy = Optional.ofNullable(strategy); - return this; - } - - public OrganizationConnectionInformation build() { - return new OrganizationConnectionInformation(name, strategy, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationDiscoveryDomain.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationDiscoveryDomain.java deleted file mode 100644 index aa53440ff..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationDiscoveryDomain.java +++ /dev/null @@ -1,303 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = OrganizationDiscoveryDomain.Builder.class) -public final class OrganizationDiscoveryDomain { - private final String id; - - private final String domain; - - private final OrganizationDiscoveryDomainStatus status; - - private final Optional useForOrganizationDiscovery; - - private final String verificationTxt; - - private final String verificationHost; - - private final Map additionalProperties; - - private OrganizationDiscoveryDomain( - String id, - String domain, - OrganizationDiscoveryDomainStatus status, - Optional useForOrganizationDiscovery, - String verificationTxt, - String verificationHost, - Map additionalProperties) { - this.id = id; - this.domain = domain; - this.status = status; - this.useForOrganizationDiscovery = useForOrganizationDiscovery; - this.verificationTxt = verificationTxt; - this.verificationHost = verificationHost; - this.additionalProperties = additionalProperties; - } - - /** - * @return Organization discovery domain identifier. - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return The domain name to associate with the organization e.g. acme.com. - */ - @JsonProperty("domain") - public String getDomain() { - return domain; - } - - @JsonProperty("status") - public OrganizationDiscoveryDomainStatus getStatus() { - return status; - } - - /** - * @return Indicates whether this domain should be used for organization discovery. - */ - @JsonProperty("use_for_organization_discovery") - public Optional getUseForOrganizationDiscovery() { - return useForOrganizationDiscovery; - } - - /** - * @return 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. - */ - @JsonProperty("verification_txt") - public String getVerificationTxt() { - return verificationTxt; - } - - /** - * @return The full domain where the TXT record should be added. - */ - @JsonProperty("verification_host") - public String getVerificationHost() { - return verificationHost; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof OrganizationDiscoveryDomain && equalTo((OrganizationDiscoveryDomain) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(OrganizationDiscoveryDomain other) { - return id.equals(other.id) - && domain.equals(other.domain) - && status.equals(other.status) - && useForOrganizationDiscovery.equals(other.useForOrganizationDiscovery) - && verificationTxt.equals(other.verificationTxt) - && verificationHost.equals(other.verificationHost); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.domain, - this.status, - this.useForOrganizationDiscovery, - this.verificationTxt, - this.verificationHost); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

Organization discovery domain identifier.

- */ - DomainStage id(@NotNull String id); - - Builder from(OrganizationDiscoveryDomain other); - } - - public interface DomainStage { - /** - *

The domain name to associate with the organization e.g. acme.com.

- */ - StatusStage domain(@NotNull String domain); - } - - public interface StatusStage { - VerificationTxtStage status(@NotNull OrganizationDiscoveryDomainStatus status); - } - - public interface VerificationTxtStage { - /** - *

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.

- */ - VerificationHostStage verificationTxt(@NotNull String verificationTxt); - } - - public interface VerificationHostStage { - /** - *

The full domain where the TXT record should be added.

- */ - _FinalStage verificationHost(@NotNull String verificationHost); - } - - public interface _FinalStage { - OrganizationDiscoveryDomain build(); - - /** - *

Indicates whether this domain should be used for organization discovery.

- */ - _FinalStage useForOrganizationDiscovery(Optional useForOrganizationDiscovery); - - _FinalStage useForOrganizationDiscovery(Boolean useForOrganizationDiscovery); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements IdStage, DomainStage, StatusStage, VerificationTxtStage, VerificationHostStage, _FinalStage { - private String id; - - private String domain; - - private OrganizationDiscoveryDomainStatus status; - - private String verificationTxt; - - private String verificationHost; - - private Optional useForOrganizationDiscovery = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(OrganizationDiscoveryDomain other) { - id(other.getId()); - domain(other.getDomain()); - status(other.getStatus()); - useForOrganizationDiscovery(other.getUseForOrganizationDiscovery()); - verificationTxt(other.getVerificationTxt()); - verificationHost(other.getVerificationHost()); - return this; - } - - /** - *

Organization discovery domain identifier.

- *

Organization discovery domain identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("id") - public DomainStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("domain") - public StatusStage domain(@NotNull String domain) { - this.domain = Objects.requireNonNull(domain, "domain must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("status") - public VerificationTxtStage status(@NotNull OrganizationDiscoveryDomainStatus status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("verification_txt") - public VerificationHostStage verificationTxt(@NotNull String verificationTxt) { - this.verificationTxt = Objects.requireNonNull(verificationTxt, "verificationTxt must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("verification_host") - public _FinalStage verificationHost(@NotNull String verificationHost) { - this.verificationHost = Objects.requireNonNull(verificationHost, "verificationHost must not be null"); - return this; - } - - /** - *

Indicates whether this domain should be used for organization discovery.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage useForOrganizationDiscovery(Boolean useForOrganizationDiscovery) { - this.useForOrganizationDiscovery = Optional.ofNullable(useForOrganizationDiscovery); - return this; - } - - /** - *

Indicates whether this domain should be used for organization discovery.

- */ - @java.lang.Override - @JsonSetter(value = "use_for_organization_discovery", nulls = Nulls.SKIP) - public _FinalStage useForOrganizationDiscovery(Optional useForOrganizationDiscovery) { - this.useForOrganizationDiscovery = useForOrganizationDiscovery; - return this; - } - - @java.lang.Override - public OrganizationDiscoveryDomain build() { - return new OrganizationDiscoveryDomain( - id, - domain, - status, - useForOrganizationDiscovery, - verificationTxt, - verificationHost, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationDiscoveryDomainStatus.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationDiscoveryDomainStatus.java deleted file mode 100644 index fb19bacd8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationDiscoveryDomainStatus.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class OrganizationDiscoveryDomainStatus { - public static final OrganizationDiscoveryDomainStatus PENDING = - new OrganizationDiscoveryDomainStatus(Value.PENDING, "pending"); - - public static final OrganizationDiscoveryDomainStatus VERIFIED = - new OrganizationDiscoveryDomainStatus(Value.VERIFIED, "verified"); - - private final Value value; - - private final String string; - - OrganizationDiscoveryDomainStatus(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof OrganizationDiscoveryDomainStatus - && this.string.equals(((OrganizationDiscoveryDomainStatus) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PENDING: - return visitor.visitPending(); - case VERIFIED: - return visitor.visitVerified(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static OrganizationDiscoveryDomainStatus valueOf(String value) { - switch (value) { - case "pending": - return PENDING; - case "verified": - return VERIFIED; - default: - return new OrganizationDiscoveryDomainStatus(Value.UNKNOWN, value); - } - } - - public enum Value { - PENDING, - - VERIFIED, - - UNKNOWN - } - - public interface Visitor { - T visitPending(); - - T visitVerified(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationEnabledConnection.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationEnabledConnection.java deleted file mode 100644 index e9d82484e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationEnabledConnection.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = OrganizationEnabledConnection.Builder.class) -public final class OrganizationEnabledConnection { - private final Optional connectionId; - - private final Optional assignMembershipOnLogin; - - private final Optional showAsButton; - - private final Optional isSignupEnabled; - - private final Optional connection; - - private final Map additionalProperties; - - private OrganizationEnabledConnection( - Optional connectionId, - Optional assignMembershipOnLogin, - Optional showAsButton, - Optional isSignupEnabled, - Optional connection, - Map additionalProperties) { - this.connectionId = connectionId; - this.assignMembershipOnLogin = assignMembershipOnLogin; - this.showAsButton = showAsButton; - this.isSignupEnabled = isSignupEnabled; - this.connection = connection; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the connection. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - /** - * @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. Default: true. - */ - @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. Default: false. - */ - @JsonProperty("is_signup_enabled") - public Optional getIsSignupEnabled() { - return isSignupEnabled; - } - - @JsonProperty("connection") - public Optional getConnection() { - return connection; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof OrganizationEnabledConnection && equalTo((OrganizationEnabledConnection) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(OrganizationEnabledConnection other) { - return connectionId.equals(other.connectionId) - && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) - && showAsButton.equals(other.showAsButton) - && isSignupEnabled.equals(other.isSignupEnabled) - && connection.equals(other.connection); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.assignMembershipOnLogin, - this.showAsButton, - this.isSignupEnabled, - this.connection); - } - - @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 connectionId = Optional.empty(); - - private Optional assignMembershipOnLogin = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - private Optional isSignupEnabled = Optional.empty(); - - private Optional connection = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(OrganizationEnabledConnection other) { - connectionId(other.getConnectionId()); - assignMembershipOnLogin(other.getAssignMembershipOnLogin()); - showAsButton(other.getShowAsButton()); - isSignupEnabled(other.getIsSignupEnabled()); - connection(other.getConnection()); - return this; - } - - /** - *

ID of the connection.

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - 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.

- */ - @JsonSetter(value = "assign_membership_on_login", nulls = Nulls.SKIP) - public Builder assignMembershipOnLogin(Optional assignMembershipOnLogin) { - this.assignMembershipOnLogin = assignMembershipOnLogin; - return this; - } - - public Builder assignMembershipOnLogin(Boolean assignMembershipOnLogin) { - this.assignMembershipOnLogin = Optional.ofNullable(assignMembershipOnLogin); - return this; - } - - /** - *

Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true.

- */ - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - /** - *

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

- */ - @JsonSetter(value = "is_signup_enabled", nulls = Nulls.SKIP) - public Builder isSignupEnabled(Optional isSignupEnabled) { - this.isSignupEnabled = isSignupEnabled; - return this; - } - - public Builder isSignupEnabled(Boolean isSignupEnabled) { - this.isSignupEnabled = Optional.ofNullable(isSignupEnabled); - return this; - } - - @JsonSetter(value = "connection", nulls = Nulls.SKIP) - public Builder connection(Optional connection) { - this.connection = connection; - return this; - } - - public Builder connection(OrganizationConnectionInformation connection) { - this.connection = Optional.ofNullable(connection); - return this; - } - - public OrganizationEnabledConnection build() { - return new OrganizationEnabledConnection( - connectionId, - assignMembershipOnLogin, - showAsButton, - isSignupEnabled, - connection, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitation.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitation.java deleted file mode 100644 index 4343fb85a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitation.java +++ /dev/null @@ -1,468 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = OrganizationInvitation.Builder.class) -public final class OrganizationInvitation { - private final Optional id; - - private final Optional organizationId; - - private final Optional inviter; - - private final Optional invitee; - - private final Optional invitationUrl; - - private final Optional createdAt; - - private final Optional expiresAt; - - private final Optional clientId; - - private final Optional connectionId; - - private final Optional> appMetadata; - - private final Optional> userMetadata; - - private final Optional> roles; - - private final Optional ticketId; - - private final Map additionalProperties; - - private OrganizationInvitation( - Optional id, - Optional organizationId, - Optional inviter, - Optional invitee, - Optional invitationUrl, - Optional createdAt, - Optional expiresAt, - Optional clientId, - Optional connectionId, - Optional> appMetadata, - Optional> userMetadata, - Optional> roles, - Optional ticketId, - Map additionalProperties) { - this.id = id; - this.organizationId = organizationId; - this.inviter = inviter; - this.invitee = invitee; - this.invitationUrl = invitationUrl; - this.createdAt = createdAt; - this.expiresAt = expiresAt; - this.clientId = clientId; - this.connectionId = connectionId; - this.appMetadata = appMetadata; - this.userMetadata = userMetadata; - this.roles = roles; - this.ticketId = ticketId; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the user invitation. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Organization identifier. - */ - @JsonProperty("organization_id") - public Optional getOrganizationId() { - return organizationId; - } - - @JsonProperty("inviter") - public Optional getInviter() { - return inviter; - } - - @JsonProperty("invitee") - public Optional getInvitee() { - return invitee; - } - - /** - * @return The invitation url to be send to the invitee. - */ - @JsonProperty("invitation_url") - public Optional getInvitationUrl() { - return invitationUrl; - } - - /** - * @return The ISO 8601 formatted timestamp representing the creation time of the invitation. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The ISO 8601 formatted timestamp representing the expiration time of the invitation. - */ - @JsonProperty("expires_at") - public Optional getExpiresAt() { - return expiresAt; - } - - /** - * @return Auth0 client ID. Used to resolve the application's login initiation endpoint. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @return The id of the connection to force invitee to authenticate with. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - @JsonProperty("app_metadata") - public Optional> getAppMetadata() { - return appMetadata; - } - - @JsonProperty("user_metadata") - public Optional> getUserMetadata() { - return userMetadata; - } - - /** - * @return List of roles IDs to associated with the user. - */ - @JsonProperty("roles") - public Optional> getRoles() { - return roles; - } - - /** - * @return The id of the invitation ticket - */ - @JsonProperty("ticket_id") - public Optional getTicketId() { - return ticketId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof OrganizationInvitation && equalTo((OrganizationInvitation) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(OrganizationInvitation other) { - return id.equals(other.id) - && organizationId.equals(other.organizationId) - && inviter.equals(other.inviter) - && invitee.equals(other.invitee) - && invitationUrl.equals(other.invitationUrl) - && createdAt.equals(other.createdAt) - && expiresAt.equals(other.expiresAt) - && clientId.equals(other.clientId) - && connectionId.equals(other.connectionId) - && appMetadata.equals(other.appMetadata) - && userMetadata.equals(other.userMetadata) - && roles.equals(other.roles) - && ticketId.equals(other.ticketId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.organizationId, - this.inviter, - this.invitee, - this.invitationUrl, - this.createdAt, - this.expiresAt, - this.clientId, - this.connectionId, - this.appMetadata, - this.userMetadata, - this.roles, - this.ticketId); - } - - @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 organizationId = Optional.empty(); - - private Optional inviter = Optional.empty(); - - private Optional invitee = Optional.empty(); - - private Optional invitationUrl = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional expiresAt = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional connectionId = Optional.empty(); - - private Optional> appMetadata = Optional.empty(); - - private Optional> userMetadata = Optional.empty(); - - private Optional> roles = Optional.empty(); - - private Optional ticketId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(OrganizationInvitation other) { - id(other.getId()); - organizationId(other.getOrganizationId()); - inviter(other.getInviter()); - invitee(other.getInvitee()); - invitationUrl(other.getInvitationUrl()); - createdAt(other.getCreatedAt()); - expiresAt(other.getExpiresAt()); - clientId(other.getClientId()); - connectionId(other.getConnectionId()); - appMetadata(other.getAppMetadata()); - userMetadata(other.getUserMetadata()); - roles(other.getRoles()); - ticketId(other.getTicketId()); - return this; - } - - /** - *

The id of the user invitation.

- */ - @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; - } - - /** - *

Organization identifier.

- */ - @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; - } - - @JsonSetter(value = "inviter", nulls = Nulls.SKIP) - public Builder inviter(Optional inviter) { - this.inviter = inviter; - return this; - } - - public Builder inviter(OrganizationInvitationInviter inviter) { - this.inviter = Optional.ofNullable(inviter); - return this; - } - - @JsonSetter(value = "invitee", nulls = Nulls.SKIP) - public Builder invitee(Optional invitee) { - this.invitee = invitee; - return this; - } - - public Builder invitee(OrganizationInvitationInvitee invitee) { - this.invitee = Optional.ofNullable(invitee); - return this; - } - - /** - *

The invitation url to be send to the invitee.

- */ - @JsonSetter(value = "invitation_url", nulls = Nulls.SKIP) - public Builder invitationUrl(Optional invitationUrl) { - this.invitationUrl = invitationUrl; - return this; - } - - public Builder invitationUrl(String invitationUrl) { - this.invitationUrl = Optional.ofNullable(invitationUrl); - return this; - } - - /** - *

The ISO 8601 formatted timestamp representing the creation time of the invitation.

- */ - @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 formatted timestamp representing the expiration time of the invitation.

- */ - @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - public Builder expiresAt(OffsetDateTime expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); - return this; - } - - /** - *

Auth0 client ID. Used to resolve the application's login initiation endpoint.

- */ - @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 id of the connection to force invitee to authenticate with.

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - return this; - } - - @JsonSetter(value = "app_metadata", nulls = Nulls.SKIP) - public Builder appMetadata(Optional> appMetadata) { - this.appMetadata = appMetadata; - return this; - } - - public Builder appMetadata(Map appMetadata) { - this.appMetadata = Optional.ofNullable(appMetadata); - return this; - } - - @JsonSetter(value = "user_metadata", nulls = Nulls.SKIP) - public Builder userMetadata(Optional> userMetadata) { - this.userMetadata = userMetadata; - return this; - } - - public Builder userMetadata(Map userMetadata) { - this.userMetadata = Optional.ofNullable(userMetadata); - return this; - } - - /** - *

List of roles IDs to associated with the user.

- */ - @JsonSetter(value = "roles", nulls = Nulls.SKIP) - public Builder roles(Optional> roles) { - this.roles = roles; - return this; - } - - public Builder roles(List roles) { - this.roles = Optional.ofNullable(roles); - return this; - } - - /** - *

The id of the invitation ticket

- */ - @JsonSetter(value = "ticket_id", nulls = Nulls.SKIP) - public Builder ticketId(Optional ticketId) { - this.ticketId = ticketId; - return this; - } - - public Builder ticketId(String ticketId) { - this.ticketId = Optional.ofNullable(ticketId); - return this; - } - - public OrganizationInvitation build() { - return new OrganizationInvitation( - id, - organizationId, - inviter, - invitee, - invitationUrl, - createdAt, - expiresAt, - clientId, - connectionId, - appMetadata, - userMetadata, - roles, - ticketId, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitationInvitee.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitationInvitee.java deleted file mode 100644 index 8431ecd16..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitationInvitee.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = OrganizationInvitationInvitee.Builder.class) -public final class OrganizationInvitationInvitee { - private final String email; - - private final Map additionalProperties; - - private OrganizationInvitationInvitee(String email, Map additionalProperties) { - this.email = email; - this.additionalProperties = additionalProperties; - } - - /** - * @return The invitee's email. - */ - @JsonProperty("email") - public String getEmail() { - return email; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof OrganizationInvitationInvitee && equalTo((OrganizationInvitationInvitee) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(OrganizationInvitationInvitee other) { - return email.equals(other.email); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.email); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EmailStage builder() { - return new Builder(); - } - - public interface EmailStage { - /** - *

The invitee's email.

- */ - _FinalStage email(@NotNull String email); - - Builder from(OrganizationInvitationInvitee other); - } - - public interface _FinalStage { - OrganizationInvitationInvitee build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EmailStage, _FinalStage { - private String email; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(OrganizationInvitationInvitee other) { - email(other.getEmail()); - return this; - } - - /** - *

The invitee's email.

- *

The invitee's email.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("email") - public _FinalStage email(@NotNull String email) { - this.email = Objects.requireNonNull(email, "email must not be null"); - return this; - } - - @java.lang.Override - public OrganizationInvitationInvitee build() { - return new OrganizationInvitationInvitee(email, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitationInviter.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitationInviter.java deleted file mode 100644 index c144190bd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationInvitationInviter.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = OrganizationInvitationInviter.Builder.class) -public final class OrganizationInvitationInviter { - private final String name; - - private final Map additionalProperties; - - private OrganizationInvitationInviter(String name, Map additionalProperties) { - this.name = name; - this.additionalProperties = additionalProperties; - } - - /** - * @return The inviter's name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof OrganizationInvitationInviter && equalTo((OrganizationInvitationInviter) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(OrganizationInvitationInviter other) { - return name.equals(other.name); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

The inviter's name.

- */ - _FinalStage name(@NotNull String name); - - Builder from(OrganizationInvitationInviter other); - } - - public interface _FinalStage { - OrganizationInvitationInviter build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(OrganizationInvitationInviter other) { - name(other.getName()); - return this; - } - - /** - *

The inviter's name.

- *

The inviter's name.

- * @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 OrganizationInvitationInviter build() { - return new OrganizationInvitationInviter(name, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationMember.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationMember.java deleted file mode 100644 index 4ffc171d3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationMember.java +++ /dev/null @@ -1,218 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = OrganizationMember.Builder.class) -public final class OrganizationMember { - private final Optional userId; - - private final Optional picture; - - private final Optional name; - - private final Optional email; - - private final Optional> roles; - - private final Map additionalProperties; - - private OrganizationMember( - Optional userId, - Optional picture, - Optional name, - Optional email, - Optional> roles, - Map additionalProperties) { - this.userId = userId; - this.picture = picture; - this.name = name; - this.email = email; - this.roles = roles; - 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; - } - - @JsonProperty("roles") - public Optional> getRoles() { - return roles; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof OrganizationMember && equalTo((OrganizationMember) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(OrganizationMember other) { - return userId.equals(other.userId) - && picture.equals(other.picture) - && name.equals(other.name) - && email.equals(other.email) - && roles.equals(other.roles); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.userId, this.picture, this.name, this.email, this.roles); - } - - @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(); - - private Optional> roles = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(OrganizationMember other) { - userId(other.getUserId()); - picture(other.getPicture()); - name(other.getName()); - email(other.getEmail()); - roles(other.getRoles()); - 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; - } - - @JsonSetter(value = "roles", nulls = Nulls.SKIP) - public Builder roles(Optional> roles) { - this.roles = roles; - return this; - } - - public Builder roles(List roles) { - this.roles = Optional.ofNullable(roles); - return this; - } - - public OrganizationMember build() { - return new OrganizationMember(userId, picture, name, email, roles, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationMemberRole.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationMemberRole.java deleted file mode 100644 index fe271a84f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationMemberRole.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = OrganizationMemberRole.Builder.class) -public final class OrganizationMemberRole { - private final Optional id; - - private final Optional name; - - private final Map additionalProperties; - - private OrganizationMemberRole( - Optional id, Optional name, Map additionalProperties) { - this.id = id; - this.name = name; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID for this role. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Name of this role. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof OrganizationMemberRole && equalTo((OrganizationMemberRole) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(OrganizationMemberRole 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 Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional id = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(OrganizationMemberRole other) { - id(other.getId()); - name(other.getName()); - return this; - } - - /** - *

ID for this role.

- */ - @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; - } - - /** - *

Name of this role.

- */ - @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; - } - - public OrganizationMemberRole build() { - return new OrganizationMemberRole(id, name, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/OrganizationUsageEnum.java b/src/main/java/com/auth0/client/mgmt/types/OrganizationUsageEnum.java deleted file mode 100644 index 6dbe037f1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/OrganizationUsageEnum.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class OrganizationUsageEnum { - public static final OrganizationUsageEnum ALLOW = new OrganizationUsageEnum(Value.ALLOW, "allow"); - - public static final OrganizationUsageEnum REQUIRE = new OrganizationUsageEnum(Value.REQUIRE, "require"); - - public static final OrganizationUsageEnum DENY = new OrganizationUsageEnum(Value.DENY, "deny"); - - private final Value value; - - private final String string; - - OrganizationUsageEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof OrganizationUsageEnum - && this.string.equals(((OrganizationUsageEnum) 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 OrganizationUsageEnum valueOf(String value) { - switch (value) { - case "allow": - return ALLOW; - case "require": - return REQUIRE; - case "deny": - return DENY; - default: - return new OrganizationUsageEnum(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/PartialGroupsEnum.java b/src/main/java/com/auth0/client/mgmt/types/PartialGroupsEnum.java deleted file mode 100644 index a41bb5c0f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PartialGroupsEnum.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class PartialGroupsEnum { - public static final PartialGroupsEnum SIGNUP_ID = new PartialGroupsEnum(Value.SIGNUP_ID, "signup-id"); - - public static final PartialGroupsEnum PASSKEYS = new PartialGroupsEnum(Value.PASSKEYS, "passkeys"); - - public static final PartialGroupsEnum LOGIN = new PartialGroupsEnum(Value.LOGIN, "login"); - - public static final PartialGroupsEnum SIGNUP_PASSWORD = - new PartialGroupsEnum(Value.SIGNUP_PASSWORD, "signup-password"); - - public static final PartialGroupsEnum SIGNUP = new PartialGroupsEnum(Value.SIGNUP, "signup"); - - public static final PartialGroupsEnum CUSTOMIZED_CONSENT = - new PartialGroupsEnum(Value.CUSTOMIZED_CONSENT, "customized-consent"); - - public static final PartialGroupsEnum LOGIN_PASSWORD = - new PartialGroupsEnum(Value.LOGIN_PASSWORD, "login-password"); - - public static final PartialGroupsEnum LOGIN_PASSWORDLESS = - new PartialGroupsEnum(Value.LOGIN_PASSWORDLESS, "login-passwordless"); - - public static final PartialGroupsEnum LOGIN_ID = new PartialGroupsEnum(Value.LOGIN_ID, "login-id"); - - private final Value value; - - private final String string; - - PartialGroupsEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof PartialGroupsEnum && this.string.equals(((PartialGroupsEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SIGNUP_ID: - return visitor.visitSignupId(); - case PASSKEYS: - return visitor.visitPasskeys(); - case LOGIN: - return visitor.visitLogin(); - case SIGNUP_PASSWORD: - return visitor.visitSignupPassword(); - case SIGNUP: - return visitor.visitSignup(); - case CUSTOMIZED_CONSENT: - return visitor.visitCustomizedConsent(); - case LOGIN_PASSWORD: - return visitor.visitLoginPassword(); - case LOGIN_PASSWORDLESS: - return visitor.visitLoginPasswordless(); - case LOGIN_ID: - return visitor.visitLoginId(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static PartialGroupsEnum valueOf(String value) { - switch (value) { - case "signup-id": - return SIGNUP_ID; - case "passkeys": - return PASSKEYS; - case "login": - return LOGIN; - case "signup-password": - return SIGNUP_PASSWORD; - case "signup": - return SIGNUP; - case "customized-consent": - return CUSTOMIZED_CONSENT; - case "login-password": - return LOGIN_PASSWORD; - case "login-passwordless": - return LOGIN_PASSWORDLESS; - case "login-id": - return LOGIN_ID; - default: - return new PartialGroupsEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - LOGIN, - - LOGIN_ID, - - LOGIN_PASSWORD, - - LOGIN_PASSWORDLESS, - - SIGNUP, - - SIGNUP_ID, - - SIGNUP_PASSWORD, - - CUSTOMIZED_CONSENT, - - PASSKEYS, - - UNKNOWN - } - - public interface Visitor { - T visitLogin(); - - T visitLoginId(); - - T visitLoginPassword(); - - T visitLoginPasswordless(); - - T visitSignup(); - - T visitSignupId(); - - T visitSignupPassword(); - - T visitCustomizedConsent(); - - T visitPasskeys(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PartialPhoneTemplateContent.java b/src/main/java/com/auth0/client/mgmt/types/PartialPhoneTemplateContent.java deleted file mode 100644 index 2b5d425e0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PartialPhoneTemplateContent.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = PartialPhoneTemplateContent.Builder.class) -public final class PartialPhoneTemplateContent { - private final Optional from; - - private final Optional body; - - private final Map additionalProperties; - - private PartialPhoneTemplateContent( - Optional from, Optional body, Map additionalProperties) { - this.from = from; - this.body = body; - this.additionalProperties = additionalProperties; - } - - /** - * @return Default phone number to be used as 'from' when sending a phone notification - */ - @JsonProperty("from") - public Optional getFrom() { - return from; - } - - @JsonProperty("body") - public Optional getBody() { - return body; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PartialPhoneTemplateContent && equalTo((PartialPhoneTemplateContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(PartialPhoneTemplateContent other) { - return from.equals(other.from) && body.equals(other.body); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.from, this.body); - } - - @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 from = Optional.empty(); - - private Optional body = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(PartialPhoneTemplateContent other) { - from(other.getFrom()); - body(other.getBody()); - return this; - } - - /** - *

Default phone number to be used as 'from' when sending a phone notification

- */ - @JsonSetter(value = "from", nulls = Nulls.SKIP) - public Builder from(Optional from) { - this.from = from; - return this; - } - - public Builder from(String from) { - this.from = Optional.ofNullable(from); - return this; - } - - @JsonSetter(value = "body", nulls = Nulls.SKIP) - public Builder body(Optional body) { - this.body = body; - return this; - } - - public Builder body(PhoneTemplateBody body) { - this.body = Optional.ofNullable(body); - return this; - } - - public PartialPhoneTemplateContent build() { - return new PartialPhoneTemplateContent(from, body, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PatchClientCredentialResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/PatchClientCredentialResponseContent.java deleted file mode 100644 index 2e1b9f47e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PatchClientCredentialResponseContent.java +++ /dev/null @@ -1,384 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = PatchClientCredentialResponseContent.Builder.class) -public final class PatchClientCredentialResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional kid; - - private final Optional alg; - - private final Optional credentialType; - - private final Optional subjectDn; - - private final Optional thumbprintSha256; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional expiresAt; - - private final Map additionalProperties; - - private PatchClientCredentialResponseContent( - Optional id, - Optional name, - Optional kid, - Optional alg, - Optional credentialType, - Optional subjectDn, - Optional thumbprintSha256, - Optional createdAt, - Optional updatedAt, - Optional expiresAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.kid = kid; - this.alg = alg; - this.credentialType = credentialType; - this.subjectDn = subjectDn; - this.thumbprintSha256 = thumbprintSha256; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.expiresAt = expiresAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the credential. Generated on creation. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name given to the credential by the user. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The key identifier of the credential, generated on creation. - */ - @JsonProperty("kid") - public Optional getKid() { - return kid; - } - - @JsonProperty("alg") - public Optional getAlg() { - return alg; - } - - @JsonProperty("credential_type") - public Optional getCredentialType() { - return credentialType; - } - - /** - * @return The X509 certificate's Subject Distinguished Name - */ - @JsonProperty("subject_dn") - public Optional getSubjectDn() { - return subjectDn; - } - - /** - * @return The X509 certificate's SHA256 thumbprint - */ - @JsonProperty("thumbprint_sha256") - public Optional getThumbprintSha256() { - return thumbprintSha256; - } - - /** - * @return The ISO 8601 formatted date the credential was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The ISO 8601 formatted date the credential was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return The ISO 8601 formatted date representing the expiration of the credential. - */ - @JsonProperty("expires_at") - public Optional getExpiresAt() { - return expiresAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PatchClientCredentialResponseContent - && equalTo((PatchClientCredentialResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(PatchClientCredentialResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && kid.equals(other.kid) - && alg.equals(other.alg) - && credentialType.equals(other.credentialType) - && subjectDn.equals(other.subjectDn) - && thumbprintSha256.equals(other.thumbprintSha256) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && expiresAt.equals(other.expiresAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.kid, - this.alg, - this.credentialType, - this.subjectDn, - this.thumbprintSha256, - this.createdAt, - this.updatedAt, - this.expiresAt); - } - - @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 kid = Optional.empty(); - - private Optional alg = Optional.empty(); - - private Optional credentialType = Optional.empty(); - - private Optional subjectDn = Optional.empty(); - - private Optional thumbprintSha256 = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional expiresAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(PatchClientCredentialResponseContent other) { - id(other.getId()); - name(other.getName()); - kid(other.getKid()); - alg(other.getAlg()); - credentialType(other.getCredentialType()); - subjectDn(other.getSubjectDn()); - thumbprintSha256(other.getThumbprintSha256()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - expiresAt(other.getExpiresAt()); - return this; - } - - /** - *

ID of the credential. Generated on creation.

- */ - @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 given to the credential by the 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; - } - - /** - *

The key identifier of the credential, generated on creation.

- */ - @JsonSetter(value = "kid", nulls = Nulls.SKIP) - public Builder kid(Optional kid) { - this.kid = kid; - return this; - } - - public Builder kid(String kid) { - this.kid = Optional.ofNullable(kid); - return this; - } - - @JsonSetter(value = "alg", nulls = Nulls.SKIP) - public Builder alg(Optional alg) { - this.alg = alg; - return this; - } - - public Builder alg(ClientCredentialAlgorithmEnum alg) { - this.alg = Optional.ofNullable(alg); - return this; - } - - @JsonSetter(value = "credential_type", nulls = Nulls.SKIP) - public Builder credentialType(Optional credentialType) { - this.credentialType = credentialType; - return this; - } - - public Builder credentialType(ClientCredentialTypeEnum credentialType) { - this.credentialType = Optional.ofNullable(credentialType); - return this; - } - - /** - *

The X509 certificate's Subject Distinguished Name

- */ - @JsonSetter(value = "subject_dn", nulls = Nulls.SKIP) - public Builder subjectDn(Optional subjectDn) { - this.subjectDn = subjectDn; - return this; - } - - public Builder subjectDn(String subjectDn) { - this.subjectDn = Optional.ofNullable(subjectDn); - return this; - } - - /** - *

The X509 certificate's SHA256 thumbprint

- */ - @JsonSetter(value = "thumbprint_sha256", nulls = Nulls.SKIP) - public Builder thumbprintSha256(Optional thumbprintSha256) { - this.thumbprintSha256 = thumbprintSha256; - return this; - } - - public Builder thumbprintSha256(String thumbprintSha256) { - this.thumbprintSha256 = Optional.ofNullable(thumbprintSha256); - return this; - } - - /** - *

The ISO 8601 formatted date the credential 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 formatted date the credential was 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; - } - - /** - *

The ISO 8601 formatted date representing the expiration of the credential.

- */ - @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - public Builder expiresAt(OffsetDateTime expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); - return this; - } - - public PatchClientCredentialResponseContent build() { - return new PatchClientCredentialResponseContent( - id, - name, - kid, - alg, - credentialType, - subjectDn, - thumbprintSha256, - createdAt, - updatedAt, - expiresAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PatchSupplementalSignalsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/PatchSupplementalSignalsResponseContent.java deleted file mode 100644 index 7911c0f9e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PatchSupplementalSignalsResponseContent.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = PatchSupplementalSignalsResponseContent.Builder.class) -public final class PatchSupplementalSignalsResponseContent { - private final Optional akamaiEnabled; - - private final Map additionalProperties; - - private PatchSupplementalSignalsResponseContent( - Optional akamaiEnabled, Map additionalProperties) { - this.akamaiEnabled = akamaiEnabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Indicates if incoming Akamai Headers should be processed - */ - @JsonProperty("akamai_enabled") - public Optional getAkamaiEnabled() { - return akamaiEnabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PatchSupplementalSignalsResponseContent - && equalTo((PatchSupplementalSignalsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(PatchSupplementalSignalsResponseContent other) { - return akamaiEnabled.equals(other.akamaiEnabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.akamaiEnabled); - } - - @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 akamaiEnabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(PatchSupplementalSignalsResponseContent other) { - akamaiEnabled(other.getAkamaiEnabled()); - return this; - } - - /** - *

Indicates if incoming Akamai Headers should be processed

- */ - @JsonSetter(value = "akamai_enabled", nulls = Nulls.SKIP) - public Builder akamaiEnabled(Optional akamaiEnabled) { - this.akamaiEnabled = akamaiEnabled; - return this; - } - - public Builder akamaiEnabled(Boolean akamaiEnabled) { - this.akamaiEnabled = Optional.ofNullable(akamaiEnabled); - return this; - } - - public PatchSupplementalSignalsResponseContent build() { - return new PatchSupplementalSignalsResponseContent(akamaiEnabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PermissionRequestPayload.java b/src/main/java/com/auth0/client/mgmt/types/PermissionRequestPayload.java deleted file mode 100644 index a92f96555..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PermissionRequestPayload.java +++ /dev/null @@ -1,149 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = PermissionRequestPayload.Builder.class) -public final class PermissionRequestPayload { - private final String resourceServerIdentifier; - - private final String permissionName; - - private final Map additionalProperties; - - private PermissionRequestPayload( - String resourceServerIdentifier, String permissionName, Map additionalProperties) { - this.resourceServerIdentifier = resourceServerIdentifier; - this.permissionName = permissionName; - this.additionalProperties = additionalProperties; - } - - /** - * @return Resource server (API) identifier that this permission is for. - */ - @JsonProperty("resource_server_identifier") - public String getResourceServerIdentifier() { - return resourceServerIdentifier; - } - - /** - * @return Name of this permission. - */ - @JsonProperty("permission_name") - public String getPermissionName() { - return permissionName; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PermissionRequestPayload && equalTo((PermissionRequestPayload) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(PermissionRequestPayload other) { - return resourceServerIdentifier.equals(other.resourceServerIdentifier) - && permissionName.equals(other.permissionName); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.resourceServerIdentifier, this.permissionName); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ResourceServerIdentifierStage builder() { - return new Builder(); - } - - public interface ResourceServerIdentifierStage { - /** - *

Resource server (API) identifier that this permission is for.

- */ - PermissionNameStage resourceServerIdentifier(@NotNull String resourceServerIdentifier); - - Builder from(PermissionRequestPayload other); - } - - public interface PermissionNameStage { - /** - *

Name of this permission.

- */ - _FinalStage permissionName(@NotNull String permissionName); - } - - public interface _FinalStage { - PermissionRequestPayload build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ResourceServerIdentifierStage, PermissionNameStage, _FinalStage { - private String resourceServerIdentifier; - - private String permissionName; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(PermissionRequestPayload other) { - resourceServerIdentifier(other.getResourceServerIdentifier()); - permissionName(other.getPermissionName()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("resource_server_identifier") - public PermissionNameStage resourceServerIdentifier(@NotNull String resourceServerIdentifier) { - this.resourceServerIdentifier = - Objects.requireNonNull(resourceServerIdentifier, "resourceServerIdentifier must not be null"); - return this; - } - - /** - *

Name of this permission.

- *

Name of this permission.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("permission_name") - public _FinalStage permissionName(@NotNull String permissionName) { - this.permissionName = Objects.requireNonNull(permissionName, "permissionName must not be null"); - return this; - } - - @java.lang.Override - public PermissionRequestPayload build() { - return new PermissionRequestPayload(resourceServerIdentifier, permissionName, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PermissionsResponsePayload.java b/src/main/java/com/auth0/client/mgmt/types/PermissionsResponsePayload.java deleted file mode 100644 index 8283fb3c3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PermissionsResponsePayload.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = PermissionsResponsePayload.Builder.class) -public final class PermissionsResponsePayload { - private final Optional resourceServerIdentifier; - - private final Optional permissionName; - - private final Optional resourceServerName; - - private final Optional description; - - private final Map additionalProperties; - - private PermissionsResponsePayload( - Optional resourceServerIdentifier, - Optional permissionName, - Optional resourceServerName, - Optional description, - Map additionalProperties) { - this.resourceServerIdentifier = resourceServerIdentifier; - this.permissionName = permissionName; - this.resourceServerName = resourceServerName; - this.description = description; - this.additionalProperties = additionalProperties; - } - - /** - * @return Resource server (API) identifier that this permission is for. - */ - @JsonProperty("resource_server_identifier") - public Optional getResourceServerIdentifier() { - return resourceServerIdentifier; - } - - /** - * @return Name of this permission. - */ - @JsonProperty("permission_name") - public Optional getPermissionName() { - return permissionName; - } - - /** - * @return Resource server (API) name this permission is for. - */ - @JsonProperty("resource_server_name") - public Optional getResourceServerName() { - return resourceServerName; - } - - /** - * @return Description of this permission. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PermissionsResponsePayload && equalTo((PermissionsResponsePayload) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(PermissionsResponsePayload other) { - return resourceServerIdentifier.equals(other.resourceServerIdentifier) - && permissionName.equals(other.permissionName) - && resourceServerName.equals(other.resourceServerName) - && description.equals(other.description); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.resourceServerIdentifier, this.permissionName, this.resourceServerName, this.description); - } - - @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 resourceServerIdentifier = Optional.empty(); - - private Optional permissionName = Optional.empty(); - - private Optional resourceServerName = Optional.empty(); - - private Optional description = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(PermissionsResponsePayload other) { - resourceServerIdentifier(other.getResourceServerIdentifier()); - permissionName(other.getPermissionName()); - resourceServerName(other.getResourceServerName()); - description(other.getDescription()); - return this; - } - - /** - *

Resource server (API) identifier that this permission is for.

- */ - @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; - } - - /** - *

Name of this permission.

- */ - @JsonSetter(value = "permission_name", nulls = Nulls.SKIP) - public Builder permissionName(Optional permissionName) { - this.permissionName = permissionName; - return this; - } - - public Builder permissionName(String permissionName) { - this.permissionName = Optional.ofNullable(permissionName); - return this; - } - - /** - *

Resource server (API) name this permission is for.

- */ - @JsonSetter(value = "resource_server_name", nulls = Nulls.SKIP) - public Builder resourceServerName(Optional resourceServerName) { - this.resourceServerName = resourceServerName; - return this; - } - - public Builder resourceServerName(String resourceServerName) { - this.resourceServerName = Optional.ofNullable(resourceServerName); - return this; - } - - /** - *

Description of this permission.

- */ - @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; - } - - public PermissionsResponsePayload build() { - return new PermissionsResponsePayload( - resourceServerIdentifier, permissionName, resourceServerName, description, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneAttribute.java b/src/main/java/com/auth0/client/mgmt/types/PhoneAttribute.java deleted file mode 100644 index b89b02963..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneAttribute.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = PhoneAttribute.Builder.class) -public final class PhoneAttribute { - private final Optional identifier; - - private final Optional profileRequired; - - private final Optional signup; - - private final Map additionalProperties; - - private PhoneAttribute( - Optional identifier, - Optional profileRequired, - Optional signup, - Map additionalProperties) { - this.identifier = identifier; - this.profileRequired = profileRequired; - this.signup = signup; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("identifier") - public Optional getIdentifier() { - return identifier; - } - - /** - * @return Determines if property should be required for users - */ - @JsonProperty("profile_required") - public Optional getProfileRequired() { - return profileRequired; - } - - @JsonProperty("signup") - public Optional getSignup() { - return signup; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PhoneAttribute && equalTo((PhoneAttribute) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(PhoneAttribute other) { - return identifier.equals(other.identifier) - && profileRequired.equals(other.profileRequired) - && signup.equals(other.signup); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.identifier, this.profileRequired, this.signup); - } - - @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 identifier = Optional.empty(); - - private Optional profileRequired = Optional.empty(); - - private Optional signup = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(PhoneAttribute other) { - identifier(other.getIdentifier()); - profileRequired(other.getProfileRequired()); - signup(other.getSignup()); - return this; - } - - @JsonSetter(value = "identifier", nulls = Nulls.SKIP) - public Builder identifier(Optional identifier) { - this.identifier = identifier; - return this; - } - - public Builder identifier(ConnectionAttributeIdentifier identifier) { - this.identifier = Optional.ofNullable(identifier); - return this; - } - - /** - *

Determines if property should be required for users

- */ - @JsonSetter(value = "profile_required", nulls = Nulls.SKIP) - public Builder profileRequired(Optional profileRequired) { - this.profileRequired = profileRequired; - return this; - } - - public Builder profileRequired(Boolean profileRequired) { - this.profileRequired = Optional.ofNullable(profileRequired); - return this; - } - - @JsonSetter(value = "signup", nulls = Nulls.SKIP) - public Builder signup(Optional signup) { - this.signup = signup; - return this; - } - - public Builder signup(SignupVerified signup) { - this.signup = Optional.ofNullable(signup); - return this; - } - - public PhoneAttribute build() { - return new PhoneAttribute(identifier, profileRequired, signup, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderChannelEnum.java b/src/main/java/com/auth0/client/mgmt/types/PhoneProviderChannelEnum.java deleted file mode 100644 index a18b3a556..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderChannelEnum.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class PhoneProviderChannelEnum { - public static final PhoneProviderChannelEnum PHONE = new PhoneProviderChannelEnum(Value.PHONE, "phone"); - - private final Value value; - - private final String string; - - PhoneProviderChannelEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof PhoneProviderChannelEnum - && this.string.equals(((PhoneProviderChannelEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PHONE: - return visitor.visitPhone(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static PhoneProviderChannelEnum valueOf(String value) { - switch (value) { - case "phone": - return PHONE; - default: - return new PhoneProviderChannelEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PHONE, - - UNKNOWN - } - - public interface Visitor { - T visitPhone(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/PhoneProviderConfiguration.java deleted file mode 100644 index 7d13e70b7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderConfiguration.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = PhoneProviderConfiguration.Deserializer.class) -public final class PhoneProviderConfiguration { - private final Object value; - - private final int type; - - private PhoneProviderConfiguration(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((TwilioProviderConfiguration) this.value); - } else if (this.type == 1) { - return visitor.visit((CustomProviderConfiguration) 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 PhoneProviderConfiguration && equalTo((PhoneProviderConfiguration) other); - } - - private boolean equalTo(PhoneProviderConfiguration 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 PhoneProviderConfiguration of(TwilioProviderConfiguration value) { - return new PhoneProviderConfiguration(value, 0); - } - - public static PhoneProviderConfiguration of(CustomProviderConfiguration value) { - return new PhoneProviderConfiguration(value, 1); - } - - public interface Visitor { - T visit(TwilioProviderConfiguration value); - - T visit(CustomProviderConfiguration value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(PhoneProviderConfiguration.class); - } - - @java.lang.Override - public PhoneProviderConfiguration deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, TwilioProviderConfiguration.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CustomProviderConfiguration.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderCredentials.java b/src/main/java/com/auth0/client/mgmt/types/PhoneProviderCredentials.java deleted file mode 100644 index 6861f7eeb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderCredentials.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = PhoneProviderCredentials.Deserializer.class) -public final class PhoneProviderCredentials { - private final Object value; - - private final int type; - - private PhoneProviderCredentials(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((TwilioProviderCredentials) this.value); - } else if (this.type == 1) { - return visitor.visit((CustomProviderCredentials) 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 PhoneProviderCredentials && equalTo((PhoneProviderCredentials) other); - } - - private boolean equalTo(PhoneProviderCredentials 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 PhoneProviderCredentials of(TwilioProviderCredentials value) { - return new PhoneProviderCredentials(value, 0); - } - - public static PhoneProviderCredentials of(CustomProviderCredentials value) { - return new PhoneProviderCredentials(value, 1); - } - - public interface Visitor { - T visit(TwilioProviderCredentials value); - - T visit(CustomProviderCredentials value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(PhoneProviderCredentials.class); - } - - @java.lang.Override - public PhoneProviderCredentials deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, TwilioProviderCredentials.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, CustomProviderCredentials.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderDeliveryMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/PhoneProviderDeliveryMethodEnum.java deleted file mode 100644 index bd2c7fb25..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderDeliveryMethodEnum.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class PhoneProviderDeliveryMethodEnum { - public static final PhoneProviderDeliveryMethodEnum TEXT = new PhoneProviderDeliveryMethodEnum(Value.TEXT, "text"); - - public static final PhoneProviderDeliveryMethodEnum VOICE = - new PhoneProviderDeliveryMethodEnum(Value.VOICE, "voice"); - - private final Value value; - - private final String string; - - PhoneProviderDeliveryMethodEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof PhoneProviderDeliveryMethodEnum - && this.string.equals(((PhoneProviderDeliveryMethodEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TEXT: - return visitor.visitText(); - case VOICE: - return visitor.visitVoice(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static PhoneProviderDeliveryMethodEnum valueOf(String value) { - switch (value) { - case "text": - return TEXT; - case "voice": - return VOICE; - default: - return new PhoneProviderDeliveryMethodEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - TEXT, - - VOICE, - - UNKNOWN - } - - public interface Visitor { - T visitText(); - - T visitVoice(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/PhoneProviderNameEnum.java deleted file mode 100644 index 5e62462ae..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderNameEnum.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class PhoneProviderNameEnum { - public static final PhoneProviderNameEnum CUSTOM = new PhoneProviderNameEnum(Value.CUSTOM, "custom"); - - public static final PhoneProviderNameEnum TWILIO = new PhoneProviderNameEnum(Value.TWILIO, "twilio"); - - private final Value value; - - private final String string; - - PhoneProviderNameEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof PhoneProviderNameEnum - && this.string.equals(((PhoneProviderNameEnum) 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 TWILIO: - return visitor.visitTwilio(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static PhoneProviderNameEnum valueOf(String value) { - switch (value) { - case "custom": - return CUSTOM; - case "twilio": - return TWILIO; - default: - return new PhoneProviderNameEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - TWILIO, - - CUSTOM, - - UNKNOWN - } - - public interface Visitor { - T visitTwilio(); - - T visitCustom(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderSchemaMasked.java b/src/main/java/com/auth0/client/mgmt/types/PhoneProviderSchemaMasked.java deleted file mode 100644 index dd458718c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneProviderSchemaMasked.java +++ /dev/null @@ -1,378 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = PhoneProviderSchemaMasked.Builder.class) -public final class PhoneProviderSchemaMasked { - private final Optional id; - - private final Optional tenant; - - private final PhoneProviderNameEnum name; - - private final Optional channel; - - private final Optional disabled; - - private final Optional configuration; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private PhoneProviderSchemaMasked( - Optional id, - Optional tenant, - PhoneProviderNameEnum name, - Optional channel, - Optional disabled, - Optional configuration, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.tenant = tenant; - this.name = name; - this.channel = channel; - this.disabled = disabled; - this.configuration = configuration; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the tenant - */ - @JsonProperty("tenant") - public Optional getTenant() { - return tenant; - } - - @JsonProperty("name") - public PhoneProviderNameEnum getName() { - return name; - } - - @JsonProperty("channel") - public Optional getChannel() { - return channel; - } - - /** - * @return Whether the provider is enabled (false) or disabled (true). - */ - @JsonProperty("disabled") - public Optional getDisabled() { - return disabled; - } - - @JsonProperty("configuration") - public Optional getConfiguration() { - return configuration; - } - - /** - * @return The provider's creation date and time in ISO 8601 format - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The date and time of the last update to the provider in ISO 8601 format - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PhoneProviderSchemaMasked && equalTo((PhoneProviderSchemaMasked) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(PhoneProviderSchemaMasked other) { - return id.equals(other.id) - && tenant.equals(other.tenant) - && name.equals(other.name) - && channel.equals(other.channel) - && disabled.equals(other.disabled) - && configuration.equals(other.configuration) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.tenant, - this.name, - this.channel, - this.disabled, - this.configuration, - this.createdAt, - this.updatedAt); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - _FinalStage name(@NotNull PhoneProviderNameEnum name); - - Builder from(PhoneProviderSchemaMasked other); - } - - public interface _FinalStage { - PhoneProviderSchemaMasked build(); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - /** - *

The name of the tenant

- */ - _FinalStage tenant(Optional tenant); - - _FinalStage tenant(String tenant); - - _FinalStage channel(Optional channel); - - _FinalStage channel(PhoneProviderChannelEnum channel); - - /** - *

Whether the provider is enabled (false) or disabled (true).

- */ - _FinalStage disabled(Optional disabled); - - _FinalStage disabled(Boolean disabled); - - _FinalStage configuration(Optional configuration); - - _FinalStage configuration(PhoneProviderConfiguration configuration); - - /** - *

The provider's creation date and time in ISO 8601 format

- */ - _FinalStage createdAt(Optional createdAt); - - _FinalStage createdAt(OffsetDateTime createdAt); - - /** - *

The date and time of the last update to the provider in ISO 8601 format

- */ - _FinalStage updatedAt(Optional updatedAt); - - _FinalStage updatedAt(OffsetDateTime updatedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private PhoneProviderNameEnum name; - - private Optional updatedAt = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional configuration = Optional.empty(); - - private Optional disabled = Optional.empty(); - - private Optional channel = Optional.empty(); - - private Optional tenant = Optional.empty(); - - private Optional id = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(PhoneProviderSchemaMasked other) { - id(other.getId()); - tenant(other.getTenant()); - name(other.getName()); - channel(other.getChannel()); - disabled(other.getDisabled()); - configuration(other.getConfiguration()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public _FinalStage name(@NotNull PhoneProviderNameEnum name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - /** - *

The date and time of the last update to the provider in ISO 8601 format

- * @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; - } - - /** - *

The date and time of the last update to the provider in ISO 8601 format

- */ - @java.lang.Override - @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public _FinalStage updatedAt(Optional updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - *

The provider's creation date and time in ISO 8601 format

- * @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; - } - - /** - *

The provider's creation date and time in ISO 8601 format

- */ - @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 configuration(PhoneProviderConfiguration configuration) { - this.configuration = Optional.ofNullable(configuration); - return this; - } - - @java.lang.Override - @JsonSetter(value = "configuration", nulls = Nulls.SKIP) - public _FinalStage configuration(Optional configuration) { - this.configuration = configuration; - return this; - } - - /** - *

Whether the provider is enabled (false) or disabled (true).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage disabled(Boolean disabled) { - this.disabled = Optional.ofNullable(disabled); - return this; - } - - /** - *

Whether the provider is enabled (false) or disabled (true).

- */ - @java.lang.Override - @JsonSetter(value = "disabled", nulls = Nulls.SKIP) - public _FinalStage disabled(Optional disabled) { - this.disabled = disabled; - return this; - } - - @java.lang.Override - public _FinalStage channel(PhoneProviderChannelEnum channel) { - this.channel = Optional.ofNullable(channel); - return this; - } - - @java.lang.Override - @JsonSetter(value = "channel", nulls = Nulls.SKIP) - public _FinalStage channel(Optional channel) { - this.channel = channel; - return this; - } - - /** - *

The name of the tenant

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage tenant(String tenant) { - this.tenant = Optional.ofNullable(tenant); - return this; - } - - /** - *

The name of the tenant

- */ - @java.lang.Override - @JsonSetter(value = "tenant", nulls = Nulls.SKIP) - public _FinalStage tenant(Optional tenant) { - this.tenant = tenant; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public PhoneProviderSchemaMasked build() { - return new PhoneProviderSchemaMasked( - id, tenant, name, channel, disabled, configuration, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneTemplate.java b/src/main/java/com/auth0/client/mgmt/types/PhoneTemplate.java deleted file mode 100644 index b716bbf5f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneTemplate.java +++ /dev/null @@ -1,280 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = PhoneTemplate.Builder.class) -public final class PhoneTemplate { - private final String id; - - private final Optional channel; - - private final Optional customizable; - - private final Optional tenant; - - private final PhoneTemplateContent content; - - private final PhoneTemplateNotificationTypeEnum type; - - private final boolean disabled; - - private final Map additionalProperties; - - private PhoneTemplate( - String id, - Optional channel, - Optional customizable, - Optional tenant, - PhoneTemplateContent content, - PhoneTemplateNotificationTypeEnum type, - boolean disabled, - Map additionalProperties) { - this.id = id; - this.channel = channel; - this.customizable = customizable; - this.tenant = tenant; - this.content = content; - this.type = type; - this.disabled = disabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("channel") - public Optional getChannel() { - return channel; - } - - @JsonProperty("customizable") - public Optional getCustomizable() { - return customizable; - } - - @JsonProperty("tenant") - public Optional getTenant() { - return tenant; - } - - @JsonProperty("content") - public PhoneTemplateContent getContent() { - return content; - } - - @JsonProperty("type") - public PhoneTemplateNotificationTypeEnum getType() { - return type; - } - - /** - * @return Whether the template is enabled (false) or disabled (true). - */ - @JsonProperty("disabled") - public boolean getDisabled() { - return disabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PhoneTemplate && equalTo((PhoneTemplate) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(PhoneTemplate other) { - return id.equals(other.id) - && channel.equals(other.channel) - && customizable.equals(other.customizable) - && tenant.equals(other.tenant) - && content.equals(other.content) - && type.equals(other.type) - && disabled == other.disabled; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.channel, this.customizable, this.tenant, this.content, this.type, this.disabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - ContentStage id(@NotNull String id); - - Builder from(PhoneTemplate other); - } - - public interface ContentStage { - TypeStage content(@NotNull PhoneTemplateContent content); - } - - public interface TypeStage { - DisabledStage type(@NotNull PhoneTemplateNotificationTypeEnum type); - } - - public interface DisabledStage { - /** - *

Whether the template is enabled (false) or disabled (true).

- */ - _FinalStage disabled(boolean disabled); - } - - public interface _FinalStage { - PhoneTemplate build(); - - _FinalStage channel(Optional channel); - - _FinalStage channel(String channel); - - _FinalStage customizable(Optional customizable); - - _FinalStage customizable(Boolean customizable); - - _FinalStage tenant(Optional tenant); - - _FinalStage tenant(String tenant); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, ContentStage, TypeStage, DisabledStage, _FinalStage { - private String id; - - private PhoneTemplateContent content; - - private PhoneTemplateNotificationTypeEnum type; - - private boolean disabled; - - private Optional tenant = Optional.empty(); - - private Optional customizable = Optional.empty(); - - private Optional channel = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(PhoneTemplate other) { - id(other.getId()); - channel(other.getChannel()); - customizable(other.getCustomizable()); - tenant(other.getTenant()); - content(other.getContent()); - type(other.getType()); - disabled(other.getDisabled()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public ContentStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("content") - public TypeStage content(@NotNull PhoneTemplateContent content) { - this.content = Objects.requireNonNull(content, "content must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public DisabledStage type(@NotNull PhoneTemplateNotificationTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("disabled") - public _FinalStage disabled(boolean disabled) { - this.disabled = disabled; - return this; - } - - @java.lang.Override - public _FinalStage tenant(String tenant) { - this.tenant = Optional.ofNullable(tenant); - return this; - } - - @java.lang.Override - @JsonSetter(value = "tenant", nulls = Nulls.SKIP) - public _FinalStage tenant(Optional tenant) { - this.tenant = tenant; - return this; - } - - @java.lang.Override - public _FinalStage customizable(Boolean customizable) { - this.customizable = Optional.ofNullable(customizable); - return this; - } - - @java.lang.Override - @JsonSetter(value = "customizable", nulls = Nulls.SKIP) - public _FinalStage customizable(Optional customizable) { - this.customizable = customizable; - return this; - } - - @java.lang.Override - public _FinalStage channel(String channel) { - this.channel = Optional.ofNullable(channel); - return this; - } - - @java.lang.Override - @JsonSetter(value = "channel", nulls = Nulls.SKIP) - public _FinalStage channel(Optional channel) { - this.channel = channel; - return this; - } - - @java.lang.Override - public PhoneTemplate build() { - return new PhoneTemplate(id, channel, customizable, tenant, content, type, disabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneTemplateBody.java b/src/main/java/com/auth0/client/mgmt/types/PhoneTemplateBody.java deleted file mode 100644 index 32949a808..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneTemplateBody.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = PhoneTemplateBody.Builder.class) -public final class PhoneTemplateBody { - private final Optional text; - - private final Optional voice; - - private final Map additionalProperties; - - private PhoneTemplateBody(Optional text, Optional voice, Map additionalProperties) { - this.text = text; - this.voice = voice; - this.additionalProperties = additionalProperties; - } - - /** - * @return Content of the phone template for text notifications - */ - @JsonProperty("text") - public Optional getText() { - return text; - } - - /** - * @return Content of the phone template for voice notifications - */ - @JsonProperty("voice") - public Optional getVoice() { - return voice; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PhoneTemplateBody && equalTo((PhoneTemplateBody) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(PhoneTemplateBody other) { - return text.equals(other.text) && voice.equals(other.voice); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.text, this.voice); - } - - @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 text = Optional.empty(); - - private Optional voice = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(PhoneTemplateBody other) { - text(other.getText()); - voice(other.getVoice()); - return this; - } - - /** - *

Content of the phone template for text notifications

- */ - @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; - } - - /** - *

Content of the phone template for voice notifications

- */ - @JsonSetter(value = "voice", nulls = Nulls.SKIP) - public Builder voice(Optional voice) { - this.voice = voice; - return this; - } - - public Builder voice(String voice) { - this.voice = Optional.ofNullable(voice); - return this; - } - - public PhoneTemplateBody build() { - return new PhoneTemplateBody(text, voice, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneTemplateContent.java b/src/main/java/com/auth0/client/mgmt/types/PhoneTemplateContent.java deleted file mode 100644 index e6f6934fb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneTemplateContent.java +++ /dev/null @@ -1,149 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = PhoneTemplateContent.Builder.class) -public final class PhoneTemplateContent { - private final Optional syntax; - - private final Optional from; - - private final Optional body; - - private final Map additionalProperties; - - private PhoneTemplateContent( - Optional syntax, - Optional from, - Optional body, - Map additionalProperties) { - this.syntax = syntax; - this.from = from; - this.body = body; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("syntax") - public Optional getSyntax() { - return syntax; - } - - /** - * @return Default phone number to be used as 'from' when sending a phone notification - */ - @JsonProperty("from") - public Optional getFrom() { - return from; - } - - @JsonProperty("body") - public Optional getBody() { - return body; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PhoneTemplateContent && equalTo((PhoneTemplateContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(PhoneTemplateContent other) { - return syntax.equals(other.syntax) && from.equals(other.from) && body.equals(other.body); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.syntax, this.from, this.body); - } - - @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 syntax = Optional.empty(); - - private Optional from = Optional.empty(); - - private Optional body = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(PhoneTemplateContent other) { - syntax(other.getSyntax()); - from(other.getFrom()); - body(other.getBody()); - return this; - } - - @JsonSetter(value = "syntax", nulls = Nulls.SKIP) - public Builder syntax(Optional syntax) { - this.syntax = syntax; - return this; - } - - public Builder syntax(String syntax) { - this.syntax = Optional.ofNullable(syntax); - return this; - } - - /** - *

Default phone number to be used as 'from' when sending a phone notification

- */ - @JsonSetter(value = "from", nulls = Nulls.SKIP) - public Builder from(Optional from) { - this.from = from; - return this; - } - - public Builder from(String from) { - this.from = Optional.ofNullable(from); - return this; - } - - @JsonSetter(value = "body", nulls = Nulls.SKIP) - public Builder body(Optional body) { - this.body = body; - return this; - } - - public Builder body(PhoneTemplateBody body) { - this.body = Optional.ofNullable(body); - return this; - } - - public PhoneTemplateContent build() { - return new PhoneTemplateContent(syntax, from, body, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PhoneTemplateNotificationTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/PhoneTemplateNotificationTypeEnum.java deleted file mode 100644 index 7a64e0b1e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PhoneTemplateNotificationTypeEnum.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class PhoneTemplateNotificationTypeEnum { - public static final PhoneTemplateNotificationTypeEnum CHANGE_PASSWORD = - new PhoneTemplateNotificationTypeEnum(Value.CHANGE_PASSWORD, "change_password"); - - public static final PhoneTemplateNotificationTypeEnum OTP_VERIFY = - new PhoneTemplateNotificationTypeEnum(Value.OTP_VERIFY, "otp_verify"); - - public static final PhoneTemplateNotificationTypeEnum BLOCKED_ACCOUNT = - new PhoneTemplateNotificationTypeEnum(Value.BLOCKED_ACCOUNT, "blocked_account"); - - public static final PhoneTemplateNotificationTypeEnum OTP_ENROLL = - new PhoneTemplateNotificationTypeEnum(Value.OTP_ENROLL, "otp_enroll"); - - public static final PhoneTemplateNotificationTypeEnum PASSWORD_BREACH = - new PhoneTemplateNotificationTypeEnum(Value.PASSWORD_BREACH, "password_breach"); - - private final Value value; - - private final String string; - - PhoneTemplateNotificationTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof PhoneTemplateNotificationTypeEnum - && this.string.equals(((PhoneTemplateNotificationTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CHANGE_PASSWORD: - return visitor.visitChangePassword(); - case OTP_VERIFY: - return visitor.visitOtpVerify(); - case BLOCKED_ACCOUNT: - return visitor.visitBlockedAccount(); - case OTP_ENROLL: - return visitor.visitOtpEnroll(); - case PASSWORD_BREACH: - return visitor.visitPasswordBreach(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static PhoneTemplateNotificationTypeEnum valueOf(String value) { - switch (value) { - case "change_password": - return CHANGE_PASSWORD; - case "otp_verify": - return OTP_VERIFY; - case "blocked_account": - return BLOCKED_ACCOUNT; - case "otp_enroll": - return OTP_ENROLL; - case "password_breach": - return PASSWORD_BREACH; - default: - return new PhoneTemplateNotificationTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - OTP_VERIFY, - - OTP_ENROLL, - - CHANGE_PASSWORD, - - BLOCKED_ACCOUNT, - - PASSWORD_BREACH, - - UNKNOWN - } - - public interface Visitor { - T visitOtpVerify(); - - T visitOtpEnroll(); - - T visitChangePassword(); - - T visitBlockedAccount(); - - T visitPasswordBreach(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PostClientCredentialResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/PostClientCredentialResponseContent.java deleted file mode 100644 index 17054e06f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PostClientCredentialResponseContent.java +++ /dev/null @@ -1,384 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = PostClientCredentialResponseContent.Builder.class) -public final class PostClientCredentialResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional kid; - - private final Optional alg; - - private final Optional credentialType; - - private final Optional subjectDn; - - private final Optional thumbprintSha256; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional expiresAt; - - private final Map additionalProperties; - - private PostClientCredentialResponseContent( - Optional id, - Optional name, - Optional kid, - Optional alg, - Optional credentialType, - Optional subjectDn, - Optional thumbprintSha256, - Optional createdAt, - Optional updatedAt, - Optional expiresAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.kid = kid; - this.alg = alg; - this.credentialType = credentialType; - this.subjectDn = subjectDn; - this.thumbprintSha256 = thumbprintSha256; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.expiresAt = expiresAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the credential. Generated on creation. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name given to the credential by the user. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The key identifier of the credential, generated on creation. - */ - @JsonProperty("kid") - public Optional getKid() { - return kid; - } - - @JsonProperty("alg") - public Optional getAlg() { - return alg; - } - - @JsonProperty("credential_type") - public Optional getCredentialType() { - return credentialType; - } - - /** - * @return The X509 certificate's Subject Distinguished Name - */ - @JsonProperty("subject_dn") - public Optional getSubjectDn() { - return subjectDn; - } - - /** - * @return The X509 certificate's SHA256 thumbprint - */ - @JsonProperty("thumbprint_sha256") - public Optional getThumbprintSha256() { - return thumbprintSha256; - } - - /** - * @return The ISO 8601 formatted date the credential was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The ISO 8601 formatted date the credential was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return The ISO 8601 formatted date representing the expiration of the credential. - */ - @JsonProperty("expires_at") - public Optional getExpiresAt() { - return expiresAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PostClientCredentialResponseContent - && equalTo((PostClientCredentialResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(PostClientCredentialResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && kid.equals(other.kid) - && alg.equals(other.alg) - && credentialType.equals(other.credentialType) - && subjectDn.equals(other.subjectDn) - && thumbprintSha256.equals(other.thumbprintSha256) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && expiresAt.equals(other.expiresAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.kid, - this.alg, - this.credentialType, - this.subjectDn, - this.thumbprintSha256, - this.createdAt, - this.updatedAt, - this.expiresAt); - } - - @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 kid = Optional.empty(); - - private Optional alg = Optional.empty(); - - private Optional credentialType = Optional.empty(); - - private Optional subjectDn = Optional.empty(); - - private Optional thumbprintSha256 = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional expiresAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(PostClientCredentialResponseContent other) { - id(other.getId()); - name(other.getName()); - kid(other.getKid()); - alg(other.getAlg()); - credentialType(other.getCredentialType()); - subjectDn(other.getSubjectDn()); - thumbprintSha256(other.getThumbprintSha256()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - expiresAt(other.getExpiresAt()); - return this; - } - - /** - *

ID of the credential. Generated on creation.

- */ - @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 given to the credential by the 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; - } - - /** - *

The key identifier of the credential, generated on creation.

- */ - @JsonSetter(value = "kid", nulls = Nulls.SKIP) - public Builder kid(Optional kid) { - this.kid = kid; - return this; - } - - public Builder kid(String kid) { - this.kid = Optional.ofNullable(kid); - return this; - } - - @JsonSetter(value = "alg", nulls = Nulls.SKIP) - public Builder alg(Optional alg) { - this.alg = alg; - return this; - } - - public Builder alg(ClientCredentialAlgorithmEnum alg) { - this.alg = Optional.ofNullable(alg); - return this; - } - - @JsonSetter(value = "credential_type", nulls = Nulls.SKIP) - public Builder credentialType(Optional credentialType) { - this.credentialType = credentialType; - return this; - } - - public Builder credentialType(ClientCredentialTypeEnum credentialType) { - this.credentialType = Optional.ofNullable(credentialType); - return this; - } - - /** - *

The X509 certificate's Subject Distinguished Name

- */ - @JsonSetter(value = "subject_dn", nulls = Nulls.SKIP) - public Builder subjectDn(Optional subjectDn) { - this.subjectDn = subjectDn; - return this; - } - - public Builder subjectDn(String subjectDn) { - this.subjectDn = Optional.ofNullable(subjectDn); - return this; - } - - /** - *

The X509 certificate's SHA256 thumbprint

- */ - @JsonSetter(value = "thumbprint_sha256", nulls = Nulls.SKIP) - public Builder thumbprintSha256(Optional thumbprintSha256) { - this.thumbprintSha256 = thumbprintSha256; - return this; - } - - public Builder thumbprintSha256(String thumbprintSha256) { - this.thumbprintSha256 = Optional.ofNullable(thumbprintSha256); - return this; - } - - /** - *

The ISO 8601 formatted date the credential 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 formatted date the credential was 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; - } - - /** - *

The ISO 8601 formatted date representing the expiration of the credential.

- */ - @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - public Builder expiresAt(OffsetDateTime expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); - return this; - } - - public PostClientCredentialResponseContent build() { - return new PostClientCredentialResponseContent( - id, - name, - kid, - alg, - credentialType, - subjectDn, - thumbprintSha256, - createdAt, - updatedAt, - expiresAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PreferredAuthenticationMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/PreferredAuthenticationMethodEnum.java deleted file mode 100644 index 2ebd01e91..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PreferredAuthenticationMethodEnum.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class PreferredAuthenticationMethodEnum { - public static final PreferredAuthenticationMethodEnum VOICE = - new PreferredAuthenticationMethodEnum(Value.VOICE, "voice"); - - public static final PreferredAuthenticationMethodEnum SMS = new PreferredAuthenticationMethodEnum(Value.SMS, "sms"); - - private final Value value; - - private final String string; - - PreferredAuthenticationMethodEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof PreferredAuthenticationMethodEnum - && this.string.equals(((PreferredAuthenticationMethodEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case VOICE: - return visitor.visitVoice(); - case SMS: - return visitor.visitSms(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static PreferredAuthenticationMethodEnum valueOf(String value) { - switch (value) { - case "voice": - return VOICE; - case "sms": - return SMS; - default: - return new PreferredAuthenticationMethodEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - VOICE, - - SMS, - - UNKNOWN - } - - public interface Visitor { - T visitVoice(); - - T visitSms(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PromptGroupNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/PromptGroupNameEnum.java deleted file mode 100644 index 2f838ba30..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PromptGroupNameEnum.java +++ /dev/null @@ -1,438 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class PromptGroupNameEnum { - public static final PromptGroupNameEnum MFA_PUSH = new PromptGroupNameEnum(Value.MFA_PUSH, "mfa-push"); - - public static final PromptGroupNameEnum CAPTCHA = new PromptGroupNameEnum(Value.CAPTCHA, "captcha"); - - public static final PromptGroupNameEnum EMAIL_IDENTIFIER_CHALLENGE = - new PromptGroupNameEnum(Value.EMAIL_IDENTIFIER_CHALLENGE, "email-identifier-challenge"); - - public static final PromptGroupNameEnum INVITATION = new PromptGroupNameEnum(Value.INVITATION, "invitation"); - - public static final PromptGroupNameEnum MFA_VOICE = new PromptGroupNameEnum(Value.MFA_VOICE, "mfa-voice"); - - public static final PromptGroupNameEnum SIGNUP = new PromptGroupNameEnum(Value.SIGNUP, "signup"); - - public static final PromptGroupNameEnum CUSTOMIZED_CONSENT = - new PromptGroupNameEnum(Value.CUSTOMIZED_CONSENT, "customized-consent"); - - public static final PromptGroupNameEnum BRUTE_FORCE_PROTECTION = - new PromptGroupNameEnum(Value.BRUTE_FORCE_PROTECTION, "brute-force-protection"); - - public static final PromptGroupNameEnum MFA = new PromptGroupNameEnum(Value.MFA, "mfa"); - - public static final PromptGroupNameEnum COMMON = new PromptGroupNameEnum(Value.COMMON, "common"); - - public static final PromptGroupNameEnum MFA_PHONE = new PromptGroupNameEnum(Value.MFA_PHONE, "mfa-phone"); - - public static final PromptGroupNameEnum CUSTOM_FORM = new PromptGroupNameEnum(Value.CUSTOM_FORM, "custom-form"); - - public static final PromptGroupNameEnum LOGOUT = new PromptGroupNameEnum(Value.LOGOUT, "logout"); - - public static final PromptGroupNameEnum PHONE_IDENTIFIER_ENROLLMENT = - new PromptGroupNameEnum(Value.PHONE_IDENTIFIER_ENROLLMENT, "phone-identifier-enrollment"); - - public static final PromptGroupNameEnum LOGIN_PASSWORD = - new PromptGroupNameEnum(Value.LOGIN_PASSWORD, "login-password"); - - public static final PromptGroupNameEnum LOGIN_EMAIL_VERIFICATION = - new PromptGroupNameEnum(Value.LOGIN_EMAIL_VERIFICATION, "login-email-verification"); - - public static final PromptGroupNameEnum ORGANIZATIONS = - new PromptGroupNameEnum(Value.ORGANIZATIONS, "organizations"); - - public static final PromptGroupNameEnum LOGIN_ID = new PromptGroupNameEnum(Value.LOGIN_ID, "login-id"); - - public static final PromptGroupNameEnum ASYNC_APPROVAL_FLOW = - new PromptGroupNameEnum(Value.ASYNC_APPROVAL_FLOW, "async-approval-flow"); - - public static final PromptGroupNameEnum MFA_OTP = new PromptGroupNameEnum(Value.MFA_OTP, "mfa-otp"); - - public static final PromptGroupNameEnum STATUS = new PromptGroupNameEnum(Value.STATUS, "status"); - - public static final PromptGroupNameEnum EMAIL_OTP_CHALLENGE = - new PromptGroupNameEnum(Value.EMAIL_OTP_CHALLENGE, "email-otp-challenge"); - - public static final PromptGroupNameEnum CONSENT = new PromptGroupNameEnum(Value.CONSENT, "consent"); - - public static final PromptGroupNameEnum SIGNUP_ID = new PromptGroupNameEnum(Value.SIGNUP_ID, "signup-id"); - - public static final PromptGroupNameEnum LOGIN_PASSWORDLESS = - new PromptGroupNameEnum(Value.LOGIN_PASSWORDLESS, "login-passwordless"); - - public static final PromptGroupNameEnum MFA_SMS = new PromptGroupNameEnum(Value.MFA_SMS, "mfa-sms"); - - public static final PromptGroupNameEnum MFA_WEBAUTHN = new PromptGroupNameEnum(Value.MFA_WEBAUTHN, "mfa-webauthn"); - - public static final PromptGroupNameEnum RESET_PASSWORD = - new PromptGroupNameEnum(Value.RESET_PASSWORD, "reset-password"); - - public static final PromptGroupNameEnum MFA_RECOVERY_CODE = - new PromptGroupNameEnum(Value.MFA_RECOVERY_CODE, "mfa-recovery-code"); - - public static final PromptGroupNameEnum EMAIL_VERIFICATION = - new PromptGroupNameEnum(Value.EMAIL_VERIFICATION, "email-verification"); - - public static final PromptGroupNameEnum PASSKEYS = new PromptGroupNameEnum(Value.PASSKEYS, "passkeys"); - - public static final PromptGroupNameEnum LOGIN = new PromptGroupNameEnum(Value.LOGIN, "login"); - - public static final PromptGroupNameEnum SIGNUP_PASSWORD = - new PromptGroupNameEnum(Value.SIGNUP_PASSWORD, "signup-password"); - - public static final PromptGroupNameEnum PHONE_IDENTIFIER_CHALLENGE = - new PromptGroupNameEnum(Value.PHONE_IDENTIFIER_CHALLENGE, "phone-identifier-challenge"); - - public static final PromptGroupNameEnum DEVICE_FLOW = new PromptGroupNameEnum(Value.DEVICE_FLOW, "device-flow"); - - public static final PromptGroupNameEnum MFA_EMAIL = new PromptGroupNameEnum(Value.MFA_EMAIL, "mfa-email"); - - private final Value value; - - private final String string; - - PromptGroupNameEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof PromptGroupNameEnum && this.string.equals(((PromptGroupNameEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MFA_PUSH: - return visitor.visitMfaPush(); - case CAPTCHA: - return visitor.visitCaptcha(); - case EMAIL_IDENTIFIER_CHALLENGE: - return visitor.visitEmailIdentifierChallenge(); - case INVITATION: - return visitor.visitInvitation(); - case MFA_VOICE: - return visitor.visitMfaVoice(); - case SIGNUP: - return visitor.visitSignup(); - case CUSTOMIZED_CONSENT: - return visitor.visitCustomizedConsent(); - case BRUTE_FORCE_PROTECTION: - return visitor.visitBruteForceProtection(); - case MFA: - return visitor.visitMfa(); - case COMMON: - return visitor.visitCommon(); - case MFA_PHONE: - return visitor.visitMfaPhone(); - case CUSTOM_FORM: - return visitor.visitCustomForm(); - case LOGOUT: - return visitor.visitLogout(); - case PHONE_IDENTIFIER_ENROLLMENT: - return visitor.visitPhoneIdentifierEnrollment(); - case LOGIN_PASSWORD: - return visitor.visitLoginPassword(); - case LOGIN_EMAIL_VERIFICATION: - return visitor.visitLoginEmailVerification(); - case ORGANIZATIONS: - return visitor.visitOrganizations(); - case LOGIN_ID: - return visitor.visitLoginId(); - case ASYNC_APPROVAL_FLOW: - return visitor.visitAsyncApprovalFlow(); - case MFA_OTP: - return visitor.visitMfaOtp(); - case STATUS: - return visitor.visitStatus(); - case EMAIL_OTP_CHALLENGE: - return visitor.visitEmailOtpChallenge(); - case CONSENT: - return visitor.visitConsent(); - case SIGNUP_ID: - return visitor.visitSignupId(); - case LOGIN_PASSWORDLESS: - return visitor.visitLoginPasswordless(); - case MFA_SMS: - return visitor.visitMfaSms(); - case MFA_WEBAUTHN: - return visitor.visitMfaWebauthn(); - case RESET_PASSWORD: - return visitor.visitResetPassword(); - case MFA_RECOVERY_CODE: - return visitor.visitMfaRecoveryCode(); - case EMAIL_VERIFICATION: - return visitor.visitEmailVerification(); - case PASSKEYS: - return visitor.visitPasskeys(); - case LOGIN: - return visitor.visitLogin(); - case SIGNUP_PASSWORD: - return visitor.visitSignupPassword(); - case PHONE_IDENTIFIER_CHALLENGE: - return visitor.visitPhoneIdentifierChallenge(); - case DEVICE_FLOW: - return visitor.visitDeviceFlow(); - case MFA_EMAIL: - return visitor.visitMfaEmail(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static PromptGroupNameEnum valueOf(String value) { - switch (value) { - case "mfa-push": - return MFA_PUSH; - case "captcha": - return CAPTCHA; - case "email-identifier-challenge": - return EMAIL_IDENTIFIER_CHALLENGE; - case "invitation": - return INVITATION; - case "mfa-voice": - return MFA_VOICE; - case "signup": - return SIGNUP; - case "customized-consent": - return CUSTOMIZED_CONSENT; - case "brute-force-protection": - return BRUTE_FORCE_PROTECTION; - case "mfa": - return MFA; - case "common": - return COMMON; - case "mfa-phone": - return MFA_PHONE; - case "custom-form": - return CUSTOM_FORM; - case "logout": - return LOGOUT; - case "phone-identifier-enrollment": - return PHONE_IDENTIFIER_ENROLLMENT; - case "login-password": - return LOGIN_PASSWORD; - case "login-email-verification": - return LOGIN_EMAIL_VERIFICATION; - case "organizations": - return ORGANIZATIONS; - case "login-id": - return LOGIN_ID; - case "async-approval-flow": - return ASYNC_APPROVAL_FLOW; - case "mfa-otp": - return MFA_OTP; - case "status": - return STATUS; - case "email-otp-challenge": - return EMAIL_OTP_CHALLENGE; - case "consent": - return CONSENT; - case "signup-id": - return SIGNUP_ID; - case "login-passwordless": - return LOGIN_PASSWORDLESS; - case "mfa-sms": - return MFA_SMS; - case "mfa-webauthn": - return MFA_WEBAUTHN; - case "reset-password": - return RESET_PASSWORD; - case "mfa-recovery-code": - return MFA_RECOVERY_CODE; - case "email-verification": - return EMAIL_VERIFICATION; - case "passkeys": - return PASSKEYS; - case "login": - return LOGIN; - case "signup-password": - return SIGNUP_PASSWORD; - case "phone-identifier-challenge": - return PHONE_IDENTIFIER_CHALLENGE; - case "device-flow": - return DEVICE_FLOW; - case "mfa-email": - return MFA_EMAIL; - default: - return new PromptGroupNameEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - LOGIN, - - LOGIN_ID, - - LOGIN_PASSWORD, - - LOGIN_PASSWORDLESS, - - LOGIN_EMAIL_VERIFICATION, - - SIGNUP, - - SIGNUP_ID, - - SIGNUP_PASSWORD, - - PHONE_IDENTIFIER_ENROLLMENT, - - PHONE_IDENTIFIER_CHALLENGE, - - EMAIL_IDENTIFIER_CHALLENGE, - - RESET_PASSWORD, - - CUSTOM_FORM, - - CONSENT, - - CUSTOMIZED_CONSENT, - - LOGOUT, - - MFA_PUSH, - - MFA_OTP, - - MFA_VOICE, - - MFA_PHONE, - - MFA_WEBAUTHN, - - MFA_SMS, - - MFA_EMAIL, - - MFA_RECOVERY_CODE, - - MFA, - - STATUS, - - DEVICE_FLOW, - - EMAIL_VERIFICATION, - - EMAIL_OTP_CHALLENGE, - - ORGANIZATIONS, - - INVITATION, - - COMMON, - - PASSKEYS, - - CAPTCHA, - - BRUTE_FORCE_PROTECTION, - - ASYNC_APPROVAL_FLOW, - - UNKNOWN - } - - public interface Visitor { - T visitLogin(); - - T visitLoginId(); - - T visitLoginPassword(); - - T visitLoginPasswordless(); - - T visitLoginEmailVerification(); - - T visitSignup(); - - T visitSignupId(); - - T visitSignupPassword(); - - T visitPhoneIdentifierEnrollment(); - - T visitPhoneIdentifierChallenge(); - - T visitEmailIdentifierChallenge(); - - T visitResetPassword(); - - T visitCustomForm(); - - T visitConsent(); - - T visitCustomizedConsent(); - - T visitLogout(); - - T visitMfaPush(); - - T visitMfaOtp(); - - T visitMfaVoice(); - - T visitMfaPhone(); - - T visitMfaWebauthn(); - - T visitMfaSms(); - - T visitMfaEmail(); - - T visitMfaRecoveryCode(); - - T visitMfa(); - - T visitStatus(); - - T visitDeviceFlow(); - - T visitEmailVerification(); - - T visitEmailOtpChallenge(); - - T visitOrganizations(); - - T visitInvitation(); - - T visitCommon(); - - T visitPasskeys(); - - T visitCaptcha(); - - T visitBruteForceProtection(); - - T visitAsyncApprovalFlow(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PromptLanguageEnum.java b/src/main/java/com/auth0/client/mgmt/types/PromptLanguageEnum.java deleted file mode 100644 index 355be8241..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PromptLanguageEnum.java +++ /dev/null @@ -1,873 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class PromptLanguageEnum { - public static final PromptLanguageEnum AZ = new PromptLanguageEnum(Value.AZ, "az"); - - public static final PromptLanguageEnum MK = new PromptLanguageEnum(Value.MK, "mk"); - - public static final PromptLanguageEnum CA_ES = new PromptLanguageEnum(Value.CA_ES, "ca-ES"); - - public static final PromptLanguageEnum ML = new PromptLanguageEnum(Value.ML, "ml"); - - public static final PromptLanguageEnum TR = new PromptLanguageEnum(Value.TR, "tr"); - - public static final PromptLanguageEnum GU = new PromptLanguageEnum(Value.GU, "gu"); - - public static final PromptLanguageEnum ES_AR = new PromptLanguageEnum(Value.ES_AR, "es-AR"); - - public static final PromptLanguageEnum ID = new PromptLanguageEnum(Value.ID, "id"); - - public static final PromptLanguageEnum CNR = new PromptLanguageEnum(Value.CNR, "cnr"); - - public static final PromptLanguageEnum MN = new PromptLanguageEnum(Value.MN, "mn"); - - public static final PromptLanguageEnum FI = new PromptLanguageEnum(Value.FI, "fi"); - - public static final PromptLanguageEnum PL = new PromptLanguageEnum(Value.PL, "pl"); - - public static final PromptLanguageEnum EN_CA = new PromptLanguageEnum(Value.EN_CA, "en-CA"); - - public static final PromptLanguageEnum AR_EG = new PromptLanguageEnum(Value.AR_EG, "ar-EG"); - - public static final PromptLanguageEnum MR = new PromptLanguageEnum(Value.MR, "mr"); - - public static final PromptLanguageEnum MS = new PromptLanguageEnum(Value.MS, "ms"); - - public static final PromptLanguageEnum PT_PT = new PromptLanguageEnum(Value.PT_PT, "pt-PT"); - - public static final PromptLanguageEnum SK = new PromptLanguageEnum(Value.SK, "sk"); - - public static final PromptLanguageEnum SL = new PromptLanguageEnum(Value.SL, "sl"); - - public static final PromptLanguageEnum CS = new PromptLanguageEnum(Value.CS, "cs"); - - public static final PromptLanguageEnum UR = new PromptLanguageEnum(Value.UR, "ur"); - - public static final PromptLanguageEnum HU = new PromptLanguageEnum(Value.HU, "hu"); - - public static final PromptLanguageEnum TE = new PromptLanguageEnum(Value.TE, "te"); - - public static final PromptLanguageEnum ZH_CN = new PromptLanguageEnum(Value.ZH_CN, "zh-CN"); - - public static final PromptLanguageEnum AR_SA = new PromptLanguageEnum(Value.AR_SA, "ar-SA"); - - public static final PromptLanguageEnum SO = new PromptLanguageEnum(Value.SO, "so"); - - public static final PromptLanguageEnum FR = new PromptLanguageEnum(Value.FR, "fr"); - - public static final PromptLanguageEnum NO = new PromptLanguageEnum(Value.NO, "no"); - - public static final PromptLanguageEnum ZH_TW = new PromptLanguageEnum(Value.ZH_TW, "zh-TW"); - - public static final PromptLanguageEnum AR = new PromptLanguageEnum(Value.AR, "ar"); - - public static final PromptLanguageEnum PT = new PromptLanguageEnum(Value.PT, "pt"); - - public static final PromptLanguageEnum MY = new PromptLanguageEnum(Value.MY, "my"); - - public static final PromptLanguageEnum SQ = new PromptLanguageEnum(Value.SQ, "sq"); - - public static final PromptLanguageEnum HY = new PromptLanguageEnum(Value.HY, "hy"); - - public static final PromptLanguageEnum FR_FR = new PromptLanguageEnum(Value.FR_FR, "fr-FR"); - - public static final PromptLanguageEnum CY = new PromptLanguageEnum(Value.CY, "cy"); - - public static final PromptLanguageEnum PA = new PromptLanguageEnum(Value.PA, "pa"); - - public static final PromptLanguageEnum KA = new PromptLanguageEnum(Value.KA, "ka"); - - public static final PromptLanguageEnum IS = new PromptLanguageEnum(Value.IS, "is"); - - public static final PromptLanguageEnum FA = new PromptLanguageEnum(Value.FA, "fa"); - - public static final PromptLanguageEnum BN = new PromptLanguageEnum(Value.BN, "bn"); - - public static final PromptLanguageEnum PT_BR = new PromptLanguageEnum(Value.PT_BR, "pt-BR"); - - public static final PromptLanguageEnum SW = new PromptLanguageEnum(Value.SW, "sw"); - - public static final PromptLanguageEnum HI = new PromptLanguageEnum(Value.HI, "hi"); - - public static final PromptLanguageEnum EN = new PromptLanguageEnum(Value.EN, "en"); - - public static final PromptLanguageEnum NB = new PromptLanguageEnum(Value.NB, "nb"); - - public static final PromptLanguageEnum DA = new PromptLanguageEnum(Value.DA, "da"); - - public static final PromptLanguageEnum LT = new PromptLanguageEnum(Value.LT, "lt"); - - public static final PromptLanguageEnum BS = new PromptLanguageEnum(Value.BS, "bs"); - - public static final PromptLanguageEnum ES_MX = new PromptLanguageEnum(Value.ES_MX, "es-MX"); - - public static final PromptLanguageEnum LV = new PromptLanguageEnum(Value.LV, "lv"); - - public static final PromptLanguageEnum RO = new PromptLanguageEnum(Value.RO, "ro"); - - public static final PromptLanguageEnum UK = new PromptLanguageEnum(Value.UK, "uk"); - - public static final PromptLanguageEnum DE = new PromptLanguageEnum(Value.DE, "de"); - - public static final PromptLanguageEnum ES = new PromptLanguageEnum(Value.ES, "es"); - - public static final PromptLanguageEnum KK = new PromptLanguageEnum(Value.KK, "kk"); - - public static final PromptLanguageEnum ET = new PromptLanguageEnum(Value.ET, "et"); - - public static final PromptLanguageEnum TA = new PromptLanguageEnum(Value.TA, "ta"); - - public static final PromptLanguageEnum HR = new PromptLanguageEnum(Value.HR, "hr"); - - public static final PromptLanguageEnum KN = new PromptLanguageEnum(Value.KN, "kn"); - - public static final PromptLanguageEnum ZGH = new PromptLanguageEnum(Value.ZGH, "zgh"); - - public static final PromptLanguageEnum AM = new PromptLanguageEnum(Value.AM, "am"); - - public static final PromptLanguageEnum JA = new PromptLanguageEnum(Value.JA, "ja"); - - public static final PromptLanguageEnum KO = new PromptLanguageEnum(Value.KO, "ko"); - - public static final PromptLanguageEnum RU = new PromptLanguageEnum(Value.RU, "ru"); - - public static final PromptLanguageEnum NL = new PromptLanguageEnum(Value.NL, "nl"); - - public static final PromptLanguageEnum VI = new PromptLanguageEnum(Value.VI, "vi"); - - public static final PromptLanguageEnum BG = new PromptLanguageEnum(Value.BG, "bg"); - - public static final PromptLanguageEnum NN = new PromptLanguageEnum(Value.NN, "nn"); - - public static final PromptLanguageEnum GL_ES = new PromptLanguageEnum(Value.GL_ES, "gl-ES"); - - public static final PromptLanguageEnum TH = new PromptLanguageEnum(Value.TH, "th"); - - public static final PromptLanguageEnum SR = new PromptLanguageEnum(Value.SR, "sr"); - - public static final PromptLanguageEnum ES419 = new PromptLanguageEnum(Value.ES419, "es-419"); - - public static final PromptLanguageEnum HE = new PromptLanguageEnum(Value.HE, "he"); - - public static final PromptLanguageEnum ZH_HK = new PromptLanguageEnum(Value.ZH_HK, "zh-HK"); - - public static final PromptLanguageEnum EU_ES = new PromptLanguageEnum(Value.EU_ES, "eu-ES"); - - public static final PromptLanguageEnum TL = new PromptLanguageEnum(Value.TL, "tl"); - - public static final PromptLanguageEnum IT = new PromptLanguageEnum(Value.IT, "it"); - - public static final PromptLanguageEnum SV = new PromptLanguageEnum(Value.SV, "sv"); - - public static final PromptLanguageEnum FR_CA = new PromptLanguageEnum(Value.FR_CA, "fr-CA"); - - public static final PromptLanguageEnum EL = new PromptLanguageEnum(Value.EL, "el"); - - private final Value value; - - private final String string; - - PromptLanguageEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof PromptLanguageEnum && this.string.equals(((PromptLanguageEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AZ: - return visitor.visitAz(); - case MK: - return visitor.visitMk(); - case CA_ES: - return visitor.visitCaEs(); - case ML: - return visitor.visitMl(); - case TR: - return visitor.visitTr(); - case GU: - return visitor.visitGu(); - case ES_AR: - return visitor.visitEsAr(); - case ID: - return visitor.visitId(); - case CNR: - return visitor.visitCnr(); - case MN: - return visitor.visitMn(); - case FI: - return visitor.visitFi(); - case PL: - return visitor.visitPl(); - case EN_CA: - return visitor.visitEnCa(); - case AR_EG: - return visitor.visitArEg(); - case MR: - return visitor.visitMr(); - case MS: - return visitor.visitMs(); - case PT_PT: - return visitor.visitPtPt(); - case SK: - return visitor.visitSk(); - case SL: - return visitor.visitSl(); - case CS: - return visitor.visitCs(); - case UR: - return visitor.visitUr(); - case HU: - return visitor.visitHu(); - case TE: - return visitor.visitTe(); - case ZH_CN: - return visitor.visitZhCn(); - case AR_SA: - return visitor.visitArSa(); - case SO: - return visitor.visitSo(); - case FR: - return visitor.visitFr(); - case NO: - return visitor.visitNo(); - case ZH_TW: - return visitor.visitZhTw(); - case AR: - return visitor.visitAr(); - case PT: - return visitor.visitPt(); - case MY: - return visitor.visitMy(); - case SQ: - return visitor.visitSq(); - case HY: - return visitor.visitHy(); - case FR_FR: - return visitor.visitFrFr(); - case CY: - return visitor.visitCy(); - case PA: - return visitor.visitPa(); - case KA: - return visitor.visitKa(); - case IS: - return visitor.visitIs(); - case FA: - return visitor.visitFa(); - case BN: - return visitor.visitBn(); - case PT_BR: - return visitor.visitPtBr(); - case SW: - return visitor.visitSw(); - case HI: - return visitor.visitHi(); - case EN: - return visitor.visitEn(); - case NB: - return visitor.visitNb(); - case DA: - return visitor.visitDa(); - case LT: - return visitor.visitLt(); - case BS: - return visitor.visitBs(); - case ES_MX: - return visitor.visitEsMx(); - case LV: - return visitor.visitLv(); - case RO: - return visitor.visitRo(); - case UK: - return visitor.visitUk(); - case DE: - return visitor.visitDe(); - case ES: - return visitor.visitEs(); - case KK: - return visitor.visitKk(); - case ET: - return visitor.visitEt(); - case TA: - return visitor.visitTa(); - case HR: - return visitor.visitHr(); - case KN: - return visitor.visitKn(); - case ZGH: - return visitor.visitZgh(); - case AM: - return visitor.visitAm(); - case JA: - return visitor.visitJa(); - case KO: - return visitor.visitKo(); - case RU: - return visitor.visitRu(); - case NL: - return visitor.visitNl(); - case VI: - return visitor.visitVi(); - case BG: - return visitor.visitBg(); - case NN: - return visitor.visitNn(); - case GL_ES: - return visitor.visitGlEs(); - case TH: - return visitor.visitTh(); - case SR: - return visitor.visitSr(); - case ES419: - return visitor.visitEs419(); - case HE: - return visitor.visitHe(); - case ZH_HK: - return visitor.visitZhHk(); - case EU_ES: - return visitor.visitEuEs(); - case TL: - return visitor.visitTl(); - case IT: - return visitor.visitIt(); - case SV: - return visitor.visitSv(); - case FR_CA: - return visitor.visitFrCa(); - case EL: - return visitor.visitEl(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static PromptLanguageEnum valueOf(String value) { - switch (value) { - case "az": - return AZ; - case "mk": - return MK; - case "ca-ES": - return CA_ES; - case "ml": - return ML; - case "tr": - return TR; - case "gu": - return GU; - case "es-AR": - return ES_AR; - case "id": - return ID; - case "cnr": - return CNR; - case "mn": - return MN; - case "fi": - return FI; - case "pl": - return PL; - case "en-CA": - return EN_CA; - case "ar-EG": - return AR_EG; - case "mr": - return MR; - case "ms": - return MS; - case "pt-PT": - return PT_PT; - case "sk": - return SK; - case "sl": - return SL; - case "cs": - return CS; - case "ur": - return UR; - case "hu": - return HU; - case "te": - return TE; - case "zh-CN": - return ZH_CN; - case "ar-SA": - return AR_SA; - case "so": - return SO; - case "fr": - return FR; - case "no": - return NO; - case "zh-TW": - return ZH_TW; - case "ar": - return AR; - case "pt": - return PT; - case "my": - return MY; - case "sq": - return SQ; - case "hy": - return HY; - case "fr-FR": - return FR_FR; - case "cy": - return CY; - case "pa": - return PA; - case "ka": - return KA; - case "is": - return IS; - case "fa": - return FA; - case "bn": - return BN; - case "pt-BR": - return PT_BR; - case "sw": - return SW; - case "hi": - return HI; - case "en": - return EN; - case "nb": - return NB; - case "da": - return DA; - case "lt": - return LT; - case "bs": - return BS; - case "es-MX": - return ES_MX; - case "lv": - return LV; - case "ro": - return RO; - case "uk": - return UK; - case "de": - return DE; - case "es": - return ES; - case "kk": - return KK; - case "et": - return ET; - case "ta": - return TA; - case "hr": - return HR; - case "kn": - return KN; - case "zgh": - return ZGH; - case "am": - return AM; - case "ja": - return JA; - case "ko": - return KO; - case "ru": - return RU; - case "nl": - return NL; - case "vi": - return VI; - case "bg": - return BG; - case "nn": - return NN; - case "gl-ES": - return GL_ES; - case "th": - return TH; - case "sr": - return SR; - case "es-419": - return ES419; - case "he": - return HE; - case "zh-HK": - return ZH_HK; - case "eu-ES": - return EU_ES; - case "tl": - return TL; - case "it": - return IT; - case "sv": - return SV; - case "fr-CA": - return FR_CA; - case "el": - return EL; - default: - return new PromptLanguageEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AM, - - AR, - - AR_EG, - - AR_SA, - - AZ, - - BG, - - BN, - - BS, - - CA_ES, - - CNR, - - CS, - - CY, - - DA, - - DE, - - EL, - - EN, - - EN_CA, - - ES, - - ES419, - - ES_AR, - - ES_MX, - - ET, - - EU_ES, - - FA, - - FI, - - FR, - - FR_CA, - - FR_FR, - - GL_ES, - - GU, - - HE, - - HI, - - HR, - - HU, - - HY, - - ID, - - IS, - - IT, - - JA, - - KA, - - KK, - - KN, - - KO, - - LT, - - LV, - - MK, - - ML, - - MN, - - MR, - - MS, - - MY, - - NB, - - NL, - - NN, - - NO, - - PA, - - PL, - - PT, - - PT_BR, - - PT_PT, - - RO, - - RU, - - SK, - - SL, - - SO, - - SQ, - - SR, - - SV, - - SW, - - TA, - - TE, - - TH, - - TL, - - TR, - - UK, - - UR, - - VI, - - ZGH, - - ZH_CN, - - ZH_HK, - - ZH_TW, - - UNKNOWN - } - - public interface Visitor { - T visitAm(); - - T visitAr(); - - T visitArEg(); - - T visitArSa(); - - T visitAz(); - - T visitBg(); - - T visitBn(); - - T visitBs(); - - T visitCaEs(); - - T visitCnr(); - - T visitCs(); - - T visitCy(); - - T visitDa(); - - T visitDe(); - - T visitEl(); - - T visitEn(); - - T visitEnCa(); - - T visitEs(); - - T visitEs419(); - - T visitEsAr(); - - T visitEsMx(); - - T visitEt(); - - T visitEuEs(); - - T visitFa(); - - T visitFi(); - - T visitFr(); - - T visitFrCa(); - - T visitFrFr(); - - T visitGlEs(); - - T visitGu(); - - T visitHe(); - - T visitHi(); - - T visitHr(); - - T visitHu(); - - T visitHy(); - - T visitId(); - - T visitIs(); - - T visitIt(); - - T visitJa(); - - T visitKa(); - - T visitKk(); - - T visitKn(); - - T visitKo(); - - T visitLt(); - - T visitLv(); - - T visitMk(); - - T visitMl(); - - T visitMn(); - - T visitMr(); - - T visitMs(); - - T visitMy(); - - T visitNb(); - - T visitNl(); - - T visitNn(); - - T visitNo(); - - T visitPa(); - - T visitPl(); - - T visitPt(); - - T visitPtBr(); - - T visitPtPt(); - - T visitRo(); - - T visitRu(); - - T visitSk(); - - T visitSl(); - - T visitSo(); - - T visitSq(); - - T visitSr(); - - T visitSv(); - - T visitSw(); - - T visitTa(); - - T visitTe(); - - T visitTh(); - - T visitTl(); - - T visitTr(); - - T visitUk(); - - T visitUr(); - - T visitVi(); - - T visitZgh(); - - T visitZhCn(); - - T visitZhHk(); - - T visitZhTw(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredential.java b/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredential.java deleted file mode 100644 index 123f8d624..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredential.java +++ /dev/null @@ -1,303 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = PublicKeyCredential.Builder.class) -public final class PublicKeyCredential { - private final PublicKeyCredentialTypeEnum credentialType; - - private final Optional name; - - private final String pem; - - private final Optional alg; - - private final Optional parseExpiryFromCert; - - private final Optional expiresAt; - - private final Map additionalProperties; - - private PublicKeyCredential( - PublicKeyCredentialTypeEnum credentialType, - Optional name, - String pem, - Optional alg, - Optional parseExpiryFromCert, - Optional expiresAt, - Map additionalProperties) { - this.credentialType = credentialType; - this.name = name; - this.pem = pem; - this.alg = alg; - this.parseExpiryFromCert = parseExpiryFromCert; - this.expiresAt = expiresAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("credential_type") - public PublicKeyCredentialTypeEnum getCredentialType() { - return credentialType; - } - - /** - * @return Friendly name for a credential. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return PEM-formatted public key (SPKI and PKCS1) or X509 certificate. Must be JSON escaped. - */ - @JsonProperty("pem") - public String getPem() { - return pem; - } - - @JsonProperty("alg") - public Optional getAlg() { - return alg; - } - - /** - * @return Parse expiry from x509 certificate. If true, attempts to parse the expiry date from the provided PEM. Applies to public_key credential type. - */ - @JsonProperty("parse_expiry_from_cert") - public Optional getParseExpiryFromCert() { - return parseExpiryFromCert; - } - - /** - * @return The ISO 8601 formatted date representing the expiration of the credential. If not specified (not recommended), the credential never expires. Applies to public_key credential type. - */ - @JsonProperty("expires_at") - public Optional getExpiresAt() { - return expiresAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof PublicKeyCredential && equalTo((PublicKeyCredential) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(PublicKeyCredential other) { - return credentialType.equals(other.credentialType) - && name.equals(other.name) - && pem.equals(other.pem) - && alg.equals(other.alg) - && parseExpiryFromCert.equals(other.parseExpiryFromCert) - && expiresAt.equals(other.expiresAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.credentialType, this.name, this.pem, this.alg, this.parseExpiryFromCert, this.expiresAt); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static CredentialTypeStage builder() { - return new Builder(); - } - - public interface CredentialTypeStage { - PemStage credentialType(@NotNull PublicKeyCredentialTypeEnum credentialType); - - Builder from(PublicKeyCredential other); - } - - public interface PemStage { - /** - *

PEM-formatted public key (SPKI and PKCS1) or X509 certificate. Must be JSON escaped.

- */ - _FinalStage pem(@NotNull String pem); - } - - public interface _FinalStage { - PublicKeyCredential build(); - - /** - *

Friendly name for a credential.

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage alg(Optional alg); - - _FinalStage alg(PublicKeyCredentialAlgorithmEnum alg); - - /** - *

Parse expiry from x509 certificate. If true, attempts to parse the expiry date from the provided PEM. Applies to public_key credential type.

- */ - _FinalStage parseExpiryFromCert(Optional parseExpiryFromCert); - - _FinalStage parseExpiryFromCert(Boolean parseExpiryFromCert); - - /** - *

The ISO 8601 formatted date representing the expiration of the credential. If not specified (not recommended), the credential never expires. Applies to public_key credential type.

- */ - _FinalStage expiresAt(Optional expiresAt); - - _FinalStage expiresAt(OffsetDateTime expiresAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements CredentialTypeStage, PemStage, _FinalStage { - private PublicKeyCredentialTypeEnum credentialType; - - private String pem; - - private Optional expiresAt = Optional.empty(); - - private Optional parseExpiryFromCert = Optional.empty(); - - private Optional alg = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(PublicKeyCredential other) { - credentialType(other.getCredentialType()); - name(other.getName()); - pem(other.getPem()); - alg(other.getAlg()); - parseExpiryFromCert(other.getParseExpiryFromCert()); - expiresAt(other.getExpiresAt()); - return this; - } - - @java.lang.Override - @JsonSetter("credential_type") - public PemStage credentialType(@NotNull PublicKeyCredentialTypeEnum credentialType) { - this.credentialType = Objects.requireNonNull(credentialType, "credentialType must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("pem") - public _FinalStage pem(@NotNull String pem) { - this.pem = Objects.requireNonNull(pem, "pem must not be null"); - return this; - } - - /** - *

The ISO 8601 formatted date representing the expiration of the credential. If not specified (not recommended), the credential never expires. Applies to public_key credential type.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage expiresAt(OffsetDateTime expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); - return this; - } - - /** - *

The ISO 8601 formatted date representing the expiration of the credential. If not specified (not recommended), the credential never expires. Applies to public_key credential type.

- */ - @java.lang.Override - @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public _FinalStage expiresAt(Optional expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - *

Parse expiry from x509 certificate. If true, attempts to parse the expiry date from the provided PEM. Applies to public_key credential type.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage parseExpiryFromCert(Boolean parseExpiryFromCert) { - this.parseExpiryFromCert = Optional.ofNullable(parseExpiryFromCert); - return this; - } - - /** - *

Parse expiry from x509 certificate. If true, attempts to parse the expiry date from the provided PEM. Applies to public_key credential type.

- */ - @java.lang.Override - @JsonSetter(value = "parse_expiry_from_cert", nulls = Nulls.SKIP) - public _FinalStage parseExpiryFromCert(Optional parseExpiryFromCert) { - this.parseExpiryFromCert = parseExpiryFromCert; - return this; - } - - @java.lang.Override - public _FinalStage alg(PublicKeyCredentialAlgorithmEnum alg) { - this.alg = Optional.ofNullable(alg); - return this; - } - - @java.lang.Override - @JsonSetter(value = "alg", nulls = Nulls.SKIP) - public _FinalStage alg(Optional alg) { - this.alg = alg; - return this; - } - - /** - *

Friendly name for a credential.

- * @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; - } - - /** - *

Friendly name for a credential.

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public PublicKeyCredential build() { - return new PublicKeyCredential( - credentialType, name, pem, alg, parseExpiryFromCert, expiresAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredentialAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredentialAlgorithmEnum.java deleted file mode 100644 index 01c10d3ed..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredentialAlgorithmEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class PublicKeyCredentialAlgorithmEnum { - public static final PublicKeyCredentialAlgorithmEnum PS256 = - new PublicKeyCredentialAlgorithmEnum(Value.PS256, "PS256"); - - public static final PublicKeyCredentialAlgorithmEnum RS256 = - new PublicKeyCredentialAlgorithmEnum(Value.RS256, "RS256"); - - public static final PublicKeyCredentialAlgorithmEnum RS384 = - new PublicKeyCredentialAlgorithmEnum(Value.RS384, "RS384"); - - private final Value value; - - private final String string; - - PublicKeyCredentialAlgorithmEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof PublicKeyCredentialAlgorithmEnum - && this.string.equals(((PublicKeyCredentialAlgorithmEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PS256: - return visitor.visitPs256(); - case RS256: - return visitor.visitRs256(); - case RS384: - return visitor.visitRs384(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static PublicKeyCredentialAlgorithmEnum valueOf(String value) { - switch (value) { - case "PS256": - return PS256; - case "RS256": - return RS256; - case "RS384": - return RS384; - default: - return new PublicKeyCredentialAlgorithmEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - RS256, - - RS384, - - PS256, - - UNKNOWN - } - - public interface Visitor { - T visitRs256(); - - T visitRs384(); - - T visitPs256(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredentialTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredentialTypeEnum.java deleted file mode 100644 index 42a19e49c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/PublicKeyCredentialTypeEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class PublicKeyCredentialTypeEnum { - public static final PublicKeyCredentialTypeEnum PUBLIC_KEY = - new PublicKeyCredentialTypeEnum(Value.PUBLIC_KEY, "public_key"); - - private final Value value; - - private final String string; - - PublicKeyCredentialTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof PublicKeyCredentialTypeEnum - && this.string.equals(((PublicKeyCredentialTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PUBLIC_KEY: - return visitor.visitPublicKey(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static PublicKeyCredentialTypeEnum valueOf(String value) { - switch (value) { - case "public_key": - return PUBLIC_KEY; - default: - return new PublicKeyCredentialTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PUBLIC_KEY, - - UNKNOWN - } - - public interface Visitor { - T visitPublicKey(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/RefreshTokenDate.java b/src/main/java/com/auth0/client/mgmt/types/RefreshTokenDate.java deleted file mode 100644 index 71c44cc4e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RefreshTokenDate.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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.time.OffsetDateTime; -import java.util.Map; -import java.util.Objects; - -@JsonDeserialize(using = RefreshTokenDate.Deserializer.class) -public final class RefreshTokenDate { - private final Object value; - - private final int type; - - private RefreshTokenDate(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((OffsetDateTime) this.value); - } else if (this.type == 1) { - return visitor.visit((Map) 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 RefreshTokenDate && equalTo((RefreshTokenDate) other); - } - - private boolean equalTo(RefreshTokenDate 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 RefreshTokenDate of(OffsetDateTime value) { - return new RefreshTokenDate(value, 0); - } - - public static RefreshTokenDate of(Map value) { - return new RefreshTokenDate(value, 1); - } - - public interface Visitor { - T visit(OffsetDateTime value); - - T visit(Map value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(RefreshTokenDate.class); - } - - @java.lang.Override - public RefreshTokenDate deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, OffsetDateTime.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/RefreshTokenDevice.java b/src/main/java/com/auth0/client/mgmt/types/RefreshTokenDevice.java deleted file mode 100644 index cf85639bb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RefreshTokenDevice.java +++ /dev/null @@ -1,255 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = RefreshTokenDevice.Builder.class) -public final class RefreshTokenDevice { - private final Optional initialIp; - - private final Optional initialAsn; - - private final Optional initialUserAgent; - - private final Optional lastIp; - - private final Optional lastAsn; - - private final Optional lastUserAgent; - - private final Map additionalProperties; - - private RefreshTokenDevice( - Optional initialIp, - Optional initialAsn, - Optional initialUserAgent, - Optional lastIp, - Optional lastAsn, - Optional lastUserAgent, - Map additionalProperties) { - this.initialIp = initialIp; - this.initialAsn = initialAsn; - this.initialUserAgent = initialUserAgent; - this.lastIp = lastIp; - this.lastAsn = lastAsn; - this.lastUserAgent = lastUserAgent; - this.additionalProperties = additionalProperties; - } - - /** - * @return First IP address associated with the refresh token - */ - @JsonProperty("initial_ip") - public Optional getInitialIp() { - return initialIp; - } - - /** - * @return First autonomous system number associated with the refresh token - */ - @JsonProperty("initial_asn") - public Optional getInitialAsn() { - return initialAsn; - } - - /** - * @return First user agent associated with the refresh token - */ - @JsonProperty("initial_user_agent") - public Optional getInitialUserAgent() { - return initialUserAgent; - } - - /** - * @return Last IP address associated with the refresh token - */ - @JsonProperty("last_ip") - public Optional getLastIp() { - return lastIp; - } - - /** - * @return Last autonomous system number associated with the refresh token - */ - @JsonProperty("last_asn") - public Optional getLastAsn() { - return lastAsn; - } - - /** - * @return Last user agent associated with the refresh token - */ - @JsonProperty("last_user_agent") - public Optional getLastUserAgent() { - return lastUserAgent; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RefreshTokenDevice && equalTo((RefreshTokenDevice) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(RefreshTokenDevice other) { - return initialIp.equals(other.initialIp) - && initialAsn.equals(other.initialAsn) - && initialUserAgent.equals(other.initialUserAgent) - && lastIp.equals(other.lastIp) - && lastAsn.equals(other.lastAsn) - && lastUserAgent.equals(other.lastUserAgent); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.initialIp, this.initialAsn, this.initialUserAgent, this.lastIp, this.lastAsn, this.lastUserAgent); - } - - @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 initialIp = Optional.empty(); - - private Optional initialAsn = Optional.empty(); - - private Optional initialUserAgent = Optional.empty(); - - private Optional lastIp = Optional.empty(); - - private Optional lastAsn = Optional.empty(); - - private Optional lastUserAgent = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(RefreshTokenDevice other) { - initialIp(other.getInitialIp()); - initialAsn(other.getInitialAsn()); - initialUserAgent(other.getInitialUserAgent()); - lastIp(other.getLastIp()); - lastAsn(other.getLastAsn()); - lastUserAgent(other.getLastUserAgent()); - return this; - } - - /** - *

First IP address associated with the refresh token

- */ - @JsonSetter(value = "initial_ip", nulls = Nulls.SKIP) - public Builder initialIp(Optional initialIp) { - this.initialIp = initialIp; - return this; - } - - public Builder initialIp(String initialIp) { - this.initialIp = Optional.ofNullable(initialIp); - return this; - } - - /** - *

First autonomous system number associated with the refresh token

- */ - @JsonSetter(value = "initial_asn", nulls = Nulls.SKIP) - public Builder initialAsn(Optional initialAsn) { - this.initialAsn = initialAsn; - return this; - } - - public Builder initialAsn(String initialAsn) { - this.initialAsn = Optional.ofNullable(initialAsn); - return this; - } - - /** - *

First user agent associated with the refresh token

- */ - @JsonSetter(value = "initial_user_agent", nulls = Nulls.SKIP) - public Builder initialUserAgent(Optional initialUserAgent) { - this.initialUserAgent = initialUserAgent; - return this; - } - - public Builder initialUserAgent(String initialUserAgent) { - this.initialUserAgent = Optional.ofNullable(initialUserAgent); - return this; - } - - /** - *

Last IP address associated with the refresh token

- */ - @JsonSetter(value = "last_ip", nulls = Nulls.SKIP) - public Builder lastIp(Optional lastIp) { - this.lastIp = lastIp; - return this; - } - - public Builder lastIp(String lastIp) { - this.lastIp = Optional.ofNullable(lastIp); - return this; - } - - /** - *

Last autonomous system number associated with the refresh token

- */ - @JsonSetter(value = "last_asn", nulls = Nulls.SKIP) - public Builder lastAsn(Optional lastAsn) { - this.lastAsn = lastAsn; - return this; - } - - public Builder lastAsn(String lastAsn) { - this.lastAsn = Optional.ofNullable(lastAsn); - return this; - } - - /** - *

Last user agent associated with the refresh token

- */ - @JsonSetter(value = "last_user_agent", nulls = Nulls.SKIP) - public Builder lastUserAgent(Optional lastUserAgent) { - this.lastUserAgent = lastUserAgent; - return this; - } - - public Builder lastUserAgent(String lastUserAgent) { - this.lastUserAgent = Optional.ofNullable(lastUserAgent); - return this; - } - - public RefreshTokenDevice build() { - return new RefreshTokenDevice( - initialIp, initialAsn, initialUserAgent, lastIp, lastAsn, lastUserAgent, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/RefreshTokenExpirationTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/RefreshTokenExpirationTypeEnum.java deleted file mode 100644 index 423edab00..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RefreshTokenExpirationTypeEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class RefreshTokenExpirationTypeEnum { - public static final RefreshTokenExpirationTypeEnum EXPIRING = - new RefreshTokenExpirationTypeEnum(Value.EXPIRING, "expiring"); - - public static final RefreshTokenExpirationTypeEnum NON_EXPIRING = - new RefreshTokenExpirationTypeEnum(Value.NON_EXPIRING, "non-expiring"); - - private final Value value; - - private final String string; - - RefreshTokenExpirationTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof RefreshTokenExpirationTypeEnum - && this.string.equals(((RefreshTokenExpirationTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EXPIRING: - return visitor.visitExpiring(); - case NON_EXPIRING: - return visitor.visitNonExpiring(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static RefreshTokenExpirationTypeEnum valueOf(String value) { - switch (value) { - case "expiring": - return EXPIRING; - case "non-expiring": - return NON_EXPIRING; - default: - return new RefreshTokenExpirationTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - EXPIRING, - - NON_EXPIRING, - - UNKNOWN - } - - public interface Visitor { - T visitExpiring(); - - T visitNonExpiring(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/RefreshTokenResourceServer.java b/src/main/java/com/auth0/client/mgmt/types/RefreshTokenResourceServer.java deleted file mode 100644 index 424d49153..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RefreshTokenResourceServer.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = RefreshTokenResourceServer.Builder.class) -public final class RefreshTokenResourceServer { - private final Optional audience; - - private final Optional scopes; - - private final Map additionalProperties; - - private RefreshTokenResourceServer( - Optional audience, Optional scopes, Map additionalProperties) { - this.audience = audience; - this.scopes = scopes; - this.additionalProperties = additionalProperties; - } - - /** - * @return Resource server ID - */ - @JsonProperty("audience") - public Optional getAudience() { - return audience; - } - - /** - * @return List of scopes for the refresh token - */ - @JsonProperty("scopes") - public Optional getScopes() { - return scopes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RefreshTokenResourceServer && equalTo((RefreshTokenResourceServer) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(RefreshTokenResourceServer other) { - return audience.equals(other.audience) && scopes.equals(other.scopes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.audience, this.scopes); - } - - @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 audience = Optional.empty(); - - private Optional scopes = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(RefreshTokenResourceServer other) { - audience(other.getAudience()); - scopes(other.getScopes()); - return this; - } - - /** - *

Resource server ID

- */ - @JsonSetter(value = "audience", nulls = Nulls.SKIP) - public Builder audience(Optional audience) { - this.audience = audience; - return this; - } - - public Builder audience(String audience) { - this.audience = Optional.ofNullable(audience); - return this; - } - - /** - *

List of scopes for the refresh token

- */ - @JsonSetter(value = "scopes", nulls = Nulls.SKIP) - public Builder scopes(Optional scopes) { - this.scopes = scopes; - return this; - } - - public Builder scopes(String scopes) { - this.scopes = Optional.ofNullable(scopes); - return this; - } - - public RefreshTokenResourceServer build() { - return new RefreshTokenResourceServer(audience, scopes, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/RefreshTokenResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/RefreshTokenResponseContent.java deleted file mode 100644 index 21aa1565c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RefreshTokenResponseContent.java +++ /dev/null @@ -1,481 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = RefreshTokenResponseContent.Builder.class) -public final class RefreshTokenResponseContent { - private final Optional id; - - private final Optional userId; - - private final Optional createdAt; - - private final Optional idleExpiresAt; - - private final Optional expiresAt; - - private final Optional device; - - private final Optional clientId; - - private final OptionalNullable sessionId; - - private final Optional rotating; - - private final Optional> resourceServers; - - private final OptionalNullable> refreshTokenMetadata; - - private final Optional lastExchangedAt; - - private final Map additionalProperties; - - private RefreshTokenResponseContent( - Optional id, - Optional userId, - Optional createdAt, - Optional idleExpiresAt, - Optional expiresAt, - Optional device, - Optional clientId, - OptionalNullable sessionId, - Optional rotating, - Optional> resourceServers, - OptionalNullable> refreshTokenMetadata, - Optional lastExchangedAt, - Map additionalProperties) { - this.id = id; - this.userId = userId; - this.createdAt = createdAt; - this.idleExpiresAt = idleExpiresAt; - this.expiresAt = expiresAt; - this.device = device; - this.clientId = clientId; - this.sessionId = sessionId; - this.rotating = rotating; - this.resourceServers = resourceServers; - this.refreshTokenMetadata = refreshTokenMetadata; - this.lastExchangedAt = lastExchangedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The ID of the refresh token - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return ID of the user which can be used when interacting with other APIs. - */ - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @JsonProperty("idle_expires_at") - public Optional getIdleExpiresAt() { - return idleExpiresAt; - } - - @JsonProperty("expires_at") - public Optional getExpiresAt() { - return expiresAt; - } - - @JsonProperty("device") - public Optional getDevice() { - return device; - } - - /** - * @return ID of the client application granted with this refresh token - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_id") - public OptionalNullable getSessionId() { - if (sessionId == null) { - return OptionalNullable.absent(); - } - return sessionId; - } - - /** - * @return True if the token is a rotating refresh token - */ - @JsonProperty("rotating") - public Optional getRotating() { - return rotating; - } - - /** - * @return A list of the resource server IDs associated to this refresh-token and their granted scopes - */ - @JsonProperty("resource_servers") - public Optional> getResourceServers() { - return resourceServers; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("refresh_token_metadata") - public OptionalNullable> getRefreshTokenMetadata() { - if (refreshTokenMetadata == null) { - return OptionalNullable.absent(); - } - return refreshTokenMetadata; - } - - @JsonProperty("last_exchanged_at") - public Optional getLastExchangedAt() { - return lastExchangedAt; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_id") - private OptionalNullable _getSessionId() { - return sessionId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("refresh_token_metadata") - private OptionalNullable> _getRefreshTokenMetadata() { - return refreshTokenMetadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RefreshTokenResponseContent && equalTo((RefreshTokenResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(RefreshTokenResponseContent other) { - return id.equals(other.id) - && userId.equals(other.userId) - && createdAt.equals(other.createdAt) - && idleExpiresAt.equals(other.idleExpiresAt) - && expiresAt.equals(other.expiresAt) - && device.equals(other.device) - && clientId.equals(other.clientId) - && sessionId.equals(other.sessionId) - && rotating.equals(other.rotating) - && resourceServers.equals(other.resourceServers) - && refreshTokenMetadata.equals(other.refreshTokenMetadata) - && lastExchangedAt.equals(other.lastExchangedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.userId, - this.createdAt, - this.idleExpiresAt, - this.expiresAt, - this.device, - this.clientId, - this.sessionId, - this.rotating, - this.resourceServers, - this.refreshTokenMetadata, - this.lastExchangedAt); - } - - @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 userId = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional idleExpiresAt = Optional.empty(); - - private Optional expiresAt = Optional.empty(); - - private Optional device = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private OptionalNullable sessionId = OptionalNullable.absent(); - - private Optional rotating = Optional.empty(); - - private Optional> resourceServers = Optional.empty(); - - private OptionalNullable> refreshTokenMetadata = OptionalNullable.absent(); - - private Optional lastExchangedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(RefreshTokenResponseContent other) { - id(other.getId()); - userId(other.getUserId()); - createdAt(other.getCreatedAt()); - idleExpiresAt(other.getIdleExpiresAt()); - expiresAt(other.getExpiresAt()); - device(other.getDevice()); - clientId(other.getClientId()); - sessionId(other.getSessionId()); - rotating(other.getRotating()); - resourceServers(other.getResourceServers()); - refreshTokenMetadata(other.getRefreshTokenMetadata()); - lastExchangedAt(other.getLastExchangedAt()); - return this; - } - - /** - *

The ID of the refresh token

- */ - @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; - } - - /** - *

ID of the user which can be used when interacting with other APIs.

- */ - @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; - } - - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(RefreshTokenDate createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - @JsonSetter(value = "idle_expires_at", nulls = Nulls.SKIP) - public Builder idleExpiresAt(Optional idleExpiresAt) { - this.idleExpiresAt = idleExpiresAt; - return this; - } - - public Builder idleExpiresAt(RefreshTokenDate idleExpiresAt) { - this.idleExpiresAt = Optional.ofNullable(idleExpiresAt); - return this; - } - - @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - public Builder expiresAt(RefreshTokenDate expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); - return this; - } - - @JsonSetter(value = "device", nulls = Nulls.SKIP) - public Builder device(Optional device) { - this.device = device; - return this; - } - - public Builder device(RefreshTokenDevice device) { - this.device = Optional.ofNullable(device); - return this; - } - - /** - *

ID of the client application granted with this refresh token

- */ - @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 = "session_id", nulls = Nulls.SKIP) - public Builder sessionId(@Nullable OptionalNullable sessionId) { - this.sessionId = sessionId; - return this; - } - - public Builder sessionId(String sessionId) { - this.sessionId = OptionalNullable.of(sessionId); - return this; - } - - public Builder sessionId(Optional sessionId) { - if (sessionId.isPresent()) { - this.sessionId = OptionalNullable.of(sessionId.get()); - } else { - this.sessionId = OptionalNullable.absent(); - } - return this; - } - - public Builder sessionId(com.auth0.client.mgmt.core.Nullable sessionId) { - if (sessionId.isNull()) { - this.sessionId = OptionalNullable.ofNull(); - } else if (sessionId.isEmpty()) { - this.sessionId = OptionalNullable.absent(); - } else { - this.sessionId = OptionalNullable.of(sessionId.get()); - } - return this; - } - - /** - *

True if the token is a rotating refresh token

- */ - @JsonSetter(value = "rotating", nulls = Nulls.SKIP) - public Builder rotating(Optional rotating) { - this.rotating = rotating; - return this; - } - - public Builder rotating(Boolean rotating) { - this.rotating = Optional.ofNullable(rotating); - return this; - } - - /** - *

A list of the resource server IDs associated to this refresh-token and their granted scopes

- */ - @JsonSetter(value = "resource_servers", nulls = Nulls.SKIP) - public Builder resourceServers(Optional> resourceServers) { - this.resourceServers = resourceServers; - return this; - } - - public Builder resourceServers(List resourceServers) { - this.resourceServers = Optional.ofNullable(resourceServers); - return this; - } - - @JsonSetter(value = "refresh_token_metadata", nulls = Nulls.SKIP) - public Builder refreshTokenMetadata(@Nullable OptionalNullable> refreshTokenMetadata) { - this.refreshTokenMetadata = refreshTokenMetadata; - return this; - } - - public Builder refreshTokenMetadata(Map refreshTokenMetadata) { - this.refreshTokenMetadata = OptionalNullable.of(refreshTokenMetadata); - return this; - } - - public Builder refreshTokenMetadata(Optional> refreshTokenMetadata) { - if (refreshTokenMetadata.isPresent()) { - this.refreshTokenMetadata = OptionalNullable.of(refreshTokenMetadata.get()); - } else { - this.refreshTokenMetadata = OptionalNullable.absent(); - } - return this; - } - - public Builder refreshTokenMetadata( - com.auth0.client.mgmt.core.Nullable> refreshTokenMetadata) { - if (refreshTokenMetadata.isNull()) { - this.refreshTokenMetadata = OptionalNullable.ofNull(); - } else if (refreshTokenMetadata.isEmpty()) { - this.refreshTokenMetadata = OptionalNullable.absent(); - } else { - this.refreshTokenMetadata = OptionalNullable.of(refreshTokenMetadata.get()); - } - return this; - } - - @JsonSetter(value = "last_exchanged_at", nulls = Nulls.SKIP) - public Builder lastExchangedAt(Optional lastExchangedAt) { - this.lastExchangedAt = lastExchangedAt; - return this; - } - - public Builder lastExchangedAt(RefreshTokenDate lastExchangedAt) { - this.lastExchangedAt = Optional.ofNullable(lastExchangedAt); - return this; - } - - public RefreshTokenResponseContent build() { - return new RefreshTokenResponseContent( - id, - userId, - createdAt, - idleExpiresAt, - expiresAt, - device, - clientId, - sessionId, - rotating, - resourceServers, - refreshTokenMetadata, - lastExchangedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/RefreshTokenRotationTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/RefreshTokenRotationTypeEnum.java deleted file mode 100644 index e7ec8768c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RefreshTokenRotationTypeEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class RefreshTokenRotationTypeEnum { - public static final RefreshTokenRotationTypeEnum ROTATING = - new RefreshTokenRotationTypeEnum(Value.ROTATING, "rotating"); - - public static final RefreshTokenRotationTypeEnum NON_ROTATING = - new RefreshTokenRotationTypeEnum(Value.NON_ROTATING, "non-rotating"); - - private final Value value; - - private final String string; - - RefreshTokenRotationTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof RefreshTokenRotationTypeEnum - && this.string.equals(((RefreshTokenRotationTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ROTATING: - return visitor.visitRotating(); - case NON_ROTATING: - return visitor.visitNonRotating(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static RefreshTokenRotationTypeEnum valueOf(String value) { - switch (value) { - case "rotating": - return ROTATING; - case "non-rotating": - return NON_ROTATING; - default: - return new RefreshTokenRotationTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - ROTATING, - - NON_ROTATING, - - UNKNOWN - } - - public interface Visitor { - T visitRotating(); - - T visitNonRotating(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/RegenerateUsersRecoveryCodeResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/RegenerateUsersRecoveryCodeResponseContent.java deleted file mode 100644 index e20b46a0e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RegenerateUsersRecoveryCodeResponseContent.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = RegenerateUsersRecoveryCodeResponseContent.Builder.class) -public final class RegenerateUsersRecoveryCodeResponseContent { - private final Optional recoveryCode; - - private final Map additionalProperties; - - private RegenerateUsersRecoveryCodeResponseContent( - Optional recoveryCode, Map additionalProperties) { - this.recoveryCode = recoveryCode; - this.additionalProperties = additionalProperties; - } - - /** - * @return New account recovery code. - */ - @JsonProperty("recovery_code") - public Optional getRecoveryCode() { - return recoveryCode; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RegenerateUsersRecoveryCodeResponseContent - && equalTo((RegenerateUsersRecoveryCodeResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(RegenerateUsersRecoveryCodeResponseContent other) { - return recoveryCode.equals(other.recoveryCode); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.recoveryCode); - } - - @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 recoveryCode = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(RegenerateUsersRecoveryCodeResponseContent other) { - recoveryCode(other.getRecoveryCode()); - return this; - } - - /** - *

New account recovery code.

- */ - @JsonSetter(value = "recovery_code", nulls = Nulls.SKIP) - public Builder recoveryCode(Optional recoveryCode) { - this.recoveryCode = recoveryCode; - return this; - } - - public Builder recoveryCode(String recoveryCode) { - this.recoveryCode = Optional.ofNullable(recoveryCode); - return this; - } - - public RegenerateUsersRecoveryCodeResponseContent build() { - return new RegenerateUsersRecoveryCodeResponseContent(recoveryCode, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResetPhoneTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/ResetPhoneTemplateResponseContent.java deleted file mode 100644 index 214459bc1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResetPhoneTemplateResponseContent.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ResetPhoneTemplateResponseContent.Builder.class) -public final class ResetPhoneTemplateResponseContent { - private final String id; - - private final Optional channel; - - private final Optional customizable; - - private final Optional tenant; - - private final PhoneTemplateContent content; - - private final PhoneTemplateNotificationTypeEnum type; - - private final boolean disabled; - - private final Map additionalProperties; - - private ResetPhoneTemplateResponseContent( - String id, - Optional channel, - Optional customizable, - Optional tenant, - PhoneTemplateContent content, - PhoneTemplateNotificationTypeEnum type, - boolean disabled, - Map additionalProperties) { - this.id = id; - this.channel = channel; - this.customizable = customizable; - this.tenant = tenant; - this.content = content; - this.type = type; - this.disabled = disabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("channel") - public Optional getChannel() { - return channel; - } - - @JsonProperty("customizable") - public Optional getCustomizable() { - return customizable; - } - - @JsonProperty("tenant") - public Optional getTenant() { - return tenant; - } - - @JsonProperty("content") - public PhoneTemplateContent getContent() { - return content; - } - - @JsonProperty("type") - public PhoneTemplateNotificationTypeEnum getType() { - return type; - } - - /** - * @return Whether the template is enabled (false) or disabled (true). - */ - @JsonProperty("disabled") - public boolean getDisabled() { - return disabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ResetPhoneTemplateResponseContent && equalTo((ResetPhoneTemplateResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ResetPhoneTemplateResponseContent other) { - return id.equals(other.id) - && channel.equals(other.channel) - && customizable.equals(other.customizable) - && tenant.equals(other.tenant) - && content.equals(other.content) - && type.equals(other.type) - && disabled == other.disabled; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.channel, this.customizable, this.tenant, this.content, this.type, this.disabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - ContentStage id(@NotNull String id); - - Builder from(ResetPhoneTemplateResponseContent other); - } - - public interface ContentStage { - TypeStage content(@NotNull PhoneTemplateContent content); - } - - public interface TypeStage { - DisabledStage type(@NotNull PhoneTemplateNotificationTypeEnum type); - } - - public interface DisabledStage { - /** - *

Whether the template is enabled (false) or disabled (true).

- */ - _FinalStage disabled(boolean disabled); - } - - public interface _FinalStage { - ResetPhoneTemplateResponseContent build(); - - _FinalStage channel(Optional channel); - - _FinalStage channel(String channel); - - _FinalStage customizable(Optional customizable); - - _FinalStage customizable(Boolean customizable); - - _FinalStage tenant(Optional tenant); - - _FinalStage tenant(String tenant); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, ContentStage, TypeStage, DisabledStage, _FinalStage { - private String id; - - private PhoneTemplateContent content; - - private PhoneTemplateNotificationTypeEnum type; - - private boolean disabled; - - private Optional tenant = Optional.empty(); - - private Optional customizable = Optional.empty(); - - private Optional channel = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ResetPhoneTemplateResponseContent other) { - id(other.getId()); - channel(other.getChannel()); - customizable(other.getCustomizable()); - tenant(other.getTenant()); - content(other.getContent()); - type(other.getType()); - disabled(other.getDisabled()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public ContentStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("content") - public TypeStage content(@NotNull PhoneTemplateContent content) { - this.content = Objects.requireNonNull(content, "content must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public DisabledStage type(@NotNull PhoneTemplateNotificationTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("disabled") - public _FinalStage disabled(boolean disabled) { - this.disabled = disabled; - return this; - } - - @java.lang.Override - public _FinalStage tenant(String tenant) { - this.tenant = Optional.ofNullable(tenant); - return this; - } - - @java.lang.Override - @JsonSetter(value = "tenant", nulls = Nulls.SKIP) - public _FinalStage tenant(Optional tenant) { - this.tenant = tenant; - return this; - } - - @java.lang.Override - public _FinalStage customizable(Boolean customizable) { - this.customizable = Optional.ofNullable(customizable); - return this; - } - - @java.lang.Override - @JsonSetter(value = "customizable", nulls = Nulls.SKIP) - public _FinalStage customizable(Optional customizable) { - this.customizable = customizable; - return this; - } - - @java.lang.Override - public _FinalStage channel(String channel) { - this.channel = Optional.ofNullable(channel); - return this; - } - - @java.lang.Override - @JsonSetter(value = "channel", nulls = Nulls.SKIP) - public _FinalStage channel(Optional channel) { - this.channel = channel; - return this; - } - - @java.lang.Override - public ResetPhoneTemplateResponseContent build() { - return new ResetPhoneTemplateResponseContent( - id, channel, customizable, tenant, content, type, disabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServer.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServer.java deleted file mode 100644 index 6a203528b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServer.java +++ /dev/null @@ -1,741 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ResourceServer.Builder.class) -public final class ResourceServer { - 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 signingSecret; - - private final Optional allowOfflineAccess; - - private final Optional skipConsentForVerifiableFirstPartyClients; - - private final Optional tokenLifetime; - - private final Optional tokenLifetimeForWeb; - - private final Optional enforcePolicies; - - private final Optional tokenDialect; - - private final OptionalNullable tokenEncryption; - - private final OptionalNullable consentPolicy; - - private final Optional> authorizationDetails; - - private final OptionalNullable proofOfPossession; - - private final Optional subjectTypeAuthorization; - - private final Optional clientId; - - private final Map additionalProperties; - - private ResourceServer( - Optional id, - Optional name, - Optional isSystem, - Optional identifier, - Optional> scopes, - Optional signingAlg, - Optional signingSecret, - Optional allowOfflineAccess, - Optional skipConsentForVerifiableFirstPartyClients, - Optional tokenLifetime, - Optional tokenLifetimeForWeb, - Optional enforcePolicies, - Optional tokenDialect, - OptionalNullable tokenEncryption, - OptionalNullable consentPolicy, - Optional> authorizationDetails, - OptionalNullable proofOfPossession, - Optional subjectTypeAuthorization, - Optional clientId, - Map additionalProperties) { - this.id = id; - this.name = name; - this.isSystem = isSystem; - this.identifier = identifier; - this.scopes = scopes; - this.signingAlg = signingAlg; - this.signingSecret = signingSecret; - this.allowOfflineAccess = allowOfflineAccess; - this.skipConsentForVerifiableFirstPartyClients = skipConsentForVerifiableFirstPartyClients; - this.tokenLifetime = tokenLifetime; - this.tokenLifetimeForWeb = tokenLifetimeForWeb; - this.enforcePolicies = enforcePolicies; - this.tokenDialect = tokenDialect; - this.tokenEncryption = tokenEncryption; - this.consentPolicy = consentPolicy; - this.authorizationDetails = authorizationDetails; - this.proofOfPossession = proofOfPossession; - this.subjectTypeAuthorization = subjectTypeAuthorization; - this.clientId = clientId; - 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 Secret used to sign tokens when using symmetric algorithms (HS256). - */ - @JsonProperty("signing_secret") - public Optional getSigningSecret() { - return signingSecret; - } - - /** - * @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 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; - } - - @JsonProperty("token_dialect") - public Optional getTokenDialect() { - return tokenDialect; - } - - @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; - } - - @JsonProperty("authorization_details") - public Optional> getAuthorizationDetails() { - 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; - } - - /** - * @return The client ID of the client that this resource server is linked to - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @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("proof_of_possession") - private OptionalNullable _getProofOfPossession() { - return proofOfPossession; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ResourceServer && equalTo((ResourceServer) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ResourceServer 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) - && signingSecret.equals(other.signingSecret) - && allowOfflineAccess.equals(other.allowOfflineAccess) - && skipConsentForVerifiableFirstPartyClients.equals(other.skipConsentForVerifiableFirstPartyClients) - && tokenLifetime.equals(other.tokenLifetime) - && tokenLifetimeForWeb.equals(other.tokenLifetimeForWeb) - && enforcePolicies.equals(other.enforcePolicies) - && tokenDialect.equals(other.tokenDialect) - && tokenEncryption.equals(other.tokenEncryption) - && consentPolicy.equals(other.consentPolicy) - && authorizationDetails.equals(other.authorizationDetails) - && proofOfPossession.equals(other.proofOfPossession) - && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) - && clientId.equals(other.clientId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.isSystem, - this.identifier, - this.scopes, - this.signingAlg, - this.signingSecret, - this.allowOfflineAccess, - this.skipConsentForVerifiableFirstPartyClients, - this.tokenLifetime, - this.tokenLifetimeForWeb, - this.enforcePolicies, - this.tokenDialect, - this.tokenEncryption, - this.consentPolicy, - this.authorizationDetails, - this.proofOfPossession, - this.subjectTypeAuthorization, - this.clientId); - } - - @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 signingSecret = Optional.empty(); - - private Optional allowOfflineAccess = Optional.empty(); - - private Optional skipConsentForVerifiableFirstPartyClients = Optional.empty(); - - private Optional tokenLifetime = Optional.empty(); - - private Optional tokenLifetimeForWeb = Optional.empty(); - - private Optional enforcePolicies = Optional.empty(); - - private Optional tokenDialect = Optional.empty(); - - private OptionalNullable tokenEncryption = OptionalNullable.absent(); - - private OptionalNullable consentPolicy = OptionalNullable.absent(); - - private Optional> authorizationDetails = Optional.empty(); - - private OptionalNullable proofOfPossession = OptionalNullable.absent(); - - private Optional subjectTypeAuthorization = Optional.empty(); - - private Optional clientId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ResourceServer other) { - id(other.getId()); - name(other.getName()); - isSystem(other.getIsSystem()); - identifier(other.getIdentifier()); - scopes(other.getScopes()); - signingAlg(other.getSigningAlg()); - signingSecret(other.getSigningSecret()); - allowOfflineAccess(other.getAllowOfflineAccess()); - skipConsentForVerifiableFirstPartyClients(other.getSkipConsentForVerifiableFirstPartyClients()); - tokenLifetime(other.getTokenLifetime()); - tokenLifetimeForWeb(other.getTokenLifetimeForWeb()); - enforcePolicies(other.getEnforcePolicies()); - tokenDialect(other.getTokenDialect()); - tokenEncryption(other.getTokenEncryption()); - consentPolicy(other.getConsentPolicy()); - authorizationDetails(other.getAuthorizationDetails()); - proofOfPossession(other.getProofOfPossession()); - subjectTypeAuthorization(other.getSubjectTypeAuthorization()); - clientId(other.getClientId()); - 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; - } - - /** - *

Secret used to sign tokens when using symmetric algorithms (HS256).

- */ - @JsonSetter(value = "signing_secret", nulls = Nulls.SKIP) - public Builder signingSecret(Optional signingSecret) { - this.signingSecret = signingSecret; - return this; - } - - public Builder signingSecret(String signingSecret) { - this.signingSecret = Optional.ofNullable(signingSecret); - 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 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; - } - - @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 = "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; - } - - @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) - public Builder authorizationDetails(Optional> authorizationDetails) { - this.authorizationDetails = authorizationDetails; - return this; - } - - public Builder authorizationDetails(List authorizationDetails) { - this.authorizationDetails = Optional.ofNullable(authorizationDetails); - 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; - } - - /** - *

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; - } - - public ResourceServer build() { - return new ResourceServer( - id, - name, - isSystem, - identifier, - scopes, - signingAlg, - signingSecret, - allowOfflineAccess, - skipConsentForVerifiableFirstPartyClients, - tokenLifetime, - tokenLifetimeForWeb, - enforcePolicies, - tokenDialect, - tokenEncryption, - consentPolicy, - authorizationDetails, - proofOfPossession, - subjectTypeAuthorization, - clientId, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerConsentPolicyEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerConsentPolicyEnum.java deleted file mode 100644 index d22119968..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerConsentPolicyEnum.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ResourceServerConsentPolicyEnum { - public static final ResourceServerConsentPolicyEnum TRANSACTIONAL_AUTHORIZATION_WITH_MFA = - new ResourceServerConsentPolicyEnum( - Value.TRANSACTIONAL_AUTHORIZATION_WITH_MFA, "transactional-authorization-with-mfa"); - - private final Value value; - - private final String string; - - ResourceServerConsentPolicyEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ResourceServerConsentPolicyEnum - && this.string.equals(((ResourceServerConsentPolicyEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TRANSACTIONAL_AUTHORIZATION_WITH_MFA: - return visitor.visitTransactionalAuthorizationWithMfa(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ResourceServerConsentPolicyEnum valueOf(String value) { - switch (value) { - case "transactional-authorization-with-mfa": - return TRANSACTIONAL_AUTHORIZATION_WITH_MFA; - default: - return new ResourceServerConsentPolicyEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - TRANSACTIONAL_AUTHORIZATION_WITH_MFA, - - UNKNOWN - } - - public interface Visitor { - T visitTransactionalAuthorizationWithMfa(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerProofOfPossession.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerProofOfPossession.java deleted file mode 100644 index 96b577cda..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerProofOfPossession.java +++ /dev/null @@ -1,169 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ResourceServerProofOfPossession.Builder.class) -public final class ResourceServerProofOfPossession { - private final ResourceServerProofOfPossessionMechanismEnum mechanism; - - private final boolean required; - - private final Optional requiredFor; - - private final Map additionalProperties; - - private ResourceServerProofOfPossession( - ResourceServerProofOfPossessionMechanismEnum mechanism, - boolean required, - Optional requiredFor, - Map additionalProperties) { - this.mechanism = mechanism; - this.required = required; - this.requiredFor = requiredFor; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("mechanism") - public ResourceServerProofOfPossessionMechanismEnum getMechanism() { - return mechanism; - } - - /** - * @return Whether the use of Proof-of-Possession is required for the resource server - */ - @JsonProperty("required") - public boolean getRequired() { - return required; - } - - @JsonProperty("required_for") - public Optional getRequiredFor() { - return requiredFor; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ResourceServerProofOfPossession && equalTo((ResourceServerProofOfPossession) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ResourceServerProofOfPossession other) { - return mechanism.equals(other.mechanism) && required == other.required && requiredFor.equals(other.requiredFor); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.mechanism, this.required, this.requiredFor); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static MechanismStage builder() { - return new Builder(); - } - - public interface MechanismStage { - RequiredStage mechanism(@NotNull ResourceServerProofOfPossessionMechanismEnum mechanism); - - Builder from(ResourceServerProofOfPossession other); - } - - public interface RequiredStage { - /** - *

Whether the use of Proof-of-Possession is required for the resource server

- */ - _FinalStage required(boolean required); - } - - public interface _FinalStage { - ResourceServerProofOfPossession build(); - - _FinalStage requiredFor(Optional requiredFor); - - _FinalStage requiredFor(ResourceServerProofOfPossessionRequiredForEnum requiredFor); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements MechanismStage, RequiredStage, _FinalStage { - private ResourceServerProofOfPossessionMechanismEnum mechanism; - - private boolean required; - - private Optional requiredFor = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ResourceServerProofOfPossession other) { - mechanism(other.getMechanism()); - required(other.getRequired()); - requiredFor(other.getRequiredFor()); - return this; - } - - @java.lang.Override - @JsonSetter("mechanism") - public RequiredStage mechanism(@NotNull ResourceServerProofOfPossessionMechanismEnum mechanism) { - this.mechanism = Objects.requireNonNull(mechanism, "mechanism must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("required") - public _FinalStage required(boolean required) { - this.required = required; - return this; - } - - @java.lang.Override - public _FinalStage requiredFor(ResourceServerProofOfPossessionRequiredForEnum requiredFor) { - this.requiredFor = Optional.ofNullable(requiredFor); - return this; - } - - @java.lang.Override - @JsonSetter(value = "required_for", nulls = Nulls.SKIP) - public _FinalStage requiredFor(Optional requiredFor) { - this.requiredFor = requiredFor; - return this; - } - - @java.lang.Override - public ResourceServerProofOfPossession build() { - return new ResourceServerProofOfPossession(mechanism, required, requiredFor, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerProofOfPossessionMechanismEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerProofOfPossessionMechanismEnum.java deleted file mode 100644 index 365f9920a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerProofOfPossessionMechanismEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ResourceServerProofOfPossessionMechanismEnum { - public static final ResourceServerProofOfPossessionMechanismEnum DPOP = - new ResourceServerProofOfPossessionMechanismEnum(Value.DPOP, "dpop"); - - public static final ResourceServerProofOfPossessionMechanismEnum MTLS = - new ResourceServerProofOfPossessionMechanismEnum(Value.MTLS, "mtls"); - - private final Value value; - - private final String string; - - ResourceServerProofOfPossessionMechanismEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ResourceServerProofOfPossessionMechanismEnum - && this.string.equals(((ResourceServerProofOfPossessionMechanismEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DPOP: - return visitor.visitDpop(); - case MTLS: - return visitor.visitMtls(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ResourceServerProofOfPossessionMechanismEnum valueOf(String value) { - switch (value) { - case "dpop": - return DPOP; - case "mtls": - return MTLS; - default: - return new ResourceServerProofOfPossessionMechanismEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - MTLS, - - DPOP, - - UNKNOWN - } - - public interface Visitor { - T visitMtls(); - - T visitDpop(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerProofOfPossessionRequiredForEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerProofOfPossessionRequiredForEnum.java deleted file mode 100644 index 2a47dfaca..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerProofOfPossessionRequiredForEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ResourceServerProofOfPossessionRequiredForEnum { - public static final ResourceServerProofOfPossessionRequiredForEnum ALL_CLIENTS = - new ResourceServerProofOfPossessionRequiredForEnum(Value.ALL_CLIENTS, "all_clients"); - - public static final ResourceServerProofOfPossessionRequiredForEnum CONFIDENTIAL_CLIENTS = - new ResourceServerProofOfPossessionRequiredForEnum(Value.CONFIDENTIAL_CLIENTS, "confidential_clients"); - - public static final ResourceServerProofOfPossessionRequiredForEnum PUBLIC_CLIENTS = - new ResourceServerProofOfPossessionRequiredForEnum(Value.PUBLIC_CLIENTS, "public_clients"); - - private final Value value; - - private final String string; - - ResourceServerProofOfPossessionRequiredForEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ResourceServerProofOfPossessionRequiredForEnum - && this.string.equals(((ResourceServerProofOfPossessionRequiredForEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case ALL_CLIENTS: - return visitor.visitAllClients(); - case CONFIDENTIAL_CLIENTS: - return visitor.visitConfidentialClients(); - case PUBLIC_CLIENTS: - return visitor.visitPublicClients(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ResourceServerProofOfPossessionRequiredForEnum valueOf(String value) { - switch (value) { - case "all_clients": - return ALL_CLIENTS; - case "confidential_clients": - return CONFIDENTIAL_CLIENTS; - case "public_clients": - return PUBLIC_CLIENTS; - default: - return new ResourceServerProofOfPossessionRequiredForEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PUBLIC_CLIENTS, - - CONFIDENTIAL_CLIENTS, - - ALL_CLIENTS, - - UNKNOWN - } - - public interface Visitor { - T visitPublicClients(); - - T visitConfidentialClients(); - - T visitAllClients(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerScope.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerScope.java deleted file mode 100644 index 483429c0e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerScope.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ResourceServerScope.Builder.class) -public final class ResourceServerScope { - private final String value; - - private final Optional description; - - private final Map additionalProperties; - - private ResourceServerScope(String value, Optional description, Map additionalProperties) { - this.value = value; - this.description = description; - this.additionalProperties = additionalProperties; - } - - /** - * @return Value of this scope. - */ - @JsonProperty("value") - public String getValue() { - return value; - } - - /** - * @return User-friendly description of this scope. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ResourceServerScope && equalTo((ResourceServerScope) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ResourceServerScope other) { - return value.equals(other.value) && description.equals(other.description); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value, this.description); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ValueStage builder() { - return new Builder(); - } - - public interface ValueStage { - /** - *

Value of this scope.

- */ - _FinalStage value(@NotNull String value); - - Builder from(ResourceServerScope other); - } - - public interface _FinalStage { - ResourceServerScope build(); - - /** - *

User-friendly description of this scope.

- */ - _FinalStage description(Optional description); - - _FinalStage description(String description); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ValueStage, _FinalStage { - private String value; - - private Optional description = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ResourceServerScope other) { - value(other.getValue()); - description(other.getDescription()); - return this; - } - - /** - *

Value of this scope.

- *

Value of this scope.

- * @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; - } - - /** - *

User-friendly description of this scope.

- * @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; - } - - /** - *

User-friendly description of this scope.

- */ - @java.lang.Override - @JsonSetter(value = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; - return this; - } - - @java.lang.Override - public ResourceServerScope build() { - return new ResourceServerScope(value, description, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorization.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorization.java deleted file mode 100644 index 4f2b68694..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorization.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ResourceServerSubjectTypeAuthorization.Builder.class) -public final class ResourceServerSubjectTypeAuthorization { - private final Optional user; - - private final Optional client; - - private final Map additionalProperties; - - private ResourceServerSubjectTypeAuthorization( - Optional user, - Optional client, - Map additionalProperties) { - this.user = user; - this.client = client; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("user") - public Optional getUser() { - return user; - } - - @JsonProperty("client") - public Optional getClient() { - return client; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ResourceServerSubjectTypeAuthorization - && equalTo((ResourceServerSubjectTypeAuthorization) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ResourceServerSubjectTypeAuthorization other) { - return user.equals(other.user) && client.equals(other.client); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.user, this.client); - } - - @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 user = Optional.empty(); - - private Optional client = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ResourceServerSubjectTypeAuthorization other) { - user(other.getUser()); - client(other.getClient()); - return this; - } - - @JsonSetter(value = "user", nulls = Nulls.SKIP) - public Builder user(Optional user) { - this.user = user; - return this; - } - - public Builder user(ResourceServerSubjectTypeAuthorizationUser user) { - this.user = Optional.ofNullable(user); - return this; - } - - @JsonSetter(value = "client", nulls = Nulls.SKIP) - public Builder client(Optional client) { - this.client = client; - return this; - } - - public Builder client(ResourceServerSubjectTypeAuthorizationClient client) { - this.client = Optional.ofNullable(client); - return this; - } - - public ResourceServerSubjectTypeAuthorization build() { - return new ResourceServerSubjectTypeAuthorization(user, client, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorizationClient.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorizationClient.java deleted file mode 100644 index 57ce7692c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorizationClient.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ResourceServerSubjectTypeAuthorizationClient.Builder.class) -public final class ResourceServerSubjectTypeAuthorizationClient { - private final Optional policy; - - private final Map additionalProperties; - - private ResourceServerSubjectTypeAuthorizationClient( - 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 ResourceServerSubjectTypeAuthorizationClient - && equalTo((ResourceServerSubjectTypeAuthorizationClient) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ResourceServerSubjectTypeAuthorizationClient 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(ResourceServerSubjectTypeAuthorizationClient 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(ResourceServerSubjectTypeAuthorizationClientPolicyEnum policy) { - this.policy = Optional.ofNullable(policy); - return this; - } - - public ResourceServerSubjectTypeAuthorizationClient build() { - return new ResourceServerSubjectTypeAuthorizationClient(policy, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorizationClientPolicyEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorizationClientPolicyEnum.java deleted file mode 100644 index d0d931326..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorizationClientPolicyEnum.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ResourceServerSubjectTypeAuthorizationClientPolicyEnum { - public static final ResourceServerSubjectTypeAuthorizationClientPolicyEnum DENY_ALL = - new ResourceServerSubjectTypeAuthorizationClientPolicyEnum(Value.DENY_ALL, "deny_all"); - - public static final ResourceServerSubjectTypeAuthorizationClientPolicyEnum REQUIRE_CLIENT_GRANT = - new ResourceServerSubjectTypeAuthorizationClientPolicyEnum( - Value.REQUIRE_CLIENT_GRANT, "require_client_grant"); - - private final Value value; - - private final String string; - - ResourceServerSubjectTypeAuthorizationClientPolicyEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ResourceServerSubjectTypeAuthorizationClientPolicyEnum - && this.string.equals(((ResourceServerSubjectTypeAuthorizationClientPolicyEnum) 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 ResourceServerSubjectTypeAuthorizationClientPolicyEnum valueOf(String value) { - switch (value) { - case "deny_all": - return DENY_ALL; - case "require_client_grant": - return REQUIRE_CLIENT_GRANT; - default: - return new ResourceServerSubjectTypeAuthorizationClientPolicyEnum(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/ResourceServerSubjectTypeAuthorizationUser.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorizationUser.java deleted file mode 100644 index ff6983cb3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorizationUser.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ResourceServerSubjectTypeAuthorizationUser.Builder.class) -public final class ResourceServerSubjectTypeAuthorizationUser { - private final Optional policy; - - private final Map additionalProperties; - - private ResourceServerSubjectTypeAuthorizationUser( - 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 ResourceServerSubjectTypeAuthorizationUser - && equalTo((ResourceServerSubjectTypeAuthorizationUser) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ResourceServerSubjectTypeAuthorizationUser 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(ResourceServerSubjectTypeAuthorizationUser 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(ResourceServerSubjectTypeAuthorizationUserPolicyEnum policy) { - this.policy = Optional.ofNullable(policy); - return this; - } - - public ResourceServerSubjectTypeAuthorizationUser build() { - return new ResourceServerSubjectTypeAuthorizationUser(policy, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorizationUserPolicyEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorizationUserPolicyEnum.java deleted file mode 100644 index 9f27f109c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerSubjectTypeAuthorizationUserPolicyEnum.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ResourceServerSubjectTypeAuthorizationUserPolicyEnum { - public static final ResourceServerSubjectTypeAuthorizationUserPolicyEnum DENY_ALL = - new ResourceServerSubjectTypeAuthorizationUserPolicyEnum(Value.DENY_ALL, "deny_all"); - - public static final ResourceServerSubjectTypeAuthorizationUserPolicyEnum REQUIRE_CLIENT_GRANT = - new ResourceServerSubjectTypeAuthorizationUserPolicyEnum( - Value.REQUIRE_CLIENT_GRANT, "require_client_grant"); - - public static final ResourceServerSubjectTypeAuthorizationUserPolicyEnum ALLOW_ALL = - new ResourceServerSubjectTypeAuthorizationUserPolicyEnum(Value.ALLOW_ALL, "allow_all"); - - private final Value value; - - private final String string; - - ResourceServerSubjectTypeAuthorizationUserPolicyEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ResourceServerSubjectTypeAuthorizationUserPolicyEnum - && this.string.equals(((ResourceServerSubjectTypeAuthorizationUserPolicyEnum) 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 ALLOW_ALL: - return visitor.visitAllowAll(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ResourceServerSubjectTypeAuthorizationUserPolicyEnum valueOf(String value) { - switch (value) { - case "deny_all": - return DENY_ALL; - case "require_client_grant": - return REQUIRE_CLIENT_GRANT; - case "allow_all": - return ALLOW_ALL; - default: - return new ResourceServerSubjectTypeAuthorizationUserPolicyEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - ALLOW_ALL, - - DENY_ALL, - - REQUIRE_CLIENT_GRANT, - - UNKNOWN - } - - public interface Visitor { - T visitAllowAll(); - - T visitDenyAll(); - - T visitRequireClientGrant(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenDialectResponseEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenDialectResponseEnum.java deleted file mode 100644 index 41d95ba20..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenDialectResponseEnum.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ResourceServerTokenDialectResponseEnum { - public static final ResourceServerTokenDialectResponseEnum RFC9068PROFILE = - new ResourceServerTokenDialectResponseEnum(Value.RFC9068PROFILE, "rfc9068_profile"); - - public static final ResourceServerTokenDialectResponseEnum ACCESS_TOKEN_AUTHZ = - new ResourceServerTokenDialectResponseEnum(Value.ACCESS_TOKEN_AUTHZ, "access_token_authz"); - - public static final ResourceServerTokenDialectResponseEnum RFC9068PROFILE_AUTHZ = - new ResourceServerTokenDialectResponseEnum(Value.RFC9068PROFILE_AUTHZ, "rfc9068_profile_authz"); - - public static final ResourceServerTokenDialectResponseEnum ACCESS_TOKEN = - new ResourceServerTokenDialectResponseEnum(Value.ACCESS_TOKEN, "access_token"); - - private final Value value; - - private final String string; - - ResourceServerTokenDialectResponseEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ResourceServerTokenDialectResponseEnum - && this.string.equals(((ResourceServerTokenDialectResponseEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case RFC9068PROFILE: - return visitor.visitRfc9068Profile(); - case ACCESS_TOKEN_AUTHZ: - return visitor.visitAccessTokenAuthz(); - case RFC9068PROFILE_AUTHZ: - return visitor.visitRfc9068ProfileAuthz(); - case ACCESS_TOKEN: - return visitor.visitAccessToken(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ResourceServerTokenDialectResponseEnum valueOf(String value) { - switch (value) { - case "rfc9068_profile": - return RFC9068PROFILE; - case "access_token_authz": - return ACCESS_TOKEN_AUTHZ; - case "rfc9068_profile_authz": - return RFC9068PROFILE_AUTHZ; - case "access_token": - return ACCESS_TOKEN; - default: - return new ResourceServerTokenDialectResponseEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - ACCESS_TOKEN, - - ACCESS_TOKEN_AUTHZ, - - RFC9068PROFILE, - - RFC9068PROFILE_AUTHZ, - - UNKNOWN - } - - public interface Visitor { - T visitAccessToken(); - - T visitAccessTokenAuthz(); - - T visitRfc9068Profile(); - - T visitRfc9068ProfileAuthz(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenDialectSchemaEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenDialectSchemaEnum.java deleted file mode 100644 index 8124b2690..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenDialectSchemaEnum.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ResourceServerTokenDialectSchemaEnum { - public static final ResourceServerTokenDialectSchemaEnum RFC9068PROFILE = - new ResourceServerTokenDialectSchemaEnum(Value.RFC9068PROFILE, "rfc9068_profile"); - - public static final ResourceServerTokenDialectSchemaEnum ACCESS_TOKEN_AUTHZ = - new ResourceServerTokenDialectSchemaEnum(Value.ACCESS_TOKEN_AUTHZ, "access_token_authz"); - - public static final ResourceServerTokenDialectSchemaEnum RFC9068PROFILE_AUTHZ = - new ResourceServerTokenDialectSchemaEnum(Value.RFC9068PROFILE_AUTHZ, "rfc9068_profile_authz"); - - public static final ResourceServerTokenDialectSchemaEnum ACCESS_TOKEN = - new ResourceServerTokenDialectSchemaEnum(Value.ACCESS_TOKEN, "access_token"); - - private final Value value; - - private final String string; - - ResourceServerTokenDialectSchemaEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ResourceServerTokenDialectSchemaEnum - && this.string.equals(((ResourceServerTokenDialectSchemaEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case RFC9068PROFILE: - return visitor.visitRfc9068Profile(); - case ACCESS_TOKEN_AUTHZ: - return visitor.visitAccessTokenAuthz(); - case RFC9068PROFILE_AUTHZ: - return visitor.visitRfc9068ProfileAuthz(); - case ACCESS_TOKEN: - return visitor.visitAccessToken(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ResourceServerTokenDialectSchemaEnum valueOf(String value) { - switch (value) { - case "rfc9068_profile": - return RFC9068PROFILE; - case "access_token_authz": - return ACCESS_TOKEN_AUTHZ; - case "rfc9068_profile_authz": - return RFC9068PROFILE_AUTHZ; - case "access_token": - return ACCESS_TOKEN; - default: - return new ResourceServerTokenDialectSchemaEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - ACCESS_TOKEN, - - ACCESS_TOKEN_AUTHZ, - - RFC9068PROFILE, - - RFC9068PROFILE_AUTHZ, - - UNKNOWN - } - - public interface Visitor { - T visitAccessToken(); - - T visitAccessTokenAuthz(); - - T visitRfc9068Profile(); - - T visitRfc9068ProfileAuthz(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryption.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryption.java deleted file mode 100644 index 40425e4b0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryption.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = ResourceServerTokenEncryption.Builder.class) -public final class ResourceServerTokenEncryption { - private final ResourceServerTokenEncryptionFormatEnum format; - - private final ResourceServerTokenEncryptionKey encryptionKey; - - private final Map additionalProperties; - - private ResourceServerTokenEncryption( - ResourceServerTokenEncryptionFormatEnum format, - ResourceServerTokenEncryptionKey encryptionKey, - Map additionalProperties) { - this.format = format; - this.encryptionKey = encryptionKey; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("format") - public ResourceServerTokenEncryptionFormatEnum getFormat() { - return format; - } - - @JsonProperty("encryption_key") - public ResourceServerTokenEncryptionKey getEncryptionKey() { - return encryptionKey; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ResourceServerTokenEncryption && equalTo((ResourceServerTokenEncryption) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ResourceServerTokenEncryption other) { - return format.equals(other.format) && encryptionKey.equals(other.encryptionKey); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.format, this.encryptionKey); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static FormatStage builder() { - return new Builder(); - } - - public interface FormatStage { - EncryptionKeyStage format(@NotNull ResourceServerTokenEncryptionFormatEnum format); - - Builder from(ResourceServerTokenEncryption other); - } - - public interface EncryptionKeyStage { - _FinalStage encryptionKey(@NotNull ResourceServerTokenEncryptionKey encryptionKey); - } - - public interface _FinalStage { - ResourceServerTokenEncryption build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements FormatStage, EncryptionKeyStage, _FinalStage { - private ResourceServerTokenEncryptionFormatEnum format; - - private ResourceServerTokenEncryptionKey encryptionKey; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ResourceServerTokenEncryption other) { - format(other.getFormat()); - encryptionKey(other.getEncryptionKey()); - return this; - } - - @java.lang.Override - @JsonSetter("format") - public EncryptionKeyStage format(@NotNull ResourceServerTokenEncryptionFormatEnum format) { - this.format = Objects.requireNonNull(format, "format must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("encryption_key") - public _FinalStage encryptionKey(@NotNull ResourceServerTokenEncryptionKey encryptionKey) { - this.encryptionKey = Objects.requireNonNull(encryptionKey, "encryptionKey must not be null"); - return this; - } - - @java.lang.Override - public ResourceServerTokenEncryption build() { - return new ResourceServerTokenEncryption(format, encryptionKey, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryptionAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryptionAlgorithmEnum.java deleted file mode 100644 index ad694adff..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryptionAlgorithmEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ResourceServerTokenEncryptionAlgorithmEnum { - public static final ResourceServerTokenEncryptionAlgorithmEnum RSA_OAEP256 = - new ResourceServerTokenEncryptionAlgorithmEnum(Value.RSA_OAEP256, "RSA-OAEP-256"); - - public static final ResourceServerTokenEncryptionAlgorithmEnum RSA_OAEP512 = - new ResourceServerTokenEncryptionAlgorithmEnum(Value.RSA_OAEP512, "RSA-OAEP-512"); - - public static final ResourceServerTokenEncryptionAlgorithmEnum RSA_OAEP384 = - new ResourceServerTokenEncryptionAlgorithmEnum(Value.RSA_OAEP384, "RSA-OAEP-384"); - - private final Value value; - - private final String string; - - ResourceServerTokenEncryptionAlgorithmEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ResourceServerTokenEncryptionAlgorithmEnum - && this.string.equals(((ResourceServerTokenEncryptionAlgorithmEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case RSA_OAEP256: - return visitor.visitRsaOaep256(); - case RSA_OAEP512: - return visitor.visitRsaOaep512(); - case RSA_OAEP384: - return visitor.visitRsaOaep384(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ResourceServerTokenEncryptionAlgorithmEnum valueOf(String value) { - switch (value) { - case "RSA-OAEP-256": - return RSA_OAEP256; - case "RSA-OAEP-512": - return RSA_OAEP512; - case "RSA-OAEP-384": - return RSA_OAEP384; - default: - return new ResourceServerTokenEncryptionAlgorithmEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - RSA_OAEP256, - - RSA_OAEP384, - - RSA_OAEP512, - - UNKNOWN - } - - public interface Visitor { - T visitRsaOaep256(); - - T visitRsaOaep384(); - - T visitRsaOaep512(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryptionFormatEnum.java b/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryptionFormatEnum.java deleted file mode 100644 index 8ad48855b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryptionFormatEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ResourceServerTokenEncryptionFormatEnum { - public static final ResourceServerTokenEncryptionFormatEnum COMPACT_NESTED_JWE = - new ResourceServerTokenEncryptionFormatEnum(Value.COMPACT_NESTED_JWE, "compact-nested-jwe"); - - private final Value value; - - private final String string; - - ResourceServerTokenEncryptionFormatEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ResourceServerTokenEncryptionFormatEnum - && this.string.equals(((ResourceServerTokenEncryptionFormatEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case COMPACT_NESTED_JWE: - return visitor.visitCompactNestedJwe(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ResourceServerTokenEncryptionFormatEnum valueOf(String value) { - switch (value) { - case "compact-nested-jwe": - return COMPACT_NESTED_JWE; - default: - return new ResourceServerTokenEncryptionFormatEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - COMPACT_NESTED_JWE, - - UNKNOWN - } - - public interface Visitor { - T visitCompactNestedJwe(); - - 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 deleted file mode 100644 index 6715e0f2c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ResourceServerTokenEncryptionKey.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ResourceServerTokenEncryptionKey.Builder.class) -public final class ResourceServerTokenEncryptionKey { - private final Optional name; - - private final ResourceServerTokenEncryptionAlgorithmEnum alg; - - private final Optional kid; - - private final String pem; - - private final Map additionalProperties; - - private ResourceServerTokenEncryptionKey( - Optional name, - ResourceServerTokenEncryptionAlgorithmEnum alg, - Optional kid, - String pem, - Map additionalProperties) { - this.name = name; - this.alg = alg; - this.kid = kid; - this.pem = pem; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of the encryption key. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("alg") - public ResourceServerTokenEncryptionAlgorithmEnum getAlg() { - return alg; - } - - /** - * @return Key ID. - */ - @JsonProperty("kid") - public Optional getKid() { - return kid; - } - - /** - * @return PEM-formatted public key. Must be JSON escaped. - */ - @JsonProperty("pem") - public String getPem() { - return pem; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ResourceServerTokenEncryptionKey && equalTo((ResourceServerTokenEncryptionKey) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ResourceServerTokenEncryptionKey other) { - return name.equals(other.name) && alg.equals(other.alg) && kid.equals(other.kid) && pem.equals(other.pem); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.alg, this.kid, this.pem); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static AlgStage builder() { - return new Builder(); - } - - public interface AlgStage { - PemStage alg(@NotNull ResourceServerTokenEncryptionAlgorithmEnum alg); - - Builder from(ResourceServerTokenEncryptionKey other); - } - - public interface PemStage { - /** - *

PEM-formatted public key. Must be JSON escaped.

- */ - _FinalStage pem(@NotNull String pem); - } - - public interface _FinalStage { - ResourceServerTokenEncryptionKey build(); - - /** - *

Name of the encryption key.

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

Key ID.

- */ - _FinalStage kid(Optional kid); - - _FinalStage kid(String kid); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements AlgStage, PemStage, _FinalStage { - private ResourceServerTokenEncryptionAlgorithmEnum alg; - - private String pem; - - private Optional kid = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ResourceServerTokenEncryptionKey other) { - name(other.getName()); - alg(other.getAlg()); - kid(other.getKid()); - pem(other.getPem()); - return this; - } - - @java.lang.Override - @JsonSetter("alg") - public PemStage alg(@NotNull ResourceServerTokenEncryptionAlgorithmEnum alg) { - this.alg = Objects.requireNonNull(alg, "alg must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("pem") - public _FinalStage pem(@NotNull String pem) { - this.pem = Objects.requireNonNull(pem, "pem must not be null"); - return this; - } - - /** - *

Key ID.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage kid(String kid) { - this.kid = Optional.ofNullable(kid); - return this; - } - - /** - *

Key ID.

- */ - @java.lang.Override - @JsonSetter(value = "kid", nulls = Nulls.SKIP) - public _FinalStage kid(Optional kid) { - this.kid = kid; - return this; - } - - /** - *

Name of the encryption key.

- * @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 the encryption key.

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public ResourceServerTokenEncryptionKey build() { - return new ResourceServerTokenEncryptionKey(name, alg, kid, pem, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/RevokeUserAccessRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/RevokeUserAccessRequestContent.java deleted file mode 100644 index 7c0ebc5d8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RevokeUserAccessRequestContent.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = RevokeUserAccessRequestContent.Builder.class) -public final class RevokeUserAccessRequestContent { - private final Optional sessionId; - - private final Optional preserveRefreshTokens; - - private final Map additionalProperties; - - private RevokeUserAccessRequestContent( - Optional sessionId, - Optional preserveRefreshTokens, - Map additionalProperties) { - this.sessionId = sessionId; - this.preserveRefreshTokens = preserveRefreshTokens; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the session to revoke. - */ - @JsonProperty("session_id") - public Optional getSessionId() { - return sessionId; - } - - /** - * @return Whether to preserve the refresh tokens associated with the session. - */ - @JsonProperty("preserve_refresh_tokens") - public Optional getPreserveRefreshTokens() { - return preserveRefreshTokens; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RevokeUserAccessRequestContent && equalTo((RevokeUserAccessRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(RevokeUserAccessRequestContent other) { - return sessionId.equals(other.sessionId) && preserveRefreshTokens.equals(other.preserveRefreshTokens); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.sessionId, this.preserveRefreshTokens); - } - - @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 sessionId = Optional.empty(); - - private Optional preserveRefreshTokens = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(RevokeUserAccessRequestContent other) { - sessionId(other.getSessionId()); - preserveRefreshTokens(other.getPreserveRefreshTokens()); - return this; - } - - /** - *

ID of the session to revoke.

- */ - @JsonSetter(value = "session_id", nulls = Nulls.SKIP) - public Builder sessionId(Optional sessionId) { - this.sessionId = sessionId; - return this; - } - - public Builder sessionId(String sessionId) { - this.sessionId = Optional.ofNullable(sessionId); - return this; - } - - /** - *

Whether to preserve the refresh tokens associated with the session.

- */ - @JsonSetter(value = "preserve_refresh_tokens", nulls = Nulls.SKIP) - public Builder preserveRefreshTokens(Optional preserveRefreshTokens) { - this.preserveRefreshTokens = preserveRefreshTokens; - return this; - } - - public Builder preserveRefreshTokens(Boolean preserveRefreshTokens) { - this.preserveRefreshTokens = Optional.ofNullable(preserveRefreshTokens); - return this; - } - - public RevokeUserAccessRequestContent build() { - return new RevokeUserAccessRequestContent(sessionId, preserveRefreshTokens, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/RevokedSigningKeysResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/RevokedSigningKeysResponseContent.java deleted file mode 100644 index 480903d04..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RevokedSigningKeysResponseContent.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = RevokedSigningKeysResponseContent.Builder.class) -public final class RevokedSigningKeysResponseContent { - private final String cert; - - private final String kid; - - private final Map additionalProperties; - - private RevokedSigningKeysResponseContent(String cert, String kid, Map additionalProperties) { - this.cert = cert; - this.kid = kid; - this.additionalProperties = additionalProperties; - } - - /** - * @return Revoked key certificate - */ - @JsonProperty("cert") - public String getCert() { - return cert; - } - - /** - * @return Revoked key id - */ - @JsonProperty("kid") - public String getKid() { - return kid; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RevokedSigningKeysResponseContent && equalTo((RevokedSigningKeysResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(RevokedSigningKeysResponseContent other) { - return cert.equals(other.cert) && kid.equals(other.kid); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.cert, this.kid); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static CertStage builder() { - return new Builder(); - } - - public interface CertStage { - /** - *

Revoked key certificate

- */ - KidStage cert(@NotNull String cert); - - Builder from(RevokedSigningKeysResponseContent other); - } - - public interface KidStage { - /** - *

Revoked key id

- */ - _FinalStage kid(@NotNull String kid); - } - - public interface _FinalStage { - RevokedSigningKeysResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements CertStage, KidStage, _FinalStage { - private String cert; - - private String kid; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(RevokedSigningKeysResponseContent other) { - cert(other.getCert()); - kid(other.getKid()); - return this; - } - - /** - *

Revoked key certificate

- *

Revoked key certificate

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("cert") - public KidStage cert(@NotNull String cert) { - this.cert = Objects.requireNonNull(cert, "cert must not be null"); - return this; - } - - /** - *

Revoked key id

- *

Revoked key id

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("kid") - public _FinalStage kid(@NotNull String kid) { - this.kid = Objects.requireNonNull(kid, "kid must not be null"); - return this; - } - - @java.lang.Override - public RevokedSigningKeysResponseContent build() { - return new RevokedSigningKeysResponseContent(cert, kid, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/Role.java b/src/main/java/com/auth0/client/mgmt/types/Role.java deleted file mode 100644 index 6fb817d6a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/Role.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = Role.Builder.class) -public final class Role { - private final Optional id; - - private final Optional name; - - private final Optional description; - - private final Map additionalProperties; - - private Role( - Optional id, - Optional name, - Optional description, - Map additionalProperties) { - this.id = id; - this.name = name; - this.description = description; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID for this role. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Name of this role. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Description of this role. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Role && equalTo((Role) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(Role other) { - return id.equals(other.id) && name.equals(other.name) && description.equals(other.description); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.description); - } - - @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 description = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(Role other) { - id(other.getId()); - name(other.getName()); - description(other.getDescription()); - return this; - } - - /** - *

ID for this role.

- */ - @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; - } - - /** - *

Name of this role.

- */ - @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; - } - - /** - *

Description of this role.

- */ - @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; - } - - public Role build() { - return new Role(id, name, description, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/RoleUser.java b/src/main/java/com/auth0/client/mgmt/types/RoleUser.java deleted file mode 100644 index 7e84435cc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RoleUser.java +++ /dev/null @@ -1,193 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = RoleUser.Builder.class) -public final class RoleUser { - private final Optional userId; - - private final Optional picture; - - private final Optional name; - - private final Optional email; - - private final Map additionalProperties; - - private RoleUser( - 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 RoleUser && equalTo((RoleUser) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(RoleUser 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(RoleUser 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 RoleUser build() { - return new RoleUser(userId, picture, name, email, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/RollbackActionModuleResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/RollbackActionModuleResponseContent.java deleted file mode 100644 index adf39888b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RollbackActionModuleResponseContent.java +++ /dev/null @@ -1,423 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = RollbackActionModuleResponseContent.Builder.class) -public final class RollbackActionModuleResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional> secrets; - - private final Optional actionsUsingModuleTotal; - - private final Optional allChangesPublished; - - private final Optional latestVersionNumber; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional latestVersion; - - private final Map additionalProperties; - - private RollbackActionModuleResponseContent( - Optional id, - Optional name, - Optional code, - Optional> dependencies, - Optional> secrets, - Optional actionsUsingModuleTotal, - Optional allChangesPublished, - Optional latestVersionNumber, - Optional createdAt, - Optional updatedAt, - Optional latestVersion, - Map additionalProperties) { - this.id = id; - this.name = name; - this.code = code; - this.dependencies = dependencies; - this.secrets = secrets; - this.actionsUsingModuleTotal = actionsUsingModuleTotal; - this.allChangesPublished = allChangesPublished; - this.latestVersionNumber = latestVersionNumber; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.latestVersion = latestVersion; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the module. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the module. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The source code from the module's draft version. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The npm dependencies from the module's draft version. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return The secrets from the module's draft version (names and timestamps only, values never returned). - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - /** - * @return The number of deployed actions using this module. - */ - @JsonProperty("actions_using_module_total") - public Optional getActionsUsingModuleTotal() { - return actionsUsingModuleTotal; - } - - /** - * @return Whether all draft changes have been published as a version. - */ - @JsonProperty("all_changes_published") - public Optional getAllChangesPublished() { - return allChangesPublished; - } - - /** - * @return The version number of the latest published version. Omitted if no versions have been published. - */ - @JsonProperty("latest_version_number") - public Optional getLatestVersionNumber() { - return latestVersionNumber; - } - - /** - * @return Timestamp when the module was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return Timestamp when the module was last updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("latest_version") - public Optional getLatestVersion() { - return latestVersion; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RollbackActionModuleResponseContent - && equalTo((RollbackActionModuleResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(RollbackActionModuleResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && secrets.equals(other.secrets) - && actionsUsingModuleTotal.equals(other.actionsUsingModuleTotal) - && allChangesPublished.equals(other.allChangesPublished) - && latestVersionNumber.equals(other.latestVersionNumber) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && latestVersion.equals(other.latestVersion); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.code, - this.dependencies, - this.secrets, - this.actionsUsingModuleTotal, - this.allChangesPublished, - this.latestVersionNumber, - this.createdAt, - this.updatedAt, - this.latestVersion); - } - - @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 code = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional actionsUsingModuleTotal = Optional.empty(); - - private Optional allChangesPublished = Optional.empty(); - - private Optional latestVersionNumber = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional latestVersion = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(RollbackActionModuleResponseContent other) { - id(other.getId()); - name(other.getName()); - code(other.getCode()); - dependencies(other.getDependencies()); - secrets(other.getSecrets()); - actionsUsingModuleTotal(other.getActionsUsingModuleTotal()); - allChangesPublished(other.getAllChangesPublished()); - latestVersionNumber(other.getLatestVersionNumber()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - latestVersion(other.getLatestVersion()); - return this; - } - - /** - *

The unique ID of the module.

- */ - @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 the module.

- */ - @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 source code from the module's draft version.

- */ - @JsonSetter(value = "code", nulls = Nulls.SKIP) - public Builder code(Optional code) { - this.code = code; - return this; - } - - public Builder code(String code) { - this.code = Optional.ofNullable(code); - return this; - } - - /** - *

The npm dependencies from the module's draft version.

- */ - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public Builder dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - public Builder dependencies(List dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - /** - *

The secrets from the module's draft version (names and timestamps only, values never returned).

- */ - @JsonSetter(value = "secrets", nulls = Nulls.SKIP) - public Builder secrets(Optional> secrets) { - this.secrets = secrets; - return this; - } - - public Builder secrets(List secrets) { - this.secrets = Optional.ofNullable(secrets); - return this; - } - - /** - *

The number of deployed actions using this module.

- */ - @JsonSetter(value = "actions_using_module_total", nulls = Nulls.SKIP) - public Builder actionsUsingModuleTotal(Optional actionsUsingModuleTotal) { - this.actionsUsingModuleTotal = actionsUsingModuleTotal; - return this; - } - - public Builder actionsUsingModuleTotal(Integer actionsUsingModuleTotal) { - this.actionsUsingModuleTotal = Optional.ofNullable(actionsUsingModuleTotal); - return this; - } - - /** - *

Whether all draft changes have been published as a version.

- */ - @JsonSetter(value = "all_changes_published", nulls = Nulls.SKIP) - public Builder allChangesPublished(Optional allChangesPublished) { - this.allChangesPublished = allChangesPublished; - return this; - } - - public Builder allChangesPublished(Boolean allChangesPublished) { - this.allChangesPublished = Optional.ofNullable(allChangesPublished); - return this; - } - - /** - *

The version number of the latest published version. Omitted if no versions have been published.

- */ - @JsonSetter(value = "latest_version_number", nulls = Nulls.SKIP) - public Builder latestVersionNumber(Optional latestVersionNumber) { - this.latestVersionNumber = latestVersionNumber; - return this; - } - - public Builder latestVersionNumber(Integer latestVersionNumber) { - this.latestVersionNumber = Optional.ofNullable(latestVersionNumber); - return this; - } - - /** - *

Timestamp when the module 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; - } - - /** - *

Timestamp when the module 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; - } - - @JsonSetter(value = "latest_version", nulls = Nulls.SKIP) - public Builder latestVersion(Optional latestVersion) { - this.latestVersion = latestVersion; - return this; - } - - public Builder latestVersion(ActionModuleVersionReference latestVersion) { - this.latestVersion = Optional.ofNullable(latestVersion); - return this; - } - - public RollbackActionModuleResponseContent build() { - return new RollbackActionModuleResponseContent( - id, - name, - code, - dependencies, - secrets, - actionsUsingModuleTotal, - allChangesPublished, - latestVersionNumber, - createdAt, - updatedAt, - latestVersion, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java deleted file mode 100644 index 8f14ada6f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java +++ /dev/null @@ -1,1876 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = RotateClientSecretResponseContent.Builder.class) -public final class RotateClientSecretResponseContent { - private final Optional clientId; - - private final Optional tenant; - - private final Optional name; - - private final Optional description; - - private final Optional global; - - private final Optional clientSecret; - - 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> signingKeys; - - private final OptionalNullable encryptionKey; - - 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 addons; - - private final Optional tokenEndpointAuthMethod; - - private final Optional isTokenEndpointIpHeaderTrusted; - - private final Optional> clientMetadata; - - private final Optional mobile; - - private final Optional initiateLoginUri; - - 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 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 resourceServerIdentifier; - - private final Optional> asyncApprovalNotificationChannels; - - private final Map additionalProperties; - - private RotateClientSecretResponseContent( - Optional clientId, - Optional tenant, - Optional name, - Optional description, - Optional global, - Optional clientSecret, - 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> signingKeys, - OptionalNullable encryptionKey, - Optional sso, - Optional ssoDisabled, - Optional crossOriginAuthentication, - Optional crossOriginLoc, - Optional customLoginPageOn, - Optional customLoginPage, - Optional customLoginPagePreview, - Optional formTemplate, - Optional addons, - Optional tokenEndpointAuthMethod, - Optional isTokenEndpointIpHeaderTrusted, - Optional> clientMetadata, - Optional mobile, - Optional initiateLoginUri, - OptionalNullable refreshToken, - OptionalNullable defaultOrganization, - Optional organizationUsage, - Optional organizationRequireBehavior, - Optional> organizationDiscoveryMethods, - OptionalNullable clientAuthenticationMethods, - Optional requirePushedAuthorizationRequests, - Optional requireProofOfPossession, - Optional signedRequestObject, - OptionalNullable complianceLevel, - Optional skipNonVerifiableCallbackUriConfirmationPrompt, - Optional tokenExchange, - OptionalNullable parRequestExpiry, - Optional tokenQuota, - Optional expressConfiguration, - Optional resourceServerIdentifier, - Optional> asyncApprovalNotificationChannels, - Map additionalProperties) { - this.clientId = clientId; - this.tenant = tenant; - this.name = name; - this.description = description; - this.global = global; - this.clientSecret = clientSecret; - 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.signingKeys = signingKeys; - this.encryptionKey = encryptionKey; - 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.addons = addons; - this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; - this.isTokenEndpointIpHeaderTrusted = isTokenEndpointIpHeaderTrusted; - this.clientMetadata = clientMetadata; - this.mobile = mobile; - this.initiateLoginUri = initiateLoginUri; - 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.complianceLevel = complianceLevel; - this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; - this.tokenExchange = tokenExchange; - this.parRequestExpiry = parRequestExpiry; - this.tokenQuota = tokenQuota; - this.expressConfiguration = expressConfiguration; - this.resourceServerIdentifier = resourceServerIdentifier; - this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of this client. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @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; - } - - /** - * @return Client secret (which you must not make public). - */ - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @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 <a href='https://auth0.com/docs/api-auth/tutorials/adoption'>strict OIDC specifications</a> (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 <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>. - */ - @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; - } - - @JsonProperty("signing_keys") - public Optional> getSigningKeys() { - return signingKeys; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("encryption_key") - public OptionalNullable getEncryptionKey() { - if (encryptionKey == null) { - return OptionalNullable.absent(); - } - return encryptionKey; - } - - /** - * @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("addons") - public Optional getAddons() { - return addons; - } - - @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; - } - - @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; - } - - @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; - } - - /** - * @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; - } - - @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("encryption_key") - private OptionalNullable _getEncryptionKey() { - return encryptionKey; - } - - @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 RotateClientSecretResponseContent && equalTo((RotateClientSecretResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(RotateClientSecretResponseContent other) { - return clientId.equals(other.clientId) - && tenant.equals(other.tenant) - && name.equals(other.name) - && description.equals(other.description) - && global.equals(other.global) - && clientSecret.equals(other.clientSecret) - && 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) - && signingKeys.equals(other.signingKeys) - && encryptionKey.equals(other.encryptionKey) - && 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) - && addons.equals(other.addons) - && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) - && isTokenEndpointIpHeaderTrusted.equals(other.isTokenEndpointIpHeaderTrusted) - && clientMetadata.equals(other.clientMetadata) - && mobile.equals(other.mobile) - && initiateLoginUri.equals(other.initiateLoginUri) - && 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) - && complianceLevel.equals(other.complianceLevel) - && skipNonVerifiableCallbackUriConfirmationPrompt.equals( - other.skipNonVerifiableCallbackUriConfirmationPrompt) - && tokenExchange.equals(other.tokenExchange) - && parRequestExpiry.equals(other.parRequestExpiry) - && tokenQuota.equals(other.tokenQuota) - && expressConfiguration.equals(other.expressConfiguration) - && resourceServerIdentifier.equals(other.resourceServerIdentifier) - && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.tenant, - this.name, - this.description, - this.global, - this.clientSecret, - 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.signingKeys, - this.encryptionKey, - this.sso, - this.ssoDisabled, - this.crossOriginAuthentication, - this.crossOriginLoc, - this.customLoginPageOn, - this.customLoginPage, - this.customLoginPagePreview, - this.formTemplate, - this.addons, - this.tokenEndpointAuthMethod, - this.isTokenEndpointIpHeaderTrusted, - this.clientMetadata, - this.mobile, - this.initiateLoginUri, - this.refreshToken, - this.defaultOrganization, - this.organizationUsage, - this.organizationRequireBehavior, - this.organizationDiscoveryMethods, - this.clientAuthenticationMethods, - this.requirePushedAuthorizationRequests, - this.requireProofOfPossession, - this.signedRequestObject, - this.complianceLevel, - this.skipNonVerifiableCallbackUriConfirmationPrompt, - this.tokenExchange, - this.parRequestExpiry, - this.tokenQuota, - this.expressConfiguration, - this.resourceServerIdentifier, - this.asyncApprovalNotificationChannels); - } - - @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 tenant = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional description = Optional.empty(); - - private Optional global = Optional.empty(); - - private Optional clientSecret = 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> signingKeys = Optional.empty(); - - private OptionalNullable encryptionKey = OptionalNullable.absent(); - - 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 addons = 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 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 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 resourceServerIdentifier = Optional.empty(); - - private Optional> asyncApprovalNotificationChannels = - Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(RotateClientSecretResponseContent other) { - clientId(other.getClientId()); - tenant(other.getTenant()); - name(other.getName()); - description(other.getDescription()); - global(other.getGlobal()); - clientSecret(other.getClientSecret()); - 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()); - signingKeys(other.getSigningKeys()); - encryptionKey(other.getEncryptionKey()); - sso(other.getSso()); - ssoDisabled(other.getSsoDisabled()); - crossOriginAuthentication(other.getCrossOriginAuthentication()); - crossOriginLoc(other.getCrossOriginLoc()); - customLoginPageOn(other.getCustomLoginPageOn()); - customLoginPage(other.getCustomLoginPage()); - customLoginPagePreview(other.getCustomLoginPagePreview()); - formTemplate(other.getFormTemplate()); - addons(other.getAddons()); - tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); - isTokenEndpointIpHeaderTrusted(other.getIsTokenEndpointIpHeaderTrusted()); - clientMetadata(other.getClientMetadata()); - mobile(other.getMobile()); - initiateLoginUri(other.getInitiateLoginUri()); - 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()); - complianceLevel(other.getComplianceLevel()); - skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); - tokenExchange(other.getTokenExchange()); - parRequestExpiry(other.getParRequestExpiry()); - tokenQuota(other.getTokenQuota()); - expressConfiguration(other.getExpressConfiguration()); - resourceServerIdentifier(other.getResourceServerIdentifier()); - asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); - 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; - } - - /** - *

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; - } - - /** - *

Client secret (which you must not make public).

- */ - @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 = "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 <a href='https://auth0.com/docs/api-auth/tutorials/adoption'>strict OIDC specifications</a> (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 <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>.

- */ - @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; - } - - @JsonSetter(value = "signing_keys", nulls = Nulls.SKIP) - public Builder signingKeys(Optional> signingKeys) { - this.signingKeys = signingKeys; - return this; - } - - public Builder signingKeys(List signingKeys) { - this.signingKeys = Optional.ofNullable(signingKeys); - return this; - } - - @JsonSetter(value = "encryption_key", nulls = Nulls.SKIP) - public Builder encryptionKey(@Nullable OptionalNullable encryptionKey) { - this.encryptionKey = encryptionKey; - return this; - } - - public Builder encryptionKey(ClientEncryptionKey encryptionKey) { - this.encryptionKey = OptionalNullable.of(encryptionKey); - return this; - } - - public Builder encryptionKey(Optional encryptionKey) { - if (encryptionKey.isPresent()) { - this.encryptionKey = OptionalNullable.of(encryptionKey.get()); - } else { - this.encryptionKey = OptionalNullable.absent(); - } - return this; - } - - public Builder encryptionKey(com.auth0.client.mgmt.core.Nullable encryptionKey) { - if (encryptionKey.isNull()) { - this.encryptionKey = OptionalNullable.ofNull(); - } else if (encryptionKey.isEmpty()) { - this.encryptionKey = OptionalNullable.absent(); - } else { - this.encryptionKey = OptionalNullable.of(encryptionKey.get()); - } - 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 = "addons", nulls = Nulls.SKIP) - public Builder addons(Optional addons) { - this.addons = addons; - return this; - } - - public Builder addons(ClientAddons addons) { - this.addons = Optional.ofNullable(addons); - 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 = "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 = "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; - } - - /** - *

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; - } - - public RotateClientSecretResponseContent build() { - return new RotateClientSecretResponseContent( - clientId, - tenant, - name, - description, - global, - clientSecret, - appType, - logoUri, - isFirstParty, - oidcConformant, - callbacks, - allowedOrigins, - webOrigins, - clientAliases, - allowedClients, - allowedLogoutUrls, - sessionTransfer, - oidcLogout, - grantTypes, - jwtConfiguration, - signingKeys, - encryptionKey, - sso, - ssoDisabled, - crossOriginAuthentication, - crossOriginLoc, - customLoginPageOn, - customLoginPage, - customLoginPagePreview, - formTemplate, - addons, - tokenEndpointAuthMethod, - isTokenEndpointIpHeaderTrusted, - clientMetadata, - mobile, - initiateLoginUri, - refreshToken, - defaultOrganization, - organizationUsage, - organizationRequireBehavior, - organizationDiscoveryMethods, - clientAuthenticationMethods, - requirePushedAuthorizationRequests, - requireProofOfPossession, - signedRequestObject, - complianceLevel, - skipNonVerifiableCallbackUriConfirmationPrompt, - tokenExchange, - parRequestExpiry, - tokenQuota, - expressConfiguration, - resourceServerIdentifier, - asyncApprovalNotificationChannels, - 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 deleted file mode 100644 index 82394286a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RotateConnectionKeysRequestContent.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = RotateConnectionKeysRequestContent.Builder.class) -public final class RotateConnectionKeysRequestContent { - private final Optional signingAlg; - - private final Map additionalProperties; - - private RotateConnectionKeysRequestContent( - Optional signingAlg, Map additionalProperties) { - this.signingAlg = signingAlg; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("signing_alg") - public Optional getSigningAlg() { - return signingAlg; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RotateConnectionKeysRequestContent - && equalTo((RotateConnectionKeysRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(RotateConnectionKeysRequestContent other) { - return signingAlg.equals(other.signingAlg); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.signingAlg); - } - - @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 signingAlg = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(RotateConnectionKeysRequestContent other) { - signingAlg(other.getSigningAlg()); - return this; - } - - @JsonSetter(value = "signing_alg", nulls = Nulls.SKIP) - public Builder signingAlg(Optional signingAlg) { - this.signingAlg = signingAlg; - return this; - } - - public Builder signingAlg(RotateConnectionKeysSigningAlgEnum signingAlg) { - this.signingAlg = Optional.ofNullable(signingAlg); - return this; - } - - public RotateConnectionKeysRequestContent build() { - return new RotateConnectionKeysRequestContent(signingAlg, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/RotateConnectionKeysSigningAlgEnum.java b/src/main/java/com/auth0/client/mgmt/types/RotateConnectionKeysSigningAlgEnum.java deleted file mode 100644 index 912cd24f4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RotateConnectionKeysSigningAlgEnum.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class RotateConnectionKeysSigningAlgEnum { - public static final RotateConnectionKeysSigningAlgEnum RS512 = - new RotateConnectionKeysSigningAlgEnum(Value.RS512, "RS512"); - - public static final RotateConnectionKeysSigningAlgEnum PS256 = - new RotateConnectionKeysSigningAlgEnum(Value.PS256, "PS256"); - - public static final RotateConnectionKeysSigningAlgEnum ES256 = - new RotateConnectionKeysSigningAlgEnum(Value.ES256, "ES256"); - - public static final RotateConnectionKeysSigningAlgEnum RS256 = - new RotateConnectionKeysSigningAlgEnum(Value.RS256, "RS256"); - - private final Value value; - - private final String string; - - RotateConnectionKeysSigningAlgEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof RotateConnectionKeysSigningAlgEnum - && this.string.equals(((RotateConnectionKeysSigningAlgEnum) 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 PS256: - return visitor.visitPs256(); - case ES256: - return visitor.visitEs256(); - case RS256: - return visitor.visitRs256(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static RotateConnectionKeysSigningAlgEnum valueOf(String value) { - switch (value) { - case "RS512": - return RS512; - case "PS256": - return PS256; - case "ES256": - return ES256; - case "RS256": - return RS256; - default: - return new RotateConnectionKeysSigningAlgEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - RS256, - - RS512, - - PS256, - - ES256, - - UNKNOWN - } - - public interface Visitor { - T visitRs256(); - - T visitRs512(); - - T visitPs256(); - - T visitEs256(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/RotateConnectionsKeysResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/RotateConnectionsKeysResponseContent.java deleted file mode 100644 index ffbdd5bad..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RotateConnectionsKeysResponseContent.java +++ /dev/null @@ -1,422 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = RotateConnectionsKeysResponseContent.Builder.class) -public final class RotateConnectionsKeysResponseContent { - private final String kid; - - private final String cert; - - private final Optional pkcs; - - private final Optional next; - - private final String fingerprint; - - private final String thumbprint; - - private final Optional algorithm; - - private final Optional keyUse; - - private final Optional subjectDn; - - private final Map additionalProperties; - - private RotateConnectionsKeysResponseContent( - String kid, - String cert, - Optional pkcs, - Optional next, - String fingerprint, - String thumbprint, - Optional algorithm, - Optional keyUse, - Optional subjectDn, - Map additionalProperties) { - this.kid = kid; - this.cert = cert; - this.pkcs = pkcs; - this.next = next; - this.fingerprint = fingerprint; - this.thumbprint = thumbprint; - this.algorithm = algorithm; - this.keyUse = keyUse; - this.subjectDn = subjectDn; - this.additionalProperties = additionalProperties; - } - - /** - * @return The key id of the signing key - */ - @JsonProperty("kid") - public String getKid() { - return kid; - } - - /** - * @return The public certificate of the signing key - */ - @JsonProperty("cert") - public String getCert() { - return cert; - } - - /** - * @return The public certificate of the signing key in pkcs7 format - */ - @JsonProperty("pkcs") - public Optional getPkcs() { - return pkcs; - } - - /** - * @return True if the key is the the next key - */ - @JsonProperty("next") - public Optional getNext() { - return next; - } - - /** - * @return The cert fingerprint - */ - @JsonProperty("fingerprint") - public String getFingerprint() { - return fingerprint; - } - - /** - * @return The cert thumbprint - */ - @JsonProperty("thumbprint") - public String getThumbprint() { - return thumbprint; - } - - /** - * @return Signing key algorithm - */ - @JsonProperty("algorithm") - public Optional getAlgorithm() { - return algorithm; - } - - @JsonProperty("key_use") - public Optional getKeyUse() { - return keyUse; - } - - @JsonProperty("subject_dn") - public Optional getSubjectDn() { - return subjectDn; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RotateConnectionsKeysResponseContent - && equalTo((RotateConnectionsKeysResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(RotateConnectionsKeysResponseContent other) { - return kid.equals(other.kid) - && cert.equals(other.cert) - && pkcs.equals(other.pkcs) - && next.equals(other.next) - && fingerprint.equals(other.fingerprint) - && thumbprint.equals(other.thumbprint) - && algorithm.equals(other.algorithm) - && keyUse.equals(other.keyUse) - && subjectDn.equals(other.subjectDn); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.kid, - this.cert, - this.pkcs, - this.next, - this.fingerprint, - this.thumbprint, - this.algorithm, - this.keyUse, - this.subjectDn); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static KidStage builder() { - return new Builder(); - } - - public interface KidStage { - /** - *

The key id of the signing key

- */ - CertStage kid(@NotNull String kid); - - Builder from(RotateConnectionsKeysResponseContent other); - } - - public interface CertStage { - /** - *

The public certificate of the signing key

- */ - FingerprintStage cert(@NotNull String cert); - } - - public interface FingerprintStage { - /** - *

The cert fingerprint

- */ - ThumbprintStage fingerprint(@NotNull String fingerprint); - } - - public interface ThumbprintStage { - /** - *

The cert thumbprint

- */ - _FinalStage thumbprint(@NotNull String thumbprint); - } - - public interface _FinalStage { - RotateConnectionsKeysResponseContent build(); - - /** - *

The public certificate of the signing key in pkcs7 format

- */ - _FinalStage pkcs(Optional pkcs); - - _FinalStage pkcs(String pkcs); - - /** - *

True if the key is the the next key

- */ - _FinalStage next(Optional next); - - _FinalStage next(Boolean next); - - /** - *

Signing key algorithm

- */ - _FinalStage algorithm(Optional algorithm); - - _FinalStage algorithm(String algorithm); - - _FinalStage keyUse(Optional keyUse); - - _FinalStage keyUse(ConnectionKeyUseEnum keyUse); - - _FinalStage subjectDn(Optional subjectDn); - - _FinalStage subjectDn(String subjectDn); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements KidStage, CertStage, FingerprintStage, ThumbprintStage, _FinalStage { - private String kid; - - private String cert; - - private String fingerprint; - - private String thumbprint; - - private Optional subjectDn = Optional.empty(); - - private Optional keyUse = Optional.empty(); - - private Optional algorithm = Optional.empty(); - - private Optional next = Optional.empty(); - - private Optional pkcs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(RotateConnectionsKeysResponseContent other) { - kid(other.getKid()); - cert(other.getCert()); - pkcs(other.getPkcs()); - next(other.getNext()); - fingerprint(other.getFingerprint()); - thumbprint(other.getThumbprint()); - algorithm(other.getAlgorithm()); - keyUse(other.getKeyUse()); - subjectDn(other.getSubjectDn()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("kid") - public CertStage kid(@NotNull String kid) { - this.kid = Objects.requireNonNull(kid, "kid must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("cert") - public FingerprintStage cert(@NotNull String cert) { - this.cert = Objects.requireNonNull(cert, "cert must not be null"); - return this; - } - - /** - *

The cert fingerprint

- *

The cert fingerprint

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("fingerprint") - public ThumbprintStage fingerprint(@NotNull String fingerprint) { - this.fingerprint = Objects.requireNonNull(fingerprint, "fingerprint must not be null"); - return this; - } - - /** - *

The cert thumbprint

- *

The cert thumbprint

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("thumbprint") - public _FinalStage thumbprint(@NotNull String thumbprint) { - this.thumbprint = Objects.requireNonNull(thumbprint, "thumbprint must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage subjectDn(String subjectDn) { - this.subjectDn = Optional.ofNullable(subjectDn); - return this; - } - - @java.lang.Override - @JsonSetter(value = "subject_dn", nulls = Nulls.SKIP) - public _FinalStage subjectDn(Optional subjectDn) { - this.subjectDn = subjectDn; - return this; - } - - @java.lang.Override - public _FinalStage keyUse(ConnectionKeyUseEnum keyUse) { - this.keyUse = Optional.ofNullable(keyUse); - return this; - } - - @java.lang.Override - @JsonSetter(value = "key_use", nulls = Nulls.SKIP) - public _FinalStage keyUse(Optional keyUse) { - this.keyUse = keyUse; - return this; - } - - /** - *

Signing key algorithm

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage algorithm(String algorithm) { - this.algorithm = Optional.ofNullable(algorithm); - return this; - } - - /** - *

Signing key algorithm

- */ - @java.lang.Override - @JsonSetter(value = "algorithm", nulls = Nulls.SKIP) - public _FinalStage algorithm(Optional algorithm) { - this.algorithm = algorithm; - return this; - } - - /** - *

True if the key is the the next key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage next(Boolean next) { - this.next = Optional.ofNullable(next); - return this; - } - - /** - *

True if the key is the the next key

- */ - @java.lang.Override - @JsonSetter(value = "next", nulls = Nulls.SKIP) - public _FinalStage next(Optional next) { - this.next = next; - return this; - } - - /** - *

The public certificate of the signing key in pkcs7 format

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage pkcs(String pkcs) { - this.pkcs = Optional.ofNullable(pkcs); - return this; - } - - /** - *

The public certificate of the signing key in pkcs7 format

- */ - @java.lang.Override - @JsonSetter(value = "pkcs", nulls = Nulls.SKIP) - public _FinalStage pkcs(Optional pkcs) { - this.pkcs = pkcs; - return this; - } - - @java.lang.Override - public RotateConnectionsKeysResponseContent build() { - return new RotateConnectionsKeysResponseContent( - kid, cert, pkcs, next, fingerprint, thumbprint, algorithm, keyUse, subjectDn, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/RotateSigningKeysResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/RotateSigningKeysResponseContent.java deleted file mode 100644 index 1ab5d2e5f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RotateSigningKeysResponseContent.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = RotateSigningKeysResponseContent.Builder.class) -public final class RotateSigningKeysResponseContent { - private final String cert; - - private final String kid; - - private final Map additionalProperties; - - private RotateSigningKeysResponseContent(String cert, String kid, Map additionalProperties) { - this.cert = cert; - this.kid = kid; - this.additionalProperties = additionalProperties; - } - - /** - * @return Next key certificate - */ - @JsonProperty("cert") - public String getCert() { - return cert; - } - - /** - * @return Next key id - */ - @JsonProperty("kid") - public String getKid() { - return kid; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RotateSigningKeysResponseContent && equalTo((RotateSigningKeysResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(RotateSigningKeysResponseContent other) { - return cert.equals(other.cert) && kid.equals(other.kid); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.cert, this.kid); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static CertStage builder() { - return new Builder(); - } - - public interface CertStage { - /** - *

Next key certificate

- */ - KidStage cert(@NotNull String cert); - - Builder from(RotateSigningKeysResponseContent other); - } - - public interface KidStage { - /** - *

Next key id

- */ - _FinalStage kid(@NotNull String kid); - } - - public interface _FinalStage { - RotateSigningKeysResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements CertStage, KidStage, _FinalStage { - private String cert; - - private String kid; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(RotateSigningKeysResponseContent other) { - cert(other.getCert()); - kid(other.getKid()); - return this; - } - - /** - *

Next key certificate

- *

Next key certificate

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("cert") - public KidStage cert(@NotNull String cert) { - this.cert = Objects.requireNonNull(cert, "cert must not be null"); - return this; - } - - /** - *

Next key id

- *

Next key id

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("kid") - public _FinalStage kid(@NotNull String kid) { - this.kid = Objects.requireNonNull(kid, "kid must not be null"); - return this; - } - - @java.lang.Override - public RotateSigningKeysResponseContent build() { - return new RotateSigningKeysResponseContent(cert, kid, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/Rule.java b/src/main/java/com/auth0/client/mgmt/types/Rule.java deleted file mode 100644 index f2dabb288..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/Rule.java +++ /dev/null @@ -1,253 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = Rule.Builder.class) -public final class Rule { - private final Optional name; - - private final Optional id; - - private final Optional enabled; - - private final Optional script; - - private final Optional order; - - private final Optional stage; - - private final Map additionalProperties; - - private Rule( - Optional name, - Optional id, - Optional enabled, - Optional script, - Optional order, - Optional stage, - Map additionalProperties) { - this.name = name; - this.id = id; - this.enabled = enabled; - this.script = script; - this.order = order; - this.stage = stage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of this rule. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return ID of this rule. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Whether the rule is enabled (true), or disabled (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Code to be executed when this rule runs. - */ - @JsonProperty("script") - public Optional getScript() { - return script; - } - - /** - * @return Order that this rule should execute in relative to other rules. Lower-valued rules execute first. - */ - @JsonProperty("order") - public Optional getOrder() { - return order; - } - - /** - * @return Execution stage of this rule. Can be login_success, login_failure, or pre_authorize. - */ - @JsonProperty("stage") - public Optional getStage() { - return stage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof Rule && equalTo((Rule) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(Rule other) { - return name.equals(other.name) - && id.equals(other.id) - && enabled.equals(other.enabled) - && script.equals(other.script) - && order.equals(other.order) - && stage.equals(other.stage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.id, this.enabled, this.script, this.order, this.stage); - } - - @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 id = Optional.empty(); - - private Optional enabled = Optional.empty(); - - private Optional script = Optional.empty(); - - private Optional order = Optional.empty(); - - private Optional stage = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(Rule other) { - name(other.getName()); - id(other.getId()); - enabled(other.getEnabled()); - script(other.getScript()); - order(other.getOrder()); - stage(other.getStage()); - return this; - } - - /** - *

Name of this rule.

- */ - @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; - } - - /** - *

ID of this rule.

- */ - @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; - } - - /** - *

Whether the rule is enabled (true), or disabled (false).

- */ - @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; - } - - /** - *

Code to be executed when this rule runs.

- */ - @JsonSetter(value = "script", nulls = Nulls.SKIP) - public Builder script(Optional script) { - this.script = script; - return this; - } - - public Builder script(String script) { - this.script = Optional.ofNullable(script); - return this; - } - - /** - *

Order that this rule should execute in relative to other rules. Lower-valued rules execute first.

- */ - @JsonSetter(value = "order", nulls = Nulls.SKIP) - public Builder order(Optional order) { - this.order = order; - return this; - } - - public Builder order(Double order) { - this.order = Optional.ofNullable(order); - return this; - } - - /** - *

Execution stage of this rule. Can be login_success, login_failure, or pre_authorize.

- */ - @JsonSetter(value = "stage", nulls = Nulls.SKIP) - public Builder stage(Optional stage) { - this.stage = stage; - return this; - } - - public Builder stage(String stage) { - this.stage = Optional.ofNullable(stage); - return this; - } - - public Rule build() { - return new Rule(name, id, enabled, script, order, stage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/RulesConfig.java b/src/main/java/com/auth0/client/mgmt/types/RulesConfig.java deleted file mode 100644 index 356148acf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/RulesConfig.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = RulesConfig.Builder.class) -public final class RulesConfig { - private final Optional key; - - private final Map additionalProperties; - - private RulesConfig(Optional key, Map additionalProperties) { - this.key = key; - this.additionalProperties = additionalProperties; - } - - /** - * @return Key for a rules config variable. - */ - @JsonProperty("key") - public Optional getKey() { - return key; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof RulesConfig && equalTo((RulesConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(RulesConfig other) { - return key.equals(other.key); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.key); - } - - @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 key = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(RulesConfig other) { - key(other.getKey()); - return this; - } - - /** - *

Key for a rules config variable.

- */ - @JsonSetter(value = "key", nulls = Nulls.SKIP) - public Builder key(Optional key) { - this.key = key; - return this; - } - - public Builder key(String key) { - this.key = Optional.ofNullable(key); - return this; - } - - public RulesConfig build() { - return new RulesConfig(key, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ScimMappingItem.java b/src/main/java/com/auth0/client/mgmt/types/ScimMappingItem.java deleted file mode 100644 index 982709a3e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ScimMappingItem.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ScimMappingItem.Builder.class) -public final class ScimMappingItem { - private final Optional auth0; - - private final Optional scim; - - private final Map additionalProperties; - - private ScimMappingItem(Optional auth0, Optional scim, Map additionalProperties) { - this.auth0 = auth0; - this.scim = scim; - this.additionalProperties = additionalProperties; - } - - /** - * @return The field location in the auth0 schema - */ - @JsonProperty("auth0") - public Optional getAuth0() { - return auth0; - } - - /** - * @return The field location in the SCIM schema - */ - @JsonProperty("scim") - public Optional getScim() { - return scim; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ScimMappingItem && equalTo((ScimMappingItem) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ScimMappingItem other) { - return auth0.equals(other.auth0) && scim.equals(other.scim); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.auth0, this.scim); - } - - @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 auth0 = Optional.empty(); - - private Optional scim = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ScimMappingItem other) { - auth0(other.getAuth0()); - scim(other.getScim()); - return this; - } - - /** - *

The field location in the auth0 schema

- */ - @JsonSetter(value = "auth0", nulls = Nulls.SKIP) - public Builder auth0(Optional auth0) { - this.auth0 = auth0; - return this; - } - - public Builder auth0(String auth0) { - this.auth0 = Optional.ofNullable(auth0); - return this; - } - - /** - *

The field location in the SCIM schema

- */ - @JsonSetter(value = "scim", nulls = Nulls.SKIP) - public Builder scim(Optional scim) { - this.scim = scim; - return this; - } - - public Builder scim(String scim) { - this.scim = Optional.ofNullable(scim); - return this; - } - - public ScimMappingItem build() { - return new ScimMappingItem(auth0, scim, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ScimTokenItem.java b/src/main/java/com/auth0/client/mgmt/types/ScimTokenItem.java deleted file mode 100644 index 8bfce20a3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ScimTokenItem.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ScimTokenItem.Builder.class) -public final class ScimTokenItem { - private final Optional tokenId; - - private final Optional> scopes; - - private final Optional createdAt; - - private final Optional validUntil; - - private final Optional lastUsedAt; - - private final Map additionalProperties; - - private ScimTokenItem( - Optional tokenId, - Optional> scopes, - Optional createdAt, - Optional validUntil, - Optional lastUsedAt, - Map additionalProperties) { - this.tokenId = tokenId; - this.scopes = scopes; - this.createdAt = createdAt; - this.validUntil = validUntil; - this.lastUsedAt = lastUsedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The token's identifier - */ - @JsonProperty("token_id") - public Optional getTokenId() { - return tokenId; - } - - /** - * @return The scopes of the scim token - */ - @JsonProperty("scopes") - public Optional> getScopes() { - return scopes; - } - - /** - * @return The token's created at timestamp - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The token's valid until timestamp - */ - @JsonProperty("valid_until") - public Optional getValidUntil() { - return validUntil; - } - - /** - * @return The token's last used at timestamp - */ - @JsonProperty("last_used_at") - public Optional getLastUsedAt() { - return lastUsedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ScimTokenItem && equalTo((ScimTokenItem) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ScimTokenItem other) { - return tokenId.equals(other.tokenId) - && scopes.equals(other.scopes) - && createdAt.equals(other.createdAt) - && validUntil.equals(other.validUntil) - && lastUsedAt.equals(other.lastUsedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.tokenId, this.scopes, this.createdAt, this.validUntil, 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 tokenId = Optional.empty(); - - private Optional> scopes = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional validUntil = Optional.empty(); - - private Optional lastUsedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ScimTokenItem other) { - tokenId(other.getTokenId()); - scopes(other.getScopes()); - createdAt(other.getCreatedAt()); - validUntil(other.getValidUntil()); - lastUsedAt(other.getLastUsedAt()); - return this; - } - - /** - *

The token's identifier

- */ - @JsonSetter(value = "token_id", nulls = Nulls.SKIP) - public Builder tokenId(Optional tokenId) { - this.tokenId = tokenId; - return this; - } - - public Builder tokenId(String tokenId) { - this.tokenId = Optional.ofNullable(tokenId); - return this; - } - - /** - *

The scopes of the scim token

- */ - @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; - } - - /** - *

The token's created at timestamp

- */ - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(String createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - /** - *

The token's valid until timestamp

- */ - @JsonSetter(value = "valid_until", nulls = Nulls.SKIP) - public Builder validUntil(Optional validUntil) { - this.validUntil = validUntil; - return this; - } - - public Builder validUntil(String validUntil) { - this.validUntil = Optional.ofNullable(validUntil); - return this; - } - - /** - *

The token's last used at timestamp

- */ - @JsonSetter(value = "last_used_at", nulls = Nulls.SKIP) - public Builder lastUsedAt(Optional lastUsedAt) { - this.lastUsedAt = lastUsedAt; - return this; - } - - public Builder lastUsedAt(String lastUsedAt) { - this.lastUsedAt = Optional.ofNullable(lastUsedAt); - return this; - } - - public ScimTokenItem build() { - return new ScimTokenItem(tokenId, scopes, createdAt, validUntil, lastUsedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/ScreenGroupNameEnum.java b/src/main/java/com/auth0/client/mgmt/types/ScreenGroupNameEnum.java deleted file mode 100644 index 35e2d631c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/ScreenGroupNameEnum.java +++ /dev/null @@ -1,1033 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class ScreenGroupNameEnum { - public static final ScreenGroupNameEnum MFA_PHONE_CHALLENGE = - new ScreenGroupNameEnum(Value.MFA_PHONE_CHALLENGE, "mfa-phone-challenge"); - - public static final ScreenGroupNameEnum MFA_VOICE_ENROLLMENT = - new ScreenGroupNameEnum(Value.MFA_VOICE_ENROLLMENT, "mfa-voice-enrollment"); - - public static final ScreenGroupNameEnum ASYNC_APPROVAL_WRONG_USER = - new ScreenGroupNameEnum(Value.ASYNC_APPROVAL_WRONG_USER, "async-approval-wrong-user"); - - public static final ScreenGroupNameEnum SIGNUP = new ScreenGroupNameEnum(Value.SIGNUP, "signup"); - - public static final ScreenGroupNameEnum MFA_PUSH_WELCOME = - new ScreenGroupNameEnum(Value.MFA_PUSH_WELCOME, "mfa-push-welcome"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_EMAIL = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_EMAIL, "reset-password-email"); - - public static final ScreenGroupNameEnum LOGOUT_ABORTED = - new ScreenGroupNameEnum(Value.LOGOUT_ABORTED, "logout-aborted"); - - public static final ScreenGroupNameEnum REDEEM_TICKET = - new ScreenGroupNameEnum(Value.REDEEM_TICKET, "redeem-ticket"); - - public static final ScreenGroupNameEnum MFA_RECOVERY_CODE_ENROLLMENT = - new ScreenGroupNameEnum(Value.MFA_RECOVERY_CODE_ENROLLMENT, "mfa-recovery-code-enrollment"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_SMS_CHALLENGE = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_MFA_SMS_CHALLENGE, "reset-password-mfa-sms-challenge"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_WEBAUTHN_ROAMING_CHALLENGE = new ScreenGroupNameEnum( - Value.RESET_PASSWORD_MFA_WEBAUTHN_ROAMING_CHALLENGE, "reset-password-mfa-webauthn-roaming-challenge"); - - public static final ScreenGroupNameEnum PHONE_IDENTIFIER_ENROLLMENT = - new ScreenGroupNameEnum(Value.PHONE_IDENTIFIER_ENROLLMENT, "phone-identifier-enrollment"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_ERROR = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_ERROR, "reset-password-error"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_PUSH_CHALLENGE_PUSH = new ScreenGroupNameEnum( - Value.RESET_PASSWORD_MFA_PUSH_CHALLENGE_PUSH, "reset-password-mfa-push-challenge-push"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_VOICE_CHALLENGE = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_MFA_VOICE_CHALLENGE, "reset-password-mfa-voice-challenge"); - - public static final ScreenGroupNameEnum MFA_PUSH_SUCCESS = - new ScreenGroupNameEnum(Value.MFA_PUSH_SUCCESS, "mfa-push-success"); - - public static final ScreenGroupNameEnum ASYNC_APPROVAL_ACCEPTED = - new ScreenGroupNameEnum(Value.ASYNC_APPROVAL_ACCEPTED, "async-approval-accepted"); - - public static final ScreenGroupNameEnum DEVICE_CODE_ACTIVATION_ALLOWED = - new ScreenGroupNameEnum(Value.DEVICE_CODE_ACTIVATION_ALLOWED, "device-code-activation-allowed"); - - public static final ScreenGroupNameEnum INTERSTITIAL_CAPTCHA = - new ScreenGroupNameEnum(Value.INTERSTITIAL_CAPTCHA, "interstitial-captcha"); - - public static final ScreenGroupNameEnum LOGIN_PASSWORD = - new ScreenGroupNameEnum(Value.LOGIN_PASSWORD, "login-password"); - - public static final ScreenGroupNameEnum BRUTE_FORCE_PROTECTION_UNBLOCK_SUCCESS = new ScreenGroupNameEnum( - Value.BRUTE_FORCE_PROTECTION_UNBLOCK_SUCCESS, "brute-force-protection-unblock-success"); - - public static final ScreenGroupNameEnum EMAIL_OTP_CHALLENGE = - new ScreenGroupNameEnum(Value.EMAIL_OTP_CHALLENGE, "email-otp-challenge"); - - public static final ScreenGroupNameEnum LOGIN_PASSWORDLESS_EMAIL_LINK = - new ScreenGroupNameEnum(Value.LOGIN_PASSWORDLESS_EMAIL_LINK, "login-passwordless-email-link"); - - public static final ScreenGroupNameEnum CONSENT = new ScreenGroupNameEnum(Value.CONSENT, "consent"); - - public static final ScreenGroupNameEnum MFA_WEBAUTHN_ROAMING_ENROLLMENT = - new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_ROAMING_ENROLLMENT, "mfa-webauthn-roaming-enrollment"); - - public static final ScreenGroupNameEnum BRUTE_FORCE_PROTECTION_UNBLOCK = - new ScreenGroupNameEnum(Value.BRUTE_FORCE_PROTECTION_UNBLOCK, "brute-force-protection-unblock"); - - public static final ScreenGroupNameEnum SIGNUP_ID = new ScreenGroupNameEnum(Value.SIGNUP_ID, "signup-id"); - - public static final ScreenGroupNameEnum MFA_OTP_CHALLENGE = - new ScreenGroupNameEnum(Value.MFA_OTP_CHALLENGE, "mfa-otp-challenge"); - - public static final ScreenGroupNameEnum MFA_WEBAUTHN_PLATFORM_CHALLENGE = - new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_PLATFORM_CHALLENGE, "mfa-webauthn-platform-challenge"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_RECOVERY_CODE_CHALLENGE = new ScreenGroupNameEnum( - Value.RESET_PASSWORD_MFA_RECOVERY_CODE_CHALLENGE, "reset-password-mfa-recovery-code-challenge"); - - public static final ScreenGroupNameEnum ORGANIZATION_SELECTION = - new ScreenGroupNameEnum(Value.ORGANIZATION_SELECTION, "organization-selection"); - - public static final ScreenGroupNameEnum ASYNC_APPROVAL_ERROR = - new ScreenGroupNameEnum(Value.ASYNC_APPROVAL_ERROR, "async-approval-error"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_PHONE_CHALLENGE = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_MFA_PHONE_CHALLENGE, "reset-password-mfa-phone-challenge"); - - public static final ScreenGroupNameEnum MFA_RECOVERY_CODE_CHALLENGE = - new ScreenGroupNameEnum(Value.MFA_RECOVERY_CODE_CHALLENGE, "mfa-recovery-code-challenge"); - - public static final ScreenGroupNameEnum MFA_OTP_ENROLLMENT_CODE = - new ScreenGroupNameEnum(Value.MFA_OTP_ENROLLMENT_CODE, "mfa-otp-enrollment-code"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_WEBAUTHN_PLATFORM_CHALLENGE = new ScreenGroupNameEnum( - Value.RESET_PASSWORD_MFA_WEBAUTHN_PLATFORM_CHALLENGE, "reset-password-mfa-webauthn-platform-challenge"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_SUCCESS = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_SUCCESS, "reset-password-success"); - - public static final ScreenGroupNameEnum ASYNC_APPROVAL_DENIED = - new ScreenGroupNameEnum(Value.ASYNC_APPROVAL_DENIED, "async-approval-denied"); - - public static final ScreenGroupNameEnum LOGIN_PASSWORDLESS_SMS_OTP = - new ScreenGroupNameEnum(Value.LOGIN_PASSWORDLESS_SMS_OTP, "login-passwordless-sms-otp"); - - public static final ScreenGroupNameEnum DEVICE_CODE_CONFIRMATION = - new ScreenGroupNameEnum(Value.DEVICE_CODE_CONFIRMATION, "device-code-confirmation"); - - public static final ScreenGroupNameEnum MFA_WEBAUTHN_CHANGE_KEY_NICKNAME = - new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_CHANGE_KEY_NICKNAME, "mfa-webauthn-change-key-nickname"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_EMAIL_CHALLENGE = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_MFA_EMAIL_CHALLENGE, "reset-password-mfa-email-challenge"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_REQUEST = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_REQUEST, "reset-password-request"); - - public static final ScreenGroupNameEnum MFA_EMAIL_LIST = - new ScreenGroupNameEnum(Value.MFA_EMAIL_LIST, "mfa-email-list"); - - public static final ScreenGroupNameEnum EMAIL_IDENTIFIER_CHALLENGE = - new ScreenGroupNameEnum(Value.EMAIL_IDENTIFIER_CHALLENGE, "email-identifier-challenge"); - - public static final ScreenGroupNameEnum MFA_WEBAUTHN_ERROR = - new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_ERROR, "mfa-webauthn-error"); - - public static final ScreenGroupNameEnum MFA_PUSH_ENROLLMENT_QR = - new ScreenGroupNameEnum(Value.MFA_PUSH_ENROLLMENT_QR, "mfa-push-enrollment-qr"); - - public static final ScreenGroupNameEnum MFA_DETECT_BROWSER_CAPABILITIES = - new ScreenGroupNameEnum(Value.MFA_DETECT_BROWSER_CAPABILITIES, "mfa-detect-browser-capabilities"); - - public static final ScreenGroupNameEnum LOGOUT_COMPLETE = - new ScreenGroupNameEnum(Value.LOGOUT_COMPLETE, "logout-complete"); - - public static final ScreenGroupNameEnum CUSTOMIZED_CONSENT = - new ScreenGroupNameEnum(Value.CUSTOMIZED_CONSENT, "customized-consent"); - - public static final ScreenGroupNameEnum MFA_OTP_ENROLLMENT_QR = - new ScreenGroupNameEnum(Value.MFA_OTP_ENROLLMENT_QR, "mfa-otp-enrollment-qr"); - - public static final ScreenGroupNameEnum MFA_SMS_LIST = new ScreenGroupNameEnum(Value.MFA_SMS_LIST, "mfa-sms-list"); - - public static final ScreenGroupNameEnum DEVICE_CODE_ACTIVATION_DENIED = - new ScreenGroupNameEnum(Value.DEVICE_CODE_ACTIVATION_DENIED, "device-code-activation-denied"); - - public static final ScreenGroupNameEnum MFA_SMS_ENROLLMENT = - new ScreenGroupNameEnum(Value.MFA_SMS_ENROLLMENT, "mfa-sms-enrollment"); - - public static final ScreenGroupNameEnum CUSTOM_FORM = new ScreenGroupNameEnum(Value.CUSTOM_FORM, "custom-form"); - - public static final ScreenGroupNameEnum LOGOUT = new ScreenGroupNameEnum(Value.LOGOUT, "logout"); - - public static final ScreenGroupNameEnum MFA_LOGIN_OPTIONS = - new ScreenGroupNameEnum(Value.MFA_LOGIN_OPTIONS, "mfa-login-options"); - - public static final ScreenGroupNameEnum MFA_VOICE_CHALLENGE = - new ScreenGroupNameEnum(Value.MFA_VOICE_CHALLENGE, "mfa-voice-challenge"); - - public static final ScreenGroupNameEnum PASSKEY_ENROLLMENT_LOCAL = - new ScreenGroupNameEnum(Value.PASSKEY_ENROLLMENT_LOCAL, "passkey-enrollment-local"); - - public static final ScreenGroupNameEnum LOGIN_EMAIL_VERIFICATION = - new ScreenGroupNameEnum(Value.LOGIN_EMAIL_VERIFICATION, "login-email-verification"); - - public static final ScreenGroupNameEnum LOGIN_ID = new ScreenGroupNameEnum(Value.LOGIN_ID, "login-id"); - - public static final ScreenGroupNameEnum MFA_WEBAUTHN_ROAMING_CHALLENGE = - new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_ROAMING_CHALLENGE, "mfa-webauthn-roaming-challenge"); - - public static final ScreenGroupNameEnum STATUS = new ScreenGroupNameEnum(Value.STATUS, "status"); - - public static final ScreenGroupNameEnum MFA_PUSH_ENROLLMENT_CODE = - new ScreenGroupNameEnum(Value.MFA_PUSH_ENROLLMENT_CODE, "mfa-push-enrollment-code"); - - public static final ScreenGroupNameEnum BRUTE_FORCE_PROTECTION_UNBLOCK_FAILURE = new ScreenGroupNameEnum( - Value.BRUTE_FORCE_PROTECTION_UNBLOCK_FAILURE, "brute-force-protection-unblock-failure"); - - public static final ScreenGroupNameEnum MFA_ENROLL_RESULT = - new ScreenGroupNameEnum(Value.MFA_ENROLL_RESULT, "mfa-enroll-result"); - - public static final ScreenGroupNameEnum MFA_PUSH_LIST = - new ScreenGroupNameEnum(Value.MFA_PUSH_LIST, "mfa-push-list"); - - public static final ScreenGroupNameEnum PRE_LOGIN_ORGANIZATION_PICKER = - new ScreenGroupNameEnum(Value.PRE_LOGIN_ORGANIZATION_PICKER, "pre-login-organization-picker"); - - public static final ScreenGroupNameEnum MFA_PHONE_ENROLLMENT = - new ScreenGroupNameEnum(Value.MFA_PHONE_ENROLLMENT, "mfa-phone-enrollment"); - - public static final ScreenGroupNameEnum MFA_RECOVERY_CODE_CHALLENGE_NEW_CODE = - new ScreenGroupNameEnum(Value.MFA_RECOVERY_CODE_CHALLENGE_NEW_CODE, "mfa-recovery-code-challenge-new-code"); - - public static final ScreenGroupNameEnum EMAIL_VERIFICATION_RESULT = - new ScreenGroupNameEnum(Value.EMAIL_VERIFICATION_RESULT, "email-verification-result"); - - public static final ScreenGroupNameEnum DEVICE_CODE_ACTIVATION = - new ScreenGroupNameEnum(Value.DEVICE_CODE_ACTIVATION, "device-code-activation"); - - public static final ScreenGroupNameEnum MFA_WEBAUTHN_PLATFORM_ENROLLMENT = - new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_PLATFORM_ENROLLMENT, "mfa-webauthn-platform-enrollment"); - - public static final ScreenGroupNameEnum MFA_SMS_CHALLENGE = - new ScreenGroupNameEnum(Value.MFA_SMS_CHALLENGE, "mfa-sms-challenge"); - - public static final ScreenGroupNameEnum ORGANIZATION_PICKER = - new ScreenGroupNameEnum(Value.ORGANIZATION_PICKER, "organization-picker"); - - public static final ScreenGroupNameEnum MFA_WEBAUTHN_ENROLLMENT_SUCCESS = - new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_ENROLLMENT_SUCCESS, "mfa-webauthn-enrollment-success"); - - public static final ScreenGroupNameEnum RESET_PASSWORD = - new ScreenGroupNameEnum(Value.RESET_PASSWORD, "reset-password"); - - public static final ScreenGroupNameEnum PASSKEY_ENROLLMENT = - new ScreenGroupNameEnum(Value.PASSKEY_ENROLLMENT, "passkey-enrollment"); - - public static final ScreenGroupNameEnum LOGIN = new ScreenGroupNameEnum(Value.LOGIN, "login"); - - public static final ScreenGroupNameEnum LOGIN_PASSWORDLESS_EMAIL_CODE = - new ScreenGroupNameEnum(Value.LOGIN_PASSWORDLESS_EMAIL_CODE, "login-passwordless-email-code"); - - public static final ScreenGroupNameEnum SIGNUP_PASSWORD = - new ScreenGroupNameEnum(Value.SIGNUP_PASSWORD, "signup-password"); - - public static final ScreenGroupNameEnum PHONE_IDENTIFIER_CHALLENGE = - new ScreenGroupNameEnum(Value.PHONE_IDENTIFIER_CHALLENGE, "phone-identifier-challenge"); - - public static final ScreenGroupNameEnum MFA_PUSH_CHALLENGE_PUSH = - new ScreenGroupNameEnum(Value.MFA_PUSH_CHALLENGE_PUSH, "mfa-push-challenge-push"); - - public static final ScreenGroupNameEnum MFA_BEGIN_ENROLL_OPTIONS = - new ScreenGroupNameEnum(Value.MFA_BEGIN_ENROLL_OPTIONS, "mfa-begin-enroll-options"); - - public static final ScreenGroupNameEnum MFA_EMAIL_CHALLENGE = - new ScreenGroupNameEnum(Value.MFA_EMAIL_CHALLENGE, "mfa-email-challenge"); - - public static final ScreenGroupNameEnum ACCEPT_INVITATION = - new ScreenGroupNameEnum(Value.ACCEPT_INVITATION, "accept-invitation"); - - public static final ScreenGroupNameEnum MFA_WEBAUTHN_NOT_AVAILABLE_ERROR = - new ScreenGroupNameEnum(Value.MFA_WEBAUTHN_NOT_AVAILABLE_ERROR, "mfa-webauthn-not-available-error"); - - public static final ScreenGroupNameEnum RESET_PASSWORD_MFA_OTP_CHALLENGE = - new ScreenGroupNameEnum(Value.RESET_PASSWORD_MFA_OTP_CHALLENGE, "reset-password-mfa-otp-challenge"); - - public static final ScreenGroupNameEnum MFA_COUNTRY_CODES = - new ScreenGroupNameEnum(Value.MFA_COUNTRY_CODES, "mfa-country-codes"); - - private final Value value; - - private final String string; - - ScreenGroupNameEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof ScreenGroupNameEnum && this.string.equals(((ScreenGroupNameEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case MFA_PHONE_CHALLENGE: - return visitor.visitMfaPhoneChallenge(); - case MFA_VOICE_ENROLLMENT: - return visitor.visitMfaVoiceEnrollment(); - case ASYNC_APPROVAL_WRONG_USER: - return visitor.visitAsyncApprovalWrongUser(); - case SIGNUP: - return visitor.visitSignup(); - case MFA_PUSH_WELCOME: - return visitor.visitMfaPushWelcome(); - case RESET_PASSWORD_EMAIL: - return visitor.visitResetPasswordEmail(); - case LOGOUT_ABORTED: - return visitor.visitLogoutAborted(); - case REDEEM_TICKET: - return visitor.visitRedeemTicket(); - case MFA_RECOVERY_CODE_ENROLLMENT: - return visitor.visitMfaRecoveryCodeEnrollment(); - case RESET_PASSWORD_MFA_SMS_CHALLENGE: - return visitor.visitResetPasswordMfaSmsChallenge(); - case RESET_PASSWORD_MFA_WEBAUTHN_ROAMING_CHALLENGE: - return visitor.visitResetPasswordMfaWebauthnRoamingChallenge(); - case PHONE_IDENTIFIER_ENROLLMENT: - return visitor.visitPhoneIdentifierEnrollment(); - case RESET_PASSWORD_ERROR: - return visitor.visitResetPasswordError(); - case RESET_PASSWORD_MFA_PUSH_CHALLENGE_PUSH: - return visitor.visitResetPasswordMfaPushChallengePush(); - case RESET_PASSWORD_MFA_VOICE_CHALLENGE: - return visitor.visitResetPasswordMfaVoiceChallenge(); - case MFA_PUSH_SUCCESS: - return visitor.visitMfaPushSuccess(); - case ASYNC_APPROVAL_ACCEPTED: - return visitor.visitAsyncApprovalAccepted(); - case DEVICE_CODE_ACTIVATION_ALLOWED: - return visitor.visitDeviceCodeActivationAllowed(); - case INTERSTITIAL_CAPTCHA: - return visitor.visitInterstitialCaptcha(); - case LOGIN_PASSWORD: - return visitor.visitLoginPassword(); - case BRUTE_FORCE_PROTECTION_UNBLOCK_SUCCESS: - return visitor.visitBruteForceProtectionUnblockSuccess(); - case EMAIL_OTP_CHALLENGE: - return visitor.visitEmailOtpChallenge(); - case LOGIN_PASSWORDLESS_EMAIL_LINK: - return visitor.visitLoginPasswordlessEmailLink(); - case CONSENT: - return visitor.visitConsent(); - case MFA_WEBAUTHN_ROAMING_ENROLLMENT: - return visitor.visitMfaWebauthnRoamingEnrollment(); - case BRUTE_FORCE_PROTECTION_UNBLOCK: - return visitor.visitBruteForceProtectionUnblock(); - case SIGNUP_ID: - return visitor.visitSignupId(); - case MFA_OTP_CHALLENGE: - return visitor.visitMfaOtpChallenge(); - case MFA_WEBAUTHN_PLATFORM_CHALLENGE: - return visitor.visitMfaWebauthnPlatformChallenge(); - case RESET_PASSWORD_MFA_RECOVERY_CODE_CHALLENGE: - return visitor.visitResetPasswordMfaRecoveryCodeChallenge(); - case ORGANIZATION_SELECTION: - return visitor.visitOrganizationSelection(); - case ASYNC_APPROVAL_ERROR: - return visitor.visitAsyncApprovalError(); - case RESET_PASSWORD_MFA_PHONE_CHALLENGE: - return visitor.visitResetPasswordMfaPhoneChallenge(); - case MFA_RECOVERY_CODE_CHALLENGE: - return visitor.visitMfaRecoveryCodeChallenge(); - case MFA_OTP_ENROLLMENT_CODE: - return visitor.visitMfaOtpEnrollmentCode(); - case RESET_PASSWORD_MFA_WEBAUTHN_PLATFORM_CHALLENGE: - return visitor.visitResetPasswordMfaWebauthnPlatformChallenge(); - case RESET_PASSWORD_SUCCESS: - return visitor.visitResetPasswordSuccess(); - case ASYNC_APPROVAL_DENIED: - return visitor.visitAsyncApprovalDenied(); - case LOGIN_PASSWORDLESS_SMS_OTP: - return visitor.visitLoginPasswordlessSmsOtp(); - case DEVICE_CODE_CONFIRMATION: - return visitor.visitDeviceCodeConfirmation(); - case MFA_WEBAUTHN_CHANGE_KEY_NICKNAME: - return visitor.visitMfaWebauthnChangeKeyNickname(); - case RESET_PASSWORD_MFA_EMAIL_CHALLENGE: - return visitor.visitResetPasswordMfaEmailChallenge(); - case RESET_PASSWORD_REQUEST: - return visitor.visitResetPasswordRequest(); - case MFA_EMAIL_LIST: - return visitor.visitMfaEmailList(); - case EMAIL_IDENTIFIER_CHALLENGE: - return visitor.visitEmailIdentifierChallenge(); - case MFA_WEBAUTHN_ERROR: - return visitor.visitMfaWebauthnError(); - case MFA_PUSH_ENROLLMENT_QR: - return visitor.visitMfaPushEnrollmentQr(); - case MFA_DETECT_BROWSER_CAPABILITIES: - return visitor.visitMfaDetectBrowserCapabilities(); - case LOGOUT_COMPLETE: - return visitor.visitLogoutComplete(); - case CUSTOMIZED_CONSENT: - return visitor.visitCustomizedConsent(); - case MFA_OTP_ENROLLMENT_QR: - return visitor.visitMfaOtpEnrollmentQr(); - case MFA_SMS_LIST: - return visitor.visitMfaSmsList(); - case DEVICE_CODE_ACTIVATION_DENIED: - return visitor.visitDeviceCodeActivationDenied(); - case MFA_SMS_ENROLLMENT: - return visitor.visitMfaSmsEnrollment(); - case CUSTOM_FORM: - return visitor.visitCustomForm(); - case LOGOUT: - return visitor.visitLogout(); - case MFA_LOGIN_OPTIONS: - return visitor.visitMfaLoginOptions(); - case MFA_VOICE_CHALLENGE: - return visitor.visitMfaVoiceChallenge(); - case PASSKEY_ENROLLMENT_LOCAL: - return visitor.visitPasskeyEnrollmentLocal(); - case LOGIN_EMAIL_VERIFICATION: - return visitor.visitLoginEmailVerification(); - case LOGIN_ID: - return visitor.visitLoginId(); - case MFA_WEBAUTHN_ROAMING_CHALLENGE: - return visitor.visitMfaWebauthnRoamingChallenge(); - case STATUS: - return visitor.visitStatus(); - case MFA_PUSH_ENROLLMENT_CODE: - return visitor.visitMfaPushEnrollmentCode(); - case BRUTE_FORCE_PROTECTION_UNBLOCK_FAILURE: - return visitor.visitBruteForceProtectionUnblockFailure(); - case MFA_ENROLL_RESULT: - return visitor.visitMfaEnrollResult(); - case MFA_PUSH_LIST: - return visitor.visitMfaPushList(); - case PRE_LOGIN_ORGANIZATION_PICKER: - return visitor.visitPreLoginOrganizationPicker(); - case MFA_PHONE_ENROLLMENT: - return visitor.visitMfaPhoneEnrollment(); - case MFA_RECOVERY_CODE_CHALLENGE_NEW_CODE: - return visitor.visitMfaRecoveryCodeChallengeNewCode(); - case EMAIL_VERIFICATION_RESULT: - return visitor.visitEmailVerificationResult(); - case DEVICE_CODE_ACTIVATION: - return visitor.visitDeviceCodeActivation(); - case MFA_WEBAUTHN_PLATFORM_ENROLLMENT: - return visitor.visitMfaWebauthnPlatformEnrollment(); - case MFA_SMS_CHALLENGE: - return visitor.visitMfaSmsChallenge(); - case ORGANIZATION_PICKER: - return visitor.visitOrganizationPicker(); - case MFA_WEBAUTHN_ENROLLMENT_SUCCESS: - return visitor.visitMfaWebauthnEnrollmentSuccess(); - case RESET_PASSWORD: - return visitor.visitResetPassword(); - case PASSKEY_ENROLLMENT: - return visitor.visitPasskeyEnrollment(); - case LOGIN: - return visitor.visitLogin(); - case LOGIN_PASSWORDLESS_EMAIL_CODE: - return visitor.visitLoginPasswordlessEmailCode(); - case SIGNUP_PASSWORD: - return visitor.visitSignupPassword(); - case PHONE_IDENTIFIER_CHALLENGE: - return visitor.visitPhoneIdentifierChallenge(); - case MFA_PUSH_CHALLENGE_PUSH: - return visitor.visitMfaPushChallengePush(); - case MFA_BEGIN_ENROLL_OPTIONS: - return visitor.visitMfaBeginEnrollOptions(); - case MFA_EMAIL_CHALLENGE: - return visitor.visitMfaEmailChallenge(); - case ACCEPT_INVITATION: - return visitor.visitAcceptInvitation(); - case MFA_WEBAUTHN_NOT_AVAILABLE_ERROR: - return visitor.visitMfaWebauthnNotAvailableError(); - case RESET_PASSWORD_MFA_OTP_CHALLENGE: - return visitor.visitResetPasswordMfaOtpChallenge(); - case MFA_COUNTRY_CODES: - return visitor.visitMfaCountryCodes(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static ScreenGroupNameEnum valueOf(String value) { - switch (value) { - case "mfa-phone-challenge": - return MFA_PHONE_CHALLENGE; - case "mfa-voice-enrollment": - return MFA_VOICE_ENROLLMENT; - case "async-approval-wrong-user": - return ASYNC_APPROVAL_WRONG_USER; - case "signup": - return SIGNUP; - case "mfa-push-welcome": - return MFA_PUSH_WELCOME; - case "reset-password-email": - return RESET_PASSWORD_EMAIL; - case "logout-aborted": - return LOGOUT_ABORTED; - case "redeem-ticket": - return REDEEM_TICKET; - case "mfa-recovery-code-enrollment": - return MFA_RECOVERY_CODE_ENROLLMENT; - case "reset-password-mfa-sms-challenge": - return RESET_PASSWORD_MFA_SMS_CHALLENGE; - case "reset-password-mfa-webauthn-roaming-challenge": - return RESET_PASSWORD_MFA_WEBAUTHN_ROAMING_CHALLENGE; - case "phone-identifier-enrollment": - return PHONE_IDENTIFIER_ENROLLMENT; - case "reset-password-error": - return RESET_PASSWORD_ERROR; - case "reset-password-mfa-push-challenge-push": - return RESET_PASSWORD_MFA_PUSH_CHALLENGE_PUSH; - case "reset-password-mfa-voice-challenge": - return RESET_PASSWORD_MFA_VOICE_CHALLENGE; - case "mfa-push-success": - return MFA_PUSH_SUCCESS; - case "async-approval-accepted": - return ASYNC_APPROVAL_ACCEPTED; - case "device-code-activation-allowed": - return DEVICE_CODE_ACTIVATION_ALLOWED; - case "interstitial-captcha": - return INTERSTITIAL_CAPTCHA; - case "login-password": - return LOGIN_PASSWORD; - case "brute-force-protection-unblock-success": - return BRUTE_FORCE_PROTECTION_UNBLOCK_SUCCESS; - case "email-otp-challenge": - return EMAIL_OTP_CHALLENGE; - case "login-passwordless-email-link": - return LOGIN_PASSWORDLESS_EMAIL_LINK; - case "consent": - return CONSENT; - case "mfa-webauthn-roaming-enrollment": - return MFA_WEBAUTHN_ROAMING_ENROLLMENT; - case "brute-force-protection-unblock": - return BRUTE_FORCE_PROTECTION_UNBLOCK; - case "signup-id": - return SIGNUP_ID; - case "mfa-otp-challenge": - return MFA_OTP_CHALLENGE; - case "mfa-webauthn-platform-challenge": - return MFA_WEBAUTHN_PLATFORM_CHALLENGE; - case "reset-password-mfa-recovery-code-challenge": - return RESET_PASSWORD_MFA_RECOVERY_CODE_CHALLENGE; - case "organization-selection": - return ORGANIZATION_SELECTION; - case "async-approval-error": - return ASYNC_APPROVAL_ERROR; - case "reset-password-mfa-phone-challenge": - return RESET_PASSWORD_MFA_PHONE_CHALLENGE; - case "mfa-recovery-code-challenge": - return MFA_RECOVERY_CODE_CHALLENGE; - case "mfa-otp-enrollment-code": - return MFA_OTP_ENROLLMENT_CODE; - case "reset-password-mfa-webauthn-platform-challenge": - return RESET_PASSWORD_MFA_WEBAUTHN_PLATFORM_CHALLENGE; - case "reset-password-success": - return RESET_PASSWORD_SUCCESS; - case "async-approval-denied": - return ASYNC_APPROVAL_DENIED; - case "login-passwordless-sms-otp": - return LOGIN_PASSWORDLESS_SMS_OTP; - case "device-code-confirmation": - return DEVICE_CODE_CONFIRMATION; - case "mfa-webauthn-change-key-nickname": - return MFA_WEBAUTHN_CHANGE_KEY_NICKNAME; - case "reset-password-mfa-email-challenge": - return RESET_PASSWORD_MFA_EMAIL_CHALLENGE; - case "reset-password-request": - return RESET_PASSWORD_REQUEST; - case "mfa-email-list": - return MFA_EMAIL_LIST; - case "email-identifier-challenge": - return EMAIL_IDENTIFIER_CHALLENGE; - case "mfa-webauthn-error": - return MFA_WEBAUTHN_ERROR; - case "mfa-push-enrollment-qr": - return MFA_PUSH_ENROLLMENT_QR; - case "mfa-detect-browser-capabilities": - return MFA_DETECT_BROWSER_CAPABILITIES; - case "logout-complete": - return LOGOUT_COMPLETE; - case "customized-consent": - return CUSTOMIZED_CONSENT; - case "mfa-otp-enrollment-qr": - return MFA_OTP_ENROLLMENT_QR; - case "mfa-sms-list": - return MFA_SMS_LIST; - case "device-code-activation-denied": - return DEVICE_CODE_ACTIVATION_DENIED; - case "mfa-sms-enrollment": - return MFA_SMS_ENROLLMENT; - case "custom-form": - return CUSTOM_FORM; - case "logout": - return LOGOUT; - case "mfa-login-options": - return MFA_LOGIN_OPTIONS; - case "mfa-voice-challenge": - return MFA_VOICE_CHALLENGE; - case "passkey-enrollment-local": - return PASSKEY_ENROLLMENT_LOCAL; - case "login-email-verification": - return LOGIN_EMAIL_VERIFICATION; - case "login-id": - return LOGIN_ID; - case "mfa-webauthn-roaming-challenge": - return MFA_WEBAUTHN_ROAMING_CHALLENGE; - case "status": - return STATUS; - case "mfa-push-enrollment-code": - return MFA_PUSH_ENROLLMENT_CODE; - case "brute-force-protection-unblock-failure": - return BRUTE_FORCE_PROTECTION_UNBLOCK_FAILURE; - case "mfa-enroll-result": - return MFA_ENROLL_RESULT; - case "mfa-push-list": - return MFA_PUSH_LIST; - case "pre-login-organization-picker": - return PRE_LOGIN_ORGANIZATION_PICKER; - case "mfa-phone-enrollment": - return MFA_PHONE_ENROLLMENT; - case "mfa-recovery-code-challenge-new-code": - return MFA_RECOVERY_CODE_CHALLENGE_NEW_CODE; - case "email-verification-result": - return EMAIL_VERIFICATION_RESULT; - case "device-code-activation": - return DEVICE_CODE_ACTIVATION; - case "mfa-webauthn-platform-enrollment": - return MFA_WEBAUTHN_PLATFORM_ENROLLMENT; - case "mfa-sms-challenge": - return MFA_SMS_CHALLENGE; - case "organization-picker": - return ORGANIZATION_PICKER; - case "mfa-webauthn-enrollment-success": - return MFA_WEBAUTHN_ENROLLMENT_SUCCESS; - case "reset-password": - return RESET_PASSWORD; - case "passkey-enrollment": - return PASSKEY_ENROLLMENT; - case "login": - return LOGIN; - case "login-passwordless-email-code": - return LOGIN_PASSWORDLESS_EMAIL_CODE; - case "signup-password": - return SIGNUP_PASSWORD; - case "phone-identifier-challenge": - return PHONE_IDENTIFIER_CHALLENGE; - case "mfa-push-challenge-push": - return MFA_PUSH_CHALLENGE_PUSH; - case "mfa-begin-enroll-options": - return MFA_BEGIN_ENROLL_OPTIONS; - case "mfa-email-challenge": - return MFA_EMAIL_CHALLENGE; - case "accept-invitation": - return ACCEPT_INVITATION; - case "mfa-webauthn-not-available-error": - return MFA_WEBAUTHN_NOT_AVAILABLE_ERROR; - case "reset-password-mfa-otp-challenge": - return RESET_PASSWORD_MFA_OTP_CHALLENGE; - case "mfa-country-codes": - return MFA_COUNTRY_CODES; - default: - return new ScreenGroupNameEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - LOGIN, - - LOGIN_ID, - - LOGIN_PASSWORD, - - LOGIN_PASSWORDLESS_EMAIL_CODE, - - LOGIN_PASSWORDLESS_EMAIL_LINK, - - LOGIN_PASSWORDLESS_SMS_OTP, - - LOGIN_EMAIL_VERIFICATION, - - SIGNUP, - - SIGNUP_ID, - - SIGNUP_PASSWORD, - - PHONE_IDENTIFIER_ENROLLMENT, - - PHONE_IDENTIFIER_CHALLENGE, - - EMAIL_IDENTIFIER_CHALLENGE, - - RESET_PASSWORD_REQUEST, - - RESET_PASSWORD_EMAIL, - - RESET_PASSWORD, - - RESET_PASSWORD_SUCCESS, - - RESET_PASSWORD_ERROR, - - RESET_PASSWORD_MFA_EMAIL_CHALLENGE, - - RESET_PASSWORD_MFA_OTP_CHALLENGE, - - RESET_PASSWORD_MFA_PHONE_CHALLENGE, - - RESET_PASSWORD_MFA_PUSH_CHALLENGE_PUSH, - - RESET_PASSWORD_MFA_RECOVERY_CODE_CHALLENGE, - - RESET_PASSWORD_MFA_SMS_CHALLENGE, - - RESET_PASSWORD_MFA_VOICE_CHALLENGE, - - RESET_PASSWORD_MFA_WEBAUTHN_PLATFORM_CHALLENGE, - - RESET_PASSWORD_MFA_WEBAUTHN_ROAMING_CHALLENGE, - - CUSTOM_FORM, - - CONSENT, - - CUSTOMIZED_CONSENT, - - LOGOUT, - - LOGOUT_COMPLETE, - - LOGOUT_ABORTED, - - MFA_PUSH_WELCOME, - - MFA_PUSH_ENROLLMENT_QR, - - MFA_PUSH_ENROLLMENT_CODE, - - MFA_PUSH_SUCCESS, - - MFA_PUSH_CHALLENGE_PUSH, - - MFA_PUSH_LIST, - - MFA_OTP_ENROLLMENT_QR, - - MFA_OTP_ENROLLMENT_CODE, - - MFA_OTP_CHALLENGE, - - MFA_VOICE_ENROLLMENT, - - MFA_VOICE_CHALLENGE, - - MFA_PHONE_CHALLENGE, - - MFA_PHONE_ENROLLMENT, - - MFA_WEBAUTHN_PLATFORM_ENROLLMENT, - - MFA_WEBAUTHN_ROAMING_ENROLLMENT, - - MFA_WEBAUTHN_PLATFORM_CHALLENGE, - - MFA_WEBAUTHN_ROAMING_CHALLENGE, - - MFA_WEBAUTHN_CHANGE_KEY_NICKNAME, - - MFA_WEBAUTHN_ENROLLMENT_SUCCESS, - - MFA_WEBAUTHN_ERROR, - - MFA_WEBAUTHN_NOT_AVAILABLE_ERROR, - - MFA_COUNTRY_CODES, - - MFA_SMS_ENROLLMENT, - - MFA_SMS_CHALLENGE, - - MFA_SMS_LIST, - - MFA_EMAIL_CHALLENGE, - - MFA_EMAIL_LIST, - - MFA_RECOVERY_CODE_ENROLLMENT, - - MFA_RECOVERY_CODE_CHALLENGE_NEW_CODE, - - MFA_RECOVERY_CODE_CHALLENGE, - - MFA_DETECT_BROWSER_CAPABILITIES, - - MFA_ENROLL_RESULT, - - MFA_LOGIN_OPTIONS, - - MFA_BEGIN_ENROLL_OPTIONS, - - STATUS, - - DEVICE_CODE_ACTIVATION, - - DEVICE_CODE_ACTIVATION_ALLOWED, - - DEVICE_CODE_ACTIVATION_DENIED, - - DEVICE_CODE_CONFIRMATION, - - EMAIL_VERIFICATION_RESULT, - - EMAIL_OTP_CHALLENGE, - - ORGANIZATION_SELECTION, - - ORGANIZATION_PICKER, - - PRE_LOGIN_ORGANIZATION_PICKER, - - ACCEPT_INVITATION, - - REDEEM_TICKET, - - PASSKEY_ENROLLMENT, - - PASSKEY_ENROLLMENT_LOCAL, - - INTERSTITIAL_CAPTCHA, - - BRUTE_FORCE_PROTECTION_UNBLOCK, - - BRUTE_FORCE_PROTECTION_UNBLOCK_SUCCESS, - - BRUTE_FORCE_PROTECTION_UNBLOCK_FAILURE, - - ASYNC_APPROVAL_ERROR, - - ASYNC_APPROVAL_ACCEPTED, - - ASYNC_APPROVAL_DENIED, - - ASYNC_APPROVAL_WRONG_USER, - - UNKNOWN - } - - public interface Visitor { - T visitLogin(); - - T visitLoginId(); - - T visitLoginPassword(); - - T visitLoginPasswordlessEmailCode(); - - T visitLoginPasswordlessEmailLink(); - - T visitLoginPasswordlessSmsOtp(); - - T visitLoginEmailVerification(); - - T visitSignup(); - - T visitSignupId(); - - T visitSignupPassword(); - - T visitPhoneIdentifierEnrollment(); - - T visitPhoneIdentifierChallenge(); - - T visitEmailIdentifierChallenge(); - - T visitResetPasswordRequest(); - - T visitResetPasswordEmail(); - - T visitResetPassword(); - - T visitResetPasswordSuccess(); - - T visitResetPasswordError(); - - T visitResetPasswordMfaEmailChallenge(); - - T visitResetPasswordMfaOtpChallenge(); - - T visitResetPasswordMfaPhoneChallenge(); - - T visitResetPasswordMfaPushChallengePush(); - - T visitResetPasswordMfaRecoveryCodeChallenge(); - - T visitResetPasswordMfaSmsChallenge(); - - T visitResetPasswordMfaVoiceChallenge(); - - T visitResetPasswordMfaWebauthnPlatformChallenge(); - - T visitResetPasswordMfaWebauthnRoamingChallenge(); - - T visitCustomForm(); - - T visitConsent(); - - T visitCustomizedConsent(); - - T visitLogout(); - - T visitLogoutComplete(); - - T visitLogoutAborted(); - - T visitMfaPushWelcome(); - - T visitMfaPushEnrollmentQr(); - - T visitMfaPushEnrollmentCode(); - - T visitMfaPushSuccess(); - - T visitMfaPushChallengePush(); - - T visitMfaPushList(); - - T visitMfaOtpEnrollmentQr(); - - T visitMfaOtpEnrollmentCode(); - - T visitMfaOtpChallenge(); - - T visitMfaVoiceEnrollment(); - - T visitMfaVoiceChallenge(); - - T visitMfaPhoneChallenge(); - - T visitMfaPhoneEnrollment(); - - T visitMfaWebauthnPlatformEnrollment(); - - T visitMfaWebauthnRoamingEnrollment(); - - T visitMfaWebauthnPlatformChallenge(); - - T visitMfaWebauthnRoamingChallenge(); - - T visitMfaWebauthnChangeKeyNickname(); - - T visitMfaWebauthnEnrollmentSuccess(); - - T visitMfaWebauthnError(); - - T visitMfaWebauthnNotAvailableError(); - - T visitMfaCountryCodes(); - - T visitMfaSmsEnrollment(); - - T visitMfaSmsChallenge(); - - T visitMfaSmsList(); - - T visitMfaEmailChallenge(); - - T visitMfaEmailList(); - - T visitMfaRecoveryCodeEnrollment(); - - T visitMfaRecoveryCodeChallengeNewCode(); - - T visitMfaRecoveryCodeChallenge(); - - T visitMfaDetectBrowserCapabilities(); - - T visitMfaEnrollResult(); - - T visitMfaLoginOptions(); - - T visitMfaBeginEnrollOptions(); - - T visitStatus(); - - T visitDeviceCodeActivation(); - - T visitDeviceCodeActivationAllowed(); - - T visitDeviceCodeActivationDenied(); - - T visitDeviceCodeConfirmation(); - - T visitEmailVerificationResult(); - - T visitEmailOtpChallenge(); - - T visitOrganizationSelection(); - - T visitOrganizationPicker(); - - T visitPreLoginOrganizationPicker(); - - T visitAcceptInvitation(); - - T visitRedeemTicket(); - - T visitPasskeyEnrollment(); - - T visitPasskeyEnrollmentLocal(); - - T visitInterstitialCaptcha(); - - T visitBruteForceProtectionUnblock(); - - T visitBruteForceProtectionUnblockSuccess(); - - T visitBruteForceProtectionUnblockFailure(); - - T visitAsyncApprovalError(); - - T visitAsyncApprovalAccepted(); - - T visitAsyncApprovalDenied(); - - T visitAsyncApprovalWrongUser(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SearchEngineVersionsEnum.java b/src/main/java/com/auth0/client/mgmt/types/SearchEngineVersionsEnum.java deleted file mode 100644 index 5a1e7fbf1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SearchEngineVersionsEnum.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class SearchEngineVersionsEnum { - public static final SearchEngineVersionsEnum V1 = new SearchEngineVersionsEnum(Value.V1, "v1"); - - public static final SearchEngineVersionsEnum V2 = new SearchEngineVersionsEnum(Value.V2, "v2"); - - public static final SearchEngineVersionsEnum V3 = new SearchEngineVersionsEnum(Value.V3, "v3"); - - private final Value value; - - private final String string; - - SearchEngineVersionsEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof SearchEngineVersionsEnum - && this.string.equals(((SearchEngineVersionsEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case V1: - return visitor.visitV1(); - case V2: - return visitor.visitV2(); - case V3: - return visitor.visitV3(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static SearchEngineVersionsEnum valueOf(String value) { - switch (value) { - case "v1": - return V1; - case "v2": - return V2; - case "v3": - return V3; - default: - return new SearchEngineVersionsEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - V1, - - V2, - - V3, - - UNKNOWN - } - - public interface Visitor { - T visitV1(); - - T visitV2(); - - T visitV3(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfile.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfile.java deleted file mode 100644 index 94f41df4d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfile.java +++ /dev/null @@ -1,358 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = SelfServiceProfile.Builder.class) -public final class SelfServiceProfile { - private final Optional id; - - private final Optional name; - - private final Optional description; - - private final Optional> userAttributes; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional branding; - - private final Optional> allowedStrategies; - - private final Optional userAttributeProfileId; - - private final Map additionalProperties; - - private SelfServiceProfile( - Optional id, - Optional name, - Optional description, - Optional> userAttributes, - Optional createdAt, - Optional updatedAt, - Optional branding, - Optional> allowedStrategies, - Optional userAttributeProfileId, - Map additionalProperties) { - this.id = id; - this.name = name; - this.description = description; - this.userAttributes = userAttributes; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.branding = branding; - this.allowedStrategies = allowedStrategies; - this.userAttributeProfileId = userAttributeProfileId; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the self-service Profile. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the self-service Profile. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The description of the self-service Profile. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - /** - * @return List of attributes to be mapped that will be shown to the user during the SS-SSO flow. - */ - @JsonProperty("user_attributes") - public Optional> getUserAttributes() { - return userAttributes; - } - - /** - * @return The time when this self-service Profile was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when this self-service Profile was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("branding") - public Optional getBranding() { - return branding; - } - - /** - * @return List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, keycloak-samlp, pingfederate] - */ - @JsonProperty("allowed_strategies") - public Optional> getAllowedStrategies() { - return allowedStrategies; - } - - /** - * @return ID of the user-attribute-profile to associate with this self-service profile. - */ - @JsonProperty("user_attribute_profile_id") - public Optional getUserAttributeProfileId() { - return userAttributeProfileId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SelfServiceProfile && equalTo((SelfServiceProfile) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SelfServiceProfile other) { - return id.equals(other.id) - && name.equals(other.name) - && description.equals(other.description) - && userAttributes.equals(other.userAttributes) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && branding.equals(other.branding) - && allowedStrategies.equals(other.allowedStrategies) - && userAttributeProfileId.equals(other.userAttributeProfileId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.description, - this.userAttributes, - this.createdAt, - this.updatedAt, - this.branding, - this.allowedStrategies, - this.userAttributeProfileId); - } - - @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 description = Optional.empty(); - - private Optional> userAttributes = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional branding = Optional.empty(); - - private Optional> allowedStrategies = Optional.empty(); - - private Optional userAttributeProfileId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SelfServiceProfile other) { - id(other.getId()); - name(other.getName()); - description(other.getDescription()); - userAttributes(other.getUserAttributes()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - branding(other.getBranding()); - allowedStrategies(other.getAllowedStrategies()); - userAttributeProfileId(other.getUserAttributeProfileId()); - return this; - } - - /** - *

The unique ID of the self-service Profile.

- */ - @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 the self-service Profile.

- */ - @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 description of the self-service Profile.

- */ - @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; - } - - /** - *

List of attributes to be mapped that will be shown to the user during the SS-SSO flow.

- */ - @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) - public Builder userAttributes(Optional> userAttributes) { - this.userAttributes = userAttributes; - return this; - } - - public Builder userAttributes(List userAttributes) { - this.userAttributes = Optional.ofNullable(userAttributes); - return this; - } - - /** - *

The time when this self-service Profile 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 time when this self-service Profile was 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; - } - - @JsonSetter(value = "branding", nulls = Nulls.SKIP) - public Builder branding(Optional branding) { - this.branding = branding; - return this; - } - - public Builder branding(SelfServiceProfileBrandingProperties branding) { - this.branding = Optional.ofNullable(branding); - return this; - } - - /** - *

List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, keycloak-samlp, pingfederate]

- */ - @JsonSetter(value = "allowed_strategies", nulls = Nulls.SKIP) - public Builder allowedStrategies(Optional> allowedStrategies) { - this.allowedStrategies = allowedStrategies; - return this; - } - - public Builder allowedStrategies(List allowedStrategies) { - this.allowedStrategies = Optional.ofNullable(allowedStrategies); - return this; - } - - /** - *

ID of the user-attribute-profile to associate with this self-service profile.

- */ - @JsonSetter(value = "user_attribute_profile_id", nulls = Nulls.SKIP) - public Builder userAttributeProfileId(Optional userAttributeProfileId) { - this.userAttributeProfileId = userAttributeProfileId; - return this; - } - - public Builder userAttributeProfileId(String userAttributeProfileId) { - this.userAttributeProfileId = Optional.ofNullable(userAttributeProfileId); - return this; - } - - public SelfServiceProfile build() { - return new SelfServiceProfile( - id, - name, - description, - userAttributes, - createdAt, - updatedAt, - branding, - allowedStrategies, - userAttributeProfileId, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileAllowedStrategyEnum.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileAllowedStrategyEnum.java deleted file mode 100644 index 2e24e7d56..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileAllowedStrategyEnum.java +++ /dev/null @@ -1,174 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class SelfServiceProfileAllowedStrategyEnum { - public static final SelfServiceProfileAllowedStrategyEnum OKTA_SAMLP = - new SelfServiceProfileAllowedStrategyEnum(Value.OKTA_SAMLP, "okta-samlp"); - - public static final SelfServiceProfileAllowedStrategyEnum PINGFEDERATE = - new SelfServiceProfileAllowedStrategyEnum(Value.PINGFEDERATE, "pingfederate"); - - public static final SelfServiceProfileAllowedStrategyEnum OKTA = - new SelfServiceProfileAllowedStrategyEnum(Value.OKTA, "okta"); - - public static final SelfServiceProfileAllowedStrategyEnum SAMLP = - new SelfServiceProfileAllowedStrategyEnum(Value.SAMLP, "samlp"); - - public static final SelfServiceProfileAllowedStrategyEnum GOOGLE_APPS = - new SelfServiceProfileAllowedStrategyEnum(Value.GOOGLE_APPS, "google-apps"); - - public static final SelfServiceProfileAllowedStrategyEnum KEYCLOAK_SAMLP = - new SelfServiceProfileAllowedStrategyEnum(Value.KEYCLOAK_SAMLP, "keycloak-samlp"); - - public static final SelfServiceProfileAllowedStrategyEnum WAAD = - new SelfServiceProfileAllowedStrategyEnum(Value.WAAD, "waad"); - - public static final SelfServiceProfileAllowedStrategyEnum AUTH0SAMLP = - new SelfServiceProfileAllowedStrategyEnum(Value.AUTH0SAMLP, "auth0-samlp"); - - public static final SelfServiceProfileAllowedStrategyEnum OIDC = - new SelfServiceProfileAllowedStrategyEnum(Value.OIDC, "oidc"); - - public static final SelfServiceProfileAllowedStrategyEnum ADFS = - new SelfServiceProfileAllowedStrategyEnum(Value.ADFS, "adfs"); - - private final Value value; - - private final String string; - - SelfServiceProfileAllowedStrategyEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof SelfServiceProfileAllowedStrategyEnum - && this.string.equals(((SelfServiceProfileAllowedStrategyEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case OKTA_SAMLP: - return visitor.visitOktaSamlp(); - case PINGFEDERATE: - return visitor.visitPingfederate(); - case OKTA: - return visitor.visitOkta(); - case SAMLP: - return visitor.visitSamlp(); - case GOOGLE_APPS: - return visitor.visitGoogleApps(); - case KEYCLOAK_SAMLP: - return visitor.visitKeycloakSamlp(); - case WAAD: - return visitor.visitWaad(); - case AUTH0SAMLP: - return visitor.visitAuth0Samlp(); - case OIDC: - return visitor.visitOidc(); - case ADFS: - return visitor.visitAdfs(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static SelfServiceProfileAllowedStrategyEnum valueOf(String value) { - switch (value) { - case "okta-samlp": - return OKTA_SAMLP; - case "pingfederate": - return PINGFEDERATE; - case "okta": - return OKTA; - case "samlp": - return SAMLP; - case "google-apps": - return GOOGLE_APPS; - case "keycloak-samlp": - return KEYCLOAK_SAMLP; - case "waad": - return WAAD; - case "auth0-samlp": - return AUTH0SAMLP; - case "oidc": - return OIDC; - case "adfs": - return ADFS; - default: - return new SelfServiceProfileAllowedStrategyEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - OIDC, - - SAMLP, - - WAAD, - - GOOGLE_APPS, - - ADFS, - - OKTA, - - AUTH0SAMLP, - - OKTA_SAMLP, - - KEYCLOAK_SAMLP, - - PINGFEDERATE, - - UNKNOWN - } - - public interface Visitor { - T visitOidc(); - - T visitSamlp(); - - T visitWaad(); - - T visitGoogleApps(); - - T visitAdfs(); - - T visitOkta(); - - T visitAuth0Samlp(); - - T visitOktaSamlp(); - - T visitKeycloakSamlp(); - - T visitPingfederate(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileBrandingColors.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileBrandingColors.java deleted file mode 100644 index a7b65cd3c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileBrandingColors.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = SelfServiceProfileBrandingColors.Builder.class) -public final class SelfServiceProfileBrandingColors { - private final String primary; - - private final Map additionalProperties; - - private SelfServiceProfileBrandingColors(String primary, Map additionalProperties) { - this.primary = primary; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("primary") - public String getPrimary() { - return primary; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SelfServiceProfileBrandingColors && equalTo((SelfServiceProfileBrandingColors) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SelfServiceProfileBrandingColors other) { - return primary.equals(other.primary); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.primary); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static PrimaryStage builder() { - return new Builder(); - } - - public interface PrimaryStage { - _FinalStage primary(@NotNull String primary); - - Builder from(SelfServiceProfileBrandingColors other); - } - - public interface _FinalStage { - SelfServiceProfileBrandingColors build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements PrimaryStage, _FinalStage { - private String primary; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SelfServiceProfileBrandingColors other) { - primary(other.getPrimary()); - return this; - } - - @java.lang.Override - @JsonSetter("primary") - public _FinalStage primary(@NotNull String primary) { - this.primary = Objects.requireNonNull(primary, "primary must not be null"); - return this; - } - - @java.lang.Override - public SelfServiceProfileBrandingColors build() { - return new SelfServiceProfileBrandingColors(primary, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileBrandingProperties.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileBrandingProperties.java deleted file mode 100644 index 3ece91ff2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileBrandingProperties.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SelfServiceProfileBrandingProperties.Builder.class) -public final class SelfServiceProfileBrandingProperties { - private final Optional logoUrl; - - private final Optional colors; - - private final Map additionalProperties; - - private SelfServiceProfileBrandingProperties( - Optional logoUrl, - Optional colors, - Map additionalProperties) { - this.logoUrl = logoUrl; - this.colors = colors; - this.additionalProperties = additionalProperties; - } - - @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 SelfServiceProfileBrandingProperties - && equalTo((SelfServiceProfileBrandingProperties) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SelfServiceProfileBrandingProperties 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(SelfServiceProfileBrandingProperties other) { - logoUrl(other.getLogoUrl()); - colors(other.getColors()); - return this; - } - - @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(SelfServiceProfileBrandingColors colors) { - this.colors = Optional.ofNullable(colors); - return this; - } - - public SelfServiceProfileBrandingProperties build() { - return new SelfServiceProfileBrandingProperties(logoUrl, colors, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileCustomTextLanguageEnum.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileCustomTextLanguageEnum.java deleted file mode 100644 index 4b0bc1bb2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileCustomTextLanguageEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class SelfServiceProfileCustomTextLanguageEnum { - public static final SelfServiceProfileCustomTextLanguageEnum EN = - new SelfServiceProfileCustomTextLanguageEnum(Value.EN, "en"); - - private final Value value; - - private final String string; - - SelfServiceProfileCustomTextLanguageEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof SelfServiceProfileCustomTextLanguageEnum - && this.string.equals(((SelfServiceProfileCustomTextLanguageEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case EN: - return visitor.visitEn(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static SelfServiceProfileCustomTextLanguageEnum valueOf(String value) { - switch (value) { - case "en": - return EN; - default: - return new SelfServiceProfileCustomTextLanguageEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - EN, - - UNKNOWN - } - - public interface Visitor { - T visitEn(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileCustomTextPageEnum.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileCustomTextPageEnum.java deleted file mode 100644 index 3dc8cfe39..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileCustomTextPageEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class SelfServiceProfileCustomTextPageEnum { - public static final SelfServiceProfileCustomTextPageEnum GET_STARTED = - new SelfServiceProfileCustomTextPageEnum(Value.GET_STARTED, "get-started"); - - private final Value value; - - private final String string; - - SelfServiceProfileCustomTextPageEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof SelfServiceProfileCustomTextPageEnum - && this.string.equals(((SelfServiceProfileCustomTextPageEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case GET_STARTED: - return visitor.visitGetStarted(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static SelfServiceProfileCustomTextPageEnum valueOf(String value) { - switch (value) { - case "get-started": - return GET_STARTED; - default: - return new SelfServiceProfileCustomTextPageEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - GET_STARTED, - - UNKNOWN - } - - public interface Visitor { - T visitGetStarted(); - - 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 deleted file mode 100644 index 00ce38c87..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketConnectionConfig.java +++ /dev/null @@ -1,349 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.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 = SelfServiceProfileSsoTicketConnectionConfig.Builder.class) -public final class SelfServiceProfileSsoTicketConnectionConfig { - private final String name; - - private final Optional displayName; - - private final Optional isDomainConnection; - - private final Optional showAsButton; - - private final Optional>> metadata; - - private final OptionalNullable options; - - private final Map additionalProperties; - - private SelfServiceProfileSsoTicketConnectionConfig( - String name, - Optional displayName, - Optional isDomainConnection, - Optional showAsButton, - Optional>> metadata, - OptionalNullable options, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.isDomainConnection = isDomainConnection; - this.showAsButton = showAsButton; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the connection that will be created as a part of the SSO flow. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return Connection name used in the new universal login experience - */ - @JsonProperty("display_name") - public Optional getDisplayName() { - return displayName; - } - - /** - * @return <code>true</code> promotes to a domain-level connection so that third-party applications can use it. <code>false</code> does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to <code>false</code>.) - */ - @JsonProperty("is_domain_connection") - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - /** - * @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 <code>false</code>.) - */ - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @JsonProperty("metadata") - public Optional>> getMetadata() { - return metadata; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("options") - public OptionalNullable getOptions() { - if (options == null) { - return OptionalNullable.absent(); - } - return options; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("options") - private OptionalNullable _getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SelfServiceProfileSsoTicketConnectionConfig - && equalTo((SelfServiceProfileSsoTicketConnectionConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SelfServiceProfileSsoTicketConnectionConfig other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && isDomainConnection.equals(other.isDomainConnection) - && showAsButton.equals(other.showAsButton) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, this.displayName, this.isDomainConnection, this.showAsButton, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

The name of the connection that will be created as a part of the SSO flow.

- */ - _FinalStage name(@NotNull String name); - - Builder from(SelfServiceProfileSsoTicketConnectionConfig other); - } - - public interface _FinalStage { - SelfServiceProfileSsoTicketConnectionConfig build(); - - /** - *

Connection name used in the new universal login experience

- */ - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - - /** - *

<code>true</code> promotes to a domain-level connection so that third-party applications can use it. <code>false</code> does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to <code>false</code>.)

- */ - _FinalStage isDomainConnection(Optional isDomainConnection); - - _FinalStage isDomainConnection(Boolean isDomainConnection); - - /** - *

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 <code>false</code>.)

- */ - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - - _FinalStage metadata(Optional>> metadata); - - _FinalStage metadata(Map> metadata); - - _FinalStage options(@Nullable OptionalNullable options); - - _FinalStage options(SelfServiceProfileSsoTicketConnectionOptions options); - - _FinalStage options(Optional options); - - _FinalStage options(com.auth0.client.mgmt.core.Nullable options); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private String name; - - private OptionalNullable options = OptionalNullable.absent(); - - private Optional>> metadata = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional displayName = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SelfServiceProfileSsoTicketConnectionConfig other) { - name(other.getName()); - displayName(other.getDisplayName()); - isDomainConnection(other.getIsDomainConnection()); - showAsButton(other.getShowAsButton()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - /** - *

The name of the connection that will be created as a part of the SSO flow.

- *

The name of the connection that will be created as a part of the SSO flow.

- * @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 options( - com.auth0.client.mgmt.core.Nullable options) { - if (options.isNull()) { - this.options = OptionalNullable.ofNull(); - } else if (options.isEmpty()) { - this.options = OptionalNullable.absent(); - } else { - this.options = OptionalNullable.of(options.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage options(Optional options) { - if (options.isPresent()) { - this.options = OptionalNullable.of(options.get()); - } else { - this.options = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage options(SelfServiceProfileSsoTicketConnectionOptions options) { - this.options = OptionalNullable.of(options); - return this; - } - - @java.lang.Override - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public _FinalStage options(@Nullable OptionalNullable options) { - this.options = options; - return this; - } - - @java.lang.Override - public _FinalStage metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public _FinalStage metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - /** - *

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 <code>false</code>.)

- * @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 <code>false</code>.)

- */ - @java.lang.Override - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public _FinalStage showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - /** - *

<code>true</code> promotes to a domain-level connection so that third-party applications can use it. <code>false</code> does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to <code>false</code>.)

- * @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; - } - - /** - *

<code>true</code> promotes to a domain-level connection so that third-party applications can use it. <code>false</code> does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to <code>false</code>.)

- */ - @java.lang.Override - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public _FinalStage isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - 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 SelfServiceProfileSsoTicketConnectionConfig build() { - return new SelfServiceProfileSsoTicketConnectionConfig( - name, displayName, isDomainConnection, showAsButton, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketConnectionOptions.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketConnectionOptions.java deleted file mode 100644 index ecd00be80..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketConnectionOptions.java +++ /dev/null @@ -1,226 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = SelfServiceProfileSsoTicketConnectionOptions.Builder.class) -public final class SelfServiceProfileSsoTicketConnectionOptions { - private final OptionalNullable iconUrl; - - private final Optional> domainAliases; - - private final OptionalNullable idpinitiated; - - private final Map additionalProperties; - - private SelfServiceProfileSsoTicketConnectionOptions( - OptionalNullable iconUrl, - Optional> domainAliases, - OptionalNullable idpinitiated, - Map additionalProperties) { - this.iconUrl = iconUrl; - this.domainAliases = domainAliases; - this.idpinitiated = idpinitiated; - this.additionalProperties = additionalProperties; - } - - /** - * @return URL for the icon. Must use HTTPS. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("icon_url") - public OptionalNullable getIconUrl() { - if (iconUrl == null) { - return OptionalNullable.absent(); - } - return iconUrl; - } - - /** - * @return List of domain_aliases that can be authenticated in the Identity Provider - */ - @JsonProperty("domain_aliases") - public Optional> getDomainAliases() { - return domainAliases; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("idpinitiated") - public OptionalNullable getIdpinitiated() { - if (idpinitiated == null) { - return OptionalNullable.absent(); - } - return idpinitiated; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("icon_url") - private OptionalNullable _getIconUrl() { - return iconUrl; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("idpinitiated") - private OptionalNullable _getIdpinitiated() { - return idpinitiated; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SelfServiceProfileSsoTicketConnectionOptions - && equalTo((SelfServiceProfileSsoTicketConnectionOptions) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SelfServiceProfileSsoTicketConnectionOptions other) { - return iconUrl.equals(other.iconUrl) - && domainAliases.equals(other.domainAliases) - && idpinitiated.equals(other.idpinitiated); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.iconUrl, this.domainAliases, this.idpinitiated); - } - - @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 iconUrl = OptionalNullable.absent(); - - private Optional> domainAliases = Optional.empty(); - - private OptionalNullable idpinitiated = - OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SelfServiceProfileSsoTicketConnectionOptions other) { - iconUrl(other.getIconUrl()); - domainAliases(other.getDomainAliases()); - idpinitiated(other.getIdpinitiated()); - return this; - } - - /** - *

URL for the icon. Must use HTTPS.

- */ - @JsonSetter(value = "icon_url", nulls = Nulls.SKIP) - public Builder iconUrl(@Nullable OptionalNullable iconUrl) { - this.iconUrl = iconUrl; - return this; - } - - public Builder iconUrl(String iconUrl) { - this.iconUrl = OptionalNullable.of(iconUrl); - return this; - } - - public Builder iconUrl(Optional iconUrl) { - if (iconUrl.isPresent()) { - this.iconUrl = OptionalNullable.of(iconUrl.get()); - } else { - this.iconUrl = OptionalNullable.absent(); - } - return this; - } - - public Builder iconUrl(com.auth0.client.mgmt.core.Nullable iconUrl) { - if (iconUrl.isNull()) { - this.iconUrl = OptionalNullable.ofNull(); - } else if (iconUrl.isEmpty()) { - this.iconUrl = OptionalNullable.absent(); - } else { - this.iconUrl = OptionalNullable.of(iconUrl.get()); - } - return this; - } - - /** - *

List of domain_aliases that can be authenticated in the Identity Provider

- */ - @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; - } - - @JsonSetter(value = "idpinitiated", nulls = Nulls.SKIP) - public Builder idpinitiated( - @Nullable OptionalNullable idpinitiated) { - this.idpinitiated = idpinitiated; - return this; - } - - public Builder idpinitiated(SelfServiceProfileSsoTicketIdpInitiatedOptions idpinitiated) { - this.idpinitiated = OptionalNullable.of(idpinitiated); - return this; - } - - public Builder idpinitiated(Optional idpinitiated) { - if (idpinitiated.isPresent()) { - this.idpinitiated = OptionalNullable.of(idpinitiated.get()); - } else { - this.idpinitiated = OptionalNullable.absent(); - } - return this; - } - - public Builder idpinitiated( - com.auth0.client.mgmt.core.Nullable idpinitiated) { - if (idpinitiated.isNull()) { - this.idpinitiated = OptionalNullable.ofNull(); - } else if (idpinitiated.isEmpty()) { - this.idpinitiated = OptionalNullable.absent(); - } else { - this.idpinitiated = OptionalNullable.of(idpinitiated.get()); - } - return this; - } - - public SelfServiceProfileSsoTicketConnectionOptions build() { - return new SelfServiceProfileSsoTicketConnectionOptions( - iconUrl, domainAliases, idpinitiated, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketDomainAliasesConfig.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketDomainAliasesConfig.java deleted file mode 100644 index 94a640d7f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketDomainAliasesConfig.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = SelfServiceProfileSsoTicketDomainAliasesConfig.Builder.class) -public final class SelfServiceProfileSsoTicketDomainAliasesConfig { - private final SelfServiceProfileSsoTicketDomainVerificationEnum domainVerification; - - private final Map additionalProperties; - - private SelfServiceProfileSsoTicketDomainAliasesConfig( - SelfServiceProfileSsoTicketDomainVerificationEnum domainVerification, - Map additionalProperties) { - this.domainVerification = domainVerification; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("domain_verification") - public SelfServiceProfileSsoTicketDomainVerificationEnum getDomainVerification() { - return domainVerification; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SelfServiceProfileSsoTicketDomainAliasesConfig - && equalTo((SelfServiceProfileSsoTicketDomainAliasesConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SelfServiceProfileSsoTicketDomainAliasesConfig other) { - return domainVerification.equals(other.domainVerification); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.domainVerification); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static DomainVerificationStage builder() { - return new Builder(); - } - - public interface DomainVerificationStage { - _FinalStage domainVerification(@NotNull SelfServiceProfileSsoTicketDomainVerificationEnum domainVerification); - - Builder from(SelfServiceProfileSsoTicketDomainAliasesConfig other); - } - - public interface _FinalStage { - SelfServiceProfileSsoTicketDomainAliasesConfig build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements DomainVerificationStage, _FinalStage { - private SelfServiceProfileSsoTicketDomainVerificationEnum domainVerification; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SelfServiceProfileSsoTicketDomainAliasesConfig other) { - domainVerification(other.getDomainVerification()); - return this; - } - - @java.lang.Override - @JsonSetter("domain_verification") - public _FinalStage domainVerification( - @NotNull SelfServiceProfileSsoTicketDomainVerificationEnum domainVerification) { - this.domainVerification = Objects.requireNonNull(domainVerification, "domainVerification must not be null"); - return this; - } - - @java.lang.Override - public SelfServiceProfileSsoTicketDomainAliasesConfig build() { - return new SelfServiceProfileSsoTicketDomainAliasesConfig(domainVerification, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketDomainVerificationEnum.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketDomainVerificationEnum.java deleted file mode 100644 index dcb54f647..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketDomainVerificationEnum.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class SelfServiceProfileSsoTicketDomainVerificationEnum { - public static final SelfServiceProfileSsoTicketDomainVerificationEnum REQUIRED = - new SelfServiceProfileSsoTicketDomainVerificationEnum(Value.REQUIRED, "required"); - - public static final SelfServiceProfileSsoTicketDomainVerificationEnum NONE = - new SelfServiceProfileSsoTicketDomainVerificationEnum(Value.NONE, "none"); - - public static final SelfServiceProfileSsoTicketDomainVerificationEnum OPTIONAL = - new SelfServiceProfileSsoTicketDomainVerificationEnum(Value.OPTIONAL, "optional"); - - private final Value value; - - private final String string; - - SelfServiceProfileSsoTicketDomainVerificationEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof SelfServiceProfileSsoTicketDomainVerificationEnum - && this.string.equals(((SelfServiceProfileSsoTicketDomainVerificationEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case REQUIRED: - return visitor.visitRequired(); - case NONE: - return visitor.visitNone(); - case OPTIONAL: - return visitor.visitOptional(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static SelfServiceProfileSsoTicketDomainVerificationEnum valueOf(String value) { - switch (value) { - case "required": - return REQUIRED; - case "none": - return NONE; - case "optional": - return OPTIONAL; - default: - return new SelfServiceProfileSsoTicketDomainVerificationEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - NONE, - - OPTIONAL, - - REQUIRED, - - UNKNOWN - } - - public interface Visitor { - T visitNone(); - - T visitOptional(); - - T visitRequired(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketEnabledOrganization.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketEnabledOrganization.java deleted file mode 100644 index b84285960..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketEnabledOrganization.java +++ /dev/null @@ -1,205 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SelfServiceProfileSsoTicketEnabledOrganization.Builder.class) -public final class SelfServiceProfileSsoTicketEnabledOrganization { - private final String organizationId; - - private final Optional assignMembershipOnLogin; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private SelfServiceProfileSsoTicketEnabledOrganization( - String organizationId, - Optional assignMembershipOnLogin, - Optional showAsButton, - Map additionalProperties) { - this.organizationId = organizationId; - this.assignMembershipOnLogin = assignMembershipOnLogin; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - /** - * @return Organization identifier. - */ - @JsonProperty("organization_id") - public String getOrganizationId() { - return organizationId; - } - - /** - * @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. Default: true. - */ - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SelfServiceProfileSsoTicketEnabledOrganization - && equalTo((SelfServiceProfileSsoTicketEnabledOrganization) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SelfServiceProfileSsoTicketEnabledOrganization other) { - return organizationId.equals(other.organizationId) - && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.organizationId, this.assignMembershipOnLogin, this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static OrganizationIdStage builder() { - return new Builder(); - } - - public interface OrganizationIdStage { - /** - *

Organization identifier.

- */ - _FinalStage organizationId(@NotNull String organizationId); - - Builder from(SelfServiceProfileSsoTicketEnabledOrganization other); - } - - public interface _FinalStage { - SelfServiceProfileSsoTicketEnabledOrganization build(); - - /** - *

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. Default: true.

- */ - _FinalStage showAsButton(Optional showAsButton); - - _FinalStage showAsButton(Boolean showAsButton); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements OrganizationIdStage, _FinalStage { - private String organizationId; - - private Optional showAsButton = Optional.empty(); - - private Optional assignMembershipOnLogin = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SelfServiceProfileSsoTicketEnabledOrganization other) { - organizationId(other.getOrganizationId()); - assignMembershipOnLogin(other.getAssignMembershipOnLogin()); - showAsButton(other.getShowAsButton()); - return this; - } - - /** - *

Organization identifier.

- *

Organization identifier.

- * @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; - } - - /** - *

Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true.

- * @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. Default: true.

- */ - @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 SelfServiceProfileSsoTicketEnabledOrganization build() { - return new SelfServiceProfileSsoTicketEnabledOrganization( - organizationId, assignMembershipOnLogin, showAsButton, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketGoogleWorkspaceConfig.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketGoogleWorkspaceConfig.java deleted file mode 100644 index a9454e976..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketGoogleWorkspaceConfig.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = SelfServiceProfileSsoTicketGoogleWorkspaceConfig.Builder.class) -public final class SelfServiceProfileSsoTicketGoogleWorkspaceConfig { - private final boolean syncUsers; - - private final Map additionalProperties; - - private SelfServiceProfileSsoTicketGoogleWorkspaceConfig( - boolean syncUsers, Map additionalProperties) { - this.syncUsers = syncUsers; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether to enable Google Workspace Directory Sync for users during the self-service flow. - */ - @JsonProperty("sync_users") - public boolean getSyncUsers() { - return syncUsers; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SelfServiceProfileSsoTicketGoogleWorkspaceConfig - && equalTo((SelfServiceProfileSsoTicketGoogleWorkspaceConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SelfServiceProfileSsoTicketGoogleWorkspaceConfig 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 { - /** - *

Whether to enable Google Workspace Directory Sync for users during the self-service flow.

- */ - _FinalStage syncUsers(boolean syncUsers); - - Builder from(SelfServiceProfileSsoTicketGoogleWorkspaceConfig other); - } - - public interface _FinalStage { - SelfServiceProfileSsoTicketGoogleWorkspaceConfig build(); - } - - @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(SelfServiceProfileSsoTicketGoogleWorkspaceConfig other) { - syncUsers(other.getSyncUsers()); - 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. - */ - @java.lang.Override - @JsonSetter("sync_users") - public _FinalStage syncUsers(boolean syncUsers) { - this.syncUsers = syncUsers; - return this; - } - - @java.lang.Override - public SelfServiceProfileSsoTicketGoogleWorkspaceConfig build() { - return new SelfServiceProfileSsoTicketGoogleWorkspaceConfig(syncUsers, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum.java deleted file mode 100644 index 81075f195..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum { - public static final SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum WSFED = - new SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum(Value.WSFED, "wsfed"); - - public static final SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum SAMLP = - new SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum(Value.SAMLP, "samlp"); - - public static final SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum OAUTH2 = - new SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum(Value.OAUTH2, "oauth2"); - - private final Value value; - - private final String string; - - SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum - && this.string.equals( - ((SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum) 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 OAUTH2: - return visitor.visitOauth2(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum valueOf(String value) { - switch (value) { - case "wsfed": - return WSFED; - case "samlp": - return SAMLP; - case "oauth2": - return OAUTH2; - default: - return new SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - SAMLP, - - WSFED, - - OAUTH2, - - UNKNOWN - } - - public interface Visitor { - T visitSamlp(); - - T visitWsfed(); - - T visitOauth2(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketIdpInitiatedOptions.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketIdpInitiatedOptions.java deleted file mode 100644 index dff7baef3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketIdpInitiatedOptions.java +++ /dev/null @@ -1,190 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SelfServiceProfileSsoTicketIdpInitiatedOptions.Builder.class) -public final class SelfServiceProfileSsoTicketIdpInitiatedOptions { - private final Optional enabled; - - private final Optional clientId; - - private final Optional clientProtocol; - - private final Optional clientAuthorizequery; - - private final Map additionalProperties; - - private SelfServiceProfileSsoTicketIdpInitiatedOptions( - Optional enabled, - Optional clientId, - Optional clientProtocol, - Optional clientAuthorizequery, - Map additionalProperties) { - this.enabled = enabled; - this.clientId = clientId; - this.clientProtocol = clientProtocol; - this.clientAuthorizequery = clientAuthorizequery; - this.additionalProperties = additionalProperties; - } - - /** - * @return Enables IdP-initiated login for this connection - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Default application <code>client_id</code> user is redirected to after validated SAML response - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonProperty("client_protocol") - public Optional getClientProtocol() { - return clientProtocol; - } - - /** - * @return Query string options to customize the behaviour for OpenID Connect when <code>idpinitiated.client_protocol</code> is <code>oauth2</code>. Allowed parameters: <code>redirect_uri</code>, <code>scope</code>, <code>response_type</code>. For example, <code>redirect_uri=https://jwt.io&scope=openid email&response_type=token</code> - */ - @JsonProperty("client_authorizequery") - public Optional getClientAuthorizequery() { - return clientAuthorizequery; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SelfServiceProfileSsoTicketIdpInitiatedOptions - && equalTo((SelfServiceProfileSsoTicketIdpInitiatedOptions) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SelfServiceProfileSsoTicketIdpInitiatedOptions other) { - return enabled.equals(other.enabled) - && clientId.equals(other.clientId) - && clientProtocol.equals(other.clientProtocol) - && clientAuthorizequery.equals(other.clientAuthorizequery); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled, this.clientId, this.clientProtocol, this.clientAuthorizequery); - } - - @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 enabled = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional clientProtocol = Optional.empty(); - - private Optional clientAuthorizequery = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SelfServiceProfileSsoTicketIdpInitiatedOptions other) { - enabled(other.getEnabled()); - clientId(other.getClientId()); - clientProtocol(other.getClientProtocol()); - clientAuthorizequery(other.getClientAuthorizequery()); - return this; - } - - /** - *

Enables IdP-initiated login for this connection

- */ - @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; - } - - /** - *

Default application <code>client_id</code> user is redirected to after validated SAML response

- */ - @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(SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum clientProtocol) { - this.clientProtocol = Optional.ofNullable(clientProtocol); - return this; - } - - /** - *

Query string options to customize the behaviour for OpenID Connect when <code>idpinitiated.client_protocol</code> is <code>oauth2</code>. Allowed parameters: <code>redirect_uri</code>, <code>scope</code>, <code>response_type</code>. For example, <code>redirect_uri=https://jwt.io&scope=openid email&response_type=token</code>

- */ - @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; - } - - public SelfServiceProfileSsoTicketIdpInitiatedOptions build() { - return new SelfServiceProfileSsoTicketIdpInitiatedOptions( - enabled, clientId, clientProtocol, clientAuthorizequery, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketProvisioningConfig.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketProvisioningConfig.java deleted file mode 100644 index 158f23608..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketProvisioningConfig.java +++ /dev/null @@ -1,193 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = SelfServiceProfileSsoTicketProvisioningConfig.Builder.class) -public final class SelfServiceProfileSsoTicketProvisioningConfig { - private final Optional> scopes; - - private final Optional googleWorkspace; - - private final OptionalNullable tokenLifetime; - - private final Map additionalProperties; - - private SelfServiceProfileSsoTicketProvisioningConfig( - Optional> scopes, - Optional googleWorkspace, - OptionalNullable tokenLifetime, - Map additionalProperties) { - this.scopes = scopes; - this.googleWorkspace = googleWorkspace; - this.tokenLifetime = tokenLifetime; - this.additionalProperties = additionalProperties; - } - - /** - * @return The scopes of the SCIM tokens generated during the self-service flow. - */ - @JsonProperty("scopes") - public Optional> getScopes() { - return scopes; - } - - @JsonProperty("google_workspace") - public Optional getGoogleWorkspace() { - return googleWorkspace; - } - - /** - * @return Lifetime of the tokens in seconds. Must be greater than 900. If not provided, the tokens don't expire. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("token_lifetime") - public OptionalNullable getTokenLifetime() { - if (tokenLifetime == null) { - return OptionalNullable.absent(); - } - return tokenLifetime; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("token_lifetime") - private OptionalNullable _getTokenLifetime() { - return tokenLifetime; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SelfServiceProfileSsoTicketProvisioningConfig - && equalTo((SelfServiceProfileSsoTicketProvisioningConfig) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SelfServiceProfileSsoTicketProvisioningConfig other) { - return scopes.equals(other.scopes) - && googleWorkspace.equals(other.googleWorkspace) - && tokenLifetime.equals(other.tokenLifetime); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.scopes, this.googleWorkspace, this.tokenLifetime); - } - - @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> scopes = Optional.empty(); - - private Optional googleWorkspace = Optional.empty(); - - private OptionalNullable tokenLifetime = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SelfServiceProfileSsoTicketProvisioningConfig other) { - scopes(other.getScopes()); - googleWorkspace(other.getGoogleWorkspace()); - tokenLifetime(other.getTokenLifetime()); - return this; - } - - /** - *

The scopes of the SCIM tokens generated during the self-service flow.

- */ - @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 = "google_workspace", nulls = Nulls.SKIP) - public Builder googleWorkspace(Optional googleWorkspace) { - this.googleWorkspace = googleWorkspace; - return this; - } - - public Builder googleWorkspace(SelfServiceProfileSsoTicketGoogleWorkspaceConfig googleWorkspace) { - this.googleWorkspace = Optional.ofNullable(googleWorkspace); - return this; - } - - /** - *

Lifetime of the tokens in seconds. Must be greater than 900. If not provided, the tokens don't expire.

- */ - @JsonSetter(value = "token_lifetime", nulls = Nulls.SKIP) - public Builder tokenLifetime(@Nullable OptionalNullable tokenLifetime) { - this.tokenLifetime = tokenLifetime; - return this; - } - - public Builder tokenLifetime(Integer tokenLifetime) { - this.tokenLifetime = OptionalNullable.of(tokenLifetime); - return this; - } - - public Builder tokenLifetime(Optional tokenLifetime) { - if (tokenLifetime.isPresent()) { - this.tokenLifetime = OptionalNullable.of(tokenLifetime.get()); - } else { - this.tokenLifetime = OptionalNullable.absent(); - } - return this; - } - - public Builder tokenLifetime(com.auth0.client.mgmt.core.Nullable tokenLifetime) { - if (tokenLifetime.isNull()) { - this.tokenLifetime = OptionalNullable.ofNull(); - } else if (tokenLifetime.isEmpty()) { - this.tokenLifetime = OptionalNullable.absent(); - } else { - this.tokenLifetime = OptionalNullable.of(tokenLifetime.get()); - } - return this; - } - - public SelfServiceProfileSsoTicketProvisioningConfig build() { - return new SelfServiceProfileSsoTicketProvisioningConfig( - scopes, googleWorkspace, tokenLifetime, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketProvisioningScopeEnum.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketProvisioningScopeEnum.java deleted file mode 100644 index ec9fada64..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileSsoTicketProvisioningScopeEnum.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class SelfServiceProfileSsoTicketProvisioningScopeEnum { - public static final SelfServiceProfileSsoTicketProvisioningScopeEnum PATCH_USERS = - new SelfServiceProfileSsoTicketProvisioningScopeEnum(Value.PATCH_USERS, "patch:users"); - - public static final SelfServiceProfileSsoTicketProvisioningScopeEnum DELETE_USERS = - new SelfServiceProfileSsoTicketProvisioningScopeEnum(Value.DELETE_USERS, "delete:users"); - - public static final SelfServiceProfileSsoTicketProvisioningScopeEnum GET_USERS = - new SelfServiceProfileSsoTicketProvisioningScopeEnum(Value.GET_USERS, "get:users"); - - public static final SelfServiceProfileSsoTicketProvisioningScopeEnum PUT_USERS = - new SelfServiceProfileSsoTicketProvisioningScopeEnum(Value.PUT_USERS, "put:users"); - - public static final SelfServiceProfileSsoTicketProvisioningScopeEnum POST_USERS = - new SelfServiceProfileSsoTicketProvisioningScopeEnum(Value.POST_USERS, "post:users"); - - private final Value value; - - private final String string; - - SelfServiceProfileSsoTicketProvisioningScopeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof SelfServiceProfileSsoTicketProvisioningScopeEnum - && this.string.equals(((SelfServiceProfileSsoTicketProvisioningScopeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PATCH_USERS: - return visitor.visitPatchUsers(); - 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 UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static SelfServiceProfileSsoTicketProvisioningScopeEnum valueOf(String value) { - switch (value) { - case "patch:users": - return PATCH_USERS; - case "delete:users": - return DELETE_USERS; - case "get:users": - return GET_USERS; - case "put:users": - return PUT_USERS; - case "post:users": - return POST_USERS; - default: - return new SelfServiceProfileSsoTicketProvisioningScopeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - GET_USERS, - - POST_USERS, - - PUT_USERS, - - PATCH_USERS, - - DELETE_USERS, - - UNKNOWN - } - - public interface Visitor { - T visitGetUsers(); - - T visitPostUsers(); - - T visitPutUsers(); - - T visitPatchUsers(); - - T visitDeleteUsers(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileUserAttribute.java b/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileUserAttribute.java deleted file mode 100644 index 0228f1414..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SelfServiceProfileUserAttribute.java +++ /dev/null @@ -1,180 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = SelfServiceProfileUserAttribute.Builder.class) -public final class SelfServiceProfileUserAttribute { - private final String name; - - private final String description; - - private final boolean isOptional; - - private final Map additionalProperties; - - private SelfServiceProfileUserAttribute( - String name, String description, boolean isOptional, Map additionalProperties) { - this.name = name; - this.description = description; - this.isOptional = isOptional; - this.additionalProperties = additionalProperties; - } - - /** - * @return Identifier of this attribute. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return Description of this attribute. - */ - @JsonProperty("description") - public String getDescription() { - return description; - } - - /** - * @return Determines if this attribute is required - */ - @JsonProperty("is_optional") - public boolean getIsOptional() { - return isOptional; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SelfServiceProfileUserAttribute && equalTo((SelfServiceProfileUserAttribute) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SelfServiceProfileUserAttribute other) { - return name.equals(other.name) && description.equals(other.description) && isOptional == other.isOptional; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.description, this.isOptional); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - /** - *

Identifier of this attribute.

- */ - DescriptionStage name(@NotNull String name); - - Builder from(SelfServiceProfileUserAttribute other); - } - - public interface DescriptionStage { - /** - *

Description of this attribute.

- */ - IsOptionalStage description(@NotNull String description); - } - - public interface IsOptionalStage { - /** - *

Determines if this attribute is required

- */ - _FinalStage isOptional(boolean isOptional); - } - - public interface _FinalStage { - SelfServiceProfileUserAttribute build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, DescriptionStage, IsOptionalStage, _FinalStage { - private String name; - - private String description; - - private boolean isOptional; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SelfServiceProfileUserAttribute other) { - name(other.getName()); - description(other.getDescription()); - isOptional(other.getIsOptional()); - return this; - } - - /** - *

Identifier of this attribute.

- *

Identifier of this attribute.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public DescriptionStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - /** - *

Description of this attribute.

- *

Description of this attribute.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("description") - public IsOptionalStage description(@NotNull String description) { - this.description = Objects.requireNonNull(description, "description must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("is_optional") - public _FinalStage isOptional(boolean isOptional) { - this.isOptional = isOptional; - return this; - } - - @java.lang.Override - public SelfServiceProfileUserAttribute build() { - return new SelfServiceProfileUserAttribute(name, description, isOptional, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SessionAuthenticationSignal.java b/src/main/java/com/auth0/client/mgmt/types/SessionAuthenticationSignal.java deleted file mode 100644 index 0f3409d56..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SessionAuthenticationSignal.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SessionAuthenticationSignal.Builder.class) -public final class SessionAuthenticationSignal { - private final Optional name; - - private final Optional timestamp; - - private final Optional type; - - private final Map additionalProperties; - - private SessionAuthenticationSignal( - Optional name, - Optional timestamp, - Optional type, - Map additionalProperties) { - this.name = name; - this.timestamp = timestamp; - this.type = type; - this.additionalProperties = additionalProperties; - } - - /** - * @return One of: "federated", "passkey", "pwd", "sms", "email", "mfa", "mock" or a custom method denoted by a URL - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("timestamp") - public Optional getTimestamp() { - return timestamp; - } - - /** - * @return A specific MFA factor. Only present when "name" is set to "mfa" - */ - @JsonProperty("type") - public Optional getType() { - return type; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SessionAuthenticationSignal && equalTo((SessionAuthenticationSignal) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SessionAuthenticationSignal other) { - return name.equals(other.name) && timestamp.equals(other.timestamp) && type.equals(other.type); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.timestamp, 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 name = Optional.empty(); - - private Optional timestamp = Optional.empty(); - - private Optional type = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SessionAuthenticationSignal other) { - name(other.getName()); - timestamp(other.getTimestamp()); - type(other.getType()); - return this; - } - - /** - *

One of: "federated", "passkey", "pwd", "sms", "email", "mfa", "mock" or a custom method denoted by a URL

- */ - @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 = "timestamp", nulls = Nulls.SKIP) - public Builder timestamp(Optional timestamp) { - this.timestamp = timestamp; - return this; - } - - public Builder timestamp(SessionDate timestamp) { - this.timestamp = Optional.ofNullable(timestamp); - return this; - } - - /** - *

A specific MFA factor. Only present when "name" is set to "mfa"

- */ - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(String type) { - this.type = Optional.ofNullable(type); - return this; - } - - public SessionAuthenticationSignal build() { - return new SessionAuthenticationSignal(name, timestamp, type, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SessionAuthenticationSignals.java b/src/main/java/com/auth0/client/mgmt/types/SessionAuthenticationSignals.java deleted file mode 100644 index d12ab5d88..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SessionAuthenticationSignals.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SessionAuthenticationSignals.Builder.class) -public final class SessionAuthenticationSignals { - private final Optional> methods; - - private final Map additionalProperties; - - private SessionAuthenticationSignals( - Optional> methods, Map additionalProperties) { - this.methods = methods; - this.additionalProperties = additionalProperties; - } - - /** - * @return Contains the authentication methods a user has completed during their session - */ - @JsonProperty("methods") - public Optional> getMethods() { - return methods; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SessionAuthenticationSignals && equalTo((SessionAuthenticationSignals) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SessionAuthenticationSignals other) { - return methods.equals(other.methods); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.methods); - } - - @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> methods = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SessionAuthenticationSignals other) { - methods(other.getMethods()); - return this; - } - - /** - *

Contains the authentication methods a user has completed during their session

- */ - @JsonSetter(value = "methods", nulls = Nulls.SKIP) - public Builder methods(Optional> methods) { - this.methods = methods; - return this; - } - - public Builder methods(List methods) { - this.methods = Optional.ofNullable(methods); - return this; - } - - public SessionAuthenticationSignals build() { - return new SessionAuthenticationSignals(methods, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SessionClientMetadata.java b/src/main/java/com/auth0/client/mgmt/types/SessionClientMetadata.java deleted file mode 100644 index 1d841f73b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SessionClientMetadata.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SessionClientMetadata.Builder.class) -public final class SessionClientMetadata { - private final Optional clientId; - - private final Map additionalProperties; - - private SessionClientMetadata(Optional clientId, Map additionalProperties) { - this.clientId = clientId; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of client for the session - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SessionClientMetadata && equalTo((SessionClientMetadata) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SessionClientMetadata other) { - return clientId.equals(other.clientId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.clientId); - } - - @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(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SessionClientMetadata other) { - clientId(other.getClientId()); - return this; - } - - /** - *

ID of client for the session

- */ - @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; - } - - public SessionClientMetadata build() { - return new SessionClientMetadata(clientId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SessionCookieMetadata.java b/src/main/java/com/auth0/client/mgmt/types/SessionCookieMetadata.java deleted file mode 100644 index 459ef0888..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SessionCookieMetadata.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SessionCookieMetadata.Builder.class) -public final class SessionCookieMetadata { - private final Optional mode; - - private final Map additionalProperties; - - private SessionCookieMetadata( - Optional mode, Map additionalProperties) { - this.mode = mode; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("mode") - public Optional getMode() { - return mode; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SessionCookieMetadata && equalTo((SessionCookieMetadata) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SessionCookieMetadata other) { - return mode.equals(other.mode); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.mode); - } - - @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 mode = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SessionCookieMetadata other) { - mode(other.getMode()); - return this; - } - - @JsonSetter(value = "mode", nulls = Nulls.SKIP) - public Builder mode(Optional mode) { - this.mode = mode; - return this; - } - - public Builder mode(SessionCookieMetadataModeEnum mode) { - this.mode = Optional.ofNullable(mode); - return this; - } - - public SessionCookieMetadata build() { - return new SessionCookieMetadata(mode, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SessionCookieMetadataModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/SessionCookieMetadataModeEnum.java deleted file mode 100644 index c082d2237..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SessionCookieMetadataModeEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class SessionCookieMetadataModeEnum { - public static final SessionCookieMetadataModeEnum NON_PERSISTENT = - new SessionCookieMetadataModeEnum(Value.NON_PERSISTENT, "non-persistent"); - - public static final SessionCookieMetadataModeEnum PERSISTENT = - new SessionCookieMetadataModeEnum(Value.PERSISTENT, "persistent"); - - private final Value value; - - private final String string; - - SessionCookieMetadataModeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof SessionCookieMetadataModeEnum - && this.string.equals(((SessionCookieMetadataModeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case NON_PERSISTENT: - return visitor.visitNonPersistent(); - case PERSISTENT: - return visitor.visitPersistent(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static SessionCookieMetadataModeEnum valueOf(String value) { - switch (value) { - case "non-persistent": - return NON_PERSISTENT; - case "persistent": - return PERSISTENT; - default: - return new SessionCookieMetadataModeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - NON_PERSISTENT, - - PERSISTENT, - - UNKNOWN - } - - public interface Visitor { - T visitNonPersistent(); - - T visitPersistent(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SessionCookieModeEnum.java b/src/main/java/com/auth0/client/mgmt/types/SessionCookieModeEnum.java deleted file mode 100644 index 56933f15e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SessionCookieModeEnum.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class SessionCookieModeEnum { - public static final SessionCookieModeEnum NON_PERSISTENT = - new SessionCookieModeEnum(Value.NON_PERSISTENT, "non-persistent"); - - public static final SessionCookieModeEnum PERSISTENT = new SessionCookieModeEnum(Value.PERSISTENT, "persistent"); - - private final Value value; - - private final String string; - - SessionCookieModeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof SessionCookieModeEnum - && this.string.equals(((SessionCookieModeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case NON_PERSISTENT: - return visitor.visitNonPersistent(); - case PERSISTENT: - return visitor.visitPersistent(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static SessionCookieModeEnum valueOf(String value) { - switch (value) { - case "non-persistent": - return NON_PERSISTENT; - case "persistent": - return PERSISTENT; - default: - return new SessionCookieModeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PERSISTENT, - - NON_PERSISTENT, - - UNKNOWN - } - - public interface Visitor { - T visitPersistent(); - - T visitNonPersistent(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SessionCookieSchema.java b/src/main/java/com/auth0/client/mgmt/types/SessionCookieSchema.java deleted file mode 100644 index 68e8bd009..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SessionCookieSchema.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = SessionCookieSchema.Builder.class) -public final class SessionCookieSchema { - private final SessionCookieModeEnum mode; - - private final Map additionalProperties; - - private SessionCookieSchema(SessionCookieModeEnum mode, Map additionalProperties) { - this.mode = mode; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("mode") - public SessionCookieModeEnum getMode() { - return mode; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SessionCookieSchema && equalTo((SessionCookieSchema) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SessionCookieSchema other) { - return mode.equals(other.mode); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.mode); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ModeStage builder() { - return new Builder(); - } - - public interface ModeStage { - _FinalStage mode(@NotNull SessionCookieModeEnum mode); - - Builder from(SessionCookieSchema other); - } - - public interface _FinalStage { - SessionCookieSchema build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ModeStage, _FinalStage { - private SessionCookieModeEnum mode; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SessionCookieSchema other) { - mode(other.getMode()); - return this; - } - - @java.lang.Override - @JsonSetter("mode") - public _FinalStage mode(@NotNull SessionCookieModeEnum mode) { - this.mode = Objects.requireNonNull(mode, "mode must not be null"); - return this; - } - - @java.lang.Override - public SessionCookieSchema build() { - return new SessionCookieSchema(mode, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SessionDate.java b/src/main/java/com/auth0/client/mgmt/types/SessionDate.java deleted file mode 100644 index 0c78619bd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SessionDate.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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.time.OffsetDateTime; -import java.util.Map; -import java.util.Objects; - -@JsonDeserialize(using = SessionDate.Deserializer.class) -public final class SessionDate { - private final Object value; - - private final int type; - - private SessionDate(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((OffsetDateTime) this.value); - } else if (this.type == 1) { - return visitor.visit((Map) 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 SessionDate && equalTo((SessionDate) other); - } - - private boolean equalTo(SessionDate 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 SessionDate of(OffsetDateTime value) { - return new SessionDate(value, 0); - } - - public static SessionDate of(Map value) { - return new SessionDate(value, 1); - } - - public interface Visitor { - T visit(OffsetDateTime value); - - T visit(Map value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(SessionDate.class); - } - - @java.lang.Override - public SessionDate deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, OffsetDateTime.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/SessionDeviceMetadata.java b/src/main/java/com/auth0/client/mgmt/types/SessionDeviceMetadata.java deleted file mode 100644 index 1da1dccac..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SessionDeviceMetadata.java +++ /dev/null @@ -1,306 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = SessionDeviceMetadata.Builder.class) -public final class SessionDeviceMetadata { - private final Optional initialUserAgent; - - private final OptionalNullable initialIp; - - private final Optional initialAsn; - - private final Optional lastUserAgent; - - private final OptionalNullable lastIp; - - private final Optional lastAsn; - - private final Map additionalProperties; - - private SessionDeviceMetadata( - Optional initialUserAgent, - OptionalNullable initialIp, - Optional initialAsn, - Optional lastUserAgent, - OptionalNullable lastIp, - Optional lastAsn, - Map additionalProperties) { - this.initialUserAgent = initialUserAgent; - this.initialIp = initialIp; - this.initialAsn = initialAsn; - this.lastUserAgent = lastUserAgent; - this.lastIp = lastIp; - this.lastAsn = lastAsn; - this.additionalProperties = additionalProperties; - } - - /** - * @return First user agent of the device from which this user logged in - */ - @JsonProperty("initial_user_agent") - public Optional getInitialUserAgent() { - return initialUserAgent; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("initial_ip") - public OptionalNullable getInitialIp() { - if (initialIp == null) { - return OptionalNullable.absent(); - } - return initialIp; - } - - /** - * @return First autonomous system number associated with this session - */ - @JsonProperty("initial_asn") - public Optional getInitialAsn() { - return initialAsn; - } - - /** - * @return Last user agent of the device from which this user logged in - */ - @JsonProperty("last_user_agent") - public Optional getLastUserAgent() { - return lastUserAgent; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("last_ip") - public OptionalNullable getLastIp() { - if (lastIp == null) { - return OptionalNullable.absent(); - } - return lastIp; - } - - /** - * @return Last autonomous system number from which this user logged in - */ - @JsonProperty("last_asn") - public Optional getLastAsn() { - return lastAsn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("initial_ip") - private OptionalNullable _getInitialIp() { - return initialIp; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("last_ip") - private OptionalNullable _getLastIp() { - return lastIp; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SessionDeviceMetadata && equalTo((SessionDeviceMetadata) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SessionDeviceMetadata other) { - return initialUserAgent.equals(other.initialUserAgent) - && initialIp.equals(other.initialIp) - && initialAsn.equals(other.initialAsn) - && lastUserAgent.equals(other.lastUserAgent) - && lastIp.equals(other.lastIp) - && lastAsn.equals(other.lastAsn); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.initialUserAgent, this.initialIp, this.initialAsn, this.lastUserAgent, this.lastIp, this.lastAsn); - } - - @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 initialUserAgent = Optional.empty(); - - private OptionalNullable initialIp = OptionalNullable.absent(); - - private Optional initialAsn = Optional.empty(); - - private Optional lastUserAgent = Optional.empty(); - - private OptionalNullable lastIp = OptionalNullable.absent(); - - private Optional lastAsn = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SessionDeviceMetadata other) { - initialUserAgent(other.getInitialUserAgent()); - initialIp(other.getInitialIp()); - initialAsn(other.getInitialAsn()); - lastUserAgent(other.getLastUserAgent()); - lastIp(other.getLastIp()); - lastAsn(other.getLastAsn()); - return this; - } - - /** - *

First user agent of the device from which this user logged in

- */ - @JsonSetter(value = "initial_user_agent", nulls = Nulls.SKIP) - public Builder initialUserAgent(Optional initialUserAgent) { - this.initialUserAgent = initialUserAgent; - return this; - } - - public Builder initialUserAgent(String initialUserAgent) { - this.initialUserAgent = Optional.ofNullable(initialUserAgent); - return this; - } - - @JsonSetter(value = "initial_ip", nulls = Nulls.SKIP) - public Builder initialIp(@Nullable OptionalNullable initialIp) { - this.initialIp = initialIp; - return this; - } - - public Builder initialIp(String initialIp) { - this.initialIp = OptionalNullable.of(initialIp); - return this; - } - - public Builder initialIp(Optional initialIp) { - if (initialIp.isPresent()) { - this.initialIp = OptionalNullable.of(initialIp.get()); - } else { - this.initialIp = OptionalNullable.absent(); - } - return this; - } - - public Builder initialIp(com.auth0.client.mgmt.core.Nullable initialIp) { - if (initialIp.isNull()) { - this.initialIp = OptionalNullable.ofNull(); - } else if (initialIp.isEmpty()) { - this.initialIp = OptionalNullable.absent(); - } else { - this.initialIp = OptionalNullable.of(initialIp.get()); - } - return this; - } - - /** - *

First autonomous system number associated with this session

- */ - @JsonSetter(value = "initial_asn", nulls = Nulls.SKIP) - public Builder initialAsn(Optional initialAsn) { - this.initialAsn = initialAsn; - return this; - } - - public Builder initialAsn(String initialAsn) { - this.initialAsn = Optional.ofNullable(initialAsn); - return this; - } - - /** - *

Last user agent of the device from which this user logged in

- */ - @JsonSetter(value = "last_user_agent", nulls = Nulls.SKIP) - public Builder lastUserAgent(Optional lastUserAgent) { - this.lastUserAgent = lastUserAgent; - return this; - } - - public Builder lastUserAgent(String lastUserAgent) { - this.lastUserAgent = Optional.ofNullable(lastUserAgent); - return this; - } - - @JsonSetter(value = "last_ip", nulls = Nulls.SKIP) - public Builder lastIp(@Nullable OptionalNullable lastIp) { - this.lastIp = lastIp; - return this; - } - - public Builder lastIp(String lastIp) { - this.lastIp = OptionalNullable.of(lastIp); - return this; - } - - public Builder lastIp(Optional lastIp) { - if (lastIp.isPresent()) { - this.lastIp = OptionalNullable.of(lastIp.get()); - } else { - this.lastIp = OptionalNullable.absent(); - } - return this; - } - - public Builder lastIp(com.auth0.client.mgmt.core.Nullable lastIp) { - if (lastIp.isNull()) { - this.lastIp = OptionalNullable.ofNull(); - } else if (lastIp.isEmpty()) { - this.lastIp = OptionalNullable.absent(); - } else { - this.lastIp = OptionalNullable.of(lastIp.get()); - } - return this; - } - - /** - *

Last autonomous system number from which this user logged in

- */ - @JsonSetter(value = "last_asn", nulls = Nulls.SKIP) - public Builder lastAsn(Optional lastAsn) { - this.lastAsn = lastAsn; - return this; - } - - public Builder lastAsn(String lastAsn) { - this.lastAsn = Optional.ofNullable(lastAsn); - return this; - } - - public SessionDeviceMetadata build() { - return new SessionDeviceMetadata( - initialUserAgent, initialIp, initialAsn, lastUserAgent, lastIp, lastAsn, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SessionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SessionResponseContent.java deleted file mode 100644 index d9d9ddc12..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SessionResponseContent.java +++ /dev/null @@ -1,464 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = SessionResponseContent.Builder.class) -public final class SessionResponseContent { - private final Optional id; - - private final Optional userId; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional authenticatedAt; - - private final Optional idleExpiresAt; - - private final Optional expiresAt; - - private final Optional lastInteractedAt; - - private final Optional device; - - private final Optional> clients; - - private final Optional authentication; - - private final Optional cookie; - - private final OptionalNullable> sessionMetadata; - - private final Map additionalProperties; - - private SessionResponseContent( - Optional id, - Optional userId, - Optional createdAt, - Optional updatedAt, - Optional authenticatedAt, - Optional idleExpiresAt, - Optional expiresAt, - Optional lastInteractedAt, - Optional device, - Optional> clients, - Optional authentication, - Optional cookie, - OptionalNullable> sessionMetadata, - Map additionalProperties) { - this.id = id; - this.userId = userId; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.authenticatedAt = authenticatedAt; - this.idleExpiresAt = idleExpiresAt; - this.expiresAt = expiresAt; - this.lastInteractedAt = lastInteractedAt; - this.device = device; - this.clients = clients; - this.authentication = authentication; - this.cookie = cookie; - this.sessionMetadata = sessionMetadata; - this.additionalProperties = additionalProperties; - } - - /** - * @return The ID of the session - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return ID of the user which can be used when interacting with other APIs. - */ - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("authenticated_at") - public Optional getAuthenticatedAt() { - return authenticatedAt; - } - - @JsonProperty("idle_expires_at") - public Optional getIdleExpiresAt() { - return idleExpiresAt; - } - - @JsonProperty("expires_at") - public Optional getExpiresAt() { - return expiresAt; - } - - @JsonProperty("last_interacted_at") - public Optional getLastInteractedAt() { - return lastInteractedAt; - } - - @JsonProperty("device") - public Optional getDevice() { - return device; - } - - /** - * @return List of client details for the session - */ - @JsonProperty("clients") - public Optional> getClients() { - return clients; - } - - @JsonProperty("authentication") - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("cookie") - public Optional getCookie() { - return cookie; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_metadata") - public OptionalNullable> getSessionMetadata() { - if (sessionMetadata == null) { - return OptionalNullable.absent(); - } - return sessionMetadata; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_metadata") - private OptionalNullable> _getSessionMetadata() { - return sessionMetadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SessionResponseContent && equalTo((SessionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SessionResponseContent other) { - return id.equals(other.id) - && userId.equals(other.userId) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && authenticatedAt.equals(other.authenticatedAt) - && idleExpiresAt.equals(other.idleExpiresAt) - && expiresAt.equals(other.expiresAt) - && lastInteractedAt.equals(other.lastInteractedAt) - && device.equals(other.device) - && clients.equals(other.clients) - && authentication.equals(other.authentication) - && cookie.equals(other.cookie) - && sessionMetadata.equals(other.sessionMetadata); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.userId, - this.createdAt, - this.updatedAt, - this.authenticatedAt, - this.idleExpiresAt, - this.expiresAt, - this.lastInteractedAt, - this.device, - this.clients, - this.authentication, - this.cookie, - this.sessionMetadata); - } - - @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 userId = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional authenticatedAt = Optional.empty(); - - private Optional idleExpiresAt = Optional.empty(); - - private Optional expiresAt = Optional.empty(); - - private Optional lastInteractedAt = Optional.empty(); - - private Optional device = Optional.empty(); - - private Optional> clients = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional cookie = Optional.empty(); - - private OptionalNullable> sessionMetadata = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SessionResponseContent other) { - id(other.getId()); - userId(other.getUserId()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - authenticatedAt(other.getAuthenticatedAt()); - idleExpiresAt(other.getIdleExpiresAt()); - expiresAt(other.getExpiresAt()); - lastInteractedAt(other.getLastInteractedAt()); - device(other.getDevice()); - clients(other.getClients()); - authentication(other.getAuthentication()); - cookie(other.getCookie()); - sessionMetadata(other.getSessionMetadata()); - return this; - } - - /** - *

The ID of the session

- */ - @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; - } - - /** - *

ID of the user which can be used when interacting with other APIs.

- */ - @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; - } - - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(SessionDate createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - public Builder updatedAt(SessionDate updatedAt) { - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - @JsonSetter(value = "authenticated_at", nulls = Nulls.SKIP) - public Builder authenticatedAt(Optional authenticatedAt) { - this.authenticatedAt = authenticatedAt; - return this; - } - - public Builder authenticatedAt(SessionDate authenticatedAt) { - this.authenticatedAt = Optional.ofNullable(authenticatedAt); - return this; - } - - @JsonSetter(value = "idle_expires_at", nulls = Nulls.SKIP) - public Builder idleExpiresAt(Optional idleExpiresAt) { - this.idleExpiresAt = idleExpiresAt; - return this; - } - - public Builder idleExpiresAt(SessionDate idleExpiresAt) { - this.idleExpiresAt = Optional.ofNullable(idleExpiresAt); - return this; - } - - @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - public Builder expiresAt(SessionDate expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); - return this; - } - - @JsonSetter(value = "last_interacted_at", nulls = Nulls.SKIP) - public Builder lastInteractedAt(Optional lastInteractedAt) { - this.lastInteractedAt = lastInteractedAt; - return this; - } - - public Builder lastInteractedAt(SessionDate lastInteractedAt) { - this.lastInteractedAt = Optional.ofNullable(lastInteractedAt); - return this; - } - - @JsonSetter(value = "device", nulls = Nulls.SKIP) - public Builder device(Optional device) { - this.device = device; - return this; - } - - public Builder device(SessionDeviceMetadata device) { - this.device = Optional.ofNullable(device); - return this; - } - - /** - *

List of client details for the session

- */ - @JsonSetter(value = "clients", nulls = Nulls.SKIP) - public Builder clients(Optional> clients) { - this.clients = clients; - return this; - } - - public Builder clients(List clients) { - this.clients = Optional.ofNullable(clients); - return this; - } - - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public Builder authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - public Builder authentication(SessionAuthenticationSignals authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @JsonSetter(value = "cookie", nulls = Nulls.SKIP) - public Builder cookie(Optional cookie) { - this.cookie = cookie; - return this; - } - - public Builder cookie(SessionCookieMetadata cookie) { - this.cookie = Optional.ofNullable(cookie); - return this; - } - - @JsonSetter(value = "session_metadata", nulls = Nulls.SKIP) - public Builder sessionMetadata(@Nullable OptionalNullable> sessionMetadata) { - this.sessionMetadata = sessionMetadata; - return this; - } - - public Builder sessionMetadata(Map sessionMetadata) { - this.sessionMetadata = OptionalNullable.of(sessionMetadata); - return this; - } - - public Builder sessionMetadata(Optional> sessionMetadata) { - if (sessionMetadata.isPresent()) { - this.sessionMetadata = OptionalNullable.of(sessionMetadata.get()); - } else { - this.sessionMetadata = OptionalNullable.absent(); - } - return this; - } - - public Builder sessionMetadata(com.auth0.client.mgmt.core.Nullable> sessionMetadata) { - if (sessionMetadata.isNull()) { - this.sessionMetadata = OptionalNullable.ofNull(); - } else if (sessionMetadata.isEmpty()) { - this.sessionMetadata = OptionalNullable.absent(); - } else { - this.sessionMetadata = OptionalNullable.of(sessionMetadata.get()); - } - return this; - } - - public SessionResponseContent build() { - return new SessionResponseContent( - id, - userId, - createdAt, - updatedAt, - authenticatedAt, - idleExpiresAt, - expiresAt, - lastInteractedAt, - device, - clients, - authentication, - cookie, - sessionMetadata, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetCustomSigningKeysResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetCustomSigningKeysResponseContent.java deleted file mode 100644 index 41989a253..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetCustomSigningKeysResponseContent.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SetCustomSigningKeysResponseContent.Builder.class) -public final class SetCustomSigningKeysResponseContent { - private final Optional> keys; - - private final Map additionalProperties; - - private SetCustomSigningKeysResponseContent( - Optional> keys, Map additionalProperties) { - this.keys = keys; - this.additionalProperties = additionalProperties; - } - - /** - * @return An array of custom public signing keys. - */ - @JsonProperty("keys") - public Optional> getKeys() { - return keys; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetCustomSigningKeysResponseContent - && equalTo((SetCustomSigningKeysResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetCustomSigningKeysResponseContent 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 Optional> keys = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetCustomSigningKeysResponseContent other) { - keys(other.getKeys()); - return this; - } - - /** - *

An array of custom public signing keys.

- */ - @JsonSetter(value = "keys", nulls = Nulls.SKIP) - public Builder keys(Optional> keys) { - this.keys = keys; - return this; - } - - public Builder keys(List keys) { - this.keys = Optional.ofNullable(keys); - return this; - } - - public SetCustomSigningKeysResponseContent build() { - return new SetCustomSigningKeysResponseContent(keys, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetEmailTemplateRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/SetEmailTemplateRequestContent.java deleted file mode 100644 index 6932d5194..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetEmailTemplateRequestContent.java +++ /dev/null @@ -1,780 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.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 = SetEmailTemplateRequestContent.Builder.class) -public final class SetEmailTemplateRequestContent { - private final EmailTemplateNameEnum template; - - private final OptionalNullable body; - - private final OptionalNullable from; - - private final OptionalNullable resultUrl; - - private final OptionalNullable subject; - - private final OptionalNullable syntax; - - private final OptionalNullable urlLifetimeInSeconds; - - private final Optional includeEmailInRedirect; - - private final OptionalNullable enabled; - - private final Map additionalProperties; - - private SetEmailTemplateRequestContent( - EmailTemplateNameEnum template, - OptionalNullable body, - OptionalNullable from, - OptionalNullable resultUrl, - OptionalNullable subject, - OptionalNullable syntax, - OptionalNullable urlLifetimeInSeconds, - Optional includeEmailInRedirect, - OptionalNullable enabled, - Map additionalProperties) { - this.template = template; - this.body = body; - this.from = from; - this.resultUrl = resultUrl; - this.subject = subject; - this.syntax = syntax; - this.urlLifetimeInSeconds = urlLifetimeInSeconds; - this.includeEmailInRedirect = includeEmailInRedirect; - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("template") - public EmailTemplateNameEnum getTemplate() { - return template; - } - - /** - * @return Body of the email template. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("body") - public OptionalNullable getBody() { - if (body == null) { - return OptionalNullable.absent(); - } - return body; - } - - /** - * @return Senders from email address. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - public OptionalNullable getFrom() { - if (from == null) { - return OptionalNullable.absent(); - } - return from; - } - - /** - * @return URL to redirect the user to after a successful action. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("resultUrl") - public OptionalNullable getResultUrl() { - if (resultUrl == null) { - return OptionalNullable.absent(); - } - return resultUrl; - } - - /** - * @return Subject line of the email. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("subject") - public OptionalNullable getSubject() { - if (subject == null) { - return OptionalNullable.absent(); - } - return subject; - } - - /** - * @return Syntax of the template body. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("syntax") - public OptionalNullable getSyntax() { - if (syntax == null) { - return OptionalNullable.absent(); - } - return syntax; - } - - /** - * @return Lifetime in seconds that the link within the email will be valid for. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("urlLifetimeInSeconds") - public OptionalNullable getUrlLifetimeInSeconds() { - if (urlLifetimeInSeconds == null) { - return OptionalNullable.absent(); - } - return urlLifetimeInSeconds; - } - - /** - * @return Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. - */ - @JsonProperty("includeEmailInRedirect") - public Optional getIncludeEmailInRedirect() { - return includeEmailInRedirect; - } - - /** - * @return Whether the template is enabled (true) or disabled (false). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("enabled") - public OptionalNullable getEnabled() { - if (enabled == null) { - return OptionalNullable.absent(); - } - return enabled; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("body") - private OptionalNullable _getBody() { - return body; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - private OptionalNullable _getFrom() { - return from; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("resultUrl") - private OptionalNullable _getResultUrl() { - return resultUrl; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("subject") - private OptionalNullable _getSubject() { - return subject; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("syntax") - private OptionalNullable _getSyntax() { - return syntax; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("urlLifetimeInSeconds") - private OptionalNullable _getUrlLifetimeInSeconds() { - return urlLifetimeInSeconds; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("enabled") - private OptionalNullable _getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetEmailTemplateRequestContent && equalTo((SetEmailTemplateRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetEmailTemplateRequestContent other) { - return template.equals(other.template) - && body.equals(other.body) - && from.equals(other.from) - && resultUrl.equals(other.resultUrl) - && subject.equals(other.subject) - && syntax.equals(other.syntax) - && urlLifetimeInSeconds.equals(other.urlLifetimeInSeconds) - && includeEmailInRedirect.equals(other.includeEmailInRedirect) - && enabled.equals(other.enabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.template, - this.body, - this.from, - this.resultUrl, - this.subject, - this.syntax, - this.urlLifetimeInSeconds, - this.includeEmailInRedirect, - this.enabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TemplateStage builder() { - return new Builder(); - } - - public interface TemplateStage { - _FinalStage template(@NotNull EmailTemplateNameEnum template); - - Builder from(SetEmailTemplateRequestContent other); - } - - public interface _FinalStage { - SetEmailTemplateRequestContent build(); - - /** - *

Body of the email template.

- */ - _FinalStage body(@Nullable OptionalNullable body); - - _FinalStage body(String body); - - _FinalStage body(Optional body); - - _FinalStage body(com.auth0.client.mgmt.core.Nullable body); - - /** - *

Senders from email address.

- */ - _FinalStage from(@Nullable OptionalNullable from); - - _FinalStage from(String from); - - _FinalStage from(Optional from); - - _FinalStage from(com.auth0.client.mgmt.core.Nullable from); - - /** - *

URL to redirect the user to after a successful action.

- */ - _FinalStage resultUrl(@Nullable OptionalNullable resultUrl); - - _FinalStage resultUrl(String resultUrl); - - _FinalStage resultUrl(Optional resultUrl); - - _FinalStage resultUrl(com.auth0.client.mgmt.core.Nullable resultUrl); - - /** - *

Subject line of the email.

- */ - _FinalStage subject(@Nullable OptionalNullable subject); - - _FinalStage subject(String subject); - - _FinalStage subject(Optional subject); - - _FinalStage subject(com.auth0.client.mgmt.core.Nullable subject); - - /** - *

Syntax of the template body.

- */ - _FinalStage syntax(@Nullable OptionalNullable syntax); - - _FinalStage syntax(String syntax); - - _FinalStage syntax(Optional syntax); - - _FinalStage syntax(com.auth0.client.mgmt.core.Nullable syntax); - - /** - *

Lifetime in seconds that the link within the email will be valid for.

- */ - _FinalStage urlLifetimeInSeconds(@Nullable OptionalNullable urlLifetimeInSeconds); - - _FinalStage urlLifetimeInSeconds(Double urlLifetimeInSeconds); - - _FinalStage urlLifetimeInSeconds(Optional urlLifetimeInSeconds); - - _FinalStage urlLifetimeInSeconds(com.auth0.client.mgmt.core.Nullable urlLifetimeInSeconds); - - /** - *

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

- */ - _FinalStage includeEmailInRedirect(Optional includeEmailInRedirect); - - _FinalStage includeEmailInRedirect(Boolean includeEmailInRedirect); - - /** - *

Whether the template is enabled (true) or disabled (false).

- */ - _FinalStage enabled(@Nullable OptionalNullable enabled); - - _FinalStage enabled(Boolean enabled); - - _FinalStage enabled(Optional enabled); - - _FinalStage enabled(com.auth0.client.mgmt.core.Nullable enabled); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TemplateStage, _FinalStage { - private EmailTemplateNameEnum template; - - private OptionalNullable enabled = OptionalNullable.absent(); - - private Optional includeEmailInRedirect = Optional.empty(); - - private OptionalNullable urlLifetimeInSeconds = OptionalNullable.absent(); - - private OptionalNullable syntax = OptionalNullable.absent(); - - private OptionalNullable subject = OptionalNullable.absent(); - - private OptionalNullable resultUrl = OptionalNullable.absent(); - - private OptionalNullable from = OptionalNullable.absent(); - - private OptionalNullable body = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SetEmailTemplateRequestContent other) { - template(other.getTemplate()); - body(other.getBody()); - from(other.getFrom()); - resultUrl(other.getResultUrl()); - subject(other.getSubject()); - syntax(other.getSyntax()); - urlLifetimeInSeconds(other.getUrlLifetimeInSeconds()); - includeEmailInRedirect(other.getIncludeEmailInRedirect()); - enabled(other.getEnabled()); - return this; - } - - @java.lang.Override - @JsonSetter("template") - public _FinalStage template(@NotNull EmailTemplateNameEnum template) { - this.template = Objects.requireNonNull(template, "template must not be null"); - return this; - } - - /** - *

Whether the template is enabled (true) or disabled (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage enabled(com.auth0.client.mgmt.core.Nullable enabled) { - if (enabled.isNull()) { - this.enabled = OptionalNullable.ofNull(); - } else if (enabled.isEmpty()) { - this.enabled = OptionalNullable.absent(); - } else { - this.enabled = OptionalNullable.of(enabled.get()); - } - return this; - } - - /** - *

Whether the template is enabled (true) or disabled (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage enabled(Optional enabled) { - if (enabled.isPresent()) { - this.enabled = OptionalNullable.of(enabled.get()); - } else { - this.enabled = OptionalNullable.absent(); - } - return this; - } - - /** - *

Whether the template is enabled (true) or disabled (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage enabled(Boolean enabled) { - this.enabled = OptionalNullable.of(enabled); - return this; - } - - /** - *

Whether the template is enabled (true) or disabled (false).

- */ - @java.lang.Override - @JsonSetter(value = "enabled", nulls = Nulls.SKIP) - public _FinalStage enabled(@Nullable OptionalNullable enabled) { - this.enabled = enabled; - return this; - } - - /** - *

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage includeEmailInRedirect(Boolean includeEmailInRedirect) { - this.includeEmailInRedirect = Optional.ofNullable(includeEmailInRedirect); - return this; - } - - /** - *

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

- */ - @java.lang.Override - @JsonSetter(value = "includeEmailInRedirect", nulls = Nulls.SKIP) - public _FinalStage includeEmailInRedirect(Optional includeEmailInRedirect) { - this.includeEmailInRedirect = includeEmailInRedirect; - return this; - } - - /** - *

Lifetime in seconds that the link within the email will be valid for.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage urlLifetimeInSeconds(com.auth0.client.mgmt.core.Nullable urlLifetimeInSeconds) { - if (urlLifetimeInSeconds.isNull()) { - this.urlLifetimeInSeconds = OptionalNullable.ofNull(); - } else if (urlLifetimeInSeconds.isEmpty()) { - this.urlLifetimeInSeconds = OptionalNullable.absent(); - } else { - this.urlLifetimeInSeconds = OptionalNullable.of(urlLifetimeInSeconds.get()); - } - return this; - } - - /** - *

Lifetime in seconds that the link within the email will be valid for.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage urlLifetimeInSeconds(Optional urlLifetimeInSeconds) { - if (urlLifetimeInSeconds.isPresent()) { - this.urlLifetimeInSeconds = OptionalNullable.of(urlLifetimeInSeconds.get()); - } else { - this.urlLifetimeInSeconds = OptionalNullable.absent(); - } - return this; - } - - /** - *

Lifetime in seconds that the link within the email will be valid for.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage urlLifetimeInSeconds(Double urlLifetimeInSeconds) { - this.urlLifetimeInSeconds = OptionalNullable.of(urlLifetimeInSeconds); - return this; - } - - /** - *

Lifetime in seconds that the link within the email will be valid for.

- */ - @java.lang.Override - @JsonSetter(value = "urlLifetimeInSeconds", nulls = Nulls.SKIP) - public _FinalStage urlLifetimeInSeconds(@Nullable OptionalNullable urlLifetimeInSeconds) { - this.urlLifetimeInSeconds = urlLifetimeInSeconds; - return this; - } - - /** - *

Syntax of the template body.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage syntax(com.auth0.client.mgmt.core.Nullable syntax) { - if (syntax.isNull()) { - this.syntax = OptionalNullable.ofNull(); - } else if (syntax.isEmpty()) { - this.syntax = OptionalNullable.absent(); - } else { - this.syntax = OptionalNullable.of(syntax.get()); - } - return this; - } - - /** - *

Syntax of the template body.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage syntax(Optional syntax) { - if (syntax.isPresent()) { - this.syntax = OptionalNullable.of(syntax.get()); - } else { - this.syntax = OptionalNullable.absent(); - } - return this; - } - - /** - *

Syntax of the template body.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage syntax(String syntax) { - this.syntax = OptionalNullable.of(syntax); - return this; - } - - /** - *

Syntax of the template body.

- */ - @java.lang.Override - @JsonSetter(value = "syntax", nulls = Nulls.SKIP) - public _FinalStage syntax(@Nullable OptionalNullable syntax) { - this.syntax = syntax; - return this; - } - - /** - *

Subject line of the email.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage subject(com.auth0.client.mgmt.core.Nullable subject) { - if (subject.isNull()) { - this.subject = OptionalNullable.ofNull(); - } else if (subject.isEmpty()) { - this.subject = OptionalNullable.absent(); - } else { - this.subject = OptionalNullable.of(subject.get()); - } - return this; - } - - /** - *

Subject line of the email.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage subject(Optional subject) { - if (subject.isPresent()) { - this.subject = OptionalNullable.of(subject.get()); - } else { - this.subject = OptionalNullable.absent(); - } - return this; - } - - /** - *

Subject line of the email.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage subject(String subject) { - this.subject = OptionalNullable.of(subject); - return this; - } - - /** - *

Subject line of the email.

- */ - @java.lang.Override - @JsonSetter(value = "subject", nulls = Nulls.SKIP) - public _FinalStage subject(@Nullable OptionalNullable subject) { - this.subject = subject; - return this; - } - - /** - *

URL to redirect the user to after a successful action.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage resultUrl(com.auth0.client.mgmt.core.Nullable resultUrl) { - if (resultUrl.isNull()) { - this.resultUrl = OptionalNullable.ofNull(); - } else if (resultUrl.isEmpty()) { - this.resultUrl = OptionalNullable.absent(); - } else { - this.resultUrl = OptionalNullable.of(resultUrl.get()); - } - return this; - } - - /** - *

URL to redirect the user to after a successful action.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage resultUrl(Optional resultUrl) { - if (resultUrl.isPresent()) { - this.resultUrl = OptionalNullable.of(resultUrl.get()); - } else { - this.resultUrl = OptionalNullable.absent(); - } - return this; - } - - /** - *

URL to redirect the user to after a successful action.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage resultUrl(String resultUrl) { - this.resultUrl = OptionalNullable.of(resultUrl); - return this; - } - - /** - *

URL to redirect the user to after a successful action.

- */ - @java.lang.Override - @JsonSetter(value = "resultUrl", nulls = Nulls.SKIP) - public _FinalStage resultUrl(@Nullable OptionalNullable resultUrl) { - this.resultUrl = resultUrl; - return this; - } - - /** - *

Senders from email address.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage 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; - } - - /** - *

Senders from email address.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage from(Optional from) { - if (from.isPresent()) { - this.from = OptionalNullable.of(from.get()); - } else { - this.from = OptionalNullable.absent(); - } - return this; - } - - /** - *

Senders from email address.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage from(String from) { - this.from = OptionalNullable.of(from); - return this; - } - - /** - *

Senders from email address.

- */ - @java.lang.Override - @JsonSetter(value = "from", nulls = Nulls.SKIP) - public _FinalStage from(@Nullable OptionalNullable from) { - this.from = from; - return this; - } - - /** - *

Body of the email template.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage body(com.auth0.client.mgmt.core.Nullable body) { - if (body.isNull()) { - this.body = OptionalNullable.ofNull(); - } else if (body.isEmpty()) { - this.body = OptionalNullable.absent(); - } else { - this.body = OptionalNullable.of(body.get()); - } - return this; - } - - /** - *

Body of the email template.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage body(Optional body) { - if (body.isPresent()) { - this.body = OptionalNullable.of(body.get()); - } else { - this.body = OptionalNullable.absent(); - } - return this; - } - - /** - *

Body of the email template.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage body(String body) { - this.body = OptionalNullable.of(body); - return this; - } - - /** - *

Body of the email template.

- */ - @java.lang.Override - @JsonSetter(value = "body", nulls = Nulls.SKIP) - public _FinalStage body(@Nullable OptionalNullable body) { - this.body = body; - return this; - } - - @java.lang.Override - public SetEmailTemplateRequestContent build() { - return new SetEmailTemplateRequestContent( - template, - body, - from, - resultUrl, - subject, - syntax, - urlLifetimeInSeconds, - includeEmailInRedirect, - enabled, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetEmailTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetEmailTemplateResponseContent.java deleted file mode 100644 index 12b45012d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetEmailTemplateResponseContent.java +++ /dev/null @@ -1,780 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.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 = SetEmailTemplateResponseContent.Builder.class) -public final class SetEmailTemplateResponseContent { - private final EmailTemplateNameEnum template; - - private final OptionalNullable body; - - private final OptionalNullable from; - - private final OptionalNullable resultUrl; - - private final OptionalNullable subject; - - private final OptionalNullable syntax; - - private final OptionalNullable urlLifetimeInSeconds; - - private final Optional includeEmailInRedirect; - - private final OptionalNullable enabled; - - private final Map additionalProperties; - - private SetEmailTemplateResponseContent( - EmailTemplateNameEnum template, - OptionalNullable body, - OptionalNullable from, - OptionalNullable resultUrl, - OptionalNullable subject, - OptionalNullable syntax, - OptionalNullable urlLifetimeInSeconds, - Optional includeEmailInRedirect, - OptionalNullable enabled, - Map additionalProperties) { - this.template = template; - this.body = body; - this.from = from; - this.resultUrl = resultUrl; - this.subject = subject; - this.syntax = syntax; - this.urlLifetimeInSeconds = urlLifetimeInSeconds; - this.includeEmailInRedirect = includeEmailInRedirect; - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("template") - public EmailTemplateNameEnum getTemplate() { - return template; - } - - /** - * @return Body of the email template. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("body") - public OptionalNullable getBody() { - if (body == null) { - return OptionalNullable.absent(); - } - return body; - } - - /** - * @return Senders from email address. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - public OptionalNullable getFrom() { - if (from == null) { - return OptionalNullable.absent(); - } - return from; - } - - /** - * @return URL to redirect the user to after a successful action. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("resultUrl") - public OptionalNullable getResultUrl() { - if (resultUrl == null) { - return OptionalNullable.absent(); - } - return resultUrl; - } - - /** - * @return Subject line of the email. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("subject") - public OptionalNullable getSubject() { - if (subject == null) { - return OptionalNullable.absent(); - } - return subject; - } - - /** - * @return Syntax of the template body. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("syntax") - public OptionalNullable getSyntax() { - if (syntax == null) { - return OptionalNullable.absent(); - } - return syntax; - } - - /** - * @return Lifetime in seconds that the link within the email will be valid for. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("urlLifetimeInSeconds") - public OptionalNullable getUrlLifetimeInSeconds() { - if (urlLifetimeInSeconds == null) { - return OptionalNullable.absent(); - } - return urlLifetimeInSeconds; - } - - /** - * @return Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. - */ - @JsonProperty("includeEmailInRedirect") - public Optional getIncludeEmailInRedirect() { - return includeEmailInRedirect; - } - - /** - * @return Whether the template is enabled (true) or disabled (false). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("enabled") - public OptionalNullable getEnabled() { - if (enabled == null) { - return OptionalNullable.absent(); - } - return enabled; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("body") - private OptionalNullable _getBody() { - return body; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - private OptionalNullable _getFrom() { - return from; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("resultUrl") - private OptionalNullable _getResultUrl() { - return resultUrl; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("subject") - private OptionalNullable _getSubject() { - return subject; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("syntax") - private OptionalNullable _getSyntax() { - return syntax; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("urlLifetimeInSeconds") - private OptionalNullable _getUrlLifetimeInSeconds() { - return urlLifetimeInSeconds; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("enabled") - private OptionalNullable _getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetEmailTemplateResponseContent && equalTo((SetEmailTemplateResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetEmailTemplateResponseContent other) { - return template.equals(other.template) - && body.equals(other.body) - && from.equals(other.from) - && resultUrl.equals(other.resultUrl) - && subject.equals(other.subject) - && syntax.equals(other.syntax) - && urlLifetimeInSeconds.equals(other.urlLifetimeInSeconds) - && includeEmailInRedirect.equals(other.includeEmailInRedirect) - && enabled.equals(other.enabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.template, - this.body, - this.from, - this.resultUrl, - this.subject, - this.syntax, - this.urlLifetimeInSeconds, - this.includeEmailInRedirect, - this.enabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TemplateStage builder() { - return new Builder(); - } - - public interface TemplateStage { - _FinalStage template(@NotNull EmailTemplateNameEnum template); - - Builder from(SetEmailTemplateResponseContent other); - } - - public interface _FinalStage { - SetEmailTemplateResponseContent build(); - - /** - *

Body of the email template.

- */ - _FinalStage body(@Nullable OptionalNullable body); - - _FinalStage body(String body); - - _FinalStage body(Optional body); - - _FinalStage body(com.auth0.client.mgmt.core.Nullable body); - - /** - *

Senders from email address.

- */ - _FinalStage from(@Nullable OptionalNullable from); - - _FinalStage from(String from); - - _FinalStage from(Optional from); - - _FinalStage from(com.auth0.client.mgmt.core.Nullable from); - - /** - *

URL to redirect the user to after a successful action.

- */ - _FinalStage resultUrl(@Nullable OptionalNullable resultUrl); - - _FinalStage resultUrl(String resultUrl); - - _FinalStage resultUrl(Optional resultUrl); - - _FinalStage resultUrl(com.auth0.client.mgmt.core.Nullable resultUrl); - - /** - *

Subject line of the email.

- */ - _FinalStage subject(@Nullable OptionalNullable subject); - - _FinalStage subject(String subject); - - _FinalStage subject(Optional subject); - - _FinalStage subject(com.auth0.client.mgmt.core.Nullable subject); - - /** - *

Syntax of the template body.

- */ - _FinalStage syntax(@Nullable OptionalNullable syntax); - - _FinalStage syntax(String syntax); - - _FinalStage syntax(Optional syntax); - - _FinalStage syntax(com.auth0.client.mgmt.core.Nullable syntax); - - /** - *

Lifetime in seconds that the link within the email will be valid for.

- */ - _FinalStage urlLifetimeInSeconds(@Nullable OptionalNullable urlLifetimeInSeconds); - - _FinalStage urlLifetimeInSeconds(Double urlLifetimeInSeconds); - - _FinalStage urlLifetimeInSeconds(Optional urlLifetimeInSeconds); - - _FinalStage urlLifetimeInSeconds(com.auth0.client.mgmt.core.Nullable urlLifetimeInSeconds); - - /** - *

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

- */ - _FinalStage includeEmailInRedirect(Optional includeEmailInRedirect); - - _FinalStage includeEmailInRedirect(Boolean includeEmailInRedirect); - - /** - *

Whether the template is enabled (true) or disabled (false).

- */ - _FinalStage enabled(@Nullable OptionalNullable enabled); - - _FinalStage enabled(Boolean enabled); - - _FinalStage enabled(Optional enabled); - - _FinalStage enabled(com.auth0.client.mgmt.core.Nullable enabled); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TemplateStage, _FinalStage { - private EmailTemplateNameEnum template; - - private OptionalNullable enabled = OptionalNullable.absent(); - - private Optional includeEmailInRedirect = Optional.empty(); - - private OptionalNullable urlLifetimeInSeconds = OptionalNullable.absent(); - - private OptionalNullable syntax = OptionalNullable.absent(); - - private OptionalNullable subject = OptionalNullable.absent(); - - private OptionalNullable resultUrl = OptionalNullable.absent(); - - private OptionalNullable from = OptionalNullable.absent(); - - private OptionalNullable body = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SetEmailTemplateResponseContent other) { - template(other.getTemplate()); - body(other.getBody()); - from(other.getFrom()); - resultUrl(other.getResultUrl()); - subject(other.getSubject()); - syntax(other.getSyntax()); - urlLifetimeInSeconds(other.getUrlLifetimeInSeconds()); - includeEmailInRedirect(other.getIncludeEmailInRedirect()); - enabled(other.getEnabled()); - return this; - } - - @java.lang.Override - @JsonSetter("template") - public _FinalStage template(@NotNull EmailTemplateNameEnum template) { - this.template = Objects.requireNonNull(template, "template must not be null"); - return this; - } - - /** - *

Whether the template is enabled (true) or disabled (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage enabled(com.auth0.client.mgmt.core.Nullable enabled) { - if (enabled.isNull()) { - this.enabled = OptionalNullable.ofNull(); - } else if (enabled.isEmpty()) { - this.enabled = OptionalNullable.absent(); - } else { - this.enabled = OptionalNullable.of(enabled.get()); - } - return this; - } - - /** - *

Whether the template is enabled (true) or disabled (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage enabled(Optional enabled) { - if (enabled.isPresent()) { - this.enabled = OptionalNullable.of(enabled.get()); - } else { - this.enabled = OptionalNullable.absent(); - } - return this; - } - - /** - *

Whether the template is enabled (true) or disabled (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage enabled(Boolean enabled) { - this.enabled = OptionalNullable.of(enabled); - return this; - } - - /** - *

Whether the template is enabled (true) or disabled (false).

- */ - @java.lang.Override - @JsonSetter(value = "enabled", nulls = Nulls.SKIP) - public _FinalStage enabled(@Nullable OptionalNullable enabled) { - this.enabled = enabled; - return this; - } - - /** - *

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage includeEmailInRedirect(Boolean includeEmailInRedirect) { - this.includeEmailInRedirect = Optional.ofNullable(includeEmailInRedirect); - return this; - } - - /** - *

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

- */ - @java.lang.Override - @JsonSetter(value = "includeEmailInRedirect", nulls = Nulls.SKIP) - public _FinalStage includeEmailInRedirect(Optional includeEmailInRedirect) { - this.includeEmailInRedirect = includeEmailInRedirect; - return this; - } - - /** - *

Lifetime in seconds that the link within the email will be valid for.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage urlLifetimeInSeconds(com.auth0.client.mgmt.core.Nullable urlLifetimeInSeconds) { - if (urlLifetimeInSeconds.isNull()) { - this.urlLifetimeInSeconds = OptionalNullable.ofNull(); - } else if (urlLifetimeInSeconds.isEmpty()) { - this.urlLifetimeInSeconds = OptionalNullable.absent(); - } else { - this.urlLifetimeInSeconds = OptionalNullable.of(urlLifetimeInSeconds.get()); - } - return this; - } - - /** - *

Lifetime in seconds that the link within the email will be valid for.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage urlLifetimeInSeconds(Optional urlLifetimeInSeconds) { - if (urlLifetimeInSeconds.isPresent()) { - this.urlLifetimeInSeconds = OptionalNullable.of(urlLifetimeInSeconds.get()); - } else { - this.urlLifetimeInSeconds = OptionalNullable.absent(); - } - return this; - } - - /** - *

Lifetime in seconds that the link within the email will be valid for.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage urlLifetimeInSeconds(Double urlLifetimeInSeconds) { - this.urlLifetimeInSeconds = OptionalNullable.of(urlLifetimeInSeconds); - return this; - } - - /** - *

Lifetime in seconds that the link within the email will be valid for.

- */ - @java.lang.Override - @JsonSetter(value = "urlLifetimeInSeconds", nulls = Nulls.SKIP) - public _FinalStage urlLifetimeInSeconds(@Nullable OptionalNullable urlLifetimeInSeconds) { - this.urlLifetimeInSeconds = urlLifetimeInSeconds; - return this; - } - - /** - *

Syntax of the template body.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage syntax(com.auth0.client.mgmt.core.Nullable syntax) { - if (syntax.isNull()) { - this.syntax = OptionalNullable.ofNull(); - } else if (syntax.isEmpty()) { - this.syntax = OptionalNullable.absent(); - } else { - this.syntax = OptionalNullable.of(syntax.get()); - } - return this; - } - - /** - *

Syntax of the template body.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage syntax(Optional syntax) { - if (syntax.isPresent()) { - this.syntax = OptionalNullable.of(syntax.get()); - } else { - this.syntax = OptionalNullable.absent(); - } - return this; - } - - /** - *

Syntax of the template body.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage syntax(String syntax) { - this.syntax = OptionalNullable.of(syntax); - return this; - } - - /** - *

Syntax of the template body.

- */ - @java.lang.Override - @JsonSetter(value = "syntax", nulls = Nulls.SKIP) - public _FinalStage syntax(@Nullable OptionalNullable syntax) { - this.syntax = syntax; - return this; - } - - /** - *

Subject line of the email.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage subject(com.auth0.client.mgmt.core.Nullable subject) { - if (subject.isNull()) { - this.subject = OptionalNullable.ofNull(); - } else if (subject.isEmpty()) { - this.subject = OptionalNullable.absent(); - } else { - this.subject = OptionalNullable.of(subject.get()); - } - return this; - } - - /** - *

Subject line of the email.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage subject(Optional subject) { - if (subject.isPresent()) { - this.subject = OptionalNullable.of(subject.get()); - } else { - this.subject = OptionalNullable.absent(); - } - return this; - } - - /** - *

Subject line of the email.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage subject(String subject) { - this.subject = OptionalNullable.of(subject); - return this; - } - - /** - *

Subject line of the email.

- */ - @java.lang.Override - @JsonSetter(value = "subject", nulls = Nulls.SKIP) - public _FinalStage subject(@Nullable OptionalNullable subject) { - this.subject = subject; - return this; - } - - /** - *

URL to redirect the user to after a successful action.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage resultUrl(com.auth0.client.mgmt.core.Nullable resultUrl) { - if (resultUrl.isNull()) { - this.resultUrl = OptionalNullable.ofNull(); - } else if (resultUrl.isEmpty()) { - this.resultUrl = OptionalNullable.absent(); - } else { - this.resultUrl = OptionalNullable.of(resultUrl.get()); - } - return this; - } - - /** - *

URL to redirect the user to after a successful action.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage resultUrl(Optional resultUrl) { - if (resultUrl.isPresent()) { - this.resultUrl = OptionalNullable.of(resultUrl.get()); - } else { - this.resultUrl = OptionalNullable.absent(); - } - return this; - } - - /** - *

URL to redirect the user to after a successful action.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage resultUrl(String resultUrl) { - this.resultUrl = OptionalNullable.of(resultUrl); - return this; - } - - /** - *

URL to redirect the user to after a successful action.

- */ - @java.lang.Override - @JsonSetter(value = "resultUrl", nulls = Nulls.SKIP) - public _FinalStage resultUrl(@Nullable OptionalNullable resultUrl) { - this.resultUrl = resultUrl; - return this; - } - - /** - *

Senders from email address.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage 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; - } - - /** - *

Senders from email address.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage from(Optional from) { - if (from.isPresent()) { - this.from = OptionalNullable.of(from.get()); - } else { - this.from = OptionalNullable.absent(); - } - return this; - } - - /** - *

Senders from email address.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage from(String from) { - this.from = OptionalNullable.of(from); - return this; - } - - /** - *

Senders from email address.

- */ - @java.lang.Override - @JsonSetter(value = "from", nulls = Nulls.SKIP) - public _FinalStage from(@Nullable OptionalNullable from) { - this.from = from; - return this; - } - - /** - *

Body of the email template.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage body(com.auth0.client.mgmt.core.Nullable body) { - if (body.isNull()) { - this.body = OptionalNullable.ofNull(); - } else if (body.isEmpty()) { - this.body = OptionalNullable.absent(); - } else { - this.body = OptionalNullable.of(body.get()); - } - return this; - } - - /** - *

Body of the email template.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage body(Optional body) { - if (body.isPresent()) { - this.body = OptionalNullable.of(body.get()); - } else { - this.body = OptionalNullable.absent(); - } - return this; - } - - /** - *

Body of the email template.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage body(String body) { - this.body = OptionalNullable.of(body); - return this; - } - - /** - *

Body of the email template.

- */ - @java.lang.Override - @JsonSetter(value = "body", nulls = Nulls.SKIP) - public _FinalStage body(@Nullable OptionalNullable body) { - this.body = body; - return this; - } - - @java.lang.Override - public SetEmailTemplateResponseContent build() { - return new SetEmailTemplateResponseContent( - template, - body, - from, - resultUrl, - subject, - syntax, - urlLifetimeInSeconds, - includeEmailInRedirect, - enabled, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorDuoSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorDuoSettingsResponseContent.java deleted file mode 100644 index b0e6d7cfc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorDuoSettingsResponseContent.java +++ /dev/null @@ -1,144 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SetGuardianFactorDuoSettingsResponseContent.Builder.class) -public final class SetGuardianFactorDuoSettingsResponseContent { - private final Optional ikey; - - private final Optional skey; - - private final Optional host; - - private final Map additionalProperties; - - private SetGuardianFactorDuoSettingsResponseContent( - Optional ikey, - Optional skey, - Optional host, - Map additionalProperties) { - this.ikey = ikey; - this.skey = skey; - this.host = host; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("ikey") - public Optional getIkey() { - return ikey; - } - - @JsonProperty("skey") - public Optional getSkey() { - return skey; - } - - @JsonProperty("host") - public Optional getHost() { - return host; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorDuoSettingsResponseContent - && equalTo((SetGuardianFactorDuoSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorDuoSettingsResponseContent other) { - return ikey.equals(other.ikey) && skey.equals(other.skey) && host.equals(other.host); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.ikey, this.skey, this.host); - } - - @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 ikey = Optional.empty(); - - private Optional skey = Optional.empty(); - - private Optional host = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorDuoSettingsResponseContent other) { - ikey(other.getIkey()); - skey(other.getSkey()); - host(other.getHost()); - return this; - } - - @JsonSetter(value = "ikey", nulls = Nulls.SKIP) - public Builder ikey(Optional ikey) { - this.ikey = ikey; - return this; - } - - public Builder ikey(String ikey) { - this.ikey = Optional.ofNullable(ikey); - return this; - } - - @JsonSetter(value = "skey", nulls = Nulls.SKIP) - public Builder skey(Optional skey) { - this.skey = skey; - return this; - } - - public Builder skey(String skey) { - this.skey = Optional.ofNullable(skey); - return this; - } - - @JsonSetter(value = "host", nulls = Nulls.SKIP) - public Builder host(Optional host) { - this.host = host; - return this; - } - - public Builder host(String host) { - this.host = Optional.ofNullable(host); - return this; - } - - public SetGuardianFactorDuoSettingsResponseContent build() { - return new SetGuardianFactorDuoSettingsResponseContent(ikey, skey, host, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorPhoneMessageTypesResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorPhoneMessageTypesResponseContent.java deleted file mode 100644 index 1d1d7dba3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorPhoneMessageTypesResponseContent.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SetGuardianFactorPhoneMessageTypesResponseContent.Builder.class) -public final class SetGuardianFactorPhoneMessageTypesResponseContent { - private final Optional> messageTypes; - - private final Map additionalProperties; - - private SetGuardianFactorPhoneMessageTypesResponseContent( - Optional> messageTypes, - Map additionalProperties) { - this.messageTypes = messageTypes; - this.additionalProperties = additionalProperties; - } - - /** - * @return The list of phone factors to enable on the tenant. Can include sms and voice. - */ - @JsonProperty("message_types") - public Optional> getMessageTypes() { - return messageTypes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorPhoneMessageTypesResponseContent - && equalTo((SetGuardianFactorPhoneMessageTypesResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorPhoneMessageTypesResponseContent other) { - return messageTypes.equals(other.messageTypes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.messageTypes); - } - - @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> messageTypes = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorPhoneMessageTypesResponseContent other) { - messageTypes(other.getMessageTypes()); - return this; - } - - /** - *

The list of phone factors to enable on the tenant. Can include sms and voice.

- */ - @JsonSetter(value = "message_types", nulls = Nulls.SKIP) - public Builder messageTypes(Optional> messageTypes) { - this.messageTypes = messageTypes; - return this; - } - - public Builder messageTypes(List messageTypes) { - this.messageTypes = Optional.ofNullable(messageTypes); - return this; - } - - public SetGuardianFactorPhoneMessageTypesResponseContent build() { - return new SetGuardianFactorPhoneMessageTypesResponseContent(messageTypes, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorPhoneTemplatesResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorPhoneTemplatesResponseContent.java deleted file mode 100644 index 2fb065313..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorPhoneTemplatesResponseContent.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = SetGuardianFactorPhoneTemplatesResponseContent.Builder.class) -public final class SetGuardianFactorPhoneTemplatesResponseContent { - private final String enrollmentMessage; - - private final String verificationMessage; - - private final Map additionalProperties; - - private SetGuardianFactorPhoneTemplatesResponseContent( - String enrollmentMessage, String verificationMessage, Map additionalProperties) { - this.enrollmentMessage = enrollmentMessage; - this.verificationMessage = verificationMessage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Message sent to the user when they are invited to enroll with a phone number. - */ - @JsonProperty("enrollment_message") - public String getEnrollmentMessage() { - return enrollmentMessage; - } - - /** - * @return Message sent to the user when they are prompted to verify their account. - */ - @JsonProperty("verification_message") - public String getVerificationMessage() { - return verificationMessage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorPhoneTemplatesResponseContent - && equalTo((SetGuardianFactorPhoneTemplatesResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorPhoneTemplatesResponseContent other) { - return enrollmentMessage.equals(other.enrollmentMessage) - && verificationMessage.equals(other.verificationMessage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enrollmentMessage, this.verificationMessage); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EnrollmentMessageStage builder() { - return new Builder(); - } - - public interface EnrollmentMessageStage { - /** - *

Message sent to the user when they are invited to enroll with a phone number.

- */ - VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMessage); - - Builder from(SetGuardianFactorPhoneTemplatesResponseContent other); - } - - public interface VerificationMessageStage { - /** - *

Message sent to the user when they are prompted to verify their account.

- */ - _FinalStage verificationMessage(@NotNull String verificationMessage); - } - - public interface _FinalStage { - SetGuardianFactorPhoneTemplatesResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EnrollmentMessageStage, VerificationMessageStage, _FinalStage { - private String enrollmentMessage; - - private String verificationMessage; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SetGuardianFactorPhoneTemplatesResponseContent other) { - enrollmentMessage(other.getEnrollmentMessage()); - verificationMessage(other.getVerificationMessage()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("enrollment_message") - public VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMessage) { - this.enrollmentMessage = Objects.requireNonNull(enrollmentMessage, "enrollmentMessage must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("verification_message") - public _FinalStage verificationMessage(@NotNull String verificationMessage) { - this.verificationMessage = - Objects.requireNonNull(verificationMessage, "verificationMessage must not be null"); - return this; - } - - @java.lang.Override - public SetGuardianFactorPhoneTemplatesResponseContent build() { - return new SetGuardianFactorPhoneTemplatesResponseContent( - enrollmentMessage, verificationMessage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorResponseContent.java deleted file mode 100644 index 7cebe40d1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorResponseContent.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = SetGuardianFactorResponseContent.Builder.class) -public final class SetGuardianFactorResponseContent { - private final boolean enabled; - - private final Map additionalProperties; - - private SetGuardianFactorResponseContent(boolean enabled, Map additionalProperties) { - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether this factor is enabled (true) or disabled (false). - */ - @JsonProperty("enabled") - public boolean getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorResponseContent && equalTo((SetGuardianFactorResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorResponseContent other) { - return enabled == other.enabled; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EnabledStage builder() { - return new Builder(); - } - - public interface EnabledStage { - /** - *

Whether this factor is enabled (true) or disabled (false).

- */ - _FinalStage enabled(boolean enabled); - - Builder from(SetGuardianFactorResponseContent other); - } - - public interface _FinalStage { - SetGuardianFactorResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EnabledStage, _FinalStage { - private boolean enabled; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SetGuardianFactorResponseContent other) { - enabled(other.getEnabled()); - 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. - */ - @java.lang.Override - @JsonSetter("enabled") - public _FinalStage enabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - @java.lang.Override - public SetGuardianFactorResponseContent build() { - return new SetGuardianFactorResponseContent(enabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorSmsTemplatesResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorSmsTemplatesResponseContent.java deleted file mode 100644 index 7f1280a48..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorSmsTemplatesResponseContent.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = SetGuardianFactorSmsTemplatesResponseContent.Builder.class) -public final class SetGuardianFactorSmsTemplatesResponseContent { - private final String enrollmentMessage; - - private final String verificationMessage; - - private final Map additionalProperties; - - private SetGuardianFactorSmsTemplatesResponseContent( - String enrollmentMessage, String verificationMessage, Map additionalProperties) { - this.enrollmentMessage = enrollmentMessage; - this.verificationMessage = verificationMessage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Message sent to the user when they are invited to enroll with a phone number. - */ - @JsonProperty("enrollment_message") - public String getEnrollmentMessage() { - return enrollmentMessage; - } - - /** - * @return Message sent to the user when they are prompted to verify their account. - */ - @JsonProperty("verification_message") - public String getVerificationMessage() { - return verificationMessage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorSmsTemplatesResponseContent - && equalTo((SetGuardianFactorSmsTemplatesResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorSmsTemplatesResponseContent other) { - return enrollmentMessage.equals(other.enrollmentMessage) - && verificationMessage.equals(other.verificationMessage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enrollmentMessage, this.verificationMessage); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EnrollmentMessageStage builder() { - return new Builder(); - } - - public interface EnrollmentMessageStage { - /** - *

Message sent to the user when they are invited to enroll with a phone number.

- */ - VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMessage); - - Builder from(SetGuardianFactorSmsTemplatesResponseContent other); - } - - public interface VerificationMessageStage { - /** - *

Message sent to the user when they are prompted to verify their account.

- */ - _FinalStage verificationMessage(@NotNull String verificationMessage); - } - - public interface _FinalStage { - SetGuardianFactorSmsTemplatesResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EnrollmentMessageStage, VerificationMessageStage, _FinalStage { - private String enrollmentMessage; - - private String verificationMessage; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SetGuardianFactorSmsTemplatesResponseContent other) { - enrollmentMessage(other.getEnrollmentMessage()); - verificationMessage(other.getVerificationMessage()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("enrollment_message") - public VerificationMessageStage enrollmentMessage(@NotNull String enrollmentMessage) { - this.enrollmentMessage = Objects.requireNonNull(enrollmentMessage, "enrollmentMessage must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("verification_message") - public _FinalStage verificationMessage(@NotNull String verificationMessage) { - this.verificationMessage = - Objects.requireNonNull(verificationMessage, "verificationMessage must not be null"); - return this; - } - - @java.lang.Override - public SetGuardianFactorSmsTemplatesResponseContent build() { - return new SetGuardianFactorSmsTemplatesResponseContent( - enrollmentMessage, verificationMessage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderPhoneResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderPhoneResponseContent.java deleted file mode 100644 index c7ca94056..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderPhoneResponseContent.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SetGuardianFactorsProviderPhoneResponseContent.Builder.class) -public final class SetGuardianFactorsProviderPhoneResponseContent { - private final Optional provider; - - private final Map additionalProperties; - - private SetGuardianFactorsProviderPhoneResponseContent( - Optional provider, Map additionalProperties) { - this.provider = provider; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("provider") - public Optional getProvider() { - return provider; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorsProviderPhoneResponseContent - && equalTo((SetGuardianFactorsProviderPhoneResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorsProviderPhoneResponseContent other) { - return provider.equals(other.provider); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.provider); - } - - @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 provider = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorsProviderPhoneResponseContent other) { - provider(other.getProvider()); - return this; - } - - @JsonSetter(value = "provider", nulls = Nulls.SKIP) - public Builder provider(Optional provider) { - this.provider = provider; - return this; - } - - public Builder provider(GuardianFactorsProviderSmsProviderEnum provider) { - this.provider = Optional.ofNullable(provider); - return this; - } - - public SetGuardianFactorsProviderPhoneResponseContent build() { - return new SetGuardianFactorsProviderPhoneResponseContent(provider, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderPhoneTwilioResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderPhoneTwilioResponseContent.java deleted file mode 100644 index 3e0e6cfa8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderPhoneTwilioResponseContent.java +++ /dev/null @@ -1,318 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = SetGuardianFactorsProviderPhoneTwilioResponseContent.Builder.class) -public final class SetGuardianFactorsProviderPhoneTwilioResponseContent { - private final OptionalNullable from; - - private final OptionalNullable messagingServiceSid; - - private final OptionalNullable authToken; - - private final OptionalNullable sid; - - private final Map additionalProperties; - - private SetGuardianFactorsProviderPhoneTwilioResponseContent( - OptionalNullable from, - OptionalNullable messagingServiceSid, - OptionalNullable authToken, - OptionalNullable sid, - Map additionalProperties) { - this.from = from; - this.messagingServiceSid = messagingServiceSid; - this.authToken = authToken; - this.sid = sid; - this.additionalProperties = additionalProperties; - } - - /** - * @return From number - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - public OptionalNullable getFrom() { - if (from == null) { - return OptionalNullable.absent(); - } - return from; - } - - /** - * @return Copilot SID - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("messaging_service_sid") - public OptionalNullable getMessagingServiceSid() { - if (messagingServiceSid == null) { - return OptionalNullable.absent(); - } - return messagingServiceSid; - } - - /** - * @return Twilio Authentication token - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("auth_token") - public OptionalNullable getAuthToken() { - if (authToken == null) { - return OptionalNullable.absent(); - } - return authToken; - } - - /** - * @return Twilio SID - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sid") - public OptionalNullable getSid() { - if (sid == null) { - return OptionalNullable.absent(); - } - return sid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - private OptionalNullable _getFrom() { - return from; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("messaging_service_sid") - private OptionalNullable _getMessagingServiceSid() { - return messagingServiceSid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("auth_token") - private OptionalNullable _getAuthToken() { - return authToken; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sid") - private OptionalNullable _getSid() { - return sid; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorsProviderPhoneTwilioResponseContent - && equalTo((SetGuardianFactorsProviderPhoneTwilioResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorsProviderPhoneTwilioResponseContent other) { - return from.equals(other.from) - && messagingServiceSid.equals(other.messagingServiceSid) - && authToken.equals(other.authToken) - && sid.equals(other.sid); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.from, this.messagingServiceSid, this.authToken, this.sid); - } - - @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 messagingServiceSid = OptionalNullable.absent(); - - private OptionalNullable authToken = OptionalNullable.absent(); - - private OptionalNullable sid = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorsProviderPhoneTwilioResponseContent other) { - from(other.getFrom()); - messagingServiceSid(other.getMessagingServiceSid()); - authToken(other.getAuthToken()); - sid(other.getSid()); - return this; - } - - /** - *

From number

- */ - @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; - } - - /** - *

Copilot SID

- */ - @JsonSetter(value = "messaging_service_sid", nulls = Nulls.SKIP) - public Builder messagingServiceSid(@Nullable OptionalNullable messagingServiceSid) { - this.messagingServiceSid = messagingServiceSid; - return this; - } - - public Builder messagingServiceSid(String messagingServiceSid) { - this.messagingServiceSid = OptionalNullable.of(messagingServiceSid); - return this; - } - - public Builder messagingServiceSid(Optional messagingServiceSid) { - if (messagingServiceSid.isPresent()) { - this.messagingServiceSid = OptionalNullable.of(messagingServiceSid.get()); - } else { - this.messagingServiceSid = OptionalNullable.absent(); - } - return this; - } - - public Builder messagingServiceSid(com.auth0.client.mgmt.core.Nullable messagingServiceSid) { - if (messagingServiceSid.isNull()) { - this.messagingServiceSid = OptionalNullable.ofNull(); - } else if (messagingServiceSid.isEmpty()) { - this.messagingServiceSid = OptionalNullable.absent(); - } else { - this.messagingServiceSid = OptionalNullable.of(messagingServiceSid.get()); - } - return this; - } - - /** - *

Twilio Authentication token

- */ - @JsonSetter(value = "auth_token", nulls = Nulls.SKIP) - public Builder authToken(@Nullable OptionalNullable authToken) { - this.authToken = authToken; - return this; - } - - public Builder authToken(String authToken) { - this.authToken = OptionalNullable.of(authToken); - return this; - } - - public Builder authToken(Optional authToken) { - if (authToken.isPresent()) { - this.authToken = OptionalNullable.of(authToken.get()); - } else { - this.authToken = OptionalNullable.absent(); - } - return this; - } - - public Builder authToken(com.auth0.client.mgmt.core.Nullable authToken) { - if (authToken.isNull()) { - this.authToken = OptionalNullable.ofNull(); - } else if (authToken.isEmpty()) { - this.authToken = OptionalNullable.absent(); - } else { - this.authToken = OptionalNullable.of(authToken.get()); - } - return this; - } - - /** - *

Twilio SID

- */ - @JsonSetter(value = "sid", nulls = Nulls.SKIP) - public Builder sid(@Nullable OptionalNullable sid) { - this.sid = sid; - return this; - } - - public Builder sid(String sid) { - this.sid = OptionalNullable.of(sid); - return this; - } - - public Builder sid(Optional sid) { - if (sid.isPresent()) { - this.sid = OptionalNullable.of(sid.get()); - } else { - this.sid = OptionalNullable.absent(); - } - return this; - } - - public Builder sid(com.auth0.client.mgmt.core.Nullable sid) { - if (sid.isNull()) { - this.sid = OptionalNullable.ofNull(); - } else if (sid.isEmpty()) { - this.sid = OptionalNullable.absent(); - } else { - this.sid = OptionalNullable.of(sid.get()); - } - return this; - } - - public SetGuardianFactorsProviderPhoneTwilioResponseContent build() { - return new SetGuardianFactorsProviderPhoneTwilioResponseContent( - from, messagingServiceSid, authToken, sid, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderPushNotificationApnsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderPushNotificationApnsResponseContent.java deleted file mode 100644 index 307f15ec1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderPushNotificationApnsResponseContent.java +++ /dev/null @@ -1,153 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = SetGuardianFactorsProviderPushNotificationApnsResponseContent.Builder.class) -public final class SetGuardianFactorsProviderPushNotificationApnsResponseContent { - private final Optional sandbox; - - private final OptionalNullable bundleId; - - private final Map additionalProperties; - - private SetGuardianFactorsProviderPushNotificationApnsResponseContent( - Optional sandbox, OptionalNullable bundleId, Map additionalProperties) { - this.sandbox = sandbox; - this.bundleId = bundleId; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("sandbox") - public Optional getSandbox() { - return sandbox; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("bundle_id") - public OptionalNullable getBundleId() { - if (bundleId == null) { - return OptionalNullable.absent(); - } - return bundleId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("bundle_id") - private OptionalNullable _getBundleId() { - return bundleId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorsProviderPushNotificationApnsResponseContent - && equalTo((SetGuardianFactorsProviderPushNotificationApnsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorsProviderPushNotificationApnsResponseContent other) { - return sandbox.equals(other.sandbox) && bundleId.equals(other.bundleId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.sandbox, this.bundleId); - } - - @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 sandbox = Optional.empty(); - - private OptionalNullable bundleId = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorsProviderPushNotificationApnsResponseContent other) { - sandbox(other.getSandbox()); - bundleId(other.getBundleId()); - return this; - } - - @JsonSetter(value = "sandbox", nulls = Nulls.SKIP) - public Builder sandbox(Optional sandbox) { - this.sandbox = sandbox; - return this; - } - - public Builder sandbox(Boolean sandbox) { - this.sandbox = Optional.ofNullable(sandbox); - return this; - } - - @JsonSetter(value = "bundle_id", nulls = Nulls.SKIP) - public Builder bundleId(@Nullable OptionalNullable bundleId) { - this.bundleId = bundleId; - return this; - } - - public Builder bundleId(String bundleId) { - this.bundleId = OptionalNullable.of(bundleId); - return this; - } - - public Builder bundleId(Optional bundleId) { - if (bundleId.isPresent()) { - this.bundleId = OptionalNullable.of(bundleId.get()); - } else { - this.bundleId = OptionalNullable.absent(); - } - return this; - } - - public Builder bundleId(com.auth0.client.mgmt.core.Nullable bundleId) { - if (bundleId.isNull()) { - this.bundleId = OptionalNullable.ofNull(); - } else if (bundleId.isEmpty()) { - this.bundleId = OptionalNullable.absent(); - } else { - this.bundleId = OptionalNullable.of(bundleId.get()); - } - return this; - } - - public SetGuardianFactorsProviderPushNotificationApnsResponseContent build() { - return new SetGuardianFactorsProviderPushNotificationApnsResponseContent( - sandbox, bundleId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderPushNotificationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderPushNotificationResponseContent.java deleted file mode 100644 index c7713b530..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderPushNotificationResponseContent.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SetGuardianFactorsProviderPushNotificationResponseContent.Builder.class) -public final class SetGuardianFactorsProviderPushNotificationResponseContent { - private final Optional provider; - - private final Map additionalProperties; - - private SetGuardianFactorsProviderPushNotificationResponseContent( - Optional provider, - Map additionalProperties) { - this.provider = provider; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("provider") - public Optional getProvider() { - return provider; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorsProviderPushNotificationResponseContent - && equalTo((SetGuardianFactorsProviderPushNotificationResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorsProviderPushNotificationResponseContent other) { - return provider.equals(other.provider); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.provider); - } - - @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 provider = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorsProviderPushNotificationResponseContent other) { - provider(other.getProvider()); - return this; - } - - @JsonSetter(value = "provider", nulls = Nulls.SKIP) - public Builder provider(Optional provider) { - this.provider = provider; - return this; - } - - public Builder provider(GuardianFactorsProviderPushNotificationProviderDataEnum provider) { - this.provider = Optional.ofNullable(provider); - return this; - } - - public SetGuardianFactorsProviderPushNotificationResponseContent build() { - return new SetGuardianFactorsProviderPushNotificationResponseContent(provider, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderPushNotificationSnsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderPushNotificationSnsResponseContent.java deleted file mode 100644 index 0e2aff519..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderPushNotificationSnsResponseContent.java +++ /dev/null @@ -1,360 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = SetGuardianFactorsProviderPushNotificationSnsResponseContent.Builder.class) -public final class SetGuardianFactorsProviderPushNotificationSnsResponseContent { - private final OptionalNullable awsAccessKeyId; - - private final OptionalNullable awsSecretAccessKey; - - private final OptionalNullable awsRegion; - - private final OptionalNullable snsApnsPlatformApplicationArn; - - private final OptionalNullable snsGcmPlatformApplicationArn; - - private final Map additionalProperties; - - private SetGuardianFactorsProviderPushNotificationSnsResponseContent( - OptionalNullable awsAccessKeyId, - OptionalNullable awsSecretAccessKey, - OptionalNullable awsRegion, - OptionalNullable snsApnsPlatformApplicationArn, - OptionalNullable snsGcmPlatformApplicationArn, - Map additionalProperties) { - this.awsAccessKeyId = awsAccessKeyId; - this.awsSecretAccessKey = awsSecretAccessKey; - this.awsRegion = awsRegion; - this.snsApnsPlatformApplicationArn = snsApnsPlatformApplicationArn; - this.snsGcmPlatformApplicationArn = snsGcmPlatformApplicationArn; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_access_key_id") - public OptionalNullable getAwsAccessKeyId() { - if (awsAccessKeyId == null) { - return OptionalNullable.absent(); - } - return awsAccessKeyId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_secret_access_key") - public OptionalNullable getAwsSecretAccessKey() { - if (awsSecretAccessKey == null) { - return OptionalNullable.absent(); - } - return awsSecretAccessKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_region") - public OptionalNullable getAwsRegion() { - if (awsRegion == null) { - return OptionalNullable.absent(); - } - return awsRegion; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_apns_platform_application_arn") - public OptionalNullable getSnsApnsPlatformApplicationArn() { - if (snsApnsPlatformApplicationArn == null) { - return OptionalNullable.absent(); - } - return snsApnsPlatformApplicationArn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_gcm_platform_application_arn") - public OptionalNullable getSnsGcmPlatformApplicationArn() { - if (snsGcmPlatformApplicationArn == null) { - return OptionalNullable.absent(); - } - return snsGcmPlatformApplicationArn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_access_key_id") - private OptionalNullable _getAwsAccessKeyId() { - return awsAccessKeyId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_secret_access_key") - private OptionalNullable _getAwsSecretAccessKey() { - return awsSecretAccessKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_region") - private OptionalNullable _getAwsRegion() { - return awsRegion; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_apns_platform_application_arn") - private OptionalNullable _getSnsApnsPlatformApplicationArn() { - return snsApnsPlatformApplicationArn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_gcm_platform_application_arn") - private OptionalNullable _getSnsGcmPlatformApplicationArn() { - return snsGcmPlatformApplicationArn; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorsProviderPushNotificationSnsResponseContent - && equalTo((SetGuardianFactorsProviderPushNotificationSnsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorsProviderPushNotificationSnsResponseContent other) { - return awsAccessKeyId.equals(other.awsAccessKeyId) - && awsSecretAccessKey.equals(other.awsSecretAccessKey) - && awsRegion.equals(other.awsRegion) - && snsApnsPlatformApplicationArn.equals(other.snsApnsPlatformApplicationArn) - && snsGcmPlatformApplicationArn.equals(other.snsGcmPlatformApplicationArn); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.awsAccessKeyId, - this.awsSecretAccessKey, - this.awsRegion, - this.snsApnsPlatformApplicationArn, - this.snsGcmPlatformApplicationArn); - } - - @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 awsAccessKeyId = OptionalNullable.absent(); - - private OptionalNullable awsSecretAccessKey = OptionalNullable.absent(); - - private OptionalNullable awsRegion = OptionalNullable.absent(); - - private OptionalNullable snsApnsPlatformApplicationArn = OptionalNullable.absent(); - - private OptionalNullable snsGcmPlatformApplicationArn = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorsProviderPushNotificationSnsResponseContent other) { - awsAccessKeyId(other.getAwsAccessKeyId()); - awsSecretAccessKey(other.getAwsSecretAccessKey()); - awsRegion(other.getAwsRegion()); - snsApnsPlatformApplicationArn(other.getSnsApnsPlatformApplicationArn()); - snsGcmPlatformApplicationArn(other.getSnsGcmPlatformApplicationArn()); - return this; - } - - @JsonSetter(value = "aws_access_key_id", nulls = Nulls.SKIP) - public Builder awsAccessKeyId(@Nullable OptionalNullable awsAccessKeyId) { - this.awsAccessKeyId = awsAccessKeyId; - return this; - } - - public Builder awsAccessKeyId(String awsAccessKeyId) { - this.awsAccessKeyId = OptionalNullable.of(awsAccessKeyId); - return this; - } - - public Builder awsAccessKeyId(Optional awsAccessKeyId) { - if (awsAccessKeyId.isPresent()) { - this.awsAccessKeyId = OptionalNullable.of(awsAccessKeyId.get()); - } else { - this.awsAccessKeyId = OptionalNullable.absent(); - } - return this; - } - - public Builder awsAccessKeyId(com.auth0.client.mgmt.core.Nullable awsAccessKeyId) { - if (awsAccessKeyId.isNull()) { - this.awsAccessKeyId = OptionalNullable.ofNull(); - } else if (awsAccessKeyId.isEmpty()) { - this.awsAccessKeyId = OptionalNullable.absent(); - } else { - this.awsAccessKeyId = OptionalNullable.of(awsAccessKeyId.get()); - } - return this; - } - - @JsonSetter(value = "aws_secret_access_key", nulls = Nulls.SKIP) - public Builder awsSecretAccessKey(@Nullable OptionalNullable awsSecretAccessKey) { - this.awsSecretAccessKey = awsSecretAccessKey; - return this; - } - - public Builder awsSecretAccessKey(String awsSecretAccessKey) { - this.awsSecretAccessKey = OptionalNullable.of(awsSecretAccessKey); - return this; - } - - public Builder awsSecretAccessKey(Optional awsSecretAccessKey) { - if (awsSecretAccessKey.isPresent()) { - this.awsSecretAccessKey = OptionalNullable.of(awsSecretAccessKey.get()); - } else { - this.awsSecretAccessKey = OptionalNullable.absent(); - } - return this; - } - - public Builder awsSecretAccessKey(com.auth0.client.mgmt.core.Nullable awsSecretAccessKey) { - if (awsSecretAccessKey.isNull()) { - this.awsSecretAccessKey = OptionalNullable.ofNull(); - } else if (awsSecretAccessKey.isEmpty()) { - this.awsSecretAccessKey = OptionalNullable.absent(); - } else { - this.awsSecretAccessKey = OptionalNullable.of(awsSecretAccessKey.get()); - } - return this; - } - - @JsonSetter(value = "aws_region", nulls = Nulls.SKIP) - public Builder awsRegion(@Nullable OptionalNullable awsRegion) { - this.awsRegion = awsRegion; - return this; - } - - public Builder awsRegion(String awsRegion) { - this.awsRegion = OptionalNullable.of(awsRegion); - return this; - } - - public Builder awsRegion(Optional awsRegion) { - if (awsRegion.isPresent()) { - this.awsRegion = OptionalNullable.of(awsRegion.get()); - } else { - this.awsRegion = OptionalNullable.absent(); - } - return this; - } - - public Builder awsRegion(com.auth0.client.mgmt.core.Nullable awsRegion) { - if (awsRegion.isNull()) { - this.awsRegion = OptionalNullable.ofNull(); - } else if (awsRegion.isEmpty()) { - this.awsRegion = OptionalNullable.absent(); - } else { - this.awsRegion = OptionalNullable.of(awsRegion.get()); - } - return this; - } - - @JsonSetter(value = "sns_apns_platform_application_arn", nulls = Nulls.SKIP) - public Builder snsApnsPlatformApplicationArn(@Nullable OptionalNullable snsApnsPlatformApplicationArn) { - this.snsApnsPlatformApplicationArn = snsApnsPlatformApplicationArn; - return this; - } - - public Builder snsApnsPlatformApplicationArn(String snsApnsPlatformApplicationArn) { - this.snsApnsPlatformApplicationArn = OptionalNullable.of(snsApnsPlatformApplicationArn); - return this; - } - - public Builder snsApnsPlatformApplicationArn(Optional snsApnsPlatformApplicationArn) { - if (snsApnsPlatformApplicationArn.isPresent()) { - this.snsApnsPlatformApplicationArn = OptionalNullable.of(snsApnsPlatformApplicationArn.get()); - } else { - this.snsApnsPlatformApplicationArn = OptionalNullable.absent(); - } - return this; - } - - public Builder snsApnsPlatformApplicationArn( - com.auth0.client.mgmt.core.Nullable snsApnsPlatformApplicationArn) { - if (snsApnsPlatformApplicationArn.isNull()) { - this.snsApnsPlatformApplicationArn = OptionalNullable.ofNull(); - } else if (snsApnsPlatformApplicationArn.isEmpty()) { - this.snsApnsPlatformApplicationArn = OptionalNullable.absent(); - } else { - this.snsApnsPlatformApplicationArn = OptionalNullable.of(snsApnsPlatformApplicationArn.get()); - } - return this; - } - - @JsonSetter(value = "sns_gcm_platform_application_arn", nulls = Nulls.SKIP) - public Builder snsGcmPlatformApplicationArn(@Nullable OptionalNullable snsGcmPlatformApplicationArn) { - this.snsGcmPlatformApplicationArn = snsGcmPlatformApplicationArn; - return this; - } - - public Builder snsGcmPlatformApplicationArn(String snsGcmPlatformApplicationArn) { - this.snsGcmPlatformApplicationArn = OptionalNullable.of(snsGcmPlatformApplicationArn); - return this; - } - - public Builder snsGcmPlatformApplicationArn(Optional snsGcmPlatformApplicationArn) { - if (snsGcmPlatformApplicationArn.isPresent()) { - this.snsGcmPlatformApplicationArn = OptionalNullable.of(snsGcmPlatformApplicationArn.get()); - } else { - this.snsGcmPlatformApplicationArn = OptionalNullable.absent(); - } - return this; - } - - public Builder snsGcmPlatformApplicationArn( - com.auth0.client.mgmt.core.Nullable snsGcmPlatformApplicationArn) { - if (snsGcmPlatformApplicationArn.isNull()) { - this.snsGcmPlatformApplicationArn = OptionalNullable.ofNull(); - } else if (snsGcmPlatformApplicationArn.isEmpty()) { - this.snsGcmPlatformApplicationArn = OptionalNullable.absent(); - } else { - this.snsGcmPlatformApplicationArn = OptionalNullable.of(snsGcmPlatformApplicationArn.get()); - } - return this; - } - - public SetGuardianFactorsProviderPushNotificationSnsResponseContent build() { - return new SetGuardianFactorsProviderPushNotificationSnsResponseContent( - awsAccessKeyId, - awsSecretAccessKey, - awsRegion, - snsApnsPlatformApplicationArn, - snsGcmPlatformApplicationArn, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderSmsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderSmsResponseContent.java deleted file mode 100644 index 712e9c554..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderSmsResponseContent.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SetGuardianFactorsProviderSmsResponseContent.Builder.class) -public final class SetGuardianFactorsProviderSmsResponseContent { - private final Optional provider; - - private final Map additionalProperties; - - private SetGuardianFactorsProviderSmsResponseContent( - Optional provider, Map additionalProperties) { - this.provider = provider; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("provider") - public Optional getProvider() { - return provider; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorsProviderSmsResponseContent - && equalTo((SetGuardianFactorsProviderSmsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorsProviderSmsResponseContent other) { - return provider.equals(other.provider); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.provider); - } - - @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 provider = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorsProviderSmsResponseContent other) { - provider(other.getProvider()); - return this; - } - - @JsonSetter(value = "provider", nulls = Nulls.SKIP) - public Builder provider(Optional provider) { - this.provider = provider; - return this; - } - - public Builder provider(GuardianFactorsProviderSmsProviderEnum provider) { - this.provider = Optional.ofNullable(provider); - return this; - } - - public SetGuardianFactorsProviderSmsResponseContent build() { - return new SetGuardianFactorsProviderSmsResponseContent(provider, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderSmsTwilioResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderSmsTwilioResponseContent.java deleted file mode 100644 index 53076ea2e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetGuardianFactorsProviderSmsTwilioResponseContent.java +++ /dev/null @@ -1,318 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = SetGuardianFactorsProviderSmsTwilioResponseContent.Builder.class) -public final class SetGuardianFactorsProviderSmsTwilioResponseContent { - private final OptionalNullable from; - - private final OptionalNullable messagingServiceSid; - - private final OptionalNullable authToken; - - private final OptionalNullable sid; - - private final Map additionalProperties; - - private SetGuardianFactorsProviderSmsTwilioResponseContent( - OptionalNullable from, - OptionalNullable messagingServiceSid, - OptionalNullable authToken, - OptionalNullable sid, - Map additionalProperties) { - this.from = from; - this.messagingServiceSid = messagingServiceSid; - this.authToken = authToken; - this.sid = sid; - this.additionalProperties = additionalProperties; - } - - /** - * @return From number - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - public OptionalNullable getFrom() { - if (from == null) { - return OptionalNullable.absent(); - } - return from; - } - - /** - * @return Copilot SID - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("messaging_service_sid") - public OptionalNullable getMessagingServiceSid() { - if (messagingServiceSid == null) { - return OptionalNullable.absent(); - } - return messagingServiceSid; - } - - /** - * @return Twilio Authentication token - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("auth_token") - public OptionalNullable getAuthToken() { - if (authToken == null) { - return OptionalNullable.absent(); - } - return authToken; - } - - /** - * @return Twilio SID - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sid") - public OptionalNullable getSid() { - if (sid == null) { - return OptionalNullable.absent(); - } - return sid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - private OptionalNullable _getFrom() { - return from; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("messaging_service_sid") - private OptionalNullable _getMessagingServiceSid() { - return messagingServiceSid; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("auth_token") - private OptionalNullable _getAuthToken() { - return authToken; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sid") - private OptionalNullable _getSid() { - return sid; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetGuardianFactorsProviderSmsTwilioResponseContent - && equalTo((SetGuardianFactorsProviderSmsTwilioResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetGuardianFactorsProviderSmsTwilioResponseContent other) { - return from.equals(other.from) - && messagingServiceSid.equals(other.messagingServiceSid) - && authToken.equals(other.authToken) - && sid.equals(other.sid); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.from, this.messagingServiceSid, this.authToken, this.sid); - } - - @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 messagingServiceSid = OptionalNullable.absent(); - - private OptionalNullable authToken = OptionalNullable.absent(); - - private OptionalNullable sid = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetGuardianFactorsProviderSmsTwilioResponseContent other) { - from(other.getFrom()); - messagingServiceSid(other.getMessagingServiceSid()); - authToken(other.getAuthToken()); - sid(other.getSid()); - return this; - } - - /** - *

From number

- */ - @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; - } - - /** - *

Copilot SID

- */ - @JsonSetter(value = "messaging_service_sid", nulls = Nulls.SKIP) - public Builder messagingServiceSid(@Nullable OptionalNullable messagingServiceSid) { - this.messagingServiceSid = messagingServiceSid; - return this; - } - - public Builder messagingServiceSid(String messagingServiceSid) { - this.messagingServiceSid = OptionalNullable.of(messagingServiceSid); - return this; - } - - public Builder messagingServiceSid(Optional messagingServiceSid) { - if (messagingServiceSid.isPresent()) { - this.messagingServiceSid = OptionalNullable.of(messagingServiceSid.get()); - } else { - this.messagingServiceSid = OptionalNullable.absent(); - } - return this; - } - - public Builder messagingServiceSid(com.auth0.client.mgmt.core.Nullable messagingServiceSid) { - if (messagingServiceSid.isNull()) { - this.messagingServiceSid = OptionalNullable.ofNull(); - } else if (messagingServiceSid.isEmpty()) { - this.messagingServiceSid = OptionalNullable.absent(); - } else { - this.messagingServiceSid = OptionalNullable.of(messagingServiceSid.get()); - } - return this; - } - - /** - *

Twilio Authentication token

- */ - @JsonSetter(value = "auth_token", nulls = Nulls.SKIP) - public Builder authToken(@Nullable OptionalNullable authToken) { - this.authToken = authToken; - return this; - } - - public Builder authToken(String authToken) { - this.authToken = OptionalNullable.of(authToken); - return this; - } - - public Builder authToken(Optional authToken) { - if (authToken.isPresent()) { - this.authToken = OptionalNullable.of(authToken.get()); - } else { - this.authToken = OptionalNullable.absent(); - } - return this; - } - - public Builder authToken(com.auth0.client.mgmt.core.Nullable authToken) { - if (authToken.isNull()) { - this.authToken = OptionalNullable.ofNull(); - } else if (authToken.isEmpty()) { - this.authToken = OptionalNullable.absent(); - } else { - this.authToken = OptionalNullable.of(authToken.get()); - } - return this; - } - - /** - *

Twilio SID

- */ - @JsonSetter(value = "sid", nulls = Nulls.SKIP) - public Builder sid(@Nullable OptionalNullable sid) { - this.sid = sid; - return this; - } - - public Builder sid(String sid) { - this.sid = OptionalNullable.of(sid); - return this; - } - - public Builder sid(Optional sid) { - if (sid.isPresent()) { - this.sid = OptionalNullable.of(sid.get()); - } else { - this.sid = OptionalNullable.absent(); - } - return this; - } - - public Builder sid(com.auth0.client.mgmt.core.Nullable sid) { - if (sid.isNull()) { - this.sid = OptionalNullable.ofNull(); - } else if (sid.isEmpty()) { - this.sid = OptionalNullable.absent(); - } else { - this.sid = OptionalNullable.of(sid.get()); - } - return this; - } - - public SetGuardianFactorsProviderSmsTwilioResponseContent build() { - return new SetGuardianFactorsProviderSmsTwilioResponseContent( - from, messagingServiceSid, authToken, sid, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetNetworkAclRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/SetNetworkAclRequestContent.java deleted file mode 100644 index 63eb55efd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetNetworkAclRequestContent.java +++ /dev/null @@ -1,198 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = SetNetworkAclRequestContent.Builder.class) -public final class SetNetworkAclRequestContent { - private final String description; - - private final boolean active; - - private final double priority; - - private final NetworkAclRule rule; - - private final Map additionalProperties; - - private SetNetworkAclRequestContent( - String description, - boolean active, - double priority, - NetworkAclRule rule, - Map additionalProperties) { - this.description = description; - this.active = active; - this.priority = priority; - this.rule = rule; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("description") - public String getDescription() { - return description; - } - - /** - * @return Indicates whether or not this access control list is actively being used - */ - @JsonProperty("active") - public boolean getActive() { - return active; - } - - /** - * @return Indicates the order in which the ACL will be evaluated relative to other ACL rules. - */ - @JsonProperty("priority") - public double getPriority() { - return priority; - } - - @JsonProperty("rule") - public NetworkAclRule getRule() { - return rule; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetNetworkAclRequestContent && equalTo((SetNetworkAclRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetNetworkAclRequestContent other) { - return description.equals(other.description) - && active == other.active - && priority == other.priority - && rule.equals(other.rule); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.description, this.active, this.priority, this.rule); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static DescriptionStage builder() { - return new Builder(); - } - - public interface DescriptionStage { - ActiveStage description(@NotNull String description); - - Builder from(SetNetworkAclRequestContent other); - } - - public interface ActiveStage { - /** - *

Indicates whether or not this access control list is actively being used

- */ - PriorityStage active(boolean active); - } - - public interface PriorityStage { - /** - *

Indicates the order in which the ACL will be evaluated relative to other ACL rules.

- */ - RuleStage priority(double priority); - } - - public interface RuleStage { - _FinalStage rule(@NotNull NetworkAclRule rule); - } - - public interface _FinalStage { - SetNetworkAclRequestContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements DescriptionStage, ActiveStage, PriorityStage, RuleStage, _FinalStage { - private String description; - - private boolean active; - - private double priority; - - private NetworkAclRule rule; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SetNetworkAclRequestContent other) { - description(other.getDescription()); - active(other.getActive()); - priority(other.getPriority()); - rule(other.getRule()); - return this; - } - - @java.lang.Override - @JsonSetter("description") - public ActiveStage description(@NotNull String description) { - this.description = Objects.requireNonNull(description, "description must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("active") - public PriorityStage active(boolean active) { - this.active = active; - return this; - } - - /** - *

Indicates the order in which the ACL will be evaluated relative to other ACL rules.

- *

Indicates the order in which the ACL will be evaluated relative to other ACL rules.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("priority") - public RuleStage priority(double priority) { - this.priority = priority; - return this; - } - - @java.lang.Override - @JsonSetter("rule") - public _FinalStage rule(@NotNull NetworkAclRule rule) { - this.rule = Objects.requireNonNull(rule, "rule must not be null"); - return this; - } - - @java.lang.Override - public SetNetworkAclRequestContent build() { - return new SetNetworkAclRequestContent(description, active, priority, rule, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetNetworkAclsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetNetworkAclsResponseContent.java deleted file mode 100644 index 2f9b88e14..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetNetworkAclsResponseContent.java +++ /dev/null @@ -1,255 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SetNetworkAclsResponseContent.Builder.class) -public final class SetNetworkAclsResponseContent { - private final Optional id; - - private final Optional description; - - private final Optional active; - - private final Optional priority; - - private final Optional rule; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private SetNetworkAclsResponseContent( - Optional id, - Optional description, - Optional active, - Optional priority, - Optional rule, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.description = description; - this.active = active; - this.priority = priority; - this.rule = rule; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - @JsonProperty("active") - public Optional getActive() { - return active; - } - - @JsonProperty("priority") - public Optional getPriority() { - return priority; - } - - @JsonProperty("rule") - public Optional getRule() { - return rule; - } - - /** - * @return The timestamp when the Network ACL Configuration was created - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The timestamp when the Network ACL Configuration was last updated - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetNetworkAclsResponseContent && equalTo((SetNetworkAclsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetNetworkAclsResponseContent other) { - return id.equals(other.id) - && description.equals(other.description) - && active.equals(other.active) - && priority.equals(other.priority) - && rule.equals(other.rule) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.description, this.active, this.priority, this.rule, this.createdAt, this.updatedAt); - } - - @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 description = Optional.empty(); - - private Optional active = Optional.empty(); - - private Optional priority = Optional.empty(); - - private Optional rule = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SetNetworkAclsResponseContent other) { - id(other.getId()); - description(other.getDescription()); - active(other.getActive()); - priority(other.getPriority()); - rule(other.getRule()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - 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 = "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; - } - - @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 = "priority", nulls = Nulls.SKIP) - public Builder priority(Optional priority) { - this.priority = priority; - return this; - } - - public Builder priority(Double priority) { - this.priority = Optional.ofNullable(priority); - return this; - } - - @JsonSetter(value = "rule", nulls = Nulls.SKIP) - public Builder rule(Optional rule) { - this.rule = rule; - return this; - } - - public Builder rule(NetworkAclRule rule) { - this.rule = Optional.ofNullable(rule); - return this; - } - - /** - *

The timestamp when the Network ACL Configuration was created

- */ - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(String createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - /** - *

The timestamp when the Network ACL Configuration was last updated

- */ - @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - public Builder updatedAt(String updatedAt) { - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - public SetNetworkAclsResponseContent build() { - return new SetNetworkAclsResponseContent( - id, description, active, priority, rule, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetRulesConfigRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/SetRulesConfigRequestContent.java deleted file mode 100644 index fe5071d0f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetRulesConfigRequestContent.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = SetRulesConfigRequestContent.Builder.class) -public final class SetRulesConfigRequestContent { - private final String value; - - private final Map additionalProperties; - - private SetRulesConfigRequestContent(String value, Map additionalProperties) { - this.value = value; - this.additionalProperties = additionalProperties; - } - - /** - * @return Value for a rules config variable. - */ - @JsonProperty("value") - public String getValue() { - return value; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetRulesConfigRequestContent && equalTo((SetRulesConfigRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetRulesConfigRequestContent other) { - return value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.value); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ValueStage builder() { - return new Builder(); - } - - public interface ValueStage { - /** - *

Value for a rules config variable.

- */ - _FinalStage value(@NotNull String value); - - Builder from(SetRulesConfigRequestContent other); - } - - public interface _FinalStage { - SetRulesConfigRequestContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ValueStage, _FinalStage { - private String value; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SetRulesConfigRequestContent other) { - value(other.getValue()); - return this; - } - - /** - *

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. - */ - @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 SetRulesConfigRequestContent build() { - return new SetRulesConfigRequestContent(value, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetRulesConfigResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetRulesConfigResponseContent.java deleted file mode 100644 index 26d5058ad..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetRulesConfigResponseContent.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = SetRulesConfigResponseContent.Builder.class) -public final class SetRulesConfigResponseContent { - private final String key; - - private final String value; - - private final Map additionalProperties; - - private SetRulesConfigResponseContent(String key, String value, Map additionalProperties) { - this.key = key; - this.value = value; - this.additionalProperties = additionalProperties; - } - - /** - * @return Key for a rules config variable. - */ - @JsonProperty("key") - public String getKey() { - return key; - } - - /** - * @return Value for a rules config variable. - */ - @JsonProperty("value") - public String getValue() { - return value; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetRulesConfigResponseContent && equalTo((SetRulesConfigResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetRulesConfigResponseContent other) { - return key.equals(other.key) && value.equals(other.value); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.key, this.value); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static KeyStage builder() { - return new Builder(); - } - - public interface KeyStage { - /** - *

Key for a rules config variable.

- */ - ValueStage key(@NotNull String key); - - Builder from(SetRulesConfigResponseContent other); - } - - public interface ValueStage { - /** - *

Value for a rules config variable.

- */ - _FinalStage value(@NotNull String value); - } - - public interface _FinalStage { - SetRulesConfigResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements KeyStage, ValueStage, _FinalStage { - private String key; - - private String value; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SetRulesConfigResponseContent other) { - key(other.getKey()); - value(other.getValue()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("key") - public ValueStage key(@NotNull String key) { - this.key = Objects.requireNonNull(key, "key must not be null"); - return this; - } - - /** - *

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. - */ - @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 SetRulesConfigResponseContent build() { - return new SetRulesConfigResponseContent(key, value, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetUserAuthenticationMethodResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/SetUserAuthenticationMethodResponseContent.java deleted file mode 100644 index 119d70fa8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetUserAuthenticationMethodResponseContent.java +++ /dev/null @@ -1,630 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = SetUserAuthenticationMethodResponseContent.Builder.class) -public final class SetUserAuthenticationMethodResponseContent { - private final Optional id; - - private final CreatedAuthenticationMethodTypeEnum type; - - private final Optional name; - - private final Optional totpSecret; - - private final Optional phoneNumber; - - private final Optional email; - - private final Optional> authenticationMethods; - - private final Optional preferredAuthenticationMethod; - - private final Optional keyId; - - private final Optional publicKey; - - private final Optional aaguid; - - private final Optional relyingPartyIdentifier; - - private final Optional createdAt; - - private final Map additionalProperties; - - private SetUserAuthenticationMethodResponseContent( - Optional id, - CreatedAuthenticationMethodTypeEnum type, - Optional name, - Optional totpSecret, - Optional phoneNumber, - Optional email, - Optional> authenticationMethods, - Optional preferredAuthenticationMethod, - Optional keyId, - Optional publicKey, - Optional aaguid, - Optional relyingPartyIdentifier, - Optional createdAt, - Map additionalProperties) { - this.id = id; - this.type = type; - this.name = name; - this.totpSecret = totpSecret; - this.phoneNumber = phoneNumber; - this.email = email; - this.authenticationMethods = authenticationMethods; - this.preferredAuthenticationMethod = preferredAuthenticationMethod; - this.keyId = keyId; - this.publicKey = publicKey; - this.aaguid = aaguid; - this.relyingPartyIdentifier = relyingPartyIdentifier; - this.createdAt = createdAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The ID of the newly created authentication method (automatically generated by the application) - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("type") - public CreatedAuthenticationMethodTypeEnum getType() { - return type; - } - - /** - * @return A human-readable label to identify the authentication method. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Base32 encoded secret for TOTP generation - */ - @JsonProperty("totp_secret") - public Optional getTotpSecret() { - return totpSecret; - } - - /** - * @return Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice. - */ - @JsonProperty("phone_number") - public Optional getPhoneNumber() { - return phoneNumber; - } - - /** - * @return Applies to email authentication methods only. The email address used to send verification messages. - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - @JsonProperty("authentication_methods") - public Optional> getAuthenticationMethods() { - return authenticationMethods; - } - - @JsonProperty("preferred_authentication_method") - public Optional getPreferredAuthenticationMethod() { - return preferredAuthenticationMethod; - } - - /** - * @return Applies to webauthn authenticators only. The id of the credential. - */ - @JsonProperty("key_id") - public Optional getKeyId() { - return keyId; - } - - /** - * @return Applies to webauthn authenticators only. The public key. - */ - @JsonProperty("public_key") - public Optional getPublicKey() { - return publicKey; - } - - /** - * @return Applies to passkeys only. Authenticator Attestation Globally Unique Identifier. - */ - @JsonProperty("aaguid") - public Optional getAaguid() { - return aaguid; - } - - /** - * @return Applies to webauthn authenticators only. The relying party identifier. - */ - @JsonProperty("relying_party_identifier") - public Optional getRelyingPartyIdentifier() { - return relyingPartyIdentifier; - } - - /** - * @return Authentication method creation date - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetUserAuthenticationMethodResponseContent - && equalTo((SetUserAuthenticationMethodResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetUserAuthenticationMethodResponseContent other) { - return id.equals(other.id) - && type.equals(other.type) - && name.equals(other.name) - && totpSecret.equals(other.totpSecret) - && phoneNumber.equals(other.phoneNumber) - && email.equals(other.email) - && authenticationMethods.equals(other.authenticationMethods) - && preferredAuthenticationMethod.equals(other.preferredAuthenticationMethod) - && keyId.equals(other.keyId) - && publicKey.equals(other.publicKey) - && aaguid.equals(other.aaguid) - && relyingPartyIdentifier.equals(other.relyingPartyIdentifier) - && createdAt.equals(other.createdAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.type, - this.name, - this.totpSecret, - this.phoneNumber, - this.email, - this.authenticationMethods, - this.preferredAuthenticationMethod, - this.keyId, - this.publicKey, - this.aaguid, - this.relyingPartyIdentifier, - this.createdAt); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - _FinalStage type(@NotNull CreatedAuthenticationMethodTypeEnum type); - - Builder from(SetUserAuthenticationMethodResponseContent other); - } - - public interface _FinalStage { - SetUserAuthenticationMethodResponseContent build(); - - /** - *

The ID of the newly created authentication method (automatically generated by the application)

- */ - _FinalStage id(Optional id); - - _FinalStage id(String id); - - /** - *

A human-readable label to identify the authentication method.

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

Base32 encoded secret for TOTP generation

- */ - _FinalStage totpSecret(Optional totpSecret); - - _FinalStage totpSecret(String totpSecret); - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- */ - _FinalStage phoneNumber(Optional phoneNumber); - - _FinalStage phoneNumber(String phoneNumber); - - /** - *

Applies to email authentication methods only. The email address used to send verification messages.

- */ - _FinalStage email(Optional email); - - _FinalStage email(String email); - - _FinalStage authenticationMethods(Optional> authenticationMethods); - - _FinalStage authenticationMethods(List authenticationMethods); - - _FinalStage preferredAuthenticationMethod( - Optional preferredAuthenticationMethod); - - _FinalStage preferredAuthenticationMethod(PreferredAuthenticationMethodEnum preferredAuthenticationMethod); - - /** - *

Applies to webauthn authenticators only. The id of the credential.

- */ - _FinalStage keyId(Optional keyId); - - _FinalStage keyId(String keyId); - - /** - *

Applies to webauthn authenticators only. The public key.

- */ - _FinalStage publicKey(Optional publicKey); - - _FinalStage publicKey(String publicKey); - - /** - *

Applies to passkeys only. Authenticator Attestation Globally Unique Identifier.

- */ - _FinalStage aaguid(Optional aaguid); - - _FinalStage aaguid(String aaguid); - - /** - *

Applies to webauthn authenticators only. The relying party identifier.

- */ - _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier); - - _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier); - - /** - *

Authentication method creation date

- */ - _FinalStage createdAt(Optional createdAt); - - _FinalStage createdAt(OffsetDateTime createdAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, _FinalStage { - private CreatedAuthenticationMethodTypeEnum type; - - private Optional createdAt = Optional.empty(); - - private Optional relyingPartyIdentifier = Optional.empty(); - - private Optional aaguid = Optional.empty(); - - private Optional publicKey = Optional.empty(); - - private Optional keyId = Optional.empty(); - - private Optional preferredAuthenticationMethod = Optional.empty(); - - private Optional> authenticationMethods = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional phoneNumber = Optional.empty(); - - private Optional totpSecret = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional id = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SetUserAuthenticationMethodResponseContent other) { - id(other.getId()); - type(other.getType()); - name(other.getName()); - totpSecret(other.getTotpSecret()); - phoneNumber(other.getPhoneNumber()); - email(other.getEmail()); - authenticationMethods(other.getAuthenticationMethods()); - preferredAuthenticationMethod(other.getPreferredAuthenticationMethod()); - keyId(other.getKeyId()); - publicKey(other.getPublicKey()); - aaguid(other.getAaguid()); - relyingPartyIdentifier(other.getRelyingPartyIdentifier()); - createdAt(other.getCreatedAt()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull CreatedAuthenticationMethodTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

Authentication method creation date

- * @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; - } - - /** - *

Authentication method creation date

- */ - @java.lang.Override - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public _FinalStage createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - *

Applies to webauthn authenticators only. The relying party identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier) { - this.relyingPartyIdentifier = Optional.ofNullable(relyingPartyIdentifier); - return this; - } - - /** - *

Applies to webauthn authenticators only. The relying party identifier.

- */ - @java.lang.Override - @JsonSetter(value = "relying_party_identifier", nulls = Nulls.SKIP) - public _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier) { - this.relyingPartyIdentifier = relyingPartyIdentifier; - return this; - } - - /** - *

Applies to passkeys only. Authenticator Attestation Globally Unique Identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage aaguid(String aaguid) { - this.aaguid = Optional.ofNullable(aaguid); - return this; - } - - /** - *

Applies to passkeys only. Authenticator Attestation Globally Unique Identifier.

- */ - @java.lang.Override - @JsonSetter(value = "aaguid", nulls = Nulls.SKIP) - public _FinalStage aaguid(Optional aaguid) { - this.aaguid = aaguid; - return this; - } - - /** - *

Applies to webauthn authenticators only. The public key.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage publicKey(String publicKey) { - this.publicKey = Optional.ofNullable(publicKey); - return this; - } - - /** - *

Applies to webauthn authenticators only. The public key.

- */ - @java.lang.Override - @JsonSetter(value = "public_key", nulls = Nulls.SKIP) - public _FinalStage publicKey(Optional publicKey) { - this.publicKey = publicKey; - return this; - } - - /** - *

Applies to webauthn authenticators only. The id of the credential.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage keyId(String keyId) { - this.keyId = Optional.ofNullable(keyId); - return this; - } - - /** - *

Applies to webauthn authenticators only. The id of the credential.

- */ - @java.lang.Override - @JsonSetter(value = "key_id", nulls = Nulls.SKIP) - public _FinalStage keyId(Optional keyId) { - this.keyId = keyId; - return this; - } - - @java.lang.Override - public _FinalStage preferredAuthenticationMethod( - PreferredAuthenticationMethodEnum preferredAuthenticationMethod) { - this.preferredAuthenticationMethod = Optional.ofNullable(preferredAuthenticationMethod); - return this; - } - - @java.lang.Override - @JsonSetter(value = "preferred_authentication_method", nulls = Nulls.SKIP) - public _FinalStage preferredAuthenticationMethod( - Optional preferredAuthenticationMethod) { - this.preferredAuthenticationMethod = preferredAuthenticationMethod; - return this; - } - - @java.lang.Override - public _FinalStage authenticationMethods(List authenticationMethods) { - this.authenticationMethods = Optional.ofNullable(authenticationMethods); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication_methods", nulls = Nulls.SKIP) - public _FinalStage authenticationMethods( - Optional> authenticationMethods) { - this.authenticationMethods = authenticationMethods; - return this; - } - - /** - *

Applies to email authentication methods only. The email address used to send verification messages.

- * @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; - } - - /** - *

Applies to email authentication methods only. The email address used to send verification messages.

- */ - @java.lang.Override - @JsonSetter(value = "email", nulls = Nulls.SKIP) - public _FinalStage email(Optional email) { - this.email = email; - return this; - } - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- * @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; - } - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- */ - @java.lang.Override - @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) - public _FinalStage phoneNumber(Optional phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - *

Base32 encoded secret for TOTP generation

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage totpSecret(String totpSecret) { - this.totpSecret = Optional.ofNullable(totpSecret); - return this; - } - - /** - *

Base32 encoded secret for TOTP generation

- */ - @java.lang.Override - @JsonSetter(value = "totp_secret", nulls = Nulls.SKIP) - public _FinalStage totpSecret(Optional totpSecret) { - this.totpSecret = totpSecret; - return this; - } - - /** - *

A human-readable label to identify the authentication method.

- * @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; - } - - /** - *

A human-readable label to identify the authentication method.

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - /** - *

The ID of the newly created authentication method (automatically generated by the application)

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - /** - *

The ID of the newly created authentication method (automatically generated by the application)

- */ - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public SetUserAuthenticationMethodResponseContent build() { - return new SetUserAuthenticationMethodResponseContent( - id, - type, - name, - totpSecret, - phoneNumber, - email, - authenticationMethods, - preferredAuthenticationMethod, - keyId, - publicKey, - aaguid, - relyingPartyIdentifier, - createdAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SetUserAuthenticationMethods.java b/src/main/java/com/auth0/client/mgmt/types/SetUserAuthenticationMethods.java deleted file mode 100644 index a070ffc99..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SetUserAuthenticationMethods.java +++ /dev/null @@ -1,318 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SetUserAuthenticationMethods.Builder.class) -public final class SetUserAuthenticationMethods { - private final AuthenticationTypeEnum type; - - private final Optional preferredAuthenticationMethod; - - private final Optional name; - - private final Optional phoneNumber; - - private final Optional email; - - private final Optional totpSecret; - - private final Map additionalProperties; - - private SetUserAuthenticationMethods( - AuthenticationTypeEnum type, - Optional preferredAuthenticationMethod, - Optional name, - Optional phoneNumber, - Optional email, - Optional totpSecret, - Map additionalProperties) { - this.type = type; - this.preferredAuthenticationMethod = preferredAuthenticationMethod; - this.name = name; - this.phoneNumber = phoneNumber; - this.email = email; - this.totpSecret = totpSecret; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public AuthenticationTypeEnum getType() { - return type; - } - - @JsonProperty("preferred_authentication_method") - public Optional getPreferredAuthenticationMethod() { - return preferredAuthenticationMethod; - } - - /** - * @return AA human-readable label to identify the authentication method. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice. - */ - @JsonProperty("phone_number") - public Optional getPhoneNumber() { - return phoneNumber; - } - - /** - * @return Applies to email authentication methods only. The email address used to send verification messages. - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - /** - * @return Applies to totp authentication methods only. The base32 encoded secret for TOTP generation. - */ - @JsonProperty("totp_secret") - public Optional getTotpSecret() { - return totpSecret; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SetUserAuthenticationMethods && equalTo((SetUserAuthenticationMethods) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SetUserAuthenticationMethods other) { - return type.equals(other.type) - && preferredAuthenticationMethod.equals(other.preferredAuthenticationMethod) - && name.equals(other.name) - && phoneNumber.equals(other.phoneNumber) - && email.equals(other.email) - && totpSecret.equals(other.totpSecret); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.type, - this.preferredAuthenticationMethod, - this.name, - this.phoneNumber, - this.email, - this.totpSecret); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - _FinalStage type(@NotNull AuthenticationTypeEnum type); - - Builder from(SetUserAuthenticationMethods other); - } - - public interface _FinalStage { - SetUserAuthenticationMethods build(); - - _FinalStage preferredAuthenticationMethod( - Optional preferredAuthenticationMethod); - - _FinalStage preferredAuthenticationMethod(PreferredAuthenticationMethodEnum preferredAuthenticationMethod); - - /** - *

AA human-readable label to identify the authentication method.

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- */ - _FinalStage phoneNumber(Optional phoneNumber); - - _FinalStage phoneNumber(String phoneNumber); - - /** - *

Applies to email authentication methods only. The email address used to send verification messages.

- */ - _FinalStage email(Optional email); - - _FinalStage email(String email); - - /** - *

Applies to totp authentication methods only. The base32 encoded secret for TOTP generation.

- */ - _FinalStage totpSecret(Optional totpSecret); - - _FinalStage totpSecret(String totpSecret); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, _FinalStage { - private AuthenticationTypeEnum type; - - private Optional totpSecret = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional phoneNumber = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional preferredAuthenticationMethod = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SetUserAuthenticationMethods other) { - type(other.getType()); - preferredAuthenticationMethod(other.getPreferredAuthenticationMethod()); - name(other.getName()); - phoneNumber(other.getPhoneNumber()); - email(other.getEmail()); - totpSecret(other.getTotpSecret()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull AuthenticationTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

Applies to totp authentication methods only. The base32 encoded secret for TOTP generation.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage totpSecret(String totpSecret) { - this.totpSecret = Optional.ofNullable(totpSecret); - return this; - } - - /** - *

Applies to totp authentication methods only. The base32 encoded secret for TOTP generation.

- */ - @java.lang.Override - @JsonSetter(value = "totp_secret", nulls = Nulls.SKIP) - public _FinalStage totpSecret(Optional totpSecret) { - this.totpSecret = totpSecret; - return this; - } - - /** - *

Applies to email authentication methods only. The email address used to send verification messages.

- * @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; - } - - /** - *

Applies to email authentication methods only. The email address used to send verification messages.

- */ - @java.lang.Override - @JsonSetter(value = "email", nulls = Nulls.SKIP) - public _FinalStage email(Optional email) { - this.email = email; - return this; - } - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- * @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; - } - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- */ - @java.lang.Override - @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) - public _FinalStage phoneNumber(Optional phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - *

AA human-readable label to identify the authentication method.

- * @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; - } - - /** - *

AA human-readable label to identify the authentication method.

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public _FinalStage preferredAuthenticationMethod( - PreferredAuthenticationMethodEnum preferredAuthenticationMethod) { - this.preferredAuthenticationMethod = Optional.ofNullable(preferredAuthenticationMethod); - return this; - } - - @java.lang.Override - @JsonSetter(value = "preferred_authentication_method", nulls = Nulls.SKIP) - public _FinalStage preferredAuthenticationMethod( - Optional preferredAuthenticationMethod) { - this.preferredAuthenticationMethod = preferredAuthenticationMethod; - return this; - } - - @java.lang.Override - public SetUserAuthenticationMethods build() { - return new SetUserAuthenticationMethods( - type, preferredAuthenticationMethod, name, phoneNumber, email, totpSecret, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SigningAlgorithmEnum.java b/src/main/java/com/auth0/client/mgmt/types/SigningAlgorithmEnum.java deleted file mode 100644 index 4b9b95a98..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SigningAlgorithmEnum.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class SigningAlgorithmEnum { - public static final SigningAlgorithmEnum RS512 = new SigningAlgorithmEnum(Value.RS512, "RS512"); - - public static final SigningAlgorithmEnum PS256 = new SigningAlgorithmEnum(Value.PS256, "PS256"); - - public static final SigningAlgorithmEnum HS256 = new SigningAlgorithmEnum(Value.HS256, "HS256"); - - public static final SigningAlgorithmEnum RS256 = new SigningAlgorithmEnum(Value.RS256, "RS256"); - - private final Value value; - - private final String string; - - SigningAlgorithmEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof SigningAlgorithmEnum && this.string.equals(((SigningAlgorithmEnum) 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 PS256: - return visitor.visitPs256(); - case HS256: - return visitor.visitHs256(); - case RS256: - return visitor.visitRs256(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static SigningAlgorithmEnum valueOf(String value) { - switch (value) { - case "RS512": - return RS512; - case "PS256": - return PS256; - case "HS256": - return HS256; - case "RS256": - return RS256; - default: - return new SigningAlgorithmEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - HS256, - - RS256, - - RS512, - - PS256, - - UNKNOWN - } - - public interface Visitor { - T visitHs256(); - - T visitRs256(); - - T visitRs512(); - - T visitPs256(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SigningKeys.java b/src/main/java/com/auth0/client/mgmt/types/SigningKeys.java deleted file mode 100644 index 657e7445a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SigningKeys.java +++ /dev/null @@ -1,552 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SigningKeys.Builder.class) -public final class SigningKeys { - private final String kid; - - private final String cert; - - private final Optional pkcs7; - - private final Optional current; - - private final Optional next; - - private final Optional previous; - - private final Optional currentSince; - - private final Optional currentUntil; - - private final String fingerprint; - - private final String thumbprint; - - private final Optional revoked; - - private final Optional revokedAt; - - private final Map additionalProperties; - - private SigningKeys( - String kid, - String cert, - Optional pkcs7, - Optional current, - Optional next, - Optional previous, - Optional currentSince, - Optional currentUntil, - String fingerprint, - String thumbprint, - Optional revoked, - Optional revokedAt, - Map additionalProperties) { - this.kid = kid; - this.cert = cert; - this.pkcs7 = pkcs7; - this.current = current; - this.next = next; - this.previous = previous; - this.currentSince = currentSince; - this.currentUntil = currentUntil; - this.fingerprint = fingerprint; - this.thumbprint = thumbprint; - this.revoked = revoked; - this.revokedAt = revokedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The key id of the signing key - */ - @JsonProperty("kid") - public String getKid() { - return kid; - } - - /** - * @return The public certificate of the signing key - */ - @JsonProperty("cert") - public String getCert() { - return cert; - } - - /** - * @return The public certificate of the signing key in pkcs7 format - */ - @JsonProperty("pkcs7") - public Optional getPkcs7() { - return pkcs7; - } - - /** - * @return True if the key is the the current key - */ - @JsonProperty("current") - public Optional getCurrent() { - return current; - } - - /** - * @return True if the key is the the next key - */ - @JsonProperty("next") - public Optional getNext() { - return next; - } - - /** - * @return True if the key is the the previous key - */ - @JsonProperty("previous") - public Optional getPrevious() { - return previous; - } - - @JsonProperty("current_since") - public Optional getCurrentSince() { - return currentSince; - } - - @JsonProperty("current_until") - public Optional getCurrentUntil() { - return currentUntil; - } - - /** - * @return The cert fingerprint - */ - @JsonProperty("fingerprint") - public String getFingerprint() { - return fingerprint; - } - - /** - * @return The cert thumbprint - */ - @JsonProperty("thumbprint") - public String getThumbprint() { - return thumbprint; - } - - /** - * @return True if the key is revoked - */ - @JsonProperty("revoked") - public Optional getRevoked() { - return revoked; - } - - @JsonProperty("revoked_at") - public Optional getRevokedAt() { - return revokedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SigningKeys && equalTo((SigningKeys) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SigningKeys other) { - return kid.equals(other.kid) - && cert.equals(other.cert) - && pkcs7.equals(other.pkcs7) - && current.equals(other.current) - && next.equals(other.next) - && previous.equals(other.previous) - && currentSince.equals(other.currentSince) - && currentUntil.equals(other.currentUntil) - && fingerprint.equals(other.fingerprint) - && thumbprint.equals(other.thumbprint) - && revoked.equals(other.revoked) - && revokedAt.equals(other.revokedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.kid, - this.cert, - this.pkcs7, - this.current, - this.next, - this.previous, - this.currentSince, - this.currentUntil, - this.fingerprint, - this.thumbprint, - this.revoked, - this.revokedAt); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static KidStage builder() { - return new Builder(); - } - - public interface KidStage { - /** - *

The key id of the signing key

- */ - CertStage kid(@NotNull String kid); - - Builder from(SigningKeys other); - } - - public interface CertStage { - /** - *

The public certificate of the signing key

- */ - FingerprintStage cert(@NotNull String cert); - } - - public interface FingerprintStage { - /** - *

The cert fingerprint

- */ - ThumbprintStage fingerprint(@NotNull String fingerprint); - } - - public interface ThumbprintStage { - /** - *

The cert thumbprint

- */ - _FinalStage thumbprint(@NotNull String thumbprint); - } - - public interface _FinalStage { - SigningKeys build(); - - /** - *

The public certificate of the signing key in pkcs7 format

- */ - _FinalStage pkcs7(Optional pkcs7); - - _FinalStage pkcs7(String pkcs7); - - /** - *

True if the key is the the current key

- */ - _FinalStage current(Optional current); - - _FinalStage current(Boolean current); - - /** - *

True if the key is the the next key

- */ - _FinalStage next(Optional next); - - _FinalStage next(Boolean next); - - /** - *

True if the key is the the previous key

- */ - _FinalStage previous(Optional previous); - - _FinalStage previous(Boolean previous); - - _FinalStage currentSince(Optional currentSince); - - _FinalStage currentSince(SigningKeysDate currentSince); - - _FinalStage currentUntil(Optional currentUntil); - - _FinalStage currentUntil(SigningKeysDate currentUntil); - - /** - *

True if the key is revoked

- */ - _FinalStage revoked(Optional revoked); - - _FinalStage revoked(Boolean revoked); - - _FinalStage revokedAt(Optional revokedAt); - - _FinalStage revokedAt(SigningKeysDate revokedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements KidStage, CertStage, FingerprintStage, ThumbprintStage, _FinalStage { - private String kid; - - private String cert; - - private String fingerprint; - - private String thumbprint; - - private Optional revokedAt = Optional.empty(); - - private Optional revoked = Optional.empty(); - - private Optional currentUntil = Optional.empty(); - - private Optional currentSince = Optional.empty(); - - private Optional previous = Optional.empty(); - - private Optional next = Optional.empty(); - - private Optional current = Optional.empty(); - - private Optional pkcs7 = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(SigningKeys other) { - kid(other.getKid()); - cert(other.getCert()); - pkcs7(other.getPkcs7()); - current(other.getCurrent()); - next(other.getNext()); - previous(other.getPrevious()); - currentSince(other.getCurrentSince()); - currentUntil(other.getCurrentUntil()); - fingerprint(other.getFingerprint()); - thumbprint(other.getThumbprint()); - revoked(other.getRevoked()); - revokedAt(other.getRevokedAt()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("kid") - public CertStage kid(@NotNull String kid) { - this.kid = Objects.requireNonNull(kid, "kid must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("cert") - public FingerprintStage cert(@NotNull String cert) { - this.cert = Objects.requireNonNull(cert, "cert must not be null"); - return this; - } - - /** - *

The cert fingerprint

- *

The cert fingerprint

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("fingerprint") - public ThumbprintStage fingerprint(@NotNull String fingerprint) { - this.fingerprint = Objects.requireNonNull(fingerprint, "fingerprint must not be null"); - return this; - } - - /** - *

The cert thumbprint

- *

The cert thumbprint

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("thumbprint") - public _FinalStage thumbprint(@NotNull String thumbprint) { - this.thumbprint = Objects.requireNonNull(thumbprint, "thumbprint must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage revokedAt(SigningKeysDate revokedAt) { - this.revokedAt = Optional.ofNullable(revokedAt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "revoked_at", nulls = Nulls.SKIP) - public _FinalStage revokedAt(Optional revokedAt) { - this.revokedAt = revokedAt; - return this; - } - - /** - *

True if the key is revoked

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage revoked(Boolean revoked) { - this.revoked = Optional.ofNullable(revoked); - return this; - } - - /** - *

True if the key is revoked

- */ - @java.lang.Override - @JsonSetter(value = "revoked", nulls = Nulls.SKIP) - public _FinalStage revoked(Optional revoked) { - this.revoked = revoked; - return this; - } - - @java.lang.Override - public _FinalStage currentUntil(SigningKeysDate currentUntil) { - this.currentUntil = Optional.ofNullable(currentUntil); - return this; - } - - @java.lang.Override - @JsonSetter(value = "current_until", nulls = Nulls.SKIP) - public _FinalStage currentUntil(Optional currentUntil) { - this.currentUntil = currentUntil; - return this; - } - - @java.lang.Override - public _FinalStage currentSince(SigningKeysDate currentSince) { - this.currentSince = Optional.ofNullable(currentSince); - return this; - } - - @java.lang.Override - @JsonSetter(value = "current_since", nulls = Nulls.SKIP) - public _FinalStage currentSince(Optional currentSince) { - this.currentSince = currentSince; - return this; - } - - /** - *

True if the key is the the previous key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage previous(Boolean previous) { - this.previous = Optional.ofNullable(previous); - return this; - } - - /** - *

True if the key is the the previous key

- */ - @java.lang.Override - @JsonSetter(value = "previous", nulls = Nulls.SKIP) - public _FinalStage previous(Optional previous) { - this.previous = previous; - return this; - } - - /** - *

True if the key is the the next key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage next(Boolean next) { - this.next = Optional.ofNullable(next); - return this; - } - - /** - *

True if the key is the the next key

- */ - @java.lang.Override - @JsonSetter(value = "next", nulls = Nulls.SKIP) - public _FinalStage next(Optional next) { - this.next = next; - return this; - } - - /** - *

True if the key is the the current key

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage current(Boolean current) { - this.current = Optional.ofNullable(current); - return this; - } - - /** - *

True if the key is the the current key

- */ - @java.lang.Override - @JsonSetter(value = "current", nulls = Nulls.SKIP) - public _FinalStage current(Optional current) { - this.current = current; - return this; - } - - /** - *

The public certificate of the signing key in pkcs7 format

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage pkcs7(String pkcs7) { - this.pkcs7 = Optional.ofNullable(pkcs7); - return this; - } - - /** - *

The public certificate of the signing key in pkcs7 format

- */ - @java.lang.Override - @JsonSetter(value = "pkcs7", nulls = Nulls.SKIP) - public _FinalStage pkcs7(Optional pkcs7) { - this.pkcs7 = pkcs7; - return this; - } - - @java.lang.Override - public SigningKeys build() { - return new SigningKeys( - kid, - cert, - pkcs7, - current, - next, - previous, - currentSince, - currentUntil, - fingerprint, - thumbprint, - revoked, - revokedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SigningKeysDate.java b/src/main/java/com/auth0/client/mgmt/types/SigningKeysDate.java deleted file mode 100644 index 2e7dab279..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SigningKeysDate.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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.Map; -import java.util.Objects; - -@JsonDeserialize(using = SigningKeysDate.Deserializer.class) -public final class SigningKeysDate { - private final Object value; - - private final int type; - - private SigningKeysDate(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((Map) 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 SigningKeysDate && equalTo((SigningKeysDate) other); - } - - private boolean equalTo(SigningKeysDate 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 SigningKeysDate of(String value) { - return new SigningKeysDate(value, 0); - } - - public static SigningKeysDate of(Map value) { - return new SigningKeysDate(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(Map value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(SigningKeysDate.class); - } - - @java.lang.Override - public SigningKeysDate deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.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/SignupSchema.java b/src/main/java/com/auth0/client/mgmt/types/SignupSchema.java deleted file mode 100644 index 1046a9079..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SignupSchema.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SignupSchema.Builder.class) -public final class SignupSchema { - private final Optional status; - - private final Map additionalProperties; - - private SignupSchema(Optional status, Map additionalProperties) { - this.status = status; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SignupSchema && equalTo((SignupSchema) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SignupSchema 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 Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional status = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SignupSchema other) { - status(other.getStatus()); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(SignupStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - public SignupSchema build() { - return new SignupSchema(status, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SignupStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/SignupStatusEnum.java deleted file mode 100644 index cb5d82bd1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SignupStatusEnum.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class SignupStatusEnum { - public static final SignupStatusEnum INACTIVE = new SignupStatusEnum(Value.INACTIVE, "inactive"); - - public static final SignupStatusEnum REQUIRED = new SignupStatusEnum(Value.REQUIRED, "required"); - - public static final SignupStatusEnum OPTIONAL = new SignupStatusEnum(Value.OPTIONAL, "optional"); - - private final Value value; - - private final String string; - - SignupStatusEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof SignupStatusEnum && this.string.equals(((SignupStatusEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case INACTIVE: - return visitor.visitInactive(); - case REQUIRED: - return visitor.visitRequired(); - case OPTIONAL: - return visitor.visitOptional(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static SignupStatusEnum valueOf(String value) { - switch (value) { - case "inactive": - return INACTIVE; - case "required": - return REQUIRED; - case "optional": - return OPTIONAL; - default: - return new SignupStatusEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - REQUIRED, - - OPTIONAL, - - INACTIVE, - - UNKNOWN - } - - public interface Visitor { - T visitRequired(); - - T visitOptional(); - - T visitInactive(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SignupVerification.java b/src/main/java/com/auth0/client/mgmt/types/SignupVerification.java deleted file mode 100644 index 8201e8d66..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SignupVerification.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SignupVerification.Builder.class) -public final class SignupVerification { - private final Optional active; - - private final Map additionalProperties; - - private SignupVerification(Optional active, Map additionalProperties) { - this.active = active; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("active") - public Optional getActive() { - return active; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SignupVerification && equalTo((SignupVerification) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SignupVerification other) { - return active.equals(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 Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional active = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SignupVerification other) { - active(other.getActive()); - return this; - } - - @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; - } - - public SignupVerification build() { - return new SignupVerification(active, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SignupVerified.java b/src/main/java/com/auth0/client/mgmt/types/SignupVerified.java deleted file mode 100644 index b4ea5c8be..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SignupVerified.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SignupVerified.Builder.class) -public final class SignupVerified { - private final Optional status; - - private final Optional verification; - - private final Map additionalProperties; - - private SignupVerified( - Optional status, - Optional verification, - Map additionalProperties) { - this.status = status; - this.verification = verification; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - @JsonProperty("verification") - public Optional getVerification() { - return verification; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SignupVerified && equalTo((SignupVerified) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SignupVerified other) { - return status.equals(other.status) && verification.equals(other.verification); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.status, this.verification); - } - - @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 status = Optional.empty(); - - private Optional verification = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SignupVerified other) { - status(other.getStatus()); - verification(other.getVerification()); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(SignupStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - @JsonSetter(value = "verification", nulls = Nulls.SKIP) - public Builder verification(Optional verification) { - this.verification = verification; - return this; - } - - public Builder verification(SignupVerification verification) { - this.verification = Optional.ofNullable(verification); - return this; - } - - public SignupVerified build() { - return new SignupVerified(status, verification, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SupportedLocales.java b/src/main/java/com/auth0/client/mgmt/types/SupportedLocales.java deleted file mode 100644 index 506db0d55..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SupportedLocales.java +++ /dev/null @@ -1,873 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class SupportedLocales { - public static final SupportedLocales AZ = new SupportedLocales(Value.AZ, "az"); - - public static final SupportedLocales MK = new SupportedLocales(Value.MK, "mk"); - - public static final SupportedLocales CA_ES = new SupportedLocales(Value.CA_ES, "ca-ES"); - - public static final SupportedLocales ML = new SupportedLocales(Value.ML, "ml"); - - public static final SupportedLocales TR = new SupportedLocales(Value.TR, "tr"); - - public static final SupportedLocales GU = new SupportedLocales(Value.GU, "gu"); - - public static final SupportedLocales ES_AR = new SupportedLocales(Value.ES_AR, "es-AR"); - - public static final SupportedLocales ID = new SupportedLocales(Value.ID, "id"); - - public static final SupportedLocales CNR = new SupportedLocales(Value.CNR, "cnr"); - - public static final SupportedLocales MN = new SupportedLocales(Value.MN, "mn"); - - public static final SupportedLocales FI = new SupportedLocales(Value.FI, "fi"); - - public static final SupportedLocales PL = new SupportedLocales(Value.PL, "pl"); - - public static final SupportedLocales EN_CA = new SupportedLocales(Value.EN_CA, "en-CA"); - - public static final SupportedLocales AR_EG = new SupportedLocales(Value.AR_EG, "ar-EG"); - - public static final SupportedLocales MR = new SupportedLocales(Value.MR, "mr"); - - public static final SupportedLocales MS = new SupportedLocales(Value.MS, "ms"); - - public static final SupportedLocales PT_PT = new SupportedLocales(Value.PT_PT, "pt-PT"); - - public static final SupportedLocales SK = new SupportedLocales(Value.SK, "sk"); - - public static final SupportedLocales SL = new SupportedLocales(Value.SL, "sl"); - - public static final SupportedLocales CS = new SupportedLocales(Value.CS, "cs"); - - public static final SupportedLocales UR = new SupportedLocales(Value.UR, "ur"); - - public static final SupportedLocales HU = new SupportedLocales(Value.HU, "hu"); - - public static final SupportedLocales TE = new SupportedLocales(Value.TE, "te"); - - public static final SupportedLocales ZH_CN = new SupportedLocales(Value.ZH_CN, "zh-CN"); - - public static final SupportedLocales AR_SA = new SupportedLocales(Value.AR_SA, "ar-SA"); - - public static final SupportedLocales SO = new SupportedLocales(Value.SO, "so"); - - public static final SupportedLocales FR = new SupportedLocales(Value.FR, "fr"); - - public static final SupportedLocales NO = new SupportedLocales(Value.NO, "no"); - - public static final SupportedLocales ZH_TW = new SupportedLocales(Value.ZH_TW, "zh-TW"); - - public static final SupportedLocales AR = new SupportedLocales(Value.AR, "ar"); - - public static final SupportedLocales PT = new SupportedLocales(Value.PT, "pt"); - - public static final SupportedLocales MY = new SupportedLocales(Value.MY, "my"); - - public static final SupportedLocales SQ = new SupportedLocales(Value.SQ, "sq"); - - public static final SupportedLocales HY = new SupportedLocales(Value.HY, "hy"); - - public static final SupportedLocales FR_FR = new SupportedLocales(Value.FR_FR, "fr-FR"); - - public static final SupportedLocales CY = new SupportedLocales(Value.CY, "cy"); - - public static final SupportedLocales PA = new SupportedLocales(Value.PA, "pa"); - - public static final SupportedLocales KA = new SupportedLocales(Value.KA, "ka"); - - public static final SupportedLocales IS = new SupportedLocales(Value.IS, "is"); - - public static final SupportedLocales FA = new SupportedLocales(Value.FA, "fa"); - - public static final SupportedLocales BN = new SupportedLocales(Value.BN, "bn"); - - public static final SupportedLocales PT_BR = new SupportedLocales(Value.PT_BR, "pt-BR"); - - public static final SupportedLocales SW = new SupportedLocales(Value.SW, "sw"); - - public static final SupportedLocales HI = new SupportedLocales(Value.HI, "hi"); - - public static final SupportedLocales EN = new SupportedLocales(Value.EN, "en"); - - public static final SupportedLocales NB = new SupportedLocales(Value.NB, "nb"); - - public static final SupportedLocales DA = new SupportedLocales(Value.DA, "da"); - - public static final SupportedLocales LT = new SupportedLocales(Value.LT, "lt"); - - public static final SupportedLocales BS = new SupportedLocales(Value.BS, "bs"); - - public static final SupportedLocales ES_MX = new SupportedLocales(Value.ES_MX, "es-MX"); - - public static final SupportedLocales LV = new SupportedLocales(Value.LV, "lv"); - - public static final SupportedLocales RO = new SupportedLocales(Value.RO, "ro"); - - public static final SupportedLocales UK = new SupportedLocales(Value.UK, "uk"); - - public static final SupportedLocales DE = new SupportedLocales(Value.DE, "de"); - - public static final SupportedLocales ES = new SupportedLocales(Value.ES, "es"); - - public static final SupportedLocales KK = new SupportedLocales(Value.KK, "kk"); - - public static final SupportedLocales ET = new SupportedLocales(Value.ET, "et"); - - public static final SupportedLocales TA = new SupportedLocales(Value.TA, "ta"); - - public static final SupportedLocales HR = new SupportedLocales(Value.HR, "hr"); - - public static final SupportedLocales KN = new SupportedLocales(Value.KN, "kn"); - - public static final SupportedLocales ZGH = new SupportedLocales(Value.ZGH, "zgh"); - - public static final SupportedLocales AM = new SupportedLocales(Value.AM, "am"); - - public static final SupportedLocales JA = new SupportedLocales(Value.JA, "ja"); - - public static final SupportedLocales KO = new SupportedLocales(Value.KO, "ko"); - - public static final SupportedLocales RU = new SupportedLocales(Value.RU, "ru"); - - public static final SupportedLocales NL = new SupportedLocales(Value.NL, "nl"); - - public static final SupportedLocales VI = new SupportedLocales(Value.VI, "vi"); - - public static final SupportedLocales BG = new SupportedLocales(Value.BG, "bg"); - - public static final SupportedLocales NN = new SupportedLocales(Value.NN, "nn"); - - public static final SupportedLocales GL_ES = new SupportedLocales(Value.GL_ES, "gl-ES"); - - public static final SupportedLocales TH = new SupportedLocales(Value.TH, "th"); - - public static final SupportedLocales SR = new SupportedLocales(Value.SR, "sr"); - - public static final SupportedLocales ES419 = new SupportedLocales(Value.ES419, "es-419"); - - public static final SupportedLocales HE = new SupportedLocales(Value.HE, "he"); - - public static final SupportedLocales ZH_HK = new SupportedLocales(Value.ZH_HK, "zh-HK"); - - public static final SupportedLocales EU_ES = new SupportedLocales(Value.EU_ES, "eu-ES"); - - public static final SupportedLocales TL = new SupportedLocales(Value.TL, "tl"); - - public static final SupportedLocales IT = new SupportedLocales(Value.IT, "it"); - - public static final SupportedLocales SV = new SupportedLocales(Value.SV, "sv"); - - public static final SupportedLocales FR_CA = new SupportedLocales(Value.FR_CA, "fr-CA"); - - public static final SupportedLocales EL = new SupportedLocales(Value.EL, "el"); - - private final Value value; - - private final String string; - - SupportedLocales(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof SupportedLocales && this.string.equals(((SupportedLocales) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AZ: - return visitor.visitAz(); - case MK: - return visitor.visitMk(); - case CA_ES: - return visitor.visitCaEs(); - case ML: - return visitor.visitMl(); - case TR: - return visitor.visitTr(); - case GU: - return visitor.visitGu(); - case ES_AR: - return visitor.visitEsAr(); - case ID: - return visitor.visitId(); - case CNR: - return visitor.visitCnr(); - case MN: - return visitor.visitMn(); - case FI: - return visitor.visitFi(); - case PL: - return visitor.visitPl(); - case EN_CA: - return visitor.visitEnCa(); - case AR_EG: - return visitor.visitArEg(); - case MR: - return visitor.visitMr(); - case MS: - return visitor.visitMs(); - case PT_PT: - return visitor.visitPtPt(); - case SK: - return visitor.visitSk(); - case SL: - return visitor.visitSl(); - case CS: - return visitor.visitCs(); - case UR: - return visitor.visitUr(); - case HU: - return visitor.visitHu(); - case TE: - return visitor.visitTe(); - case ZH_CN: - return visitor.visitZhCn(); - case AR_SA: - return visitor.visitArSa(); - case SO: - return visitor.visitSo(); - case FR: - return visitor.visitFr(); - case NO: - return visitor.visitNo(); - case ZH_TW: - return visitor.visitZhTw(); - case AR: - return visitor.visitAr(); - case PT: - return visitor.visitPt(); - case MY: - return visitor.visitMy(); - case SQ: - return visitor.visitSq(); - case HY: - return visitor.visitHy(); - case FR_FR: - return visitor.visitFrFr(); - case CY: - return visitor.visitCy(); - case PA: - return visitor.visitPa(); - case KA: - return visitor.visitKa(); - case IS: - return visitor.visitIs(); - case FA: - return visitor.visitFa(); - case BN: - return visitor.visitBn(); - case PT_BR: - return visitor.visitPtBr(); - case SW: - return visitor.visitSw(); - case HI: - return visitor.visitHi(); - case EN: - return visitor.visitEn(); - case NB: - return visitor.visitNb(); - case DA: - return visitor.visitDa(); - case LT: - return visitor.visitLt(); - case BS: - return visitor.visitBs(); - case ES_MX: - return visitor.visitEsMx(); - case LV: - return visitor.visitLv(); - case RO: - return visitor.visitRo(); - case UK: - return visitor.visitUk(); - case DE: - return visitor.visitDe(); - case ES: - return visitor.visitEs(); - case KK: - return visitor.visitKk(); - case ET: - return visitor.visitEt(); - case TA: - return visitor.visitTa(); - case HR: - return visitor.visitHr(); - case KN: - return visitor.visitKn(); - case ZGH: - return visitor.visitZgh(); - case AM: - return visitor.visitAm(); - case JA: - return visitor.visitJa(); - case KO: - return visitor.visitKo(); - case RU: - return visitor.visitRu(); - case NL: - return visitor.visitNl(); - case VI: - return visitor.visitVi(); - case BG: - return visitor.visitBg(); - case NN: - return visitor.visitNn(); - case GL_ES: - return visitor.visitGlEs(); - case TH: - return visitor.visitTh(); - case SR: - return visitor.visitSr(); - case ES419: - return visitor.visitEs419(); - case HE: - return visitor.visitHe(); - case ZH_HK: - return visitor.visitZhHk(); - case EU_ES: - return visitor.visitEuEs(); - case TL: - return visitor.visitTl(); - case IT: - return visitor.visitIt(); - case SV: - return visitor.visitSv(); - case FR_CA: - return visitor.visitFrCa(); - case EL: - return visitor.visitEl(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static SupportedLocales valueOf(String value) { - switch (value) { - case "az": - return AZ; - case "mk": - return MK; - case "ca-ES": - return CA_ES; - case "ml": - return ML; - case "tr": - return TR; - case "gu": - return GU; - case "es-AR": - return ES_AR; - case "id": - return ID; - case "cnr": - return CNR; - case "mn": - return MN; - case "fi": - return FI; - case "pl": - return PL; - case "en-CA": - return EN_CA; - case "ar-EG": - return AR_EG; - case "mr": - return MR; - case "ms": - return MS; - case "pt-PT": - return PT_PT; - case "sk": - return SK; - case "sl": - return SL; - case "cs": - return CS; - case "ur": - return UR; - case "hu": - return HU; - case "te": - return TE; - case "zh-CN": - return ZH_CN; - case "ar-SA": - return AR_SA; - case "so": - return SO; - case "fr": - return FR; - case "no": - return NO; - case "zh-TW": - return ZH_TW; - case "ar": - return AR; - case "pt": - return PT; - case "my": - return MY; - case "sq": - return SQ; - case "hy": - return HY; - case "fr-FR": - return FR_FR; - case "cy": - return CY; - case "pa": - return PA; - case "ka": - return KA; - case "is": - return IS; - case "fa": - return FA; - case "bn": - return BN; - case "pt-BR": - return PT_BR; - case "sw": - return SW; - case "hi": - return HI; - case "en": - return EN; - case "nb": - return NB; - case "da": - return DA; - case "lt": - return LT; - case "bs": - return BS; - case "es-MX": - return ES_MX; - case "lv": - return LV; - case "ro": - return RO; - case "uk": - return UK; - case "de": - return DE; - case "es": - return ES; - case "kk": - return KK; - case "et": - return ET; - case "ta": - return TA; - case "hr": - return HR; - case "kn": - return KN; - case "zgh": - return ZGH; - case "am": - return AM; - case "ja": - return JA; - case "ko": - return KO; - case "ru": - return RU; - case "nl": - return NL; - case "vi": - return VI; - case "bg": - return BG; - case "nn": - return NN; - case "gl-ES": - return GL_ES; - case "th": - return TH; - case "sr": - return SR; - case "es-419": - return ES419; - case "he": - return HE; - case "zh-HK": - return ZH_HK; - case "eu-ES": - return EU_ES; - case "tl": - return TL; - case "it": - return IT; - case "sv": - return SV; - case "fr-CA": - return FR_CA; - case "el": - return EL; - default: - return new SupportedLocales(Value.UNKNOWN, value); - } - } - - public enum Value { - AM, - - AR, - - AR_EG, - - AR_SA, - - AZ, - - BG, - - BN, - - BS, - - CA_ES, - - CNR, - - CS, - - CY, - - DA, - - DE, - - EL, - - EN, - - EN_CA, - - ES, - - ES419, - - ES_AR, - - ES_MX, - - ET, - - EU_ES, - - FA, - - FI, - - FR, - - FR_CA, - - FR_FR, - - GL_ES, - - GU, - - HE, - - HI, - - HR, - - HU, - - HY, - - ID, - - IS, - - IT, - - JA, - - KA, - - KK, - - KN, - - KO, - - LT, - - LV, - - MK, - - ML, - - MN, - - MR, - - MS, - - MY, - - NB, - - NL, - - NN, - - NO, - - PA, - - PL, - - PT, - - PT_BR, - - PT_PT, - - RO, - - RU, - - SK, - - SL, - - SO, - - SQ, - - SR, - - SV, - - SW, - - TA, - - TE, - - TH, - - TL, - - TR, - - UK, - - UR, - - VI, - - ZGH, - - ZH_CN, - - ZH_HK, - - ZH_TW, - - UNKNOWN - } - - public interface Visitor { - T visitAm(); - - T visitAr(); - - T visitArEg(); - - T visitArSa(); - - T visitAz(); - - T visitBg(); - - T visitBn(); - - T visitBs(); - - T visitCaEs(); - - T visitCnr(); - - T visitCs(); - - T visitCy(); - - T visitDa(); - - T visitDe(); - - T visitEl(); - - T visitEn(); - - T visitEnCa(); - - T visitEs(); - - T visitEs419(); - - T visitEsAr(); - - T visitEsMx(); - - T visitEt(); - - T visitEuEs(); - - T visitFa(); - - T visitFi(); - - T visitFr(); - - T visitFrCa(); - - T visitFrFr(); - - T visitGlEs(); - - T visitGu(); - - T visitHe(); - - T visitHi(); - - T visitHr(); - - T visitHu(); - - T visitHy(); - - T visitId(); - - T visitIs(); - - T visitIt(); - - T visitJa(); - - T visitKa(); - - T visitKk(); - - T visitKn(); - - T visitKo(); - - T visitLt(); - - T visitLv(); - - T visitMk(); - - T visitMl(); - - T visitMn(); - - T visitMr(); - - T visitMs(); - - T visitMy(); - - T visitNb(); - - T visitNl(); - - T visitNn(); - - T visitNo(); - - T visitPa(); - - T visitPl(); - - T visitPt(); - - T visitPtBr(); - - T visitPtPt(); - - T visitRo(); - - T visitRu(); - - T visitSk(); - - T visitSl(); - - T visitSo(); - - T visitSq(); - - T visitSr(); - - T visitSv(); - - T visitSw(); - - T visitTa(); - - T visitTe(); - - T visitTh(); - - T visitTl(); - - T visitTr(); - - T visitUk(); - - T visitUr(); - - T visitVi(); - - T visitZgh(); - - T visitZhCn(); - - T visitZhHk(); - - T visitZhTw(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingPreLoginStage.java b/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingPreLoginStage.java deleted file mode 100644 index bdadd4d67..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingPreLoginStage.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SuspiciousIpThrottlingPreLoginStage.Builder.class) -public final class SuspiciousIpThrottlingPreLoginStage { - private final Optional maxAttempts; - - private final Optional rate; - - private final Map additionalProperties; - - private SuspiciousIpThrottlingPreLoginStage( - Optional maxAttempts, Optional rate, Map additionalProperties) { - this.maxAttempts = maxAttempts; - this.rate = rate; - this.additionalProperties = additionalProperties; - } - - /** - * @return Total number of attempts allowed per day. - */ - @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 SuspiciousIpThrottlingPreLoginStage - && equalTo((SuspiciousIpThrottlingPreLoginStage) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SuspiciousIpThrottlingPreLoginStage 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(SuspiciousIpThrottlingPreLoginStage other) { - maxAttempts(other.getMaxAttempts()); - rate(other.getRate()); - return this; - } - - /** - *

Total number of attempts allowed per day.

- */ - @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 SuspiciousIpThrottlingPreLoginStage build() { - return new SuspiciousIpThrottlingPreLoginStage(maxAttempts, rate, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingPreUserRegistrationStage.java b/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingPreUserRegistrationStage.java deleted file mode 100644 index 255f2881b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingPreUserRegistrationStage.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SuspiciousIpThrottlingPreUserRegistrationStage.Builder.class) -public final class SuspiciousIpThrottlingPreUserRegistrationStage { - private final Optional maxAttempts; - - private final Optional rate; - - private final Map additionalProperties; - - private SuspiciousIpThrottlingPreUserRegistrationStage( - 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 SuspiciousIpThrottlingPreUserRegistrationStage - && equalTo((SuspiciousIpThrottlingPreUserRegistrationStage) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SuspiciousIpThrottlingPreUserRegistrationStage 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(SuspiciousIpThrottlingPreUserRegistrationStage 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 SuspiciousIpThrottlingPreUserRegistrationStage build() { - return new SuspiciousIpThrottlingPreUserRegistrationStage(maxAttempts, rate, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingShieldsEnum.java b/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingShieldsEnum.java deleted file mode 100644 index 00f6b5ade..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingShieldsEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class SuspiciousIpThrottlingShieldsEnum { - public static final SuspiciousIpThrottlingShieldsEnum BLOCK = - new SuspiciousIpThrottlingShieldsEnum(Value.BLOCK, "block"); - - public static final SuspiciousIpThrottlingShieldsEnum ADMIN_NOTIFICATION = - new SuspiciousIpThrottlingShieldsEnum(Value.ADMIN_NOTIFICATION, "admin_notification"); - - private final Value value; - - private final String string; - - SuspiciousIpThrottlingShieldsEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof SuspiciousIpThrottlingShieldsEnum - && this.string.equals(((SuspiciousIpThrottlingShieldsEnum) 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 ADMIN_NOTIFICATION: - return visitor.visitAdminNotification(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static SuspiciousIpThrottlingShieldsEnum valueOf(String value) { - switch (value) { - case "block": - return BLOCK; - case "admin_notification": - return ADMIN_NOTIFICATION; - default: - return new SuspiciousIpThrottlingShieldsEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - BLOCK, - - ADMIN_NOTIFICATION, - - UNKNOWN - } - - public interface Visitor { - T visitBlock(); - - T visitAdminNotification(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingStage.java b/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingStage.java deleted file mode 100644 index 9aeba1e60..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/SuspiciousIpThrottlingStage.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = SuspiciousIpThrottlingStage.Builder.class) -public final class SuspiciousIpThrottlingStage { - private final Optional preLogin; - - private final Optional preUserRegistration; - - private final Map additionalProperties; - - private SuspiciousIpThrottlingStage( - Optional preLogin, - Optional preUserRegistration, - Map additionalProperties) { - this.preLogin = preLogin; - this.preUserRegistration = preUserRegistration; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("pre-login") - public Optional getPreLogin() { - return preLogin; - } - - @JsonProperty("pre-user-registration") - public Optional getPreUserRegistration() { - return preUserRegistration; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof SuspiciousIpThrottlingStage && equalTo((SuspiciousIpThrottlingStage) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(SuspiciousIpThrottlingStage other) { - return preLogin.equals(other.preLogin) && preUserRegistration.equals(other.preUserRegistration); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.preLogin, this.preUserRegistration); - } - - @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 preLogin = Optional.empty(); - - private Optional preUserRegistration = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(SuspiciousIpThrottlingStage other) { - preLogin(other.getPreLogin()); - preUserRegistration(other.getPreUserRegistration()); - return this; - } - - @JsonSetter(value = "pre-login", nulls = Nulls.SKIP) - public Builder preLogin(Optional preLogin) { - this.preLogin = preLogin; - return this; - } - - public Builder preLogin(SuspiciousIpThrottlingPreLoginStage preLogin) { - this.preLogin = Optional.ofNullable(preLogin); - return this; - } - - @JsonSetter(value = "pre-user-registration", nulls = Nulls.SKIP) - public Builder preUserRegistration( - Optional preUserRegistration) { - this.preUserRegistration = preUserRegistration; - return this; - } - - public Builder preUserRegistration(SuspiciousIpThrottlingPreUserRegistrationStage preUserRegistration) { - this.preUserRegistration = Optional.ofNullable(preUserRegistration); - return this; - } - - public SuspiciousIpThrottlingStage build() { - return new SuspiciousIpThrottlingStage(preLogin, preUserRegistration, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantOidcLogoutSettings.java b/src/main/java/com/auth0/client/mgmt/types/TenantOidcLogoutSettings.java deleted file mode 100644 index 5439ecd61..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TenantOidcLogoutSettings.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = TenantOidcLogoutSettings.Builder.class) -public final class TenantOidcLogoutSettings { - private final Optional rpLogoutEndSessionEndpointDiscovery; - - private final Map additionalProperties; - - private TenantOidcLogoutSettings( - Optional rpLogoutEndSessionEndpointDiscovery, Map additionalProperties) { - this.rpLogoutEndSessionEndpointDiscovery = rpLogoutEndSessionEndpointDiscovery; - this.additionalProperties = additionalProperties; - } - - /** - * @return Enable the end_session_endpoint URL in the .well-known discovery configuration - */ - @JsonProperty("rp_logout_end_session_endpoint_discovery") - public Optional getRpLogoutEndSessionEndpointDiscovery() { - return rpLogoutEndSessionEndpointDiscovery; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TenantOidcLogoutSettings && equalTo((TenantOidcLogoutSettings) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TenantOidcLogoutSettings other) { - return rpLogoutEndSessionEndpointDiscovery.equals(other.rpLogoutEndSessionEndpointDiscovery); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.rpLogoutEndSessionEndpointDiscovery); - } - - @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 rpLogoutEndSessionEndpointDiscovery = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(TenantOidcLogoutSettings other) { - rpLogoutEndSessionEndpointDiscovery(other.getRpLogoutEndSessionEndpointDiscovery()); - return this; - } - - /** - *

Enable the end_session_endpoint URL in the .well-known discovery configuration

- */ - @JsonSetter(value = "rp_logout_end_session_endpoint_discovery", nulls = Nulls.SKIP) - public Builder rpLogoutEndSessionEndpointDiscovery(Optional rpLogoutEndSessionEndpointDiscovery) { - this.rpLogoutEndSessionEndpointDiscovery = rpLogoutEndSessionEndpointDiscovery; - return this; - } - - public Builder rpLogoutEndSessionEndpointDiscovery(Boolean rpLogoutEndSessionEndpointDiscovery) { - this.rpLogoutEndSessionEndpointDiscovery = Optional.ofNullable(rpLogoutEndSessionEndpointDiscovery); - return this; - } - - public TenantOidcLogoutSettings build() { - return new TenantOidcLogoutSettings(rpLogoutEndSessionEndpointDiscovery, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsDeviceFlow.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsDeviceFlow.java deleted file mode 100644 index 2aaf54480..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsDeviceFlow.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = TenantSettingsDeviceFlow.Builder.class) -public final class TenantSettingsDeviceFlow { - private final Optional charset; - - private final Optional mask; - - private final Map additionalProperties; - - private TenantSettingsDeviceFlow( - Optional charset, - Optional mask, - Map additionalProperties) { - this.charset = charset; - this.mask = mask; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("charset") - public Optional getCharset() { - return charset; - } - - /** - * @return Mask used to format a generated User Code into a friendly, readable format. - */ - @JsonProperty("mask") - public Optional getMask() { - return mask; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TenantSettingsDeviceFlow && equalTo((TenantSettingsDeviceFlow) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TenantSettingsDeviceFlow other) { - return charset.equals(other.charset) && mask.equals(other.mask); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.charset, this.mask); - } - - @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 charset = Optional.empty(); - - private Optional mask = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(TenantSettingsDeviceFlow other) { - charset(other.getCharset()); - mask(other.getMask()); - return this; - } - - @JsonSetter(value = "charset", nulls = Nulls.SKIP) - public Builder charset(Optional charset) { - this.charset = charset; - return this; - } - - public Builder charset(TenantSettingsDeviceFlowCharset charset) { - this.charset = Optional.ofNullable(charset); - return this; - } - - /** - *

Mask used to format a generated User Code into a friendly, readable format.

- */ - @JsonSetter(value = "mask", nulls = Nulls.SKIP) - public Builder mask(Optional mask) { - this.mask = mask; - return this; - } - - public Builder mask(String mask) { - this.mask = Optional.ofNullable(mask); - return this; - } - - public TenantSettingsDeviceFlow build() { - return new TenantSettingsDeviceFlow(charset, mask, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsDeviceFlowCharset.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsDeviceFlowCharset.java deleted file mode 100644 index deafec3a2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsDeviceFlowCharset.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class TenantSettingsDeviceFlowCharset { - public static final TenantSettingsDeviceFlowCharset DIGITS = - new TenantSettingsDeviceFlowCharset(Value.DIGITS, "digits"); - - public static final TenantSettingsDeviceFlowCharset BASE20 = - new TenantSettingsDeviceFlowCharset(Value.BASE20, "base20"); - - private final Value value; - - private final String string; - - TenantSettingsDeviceFlowCharset(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof TenantSettingsDeviceFlowCharset - && this.string.equals(((TenantSettingsDeviceFlowCharset) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DIGITS: - return visitor.visitDigits(); - case BASE20: - return visitor.visitBase20(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static TenantSettingsDeviceFlowCharset valueOf(String value) { - switch (value) { - case "digits": - return DIGITS; - case "base20": - return BASE20; - default: - return new TenantSettingsDeviceFlowCharset(Value.UNKNOWN, value); - } - } - - public enum Value { - BASE20, - - DIGITS, - - UNKNOWN - } - - public interface Visitor { - T visitBase20(); - - T visitDigits(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsErrorPage.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsErrorPage.java deleted file mode 100644 index 906837dc1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsErrorPage.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = TenantSettingsErrorPage.Builder.class) -public final class TenantSettingsErrorPage { - private final Optional html; - - private final Optional showLogLink; - - private final Optional url; - - private final Map additionalProperties; - - private TenantSettingsErrorPage( - Optional html, - Optional showLogLink, - Optional url, - Map additionalProperties) { - this.html = html; - this.showLogLink = showLogLink; - this.url = url; - this.additionalProperties = additionalProperties; - } - - /** - * @return Custom Error HTML (<a href='https://github.com/Shopify/liquid/wiki/Liquid-for-Designers'>Liquid syntax</a> is supported). - */ - @JsonProperty("html") - public Optional getHtml() { - return html; - } - - /** - * @return Whether to show the link to log as part of the default error page (true, default) or not to show the link (false). - */ - @JsonProperty("show_log_link") - public Optional getShowLogLink() { - return showLogLink; - } - - /** - * @return URL to redirect to when an error occurs instead of showing the default error page. - */ - @JsonProperty("url") - public Optional getUrl() { - return url; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TenantSettingsErrorPage && equalTo((TenantSettingsErrorPage) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TenantSettingsErrorPage other) { - return html.equals(other.html) && showLogLink.equals(other.showLogLink) && url.equals(other.url); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.html, this.showLogLink, this.url); - } - - @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 html = Optional.empty(); - - private Optional showLogLink = Optional.empty(); - - private Optional url = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(TenantSettingsErrorPage other) { - html(other.getHtml()); - showLogLink(other.getShowLogLink()); - url(other.getUrl()); - return this; - } - - /** - *

Custom Error HTML (<a href='https://github.com/Shopify/liquid/wiki/Liquid-for-Designers'>Liquid syntax</a> is supported).

- */ - @JsonSetter(value = "html", nulls = Nulls.SKIP) - public Builder html(Optional html) { - this.html = html; - return this; - } - - public Builder html(String html) { - this.html = Optional.ofNullable(html); - return this; - } - - /** - *

Whether to show the link to log as part of the default error page (true, default) or not to show the link (false).

- */ - @JsonSetter(value = "show_log_link", nulls = Nulls.SKIP) - public Builder showLogLink(Optional showLogLink) { - this.showLogLink = showLogLink; - return this; - } - - public Builder showLogLink(Boolean showLogLink) { - this.showLogLink = Optional.ofNullable(showLogLink); - return this; - } - - /** - *

URL to redirect to when an error occurs instead of showing the default error page.

- */ - @JsonSetter(value = "url", nulls = Nulls.SKIP) - public Builder url(Optional url) { - this.url = url; - return this; - } - - public Builder url(String url) { - this.url = Optional.ofNullable(url); - return this; - } - - public TenantSettingsErrorPage build() { - return new TenantSettingsErrorPage(html, showLogLink, url, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsFlags.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsFlags.java deleted file mode 100644 index 29fb8040c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsFlags.java +++ /dev/null @@ -1,1010 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = TenantSettingsFlags.Builder.class) -public final class TenantSettingsFlags { - private final Optional changePwdFlowV1; - - private final Optional enableApisSection; - - private final Optional disableImpersonation; - - private final Optional enableClientConnections; - - private final Optional enablePipeline2; - - private final Optional allowLegacyDelegationGrantTypes; - - private final Optional allowLegacyRoGrantTypes; - - private final Optional allowLegacyTokeninfoEndpoint; - - private final Optional enableLegacyProfile; - - private final Optional enableIdtokenApi2; - - private final Optional enablePublicSignupUserExistsError; - - private final Optional enableSso; - - private final Optional allowChangingEnableSso; - - private final Optional disableClickjackProtectionHeaders; - - private final Optional noDiscloseEnterpriseConnections; - - private final Optional enforceClientAuthenticationOnPasswordlessStart; - - private final Optional enableAdfsWaadEmailVerification; - - private final Optional revokeRefreshTokenGrant; - - private final Optional dashboardLogStreamsNext; - - private final Optional dashboardInsightsView; - - private final Optional disableFieldsMapFix; - - private final Optional mfaShowFactorListOnEnrollment; - - private final Optional removeAlgFromJwks; - - private final Optional improvedSignupBotDetectionInClassic; - - private final Optional genaiTrial; - - private final Optional enableDynamicClientRegistration; - - private final Optional disableManagementApiSmsObfuscation; - - private final Optional trustAzureAdfsEmailVerifiedConnectionProperty; - - private final Optional customDomainsProvisioning; - - private final Map additionalProperties; - - private TenantSettingsFlags( - Optional changePwdFlowV1, - Optional enableApisSection, - Optional disableImpersonation, - Optional enableClientConnections, - Optional enablePipeline2, - Optional allowLegacyDelegationGrantTypes, - Optional allowLegacyRoGrantTypes, - Optional allowLegacyTokeninfoEndpoint, - Optional enableLegacyProfile, - Optional enableIdtokenApi2, - Optional enablePublicSignupUserExistsError, - Optional enableSso, - Optional allowChangingEnableSso, - Optional disableClickjackProtectionHeaders, - Optional noDiscloseEnterpriseConnections, - Optional enforceClientAuthenticationOnPasswordlessStart, - Optional enableAdfsWaadEmailVerification, - Optional revokeRefreshTokenGrant, - Optional dashboardLogStreamsNext, - Optional dashboardInsightsView, - Optional disableFieldsMapFix, - Optional mfaShowFactorListOnEnrollment, - Optional removeAlgFromJwks, - Optional improvedSignupBotDetectionInClassic, - Optional genaiTrial, - Optional enableDynamicClientRegistration, - Optional disableManagementApiSmsObfuscation, - Optional trustAzureAdfsEmailVerifiedConnectionProperty, - Optional customDomainsProvisioning, - Map additionalProperties) { - this.changePwdFlowV1 = changePwdFlowV1; - this.enableApisSection = enableApisSection; - this.disableImpersonation = disableImpersonation; - this.enableClientConnections = enableClientConnections; - this.enablePipeline2 = enablePipeline2; - this.allowLegacyDelegationGrantTypes = allowLegacyDelegationGrantTypes; - this.allowLegacyRoGrantTypes = allowLegacyRoGrantTypes; - this.allowLegacyTokeninfoEndpoint = allowLegacyTokeninfoEndpoint; - this.enableLegacyProfile = enableLegacyProfile; - this.enableIdtokenApi2 = enableIdtokenApi2; - this.enablePublicSignupUserExistsError = enablePublicSignupUserExistsError; - this.enableSso = enableSso; - this.allowChangingEnableSso = allowChangingEnableSso; - this.disableClickjackProtectionHeaders = disableClickjackProtectionHeaders; - this.noDiscloseEnterpriseConnections = noDiscloseEnterpriseConnections; - this.enforceClientAuthenticationOnPasswordlessStart = enforceClientAuthenticationOnPasswordlessStart; - this.enableAdfsWaadEmailVerification = enableAdfsWaadEmailVerification; - this.revokeRefreshTokenGrant = revokeRefreshTokenGrant; - this.dashboardLogStreamsNext = dashboardLogStreamsNext; - this.dashboardInsightsView = dashboardInsightsView; - this.disableFieldsMapFix = disableFieldsMapFix; - this.mfaShowFactorListOnEnrollment = mfaShowFactorListOnEnrollment; - this.removeAlgFromJwks = removeAlgFromJwks; - this.improvedSignupBotDetectionInClassic = improvedSignupBotDetectionInClassic; - this.genaiTrial = genaiTrial; - this.enableDynamicClientRegistration = enableDynamicClientRegistration; - this.disableManagementApiSmsObfuscation = disableManagementApiSmsObfuscation; - this.trustAzureAdfsEmailVerifiedConnectionProperty = trustAzureAdfsEmailVerifiedConnectionProperty; - this.customDomainsProvisioning = customDomainsProvisioning; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether to use the older v1 change password flow (true, not recommended except for backward compatibility) or the newer safer flow (false, recommended). - */ - @JsonProperty("change_pwd_flow_v1") - public Optional getChangePwdFlowV1() { - return changePwdFlowV1; - } - - /** - * @return Whether the APIs section is enabled (true) or disabled (false). - */ - @JsonProperty("enable_apis_section") - public Optional getEnableApisSection() { - return enableApisSection; - } - - /** - * @return Whether the impersonation functionality has been disabled (true) or not (false). Read-only. - */ - @JsonProperty("disable_impersonation") - public Optional getDisableImpersonation() { - return disableImpersonation; - } - - /** - * @return Whether all current connections should be enabled when a new client (application) is created (true, default) or not (false). - */ - @JsonProperty("enable_client_connections") - public Optional getEnableClientConnections() { - return enableClientConnections; - } - - /** - * @return Whether advanced API Authorization scenarios are enabled (true) or disabled (false). - */ - @JsonProperty("enable_pipeline2") - public Optional getEnablePipeline2() { - return enablePipeline2; - } - - /** - * @return If enabled, clients are able to add legacy delegation grants. - */ - @JsonProperty("allow_legacy_delegation_grant_types") - public Optional getAllowLegacyDelegationGrantTypes() { - return allowLegacyDelegationGrantTypes; - } - - /** - * @return If enabled, clients are able to add legacy RO grants. - */ - @JsonProperty("allow_legacy_ro_grant_types") - public Optional getAllowLegacyRoGrantTypes() { - return allowLegacyRoGrantTypes; - } - - /** - * @return Whether the legacy /tokeninfo endpoint is enabled for your account (true) or unavailable (false). - */ - @JsonProperty("allow_legacy_tokeninfo_endpoint") - public Optional getAllowLegacyTokeninfoEndpoint() { - return allowLegacyTokeninfoEndpoint; - } - - /** - * @return Whether ID tokens and the userinfo endpoint includes a complete user profile (true) or only OpenID Connect claims (false). - */ - @JsonProperty("enable_legacy_profile") - public Optional getEnableLegacyProfile() { - return enableLegacyProfile; - } - - /** - * @return Whether ID tokens can be used to authorize some types of requests to API v2 (true) not not (false). - */ - @JsonProperty("enable_idtoken_api2") - public Optional getEnableIdtokenApi2() { - return enableIdtokenApi2; - } - - /** - * @return Whether the public sign up process shows a user_exists error (true) or a generic error (false) if the user already exists. - */ - @JsonProperty("enable_public_signup_user_exists_error") - public Optional getEnablePublicSignupUserExistsError() { - return enablePublicSignupUserExistsError; - } - - /** - * @return Whether users are prompted to confirm log in before SSO redirection (false) or are not prompted (true). - */ - @JsonProperty("enable_sso") - public Optional getEnableSso() { - return enableSso; - } - - /** - * @return Whether the enable_sso setting can be changed (true) or not (false). - */ - @JsonProperty("allow_changing_enable_sso") - public Optional getAllowChangingEnableSso() { - return allowChangingEnableSso; - } - - /** - * @return Whether classic Universal Login prompts include additional security headers to prevent clickjacking (true) or no safeguard (false). - */ - @JsonProperty("disable_clickjack_protection_headers") - public Optional getDisableClickjackProtectionHeaders() { - return disableClickjackProtectionHeaders; - } - - /** - * @return Do not Publish Enterprise Connections Information with IdP domains on the lock configuration file. - */ - @JsonProperty("no_disclose_enterprise_connections") - public Optional getNoDiscloseEnterpriseConnections() { - return noDiscloseEnterpriseConnections; - } - - /** - * @return Enforce client authentication for passwordless start. - */ - @JsonProperty("enforce_client_authentication_on_passwordless_start") - public Optional getEnforceClientAuthenticationOnPasswordlessStart() { - return enforceClientAuthenticationOnPasswordlessStart; - } - - /** - * @return Enables the email verification flow during login for Azure AD and ADFS connections - */ - @JsonProperty("enable_adfs_waad_email_verification") - public Optional getEnableAdfsWaadEmailVerification() { - return enableAdfsWaadEmailVerification; - } - - /** - * @return Delete underlying grant when a Refresh Token is revoked via the Authentication API. - */ - @JsonProperty("revoke_refresh_token_grant") - public Optional getRevokeRefreshTokenGrant() { - return revokeRefreshTokenGrant; - } - - /** - * @return Enables beta access to log streaming changes - */ - @JsonProperty("dashboard_log_streams_next") - public Optional getDashboardLogStreamsNext() { - return dashboardLogStreamsNext; - } - - /** - * @return Enables new insights activity page view - */ - @JsonProperty("dashboard_insights_view") - public Optional getDashboardInsightsView() { - return dashboardInsightsView; - } - - /** - * @return Disables SAML fields map fix for bad mappings with repeated attributes - */ - @JsonProperty("disable_fields_map_fix") - public Optional getDisableFieldsMapFix() { - return disableFieldsMapFix; - } - - /** - * @return Used to allow users to pick what factor to enroll of the available MFA factors. - */ - @JsonProperty("mfa_show_factor_list_on_enrollment") - public Optional getMfaShowFactorListOnEnrollment() { - return mfaShowFactorListOnEnrollment; - } - - /** - * @return Removes alg property from jwks .well-known endpoint - */ - @JsonProperty("remove_alg_from_jwks") - public Optional getRemoveAlgFromJwks() { - return removeAlgFromJwks; - } - - /** - * @return Improves bot detection during signup in classic universal login - */ - @JsonProperty("improved_signup_bot_detection_in_classic") - public Optional getImprovedSignupBotDetectionInClassic() { - return improvedSignupBotDetectionInClassic; - } - - /** - * @return This tenant signed up for the Auth4GenAI trail - */ - @JsonProperty("genai_trial") - public Optional getGenaiTrial() { - return genaiTrial; - } - - /** - * @return Whether third-party developers can <a href="https://auth0.com/docs/api-auth/dynamic-client-registration">dynamically register</a> applications for your APIs (true) or not (false). This flag enables dynamic client registration. - */ - @JsonProperty("enable_dynamic_client_registration") - public Optional getEnableDynamicClientRegistration() { - return enableDynamicClientRegistration; - } - - /** - * @return If true, SMS phone numbers will not be obfuscated in Management API GET calls. - */ - @JsonProperty("disable_management_api_sms_obfuscation") - public Optional getDisableManagementApiSmsObfuscation() { - return disableManagementApiSmsObfuscation; - } - - /** - * @return Changes email_verified behavior for Azure AD/ADFS connections when enabled. Sets email_verified to false otherwise. - */ - @JsonProperty("trust_azure_adfs_email_verified_connection_property") - public Optional getTrustAzureAdfsEmailVerifiedConnectionProperty() { - return trustAzureAdfsEmailVerifiedConnectionProperty; - } - - /** - * @return If true, custom domains feature will be enabled for tenant. - */ - @JsonProperty("custom_domains_provisioning") - public Optional getCustomDomainsProvisioning() { - return customDomainsProvisioning; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TenantSettingsFlags && equalTo((TenantSettingsFlags) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TenantSettingsFlags other) { - return changePwdFlowV1.equals(other.changePwdFlowV1) - && enableApisSection.equals(other.enableApisSection) - && disableImpersonation.equals(other.disableImpersonation) - && enableClientConnections.equals(other.enableClientConnections) - && enablePipeline2.equals(other.enablePipeline2) - && allowLegacyDelegationGrantTypes.equals(other.allowLegacyDelegationGrantTypes) - && allowLegacyRoGrantTypes.equals(other.allowLegacyRoGrantTypes) - && allowLegacyTokeninfoEndpoint.equals(other.allowLegacyTokeninfoEndpoint) - && enableLegacyProfile.equals(other.enableLegacyProfile) - && enableIdtokenApi2.equals(other.enableIdtokenApi2) - && enablePublicSignupUserExistsError.equals(other.enablePublicSignupUserExistsError) - && enableSso.equals(other.enableSso) - && allowChangingEnableSso.equals(other.allowChangingEnableSso) - && disableClickjackProtectionHeaders.equals(other.disableClickjackProtectionHeaders) - && noDiscloseEnterpriseConnections.equals(other.noDiscloseEnterpriseConnections) - && enforceClientAuthenticationOnPasswordlessStart.equals( - other.enforceClientAuthenticationOnPasswordlessStart) - && enableAdfsWaadEmailVerification.equals(other.enableAdfsWaadEmailVerification) - && revokeRefreshTokenGrant.equals(other.revokeRefreshTokenGrant) - && dashboardLogStreamsNext.equals(other.dashboardLogStreamsNext) - && dashboardInsightsView.equals(other.dashboardInsightsView) - && disableFieldsMapFix.equals(other.disableFieldsMapFix) - && mfaShowFactorListOnEnrollment.equals(other.mfaShowFactorListOnEnrollment) - && removeAlgFromJwks.equals(other.removeAlgFromJwks) - && improvedSignupBotDetectionInClassic.equals(other.improvedSignupBotDetectionInClassic) - && genaiTrial.equals(other.genaiTrial) - && enableDynamicClientRegistration.equals(other.enableDynamicClientRegistration) - && disableManagementApiSmsObfuscation.equals(other.disableManagementApiSmsObfuscation) - && trustAzureAdfsEmailVerifiedConnectionProperty.equals( - other.trustAzureAdfsEmailVerifiedConnectionProperty) - && customDomainsProvisioning.equals(other.customDomainsProvisioning); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.changePwdFlowV1, - this.enableApisSection, - this.disableImpersonation, - this.enableClientConnections, - this.enablePipeline2, - this.allowLegacyDelegationGrantTypes, - this.allowLegacyRoGrantTypes, - this.allowLegacyTokeninfoEndpoint, - this.enableLegacyProfile, - this.enableIdtokenApi2, - this.enablePublicSignupUserExistsError, - this.enableSso, - this.allowChangingEnableSso, - this.disableClickjackProtectionHeaders, - this.noDiscloseEnterpriseConnections, - this.enforceClientAuthenticationOnPasswordlessStart, - this.enableAdfsWaadEmailVerification, - this.revokeRefreshTokenGrant, - this.dashboardLogStreamsNext, - this.dashboardInsightsView, - this.disableFieldsMapFix, - this.mfaShowFactorListOnEnrollment, - this.removeAlgFromJwks, - this.improvedSignupBotDetectionInClassic, - this.genaiTrial, - this.enableDynamicClientRegistration, - this.disableManagementApiSmsObfuscation, - this.trustAzureAdfsEmailVerifiedConnectionProperty, - this.customDomainsProvisioning); - } - - @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 changePwdFlowV1 = Optional.empty(); - - private Optional enableApisSection = Optional.empty(); - - private Optional disableImpersonation = Optional.empty(); - - private Optional enableClientConnections = Optional.empty(); - - private Optional enablePipeline2 = Optional.empty(); - - private Optional allowLegacyDelegationGrantTypes = Optional.empty(); - - private Optional allowLegacyRoGrantTypes = Optional.empty(); - - private Optional allowLegacyTokeninfoEndpoint = Optional.empty(); - - private Optional enableLegacyProfile = Optional.empty(); - - private Optional enableIdtokenApi2 = Optional.empty(); - - private Optional enablePublicSignupUserExistsError = Optional.empty(); - - private Optional enableSso = Optional.empty(); - - private Optional allowChangingEnableSso = Optional.empty(); - - private Optional disableClickjackProtectionHeaders = Optional.empty(); - - private Optional noDiscloseEnterpriseConnections = Optional.empty(); - - private Optional enforceClientAuthenticationOnPasswordlessStart = Optional.empty(); - - private Optional enableAdfsWaadEmailVerification = Optional.empty(); - - private Optional revokeRefreshTokenGrant = Optional.empty(); - - private Optional dashboardLogStreamsNext = Optional.empty(); - - private Optional dashboardInsightsView = Optional.empty(); - - private Optional disableFieldsMapFix = Optional.empty(); - - private Optional mfaShowFactorListOnEnrollment = Optional.empty(); - - private Optional removeAlgFromJwks = Optional.empty(); - - private Optional improvedSignupBotDetectionInClassic = Optional.empty(); - - private Optional genaiTrial = Optional.empty(); - - private Optional enableDynamicClientRegistration = Optional.empty(); - - private Optional disableManagementApiSmsObfuscation = Optional.empty(); - - private Optional trustAzureAdfsEmailVerifiedConnectionProperty = Optional.empty(); - - private Optional customDomainsProvisioning = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(TenantSettingsFlags other) { - changePwdFlowV1(other.getChangePwdFlowV1()); - enableApisSection(other.getEnableApisSection()); - disableImpersonation(other.getDisableImpersonation()); - enableClientConnections(other.getEnableClientConnections()); - enablePipeline2(other.getEnablePipeline2()); - allowLegacyDelegationGrantTypes(other.getAllowLegacyDelegationGrantTypes()); - allowLegacyRoGrantTypes(other.getAllowLegacyRoGrantTypes()); - allowLegacyTokeninfoEndpoint(other.getAllowLegacyTokeninfoEndpoint()); - enableLegacyProfile(other.getEnableLegacyProfile()); - enableIdtokenApi2(other.getEnableIdtokenApi2()); - enablePublicSignupUserExistsError(other.getEnablePublicSignupUserExistsError()); - enableSso(other.getEnableSso()); - allowChangingEnableSso(other.getAllowChangingEnableSso()); - disableClickjackProtectionHeaders(other.getDisableClickjackProtectionHeaders()); - noDiscloseEnterpriseConnections(other.getNoDiscloseEnterpriseConnections()); - enforceClientAuthenticationOnPasswordlessStart(other.getEnforceClientAuthenticationOnPasswordlessStart()); - enableAdfsWaadEmailVerification(other.getEnableAdfsWaadEmailVerification()); - revokeRefreshTokenGrant(other.getRevokeRefreshTokenGrant()); - dashboardLogStreamsNext(other.getDashboardLogStreamsNext()); - dashboardInsightsView(other.getDashboardInsightsView()); - disableFieldsMapFix(other.getDisableFieldsMapFix()); - mfaShowFactorListOnEnrollment(other.getMfaShowFactorListOnEnrollment()); - removeAlgFromJwks(other.getRemoveAlgFromJwks()); - improvedSignupBotDetectionInClassic(other.getImprovedSignupBotDetectionInClassic()); - genaiTrial(other.getGenaiTrial()); - enableDynamicClientRegistration(other.getEnableDynamicClientRegistration()); - disableManagementApiSmsObfuscation(other.getDisableManagementApiSmsObfuscation()); - trustAzureAdfsEmailVerifiedConnectionProperty(other.getTrustAzureAdfsEmailVerifiedConnectionProperty()); - customDomainsProvisioning(other.getCustomDomainsProvisioning()); - return this; - } - - /** - *

Whether to use the older v1 change password flow (true, not recommended except for backward compatibility) or the newer safer flow (false, recommended).

- */ - @JsonSetter(value = "change_pwd_flow_v1", nulls = Nulls.SKIP) - public Builder changePwdFlowV1(Optional changePwdFlowV1) { - this.changePwdFlowV1 = changePwdFlowV1; - return this; - } - - public Builder changePwdFlowV1(Boolean changePwdFlowV1) { - this.changePwdFlowV1 = Optional.ofNullable(changePwdFlowV1); - return this; - } - - /** - *

Whether the APIs section is enabled (true) or disabled (false).

- */ - @JsonSetter(value = "enable_apis_section", nulls = Nulls.SKIP) - public Builder enableApisSection(Optional enableApisSection) { - this.enableApisSection = enableApisSection; - return this; - } - - public Builder enableApisSection(Boolean enableApisSection) { - this.enableApisSection = Optional.ofNullable(enableApisSection); - return this; - } - - /** - *

Whether the impersonation functionality has been disabled (true) or not (false). Read-only.

- */ - @JsonSetter(value = "disable_impersonation", nulls = Nulls.SKIP) - public Builder disableImpersonation(Optional disableImpersonation) { - this.disableImpersonation = disableImpersonation; - return this; - } - - public Builder disableImpersonation(Boolean disableImpersonation) { - this.disableImpersonation = Optional.ofNullable(disableImpersonation); - return this; - } - - /** - *

Whether all current connections should be enabled when a new client (application) is created (true, default) or not (false).

- */ - @JsonSetter(value = "enable_client_connections", nulls = Nulls.SKIP) - public Builder enableClientConnections(Optional enableClientConnections) { - this.enableClientConnections = enableClientConnections; - return this; - } - - public Builder enableClientConnections(Boolean enableClientConnections) { - this.enableClientConnections = Optional.ofNullable(enableClientConnections); - return this; - } - - /** - *

Whether advanced API Authorization scenarios are enabled (true) or disabled (false).

- */ - @JsonSetter(value = "enable_pipeline2", nulls = Nulls.SKIP) - public Builder enablePipeline2(Optional enablePipeline2) { - this.enablePipeline2 = enablePipeline2; - return this; - } - - public Builder enablePipeline2(Boolean enablePipeline2) { - this.enablePipeline2 = Optional.ofNullable(enablePipeline2); - return this; - } - - /** - *

If enabled, clients are able to add legacy delegation grants.

- */ - @JsonSetter(value = "allow_legacy_delegation_grant_types", nulls = Nulls.SKIP) - public Builder allowLegacyDelegationGrantTypes(Optional allowLegacyDelegationGrantTypes) { - this.allowLegacyDelegationGrantTypes = allowLegacyDelegationGrantTypes; - return this; - } - - public Builder allowLegacyDelegationGrantTypes(Boolean allowLegacyDelegationGrantTypes) { - this.allowLegacyDelegationGrantTypes = Optional.ofNullable(allowLegacyDelegationGrantTypes); - return this; - } - - /** - *

If enabled, clients are able to add legacy RO grants.

- */ - @JsonSetter(value = "allow_legacy_ro_grant_types", nulls = Nulls.SKIP) - public Builder allowLegacyRoGrantTypes(Optional allowLegacyRoGrantTypes) { - this.allowLegacyRoGrantTypes = allowLegacyRoGrantTypes; - return this; - } - - public Builder allowLegacyRoGrantTypes(Boolean allowLegacyRoGrantTypes) { - this.allowLegacyRoGrantTypes = Optional.ofNullable(allowLegacyRoGrantTypes); - return this; - } - - /** - *

Whether the legacy /tokeninfo endpoint is enabled for your account (true) or unavailable (false).

- */ - @JsonSetter(value = "allow_legacy_tokeninfo_endpoint", nulls = Nulls.SKIP) - public Builder allowLegacyTokeninfoEndpoint(Optional allowLegacyTokeninfoEndpoint) { - this.allowLegacyTokeninfoEndpoint = allowLegacyTokeninfoEndpoint; - return this; - } - - public Builder allowLegacyTokeninfoEndpoint(Boolean allowLegacyTokeninfoEndpoint) { - this.allowLegacyTokeninfoEndpoint = Optional.ofNullable(allowLegacyTokeninfoEndpoint); - return this; - } - - /** - *

Whether ID tokens and the userinfo endpoint includes a complete user profile (true) or only OpenID Connect claims (false).

- */ - @JsonSetter(value = "enable_legacy_profile", nulls = Nulls.SKIP) - public Builder enableLegacyProfile(Optional enableLegacyProfile) { - this.enableLegacyProfile = enableLegacyProfile; - return this; - } - - public Builder enableLegacyProfile(Boolean enableLegacyProfile) { - this.enableLegacyProfile = Optional.ofNullable(enableLegacyProfile); - return this; - } - - /** - *

Whether ID tokens can be used to authorize some types of requests to API v2 (true) not not (false).

- */ - @JsonSetter(value = "enable_idtoken_api2", nulls = Nulls.SKIP) - public Builder enableIdtokenApi2(Optional enableIdtokenApi2) { - this.enableIdtokenApi2 = enableIdtokenApi2; - return this; - } - - public Builder enableIdtokenApi2(Boolean enableIdtokenApi2) { - this.enableIdtokenApi2 = Optional.ofNullable(enableIdtokenApi2); - return this; - } - - /** - *

Whether the public sign up process shows a user_exists error (true) or a generic error (false) if the user already exists.

- */ - @JsonSetter(value = "enable_public_signup_user_exists_error", nulls = Nulls.SKIP) - public Builder enablePublicSignupUserExistsError(Optional enablePublicSignupUserExistsError) { - this.enablePublicSignupUserExistsError = enablePublicSignupUserExistsError; - return this; - } - - public Builder enablePublicSignupUserExistsError(Boolean enablePublicSignupUserExistsError) { - this.enablePublicSignupUserExistsError = Optional.ofNullable(enablePublicSignupUserExistsError); - return this; - } - - /** - *

Whether users are prompted to confirm log in before SSO redirection (false) or are not prompted (true).

- */ - @JsonSetter(value = "enable_sso", nulls = Nulls.SKIP) - public Builder enableSso(Optional enableSso) { - this.enableSso = enableSso; - return this; - } - - public Builder enableSso(Boolean enableSso) { - this.enableSso = Optional.ofNullable(enableSso); - return this; - } - - /** - *

Whether the enable_sso setting can be changed (true) or not (false).

- */ - @JsonSetter(value = "allow_changing_enable_sso", nulls = Nulls.SKIP) - public Builder allowChangingEnableSso(Optional allowChangingEnableSso) { - this.allowChangingEnableSso = allowChangingEnableSso; - return this; - } - - public Builder allowChangingEnableSso(Boolean allowChangingEnableSso) { - this.allowChangingEnableSso = Optional.ofNullable(allowChangingEnableSso); - return this; - } - - /** - *

Whether classic Universal Login prompts include additional security headers to prevent clickjacking (true) or no safeguard (false).

- */ - @JsonSetter(value = "disable_clickjack_protection_headers", nulls = Nulls.SKIP) - public Builder disableClickjackProtectionHeaders(Optional disableClickjackProtectionHeaders) { - this.disableClickjackProtectionHeaders = disableClickjackProtectionHeaders; - return this; - } - - public Builder disableClickjackProtectionHeaders(Boolean disableClickjackProtectionHeaders) { - this.disableClickjackProtectionHeaders = Optional.ofNullable(disableClickjackProtectionHeaders); - return this; - } - - /** - *

Do not Publish Enterprise Connections Information with IdP domains on the lock configuration file.

- */ - @JsonSetter(value = "no_disclose_enterprise_connections", nulls = Nulls.SKIP) - public Builder noDiscloseEnterpriseConnections(Optional noDiscloseEnterpriseConnections) { - this.noDiscloseEnterpriseConnections = noDiscloseEnterpriseConnections; - return this; - } - - public Builder noDiscloseEnterpriseConnections(Boolean noDiscloseEnterpriseConnections) { - this.noDiscloseEnterpriseConnections = Optional.ofNullable(noDiscloseEnterpriseConnections); - return this; - } - - /** - *

Enforce client authentication for passwordless start.

- */ - @JsonSetter(value = "enforce_client_authentication_on_passwordless_start", nulls = Nulls.SKIP) - public Builder enforceClientAuthenticationOnPasswordlessStart( - Optional enforceClientAuthenticationOnPasswordlessStart) { - this.enforceClientAuthenticationOnPasswordlessStart = enforceClientAuthenticationOnPasswordlessStart; - return this; - } - - public Builder enforceClientAuthenticationOnPasswordlessStart( - Boolean enforceClientAuthenticationOnPasswordlessStart) { - this.enforceClientAuthenticationOnPasswordlessStart = - Optional.ofNullable(enforceClientAuthenticationOnPasswordlessStart); - return this; - } - - /** - *

Enables the email verification flow during login for Azure AD and ADFS connections

- */ - @JsonSetter(value = "enable_adfs_waad_email_verification", nulls = Nulls.SKIP) - public Builder enableAdfsWaadEmailVerification(Optional enableAdfsWaadEmailVerification) { - this.enableAdfsWaadEmailVerification = enableAdfsWaadEmailVerification; - return this; - } - - public Builder enableAdfsWaadEmailVerification(Boolean enableAdfsWaadEmailVerification) { - this.enableAdfsWaadEmailVerification = Optional.ofNullable(enableAdfsWaadEmailVerification); - return this; - } - - /** - *

Delete underlying grant when a Refresh Token is revoked via the Authentication API.

- */ - @JsonSetter(value = "revoke_refresh_token_grant", nulls = Nulls.SKIP) - public Builder revokeRefreshTokenGrant(Optional revokeRefreshTokenGrant) { - this.revokeRefreshTokenGrant = revokeRefreshTokenGrant; - return this; - } - - public Builder revokeRefreshTokenGrant(Boolean revokeRefreshTokenGrant) { - this.revokeRefreshTokenGrant = Optional.ofNullable(revokeRefreshTokenGrant); - return this; - } - - /** - *

Enables beta access to log streaming changes

- */ - @JsonSetter(value = "dashboard_log_streams_next", nulls = Nulls.SKIP) - public Builder dashboardLogStreamsNext(Optional dashboardLogStreamsNext) { - this.dashboardLogStreamsNext = dashboardLogStreamsNext; - return this; - } - - public Builder dashboardLogStreamsNext(Boolean dashboardLogStreamsNext) { - this.dashboardLogStreamsNext = Optional.ofNullable(dashboardLogStreamsNext); - return this; - } - - /** - *

Enables new insights activity page view

- */ - @JsonSetter(value = "dashboard_insights_view", nulls = Nulls.SKIP) - public Builder dashboardInsightsView(Optional dashboardInsightsView) { - this.dashboardInsightsView = dashboardInsightsView; - return this; - } - - public Builder dashboardInsightsView(Boolean dashboardInsightsView) { - this.dashboardInsightsView = Optional.ofNullable(dashboardInsightsView); - return this; - } - - /** - *

Disables SAML fields map fix for bad mappings with repeated attributes

- */ - @JsonSetter(value = "disable_fields_map_fix", 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; - } - - /** - *

Used to allow users to pick what factor to enroll of the available MFA factors.

- */ - @JsonSetter(value = "mfa_show_factor_list_on_enrollment", nulls = Nulls.SKIP) - public Builder mfaShowFactorListOnEnrollment(Optional mfaShowFactorListOnEnrollment) { - this.mfaShowFactorListOnEnrollment = mfaShowFactorListOnEnrollment; - return this; - } - - public Builder mfaShowFactorListOnEnrollment(Boolean mfaShowFactorListOnEnrollment) { - this.mfaShowFactorListOnEnrollment = Optional.ofNullable(mfaShowFactorListOnEnrollment); - return this; - } - - /** - *

Removes alg property from jwks .well-known endpoint

- */ - @JsonSetter(value = "remove_alg_from_jwks", nulls = Nulls.SKIP) - public Builder removeAlgFromJwks(Optional removeAlgFromJwks) { - this.removeAlgFromJwks = removeAlgFromJwks; - return this; - } - - public Builder removeAlgFromJwks(Boolean removeAlgFromJwks) { - this.removeAlgFromJwks = Optional.ofNullable(removeAlgFromJwks); - return this; - } - - /** - *

Improves bot detection during signup in classic universal login

- */ - @JsonSetter(value = "improved_signup_bot_detection_in_classic", nulls = Nulls.SKIP) - public Builder improvedSignupBotDetectionInClassic(Optional improvedSignupBotDetectionInClassic) { - this.improvedSignupBotDetectionInClassic = improvedSignupBotDetectionInClassic; - return this; - } - - public Builder improvedSignupBotDetectionInClassic(Boolean improvedSignupBotDetectionInClassic) { - this.improvedSignupBotDetectionInClassic = Optional.ofNullable(improvedSignupBotDetectionInClassic); - return this; - } - - /** - *

This tenant signed up for the Auth4GenAI trail

- */ - @JsonSetter(value = "genai_trial", nulls = Nulls.SKIP) - public Builder genaiTrial(Optional genaiTrial) { - this.genaiTrial = genaiTrial; - return this; - } - - public Builder genaiTrial(Boolean genaiTrial) { - this.genaiTrial = Optional.ofNullable(genaiTrial); - return this; - } - - /** - *

Whether third-party developers can <a href="https://auth0.com/docs/api-auth/dynamic-client-registration">dynamically register</a> applications for your APIs (true) or not (false). This flag enables dynamic client registration.

- */ - @JsonSetter(value = "enable_dynamic_client_registration", nulls = Nulls.SKIP) - public Builder enableDynamicClientRegistration(Optional enableDynamicClientRegistration) { - this.enableDynamicClientRegistration = enableDynamicClientRegistration; - return this; - } - - public Builder enableDynamicClientRegistration(Boolean enableDynamicClientRegistration) { - this.enableDynamicClientRegistration = Optional.ofNullable(enableDynamicClientRegistration); - return this; - } - - /** - *

If true, SMS phone numbers will not be obfuscated in Management API GET calls.

- */ - @JsonSetter(value = "disable_management_api_sms_obfuscation", nulls = Nulls.SKIP) - public Builder disableManagementApiSmsObfuscation(Optional disableManagementApiSmsObfuscation) { - this.disableManagementApiSmsObfuscation = disableManagementApiSmsObfuscation; - return this; - } - - public Builder disableManagementApiSmsObfuscation(Boolean disableManagementApiSmsObfuscation) { - this.disableManagementApiSmsObfuscation = Optional.ofNullable(disableManagementApiSmsObfuscation); - return this; - } - - /** - *

Changes email_verified behavior for Azure AD/ADFS connections when enabled. Sets email_verified to false otherwise.

- */ - @JsonSetter(value = "trust_azure_adfs_email_verified_connection_property", nulls = Nulls.SKIP) - public Builder trustAzureAdfsEmailVerifiedConnectionProperty( - Optional trustAzureAdfsEmailVerifiedConnectionProperty) { - this.trustAzureAdfsEmailVerifiedConnectionProperty = trustAzureAdfsEmailVerifiedConnectionProperty; - return this; - } - - public Builder trustAzureAdfsEmailVerifiedConnectionProperty( - Boolean trustAzureAdfsEmailVerifiedConnectionProperty) { - this.trustAzureAdfsEmailVerifiedConnectionProperty = - Optional.ofNullable(trustAzureAdfsEmailVerifiedConnectionProperty); - return this; - } - - /** - *

If true, custom domains feature will be enabled for tenant.

- */ - @JsonSetter(value = "custom_domains_provisioning", nulls = Nulls.SKIP) - public Builder customDomainsProvisioning(Optional customDomainsProvisioning) { - this.customDomainsProvisioning = customDomainsProvisioning; - return this; - } - - public Builder customDomainsProvisioning(Boolean customDomainsProvisioning) { - this.customDomainsProvisioning = Optional.ofNullable(customDomainsProvisioning); - return this; - } - - public TenantSettingsFlags build() { - return new TenantSettingsFlags( - changePwdFlowV1, - enableApisSection, - disableImpersonation, - enableClientConnections, - enablePipeline2, - allowLegacyDelegationGrantTypes, - allowLegacyRoGrantTypes, - allowLegacyTokeninfoEndpoint, - enableLegacyProfile, - enableIdtokenApi2, - enablePublicSignupUserExistsError, - enableSso, - allowChangingEnableSso, - disableClickjackProtectionHeaders, - noDiscloseEnterpriseConnections, - enforceClientAuthenticationOnPasswordlessStart, - enableAdfsWaadEmailVerification, - revokeRefreshTokenGrant, - dashboardLogStreamsNext, - dashboardInsightsView, - disableFieldsMapFix, - mfaShowFactorListOnEnrollment, - removeAlgFromJwks, - improvedSignupBotDetectionInClassic, - genaiTrial, - enableDynamicClientRegistration, - disableManagementApiSmsObfuscation, - trustAzureAdfsEmailVerifiedConnectionProperty, - customDomainsProvisioning, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsGuardianPage.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsGuardianPage.java deleted file mode 100644 index 7b6af4a8c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsGuardianPage.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = TenantSettingsGuardianPage.Builder.class) -public final class TenantSettingsGuardianPage { - private final Optional enabled; - - private final Optional html; - - private final Map additionalProperties; - - private TenantSettingsGuardianPage( - Optional enabled, Optional html, Map additionalProperties) { - this.enabled = enabled; - this.html = html; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether to use the custom Guardian HTML (true) or the default Auth0 page (false, default) - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Custom Guardian HTML (<a href='https://github.com/Shopify/liquid/wiki/Liquid-for-Designers'>Liquid syntax</a> is supported). - */ - @JsonProperty("html") - public Optional getHtml() { - return html; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TenantSettingsGuardianPage && equalTo((TenantSettingsGuardianPage) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TenantSettingsGuardianPage other) { - return enabled.equals(other.enabled) && html.equals(other.html); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled, this.html); - } - - @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 enabled = Optional.empty(); - - private Optional html = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(TenantSettingsGuardianPage other) { - enabled(other.getEnabled()); - html(other.getHtml()); - return this; - } - - /** - *

Whether to use the custom Guardian HTML (true) or the default Auth0 page (false, default)

- */ - @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; - } - - /** - *

Custom Guardian HTML (<a href='https://github.com/Shopify/liquid/wiki/Liquid-for-Designers'>Liquid syntax</a> is supported).

- */ - @JsonSetter(value = "html", nulls = Nulls.SKIP) - public Builder html(Optional html) { - this.html = html; - return this; - } - - public Builder html(String html) { - this.html = Optional.ofNullable(html); - return this; - } - - public TenantSettingsGuardianPage build() { - return new TenantSettingsGuardianPage(enabled, html, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsMtls.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsMtls.java deleted file mode 100644 index 4fce8b382..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsMtls.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = TenantSettingsMtls.Builder.class) -public final class TenantSettingsMtls { - private final Optional enableEndpointAliases; - - private final Map additionalProperties; - - private TenantSettingsMtls(Optional enableEndpointAliases, Map additionalProperties) { - this.enableEndpointAliases = enableEndpointAliases; - this.additionalProperties = additionalProperties; - } - - /** - * @return If true, enables mTLS endpoint aliases - */ - @JsonProperty("enable_endpoint_aliases") - public Optional getEnableEndpointAliases() { - return enableEndpointAliases; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TenantSettingsMtls && equalTo((TenantSettingsMtls) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TenantSettingsMtls other) { - return enableEndpointAliases.equals(other.enableEndpointAliases); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enableEndpointAliases); - } - - @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 enableEndpointAliases = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(TenantSettingsMtls other) { - enableEndpointAliases(other.getEnableEndpointAliases()); - return this; - } - - /** - *

If true, enables mTLS endpoint aliases

- */ - @JsonSetter(value = "enable_endpoint_aliases", nulls = Nulls.SKIP) - public Builder enableEndpointAliases(Optional enableEndpointAliases) { - this.enableEndpointAliases = enableEndpointAliases; - return this; - } - - public Builder enableEndpointAliases(Boolean enableEndpointAliases) { - this.enableEndpointAliases = Optional.ofNullable(enableEndpointAliases); - return this; - } - - public TenantSettingsMtls build() { - return new TenantSettingsMtls(enableEndpointAliases, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsPasswordPage.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsPasswordPage.java deleted file mode 100644 index 3d254ec4b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsPasswordPage.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = TenantSettingsPasswordPage.Builder.class) -public final class TenantSettingsPasswordPage { - private final Optional enabled; - - private final Optional html; - - private final Map additionalProperties; - - private TenantSettingsPasswordPage( - Optional enabled, Optional html, Map additionalProperties) { - this.enabled = enabled; - this.html = html; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether to use the custom change password HTML (true) or the default Auth0 page (false). Default is to use the Auth0 page. - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Custom change password HTML (<a href='https://github.com/Shopify/liquid/wiki/Liquid-for-Designers'>Liquid syntax</a> supported). - */ - @JsonProperty("html") - public Optional getHtml() { - return html; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TenantSettingsPasswordPage && equalTo((TenantSettingsPasswordPage) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TenantSettingsPasswordPage other) { - return enabled.equals(other.enabled) && html.equals(other.html); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled, this.html); - } - - @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 enabled = Optional.empty(); - - private Optional html = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(TenantSettingsPasswordPage other) { - enabled(other.getEnabled()); - html(other.getHtml()); - return this; - } - - /** - *

Whether to use the custom change password HTML (true) or the default Auth0 page (false). Default is to use the Auth0 page.

- */ - @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; - } - - /** - *

Custom change password HTML (<a href='https://github.com/Shopify/liquid/wiki/Liquid-for-Designers'>Liquid syntax</a> supported).

- */ - @JsonSetter(value = "html", nulls = Nulls.SKIP) - public Builder html(Optional html) { - this.html = html; - return this; - } - - public Builder html(String html) { - this.html = Optional.ofNullable(html); - return this; - } - - public TenantSettingsPasswordPage build() { - return new TenantSettingsPasswordPage(enabled, html, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsResourceParameterProfile.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsResourceParameterProfile.java deleted file mode 100644 index 302163e9f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsResourceParameterProfile.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class TenantSettingsResourceParameterProfile { - public static final TenantSettingsResourceParameterProfile AUDIENCE = - new TenantSettingsResourceParameterProfile(Value.AUDIENCE, "audience"); - - public static final TenantSettingsResourceParameterProfile COMPATIBILITY = - new TenantSettingsResourceParameterProfile(Value.COMPATIBILITY, "compatibility"); - - private final Value value; - - private final String string; - - TenantSettingsResourceParameterProfile(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof TenantSettingsResourceParameterProfile - && this.string.equals(((TenantSettingsResourceParameterProfile) 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 COMPATIBILITY: - return visitor.visitCompatibility(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static TenantSettingsResourceParameterProfile valueOf(String value) { - switch (value) { - case "audience": - return AUDIENCE; - case "compatibility": - return COMPATIBILITY; - default: - return new TenantSettingsResourceParameterProfile(Value.UNKNOWN, value); - } - } - - public enum Value { - AUDIENCE, - - COMPATIBILITY, - - UNKNOWN - } - - public interface Visitor { - T visitAudience(); - - T visitCompatibility(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSessions.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSessions.java deleted file mode 100644 index ae2da26d0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSessions.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = TenantSettingsSessions.Builder.class) -public final class TenantSettingsSessions { - private final Optional oidcLogoutPromptEnabled; - - private final Map additionalProperties; - - private TenantSettingsSessions( - Optional oidcLogoutPromptEnabled, Map additionalProperties) { - this.oidcLogoutPromptEnabled = oidcLogoutPromptEnabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether to bypass prompting logic (false) when performing OIDC Logout - */ - @JsonProperty("oidc_logout_prompt_enabled") - public Optional getOidcLogoutPromptEnabled() { - return oidcLogoutPromptEnabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TenantSettingsSessions && equalTo((TenantSettingsSessions) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TenantSettingsSessions other) { - return oidcLogoutPromptEnabled.equals(other.oidcLogoutPromptEnabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.oidcLogoutPromptEnabled); - } - - @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 oidcLogoutPromptEnabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(TenantSettingsSessions other) { - oidcLogoutPromptEnabled(other.getOidcLogoutPromptEnabled()); - return this; - } - - /** - *

Whether to bypass prompting logic (false) when performing OIDC Logout

- */ - @JsonSetter(value = "oidc_logout_prompt_enabled", nulls = Nulls.SKIP) - public Builder oidcLogoutPromptEnabled(Optional oidcLogoutPromptEnabled) { - this.oidcLogoutPromptEnabled = oidcLogoutPromptEnabled; - return this; - } - - public Builder oidcLogoutPromptEnabled(Boolean oidcLogoutPromptEnabled) { - this.oidcLogoutPromptEnabled = Optional.ofNullable(oidcLogoutPromptEnabled); - return this; - } - - public TenantSettingsSessions build() { - return new TenantSettingsSessions(oidcLogoutPromptEnabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSupportedLocalesEnum.java b/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSupportedLocalesEnum.java deleted file mode 100644 index c7c7f9f27..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TenantSettingsSupportedLocalesEnum.java +++ /dev/null @@ -1,892 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class TenantSettingsSupportedLocalesEnum { - public static final TenantSettingsSupportedLocalesEnum AZ = new TenantSettingsSupportedLocalesEnum(Value.AZ, "az"); - - public static final TenantSettingsSupportedLocalesEnum MK = new TenantSettingsSupportedLocalesEnum(Value.MK, "mk"); - - public static final TenantSettingsSupportedLocalesEnum CA_ES = - new TenantSettingsSupportedLocalesEnum(Value.CA_ES, "ca-ES"); - - public static final TenantSettingsSupportedLocalesEnum ML = new TenantSettingsSupportedLocalesEnum(Value.ML, "ml"); - - public static final TenantSettingsSupportedLocalesEnum TR = new TenantSettingsSupportedLocalesEnum(Value.TR, "tr"); - - public static final TenantSettingsSupportedLocalesEnum GU = new TenantSettingsSupportedLocalesEnum(Value.GU, "gu"); - - public static final TenantSettingsSupportedLocalesEnum ES_AR = - new TenantSettingsSupportedLocalesEnum(Value.ES_AR, "es-AR"); - - public static final TenantSettingsSupportedLocalesEnum ID = new TenantSettingsSupportedLocalesEnum(Value.ID, "id"); - - public static final TenantSettingsSupportedLocalesEnum CNR = - new TenantSettingsSupportedLocalesEnum(Value.CNR, "cnr"); - - public static final TenantSettingsSupportedLocalesEnum MN = new TenantSettingsSupportedLocalesEnum(Value.MN, "mn"); - - public static final TenantSettingsSupportedLocalesEnum FI = new TenantSettingsSupportedLocalesEnum(Value.FI, "fi"); - - public static final TenantSettingsSupportedLocalesEnum PL = new TenantSettingsSupportedLocalesEnum(Value.PL, "pl"); - - public static final TenantSettingsSupportedLocalesEnum EN_CA = - new TenantSettingsSupportedLocalesEnum(Value.EN_CA, "en-CA"); - - public static final TenantSettingsSupportedLocalesEnum AR_EG = - new TenantSettingsSupportedLocalesEnum(Value.AR_EG, "ar-EG"); - - public static final TenantSettingsSupportedLocalesEnum MR = new TenantSettingsSupportedLocalesEnum(Value.MR, "mr"); - - public static final TenantSettingsSupportedLocalesEnum MS = new TenantSettingsSupportedLocalesEnum(Value.MS, "ms"); - - public static final TenantSettingsSupportedLocalesEnum PT_PT = - new TenantSettingsSupportedLocalesEnum(Value.PT_PT, "pt-PT"); - - public static final TenantSettingsSupportedLocalesEnum SK = new TenantSettingsSupportedLocalesEnum(Value.SK, "sk"); - - public static final TenantSettingsSupportedLocalesEnum SL = new TenantSettingsSupportedLocalesEnum(Value.SL, "sl"); - - public static final TenantSettingsSupportedLocalesEnum CS = new TenantSettingsSupportedLocalesEnum(Value.CS, "cs"); - - public static final TenantSettingsSupportedLocalesEnum UR = new TenantSettingsSupportedLocalesEnum(Value.UR, "ur"); - - public static final TenantSettingsSupportedLocalesEnum HU = new TenantSettingsSupportedLocalesEnum(Value.HU, "hu"); - - public static final TenantSettingsSupportedLocalesEnum TE = new TenantSettingsSupportedLocalesEnum(Value.TE, "te"); - - public static final TenantSettingsSupportedLocalesEnum ZH_CN = - new TenantSettingsSupportedLocalesEnum(Value.ZH_CN, "zh-CN"); - - public static final TenantSettingsSupportedLocalesEnum AR_SA = - new TenantSettingsSupportedLocalesEnum(Value.AR_SA, "ar-SA"); - - public static final TenantSettingsSupportedLocalesEnum SO = new TenantSettingsSupportedLocalesEnum(Value.SO, "so"); - - public static final TenantSettingsSupportedLocalesEnum FR = new TenantSettingsSupportedLocalesEnum(Value.FR, "fr"); - - public static final TenantSettingsSupportedLocalesEnum NO = new TenantSettingsSupportedLocalesEnum(Value.NO, "no"); - - public static final TenantSettingsSupportedLocalesEnum ZH_TW = - new TenantSettingsSupportedLocalesEnum(Value.ZH_TW, "zh-TW"); - - public static final TenantSettingsSupportedLocalesEnum AR = new TenantSettingsSupportedLocalesEnum(Value.AR, "ar"); - - public static final TenantSettingsSupportedLocalesEnum PT = new TenantSettingsSupportedLocalesEnum(Value.PT, "pt"); - - public static final TenantSettingsSupportedLocalesEnum MY = new TenantSettingsSupportedLocalesEnum(Value.MY, "my"); - - public static final TenantSettingsSupportedLocalesEnum SQ = new TenantSettingsSupportedLocalesEnum(Value.SQ, "sq"); - - public static final TenantSettingsSupportedLocalesEnum HY = new TenantSettingsSupportedLocalesEnum(Value.HY, "hy"); - - public static final TenantSettingsSupportedLocalesEnum FR_FR = - new TenantSettingsSupportedLocalesEnum(Value.FR_FR, "fr-FR"); - - public static final TenantSettingsSupportedLocalesEnum CY = new TenantSettingsSupportedLocalesEnum(Value.CY, "cy"); - - public static final TenantSettingsSupportedLocalesEnum PA = new TenantSettingsSupportedLocalesEnum(Value.PA, "pa"); - - public static final TenantSettingsSupportedLocalesEnum KA = new TenantSettingsSupportedLocalesEnum(Value.KA, "ka"); - - public static final TenantSettingsSupportedLocalesEnum IS = new TenantSettingsSupportedLocalesEnum(Value.IS, "is"); - - public static final TenantSettingsSupportedLocalesEnum FA = new TenantSettingsSupportedLocalesEnum(Value.FA, "fa"); - - public static final TenantSettingsSupportedLocalesEnum BN = new TenantSettingsSupportedLocalesEnum(Value.BN, "bn"); - - public static final TenantSettingsSupportedLocalesEnum PT_BR = - new TenantSettingsSupportedLocalesEnum(Value.PT_BR, "pt-BR"); - - public static final TenantSettingsSupportedLocalesEnum SW = new TenantSettingsSupportedLocalesEnum(Value.SW, "sw"); - - public static final TenantSettingsSupportedLocalesEnum HI = new TenantSettingsSupportedLocalesEnum(Value.HI, "hi"); - - public static final TenantSettingsSupportedLocalesEnum EN = new TenantSettingsSupportedLocalesEnum(Value.EN, "en"); - - public static final TenantSettingsSupportedLocalesEnum NB = new TenantSettingsSupportedLocalesEnum(Value.NB, "nb"); - - public static final TenantSettingsSupportedLocalesEnum DA = new TenantSettingsSupportedLocalesEnum(Value.DA, "da"); - - public static final TenantSettingsSupportedLocalesEnum LT = new TenantSettingsSupportedLocalesEnum(Value.LT, "lt"); - - public static final TenantSettingsSupportedLocalesEnum BS = new TenantSettingsSupportedLocalesEnum(Value.BS, "bs"); - - public static final TenantSettingsSupportedLocalesEnum ES_MX = - new TenantSettingsSupportedLocalesEnum(Value.ES_MX, "es-MX"); - - public static final TenantSettingsSupportedLocalesEnum LV = new TenantSettingsSupportedLocalesEnum(Value.LV, "lv"); - - public static final TenantSettingsSupportedLocalesEnum RO = new TenantSettingsSupportedLocalesEnum(Value.RO, "ro"); - - public static final TenantSettingsSupportedLocalesEnum UK = new TenantSettingsSupportedLocalesEnum(Value.UK, "uk"); - - public static final TenantSettingsSupportedLocalesEnum DE = new TenantSettingsSupportedLocalesEnum(Value.DE, "de"); - - public static final TenantSettingsSupportedLocalesEnum ES = new TenantSettingsSupportedLocalesEnum(Value.ES, "es"); - - public static final TenantSettingsSupportedLocalesEnum KK = new TenantSettingsSupportedLocalesEnum(Value.KK, "kk"); - - public static final TenantSettingsSupportedLocalesEnum ET = new TenantSettingsSupportedLocalesEnum(Value.ET, "et"); - - public static final TenantSettingsSupportedLocalesEnum TA = new TenantSettingsSupportedLocalesEnum(Value.TA, "ta"); - - public static final TenantSettingsSupportedLocalesEnum HR = new TenantSettingsSupportedLocalesEnum(Value.HR, "hr"); - - public static final TenantSettingsSupportedLocalesEnum KN = new TenantSettingsSupportedLocalesEnum(Value.KN, "kn"); - - public static final TenantSettingsSupportedLocalesEnum ZGH = - new TenantSettingsSupportedLocalesEnum(Value.ZGH, "zgh"); - - public static final TenantSettingsSupportedLocalesEnum AM = new TenantSettingsSupportedLocalesEnum(Value.AM, "am"); - - public static final TenantSettingsSupportedLocalesEnum JA = new TenantSettingsSupportedLocalesEnum(Value.JA, "ja"); - - public static final TenantSettingsSupportedLocalesEnum KO = new TenantSettingsSupportedLocalesEnum(Value.KO, "ko"); - - public static final TenantSettingsSupportedLocalesEnum RU = new TenantSettingsSupportedLocalesEnum(Value.RU, "ru"); - - public static final TenantSettingsSupportedLocalesEnum NL = new TenantSettingsSupportedLocalesEnum(Value.NL, "nl"); - - public static final TenantSettingsSupportedLocalesEnum VI = new TenantSettingsSupportedLocalesEnum(Value.VI, "vi"); - - public static final TenantSettingsSupportedLocalesEnum BG = new TenantSettingsSupportedLocalesEnum(Value.BG, "bg"); - - public static final TenantSettingsSupportedLocalesEnum NN = new TenantSettingsSupportedLocalesEnum(Value.NN, "nn"); - - public static final TenantSettingsSupportedLocalesEnum GL_ES = - new TenantSettingsSupportedLocalesEnum(Value.GL_ES, "gl-ES"); - - public static final TenantSettingsSupportedLocalesEnum TH = new TenantSettingsSupportedLocalesEnum(Value.TH, "th"); - - public static final TenantSettingsSupportedLocalesEnum SR = new TenantSettingsSupportedLocalesEnum(Value.SR, "sr"); - - public static final TenantSettingsSupportedLocalesEnum ES419 = - new TenantSettingsSupportedLocalesEnum(Value.ES419, "es-419"); - - public static final TenantSettingsSupportedLocalesEnum HE = new TenantSettingsSupportedLocalesEnum(Value.HE, "he"); - - public static final TenantSettingsSupportedLocalesEnum ZH_HK = - new TenantSettingsSupportedLocalesEnum(Value.ZH_HK, "zh-HK"); - - public static final TenantSettingsSupportedLocalesEnum EU_ES = - new TenantSettingsSupportedLocalesEnum(Value.EU_ES, "eu-ES"); - - public static final TenantSettingsSupportedLocalesEnum TL = new TenantSettingsSupportedLocalesEnum(Value.TL, "tl"); - - public static final TenantSettingsSupportedLocalesEnum IT = new TenantSettingsSupportedLocalesEnum(Value.IT, "it"); - - public static final TenantSettingsSupportedLocalesEnum SV = new TenantSettingsSupportedLocalesEnum(Value.SV, "sv"); - - public static final TenantSettingsSupportedLocalesEnum FR_CA = - new TenantSettingsSupportedLocalesEnum(Value.FR_CA, "fr-CA"); - - public static final TenantSettingsSupportedLocalesEnum EL = new TenantSettingsSupportedLocalesEnum(Value.EL, "el"); - - private final Value value; - - private final String string; - - TenantSettingsSupportedLocalesEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof TenantSettingsSupportedLocalesEnum - && this.string.equals(((TenantSettingsSupportedLocalesEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case AZ: - return visitor.visitAz(); - case MK: - return visitor.visitMk(); - case CA_ES: - return visitor.visitCaEs(); - case ML: - return visitor.visitMl(); - case TR: - return visitor.visitTr(); - case GU: - return visitor.visitGu(); - case ES_AR: - return visitor.visitEsAr(); - case ID: - return visitor.visitId(); - case CNR: - return visitor.visitCnr(); - case MN: - return visitor.visitMn(); - case FI: - return visitor.visitFi(); - case PL: - return visitor.visitPl(); - case EN_CA: - return visitor.visitEnCa(); - case AR_EG: - return visitor.visitArEg(); - case MR: - return visitor.visitMr(); - case MS: - return visitor.visitMs(); - case PT_PT: - return visitor.visitPtPt(); - case SK: - return visitor.visitSk(); - case SL: - return visitor.visitSl(); - case CS: - return visitor.visitCs(); - case UR: - return visitor.visitUr(); - case HU: - return visitor.visitHu(); - case TE: - return visitor.visitTe(); - case ZH_CN: - return visitor.visitZhCn(); - case AR_SA: - return visitor.visitArSa(); - case SO: - return visitor.visitSo(); - case FR: - return visitor.visitFr(); - case NO: - return visitor.visitNo(); - case ZH_TW: - return visitor.visitZhTw(); - case AR: - return visitor.visitAr(); - case PT: - return visitor.visitPt(); - case MY: - return visitor.visitMy(); - case SQ: - return visitor.visitSq(); - case HY: - return visitor.visitHy(); - case FR_FR: - return visitor.visitFrFr(); - case CY: - return visitor.visitCy(); - case PA: - return visitor.visitPa(); - case KA: - return visitor.visitKa(); - case IS: - return visitor.visitIs(); - case FA: - return visitor.visitFa(); - case BN: - return visitor.visitBn(); - case PT_BR: - return visitor.visitPtBr(); - case SW: - return visitor.visitSw(); - case HI: - return visitor.visitHi(); - case EN: - return visitor.visitEn(); - case NB: - return visitor.visitNb(); - case DA: - return visitor.visitDa(); - case LT: - return visitor.visitLt(); - case BS: - return visitor.visitBs(); - case ES_MX: - return visitor.visitEsMx(); - case LV: - return visitor.visitLv(); - case RO: - return visitor.visitRo(); - case UK: - return visitor.visitUk(); - case DE: - return visitor.visitDe(); - case ES: - return visitor.visitEs(); - case KK: - return visitor.visitKk(); - case ET: - return visitor.visitEt(); - case TA: - return visitor.visitTa(); - case HR: - return visitor.visitHr(); - case KN: - return visitor.visitKn(); - case ZGH: - return visitor.visitZgh(); - case AM: - return visitor.visitAm(); - case JA: - return visitor.visitJa(); - case KO: - return visitor.visitKo(); - case RU: - return visitor.visitRu(); - case NL: - return visitor.visitNl(); - case VI: - return visitor.visitVi(); - case BG: - return visitor.visitBg(); - case NN: - return visitor.visitNn(); - case GL_ES: - return visitor.visitGlEs(); - case TH: - return visitor.visitTh(); - case SR: - return visitor.visitSr(); - case ES419: - return visitor.visitEs419(); - case HE: - return visitor.visitHe(); - case ZH_HK: - return visitor.visitZhHk(); - case EU_ES: - return visitor.visitEuEs(); - case TL: - return visitor.visitTl(); - case IT: - return visitor.visitIt(); - case SV: - return visitor.visitSv(); - case FR_CA: - return visitor.visitFrCa(); - case EL: - return visitor.visitEl(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static TenantSettingsSupportedLocalesEnum valueOf(String value) { - switch (value) { - case "az": - return AZ; - case "mk": - return MK; - case "ca-ES": - return CA_ES; - case "ml": - return ML; - case "tr": - return TR; - case "gu": - return GU; - case "es-AR": - return ES_AR; - case "id": - return ID; - case "cnr": - return CNR; - case "mn": - return MN; - case "fi": - return FI; - case "pl": - return PL; - case "en-CA": - return EN_CA; - case "ar-EG": - return AR_EG; - case "mr": - return MR; - case "ms": - return MS; - case "pt-PT": - return PT_PT; - case "sk": - return SK; - case "sl": - return SL; - case "cs": - return CS; - case "ur": - return UR; - case "hu": - return HU; - case "te": - return TE; - case "zh-CN": - return ZH_CN; - case "ar-SA": - return AR_SA; - case "so": - return SO; - case "fr": - return FR; - case "no": - return NO; - case "zh-TW": - return ZH_TW; - case "ar": - return AR; - case "pt": - return PT; - case "my": - return MY; - case "sq": - return SQ; - case "hy": - return HY; - case "fr-FR": - return FR_FR; - case "cy": - return CY; - case "pa": - return PA; - case "ka": - return KA; - case "is": - return IS; - case "fa": - return FA; - case "bn": - return BN; - case "pt-BR": - return PT_BR; - case "sw": - return SW; - case "hi": - return HI; - case "en": - return EN; - case "nb": - return NB; - case "da": - return DA; - case "lt": - return LT; - case "bs": - return BS; - case "es-MX": - return ES_MX; - case "lv": - return LV; - case "ro": - return RO; - case "uk": - return UK; - case "de": - return DE; - case "es": - return ES; - case "kk": - return KK; - case "et": - return ET; - case "ta": - return TA; - case "hr": - return HR; - case "kn": - return KN; - case "zgh": - return ZGH; - case "am": - return AM; - case "ja": - return JA; - case "ko": - return KO; - case "ru": - return RU; - case "nl": - return NL; - case "vi": - return VI; - case "bg": - return BG; - case "nn": - return NN; - case "gl-ES": - return GL_ES; - case "th": - return TH; - case "sr": - return SR; - case "es-419": - return ES419; - case "he": - return HE; - case "zh-HK": - return ZH_HK; - case "eu-ES": - return EU_ES; - case "tl": - return TL; - case "it": - return IT; - case "sv": - return SV; - case "fr-CA": - return FR_CA; - case "el": - return EL; - default: - return new TenantSettingsSupportedLocalesEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AM, - - AR, - - AR_EG, - - AR_SA, - - AZ, - - BG, - - BN, - - BS, - - CA_ES, - - CNR, - - CS, - - CY, - - DA, - - DE, - - EL, - - EN, - - EN_CA, - - ES, - - ES419, - - ES_AR, - - ES_MX, - - ET, - - EU_ES, - - FA, - - FI, - - FR, - - FR_CA, - - FR_FR, - - GL_ES, - - GU, - - HE, - - HI, - - HR, - - HU, - - HY, - - ID, - - IS, - - IT, - - JA, - - KA, - - KK, - - KN, - - KO, - - LT, - - LV, - - MK, - - ML, - - MN, - - MR, - - MS, - - MY, - - NB, - - NL, - - NN, - - NO, - - PA, - - PL, - - PT, - - PT_BR, - - PT_PT, - - RO, - - RU, - - SK, - - SL, - - SO, - - SQ, - - SR, - - SV, - - SW, - - TA, - - TE, - - TH, - - TL, - - TR, - - UK, - - UR, - - VI, - - ZGH, - - ZH_CN, - - ZH_HK, - - ZH_TW, - - UNKNOWN - } - - public interface Visitor { - T visitAm(); - - T visitAr(); - - T visitArEg(); - - T visitArSa(); - - T visitAz(); - - T visitBg(); - - T visitBn(); - - T visitBs(); - - T visitCaEs(); - - T visitCnr(); - - T visitCs(); - - T visitCy(); - - T visitDa(); - - T visitDe(); - - T visitEl(); - - T visitEn(); - - T visitEnCa(); - - T visitEs(); - - T visitEs419(); - - T visitEsAr(); - - T visitEsMx(); - - T visitEt(); - - T visitEuEs(); - - T visitFa(); - - T visitFi(); - - T visitFr(); - - T visitFrCa(); - - T visitFrFr(); - - T visitGlEs(); - - T visitGu(); - - T visitHe(); - - T visitHi(); - - T visitHr(); - - T visitHu(); - - T visitHy(); - - T visitId(); - - T visitIs(); - - T visitIt(); - - T visitJa(); - - T visitKa(); - - T visitKk(); - - T visitKn(); - - T visitKo(); - - T visitLt(); - - T visitLv(); - - T visitMk(); - - T visitMl(); - - T visitMn(); - - T visitMr(); - - T visitMs(); - - T visitMy(); - - T visitNb(); - - T visitNl(); - - T visitNn(); - - T visitNo(); - - T visitPa(); - - T visitPl(); - - T visitPt(); - - T visitPtBr(); - - T visitPtPt(); - - T visitRo(); - - T visitRu(); - - T visitSk(); - - T visitSl(); - - T visitSo(); - - T visitSq(); - - T visitSr(); - - T visitSv(); - - T visitSw(); - - T visitTa(); - - T visitTe(); - - T visitTh(); - - T visitTl(); - - T visitTr(); - - T visitUk(); - - T visitUr(); - - T visitVi(); - - T visitZgh(); - - T visitZhCn(); - - T visitZhHk(); - - T visitZhTw(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TestActionRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/TestActionRequestContent.java deleted file mode 100644 index b6ffac639..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TestActionRequestContent.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = TestActionRequestContent.Builder.class) -public final class TestActionRequestContent { - private final Map payload; - - private final Map additionalProperties; - - private TestActionRequestContent(Map payload, Map additionalProperties) { - this.payload = payload; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("payload") - public Map getPayload() { - return payload; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TestActionRequestContent && equalTo((TestActionRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TestActionRequestContent other) { - return payload.equals(other.payload); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.payload); - } - - @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 Map payload = new LinkedHashMap<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(TestActionRequestContent other) { - payload(other.getPayload()); - return this; - } - - @JsonSetter(value = "payload", nulls = Nulls.SKIP) - public Builder payload(Map payload) { - this.payload.clear(); - if (payload != null) { - this.payload.putAll(payload); - } - return this; - } - - public Builder putAllPayload(Map payload) { - if (payload != null) { - this.payload.putAll(payload); - } - return this; - } - - public Builder payload(String key, Object value) { - this.payload.put(key, value); - return this; - } - - public TestActionRequestContent build() { - return new TestActionRequestContent(payload, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TestActionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/TestActionResponseContent.java deleted file mode 100644 index d7f2a85a8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TestActionResponseContent.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = TestActionResponseContent.Builder.class) -public final class TestActionResponseContent { - private final Optional> payload; - - private final Map additionalProperties; - - private TestActionResponseContent(Optional> payload, Map additionalProperties) { - this.payload = payload; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("payload") - public Optional> getPayload() { - return payload; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TestActionResponseContent && equalTo((TestActionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TestActionResponseContent other) { - return payload.equals(other.payload); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.payload); - } - - @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> payload = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(TestActionResponseContent other) { - payload(other.getPayload()); - return this; - } - - @JsonSetter(value = "payload", nulls = Nulls.SKIP) - public Builder payload(Optional> payload) { - this.payload = payload; - return this; - } - - public Builder payload(Map payload) { - this.payload = Optional.ofNullable(payload); - return this; - } - - public TestActionResponseContent build() { - return new TestActionResponseContent(payload, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TestCustomDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/TestCustomDomainResponseContent.java deleted file mode 100644 index 9393013df..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TestCustomDomainResponseContent.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = TestCustomDomainResponseContent.Builder.class) -public final class TestCustomDomainResponseContent { - private final boolean success; - - private final Optional message; - - private final Map additionalProperties; - - private TestCustomDomainResponseContent( - boolean success, Optional message, Map additionalProperties) { - this.success = success; - this.message = message; - this.additionalProperties = additionalProperties; - } - - /** - * @return Result of the operation. - */ - @JsonProperty("success") - public boolean getSuccess() { - return success; - } - - /** - * @return Message describing the operation status. - */ - @JsonProperty("message") - public Optional getMessage() { - return message; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TestCustomDomainResponseContent && equalTo((TestCustomDomainResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TestCustomDomainResponseContent other) { - return success == other.success && message.equals(other.message); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.success, this.message); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static SuccessStage builder() { - return new Builder(); - } - - public interface SuccessStage { - /** - *

Result of the operation.

- */ - _FinalStage success(boolean success); - - Builder from(TestCustomDomainResponseContent other); - } - - public interface _FinalStage { - TestCustomDomainResponseContent build(); - - /** - *

Message describing the operation status.

- */ - _FinalStage message(Optional message); - - _FinalStage message(String message); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements SuccessStage, _FinalStage { - private boolean success; - - private Optional message = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(TestCustomDomainResponseContent other) { - success(other.getSuccess()); - message(other.getMessage()); - return this; - } - - /** - *

Result of the operation.

- *

Result of the operation.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("success") - public _FinalStage success(boolean success) { - this.success = success; - return this; - } - - /** - *

Message describing the operation status.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage message(String message) { - this.message = Optional.ofNullable(message); - return this; - } - - /** - *

Message describing the operation status.

- */ - @java.lang.Override - @JsonSetter(value = "message", nulls = Nulls.SKIP) - public _FinalStage message(Optional message) { - this.message = message; - return this; - } - - @java.lang.Override - public TestCustomDomainResponseContent build() { - return new TestCustomDomainResponseContent(success, message, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TokenExchangeProfileResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/TokenExchangeProfileResponseContent.java deleted file mode 100644 index 02f538da3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TokenExchangeProfileResponseContent.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = TokenExchangeProfileResponseContent.Builder.class) -public final class TokenExchangeProfileResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional subjectTokenType; - - private final Optional actionId; - - private final Optional type; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private TokenExchangeProfileResponseContent( - Optional id, - Optional name, - Optional subjectTokenType, - Optional actionId, - Optional type, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.subjectTokenType = subjectTokenType; - this.actionId = actionId; - this.type = type; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the token exchange profile. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Friendly name of this profile. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return 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. - */ - @JsonProperty("subject_token_type") - public Optional getSubjectTokenType() { - return subjectTokenType; - } - - /** - * @return 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. - */ - @JsonProperty("action_id") - public Optional getActionId() { - return actionId; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return The time when this profile was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when this profile was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TokenExchangeProfileResponseContent - && equalTo((TokenExchangeProfileResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TokenExchangeProfileResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && subjectTokenType.equals(other.subjectTokenType) - && actionId.equals(other.actionId) - && type.equals(other.type) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.name, this.subjectTokenType, this.actionId, this.type, this.createdAt, this.updatedAt); - } - - @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 subjectTokenType = Optional.empty(); - - private Optional actionId = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(TokenExchangeProfileResponseContent other) { - id(other.getId()); - name(other.getName()); - subjectTokenType(other.getSubjectTokenType()); - actionId(other.getActionId()); - type(other.getType()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

The unique ID of the token exchange profile.

- */ - @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 of this profile.

- */ - @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; - } - - /** - *

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.

- */ - @JsonSetter(value = "subject_token_type", nulls = Nulls.SKIP) - public Builder subjectTokenType(Optional subjectTokenType) { - this.subjectTokenType = subjectTokenType; - return this; - } - - public Builder subjectTokenType(String subjectTokenType) { - this.subjectTokenType = Optional.ofNullable(subjectTokenType); - return this; - } - - /** - *

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.

- */ - @JsonSetter(value = "action_id", nulls = Nulls.SKIP) - public Builder actionId(Optional actionId) { - this.actionId = actionId; - return this; - } - - public Builder actionId(String actionId) { - this.actionId = Optional.ofNullable(actionId); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(TokenExchangeProfileTypeEnum type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

The time when this profile 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 time when this profile was 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; - } - - public TokenExchangeProfileResponseContent build() { - return new TokenExchangeProfileResponseContent( - id, name, subjectTokenType, actionId, type, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TokenExchangeProfileTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/TokenExchangeProfileTypeEnum.java deleted file mode 100644 index 02b0d91b6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TokenExchangeProfileTypeEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class TokenExchangeProfileTypeEnum { - public static final TokenExchangeProfileTypeEnum CUSTOM_AUTHENTICATION = - new TokenExchangeProfileTypeEnum(Value.CUSTOM_AUTHENTICATION, "custom_authentication"); - - private final Value value; - - private final String string; - - TokenExchangeProfileTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof TokenExchangeProfileTypeEnum - && this.string.equals(((TokenExchangeProfileTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CUSTOM_AUTHENTICATION: - return visitor.visitCustomAuthentication(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static TokenExchangeProfileTypeEnum valueOf(String value) { - switch (value) { - case "custom_authentication": - return CUSTOM_AUTHENTICATION; - default: - return new TokenExchangeProfileTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - CUSTOM_AUTHENTICATION, - - UNKNOWN - } - - public interface Visitor { - T visitCustomAuthentication(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TokenExchangeProfilesListRequest.java b/src/main/java/com/auth0/client/mgmt/types/TokenExchangeProfilesListRequest.java deleted file mode 100644 index 7d9471003..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TokenExchangeProfilesListRequest.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = TokenExchangeProfilesListRequest.Builder.class) -public final class TokenExchangeProfilesListRequest { - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private TokenExchangeProfilesListRequest( - 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() { - 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; - return other instanceof TokenExchangeProfilesListRequest && equalTo((TokenExchangeProfilesListRequest) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TokenExchangeProfilesListRequest 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(TokenExchangeProfilesListRequest 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(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 TokenExchangeProfilesListRequest build() { - return new TokenExchangeProfilesListRequest(from, take, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TokenQuota.java b/src/main/java/com/auth0/client/mgmt/types/TokenQuota.java deleted file mode 100644 index d7cf28e47..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TokenQuota.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = TokenQuota.Builder.class) -public final class TokenQuota { - private final TokenQuotaClientCredentials clientCredentials; - - private final Map additionalProperties; - - private TokenQuota(TokenQuotaClientCredentials clientCredentials, Map additionalProperties) { - this.clientCredentials = clientCredentials; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_credentials") - public TokenQuotaClientCredentials getClientCredentials() { - return clientCredentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TokenQuota && equalTo((TokenQuota) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TokenQuota other) { - return clientCredentials.equals(other.clientCredentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.clientCredentials); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ClientCredentialsStage builder() { - return new Builder(); - } - - public interface ClientCredentialsStage { - _FinalStage clientCredentials(@NotNull TokenQuotaClientCredentials clientCredentials); - - Builder from(TokenQuota other); - } - - public interface _FinalStage { - TokenQuota build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ClientCredentialsStage, _FinalStage { - private TokenQuotaClientCredentials clientCredentials; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(TokenQuota other) { - clientCredentials(other.getClientCredentials()); - return this; - } - - @java.lang.Override - @JsonSetter("client_credentials") - public _FinalStage clientCredentials(@NotNull TokenQuotaClientCredentials clientCredentials) { - this.clientCredentials = Objects.requireNonNull(clientCredentials, "clientCredentials must not be null"); - return this; - } - - @java.lang.Override - public TokenQuota build() { - return new TokenQuota(clientCredentials, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TokenQuotaClientCredentials.java b/src/main/java/com/auth0/client/mgmt/types/TokenQuotaClientCredentials.java deleted file mode 100644 index 920f2889b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TokenQuotaClientCredentials.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = TokenQuotaClientCredentials.Builder.class) -public final class TokenQuotaClientCredentials { - private final Optional enforce; - - private final Optional perDay; - - private final Optional perHour; - - private final Map additionalProperties; - - private TokenQuotaClientCredentials( - Optional enforce, - Optional perDay, - Optional perHour, - Map additionalProperties) { - this.enforce = enforce; - this.perDay = perDay; - this.perHour = perHour; - this.additionalProperties = additionalProperties; - } - - /** - * @return If enabled, the quota will be enforced and requests in excess of the quota will fail. If disabled, the quota will not be enforced, but notifications for requests exceeding the quota will be available in logs. - */ - @JsonProperty("enforce") - public Optional getEnforce() { - return enforce; - } - - /** - * @return Maximum number of issued tokens per day - */ - @JsonProperty("per_day") - public Optional getPerDay() { - return perDay; - } - - /** - * @return Maximum number of issued tokens per hour - */ - @JsonProperty("per_hour") - public Optional getPerHour() { - return perHour; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TokenQuotaClientCredentials && equalTo((TokenQuotaClientCredentials) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TokenQuotaClientCredentials other) { - return enforce.equals(other.enforce) && perDay.equals(other.perDay) && perHour.equals(other.perHour); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enforce, this.perDay, this.perHour); - } - - @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 enforce = Optional.empty(); - - private Optional perDay = Optional.empty(); - - private Optional perHour = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(TokenQuotaClientCredentials other) { - enforce(other.getEnforce()); - perDay(other.getPerDay()); - perHour(other.getPerHour()); - return this; - } - - /** - *

If enabled, the quota will be enforced and requests in excess of the quota will fail. If disabled, the quota will not be enforced, but notifications for requests exceeding the quota will be available in logs.

- */ - @JsonSetter(value = "enforce", nulls = Nulls.SKIP) - public Builder enforce(Optional enforce) { - this.enforce = enforce; - return this; - } - - public Builder enforce(Boolean enforce) { - this.enforce = Optional.ofNullable(enforce); - return this; - } - - /** - *

Maximum number of issued tokens per day

- */ - @JsonSetter(value = "per_day", nulls = Nulls.SKIP) - public Builder perDay(Optional perDay) { - this.perDay = perDay; - return this; - } - - public Builder perDay(Integer perDay) { - this.perDay = Optional.ofNullable(perDay); - return this; - } - - /** - *

Maximum number of issued tokens per hour

- */ - @JsonSetter(value = "per_hour", nulls = Nulls.SKIP) - public Builder perHour(Optional perHour) { - this.perHour = perHour; - return this; - } - - public Builder perHour(Integer perHour) { - this.perHour = Optional.ofNullable(perHour); - return this; - } - - public TokenQuotaClientCredentials build() { - return new TokenQuotaClientCredentials(enforce, perDay, perHour, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TokenQuotaConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/TokenQuotaConfiguration.java deleted file mode 100644 index d343e5b82..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TokenQuotaConfiguration.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = TokenQuotaConfiguration.Builder.class) -public final class TokenQuotaConfiguration { - private final TokenQuotaClientCredentials clientCredentials; - - private final Map additionalProperties; - - private TokenQuotaConfiguration( - TokenQuotaClientCredentials clientCredentials, Map additionalProperties) { - this.clientCredentials = clientCredentials; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_credentials") - public TokenQuotaClientCredentials getClientCredentials() { - return clientCredentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TokenQuotaConfiguration && equalTo((TokenQuotaConfiguration) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TokenQuotaConfiguration other) { - return clientCredentials.equals(other.clientCredentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.clientCredentials); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ClientCredentialsStage builder() { - return new Builder(); - } - - public interface ClientCredentialsStage { - _FinalStage clientCredentials(@NotNull TokenQuotaClientCredentials clientCredentials); - - Builder from(TokenQuotaConfiguration other); - } - - public interface _FinalStage { - TokenQuotaConfiguration build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ClientCredentialsStage, _FinalStage { - private TokenQuotaClientCredentials clientCredentials; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(TokenQuotaConfiguration other) { - clientCredentials(other.getClientCredentials()); - return this; - } - - @java.lang.Override - @JsonSetter("client_credentials") - public _FinalStage clientCredentials(@NotNull TokenQuotaClientCredentials clientCredentials) { - this.clientCredentials = Objects.requireNonNull(clientCredentials, "clientCredentials must not be null"); - return this; - } - - @java.lang.Override - public TokenQuotaConfiguration build() { - return new TokenQuotaConfiguration(clientCredentials, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TwilioProviderConfiguration.java b/src/main/java/com/auth0/client/mgmt/types/TwilioProviderConfiguration.java deleted file mode 100644 index 8468c49e4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TwilioProviderConfiguration.java +++ /dev/null @@ -1,211 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = TwilioProviderConfiguration.Builder.class) -public final class TwilioProviderConfiguration { - private final Optional defaultFrom; - - private final Optional mssid; - - private final String sid; - - private final List deliveryMethods; - - private final Map additionalProperties; - - private TwilioProviderConfiguration( - Optional defaultFrom, - Optional mssid, - String sid, - List deliveryMethods, - Map additionalProperties) { - this.defaultFrom = defaultFrom; - this.mssid = mssid; - this.sid = sid; - this.deliveryMethods = deliveryMethods; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("default_from") - public Optional getDefaultFrom() { - return defaultFrom; - } - - @JsonProperty("mssid") - public Optional getMssid() { - return mssid; - } - - @JsonProperty("sid") - public String getSid() { - return sid; - } - - @JsonProperty("delivery_methods") - public List getDeliveryMethods() { - return deliveryMethods; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TwilioProviderConfiguration && equalTo((TwilioProviderConfiguration) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TwilioProviderConfiguration other) { - return defaultFrom.equals(other.defaultFrom) - && mssid.equals(other.mssid) - && sid.equals(other.sid) - && deliveryMethods.equals(other.deliveryMethods); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.defaultFrom, this.mssid, this.sid, this.deliveryMethods); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static SidStage builder() { - return new Builder(); - } - - public interface SidStage { - _FinalStage sid(@NotNull String sid); - - Builder from(TwilioProviderConfiguration other); - } - - public interface _FinalStage { - TwilioProviderConfiguration build(); - - _FinalStage defaultFrom(Optional defaultFrom); - - _FinalStage defaultFrom(String defaultFrom); - - _FinalStage mssid(Optional mssid); - - _FinalStage mssid(String mssid); - - _FinalStage deliveryMethods(List deliveryMethods); - - _FinalStage addDeliveryMethods(TwilioProviderDeliveryMethodEnum deliveryMethods); - - _FinalStage addAllDeliveryMethods(List deliveryMethods); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements SidStage, _FinalStage { - private String sid; - - private List deliveryMethods = new ArrayList<>(); - - private Optional mssid = Optional.empty(); - - private Optional defaultFrom = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(TwilioProviderConfiguration other) { - defaultFrom(other.getDefaultFrom()); - mssid(other.getMssid()); - sid(other.getSid()); - deliveryMethods(other.getDeliveryMethods()); - return this; - } - - @java.lang.Override - @JsonSetter("sid") - public _FinalStage sid(@NotNull String sid) { - this.sid = Objects.requireNonNull(sid, "sid must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage addAllDeliveryMethods(List deliveryMethods) { - if (deliveryMethods != null) { - this.deliveryMethods.addAll(deliveryMethods); - } - return this; - } - - @java.lang.Override - public _FinalStage addDeliveryMethods(TwilioProviderDeliveryMethodEnum deliveryMethods) { - this.deliveryMethods.add(deliveryMethods); - return this; - } - - @java.lang.Override - @JsonSetter(value = "delivery_methods", nulls = Nulls.SKIP) - public _FinalStage deliveryMethods(List deliveryMethods) { - this.deliveryMethods.clear(); - if (deliveryMethods != null) { - this.deliveryMethods.addAll(deliveryMethods); - } - return this; - } - - @java.lang.Override - public _FinalStage mssid(String mssid) { - this.mssid = Optional.ofNullable(mssid); - return this; - } - - @java.lang.Override - @JsonSetter(value = "mssid", nulls = Nulls.SKIP) - public _FinalStage mssid(Optional mssid) { - this.mssid = mssid; - return this; - } - - @java.lang.Override - public _FinalStage defaultFrom(String defaultFrom) { - this.defaultFrom = Optional.ofNullable(defaultFrom); - return this; - } - - @java.lang.Override - @JsonSetter(value = "default_from", nulls = Nulls.SKIP) - public _FinalStage defaultFrom(Optional defaultFrom) { - this.defaultFrom = defaultFrom; - return this; - } - - @java.lang.Override - public TwilioProviderConfiguration build() { - return new TwilioProviderConfiguration(defaultFrom, mssid, sid, deliveryMethods, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TwilioProviderCredentials.java b/src/main/java/com/auth0/client/mgmt/types/TwilioProviderCredentials.java deleted file mode 100644 index 195d73745..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TwilioProviderCredentials.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = TwilioProviderCredentials.Builder.class) -public final class TwilioProviderCredentials { - private final String authToken; - - private final Map additionalProperties; - - private TwilioProviderCredentials(String authToken, Map additionalProperties) { - this.authToken = authToken; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("auth_token") - public String getAuthToken() { - return authToken; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof TwilioProviderCredentials && equalTo((TwilioProviderCredentials) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(TwilioProviderCredentials other) { - return authToken.equals(other.authToken); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.authToken); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static AuthTokenStage builder() { - return new Builder(); - } - - public interface AuthTokenStage { - _FinalStage authToken(@NotNull String authToken); - - Builder from(TwilioProviderCredentials other); - } - - public interface _FinalStage { - TwilioProviderCredentials build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements AuthTokenStage, _FinalStage { - private String authToken; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(TwilioProviderCredentials other) { - authToken(other.getAuthToken()); - return this; - } - - @java.lang.Override - @JsonSetter("auth_token") - public _FinalStage authToken(@NotNull String authToken) { - this.authToken = Objects.requireNonNull(authToken, "authToken must not be null"); - return this; - } - - @java.lang.Override - public TwilioProviderCredentials build() { - return new TwilioProviderCredentials(authToken, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/TwilioProviderDeliveryMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/TwilioProviderDeliveryMethodEnum.java deleted file mode 100644 index dc8c8aae6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/TwilioProviderDeliveryMethodEnum.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class TwilioProviderDeliveryMethodEnum { - public static final TwilioProviderDeliveryMethodEnum TEXT = - new TwilioProviderDeliveryMethodEnum(Value.TEXT, "text"); - - public static final TwilioProviderDeliveryMethodEnum VOICE = - new TwilioProviderDeliveryMethodEnum(Value.VOICE, "voice"); - - private final Value value; - - private final String string; - - TwilioProviderDeliveryMethodEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof TwilioProviderDeliveryMethodEnum - && this.string.equals(((TwilioProviderDeliveryMethodEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TEXT: - return visitor.visitText(); - case VOICE: - return visitor.visitVoice(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static TwilioProviderDeliveryMethodEnum valueOf(String value) { - switch (value) { - case "text": - return TEXT; - case "voice": - return VOICE; - default: - return new TwilioProviderDeliveryMethodEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - TEXT, - - VOICE, - - UNKNOWN - } - - public interface Visitor { - T visitText(); - - T visitVoice(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UniversalLoginExperienceEnum.java b/src/main/java/com/auth0/client/mgmt/types/UniversalLoginExperienceEnum.java deleted file mode 100644 index bd6f45f36..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UniversalLoginExperienceEnum.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class UniversalLoginExperienceEnum { - public static final UniversalLoginExperienceEnum CLASSIC = - new UniversalLoginExperienceEnum(Value.CLASSIC, "classic"); - - public static final UniversalLoginExperienceEnum NEW = new UniversalLoginExperienceEnum(Value.NEW, "new"); - - private final Value value; - - private final String string; - - UniversalLoginExperienceEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof UniversalLoginExperienceEnum - && this.string.equals(((UniversalLoginExperienceEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case CLASSIC: - return visitor.visitClassic(); - case NEW: - return visitor.visitNew(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static UniversalLoginExperienceEnum valueOf(String value) { - switch (value) { - case "classic": - return CLASSIC; - case "new": - return NEW; - default: - return new UniversalLoginExperienceEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - NEW, - - CLASSIC, - - UNKNOWN - } - - public interface Visitor { - T visitNew(); - - T visitClassic(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateActionBindingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateActionBindingsResponseContent.java deleted file mode 100644 index d8d2c5e92..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateActionBindingsResponseContent.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateActionBindingsResponseContent.Builder.class) -public final class UpdateActionBindingsResponseContent { - private final Optional> bindings; - - private final Map additionalProperties; - - private UpdateActionBindingsResponseContent( - Optional> bindings, Map additionalProperties) { - this.bindings = bindings; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("bindings") - public Optional> getBindings() { - return bindings; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateActionBindingsResponseContent - && equalTo((UpdateActionBindingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateActionBindingsResponseContent other) { - return bindings.equals(other.bindings); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.bindings); - } - - @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> bindings = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateActionBindingsResponseContent other) { - bindings(other.getBindings()); - return this; - } - - @JsonSetter(value = "bindings", nulls = Nulls.SKIP) - public Builder bindings(Optional> bindings) { - this.bindings = bindings; - return this; - } - - public Builder bindings(List bindings) { - this.bindings = Optional.ofNullable(bindings); - return this; - } - - public UpdateActionBindingsResponseContent build() { - return new UpdateActionBindingsResponseContent(bindings, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateActionModuleResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateActionModuleResponseContent.java deleted file mode 100644 index a34b51e9a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateActionModuleResponseContent.java +++ /dev/null @@ -1,422 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = UpdateActionModuleResponseContent.Builder.class) -public final class UpdateActionModuleResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional> secrets; - - private final Optional actionsUsingModuleTotal; - - private final Optional allChangesPublished; - - private final Optional latestVersionNumber; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional latestVersion; - - private final Map additionalProperties; - - private UpdateActionModuleResponseContent( - Optional id, - Optional name, - Optional code, - Optional> dependencies, - Optional> secrets, - Optional actionsUsingModuleTotal, - Optional allChangesPublished, - Optional latestVersionNumber, - Optional createdAt, - Optional updatedAt, - Optional latestVersion, - Map additionalProperties) { - this.id = id; - this.name = name; - this.code = code; - this.dependencies = dependencies; - this.secrets = secrets; - this.actionsUsingModuleTotal = actionsUsingModuleTotal; - this.allChangesPublished = allChangesPublished; - this.latestVersionNumber = latestVersionNumber; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.latestVersion = latestVersion; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the module. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the module. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The source code from the module's draft version. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The npm dependencies from the module's draft version. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return The secrets from the module's draft version (names and timestamps only, values never returned). - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - /** - * @return The number of deployed actions using this module. - */ - @JsonProperty("actions_using_module_total") - public Optional getActionsUsingModuleTotal() { - return actionsUsingModuleTotal; - } - - /** - * @return Whether all draft changes have been published as a version. - */ - @JsonProperty("all_changes_published") - public Optional getAllChangesPublished() { - return allChangesPublished; - } - - /** - * @return The version number of the latest published version. Omitted if no versions have been published. - */ - @JsonProperty("latest_version_number") - public Optional getLatestVersionNumber() { - return latestVersionNumber; - } - - /** - * @return Timestamp when the module was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return Timestamp when the module was last updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("latest_version") - public Optional getLatestVersion() { - return latestVersion; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateActionModuleResponseContent && equalTo((UpdateActionModuleResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateActionModuleResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && secrets.equals(other.secrets) - && actionsUsingModuleTotal.equals(other.actionsUsingModuleTotal) - && allChangesPublished.equals(other.allChangesPublished) - && latestVersionNumber.equals(other.latestVersionNumber) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && latestVersion.equals(other.latestVersion); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.code, - this.dependencies, - this.secrets, - this.actionsUsingModuleTotal, - this.allChangesPublished, - this.latestVersionNumber, - this.createdAt, - this.updatedAt, - this.latestVersion); - } - - @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 code = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional actionsUsingModuleTotal = Optional.empty(); - - private Optional allChangesPublished = Optional.empty(); - - private Optional latestVersionNumber = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional latestVersion = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateActionModuleResponseContent other) { - id(other.getId()); - name(other.getName()); - code(other.getCode()); - dependencies(other.getDependencies()); - secrets(other.getSecrets()); - actionsUsingModuleTotal(other.getActionsUsingModuleTotal()); - allChangesPublished(other.getAllChangesPublished()); - latestVersionNumber(other.getLatestVersionNumber()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - latestVersion(other.getLatestVersion()); - return this; - } - - /** - *

The unique ID of the module.

- */ - @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 the module.

- */ - @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 source code from the module's draft version.

- */ - @JsonSetter(value = "code", nulls = Nulls.SKIP) - public Builder code(Optional code) { - this.code = code; - return this; - } - - public Builder code(String code) { - this.code = Optional.ofNullable(code); - return this; - } - - /** - *

The npm dependencies from the module's draft version.

- */ - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public Builder dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - public Builder dependencies(List dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - /** - *

The secrets from the module's draft version (names and timestamps only, values never returned).

- */ - @JsonSetter(value = "secrets", nulls = Nulls.SKIP) - public Builder secrets(Optional> secrets) { - this.secrets = secrets; - return this; - } - - public Builder secrets(List secrets) { - this.secrets = Optional.ofNullable(secrets); - return this; - } - - /** - *

The number of deployed actions using this module.

- */ - @JsonSetter(value = "actions_using_module_total", nulls = Nulls.SKIP) - public Builder actionsUsingModuleTotal(Optional actionsUsingModuleTotal) { - this.actionsUsingModuleTotal = actionsUsingModuleTotal; - return this; - } - - public Builder actionsUsingModuleTotal(Integer actionsUsingModuleTotal) { - this.actionsUsingModuleTotal = Optional.ofNullable(actionsUsingModuleTotal); - return this; - } - - /** - *

Whether all draft changes have been published as a version.

- */ - @JsonSetter(value = "all_changes_published", nulls = Nulls.SKIP) - public Builder allChangesPublished(Optional allChangesPublished) { - this.allChangesPublished = allChangesPublished; - return this; - } - - public Builder allChangesPublished(Boolean allChangesPublished) { - this.allChangesPublished = Optional.ofNullable(allChangesPublished); - return this; - } - - /** - *

The version number of the latest published version. Omitted if no versions have been published.

- */ - @JsonSetter(value = "latest_version_number", nulls = Nulls.SKIP) - public Builder latestVersionNumber(Optional latestVersionNumber) { - this.latestVersionNumber = latestVersionNumber; - return this; - } - - public Builder latestVersionNumber(Integer latestVersionNumber) { - this.latestVersionNumber = Optional.ofNullable(latestVersionNumber); - return this; - } - - /** - *

Timestamp when the module 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; - } - - /** - *

Timestamp when the module 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; - } - - @JsonSetter(value = "latest_version", nulls = Nulls.SKIP) - public Builder latestVersion(Optional latestVersion) { - this.latestVersion = latestVersion; - return this; - } - - public Builder latestVersion(ActionModuleVersionReference latestVersion) { - this.latestVersion = Optional.ofNullable(latestVersion); - return this; - } - - public UpdateActionModuleResponseContent build() { - return new UpdateActionModuleResponseContent( - id, - name, - code, - dependencies, - secrets, - actionsUsingModuleTotal, - allChangesPublished, - latestVersionNumber, - createdAt, - updatedAt, - latestVersion, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateActionRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateActionRequestContent.java deleted file mode 100644 index 204f78590..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateActionRequestContent.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.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateActionRequestContent.Builder.class) -public final class UpdateActionRequestContent { - private final Optional name; - - private final Optional> supportedTriggers; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional runtime; - - private final Optional> secrets; - - private final Optional> modules; - - private final Map additionalProperties; - - private UpdateActionRequestContent( - Optional name, - Optional> supportedTriggers, - Optional code, - Optional> dependencies, - Optional runtime, - Optional> secrets, - Optional> modules, - Map additionalProperties) { - this.name = name; - this.supportedTriggers = supportedTriggers; - this.code = code; - this.dependencies = dependencies; - this.runtime = runtime; - this.secrets = secrets; - this.modules = modules; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of an action. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The list of triggers that this action supports. At this time, an action can only target a single trigger at a time. - */ - @JsonProperty("supported_triggers") - public Optional> getSupportedTriggers() { - return supportedTriggers; - } - - /** - * @return The source code of the action. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The list of third party npm modules, and their versions, that this action depends on. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return The Node runtime. For example: node22, defaults to node22 - */ - @JsonProperty("runtime") - public Optional getRuntime() { - return runtime; - } - - /** - * @return The list of secrets that are included in an action or a version of an action. - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - /** - * @return The list of action modules and their versions used by this action. - */ - @JsonProperty("modules") - public Optional> getModules() { - return modules; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateActionRequestContent && equalTo((UpdateActionRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateActionRequestContent other) { - return name.equals(other.name) - && supportedTriggers.equals(other.supportedTriggers) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && runtime.equals(other.runtime) - && secrets.equals(other.secrets) - && modules.equals(other.modules); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.supportedTriggers, - this.code, - this.dependencies, - this.runtime, - this.secrets, - this.modules); - } - - @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> supportedTriggers = Optional.empty(); - - private Optional code = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional runtime = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional> modules = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateActionRequestContent other) { - name(other.getName()); - supportedTriggers(other.getSupportedTriggers()); - code(other.getCode()); - dependencies(other.getDependencies()); - runtime(other.getRuntime()); - secrets(other.getSecrets()); - modules(other.getModules()); - return this; - } - - /** - *

The name of an action.

- */ - @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 list of triggers that this action supports. At this time, an action can only target a single trigger at a time.

- */ - @JsonSetter(value = "supported_triggers", nulls = Nulls.SKIP) - public Builder supportedTriggers(Optional> supportedTriggers) { - this.supportedTriggers = supportedTriggers; - return this; - } - - public Builder supportedTriggers(List supportedTriggers) { - this.supportedTriggers = Optional.ofNullable(supportedTriggers); - return this; - } - - /** - *

The source code of the action.

- */ - @JsonSetter(value = "code", nulls = Nulls.SKIP) - public Builder code(Optional code) { - this.code = code; - return this; - } - - public Builder code(String code) { - this.code = Optional.ofNullable(code); - return this; - } - - /** - *

The list of third party npm modules, and their versions, that this action depends on.

- */ - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public Builder dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - public Builder dependencies(List dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - /** - *

The Node runtime. For example: node22, defaults to node22

- */ - @JsonSetter(value = "runtime", nulls = Nulls.SKIP) - public Builder runtime(Optional runtime) { - this.runtime = runtime; - return this; - } - - public Builder runtime(String runtime) { - this.runtime = Optional.ofNullable(runtime); - return this; - } - - /** - *

The list of secrets that are included in an action or a version of an action.

- */ - @JsonSetter(value = "secrets", nulls = Nulls.SKIP) - public Builder secrets(Optional> secrets) { - this.secrets = secrets; - return this; - } - - public Builder secrets(List secrets) { - this.secrets = Optional.ofNullable(secrets); - return this; - } - - /** - *

The list of action modules and their versions used by this action.

- */ - @JsonSetter(value = "modules", nulls = Nulls.SKIP) - public Builder modules(Optional> modules) { - this.modules = modules; - return this; - } - - public Builder modules(List modules) { - this.modules = Optional.ofNullable(modules); - return this; - } - - public UpdateActionRequestContent build() { - return new UpdateActionRequestContent( - name, supportedTriggers, code, dependencies, runtime, secrets, modules, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateActionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateActionResponseContent.java deleted file mode 100644 index cea3d6c3a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateActionResponseContent.java +++ /dev/null @@ -1,602 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = UpdateActionResponseContent.Builder.class) -public final class UpdateActionResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional> supportedTriggers; - - private final Optional allChangesDeployed; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional code; - - private final Optional> dependencies; - - private final Optional runtime; - - private final Optional> secrets; - - private final Optional deployedVersion; - - private final Optional installedIntegrationId; - - private final Optional integration; - - private final Optional status; - - private final Optional builtAt; - - private final Optional deploy; - - private final Optional> modules; - - private final Map additionalProperties; - - private UpdateActionResponseContent( - Optional id, - Optional name, - Optional> supportedTriggers, - Optional allChangesDeployed, - Optional createdAt, - Optional updatedAt, - Optional code, - Optional> dependencies, - Optional runtime, - Optional> secrets, - Optional deployedVersion, - Optional installedIntegrationId, - Optional integration, - Optional status, - Optional builtAt, - Optional deploy, - Optional> modules, - Map additionalProperties) { - this.id = id; - this.name = name; - this.supportedTriggers = supportedTriggers; - this.allChangesDeployed = allChangesDeployed; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.code = code; - this.dependencies = dependencies; - this.runtime = runtime; - this.secrets = secrets; - this.deployedVersion = deployedVersion; - this.installedIntegrationId = installedIntegrationId; - this.integration = integration; - this.status = status; - this.builtAt = builtAt; - this.deploy = deploy; - this.modules = modules; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the action. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of an action. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The list of triggers that this action supports. At this time, an action can only target a single trigger at a time. - */ - @JsonProperty("supported_triggers") - public Optional> getSupportedTriggers() { - return supportedTriggers; - } - - /** - * @return True if all of an Action's contents have been deployed. - */ - @JsonProperty("all_changes_deployed") - public Optional getAllChangesDeployed() { - return allChangesDeployed; - } - - /** - * @return The time when this action was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when this action was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return The source code of the action. - */ - @JsonProperty("code") - public Optional getCode() { - return code; - } - - /** - * @return The list of third party npm modules, and their versions, that this action depends on. - */ - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - /** - * @return The Node runtime. For example: node22, defaults to node22 - */ - @JsonProperty("runtime") - public Optional getRuntime() { - return runtime; - } - - /** - * @return The list of secrets that are included in an action or a version of an action. - */ - @JsonProperty("secrets") - public Optional> getSecrets() { - return secrets; - } - - @JsonProperty("deployed_version") - public Optional getDeployedVersion() { - return deployedVersion; - } - - /** - * @return installed_integration_id is the fk reference to the InstalledIntegration entity. - */ - @JsonProperty("installed_integration_id") - public Optional getInstalledIntegrationId() { - return installedIntegrationId; - } - - @JsonProperty("integration") - public Optional getIntegration() { - return integration; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return The time when this action was built successfully. - */ - @JsonProperty("built_at") - public Optional getBuiltAt() { - return builtAt; - } - - /** - * @return True if the action should be deployed after creation. - */ - @JsonProperty("deploy") - public Optional getDeploy() { - return deploy; - } - - /** - * @return The list of action modules and their versions used by this action. - */ - @JsonProperty("modules") - public Optional> getModules() { - return modules; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateActionResponseContent && equalTo((UpdateActionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateActionResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && supportedTriggers.equals(other.supportedTriggers) - && allChangesDeployed.equals(other.allChangesDeployed) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && code.equals(other.code) - && dependencies.equals(other.dependencies) - && runtime.equals(other.runtime) - && secrets.equals(other.secrets) - && deployedVersion.equals(other.deployedVersion) - && installedIntegrationId.equals(other.installedIntegrationId) - && integration.equals(other.integration) - && status.equals(other.status) - && builtAt.equals(other.builtAt) - && deploy.equals(other.deploy) - && modules.equals(other.modules); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.supportedTriggers, - this.allChangesDeployed, - this.createdAt, - this.updatedAt, - this.code, - this.dependencies, - this.runtime, - this.secrets, - this.deployedVersion, - this.installedIntegrationId, - this.integration, - this.status, - this.builtAt, - this.deploy, - this.modules); - } - - @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> supportedTriggers = Optional.empty(); - - private Optional allChangesDeployed = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional code = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - private Optional runtime = Optional.empty(); - - private Optional> secrets = Optional.empty(); - - private Optional deployedVersion = Optional.empty(); - - private Optional installedIntegrationId = Optional.empty(); - - private Optional integration = Optional.empty(); - - private Optional status = Optional.empty(); - - private Optional builtAt = Optional.empty(); - - private Optional deploy = Optional.empty(); - - private Optional> modules = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateActionResponseContent other) { - id(other.getId()); - name(other.getName()); - supportedTriggers(other.getSupportedTriggers()); - allChangesDeployed(other.getAllChangesDeployed()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - code(other.getCode()); - dependencies(other.getDependencies()); - runtime(other.getRuntime()); - secrets(other.getSecrets()); - deployedVersion(other.getDeployedVersion()); - installedIntegrationId(other.getInstalledIntegrationId()); - integration(other.getIntegration()); - status(other.getStatus()); - builtAt(other.getBuiltAt()); - deploy(other.getDeploy()); - modules(other.getModules()); - return this; - } - - /** - *

The unique ID of the action.

- */ - @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 an action.

- */ - @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 list of triggers that this action supports. At this time, an action can only target a single trigger at a time.

- */ - @JsonSetter(value = "supported_triggers", nulls = Nulls.SKIP) - public Builder supportedTriggers(Optional> supportedTriggers) { - this.supportedTriggers = supportedTriggers; - return this; - } - - public Builder supportedTriggers(List supportedTriggers) { - this.supportedTriggers = Optional.ofNullable(supportedTriggers); - return this; - } - - /** - *

True if all of an Action's contents have been deployed.

- */ - @JsonSetter(value = "all_changes_deployed", nulls = Nulls.SKIP) - public Builder allChangesDeployed(Optional allChangesDeployed) { - this.allChangesDeployed = allChangesDeployed; - return this; - } - - public Builder allChangesDeployed(Boolean allChangesDeployed) { - this.allChangesDeployed = Optional.ofNullable(allChangesDeployed); - return this; - } - - /** - *

The time when this action 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 time when this action was 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; - } - - /** - *

The source code of the action.

- */ - @JsonSetter(value = "code", nulls = Nulls.SKIP) - public Builder code(Optional code) { - this.code = code; - return this; - } - - public Builder code(String code) { - this.code = Optional.ofNullable(code); - return this; - } - - /** - *

The list of third party npm modules, and their versions, that this action depends on.

- */ - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public Builder dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - public Builder dependencies(List dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - /** - *

The Node runtime. For example: node22, defaults to node22

- */ - @JsonSetter(value = "runtime", nulls = Nulls.SKIP) - public Builder runtime(Optional runtime) { - this.runtime = runtime; - return this; - } - - public Builder runtime(String runtime) { - this.runtime = Optional.ofNullable(runtime); - return this; - } - - /** - *

The list of secrets that are included in an action or a version of an action.

- */ - @JsonSetter(value = "secrets", nulls = Nulls.SKIP) - public Builder secrets(Optional> secrets) { - this.secrets = secrets; - return this; - } - - public Builder secrets(List secrets) { - this.secrets = Optional.ofNullable(secrets); - return this; - } - - @JsonSetter(value = "deployed_version", nulls = Nulls.SKIP) - public Builder deployedVersion(Optional deployedVersion) { - this.deployedVersion = deployedVersion; - return this; - } - - public Builder deployedVersion(ActionDeployedVersion deployedVersion) { - this.deployedVersion = Optional.ofNullable(deployedVersion); - return this; - } - - /** - *

installed_integration_id is the fk reference to the InstalledIntegration entity.

- */ - @JsonSetter(value = "installed_integration_id", nulls = Nulls.SKIP) - public Builder installedIntegrationId(Optional installedIntegrationId) { - this.installedIntegrationId = installedIntegrationId; - return this; - } - - public Builder installedIntegrationId(String installedIntegrationId) { - this.installedIntegrationId = Optional.ofNullable(installedIntegrationId); - return this; - } - - @JsonSetter(value = "integration", nulls = Nulls.SKIP) - public Builder integration(Optional integration) { - this.integration = integration; - return this; - } - - public Builder integration(Integration integration) { - this.integration = Optional.ofNullable(integration); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(ActionBuildStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - /** - *

The time when this action was built successfully.

- */ - @JsonSetter(value = "built_at", nulls = Nulls.SKIP) - public Builder builtAt(Optional builtAt) { - this.builtAt = builtAt; - return this; - } - - public Builder builtAt(OffsetDateTime builtAt) { - this.builtAt = Optional.ofNullable(builtAt); - return this; - } - - /** - *

True if the action should be deployed after creation.

- */ - @JsonSetter(value = "deploy", nulls = Nulls.SKIP) - public Builder deploy(Optional deploy) { - this.deploy = deploy; - return this; - } - - public Builder deploy(Boolean deploy) { - this.deploy = Optional.ofNullable(deploy); - return this; - } - - /** - *

The list of action modules and their versions used by this action.

- */ - @JsonSetter(value = "modules", nulls = Nulls.SKIP) - public Builder modules(Optional> modules) { - this.modules = modules; - return this; - } - - public Builder modules(List modules) { - this.modules = Optional.ofNullable(modules); - return this; - } - - public UpdateActionResponseContent build() { - return new UpdateActionResponseContent( - id, - name, - supportedTriggers, - allChangesDeployed, - createdAt, - updatedAt, - code, - dependencies, - runtime, - secrets, - deployedVersion, - installedIntegrationId, - integration, - status, - builtAt, - deploy, - modules, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateAculResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateAculResponseContent.java deleted file mode 100644 index 9121be94b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateAculResponseContent.java +++ /dev/null @@ -1,342 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateAculResponseContent.Builder.class) -public final class UpdateAculResponseContent { - private final Optional renderingMode; - - private final Optional> contextConfiguration; - - private final OptionalNullable defaultHeadTagsDisabled; - - private final OptionalNullable usePageTemplate; - - private final Optional> headTags; - - private final OptionalNullable filters; - - private final Map additionalProperties; - - private UpdateAculResponseContent( - Optional renderingMode, - Optional> contextConfiguration, - OptionalNullable defaultHeadTagsDisabled, - OptionalNullable usePageTemplate, - Optional> headTags, - OptionalNullable filters, - Map additionalProperties) { - this.renderingMode = renderingMode; - this.contextConfiguration = contextConfiguration; - this.defaultHeadTagsDisabled = defaultHeadTagsDisabled; - this.usePageTemplate = usePageTemplate; - this.headTags = headTags; - this.filters = filters; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("rendering_mode") - public Optional getRenderingMode() { - return renderingMode; - } - - @JsonProperty("context_configuration") - public Optional> getContextConfiguration() { - return contextConfiguration; - } - - /** - * @return Override Universal Login default head tags - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("default_head_tags_disabled") - public OptionalNullable getDefaultHeadTagsDisabled() { - if (defaultHeadTagsDisabled == null) { - return OptionalNullable.absent(); - } - return defaultHeadTagsDisabled; - } - - /** - * @return Use page template with ACUL - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("use_page_template") - public OptionalNullable getUsePageTemplate() { - if (usePageTemplate == null) { - return OptionalNullable.absent(); - } - return usePageTemplate; - } - - /** - * @return An array of head tags - */ - @JsonProperty("head_tags") - public Optional> getHeadTags() { - return headTags; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("filters") - public OptionalNullable getFilters() { - if (filters == null) { - return OptionalNullable.absent(); - } - return filters; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("default_head_tags_disabled") - private OptionalNullable _getDefaultHeadTagsDisabled() { - return defaultHeadTagsDisabled; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("use_page_template") - private OptionalNullable _getUsePageTemplate() { - return usePageTemplate; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("filters") - private OptionalNullable _getFilters() { - return filters; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateAculResponseContent && equalTo((UpdateAculResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateAculResponseContent other) { - return renderingMode.equals(other.renderingMode) - && contextConfiguration.equals(other.contextConfiguration) - && defaultHeadTagsDisabled.equals(other.defaultHeadTagsDisabled) - && usePageTemplate.equals(other.usePageTemplate) - && headTags.equals(other.headTags) - && filters.equals(other.filters); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.renderingMode, - this.contextConfiguration, - this.defaultHeadTagsDisabled, - this.usePageTemplate, - this.headTags, - this.filters); - } - - @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 renderingMode = Optional.empty(); - - private Optional> contextConfiguration = Optional.empty(); - - private OptionalNullable defaultHeadTagsDisabled = OptionalNullable.absent(); - - private OptionalNullable usePageTemplate = OptionalNullable.absent(); - - private Optional> headTags = Optional.empty(); - - private OptionalNullable filters = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateAculResponseContent other) { - renderingMode(other.getRenderingMode()); - contextConfiguration(other.getContextConfiguration()); - defaultHeadTagsDisabled(other.getDefaultHeadTagsDisabled()); - usePageTemplate(other.getUsePageTemplate()); - headTags(other.getHeadTags()); - filters(other.getFilters()); - return this; - } - - @JsonSetter(value = "rendering_mode", nulls = Nulls.SKIP) - public Builder renderingMode(Optional renderingMode) { - this.renderingMode = renderingMode; - return this; - } - - public Builder renderingMode(AculRenderingModeEnum renderingMode) { - this.renderingMode = Optional.ofNullable(renderingMode); - return this; - } - - @JsonSetter(value = "context_configuration", nulls = Nulls.SKIP) - public Builder contextConfiguration(Optional> contextConfiguration) { - this.contextConfiguration = contextConfiguration; - return this; - } - - public Builder contextConfiguration(List contextConfiguration) { - this.contextConfiguration = Optional.ofNullable(contextConfiguration); - return this; - } - - /** - *

Override Universal Login default head tags

- */ - @JsonSetter(value = "default_head_tags_disabled", nulls = Nulls.SKIP) - public Builder defaultHeadTagsDisabled(@Nullable OptionalNullable defaultHeadTagsDisabled) { - this.defaultHeadTagsDisabled = defaultHeadTagsDisabled; - return this; - } - - public Builder defaultHeadTagsDisabled(Boolean defaultHeadTagsDisabled) { - this.defaultHeadTagsDisabled = OptionalNullable.of(defaultHeadTagsDisabled); - return this; - } - - public Builder defaultHeadTagsDisabled(Optional defaultHeadTagsDisabled) { - if (defaultHeadTagsDisabled.isPresent()) { - this.defaultHeadTagsDisabled = OptionalNullable.of(defaultHeadTagsDisabled.get()); - } else { - this.defaultHeadTagsDisabled = OptionalNullable.absent(); - } - return this; - } - - public Builder defaultHeadTagsDisabled(com.auth0.client.mgmt.core.Nullable defaultHeadTagsDisabled) { - if (defaultHeadTagsDisabled.isNull()) { - this.defaultHeadTagsDisabled = OptionalNullable.ofNull(); - } else if (defaultHeadTagsDisabled.isEmpty()) { - this.defaultHeadTagsDisabled = OptionalNullable.absent(); - } else { - this.defaultHeadTagsDisabled = OptionalNullable.of(defaultHeadTagsDisabled.get()); - } - return this; - } - - /** - *

Use page template with ACUL

- */ - @JsonSetter(value = "use_page_template", nulls = Nulls.SKIP) - public Builder usePageTemplate(@Nullable OptionalNullable usePageTemplate) { - this.usePageTemplate = usePageTemplate; - return this; - } - - public Builder usePageTemplate(Boolean usePageTemplate) { - this.usePageTemplate = OptionalNullable.of(usePageTemplate); - return this; - } - - public Builder usePageTemplate(Optional usePageTemplate) { - if (usePageTemplate.isPresent()) { - this.usePageTemplate = OptionalNullable.of(usePageTemplate.get()); - } else { - this.usePageTemplate = OptionalNullable.absent(); - } - return this; - } - - public Builder usePageTemplate(com.auth0.client.mgmt.core.Nullable usePageTemplate) { - if (usePageTemplate.isNull()) { - this.usePageTemplate = OptionalNullable.ofNull(); - } else if (usePageTemplate.isEmpty()) { - this.usePageTemplate = OptionalNullable.absent(); - } else { - this.usePageTemplate = OptionalNullable.of(usePageTemplate.get()); - } - return this; - } - - /** - *

An array of head tags

- */ - @JsonSetter(value = "head_tags", nulls = Nulls.SKIP) - public Builder headTags(Optional> headTags) { - this.headTags = headTags; - return this; - } - - public Builder headTags(List headTags) { - this.headTags = Optional.ofNullable(headTags); - return this; - } - - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public Builder filters(@Nullable OptionalNullable filters) { - this.filters = filters; - return this; - } - - public Builder filters(AculFilters filters) { - this.filters = OptionalNullable.of(filters); - return this; - } - - public Builder filters(Optional filters) { - if (filters.isPresent()) { - this.filters = OptionalNullable.of(filters.get()); - } else { - this.filters = OptionalNullable.absent(); - } - return this; - } - - public Builder filters(com.auth0.client.mgmt.core.Nullable filters) { - if (filters.isNull()) { - this.filters = OptionalNullable.ofNull(); - } else if (filters.isEmpty()) { - this.filters = OptionalNullable.absent(); - } else { - this.filters = OptionalNullable.of(filters.get()); - } - return this; - } - - public UpdateAculResponseContent build() { - return new UpdateAculResponseContent( - renderingMode, - contextConfiguration, - defaultHeadTagsDisabled, - usePageTemplate, - headTags, - filters, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateAttackProtectionCaptchaResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateAttackProtectionCaptchaResponseContent.java deleted file mode 100644 index 564d4a40e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateAttackProtectionCaptchaResponseContent.java +++ /dev/null @@ -1,287 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateAttackProtectionCaptchaResponseContent.Builder.class) -public final class UpdateAttackProtectionCaptchaResponseContent { - private final Optional activeProviderId; - - private final Optional arkose; - - private final Optional authChallenge; - - private final Optional hcaptcha; - - private final Optional friendlyCaptcha; - - private final Optional recaptchaEnterprise; - - private final Optional recaptchaV2; - - private final Optional> simpleCaptcha; - - private final Map additionalProperties; - - private UpdateAttackProtectionCaptchaResponseContent( - Optional activeProviderId, - Optional arkose, - Optional authChallenge, - Optional hcaptcha, - Optional friendlyCaptcha, - Optional recaptchaEnterprise, - Optional recaptchaV2, - Optional> simpleCaptcha, - Map additionalProperties) { - this.activeProviderId = activeProviderId; - this.arkose = arkose; - this.authChallenge = authChallenge; - this.hcaptcha = hcaptcha; - this.friendlyCaptcha = friendlyCaptcha; - this.recaptchaEnterprise = recaptchaEnterprise; - this.recaptchaV2 = recaptchaV2; - this.simpleCaptcha = simpleCaptcha; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("active_provider_id") - public Optional getActiveProviderId() { - return activeProviderId; - } - - @JsonProperty("arkose") - public Optional getArkose() { - return arkose; - } - - @JsonProperty("auth_challenge") - public Optional getAuthChallenge() { - return authChallenge; - } - - @JsonProperty("hcaptcha") - public Optional getHcaptcha() { - return hcaptcha; - } - - @JsonProperty("friendly_captcha") - public Optional getFriendlyCaptcha() { - return friendlyCaptcha; - } - - @JsonProperty("recaptcha_enterprise") - public Optional getRecaptchaEnterprise() { - return recaptchaEnterprise; - } - - @JsonProperty("recaptcha_v2") - public Optional getRecaptchaV2() { - return recaptchaV2; - } - - @JsonProperty("simple_captcha") - public Optional> getSimpleCaptcha() { - return simpleCaptcha; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateAttackProtectionCaptchaResponseContent - && equalTo((UpdateAttackProtectionCaptchaResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateAttackProtectionCaptchaResponseContent other) { - return activeProviderId.equals(other.activeProviderId) - && arkose.equals(other.arkose) - && authChallenge.equals(other.authChallenge) - && hcaptcha.equals(other.hcaptcha) - && friendlyCaptcha.equals(other.friendlyCaptcha) - && recaptchaEnterprise.equals(other.recaptchaEnterprise) - && recaptchaV2.equals(other.recaptchaV2) - && simpleCaptcha.equals(other.simpleCaptcha); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.activeProviderId, - this.arkose, - this.authChallenge, - this.hcaptcha, - this.friendlyCaptcha, - this.recaptchaEnterprise, - this.recaptchaV2, - this.simpleCaptcha); - } - - @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 activeProviderId = Optional.empty(); - - private Optional arkose = Optional.empty(); - - private Optional authChallenge = Optional.empty(); - - private Optional hcaptcha = Optional.empty(); - - private Optional friendlyCaptcha = Optional.empty(); - - private Optional recaptchaEnterprise = - Optional.empty(); - - private Optional recaptchaV2 = Optional.empty(); - - private Optional> simpleCaptcha = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateAttackProtectionCaptchaResponseContent other) { - activeProviderId(other.getActiveProviderId()); - arkose(other.getArkose()); - authChallenge(other.getAuthChallenge()); - hcaptcha(other.getHcaptcha()); - friendlyCaptcha(other.getFriendlyCaptcha()); - recaptchaEnterprise(other.getRecaptchaEnterprise()); - recaptchaV2(other.getRecaptchaV2()); - simpleCaptcha(other.getSimpleCaptcha()); - return this; - } - - @JsonSetter(value = "active_provider_id", nulls = Nulls.SKIP) - public Builder activeProviderId(Optional activeProviderId) { - this.activeProviderId = activeProviderId; - return this; - } - - public Builder activeProviderId(String activeProviderId) { - this.activeProviderId = Optional.ofNullable(activeProviderId); - return this; - } - - @JsonSetter(value = "arkose", nulls = Nulls.SKIP) - public Builder arkose(Optional arkose) { - this.arkose = arkose; - return this; - } - - public Builder arkose(AttackProtectionCaptchaArkoseResponseContent arkose) { - this.arkose = Optional.ofNullable(arkose); - return this; - } - - @JsonSetter(value = "auth_challenge", nulls = Nulls.SKIP) - public Builder authChallenge(Optional authChallenge) { - this.authChallenge = authChallenge; - return this; - } - - public Builder authChallenge(AttackProtectionCaptchaAuthChallengeResponseContent authChallenge) { - this.authChallenge = Optional.ofNullable(authChallenge); - return this; - } - - @JsonSetter(value = "hcaptcha", nulls = Nulls.SKIP) - public Builder hcaptcha(Optional hcaptcha) { - this.hcaptcha = hcaptcha; - return this; - } - - public Builder hcaptcha(AttackProtectionCaptchaHcaptchaResponseContent hcaptcha) { - this.hcaptcha = Optional.ofNullable(hcaptcha); - return this; - } - - @JsonSetter(value = "friendly_captcha", nulls = Nulls.SKIP) - public Builder friendlyCaptcha( - Optional friendlyCaptcha) { - this.friendlyCaptcha = friendlyCaptcha; - return this; - } - - public Builder friendlyCaptcha(AttackProtectionCaptchaFriendlyCaptchaResponseContent friendlyCaptcha) { - this.friendlyCaptcha = Optional.ofNullable(friendlyCaptcha); - return this; - } - - @JsonSetter(value = "recaptcha_enterprise", nulls = Nulls.SKIP) - public Builder recaptchaEnterprise( - Optional recaptchaEnterprise) { - this.recaptchaEnterprise = recaptchaEnterprise; - return this; - } - - public Builder recaptchaEnterprise( - AttackProtectionCaptchaRecaptchaEnterpriseResponseContent recaptchaEnterprise) { - this.recaptchaEnterprise = Optional.ofNullable(recaptchaEnterprise); - return this; - } - - @JsonSetter(value = "recaptcha_v2", nulls = Nulls.SKIP) - public Builder recaptchaV2(Optional recaptchaV2) { - this.recaptchaV2 = recaptchaV2; - return this; - } - - public Builder recaptchaV2(AttackProtectionCaptchaRecaptchaV2ResponseContent recaptchaV2) { - this.recaptchaV2 = Optional.ofNullable(recaptchaV2); - return this; - } - - @JsonSetter(value = "simple_captcha", nulls = Nulls.SKIP) - public Builder simpleCaptcha(Optional> simpleCaptcha) { - this.simpleCaptcha = simpleCaptcha; - return this; - } - - public Builder simpleCaptcha(Map simpleCaptcha) { - this.simpleCaptcha = Optional.ofNullable(simpleCaptcha); - return this; - } - - public UpdateAttackProtectionCaptchaResponseContent build() { - return new UpdateAttackProtectionCaptchaResponseContent( - activeProviderId, - arkose, - authChallenge, - hcaptcha, - friendlyCaptcha, - recaptchaEnterprise, - recaptchaV2, - simpleCaptcha, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBotDetectionSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBotDetectionSettingsResponseContent.java deleted file mode 100644 index e1feae1af..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateBotDetectionSettingsResponseContent.java +++ /dev/null @@ -1,239 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateBotDetectionSettingsResponseContent.Builder.class) -public final class UpdateBotDetectionSettingsResponseContent { - private final Optional botDetectionLevel; - - private final Optional challengePasswordPolicy; - - private final Optional challengePasswordlessPolicy; - - private final Optional challengePasswordResetPolicy; - - private final Optional> allowlist; - - private final Optional monitoringModeEnabled; - - private final Map additionalProperties; - - private UpdateBotDetectionSettingsResponseContent( - Optional botDetectionLevel, - Optional challengePasswordPolicy, - Optional challengePasswordlessPolicy, - Optional challengePasswordResetPolicy, - Optional> allowlist, - Optional monitoringModeEnabled, - Map additionalProperties) { - this.botDetectionLevel = botDetectionLevel; - this.challengePasswordPolicy = challengePasswordPolicy; - this.challengePasswordlessPolicy = challengePasswordlessPolicy; - this.challengePasswordResetPolicy = challengePasswordResetPolicy; - this.allowlist = allowlist; - this.monitoringModeEnabled = monitoringModeEnabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("bot_detection_level") - public Optional getBotDetectionLevel() { - return botDetectionLevel; - } - - @JsonProperty("challenge_password_policy") - public Optional getChallengePasswordPolicy() { - return challengePasswordPolicy; - } - - @JsonProperty("challenge_passwordless_policy") - public Optional getChallengePasswordlessPolicy() { - return challengePasswordlessPolicy; - } - - @JsonProperty("challenge_password_reset_policy") - public Optional getChallengePasswordResetPolicy() { - return challengePasswordResetPolicy; - } - - @JsonProperty("allowlist") - public Optional> getAllowlist() { - return allowlist; - } - - @JsonProperty("monitoring_mode_enabled") - public Optional getMonitoringModeEnabled() { - return monitoringModeEnabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateBotDetectionSettingsResponseContent - && equalTo((UpdateBotDetectionSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateBotDetectionSettingsResponseContent other) { - return botDetectionLevel.equals(other.botDetectionLevel) - && challengePasswordPolicy.equals(other.challengePasswordPolicy) - && challengePasswordlessPolicy.equals(other.challengePasswordlessPolicy) - && challengePasswordResetPolicy.equals(other.challengePasswordResetPolicy) - && allowlist.equals(other.allowlist) - && monitoringModeEnabled.equals(other.monitoringModeEnabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.botDetectionLevel, - this.challengePasswordPolicy, - this.challengePasswordlessPolicy, - this.challengePasswordResetPolicy, - this.allowlist, - this.monitoringModeEnabled); - } - - @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 botDetectionLevel = Optional.empty(); - - private Optional challengePasswordPolicy = Optional.empty(); - - private Optional challengePasswordlessPolicy = - Optional.empty(); - - private Optional challengePasswordResetPolicy = - Optional.empty(); - - private Optional> allowlist = Optional.empty(); - - private Optional monitoringModeEnabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateBotDetectionSettingsResponseContent other) { - botDetectionLevel(other.getBotDetectionLevel()); - challengePasswordPolicy(other.getChallengePasswordPolicy()); - challengePasswordlessPolicy(other.getChallengePasswordlessPolicy()); - challengePasswordResetPolicy(other.getChallengePasswordResetPolicy()); - allowlist(other.getAllowlist()); - monitoringModeEnabled(other.getMonitoringModeEnabled()); - return this; - } - - @JsonSetter(value = "bot_detection_level", nulls = Nulls.SKIP) - public Builder botDetectionLevel(Optional botDetectionLevel) { - this.botDetectionLevel = botDetectionLevel; - return this; - } - - public Builder botDetectionLevel(BotDetectionLevelEnum botDetectionLevel) { - this.botDetectionLevel = Optional.ofNullable(botDetectionLevel); - return this; - } - - @JsonSetter(value = "challenge_password_policy", nulls = Nulls.SKIP) - public Builder challengePasswordPolicy( - Optional challengePasswordPolicy) { - this.challengePasswordPolicy = challengePasswordPolicy; - return this; - } - - public Builder challengePasswordPolicy(BotDetectionChallengePolicyPasswordFlowEnum challengePasswordPolicy) { - this.challengePasswordPolicy = Optional.ofNullable(challengePasswordPolicy); - return this; - } - - @JsonSetter(value = "challenge_passwordless_policy", nulls = Nulls.SKIP) - public Builder challengePasswordlessPolicy( - Optional challengePasswordlessPolicy) { - this.challengePasswordlessPolicy = challengePasswordlessPolicy; - return this; - } - - public Builder challengePasswordlessPolicy( - BotDetectionChallengePolicyPasswordlessFlowEnum challengePasswordlessPolicy) { - this.challengePasswordlessPolicy = Optional.ofNullable(challengePasswordlessPolicy); - return this; - } - - @JsonSetter(value = "challenge_password_reset_policy", nulls = Nulls.SKIP) - public Builder challengePasswordResetPolicy( - Optional challengePasswordResetPolicy) { - this.challengePasswordResetPolicy = challengePasswordResetPolicy; - return this; - } - - public Builder challengePasswordResetPolicy( - BotDetectionChallengePolicyPasswordResetFlowEnum challengePasswordResetPolicy) { - this.challengePasswordResetPolicy = Optional.ofNullable(challengePasswordResetPolicy); - return this; - } - - @JsonSetter(value = "allowlist", nulls = Nulls.SKIP) - public Builder allowlist(Optional> allowlist) { - this.allowlist = allowlist; - return this; - } - - public Builder allowlist(List allowlist) { - this.allowlist = Optional.ofNullable(allowlist); - return this; - } - - @JsonSetter(value = "monitoring_mode_enabled", nulls = Nulls.SKIP) - public Builder monitoringModeEnabled(Optional monitoringModeEnabled) { - this.monitoringModeEnabled = monitoringModeEnabled; - return this; - } - - public Builder monitoringModeEnabled(Boolean monitoringModeEnabled) { - this.monitoringModeEnabled = Optional.ofNullable(monitoringModeEnabled); - return this; - } - - public UpdateBotDetectionSettingsResponseContent build() { - return new UpdateBotDetectionSettingsResponseContent( - botDetectionLevel, - challengePasswordPolicy, - challengePasswordlessPolicy, - challengePasswordResetPolicy, - allowlist, - monitoringModeEnabled, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingColors.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingColors.java deleted file mode 100644 index a17710ac0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingColors.java +++ /dev/null @@ -1,159 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateBrandingColors.Builder.class) -public final class UpdateBrandingColors { - private final OptionalNullable primary; - - private final Optional pageBackground; - - private final Map additionalProperties; - - private UpdateBrandingColors( - OptionalNullable primary, - Optional pageBackground, - Map additionalProperties) { - this.primary = primary; - this.pageBackground = pageBackground; - this.additionalProperties = additionalProperties; - } - - /** - * @return Accent color. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("primary") - public OptionalNullable getPrimary() { - if (primary == null) { - return OptionalNullable.absent(); - } - return primary; - } - - @JsonProperty("page_background") - public Optional getPageBackground() { - return pageBackground; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("primary") - private OptionalNullable _getPrimary() { - return primary; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateBrandingColors && equalTo((UpdateBrandingColors) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateBrandingColors 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 OptionalNullable primary = OptionalNullable.absent(); - - private Optional pageBackground = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateBrandingColors other) { - primary(other.getPrimary()); - pageBackground(other.getPageBackground()); - return this; - } - - /** - *

Accent color.

- */ - @JsonSetter(value = "primary", nulls = Nulls.SKIP) - public Builder primary(@Nullable OptionalNullable primary) { - this.primary = primary; - return this; - } - - public Builder primary(String primary) { - this.primary = OptionalNullable.of(primary); - return this; - } - - public Builder primary(Optional primary) { - if (primary.isPresent()) { - this.primary = OptionalNullable.of(primary.get()); - } else { - this.primary = OptionalNullable.absent(); - } - return this; - } - - public Builder primary(com.auth0.client.mgmt.core.Nullable primary) { - if (primary.isNull()) { - this.primary = OptionalNullable.ofNull(); - } else if (primary.isEmpty()) { - this.primary = OptionalNullable.absent(); - } else { - this.primary = OptionalNullable.of(primary.get()); - } - return this; - } - - @JsonSetter(value = "page_background", nulls = Nulls.SKIP) - public Builder pageBackground(Optional pageBackground) { - this.pageBackground = pageBackground; - return this; - } - - public Builder pageBackground(UpdateBrandingPageBackground pageBackground) { - this.pageBackground = Optional.ofNullable(pageBackground); - return this; - } - - public UpdateBrandingColors build() { - return new UpdateBrandingColors(primary, pageBackground, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingFont.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingFont.java deleted file mode 100644 index 1da496328..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingFont.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateBrandingFont.Builder.class) -public final class UpdateBrandingFont { - private final OptionalNullable url; - - private final Map additionalProperties; - - private UpdateBrandingFont(OptionalNullable url, Map additionalProperties) { - this.url = url; - this.additionalProperties = additionalProperties; - } - - /** - * @return URL for the custom font. The URL must point to a font file and not a stylesheet. Must use HTTPS. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("url") - public OptionalNullable getUrl() { - if (url == null) { - return OptionalNullable.absent(); - } - return url; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("url") - private OptionalNullable _getUrl() { - return url; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateBrandingFont && equalTo((UpdateBrandingFont) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateBrandingFont other) { - return url.equals(other.url); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.url); - } - - @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 url = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateBrandingFont other) { - url(other.getUrl()); - return this; - } - - /** - *

URL for the custom font. The URL must point to a font file and not a stylesheet. Must use HTTPS.

- */ - @JsonSetter(value = "url", nulls = Nulls.SKIP) - public Builder url(@Nullable OptionalNullable url) { - this.url = url; - return this; - } - - public Builder url(String url) { - this.url = OptionalNullable.of(url); - return this; - } - - public Builder url(Optional url) { - if (url.isPresent()) { - this.url = OptionalNullable.of(url.get()); - } else { - this.url = OptionalNullable.absent(); - } - return this; - } - - public Builder url(com.auth0.client.mgmt.core.Nullable url) { - if (url.isNull()) { - this.url = OptionalNullable.ofNull(); - } else if (url.isEmpty()) { - this.url = OptionalNullable.absent(); - } else { - this.url = OptionalNullable.of(url.get()); - } - return this; - } - - public UpdateBrandingFont build() { - return new UpdateBrandingFont(url, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPageBackground.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPageBackground.java deleted file mode 100644 index 849ba5b81..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPageBackground.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.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.Map; -import java.util.Objects; - -@JsonDeserialize(using = UpdateBrandingPageBackground.Deserializer.class) -public final class UpdateBrandingPageBackground { - private final Object value; - - private final int type; - - private UpdateBrandingPageBackground(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.visitOptionalNullableString((OptionalNullable) this.value); - } else if (this.type == 1) { - return visitor.visitOptionalNullableMapOfStringToUnknown( - (OptionalNullable>) 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 UpdateBrandingPageBackground && equalTo((UpdateBrandingPageBackground) other); - } - - private boolean equalTo(UpdateBrandingPageBackground 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 UpdateBrandingPageBackground ofOptionalNullableString(OptionalNullable value) { - return new UpdateBrandingPageBackground(value, 0); - } - - public static UpdateBrandingPageBackground ofOptionalNullableMapOfStringToUnknown( - OptionalNullable> value) { - return new UpdateBrandingPageBackground(value, 1); - } - - public interface Visitor { - T visitOptionalNullableString(OptionalNullable value); - - T visitOptionalNullableMapOfStringToUnknown(OptionalNullable> value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(UpdateBrandingPageBackground.class); - } - - @java.lang.Override - public UpdateBrandingPageBackground deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return ofOptionalNullableString(ObjectMappers.JSON_MAPPER.convertValue( - value, new TypeReference>() {})); - } catch (RuntimeException e) { - } - try { - return ofOptionalNullableMapOfStringToUnknown(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/UpdateBrandingPhoneProviderResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPhoneProviderResponseContent.java deleted file mode 100644 index b99b25df2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingPhoneProviderResponseContent.java +++ /dev/null @@ -1,379 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = UpdateBrandingPhoneProviderResponseContent.Builder.class) -public final class UpdateBrandingPhoneProviderResponseContent { - private final Optional id; - - private final Optional tenant; - - private final PhoneProviderNameEnum name; - - private final Optional channel; - - private final Optional disabled; - - private final Optional configuration; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private UpdateBrandingPhoneProviderResponseContent( - Optional id, - Optional tenant, - PhoneProviderNameEnum name, - Optional channel, - Optional disabled, - Optional configuration, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.tenant = tenant; - this.name = name; - this.channel = channel; - this.disabled = disabled; - this.configuration = configuration; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the tenant - */ - @JsonProperty("tenant") - public Optional getTenant() { - return tenant; - } - - @JsonProperty("name") - public PhoneProviderNameEnum getName() { - return name; - } - - @JsonProperty("channel") - public Optional getChannel() { - return channel; - } - - /** - * @return Whether the provider is enabled (false) or disabled (true). - */ - @JsonProperty("disabled") - public Optional getDisabled() { - return disabled; - } - - @JsonProperty("configuration") - public Optional getConfiguration() { - return configuration; - } - - /** - * @return The provider's creation date and time in ISO 8601 format - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The date and time of the last update to the provider in ISO 8601 format - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateBrandingPhoneProviderResponseContent - && equalTo((UpdateBrandingPhoneProviderResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateBrandingPhoneProviderResponseContent other) { - return id.equals(other.id) - && tenant.equals(other.tenant) - && name.equals(other.name) - && channel.equals(other.channel) - && disabled.equals(other.disabled) - && configuration.equals(other.configuration) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.tenant, - this.name, - this.channel, - this.disabled, - this.configuration, - this.createdAt, - this.updatedAt); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - _FinalStage name(@NotNull PhoneProviderNameEnum name); - - Builder from(UpdateBrandingPhoneProviderResponseContent other); - } - - public interface _FinalStage { - UpdateBrandingPhoneProviderResponseContent build(); - - _FinalStage id(Optional id); - - _FinalStage id(String id); - - /** - *

The name of the tenant

- */ - _FinalStage tenant(Optional tenant); - - _FinalStage tenant(String tenant); - - _FinalStage channel(Optional channel); - - _FinalStage channel(PhoneProviderChannelEnum channel); - - /** - *

Whether the provider is enabled (false) or disabled (true).

- */ - _FinalStage disabled(Optional disabled); - - _FinalStage disabled(Boolean disabled); - - _FinalStage configuration(Optional configuration); - - _FinalStage configuration(PhoneProviderConfiguration configuration); - - /** - *

The provider's creation date and time in ISO 8601 format

- */ - _FinalStage createdAt(Optional createdAt); - - _FinalStage createdAt(OffsetDateTime createdAt); - - /** - *

The date and time of the last update to the provider in ISO 8601 format

- */ - _FinalStage updatedAt(Optional updatedAt); - - _FinalStage updatedAt(OffsetDateTime updatedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements NameStage, _FinalStage { - private PhoneProviderNameEnum name; - - private Optional updatedAt = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional configuration = Optional.empty(); - - private Optional disabled = Optional.empty(); - - private Optional channel = Optional.empty(); - - private Optional tenant = Optional.empty(); - - private Optional id = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateBrandingPhoneProviderResponseContent other) { - id(other.getId()); - tenant(other.getTenant()); - name(other.getName()); - channel(other.getChannel()); - disabled(other.getDisabled()); - configuration(other.getConfiguration()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - @java.lang.Override - @JsonSetter("name") - public _FinalStage name(@NotNull PhoneProviderNameEnum name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - /** - *

The date and time of the last update to the provider in ISO 8601 format

- * @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; - } - - /** - *

The date and time of the last update to the provider in ISO 8601 format

- */ - @java.lang.Override - @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public _FinalStage updatedAt(Optional updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - *

The provider's creation date and time in ISO 8601 format

- * @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; - } - - /** - *

The provider's creation date and time in ISO 8601 format

- */ - @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 configuration(PhoneProviderConfiguration configuration) { - this.configuration = Optional.ofNullable(configuration); - return this; - } - - @java.lang.Override - @JsonSetter(value = "configuration", nulls = Nulls.SKIP) - public _FinalStage configuration(Optional configuration) { - this.configuration = configuration; - return this; - } - - /** - *

Whether the provider is enabled (false) or disabled (true).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage disabled(Boolean disabled) { - this.disabled = Optional.ofNullable(disabled); - return this; - } - - /** - *

Whether the provider is enabled (false) or disabled (true).

- */ - @java.lang.Override - @JsonSetter(value = "disabled", nulls = Nulls.SKIP) - public _FinalStage disabled(Optional disabled) { - this.disabled = disabled; - return this; - } - - @java.lang.Override - public _FinalStage channel(PhoneProviderChannelEnum channel) { - this.channel = Optional.ofNullable(channel); - return this; - } - - @java.lang.Override - @JsonSetter(value = "channel", nulls = Nulls.SKIP) - public _FinalStage channel(Optional channel) { - this.channel = channel; - return this; - } - - /** - *

The name of the tenant

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage tenant(String tenant) { - this.tenant = Optional.ofNullable(tenant); - return this; - } - - /** - *

The name of the tenant

- */ - @java.lang.Override - @JsonSetter(value = "tenant", nulls = Nulls.SKIP) - public _FinalStage tenant(Optional tenant) { - this.tenant = tenant; - return this; - } - - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public UpdateBrandingPhoneProviderResponseContent build() { - return new UpdateBrandingPhoneProviderResponseContent( - id, tenant, name, channel, disabled, configuration, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingRequestContent.java deleted file mode 100644 index ad7fd7d62..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingRequestContent.java +++ /dev/null @@ -1,304 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateBrandingRequestContent.Builder.class) -public final class UpdateBrandingRequestContent { - private final OptionalNullable colors; - - private final OptionalNullable faviconUrl; - - private final OptionalNullable logoUrl; - - private final OptionalNullable font; - - private final Map additionalProperties; - - private UpdateBrandingRequestContent( - OptionalNullable colors, - OptionalNullable faviconUrl, - OptionalNullable logoUrl, - OptionalNullable font, - Map additionalProperties) { - this.colors = colors; - this.faviconUrl = faviconUrl; - this.logoUrl = logoUrl; - this.font = font; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("colors") - public OptionalNullable getColors() { - if (colors == null) { - return OptionalNullable.absent(); - } - return colors; - } - - /** - * @return URL for the favicon. Must use HTTPS. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("favicon_url") - public OptionalNullable getFaviconUrl() { - if (faviconUrl == null) { - return OptionalNullable.absent(); - } - return faviconUrl; - } - - /** - * @return URL for the logo. Must use HTTPS. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("logo_url") - public OptionalNullable getLogoUrl() { - if (logoUrl == null) { - return OptionalNullable.absent(); - } - return logoUrl; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("font") - public OptionalNullable getFont() { - if (font == null) { - return OptionalNullable.absent(); - } - return font; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("colors") - private OptionalNullable _getColors() { - return colors; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("favicon_url") - private OptionalNullable _getFaviconUrl() { - return faviconUrl; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("logo_url") - private OptionalNullable _getLogoUrl() { - return logoUrl; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("font") - private OptionalNullable _getFont() { - return font; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateBrandingRequestContent && equalTo((UpdateBrandingRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateBrandingRequestContent other) { - return colors.equals(other.colors) - && faviconUrl.equals(other.faviconUrl) - && logoUrl.equals(other.logoUrl) - && font.equals(other.font); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.colors, this.faviconUrl, this.logoUrl, this.font); - } - - @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 colors = OptionalNullable.absent(); - - private OptionalNullable faviconUrl = OptionalNullable.absent(); - - private OptionalNullable logoUrl = OptionalNullable.absent(); - - private OptionalNullable font = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateBrandingRequestContent other) { - colors(other.getColors()); - faviconUrl(other.getFaviconUrl()); - logoUrl(other.getLogoUrl()); - font(other.getFont()); - return this; - } - - @JsonSetter(value = "colors", nulls = Nulls.SKIP) - public Builder colors(@Nullable OptionalNullable colors) { - this.colors = colors; - return this; - } - - public Builder colors(UpdateBrandingColors colors) { - this.colors = OptionalNullable.of(colors); - return this; - } - - public Builder colors(Optional colors) { - if (colors.isPresent()) { - this.colors = OptionalNullable.of(colors.get()); - } else { - this.colors = OptionalNullable.absent(); - } - return this; - } - - public Builder colors(com.auth0.client.mgmt.core.Nullable colors) { - if (colors.isNull()) { - this.colors = OptionalNullable.ofNull(); - } else if (colors.isEmpty()) { - this.colors = OptionalNullable.absent(); - } else { - this.colors = OptionalNullable.of(colors.get()); - } - return this; - } - - /** - *

URL for the favicon. Must use HTTPS.

- */ - @JsonSetter(value = "favicon_url", nulls = Nulls.SKIP) - public Builder faviconUrl(@Nullable OptionalNullable faviconUrl) { - this.faviconUrl = faviconUrl; - return this; - } - - public Builder faviconUrl(String faviconUrl) { - this.faviconUrl = OptionalNullable.of(faviconUrl); - return this; - } - - public Builder faviconUrl(Optional faviconUrl) { - if (faviconUrl.isPresent()) { - this.faviconUrl = OptionalNullable.of(faviconUrl.get()); - } else { - this.faviconUrl = OptionalNullable.absent(); - } - return this; - } - - public Builder faviconUrl(com.auth0.client.mgmt.core.Nullable faviconUrl) { - if (faviconUrl.isNull()) { - this.faviconUrl = OptionalNullable.ofNull(); - } else if (faviconUrl.isEmpty()) { - this.faviconUrl = OptionalNullable.absent(); - } else { - this.faviconUrl = OptionalNullable.of(faviconUrl.get()); - } - return this; - } - - /** - *

URL for the logo. Must use HTTPS.

- */ - @JsonSetter(value = "logo_url", nulls = Nulls.SKIP) - public Builder logoUrl(@Nullable OptionalNullable logoUrl) { - this.logoUrl = logoUrl; - return this; - } - - public Builder logoUrl(String logoUrl) { - this.logoUrl = OptionalNullable.of(logoUrl); - return this; - } - - public Builder logoUrl(Optional logoUrl) { - if (logoUrl.isPresent()) { - this.logoUrl = OptionalNullable.of(logoUrl.get()); - } else { - this.logoUrl = OptionalNullable.absent(); - } - return this; - } - - public Builder logoUrl(com.auth0.client.mgmt.core.Nullable logoUrl) { - if (logoUrl.isNull()) { - this.logoUrl = OptionalNullable.ofNull(); - } else if (logoUrl.isEmpty()) { - this.logoUrl = OptionalNullable.absent(); - } else { - this.logoUrl = OptionalNullable.of(logoUrl.get()); - } - return this; - } - - @JsonSetter(value = "font", nulls = Nulls.SKIP) - public Builder font(@Nullable OptionalNullable font) { - this.font = font; - return this; - } - - public Builder font(UpdateBrandingFont font) { - this.font = OptionalNullable.of(font); - return this; - } - - public Builder font(Optional font) { - if (font.isPresent()) { - this.font = OptionalNullable.of(font.get()); - } else { - this.font = OptionalNullable.absent(); - } - return this; - } - - public Builder font(com.auth0.client.mgmt.core.Nullable font) { - if (font.isNull()) { - this.font = OptionalNullable.ofNull(); - } else if (font.isEmpty()) { - this.font = OptionalNullable.absent(); - } else { - this.font = OptionalNullable.of(font.get()); - } - return this; - } - - public UpdateBrandingRequestContent build() { - return new UpdateBrandingRequestContent(colors, faviconUrl, logoUrl, font, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingResponseContent.java deleted file mode 100644 index f1a68fe24..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingResponseContent.java +++ /dev/null @@ -1,181 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateBrandingResponseContent.Builder.class) -public final class UpdateBrandingResponseContent { - private final Optional colors; - - private final Optional faviconUrl; - - private final Optional logoUrl; - - private final Optional font; - - private final Map additionalProperties; - - private UpdateBrandingResponseContent( - Optional colors, - Optional faviconUrl, - Optional logoUrl, - Optional font, - Map additionalProperties) { - this.colors = colors; - this.faviconUrl = faviconUrl; - this.logoUrl = logoUrl; - this.font = font; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("colors") - public Optional getColors() { - return colors; - } - - /** - * @return URL for the favicon. Must use HTTPS. - */ - @JsonProperty("favicon_url") - public Optional getFaviconUrl() { - return faviconUrl; - } - - /** - * @return URL for the logo. Must use HTTPS. - */ - @JsonProperty("logo_url") - public Optional getLogoUrl() { - return logoUrl; - } - - @JsonProperty("font") - public Optional getFont() { - return font; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateBrandingResponseContent && equalTo((UpdateBrandingResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateBrandingResponseContent other) { - return colors.equals(other.colors) - && faviconUrl.equals(other.faviconUrl) - && logoUrl.equals(other.logoUrl) - && font.equals(other.font); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.colors, this.faviconUrl, this.logoUrl, this.font); - } - - @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 colors = Optional.empty(); - - private Optional faviconUrl = Optional.empty(); - - private Optional logoUrl = Optional.empty(); - - private Optional font = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateBrandingResponseContent other) { - colors(other.getColors()); - faviconUrl(other.getFaviconUrl()); - logoUrl(other.getLogoUrl()); - font(other.getFont()); - return this; - } - - @JsonSetter(value = "colors", nulls = Nulls.SKIP) - public Builder colors(Optional colors) { - this.colors = colors; - return this; - } - - public Builder colors(BrandingColors colors) { - this.colors = Optional.ofNullable(colors); - return this; - } - - /** - *

URL for the favicon. Must use HTTPS.

- */ - @JsonSetter(value = "favicon_url", nulls = Nulls.SKIP) - public Builder faviconUrl(Optional faviconUrl) { - this.faviconUrl = faviconUrl; - return this; - } - - public Builder faviconUrl(String faviconUrl) { - this.faviconUrl = Optional.ofNullable(faviconUrl); - return this; - } - - /** - *

URL for the logo. Must use HTTPS.

- */ - @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 = "font", nulls = Nulls.SKIP) - public Builder font(Optional font) { - this.font = font; - return this; - } - - public Builder font(BrandingFont font) { - this.font = Optional.ofNullable(font); - return this; - } - - public UpdateBrandingResponseContent build() { - return new UpdateBrandingResponseContent(colors, faviconUrl, logoUrl, font, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingThemeResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingThemeResponseContent.java deleted file mode 100644 index fe37d6c34..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateBrandingThemeResponseContent.java +++ /dev/null @@ -1,287 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = UpdateBrandingThemeResponseContent.Builder.class) -public final class UpdateBrandingThemeResponseContent { - private final BrandingThemeBorders borders; - - private final BrandingThemeColors colors; - - private final String displayName; - - private final BrandingThemeFonts fonts; - - private final BrandingThemePageBackground pageBackground; - - private final String themeId; - - private final BrandingThemeWidget widget; - - private final Map additionalProperties; - - private UpdateBrandingThemeResponseContent( - BrandingThemeBorders borders, - BrandingThemeColors colors, - String displayName, - BrandingThemeFonts fonts, - BrandingThemePageBackground pageBackground, - String themeId, - BrandingThemeWidget widget, - Map additionalProperties) { - this.borders = borders; - this.colors = colors; - this.displayName = displayName; - this.fonts = fonts; - this.pageBackground = pageBackground; - this.themeId = themeId; - this.widget = widget; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("borders") - public BrandingThemeBorders getBorders() { - return borders; - } - - @JsonProperty("colors") - public BrandingThemeColors getColors() { - return colors; - } - - /** - * @return Display Name - */ - @JsonProperty("displayName") - public String getDisplayName() { - return displayName; - } - - @JsonProperty("fonts") - public BrandingThemeFonts getFonts() { - return fonts; - } - - @JsonProperty("page_background") - public BrandingThemePageBackground getPageBackground() { - return pageBackground; - } - - /** - * @return Theme Id - */ - @JsonProperty("themeId") - public String getThemeId() { - return themeId; - } - - @JsonProperty("widget") - public BrandingThemeWidget getWidget() { - return widget; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateBrandingThemeResponseContent - && equalTo((UpdateBrandingThemeResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateBrandingThemeResponseContent other) { - return borders.equals(other.borders) - && colors.equals(other.colors) - && displayName.equals(other.displayName) - && fonts.equals(other.fonts) - && pageBackground.equals(other.pageBackground) - && themeId.equals(other.themeId) - && widget.equals(other.widget); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.borders, - this.colors, - this.displayName, - this.fonts, - this.pageBackground, - this.themeId, - this.widget); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static BordersStage builder() { - return new Builder(); - } - - public interface BordersStage { - ColorsStage borders(@NotNull BrandingThemeBorders borders); - - Builder from(UpdateBrandingThemeResponseContent other); - } - - public interface ColorsStage { - DisplayNameStage colors(@NotNull BrandingThemeColors colors); - } - - public interface DisplayNameStage { - /** - *

Display Name

- */ - FontsStage displayName(@NotNull String displayName); - } - - public interface FontsStage { - PageBackgroundStage fonts(@NotNull BrandingThemeFonts fonts); - } - - public interface PageBackgroundStage { - ThemeIdStage pageBackground(@NotNull BrandingThemePageBackground pageBackground); - } - - public interface ThemeIdStage { - /** - *

Theme Id

- */ - WidgetStage themeId(@NotNull String themeId); - } - - public interface WidgetStage { - _FinalStage widget(@NotNull BrandingThemeWidget widget); - } - - public interface _FinalStage { - UpdateBrandingThemeResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements BordersStage, - ColorsStage, - DisplayNameStage, - FontsStage, - PageBackgroundStage, - ThemeIdStage, - WidgetStage, - _FinalStage { - private BrandingThemeBorders borders; - - private BrandingThemeColors colors; - - private String displayName; - - private BrandingThemeFonts fonts; - - private BrandingThemePageBackground pageBackground; - - private String themeId; - - private BrandingThemeWidget widget; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateBrandingThemeResponseContent other) { - borders(other.getBorders()); - colors(other.getColors()); - displayName(other.getDisplayName()); - fonts(other.getFonts()); - pageBackground(other.getPageBackground()); - themeId(other.getThemeId()); - widget(other.getWidget()); - return this; - } - - @java.lang.Override - @JsonSetter("borders") - public ColorsStage borders(@NotNull BrandingThemeBorders borders) { - this.borders = Objects.requireNonNull(borders, "borders must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("colors") - public DisplayNameStage colors(@NotNull BrandingThemeColors colors) { - this.colors = Objects.requireNonNull(colors, "colors must not be null"); - return this; - } - - /** - *

Display Name

- *

Display Name

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("displayName") - public FontsStage displayName(@NotNull String displayName) { - this.displayName = Objects.requireNonNull(displayName, "displayName must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("fonts") - public PageBackgroundStage fonts(@NotNull BrandingThemeFonts fonts) { - this.fonts = Objects.requireNonNull(fonts, "fonts must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("page_background") - public ThemeIdStage pageBackground(@NotNull BrandingThemePageBackground pageBackground) { - this.pageBackground = Objects.requireNonNull(pageBackground, "pageBackground must not be null"); - return this; - } - - /** - *

Theme Id

- *

Theme Id

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("themeId") - public WidgetStage themeId(@NotNull String themeId) { - this.themeId = Objects.requireNonNull(themeId, "themeId must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("widget") - public _FinalStage widget(@NotNull BrandingThemeWidget widget) { - this.widget = Objects.requireNonNull(widget, "widget must not be null"); - return this; - } - - @java.lang.Override - public UpdateBrandingThemeResponseContent build() { - return new UpdateBrandingThemeResponseContent( - borders, colors, displayName, fonts, pageBackground, themeId, widget, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBreachedPasswordDetectionSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBreachedPasswordDetectionSettingsResponseContent.java deleted file mode 100644 index 056a6b7d4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateBreachedPasswordDetectionSettingsResponseContent.java +++ /dev/null @@ -1,221 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateBreachedPasswordDetectionSettingsResponseContent.Builder.class) -public final class UpdateBreachedPasswordDetectionSettingsResponseContent { - private final Optional enabled; - - private final Optional> shields; - - private final Optional> adminNotificationFrequency; - - private final Optional method; - - private final Optional stage; - - private final Map additionalProperties; - - private UpdateBreachedPasswordDetectionSettingsResponseContent( - Optional enabled, - Optional> shields, - Optional> adminNotificationFrequency, - Optional method, - Optional stage, - Map additionalProperties) { - this.enabled = enabled; - this.shields = shields; - this.adminNotificationFrequency = adminNotificationFrequency; - this.method = method; - this.stage = stage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether or not breached password detection is active. - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Action to take when a breached password is detected during a login. - * Possible values: <code>block</code>, <code>user_notification</code>, <code>admin_notification</code>. - */ - @JsonProperty("shields") - public Optional> getShields() { - return shields; - } - - /** - * @return When "admin_notification" is enabled, determines how often email notifications are sent. - * Possible values: <code>immediately</code>, <code>daily</code>, <code>weekly</code>, <code>monthly</code>. - */ - @JsonProperty("admin_notification_frequency") - public Optional> getAdminNotificationFrequency() { - return adminNotificationFrequency; - } - - @JsonProperty("method") - public Optional getMethod() { - return method; - } - - @JsonProperty("stage") - public Optional getStage() { - return stage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateBreachedPasswordDetectionSettingsResponseContent - && equalTo((UpdateBreachedPasswordDetectionSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateBreachedPasswordDetectionSettingsResponseContent other) { - return enabled.equals(other.enabled) - && shields.equals(other.shields) - && adminNotificationFrequency.equals(other.adminNotificationFrequency) - && method.equals(other.method) - && stage.equals(other.stage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled, this.shields, this.adminNotificationFrequency, this.method, this.stage); - } - - @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 enabled = Optional.empty(); - - private Optional> shields = Optional.empty(); - - private Optional> adminNotificationFrequency = - Optional.empty(); - - private Optional method = Optional.empty(); - - private Optional stage = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateBreachedPasswordDetectionSettingsResponseContent other) { - enabled(other.getEnabled()); - shields(other.getShields()); - adminNotificationFrequency(other.getAdminNotificationFrequency()); - method(other.getMethod()); - stage(other.getStage()); - return this; - } - - /** - *

Whether or not breached password detection is active.

- */ - @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; - } - - /** - *

Action to take when a breached password is detected during a login. - * Possible values: <code>block</code>, <code>user_notification</code>, <code>admin_notification</code>.

- */ - @JsonSetter(value = "shields", nulls = Nulls.SKIP) - public Builder shields(Optional> shields) { - this.shields = shields; - return this; - } - - public Builder shields(List shields) { - this.shields = Optional.ofNullable(shields); - return this; - } - - /** - *

When "admin_notification" is enabled, determines how often email notifications are sent. - * Possible values: <code>immediately</code>, <code>daily</code>, <code>weekly</code>, <code>monthly</code>.

- */ - @JsonSetter(value = "admin_notification_frequency", nulls = Nulls.SKIP) - public Builder adminNotificationFrequency( - Optional> adminNotificationFrequency) { - this.adminNotificationFrequency = adminNotificationFrequency; - return this; - } - - public Builder adminNotificationFrequency( - List adminNotificationFrequency) { - this.adminNotificationFrequency = Optional.ofNullable(adminNotificationFrequency); - return this; - } - - @JsonSetter(value = "method", nulls = Nulls.SKIP) - public Builder method(Optional method) { - this.method = method; - return this; - } - - public Builder method(BreachedPasswordDetectionMethodEnum method) { - this.method = Optional.ofNullable(method); - return this; - } - - @JsonSetter(value = "stage", nulls = Nulls.SKIP) - public Builder stage(Optional stage) { - this.stage = stage; - return this; - } - - public Builder stage(BreachedPasswordDetectionStage stage) { - this.stage = Optional.ofNullable(stage); - return this; - } - - public UpdateBreachedPasswordDetectionSettingsResponseContent build() { - return new UpdateBreachedPasswordDetectionSettingsResponseContent( - enabled, shields, adminNotificationFrequency, method, stage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateBruteForceSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateBruteForceSettingsResponseContent.java deleted file mode 100644 index 52ead5eee..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateBruteForceSettingsResponseContent.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateBruteForceSettingsResponseContent.Builder.class) -public final class UpdateBruteForceSettingsResponseContent { - private final Optional enabled; - - private final Optional> shields; - - private final Optional> allowlist; - - private final Optional mode; - - private final Optional maxAttempts; - - private final Map additionalProperties; - - private UpdateBruteForceSettingsResponseContent( - Optional enabled, - Optional> shields, - Optional> allowlist, - Optional mode, - Optional maxAttempts, - Map additionalProperties) { - this.enabled = enabled; - this.shields = shields; - this.allowlist = allowlist; - this.mode = mode; - this.maxAttempts = maxAttempts; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether or not brute force attack protections are active. - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Action to take when a brute force protection threshold is violated. - * Possible values: <code>block</code>, <code>user_notification</code>. - */ - @JsonProperty("shields") - public Optional> getShields() { - return shields; - } - - /** - * @return List of trusted IP addresses that will not have attack protection enforced against them. - */ - @JsonProperty("allowlist") - public Optional> getAllowlist() { - return allowlist; - } - - @JsonProperty("mode") - public Optional getMode() { - return mode; - } - - /** - * @return Maximum number of unsuccessful attempts. - */ - @JsonProperty("max_attempts") - public Optional getMaxAttempts() { - return maxAttempts; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateBruteForceSettingsResponseContent - && equalTo((UpdateBruteForceSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateBruteForceSettingsResponseContent other) { - return enabled.equals(other.enabled) - && shields.equals(other.shields) - && allowlist.equals(other.allowlist) - && mode.equals(other.mode) - && maxAttempts.equals(other.maxAttempts); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled, this.shields, this.allowlist, this.mode, this.maxAttempts); - } - - @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 enabled = Optional.empty(); - - private Optional> shields = Optional.empty(); - - private Optional> allowlist = Optional.empty(); - - private Optional mode = Optional.empty(); - - private Optional maxAttempts = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateBruteForceSettingsResponseContent other) { - enabled(other.getEnabled()); - shields(other.getShields()); - allowlist(other.getAllowlist()); - mode(other.getMode()); - maxAttempts(other.getMaxAttempts()); - return this; - } - - /** - *

Whether or not brute force attack protections are active.

- */ - @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; - } - - /** - *

Action to take when a brute force protection threshold is violated. - * Possible values: <code>block</code>, <code>user_notification</code>.

- */ - @JsonSetter(value = "shields", nulls = Nulls.SKIP) - public Builder shields(Optional> shields) { - this.shields = shields; - return this; - } - - public Builder shields(List shields) { - this.shields = Optional.ofNullable(shields); - return this; - } - - /** - *

List of trusted IP addresses that will not have attack protection enforced against them.

- */ - @JsonSetter(value = "allowlist", nulls = Nulls.SKIP) - public Builder allowlist(Optional> allowlist) { - this.allowlist = allowlist; - return this; - } - - public Builder allowlist(List allowlist) { - this.allowlist = Optional.ofNullable(allowlist); - return this; - } - - @JsonSetter(value = "mode", nulls = Nulls.SKIP) - public Builder mode(Optional mode) { - this.mode = mode; - return this; - } - - public Builder mode(BruteForceProtectionModeEnum mode) { - this.mode = Optional.ofNullable(mode); - return this; - } - - /** - *

Maximum number of unsuccessful attempts.

- */ - @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; - } - - public UpdateBruteForceSettingsResponseContent build() { - return new UpdateBruteForceSettingsResponseContent( - enabled, shields, allowlist, mode, maxAttempts, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateClientGrantRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateClientGrantRequestContent.java deleted file mode 100644 index f0bd62b3a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateClientGrantRequestContent.java +++ /dev/null @@ -1,325 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.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 = UpdateClientGrantRequestContent.Builder.class) -public final class UpdateClientGrantRequestContent { - private final Optional> scope; - - private final OptionalNullable organizationUsage; - - private final OptionalNullable allowAnyOrganization; - - private final Optional> authorizationDetailsTypes; - - private final OptionalNullable allowAllScopes; - - private final Map additionalProperties; - - private UpdateClientGrantRequestContent( - Optional> scope, - OptionalNullable organizationUsage, - OptionalNullable allowAnyOrganization, - Optional> authorizationDetailsTypes, - OptionalNullable allowAllScopes, - Map additionalProperties) { - this.scope = scope; - this.organizationUsage = organizationUsage; - this.allowAnyOrganization = allowAnyOrganization; - this.authorizationDetailsTypes = authorizationDetailsTypes; - this.allowAllScopes = allowAllScopes; - this.additionalProperties = additionalProperties; - } - - /** - * @return Scopes allowed for this client grant. - */ - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("organization_usage") - public OptionalNullable getOrganizationUsage() { - if (organizationUsage == null) { - return OptionalNullable.absent(); - } - return organizationUsage; - } - - /** - * @return Controls allowing any organization to be used with this grant - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("allow_any_organization") - public OptionalNullable getAllowAnyOrganization() { - if (allowAnyOrganization == null) { - return OptionalNullable.absent(); - } - return allowAnyOrganization; - } - - /** - * @return Types of authorization_details allowed for this client grant. - */ - @JsonProperty("authorization_details_types") - public Optional> getAuthorizationDetailsTypes() { - return authorizationDetailsTypes; - } - - /** - * @return If enabled, all scopes configured on the resource server are allowed for this grant. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("allow_all_scopes") - public OptionalNullable getAllowAllScopes() { - if (allowAllScopes == null) { - return OptionalNullable.absent(); - } - return allowAllScopes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("organization_usage") - private OptionalNullable _getOrganizationUsage() { - return organizationUsage; - } - - @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("allow_all_scopes") - private OptionalNullable _getAllowAllScopes() { - return allowAllScopes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateClientGrantRequestContent && equalTo((UpdateClientGrantRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateClientGrantRequestContent other) { - return scope.equals(other.scope) - && organizationUsage.equals(other.organizationUsage) - && allowAnyOrganization.equals(other.allowAnyOrganization) - && authorizationDetailsTypes.equals(other.authorizationDetailsTypes) - && allowAllScopes.equals(other.allowAllScopes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.scope, - this.organizationUsage, - this.allowAnyOrganization, - this.authorizationDetailsTypes, - this.allowAllScopes); - } - - @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> scope = Optional.empty(); - - private OptionalNullable organizationUsage = - OptionalNullable.absent(); - - private OptionalNullable allowAnyOrganization = OptionalNullable.absent(); - - private Optional> authorizationDetailsTypes = Optional.empty(); - - private OptionalNullable allowAllScopes = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateClientGrantRequestContent other) { - scope(other.getScope()); - organizationUsage(other.getOrganizationUsage()); - allowAnyOrganization(other.getAllowAnyOrganization()); - authorizationDetailsTypes(other.getAuthorizationDetailsTypes()); - allowAllScopes(other.getAllowAllScopes()); - return this; - } - - /** - *

Scopes allowed for this client grant.

- */ - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "organization_usage", nulls = Nulls.SKIP) - public Builder organizationUsage( - @Nullable OptionalNullable organizationUsage) { - this.organizationUsage = organizationUsage; - return this; - } - - public Builder organizationUsage(ClientGrantOrganizationNullableUsageEnum organizationUsage) { - this.organizationUsage = OptionalNullable.of(organizationUsage); - return this; - } - - public Builder organizationUsage(Optional organizationUsage) { - if (organizationUsage.isPresent()) { - this.organizationUsage = OptionalNullable.of(organizationUsage.get()); - } else { - this.organizationUsage = OptionalNullable.absent(); - } - return this; - } - - public Builder organizationUsage( - com.auth0.client.mgmt.core.Nullable organizationUsage) { - if (organizationUsage.isNull()) { - this.organizationUsage = OptionalNullable.ofNull(); - } else if (organizationUsage.isEmpty()) { - this.organizationUsage = OptionalNullable.absent(); - } else { - this.organizationUsage = OptionalNullable.of(organizationUsage.get()); - } - return this; - } - - /** - *

Controls allowing any organization to be used with this grant

- */ - @JsonSetter(value = "allow_any_organization", nulls = Nulls.SKIP) - public Builder allowAnyOrganization(@Nullable OptionalNullable allowAnyOrganization) { - this.allowAnyOrganization = allowAnyOrganization; - return this; - } - - public Builder allowAnyOrganization(Boolean allowAnyOrganization) { - this.allowAnyOrganization = OptionalNullable.of(allowAnyOrganization); - return this; - } - - public Builder allowAnyOrganization(Optional allowAnyOrganization) { - if (allowAnyOrganization.isPresent()) { - this.allowAnyOrganization = OptionalNullable.of(allowAnyOrganization.get()); - } else { - this.allowAnyOrganization = OptionalNullable.absent(); - } - return this; - } - - public Builder allowAnyOrganization(com.auth0.client.mgmt.core.Nullable allowAnyOrganization) { - if (allowAnyOrganization.isNull()) { - this.allowAnyOrganization = OptionalNullable.ofNull(); - } else if (allowAnyOrganization.isEmpty()) { - this.allowAnyOrganization = OptionalNullable.absent(); - } else { - this.allowAnyOrganization = OptionalNullable.of(allowAnyOrganization.get()); - } - return this; - } - - /** - *

Types of authorization_details allowed for this client grant.

- */ - @JsonSetter(value = "authorization_details_types", nulls = Nulls.SKIP) - public Builder authorizationDetailsTypes(Optional> authorizationDetailsTypes) { - this.authorizationDetailsTypes = authorizationDetailsTypes; - return this; - } - - public Builder authorizationDetailsTypes(List authorizationDetailsTypes) { - this.authorizationDetailsTypes = Optional.ofNullable(authorizationDetailsTypes); - return this; - } - - /** - *

If enabled, all scopes configured on the resource server are allowed for this grant.

- */ - @JsonSetter(value = "allow_all_scopes", nulls = Nulls.SKIP) - public Builder allowAllScopes(@Nullable OptionalNullable allowAllScopes) { - this.allowAllScopes = allowAllScopes; - return this; - } - - public Builder allowAllScopes(Boolean allowAllScopes) { - this.allowAllScopes = OptionalNullable.of(allowAllScopes); - return this; - } - - public Builder allowAllScopes(Optional allowAllScopes) { - if (allowAllScopes.isPresent()) { - this.allowAllScopes = OptionalNullable.of(allowAllScopes.get()); - } else { - this.allowAllScopes = OptionalNullable.absent(); - } - return this; - } - - public Builder allowAllScopes(com.auth0.client.mgmt.core.Nullable allowAllScopes) { - if (allowAllScopes.isNull()) { - this.allowAllScopes = OptionalNullable.ofNull(); - } else if (allowAllScopes.isEmpty()) { - this.allowAllScopes = OptionalNullable.absent(); - } else { - this.allowAllScopes = OptionalNullable.of(allowAllScopes.get()); - } - return this; - } - - public UpdateClientGrantRequestContent build() { - return new UpdateClientGrantRequestContent( - scope, - organizationUsage, - allowAnyOrganization, - authorizationDetailsTypes, - allowAllScopes, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateClientGrantResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateClientGrantResponseContent.java deleted file mode 100644 index 41b38a2ce..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateClientGrantResponseContent.java +++ /dev/null @@ -1,383 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateClientGrantResponseContent.Builder.class) -public final class UpdateClientGrantResponseContent { - private final Optional id; - - private final Optional clientId; - - private final Optional audience; - - private final Optional> scope; - - private final Optional organizationUsage; - - private final Optional allowAnyOrganization; - - private final Optional isSystem; - - private final Optional subjectType; - - private final Optional> authorizationDetailsTypes; - - private final Optional allowAllScopes; - - private final Map additionalProperties; - - private UpdateClientGrantResponseContent( - Optional id, - Optional clientId, - Optional audience, - Optional> scope, - Optional organizationUsage, - Optional allowAnyOrganization, - Optional isSystem, - Optional subjectType, - Optional> authorizationDetailsTypes, - Optional allowAllScopes, - Map additionalProperties) { - this.id = id; - this.clientId = clientId; - this.audience = audience; - this.scope = scope; - this.organizationUsage = organizationUsage; - this.allowAnyOrganization = allowAnyOrganization; - this.isSystem = isSystem; - this.subjectType = subjectType; - this.authorizationDetailsTypes = authorizationDetailsTypes; - this.allowAllScopes = allowAllScopes; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the client grant. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return ID of the client. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @return The audience (API identifier) of this client grant. - */ - @JsonProperty("audience") - public Optional getAudience() { - return audience; - } - - /** - * @return Scopes allowed for this client grant. - */ - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @JsonProperty("organization_usage") - public Optional getOrganizationUsage() { - return organizationUsage; - } - - /** - * @return If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations. - */ - @JsonProperty("allow_any_organization") - public Optional getAllowAnyOrganization() { - return allowAnyOrganization; - } - - /** - * @return If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly. - */ - @JsonProperty("is_system") - public Optional getIsSystem() { - return isSystem; - } - - @JsonProperty("subject_type") - public Optional getSubjectType() { - return subjectType; - } - - /** - * @return Types of authorization_details allowed for this client grant. - */ - @JsonProperty("authorization_details_types") - public Optional> getAuthorizationDetailsTypes() { - return authorizationDetailsTypes; - } - - /** - * @return If enabled, all scopes configured on the resource server are allowed for this grant. - */ - @JsonProperty("allow_all_scopes") - public Optional getAllowAllScopes() { - return allowAllScopes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateClientGrantResponseContent && equalTo((UpdateClientGrantResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateClientGrantResponseContent other) { - return id.equals(other.id) - && clientId.equals(other.clientId) - && audience.equals(other.audience) - && scope.equals(other.scope) - && organizationUsage.equals(other.organizationUsage) - && allowAnyOrganization.equals(other.allowAnyOrganization) - && isSystem.equals(other.isSystem) - && subjectType.equals(other.subjectType) - && authorizationDetailsTypes.equals(other.authorizationDetailsTypes) - && allowAllScopes.equals(other.allowAllScopes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.clientId, - this.audience, - this.scope, - this.organizationUsage, - this.allowAnyOrganization, - this.isSystem, - this.subjectType, - this.authorizationDetailsTypes, - this.allowAllScopes); - } - - @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 clientId = Optional.empty(); - - private Optional audience = Optional.empty(); - - private Optional> scope = Optional.empty(); - - private Optional organizationUsage = Optional.empty(); - - private Optional allowAnyOrganization = Optional.empty(); - - private Optional isSystem = Optional.empty(); - - private Optional subjectType = Optional.empty(); - - private Optional> authorizationDetailsTypes = Optional.empty(); - - private Optional allowAllScopes = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateClientGrantResponseContent other) { - id(other.getId()); - clientId(other.getClientId()); - audience(other.getAudience()); - scope(other.getScope()); - organizationUsage(other.getOrganizationUsage()); - allowAnyOrganization(other.getAllowAnyOrganization()); - isSystem(other.getIsSystem()); - subjectType(other.getSubjectType()); - authorizationDetailsTypes(other.getAuthorizationDetailsTypes()); - allowAllScopes(other.getAllowAllScopes()); - return this; - } - - /** - *

ID of the client grant.

- */ - @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; - } - - /** - *

ID of the 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 audience (API identifier) of this client grant.

- */ - @JsonSetter(value = "audience", nulls = Nulls.SKIP) - public Builder audience(Optional audience) { - this.audience = audience; - return this; - } - - public Builder audience(String audience) { - this.audience = Optional.ofNullable(audience); - return this; - } - - /** - *

Scopes allowed for this client grant.

- */ - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - @JsonSetter(value = "organization_usage", nulls = Nulls.SKIP) - public Builder organizationUsage(Optional organizationUsage) { - this.organizationUsage = organizationUsage; - return this; - } - - public Builder organizationUsage(ClientGrantOrganizationUsageEnum organizationUsage) { - this.organizationUsage = Optional.ofNullable(organizationUsage); - return this; - } - - /** - *

If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.

- */ - @JsonSetter(value = "allow_any_organization", nulls = Nulls.SKIP) - public Builder allowAnyOrganization(Optional allowAnyOrganization) { - this.allowAnyOrganization = allowAnyOrganization; - return this; - } - - public Builder allowAnyOrganization(Boolean allowAnyOrganization) { - this.allowAnyOrganization = Optional.ofNullable(allowAnyOrganization); - return this; - } - - /** - *

If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly.

- */ - @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; - } - - @JsonSetter(value = "subject_type", nulls = Nulls.SKIP) - public Builder subjectType(Optional subjectType) { - this.subjectType = subjectType; - return this; - } - - public Builder subjectType(ClientGrantSubjectTypeEnum subjectType) { - this.subjectType = Optional.ofNullable(subjectType); - return this; - } - - /** - *

Types of authorization_details allowed for this client grant.

- */ - @JsonSetter(value = "authorization_details_types", nulls = Nulls.SKIP) - public Builder authorizationDetailsTypes(Optional> authorizationDetailsTypes) { - this.authorizationDetailsTypes = authorizationDetailsTypes; - return this; - } - - public Builder authorizationDetailsTypes(List authorizationDetailsTypes) { - this.authorizationDetailsTypes = Optional.ofNullable(authorizationDetailsTypes); - return this; - } - - /** - *

If enabled, all scopes configured on the resource server are allowed for this grant.

- */ - @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; - } - - public UpdateClientGrantResponseContent build() { - return new UpdateClientGrantResponseContent( - id, - clientId, - audience, - scope, - organizationUsage, - allowAnyOrganization, - isSystem, - subjectType, - authorizationDetailsTypes, - allowAllScopes, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java deleted file mode 100644 index 92128e56e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateClientRequestContent.java +++ /dev/null @@ -1,2026 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateClientRequestContent.Builder.class) -public final class UpdateClientRequestContent { - private final Optional name; - - private final Optional description; - - private final Optional clientSecret; - - private final Optional logoUri; - - private final Optional> callbacks; - - private final Optional oidcLogout; - - private final Optional oidcBackchannelLogout; - - private final OptionalNullable sessionTransfer; - - private final Optional> allowedOrigins; - - private final Optional> webOrigins; - - private final Optional> grantTypes; - - private final Optional> clientAliases; - - private final Optional> allowedClients; - - private final Optional> allowedLogoutUrls; - - private final Optional jwtConfiguration; - - private final OptionalNullable encryptionKey; - - private final Optional sso; - - private final Optional crossOriginAuthentication; - - private final OptionalNullable crossOriginLoc; - - private final Optional ssoDisabled; - - private final Optional customLoginPageOn; - - private final OptionalNullable tokenEndpointAuthMethod; - - private final Optional isTokenEndpointIpHeaderTrusted; - - private final Optional appType; - - private final Optional isFirstParty; - - private final Optional oidcConformant; - - private final Optional customLoginPage; - - private final Optional customLoginPagePreview; - - private final OptionalNullable tokenQuota; - - private final Optional formTemplate; - - private final Optional addons; - - private final Optional> clientMetadata; - - private final Optional mobile; - - private final Optional initiateLoginUri; - - private final Optional nativeSocialLogin; - - private final OptionalNullable refreshToken; - - private final OptionalNullable defaultOrganization; - - private final OptionalNullable organizationUsage; - - private final OptionalNullable organizationRequireBehavior; - - private final Optional> organizationDiscoveryMethods; - - private final OptionalNullable clientAuthenticationMethods; - - private final Optional requirePushedAuthorizationRequests; - - private final Optional requireProofOfPossession; - - private final Optional signedRequestObject; - - private final OptionalNullable complianceLevel; - - private final OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt; - - private final OptionalNullable tokenExchange; - - private final OptionalNullable parRequestExpiry; - - private final OptionalNullable expressConfiguration; - - private final Optional> asyncApprovalNotificationChannels; - - private final Map additionalProperties; - - private UpdateClientRequestContent( - Optional name, - Optional description, - Optional clientSecret, - Optional logoUri, - Optional> callbacks, - Optional oidcLogout, - Optional oidcBackchannelLogout, - OptionalNullable sessionTransfer, - Optional> allowedOrigins, - Optional> webOrigins, - Optional> grantTypes, - Optional> clientAliases, - Optional> allowedClients, - Optional> allowedLogoutUrls, - Optional jwtConfiguration, - OptionalNullable encryptionKey, - Optional sso, - Optional crossOriginAuthentication, - OptionalNullable crossOriginLoc, - Optional ssoDisabled, - Optional customLoginPageOn, - OptionalNullable tokenEndpointAuthMethod, - Optional isTokenEndpointIpHeaderTrusted, - Optional appType, - Optional isFirstParty, - Optional oidcConformant, - Optional customLoginPage, - Optional customLoginPagePreview, - OptionalNullable tokenQuota, - Optional formTemplate, - Optional addons, - Optional> clientMetadata, - Optional mobile, - Optional initiateLoginUri, - Optional nativeSocialLogin, - OptionalNullable refreshToken, - OptionalNullable defaultOrganization, - OptionalNullable organizationUsage, - OptionalNullable organizationRequireBehavior, - Optional> organizationDiscoveryMethods, - OptionalNullable clientAuthenticationMethods, - Optional requirePushedAuthorizationRequests, - Optional requireProofOfPossession, - Optional signedRequestObject, - OptionalNullable complianceLevel, - OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt, - OptionalNullable tokenExchange, - OptionalNullable parRequestExpiry, - OptionalNullable expressConfiguration, - Optional> asyncApprovalNotificationChannels, - Map additionalProperties) { - this.name = name; - this.description = description; - this.clientSecret = clientSecret; - this.logoUri = logoUri; - this.callbacks = callbacks; - this.oidcLogout = oidcLogout; - this.oidcBackchannelLogout = oidcBackchannelLogout; - this.sessionTransfer = sessionTransfer; - this.allowedOrigins = allowedOrigins; - this.webOrigins = webOrigins; - this.grantTypes = grantTypes; - this.clientAliases = clientAliases; - this.allowedClients = allowedClients; - this.allowedLogoutUrls = allowedLogoutUrls; - this.jwtConfiguration = jwtConfiguration; - this.encryptionKey = encryptionKey; - this.sso = sso; - this.crossOriginAuthentication = crossOriginAuthentication; - this.crossOriginLoc = crossOriginLoc; - this.ssoDisabled = ssoDisabled; - this.customLoginPageOn = customLoginPageOn; - this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; - this.isTokenEndpointIpHeaderTrusted = isTokenEndpointIpHeaderTrusted; - this.appType = appType; - this.isFirstParty = isFirstParty; - this.oidcConformant = oidcConformant; - this.customLoginPage = customLoginPage; - this.customLoginPagePreview = customLoginPagePreview; - this.tokenQuota = tokenQuota; - this.formTemplate = formTemplate; - this.addons = addons; - this.clientMetadata = clientMetadata; - this.mobile = mobile; - this.initiateLoginUri = initiateLoginUri; - this.nativeSocialLogin = nativeSocialLogin; - 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.complianceLevel = complianceLevel; - this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; - this.tokenExchange = tokenExchange; - this.parRequestExpiry = parRequestExpiry; - this.expressConfiguration = expressConfiguration; - this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the client. Must contain at least one character. Does not allow '<' or '>'. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Free text description of the purpose of the Client. (Max character length: <code>140</code>) - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - /** - * @return The secret used to sign tokens for the client - */ - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - /** - * @return The URL of the client logo (recommended size: 150x150) - */ - @JsonProperty("logo_uri") - public Optional getLogoUri() { - return logoUri; - } - - /** - * @return A set of URLs that are valid to call back from Auth0 when authenticating users - */ - @JsonProperty("callbacks") - public Optional> getCallbacks() { - return callbacks; - } - - @JsonProperty("oidc_logout") - public Optional getOidcLogout() { - return oidcLogout; - } - - @JsonProperty("oidc_backchannel_logout") - public Optional getOidcBackchannelLogout() { - return oidcBackchannelLogout; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_transfer") - public OptionalNullable getSessionTransfer() { - if (sessionTransfer == null) { - return OptionalNullable.absent(); - } - return sessionTransfer; - } - - /** - * @return A set of URLs that represents valid origins for CORS - */ - @JsonProperty("allowed_origins") - public Optional> getAllowedOrigins() { - return allowedOrigins; - } - - /** - * @return A set of URLs that represents valid web origins for use with web message response mode - */ - @JsonProperty("web_origins") - public Optional> getWebOrigins() { - return webOrigins; - } - - /** - * @return A set of grant types that the client is authorized to use. 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; - } - - /** - * @return List of audiences for SAML protocol - */ - @JsonProperty("client_aliases") - public Optional> getClientAliases() { - return clientAliases; - } - - /** - * @return Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients - */ - @JsonProperty("allowed_clients") - public Optional> getAllowedClients() { - return allowedClients; - } - - /** - * @return URLs that are valid to redirect to after logout from Auth0. - */ - @JsonProperty("allowed_logout_urls") - public Optional> getAllowedLogoutUrls() { - return allowedLogoutUrls; - } - - @JsonProperty("jwt_configuration") - public Optional getJwtConfiguration() { - return jwtConfiguration; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("encryption_key") - public OptionalNullable getEncryptionKey() { - if (encryptionKey == null) { - return OptionalNullable.absent(); - } - return encryptionKey; - } - - /** - * @return <code>true</code> to use Auth0 instead of the IdP to do Single Sign On, <code>false</code> otherwise (default: <code>false</code>) - */ - @JsonProperty("sso") - public Optional getSso() { - return sso; - } - - /** - * @return <code>true</code> if this client can be used to make cross-origin authentication requests, <code>false</code> otherwise if cross origin is disabled - */ - @JsonProperty("cross_origin_authentication") - public Optional getCrossOriginAuthentication() { - return crossOriginAuthentication; - } - - /** - * @return URL for 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. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("cross_origin_loc") - public OptionalNullable getCrossOriginLoc() { - if (crossOriginLoc == null) { - return OptionalNullable.absent(); - } - return crossOriginLoc; - } - - /** - * @return <code>true</code> to disable Single Sign On, <code>false</code> otherwise (default: <code>false</code>) - */ - @JsonProperty("sso_disabled") - public Optional getSsoDisabled() { - return ssoDisabled; - } - - /** - * @return <code>true</code> if the custom login page is to be used, <code>false</code> otherwise. - */ - @JsonProperty("custom_login_page_on") - public Optional getCustomLoginPageOn() { - return customLoginPageOn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("token_endpoint_auth_method") - public OptionalNullable getTokenEndpointAuthMethod() { - if (tokenEndpointAuthMethod == null) { - return OptionalNullable.absent(); - } - 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("app_type") - public Optional getAppType() { - return appType; - } - - /** - * @return Whether this client a first party client or not - */ - @JsonProperty("is_first_party") - public Optional getIsFirstParty() { - return isFirstParty; - } - - /** - * @return Whether this client will conform to strict OIDC specifications - */ - @JsonProperty("oidc_conformant") - public Optional getOidcConformant() { - return oidcConformant; - } - - /** - * @return The content (HTML, CSS, JS) of the custom login page - */ - @JsonProperty("custom_login_page") - public Optional getCustomLoginPage() { - return customLoginPage; - } - - @JsonProperty("custom_login_page_preview") - public Optional getCustomLoginPagePreview() { - return customLoginPagePreview; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("token_quota") - public OptionalNullable getTokenQuota() { - if (tokenQuota == null) { - return OptionalNullable.absent(); - } - return tokenQuota; - } - - /** - * @return Form template for WS-Federation protocol - */ - @JsonProperty("form_template") - public Optional getFormTemplate() { - return formTemplate; - } - - @JsonProperty("addons") - public Optional getAddons() { - return addons; - } - - @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; - } - - @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; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("organization_usage") - public OptionalNullable getOrganizationUsage() { - if (organizationUsage == null) { - return OptionalNullable.absent(); - } - return organizationUsage; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("organization_require_behavior") - public OptionalNullable getOrganizationRequireBehavior() { - if (organizationRequireBehavior == null) { - return OptionalNullable.absent(); - } - 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; - } - - @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. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("skip_non_verifiable_callback_uri_confirmation_prompt") - public OptionalNullable getSkipNonVerifiableCallbackUriConfirmationPrompt() { - if (skipNonVerifiableCallbackUriConfirmationPrompt == null) { - return OptionalNullable.absent(); - } - return skipNonVerifiableCallbackUriConfirmationPrompt; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("token_exchange") - public OptionalNullable getTokenExchange() { - if (tokenExchange == null) { - return OptionalNullable.absent(); - } - 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; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("express_configuration") - public OptionalNullable getExpressConfiguration() { - if (expressConfiguration == null) { - return OptionalNullable.absent(); - } - return expressConfiguration; - } - - @JsonProperty("async_approval_notification_channels") - public Optional> getAsyncApprovalNotificationChannels() { - return asyncApprovalNotificationChannels; - } - - @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("encryption_key") - private OptionalNullable _getEncryptionKey() { - return encryptionKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("cross_origin_loc") - private OptionalNullable _getCrossOriginLoc() { - return crossOriginLoc; - } - - @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_quota") - private OptionalNullable _getTokenQuota() { - return tokenQuota; - } - - @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("organization_usage") - private OptionalNullable _getOrganizationUsage() { - return organizationUsage; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("organization_require_behavior") - private OptionalNullable _getOrganizationRequireBehavior() { - return organizationRequireBehavior; - } - - @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("skip_non_verifiable_callback_uri_confirmation_prompt") - private OptionalNullable _getSkipNonVerifiableCallbackUriConfirmationPrompt() { - return skipNonVerifiableCallbackUriConfirmationPrompt; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("token_exchange") - private OptionalNullable _getTokenExchange() { - return tokenExchange; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("par_request_expiry") - private OptionalNullable _getParRequestExpiry() { - return parRequestExpiry; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("express_configuration") - private OptionalNullable _getExpressConfiguration() { - return expressConfiguration; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateClientRequestContent && equalTo((UpdateClientRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateClientRequestContent other) { - return name.equals(other.name) - && description.equals(other.description) - && clientSecret.equals(other.clientSecret) - && logoUri.equals(other.logoUri) - && callbacks.equals(other.callbacks) - && oidcLogout.equals(other.oidcLogout) - && oidcBackchannelLogout.equals(other.oidcBackchannelLogout) - && sessionTransfer.equals(other.sessionTransfer) - && allowedOrigins.equals(other.allowedOrigins) - && webOrigins.equals(other.webOrigins) - && grantTypes.equals(other.grantTypes) - && clientAliases.equals(other.clientAliases) - && allowedClients.equals(other.allowedClients) - && allowedLogoutUrls.equals(other.allowedLogoutUrls) - && jwtConfiguration.equals(other.jwtConfiguration) - && encryptionKey.equals(other.encryptionKey) - && sso.equals(other.sso) - && crossOriginAuthentication.equals(other.crossOriginAuthentication) - && crossOriginLoc.equals(other.crossOriginLoc) - && ssoDisabled.equals(other.ssoDisabled) - && customLoginPageOn.equals(other.customLoginPageOn) - && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) - && isTokenEndpointIpHeaderTrusted.equals(other.isTokenEndpointIpHeaderTrusted) - && appType.equals(other.appType) - && isFirstParty.equals(other.isFirstParty) - && oidcConformant.equals(other.oidcConformant) - && customLoginPage.equals(other.customLoginPage) - && customLoginPagePreview.equals(other.customLoginPagePreview) - && tokenQuota.equals(other.tokenQuota) - && formTemplate.equals(other.formTemplate) - && addons.equals(other.addons) - && clientMetadata.equals(other.clientMetadata) - && mobile.equals(other.mobile) - && initiateLoginUri.equals(other.initiateLoginUri) - && nativeSocialLogin.equals(other.nativeSocialLogin) - && 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) - && complianceLevel.equals(other.complianceLevel) - && skipNonVerifiableCallbackUriConfirmationPrompt.equals( - other.skipNonVerifiableCallbackUriConfirmationPrompt) - && tokenExchange.equals(other.tokenExchange) - && parRequestExpiry.equals(other.parRequestExpiry) - && expressConfiguration.equals(other.expressConfiguration) - && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.description, - this.clientSecret, - this.logoUri, - this.callbacks, - this.oidcLogout, - this.oidcBackchannelLogout, - this.sessionTransfer, - this.allowedOrigins, - this.webOrigins, - this.grantTypes, - this.clientAliases, - this.allowedClients, - this.allowedLogoutUrls, - this.jwtConfiguration, - this.encryptionKey, - this.sso, - this.crossOriginAuthentication, - this.crossOriginLoc, - this.ssoDisabled, - this.customLoginPageOn, - this.tokenEndpointAuthMethod, - this.isTokenEndpointIpHeaderTrusted, - this.appType, - this.isFirstParty, - this.oidcConformant, - this.customLoginPage, - this.customLoginPagePreview, - this.tokenQuota, - this.formTemplate, - this.addons, - this.clientMetadata, - this.mobile, - this.initiateLoginUri, - this.nativeSocialLogin, - this.refreshToken, - this.defaultOrganization, - this.organizationUsage, - this.organizationRequireBehavior, - this.organizationDiscoveryMethods, - this.clientAuthenticationMethods, - this.requirePushedAuthorizationRequests, - this.requireProofOfPossession, - this.signedRequestObject, - this.complianceLevel, - this.skipNonVerifiableCallbackUriConfirmationPrompt, - this.tokenExchange, - this.parRequestExpiry, - this.expressConfiguration, - this.asyncApprovalNotificationChannels); - } - - @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 description = Optional.empty(); - - private Optional clientSecret = Optional.empty(); - - private Optional logoUri = Optional.empty(); - - private Optional> callbacks = Optional.empty(); - - private Optional oidcLogout = Optional.empty(); - - private Optional oidcBackchannelLogout = Optional.empty(); - - private OptionalNullable sessionTransfer = OptionalNullable.absent(); - - private Optional> allowedOrigins = Optional.empty(); - - private Optional> webOrigins = Optional.empty(); - - private Optional> grantTypes = Optional.empty(); - - private Optional> clientAliases = Optional.empty(); - - private Optional> allowedClients = Optional.empty(); - - private Optional> allowedLogoutUrls = Optional.empty(); - - private Optional jwtConfiguration = Optional.empty(); - - private OptionalNullable encryptionKey = OptionalNullable.absent(); - - private Optional sso = Optional.empty(); - - private Optional crossOriginAuthentication = Optional.empty(); - - private OptionalNullable crossOriginLoc = OptionalNullable.absent(); - - private Optional ssoDisabled = Optional.empty(); - - private Optional customLoginPageOn = Optional.empty(); - - private OptionalNullable tokenEndpointAuthMethod = - OptionalNullable.absent(); - - private Optional isTokenEndpointIpHeaderTrusted = Optional.empty(); - - private Optional appType = Optional.empty(); - - private Optional isFirstParty = Optional.empty(); - - private Optional oidcConformant = Optional.empty(); - - private Optional customLoginPage = Optional.empty(); - - private Optional customLoginPagePreview = Optional.empty(); - - private OptionalNullable tokenQuota = OptionalNullable.absent(); - - private Optional formTemplate = Optional.empty(); - - private Optional addons = Optional.empty(); - - private Optional> clientMetadata = Optional.empty(); - - private Optional mobile = Optional.empty(); - - private Optional initiateLoginUri = Optional.empty(); - - private Optional nativeSocialLogin = Optional.empty(); - - private OptionalNullable refreshToken = OptionalNullable.absent(); - - private OptionalNullable defaultOrganization = OptionalNullable.absent(); - - private OptionalNullable organizationUsage = OptionalNullable.absent(); - - private OptionalNullable organizationRequireBehavior = - OptionalNullable.absent(); - - 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 OptionalNullable complianceLevel = OptionalNullable.absent(); - - private OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.absent(); - - private OptionalNullable tokenExchange = OptionalNullable.absent(); - - private OptionalNullable parRequestExpiry = OptionalNullable.absent(); - - private OptionalNullable expressConfiguration = OptionalNullable.absent(); - - private Optional> asyncApprovalNotificationChannels = - Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateClientRequestContent other) { - name(other.getName()); - description(other.getDescription()); - clientSecret(other.getClientSecret()); - logoUri(other.getLogoUri()); - callbacks(other.getCallbacks()); - oidcLogout(other.getOidcLogout()); - oidcBackchannelLogout(other.getOidcBackchannelLogout()); - sessionTransfer(other.getSessionTransfer()); - allowedOrigins(other.getAllowedOrigins()); - webOrigins(other.getWebOrigins()); - grantTypes(other.getGrantTypes()); - clientAliases(other.getClientAliases()); - allowedClients(other.getAllowedClients()); - allowedLogoutUrls(other.getAllowedLogoutUrls()); - jwtConfiguration(other.getJwtConfiguration()); - encryptionKey(other.getEncryptionKey()); - sso(other.getSso()); - crossOriginAuthentication(other.getCrossOriginAuthentication()); - crossOriginLoc(other.getCrossOriginLoc()); - ssoDisabled(other.getSsoDisabled()); - customLoginPageOn(other.getCustomLoginPageOn()); - tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); - isTokenEndpointIpHeaderTrusted(other.getIsTokenEndpointIpHeaderTrusted()); - appType(other.getAppType()); - isFirstParty(other.getIsFirstParty()); - oidcConformant(other.getOidcConformant()); - customLoginPage(other.getCustomLoginPage()); - customLoginPagePreview(other.getCustomLoginPagePreview()); - tokenQuota(other.getTokenQuota()); - formTemplate(other.getFormTemplate()); - addons(other.getAddons()); - clientMetadata(other.getClientMetadata()); - mobile(other.getMobile()); - initiateLoginUri(other.getInitiateLoginUri()); - nativeSocialLogin(other.getNativeSocialLogin()); - 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()); - complianceLevel(other.getComplianceLevel()); - skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); - tokenExchange(other.getTokenExchange()); - parRequestExpiry(other.getParRequestExpiry()); - expressConfiguration(other.getExpressConfiguration()); - asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); - return this; - } - - /** - *

The name of the client. Must contain at least one 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 the purpose of the Client. (Max character length: <code>140</code>)

- */ - @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; - } - - /** - *

The secret used to sign tokens for the client

- */ - @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; - } - - /** - *

The URL of the client logo (recommended size: 150x150)

- */ - @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; - } - - /** - *

A set of URLs that are valid to call back from Auth0 when authenticating users

- */ - @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; - } - - @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; - } - - @JsonSetter(value = "oidc_backchannel_logout", nulls = Nulls.SKIP) - public Builder oidcBackchannelLogout(Optional oidcBackchannelLogout) { - this.oidcBackchannelLogout = oidcBackchannelLogout; - return this; - } - - public Builder oidcBackchannelLogout(ClientOidcBackchannelLogoutSettings oidcBackchannelLogout) { - this.oidcBackchannelLogout = Optional.ofNullable(oidcBackchannelLogout); - 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; - } - - /** - *

A set of URLs that represents valid origins for CORS

- */ - @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; - } - - /** - *

A set of URLs that represents valid web origins for use with 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; - } - - /** - *

A set of grant types that the client is authorized to use. 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; - } - - /** - *

List of audiences for SAML protocol

- */ - @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; - } - - /** - *

Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients

- */ - @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; - } - - /** - *

URLs that are valid to redirect to after logout from Auth0.

- */ - @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 = "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; - } - - @JsonSetter(value = "encryption_key", nulls = Nulls.SKIP) - public Builder encryptionKey(@Nullable OptionalNullable encryptionKey) { - this.encryptionKey = encryptionKey; - return this; - } - - public Builder encryptionKey(ClientEncryptionKey encryptionKey) { - this.encryptionKey = OptionalNullable.of(encryptionKey); - return this; - } - - public Builder encryptionKey(Optional encryptionKey) { - if (encryptionKey.isPresent()) { - this.encryptionKey = OptionalNullable.of(encryptionKey.get()); - } else { - this.encryptionKey = OptionalNullable.absent(); - } - return this; - } - - public Builder encryptionKey(com.auth0.client.mgmt.core.Nullable encryptionKey) { - if (encryptionKey.isNull()) { - this.encryptionKey = OptionalNullable.ofNull(); - } else if (encryptionKey.isEmpty()) { - this.encryptionKey = OptionalNullable.absent(); - } else { - this.encryptionKey = OptionalNullable.of(encryptionKey.get()); - } - return this; - } - - /** - *

<code>true</code> to use Auth0 instead of the IdP to do Single Sign On, <code>false</code> otherwise (default: <code>false</code>)

- */ - @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; - } - - /** - *

<code>true</code> if this client can be used to make cross-origin authentication requests, <code>false</code> otherwise if cross origin is disabled

- */ - @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 for 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(@Nullable OptionalNullable crossOriginLoc) { - this.crossOriginLoc = crossOriginLoc; - return this; - } - - public Builder crossOriginLoc(String crossOriginLoc) { - this.crossOriginLoc = OptionalNullable.of(crossOriginLoc); - return this; - } - - public Builder crossOriginLoc(Optional crossOriginLoc) { - if (crossOriginLoc.isPresent()) { - this.crossOriginLoc = OptionalNullable.of(crossOriginLoc.get()); - } else { - this.crossOriginLoc = OptionalNullable.absent(); - } - return this; - } - - public Builder crossOriginLoc(com.auth0.client.mgmt.core.Nullable crossOriginLoc) { - if (crossOriginLoc.isNull()) { - this.crossOriginLoc = OptionalNullable.ofNull(); - } else if (crossOriginLoc.isEmpty()) { - this.crossOriginLoc = OptionalNullable.absent(); - } else { - this.crossOriginLoc = OptionalNullable.of(crossOriginLoc.get()); - } - return this; - } - - /** - *

<code>true</code> to disable Single Sign On, <code>false</code> otherwise (default: <code>false</code>)

- */ - @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; - } - - /** - *

<code>true</code> if the custom login page is to be used, <code>false</code> otherwise.

- */ - @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; - } - - @JsonSetter(value = "token_endpoint_auth_method", nulls = Nulls.SKIP) - public Builder tokenEndpointAuthMethod( - @Nullable OptionalNullable tokenEndpointAuthMethod) { - this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; - return this; - } - - public Builder tokenEndpointAuthMethod(ClientTokenEndpointAuthMethodOrNullEnum 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; - } - - /** - *

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 = "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; - } - - /** - *

Whether this client a first party client or not

- */ - @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 will conform to strict OIDC specifications

- */ - @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; - } - - /** - *

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; - } - - @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; - } - - @JsonSetter(value = "token_quota", nulls = Nulls.SKIP) - public Builder tokenQuota(@Nullable OptionalNullable tokenQuota) { - this.tokenQuota = tokenQuota; - return this; - } - - public Builder tokenQuota(UpdateTokenQuota tokenQuota) { - this.tokenQuota = OptionalNullable.of(tokenQuota); - return this; - } - - public Builder tokenQuota(Optional tokenQuota) { - if (tokenQuota.isPresent()) { - this.tokenQuota = OptionalNullable.of(tokenQuota.get()); - } else { - this.tokenQuota = OptionalNullable.absent(); - } - return this; - } - - public Builder tokenQuota(com.auth0.client.mgmt.core.Nullable tokenQuota) { - if (tokenQuota.isNull()) { - this.tokenQuota = OptionalNullable.ofNull(); - } else if (tokenQuota.isEmpty()) { - this.tokenQuota = OptionalNullable.absent(); - } else { - this.tokenQuota = OptionalNullable.of(tokenQuota.get()); - } - return this; - } - - /** - *

Form template for WS-Federation protocol

- */ - @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 = "addons", nulls = Nulls.SKIP) - public Builder addons(Optional addons) { - this.addons = addons; - return this; - } - - public Builder addons(ClientAddons addons) { - this.addons = Optional.ofNullable(addons); - 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 = "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( - @Nullable OptionalNullable organizationUsage) { - this.organizationUsage = organizationUsage; - return this; - } - - public Builder organizationUsage(ClientOrganizationUsagePatchEnum organizationUsage) { - this.organizationUsage = OptionalNullable.of(organizationUsage); - return this; - } - - public Builder organizationUsage(Optional organizationUsage) { - if (organizationUsage.isPresent()) { - this.organizationUsage = OptionalNullable.of(organizationUsage.get()); - } else { - this.organizationUsage = OptionalNullable.absent(); - } - return this; - } - - public Builder organizationUsage( - com.auth0.client.mgmt.core.Nullable organizationUsage) { - if (organizationUsage.isNull()) { - this.organizationUsage = OptionalNullable.ofNull(); - } else if (organizationUsage.isEmpty()) { - this.organizationUsage = OptionalNullable.absent(); - } else { - this.organizationUsage = OptionalNullable.of(organizationUsage.get()); - } - return this; - } - - @JsonSetter(value = "organization_require_behavior", nulls = Nulls.SKIP) - public Builder organizationRequireBehavior( - @Nullable OptionalNullable organizationRequireBehavior) { - this.organizationRequireBehavior = organizationRequireBehavior; - return this; - } - - public Builder organizationRequireBehavior( - ClientOrganizationRequireBehaviorPatchEnum organizationRequireBehavior) { - this.organizationRequireBehavior = OptionalNullable.of(organizationRequireBehavior); - return this; - } - - public Builder organizationRequireBehavior( - Optional organizationRequireBehavior) { - if (organizationRequireBehavior.isPresent()) { - this.organizationRequireBehavior = OptionalNullable.of(organizationRequireBehavior.get()); - } else { - this.organizationRequireBehavior = OptionalNullable.absent(); - } - return this; - } - - public Builder organizationRequireBehavior( - com.auth0.client.mgmt.core.Nullable - organizationRequireBehavior) { - if (organizationRequireBehavior.isNull()) { - this.organizationRequireBehavior = OptionalNullable.ofNull(); - } else if (organizationRequireBehavior.isEmpty()) { - this.organizationRequireBehavior = OptionalNullable.absent(); - } else { - this.organizationRequireBehavior = OptionalNullable.of(organizationRequireBehavior.get()); - } - 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 = "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( - @Nullable OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; - return this; - } - - public Builder skipNonVerifiableCallbackUriConfirmationPrompt( - Boolean skipNonVerifiableCallbackUriConfirmationPrompt) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = - OptionalNullable.of(skipNonVerifiableCallbackUriConfirmationPrompt); - return this; - } - - public Builder skipNonVerifiableCallbackUriConfirmationPrompt( - Optional skipNonVerifiableCallbackUriConfirmationPrompt) { - if (skipNonVerifiableCallbackUriConfirmationPrompt.isPresent()) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = - OptionalNullable.of(skipNonVerifiableCallbackUriConfirmationPrompt.get()); - } else { - this.skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.absent(); - } - return this; - } - - public Builder skipNonVerifiableCallbackUriConfirmationPrompt( - com.auth0.client.mgmt.core.Nullable skipNonVerifiableCallbackUriConfirmationPrompt) { - if (skipNonVerifiableCallbackUriConfirmationPrompt.isNull()) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.ofNull(); - } else if (skipNonVerifiableCallbackUriConfirmationPrompt.isEmpty()) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.absent(); - } else { - this.skipNonVerifiableCallbackUriConfirmationPrompt = - OptionalNullable.of(skipNonVerifiableCallbackUriConfirmationPrompt.get()); - } - return this; - } - - @JsonSetter(value = "token_exchange", nulls = Nulls.SKIP) - public Builder tokenExchange(@Nullable OptionalNullable tokenExchange) { - this.tokenExchange = tokenExchange; - return this; - } - - public Builder tokenExchange(ClientTokenExchangeConfigurationOrNull tokenExchange) { - this.tokenExchange = OptionalNullable.of(tokenExchange); - return this; - } - - public Builder tokenExchange(Optional tokenExchange) { - if (tokenExchange.isPresent()) { - this.tokenExchange = OptionalNullable.of(tokenExchange.get()); - } else { - this.tokenExchange = OptionalNullable.absent(); - } - return this; - } - - public Builder tokenExchange( - com.auth0.client.mgmt.core.Nullable tokenExchange) { - if (tokenExchange.isNull()) { - this.tokenExchange = OptionalNullable.ofNull(); - } else if (tokenExchange.isEmpty()) { - this.tokenExchange = OptionalNullable.absent(); - } else { - this.tokenExchange = OptionalNullable.of(tokenExchange.get()); - } - 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 = "express_configuration", nulls = Nulls.SKIP) - public Builder expressConfiguration( - @Nullable OptionalNullable expressConfiguration) { - this.expressConfiguration = expressConfiguration; - return this; - } - - public Builder expressConfiguration(ExpressConfigurationOrNull expressConfiguration) { - this.expressConfiguration = OptionalNullable.of(expressConfiguration); - return this; - } - - public Builder expressConfiguration(Optional expressConfiguration) { - if (expressConfiguration.isPresent()) { - this.expressConfiguration = OptionalNullable.of(expressConfiguration.get()); - } else { - this.expressConfiguration = OptionalNullable.absent(); - } - return this; - } - - public Builder expressConfiguration( - com.auth0.client.mgmt.core.Nullable expressConfiguration) { - if (expressConfiguration.isNull()) { - this.expressConfiguration = OptionalNullable.ofNull(); - } else if (expressConfiguration.isEmpty()) { - this.expressConfiguration = OptionalNullable.absent(); - } else { - this.expressConfiguration = OptionalNullable.of(expressConfiguration.get()); - } - 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; - } - - public UpdateClientRequestContent build() { - return new UpdateClientRequestContent( - name, - description, - clientSecret, - logoUri, - callbacks, - oidcLogout, - oidcBackchannelLogout, - sessionTransfer, - allowedOrigins, - webOrigins, - grantTypes, - clientAliases, - allowedClients, - allowedLogoutUrls, - jwtConfiguration, - encryptionKey, - sso, - crossOriginAuthentication, - crossOriginLoc, - ssoDisabled, - customLoginPageOn, - tokenEndpointAuthMethod, - isTokenEndpointIpHeaderTrusted, - appType, - isFirstParty, - oidcConformant, - customLoginPage, - customLoginPagePreview, - tokenQuota, - formTemplate, - addons, - clientMetadata, - mobile, - initiateLoginUri, - nativeSocialLogin, - refreshToken, - defaultOrganization, - organizationUsage, - organizationRequireBehavior, - organizationDiscoveryMethods, - clientAuthenticationMethods, - requirePushedAuthorizationRequests, - requireProofOfPossession, - signedRequestObject, - complianceLevel, - skipNonVerifiableCallbackUriConfirmationPrompt, - tokenExchange, - parRequestExpiry, - expressConfiguration, - asyncApprovalNotificationChannels, - 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 deleted file mode 100644 index fc2fd8130..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java +++ /dev/null @@ -1,1876 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateClientResponseContent.Builder.class) -public final class UpdateClientResponseContent { - private final Optional clientId; - - private final Optional tenant; - - private final Optional name; - - private final Optional description; - - private final Optional global; - - private final Optional clientSecret; - - 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> signingKeys; - - private final OptionalNullable encryptionKey; - - 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 addons; - - private final Optional tokenEndpointAuthMethod; - - private final Optional isTokenEndpointIpHeaderTrusted; - - private final Optional> clientMetadata; - - private final Optional mobile; - - private final Optional initiateLoginUri; - - 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 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 resourceServerIdentifier; - - private final Optional> asyncApprovalNotificationChannels; - - private final Map additionalProperties; - - private UpdateClientResponseContent( - Optional clientId, - Optional tenant, - Optional name, - Optional description, - Optional global, - Optional clientSecret, - 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> signingKeys, - OptionalNullable encryptionKey, - Optional sso, - Optional ssoDisabled, - Optional crossOriginAuthentication, - Optional crossOriginLoc, - Optional customLoginPageOn, - Optional customLoginPage, - Optional customLoginPagePreview, - Optional formTemplate, - Optional addons, - Optional tokenEndpointAuthMethod, - Optional isTokenEndpointIpHeaderTrusted, - Optional> clientMetadata, - Optional mobile, - Optional initiateLoginUri, - OptionalNullable refreshToken, - OptionalNullable defaultOrganization, - Optional organizationUsage, - Optional organizationRequireBehavior, - Optional> organizationDiscoveryMethods, - OptionalNullable clientAuthenticationMethods, - Optional requirePushedAuthorizationRequests, - Optional requireProofOfPossession, - Optional signedRequestObject, - OptionalNullable complianceLevel, - Optional skipNonVerifiableCallbackUriConfirmationPrompt, - Optional tokenExchange, - OptionalNullable parRequestExpiry, - Optional tokenQuota, - Optional expressConfiguration, - Optional resourceServerIdentifier, - Optional> asyncApprovalNotificationChannels, - Map additionalProperties) { - this.clientId = clientId; - this.tenant = tenant; - this.name = name; - this.description = description; - this.global = global; - this.clientSecret = clientSecret; - 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.signingKeys = signingKeys; - this.encryptionKey = encryptionKey; - 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.addons = addons; - this.tokenEndpointAuthMethod = tokenEndpointAuthMethod; - this.isTokenEndpointIpHeaderTrusted = isTokenEndpointIpHeaderTrusted; - this.clientMetadata = clientMetadata; - this.mobile = mobile; - this.initiateLoginUri = initiateLoginUri; - 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.complianceLevel = complianceLevel; - this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; - this.tokenExchange = tokenExchange; - this.parRequestExpiry = parRequestExpiry; - this.tokenQuota = tokenQuota; - this.expressConfiguration = expressConfiguration; - this.resourceServerIdentifier = resourceServerIdentifier; - this.asyncApprovalNotificationChannels = asyncApprovalNotificationChannels; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of this client. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @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; - } - - /** - * @return Client secret (which you must not make public). - */ - @JsonProperty("client_secret") - public Optional getClientSecret() { - return clientSecret; - } - - @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 <a href='https://auth0.com/docs/api-auth/tutorials/adoption'>strict OIDC specifications</a> (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 <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>. - */ - @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; - } - - @JsonProperty("signing_keys") - public Optional> getSigningKeys() { - return signingKeys; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("encryption_key") - public OptionalNullable getEncryptionKey() { - if (encryptionKey == null) { - return OptionalNullable.absent(); - } - return encryptionKey; - } - - /** - * @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("addons") - public Optional getAddons() { - return addons; - } - - @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; - } - - @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; - } - - @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; - } - - /** - * @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; - } - - @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("encryption_key") - private OptionalNullable _getEncryptionKey() { - return encryptionKey; - } - - @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 UpdateClientResponseContent && equalTo((UpdateClientResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateClientResponseContent other) { - return clientId.equals(other.clientId) - && tenant.equals(other.tenant) - && name.equals(other.name) - && description.equals(other.description) - && global.equals(other.global) - && clientSecret.equals(other.clientSecret) - && 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) - && signingKeys.equals(other.signingKeys) - && encryptionKey.equals(other.encryptionKey) - && 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) - && addons.equals(other.addons) - && tokenEndpointAuthMethod.equals(other.tokenEndpointAuthMethod) - && isTokenEndpointIpHeaderTrusted.equals(other.isTokenEndpointIpHeaderTrusted) - && clientMetadata.equals(other.clientMetadata) - && mobile.equals(other.mobile) - && initiateLoginUri.equals(other.initiateLoginUri) - && 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) - && complianceLevel.equals(other.complianceLevel) - && skipNonVerifiableCallbackUriConfirmationPrompt.equals( - other.skipNonVerifiableCallbackUriConfirmationPrompt) - && tokenExchange.equals(other.tokenExchange) - && parRequestExpiry.equals(other.parRequestExpiry) - && tokenQuota.equals(other.tokenQuota) - && expressConfiguration.equals(other.expressConfiguration) - && resourceServerIdentifier.equals(other.resourceServerIdentifier) - && asyncApprovalNotificationChannels.equals(other.asyncApprovalNotificationChannels); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.clientId, - this.tenant, - this.name, - this.description, - this.global, - this.clientSecret, - 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.signingKeys, - this.encryptionKey, - this.sso, - this.ssoDisabled, - this.crossOriginAuthentication, - this.crossOriginLoc, - this.customLoginPageOn, - this.customLoginPage, - this.customLoginPagePreview, - this.formTemplate, - this.addons, - this.tokenEndpointAuthMethod, - this.isTokenEndpointIpHeaderTrusted, - this.clientMetadata, - this.mobile, - this.initiateLoginUri, - this.refreshToken, - this.defaultOrganization, - this.organizationUsage, - this.organizationRequireBehavior, - this.organizationDiscoveryMethods, - this.clientAuthenticationMethods, - this.requirePushedAuthorizationRequests, - this.requireProofOfPossession, - this.signedRequestObject, - this.complianceLevel, - this.skipNonVerifiableCallbackUriConfirmationPrompt, - this.tokenExchange, - this.parRequestExpiry, - this.tokenQuota, - this.expressConfiguration, - this.resourceServerIdentifier, - this.asyncApprovalNotificationChannels); - } - - @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 tenant = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional description = Optional.empty(); - - private Optional global = Optional.empty(); - - private Optional clientSecret = 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> signingKeys = Optional.empty(); - - private OptionalNullable encryptionKey = OptionalNullable.absent(); - - 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 addons = 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 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 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 resourceServerIdentifier = Optional.empty(); - - private Optional> asyncApprovalNotificationChannels = - Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateClientResponseContent other) { - clientId(other.getClientId()); - tenant(other.getTenant()); - name(other.getName()); - description(other.getDescription()); - global(other.getGlobal()); - clientSecret(other.getClientSecret()); - 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()); - signingKeys(other.getSigningKeys()); - encryptionKey(other.getEncryptionKey()); - sso(other.getSso()); - ssoDisabled(other.getSsoDisabled()); - crossOriginAuthentication(other.getCrossOriginAuthentication()); - crossOriginLoc(other.getCrossOriginLoc()); - customLoginPageOn(other.getCustomLoginPageOn()); - customLoginPage(other.getCustomLoginPage()); - customLoginPagePreview(other.getCustomLoginPagePreview()); - formTemplate(other.getFormTemplate()); - addons(other.getAddons()); - tokenEndpointAuthMethod(other.getTokenEndpointAuthMethod()); - isTokenEndpointIpHeaderTrusted(other.getIsTokenEndpointIpHeaderTrusted()); - clientMetadata(other.getClientMetadata()); - mobile(other.getMobile()); - initiateLoginUri(other.getInitiateLoginUri()); - 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()); - complianceLevel(other.getComplianceLevel()); - skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); - tokenExchange(other.getTokenExchange()); - parRequestExpiry(other.getParRequestExpiry()); - tokenQuota(other.getTokenQuota()); - expressConfiguration(other.getExpressConfiguration()); - resourceServerIdentifier(other.getResourceServerIdentifier()); - asyncApprovalNotificationChannels(other.getAsyncApprovalNotificationChannels()); - 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; - } - - /** - *

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; - } - - /** - *

Client secret (which you must not make public).

- */ - @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 = "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 <a href='https://auth0.com/docs/api-auth/tutorials/adoption'>strict OIDC specifications</a> (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 <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>.

- */ - @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; - } - - @JsonSetter(value = "signing_keys", nulls = Nulls.SKIP) - public Builder signingKeys(Optional> signingKeys) { - this.signingKeys = signingKeys; - return this; - } - - public Builder signingKeys(List signingKeys) { - this.signingKeys = Optional.ofNullable(signingKeys); - return this; - } - - @JsonSetter(value = "encryption_key", nulls = Nulls.SKIP) - public Builder encryptionKey(@Nullable OptionalNullable encryptionKey) { - this.encryptionKey = encryptionKey; - return this; - } - - public Builder encryptionKey(ClientEncryptionKey encryptionKey) { - this.encryptionKey = OptionalNullable.of(encryptionKey); - return this; - } - - public Builder encryptionKey(Optional encryptionKey) { - if (encryptionKey.isPresent()) { - this.encryptionKey = OptionalNullable.of(encryptionKey.get()); - } else { - this.encryptionKey = OptionalNullable.absent(); - } - return this; - } - - public Builder encryptionKey(com.auth0.client.mgmt.core.Nullable encryptionKey) { - if (encryptionKey.isNull()) { - this.encryptionKey = OptionalNullable.ofNull(); - } else if (encryptionKey.isEmpty()) { - this.encryptionKey = OptionalNullable.absent(); - } else { - this.encryptionKey = OptionalNullable.of(encryptionKey.get()); - } - 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 = "addons", nulls = Nulls.SKIP) - public Builder addons(Optional addons) { - this.addons = addons; - return this; - } - - public Builder addons(ClientAddons addons) { - this.addons = Optional.ofNullable(addons); - 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 = "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 = "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; - } - - /** - *

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; - } - - public UpdateClientResponseContent build() { - return new UpdateClientResponseContent( - clientId, - tenant, - name, - description, - global, - clientSecret, - appType, - logoUri, - isFirstParty, - oidcConformant, - callbacks, - allowedOrigins, - webOrigins, - clientAliases, - allowedClients, - allowedLogoutUrls, - sessionTransfer, - oidcLogout, - grantTypes, - jwtConfiguration, - signingKeys, - encryptionKey, - sso, - ssoDisabled, - crossOriginAuthentication, - crossOriginLoc, - customLoginPageOn, - customLoginPage, - customLoginPagePreview, - formTemplate, - addons, - tokenEndpointAuthMethod, - isTokenEndpointIpHeaderTrusted, - clientMetadata, - mobile, - initiateLoginUri, - refreshToken, - defaultOrganization, - organizationUsage, - organizationRequireBehavior, - organizationDiscoveryMethods, - clientAuthenticationMethods, - requirePushedAuthorizationRequests, - requireProofOfPossession, - signedRequestObject, - complianceLevel, - skipNonVerifiableCallbackUriConfirmationPrompt, - tokenExchange, - parRequestExpiry, - tokenQuota, - expressConfiguration, - resourceServerIdentifier, - asyncApprovalNotificationChannels, - 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 deleted file mode 100644 index b59873673..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionOptions.java +++ /dev/null @@ -1,1200 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionOptions.Builder.class) -public final class UpdateConnectionOptions { - private final OptionalNullable validation; - - private final Optional> nonPersistentAttrs; - - private final Optional> precedence; - - private final Optional attributes; - - private final Optional enableScriptContext; - - private final Optional enabledDatabaseCustomization; - - private final Optional importMode; - - private final Optional customScripts; - - private final OptionalNullable authenticationMethods; - - private final OptionalNullable passkeyOptions; - - private final OptionalNullable passwordPolicy; - - private final OptionalNullable passwordComplexityOptions; - - private final OptionalNullable passwordHistory; - - private final OptionalNullable passwordNoPersonalInfo; - - private final OptionalNullable passwordDictionary; - - private final Optional apiEnableUsers; - - private final Optional basicProfile; - - private final Optional extAdmin; - - private final Optional extIsSuspended; - - private final Optional extAgreedTerms; - - private final Optional extGroups; - - private final Optional extAssignedPlans; - - private final Optional extProfile; - - private final Optional disableSelfServiceChangePassword; - - private final OptionalNullable>> - upstreamParams; - - private final Optional setUserRootAttributes; - - private final OptionalNullable gatewayAuthentication; - - private final OptionalNullable federatedConnectionsAccessTokens; - - private final Map additionalProperties; - - private UpdateConnectionOptions( - OptionalNullable validation, - Optional> nonPersistentAttrs, - Optional> precedence, - Optional attributes, - Optional enableScriptContext, - Optional enabledDatabaseCustomization, - Optional importMode, - Optional customScripts, - OptionalNullable authenticationMethods, - OptionalNullable passkeyOptions, - OptionalNullable passwordPolicy, - OptionalNullable passwordComplexityOptions, - OptionalNullable passwordHistory, - OptionalNullable passwordNoPersonalInfo, - OptionalNullable passwordDictionary, - Optional apiEnableUsers, - Optional basicProfile, - Optional extAdmin, - Optional extIsSuspended, - Optional extAgreedTerms, - Optional extGroups, - Optional extAssignedPlans, - Optional extProfile, - Optional disableSelfServiceChangePassword, - OptionalNullable>> upstreamParams, - Optional setUserRootAttributes, - OptionalNullable gatewayAuthentication, - OptionalNullable federatedConnectionsAccessTokens, - Map additionalProperties) { - this.validation = validation; - this.nonPersistentAttrs = nonPersistentAttrs; - this.precedence = precedence; - this.attributes = attributes; - this.enableScriptContext = enableScriptContext; - this.enabledDatabaseCustomization = enabledDatabaseCustomization; - this.importMode = importMode; - this.customScripts = customScripts; - this.authenticationMethods = authenticationMethods; - this.passkeyOptions = passkeyOptions; - this.passwordPolicy = passwordPolicy; - this.passwordComplexityOptions = passwordComplexityOptions; - this.passwordHistory = passwordHistory; - this.passwordNoPersonalInfo = passwordNoPersonalInfo; - this.passwordDictionary = passwordDictionary; - this.apiEnableUsers = apiEnableUsers; - this.basicProfile = basicProfile; - this.extAdmin = extAdmin; - this.extIsSuspended = extIsSuspended; - this.extAgreedTerms = extAgreedTerms; - this.extGroups = extGroups; - this.extAssignedPlans = extAssignedPlans; - this.extProfile = extProfile; - this.disableSelfServiceChangePassword = disableSelfServiceChangePassword; - this.upstreamParams = upstreamParams; - this.setUserRootAttributes = setUserRootAttributes; - this.gatewayAuthentication = gatewayAuthentication; - this.federatedConnectionsAccessTokens = federatedConnectionsAccessTokens; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("validation") - public OptionalNullable getValidation() { - if (validation == null) { - return OptionalNullable.absent(); - } - return validation; - } - - /** - * @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 Order of precedence for attribute types. If the property is not specified, the default precedence of attributes will be used. - */ - @JsonProperty("precedence") - public Optional> getPrecedence() { - return precedence; - } - - @JsonProperty("attributes") - public Optional getAttributes() { - return attributes; - } - - /** - * @return Set to true to inject context into custom DB scripts (warning: cannot be disabled once enabled) - */ - @JsonProperty("enable_script_context") - public Optional getEnableScriptContext() { - return enableScriptContext; - } - - /** - * @return Set to true to use a legacy user store - */ - @JsonProperty("enabledDatabaseCustomization") - public Optional getEnabledDatabaseCustomization() { - return enabledDatabaseCustomization; - } - - /** - * @return Enable this if you have a legacy user store and you want to gradually migrate those users to the Auth0 user store - */ - @JsonProperty("import_mode") - public Optional getImportMode() { - return importMode; - } - - @JsonProperty("customScripts") - public Optional getCustomScripts() { - return customScripts; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("authentication_methods") - public OptionalNullable getAuthenticationMethods() { - if (authenticationMethods == null) { - return OptionalNullable.absent(); - } - return authenticationMethods; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("passkey_options") - public OptionalNullable getPasskeyOptions() { - if (passkeyOptions == null) { - return OptionalNullable.absent(); - } - return passkeyOptions; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("passwordPolicy") - public OptionalNullable getPasswordPolicy() { - if (passwordPolicy == null) { - return OptionalNullable.absent(); - } - return passwordPolicy; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_complexity_options") - public OptionalNullable getPasswordComplexityOptions() { - if (passwordComplexityOptions == null) { - return OptionalNullable.absent(); - } - return passwordComplexityOptions; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_history") - public OptionalNullable getPasswordHistory() { - if (passwordHistory == null) { - return OptionalNullable.absent(); - } - return passwordHistory; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_no_personal_info") - public OptionalNullable getPasswordNoPersonalInfo() { - if (passwordNoPersonalInfo == null) { - return OptionalNullable.absent(); - } - return passwordNoPersonalInfo; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_dictionary") - public OptionalNullable getPasswordDictionary() { - if (passwordDictionary == null) { - return OptionalNullable.absent(); - } - return passwordDictionary; - } - - @JsonProperty("api_enable_users") - public Optional getApiEnableUsers() { - return apiEnableUsers; - } - - @JsonProperty("basic_profile") - public Optional getBasicProfile() { - return basicProfile; - } - - @JsonProperty("ext_admin") - public Optional getExtAdmin() { - return extAdmin; - } - - @JsonProperty("ext_is_suspended") - public Optional getExtIsSuspended() { - return extIsSuspended; - } - - @JsonProperty("ext_agreed_terms") - public Optional getExtAgreedTerms() { - return extAgreedTerms; - } - - @JsonProperty("ext_groups") - public Optional getExtGroups() { - return extGroups; - } - - @JsonProperty("ext_assigned_plans") - public Optional getExtAssignedPlans() { - return extAssignedPlans; - } - - @JsonProperty("ext_profile") - public Optional getExtProfile() { - return extProfile; - } - - @JsonProperty("disable_self_service_change_password") - public Optional getDisableSelfServiceChangePassword() { - return disableSelfServiceChangePassword; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - public OptionalNullable>> getUpstreamParams() { - if (upstreamParams == null) { - return OptionalNullable.absent(); - } - return upstreamParams; - } - - @JsonProperty("set_user_root_attributes") - public Optional getSetUserRootAttributes() { - return setUserRootAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("gateway_authentication") - public OptionalNullable getGatewayAuthentication() { - if (gatewayAuthentication == null) { - return OptionalNullable.absent(); - } - 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; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("validation") - private OptionalNullable _getValidation() { - return validation; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("authentication_methods") - private OptionalNullable _getAuthenticationMethods() { - return authenticationMethods; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("passkey_options") - private OptionalNullable _getPasskeyOptions() { - return passkeyOptions; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("passwordPolicy") - private OptionalNullable _getPasswordPolicy() { - return passwordPolicy; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_complexity_options") - private OptionalNullable _getPasswordComplexityOptions() { - return passwordComplexityOptions; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_history") - private OptionalNullable _getPasswordHistory() { - return passwordHistory; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_no_personal_info") - private OptionalNullable _getPasswordNoPersonalInfo() { - return passwordNoPersonalInfo; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password_dictionary") - private OptionalNullable _getPasswordDictionary() { - return passwordDictionary; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("upstream_params") - private OptionalNullable>> - _getUpstreamParams() { - return upstreamParams; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("gateway_authentication") - private OptionalNullable _getGatewayAuthentication() { - return gatewayAuthentication; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("federated_connections_access_tokens") - private OptionalNullable _getFederatedConnectionsAccessTokens() { - return federatedConnectionsAccessTokens; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionOptions && equalTo((UpdateConnectionOptions) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionOptions other) { - return validation.equals(other.validation) - && nonPersistentAttrs.equals(other.nonPersistentAttrs) - && precedence.equals(other.precedence) - && attributes.equals(other.attributes) - && enableScriptContext.equals(other.enableScriptContext) - && enabledDatabaseCustomization.equals(other.enabledDatabaseCustomization) - && importMode.equals(other.importMode) - && customScripts.equals(other.customScripts) - && authenticationMethods.equals(other.authenticationMethods) - && passkeyOptions.equals(other.passkeyOptions) - && passwordPolicy.equals(other.passwordPolicy) - && passwordComplexityOptions.equals(other.passwordComplexityOptions) - && passwordHistory.equals(other.passwordHistory) - && passwordNoPersonalInfo.equals(other.passwordNoPersonalInfo) - && passwordDictionary.equals(other.passwordDictionary) - && apiEnableUsers.equals(other.apiEnableUsers) - && basicProfile.equals(other.basicProfile) - && extAdmin.equals(other.extAdmin) - && extIsSuspended.equals(other.extIsSuspended) - && extAgreedTerms.equals(other.extAgreedTerms) - && extGroups.equals(other.extGroups) - && extAssignedPlans.equals(other.extAssignedPlans) - && extProfile.equals(other.extProfile) - && disableSelfServiceChangePassword.equals(other.disableSelfServiceChangePassword) - && upstreamParams.equals(other.upstreamParams) - && setUserRootAttributes.equals(other.setUserRootAttributes) - && gatewayAuthentication.equals(other.gatewayAuthentication) - && federatedConnectionsAccessTokens.equals(other.federatedConnectionsAccessTokens); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.validation, - this.nonPersistentAttrs, - this.precedence, - this.attributes, - this.enableScriptContext, - this.enabledDatabaseCustomization, - this.importMode, - this.customScripts, - this.authenticationMethods, - this.passkeyOptions, - this.passwordPolicy, - this.passwordComplexityOptions, - this.passwordHistory, - this.passwordNoPersonalInfo, - this.passwordDictionary, - this.apiEnableUsers, - this.basicProfile, - this.extAdmin, - this.extIsSuspended, - this.extAgreedTerms, - this.extGroups, - this.extAssignedPlans, - this.extProfile, - this.disableSelfServiceChangePassword, - this.upstreamParams, - this.setUserRootAttributes, - this.gatewayAuthentication, - this.federatedConnectionsAccessTokens); - } - - @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 validation = OptionalNullable.absent(); - - private Optional> nonPersistentAttrs = Optional.empty(); - - private Optional> precedence = Optional.empty(); - - private Optional attributes = Optional.empty(); - - private Optional enableScriptContext = Optional.empty(); - - private Optional enabledDatabaseCustomization = Optional.empty(); - - private Optional importMode = Optional.empty(); - - private Optional customScripts = Optional.empty(); - - private OptionalNullable authenticationMethods = OptionalNullable.absent(); - - private OptionalNullable passkeyOptions = OptionalNullable.absent(); - - private OptionalNullable passwordPolicy = OptionalNullable.absent(); - - private OptionalNullable passwordComplexityOptions = - OptionalNullable.absent(); - - private OptionalNullable passwordHistory = OptionalNullable.absent(); - - private OptionalNullable passwordNoPersonalInfo = - OptionalNullable.absent(); - - private OptionalNullable passwordDictionary = OptionalNullable.absent(); - - private Optional apiEnableUsers = Optional.empty(); - - private Optional basicProfile = Optional.empty(); - - private Optional extAdmin = Optional.empty(); - - private Optional extIsSuspended = Optional.empty(); - - private Optional extAgreedTerms = Optional.empty(); - - private Optional extGroups = Optional.empty(); - - private Optional extAssignedPlans = Optional.empty(); - - private Optional extProfile = Optional.empty(); - - private Optional disableSelfServiceChangePassword = Optional.empty(); - - private OptionalNullable>> upstreamParams = - OptionalNullable.absent(); - - private Optional setUserRootAttributes = Optional.empty(); - - private OptionalNullable gatewayAuthentication = OptionalNullable.absent(); - - private OptionalNullable federatedConnectionsAccessTokens = - OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionOptions other) { - validation(other.getValidation()); - nonPersistentAttrs(other.getNonPersistentAttrs()); - precedence(other.getPrecedence()); - attributes(other.getAttributes()); - enableScriptContext(other.getEnableScriptContext()); - enabledDatabaseCustomization(other.getEnabledDatabaseCustomization()); - importMode(other.getImportMode()); - customScripts(other.getCustomScripts()); - authenticationMethods(other.getAuthenticationMethods()); - passkeyOptions(other.getPasskeyOptions()); - passwordPolicy(other.getPasswordPolicy()); - passwordComplexityOptions(other.getPasswordComplexityOptions()); - passwordHistory(other.getPasswordHistory()); - passwordNoPersonalInfo(other.getPasswordNoPersonalInfo()); - passwordDictionary(other.getPasswordDictionary()); - apiEnableUsers(other.getApiEnableUsers()); - basicProfile(other.getBasicProfile()); - extAdmin(other.getExtAdmin()); - extIsSuspended(other.getExtIsSuspended()); - extAgreedTerms(other.getExtAgreedTerms()); - extGroups(other.getExtGroups()); - extAssignedPlans(other.getExtAssignedPlans()); - extProfile(other.getExtProfile()); - disableSelfServiceChangePassword(other.getDisableSelfServiceChangePassword()); - upstreamParams(other.getUpstreamParams()); - setUserRootAttributes(other.getSetUserRootAttributes()); - gatewayAuthentication(other.getGatewayAuthentication()); - federatedConnectionsAccessTokens(other.getFederatedConnectionsAccessTokens()); - return this; - } - - @JsonSetter(value = "validation", nulls = Nulls.SKIP) - public Builder validation(@Nullable OptionalNullable validation) { - this.validation = validation; - return this; - } - - public Builder validation(ConnectionValidationOptions validation) { - this.validation = OptionalNullable.of(validation); - return this; - } - - public Builder validation(Optional validation) { - if (validation.isPresent()) { - this.validation = OptionalNullable.of(validation.get()); - } else { - this.validation = OptionalNullable.absent(); - } - return this; - } - - public Builder validation(com.auth0.client.mgmt.core.Nullable validation) { - if (validation.isNull()) { - this.validation = OptionalNullable.ofNull(); - } else if (validation.isEmpty()) { - this.validation = OptionalNullable.absent(); - } else { - this.validation = OptionalNullable.of(validation.get()); - } - 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; - } - - /** - *

Order of precedence for attribute types. If the property is not specified, the default precedence of attributes will be used.

- */ - @JsonSetter(value = "precedence", nulls = Nulls.SKIP) - public Builder precedence(Optional> precedence) { - this.precedence = precedence; - return this; - } - - public Builder precedence(List precedence) { - this.precedence = Optional.ofNullable(precedence); - return this; - } - - @JsonSetter(value = "attributes", nulls = Nulls.SKIP) - public Builder attributes(Optional attributes) { - this.attributes = attributes; - return this; - } - - public Builder attributes(ConnectionAttributes attributes) { - this.attributes = Optional.ofNullable(attributes); - return this; - } - - /** - *

Set to true to inject context into custom DB scripts (warning: cannot be disabled once enabled)

- */ - @JsonSetter(value = "enable_script_context", nulls = Nulls.SKIP) - public Builder enableScriptContext(Optional enableScriptContext) { - this.enableScriptContext = enableScriptContext; - return this; - } - - public Builder enableScriptContext(Boolean enableScriptContext) { - this.enableScriptContext = Optional.ofNullable(enableScriptContext); - return this; - } - - /** - *

Set to true to use a legacy user store

- */ - @JsonSetter(value = "enabledDatabaseCustomization", nulls = Nulls.SKIP) - public Builder enabledDatabaseCustomization(Optional enabledDatabaseCustomization) { - this.enabledDatabaseCustomization = enabledDatabaseCustomization; - return this; - } - - public Builder enabledDatabaseCustomization(Boolean enabledDatabaseCustomization) { - this.enabledDatabaseCustomization = Optional.ofNullable(enabledDatabaseCustomization); - return this; - } - - /** - *

Enable this if you have a legacy user store and you want to gradually migrate those users to the Auth0 user store

- */ - @JsonSetter(value = "import_mode", nulls = Nulls.SKIP) - public Builder importMode(Optional importMode) { - this.importMode = importMode; - return this; - } - - public Builder importMode(Boolean importMode) { - this.importMode = Optional.ofNullable(importMode); - return this; - } - - @JsonSetter(value = "customScripts", nulls = Nulls.SKIP) - public Builder customScripts(Optional customScripts) { - this.customScripts = customScripts; - return this; - } - - public Builder customScripts(ConnectionCustomScripts customScripts) { - this.customScripts = Optional.ofNullable(customScripts); - return this; - } - - @JsonSetter(value = "authentication_methods", nulls = Nulls.SKIP) - public Builder authenticationMethods( - @Nullable OptionalNullable authenticationMethods) { - this.authenticationMethods = authenticationMethods; - return this; - } - - public Builder authenticationMethods(ConnectionAuthenticationMethods authenticationMethods) { - this.authenticationMethods = OptionalNullable.of(authenticationMethods); - return this; - } - - public Builder authenticationMethods(Optional authenticationMethods) { - if (authenticationMethods.isPresent()) { - this.authenticationMethods = OptionalNullable.of(authenticationMethods.get()); - } else { - this.authenticationMethods = OptionalNullable.absent(); - } - return this; - } - - public Builder authenticationMethods( - com.auth0.client.mgmt.core.Nullable authenticationMethods) { - if (authenticationMethods.isNull()) { - this.authenticationMethods = OptionalNullable.ofNull(); - } else if (authenticationMethods.isEmpty()) { - this.authenticationMethods = OptionalNullable.absent(); - } else { - this.authenticationMethods = OptionalNullable.of(authenticationMethods.get()); - } - return this; - } - - @JsonSetter(value = "passkey_options", nulls = Nulls.SKIP) - public Builder passkeyOptions(@Nullable OptionalNullable passkeyOptions) { - this.passkeyOptions = passkeyOptions; - return this; - } - - public Builder passkeyOptions(ConnectionPasskeyOptions passkeyOptions) { - this.passkeyOptions = OptionalNullable.of(passkeyOptions); - return this; - } - - public Builder passkeyOptions(Optional passkeyOptions) { - if (passkeyOptions.isPresent()) { - this.passkeyOptions = OptionalNullable.of(passkeyOptions.get()); - } else { - this.passkeyOptions = OptionalNullable.absent(); - } - return this; - } - - public Builder passkeyOptions(com.auth0.client.mgmt.core.Nullable passkeyOptions) { - if (passkeyOptions.isNull()) { - this.passkeyOptions = OptionalNullable.ofNull(); - } else if (passkeyOptions.isEmpty()) { - this.passkeyOptions = OptionalNullable.absent(); - } else { - this.passkeyOptions = OptionalNullable.of(passkeyOptions.get()); - } - return this; - } - - @JsonSetter(value = "passwordPolicy", nulls = Nulls.SKIP) - public Builder passwordPolicy(@Nullable OptionalNullable passwordPolicy) { - this.passwordPolicy = passwordPolicy; - return this; - } - - public Builder passwordPolicy(ConnectionPasswordPolicyEnum passwordPolicy) { - this.passwordPolicy = OptionalNullable.of(passwordPolicy); - return this; - } - - public Builder passwordPolicy(Optional passwordPolicy) { - if (passwordPolicy.isPresent()) { - this.passwordPolicy = OptionalNullable.of(passwordPolicy.get()); - } else { - this.passwordPolicy = OptionalNullable.absent(); - } - return this; - } - - public Builder passwordPolicy( - com.auth0.client.mgmt.core.Nullable passwordPolicy) { - if (passwordPolicy.isNull()) { - this.passwordPolicy = OptionalNullable.ofNull(); - } else if (passwordPolicy.isEmpty()) { - this.passwordPolicy = OptionalNullable.absent(); - } else { - this.passwordPolicy = OptionalNullable.of(passwordPolicy.get()); - } - return this; - } - - @JsonSetter(value = "password_complexity_options", nulls = Nulls.SKIP) - public Builder passwordComplexityOptions( - @Nullable OptionalNullable passwordComplexityOptions) { - this.passwordComplexityOptions = passwordComplexityOptions; - return this; - } - - public Builder passwordComplexityOptions(ConnectionPasswordComplexityOptions passwordComplexityOptions) { - this.passwordComplexityOptions = OptionalNullable.of(passwordComplexityOptions); - return this; - } - - public Builder passwordComplexityOptions( - Optional passwordComplexityOptions) { - if (passwordComplexityOptions.isPresent()) { - this.passwordComplexityOptions = OptionalNullable.of(passwordComplexityOptions.get()); - } else { - this.passwordComplexityOptions = OptionalNullable.absent(); - } - return this; - } - - public Builder passwordComplexityOptions( - com.auth0.client.mgmt.core.Nullable passwordComplexityOptions) { - if (passwordComplexityOptions.isNull()) { - this.passwordComplexityOptions = OptionalNullable.ofNull(); - } else if (passwordComplexityOptions.isEmpty()) { - this.passwordComplexityOptions = OptionalNullable.absent(); - } else { - this.passwordComplexityOptions = OptionalNullable.of(passwordComplexityOptions.get()); - } - return this; - } - - @JsonSetter(value = "password_history", nulls = Nulls.SKIP) - public Builder passwordHistory(@Nullable OptionalNullable passwordHistory) { - this.passwordHistory = passwordHistory; - return this; - } - - public Builder passwordHistory(ConnectionPasswordHistoryOptions passwordHistory) { - this.passwordHistory = OptionalNullable.of(passwordHistory); - return this; - } - - public Builder passwordHistory(Optional passwordHistory) { - if (passwordHistory.isPresent()) { - this.passwordHistory = OptionalNullable.of(passwordHistory.get()); - } else { - this.passwordHistory = OptionalNullable.absent(); - } - return this; - } - - public Builder passwordHistory( - com.auth0.client.mgmt.core.Nullable passwordHistory) { - if (passwordHistory.isNull()) { - this.passwordHistory = OptionalNullable.ofNull(); - } else if (passwordHistory.isEmpty()) { - this.passwordHistory = OptionalNullable.absent(); - } else { - this.passwordHistory = OptionalNullable.of(passwordHistory.get()); - } - return this; - } - - @JsonSetter(value = "password_no_personal_info", nulls = Nulls.SKIP) - public Builder passwordNoPersonalInfo( - @Nullable OptionalNullable passwordNoPersonalInfo) { - this.passwordNoPersonalInfo = passwordNoPersonalInfo; - return this; - } - - public Builder passwordNoPersonalInfo(ConnectionPasswordNoPersonalInfoOptions passwordNoPersonalInfo) { - this.passwordNoPersonalInfo = OptionalNullable.of(passwordNoPersonalInfo); - return this; - } - - public Builder passwordNoPersonalInfo( - Optional passwordNoPersonalInfo) { - if (passwordNoPersonalInfo.isPresent()) { - this.passwordNoPersonalInfo = OptionalNullable.of(passwordNoPersonalInfo.get()); - } else { - this.passwordNoPersonalInfo = OptionalNullable.absent(); - } - return this; - } - - public Builder passwordNoPersonalInfo( - com.auth0.client.mgmt.core.Nullable passwordNoPersonalInfo) { - if (passwordNoPersonalInfo.isNull()) { - this.passwordNoPersonalInfo = OptionalNullable.ofNull(); - } else if (passwordNoPersonalInfo.isEmpty()) { - this.passwordNoPersonalInfo = OptionalNullable.absent(); - } else { - this.passwordNoPersonalInfo = OptionalNullable.of(passwordNoPersonalInfo.get()); - } - return this; - } - - @JsonSetter(value = "password_dictionary", nulls = Nulls.SKIP) - public Builder passwordDictionary( - @Nullable OptionalNullable passwordDictionary) { - this.passwordDictionary = passwordDictionary; - return this; - } - - public Builder passwordDictionary(ConnectionPasswordDictionaryOptions passwordDictionary) { - this.passwordDictionary = OptionalNullable.of(passwordDictionary); - return this; - } - - public Builder passwordDictionary(Optional passwordDictionary) { - if (passwordDictionary.isPresent()) { - this.passwordDictionary = OptionalNullable.of(passwordDictionary.get()); - } else { - this.passwordDictionary = OptionalNullable.absent(); - } - return this; - } - - public Builder passwordDictionary( - com.auth0.client.mgmt.core.Nullable passwordDictionary) { - if (passwordDictionary.isNull()) { - this.passwordDictionary = OptionalNullable.ofNull(); - } else if (passwordDictionary.isEmpty()) { - this.passwordDictionary = OptionalNullable.absent(); - } else { - this.passwordDictionary = OptionalNullable.of(passwordDictionary.get()); - } - return this; - } - - @JsonSetter(value = "api_enable_users", nulls = Nulls.SKIP) - public Builder apiEnableUsers(Optional apiEnableUsers) { - this.apiEnableUsers = apiEnableUsers; - return this; - } - - public Builder apiEnableUsers(Boolean apiEnableUsers) { - this.apiEnableUsers = Optional.ofNullable(apiEnableUsers); - return this; - } - - @JsonSetter(value = "basic_profile", nulls = Nulls.SKIP) - public Builder basicProfile(Optional basicProfile) { - this.basicProfile = basicProfile; - return this; - } - - public Builder basicProfile(Boolean basicProfile) { - this.basicProfile = Optional.ofNullable(basicProfile); - return this; - } - - @JsonSetter(value = "ext_admin", nulls = Nulls.SKIP) - public Builder extAdmin(Optional extAdmin) { - this.extAdmin = extAdmin; - return this; - } - - public Builder extAdmin(Boolean extAdmin) { - this.extAdmin = Optional.ofNullable(extAdmin); - return this; - } - - @JsonSetter(value = "ext_is_suspended", nulls = Nulls.SKIP) - public Builder extIsSuspended(Optional extIsSuspended) { - this.extIsSuspended = extIsSuspended; - return this; - } - - public Builder extIsSuspended(Boolean extIsSuspended) { - this.extIsSuspended = Optional.ofNullable(extIsSuspended); - return this; - } - - @JsonSetter(value = "ext_agreed_terms", nulls = Nulls.SKIP) - public Builder extAgreedTerms(Optional extAgreedTerms) { - this.extAgreedTerms = extAgreedTerms; - return this; - } - - public Builder extAgreedTerms(Boolean extAgreedTerms) { - this.extAgreedTerms = Optional.ofNullable(extAgreedTerms); - return this; - } - - @JsonSetter(value = "ext_groups", nulls = Nulls.SKIP) - public Builder extGroups(Optional extGroups) { - this.extGroups = extGroups; - return this; - } - - public Builder extGroups(Boolean extGroups) { - this.extGroups = Optional.ofNullable(extGroups); - return this; - } - - @JsonSetter(value = "ext_assigned_plans", nulls = Nulls.SKIP) - public Builder extAssignedPlans(Optional extAssignedPlans) { - this.extAssignedPlans = extAssignedPlans; - return this; - } - - public Builder extAssignedPlans(Boolean extAssignedPlans) { - this.extAssignedPlans = Optional.ofNullable(extAssignedPlans); - return this; - } - - @JsonSetter(value = "ext_profile", nulls = Nulls.SKIP) - public Builder extProfile(Optional extProfile) { - this.extProfile = extProfile; - return this; - } - - public Builder extProfile(Boolean extProfile) { - this.extProfile = Optional.ofNullable(extProfile); - return this; - } - - @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; - } - - @JsonSetter(value = "upstream_params", nulls = Nulls.SKIP) - public Builder upstreamParams( - @Nullable - OptionalNullable>> - upstreamParams) { - this.upstreamParams = upstreamParams; - return this; - } - - public Builder upstreamParams( - Map> upstreamParams) { - this.upstreamParams = OptionalNullable.of(upstreamParams); - return this; - } - - public Builder upstreamParams( - Optional>> upstreamParams) { - if (upstreamParams.isPresent()) { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } else { - this.upstreamParams = OptionalNullable.absent(); - } - return this; - } - - public Builder upstreamParams( - com.auth0.client.mgmt.core.Nullable< - Map>> - upstreamParams) { - if (upstreamParams.isNull()) { - this.upstreamParams = OptionalNullable.ofNull(); - } else if (upstreamParams.isEmpty()) { - this.upstreamParams = OptionalNullable.absent(); - } else { - this.upstreamParams = OptionalNullable.of(upstreamParams.get()); - } - return this; - } - - @JsonSetter(value = "set_user_root_attributes", nulls = Nulls.SKIP) - public Builder setUserRootAttributes(Optional setUserRootAttributes) { - this.setUserRootAttributes = setUserRootAttributes; - return this; - } - - public Builder setUserRootAttributes(ConnectionSetUserRootAttributesEnum setUserRootAttributes) { - this.setUserRootAttributes = Optional.ofNullable(setUserRootAttributes); - return this; - } - - @JsonSetter(value = "gateway_authentication", nulls = Nulls.SKIP) - public Builder gatewayAuthentication( - @Nullable OptionalNullable gatewayAuthentication) { - this.gatewayAuthentication = gatewayAuthentication; - return this; - } - - public Builder gatewayAuthentication(ConnectionGatewayAuthentication gatewayAuthentication) { - this.gatewayAuthentication = OptionalNullable.of(gatewayAuthentication); - return this; - } - - public Builder gatewayAuthentication(Optional gatewayAuthentication) { - if (gatewayAuthentication.isPresent()) { - this.gatewayAuthentication = OptionalNullable.of(gatewayAuthentication.get()); - } else { - this.gatewayAuthentication = OptionalNullable.absent(); - } - return this; - } - - public Builder gatewayAuthentication( - com.auth0.client.mgmt.core.Nullable gatewayAuthentication) { - if (gatewayAuthentication.isNull()) { - this.gatewayAuthentication = OptionalNullable.ofNull(); - } else if (gatewayAuthentication.isEmpty()) { - this.gatewayAuthentication = OptionalNullable.absent(); - } else { - this.gatewayAuthentication = OptionalNullable.of(gatewayAuthentication.get()); - } - 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; - } - - public UpdateConnectionOptions build() { - return new UpdateConnectionOptions( - validation, - nonPersistentAttrs, - precedence, - attributes, - enableScriptContext, - enabledDatabaseCustomization, - importMode, - customScripts, - authenticationMethods, - passkeyOptions, - passwordPolicy, - passwordComplexityOptions, - passwordHistory, - passwordNoPersonalInfo, - passwordDictionary, - apiEnableUsers, - basicProfile, - extAdmin, - extIsSuspended, - extAgreedTerms, - extGroups, - extAssignedPlans, - extProfile, - disableSelfServiceChangePassword, - upstreamParams, - setUserRootAttributes, - gatewayAuthentication, - federatedConnectionsAccessTokens, - 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 deleted file mode 100644 index 3ff10a660..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionProfileRequestContent.java +++ /dev/null @@ -1,232 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateConnectionProfileRequestContent.Builder.class) -public final class UpdateConnectionProfileRequestContent { - private final Optional name; - - private final Optional organization; - - private final Optional connectionNamePrefixTemplate; - - private final Optional> enabledFeatures; - - private final Optional connectionConfig; - - private final Optional strategyOverrides; - - private final Map additionalProperties; - - private UpdateConnectionProfileRequestContent( - Optional name, - Optional organization, - Optional connectionNamePrefixTemplate, - Optional> enabledFeatures, - Optional connectionConfig, - Optional strategyOverrides, - Map additionalProperties) { - this.name = name; - this.organization = organization; - this.connectionNamePrefixTemplate = connectionNamePrefixTemplate; - this.enabledFeatures = enabledFeatures; - this.connectionConfig = connectionConfig; - this.strategyOverrides = strategyOverrides; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("organization") - public Optional getOrganization() { - return organization; - } - - @JsonProperty("connection_name_prefix_template") - public Optional getConnectionNamePrefixTemplate() { - return connectionNamePrefixTemplate; - } - - @JsonProperty("enabled_features") - public Optional> getEnabledFeatures() { - return enabledFeatures; - } - - @JsonProperty("connection_config") - public Optional getConnectionConfig() { - return connectionConfig; - } - - @JsonProperty("strategy_overrides") - public Optional getStrategyOverrides() { - return strategyOverrides; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionProfileRequestContent - && equalTo((UpdateConnectionProfileRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionProfileRequestContent other) { - return name.equals(other.name) - && organization.equals(other.organization) - && connectionNamePrefixTemplate.equals(other.connectionNamePrefixTemplate) - && enabledFeatures.equals(other.enabledFeatures) - && connectionConfig.equals(other.connectionConfig) - && strategyOverrides.equals(other.strategyOverrides); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.organization, - this.connectionNamePrefixTemplate, - this.enabledFeatures, - this.connectionConfig, - this.strategyOverrides); - } - - @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 organization = Optional.empty(); - - private Optional connectionNamePrefixTemplate = Optional.empty(); - - private Optional> enabledFeatures = Optional.empty(); - - private Optional connectionConfig = Optional.empty(); - - private Optional strategyOverrides = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionProfileRequestContent other) { - name(other.getName()); - organization(other.getOrganization()); - connectionNamePrefixTemplate(other.getConnectionNamePrefixTemplate()); - enabledFeatures(other.getEnabledFeatures()); - connectionConfig(other.getConnectionConfig()); - strategyOverrides(other.getStrategyOverrides()); - 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 = "organization", nulls = Nulls.SKIP) - public Builder organization(Optional organization) { - this.organization = organization; - return this; - } - - public Builder organization(ConnectionProfileOrganization organization) { - this.organization = Optional.ofNullable(organization); - return this; - } - - @JsonSetter(value = "connection_name_prefix_template", nulls = Nulls.SKIP) - public Builder connectionNamePrefixTemplate(Optional connectionNamePrefixTemplate) { - this.connectionNamePrefixTemplate = connectionNamePrefixTemplate; - return this; - } - - public Builder connectionNamePrefixTemplate(String connectionNamePrefixTemplate) { - this.connectionNamePrefixTemplate = Optional.ofNullable(connectionNamePrefixTemplate); - return this; - } - - @JsonSetter(value = "enabled_features", nulls = Nulls.SKIP) - public Builder enabledFeatures(Optional> enabledFeatures) { - this.enabledFeatures = enabledFeatures; - return this; - } - - public Builder enabledFeatures(List enabledFeatures) { - this.enabledFeatures = Optional.ofNullable(enabledFeatures); - return this; - } - - @JsonSetter(value = "connection_config", nulls = Nulls.SKIP) - public Builder connectionConfig(Optional connectionConfig) { - this.connectionConfig = connectionConfig; - return this; - } - - public Builder connectionConfig(ConnectionProfileConfig connectionConfig) { - this.connectionConfig = Optional.ofNullable(connectionConfig); - return this; - } - - @JsonSetter(value = "strategy_overrides", nulls = Nulls.SKIP) - public Builder strategyOverrides(Optional strategyOverrides) { - this.strategyOverrides = strategyOverrides; - return this; - } - - public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOverrides) { - this.strategyOverrides = Optional.ofNullable(strategyOverrides); - return this; - } - - public UpdateConnectionProfileRequestContent build() { - return new UpdateConnectionProfileRequestContent( - name, - organization, - connectionNamePrefixTemplate, - enabledFeatures, - connectionConfig, - strategyOverrides, - 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 deleted file mode 100644 index 0093ba01e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionProfileResponseContent.java +++ /dev/null @@ -1,258 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateConnectionProfileResponseContent.Builder.class) -public final class UpdateConnectionProfileResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional organization; - - private final Optional connectionNamePrefixTemplate; - - private final Optional> enabledFeatures; - - private final Optional connectionConfig; - - private final Optional strategyOverrides; - - private final Map additionalProperties; - - private UpdateConnectionProfileResponseContent( - Optional id, - Optional name, - Optional organization, - Optional connectionNamePrefixTemplate, - Optional> enabledFeatures, - Optional connectionConfig, - Optional strategyOverrides, - Map additionalProperties) { - this.id = id; - this.name = name; - this.organization = organization; - this.connectionNamePrefixTemplate = connectionNamePrefixTemplate; - this.enabledFeatures = enabledFeatures; - this.connectionConfig = connectionConfig; - this.strategyOverrides = strategyOverrides; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("organization") - public Optional getOrganization() { - return organization; - } - - @JsonProperty("connection_name_prefix_template") - public Optional getConnectionNamePrefixTemplate() { - return connectionNamePrefixTemplate; - } - - @JsonProperty("enabled_features") - public Optional> getEnabledFeatures() { - return enabledFeatures; - } - - @JsonProperty("connection_config") - public Optional getConnectionConfig() { - return connectionConfig; - } - - @JsonProperty("strategy_overrides") - public Optional getStrategyOverrides() { - return strategyOverrides; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionProfileResponseContent - && equalTo((UpdateConnectionProfileResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionProfileResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && organization.equals(other.organization) - && connectionNamePrefixTemplate.equals(other.connectionNamePrefixTemplate) - && enabledFeatures.equals(other.enabledFeatures) - && connectionConfig.equals(other.connectionConfig) - && strategyOverrides.equals(other.strategyOverrides); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.organization, - this.connectionNamePrefixTemplate, - this.enabledFeatures, - this.connectionConfig, - this.strategyOverrides); - } - - @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 organization = Optional.empty(); - - private Optional connectionNamePrefixTemplate = Optional.empty(); - - private Optional> enabledFeatures = Optional.empty(); - - private Optional connectionConfig = Optional.empty(); - - private Optional strategyOverrides = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionProfileResponseContent other) { - id(other.getId()); - name(other.getName()); - organization(other.getOrganization()); - connectionNamePrefixTemplate(other.getConnectionNamePrefixTemplate()); - enabledFeatures(other.getEnabledFeatures()); - connectionConfig(other.getConnectionConfig()); - strategyOverrides(other.getStrategyOverrides()); - 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 = "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 = "organization", nulls = Nulls.SKIP) - public Builder organization(Optional organization) { - this.organization = organization; - return this; - } - - public Builder organization(ConnectionProfileOrganization organization) { - this.organization = Optional.ofNullable(organization); - return this; - } - - @JsonSetter(value = "connection_name_prefix_template", nulls = Nulls.SKIP) - public Builder connectionNamePrefixTemplate(Optional connectionNamePrefixTemplate) { - this.connectionNamePrefixTemplate = connectionNamePrefixTemplate; - return this; - } - - public Builder connectionNamePrefixTemplate(String connectionNamePrefixTemplate) { - this.connectionNamePrefixTemplate = Optional.ofNullable(connectionNamePrefixTemplate); - return this; - } - - @JsonSetter(value = "enabled_features", nulls = Nulls.SKIP) - public Builder enabledFeatures(Optional> enabledFeatures) { - this.enabledFeatures = enabledFeatures; - return this; - } - - public Builder enabledFeatures(List enabledFeatures) { - this.enabledFeatures = Optional.ofNullable(enabledFeatures); - return this; - } - - @JsonSetter(value = "connection_config", nulls = Nulls.SKIP) - public Builder connectionConfig(Optional connectionConfig) { - this.connectionConfig = connectionConfig; - return this; - } - - public Builder connectionConfig(ConnectionProfileConfig connectionConfig) { - this.connectionConfig = Optional.ofNullable(connectionConfig); - return this; - } - - @JsonSetter(value = "strategy_overrides", nulls = Nulls.SKIP) - public Builder strategyOverrides(Optional strategyOverrides) { - this.strategyOverrides = strategyOverrides; - return this; - } - - public Builder strategyOverrides(ConnectionProfileStrategyOverrides strategyOverrides) { - this.strategyOverrides = Optional.ofNullable(strategyOverrides); - return this; - } - - public UpdateConnectionProfileResponseContent build() { - return new UpdateConnectionProfileResponseContent( - id, - name, - organization, - connectionNamePrefixTemplate, - enabledFeatures, - connectionConfig, - strategyOverrides, - 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 deleted file mode 100644 index 390990348..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContent.java +++ /dev/null @@ -1,372 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContent.Builder.class) -public final class UpdateConnectionRequestContent { - private final Optional displayName; - - private final OptionalNullable options; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional showAsButton; - - private final Optional> realms; - - private final Optional>> metadata; - - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Map additionalProperties; - - private UpdateConnectionRequestContent( - Optional displayName, - OptionalNullable options, - Optional> enabledClients, - Optional isDomainConnection, - Optional showAsButton, - Optional> realms, - Optional>> metadata, - Optional authentication, - Optional connectedAccounts, - Map additionalProperties) { - this.displayName = displayName; - this.options = options; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.showAsButton = showAsButton; - this.realms = realms; - this.metadata = metadata; - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.additionalProperties = additionalProperties; - } - - /** - * @return The connection name used in the new universal login experience. If display_name is not included in the request, the field will be overwritten with the name value. - */ - @JsonProperty("display_name") - public Optional getDisplayName() { - return displayName; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("options") - public OptionalNullable getOptions() { - if (options == null) { - return OptionalNullable.absent(); - } - return options; - } - - /** - * @return DEPRECATED property. Use the PATCH /v2/connections/{id}/clients endpoint to enable or disable the connection for any clients. - */ - @JsonProperty("enabled_clients") - public Optional> getEnabledClients() { - return enabledClients; - } - - /** - * @return <code>true</code> promotes to a domain-level connection so that third-party applications can use it. <code>false</code> does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to <code>false</code>.) - */ - @JsonProperty("is_domain_connection") - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - /** - * @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 <code>false</code>.) - */ - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - /** - * @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("metadata") - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("authentication") - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("options") - private OptionalNullable _getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContent && equalTo((UpdateConnectionRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContent other) { - return displayName.equals(other.displayName) - && options.equals(other.options) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && showAsButton.equals(other.showAsButton) - && realms.equals(other.realms) - && metadata.equals(other.metadata) - && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.options, - this.enabledClients, - this.isDomainConnection, - this.showAsButton, - this.realms, - this.metadata, - this.authentication, - this.connectedAccounts); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private OptionalNullable options = OptionalNullable.absent(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContent other) { - displayName(other.getDisplayName()); - options(other.getOptions()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - showAsButton(other.getShowAsButton()); - realms(other.getRealms()); - metadata(other.getMetadata()); - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - return this; - } - - /** - *

The connection name used in the new universal login experience. If display_name is not included in the request, the field will be overwritten with the name value.

- */ - @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 = "options", nulls = Nulls.SKIP) - public Builder options(@Nullable OptionalNullable options) { - this.options = options; - return this; - } - - public Builder options(UpdateConnectionOptions options) { - this.options = OptionalNullable.of(options); - return this; - } - - public Builder options(Optional options) { - if (options.isPresent()) { - this.options = OptionalNullable.of(options.get()); - } else { - this.options = OptionalNullable.absent(); - } - return this; - } - - public Builder options(com.auth0.client.mgmt.core.Nullable options) { - if (options.isNull()) { - this.options = OptionalNullable.ofNull(); - } else if (options.isEmpty()) { - this.options = OptionalNullable.absent(); - } else { - this.options = OptionalNullable.of(options.get()); - } - return this; - } - - /** - *

DEPRECATED property. Use the PATCH /v2/connections/{id}/clients endpoint to enable or disable the connection for any clients.

- */ - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - /** - *

<code>true</code> promotes to a domain-level connection so that third-party applications can use it. <code>false</code> does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to <code>false</code>.)

- */ - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - /** - *

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 <code>false</code>.)

- */ - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - 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.

- */ - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public Builder realms(Optional> realms) { - this.realms = realms; - return this; - } - - public Builder realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public Builder authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - public Builder authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public Builder connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - public Builder connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - public UpdateConnectionRequestContent build() { - return new UpdateConnectionRequestContent( - displayName, - options, - enabledClients, - isDomainConnection, - showAsButton, - realms, - metadata, - authentication, - connectedAccounts, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAd.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAd.java deleted file mode 100644 index 6a076a064..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAd.java +++ /dev/null @@ -1,201 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentAd.Builder.class) -public final class UpdateConnectionRequestContentAd implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentAd( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentAd && equalTo((UpdateConnectionRequestContentAd) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentAd other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentAd other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsAd options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentAd build() { - return new UpdateConnectionRequestContentAd( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAdfs.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAdfs.java deleted file mode 100644 index 40fb13538..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAdfs.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentAdfs.Builder.class) -public final class UpdateConnectionRequestContentAdfs implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentAdfs( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentAdfs - && equalTo((UpdateConnectionRequestContentAdfs) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentAdfs other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentAdfs other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsAdfs options) { - this.options = Optional.ofNullable(options); - return this; - } - - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - public UpdateConnectionRequestContentAdfs build() { - return new UpdateConnectionRequestContentAdfs( - displayName, - enabledClients, - isDomainConnection, - metadata, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAmazon.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAmazon.java deleted file mode 100644 index ea4f723f6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAmazon.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentAmazon.Builder.class) -public final class UpdateConnectionRequestContentAmazon implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentAmazon( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentAmazon - && equalTo((UpdateConnectionRequestContentAmazon) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentAmazon other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentAmazon other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsAmazon options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentAmazon build() { - return new UpdateConnectionRequestContentAmazon( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAol.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAol.java deleted file mode 100644 index 14c9cf954..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAol.java +++ /dev/null @@ -1,201 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentAol.Builder.class) -public final class UpdateConnectionRequestContentAol implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentAol( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentAol && equalTo((UpdateConnectionRequestContentAol) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentAol other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentAol other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsAol options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentAol build() { - return new UpdateConnectionRequestContentAol( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentApple.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentApple.java deleted file mode 100644 index 38a32b74b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentApple.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentApple.Builder.class) -public final class UpdateConnectionRequestContentApple implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentApple( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentApple - && equalTo((UpdateConnectionRequestContentApple) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentApple other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentApple other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsApple options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentApple build() { - return new UpdateConnectionRequestContentApple( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAuth0.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAuth0.java deleted file mode 100644 index 2b939b4d8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAuth0.java +++ /dev/null @@ -1,231 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentAuth0.Builder.class) -public final class UpdateConnectionRequestContentAuth0 implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Optional> realms; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentAuth0( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Optional> realms, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.realms = realms; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("realms") - public Optional> getRealms() { - return realms; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentAuth0 - && equalTo((UpdateConnectionRequestContentAuth0) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentAuth0 other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options) - && realms.equals(other.realms); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.options, - this.realms); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional> realms = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentAuth0 other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - realms(other.getRealms()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsAuth0 options) { - this.options = Optional.ofNullable(options); - return this; - } - - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public Builder realms(Optional> realms) { - this.realms = realms; - return this; - } - - public Builder realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - public UpdateConnectionRequestContentAuth0 build() { - return new UpdateConnectionRequestContentAuth0( - displayName, enabledClients, isDomainConnection, metadata, options, realms, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAuth0Oidc.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAuth0Oidc.java deleted file mode 100644 index 2d0fb032f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAuth0Oidc.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentAuth0Oidc.Builder.class) -public final class UpdateConnectionRequestContentAuth0Oidc implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentAuth0Oidc( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentAuth0Oidc - && equalTo((UpdateConnectionRequestContentAuth0Oidc) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentAuth0Oidc other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentAuth0Oidc other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsAuth0Oidc options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentAuth0Oidc build() { - return new UpdateConnectionRequestContentAuth0Oidc( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAzureAd.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAzureAd.java deleted file mode 100644 index 8a1642c71..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentAzureAd.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentAzureAd.Builder.class) -public final class UpdateConnectionRequestContentAzureAd implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentAzureAd( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentAzureAd - && equalTo((UpdateConnectionRequestContentAzureAd) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentAzureAd other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentAzureAd other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsAzureAd options) { - this.options = Optional.ofNullable(options); - return this; - } - - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - public UpdateConnectionRequestContentAzureAd build() { - return new UpdateConnectionRequestContentAzureAd( - displayName, - enabledClients, - isDomainConnection, - metadata, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentBaidu.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentBaidu.java deleted file mode 100644 index 98dd92016..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentBaidu.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentBaidu.Builder.class) -public final class UpdateConnectionRequestContentBaidu implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentBaidu( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentBaidu - && equalTo((UpdateConnectionRequestContentBaidu) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentBaidu other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentBaidu other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsBaidu options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentBaidu build() { - return new UpdateConnectionRequestContentBaidu( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentBitbucket.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentBitbucket.java deleted file mode 100644 index c2339b7b9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentBitbucket.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentBitbucket.Builder.class) -public final class UpdateConnectionRequestContentBitbucket implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentBitbucket( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentBitbucket - && equalTo((UpdateConnectionRequestContentBitbucket) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentBitbucket other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentBitbucket other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsBitbucket options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentBitbucket build() { - return new UpdateConnectionRequestContentBitbucket( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentBitly.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentBitly.java deleted file mode 100644 index f1d8f9e58..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentBitly.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentBitly.Builder.class) -public final class UpdateConnectionRequestContentBitly implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentBitly( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentBitly - && equalTo((UpdateConnectionRequestContentBitly) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentBitly other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentBitly other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsBitly options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentBitly build() { - return new UpdateConnectionRequestContentBitly( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentBox.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentBox.java deleted file mode 100644 index fd58711dd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentBox.java +++ /dev/null @@ -1,264 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentBox.Builder.class) -public final class UpdateConnectionRequestContentBox implements IConnectionCommon, IConnectionPurposes { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentBox( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional authentication, - Optional connectedAccounts, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentBox && equalTo((UpdateConnectionRequestContentBox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentBox other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.authentication, - this.connectedAccounts, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentBox other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public Builder authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - public Builder authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public Builder connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - public Builder connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsBox options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentBox build() { - return new UpdateConnectionRequestContentBox( - displayName, - enabledClients, - isDomainConnection, - metadata, - authentication, - connectedAccounts, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentCustom.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentCustom.java deleted file mode 100644 index 86ed5acdf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentCustom.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentCustom.Builder.class) -public final class UpdateConnectionRequestContentCustom implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional> options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentCustom( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional> options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentCustom - && equalTo((UpdateConnectionRequestContentCustom) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentCustom other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional> options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentCustom other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional> options) { - this.options = options; - return this; - } - - public Builder options(Map options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentCustom build() { - return new UpdateConnectionRequestContentCustom( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentDaccount.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentDaccount.java deleted file mode 100644 index c8ce9e319..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentDaccount.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentDaccount.Builder.class) -public final class UpdateConnectionRequestContentDaccount implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentDaccount( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentDaccount - && equalTo((UpdateConnectionRequestContentDaccount) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentDaccount other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentDaccount other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsDaccount options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentDaccount build() { - return new UpdateConnectionRequestContentDaccount( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentDropbox.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentDropbox.java deleted file mode 100644 index f8be18451..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentDropbox.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentDropbox.Builder.class) -public final class UpdateConnectionRequestContentDropbox implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentDropbox( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentDropbox - && equalTo((UpdateConnectionRequestContentDropbox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentDropbox other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentDropbox other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsDropbox options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentDropbox build() { - return new UpdateConnectionRequestContentDropbox( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentDwolla.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentDwolla.java deleted file mode 100644 index 3639a1171..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentDwolla.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentDwolla.Builder.class) -public final class UpdateConnectionRequestContentDwolla implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentDwolla( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentDwolla - && equalTo((UpdateConnectionRequestContentDwolla) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentDwolla other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentDwolla other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsDwolla options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentDwolla build() { - return new UpdateConnectionRequestContentDwolla( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentEmail.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentEmail.java deleted file mode 100644 index a3c9757f9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentEmail.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentEmail.Builder.class) -public final class UpdateConnectionRequestContentEmail implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentEmail( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentEmail - && equalTo((UpdateConnectionRequestContentEmail) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentEmail other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentEmail other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsEmail options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentEmail build() { - return new UpdateConnectionRequestContentEmail( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentEvernote.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentEvernote.java deleted file mode 100644 index c8387ec26..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentEvernote.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentEvernote.Builder.class) -public final class UpdateConnectionRequestContentEvernote implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentEvernote( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentEvernote - && equalTo((UpdateConnectionRequestContentEvernote) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentEvernote other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentEvernote other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsEvernote options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentEvernote build() { - return new UpdateConnectionRequestContentEvernote( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentEvernoteSandbox.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentEvernoteSandbox.java deleted file mode 100644 index 15008e6ff..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentEvernoteSandbox.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentEvernoteSandbox.Builder.class) -public final class UpdateConnectionRequestContentEvernoteSandbox implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentEvernoteSandbox( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentEvernoteSandbox - && equalTo((UpdateConnectionRequestContentEvernoteSandbox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentEvernoteSandbox other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentEvernoteSandbox other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsEvernote options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentEvernoteSandbox build() { - return new UpdateConnectionRequestContentEvernoteSandbox( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentExact.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentExact.java deleted file mode 100644 index 41d9d6ec6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentExact.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentExact.Builder.class) -public final class UpdateConnectionRequestContentExact implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentExact( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentExact - && equalTo((UpdateConnectionRequestContentExact) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentExact other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentExact other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsExact options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentExact build() { - return new UpdateConnectionRequestContentExact( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentFacebook.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentFacebook.java deleted file mode 100644 index 341a645d6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentFacebook.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentFacebook.Builder.class) -public final class UpdateConnectionRequestContentFacebook implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentFacebook( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentFacebook - && equalTo((UpdateConnectionRequestContentFacebook) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentFacebook other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentFacebook other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsFacebook options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentFacebook build() { - return new UpdateConnectionRequestContentFacebook( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentFitbit.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentFitbit.java deleted file mode 100644 index 41f14d24d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentFitbit.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentFitbit.Builder.class) -public final class UpdateConnectionRequestContentFitbit implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentFitbit( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentFitbit - && equalTo((UpdateConnectionRequestContentFitbit) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentFitbit other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentFitbit other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsFitbit options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentFitbit build() { - return new UpdateConnectionRequestContentFitbit( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentFlickr.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentFlickr.java deleted file mode 100644 index 8ece90a04..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentFlickr.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentFlickr.Builder.class) -public final class UpdateConnectionRequestContentFlickr implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentFlickr( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentFlickr - && equalTo((UpdateConnectionRequestContentFlickr) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentFlickr other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentFlickr other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsFlickr options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentFlickr build() { - return new UpdateConnectionRequestContentFlickr( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentGitHub.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentGitHub.java deleted file mode 100644 index ab6f28c7c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentGitHub.java +++ /dev/null @@ -1,265 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentGitHub.Builder.class) -public final class UpdateConnectionRequestContentGitHub implements IConnectionCommon, IConnectionPurposes { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentGitHub( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional authentication, - Optional connectedAccounts, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentGitHub - && equalTo((UpdateConnectionRequestContentGitHub) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentGitHub other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.authentication, - this.connectedAccounts, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentGitHub other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public Builder authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - public Builder authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public Builder connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - public Builder connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsGitHub options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentGitHub build() { - return new UpdateConnectionRequestContentGitHub( - displayName, - enabledClients, - isDomainConnection, - metadata, - authentication, - connectedAccounts, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentGoogleApps.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentGoogleApps.java deleted file mode 100644 index bc801b35d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentGoogleApps.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentGoogleApps.Builder.class) -public final class UpdateConnectionRequestContentGoogleApps implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentGoogleApps( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentGoogleApps - && equalTo((UpdateConnectionRequestContentGoogleApps) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentGoogleApps other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentGoogleApps other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsGoogleApps options) { - this.options = Optional.ofNullable(options); - return this; - } - - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - public UpdateConnectionRequestContentGoogleApps build() { - return new UpdateConnectionRequestContentGoogleApps( - displayName, - enabledClients, - isDomainConnection, - metadata, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentGoogleOAuth2.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentGoogleOAuth2.java deleted file mode 100644 index d634e0979..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentGoogleOAuth2.java +++ /dev/null @@ -1,265 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentGoogleOAuth2.Builder.class) -public final class UpdateConnectionRequestContentGoogleOAuth2 implements IConnectionCommon, IConnectionPurposes { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentGoogleOAuth2( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional authentication, - Optional connectedAccounts, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentGoogleOAuth2 - && equalTo((UpdateConnectionRequestContentGoogleOAuth2) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentGoogleOAuth2 other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.authentication, - this.connectedAccounts, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentGoogleOAuth2 other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public Builder authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - public Builder authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public Builder connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - public Builder connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsGoogleOAuth2 options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentGoogleOAuth2 build() { - return new UpdateConnectionRequestContentGoogleOAuth2( - displayName, - enabledClients, - isDomainConnection, - metadata, - authentication, - connectedAccounts, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentInstagram.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentInstagram.java deleted file mode 100644 index 5145f4796..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentInstagram.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentInstagram.Builder.class) -public final class UpdateConnectionRequestContentInstagram implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentInstagram( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentInstagram - && equalTo((UpdateConnectionRequestContentInstagram) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentInstagram other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentInstagram other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsInstagram options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentInstagram build() { - return new UpdateConnectionRequestContentInstagram( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentIp.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentIp.java deleted file mode 100644 index 93c5fe478..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentIp.java +++ /dev/null @@ -1,236 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentIp.Builder.class) -public final class UpdateConnectionRequestContentIp implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional> options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentIp( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional> options, - Optional showAsButton, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentIp && equalTo((UpdateConnectionRequestContentIp) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentIp other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional> options = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentIp other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional> options) { - this.options = options; - return this; - } - - public Builder options(Map options) { - this.options = Optional.ofNullable(options); - return this; - } - - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - public UpdateConnectionRequestContentIp build() { - return new UpdateConnectionRequestContentIp( - displayName, - enabledClients, - isDomainConnection, - metadata, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentLine.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentLine.java deleted file mode 100644 index bdb9cc39b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentLine.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentLine.Builder.class) -public final class UpdateConnectionRequestContentLine implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentLine( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentLine - && equalTo((UpdateConnectionRequestContentLine) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentLine other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentLine other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsLine options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentLine build() { - return new UpdateConnectionRequestContentLine( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentLinkedin.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentLinkedin.java deleted file mode 100644 index 745f58230..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentLinkedin.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentLinkedin.Builder.class) -public final class UpdateConnectionRequestContentLinkedin implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentLinkedin( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentLinkedin - && equalTo((UpdateConnectionRequestContentLinkedin) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentLinkedin other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentLinkedin other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsLinkedin options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentLinkedin build() { - return new UpdateConnectionRequestContentLinkedin( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentMiicard.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentMiicard.java deleted file mode 100644 index cd2660f58..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentMiicard.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentMiicard.Builder.class) -public final class UpdateConnectionRequestContentMiicard implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentMiicard( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentMiicard - && equalTo((UpdateConnectionRequestContentMiicard) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentMiicard other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentMiicard other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsMiicard options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentMiicard build() { - return new UpdateConnectionRequestContentMiicard( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOAuth1.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOAuth1.java deleted file mode 100644 index a5a031815..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOAuth1.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentOAuth1.Builder.class) -public final class UpdateConnectionRequestContentOAuth1 implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentOAuth1( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentOAuth1 - && equalTo((UpdateConnectionRequestContentOAuth1) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentOAuth1 other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentOAuth1 other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsOAuth1 options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentOAuth1 build() { - return new UpdateConnectionRequestContentOAuth1( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOAuth2.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOAuth2.java deleted file mode 100644 index 526fc6ff9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOAuth2.java +++ /dev/null @@ -1,265 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentOAuth2.Builder.class) -public final class UpdateConnectionRequestContentOAuth2 implements IConnectionCommon, IConnectionPurposes { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentOAuth2( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional authentication, - Optional connectedAccounts, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentOAuth2 - && equalTo((UpdateConnectionRequestContentOAuth2) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentOAuth2 other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.authentication, - this.connectedAccounts, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentOAuth2 other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public Builder authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - public Builder authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public Builder connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - public Builder connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsOAuth2 options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentOAuth2 build() { - return new UpdateConnectionRequestContentOAuth2( - displayName, - enabledClients, - isDomainConnection, - metadata, - authentication, - connectedAccounts, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOffice365.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOffice365.java deleted file mode 100644 index af7cadc70..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOffice365.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentOffice365.Builder.class) -public final class UpdateConnectionRequestContentOffice365 implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentOffice365( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentOffice365 - && equalTo((UpdateConnectionRequestContentOffice365) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentOffice365 other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentOffice365 other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsOffice365 options) { - this.options = Optional.ofNullable(options); - return this; - } - - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - public UpdateConnectionRequestContentOffice365 build() { - return new UpdateConnectionRequestContentOffice365( - displayName, - enabledClients, - isDomainConnection, - metadata, - options, - showAsButton, - 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 deleted file mode 100644 index 232aaefa5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOidc.java +++ /dev/null @@ -1,289 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentOidc.Builder.class) -public final class UpdateConnectionRequestContentOidc implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentOidc( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Optional authentication, - Optional connectedAccounts, - Optional showAsButton, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("authentication") - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentOidc - && equalTo((UpdateConnectionRequestContentOidc) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentOidc other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options) - && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.options, - this.authentication, - this.connectedAccounts, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentOidc other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - showAsButton(other.getShowAsButton()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsOidc options) { - this.options = Optional.ofNullable(options); - return this; - } - - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public Builder authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - public Builder authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public Builder connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - public Builder connectedAccounts(ConnectionConnectedAccountsPurposeXaa connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - public UpdateConnectionRequestContentOidc build() { - return new UpdateConnectionRequestContentOidc( - displayName, - enabledClients, - isDomainConnection, - metadata, - options, - authentication, - connectedAccounts, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOkta.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOkta.java deleted file mode 100644 index bc6012f02..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentOkta.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentOkta.Builder.class) -public final class UpdateConnectionRequestContentOkta implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentOkta( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentOkta - && equalTo((UpdateConnectionRequestContentOkta) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentOkta other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentOkta other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsOkta options) { - this.options = Optional.ofNullable(options); - return this; - } - - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - public UpdateConnectionRequestContentOkta build() { - return new UpdateConnectionRequestContentOkta( - displayName, - enabledClients, - isDomainConnection, - metadata, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentPaypal.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentPaypal.java deleted file mode 100644 index 5215f730e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentPaypal.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentPaypal.Builder.class) -public final class UpdateConnectionRequestContentPaypal implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentPaypal( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentPaypal - && equalTo((UpdateConnectionRequestContentPaypal) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentPaypal other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentPaypal other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsPaypal options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentPaypal build() { - return new UpdateConnectionRequestContentPaypal( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentPaypalSandbox.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentPaypalSandbox.java deleted file mode 100644 index 34336799a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentPaypalSandbox.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentPaypalSandbox.Builder.class) -public final class UpdateConnectionRequestContentPaypalSandbox implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentPaypalSandbox( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentPaypalSandbox - && equalTo((UpdateConnectionRequestContentPaypalSandbox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentPaypalSandbox other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentPaypalSandbox other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsPaypal options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentPaypalSandbox build() { - return new UpdateConnectionRequestContentPaypalSandbox( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentPingFederate.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentPingFederate.java deleted file mode 100644 index 1202d4f50..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentPingFederate.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentPingFederate.Builder.class) -public final class UpdateConnectionRequestContentPingFederate implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentPingFederate( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentPingFederate - && equalTo((UpdateConnectionRequestContentPingFederate) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentPingFederate other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentPingFederate other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsPingFederate options) { - this.options = Optional.ofNullable(options); - return this; - } - - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - public UpdateConnectionRequestContentPingFederate build() { - return new UpdateConnectionRequestContentPingFederate( - displayName, - enabledClients, - isDomainConnection, - metadata, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentPlanningCenter.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentPlanningCenter.java deleted file mode 100644 index d19e7bf69..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentPlanningCenter.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentPlanningCenter.Builder.class) -public final class UpdateConnectionRequestContentPlanningCenter implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentPlanningCenter( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentPlanningCenter - && equalTo((UpdateConnectionRequestContentPlanningCenter) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentPlanningCenter other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentPlanningCenter other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsPlanningCenter options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentPlanningCenter build() { - return new UpdateConnectionRequestContentPlanningCenter( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentRenren.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentRenren.java deleted file mode 100644 index 07563d8ce..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentRenren.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentRenren.Builder.class) -public final class UpdateConnectionRequestContentRenren implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentRenren( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentRenren - && equalTo((UpdateConnectionRequestContentRenren) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentRenren other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentRenren other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsRenren options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentRenren build() { - return new UpdateConnectionRequestContentRenren( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSalesforce.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSalesforce.java deleted file mode 100644 index a3818f7b6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSalesforce.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentSalesforce.Builder.class) -public final class UpdateConnectionRequestContentSalesforce implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentSalesforce( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentSalesforce - && equalTo((UpdateConnectionRequestContentSalesforce) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentSalesforce other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentSalesforce other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsSalesforce options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentSalesforce build() { - return new UpdateConnectionRequestContentSalesforce( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSalesforceCommunity.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSalesforceCommunity.java deleted file mode 100644 index 7aed752b6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSalesforceCommunity.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentSalesforceCommunity.Builder.class) -public final class UpdateConnectionRequestContentSalesforceCommunity implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentSalesforceCommunity( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentSalesforceCommunity - && equalTo((UpdateConnectionRequestContentSalesforceCommunity) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentSalesforceCommunity other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentSalesforceCommunity other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsSalesforceCommunity options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentSalesforceCommunity build() { - return new UpdateConnectionRequestContentSalesforceCommunity( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSalesforceSandbox.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSalesforceSandbox.java deleted file mode 100644 index e4e458e84..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSalesforceSandbox.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentSalesforceSandbox.Builder.class) -public final class UpdateConnectionRequestContentSalesforceSandbox implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentSalesforceSandbox( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentSalesforceSandbox - && equalTo((UpdateConnectionRequestContentSalesforceSandbox) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentSalesforceSandbox other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentSalesforceSandbox other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsSalesforce options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentSalesforceSandbox build() { - return new UpdateConnectionRequestContentSalesforceSandbox( - displayName, enabledClients, isDomainConnection, metadata, options, 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 deleted file mode 100644 index 0ae5ba498..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSaml.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentSaml.Builder.class) -public final class UpdateConnectionRequestContentSaml implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentSaml( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentSaml - && equalTo((UpdateConnectionRequestContentSaml) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentSaml other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentSaml other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsSaml options) { - this.options = Optional.ofNullable(options); - return this; - } - - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - public UpdateConnectionRequestContentSaml build() { - return new UpdateConnectionRequestContentSaml( - displayName, - enabledClients, - isDomainConnection, - metadata, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSharepoint.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSharepoint.java deleted file mode 100644 index 759e85e23..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSharepoint.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentSharepoint.Builder.class) -public final class UpdateConnectionRequestContentSharepoint implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Optional showAsButton; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentSharepoint( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Optional showAsButton, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.showAsButton = showAsButton; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentSharepoint - && equalTo((UpdateConnectionRequestContentSharepoint) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentSharepoint other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options) - && showAsButton.equals(other.showAsButton); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.options, - this.showAsButton); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentSharepoint other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - showAsButton(other.getShowAsButton()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsSharepoint options) { - this.options = Optional.ofNullable(options); - return this; - } - - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - public UpdateConnectionRequestContentSharepoint build() { - return new UpdateConnectionRequestContentSharepoint( - displayName, - enabledClients, - isDomainConnection, - metadata, - options, - showAsButton, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentShop.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentShop.java deleted file mode 100644 index f67409cf5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentShop.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentShop.Builder.class) -public final class UpdateConnectionRequestContentShop implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentShop( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentShop - && equalTo((UpdateConnectionRequestContentShop) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentShop other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentShop other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsShop options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentShop build() { - return new UpdateConnectionRequestContentShop( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentShopify.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentShopify.java deleted file mode 100644 index 7888d4939..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentShopify.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentShopify.Builder.class) -public final class UpdateConnectionRequestContentShopify implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentShopify( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentShopify - && equalTo((UpdateConnectionRequestContentShopify) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentShopify other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentShopify other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsShopify options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentShopify build() { - return new UpdateConnectionRequestContentShopify( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSms.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSms.java deleted file mode 100644 index 6d1b70150..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSms.java +++ /dev/null @@ -1,201 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentSms.Builder.class) -public final class UpdateConnectionRequestContentSms implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentSms( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentSms && equalTo((UpdateConnectionRequestContentSms) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentSms other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentSms other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsSms options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentSms build() { - return new UpdateConnectionRequestContentSms( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSoundcloud.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSoundcloud.java deleted file mode 100644 index 31d41860a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentSoundcloud.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentSoundcloud.Builder.class) -public final class UpdateConnectionRequestContentSoundcloud implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentSoundcloud( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentSoundcloud - && equalTo((UpdateConnectionRequestContentSoundcloud) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentSoundcloud other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentSoundcloud other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsSoundcloud options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentSoundcloud build() { - return new UpdateConnectionRequestContentSoundcloud( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentThirtySevenSignals.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentThirtySevenSignals.java deleted file mode 100644 index 7b0a918ee..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentThirtySevenSignals.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentThirtySevenSignals.Builder.class) -public final class UpdateConnectionRequestContentThirtySevenSignals implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentThirtySevenSignals( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentThirtySevenSignals - && equalTo((UpdateConnectionRequestContentThirtySevenSignals) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentThirtySevenSignals other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentThirtySevenSignals other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsThirtySevenSignals options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentThirtySevenSignals build() { - return new UpdateConnectionRequestContentThirtySevenSignals( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentTwitter.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentTwitter.java deleted file mode 100644 index 42694956c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentTwitter.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentTwitter.Builder.class) -public final class UpdateConnectionRequestContentTwitter implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentTwitter( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentTwitter - && equalTo((UpdateConnectionRequestContentTwitter) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentTwitter other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentTwitter other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsTwitter options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentTwitter build() { - return new UpdateConnectionRequestContentTwitter( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentUntappd.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentUntappd.java deleted file mode 100644 index 7eec64546..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentUntappd.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentUntappd.Builder.class) -public final class UpdateConnectionRequestContentUntappd implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentUntappd( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentUntappd - && equalTo((UpdateConnectionRequestContentUntappd) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentUntappd other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentUntappd other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsUntappd options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentUntappd build() { - return new UpdateConnectionRequestContentUntappd( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentVkontakte.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentVkontakte.java deleted file mode 100644 index 28bf9bd43..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentVkontakte.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentVkontakte.Builder.class) -public final class UpdateConnectionRequestContentVkontakte implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentVkontakte( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentVkontakte - && equalTo((UpdateConnectionRequestContentVkontakte) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentVkontakte other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentVkontakte other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsVkontakte options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentVkontakte build() { - return new UpdateConnectionRequestContentVkontakte( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentWeibo.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentWeibo.java deleted file mode 100644 index cf0ed3135..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentWeibo.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentWeibo.Builder.class) -public final class UpdateConnectionRequestContentWeibo implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentWeibo( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentWeibo - && equalTo((UpdateConnectionRequestContentWeibo) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentWeibo other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentWeibo other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsWeibo options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentWeibo build() { - return new UpdateConnectionRequestContentWeibo( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentWindowsLive.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentWindowsLive.java deleted file mode 100644 index ffe86967f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentWindowsLive.java +++ /dev/null @@ -1,265 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentWindowsLive.Builder.class) -public final class UpdateConnectionRequestContentWindowsLive implements IConnectionCommon, IConnectionPurposes { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentWindowsLive( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional authentication, - Optional connectedAccounts, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("authentication") - @java.lang.Override - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - @java.lang.Override - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentWindowsLive - && equalTo((UpdateConnectionRequestContentWindowsLive) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentWindowsLive other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, - this.enabledClients, - this.isDomainConnection, - this.metadata, - this.authentication, - this.connectedAccounts, - this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentWindowsLive other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public Builder authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - public Builder authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public Builder connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - public Builder connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsWindowsLive options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentWindowsLive build() { - return new UpdateConnectionRequestContentWindowsLive( - displayName, - enabledClients, - isDomainConnection, - metadata, - authentication, - connectedAccounts, - options, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentWordpress.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentWordpress.java deleted file mode 100644 index 22b4fb9fe..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentWordpress.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentWordpress.Builder.class) -public final class UpdateConnectionRequestContentWordpress implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentWordpress( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentWordpress - && equalTo((UpdateConnectionRequestContentWordpress) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentWordpress other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentWordpress other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsWordpress options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentWordpress build() { - return new UpdateConnectionRequestContentWordpress( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentYahoo.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentYahoo.java deleted file mode 100644 index 1a757c8c5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentYahoo.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentYahoo.Builder.class) -public final class UpdateConnectionRequestContentYahoo implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentYahoo( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentYahoo - && equalTo((UpdateConnectionRequestContentYahoo) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentYahoo other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentYahoo other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsYahoo options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentYahoo build() { - return new UpdateConnectionRequestContentYahoo( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentYammer.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentYammer.java deleted file mode 100644 index ad0025396..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentYammer.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentYammer.Builder.class) -public final class UpdateConnectionRequestContentYammer implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentYammer( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentYammer - && equalTo((UpdateConnectionRequestContentYammer) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentYammer other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentYammer other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsYammer options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentYammer build() { - return new UpdateConnectionRequestContentYammer( - displayName, enabledClients, isDomainConnection, metadata, options, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentYandex.java b/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentYandex.java deleted file mode 100644 index 3be54d53b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionRequestContentYandex.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionRequestContentYandex.Builder.class) -public final class UpdateConnectionRequestContentYandex implements IConnectionCommon { - private final Optional displayName; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional>> metadata; - - private final Optional options; - - private final Map additionalProperties; - - private UpdateConnectionRequestContentYandex( - Optional displayName, - Optional> enabledClients, - Optional isDomainConnection, - Optional>> metadata, - Optional options, - Map additionalProperties) { - this.displayName = displayName; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.metadata = metadata; - this.options = options; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("display_name") - @java.lang.Override - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("enabled_clients") - @java.lang.Override - public Optional> getEnabledClients() { - return enabledClients; - } - - @JsonProperty("is_domain_connection") - @java.lang.Override - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - @JsonProperty("metadata") - @java.lang.Override - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("options") - public Optional getOptions() { - return options; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionRequestContentYandex - && equalTo((UpdateConnectionRequestContentYandex) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionRequestContentYandex other) { - return displayName.equals(other.displayName) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && metadata.equals(other.metadata) - && options.equals(other.options); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.displayName, this.enabledClients, this.isDomainConnection, this.metadata, this.options); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional options = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionRequestContentYandex other) { - displayName(other.getDisplayName()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - metadata(other.getMetadata()); - options(other.getOptions()); - return this; - } - - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public Builder displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - public Builder displayName(String displayName) { - this.displayName = Optional.ofNullable(displayName); - return this; - } - - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "options", nulls = Nulls.SKIP) - public Builder options(Optional options) { - this.options = options; - return this; - } - - public Builder options(ConnectionOptionsYandex options) { - this.options = Optional.ofNullable(options); - return this; - } - - public UpdateConnectionRequestContentYandex build() { - return new UpdateConnectionRequestContentYandex( - displayName, enabledClients, isDomainConnection, metadata, options, 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 deleted file mode 100644 index e9c80cb2b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateConnectionResponseContent.java +++ /dev/null @@ -1,436 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateConnectionResponseContent.Builder.class) -public final class UpdateConnectionResponseContent { - private final Optional name; - - private final Optional displayName; - - private final Optional> options; - - private final Optional id; - - private final Optional strategy; - - private final Optional> realms; - - private final Optional> enabledClients; - - private final Optional isDomainConnection; - - private final Optional showAsButton; - - private final Optional>> metadata; - - private final Optional authentication; - - private final Optional connectedAccounts; - - private final Map additionalProperties; - - private UpdateConnectionResponseContent( - Optional name, - Optional displayName, - Optional> options, - Optional id, - Optional strategy, - Optional> realms, - Optional> enabledClients, - Optional isDomainConnection, - Optional showAsButton, - Optional>> metadata, - Optional authentication, - Optional connectedAccounts, - Map additionalProperties) { - this.name = name; - this.displayName = displayName; - this.options = options; - this.id = id; - this.strategy = strategy; - this.realms = realms; - this.enabledClients = enabledClients; - this.isDomainConnection = isDomainConnection; - this.showAsButton = showAsButton; - this.metadata = metadata; - this.authentication = authentication; - this.connectedAccounts = connectedAccounts; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the connection - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Connection name used in login screen - */ - @JsonProperty("display_name") - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("options") - public Optional> getOptions() { - return options; - } - - /** - * @return The connection's identifier - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The type of the connection, related to the identity provider - */ - @JsonProperty("strategy") - public Optional getStrategy() { - return strategy; - } - - /** - * @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; - } - - /** - * @return DEPRECATED property. Use the GET /connections/:id/clients endpoint to get the ids of the clients for which the connection is enabled - */ - @JsonProperty("enabled_clients") - public Optional> getEnabledClients() { - return enabledClients; - } - - /** - * @return True if the connection is domain level - */ - @JsonProperty("is_domain_connection") - public Optional getIsDomainConnection() { - return isDomainConnection; - } - - /** - * @return Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. - */ - @JsonProperty("show_as_button") - public Optional getShowAsButton() { - return showAsButton; - } - - @JsonProperty("metadata") - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("authentication") - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("connected_accounts") - public Optional getConnectedAccounts() { - return connectedAccounts; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateConnectionResponseContent && equalTo((UpdateConnectionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateConnectionResponseContent other) { - return name.equals(other.name) - && displayName.equals(other.displayName) - && options.equals(other.options) - && id.equals(other.id) - && strategy.equals(other.strategy) - && realms.equals(other.realms) - && enabledClients.equals(other.enabledClients) - && isDomainConnection.equals(other.isDomainConnection) - && showAsButton.equals(other.showAsButton) - && metadata.equals(other.metadata) - && authentication.equals(other.authentication) - && connectedAccounts.equals(other.connectedAccounts); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.displayName, - this.options, - this.id, - this.strategy, - this.realms, - this.enabledClients, - this.isDomainConnection, - this.showAsButton, - this.metadata, - this.authentication, - this.connectedAccounts); - } - - @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 displayName = Optional.empty(); - - private Optional> options = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional strategy = Optional.empty(); - - private Optional> realms = Optional.empty(); - - private Optional> enabledClients = Optional.empty(); - - private Optional isDomainConnection = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional connectedAccounts = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateConnectionResponseContent other) { - name(other.getName()); - displayName(other.getDisplayName()); - options(other.getOptions()); - id(other.getId()); - strategy(other.getStrategy()); - realms(other.getRealms()); - enabledClients(other.getEnabledClients()); - isDomainConnection(other.getIsDomainConnection()); - showAsButton(other.getShowAsButton()); - metadata(other.getMetadata()); - authentication(other.getAuthentication()); - connectedAccounts(other.getConnectedAccounts()); - return this; - } - - /** - *

The name of the connection

- */ - @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; - } - - /** - *

Connection name used in login screen

- */ - @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 = "options", nulls = Nulls.SKIP) - public Builder options(Optional> options) { - this.options = options; - return this; - } - - public Builder options(Map options) { - this.options = Optional.ofNullable(options); - return this; - } - - /** - *

The connection's 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 type of the connection, related to the identity provider

- */ - @JsonSetter(value = "strategy", nulls = Nulls.SKIP) - public Builder strategy(Optional strategy) { - this.strategy = strategy; - return this; - } - - public Builder strategy(String strategy) { - this.strategy = Optional.ofNullable(strategy); - 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.

- */ - @JsonSetter(value = "realms", nulls = Nulls.SKIP) - public Builder realms(Optional> realms) { - this.realms = realms; - return this; - } - - public Builder realms(List realms) { - this.realms = Optional.ofNullable(realms); - return this; - } - - /** - *

DEPRECATED property. Use the GET /connections/:id/clients endpoint to get the ids of the clients for which the connection is enabled

- */ - @JsonSetter(value = "enabled_clients", nulls = Nulls.SKIP) - public Builder enabledClients(Optional> enabledClients) { - this.enabledClients = enabledClients; - return this; - } - - public Builder enabledClients(List enabledClients) { - this.enabledClients = Optional.ofNullable(enabledClients); - return this; - } - - /** - *

True if the connection is domain level

- */ - @JsonSetter(value = "is_domain_connection", nulls = Nulls.SKIP) - public Builder isDomainConnection(Optional isDomainConnection) { - this.isDomainConnection = isDomainConnection; - return this; - } - - public Builder isDomainConnection(Boolean isDomainConnection) { - this.isDomainConnection = Optional.ofNullable(isDomainConnection); - return this; - } - - /** - *

Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD.

- */ - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - @JsonSetter(value = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public Builder authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - public Builder authentication(ConnectionAuthenticationPurpose authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @JsonSetter(value = "connected_accounts", nulls = Nulls.SKIP) - public Builder connectedAccounts(Optional connectedAccounts) { - this.connectedAccounts = connectedAccounts; - return this; - } - - public Builder connectedAccounts(ConnectionConnectedAccountsPurpose connectedAccounts) { - this.connectedAccounts = Optional.ofNullable(connectedAccounts); - return this; - } - - public UpdateConnectionResponseContent build() { - return new UpdateConnectionResponseContent( - name, - displayName, - options, - id, - strategy, - realms, - enabledClients, - isDomainConnection, - showAsButton, - metadata, - authentication, - connectedAccounts, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateCustomDomainRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateCustomDomainRequestContent.java deleted file mode 100644 index 99a88868b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateCustomDomainRequestContent.java +++ /dev/null @@ -1,233 +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.Nullable; -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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateCustomDomainRequestContent.Builder.class) -public final class UpdateCustomDomainRequestContent { - private final Optional tlsPolicy; - - private final OptionalNullable customClientIpHeader; - - private final Optional>> domainMetadata; - - private final OptionalNullable relyingPartyIdentifier; - - private final Map additionalProperties; - - private UpdateCustomDomainRequestContent( - Optional tlsPolicy, - OptionalNullable customClientIpHeader, - Optional>> domainMetadata, - OptionalNullable relyingPartyIdentifier, - Map additionalProperties) { - this.tlsPolicy = tlsPolicy; - this.customClientIpHeader = customClientIpHeader; - this.domainMetadata = domainMetadata; - this.relyingPartyIdentifier = relyingPartyIdentifier; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("tls_policy") - public Optional getTlsPolicy() { - return tlsPolicy; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_client_ip_header") - public OptionalNullable getCustomClientIpHeader() { - return customClientIpHeader; - } - - @JsonProperty("domain_metadata") - public Optional>> getDomainMetadata() { - return domainMetadata; - } - - /** - * @return 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. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("relying_party_identifier") - public OptionalNullable getRelyingPartyIdentifier() { - if (relyingPartyIdentifier == null) { - return OptionalNullable.absent(); - } - return relyingPartyIdentifier; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("relying_party_identifier") - private OptionalNullable _getRelyingPartyIdentifier() { - return relyingPartyIdentifier; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateCustomDomainRequestContent && equalTo((UpdateCustomDomainRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateCustomDomainRequestContent other) { - return tlsPolicy.equals(other.tlsPolicy) - && customClientIpHeader.equals(other.customClientIpHeader) - && domainMetadata.equals(other.domainMetadata) - && relyingPartyIdentifier.equals(other.relyingPartyIdentifier); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.tlsPolicy, this.customClientIpHeader, this.domainMetadata, this.relyingPartyIdentifier); - } - - @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 tlsPolicy = Optional.empty(); - - private OptionalNullable customClientIpHeader = OptionalNullable.absent(); - - private Optional>> domainMetadata = Optional.empty(); - - private OptionalNullable relyingPartyIdentifier = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateCustomDomainRequestContent other) { - tlsPolicy(other.getTlsPolicy()); - customClientIpHeader(other.getCustomClientIpHeader()); - domainMetadata(other.getDomainMetadata()); - relyingPartyIdentifier(other.getRelyingPartyIdentifier()); - return this; - } - - @JsonSetter(value = "tls_policy", nulls = Nulls.SKIP) - public Builder tlsPolicy(Optional tlsPolicy) { - this.tlsPolicy = tlsPolicy; - return this; - } - - public Builder tlsPolicy(CustomDomainTlsPolicyEnum tlsPolicy) { - this.tlsPolicy = Optional.ofNullable(tlsPolicy); - return this; - } - - @JsonSetter(value = "custom_client_ip_header", nulls = Nulls.SKIP) - public Builder customClientIpHeader( - OptionalNullable customClientIpHeader) { - this.customClientIpHeader = customClientIpHeader; - return this; - } - - public Builder customClientIpHeader(CustomDomainCustomClientIpHeaderEnum customClientIpHeader) { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader); - return this; - } - - public Builder customClientIpHeader(Optional customClientIpHeader) { - if (customClientIpHeader.isPresent()) { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader.get()); - } else { - this.customClientIpHeader = OptionalNullable.absent(); - } - return this; - } - - public Builder customClientIpHeader(Nullable customClientIpHeader) { - if (customClientIpHeader.isNull()) { - this.customClientIpHeader = OptionalNullable.ofNull(); - } else if (customClientIpHeader.isEmpty()) { - this.customClientIpHeader = OptionalNullable.absent(); - } else { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader.get()); - } - return this; - } - - @JsonSetter(value = "domain_metadata", nulls = Nulls.SKIP) - public Builder domainMetadata(Optional>> domainMetadata) { - this.domainMetadata = domainMetadata; - return this; - } - - public Builder domainMetadata(Map> domainMetadata) { - this.domainMetadata = Optional.ofNullable(domainMetadata); - return this; - } - - /** - *

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) { - this.relyingPartyIdentifier = relyingPartyIdentifier; - return this; - } - - public Builder relyingPartyIdentifier(String relyingPartyIdentifier) { - this.relyingPartyIdentifier = OptionalNullable.of(relyingPartyIdentifier); - return this; - } - - public Builder relyingPartyIdentifier(Optional relyingPartyIdentifier) { - if (relyingPartyIdentifier.isPresent()) { - this.relyingPartyIdentifier = OptionalNullable.of(relyingPartyIdentifier.get()); - } else { - this.relyingPartyIdentifier = OptionalNullable.absent(); - } - return this; - } - - public Builder relyingPartyIdentifier(Nullable relyingPartyIdentifier) { - if (relyingPartyIdentifier.isNull()) { - this.relyingPartyIdentifier = OptionalNullable.ofNull(); - } else if (relyingPartyIdentifier.isEmpty()) { - this.relyingPartyIdentifier = OptionalNullable.absent(); - } else { - this.relyingPartyIdentifier = OptionalNullable.of(relyingPartyIdentifier.get()); - } - return this; - } - - public UpdateCustomDomainRequestContent build() { - return new UpdateCustomDomainRequestContent( - tlsPolicy, customClientIpHeader, domainMetadata, relyingPartyIdentifier, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateCustomDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateCustomDomainResponseContent.java deleted file mode 100644 index 9a6bdbac4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateCustomDomainResponseContent.java +++ /dev/null @@ -1,570 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.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 = UpdateCustomDomainResponseContent.Builder.class) -public final class UpdateCustomDomainResponseContent { - private final String customDomainId; - - private final String domain; - - private final boolean primary; - - private final Optional isDefault; - - private final CustomDomainStatusFilterEnum status; - - private final CustomDomainTypeEnum type; - - private final DomainVerification verification; - - private final OptionalNullable customClientIpHeader; - - private final Optional tlsPolicy; - - private final Optional>> domainMetadata; - - private final Optional certificate; - - private final Optional relyingPartyIdentifier; - - private final Map additionalProperties; - - private UpdateCustomDomainResponseContent( - String customDomainId, - String domain, - boolean primary, - Optional isDefault, - CustomDomainStatusFilterEnum status, - CustomDomainTypeEnum type, - DomainVerification verification, - OptionalNullable customClientIpHeader, - Optional tlsPolicy, - Optional>> domainMetadata, - Optional certificate, - Optional relyingPartyIdentifier, - Map additionalProperties) { - this.customDomainId = customDomainId; - this.domain = domain; - this.primary = primary; - this.isDefault = isDefault; - this.status = status; - this.type = type; - this.verification = verification; - this.customClientIpHeader = customClientIpHeader; - this.tlsPolicy = tlsPolicy; - this.domainMetadata = domainMetadata; - this.certificate = certificate; - this.relyingPartyIdentifier = relyingPartyIdentifier; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the custom domain. - */ - @JsonProperty("custom_domain_id") - public String getCustomDomainId() { - return customDomainId; - } - - /** - * @return Domain name. - */ - @JsonProperty("domain") - public String getDomain() { - return domain; - } - - /** - * @return Whether this is a primary domain (true) or not (false). - */ - @JsonProperty("primary") - public boolean getPrimary() { - return primary; - } - - /** - * @return Whether this is the default custom domain (true) or not (false). - */ - @JsonProperty("is_default") - public Optional getIsDefault() { - return isDefault; - } - - @JsonProperty("status") - public CustomDomainStatusFilterEnum getStatus() { - return status; - } - - @JsonProperty("type") - public CustomDomainTypeEnum getType() { - return type; - } - - @JsonProperty("verification") - public DomainVerification getVerification() { - return verification; - } - - /** - * @return The HTTP header to fetch the client's IP address - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_client_ip_header") - public OptionalNullable getCustomClientIpHeader() { - if (customClientIpHeader == null) { - return OptionalNullable.absent(); - } - return customClientIpHeader; - } - - /** - * @return The TLS version policy - */ - @JsonProperty("tls_policy") - public Optional getTlsPolicy() { - return tlsPolicy; - } - - @JsonProperty("domain_metadata") - public Optional>> getDomainMetadata() { - return domainMetadata; - } - - @JsonProperty("certificate") - public Optional getCertificate() { - return certificate; - } - - /** - * @return Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used. - */ - @JsonProperty("relying_party_identifier") - public Optional getRelyingPartyIdentifier() { - return relyingPartyIdentifier; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_client_ip_header") - private OptionalNullable _getCustomClientIpHeader() { - return customClientIpHeader; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateCustomDomainResponseContent && equalTo((UpdateCustomDomainResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateCustomDomainResponseContent other) { - return customDomainId.equals(other.customDomainId) - && domain.equals(other.domain) - && primary == other.primary - && isDefault.equals(other.isDefault) - && status.equals(other.status) - && type.equals(other.type) - && verification.equals(other.verification) - && customClientIpHeader.equals(other.customClientIpHeader) - && tlsPolicy.equals(other.tlsPolicy) - && domainMetadata.equals(other.domainMetadata) - && certificate.equals(other.certificate) - && relyingPartyIdentifier.equals(other.relyingPartyIdentifier); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.customDomainId, - this.domain, - this.primary, - this.isDefault, - this.status, - this.type, - this.verification, - this.customClientIpHeader, - this.tlsPolicy, - this.domainMetadata, - this.certificate, - this.relyingPartyIdentifier); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static CustomDomainIdStage builder() { - return new Builder(); - } - - public interface CustomDomainIdStage { - /** - *

ID of the custom domain.

- */ - DomainStage customDomainId(@NotNull String customDomainId); - - Builder from(UpdateCustomDomainResponseContent other); - } - - public interface DomainStage { - /** - *

Domain name.

- */ - PrimaryStage domain(@NotNull String domain); - } - - public interface PrimaryStage { - /** - *

Whether this is a primary domain (true) or not (false).

- */ - StatusStage primary(boolean primary); - } - - public interface StatusStage { - TypeStage status(@NotNull CustomDomainStatusFilterEnum status); - } - - public interface TypeStage { - VerificationStage type(@NotNull CustomDomainTypeEnum type); - } - - public interface VerificationStage { - _FinalStage verification(@NotNull DomainVerification verification); - } - - public interface _FinalStage { - UpdateCustomDomainResponseContent build(); - - /** - *

Whether this is the default custom domain (true) or not (false).

- */ - _FinalStage isDefault(Optional isDefault); - - _FinalStage isDefault(Boolean isDefault); - - /** - *

The HTTP header to fetch the client's IP address

- */ - _FinalStage customClientIpHeader(@Nullable OptionalNullable customClientIpHeader); - - _FinalStage customClientIpHeader(String customClientIpHeader); - - _FinalStage customClientIpHeader(Optional customClientIpHeader); - - _FinalStage customClientIpHeader(com.auth0.client.mgmt.core.Nullable customClientIpHeader); - - /** - *

The TLS version policy

- */ - _FinalStage tlsPolicy(Optional tlsPolicy); - - _FinalStage tlsPolicy(String tlsPolicy); - - _FinalStage domainMetadata(Optional>> domainMetadata); - - _FinalStage domainMetadata(Map> domainMetadata); - - _FinalStage certificate(Optional certificate); - - _FinalStage certificate(DomainCertificate certificate); - - /** - *

Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used.

- */ - _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier); - - _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements CustomDomainIdStage, - DomainStage, - PrimaryStage, - StatusStage, - TypeStage, - VerificationStage, - _FinalStage { - private String customDomainId; - - private String domain; - - private boolean primary; - - private CustomDomainStatusFilterEnum status; - - private CustomDomainTypeEnum type; - - private DomainVerification verification; - - private Optional relyingPartyIdentifier = Optional.empty(); - - private Optional certificate = Optional.empty(); - - private Optional>> domainMetadata = Optional.empty(); - - private Optional tlsPolicy = Optional.empty(); - - private OptionalNullable customClientIpHeader = OptionalNullable.absent(); - - private Optional isDefault = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateCustomDomainResponseContent other) { - customDomainId(other.getCustomDomainId()); - domain(other.getDomain()); - primary(other.getPrimary()); - isDefault(other.getIsDefault()); - status(other.getStatus()); - type(other.getType()); - verification(other.getVerification()); - customClientIpHeader(other.getCustomClientIpHeader()); - tlsPolicy(other.getTlsPolicy()); - domainMetadata(other.getDomainMetadata()); - certificate(other.getCertificate()); - relyingPartyIdentifier(other.getRelyingPartyIdentifier()); - return this; - } - - /** - *

ID of the custom domain.

- *

ID of the custom domain.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("custom_domain_id") - public DomainStage customDomainId(@NotNull String customDomainId) { - this.customDomainId = Objects.requireNonNull(customDomainId, "customDomainId must not be null"); - return this; - } - - /** - *

Domain name.

- *

Domain name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("domain") - public PrimaryStage domain(@NotNull String domain) { - this.domain = Objects.requireNonNull(domain, "domain must not be null"); - return this; - } - - /** - *

Whether this is a primary domain (true) or not (false).

- *

Whether this is a primary domain (true) or not (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("primary") - public StatusStage primary(boolean primary) { - this.primary = primary; - return this; - } - - @java.lang.Override - @JsonSetter("status") - public TypeStage status(@NotNull CustomDomainStatusFilterEnum status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public VerificationStage type(@NotNull CustomDomainTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("verification") - public _FinalStage verification(@NotNull DomainVerification verification) { - this.verification = Objects.requireNonNull(verification, "verification must not be null"); - return this; - } - - /** - *

Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier) { - this.relyingPartyIdentifier = Optional.ofNullable(relyingPartyIdentifier); - return this; - } - - /** - *

Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used.

- */ - @java.lang.Override - @JsonSetter(value = "relying_party_identifier", nulls = Nulls.SKIP) - public _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier) { - this.relyingPartyIdentifier = relyingPartyIdentifier; - return this; - } - - @java.lang.Override - public _FinalStage certificate(DomainCertificate certificate) { - this.certificate = Optional.ofNullable(certificate); - return this; - } - - @java.lang.Override - @JsonSetter(value = "certificate", nulls = Nulls.SKIP) - public _FinalStage certificate(Optional certificate) { - this.certificate = certificate; - return this; - } - - @java.lang.Override - public _FinalStage domainMetadata(Map> domainMetadata) { - this.domainMetadata = Optional.ofNullable(domainMetadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "domain_metadata", nulls = Nulls.SKIP) - public _FinalStage domainMetadata(Optional>> domainMetadata) { - this.domainMetadata = domainMetadata; - return this; - } - - /** - *

The TLS version policy

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage tlsPolicy(String tlsPolicy) { - this.tlsPolicy = Optional.ofNullable(tlsPolicy); - return this; - } - - /** - *

The TLS version policy

- */ - @java.lang.Override - @JsonSetter(value = "tls_policy", nulls = Nulls.SKIP) - public _FinalStage tlsPolicy(Optional tlsPolicy) { - this.tlsPolicy = tlsPolicy; - return this; - } - - /** - *

The HTTP header to fetch the client's IP address

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage customClientIpHeader(com.auth0.client.mgmt.core.Nullable customClientIpHeader) { - if (customClientIpHeader.isNull()) { - this.customClientIpHeader = OptionalNullable.ofNull(); - } else if (customClientIpHeader.isEmpty()) { - this.customClientIpHeader = OptionalNullable.absent(); - } else { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader.get()); - } - return this; - } - - /** - *

The HTTP header to fetch the client's IP address

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage customClientIpHeader(Optional customClientIpHeader) { - if (customClientIpHeader.isPresent()) { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader.get()); - } else { - this.customClientIpHeader = OptionalNullable.absent(); - } - return this; - } - - /** - *

The HTTP header to fetch the client's IP address

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage customClientIpHeader(String customClientIpHeader) { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader); - return this; - } - - /** - *

The HTTP header to fetch the client's IP address

- */ - @java.lang.Override - @JsonSetter(value = "custom_client_ip_header", nulls = Nulls.SKIP) - public _FinalStage customClientIpHeader(@Nullable OptionalNullable customClientIpHeader) { - this.customClientIpHeader = customClientIpHeader; - return this; - } - - /** - *

Whether this is the default custom domain (true) or not (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage isDefault(Boolean isDefault) { - this.isDefault = Optional.ofNullable(isDefault); - return this; - } - - /** - *

Whether this is the default custom domain (true) or not (false).

- */ - @java.lang.Override - @JsonSetter(value = "is_default", nulls = Nulls.SKIP) - public _FinalStage isDefault(Optional isDefault) { - this.isDefault = isDefault; - return this; - } - - @java.lang.Override - public UpdateCustomDomainResponseContent build() { - return new UpdateCustomDomainResponseContent( - customDomainId, - domain, - primary, - isDefault, - status, - type, - verification, - customClientIpHeader, - tlsPolicy, - domainMetadata, - certificate, - relyingPartyIdentifier, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningRequestContent.java deleted file mode 100644 index cf1426c7e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningRequestContent.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateDirectoryProvisioningRequestContent.Builder.class) -public final class UpdateDirectoryProvisioningRequestContent { - private final Optional> mapping; - - private final Optional synchronizeAutomatically; - - private final Map additionalProperties; - - private UpdateDirectoryProvisioningRequestContent( - Optional> mapping, - Optional synchronizeAutomatically, - Map additionalProperties) { - this.mapping = mapping; - this.synchronizeAutomatically = synchronizeAutomatically; - this.additionalProperties = additionalProperties; - } - - /** - * @return The mapping between Auth0 and IDP user attributes - */ - @JsonProperty("mapping") - public Optional> getMapping() { - return mapping; - } - - /** - * @return Whether periodic automatic synchronization is enabled - */ - @JsonProperty("synchronize_automatically") - public Optional getSynchronizeAutomatically() { - return synchronizeAutomatically; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateDirectoryProvisioningRequestContent - && equalTo((UpdateDirectoryProvisioningRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateDirectoryProvisioningRequestContent other) { - return mapping.equals(other.mapping) && synchronizeAutomatically.equals(other.synchronizeAutomatically); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.mapping, this.synchronizeAutomatically); - } - - @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> mapping = Optional.empty(); - - private Optional synchronizeAutomatically = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateDirectoryProvisioningRequestContent other) { - mapping(other.getMapping()); - synchronizeAutomatically(other.getSynchronizeAutomatically()); - return this; - } - - /** - *

The mapping between Auth0 and IDP user attributes

- */ - @JsonSetter(value = "mapping", nulls = Nulls.SKIP) - public Builder mapping(Optional> mapping) { - this.mapping = mapping; - return this; - } - - public Builder mapping(List mapping) { - this.mapping = Optional.ofNullable(mapping); - return this; - } - - /** - *

Whether periodic automatic synchronization is enabled

- */ - @JsonSetter(value = "synchronize_automatically", nulls = Nulls.SKIP) - public Builder synchronizeAutomatically(Optional synchronizeAutomatically) { - this.synchronizeAutomatically = synchronizeAutomatically; - return this; - } - - public Builder synchronizeAutomatically(Boolean synchronizeAutomatically) { - this.synchronizeAutomatically = Optional.ofNullable(synchronizeAutomatically); - return this; - } - - public UpdateDirectoryProvisioningRequestContent build() { - return new UpdateDirectoryProvisioningRequestContent( - mapping, synchronizeAutomatically, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningResponseContent.java deleted file mode 100644 index 199f418fe..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateDirectoryProvisioningResponseContent.java +++ /dev/null @@ -1,513 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = UpdateDirectoryProvisioningResponseContent.Builder.class) -public final class UpdateDirectoryProvisioningResponseContent { - private final String connectionId; - - private final String connectionName; - - private final String strategy; - - private final List mapping; - - private final boolean synchronizeAutomatically; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional lastSynchronizationAt; - - private final Optional lastSynchronizationStatus; - - private final Optional lastSynchronizationError; - - private final Map additionalProperties; - - private UpdateDirectoryProvisioningResponseContent( - String connectionId, - String connectionName, - String strategy, - List mapping, - boolean synchronizeAutomatically, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional lastSynchronizationAt, - Optional lastSynchronizationStatus, - Optional lastSynchronizationError, - Map additionalProperties) { - this.connectionId = connectionId; - this.connectionName = connectionName; - this.strategy = strategy; - this.mapping = mapping; - this.synchronizeAutomatically = synchronizeAutomatically; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.lastSynchronizationAt = lastSynchronizationAt; - this.lastSynchronizationStatus = lastSynchronizationStatus; - this.lastSynchronizationError = lastSynchronizationError; - this.additionalProperties = additionalProperties; - } - - /** - * @return The connection's identifier - */ - @JsonProperty("connection_id") - public String getConnectionId() { - return connectionId; - } - - /** - * @return The connection's name - */ - @JsonProperty("connection_name") - public String getConnectionName() { - return connectionName; - } - - /** - * @return The connection's strategy - */ - @JsonProperty("strategy") - public String getStrategy() { - return strategy; - } - - /** - * @return The mapping between Auth0 and IDP user attributes - */ - @JsonProperty("mapping") - public List getMapping() { - return mapping; - } - - /** - * @return Whether periodic automatic synchronization is enabled - */ - @JsonProperty("synchronize_automatically") - public boolean getSynchronizeAutomatically() { - return synchronizeAutomatically; - } - - /** - * @return The timestamp at which the directory provisioning configuration was created - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return The timestamp at which the directory provisioning configuration was last updated - */ - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - /** - * @return The timestamp at which the connection was last synchronized - */ - @JsonProperty("last_synchronization_at") - public Optional getLastSynchronizationAt() { - return lastSynchronizationAt; - } - - /** - * @return The status of the last synchronization - */ - @JsonProperty("last_synchronization_status") - public Optional getLastSynchronizationStatus() { - return lastSynchronizationStatus; - } - - /** - * @return The error message of the last synchronization, if any - */ - @JsonProperty("last_synchronization_error") - public Optional getLastSynchronizationError() { - return lastSynchronizationError; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateDirectoryProvisioningResponseContent - && equalTo((UpdateDirectoryProvisioningResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateDirectoryProvisioningResponseContent other) { - return connectionId.equals(other.connectionId) - && connectionName.equals(other.connectionName) - && strategy.equals(other.strategy) - && mapping.equals(other.mapping) - && synchronizeAutomatically == other.synchronizeAutomatically - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && lastSynchronizationAt.equals(other.lastSynchronizationAt) - && lastSynchronizationStatus.equals(other.lastSynchronizationStatus) - && lastSynchronizationError.equals(other.lastSynchronizationError); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.connectionName, - this.strategy, - this.mapping, - this.synchronizeAutomatically, - this.createdAt, - this.updatedAt, - this.lastSynchronizationAt, - this.lastSynchronizationStatus, - this.lastSynchronizationError); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionIdStage builder() { - return new Builder(); - } - - public interface ConnectionIdStage { - /** - *

The connection's identifier

- */ - ConnectionNameStage connectionId(@NotNull String connectionId); - - Builder from(UpdateDirectoryProvisioningResponseContent other); - } - - public interface ConnectionNameStage { - /** - *

The connection's name

- */ - StrategyStage connectionName(@NotNull String connectionName); - } - - public interface StrategyStage { - /** - *

The connection's strategy

- */ - SynchronizeAutomaticallyStage strategy(@NotNull String strategy); - } - - public interface SynchronizeAutomaticallyStage { - /** - *

Whether periodic automatic synchronization is enabled

- */ - CreatedAtStage synchronizeAutomatically(boolean synchronizeAutomatically); - } - - public interface CreatedAtStage { - /** - *

The timestamp at which the directory provisioning configuration was created

- */ - UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); - } - - public interface UpdatedAtStage { - /** - *

The timestamp at which the directory provisioning configuration was last updated

- */ - _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt); - } - - public interface _FinalStage { - UpdateDirectoryProvisioningResponseContent build(); - - /** - *

The mapping between Auth0 and IDP user attributes

- */ - _FinalStage mapping(List mapping); - - _FinalStage addMapping(DirectoryProvisioningMappingItem mapping); - - _FinalStage addAllMapping(List mapping); - - /** - *

The timestamp at which the connection was last synchronized

- */ - _FinalStage lastSynchronizationAt(Optional lastSynchronizationAt); - - _FinalStage lastSynchronizationAt(OffsetDateTime lastSynchronizationAt); - - /** - *

The status of the last synchronization

- */ - _FinalStage lastSynchronizationStatus(Optional lastSynchronizationStatus); - - _FinalStage lastSynchronizationStatus(String lastSynchronizationStatus); - - /** - *

The error message of the last synchronization, if any

- */ - _FinalStage lastSynchronizationError(Optional lastSynchronizationError); - - _FinalStage lastSynchronizationError(String lastSynchronizationError); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements ConnectionIdStage, - ConnectionNameStage, - StrategyStage, - SynchronizeAutomaticallyStage, - CreatedAtStage, - UpdatedAtStage, - _FinalStage { - private String connectionId; - - private String connectionName; - - private String strategy; - - private boolean synchronizeAutomatically; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private Optional lastSynchronizationError = Optional.empty(); - - private Optional lastSynchronizationStatus = Optional.empty(); - - private Optional lastSynchronizationAt = Optional.empty(); - - private List mapping = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateDirectoryProvisioningResponseContent other) { - connectionId(other.getConnectionId()); - connectionName(other.getConnectionName()); - strategy(other.getStrategy()); - mapping(other.getMapping()); - synchronizeAutomatically(other.getSynchronizeAutomatically()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - lastSynchronizationAt(other.getLastSynchronizationAt()); - lastSynchronizationStatus(other.getLastSynchronizationStatus()); - lastSynchronizationError(other.getLastSynchronizationError()); - return this; - } - - /** - *

The connection's identifier

- *

The connection's identifier

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("connection_id") - public ConnectionNameStage connectionId(@NotNull String connectionId) { - this.connectionId = Objects.requireNonNull(connectionId, "connectionId must not be null"); - return this; - } - - /** - *

The connection's name

- *

The connection's name

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("connection_name") - public StrategyStage connectionName(@NotNull String connectionName) { - this.connectionName = Objects.requireNonNull(connectionName, "connectionName must not be null"); - return this; - } - - /** - *

The connection's strategy

- *

The connection's strategy

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("strategy") - public SynchronizeAutomaticallyStage strategy(@NotNull String strategy) { - this.strategy = Objects.requireNonNull(strategy, "strategy must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("synchronize_automatically") - public CreatedAtStage synchronizeAutomatically(boolean synchronizeAutomatically) { - this.synchronizeAutomatically = synchronizeAutomatically; - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("created_at") - public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { - this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); - return this; - } - - /** - *

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. - */ - @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 error message of the last synchronization, if any

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage lastSynchronizationError(String lastSynchronizationError) { - this.lastSynchronizationError = Optional.ofNullable(lastSynchronizationError); - return this; - } - - /** - *

The error message of the last synchronization, if any

- */ - @java.lang.Override - @JsonSetter(value = "last_synchronization_error", nulls = Nulls.SKIP) - public _FinalStage lastSynchronizationError(Optional lastSynchronizationError) { - this.lastSynchronizationError = lastSynchronizationError; - return this; - } - - /** - *

The status of the last synchronization

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage lastSynchronizationStatus(String lastSynchronizationStatus) { - this.lastSynchronizationStatus = Optional.ofNullable(lastSynchronizationStatus); - return this; - } - - /** - *

The status of the last synchronization

- */ - @java.lang.Override - @JsonSetter(value = "last_synchronization_status", nulls = Nulls.SKIP) - public _FinalStage lastSynchronizationStatus(Optional lastSynchronizationStatus) { - this.lastSynchronizationStatus = lastSynchronizationStatus; - return this; - } - - /** - *

The timestamp at which the connection was last synchronized

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage lastSynchronizationAt(OffsetDateTime lastSynchronizationAt) { - this.lastSynchronizationAt = Optional.ofNullable(lastSynchronizationAt); - return this; - } - - /** - *

The timestamp at which the connection was last synchronized

- */ - @java.lang.Override - @JsonSetter(value = "last_synchronization_at", nulls = Nulls.SKIP) - public _FinalStage lastSynchronizationAt(Optional lastSynchronizationAt) { - this.lastSynchronizationAt = lastSynchronizationAt; - return this; - } - - /** - *

The mapping between Auth0 and IDP user attributes

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addAllMapping(List mapping) { - if (mapping != null) { - this.mapping.addAll(mapping); - } - return this; - } - - /** - *

The mapping between Auth0 and IDP user attributes

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addMapping(DirectoryProvisioningMappingItem mapping) { - this.mapping.add(mapping); - return this; - } - - /** - *

The mapping between Auth0 and IDP user attributes

- */ - @java.lang.Override - @JsonSetter(value = "mapping", nulls = Nulls.SKIP) - public _FinalStage mapping(List mapping) { - this.mapping.clear(); - if (mapping != null) { - this.mapping.addAll(mapping); - } - return this; - } - - @java.lang.Override - public UpdateDirectoryProvisioningResponseContent build() { - return new UpdateDirectoryProvisioningResponseContent( - connectionId, - connectionName, - strategy, - mapping, - synchronizeAutomatically, - createdAt, - updatedAt, - lastSynchronizationAt, - lastSynchronizationStatus, - lastSynchronizationError, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateEmailProviderResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateEmailProviderResponseContent.java deleted file mode 100644 index 12a2255f0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateEmailProviderResponseContent.java +++ /dev/null @@ -1,213 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateEmailProviderResponseContent.Builder.class) -public final class UpdateEmailProviderResponseContent { - private final Optional name; - - private final Optional enabled; - - private final Optional defaultFromAddress; - - private final Optional credentials; - - private final Optional> settings; - - private final Map additionalProperties; - - private UpdateEmailProviderResponseContent( - Optional name, - Optional enabled, - Optional defaultFromAddress, - Optional credentials, - Optional> settings, - Map additionalProperties) { - this.name = name; - this.enabled = enabled; - this.defaultFromAddress = defaultFromAddress; - this.credentials = credentials; - this.settings = settings; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of the email provider. Can be mailgun, mandrill, sendgrid, ses, sparkpost, smtp, azure_cs, ms365, or custom. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Whether the provider is enabled (true) or disabled (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Email address to use as "from" when no other address specified. - */ - @JsonProperty("default_from_address") - public Optional getDefaultFromAddress() { - return defaultFromAddress; - } - - @JsonProperty("credentials") - public Optional getCredentials() { - return credentials; - } - - @JsonProperty("settings") - public Optional> getSettings() { - return settings; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateEmailProviderResponseContent - && equalTo((UpdateEmailProviderResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateEmailProviderResponseContent other) { - return name.equals(other.name) - && enabled.equals(other.enabled) - && defaultFromAddress.equals(other.defaultFromAddress) - && credentials.equals(other.credentials) - && settings.equals(other.settings); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.enabled, this.defaultFromAddress, this.credentials, this.settings); - } - - @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 enabled = Optional.empty(); - - private Optional defaultFromAddress = Optional.empty(); - - private Optional credentials = Optional.empty(); - - private Optional> settings = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateEmailProviderResponseContent other) { - name(other.getName()); - enabled(other.getEnabled()); - defaultFromAddress(other.getDefaultFromAddress()); - credentials(other.getCredentials()); - settings(other.getSettings()); - return this; - } - - /** - *

Name of the email provider. Can be mailgun, mandrill, sendgrid, ses, sparkpost, smtp, azure_cs, ms365, or custom.

- */ - @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 the provider is enabled (true) or disabled (false).

- */ - @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; - } - - /** - *

Email address to use as "from" when no other address specified.

- */ - @JsonSetter(value = "default_from_address", nulls = Nulls.SKIP) - public Builder defaultFromAddress(Optional defaultFromAddress) { - this.defaultFromAddress = defaultFromAddress; - return this; - } - - public Builder defaultFromAddress(String defaultFromAddress) { - this.defaultFromAddress = Optional.ofNullable(defaultFromAddress); - return this; - } - - @JsonSetter(value = "credentials", nulls = Nulls.SKIP) - public Builder credentials(Optional credentials) { - this.credentials = credentials; - return this; - } - - public Builder credentials(EmailProviderCredentials credentials) { - this.credentials = Optional.ofNullable(credentials); - return this; - } - - @JsonSetter(value = "settings", nulls = Nulls.SKIP) - public Builder settings(Optional> settings) { - this.settings = settings; - return this; - } - - public Builder settings(Map settings) { - this.settings = Optional.ofNullable(settings); - return this; - } - - public UpdateEmailProviderResponseContent build() { - return new UpdateEmailProviderResponseContent( - name, enabled, defaultFromAddress, credentials, settings, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateEmailTemplateRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateEmailTemplateRequestContent.java deleted file mode 100644 index 24add727f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateEmailTemplateRequestContent.java +++ /dev/null @@ -1,569 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateEmailTemplateRequestContent.Builder.class) -public final class UpdateEmailTemplateRequestContent { - private final Optional template; - - private final OptionalNullable body; - - private final OptionalNullable from; - - private final OptionalNullable resultUrl; - - private final OptionalNullable subject; - - private final OptionalNullable syntax; - - private final OptionalNullable urlLifetimeInSeconds; - - private final Optional includeEmailInRedirect; - - private final OptionalNullable enabled; - - private final Map additionalProperties; - - private UpdateEmailTemplateRequestContent( - Optional template, - OptionalNullable body, - OptionalNullable from, - OptionalNullable resultUrl, - OptionalNullable subject, - OptionalNullable syntax, - OptionalNullable urlLifetimeInSeconds, - Optional includeEmailInRedirect, - OptionalNullable enabled, - Map additionalProperties) { - this.template = template; - this.body = body; - this.from = from; - this.resultUrl = resultUrl; - this.subject = subject; - this.syntax = syntax; - this.urlLifetimeInSeconds = urlLifetimeInSeconds; - this.includeEmailInRedirect = includeEmailInRedirect; - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("template") - public Optional getTemplate() { - return template; - } - - /** - * @return Body of the email template. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("body") - public OptionalNullable getBody() { - if (body == null) { - return OptionalNullable.absent(); - } - return body; - } - - /** - * @return Senders from email address. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - public OptionalNullable getFrom() { - if (from == null) { - return OptionalNullable.absent(); - } - return from; - } - - /** - * @return URL to redirect the user to after a successful action. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("resultUrl") - public OptionalNullable getResultUrl() { - if (resultUrl == null) { - return OptionalNullable.absent(); - } - return resultUrl; - } - - /** - * @return Subject line of the email. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("subject") - public OptionalNullable getSubject() { - if (subject == null) { - return OptionalNullable.absent(); - } - return subject; - } - - /** - * @return Syntax of the template body. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("syntax") - public OptionalNullable getSyntax() { - if (syntax == null) { - return OptionalNullable.absent(); - } - return syntax; - } - - /** - * @return Lifetime in seconds that the link within the email will be valid for. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("urlLifetimeInSeconds") - public OptionalNullable getUrlLifetimeInSeconds() { - if (urlLifetimeInSeconds == null) { - return OptionalNullable.absent(); - } - return urlLifetimeInSeconds; - } - - /** - * @return Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. - */ - @JsonProperty("includeEmailInRedirect") - public Optional getIncludeEmailInRedirect() { - return includeEmailInRedirect; - } - - /** - * @return Whether the template is enabled (true) or disabled (false). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("enabled") - public OptionalNullable getEnabled() { - if (enabled == null) { - return OptionalNullable.absent(); - } - return enabled; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("body") - private OptionalNullable _getBody() { - return body; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - private OptionalNullable _getFrom() { - return from; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("resultUrl") - private OptionalNullable _getResultUrl() { - return resultUrl; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("subject") - private OptionalNullable _getSubject() { - return subject; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("syntax") - private OptionalNullable _getSyntax() { - return syntax; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("urlLifetimeInSeconds") - private OptionalNullable _getUrlLifetimeInSeconds() { - return urlLifetimeInSeconds; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("enabled") - private OptionalNullable _getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateEmailTemplateRequestContent && equalTo((UpdateEmailTemplateRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateEmailTemplateRequestContent other) { - return template.equals(other.template) - && body.equals(other.body) - && from.equals(other.from) - && resultUrl.equals(other.resultUrl) - && subject.equals(other.subject) - && syntax.equals(other.syntax) - && urlLifetimeInSeconds.equals(other.urlLifetimeInSeconds) - && includeEmailInRedirect.equals(other.includeEmailInRedirect) - && enabled.equals(other.enabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.template, - this.body, - this.from, - this.resultUrl, - this.subject, - this.syntax, - this.urlLifetimeInSeconds, - this.includeEmailInRedirect, - 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 template = Optional.empty(); - - private OptionalNullable body = OptionalNullable.absent(); - - private OptionalNullable from = OptionalNullable.absent(); - - private OptionalNullable resultUrl = OptionalNullable.absent(); - - private OptionalNullable subject = OptionalNullable.absent(); - - private OptionalNullable syntax = OptionalNullable.absent(); - - private OptionalNullable urlLifetimeInSeconds = OptionalNullable.absent(); - - private Optional includeEmailInRedirect = Optional.empty(); - - private OptionalNullable enabled = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateEmailTemplateRequestContent other) { - template(other.getTemplate()); - body(other.getBody()); - from(other.getFrom()); - resultUrl(other.getResultUrl()); - subject(other.getSubject()); - syntax(other.getSyntax()); - urlLifetimeInSeconds(other.getUrlLifetimeInSeconds()); - includeEmailInRedirect(other.getIncludeEmailInRedirect()); - enabled(other.getEnabled()); - return this; - } - - @JsonSetter(value = "template", nulls = Nulls.SKIP) - public Builder template(Optional template) { - this.template = template; - return this; - } - - public Builder template(EmailTemplateNameEnum template) { - this.template = Optional.ofNullable(template); - return this; - } - - /** - *

Body of the email template.

- */ - @JsonSetter(value = "body", nulls = Nulls.SKIP) - public Builder body(@Nullable OptionalNullable body) { - this.body = body; - return this; - } - - public Builder body(String body) { - this.body = OptionalNullable.of(body); - return this; - } - - public Builder body(Optional body) { - if (body.isPresent()) { - this.body = OptionalNullable.of(body.get()); - } else { - this.body = OptionalNullable.absent(); - } - return this; - } - - public Builder body(com.auth0.client.mgmt.core.Nullable body) { - if (body.isNull()) { - this.body = OptionalNullable.ofNull(); - } else if (body.isEmpty()) { - this.body = OptionalNullable.absent(); - } else { - this.body = OptionalNullable.of(body.get()); - } - return this; - } - - /** - *

Senders from email address.

- */ - @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; - } - - /** - *

URL to redirect the user to after a successful action.

- */ - @JsonSetter(value = "resultUrl", nulls = Nulls.SKIP) - public Builder resultUrl(@Nullable OptionalNullable resultUrl) { - this.resultUrl = resultUrl; - return this; - } - - public Builder resultUrl(String resultUrl) { - this.resultUrl = OptionalNullable.of(resultUrl); - return this; - } - - public Builder resultUrl(Optional resultUrl) { - if (resultUrl.isPresent()) { - this.resultUrl = OptionalNullable.of(resultUrl.get()); - } else { - this.resultUrl = OptionalNullable.absent(); - } - return this; - } - - public Builder resultUrl(com.auth0.client.mgmt.core.Nullable resultUrl) { - if (resultUrl.isNull()) { - this.resultUrl = OptionalNullable.ofNull(); - } else if (resultUrl.isEmpty()) { - this.resultUrl = OptionalNullable.absent(); - } else { - this.resultUrl = OptionalNullable.of(resultUrl.get()); - } - return this; - } - - /** - *

Subject line of the email.

- */ - @JsonSetter(value = "subject", nulls = Nulls.SKIP) - public Builder subject(@Nullable OptionalNullable subject) { - this.subject = subject; - return this; - } - - public Builder subject(String subject) { - this.subject = OptionalNullable.of(subject); - return this; - } - - public Builder subject(Optional subject) { - if (subject.isPresent()) { - this.subject = OptionalNullable.of(subject.get()); - } else { - this.subject = OptionalNullable.absent(); - } - return this; - } - - public Builder subject(com.auth0.client.mgmt.core.Nullable subject) { - if (subject.isNull()) { - this.subject = OptionalNullable.ofNull(); - } else if (subject.isEmpty()) { - this.subject = OptionalNullable.absent(); - } else { - this.subject = OptionalNullable.of(subject.get()); - } - return this; - } - - /** - *

Syntax of the template body.

- */ - @JsonSetter(value = "syntax", nulls = Nulls.SKIP) - public Builder syntax(@Nullable OptionalNullable syntax) { - this.syntax = syntax; - return this; - } - - public Builder syntax(String syntax) { - this.syntax = OptionalNullable.of(syntax); - return this; - } - - public Builder syntax(Optional syntax) { - if (syntax.isPresent()) { - this.syntax = OptionalNullable.of(syntax.get()); - } else { - this.syntax = OptionalNullable.absent(); - } - return this; - } - - public Builder syntax(com.auth0.client.mgmt.core.Nullable syntax) { - if (syntax.isNull()) { - this.syntax = OptionalNullable.ofNull(); - } else if (syntax.isEmpty()) { - this.syntax = OptionalNullable.absent(); - } else { - this.syntax = OptionalNullable.of(syntax.get()); - } - return this; - } - - /** - *

Lifetime in seconds that the link within the email will be valid for.

- */ - @JsonSetter(value = "urlLifetimeInSeconds", nulls = Nulls.SKIP) - public Builder urlLifetimeInSeconds(@Nullable OptionalNullable urlLifetimeInSeconds) { - this.urlLifetimeInSeconds = urlLifetimeInSeconds; - return this; - } - - public Builder urlLifetimeInSeconds(Double urlLifetimeInSeconds) { - this.urlLifetimeInSeconds = OptionalNullable.of(urlLifetimeInSeconds); - return this; - } - - public Builder urlLifetimeInSeconds(Optional urlLifetimeInSeconds) { - if (urlLifetimeInSeconds.isPresent()) { - this.urlLifetimeInSeconds = OptionalNullable.of(urlLifetimeInSeconds.get()); - } else { - this.urlLifetimeInSeconds = OptionalNullable.absent(); - } - return this; - } - - public Builder urlLifetimeInSeconds(com.auth0.client.mgmt.core.Nullable urlLifetimeInSeconds) { - if (urlLifetimeInSeconds.isNull()) { - this.urlLifetimeInSeconds = OptionalNullable.ofNull(); - } else if (urlLifetimeInSeconds.isEmpty()) { - this.urlLifetimeInSeconds = OptionalNullable.absent(); - } else { - this.urlLifetimeInSeconds = OptionalNullable.of(urlLifetimeInSeconds.get()); - } - return this; - } - - /** - *

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

- */ - @JsonSetter(value = "includeEmailInRedirect", nulls = Nulls.SKIP) - public Builder includeEmailInRedirect(Optional includeEmailInRedirect) { - this.includeEmailInRedirect = includeEmailInRedirect; - return this; - } - - public Builder includeEmailInRedirect(Boolean includeEmailInRedirect) { - this.includeEmailInRedirect = Optional.ofNullable(includeEmailInRedirect); - return this; - } - - /** - *

Whether the template is enabled (true) or disabled (false).

- */ - @JsonSetter(value = "enabled", nulls = Nulls.SKIP) - public Builder enabled(@Nullable OptionalNullable enabled) { - this.enabled = enabled; - return this; - } - - public Builder enabled(Boolean enabled) { - this.enabled = OptionalNullable.of(enabled); - return this; - } - - public Builder enabled(Optional enabled) { - if (enabled.isPresent()) { - this.enabled = OptionalNullable.of(enabled.get()); - } else { - this.enabled = OptionalNullable.absent(); - } - return this; - } - - public Builder enabled(com.auth0.client.mgmt.core.Nullable enabled) { - if (enabled.isNull()) { - this.enabled = OptionalNullable.ofNull(); - } else if (enabled.isEmpty()) { - this.enabled = OptionalNullable.absent(); - } else { - this.enabled = OptionalNullable.of(enabled.get()); - } - return this; - } - - public UpdateEmailTemplateRequestContent build() { - return new UpdateEmailTemplateRequestContent( - template, - body, - from, - resultUrl, - subject, - syntax, - urlLifetimeInSeconds, - includeEmailInRedirect, - enabled, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateEmailTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateEmailTemplateResponseContent.java deleted file mode 100644 index c7a2f72b3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateEmailTemplateResponseContent.java +++ /dev/null @@ -1,570 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateEmailTemplateResponseContent.Builder.class) -public final class UpdateEmailTemplateResponseContent { - private final Optional template; - - private final OptionalNullable body; - - private final OptionalNullable from; - - private final OptionalNullable resultUrl; - - private final OptionalNullable subject; - - private final OptionalNullable syntax; - - private final OptionalNullable urlLifetimeInSeconds; - - private final Optional includeEmailInRedirect; - - private final OptionalNullable enabled; - - private final Map additionalProperties; - - private UpdateEmailTemplateResponseContent( - Optional template, - OptionalNullable body, - OptionalNullable from, - OptionalNullable resultUrl, - OptionalNullable subject, - OptionalNullable syntax, - OptionalNullable urlLifetimeInSeconds, - Optional includeEmailInRedirect, - OptionalNullable enabled, - Map additionalProperties) { - this.template = template; - this.body = body; - this.from = from; - this.resultUrl = resultUrl; - this.subject = subject; - this.syntax = syntax; - this.urlLifetimeInSeconds = urlLifetimeInSeconds; - this.includeEmailInRedirect = includeEmailInRedirect; - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("template") - public Optional getTemplate() { - return template; - } - - /** - * @return Body of the email template. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("body") - public OptionalNullable getBody() { - if (body == null) { - return OptionalNullable.absent(); - } - return body; - } - - /** - * @return Senders from email address. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - public OptionalNullable getFrom() { - if (from == null) { - return OptionalNullable.absent(); - } - return from; - } - - /** - * @return URL to redirect the user to after a successful action. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("resultUrl") - public OptionalNullable getResultUrl() { - if (resultUrl == null) { - return OptionalNullable.absent(); - } - return resultUrl; - } - - /** - * @return Subject line of the email. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("subject") - public OptionalNullable getSubject() { - if (subject == null) { - return OptionalNullable.absent(); - } - return subject; - } - - /** - * @return Syntax of the template body. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("syntax") - public OptionalNullable getSyntax() { - if (syntax == null) { - return OptionalNullable.absent(); - } - return syntax; - } - - /** - * @return Lifetime in seconds that the link within the email will be valid for. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("urlLifetimeInSeconds") - public OptionalNullable getUrlLifetimeInSeconds() { - if (urlLifetimeInSeconds == null) { - return OptionalNullable.absent(); - } - return urlLifetimeInSeconds; - } - - /** - * @return Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. - */ - @JsonProperty("includeEmailInRedirect") - public Optional getIncludeEmailInRedirect() { - return includeEmailInRedirect; - } - - /** - * @return Whether the template is enabled (true) or disabled (false). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("enabled") - public OptionalNullable getEnabled() { - if (enabled == null) { - return OptionalNullable.absent(); - } - return enabled; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("body") - private OptionalNullable _getBody() { - return body; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("from") - private OptionalNullable _getFrom() { - return from; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("resultUrl") - private OptionalNullable _getResultUrl() { - return resultUrl; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("subject") - private OptionalNullable _getSubject() { - return subject; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("syntax") - private OptionalNullable _getSyntax() { - return syntax; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("urlLifetimeInSeconds") - private OptionalNullable _getUrlLifetimeInSeconds() { - return urlLifetimeInSeconds; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("enabled") - private OptionalNullable _getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateEmailTemplateResponseContent - && equalTo((UpdateEmailTemplateResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateEmailTemplateResponseContent other) { - return template.equals(other.template) - && body.equals(other.body) - && from.equals(other.from) - && resultUrl.equals(other.resultUrl) - && subject.equals(other.subject) - && syntax.equals(other.syntax) - && urlLifetimeInSeconds.equals(other.urlLifetimeInSeconds) - && includeEmailInRedirect.equals(other.includeEmailInRedirect) - && enabled.equals(other.enabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.template, - this.body, - this.from, - this.resultUrl, - this.subject, - this.syntax, - this.urlLifetimeInSeconds, - this.includeEmailInRedirect, - 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 template = Optional.empty(); - - private OptionalNullable body = OptionalNullable.absent(); - - private OptionalNullable from = OptionalNullable.absent(); - - private OptionalNullable resultUrl = OptionalNullable.absent(); - - private OptionalNullable subject = OptionalNullable.absent(); - - private OptionalNullable syntax = OptionalNullable.absent(); - - private OptionalNullable urlLifetimeInSeconds = OptionalNullable.absent(); - - private Optional includeEmailInRedirect = Optional.empty(); - - private OptionalNullable enabled = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateEmailTemplateResponseContent other) { - template(other.getTemplate()); - body(other.getBody()); - from(other.getFrom()); - resultUrl(other.getResultUrl()); - subject(other.getSubject()); - syntax(other.getSyntax()); - urlLifetimeInSeconds(other.getUrlLifetimeInSeconds()); - includeEmailInRedirect(other.getIncludeEmailInRedirect()); - enabled(other.getEnabled()); - return this; - } - - @JsonSetter(value = "template", nulls = Nulls.SKIP) - public Builder template(Optional template) { - this.template = template; - return this; - } - - public Builder template(EmailTemplateNameEnum template) { - this.template = Optional.ofNullable(template); - return this; - } - - /** - *

Body of the email template.

- */ - @JsonSetter(value = "body", nulls = Nulls.SKIP) - public Builder body(@Nullable OptionalNullable body) { - this.body = body; - return this; - } - - public Builder body(String body) { - this.body = OptionalNullable.of(body); - return this; - } - - public Builder body(Optional body) { - if (body.isPresent()) { - this.body = OptionalNullable.of(body.get()); - } else { - this.body = OptionalNullable.absent(); - } - return this; - } - - public Builder body(com.auth0.client.mgmt.core.Nullable body) { - if (body.isNull()) { - this.body = OptionalNullable.ofNull(); - } else if (body.isEmpty()) { - this.body = OptionalNullable.absent(); - } else { - this.body = OptionalNullable.of(body.get()); - } - return this; - } - - /** - *

Senders from email address.

- */ - @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; - } - - /** - *

URL to redirect the user to after a successful action.

- */ - @JsonSetter(value = "resultUrl", nulls = Nulls.SKIP) - public Builder resultUrl(@Nullable OptionalNullable resultUrl) { - this.resultUrl = resultUrl; - return this; - } - - public Builder resultUrl(String resultUrl) { - this.resultUrl = OptionalNullable.of(resultUrl); - return this; - } - - public Builder resultUrl(Optional resultUrl) { - if (resultUrl.isPresent()) { - this.resultUrl = OptionalNullable.of(resultUrl.get()); - } else { - this.resultUrl = OptionalNullable.absent(); - } - return this; - } - - public Builder resultUrl(com.auth0.client.mgmt.core.Nullable resultUrl) { - if (resultUrl.isNull()) { - this.resultUrl = OptionalNullable.ofNull(); - } else if (resultUrl.isEmpty()) { - this.resultUrl = OptionalNullable.absent(); - } else { - this.resultUrl = OptionalNullable.of(resultUrl.get()); - } - return this; - } - - /** - *

Subject line of the email.

- */ - @JsonSetter(value = "subject", nulls = Nulls.SKIP) - public Builder subject(@Nullable OptionalNullable subject) { - this.subject = subject; - return this; - } - - public Builder subject(String subject) { - this.subject = OptionalNullable.of(subject); - return this; - } - - public Builder subject(Optional subject) { - if (subject.isPresent()) { - this.subject = OptionalNullable.of(subject.get()); - } else { - this.subject = OptionalNullable.absent(); - } - return this; - } - - public Builder subject(com.auth0.client.mgmt.core.Nullable subject) { - if (subject.isNull()) { - this.subject = OptionalNullable.ofNull(); - } else if (subject.isEmpty()) { - this.subject = OptionalNullable.absent(); - } else { - this.subject = OptionalNullable.of(subject.get()); - } - return this; - } - - /** - *

Syntax of the template body.

- */ - @JsonSetter(value = "syntax", nulls = Nulls.SKIP) - public Builder syntax(@Nullable OptionalNullable syntax) { - this.syntax = syntax; - return this; - } - - public Builder syntax(String syntax) { - this.syntax = OptionalNullable.of(syntax); - return this; - } - - public Builder syntax(Optional syntax) { - if (syntax.isPresent()) { - this.syntax = OptionalNullable.of(syntax.get()); - } else { - this.syntax = OptionalNullable.absent(); - } - return this; - } - - public Builder syntax(com.auth0.client.mgmt.core.Nullable syntax) { - if (syntax.isNull()) { - this.syntax = OptionalNullable.ofNull(); - } else if (syntax.isEmpty()) { - this.syntax = OptionalNullable.absent(); - } else { - this.syntax = OptionalNullable.of(syntax.get()); - } - return this; - } - - /** - *

Lifetime in seconds that the link within the email will be valid for.

- */ - @JsonSetter(value = "urlLifetimeInSeconds", nulls = Nulls.SKIP) - public Builder urlLifetimeInSeconds(@Nullable OptionalNullable urlLifetimeInSeconds) { - this.urlLifetimeInSeconds = urlLifetimeInSeconds; - return this; - } - - public Builder urlLifetimeInSeconds(Double urlLifetimeInSeconds) { - this.urlLifetimeInSeconds = OptionalNullable.of(urlLifetimeInSeconds); - return this; - } - - public Builder urlLifetimeInSeconds(Optional urlLifetimeInSeconds) { - if (urlLifetimeInSeconds.isPresent()) { - this.urlLifetimeInSeconds = OptionalNullable.of(urlLifetimeInSeconds.get()); - } else { - this.urlLifetimeInSeconds = OptionalNullable.absent(); - } - return this; - } - - public Builder urlLifetimeInSeconds(com.auth0.client.mgmt.core.Nullable urlLifetimeInSeconds) { - if (urlLifetimeInSeconds.isNull()) { - this.urlLifetimeInSeconds = OptionalNullable.ofNull(); - } else if (urlLifetimeInSeconds.isEmpty()) { - this.urlLifetimeInSeconds = OptionalNullable.absent(); - } else { - this.urlLifetimeInSeconds = OptionalNullable.of(urlLifetimeInSeconds.get()); - } - return this; - } - - /** - *

Whether the reset_email and verify_email templates should include the user's email address as the email parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true.

- */ - @JsonSetter(value = "includeEmailInRedirect", nulls = Nulls.SKIP) - public Builder includeEmailInRedirect(Optional includeEmailInRedirect) { - this.includeEmailInRedirect = includeEmailInRedirect; - return this; - } - - public Builder includeEmailInRedirect(Boolean includeEmailInRedirect) { - this.includeEmailInRedirect = Optional.ofNullable(includeEmailInRedirect); - return this; - } - - /** - *

Whether the template is enabled (true) or disabled (false).

- */ - @JsonSetter(value = "enabled", nulls = Nulls.SKIP) - public Builder enabled(@Nullable OptionalNullable enabled) { - this.enabled = enabled; - return this; - } - - public Builder enabled(Boolean enabled) { - this.enabled = OptionalNullable.of(enabled); - return this; - } - - public Builder enabled(Optional enabled) { - if (enabled.isPresent()) { - this.enabled = OptionalNullable.of(enabled.get()); - } else { - this.enabled = OptionalNullable.absent(); - } - return this; - } - - public Builder enabled(com.auth0.client.mgmt.core.Nullable enabled) { - if (enabled.isNull()) { - this.enabled = OptionalNullable.ofNull(); - } else if (enabled.isEmpty()) { - this.enabled = OptionalNullable.absent(); - } else { - this.enabled = OptionalNullable.of(enabled.get()); - } - return this; - } - - public UpdateEmailTemplateResponseContent build() { - return new UpdateEmailTemplateResponseContent( - template, - body, - from, - resultUrl, - subject, - syntax, - urlLifetimeInSeconds, - includeEmailInRedirect, - enabled, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateEnabledClientConnectionsRequestContentItem.java b/src/main/java/com/auth0/client/mgmt/types/UpdateEnabledClientConnectionsRequestContentItem.java deleted file mode 100644 index bb902c3c4..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateEnabledClientConnectionsRequestContentItem.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = UpdateEnabledClientConnectionsRequestContentItem.Builder.class) -public final class UpdateEnabledClientConnectionsRequestContentItem { - private final String clientId; - - private final boolean status; - - private final Map additionalProperties; - - private UpdateEnabledClientConnectionsRequestContentItem( - String clientId, boolean status, Map additionalProperties) { - this.clientId = clientId; - this.status = status; - this.additionalProperties = additionalProperties; - } - - /** - * @return The client_id of the client whose status will be changed. Note that the limit per PATCH request is 50 clients. - */ - @JsonProperty("client_id") - public String getClientId() { - return clientId; - } - - /** - * @return Whether the connection is enabled or not for this client_id - */ - @JsonProperty("status") - public boolean getStatus() { - return status; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateEnabledClientConnectionsRequestContentItem - && equalTo((UpdateEnabledClientConnectionsRequestContentItem) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateEnabledClientConnectionsRequestContentItem other) { - return clientId.equals(other.clientId) && status == other.status; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.clientId, this.status); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ClientIdStage builder() { - return new Builder(); - } - - public interface ClientIdStage { - /** - *

The client_id of the client whose status will be changed. Note that the limit per PATCH request is 50 clients.

- */ - StatusStage clientId(@NotNull String clientId); - - Builder from(UpdateEnabledClientConnectionsRequestContentItem other); - } - - public interface StatusStage { - /** - *

Whether the connection is enabled or not for this client_id

- */ - _FinalStage status(boolean status); - } - - public interface _FinalStage { - UpdateEnabledClientConnectionsRequestContentItem build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ClientIdStage, StatusStage, _FinalStage { - private String clientId; - - private boolean status; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateEnabledClientConnectionsRequestContentItem other) { - clientId(other.getClientId()); - status(other.getStatus()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("client_id") - public StatusStage clientId(@NotNull String clientId) { - this.clientId = Objects.requireNonNull(clientId, "clientId must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("status") - public _FinalStage status(boolean status) { - this.status = status; - return this; - } - - @java.lang.Override - public UpdateEnabledClientConnectionsRequestContentItem build() { - return new UpdateEnabledClientConnectionsRequestContentItem(clientId, status, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateEventStreamRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateEventStreamRequestContent.java deleted file mode 100644 index 6f2a670cd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateEventStreamRequestContent.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateEventStreamRequestContent.Builder.class) -public final class UpdateEventStreamRequestContent { - private final Optional name; - - private final Optional> subscriptions; - - private final Optional destination; - - private final Optional status; - - private final Map additionalProperties; - - private UpdateEventStreamRequestContent( - Optional name, - Optional> subscriptions, - Optional destination, - Optional status, - Map additionalProperties) { - this.name = name; - this.subscriptions = subscriptions; - this.destination = destination; - this.status = status; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of the event stream. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return List of event types subscribed to in this stream. - */ - @JsonProperty("subscriptions") - public Optional> getSubscriptions() { - return subscriptions; - } - - @JsonProperty("destination") - public Optional getDestination() { - return destination; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateEventStreamRequestContent && equalTo((UpdateEventStreamRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateEventStreamRequestContent other) { - return name.equals(other.name) - && subscriptions.equals(other.subscriptions) - && destination.equals(other.destination) - && status.equals(other.status); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.subscriptions, this.destination, 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 Optional> subscriptions = Optional.empty(); - - private Optional destination = Optional.empty(); - - private Optional status = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateEventStreamRequestContent other) { - name(other.getName()); - subscriptions(other.getSubscriptions()); - destination(other.getDestination()); - status(other.getStatus()); - return this; - } - - /** - *

Name of the event stream.

- */ - @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; - } - - /** - *

List of event types subscribed to in this stream.

- */ - @JsonSetter(value = "subscriptions", nulls = Nulls.SKIP) - public Builder subscriptions(Optional> subscriptions) { - this.subscriptions = subscriptions; - return this; - } - - public Builder subscriptions(List subscriptions) { - this.subscriptions = Optional.ofNullable(subscriptions); - return this; - } - - @JsonSetter(value = "destination", nulls = Nulls.SKIP) - public Builder destination(Optional destination) { - this.destination = destination; - return this; - } - - public Builder destination(EventStreamDestinationPatch destination) { - this.destination = Optional.ofNullable(destination); - return this; - } - - @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(EventStreamStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - public UpdateEventStreamRequestContent build() { - return new UpdateEventStreamRequestContent(name, subscriptions, destination, status, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateEventStreamResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateEventStreamResponseContent.java deleted file mode 100644 index b2dbd0284..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateEventStreamResponseContent.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = UpdateEventStreamResponseContent.Deserializer.class) -public final class UpdateEventStreamResponseContent { - private final Object value; - - private final int type; - - private UpdateEventStreamResponseContent(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((EventStreamWebhookResponseContent) this.value); - } else if (this.type == 1) { - return visitor.visit((EventStreamEventBridgeResponseContent) this.value); - } else if (this.type == 2) { - return visitor.visit((EventStreamActionResponseContent) 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 UpdateEventStreamResponseContent && equalTo((UpdateEventStreamResponseContent) other); - } - - private boolean equalTo(UpdateEventStreamResponseContent 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 UpdateEventStreamResponseContent of(EventStreamWebhookResponseContent value) { - return new UpdateEventStreamResponseContent(value, 0); - } - - public static UpdateEventStreamResponseContent of(EventStreamEventBridgeResponseContent value) { - return new UpdateEventStreamResponseContent(value, 1); - } - - public static UpdateEventStreamResponseContent of(EventStreamActionResponseContent value) { - return new UpdateEventStreamResponseContent(value, 2); - } - - public interface Visitor { - T visit(EventStreamWebhookResponseContent value); - - T visit(EventStreamEventBridgeResponseContent value); - - T visit(EventStreamActionResponseContent value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(UpdateEventStreamResponseContent.class); - } - - @java.lang.Override - public UpdateEventStreamResponseContent deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamWebhookResponseContent.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamEventBridgeResponseContent.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventStreamActionResponseContent.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateFlowRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateFlowRequestContent.java deleted file mode 100644 index d71828b46..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateFlowRequestContent.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateFlowRequestContent.Builder.class) -public final class UpdateFlowRequestContent { - private final Optional name; - - private final Optional> actions; - - private final Map additionalProperties; - - private UpdateFlowRequestContent( - Optional name, Optional> actions, Map additionalProperties) { - this.name = name; - this.actions = actions; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("actions") - public Optional> getActions() { - return actions; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateFlowRequestContent && equalTo((UpdateFlowRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateFlowRequestContent other) { - return name.equals(other.name) && actions.equals(other.actions); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.actions); - } - - @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> actions = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateFlowRequestContent other) { - name(other.getName()); - actions(other.getActions()); - 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 = "actions", nulls = Nulls.SKIP) - public Builder actions(Optional> actions) { - this.actions = actions; - return this; - } - - public Builder actions(List actions) { - this.actions = Optional.ofNullable(actions); - return this; - } - - public UpdateFlowRequestContent build() { - return new UpdateFlowRequestContent(name, actions, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateFlowResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateFlowResponseContent.java deleted file mode 100644 index dd6e1cb24..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateFlowResponseContent.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = UpdateFlowResponseContent.Builder.class) -public final class UpdateFlowResponseContent { - private final String id; - - private final String name; - - private final Optional> actions; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional executedAt; - - private final Map additionalProperties; - - private UpdateFlowResponseContent( - String id, - String name, - Optional> actions, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional executedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.actions = actions; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.executedAt = executedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("actions") - public Optional> getActions() { - return actions; - } - - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("executed_at") - public Optional getExecutedAt() { - return executedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateFlowResponseContent && equalTo((UpdateFlowResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateFlowResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && actions.equals(other.actions) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && executedAt.equals(other.executedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.actions, this.createdAt, this.updatedAt, this.executedAt); - } - - @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(UpdateFlowResponseContent other); - } - - 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 { - UpdateFlowResponseContent build(); - - _FinalStage actions(Optional> actions); - - _FinalStage actions(List actions); - - _FinalStage executedAt(Optional executedAt); - - _FinalStage executedAt(String executedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, CreatedAtStage, UpdatedAtStage, _FinalStage { - private String id; - - private String name; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private Optional executedAt = Optional.empty(); - - private Optional> actions = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateFlowResponseContent other) { - id(other.getId()); - name(other.getName()); - actions(other.getActions()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - executedAt(other.getExecutedAt()); - 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 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 executedAt(String executedAt) { - this.executedAt = Optional.ofNullable(executedAt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "executed_at", nulls = Nulls.SKIP) - public _FinalStage executedAt(Optional executedAt) { - this.executedAt = executedAt; - return this; - } - - @java.lang.Override - public _FinalStage actions(List actions) { - this.actions = Optional.ofNullable(actions); - return this; - } - - @java.lang.Override - @JsonSetter(value = "actions", nulls = Nulls.SKIP) - public _FinalStage actions(Optional> actions) { - this.actions = actions; - return this; - } - - @java.lang.Override - public UpdateFlowResponseContent build() { - return new UpdateFlowResponseContent( - id, name, actions, createdAt, updatedAt, executedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionResponseContent.java deleted file mode 100644 index 3f7d1e2fb..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionResponseContent.java +++ /dev/null @@ -1,476 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = UpdateFlowsVaultConnectionResponseContent.Builder.class) -public final class UpdateFlowsVaultConnectionResponseContent { - private final String id; - - private final String appId; - - private final Optional environment; - - private final String name; - - private final Optional accountName; - - private final boolean ready; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional refreshedAt; - - private final String fingerprint; - - private final Map additionalProperties; - - private UpdateFlowsVaultConnectionResponseContent( - String id, - String appId, - Optional environment, - String name, - Optional accountName, - boolean ready, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional refreshedAt, - String fingerprint, - Map additionalProperties) { - this.id = id; - this.appId = appId; - this.environment = environment; - this.name = name; - this.accountName = accountName; - this.ready = ready; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.refreshedAt = refreshedAt; - this.fingerprint = fingerprint; - this.additionalProperties = additionalProperties; - } - - /** - * @return Flows Vault Connection identifier. - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return Flows Vault Connection app identifier. - */ - @JsonProperty("app_id") - public String getAppId() { - return appId; - } - - /** - * @return Flows Vault Connection environment. - */ - @JsonProperty("environment") - public Optional getEnvironment() { - return environment; - } - - /** - * @return Flows Vault Connection name. - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * @return Flows Vault Connection custom account name. - */ - @JsonProperty("account_name") - public Optional getAccountName() { - return accountName; - } - - /** - * @return Whether the Flows Vault Connection is configured. - */ - @JsonProperty("ready") - public boolean getReady() { - return ready; - } - - /** - * @return The ISO 8601 formatted date when this Flows Vault Connection was created. - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return The ISO 8601 formatted date when this Flows Vault Connection was updated. - */ - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - /** - * @return The ISO 8601 formatted date when this Flows Vault Connection was refreshed. - */ - @JsonProperty("refreshed_at") - public Optional getRefreshedAt() { - return refreshedAt; - } - - @JsonProperty("fingerprint") - public String getFingerprint() { - return fingerprint; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateFlowsVaultConnectionResponseContent - && equalTo((UpdateFlowsVaultConnectionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateFlowsVaultConnectionResponseContent other) { - return id.equals(other.id) - && appId.equals(other.appId) - && environment.equals(other.environment) - && name.equals(other.name) - && accountName.equals(other.accountName) - && ready == other.ready - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && refreshedAt.equals(other.refreshedAt) - && fingerprint.equals(other.fingerprint); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.appId, - this.environment, - this.name, - this.accountName, - this.ready, - this.createdAt, - this.updatedAt, - this.refreshedAt, - this.fingerprint); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

Flows Vault Connection identifier.

- */ - AppIdStage id(@NotNull String id); - - Builder from(UpdateFlowsVaultConnectionResponseContent other); - } - - public interface AppIdStage { - /** - *

Flows Vault Connection app identifier.

- */ - NameStage appId(@NotNull String appId); - } - - public interface NameStage { - /** - *

Flows Vault Connection name.

- */ - ReadyStage name(@NotNull String name); - } - - public interface ReadyStage { - /** - *

Whether the Flows Vault Connection is configured.

- */ - CreatedAtStage ready(boolean ready); - } - - public interface CreatedAtStage { - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was created.

- */ - UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt); - } - - public interface UpdatedAtStage { - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was updated.

- */ - FingerprintStage updatedAt(@NotNull OffsetDateTime updatedAt); - } - - public interface FingerprintStage { - _FinalStage fingerprint(@NotNull String fingerprint); - } - - public interface _FinalStage { - UpdateFlowsVaultConnectionResponseContent build(); - - /** - *

Flows Vault Connection environment.

- */ - _FinalStage environment(Optional environment); - - _FinalStage environment(String environment); - - /** - *

Flows Vault Connection custom account name.

- */ - _FinalStage accountName(Optional accountName); - - _FinalStage accountName(String accountName); - - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was refreshed.

- */ - _FinalStage refreshedAt(Optional refreshedAt); - - _FinalStage refreshedAt(OffsetDateTime refreshedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements IdStage, - AppIdStage, - NameStage, - ReadyStage, - CreatedAtStage, - UpdatedAtStage, - FingerprintStage, - _FinalStage { - private String id; - - private String appId; - - private String name; - - private boolean ready; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private String fingerprint; - - private Optional refreshedAt = Optional.empty(); - - private Optional accountName = Optional.empty(); - - private Optional environment = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateFlowsVaultConnectionResponseContent other) { - id(other.getId()); - appId(other.getAppId()); - environment(other.getEnvironment()); - name(other.getName()); - accountName(other.getAccountName()); - ready(other.getReady()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - refreshedAt(other.getRefreshedAt()); - fingerprint(other.getFingerprint()); - return this; - } - - /** - *

Flows Vault Connection identifier.

- *

Flows Vault Connection identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("id") - public AppIdStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - /** - *

Flows Vault Connection app identifier.

- *

Flows Vault Connection app identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("app_id") - public NameStage appId(@NotNull String appId) { - this.appId = Objects.requireNonNull(appId, "appId must not be null"); - return this; - } - - /** - *

Flows Vault Connection name.

- *

Flows Vault Connection name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("name") - public ReadyStage name(@NotNull String name) { - this.name = Objects.requireNonNull(name, "name must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("ready") - public CreatedAtStage ready(boolean ready) { - this.ready = ready; - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("created_at") - public UpdatedAtStage createdAt(@NotNull OffsetDateTime createdAt) { - this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("updated_at") - public FingerprintStage updatedAt(@NotNull OffsetDateTime updatedAt) { - this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("fingerprint") - public _FinalStage fingerprint(@NotNull String fingerprint) { - this.fingerprint = Objects.requireNonNull(fingerprint, "fingerprint must not be null"); - return this; - } - - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was refreshed.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage refreshedAt(OffsetDateTime refreshedAt) { - this.refreshedAt = Optional.ofNullable(refreshedAt); - return this; - } - - /** - *

The ISO 8601 formatted date when this Flows Vault Connection was refreshed.

- */ - @java.lang.Override - @JsonSetter(value = "refreshed_at", nulls = Nulls.SKIP) - public _FinalStage refreshedAt(Optional refreshedAt) { - this.refreshedAt = refreshedAt; - return this; - } - - /** - *

Flows Vault Connection custom account name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage accountName(String accountName) { - this.accountName = Optional.ofNullable(accountName); - return this; - } - - /** - *

Flows Vault Connection custom account name.

- */ - @java.lang.Override - @JsonSetter(value = "account_name", nulls = Nulls.SKIP) - public _FinalStage accountName(Optional accountName) { - this.accountName = accountName; - return this; - } - - /** - *

Flows Vault Connection environment.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage environment(String environment) { - this.environment = Optional.ofNullable(environment); - return this; - } - - /** - *

Flows Vault Connection environment.

- */ - @java.lang.Override - @JsonSetter(value = "environment", nulls = Nulls.SKIP) - public _FinalStage environment(Optional environment) { - this.environment = environment; - return this; - } - - @java.lang.Override - public UpdateFlowsVaultConnectionResponseContent build() { - return new UpdateFlowsVaultConnectionResponseContent( - id, - appId, - environment, - name, - accountName, - ready, - createdAt, - updatedAt, - refreshedAt, - fingerprint, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionSetup.java b/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionSetup.java deleted file mode 100644 index e3e8c4832..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateFlowsVaultConnectionSetup.java +++ /dev/null @@ -1,267 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = UpdateFlowsVaultConnectionSetup.Deserializer.class) -public final class UpdateFlowsVaultConnectionSetup { - private final Object value; - - private final int type; - - private UpdateFlowsVaultConnectionSetup(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((FlowsVaultConnectioSetupApiKeyWithBaseUrl) this.value); - } else if (this.type == 1) { - return visitor.visit((FlowsVaultConnectioSetupApiKey) this.value); - } else if (this.type == 2) { - return visitor.visit((FlowsVaultConnectioSetupOauthApp) this.value); - } else if (this.type == 3) { - return visitor.visit((FlowsVaultConnectioSetupBigqueryOauthJwt) this.value); - } else if (this.type == 4) { - return visitor.visit((FlowsVaultConnectioSetupSecretApiKey) this.value); - } else if (this.type == 5) { - return visitor.visit((FlowsVaultConnectioSetupHttpBearer) this.value); - } else if (this.type == 6) { - return visitor.visit((FlowsVaultConnectionHttpBasicAuthSetup) this.value); - } else if (this.type == 7) { - return visitor.visit((FlowsVaultConnectionHttpApiKeySetup) this.value); - } else if (this.type == 8) { - return visitor.visit((FlowsVaultConnectionHttpOauthClientCredentialsSetup) this.value); - } else if (this.type == 9) { - return visitor.visit((FlowsVaultConnectioSetupJwt) this.value); - } else if (this.type == 10) { - return visitor.visit((FlowsVaultConnectioSetupMailjetApiKey) this.value); - } else if (this.type == 11) { - return visitor.visit((FlowsVaultConnectioSetupToken) this.value); - } else if (this.type == 12) { - return visitor.visit((FlowsVaultConnectioSetupWebhook) this.value); - } else if (this.type == 13) { - return visitor.visit((FlowsVaultConnectioSetupStripeKeyPair) this.value); - } else if (this.type == 14) { - return visitor.visit((FlowsVaultConnectioSetupOauthCode) this.value); - } else if (this.type == 15) { - return visitor.visit((FlowsVaultConnectioSetupTwilioApiKey) 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 UpdateFlowsVaultConnectionSetup && equalTo((UpdateFlowsVaultConnectionSetup) other); - } - - private boolean equalTo(UpdateFlowsVaultConnectionSetup 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 UpdateFlowsVaultConnectionSetup of(FlowsVaultConnectioSetupApiKeyWithBaseUrl value) { - return new UpdateFlowsVaultConnectionSetup(value, 0); - } - - public static UpdateFlowsVaultConnectionSetup of(FlowsVaultConnectioSetupApiKey value) { - return new UpdateFlowsVaultConnectionSetup(value, 1); - } - - public static UpdateFlowsVaultConnectionSetup of(FlowsVaultConnectioSetupOauthApp value) { - return new UpdateFlowsVaultConnectionSetup(value, 2); - } - - public static UpdateFlowsVaultConnectionSetup of(FlowsVaultConnectioSetupBigqueryOauthJwt value) { - return new UpdateFlowsVaultConnectionSetup(value, 3); - } - - public static UpdateFlowsVaultConnectionSetup of(FlowsVaultConnectioSetupSecretApiKey value) { - return new UpdateFlowsVaultConnectionSetup(value, 4); - } - - public static UpdateFlowsVaultConnectionSetup of(FlowsVaultConnectioSetupHttpBearer value) { - return new UpdateFlowsVaultConnectionSetup(value, 5); - } - - public static UpdateFlowsVaultConnectionSetup of(FlowsVaultConnectionHttpBasicAuthSetup value) { - return new UpdateFlowsVaultConnectionSetup(value, 6); - } - - public static UpdateFlowsVaultConnectionSetup of(FlowsVaultConnectionHttpApiKeySetup value) { - return new UpdateFlowsVaultConnectionSetup(value, 7); - } - - public static UpdateFlowsVaultConnectionSetup of(FlowsVaultConnectionHttpOauthClientCredentialsSetup value) { - return new UpdateFlowsVaultConnectionSetup(value, 8); - } - - public static UpdateFlowsVaultConnectionSetup of(FlowsVaultConnectioSetupJwt value) { - return new UpdateFlowsVaultConnectionSetup(value, 9); - } - - public static UpdateFlowsVaultConnectionSetup of(FlowsVaultConnectioSetupMailjetApiKey value) { - return new UpdateFlowsVaultConnectionSetup(value, 10); - } - - public static UpdateFlowsVaultConnectionSetup of(FlowsVaultConnectioSetupToken value) { - return new UpdateFlowsVaultConnectionSetup(value, 11); - } - - public static UpdateFlowsVaultConnectionSetup of(FlowsVaultConnectioSetupWebhook value) { - return new UpdateFlowsVaultConnectionSetup(value, 12); - } - - public static UpdateFlowsVaultConnectionSetup of(FlowsVaultConnectioSetupStripeKeyPair value) { - return new UpdateFlowsVaultConnectionSetup(value, 13); - } - - public static UpdateFlowsVaultConnectionSetup of(FlowsVaultConnectioSetupOauthCode value) { - return new UpdateFlowsVaultConnectionSetup(value, 14); - } - - public static UpdateFlowsVaultConnectionSetup of(FlowsVaultConnectioSetupTwilioApiKey value) { - return new UpdateFlowsVaultConnectionSetup(value, 15); - } - - public interface Visitor { - T visit(FlowsVaultConnectioSetupApiKeyWithBaseUrl value); - - T visit(FlowsVaultConnectioSetupApiKey value); - - T visit(FlowsVaultConnectioSetupOauthApp value); - - T visit(FlowsVaultConnectioSetupBigqueryOauthJwt value); - - T visit(FlowsVaultConnectioSetupSecretApiKey value); - - T visit(FlowsVaultConnectioSetupHttpBearer value); - - T visit(FlowsVaultConnectionHttpBasicAuthSetup value); - - T visit(FlowsVaultConnectionHttpApiKeySetup value); - - T visit(FlowsVaultConnectionHttpOauthClientCredentialsSetup value); - - T visit(FlowsVaultConnectioSetupJwt value); - - T visit(FlowsVaultConnectioSetupMailjetApiKey value); - - T visit(FlowsVaultConnectioSetupToken value); - - T visit(FlowsVaultConnectioSetupWebhook value); - - T visit(FlowsVaultConnectioSetupStripeKeyPair value); - - T visit(FlowsVaultConnectioSetupOauthCode value); - - T visit(FlowsVaultConnectioSetupTwilioApiKey value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(UpdateFlowsVaultConnectionSetup.class); - } - - @java.lang.Override - public UpdateFlowsVaultConnectionSetup deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupApiKeyWithBaseUrl.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupApiKey.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupOauthApp.class)); - } catch (RuntimeException e) { - } - try { - return of( - ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupBigqueryOauthJwt.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupSecretApiKey.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupHttpBearer.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectionHttpBasicAuthSetup.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectionHttpApiKeySetup.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, FlowsVaultConnectionHttpOauthClientCredentialsSetup.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupJwt.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupMailjetApiKey.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupToken.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupWebhook.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupStripeKeyPair.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupOauthCode.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlowsVaultConnectioSetupTwilioApiKey.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 deleted file mode 100644 index 777677ea7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateFormRequestContent.java +++ /dev/null @@ -1,425 +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.Nullable; -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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateFormRequestContent.Builder.class) -public final class UpdateFormRequestContent { - private final Optional name; - - private final OptionalNullable messages; - - private final OptionalNullable languages; - - private final OptionalNullable>> translations; - - private final OptionalNullable> nodes; - - private final OptionalNullable start; - - private final OptionalNullable ending; - - private final OptionalNullable style; - - private final Map additionalProperties; - - private UpdateFormRequestContent( - Optional name, - OptionalNullable messages, - OptionalNullable languages, - OptionalNullable>> translations, - OptionalNullable> nodes, - OptionalNullable start, - OptionalNullable ending, - OptionalNullable style, - Map additionalProperties) { - this.name = name; - this.messages = messages; - this.languages = languages; - this.translations = translations; - this.nodes = nodes; - this.start = start; - this.ending = ending; - this.style = style; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("messages") - public OptionalNullable getMessages() { - return messages; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("languages") - public OptionalNullable getLanguages() { - return languages; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("translations") - public OptionalNullable>> getTranslations() { - return translations; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("nodes") - public OptionalNullable> getNodes() { - return nodes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("start") - public OptionalNullable getStart() { - return start; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("ending") - public OptionalNullable getEnding() { - return ending; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("style") - public OptionalNullable getStyle() { - return style; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateFormRequestContent && equalTo((UpdateFormRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateFormRequestContent other) { - return name.equals(other.name) - && messages.equals(other.messages) - && languages.equals(other.languages) - && translations.equals(other.translations) - && nodes.equals(other.nodes) - && start.equals(other.start) - && ending.equals(other.ending) - && style.equals(other.style); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.messages, - this.languages, - this.translations, - this.nodes, - this.start, - this.ending, - this.style); - } - - @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 messages = OptionalNullable.absent(); - - private OptionalNullable languages = OptionalNullable.absent(); - - private OptionalNullable>> translations = OptionalNullable.absent(); - - private OptionalNullable> nodes = OptionalNullable.absent(); - - private OptionalNullable start = OptionalNullable.absent(); - - private OptionalNullable ending = OptionalNullable.absent(); - - private OptionalNullable style = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateFormRequestContent other) { - name(other.getName()); - messages(other.getMessages()); - languages(other.getLanguages()); - translations(other.getTranslations()); - nodes(other.getNodes()); - start(other.getStart()); - ending(other.getEnding()); - style(other.getStyle()); - 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 = "messages", nulls = Nulls.SKIP) - public Builder messages(OptionalNullable messages) { - this.messages = messages; - return this; - } - - public Builder messages(FormMessages messages) { - this.messages = OptionalNullable.of(messages); - return this; - } - - public Builder messages(Optional messages) { - if (messages.isPresent()) { - this.messages = OptionalNullable.of(messages.get()); - } else { - this.messages = OptionalNullable.absent(); - } - return this; - } - - public Builder messages(Nullable messages) { - if (messages.isNull()) { - this.messages = OptionalNullable.ofNull(); - } else if (messages.isEmpty()) { - this.messages = OptionalNullable.absent(); - } else { - this.messages = OptionalNullable.of(messages.get()); - } - return this; - } - - @JsonSetter(value = "languages", nulls = Nulls.SKIP) - public Builder languages(OptionalNullable languages) { - this.languages = languages; - return this; - } - - public Builder languages(FormLanguages languages) { - this.languages = OptionalNullable.of(languages); - return this; - } - - public Builder languages(Optional languages) { - if (languages.isPresent()) { - this.languages = OptionalNullable.of(languages.get()); - } else { - this.languages = OptionalNullable.absent(); - } - return this; - } - - public Builder languages(Nullable languages) { - if (languages.isNull()) { - this.languages = OptionalNullable.ofNull(); - } else if (languages.isEmpty()) { - this.languages = OptionalNullable.absent(); - } else { - this.languages = OptionalNullable.of(languages.get()); - } - return this; - } - - @JsonSetter(value = "translations", nulls = Nulls.SKIP) - public Builder translations(OptionalNullable>> translations) { - this.translations = translations; - return this; - } - - public Builder translations(Map> translations) { - this.translations = OptionalNullable.of(translations); - return this; - } - - public Builder translations(Optional>> translations) { - if (translations.isPresent()) { - this.translations = OptionalNullable.of(translations.get()); - } else { - this.translations = OptionalNullable.absent(); - } - return this; - } - - public Builder translations(Nullable>> translations) { - if (translations.isNull()) { - this.translations = OptionalNullable.ofNull(); - } else if (translations.isEmpty()) { - this.translations = OptionalNullable.absent(); - } else { - this.translations = OptionalNullable.of(translations.get()); - } - return this; - } - - @JsonSetter(value = "nodes", nulls = Nulls.SKIP) - public Builder nodes(OptionalNullable> nodes) { - this.nodes = nodes; - return this; - } - - public Builder nodes(List nodes) { - this.nodes = OptionalNullable.of(nodes); - return this; - } - - public Builder nodes(Optional> nodes) { - if (nodes.isPresent()) { - this.nodes = OptionalNullable.of(nodes.get()); - } else { - this.nodes = OptionalNullable.absent(); - } - return this; - } - - public Builder nodes(Nullable> nodes) { - if (nodes.isNull()) { - this.nodes = OptionalNullable.ofNull(); - } else if (nodes.isEmpty()) { - this.nodes = OptionalNullable.absent(); - } else { - this.nodes = OptionalNullable.of(nodes.get()); - } - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(OptionalNullable start) { - this.start = start; - return this; - } - - public Builder start(FormStartNode start) { - this.start = OptionalNullable.of(start); - return this; - } - - public Builder start(Optional start) { - if (start.isPresent()) { - this.start = OptionalNullable.of(start.get()); - } else { - this.start = OptionalNullable.absent(); - } - return this; - } - - public Builder start(Nullable start) { - if (start.isNull()) { - this.start = OptionalNullable.ofNull(); - } else if (start.isEmpty()) { - this.start = OptionalNullable.absent(); - } else { - this.start = OptionalNullable.of(start.get()); - } - return this; - } - - @JsonSetter(value = "ending", nulls = Nulls.SKIP) - public Builder ending(OptionalNullable ending) { - this.ending = ending; - return this; - } - - public Builder ending(FormEndingNode ending) { - this.ending = OptionalNullable.of(ending); - return this; - } - - public Builder ending(Optional ending) { - if (ending.isPresent()) { - this.ending = OptionalNullable.of(ending.get()); - } else { - this.ending = OptionalNullable.absent(); - } - return this; - } - - public Builder ending(Nullable ending) { - if (ending.isNull()) { - this.ending = OptionalNullable.ofNull(); - } else if (ending.isEmpty()) { - this.ending = OptionalNullable.absent(); - } else { - this.ending = OptionalNullable.of(ending.get()); - } - return this; - } - - @JsonSetter(value = "style", nulls = Nulls.SKIP) - public Builder style(OptionalNullable style) { - this.style = style; - return this; - } - - public Builder style(FormStyle style) { - this.style = OptionalNullable.of(style); - return this; - } - - public Builder style(Optional style) { - if (style.isPresent()) { - this.style = OptionalNullable.of(style.get()); - } else { - this.style = OptionalNullable.absent(); - } - return this; - } - - public Builder style(Nullable style) { - if (style.isNull()) { - this.style = OptionalNullable.ofNull(); - } else if (style.isEmpty()) { - this.style = OptionalNullable.absent(); - } else { - this.style = OptionalNullable.of(style.get()); - } - return this; - } - - public UpdateFormRequestContent build() { - return new UpdateFormRequestContent( - name, messages, languages, translations, nodes, start, ending, style, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateFormResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateFormResponseContent.java deleted file mode 100644 index 3be8732ad..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateFormResponseContent.java +++ /dev/null @@ -1,477 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = UpdateFormResponseContent.Builder.class) -public final class UpdateFormResponseContent { - private final String id; - - private final String name; - - private final Optional messages; - - private final Optional languages; - - private final Optional>> translations; - - private final Optional> nodes; - - private final Optional start; - - private final Optional ending; - - private final Optional style; - - private final OffsetDateTime createdAt; - - private final OffsetDateTime updatedAt; - - private final Optional embeddedAt; - - private final Optional submittedAt; - - private final Map additionalProperties; - - private UpdateFormResponseContent( - String id, - String name, - Optional messages, - Optional languages, - Optional>> translations, - Optional> nodes, - Optional start, - Optional ending, - Optional style, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - Optional embeddedAt, - Optional submittedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.messages = messages; - this.languages = languages; - this.translations = translations; - this.nodes = nodes; - this.start = start; - this.ending = ending; - this.style = style; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.embeddedAt = embeddedAt; - this.submittedAt = submittedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("messages") - public Optional getMessages() { - return messages; - } - - @JsonProperty("languages") - public Optional getLanguages() { - return languages; - } - - @JsonProperty("translations") - public Optional>> getTranslations() { - return translations; - } - - @JsonProperty("nodes") - public Optional> getNodes() { - return nodes; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("ending") - public Optional getEnding() { - return ending; - } - - @JsonProperty("style") - public Optional getStyle() { - return style; - } - - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - @JsonProperty("updated_at") - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("embedded_at") - public Optional getEmbeddedAt() { - return embeddedAt; - } - - @JsonProperty("submitted_at") - public Optional getSubmittedAt() { - return submittedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateFormResponseContent && equalTo((UpdateFormResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateFormResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && messages.equals(other.messages) - && languages.equals(other.languages) - && translations.equals(other.translations) - && nodes.equals(other.nodes) - && start.equals(other.start) - && ending.equals(other.ending) - && style.equals(other.style) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && embeddedAt.equals(other.embeddedAt) - && submittedAt.equals(other.submittedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.messages, - this.languages, - this.translations, - this.nodes, - this.start, - this.ending, - this.style, - this.createdAt, - this.updatedAt, - this.embeddedAt, - this.submittedAt); - } - - @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(UpdateFormResponseContent other); - } - - 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 { - UpdateFormResponseContent build(); - - _FinalStage messages(Optional messages); - - _FinalStage messages(FormMessages messages); - - _FinalStage languages(Optional languages); - - _FinalStage languages(FormLanguages languages); - - _FinalStage translations(Optional>> translations); - - _FinalStage translations(Map> translations); - - _FinalStage nodes(Optional> nodes); - - _FinalStage nodes(List nodes); - - _FinalStage start(Optional start); - - _FinalStage start(FormStartNode start); - - _FinalStage ending(Optional ending); - - _FinalStage ending(FormEndingNode ending); - - _FinalStage style(Optional style); - - _FinalStage style(FormStyle style); - - _FinalStage embeddedAt(Optional embeddedAt); - - _FinalStage embeddedAt(String embeddedAt); - - _FinalStage submittedAt(Optional submittedAt); - - _FinalStage submittedAt(String submittedAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, NameStage, CreatedAtStage, UpdatedAtStage, _FinalStage { - private String id; - - private String name; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - private Optional submittedAt = Optional.empty(); - - private Optional embeddedAt = Optional.empty(); - - private Optional style = Optional.empty(); - - private Optional ending = Optional.empty(); - - private Optional start = Optional.empty(); - - private Optional> nodes = Optional.empty(); - - private Optional>> translations = Optional.empty(); - - private Optional languages = Optional.empty(); - - private Optional messages = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateFormResponseContent other) { - id(other.getId()); - name(other.getName()); - messages(other.getMessages()); - languages(other.getLanguages()); - translations(other.getTranslations()); - nodes(other.getNodes()); - start(other.getStart()); - ending(other.getEnding()); - style(other.getStyle()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - embeddedAt(other.getEmbeddedAt()); - submittedAt(other.getSubmittedAt()); - 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 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 submittedAt(String submittedAt) { - this.submittedAt = Optional.ofNullable(submittedAt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "submitted_at", nulls = Nulls.SKIP) - public _FinalStage submittedAt(Optional submittedAt) { - this.submittedAt = submittedAt; - return this; - } - - @java.lang.Override - public _FinalStage embeddedAt(String embeddedAt) { - this.embeddedAt = Optional.ofNullable(embeddedAt); - return this; - } - - @java.lang.Override - @JsonSetter(value = "embedded_at", nulls = Nulls.SKIP) - public _FinalStage embeddedAt(Optional embeddedAt) { - this.embeddedAt = embeddedAt; - return this; - } - - @java.lang.Override - public _FinalStage style(FormStyle style) { - this.style = Optional.ofNullable(style); - return this; - } - - @java.lang.Override - @JsonSetter(value = "style", nulls = Nulls.SKIP) - public _FinalStage style(Optional style) { - this.style = style; - return this; - } - - @java.lang.Override - public _FinalStage ending(FormEndingNode ending) { - this.ending = Optional.ofNullable(ending); - return this; - } - - @java.lang.Override - @JsonSetter(value = "ending", nulls = Nulls.SKIP) - public _FinalStage ending(Optional ending) { - this.ending = ending; - return this; - } - - @java.lang.Override - public _FinalStage start(FormStartNode start) { - this.start = Optional.ofNullable(start); - return this; - } - - @java.lang.Override - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public _FinalStage start(Optional start) { - this.start = start; - return this; - } - - @java.lang.Override - public _FinalStage nodes(List nodes) { - this.nodes = Optional.ofNullable(nodes); - return this; - } - - @java.lang.Override - @JsonSetter(value = "nodes", nulls = Nulls.SKIP) - public _FinalStage nodes(Optional> nodes) { - this.nodes = nodes; - return this; - } - - @java.lang.Override - public _FinalStage translations(Map> translations) { - this.translations = Optional.ofNullable(translations); - return this; - } - - @java.lang.Override - @JsonSetter(value = "translations", nulls = Nulls.SKIP) - public _FinalStage translations(Optional>> translations) { - this.translations = translations; - return this; - } - - @java.lang.Override - public _FinalStage languages(FormLanguages languages) { - this.languages = Optional.ofNullable(languages); - return this; - } - - @java.lang.Override - @JsonSetter(value = "languages", nulls = Nulls.SKIP) - public _FinalStage languages(Optional languages) { - this.languages = languages; - return this; - } - - @java.lang.Override - public _FinalStage messages(FormMessages messages) { - this.messages = Optional.ofNullable(messages); - return this; - } - - @java.lang.Override - @JsonSetter(value = "messages", nulls = Nulls.SKIP) - public _FinalStage messages(Optional messages) { - this.messages = messages; - return this; - } - - @java.lang.Override - public UpdateFormResponseContent build() { - return new UpdateFormResponseContent( - id, - name, - messages, - languages, - translations, - nodes, - start, - ending, - style, - createdAt, - updatedAt, - embeddedAt, - submittedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateGuardianFactorDuoSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateGuardianFactorDuoSettingsResponseContent.java deleted file mode 100644 index 634e09d9d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateGuardianFactorDuoSettingsResponseContent.java +++ /dev/null @@ -1,144 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateGuardianFactorDuoSettingsResponseContent.Builder.class) -public final class UpdateGuardianFactorDuoSettingsResponseContent { - private final Optional ikey; - - private final Optional skey; - - private final Optional host; - - private final Map additionalProperties; - - private UpdateGuardianFactorDuoSettingsResponseContent( - Optional ikey, - Optional skey, - Optional host, - Map additionalProperties) { - this.ikey = ikey; - this.skey = skey; - this.host = host; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("ikey") - public Optional getIkey() { - return ikey; - } - - @JsonProperty("skey") - public Optional getSkey() { - return skey; - } - - @JsonProperty("host") - public Optional getHost() { - return host; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateGuardianFactorDuoSettingsResponseContent - && equalTo((UpdateGuardianFactorDuoSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateGuardianFactorDuoSettingsResponseContent other) { - return ikey.equals(other.ikey) && skey.equals(other.skey) && host.equals(other.host); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.ikey, this.skey, this.host); - } - - @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 ikey = Optional.empty(); - - private Optional skey = Optional.empty(); - - private Optional host = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateGuardianFactorDuoSettingsResponseContent other) { - ikey(other.getIkey()); - skey(other.getSkey()); - host(other.getHost()); - return this; - } - - @JsonSetter(value = "ikey", nulls = Nulls.SKIP) - public Builder ikey(Optional ikey) { - this.ikey = ikey; - return this; - } - - public Builder ikey(String ikey) { - this.ikey = Optional.ofNullable(ikey); - return this; - } - - @JsonSetter(value = "skey", nulls = Nulls.SKIP) - public Builder skey(Optional skey) { - this.skey = skey; - return this; - } - - public Builder skey(String skey) { - this.skey = Optional.ofNullable(skey); - return this; - } - - @JsonSetter(value = "host", nulls = Nulls.SKIP) - public Builder host(Optional host) { - this.host = host; - return this; - } - - public Builder host(String host) { - this.host = Optional.ofNullable(host); - return this; - } - - public UpdateGuardianFactorDuoSettingsResponseContent build() { - return new UpdateGuardianFactorDuoSettingsResponseContent(ikey, skey, host, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateGuardianFactorsProviderPushNotificationApnsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateGuardianFactorsProviderPushNotificationApnsResponseContent.java deleted file mode 100644 index 0776e5419..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateGuardianFactorsProviderPushNotificationApnsResponseContent.java +++ /dev/null @@ -1,153 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateGuardianFactorsProviderPushNotificationApnsResponseContent.Builder.class) -public final class UpdateGuardianFactorsProviderPushNotificationApnsResponseContent { - private final Optional sandbox; - - private final OptionalNullable bundleId; - - private final Map additionalProperties; - - private UpdateGuardianFactorsProviderPushNotificationApnsResponseContent( - Optional sandbox, OptionalNullable bundleId, Map additionalProperties) { - this.sandbox = sandbox; - this.bundleId = bundleId; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("sandbox") - public Optional getSandbox() { - return sandbox; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("bundle_id") - public OptionalNullable getBundleId() { - if (bundleId == null) { - return OptionalNullable.absent(); - } - return bundleId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("bundle_id") - private OptionalNullable _getBundleId() { - return bundleId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateGuardianFactorsProviderPushNotificationApnsResponseContent - && equalTo((UpdateGuardianFactorsProviderPushNotificationApnsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateGuardianFactorsProviderPushNotificationApnsResponseContent other) { - return sandbox.equals(other.sandbox) && bundleId.equals(other.bundleId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.sandbox, this.bundleId); - } - - @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 sandbox = Optional.empty(); - - private OptionalNullable bundleId = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateGuardianFactorsProviderPushNotificationApnsResponseContent other) { - sandbox(other.getSandbox()); - bundleId(other.getBundleId()); - return this; - } - - @JsonSetter(value = "sandbox", nulls = Nulls.SKIP) - public Builder sandbox(Optional sandbox) { - this.sandbox = sandbox; - return this; - } - - public Builder sandbox(Boolean sandbox) { - this.sandbox = Optional.ofNullable(sandbox); - return this; - } - - @JsonSetter(value = "bundle_id", nulls = Nulls.SKIP) - public Builder bundleId(@Nullable OptionalNullable bundleId) { - this.bundleId = bundleId; - return this; - } - - public Builder bundleId(String bundleId) { - this.bundleId = OptionalNullable.of(bundleId); - return this; - } - - public Builder bundleId(Optional bundleId) { - if (bundleId.isPresent()) { - this.bundleId = OptionalNullable.of(bundleId.get()); - } else { - this.bundleId = OptionalNullable.absent(); - } - return this; - } - - public Builder bundleId(com.auth0.client.mgmt.core.Nullable bundleId) { - if (bundleId.isNull()) { - this.bundleId = OptionalNullable.ofNull(); - } else if (bundleId.isEmpty()) { - this.bundleId = OptionalNullable.absent(); - } else { - this.bundleId = OptionalNullable.of(bundleId.get()); - } - return this; - } - - public UpdateGuardianFactorsProviderPushNotificationApnsResponseContent build() { - return new UpdateGuardianFactorsProviderPushNotificationApnsResponseContent( - sandbox, bundleId, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateGuardianFactorsProviderPushNotificationSnsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateGuardianFactorsProviderPushNotificationSnsResponseContent.java deleted file mode 100644 index 72a5d6a4f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateGuardianFactorsProviderPushNotificationSnsResponseContent.java +++ /dev/null @@ -1,360 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateGuardianFactorsProviderPushNotificationSnsResponseContent.Builder.class) -public final class UpdateGuardianFactorsProviderPushNotificationSnsResponseContent { - private final OptionalNullable awsAccessKeyId; - - private final OptionalNullable awsSecretAccessKey; - - private final OptionalNullable awsRegion; - - private final OptionalNullable snsApnsPlatformApplicationArn; - - private final OptionalNullable snsGcmPlatformApplicationArn; - - private final Map additionalProperties; - - private UpdateGuardianFactorsProviderPushNotificationSnsResponseContent( - OptionalNullable awsAccessKeyId, - OptionalNullable awsSecretAccessKey, - OptionalNullable awsRegion, - OptionalNullable snsApnsPlatformApplicationArn, - OptionalNullable snsGcmPlatformApplicationArn, - Map additionalProperties) { - this.awsAccessKeyId = awsAccessKeyId; - this.awsSecretAccessKey = awsSecretAccessKey; - this.awsRegion = awsRegion; - this.snsApnsPlatformApplicationArn = snsApnsPlatformApplicationArn; - this.snsGcmPlatformApplicationArn = snsGcmPlatformApplicationArn; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_access_key_id") - public OptionalNullable getAwsAccessKeyId() { - if (awsAccessKeyId == null) { - return OptionalNullable.absent(); - } - return awsAccessKeyId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_secret_access_key") - public OptionalNullable getAwsSecretAccessKey() { - if (awsSecretAccessKey == null) { - return OptionalNullable.absent(); - } - return awsSecretAccessKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_region") - public OptionalNullable getAwsRegion() { - if (awsRegion == null) { - return OptionalNullable.absent(); - } - return awsRegion; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_apns_platform_application_arn") - public OptionalNullable getSnsApnsPlatformApplicationArn() { - if (snsApnsPlatformApplicationArn == null) { - return OptionalNullable.absent(); - } - return snsApnsPlatformApplicationArn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_gcm_platform_application_arn") - public OptionalNullable getSnsGcmPlatformApplicationArn() { - if (snsGcmPlatformApplicationArn == null) { - return OptionalNullable.absent(); - } - return snsGcmPlatformApplicationArn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_access_key_id") - private OptionalNullable _getAwsAccessKeyId() { - return awsAccessKeyId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_secret_access_key") - private OptionalNullable _getAwsSecretAccessKey() { - return awsSecretAccessKey; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("aws_region") - private OptionalNullable _getAwsRegion() { - return awsRegion; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_apns_platform_application_arn") - private OptionalNullable _getSnsApnsPlatformApplicationArn() { - return snsApnsPlatformApplicationArn; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sns_gcm_platform_application_arn") - private OptionalNullable _getSnsGcmPlatformApplicationArn() { - return snsGcmPlatformApplicationArn; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateGuardianFactorsProviderPushNotificationSnsResponseContent - && equalTo((UpdateGuardianFactorsProviderPushNotificationSnsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateGuardianFactorsProviderPushNotificationSnsResponseContent other) { - return awsAccessKeyId.equals(other.awsAccessKeyId) - && awsSecretAccessKey.equals(other.awsSecretAccessKey) - && awsRegion.equals(other.awsRegion) - && snsApnsPlatformApplicationArn.equals(other.snsApnsPlatformApplicationArn) - && snsGcmPlatformApplicationArn.equals(other.snsGcmPlatformApplicationArn); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.awsAccessKeyId, - this.awsSecretAccessKey, - this.awsRegion, - this.snsApnsPlatformApplicationArn, - this.snsGcmPlatformApplicationArn); - } - - @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 awsAccessKeyId = OptionalNullable.absent(); - - private OptionalNullable awsSecretAccessKey = OptionalNullable.absent(); - - private OptionalNullable awsRegion = OptionalNullable.absent(); - - private OptionalNullable snsApnsPlatformApplicationArn = OptionalNullable.absent(); - - private OptionalNullable snsGcmPlatformApplicationArn = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateGuardianFactorsProviderPushNotificationSnsResponseContent other) { - awsAccessKeyId(other.getAwsAccessKeyId()); - awsSecretAccessKey(other.getAwsSecretAccessKey()); - awsRegion(other.getAwsRegion()); - snsApnsPlatformApplicationArn(other.getSnsApnsPlatformApplicationArn()); - snsGcmPlatformApplicationArn(other.getSnsGcmPlatformApplicationArn()); - return this; - } - - @JsonSetter(value = "aws_access_key_id", nulls = Nulls.SKIP) - public Builder awsAccessKeyId(@Nullable OptionalNullable awsAccessKeyId) { - this.awsAccessKeyId = awsAccessKeyId; - return this; - } - - public Builder awsAccessKeyId(String awsAccessKeyId) { - this.awsAccessKeyId = OptionalNullable.of(awsAccessKeyId); - return this; - } - - public Builder awsAccessKeyId(Optional awsAccessKeyId) { - if (awsAccessKeyId.isPresent()) { - this.awsAccessKeyId = OptionalNullable.of(awsAccessKeyId.get()); - } else { - this.awsAccessKeyId = OptionalNullable.absent(); - } - return this; - } - - public Builder awsAccessKeyId(com.auth0.client.mgmt.core.Nullable awsAccessKeyId) { - if (awsAccessKeyId.isNull()) { - this.awsAccessKeyId = OptionalNullable.ofNull(); - } else if (awsAccessKeyId.isEmpty()) { - this.awsAccessKeyId = OptionalNullable.absent(); - } else { - this.awsAccessKeyId = OptionalNullable.of(awsAccessKeyId.get()); - } - return this; - } - - @JsonSetter(value = "aws_secret_access_key", nulls = Nulls.SKIP) - public Builder awsSecretAccessKey(@Nullable OptionalNullable awsSecretAccessKey) { - this.awsSecretAccessKey = awsSecretAccessKey; - return this; - } - - public Builder awsSecretAccessKey(String awsSecretAccessKey) { - this.awsSecretAccessKey = OptionalNullable.of(awsSecretAccessKey); - return this; - } - - public Builder awsSecretAccessKey(Optional awsSecretAccessKey) { - if (awsSecretAccessKey.isPresent()) { - this.awsSecretAccessKey = OptionalNullable.of(awsSecretAccessKey.get()); - } else { - this.awsSecretAccessKey = OptionalNullable.absent(); - } - return this; - } - - public Builder awsSecretAccessKey(com.auth0.client.mgmt.core.Nullable awsSecretAccessKey) { - if (awsSecretAccessKey.isNull()) { - this.awsSecretAccessKey = OptionalNullable.ofNull(); - } else if (awsSecretAccessKey.isEmpty()) { - this.awsSecretAccessKey = OptionalNullable.absent(); - } else { - this.awsSecretAccessKey = OptionalNullable.of(awsSecretAccessKey.get()); - } - return this; - } - - @JsonSetter(value = "aws_region", nulls = Nulls.SKIP) - public Builder awsRegion(@Nullable OptionalNullable awsRegion) { - this.awsRegion = awsRegion; - return this; - } - - public Builder awsRegion(String awsRegion) { - this.awsRegion = OptionalNullable.of(awsRegion); - return this; - } - - public Builder awsRegion(Optional awsRegion) { - if (awsRegion.isPresent()) { - this.awsRegion = OptionalNullable.of(awsRegion.get()); - } else { - this.awsRegion = OptionalNullable.absent(); - } - return this; - } - - public Builder awsRegion(com.auth0.client.mgmt.core.Nullable awsRegion) { - if (awsRegion.isNull()) { - this.awsRegion = OptionalNullable.ofNull(); - } else if (awsRegion.isEmpty()) { - this.awsRegion = OptionalNullable.absent(); - } else { - this.awsRegion = OptionalNullable.of(awsRegion.get()); - } - return this; - } - - @JsonSetter(value = "sns_apns_platform_application_arn", nulls = Nulls.SKIP) - public Builder snsApnsPlatformApplicationArn(@Nullable OptionalNullable snsApnsPlatformApplicationArn) { - this.snsApnsPlatformApplicationArn = snsApnsPlatformApplicationArn; - return this; - } - - public Builder snsApnsPlatformApplicationArn(String snsApnsPlatformApplicationArn) { - this.snsApnsPlatformApplicationArn = OptionalNullable.of(snsApnsPlatformApplicationArn); - return this; - } - - public Builder snsApnsPlatformApplicationArn(Optional snsApnsPlatformApplicationArn) { - if (snsApnsPlatformApplicationArn.isPresent()) { - this.snsApnsPlatformApplicationArn = OptionalNullable.of(snsApnsPlatformApplicationArn.get()); - } else { - this.snsApnsPlatformApplicationArn = OptionalNullable.absent(); - } - return this; - } - - public Builder snsApnsPlatformApplicationArn( - com.auth0.client.mgmt.core.Nullable snsApnsPlatformApplicationArn) { - if (snsApnsPlatformApplicationArn.isNull()) { - this.snsApnsPlatformApplicationArn = OptionalNullable.ofNull(); - } else if (snsApnsPlatformApplicationArn.isEmpty()) { - this.snsApnsPlatformApplicationArn = OptionalNullable.absent(); - } else { - this.snsApnsPlatformApplicationArn = OptionalNullable.of(snsApnsPlatformApplicationArn.get()); - } - return this; - } - - @JsonSetter(value = "sns_gcm_platform_application_arn", nulls = Nulls.SKIP) - public Builder snsGcmPlatformApplicationArn(@Nullable OptionalNullable snsGcmPlatformApplicationArn) { - this.snsGcmPlatformApplicationArn = snsGcmPlatformApplicationArn; - return this; - } - - public Builder snsGcmPlatformApplicationArn(String snsGcmPlatformApplicationArn) { - this.snsGcmPlatformApplicationArn = OptionalNullable.of(snsGcmPlatformApplicationArn); - return this; - } - - public Builder snsGcmPlatformApplicationArn(Optional snsGcmPlatformApplicationArn) { - if (snsGcmPlatformApplicationArn.isPresent()) { - this.snsGcmPlatformApplicationArn = OptionalNullable.of(snsGcmPlatformApplicationArn.get()); - } else { - this.snsGcmPlatformApplicationArn = OptionalNullable.absent(); - } - return this; - } - - public Builder snsGcmPlatformApplicationArn( - com.auth0.client.mgmt.core.Nullable snsGcmPlatformApplicationArn) { - if (snsGcmPlatformApplicationArn.isNull()) { - this.snsGcmPlatformApplicationArn = OptionalNullable.ofNull(); - } else if (snsGcmPlatformApplicationArn.isEmpty()) { - this.snsGcmPlatformApplicationArn = OptionalNullable.absent(); - } else { - this.snsGcmPlatformApplicationArn = OptionalNullable.of(snsGcmPlatformApplicationArn.get()); - } - return this; - } - - public UpdateGuardianFactorsProviderPushNotificationSnsResponseContent build() { - return new UpdateGuardianFactorsProviderPushNotificationSnsResponseContent( - awsAccessKeyId, - awsSecretAccessKey, - awsRegion, - snsApnsPlatformApplicationArn, - snsGcmPlatformApplicationArn, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateHookRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateHookRequestContent.java deleted file mode 100644 index a670143d6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateHookRequestContent.java +++ /dev/null @@ -1,187 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateHookRequestContent.Builder.class) -public final class UpdateHookRequestContent { - private final Optional name; - - private final Optional script; - - private final Optional enabled; - - private final Optional> dependencies; - - private final Map additionalProperties; - - private UpdateHookRequestContent( - Optional name, - Optional script, - Optional enabled, - Optional> dependencies, - Map additionalProperties) { - this.name = name; - this.script = script; - this.enabled = enabled; - this.dependencies = dependencies; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of this hook. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Code to be executed when this hook runs. - */ - @JsonProperty("script") - public Optional getScript() { - return script; - } - - /** - * @return Whether this hook will be executed (true) or ignored (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateHookRequestContent && equalTo((UpdateHookRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateHookRequestContent other) { - return name.equals(other.name) - && script.equals(other.script) - && enabled.equals(other.enabled) - && dependencies.equals(other.dependencies); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.script, this.enabled, this.dependencies); - } - - @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 script = Optional.empty(); - - private Optional enabled = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateHookRequestContent other) { - name(other.getName()); - script(other.getScript()); - enabled(other.getEnabled()); - dependencies(other.getDependencies()); - return this; - } - - /** - *

Name of this hook.

- */ - @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; - } - - /** - *

Code to be executed when this hook runs.

- */ - @JsonSetter(value = "script", nulls = Nulls.SKIP) - public Builder script(Optional script) { - this.script = script; - return this; - } - - public Builder script(String script) { - this.script = Optional.ofNullable(script); - return this; - } - - /** - *

Whether this hook will be executed (true) or ignored (false).

- */ - @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; - } - - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public Builder dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - public Builder dependencies(Map dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - public UpdateHookRequestContent build() { - return new UpdateHookRequestContent(name, script, enabled, dependencies, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateHookResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateHookResponseContent.java deleted file mode 100644 index a76296cf0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateHookResponseContent.java +++ /dev/null @@ -1,248 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateHookResponseContent.Builder.class) -public final class UpdateHookResponseContent { - private final Optional triggerId; - - private final Optional id; - - private final Optional name; - - private final Optional enabled; - - private final Optional script; - - private final Optional> dependencies; - - private final Map additionalProperties; - - private UpdateHookResponseContent( - Optional triggerId, - Optional id, - Optional name, - Optional enabled, - Optional script, - Optional> dependencies, - Map additionalProperties) { - this.triggerId = triggerId; - this.id = id; - this.name = name; - this.enabled = enabled; - this.script = script; - this.dependencies = dependencies; - this.additionalProperties = additionalProperties; - } - - /** - * @return Trigger ID - */ - @JsonProperty("triggerId") - public Optional getTriggerId() { - return triggerId; - } - - /** - * @return ID of this hook. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Name of this hook. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Whether this hook will be executed (true) or ignored (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Code to be executed when this hook runs. - */ - @JsonProperty("script") - public Optional getScript() { - return script; - } - - @JsonProperty("dependencies") - public Optional> getDependencies() { - return dependencies; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateHookResponseContent && equalTo((UpdateHookResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateHookResponseContent other) { - return triggerId.equals(other.triggerId) - && id.equals(other.id) - && name.equals(other.name) - && enabled.equals(other.enabled) - && script.equals(other.script) - && dependencies.equals(other.dependencies); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.triggerId, this.id, this.name, this.enabled, this.script, this.dependencies); - } - - @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 triggerId = Optional.empty(); - - private Optional id = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional enabled = Optional.empty(); - - private Optional script = Optional.empty(); - - private Optional> dependencies = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateHookResponseContent other) { - triggerId(other.getTriggerId()); - id(other.getId()); - name(other.getName()); - enabled(other.getEnabled()); - script(other.getScript()); - dependencies(other.getDependencies()); - return this; - } - - /** - *

Trigger ID

- */ - @JsonSetter(value = "triggerId", nulls = Nulls.SKIP) - public Builder triggerId(Optional triggerId) { - this.triggerId = triggerId; - return this; - } - - public Builder triggerId(String triggerId) { - this.triggerId = Optional.ofNullable(triggerId); - return this; - } - - /** - *

ID of this hook.

- */ - @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; - } - - /** - *

Name of this hook.

- */ - @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 hook will be executed (true) or ignored (false).

- */ - @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; - } - - /** - *

Code to be executed when this hook runs.

- */ - @JsonSetter(value = "script", nulls = Nulls.SKIP) - public Builder script(Optional script) { - this.script = script; - return this; - } - - public Builder script(String script) { - this.script = Optional.ofNullable(script); - return this; - } - - @JsonSetter(value = "dependencies", nulls = Nulls.SKIP) - public Builder dependencies(Optional> dependencies) { - this.dependencies = dependencies; - return this; - } - - public Builder dependencies(Map dependencies) { - this.dependencies = Optional.ofNullable(dependencies); - return this; - } - - public UpdateHookResponseContent build() { - return new UpdateHookResponseContent( - triggerId, id, name, enabled, script, dependencies, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateLogStreamRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateLogStreamRequestContent.java deleted file mode 100644 index f6ea3cb1c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateLogStreamRequestContent.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateLogStreamRequestContent.Builder.class) -public final class UpdateLogStreamRequestContent { - private final Optional name; - - private final Optional status; - - private final Optional isPriority; - - private final Optional> filters; - - private final Optional piiConfig; - - private final Optional sink; - - private final Map additionalProperties; - - private UpdateLogStreamRequestContent( - Optional name, - Optional status, - Optional isPriority, - Optional> filters, - Optional piiConfig, - Optional sink, - Map additionalProperties) { - this.name = name; - this.status = status; - this.isPriority = isPriority; - this.filters = filters; - this.piiConfig = piiConfig; - this.sink = sink; - this.additionalProperties = additionalProperties; - } - - /** - * @return log stream name - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return True for priority log streams, false for non-priority - */ - @JsonProperty("isPriority") - public Optional getIsPriority() { - return isPriority; - } - - /** - * @return Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. - */ - @JsonProperty("filters") - public Optional> getFilters() { - return filters; - } - - @JsonProperty("pii_config") - public Optional getPiiConfig() { - return piiConfig; - } - - @JsonProperty("sink") - public Optional getSink() { - return sink; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateLogStreamRequestContent && equalTo((UpdateLogStreamRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateLogStreamRequestContent other) { - return name.equals(other.name) - && status.equals(other.status) - && isPriority.equals(other.isPriority) - && filters.equals(other.filters) - && piiConfig.equals(other.piiConfig) - && sink.equals(other.sink); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.status, this.isPriority, this.filters, this.piiConfig, this.sink); - } - - @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 status = Optional.empty(); - - private Optional isPriority = Optional.empty(); - - private Optional> filters = Optional.empty(); - - private Optional piiConfig = Optional.empty(); - - private Optional sink = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateLogStreamRequestContent other) { - name(other.getName()); - status(other.getStatus()); - isPriority(other.getIsPriority()); - filters(other.getFilters()); - piiConfig(other.getPiiConfig()); - sink(other.getSink()); - return this; - } - - /** - *

log stream name

- */ - @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 = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(LogStreamStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - /** - *

True for priority log streams, false for non-priority

- */ - @JsonSetter(value = "isPriority", nulls = Nulls.SKIP) - public Builder isPriority(Optional isPriority) { - this.isPriority = isPriority; - return this; - } - - public Builder isPriority(Boolean isPriority) { - this.isPriority = Optional.ofNullable(isPriority); - return this; - } - - /** - *

Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.

- */ - @JsonSetter(value = "filters", nulls = Nulls.SKIP) - public Builder filters(Optional> filters) { - this.filters = filters; - return this; - } - - public Builder filters(List filters) { - this.filters = Optional.ofNullable(filters); - return this; - } - - @JsonSetter(value = "pii_config", nulls = Nulls.SKIP) - public Builder piiConfig(Optional piiConfig) { - this.piiConfig = piiConfig; - return this; - } - - public Builder piiConfig(LogStreamPiiConfig piiConfig) { - this.piiConfig = Optional.ofNullable(piiConfig); - return this; - } - - @JsonSetter(value = "sink", nulls = Nulls.SKIP) - public Builder sink(Optional sink) { - this.sink = sink; - return this; - } - - public Builder sink(LogStreamSinkPatch sink) { - this.sink = Optional.ofNullable(sink); - return this; - } - - public UpdateLogStreamRequestContent build() { - return new UpdateLogStreamRequestContent( - name, status, isPriority, filters, piiConfig, sink, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateLogStreamResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateLogStreamResponseContent.java deleted file mode 100644 index 7f02c46ce..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateLogStreamResponseContent.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = UpdateLogStreamResponseContent.Deserializer.class) -public final class UpdateLogStreamResponseContent { - private final Object value; - - private final int type; - - private UpdateLogStreamResponseContent(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((LogStreamHttpResponseSchema) this.value); - } else if (this.type == 1) { - return visitor.visit((LogStreamEventBridgeResponseSchema) this.value); - } else if (this.type == 2) { - return visitor.visit((LogStreamEventGridResponseSchema) this.value); - } else if (this.type == 3) { - return visitor.visit((LogStreamDatadogResponseSchema) this.value); - } else if (this.type == 4) { - return visitor.visit((LogStreamSplunkResponseSchema) this.value); - } else if (this.type == 5) { - return visitor.visit((LogStreamSumoResponseSchema) this.value); - } else if (this.type == 6) { - return visitor.visit((LogStreamSegmentResponseSchema) this.value); - } else if (this.type == 7) { - return visitor.visit((LogStreamMixpanelResponseSchema) 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 UpdateLogStreamResponseContent && equalTo((UpdateLogStreamResponseContent) other); - } - - private boolean equalTo(UpdateLogStreamResponseContent 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 UpdateLogStreamResponseContent of(LogStreamHttpResponseSchema value) { - return new UpdateLogStreamResponseContent(value, 0); - } - - public static UpdateLogStreamResponseContent of(LogStreamEventBridgeResponseSchema value) { - return new UpdateLogStreamResponseContent(value, 1); - } - - public static UpdateLogStreamResponseContent of(LogStreamEventGridResponseSchema value) { - return new UpdateLogStreamResponseContent(value, 2); - } - - public static UpdateLogStreamResponseContent of(LogStreamDatadogResponseSchema value) { - return new UpdateLogStreamResponseContent(value, 3); - } - - public static UpdateLogStreamResponseContent of(LogStreamSplunkResponseSchema value) { - return new UpdateLogStreamResponseContent(value, 4); - } - - public static UpdateLogStreamResponseContent of(LogStreamSumoResponseSchema value) { - return new UpdateLogStreamResponseContent(value, 5); - } - - public static UpdateLogStreamResponseContent of(LogStreamSegmentResponseSchema value) { - return new UpdateLogStreamResponseContent(value, 6); - } - - public static UpdateLogStreamResponseContent of(LogStreamMixpanelResponseSchema value) { - return new UpdateLogStreamResponseContent(value, 7); - } - - public interface Visitor { - T visit(LogStreamHttpResponseSchema value); - - T visit(LogStreamEventBridgeResponseSchema value); - - T visit(LogStreamEventGridResponseSchema value); - - T visit(LogStreamDatadogResponseSchema value); - - T visit(LogStreamSplunkResponseSchema value); - - T visit(LogStreamSumoResponseSchema value); - - T visit(LogStreamSegmentResponseSchema value); - - T visit(LogStreamMixpanelResponseSchema value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(UpdateLogStreamResponseContent.class); - } - - @java.lang.Override - public UpdateLogStreamResponseContent deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamHttpResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamEventBridgeResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamEventGridResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamDatadogResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSplunkResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSumoResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamSegmentResponseSchema.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, LogStreamMixpanelResponseSchema.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateNetworkAclRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateNetworkAclRequestContent.java deleted file mode 100644 index bb297f74c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateNetworkAclRequestContent.java +++ /dev/null @@ -1,181 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateNetworkAclRequestContent.Builder.class) -public final class UpdateNetworkAclRequestContent { - private final Optional description; - - private final Optional active; - - private final Optional priority; - - private final Optional rule; - - private final Map additionalProperties; - - private UpdateNetworkAclRequestContent( - Optional description, - Optional active, - Optional priority, - Optional rule, - Map additionalProperties) { - this.description = description; - this.active = active; - this.priority = priority; - this.rule = rule; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - /** - * @return Indicates whether or not this access control list is actively being used - */ - @JsonProperty("active") - public Optional getActive() { - return active; - } - - /** - * @return Indicates the order in which the ACL will be evaluated relative to other ACL rules. - */ - @JsonProperty("priority") - public Optional getPriority() { - return priority; - } - - @JsonProperty("rule") - public Optional getRule() { - return rule; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateNetworkAclRequestContent && equalTo((UpdateNetworkAclRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateNetworkAclRequestContent other) { - return description.equals(other.description) - && active.equals(other.active) - && priority.equals(other.priority) - && rule.equals(other.rule); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.description, this.active, this.priority, this.rule); - } - - @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 description = Optional.empty(); - - private Optional active = Optional.empty(); - - private Optional priority = Optional.empty(); - - private Optional rule = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateNetworkAclRequestContent other) { - description(other.getDescription()); - active(other.getActive()); - priority(other.getPriority()); - rule(other.getRule()); - return this; - } - - @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; - } - - /** - *

Indicates whether or not this access control list is actively being used

- */ - @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; - } - - /** - *

Indicates the order in which the ACL will be evaluated relative to other ACL rules.

- */ - @JsonSetter(value = "priority", nulls = Nulls.SKIP) - public Builder priority(Optional priority) { - this.priority = priority; - return this; - } - - public Builder priority(Double priority) { - this.priority = Optional.ofNullable(priority); - return this; - } - - @JsonSetter(value = "rule", nulls = Nulls.SKIP) - public Builder rule(Optional rule) { - this.rule = rule; - return this; - } - - public Builder rule(NetworkAclRule rule) { - this.rule = Optional.ofNullable(rule); - return this; - } - - public UpdateNetworkAclRequestContent build() { - return new UpdateNetworkAclRequestContent(description, active, priority, rule, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateNetworkAclResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateNetworkAclResponseContent.java deleted file mode 100644 index 9b15c8f06..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateNetworkAclResponseContent.java +++ /dev/null @@ -1,255 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateNetworkAclResponseContent.Builder.class) -public final class UpdateNetworkAclResponseContent { - private final Optional id; - - private final Optional description; - - private final Optional active; - - private final Optional priority; - - private final Optional rule; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private UpdateNetworkAclResponseContent( - Optional id, - Optional description, - Optional active, - Optional priority, - Optional rule, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.description = description; - this.active = active; - this.priority = priority; - this.rule = rule; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - @JsonProperty("active") - public Optional getActive() { - return active; - } - - @JsonProperty("priority") - public Optional getPriority() { - return priority; - } - - @JsonProperty("rule") - public Optional getRule() { - return rule; - } - - /** - * @return The timestamp when the Network ACL Configuration was created - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The timestamp when the Network ACL Configuration was last updated - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateNetworkAclResponseContent && equalTo((UpdateNetworkAclResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateNetworkAclResponseContent other) { - return id.equals(other.id) - && description.equals(other.description) - && active.equals(other.active) - && priority.equals(other.priority) - && rule.equals(other.rule) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.description, this.active, this.priority, this.rule, this.createdAt, this.updatedAt); - } - - @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 description = Optional.empty(); - - private Optional active = Optional.empty(); - - private Optional priority = Optional.empty(); - - private Optional rule = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateNetworkAclResponseContent other) { - id(other.getId()); - description(other.getDescription()); - active(other.getActive()); - priority(other.getPriority()); - rule(other.getRule()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - 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 = "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; - } - - @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 = "priority", nulls = Nulls.SKIP) - public Builder priority(Optional priority) { - this.priority = priority; - return this; - } - - public Builder priority(Double priority) { - this.priority = Optional.ofNullable(priority); - return this; - } - - @JsonSetter(value = "rule", nulls = Nulls.SKIP) - public Builder rule(Optional rule) { - this.rule = rule; - return this; - } - - public Builder rule(NetworkAclRule rule) { - this.rule = Optional.ofNullable(rule); - return this; - } - - /** - *

The timestamp when the Network ACL Configuration was created

- */ - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(String createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - /** - *

The timestamp when the Network ACL Configuration was last updated

- */ - @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - public Builder updatedAt(String updatedAt) { - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - public UpdateNetworkAclResponseContent build() { - return new UpdateNetworkAclResponseContent( - id, description, active, priority, rule, createdAt, updatedAt, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationConnectionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationConnectionResponseContent.java deleted file mode 100644 index e4707f1de..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationConnectionResponseContent.java +++ /dev/null @@ -1,229 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateOrganizationConnectionResponseContent.Builder.class) -public final class UpdateOrganizationConnectionResponseContent { - private final Optional connectionId; - - private final Optional assignMembershipOnLogin; - - private final Optional showAsButton; - - private final Optional isSignupEnabled; - - private final Optional connection; - - private final Map additionalProperties; - - private UpdateOrganizationConnectionResponseContent( - Optional connectionId, - Optional assignMembershipOnLogin, - Optional showAsButton, - Optional isSignupEnabled, - Optional connection, - Map additionalProperties) { - this.connectionId = connectionId; - this.assignMembershipOnLogin = assignMembershipOnLogin; - this.showAsButton = showAsButton; - this.isSignupEnabled = isSignupEnabled; - this.connection = connection; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the connection. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - /** - * @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. Default: true. - */ - @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. Default: false. - */ - @JsonProperty("is_signup_enabled") - public Optional getIsSignupEnabled() { - return isSignupEnabled; - } - - @JsonProperty("connection") - public Optional getConnection() { - return connection; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateOrganizationConnectionResponseContent - && equalTo((UpdateOrganizationConnectionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateOrganizationConnectionResponseContent other) { - return connectionId.equals(other.connectionId) - && assignMembershipOnLogin.equals(other.assignMembershipOnLogin) - && showAsButton.equals(other.showAsButton) - && isSignupEnabled.equals(other.isSignupEnabled) - && connection.equals(other.connection); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.assignMembershipOnLogin, - this.showAsButton, - this.isSignupEnabled, - this.connection); - } - - @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 connectionId = Optional.empty(); - - private Optional assignMembershipOnLogin = Optional.empty(); - - private Optional showAsButton = Optional.empty(); - - private Optional isSignupEnabled = Optional.empty(); - - private Optional connection = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateOrganizationConnectionResponseContent other) { - connectionId(other.getConnectionId()); - assignMembershipOnLogin(other.getAssignMembershipOnLogin()); - showAsButton(other.getShowAsButton()); - isSignupEnabled(other.getIsSignupEnabled()); - connection(other.getConnection()); - return this; - } - - /** - *

ID of the connection.

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - 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.

- */ - @JsonSetter(value = "assign_membership_on_login", nulls = Nulls.SKIP) - public Builder assignMembershipOnLogin(Optional assignMembershipOnLogin) { - this.assignMembershipOnLogin = assignMembershipOnLogin; - return this; - } - - public Builder assignMembershipOnLogin(Boolean assignMembershipOnLogin) { - this.assignMembershipOnLogin = Optional.ofNullable(assignMembershipOnLogin); - return this; - } - - /** - *

Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true.

- */ - @JsonSetter(value = "show_as_button", nulls = Nulls.SKIP) - public Builder showAsButton(Optional showAsButton) { - this.showAsButton = showAsButton; - return this; - } - - public Builder showAsButton(Boolean showAsButton) { - this.showAsButton = Optional.ofNullable(showAsButton); - return this; - } - - /** - *

Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false.

- */ - @JsonSetter(value = "is_signup_enabled", nulls = Nulls.SKIP) - public Builder isSignupEnabled(Optional isSignupEnabled) { - this.isSignupEnabled = isSignupEnabled; - return this; - } - - public Builder isSignupEnabled(Boolean isSignupEnabled) { - this.isSignupEnabled = Optional.ofNullable(isSignupEnabled); - return this; - } - - @JsonSetter(value = "connection", nulls = Nulls.SKIP) - public Builder connection(Optional connection) { - this.connection = connection; - return this; - } - - public Builder connection(OrganizationConnectionInformation connection) { - this.connection = Optional.ofNullable(connection); - return this; - } - - public UpdateOrganizationConnectionResponseContent build() { - return new UpdateOrganizationConnectionResponseContent( - connectionId, - assignMembershipOnLogin, - showAsButton, - isSignupEnabled, - connection, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationDiscoveryDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationDiscoveryDomainResponseContent.java deleted file mode 100644 index b1d5c7289..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationDiscoveryDomainResponseContent.java +++ /dev/null @@ -1,304 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateOrganizationDiscoveryDomainResponseContent.Builder.class) -public final class UpdateOrganizationDiscoveryDomainResponseContent { - private final String id; - - private final String domain; - - private final OrganizationDiscoveryDomainStatus status; - - private final Optional useForOrganizationDiscovery; - - private final String verificationTxt; - - private final String verificationHost; - - private final Map additionalProperties; - - private UpdateOrganizationDiscoveryDomainResponseContent( - String id, - String domain, - OrganizationDiscoveryDomainStatus status, - Optional useForOrganizationDiscovery, - String verificationTxt, - String verificationHost, - Map additionalProperties) { - this.id = id; - this.domain = domain; - this.status = status; - this.useForOrganizationDiscovery = useForOrganizationDiscovery; - this.verificationTxt = verificationTxt; - this.verificationHost = verificationHost; - this.additionalProperties = additionalProperties; - } - - /** - * @return Organization discovery domain identifier. - */ - @JsonProperty("id") - public String getId() { - return id; - } - - /** - * @return The domain name to associate with the organization e.g. acme.com. - */ - @JsonProperty("domain") - public String getDomain() { - return domain; - } - - @JsonProperty("status") - public OrganizationDiscoveryDomainStatus getStatus() { - return status; - } - - /** - * @return Indicates whether this domain should be used for organization discovery. - */ - @JsonProperty("use_for_organization_discovery") - public Optional getUseForOrganizationDiscovery() { - return useForOrganizationDiscovery; - } - - /** - * @return 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. - */ - @JsonProperty("verification_txt") - public String getVerificationTxt() { - return verificationTxt; - } - - /** - * @return The full domain where the TXT record should be added. - */ - @JsonProperty("verification_host") - public String getVerificationHost() { - return verificationHost; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateOrganizationDiscoveryDomainResponseContent - && equalTo((UpdateOrganizationDiscoveryDomainResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateOrganizationDiscoveryDomainResponseContent other) { - return id.equals(other.id) - && domain.equals(other.domain) - && status.equals(other.status) - && useForOrganizationDiscovery.equals(other.useForOrganizationDiscovery) - && verificationTxt.equals(other.verificationTxt) - && verificationHost.equals(other.verificationHost); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.domain, - this.status, - this.useForOrganizationDiscovery, - this.verificationTxt, - this.verificationHost); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

Organization discovery domain identifier.

- */ - DomainStage id(@NotNull String id); - - Builder from(UpdateOrganizationDiscoveryDomainResponseContent other); - } - - public interface DomainStage { - /** - *

The domain name to associate with the organization e.g. acme.com.

- */ - StatusStage domain(@NotNull String domain); - } - - public interface StatusStage { - VerificationTxtStage status(@NotNull OrganizationDiscoveryDomainStatus status); - } - - public interface VerificationTxtStage { - /** - *

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.

- */ - VerificationHostStage verificationTxt(@NotNull String verificationTxt); - } - - public interface VerificationHostStage { - /** - *

The full domain where the TXT record should be added.

- */ - _FinalStage verificationHost(@NotNull String verificationHost); - } - - public interface _FinalStage { - UpdateOrganizationDiscoveryDomainResponseContent build(); - - /** - *

Indicates whether this domain should be used for organization discovery.

- */ - _FinalStage useForOrganizationDiscovery(Optional useForOrganizationDiscovery); - - _FinalStage useForOrganizationDiscovery(Boolean useForOrganizationDiscovery); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements IdStage, DomainStage, StatusStage, VerificationTxtStage, VerificationHostStage, _FinalStage { - private String id; - - private String domain; - - private OrganizationDiscoveryDomainStatus status; - - private String verificationTxt; - - private String verificationHost; - - private Optional useForOrganizationDiscovery = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateOrganizationDiscoveryDomainResponseContent other) { - id(other.getId()); - domain(other.getDomain()); - status(other.getStatus()); - useForOrganizationDiscovery(other.getUseForOrganizationDiscovery()); - verificationTxt(other.getVerificationTxt()); - verificationHost(other.getVerificationHost()); - return this; - } - - /** - *

Organization discovery domain identifier.

- *

Organization discovery domain identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("id") - public DomainStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("domain") - public StatusStage domain(@NotNull String domain) { - this.domain = Objects.requireNonNull(domain, "domain must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("status") - public VerificationTxtStage status(@NotNull OrganizationDiscoveryDomainStatus status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("verification_txt") - public VerificationHostStage verificationTxt(@NotNull String verificationTxt) { - this.verificationTxt = Objects.requireNonNull(verificationTxt, "verificationTxt must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("verification_host") - public _FinalStage verificationHost(@NotNull String verificationHost) { - this.verificationHost = Objects.requireNonNull(verificationHost, "verificationHost must not be null"); - return this; - } - - /** - *

Indicates whether this domain should be used for organization discovery.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage useForOrganizationDiscovery(Boolean useForOrganizationDiscovery) { - this.useForOrganizationDiscovery = Optional.ofNullable(useForOrganizationDiscovery); - return this; - } - - /** - *

Indicates whether this domain should be used for organization discovery.

- */ - @java.lang.Override - @JsonSetter(value = "use_for_organization_discovery", nulls = Nulls.SKIP) - public _FinalStage useForOrganizationDiscovery(Optional useForOrganizationDiscovery) { - this.useForOrganizationDiscovery = useForOrganizationDiscovery; - return this; - } - - @java.lang.Override - public UpdateOrganizationDiscoveryDomainResponseContent build() { - return new UpdateOrganizationDiscoveryDomainResponseContent( - id, - domain, - status, - useForOrganizationDiscovery, - verificationTxt, - verificationHost, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationRequestContent.java deleted file mode 100644 index fa3df9eab..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationRequestContent.java +++ /dev/null @@ -1,239 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateOrganizationRequestContent.Builder.class) -public final class UpdateOrganizationRequestContent { - private final Optional displayName; - - private final Optional name; - - private final Optional branding; - - private final Optional>> metadata; - - private final OptionalNullable tokenQuota; - - private final Map additionalProperties; - - private UpdateOrganizationRequestContent( - Optional displayName, - Optional name, - Optional branding, - Optional>> metadata, - OptionalNullable tokenQuota, - Map additionalProperties) { - this.displayName = displayName; - this.name = name; - this.branding = branding; - this.metadata = metadata; - this.tokenQuota = tokenQuota; - this.additionalProperties = additionalProperties; - } - - /** - * @return Friendly name of this organization. - */ - @JsonProperty("display_name") - public Optional getDisplayName() { - return displayName; - } - - /** - * @return The name of this organization. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("branding") - public Optional getBranding() { - return branding; - } - - @JsonProperty("metadata") - public Optional>> getMetadata() { - return metadata; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("token_quota") - public OptionalNullable getTokenQuota() { - if (tokenQuota == null) { - return OptionalNullable.absent(); - } - return tokenQuota; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("token_quota") - private OptionalNullable _getTokenQuota() { - return tokenQuota; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateOrganizationRequestContent && equalTo((UpdateOrganizationRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateOrganizationRequestContent other) { - return displayName.equals(other.displayName) - && name.equals(other.name) - && branding.equals(other.branding) - && metadata.equals(other.metadata) - && tokenQuota.equals(other.tokenQuota); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.displayName, this.name, this.branding, this.metadata, this.tokenQuota); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional displayName = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional branding = Optional.empty(); - - private Optional>> metadata = Optional.empty(); - - private OptionalNullable tokenQuota = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateOrganizationRequestContent other) { - displayName(other.getDisplayName()); - name(other.getName()); - branding(other.getBranding()); - metadata(other.getMetadata()); - tokenQuota(other.getTokenQuota()); - 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; - } - - /** - *

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; - } - - @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 = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "token_quota", nulls = Nulls.SKIP) - public Builder tokenQuota(@Nullable OptionalNullable tokenQuota) { - this.tokenQuota = tokenQuota; - return this; - } - - public Builder tokenQuota(UpdateTokenQuota tokenQuota) { - this.tokenQuota = OptionalNullable.of(tokenQuota); - return this; - } - - public Builder tokenQuota(Optional tokenQuota) { - if (tokenQuota.isPresent()) { - this.tokenQuota = OptionalNullable.of(tokenQuota.get()); - } else { - this.tokenQuota = OptionalNullable.absent(); - } - return this; - } - - public Builder tokenQuota(com.auth0.client.mgmt.core.Nullable tokenQuota) { - if (tokenQuota.isNull()) { - this.tokenQuota = OptionalNullable.ofNull(); - } else if (tokenQuota.isEmpty()) { - this.tokenQuota = OptionalNullable.absent(); - } else { - this.tokenQuota = OptionalNullable.of(tokenQuota.get()); - } - return this; - } - - public UpdateOrganizationRequestContent build() { - return new UpdateOrganizationRequestContent( - displayName, name, branding, metadata, tokenQuota, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationResponseContent.java deleted file mode 100644 index 5603c8958..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateOrganizationResponseContent.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateOrganizationResponseContent.Builder.class) -public final class UpdateOrganizationResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional displayName; - - private final Optional branding; - - private final Optional>> metadata; - - private final Optional tokenQuota; - - private final Map additionalProperties; - - private UpdateOrganizationResponseContent( - Optional id, - Optional name, - Optional displayName, - Optional branding, - Optional>> metadata, - Optional tokenQuota, - Map additionalProperties) { - this.id = id; - this.name = name; - this.displayName = displayName; - this.branding = branding; - this.metadata = metadata; - this.tokenQuota = tokenQuota; - 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("metadata") - public Optional>> getMetadata() { - return metadata; - } - - @JsonProperty("token_quota") - public Optional getTokenQuota() { - return tokenQuota; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateOrganizationResponseContent && equalTo((UpdateOrganizationResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateOrganizationResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && displayName.equals(other.displayName) - && branding.equals(other.branding) - && metadata.equals(other.metadata) - && tokenQuota.equals(other.tokenQuota); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.displayName, this.branding, this.metadata, this.tokenQuota); - } - - @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>> metadata = Optional.empty(); - - private Optional tokenQuota = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateOrganizationResponseContent other) { - id(other.getId()); - name(other.getName()); - displayName(other.getDisplayName()); - branding(other.getBranding()); - metadata(other.getMetadata()); - tokenQuota(other.getTokenQuota()); - 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 = "metadata", nulls = Nulls.SKIP) - public Builder metadata(Optional>> metadata) { - this.metadata = metadata; - return this; - } - - public Builder metadata(Map> metadata) { - this.metadata = Optional.ofNullable(metadata); - return this; - } - - @JsonSetter(value = "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; - } - - public UpdateOrganizationResponseContent build() { - return new UpdateOrganizationResponseContent( - id, name, displayName, branding, metadata, tokenQuota, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdatePhoneTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdatePhoneTemplateResponseContent.java deleted file mode 100644 index 9ed20af9c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdatePhoneTemplateResponseContent.java +++ /dev/null @@ -1,282 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdatePhoneTemplateResponseContent.Builder.class) -public final class UpdatePhoneTemplateResponseContent { - private final String id; - - private final Optional channel; - - private final Optional customizable; - - private final Optional tenant; - - private final PhoneTemplateContent content; - - private final PhoneTemplateNotificationTypeEnum type; - - private final boolean disabled; - - private final Map additionalProperties; - - private UpdatePhoneTemplateResponseContent( - String id, - Optional channel, - Optional customizable, - Optional tenant, - PhoneTemplateContent content, - PhoneTemplateNotificationTypeEnum type, - boolean disabled, - Map additionalProperties) { - this.id = id; - this.channel = channel; - this.customizable = customizable; - this.tenant = tenant; - this.content = content; - this.type = type; - this.disabled = disabled; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("channel") - public Optional getChannel() { - return channel; - } - - @JsonProperty("customizable") - public Optional getCustomizable() { - return customizable; - } - - @JsonProperty("tenant") - public Optional getTenant() { - return tenant; - } - - @JsonProperty("content") - public PhoneTemplateContent getContent() { - return content; - } - - @JsonProperty("type") - public PhoneTemplateNotificationTypeEnum getType() { - return type; - } - - /** - * @return Whether the template is enabled (false) or disabled (true). - */ - @JsonProperty("disabled") - public boolean getDisabled() { - return disabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdatePhoneTemplateResponseContent - && equalTo((UpdatePhoneTemplateResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdatePhoneTemplateResponseContent other) { - return id.equals(other.id) - && channel.equals(other.channel) - && customizable.equals(other.customizable) - && tenant.equals(other.tenant) - && content.equals(other.content) - && type.equals(other.type) - && disabled == other.disabled; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, this.channel, this.customizable, this.tenant, this.content, this.type, this.disabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - ContentStage id(@NotNull String id); - - Builder from(UpdatePhoneTemplateResponseContent other); - } - - public interface ContentStage { - TypeStage content(@NotNull PhoneTemplateContent content); - } - - public interface TypeStage { - DisabledStage type(@NotNull PhoneTemplateNotificationTypeEnum type); - } - - public interface DisabledStage { - /** - *

Whether the template is enabled (false) or disabled (true).

- */ - _FinalStage disabled(boolean disabled); - } - - public interface _FinalStage { - UpdatePhoneTemplateResponseContent build(); - - _FinalStage channel(Optional channel); - - _FinalStage channel(String channel); - - _FinalStage customizable(Optional customizable); - - _FinalStage customizable(Boolean customizable); - - _FinalStage tenant(Optional tenant); - - _FinalStage tenant(String tenant); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, ContentStage, TypeStage, DisabledStage, _FinalStage { - private String id; - - private PhoneTemplateContent content; - - private PhoneTemplateNotificationTypeEnum type; - - private boolean disabled; - - private Optional tenant = Optional.empty(); - - private Optional customizable = Optional.empty(); - - private Optional channel = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdatePhoneTemplateResponseContent other) { - id(other.getId()); - channel(other.getChannel()); - customizable(other.getCustomizable()); - tenant(other.getTenant()); - content(other.getContent()); - type(other.getType()); - disabled(other.getDisabled()); - return this; - } - - @java.lang.Override - @JsonSetter("id") - public ContentStage id(@NotNull String id) { - this.id = Objects.requireNonNull(id, "id must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("content") - public TypeStage content(@NotNull PhoneTemplateContent content) { - this.content = Objects.requireNonNull(content, "content must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public DisabledStage type(@NotNull PhoneTemplateNotificationTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("disabled") - public _FinalStage disabled(boolean disabled) { - this.disabled = disabled; - return this; - } - - @java.lang.Override - public _FinalStage tenant(String tenant) { - this.tenant = Optional.ofNullable(tenant); - return this; - } - - @java.lang.Override - @JsonSetter(value = "tenant", nulls = Nulls.SKIP) - public _FinalStage tenant(Optional tenant) { - this.tenant = tenant; - return this; - } - - @java.lang.Override - public _FinalStage customizable(Boolean customizable) { - this.customizable = Optional.ofNullable(customizable); - return this; - } - - @java.lang.Override - @JsonSetter(value = "customizable", nulls = Nulls.SKIP) - public _FinalStage customizable(Optional customizable) { - this.customizable = customizable; - return this; - } - - @java.lang.Override - public _FinalStage channel(String channel) { - this.channel = Optional.ofNullable(channel); - return this; - } - - @java.lang.Override - @JsonSetter(value = "channel", nulls = Nulls.SKIP) - public _FinalStage channel(Optional channel) { - this.channel = channel; - return this; - } - - @java.lang.Override - public UpdatePhoneTemplateResponseContent build() { - return new UpdatePhoneTemplateResponseContent( - id, channel, customizable, tenant, content, type, disabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateRefreshTokenRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateRefreshTokenRequestContent.java deleted file mode 100644 index 040321c49..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateRefreshTokenRequestContent.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateRefreshTokenRequestContent.Builder.class) -public final class UpdateRefreshTokenRequestContent { - private final OptionalNullable> refreshTokenMetadata; - - private final Map additionalProperties; - - private UpdateRefreshTokenRequestContent( - OptionalNullable> refreshTokenMetadata, Map additionalProperties) { - this.refreshTokenMetadata = refreshTokenMetadata; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("refresh_token_metadata") - public OptionalNullable> getRefreshTokenMetadata() { - if (refreshTokenMetadata == null) { - return OptionalNullable.absent(); - } - return refreshTokenMetadata; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("refresh_token_metadata") - private OptionalNullable> _getRefreshTokenMetadata() { - return refreshTokenMetadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateRefreshTokenRequestContent && equalTo((UpdateRefreshTokenRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateRefreshTokenRequestContent other) { - return refreshTokenMetadata.equals(other.refreshTokenMetadata); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.refreshTokenMetadata); - } - - @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> refreshTokenMetadata = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateRefreshTokenRequestContent other) { - refreshTokenMetadata(other.getRefreshTokenMetadata()); - return this; - } - - @JsonSetter(value = "refresh_token_metadata", nulls = Nulls.SKIP) - public Builder refreshTokenMetadata(@Nullable OptionalNullable> refreshTokenMetadata) { - this.refreshTokenMetadata = refreshTokenMetadata; - return this; - } - - public Builder refreshTokenMetadata(Map refreshTokenMetadata) { - this.refreshTokenMetadata = OptionalNullable.of(refreshTokenMetadata); - return this; - } - - public Builder refreshTokenMetadata(Optional> refreshTokenMetadata) { - if (refreshTokenMetadata.isPresent()) { - this.refreshTokenMetadata = OptionalNullable.of(refreshTokenMetadata.get()); - } else { - this.refreshTokenMetadata = OptionalNullable.absent(); - } - return this; - } - - public Builder refreshTokenMetadata( - com.auth0.client.mgmt.core.Nullable> refreshTokenMetadata) { - if (refreshTokenMetadata.isNull()) { - this.refreshTokenMetadata = OptionalNullable.ofNull(); - } else if (refreshTokenMetadata.isEmpty()) { - this.refreshTokenMetadata = OptionalNullable.absent(); - } else { - this.refreshTokenMetadata = OptionalNullable.of(refreshTokenMetadata.get()); - } - return this; - } - - public UpdateRefreshTokenRequestContent build() { - return new UpdateRefreshTokenRequestContent(refreshTokenMetadata, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateRefreshTokenResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateRefreshTokenResponseContent.java deleted file mode 100644 index b89eba526..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateRefreshTokenResponseContent.java +++ /dev/null @@ -1,481 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateRefreshTokenResponseContent.Builder.class) -public final class UpdateRefreshTokenResponseContent { - private final Optional id; - - private final Optional userId; - - private final Optional createdAt; - - private final Optional idleExpiresAt; - - private final Optional expiresAt; - - private final Optional device; - - private final Optional clientId; - - private final OptionalNullable sessionId; - - private final Optional rotating; - - private final Optional> resourceServers; - - private final OptionalNullable> refreshTokenMetadata; - - private final Optional lastExchangedAt; - - private final Map additionalProperties; - - private UpdateRefreshTokenResponseContent( - Optional id, - Optional userId, - Optional createdAt, - Optional idleExpiresAt, - Optional expiresAt, - Optional device, - Optional clientId, - OptionalNullable sessionId, - Optional rotating, - Optional> resourceServers, - OptionalNullable> refreshTokenMetadata, - Optional lastExchangedAt, - Map additionalProperties) { - this.id = id; - this.userId = userId; - this.createdAt = createdAt; - this.idleExpiresAt = idleExpiresAt; - this.expiresAt = expiresAt; - this.device = device; - this.clientId = clientId; - this.sessionId = sessionId; - this.rotating = rotating; - this.resourceServers = resourceServers; - this.refreshTokenMetadata = refreshTokenMetadata; - this.lastExchangedAt = lastExchangedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The ID of the refresh token - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return ID of the user which can be used when interacting with other APIs. - */ - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @JsonProperty("idle_expires_at") - public Optional getIdleExpiresAt() { - return idleExpiresAt; - } - - @JsonProperty("expires_at") - public Optional getExpiresAt() { - return expiresAt; - } - - @JsonProperty("device") - public Optional getDevice() { - return device; - } - - /** - * @return ID of the client application granted with this refresh token - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_id") - public OptionalNullable getSessionId() { - if (sessionId == null) { - return OptionalNullable.absent(); - } - return sessionId; - } - - /** - * @return True if the token is a rotating refresh token - */ - @JsonProperty("rotating") - public Optional getRotating() { - return rotating; - } - - /** - * @return A list of the resource server IDs associated to this refresh-token and their granted scopes - */ - @JsonProperty("resource_servers") - public Optional> getResourceServers() { - return resourceServers; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("refresh_token_metadata") - public OptionalNullable> getRefreshTokenMetadata() { - if (refreshTokenMetadata == null) { - return OptionalNullable.absent(); - } - return refreshTokenMetadata; - } - - @JsonProperty("last_exchanged_at") - public Optional getLastExchangedAt() { - return lastExchangedAt; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_id") - private OptionalNullable _getSessionId() { - return sessionId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("refresh_token_metadata") - private OptionalNullable> _getRefreshTokenMetadata() { - return refreshTokenMetadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateRefreshTokenResponseContent && equalTo((UpdateRefreshTokenResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateRefreshTokenResponseContent other) { - return id.equals(other.id) - && userId.equals(other.userId) - && createdAt.equals(other.createdAt) - && idleExpiresAt.equals(other.idleExpiresAt) - && expiresAt.equals(other.expiresAt) - && device.equals(other.device) - && clientId.equals(other.clientId) - && sessionId.equals(other.sessionId) - && rotating.equals(other.rotating) - && resourceServers.equals(other.resourceServers) - && refreshTokenMetadata.equals(other.refreshTokenMetadata) - && lastExchangedAt.equals(other.lastExchangedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.userId, - this.createdAt, - this.idleExpiresAt, - this.expiresAt, - this.device, - this.clientId, - this.sessionId, - this.rotating, - this.resourceServers, - this.refreshTokenMetadata, - this.lastExchangedAt); - } - - @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 userId = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional idleExpiresAt = Optional.empty(); - - private Optional expiresAt = Optional.empty(); - - private Optional device = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private OptionalNullable sessionId = OptionalNullable.absent(); - - private Optional rotating = Optional.empty(); - - private Optional> resourceServers = Optional.empty(); - - private OptionalNullable> refreshTokenMetadata = OptionalNullable.absent(); - - private Optional lastExchangedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateRefreshTokenResponseContent other) { - id(other.getId()); - userId(other.getUserId()); - createdAt(other.getCreatedAt()); - idleExpiresAt(other.getIdleExpiresAt()); - expiresAt(other.getExpiresAt()); - device(other.getDevice()); - clientId(other.getClientId()); - sessionId(other.getSessionId()); - rotating(other.getRotating()); - resourceServers(other.getResourceServers()); - refreshTokenMetadata(other.getRefreshTokenMetadata()); - lastExchangedAt(other.getLastExchangedAt()); - return this; - } - - /** - *

The ID of the refresh token

- */ - @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; - } - - /** - *

ID of the user which can be used when interacting with other APIs.

- */ - @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; - } - - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(RefreshTokenDate createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - @JsonSetter(value = "idle_expires_at", nulls = Nulls.SKIP) - public Builder idleExpiresAt(Optional idleExpiresAt) { - this.idleExpiresAt = idleExpiresAt; - return this; - } - - public Builder idleExpiresAt(RefreshTokenDate idleExpiresAt) { - this.idleExpiresAt = Optional.ofNullable(idleExpiresAt); - return this; - } - - @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - public Builder expiresAt(RefreshTokenDate expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); - return this; - } - - @JsonSetter(value = "device", nulls = Nulls.SKIP) - public Builder device(Optional device) { - this.device = device; - return this; - } - - public Builder device(RefreshTokenDevice device) { - this.device = Optional.ofNullable(device); - return this; - } - - /** - *

ID of the client application granted with this refresh token

- */ - @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 = "session_id", nulls = Nulls.SKIP) - public Builder sessionId(@Nullable OptionalNullable sessionId) { - this.sessionId = sessionId; - return this; - } - - public Builder sessionId(String sessionId) { - this.sessionId = OptionalNullable.of(sessionId); - return this; - } - - public Builder sessionId(Optional sessionId) { - if (sessionId.isPresent()) { - this.sessionId = OptionalNullable.of(sessionId.get()); - } else { - this.sessionId = OptionalNullable.absent(); - } - return this; - } - - public Builder sessionId(com.auth0.client.mgmt.core.Nullable sessionId) { - if (sessionId.isNull()) { - this.sessionId = OptionalNullable.ofNull(); - } else if (sessionId.isEmpty()) { - this.sessionId = OptionalNullable.absent(); - } else { - this.sessionId = OptionalNullable.of(sessionId.get()); - } - return this; - } - - /** - *

True if the token is a rotating refresh token

- */ - @JsonSetter(value = "rotating", nulls = Nulls.SKIP) - public Builder rotating(Optional rotating) { - this.rotating = rotating; - return this; - } - - public Builder rotating(Boolean rotating) { - this.rotating = Optional.ofNullable(rotating); - return this; - } - - /** - *

A list of the resource server IDs associated to this refresh-token and their granted scopes

- */ - @JsonSetter(value = "resource_servers", nulls = Nulls.SKIP) - public Builder resourceServers(Optional> resourceServers) { - this.resourceServers = resourceServers; - return this; - } - - public Builder resourceServers(List resourceServers) { - this.resourceServers = Optional.ofNullable(resourceServers); - return this; - } - - @JsonSetter(value = "refresh_token_metadata", nulls = Nulls.SKIP) - public Builder refreshTokenMetadata(@Nullable OptionalNullable> refreshTokenMetadata) { - this.refreshTokenMetadata = refreshTokenMetadata; - return this; - } - - public Builder refreshTokenMetadata(Map refreshTokenMetadata) { - this.refreshTokenMetadata = OptionalNullable.of(refreshTokenMetadata); - return this; - } - - public Builder refreshTokenMetadata(Optional> refreshTokenMetadata) { - if (refreshTokenMetadata.isPresent()) { - this.refreshTokenMetadata = OptionalNullable.of(refreshTokenMetadata.get()); - } else { - this.refreshTokenMetadata = OptionalNullable.absent(); - } - return this; - } - - public Builder refreshTokenMetadata( - com.auth0.client.mgmt.core.Nullable> refreshTokenMetadata) { - if (refreshTokenMetadata.isNull()) { - this.refreshTokenMetadata = OptionalNullable.ofNull(); - } else if (refreshTokenMetadata.isEmpty()) { - this.refreshTokenMetadata = OptionalNullable.absent(); - } else { - this.refreshTokenMetadata = OptionalNullable.of(refreshTokenMetadata.get()); - } - return this; - } - - @JsonSetter(value = "last_exchanged_at", nulls = Nulls.SKIP) - public Builder lastExchangedAt(Optional lastExchangedAt) { - this.lastExchangedAt = lastExchangedAt; - return this; - } - - public Builder lastExchangedAt(RefreshTokenDate lastExchangedAt) { - this.lastExchangedAt = Optional.ofNullable(lastExchangedAt); - return this; - } - - public UpdateRefreshTokenResponseContent build() { - return new UpdateRefreshTokenResponseContent( - id, - userId, - createdAt, - idleExpiresAt, - expiresAt, - device, - clientId, - sessionId, - rotating, - resourceServers, - refreshTokenMetadata, - lastExchangedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerRequestContent.java deleted file mode 100644 index 894f391b1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerRequestContent.java +++ /dev/null @@ -1,582 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateResourceServerRequestContent.Builder.class) -public final class UpdateResourceServerRequestContent { - private final Optional name; - - private final Optional> scopes; - - private final Optional signingAlg; - - private final Optional signingSecret; - - private final Optional skipConsentForVerifiableFirstPartyClients; - - private final Optional allowOfflineAccess; - - private final Optional tokenLifetime; - - private final Optional tokenDialect; - - private final Optional enforcePolicies; - - private final OptionalNullable tokenEncryption; - - private final OptionalNullable consentPolicy; - - private final Optional> authorizationDetails; - - private final OptionalNullable proofOfPossession; - - private final Optional subjectTypeAuthorization; - - private final Map additionalProperties; - - private UpdateResourceServerRequestContent( - Optional name, - Optional> scopes, - Optional signingAlg, - Optional signingSecret, - Optional skipConsentForVerifiableFirstPartyClients, - Optional allowOfflineAccess, - Optional tokenLifetime, - Optional tokenDialect, - Optional enforcePolicies, - OptionalNullable tokenEncryption, - OptionalNullable consentPolicy, - Optional> authorizationDetails, - OptionalNullable proofOfPossession, - Optional subjectTypeAuthorization, - Map additionalProperties) { - this.name = name; - this.scopes = scopes; - this.signingAlg = signingAlg; - this.signingSecret = signingSecret; - this.skipConsentForVerifiableFirstPartyClients = skipConsentForVerifiableFirstPartyClients; - this.allowOfflineAccess = allowOfflineAccess; - this.tokenLifetime = tokenLifetime; - this.tokenDialect = tokenDialect; - this.enforcePolicies = enforcePolicies; - this.tokenEncryption = tokenEncryption; - this.consentPolicy = consentPolicy; - this.authorizationDetails = authorizationDetails; - this.proofOfPossession = proofOfPossession; - this.subjectTypeAuthorization = subjectTypeAuthorization; - this.additionalProperties = additionalProperties; - } - - /** - * @return Friendly name for this resource server. Can not contain < or > characters. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @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 Secret used to sign tokens when using symmetric algorithms (HS256). - */ - @JsonProperty("signing_secret") - public Optional getSigningSecret() { - return signingSecret; - } - - /** - * @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 Whether refresh tokens can be issued for this API (true) or not (false). - */ - @JsonProperty("allow_offline_access") - public Optional getAllowOfflineAccess() { - return allowOfflineAccess; - } - - /** - * @return Expiration value (in seconds) for access tokens issued for this API from the token endpoint. - */ - @JsonProperty("token_lifetime") - public Optional getTokenLifetime() { - return tokenLifetime; - } - - @JsonProperty("token_dialect") - public Optional getTokenDialect() { - return tokenDialect; - } - - /** - * @return Whether authorization policies are enforced (true) or not enforced (false). - */ - @JsonProperty("enforce_policies") - public Optional getEnforcePolicies() { - return enforcePolicies; - } - - @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; - } - - @JsonProperty("authorization_details") - public Optional> getAuthorizationDetails() { - 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("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("proof_of_possession") - private OptionalNullable _getProofOfPossession() { - return proofOfPossession; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateResourceServerRequestContent - && equalTo((UpdateResourceServerRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateResourceServerRequestContent other) { - return name.equals(other.name) - && scopes.equals(other.scopes) - && signingAlg.equals(other.signingAlg) - && signingSecret.equals(other.signingSecret) - && skipConsentForVerifiableFirstPartyClients.equals(other.skipConsentForVerifiableFirstPartyClients) - && allowOfflineAccess.equals(other.allowOfflineAccess) - && tokenLifetime.equals(other.tokenLifetime) - && tokenDialect.equals(other.tokenDialect) - && enforcePolicies.equals(other.enforcePolicies) - && tokenEncryption.equals(other.tokenEncryption) - && consentPolicy.equals(other.consentPolicy) - && authorizationDetails.equals(other.authorizationDetails) - && proofOfPossession.equals(other.proofOfPossession) - && subjectTypeAuthorization.equals(other.subjectTypeAuthorization); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.scopes, - this.signingAlg, - this.signingSecret, - this.skipConsentForVerifiableFirstPartyClients, - this.allowOfflineAccess, - this.tokenLifetime, - this.tokenDialect, - this.enforcePolicies, - this.tokenEncryption, - this.consentPolicy, - this.authorizationDetails, - this.proofOfPossession, - this.subjectTypeAuthorization); - } - - @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> scopes = Optional.empty(); - - private Optional signingAlg = Optional.empty(); - - private Optional signingSecret = Optional.empty(); - - private Optional skipConsentForVerifiableFirstPartyClients = Optional.empty(); - - private Optional allowOfflineAccess = Optional.empty(); - - private Optional tokenLifetime = Optional.empty(); - - private Optional tokenDialect = Optional.empty(); - - private Optional enforcePolicies = Optional.empty(); - - private OptionalNullable tokenEncryption = OptionalNullable.absent(); - - private OptionalNullable consentPolicy = OptionalNullable.absent(); - - private Optional> authorizationDetails = Optional.empty(); - - private OptionalNullable proofOfPossession = OptionalNullable.absent(); - - private Optional subjectTypeAuthorization = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateResourceServerRequestContent other) { - name(other.getName()); - scopes(other.getScopes()); - signingAlg(other.getSigningAlg()); - signingSecret(other.getSigningSecret()); - skipConsentForVerifiableFirstPartyClients(other.getSkipConsentForVerifiableFirstPartyClients()); - allowOfflineAccess(other.getAllowOfflineAccess()); - tokenLifetime(other.getTokenLifetime()); - tokenDialect(other.getTokenDialect()); - enforcePolicies(other.getEnforcePolicies()); - tokenEncryption(other.getTokenEncryption()); - consentPolicy(other.getConsentPolicy()); - authorizationDetails(other.getAuthorizationDetails()); - proofOfPossession(other.getProofOfPossession()); - subjectTypeAuthorization(other.getSubjectTypeAuthorization()); - 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; - } - - /** - *

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; - } - - /** - *

Secret used to sign tokens when using symmetric algorithms (HS256).

- */ - @JsonSetter(value = "signing_secret", nulls = Nulls.SKIP) - public Builder signingSecret(Optional signingSecret) { - this.signingSecret = signingSecret; - return this; - } - - public Builder signingSecret(String signingSecret) { - this.signingSecret = Optional.ofNullable(signingSecret); - 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; - } - - /** - *

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; - } - - /** - *

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; - } - - @JsonSetter(value = "token_dialect", nulls = Nulls.SKIP) - public Builder tokenDialect(Optional tokenDialect) { - this.tokenDialect = tokenDialect; - return this; - } - - public Builder tokenDialect(ResourceServerTokenDialectSchemaEnum tokenDialect) { - this.tokenDialect = Optional.ofNullable(tokenDialect); - return this; - } - - /** - *

Whether authorization policies are enforced (true) or not enforced (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; - } - - @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; - } - - @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) - public Builder authorizationDetails(Optional> authorizationDetails) { - this.authorizationDetails = authorizationDetails; - return this; - } - - public Builder authorizationDetails(List authorizationDetails) { - this.authorizationDetails = Optional.ofNullable(authorizationDetails); - 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; - } - - public UpdateResourceServerRequestContent build() { - return new UpdateResourceServerRequestContent( - name, - scopes, - signingAlg, - signingSecret, - skipConsentForVerifiableFirstPartyClients, - allowOfflineAccess, - tokenLifetime, - tokenDialect, - enforcePolicies, - tokenEncryption, - consentPolicy, - authorizationDetails, - proofOfPossession, - subjectTypeAuthorization, - 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 deleted file mode 100644 index fe4e36b58..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateResourceServerResponseContent.java +++ /dev/null @@ -1,742 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateResourceServerResponseContent.Builder.class) -public final class UpdateResourceServerResponseContent { - 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 signingSecret; - - private final Optional allowOfflineAccess; - - private final Optional skipConsentForVerifiableFirstPartyClients; - - private final Optional tokenLifetime; - - private final Optional tokenLifetimeForWeb; - - private final Optional enforcePolicies; - - private final Optional tokenDialect; - - private final OptionalNullable tokenEncryption; - - private final OptionalNullable consentPolicy; - - private final Optional> authorizationDetails; - - private final OptionalNullable proofOfPossession; - - private final Optional subjectTypeAuthorization; - - private final Optional clientId; - - private final Map additionalProperties; - - private UpdateResourceServerResponseContent( - Optional id, - Optional name, - Optional isSystem, - Optional identifier, - Optional> scopes, - Optional signingAlg, - Optional signingSecret, - Optional allowOfflineAccess, - Optional skipConsentForVerifiableFirstPartyClients, - Optional tokenLifetime, - Optional tokenLifetimeForWeb, - Optional enforcePolicies, - Optional tokenDialect, - OptionalNullable tokenEncryption, - OptionalNullable consentPolicy, - Optional> authorizationDetails, - OptionalNullable proofOfPossession, - Optional subjectTypeAuthorization, - Optional clientId, - Map additionalProperties) { - this.id = id; - this.name = name; - this.isSystem = isSystem; - this.identifier = identifier; - this.scopes = scopes; - this.signingAlg = signingAlg; - this.signingSecret = signingSecret; - this.allowOfflineAccess = allowOfflineAccess; - this.skipConsentForVerifiableFirstPartyClients = skipConsentForVerifiableFirstPartyClients; - this.tokenLifetime = tokenLifetime; - this.tokenLifetimeForWeb = tokenLifetimeForWeb; - this.enforcePolicies = enforcePolicies; - this.tokenDialect = tokenDialect; - this.tokenEncryption = tokenEncryption; - this.consentPolicy = consentPolicy; - this.authorizationDetails = authorizationDetails; - this.proofOfPossession = proofOfPossession; - this.subjectTypeAuthorization = subjectTypeAuthorization; - this.clientId = clientId; - 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 Secret used to sign tokens when using symmetric algorithms (HS256). - */ - @JsonProperty("signing_secret") - public Optional getSigningSecret() { - return signingSecret; - } - - /** - * @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 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; - } - - @JsonProperty("token_dialect") - public Optional getTokenDialect() { - return tokenDialect; - } - - @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; - } - - @JsonProperty("authorization_details") - public Optional> getAuthorizationDetails() { - 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; - } - - /** - * @return The client ID of the client that this resource server is linked to - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - @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("proof_of_possession") - private OptionalNullable _getProofOfPossession() { - return proofOfPossession; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateResourceServerResponseContent - && equalTo((UpdateResourceServerResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateResourceServerResponseContent 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) - && signingSecret.equals(other.signingSecret) - && allowOfflineAccess.equals(other.allowOfflineAccess) - && skipConsentForVerifiableFirstPartyClients.equals(other.skipConsentForVerifiableFirstPartyClients) - && tokenLifetime.equals(other.tokenLifetime) - && tokenLifetimeForWeb.equals(other.tokenLifetimeForWeb) - && enforcePolicies.equals(other.enforcePolicies) - && tokenDialect.equals(other.tokenDialect) - && tokenEncryption.equals(other.tokenEncryption) - && consentPolicy.equals(other.consentPolicy) - && authorizationDetails.equals(other.authorizationDetails) - && proofOfPossession.equals(other.proofOfPossession) - && subjectTypeAuthorization.equals(other.subjectTypeAuthorization) - && clientId.equals(other.clientId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.isSystem, - this.identifier, - this.scopes, - this.signingAlg, - this.signingSecret, - this.allowOfflineAccess, - this.skipConsentForVerifiableFirstPartyClients, - this.tokenLifetime, - this.tokenLifetimeForWeb, - this.enforcePolicies, - this.tokenDialect, - this.tokenEncryption, - this.consentPolicy, - this.authorizationDetails, - this.proofOfPossession, - this.subjectTypeAuthorization, - this.clientId); - } - - @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 signingSecret = Optional.empty(); - - private Optional allowOfflineAccess = Optional.empty(); - - private Optional skipConsentForVerifiableFirstPartyClients = Optional.empty(); - - private Optional tokenLifetime = Optional.empty(); - - private Optional tokenLifetimeForWeb = Optional.empty(); - - private Optional enforcePolicies = Optional.empty(); - - private Optional tokenDialect = Optional.empty(); - - private OptionalNullable tokenEncryption = OptionalNullable.absent(); - - private OptionalNullable consentPolicy = OptionalNullable.absent(); - - private Optional> authorizationDetails = Optional.empty(); - - private OptionalNullable proofOfPossession = OptionalNullable.absent(); - - private Optional subjectTypeAuthorization = Optional.empty(); - - private Optional clientId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateResourceServerResponseContent other) { - id(other.getId()); - name(other.getName()); - isSystem(other.getIsSystem()); - identifier(other.getIdentifier()); - scopes(other.getScopes()); - signingAlg(other.getSigningAlg()); - signingSecret(other.getSigningSecret()); - allowOfflineAccess(other.getAllowOfflineAccess()); - skipConsentForVerifiableFirstPartyClients(other.getSkipConsentForVerifiableFirstPartyClients()); - tokenLifetime(other.getTokenLifetime()); - tokenLifetimeForWeb(other.getTokenLifetimeForWeb()); - enforcePolicies(other.getEnforcePolicies()); - tokenDialect(other.getTokenDialect()); - tokenEncryption(other.getTokenEncryption()); - consentPolicy(other.getConsentPolicy()); - authorizationDetails(other.getAuthorizationDetails()); - proofOfPossession(other.getProofOfPossession()); - subjectTypeAuthorization(other.getSubjectTypeAuthorization()); - clientId(other.getClientId()); - 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; - } - - /** - *

Secret used to sign tokens when using symmetric algorithms (HS256).

- */ - @JsonSetter(value = "signing_secret", nulls = Nulls.SKIP) - public Builder signingSecret(Optional signingSecret) { - this.signingSecret = signingSecret; - return this; - } - - public Builder signingSecret(String signingSecret) { - this.signingSecret = Optional.ofNullable(signingSecret); - 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 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; - } - - @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 = "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; - } - - @JsonSetter(value = "authorization_details", nulls = Nulls.SKIP) - public Builder authorizationDetails(Optional> authorizationDetails) { - this.authorizationDetails = authorizationDetails; - return this; - } - - public Builder authorizationDetails(List authorizationDetails) { - this.authorizationDetails = Optional.ofNullable(authorizationDetails); - 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; - } - - /** - *

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; - } - - public UpdateResourceServerResponseContent build() { - return new UpdateResourceServerResponseContent( - id, - name, - isSystem, - identifier, - scopes, - signingAlg, - signingSecret, - allowOfflineAccess, - skipConsentForVerifiableFirstPartyClients, - tokenLifetime, - tokenLifetimeForWeb, - enforcePolicies, - tokenDialect, - tokenEncryption, - consentPolicy, - authorizationDetails, - proofOfPossession, - subjectTypeAuthorization, - clientId, - 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 deleted file mode 100644 index 7f9d9b68b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateRiskAssessmentsSettingsNewDeviceResponseContent.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = UpdateRiskAssessmentsSettingsNewDeviceResponseContent.Builder.class) -public final class UpdateRiskAssessmentsSettingsNewDeviceResponseContent { - private final int rememberFor; - - private final Map additionalProperties; - - private UpdateRiskAssessmentsSettingsNewDeviceResponseContent( - int rememberFor, Map additionalProperties) { - this.rememberFor = rememberFor; - this.additionalProperties = additionalProperties; - } - - /** - * @return Length of time to remember devices for, in days. - */ - @JsonProperty("remember_for") - public int getRememberFor() { - return rememberFor; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateRiskAssessmentsSettingsNewDeviceResponseContent - && equalTo((UpdateRiskAssessmentsSettingsNewDeviceResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateRiskAssessmentsSettingsNewDeviceResponseContent other) { - return rememberFor == other.rememberFor; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.rememberFor); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static RememberForStage builder() { - return new Builder(); - } - - public interface RememberForStage { - /** - *

Length of time to remember devices for, in days.

- */ - _FinalStage rememberFor(int rememberFor); - - Builder from(UpdateRiskAssessmentsSettingsNewDeviceResponseContent other); - } - - public interface _FinalStage { - UpdateRiskAssessmentsSettingsNewDeviceResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements RememberForStage, _FinalStage { - private int rememberFor; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateRiskAssessmentsSettingsNewDeviceResponseContent other) { - rememberFor(other.getRememberFor()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("remember_for") - public _FinalStage rememberFor(int rememberFor) { - this.rememberFor = rememberFor; - return this; - } - - @java.lang.Override - public UpdateRiskAssessmentsSettingsNewDeviceResponseContent build() { - return new UpdateRiskAssessmentsSettingsNewDeviceResponseContent(rememberFor, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateRiskAssessmentsSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateRiskAssessmentsSettingsResponseContent.java deleted file mode 100644 index 74d0413f7..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateRiskAssessmentsSettingsResponseContent.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = UpdateRiskAssessmentsSettingsResponseContent.Builder.class) -public final class UpdateRiskAssessmentsSettingsResponseContent { - private final boolean enabled; - - private final Map additionalProperties; - - private UpdateRiskAssessmentsSettingsResponseContent(boolean enabled, Map additionalProperties) { - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether or not risk assessment is enabled. - */ - @JsonProperty("enabled") - public boolean getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateRiskAssessmentsSettingsResponseContent - && equalTo((UpdateRiskAssessmentsSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateRiskAssessmentsSettingsResponseContent other) { - return enabled == other.enabled; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static EnabledStage builder() { - return new Builder(); - } - - public interface EnabledStage { - /** - *

Whether or not risk assessment is enabled.

- */ - _FinalStage enabled(boolean enabled); - - Builder from(UpdateRiskAssessmentsSettingsResponseContent other); - } - - public interface _FinalStage { - UpdateRiskAssessmentsSettingsResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements EnabledStage, _FinalStage { - private boolean enabled; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateRiskAssessmentsSettingsResponseContent other) { - enabled(other.getEnabled()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("enabled") - public _FinalStage enabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - @java.lang.Override - public UpdateRiskAssessmentsSettingsResponseContent build() { - return new UpdateRiskAssessmentsSettingsResponseContent(enabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateRoleRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateRoleRequestContent.java deleted file mode 100644 index b2295388d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateRoleRequestContent.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateRoleRequestContent.Builder.class) -public final class UpdateRoleRequestContent { - private final Optional name; - - private final Optional description; - - private final Map additionalProperties; - - private UpdateRoleRequestContent( - Optional name, Optional description, Map additionalProperties) { - this.name = name; - this.description = description; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of this role. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Description of this role. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateRoleRequestContent && equalTo((UpdateRoleRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateRoleRequestContent other) { - return name.equals(other.name) && description.equals(other.description); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.description); - } - - @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 description = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateRoleRequestContent other) { - name(other.getName()); - description(other.getDescription()); - return this; - } - - /** - *

Name of this role.

- */ - @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; - } - - /** - *

Description of this role.

- */ - @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; - } - - public UpdateRoleRequestContent build() { - return new UpdateRoleRequestContent(name, description, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateRoleResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateRoleResponseContent.java deleted file mode 100644 index 030113ea9..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateRoleResponseContent.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateRoleResponseContent.Builder.class) -public final class UpdateRoleResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional description; - - private final Map additionalProperties; - - private UpdateRoleResponseContent( - Optional id, - Optional name, - Optional description, - Map additionalProperties) { - this.id = id; - this.name = name; - this.description = description; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID for this role. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Name of this role. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Description of this role. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateRoleResponseContent && equalTo((UpdateRoleResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateRoleResponseContent other) { - return id.equals(other.id) && name.equals(other.name) && description.equals(other.description); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.description); - } - - @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 description = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateRoleResponseContent other) { - id(other.getId()); - name(other.getName()); - description(other.getDescription()); - return this; - } - - /** - *

ID for this role.

- */ - @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; - } - - /** - *

Name of this role.

- */ - @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; - } - - /** - *

Description of this role.

- */ - @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; - } - - public UpdateRoleResponseContent build() { - return new UpdateRoleResponseContent(id, name, description, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateRuleRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateRuleRequestContent.java deleted file mode 100644 index a2ea28daf..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateRuleRequestContent.java +++ /dev/null @@ -1,193 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateRuleRequestContent.Builder.class) -public final class UpdateRuleRequestContent { - private final Optional script; - - private final Optional name; - - private final Optional order; - - private final Optional enabled; - - private final Map additionalProperties; - - private UpdateRuleRequestContent( - Optional script, - Optional name, - Optional order, - Optional enabled, - Map additionalProperties) { - this.script = script; - this.name = name; - this.order = order; - this.enabled = enabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Code to be executed when this rule runs. - */ - @JsonProperty("script") - public Optional getScript() { - return script; - } - - /** - * @return Name of this rule. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Order that this rule should execute in relative to other rules. Lower-valued rules execute first. - */ - @JsonProperty("order") - public Optional getOrder() { - return order; - } - - /** - * @return Whether the rule is enabled (true), or disabled (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateRuleRequestContent && equalTo((UpdateRuleRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateRuleRequestContent other) { - return script.equals(other.script) - && name.equals(other.name) - && order.equals(other.order) - && enabled.equals(other.enabled); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.script, this.name, this.order, 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 script = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional order = Optional.empty(); - - private Optional enabled = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateRuleRequestContent other) { - script(other.getScript()); - name(other.getName()); - order(other.getOrder()); - enabled(other.getEnabled()); - return this; - } - - /** - *

Code to be executed when this rule runs.

- */ - @JsonSetter(value = "script", nulls = Nulls.SKIP) - public Builder script(Optional script) { - this.script = script; - return this; - } - - public Builder script(String script) { - this.script = Optional.ofNullable(script); - return this; - } - - /** - *

Name of this rule.

- */ - @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; - } - - /** - *

Order that this rule should execute in relative to other rules. Lower-valued rules execute first.

- */ - @JsonSetter(value = "order", nulls = Nulls.SKIP) - public Builder order(Optional order) { - this.order = order; - return this; - } - - public Builder order(Double order) { - this.order = Optional.ofNullable(order); - return this; - } - - /** - *

Whether the rule is enabled (true), or disabled (false).

- */ - @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 UpdateRuleRequestContent build() { - return new UpdateRuleRequestContent(script, name, order, enabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateRuleResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateRuleResponseContent.java deleted file mode 100644 index 3705f0238..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateRuleResponseContent.java +++ /dev/null @@ -1,253 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateRuleResponseContent.Builder.class) -public final class UpdateRuleResponseContent { - private final Optional name; - - private final Optional id; - - private final Optional enabled; - - private final Optional script; - - private final Optional order; - - private final Optional stage; - - private final Map additionalProperties; - - private UpdateRuleResponseContent( - Optional name, - Optional id, - Optional enabled, - Optional script, - Optional order, - Optional stage, - Map additionalProperties) { - this.name = name; - this.id = id; - this.enabled = enabled; - this.script = script; - this.order = order; - this.stage = stage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of this rule. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return ID of this rule. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return Whether the rule is enabled (true), or disabled (false). - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Code to be executed when this rule runs. - */ - @JsonProperty("script") - public Optional getScript() { - return script; - } - - /** - * @return Order that this rule should execute in relative to other rules. Lower-valued rules execute first. - */ - @JsonProperty("order") - public Optional getOrder() { - return order; - } - - /** - * @return Execution stage of this rule. Can be login_success, login_failure, or pre_authorize. - */ - @JsonProperty("stage") - public Optional getStage() { - return stage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateRuleResponseContent && equalTo((UpdateRuleResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateRuleResponseContent other) { - return name.equals(other.name) - && id.equals(other.id) - && enabled.equals(other.enabled) - && script.equals(other.script) - && order.equals(other.order) - && stage.equals(other.stage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.id, this.enabled, this.script, this.order, this.stage); - } - - @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 id = Optional.empty(); - - private Optional enabled = Optional.empty(); - - private Optional script = Optional.empty(); - - private Optional order = Optional.empty(); - - private Optional stage = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateRuleResponseContent other) { - name(other.getName()); - id(other.getId()); - enabled(other.getEnabled()); - script(other.getScript()); - order(other.getOrder()); - stage(other.getStage()); - return this; - } - - /** - *

Name of this rule.

- */ - @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; - } - - /** - *

ID of this rule.

- */ - @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; - } - - /** - *

Whether the rule is enabled (true), or disabled (false).

- */ - @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; - } - - /** - *

Code to be executed when this rule runs.

- */ - @JsonSetter(value = "script", nulls = Nulls.SKIP) - public Builder script(Optional script) { - this.script = script; - return this; - } - - public Builder script(String script) { - this.script = Optional.ofNullable(script); - return this; - } - - /** - *

Order that this rule should execute in relative to other rules. Lower-valued rules execute first.

- */ - @JsonSetter(value = "order", nulls = Nulls.SKIP) - public Builder order(Optional order) { - this.order = order; - return this; - } - - public Builder order(Double order) { - this.order = Optional.ofNullable(order); - return this; - } - - /** - *

Execution stage of this rule. Can be login_success, login_failure, or pre_authorize.

- */ - @JsonSetter(value = "stage", nulls = Nulls.SKIP) - public Builder stage(Optional stage) { - this.stage = stage; - return this; - } - - public Builder stage(String stage) { - this.stage = Optional.ofNullable(stage); - return this; - } - - public UpdateRuleResponseContent build() { - return new UpdateRuleResponseContent(name, id, enabled, script, order, stage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateScimConfigurationResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateScimConfigurationResponseContent.java deleted file mode 100644 index 14fcbb308..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateScimConfigurationResponseContent.java +++ /dev/null @@ -1,332 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateScimConfigurationResponseContent.Builder.class) -public final class UpdateScimConfigurationResponseContent { - private final Optional connectionId; - - private final Optional connectionName; - - private final Optional strategy; - - private final Optional tenantName; - - private final Optional userIdAttribute; - - private final Optional> mapping; - - private final Optional createdAt; - - private final Optional updatedOn; - - private final Map additionalProperties; - - private UpdateScimConfigurationResponseContent( - Optional connectionId, - Optional connectionName, - Optional strategy, - Optional tenantName, - Optional userIdAttribute, - Optional> mapping, - Optional createdAt, - Optional updatedOn, - Map additionalProperties) { - this.connectionId = connectionId; - this.connectionName = connectionName; - this.strategy = strategy; - this.tenantName = tenantName; - this.userIdAttribute = userIdAttribute; - this.mapping = mapping; - this.createdAt = createdAt; - this.updatedOn = updatedOn; - this.additionalProperties = additionalProperties; - } - - /** - * @return The connection's identifier - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - /** - * @return The connection's identifier - */ - @JsonProperty("connection_name") - public Optional getConnectionName() { - return connectionName; - } - - /** - * @return The connection's strategy - */ - @JsonProperty("strategy") - public Optional getStrategy() { - return strategy; - } - - /** - * @return The tenant's name - */ - @JsonProperty("tenant_name") - public Optional getTenantName() { - return tenantName; - } - - /** - * @return User ID attribute for generating unique user ids - */ - @JsonProperty("user_id_attribute") - public Optional getUserIdAttribute() { - return userIdAttribute; - } - - /** - * @return The mapping between auth0 and SCIM - */ - @JsonProperty("mapping") - public Optional> getMapping() { - return mapping; - } - - /** - * @return The Date Time Scim Configuration was created - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The Date Time Scim Configuration was last updated - */ - @JsonProperty("updated_on") - public Optional getUpdatedOn() { - return updatedOn; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateScimConfigurationResponseContent - && equalTo((UpdateScimConfigurationResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateScimConfigurationResponseContent other) { - return connectionId.equals(other.connectionId) - && connectionName.equals(other.connectionName) - && strategy.equals(other.strategy) - && tenantName.equals(other.tenantName) - && userIdAttribute.equals(other.userIdAttribute) - && mapping.equals(other.mapping) - && createdAt.equals(other.createdAt) - && updatedOn.equals(other.updatedOn); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connectionId, - this.connectionName, - this.strategy, - this.tenantName, - this.userIdAttribute, - this.mapping, - this.createdAt, - this.updatedOn); - } - - @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 connectionId = Optional.empty(); - - private Optional connectionName = Optional.empty(); - - private Optional strategy = Optional.empty(); - - private Optional tenantName = Optional.empty(); - - private Optional userIdAttribute = Optional.empty(); - - private Optional> mapping = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedOn = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateScimConfigurationResponseContent other) { - connectionId(other.getConnectionId()); - connectionName(other.getConnectionName()); - strategy(other.getStrategy()); - tenantName(other.getTenantName()); - userIdAttribute(other.getUserIdAttribute()); - mapping(other.getMapping()); - createdAt(other.getCreatedAt()); - updatedOn(other.getUpdatedOn()); - return this; - } - - /** - *

The connection's identifier

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - return this; - } - - /** - *

The connection's identifier

- */ - @JsonSetter(value = "connection_name", nulls = Nulls.SKIP) - public Builder connectionName(Optional connectionName) { - this.connectionName = connectionName; - return this; - } - - public Builder connectionName(String connectionName) { - this.connectionName = Optional.ofNullable(connectionName); - return this; - } - - /** - *

The connection's strategy

- */ - @JsonSetter(value = "strategy", nulls = Nulls.SKIP) - public Builder strategy(Optional strategy) { - this.strategy = strategy; - return this; - } - - public Builder strategy(String strategy) { - this.strategy = Optional.ofNullable(strategy); - return this; - } - - /** - *

The tenant's name

- */ - @JsonSetter(value = "tenant_name", nulls = Nulls.SKIP) - public Builder tenantName(Optional tenantName) { - this.tenantName = tenantName; - return this; - } - - public Builder tenantName(String tenantName) { - this.tenantName = Optional.ofNullable(tenantName); - return this; - } - - /** - *

User ID attribute for generating unique user ids

- */ - @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; - } - - /** - *

The mapping between auth0 and SCIM

- */ - @JsonSetter(value = "mapping", nulls = Nulls.SKIP) - public Builder mapping(Optional> mapping) { - this.mapping = mapping; - return this; - } - - public Builder mapping(List mapping) { - this.mapping = Optional.ofNullable(mapping); - return this; - } - - /** - *

The Date Time Scim Configuration was created

- */ - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(String createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - /** - *

The Date Time Scim Configuration was last updated

- */ - @JsonSetter(value = "updated_on", nulls = Nulls.SKIP) - public Builder updatedOn(Optional updatedOn) { - this.updatedOn = updatedOn; - return this; - } - - public Builder updatedOn(String updatedOn) { - this.updatedOn = Optional.ofNullable(updatedOn); - return this; - } - - public UpdateScimConfigurationResponseContent build() { - return new UpdateScimConfigurationResponseContent( - connectionId, - connectionName, - strategy, - tenantName, - userIdAttribute, - mapping, - createdAt, - updatedOn, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileRequestContent.java deleted file mode 100644 index 755f4e008..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileRequestContent.java +++ /dev/null @@ -1,366 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateSelfServiceProfileRequestContent.Builder.class) -public final class UpdateSelfServiceProfileRequestContent { - private final Optional name; - - private final OptionalNullable description; - - private final OptionalNullable branding; - - private final Optional> allowedStrategies; - - private final OptionalNullable> userAttributes; - - private final OptionalNullable userAttributeProfileId; - - private final Map additionalProperties; - - private UpdateSelfServiceProfileRequestContent( - Optional name, - OptionalNullable description, - OptionalNullable branding, - Optional> allowedStrategies, - OptionalNullable> userAttributes, - OptionalNullable userAttributeProfileId, - Map additionalProperties) { - this.name = name; - this.description = description; - this.branding = branding; - this.allowedStrategies = allowedStrategies; - this.userAttributes = userAttributes; - this.userAttributeProfileId = userAttributeProfileId; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the self-service Profile. - */ - @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; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("branding") - public OptionalNullable getBranding() { - return branding; - } - - /** - * @return List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, keycloak-samlp, pingfederate] - */ - @JsonProperty("allowed_strategies") - public Optional> getAllowedStrategies() { - return allowedStrategies; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("user_attributes") - public OptionalNullable> getUserAttributes() { - if (userAttributes == null) { - return OptionalNullable.absent(); - } - return userAttributes; - } - - /** - * @return ID of the user-attribute-profile to associate with this self-service profile. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("user_attribute_profile_id") - public OptionalNullable getUserAttributeProfileId() { - if (userAttributeProfileId == null) { - return OptionalNullable.absent(); - } - return userAttributeProfileId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("description") - private OptionalNullable _getDescription() { - return description; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("user_attributes") - private OptionalNullable> _getUserAttributes() { - return userAttributes; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("user_attribute_profile_id") - private OptionalNullable _getUserAttributeProfileId() { - return userAttributeProfileId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateSelfServiceProfileRequestContent - && equalTo((UpdateSelfServiceProfileRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateSelfServiceProfileRequestContent other) { - return name.equals(other.name) - && description.equals(other.description) - && branding.equals(other.branding) - && allowedStrategies.equals(other.allowedStrategies) - && userAttributes.equals(other.userAttributes) - && userAttributeProfileId.equals(other.userAttributeProfileId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.description, - this.branding, - this.allowedStrategies, - this.userAttributes, - this.userAttributeProfileId); - } - - @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 branding = OptionalNullable.absent(); - - private Optional> allowedStrategies = Optional.empty(); - - private OptionalNullable> userAttributes = OptionalNullable.absent(); - - private OptionalNullable userAttributeProfileId = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateSelfServiceProfileRequestContent other) { - name(other.getName()); - description(other.getDescription()); - branding(other.getBranding()); - allowedStrategies(other.getAllowedStrategies()); - userAttributes(other.getUserAttributes()); - userAttributeProfileId(other.getUserAttributeProfileId()); - return this; - } - - /** - *

The name of the self-service Profile.

- */ - @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 = "branding", nulls = Nulls.SKIP) - public Builder branding(OptionalNullable branding) { - this.branding = branding; - return this; - } - - public Builder branding(SelfServiceProfileBrandingProperties branding) { - this.branding = OptionalNullable.of(branding); - return this; - } - - public Builder branding(Optional branding) { - if (branding.isPresent()) { - this.branding = OptionalNullable.of(branding.get()); - } else { - this.branding = OptionalNullable.absent(); - } - return this; - } - - public Builder branding(com.auth0.client.mgmt.core.Nullable branding) { - if (branding.isNull()) { - this.branding = OptionalNullable.ofNull(); - } else if (branding.isEmpty()) { - this.branding = OptionalNullable.absent(); - } else { - this.branding = OptionalNullable.of(branding.get()); - } - return this; - } - - /** - *

List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, keycloak-samlp, pingfederate]

- */ - @JsonSetter(value = "allowed_strategies", nulls = Nulls.SKIP) - public Builder allowedStrategies(Optional> allowedStrategies) { - this.allowedStrategies = allowedStrategies; - return this; - } - - public Builder allowedStrategies(List allowedStrategies) { - this.allowedStrategies = Optional.ofNullable(allowedStrategies); - return this; - } - - @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) - public Builder userAttributes( - @Nullable OptionalNullable> userAttributes) { - this.userAttributes = userAttributes; - return this; - } - - public Builder userAttributes(List userAttributes) { - this.userAttributes = OptionalNullable.of(userAttributes); - return this; - } - - public Builder userAttributes(Optional> userAttributes) { - if (userAttributes.isPresent()) { - this.userAttributes = OptionalNullable.of(userAttributes.get()); - } else { - this.userAttributes = OptionalNullable.absent(); - } - return this; - } - - public Builder userAttributes( - com.auth0.client.mgmt.core.Nullable> userAttributes) { - if (userAttributes.isNull()) { - this.userAttributes = OptionalNullable.ofNull(); - } else if (userAttributes.isEmpty()) { - this.userAttributes = OptionalNullable.absent(); - } else { - this.userAttributes = OptionalNullable.of(userAttributes.get()); - } - return this; - } - - /** - *

ID of the user-attribute-profile to associate with this self-service profile.

- */ - @JsonSetter(value = "user_attribute_profile_id", nulls = Nulls.SKIP) - public Builder userAttributeProfileId(@Nullable OptionalNullable userAttributeProfileId) { - this.userAttributeProfileId = userAttributeProfileId; - return this; - } - - public Builder userAttributeProfileId(String userAttributeProfileId) { - this.userAttributeProfileId = OptionalNullable.of(userAttributeProfileId); - return this; - } - - public Builder userAttributeProfileId(Optional userAttributeProfileId) { - if (userAttributeProfileId.isPresent()) { - this.userAttributeProfileId = OptionalNullable.of(userAttributeProfileId.get()); - } else { - this.userAttributeProfileId = OptionalNullable.absent(); - } - return this; - } - - public Builder userAttributeProfileId(com.auth0.client.mgmt.core.Nullable userAttributeProfileId) { - if (userAttributeProfileId.isNull()) { - this.userAttributeProfileId = OptionalNullable.ofNull(); - } else if (userAttributeProfileId.isEmpty()) { - this.userAttributeProfileId = OptionalNullable.absent(); - } else { - this.userAttributeProfileId = OptionalNullable.of(userAttributeProfileId.get()); - } - return this; - } - - public UpdateSelfServiceProfileRequestContent build() { - return new UpdateSelfServiceProfileRequestContent( - name, - description, - branding, - allowedStrategies, - userAttributes, - userAttributeProfileId, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileResponseContent.java deleted file mode 100644 index 6253c4689..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateSelfServiceProfileResponseContent.java +++ /dev/null @@ -1,359 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = UpdateSelfServiceProfileResponseContent.Builder.class) -public final class UpdateSelfServiceProfileResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional description; - - private final Optional> userAttributes; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional branding; - - private final Optional> allowedStrategies; - - private final Optional userAttributeProfileId; - - private final Map additionalProperties; - - private UpdateSelfServiceProfileResponseContent( - Optional id, - Optional name, - Optional description, - Optional> userAttributes, - Optional createdAt, - Optional updatedAt, - Optional branding, - Optional> allowedStrategies, - Optional userAttributeProfileId, - Map additionalProperties) { - this.id = id; - this.name = name; - this.description = description; - this.userAttributes = userAttributes; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.branding = branding; - this.allowedStrategies = allowedStrategies; - this.userAttributeProfileId = userAttributeProfileId; - this.additionalProperties = additionalProperties; - } - - /** - * @return The unique ID of the self-service Profile. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the self-service Profile. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The description of the self-service Profile. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - /** - * @return List of attributes to be mapped that will be shown to the user during the SS-SSO flow. - */ - @JsonProperty("user_attributes") - public Optional> getUserAttributes() { - return userAttributes; - } - - /** - * @return The time when this self-service Profile was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The time when this self-service Profile was updated. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("branding") - public Optional getBranding() { - return branding; - } - - /** - * @return List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, keycloak-samlp, pingfederate] - */ - @JsonProperty("allowed_strategies") - public Optional> getAllowedStrategies() { - return allowedStrategies; - } - - /** - * @return ID of the user-attribute-profile to associate with this self-service profile. - */ - @JsonProperty("user_attribute_profile_id") - public Optional getUserAttributeProfileId() { - return userAttributeProfileId; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateSelfServiceProfileResponseContent - && equalTo((UpdateSelfServiceProfileResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateSelfServiceProfileResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && description.equals(other.description) - && userAttributes.equals(other.userAttributes) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && branding.equals(other.branding) - && allowedStrategies.equals(other.allowedStrategies) - && userAttributeProfileId.equals(other.userAttributeProfileId); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.description, - this.userAttributes, - this.createdAt, - this.updatedAt, - this.branding, - this.allowedStrategies, - this.userAttributeProfileId); - } - - @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 description = Optional.empty(); - - private Optional> userAttributes = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional branding = Optional.empty(); - - private Optional> allowedStrategies = Optional.empty(); - - private Optional userAttributeProfileId = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateSelfServiceProfileResponseContent other) { - id(other.getId()); - name(other.getName()); - description(other.getDescription()); - userAttributes(other.getUserAttributes()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - branding(other.getBranding()); - allowedStrategies(other.getAllowedStrategies()); - userAttributeProfileId(other.getUserAttributeProfileId()); - return this; - } - - /** - *

The unique ID of the self-service Profile.

- */ - @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 the self-service Profile.

- */ - @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 description of the self-service Profile.

- */ - @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; - } - - /** - *

List of attributes to be mapped that will be shown to the user during the SS-SSO flow.

- */ - @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) - public Builder userAttributes(Optional> userAttributes) { - this.userAttributes = userAttributes; - return this; - } - - public Builder userAttributes(List userAttributes) { - this.userAttributes = Optional.ofNullable(userAttributes); - return this; - } - - /** - *

The time when this self-service Profile 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 time when this self-service Profile was 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; - } - - @JsonSetter(value = "branding", nulls = Nulls.SKIP) - public Builder branding(Optional branding) { - this.branding = branding; - return this; - } - - public Builder branding(SelfServiceProfileBrandingProperties branding) { - this.branding = Optional.ofNullable(branding); - return this; - } - - /** - *

List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [oidc, samlp, waad, google-apps, adfs, okta, keycloak-samlp, pingfederate]

- */ - @JsonSetter(value = "allowed_strategies", nulls = Nulls.SKIP) - public Builder allowedStrategies(Optional> allowedStrategies) { - this.allowedStrategies = allowedStrategies; - return this; - } - - public Builder allowedStrategies(List allowedStrategies) { - this.allowedStrategies = Optional.ofNullable(allowedStrategies); - return this; - } - - /** - *

ID of the user-attribute-profile to associate with this self-service profile.

- */ - @JsonSetter(value = "user_attribute_profile_id", nulls = Nulls.SKIP) - public Builder userAttributeProfileId(Optional userAttributeProfileId) { - this.userAttributeProfileId = userAttributeProfileId; - return this; - } - - public Builder userAttributeProfileId(String userAttributeProfileId) { - this.userAttributeProfileId = Optional.ofNullable(userAttributeProfileId); - return this; - } - - public UpdateSelfServiceProfileResponseContent build() { - return new UpdateSelfServiceProfileResponseContent( - id, - name, - description, - userAttributes, - createdAt, - updatedAt, - branding, - allowedStrategies, - userAttributeProfileId, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateSessionRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateSessionRequestContent.java deleted file mode 100644 index 43009ff83..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateSessionRequestContent.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateSessionRequestContent.Builder.class) -public final class UpdateSessionRequestContent { - private final OptionalNullable> sessionMetadata; - - private final Map additionalProperties; - - private UpdateSessionRequestContent( - OptionalNullable> sessionMetadata, Map additionalProperties) { - this.sessionMetadata = sessionMetadata; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_metadata") - public OptionalNullable> getSessionMetadata() { - if (sessionMetadata == null) { - return OptionalNullable.absent(); - } - return sessionMetadata; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_metadata") - private OptionalNullable> _getSessionMetadata() { - return sessionMetadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateSessionRequestContent && equalTo((UpdateSessionRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateSessionRequestContent other) { - return sessionMetadata.equals(other.sessionMetadata); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.sessionMetadata); - } - - @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> sessionMetadata = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateSessionRequestContent other) { - sessionMetadata(other.getSessionMetadata()); - return this; - } - - @JsonSetter(value = "session_metadata", nulls = Nulls.SKIP) - public Builder sessionMetadata(@Nullable OptionalNullable> sessionMetadata) { - this.sessionMetadata = sessionMetadata; - return this; - } - - public Builder sessionMetadata(Map sessionMetadata) { - this.sessionMetadata = OptionalNullable.of(sessionMetadata); - return this; - } - - public Builder sessionMetadata(Optional> sessionMetadata) { - if (sessionMetadata.isPresent()) { - this.sessionMetadata = OptionalNullable.of(sessionMetadata.get()); - } else { - this.sessionMetadata = OptionalNullable.absent(); - } - return this; - } - - public Builder sessionMetadata(com.auth0.client.mgmt.core.Nullable> sessionMetadata) { - if (sessionMetadata.isNull()) { - this.sessionMetadata = OptionalNullable.ofNull(); - } else if (sessionMetadata.isEmpty()) { - this.sessionMetadata = OptionalNullable.absent(); - } else { - this.sessionMetadata = OptionalNullable.of(sessionMetadata.get()); - } - return this; - } - - public UpdateSessionRequestContent build() { - return new UpdateSessionRequestContent(sessionMetadata, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateSessionResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateSessionResponseContent.java deleted file mode 100644 index 74e14d613..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateSessionResponseContent.java +++ /dev/null @@ -1,464 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateSessionResponseContent.Builder.class) -public final class UpdateSessionResponseContent { - private final Optional id; - - private final Optional userId; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional authenticatedAt; - - private final Optional idleExpiresAt; - - private final Optional expiresAt; - - private final Optional lastInteractedAt; - - private final Optional device; - - private final Optional> clients; - - private final Optional authentication; - - private final Optional cookie; - - private final OptionalNullable> sessionMetadata; - - private final Map additionalProperties; - - private UpdateSessionResponseContent( - Optional id, - Optional userId, - Optional createdAt, - Optional updatedAt, - Optional authenticatedAt, - Optional idleExpiresAt, - Optional expiresAt, - Optional lastInteractedAt, - Optional device, - Optional> clients, - Optional authentication, - Optional cookie, - OptionalNullable> sessionMetadata, - Map additionalProperties) { - this.id = id; - this.userId = userId; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.authenticatedAt = authenticatedAt; - this.idleExpiresAt = idleExpiresAt; - this.expiresAt = expiresAt; - this.lastInteractedAt = lastInteractedAt; - this.device = device; - this.clients = clients; - this.authentication = authentication; - this.cookie = cookie; - this.sessionMetadata = sessionMetadata; - this.additionalProperties = additionalProperties; - } - - /** - * @return The ID of the session - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return ID of the user which can be used when interacting with other APIs. - */ - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @JsonProperty("authenticated_at") - public Optional getAuthenticatedAt() { - return authenticatedAt; - } - - @JsonProperty("idle_expires_at") - public Optional getIdleExpiresAt() { - return idleExpiresAt; - } - - @JsonProperty("expires_at") - public Optional getExpiresAt() { - return expiresAt; - } - - @JsonProperty("last_interacted_at") - public Optional getLastInteractedAt() { - return lastInteractedAt; - } - - @JsonProperty("device") - public Optional getDevice() { - return device; - } - - /** - * @return List of client details for the session - */ - @JsonProperty("clients") - public Optional> getClients() { - return clients; - } - - @JsonProperty("authentication") - public Optional getAuthentication() { - return authentication; - } - - @JsonProperty("cookie") - public Optional getCookie() { - return cookie; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_metadata") - public OptionalNullable> getSessionMetadata() { - if (sessionMetadata == null) { - return OptionalNullable.absent(); - } - return sessionMetadata; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_metadata") - private OptionalNullable> _getSessionMetadata() { - return sessionMetadata; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateSessionResponseContent && equalTo((UpdateSessionResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateSessionResponseContent other) { - return id.equals(other.id) - && userId.equals(other.userId) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt) - && authenticatedAt.equals(other.authenticatedAt) - && idleExpiresAt.equals(other.idleExpiresAt) - && expiresAt.equals(other.expiresAt) - && lastInteractedAt.equals(other.lastInteractedAt) - && device.equals(other.device) - && clients.equals(other.clients) - && authentication.equals(other.authentication) - && cookie.equals(other.cookie) - && sessionMetadata.equals(other.sessionMetadata); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.userId, - this.createdAt, - this.updatedAt, - this.authenticatedAt, - this.idleExpiresAt, - this.expiresAt, - this.lastInteractedAt, - this.device, - this.clients, - this.authentication, - this.cookie, - this.sessionMetadata); - } - - @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 userId = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional authenticatedAt = Optional.empty(); - - private Optional idleExpiresAt = Optional.empty(); - - private Optional expiresAt = Optional.empty(); - - private Optional lastInteractedAt = Optional.empty(); - - private Optional device = Optional.empty(); - - private Optional> clients = Optional.empty(); - - private Optional authentication = Optional.empty(); - - private Optional cookie = Optional.empty(); - - private OptionalNullable> sessionMetadata = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateSessionResponseContent other) { - id(other.getId()); - userId(other.getUserId()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - authenticatedAt(other.getAuthenticatedAt()); - idleExpiresAt(other.getIdleExpiresAt()); - expiresAt(other.getExpiresAt()); - lastInteractedAt(other.getLastInteractedAt()); - device(other.getDevice()); - clients(other.getClients()); - authentication(other.getAuthentication()); - cookie(other.getCookie()); - sessionMetadata(other.getSessionMetadata()); - return this; - } - - /** - *

The ID of the session

- */ - @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; - } - - /** - *

ID of the user which can be used when interacting with other APIs.

- */ - @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; - } - - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(SessionDate createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - public Builder updatedAt(SessionDate updatedAt) { - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - @JsonSetter(value = "authenticated_at", nulls = Nulls.SKIP) - public Builder authenticatedAt(Optional authenticatedAt) { - this.authenticatedAt = authenticatedAt; - return this; - } - - public Builder authenticatedAt(SessionDate authenticatedAt) { - this.authenticatedAt = Optional.ofNullable(authenticatedAt); - return this; - } - - @JsonSetter(value = "idle_expires_at", nulls = Nulls.SKIP) - public Builder idleExpiresAt(Optional idleExpiresAt) { - this.idleExpiresAt = idleExpiresAt; - return this; - } - - public Builder idleExpiresAt(SessionDate idleExpiresAt) { - this.idleExpiresAt = Optional.ofNullable(idleExpiresAt); - return this; - } - - @JsonSetter(value = "expires_at", nulls = Nulls.SKIP) - public Builder expiresAt(Optional expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - public Builder expiresAt(SessionDate expiresAt) { - this.expiresAt = Optional.ofNullable(expiresAt); - return this; - } - - @JsonSetter(value = "last_interacted_at", nulls = Nulls.SKIP) - public Builder lastInteractedAt(Optional lastInteractedAt) { - this.lastInteractedAt = lastInteractedAt; - return this; - } - - public Builder lastInteractedAt(SessionDate lastInteractedAt) { - this.lastInteractedAt = Optional.ofNullable(lastInteractedAt); - return this; - } - - @JsonSetter(value = "device", nulls = Nulls.SKIP) - public Builder device(Optional device) { - this.device = device; - return this; - } - - public Builder device(SessionDeviceMetadata device) { - this.device = Optional.ofNullable(device); - return this; - } - - /** - *

List of client details for the session

- */ - @JsonSetter(value = "clients", nulls = Nulls.SKIP) - public Builder clients(Optional> clients) { - this.clients = clients; - return this; - } - - public Builder clients(List clients) { - this.clients = Optional.ofNullable(clients); - return this; - } - - @JsonSetter(value = "authentication", nulls = Nulls.SKIP) - public Builder authentication(Optional authentication) { - this.authentication = authentication; - return this; - } - - public Builder authentication(SessionAuthenticationSignals authentication) { - this.authentication = Optional.ofNullable(authentication); - return this; - } - - @JsonSetter(value = "cookie", nulls = Nulls.SKIP) - public Builder cookie(Optional cookie) { - this.cookie = cookie; - return this; - } - - public Builder cookie(SessionCookieMetadata cookie) { - this.cookie = Optional.ofNullable(cookie); - return this; - } - - @JsonSetter(value = "session_metadata", nulls = Nulls.SKIP) - public Builder sessionMetadata(@Nullable OptionalNullable> sessionMetadata) { - this.sessionMetadata = sessionMetadata; - return this; - } - - public Builder sessionMetadata(Map sessionMetadata) { - this.sessionMetadata = OptionalNullable.of(sessionMetadata); - return this; - } - - public Builder sessionMetadata(Optional> sessionMetadata) { - if (sessionMetadata.isPresent()) { - this.sessionMetadata = OptionalNullable.of(sessionMetadata.get()); - } else { - this.sessionMetadata = OptionalNullable.absent(); - } - return this; - } - - public Builder sessionMetadata(com.auth0.client.mgmt.core.Nullable> sessionMetadata) { - if (sessionMetadata.isNull()) { - this.sessionMetadata = OptionalNullable.ofNull(); - } else if (sessionMetadata.isEmpty()) { - this.sessionMetadata = OptionalNullable.absent(); - } else { - this.sessionMetadata = OptionalNullable.of(sessionMetadata.get()); - } - return this; - } - - public UpdateSessionResponseContent build() { - return new UpdateSessionResponseContent( - id, - userId, - createdAt, - updatedAt, - authenticatedAt, - idleExpiresAt, - expiresAt, - lastInteractedAt, - device, - clients, - authentication, - cookie, - sessionMetadata, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateSettingsRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateSettingsRequestContent.java deleted file mode 100644 index 9dc1449b3..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateSettingsRequestContent.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateSettingsRequestContent.Builder.class) -public final class UpdateSettingsRequestContent { - private final Optional universalLoginExperience; - - private final OptionalNullable identifierFirst; - - private final OptionalNullable webauthnPlatformFirstFactor; - - private final Map additionalProperties; - - private UpdateSettingsRequestContent( - Optional universalLoginExperience, - OptionalNullable identifierFirst, - OptionalNullable webauthnPlatformFirstFactor, - Map additionalProperties) { - this.universalLoginExperience = universalLoginExperience; - this.identifierFirst = identifierFirst; - this.webauthnPlatformFirstFactor = webauthnPlatformFirstFactor; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("universal_login_experience") - public Optional getUniversalLoginExperience() { - return universalLoginExperience; - } - - /** - * @return Whether identifier first is enabled or not - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("identifier_first") - public OptionalNullable getIdentifierFirst() { - if (identifierFirst == null) { - return OptionalNullable.absent(); - } - return identifierFirst; - } - - /** - * @return Use WebAuthn with Device Biometrics as the first authentication factor - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("webauthn_platform_first_factor") - public OptionalNullable getWebauthnPlatformFirstFactor() { - if (webauthnPlatformFirstFactor == null) { - return OptionalNullable.absent(); - } - return webauthnPlatformFirstFactor; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("identifier_first") - private OptionalNullable _getIdentifierFirst() { - return identifierFirst; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("webauthn_platform_first_factor") - private OptionalNullable _getWebauthnPlatformFirstFactor() { - return webauthnPlatformFirstFactor; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateSettingsRequestContent && equalTo((UpdateSettingsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateSettingsRequestContent other) { - return universalLoginExperience.equals(other.universalLoginExperience) - && identifierFirst.equals(other.identifierFirst) - && webauthnPlatformFirstFactor.equals(other.webauthnPlatformFirstFactor); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.universalLoginExperience, this.identifierFirst, this.webauthnPlatformFirstFactor); - } - - @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 universalLoginExperience = Optional.empty(); - - private OptionalNullable identifierFirst = OptionalNullable.absent(); - - private OptionalNullable webauthnPlatformFirstFactor = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateSettingsRequestContent other) { - universalLoginExperience(other.getUniversalLoginExperience()); - identifierFirst(other.getIdentifierFirst()); - webauthnPlatformFirstFactor(other.getWebauthnPlatformFirstFactor()); - return this; - } - - @JsonSetter(value = "universal_login_experience", nulls = Nulls.SKIP) - public Builder universalLoginExperience(Optional universalLoginExperience) { - this.universalLoginExperience = universalLoginExperience; - return this; - } - - public Builder universalLoginExperience(UniversalLoginExperienceEnum universalLoginExperience) { - this.universalLoginExperience = Optional.ofNullable(universalLoginExperience); - return this; - } - - /** - *

Whether identifier first is enabled or not

- */ - @JsonSetter(value = "identifier_first", nulls = Nulls.SKIP) - public Builder identifierFirst(@Nullable OptionalNullable identifierFirst) { - this.identifierFirst = identifierFirst; - return this; - } - - public Builder identifierFirst(Boolean identifierFirst) { - this.identifierFirst = OptionalNullable.of(identifierFirst); - return this; - } - - public Builder identifierFirst(Optional identifierFirst) { - if (identifierFirst.isPresent()) { - this.identifierFirst = OptionalNullable.of(identifierFirst.get()); - } else { - this.identifierFirst = OptionalNullable.absent(); - } - return this; - } - - public Builder identifierFirst(com.auth0.client.mgmt.core.Nullable identifierFirst) { - if (identifierFirst.isNull()) { - this.identifierFirst = OptionalNullable.ofNull(); - } else if (identifierFirst.isEmpty()) { - this.identifierFirst = OptionalNullable.absent(); - } else { - this.identifierFirst = OptionalNullable.of(identifierFirst.get()); - } - return this; - } - - /** - *

Use WebAuthn with Device Biometrics as the first authentication factor

- */ - @JsonSetter(value = "webauthn_platform_first_factor", nulls = Nulls.SKIP) - public Builder webauthnPlatformFirstFactor(@Nullable OptionalNullable webauthnPlatformFirstFactor) { - this.webauthnPlatformFirstFactor = webauthnPlatformFirstFactor; - return this; - } - - public Builder webauthnPlatformFirstFactor(Boolean webauthnPlatformFirstFactor) { - this.webauthnPlatformFirstFactor = OptionalNullable.of(webauthnPlatformFirstFactor); - return this; - } - - public Builder webauthnPlatformFirstFactor(Optional webauthnPlatformFirstFactor) { - if (webauthnPlatformFirstFactor.isPresent()) { - this.webauthnPlatformFirstFactor = OptionalNullable.of(webauthnPlatformFirstFactor.get()); - } else { - this.webauthnPlatformFirstFactor = OptionalNullable.absent(); - } - return this; - } - - public Builder webauthnPlatformFirstFactor( - com.auth0.client.mgmt.core.Nullable webauthnPlatformFirstFactor) { - if (webauthnPlatformFirstFactor.isNull()) { - this.webauthnPlatformFirstFactor = OptionalNullable.ofNull(); - } else if (webauthnPlatformFirstFactor.isEmpty()) { - this.webauthnPlatformFirstFactor = OptionalNullable.absent(); - } else { - this.webauthnPlatformFirstFactor = OptionalNullable.of(webauthnPlatformFirstFactor.get()); - } - return this; - } - - public UpdateSettingsRequestContent build() { - return new UpdateSettingsRequestContent( - universalLoginExperience, identifierFirst, webauthnPlatformFirstFactor, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateSettingsResponseContent.java deleted file mode 100644 index 8acc2ed8e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateSettingsResponseContent.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateSettingsResponseContent.Builder.class) -public final class UpdateSettingsResponseContent { - private final Optional universalLoginExperience; - - private final Optional identifierFirst; - - private final Optional webauthnPlatformFirstFactor; - - private final Map additionalProperties; - - private UpdateSettingsResponseContent( - Optional universalLoginExperience, - Optional identifierFirst, - Optional webauthnPlatformFirstFactor, - Map additionalProperties) { - this.universalLoginExperience = universalLoginExperience; - this.identifierFirst = identifierFirst; - this.webauthnPlatformFirstFactor = webauthnPlatformFirstFactor; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("universal_login_experience") - public Optional getUniversalLoginExperience() { - return universalLoginExperience; - } - - /** - * @return Whether identifier first is enabled or not - */ - @JsonProperty("identifier_first") - public Optional getIdentifierFirst() { - return identifierFirst; - } - - /** - * @return Use WebAuthn with Device Biometrics as the first authentication factor - */ - @JsonProperty("webauthn_platform_first_factor") - public Optional getWebauthnPlatformFirstFactor() { - return webauthnPlatformFirstFactor; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateSettingsResponseContent && equalTo((UpdateSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateSettingsResponseContent other) { - return universalLoginExperience.equals(other.universalLoginExperience) - && identifierFirst.equals(other.identifierFirst) - && webauthnPlatformFirstFactor.equals(other.webauthnPlatformFirstFactor); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.universalLoginExperience, this.identifierFirst, this.webauthnPlatformFirstFactor); - } - - @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 universalLoginExperience = Optional.empty(); - - private Optional identifierFirst = Optional.empty(); - - private Optional webauthnPlatformFirstFactor = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateSettingsResponseContent other) { - universalLoginExperience(other.getUniversalLoginExperience()); - identifierFirst(other.getIdentifierFirst()); - webauthnPlatformFirstFactor(other.getWebauthnPlatformFirstFactor()); - return this; - } - - @JsonSetter(value = "universal_login_experience", nulls = Nulls.SKIP) - public Builder universalLoginExperience(Optional universalLoginExperience) { - this.universalLoginExperience = universalLoginExperience; - return this; - } - - public Builder universalLoginExperience(UniversalLoginExperienceEnum universalLoginExperience) { - this.universalLoginExperience = Optional.ofNullable(universalLoginExperience); - return this; - } - - /** - *

Whether identifier first is enabled or not

- */ - @JsonSetter(value = "identifier_first", nulls = Nulls.SKIP) - public Builder identifierFirst(Optional identifierFirst) { - this.identifierFirst = identifierFirst; - return this; - } - - public Builder identifierFirst(Boolean identifierFirst) { - this.identifierFirst = Optional.ofNullable(identifierFirst); - return this; - } - - /** - *

Use WebAuthn with Device Biometrics as the first authentication factor

- */ - @JsonSetter(value = "webauthn_platform_first_factor", nulls = Nulls.SKIP) - public Builder webauthnPlatformFirstFactor(Optional webauthnPlatformFirstFactor) { - this.webauthnPlatformFirstFactor = webauthnPlatformFirstFactor; - return this; - } - - public Builder webauthnPlatformFirstFactor(Boolean webauthnPlatformFirstFactor) { - this.webauthnPlatformFirstFactor = Optional.ofNullable(webauthnPlatformFirstFactor); - return this; - } - - public UpdateSettingsResponseContent build() { - return new UpdateSettingsResponseContent( - universalLoginExperience, identifierFirst, webauthnPlatformFirstFactor, 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 deleted file mode 100644 index a7502a8fc..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateSupplementalSignalsRequestContent.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = UpdateSupplementalSignalsRequestContent.Builder.class) -public final class UpdateSupplementalSignalsRequestContent { - private final boolean akamaiEnabled; - - private final Map additionalProperties; - - private UpdateSupplementalSignalsRequestContent(boolean akamaiEnabled, Map additionalProperties) { - this.akamaiEnabled = akamaiEnabled; - this.additionalProperties = additionalProperties; - } - - /** - * @return Indicates if incoming Akamai Headers should be processed - */ - @JsonProperty("akamai_enabled") - public boolean getAkamaiEnabled() { - return akamaiEnabled; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateSupplementalSignalsRequestContent - && equalTo((UpdateSupplementalSignalsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateSupplementalSignalsRequestContent other) { - return akamaiEnabled == other.akamaiEnabled; - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.akamaiEnabled); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static AkamaiEnabledStage builder() { - return new Builder(); - } - - public interface AkamaiEnabledStage { - /** - *

Indicates if incoming Akamai Headers should be processed

- */ - _FinalStage akamaiEnabled(boolean akamaiEnabled); - - Builder from(UpdateSupplementalSignalsRequestContent other); - } - - public interface _FinalStage { - UpdateSupplementalSignalsRequestContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements AkamaiEnabledStage, _FinalStage { - private boolean akamaiEnabled; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateSupplementalSignalsRequestContent other) { - akamaiEnabled(other.getAkamaiEnabled()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("akamai_enabled") - public _FinalStage akamaiEnabled(boolean akamaiEnabled) { - this.akamaiEnabled = akamaiEnabled; - return this; - } - - @java.lang.Override - public UpdateSupplementalSignalsRequestContent build() { - return new UpdateSupplementalSignalsRequestContent(akamaiEnabled, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateSuspiciousIpThrottlingSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateSuspiciousIpThrottlingSettingsResponseContent.java deleted file mode 100644 index 115a9ef00..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateSuspiciousIpThrottlingSettingsResponseContent.java +++ /dev/null @@ -1,186 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateSuspiciousIpThrottlingSettingsResponseContent.Builder.class) -public final class UpdateSuspiciousIpThrottlingSettingsResponseContent { - private final Optional enabled; - - private final Optional> shields; - - private final Optional> allowlist; - - private final Optional stage; - - private final Map additionalProperties; - - private UpdateSuspiciousIpThrottlingSettingsResponseContent( - Optional enabled, - Optional> shields, - Optional> allowlist, - Optional stage, - Map additionalProperties) { - this.enabled = enabled; - this.shields = shields; - this.allowlist = allowlist; - this.stage = stage; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether or not suspicious IP throttling attack protections are active. - */ - @JsonProperty("enabled") - public Optional getEnabled() { - return enabled; - } - - /** - * @return Action to take when a suspicious IP throttling threshold is violated. - * Possible values: <code>block</code>, <code>admin_notification</code>. - */ - @JsonProperty("shields") - public Optional> getShields() { - return shields; - } - - @JsonProperty("allowlist") - public Optional> getAllowlist() { - return allowlist; - } - - @JsonProperty("stage") - public Optional getStage() { - return stage; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateSuspiciousIpThrottlingSettingsResponseContent - && equalTo((UpdateSuspiciousIpThrottlingSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateSuspiciousIpThrottlingSettingsResponseContent other) { - return enabled.equals(other.enabled) - && shields.equals(other.shields) - && allowlist.equals(other.allowlist) - && stage.equals(other.stage); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.enabled, this.shields, this.allowlist, this.stage); - } - - @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 enabled = Optional.empty(); - - private Optional> shields = Optional.empty(); - - private Optional> allowlist = Optional.empty(); - - private Optional stage = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateSuspiciousIpThrottlingSettingsResponseContent other) { - enabled(other.getEnabled()); - shields(other.getShields()); - allowlist(other.getAllowlist()); - stage(other.getStage()); - return this; - } - - /** - *

Whether or not suspicious IP throttling attack protections are active.

- */ - @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; - } - - /** - *

Action to take when a suspicious IP throttling threshold is violated. - * Possible values: <code>block</code>, <code>admin_notification</code>.

- */ - @JsonSetter(value = "shields", nulls = Nulls.SKIP) - public Builder shields(Optional> shields) { - this.shields = shields; - return this; - } - - public Builder shields(List shields) { - this.shields = Optional.ofNullable(shields); - return this; - } - - @JsonSetter(value = "allowlist", nulls = Nulls.SKIP) - public Builder allowlist(Optional> allowlist) { - this.allowlist = allowlist; - return this; - } - - public Builder allowlist(List allowlist) { - this.allowlist = Optional.ofNullable(allowlist); - return this; - } - - @JsonSetter(value = "stage", nulls = Nulls.SKIP) - public Builder stage(Optional stage) { - this.stage = stage; - return this; - } - - public Builder stage(SuspiciousIpThrottlingStage stage) { - this.stage = Optional.ofNullable(stage); - return this; - } - - public UpdateSuspiciousIpThrottlingSettingsResponseContent build() { - return new UpdateSuspiciousIpThrottlingSettingsResponseContent( - enabled, shields, allowlist, stage, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateTenantSettingsResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateTenantSettingsResponseContent.java deleted file mode 100644 index 834480b11..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateTenantSettingsResponseContent.java +++ /dev/null @@ -1,1455 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateTenantSettingsResponseContent.Builder.class) -public final class UpdateTenantSettingsResponseContent { - private final OptionalNullable changePassword; - - private final OptionalNullable guardianMfaPage; - - private final Optional defaultAudience; - - private final Optional defaultDirectory; - - private final OptionalNullable errorPage; - - private final OptionalNullable deviceFlow; - - private final OptionalNullable defaultTokenQuota; - - private final Optional flags; - - private final Optional friendlyName; - - private final Optional pictureUrl; - - private final Optional supportEmail; - - private final Optional supportUrl; - - private final Optional> allowedLogoutUrls; - - private final Optional sessionLifetime; - - private final Optional idleSessionLifetime; - - private final Optional ephemeralSessionLifetime; - - private final Optional idleEphemeralSessionLifetime; - - private final Optional sandboxVersion; - - private final Optional legacySandboxVersion; - - private final Optional> sandboxVersionsAvailable; - - private final Optional defaultRedirectionUri; - - private final Optional> enabledLocales; - - private final OptionalNullable sessionCookie; - - private final OptionalNullable sessions; - - private final Optional oidcLogout; - - private final Optional allowOrganizationNameInAuthenticationApi; - - private final Optional customizeMfaInPostloginAction; - - private final Optional> acrValuesSupported; - - private final OptionalNullable mtls; - - private final Optional pushedAuthorizationRequestsSupported; - - private final OptionalNullable authorizationResponseIssParameterSupported; - - private final OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt; - - private final Optional resourceParameterProfile; - - private final Optional phoneConsolidatedExperience; - - private final Optional enableAiGuide; - - private final Map additionalProperties; - - private UpdateTenantSettingsResponseContent( - OptionalNullable changePassword, - OptionalNullable guardianMfaPage, - Optional defaultAudience, - Optional defaultDirectory, - OptionalNullable errorPage, - OptionalNullable deviceFlow, - OptionalNullable defaultTokenQuota, - Optional flags, - Optional friendlyName, - Optional pictureUrl, - Optional supportEmail, - Optional supportUrl, - Optional> allowedLogoutUrls, - Optional sessionLifetime, - Optional idleSessionLifetime, - Optional ephemeralSessionLifetime, - Optional idleEphemeralSessionLifetime, - Optional sandboxVersion, - Optional legacySandboxVersion, - Optional> sandboxVersionsAvailable, - Optional defaultRedirectionUri, - Optional> enabledLocales, - OptionalNullable sessionCookie, - OptionalNullable sessions, - Optional oidcLogout, - Optional allowOrganizationNameInAuthenticationApi, - Optional customizeMfaInPostloginAction, - Optional> acrValuesSupported, - OptionalNullable mtls, - Optional pushedAuthorizationRequestsSupported, - OptionalNullable authorizationResponseIssParameterSupported, - OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt, - Optional resourceParameterProfile, - Optional phoneConsolidatedExperience, - Optional enableAiGuide, - Map additionalProperties) { - this.changePassword = changePassword; - this.guardianMfaPage = guardianMfaPage; - this.defaultAudience = defaultAudience; - this.defaultDirectory = defaultDirectory; - this.errorPage = errorPage; - this.deviceFlow = deviceFlow; - this.defaultTokenQuota = defaultTokenQuota; - this.flags = flags; - this.friendlyName = friendlyName; - this.pictureUrl = pictureUrl; - this.supportEmail = supportEmail; - this.supportUrl = supportUrl; - this.allowedLogoutUrls = allowedLogoutUrls; - this.sessionLifetime = sessionLifetime; - this.idleSessionLifetime = idleSessionLifetime; - this.ephemeralSessionLifetime = ephemeralSessionLifetime; - this.idleEphemeralSessionLifetime = idleEphemeralSessionLifetime; - this.sandboxVersion = sandboxVersion; - this.legacySandboxVersion = legacySandboxVersion; - this.sandboxVersionsAvailable = sandboxVersionsAvailable; - this.defaultRedirectionUri = defaultRedirectionUri; - this.enabledLocales = enabledLocales; - this.sessionCookie = sessionCookie; - this.sessions = sessions; - this.oidcLogout = oidcLogout; - this.allowOrganizationNameInAuthenticationApi = allowOrganizationNameInAuthenticationApi; - this.customizeMfaInPostloginAction = customizeMfaInPostloginAction; - this.acrValuesSupported = acrValuesSupported; - this.mtls = mtls; - this.pushedAuthorizationRequestsSupported = pushedAuthorizationRequestsSupported; - this.authorizationResponseIssParameterSupported = authorizationResponseIssParameterSupported; - this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; - this.resourceParameterProfile = resourceParameterProfile; - this.phoneConsolidatedExperience = phoneConsolidatedExperience; - this.enableAiGuide = enableAiGuide; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("change_password") - public OptionalNullable getChangePassword() { - if (changePassword == null) { - return OptionalNullable.absent(); - } - return changePassword; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("guardian_mfa_page") - public OptionalNullable getGuardianMfaPage() { - if (guardianMfaPage == null) { - return OptionalNullable.absent(); - } - return guardianMfaPage; - } - - /** - * @return Default audience for API authorization. - */ - @JsonProperty("default_audience") - public Optional getDefaultAudience() { - return defaultAudience; - } - - /** - * @return Name of connection used for password grants at the /tokenendpoint. The following connection types are supported: LDAP, AD, Database Connections, Passwordless, Windows Azure Active Directory, ADFS. - */ - @JsonProperty("default_directory") - public Optional getDefaultDirectory() { - return defaultDirectory; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("error_page") - public OptionalNullable getErrorPage() { - if (errorPage == null) { - return OptionalNullable.absent(); - } - return errorPage; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("device_flow") - public OptionalNullable getDeviceFlow() { - if (deviceFlow == null) { - return OptionalNullable.absent(); - } - return deviceFlow; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("default_token_quota") - public OptionalNullable getDefaultTokenQuota() { - if (defaultTokenQuota == null) { - return OptionalNullable.absent(); - } - return defaultTokenQuota; - } - - @JsonProperty("flags") - public Optional getFlags() { - return flags; - } - - /** - * @return Friendly name for this tenant. - */ - @JsonProperty("friendly_name") - public Optional getFriendlyName() { - return friendlyName; - } - - /** - * @return URL of logo to be shown for this tenant (recommended size: 150x150) - */ - @JsonProperty("picture_url") - public Optional getPictureUrl() { - return pictureUrl; - } - - /** - * @return End-user support email address. - */ - @JsonProperty("support_email") - public Optional getSupportEmail() { - return supportEmail; - } - - /** - * @return End-user support URL. - */ - @JsonProperty("support_url") - public Optional getSupportUrl() { - return supportUrl; - } - - /** - * @return URLs that are valid to redirect to after logout from Auth0. - */ - @JsonProperty("allowed_logout_urls") - public Optional> getAllowedLogoutUrls() { - return allowedLogoutUrls; - } - - /** - * @return Number of hours a session will stay valid. - */ - @JsonProperty("session_lifetime") - public Optional getSessionLifetime() { - return sessionLifetime; - } - - /** - * @return Number of hours for which a session can be inactive before the user must log in again. - */ - @JsonProperty("idle_session_lifetime") - public Optional getIdleSessionLifetime() { - return idleSessionLifetime; - } - - /** - * @return Number of hours an ephemeral (non-persistent) session will stay valid. - */ - @JsonProperty("ephemeral_session_lifetime") - public Optional getEphemeralSessionLifetime() { - return ephemeralSessionLifetime; - } - - /** - * @return Number of hours for which an ephemeral (non-persistent) session can be inactive before the user must log in again. - */ - @JsonProperty("idle_ephemeral_session_lifetime") - public Optional getIdleEphemeralSessionLifetime() { - return idleEphemeralSessionLifetime; - } - - /** - * @return Selected sandbox version for the extensibility environment. - */ - @JsonProperty("sandbox_version") - public Optional getSandboxVersion() { - return sandboxVersion; - } - - /** - * @return Selected sandbox version for rules and hooks extensibility. - */ - @JsonProperty("legacy_sandbox_version") - public Optional getLegacySandboxVersion() { - return legacySandboxVersion; - } - - /** - * @return Available sandbox versions for the extensibility environment. - */ - @JsonProperty("sandbox_versions_available") - public Optional> getSandboxVersionsAvailable() { - return sandboxVersionsAvailable; - } - - /** - * @return The default absolute redirection uri, must be https - */ - @JsonProperty("default_redirection_uri") - public Optional getDefaultRedirectionUri() { - return defaultRedirectionUri; - } - - /** - * @return Supported locales for the user interface. - */ - @JsonProperty("enabled_locales") - public Optional> getEnabledLocales() { - return enabledLocales; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_cookie") - public OptionalNullable getSessionCookie() { - if (sessionCookie == null) { - return OptionalNullable.absent(); - } - return sessionCookie; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sessions") - public OptionalNullable getSessions() { - if (sessions == null) { - return OptionalNullable.absent(); - } - return sessions; - } - - @JsonProperty("oidc_logout") - public Optional getOidcLogout() { - return oidcLogout; - } - - /** - * @return Whether to accept an organization name instead of an ID on auth endpoints - */ - @JsonProperty("allow_organization_name_in_authentication_api") - public Optional getAllowOrganizationNameInAuthenticationApi() { - return allowOrganizationNameInAuthenticationApi; - } - - /** - * @return Whether to enable flexible factors for MFA in the PostLogin action - */ - @JsonProperty("customize_mfa_in_postlogin_action") - public Optional getCustomizeMfaInPostloginAction() { - return customizeMfaInPostloginAction; - } - - /** - * @return Supported ACR values - */ - @JsonProperty("acr_values_supported") - public Optional> getAcrValuesSupported() { - return acrValuesSupported; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("mtls") - public OptionalNullable getMtls() { - if (mtls == null) { - return OptionalNullable.absent(); - } - return mtls; - } - - /** - * @return Enables the use of Pushed Authorization Requests - */ - @JsonProperty("pushed_authorization_requests_supported") - public Optional getPushedAuthorizationRequestsSupported() { - return pushedAuthorizationRequestsSupported; - } - - /** - * @return Supports iss parameter in authorization responses - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("authorization_response_iss_parameter_supported") - public OptionalNullable getAuthorizationResponseIssParameterSupported() { - if (authorizationResponseIssParameterSupported == null) { - return OptionalNullable.absent(); - } - return authorizationResponseIssParameterSupported; - } - - /** - * @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. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("skip_non_verifiable_callback_uri_confirmation_prompt") - public OptionalNullable getSkipNonVerifiableCallbackUriConfirmationPrompt() { - if (skipNonVerifiableCallbackUriConfirmationPrompt == null) { - return OptionalNullable.absent(); - } - return skipNonVerifiableCallbackUriConfirmationPrompt; - } - - @JsonProperty("resource_parameter_profile") - public Optional getResourceParameterProfile() { - return resourceParameterProfile; - } - - /** - * @return Whether Phone Consolidated Experience is enabled for this tenant. - */ - @JsonProperty("phone_consolidated_experience") - public Optional getPhoneConsolidatedExperience() { - return phoneConsolidatedExperience; - } - - /** - * @return Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant. - */ - @JsonProperty("enable_ai_guide") - public Optional getEnableAiGuide() { - return enableAiGuide; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("change_password") - private OptionalNullable _getChangePassword() { - return changePassword; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("guardian_mfa_page") - private OptionalNullable _getGuardianMfaPage() { - return guardianMfaPage; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("error_page") - private OptionalNullable _getErrorPage() { - return errorPage; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("device_flow") - private OptionalNullable _getDeviceFlow() { - return deviceFlow; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("default_token_quota") - private OptionalNullable _getDefaultTokenQuota() { - return defaultTokenQuota; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("session_cookie") - private OptionalNullable _getSessionCookie() { - return sessionCookie; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sessions") - private OptionalNullable _getSessions() { - return sessions; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("mtls") - private OptionalNullable _getMtls() { - return mtls; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("authorization_response_iss_parameter_supported") - private OptionalNullable _getAuthorizationResponseIssParameterSupported() { - return authorizationResponseIssParameterSupported; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("skip_non_verifiable_callback_uri_confirmation_prompt") - private OptionalNullable _getSkipNonVerifiableCallbackUriConfirmationPrompt() { - return skipNonVerifiableCallbackUriConfirmationPrompt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateTenantSettingsResponseContent - && equalTo((UpdateTenantSettingsResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateTenantSettingsResponseContent other) { - return changePassword.equals(other.changePassword) - && guardianMfaPage.equals(other.guardianMfaPage) - && defaultAudience.equals(other.defaultAudience) - && defaultDirectory.equals(other.defaultDirectory) - && errorPage.equals(other.errorPage) - && deviceFlow.equals(other.deviceFlow) - && defaultTokenQuota.equals(other.defaultTokenQuota) - && flags.equals(other.flags) - && friendlyName.equals(other.friendlyName) - && pictureUrl.equals(other.pictureUrl) - && supportEmail.equals(other.supportEmail) - && supportUrl.equals(other.supportUrl) - && allowedLogoutUrls.equals(other.allowedLogoutUrls) - && sessionLifetime.equals(other.sessionLifetime) - && idleSessionLifetime.equals(other.idleSessionLifetime) - && ephemeralSessionLifetime.equals(other.ephemeralSessionLifetime) - && idleEphemeralSessionLifetime.equals(other.idleEphemeralSessionLifetime) - && sandboxVersion.equals(other.sandboxVersion) - && legacySandboxVersion.equals(other.legacySandboxVersion) - && sandboxVersionsAvailable.equals(other.sandboxVersionsAvailable) - && defaultRedirectionUri.equals(other.defaultRedirectionUri) - && enabledLocales.equals(other.enabledLocales) - && sessionCookie.equals(other.sessionCookie) - && sessions.equals(other.sessions) - && oidcLogout.equals(other.oidcLogout) - && allowOrganizationNameInAuthenticationApi.equals(other.allowOrganizationNameInAuthenticationApi) - && customizeMfaInPostloginAction.equals(other.customizeMfaInPostloginAction) - && acrValuesSupported.equals(other.acrValuesSupported) - && mtls.equals(other.mtls) - && pushedAuthorizationRequestsSupported.equals(other.pushedAuthorizationRequestsSupported) - && authorizationResponseIssParameterSupported.equals(other.authorizationResponseIssParameterSupported) - && skipNonVerifiableCallbackUriConfirmationPrompt.equals( - other.skipNonVerifiableCallbackUriConfirmationPrompt) - && resourceParameterProfile.equals(other.resourceParameterProfile) - && phoneConsolidatedExperience.equals(other.phoneConsolidatedExperience) - && enableAiGuide.equals(other.enableAiGuide); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.changePassword, - this.guardianMfaPage, - this.defaultAudience, - this.defaultDirectory, - this.errorPage, - this.deviceFlow, - this.defaultTokenQuota, - this.flags, - this.friendlyName, - this.pictureUrl, - this.supportEmail, - this.supportUrl, - this.allowedLogoutUrls, - this.sessionLifetime, - this.idleSessionLifetime, - this.ephemeralSessionLifetime, - this.idleEphemeralSessionLifetime, - this.sandboxVersion, - this.legacySandboxVersion, - this.sandboxVersionsAvailable, - this.defaultRedirectionUri, - this.enabledLocales, - this.sessionCookie, - this.sessions, - this.oidcLogout, - this.allowOrganizationNameInAuthenticationApi, - this.customizeMfaInPostloginAction, - this.acrValuesSupported, - this.mtls, - this.pushedAuthorizationRequestsSupported, - this.authorizationResponseIssParameterSupported, - this.skipNonVerifiableCallbackUriConfirmationPrompt, - this.resourceParameterProfile, - this.phoneConsolidatedExperience, - this.enableAiGuide); - } - - @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 changePassword = OptionalNullable.absent(); - - private OptionalNullable guardianMfaPage = OptionalNullable.absent(); - - private Optional defaultAudience = Optional.empty(); - - private Optional defaultDirectory = Optional.empty(); - - private OptionalNullable errorPage = OptionalNullable.absent(); - - private OptionalNullable deviceFlow = OptionalNullable.absent(); - - private OptionalNullable defaultTokenQuota = OptionalNullable.absent(); - - private Optional flags = Optional.empty(); - - private Optional friendlyName = Optional.empty(); - - private Optional pictureUrl = Optional.empty(); - - private Optional supportEmail = Optional.empty(); - - private Optional supportUrl = Optional.empty(); - - private Optional> allowedLogoutUrls = Optional.empty(); - - private Optional sessionLifetime = Optional.empty(); - - private Optional idleSessionLifetime = Optional.empty(); - - private Optional ephemeralSessionLifetime = Optional.empty(); - - private Optional idleEphemeralSessionLifetime = Optional.empty(); - - private Optional sandboxVersion = Optional.empty(); - - private Optional legacySandboxVersion = Optional.empty(); - - private Optional> sandboxVersionsAvailable = Optional.empty(); - - private Optional defaultRedirectionUri = Optional.empty(); - - private Optional> enabledLocales = Optional.empty(); - - private OptionalNullable sessionCookie = OptionalNullable.absent(); - - private OptionalNullable sessions = OptionalNullable.absent(); - - private Optional oidcLogout = Optional.empty(); - - private Optional allowOrganizationNameInAuthenticationApi = Optional.empty(); - - private Optional customizeMfaInPostloginAction = Optional.empty(); - - private Optional> acrValuesSupported = Optional.empty(); - - private OptionalNullable mtls = OptionalNullable.absent(); - - private Optional pushedAuthorizationRequestsSupported = Optional.empty(); - - private OptionalNullable authorizationResponseIssParameterSupported = OptionalNullable.absent(); - - private OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.absent(); - - private Optional resourceParameterProfile = Optional.empty(); - - private Optional phoneConsolidatedExperience = Optional.empty(); - - private Optional enableAiGuide = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateTenantSettingsResponseContent other) { - changePassword(other.getChangePassword()); - guardianMfaPage(other.getGuardianMfaPage()); - defaultAudience(other.getDefaultAudience()); - defaultDirectory(other.getDefaultDirectory()); - errorPage(other.getErrorPage()); - deviceFlow(other.getDeviceFlow()); - defaultTokenQuota(other.getDefaultTokenQuota()); - flags(other.getFlags()); - friendlyName(other.getFriendlyName()); - pictureUrl(other.getPictureUrl()); - supportEmail(other.getSupportEmail()); - supportUrl(other.getSupportUrl()); - allowedLogoutUrls(other.getAllowedLogoutUrls()); - sessionLifetime(other.getSessionLifetime()); - idleSessionLifetime(other.getIdleSessionLifetime()); - ephemeralSessionLifetime(other.getEphemeralSessionLifetime()); - idleEphemeralSessionLifetime(other.getIdleEphemeralSessionLifetime()); - sandboxVersion(other.getSandboxVersion()); - legacySandboxVersion(other.getLegacySandboxVersion()); - sandboxVersionsAvailable(other.getSandboxVersionsAvailable()); - defaultRedirectionUri(other.getDefaultRedirectionUri()); - enabledLocales(other.getEnabledLocales()); - sessionCookie(other.getSessionCookie()); - sessions(other.getSessions()); - oidcLogout(other.getOidcLogout()); - allowOrganizationNameInAuthenticationApi(other.getAllowOrganizationNameInAuthenticationApi()); - customizeMfaInPostloginAction(other.getCustomizeMfaInPostloginAction()); - acrValuesSupported(other.getAcrValuesSupported()); - mtls(other.getMtls()); - pushedAuthorizationRequestsSupported(other.getPushedAuthorizationRequestsSupported()); - authorizationResponseIssParameterSupported(other.getAuthorizationResponseIssParameterSupported()); - skipNonVerifiableCallbackUriConfirmationPrompt(other.getSkipNonVerifiableCallbackUriConfirmationPrompt()); - resourceParameterProfile(other.getResourceParameterProfile()); - phoneConsolidatedExperience(other.getPhoneConsolidatedExperience()); - enableAiGuide(other.getEnableAiGuide()); - return this; - } - - @JsonSetter(value = "change_password", nulls = Nulls.SKIP) - public Builder changePassword(@Nullable OptionalNullable changePassword) { - this.changePassword = changePassword; - return this; - } - - public Builder changePassword(TenantSettingsPasswordPage changePassword) { - this.changePassword = OptionalNullable.of(changePassword); - return this; - } - - public Builder changePassword(Optional changePassword) { - if (changePassword.isPresent()) { - this.changePassword = OptionalNullable.of(changePassword.get()); - } else { - this.changePassword = OptionalNullable.absent(); - } - return this; - } - - public Builder changePassword(com.auth0.client.mgmt.core.Nullable changePassword) { - if (changePassword.isNull()) { - this.changePassword = OptionalNullable.ofNull(); - } else if (changePassword.isEmpty()) { - this.changePassword = OptionalNullable.absent(); - } else { - this.changePassword = OptionalNullable.of(changePassword.get()); - } - return this; - } - - @JsonSetter(value = "guardian_mfa_page", nulls = Nulls.SKIP) - public Builder guardianMfaPage(@Nullable OptionalNullable guardianMfaPage) { - this.guardianMfaPage = guardianMfaPage; - return this; - } - - public Builder guardianMfaPage(TenantSettingsGuardianPage guardianMfaPage) { - this.guardianMfaPage = OptionalNullable.of(guardianMfaPage); - return this; - } - - public Builder guardianMfaPage(Optional guardianMfaPage) { - if (guardianMfaPage.isPresent()) { - this.guardianMfaPage = OptionalNullable.of(guardianMfaPage.get()); - } else { - this.guardianMfaPage = OptionalNullable.absent(); - } - return this; - } - - public Builder guardianMfaPage( - com.auth0.client.mgmt.core.Nullable guardianMfaPage) { - if (guardianMfaPage.isNull()) { - this.guardianMfaPage = OptionalNullable.ofNull(); - } else if (guardianMfaPage.isEmpty()) { - this.guardianMfaPage = OptionalNullable.absent(); - } else { - this.guardianMfaPage = OptionalNullable.of(guardianMfaPage.get()); - } - return this; - } - - /** - *

Default audience for API authorization.

- */ - @JsonSetter(value = "default_audience", nulls = Nulls.SKIP) - public Builder defaultAudience(Optional defaultAudience) { - this.defaultAudience = defaultAudience; - return this; - } - - public Builder defaultAudience(String defaultAudience) { - this.defaultAudience = Optional.ofNullable(defaultAudience); - return this; - } - - /** - *

Name of connection used for password grants at the /tokenendpoint. The following connection types are supported: LDAP, AD, Database Connections, Passwordless, Windows Azure Active Directory, ADFS.

- */ - @JsonSetter(value = "default_directory", nulls = Nulls.SKIP) - public Builder defaultDirectory(Optional defaultDirectory) { - this.defaultDirectory = defaultDirectory; - return this; - } - - public Builder defaultDirectory(String defaultDirectory) { - this.defaultDirectory = Optional.ofNullable(defaultDirectory); - return this; - } - - @JsonSetter(value = "error_page", nulls = Nulls.SKIP) - public Builder errorPage(@Nullable OptionalNullable errorPage) { - this.errorPage = errorPage; - return this; - } - - public Builder errorPage(TenantSettingsErrorPage errorPage) { - this.errorPage = OptionalNullable.of(errorPage); - return this; - } - - public Builder errorPage(Optional errorPage) { - if (errorPage.isPresent()) { - this.errorPage = OptionalNullable.of(errorPage.get()); - } else { - this.errorPage = OptionalNullable.absent(); - } - return this; - } - - public Builder errorPage(com.auth0.client.mgmt.core.Nullable errorPage) { - if (errorPage.isNull()) { - this.errorPage = OptionalNullable.ofNull(); - } else if (errorPage.isEmpty()) { - this.errorPage = OptionalNullable.absent(); - } else { - this.errorPage = OptionalNullable.of(errorPage.get()); - } - return this; - } - - @JsonSetter(value = "device_flow", nulls = Nulls.SKIP) - public Builder deviceFlow(@Nullable OptionalNullable deviceFlow) { - this.deviceFlow = deviceFlow; - return this; - } - - public Builder deviceFlow(TenantSettingsDeviceFlow deviceFlow) { - this.deviceFlow = OptionalNullable.of(deviceFlow); - return this; - } - - public Builder deviceFlow(Optional deviceFlow) { - if (deviceFlow.isPresent()) { - this.deviceFlow = OptionalNullable.of(deviceFlow.get()); - } else { - this.deviceFlow = OptionalNullable.absent(); - } - return this; - } - - public Builder deviceFlow(com.auth0.client.mgmt.core.Nullable deviceFlow) { - if (deviceFlow.isNull()) { - this.deviceFlow = OptionalNullable.ofNull(); - } else if (deviceFlow.isEmpty()) { - this.deviceFlow = OptionalNullable.absent(); - } else { - this.deviceFlow = OptionalNullable.of(deviceFlow.get()); - } - return this; - } - - @JsonSetter(value = "default_token_quota", nulls = Nulls.SKIP) - public Builder defaultTokenQuota(@Nullable OptionalNullable defaultTokenQuota) { - this.defaultTokenQuota = defaultTokenQuota; - return this; - } - - public Builder defaultTokenQuota(DefaultTokenQuota defaultTokenQuota) { - this.defaultTokenQuota = OptionalNullable.of(defaultTokenQuota); - return this; - } - - public Builder defaultTokenQuota(Optional defaultTokenQuota) { - if (defaultTokenQuota.isPresent()) { - this.defaultTokenQuota = OptionalNullable.of(defaultTokenQuota.get()); - } else { - this.defaultTokenQuota = OptionalNullable.absent(); - } - return this; - } - - public Builder defaultTokenQuota(com.auth0.client.mgmt.core.Nullable defaultTokenQuota) { - if (defaultTokenQuota.isNull()) { - this.defaultTokenQuota = OptionalNullable.ofNull(); - } else if (defaultTokenQuota.isEmpty()) { - this.defaultTokenQuota = OptionalNullable.absent(); - } else { - this.defaultTokenQuota = OptionalNullable.of(defaultTokenQuota.get()); - } - return this; - } - - @JsonSetter(value = "flags", nulls = Nulls.SKIP) - public Builder flags(Optional flags) { - this.flags = flags; - return this; - } - - public Builder flags(TenantSettingsFlags flags) { - this.flags = Optional.ofNullable(flags); - return this; - } - - /** - *

Friendly name for this tenant.

- */ - @JsonSetter(value = "friendly_name", nulls = Nulls.SKIP) - public Builder friendlyName(Optional friendlyName) { - this.friendlyName = friendlyName; - return this; - } - - public Builder friendlyName(String friendlyName) { - this.friendlyName = Optional.ofNullable(friendlyName); - return this; - } - - /** - *

URL of logo to be shown for this tenant (recommended size: 150x150)

- */ - @JsonSetter(value = "picture_url", nulls = Nulls.SKIP) - public Builder pictureUrl(Optional pictureUrl) { - this.pictureUrl = pictureUrl; - return this; - } - - public Builder pictureUrl(String pictureUrl) { - this.pictureUrl = Optional.ofNullable(pictureUrl); - return this; - } - - /** - *

End-user support email address.

- */ - @JsonSetter(value = "support_email", nulls = Nulls.SKIP) - public Builder supportEmail(Optional supportEmail) { - this.supportEmail = supportEmail; - return this; - } - - public Builder supportEmail(String supportEmail) { - this.supportEmail = Optional.ofNullable(supportEmail); - return this; - } - - /** - *

End-user support URL.

- */ - @JsonSetter(value = "support_url", nulls = Nulls.SKIP) - public Builder supportUrl(Optional supportUrl) { - this.supportUrl = supportUrl; - return this; - } - - public Builder supportUrl(String supportUrl) { - this.supportUrl = Optional.ofNullable(supportUrl); - return this; - } - - /** - *

URLs that are valid to redirect to after logout from Auth0.

- */ - @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; - } - - /** - *

Number of hours a session will stay valid.

- */ - @JsonSetter(value = "session_lifetime", nulls = Nulls.SKIP) - public Builder sessionLifetime(Optional sessionLifetime) { - this.sessionLifetime = sessionLifetime; - return this; - } - - public Builder sessionLifetime(Double sessionLifetime) { - this.sessionLifetime = Optional.ofNullable(sessionLifetime); - return this; - } - - /** - *

Number of hours for which a session can be inactive before the user must log in again.

- */ - @JsonSetter(value = "idle_session_lifetime", nulls = Nulls.SKIP) - public Builder idleSessionLifetime(Optional idleSessionLifetime) { - this.idleSessionLifetime = idleSessionLifetime; - return this; - } - - public Builder idleSessionLifetime(Double idleSessionLifetime) { - this.idleSessionLifetime = Optional.ofNullable(idleSessionLifetime); - return this; - } - - /** - *

Number of hours an ephemeral (non-persistent) session will stay valid.

- */ - @JsonSetter(value = "ephemeral_session_lifetime", nulls = Nulls.SKIP) - public Builder ephemeralSessionLifetime(Optional ephemeralSessionLifetime) { - this.ephemeralSessionLifetime = ephemeralSessionLifetime; - return this; - } - - public Builder ephemeralSessionLifetime(Double ephemeralSessionLifetime) { - this.ephemeralSessionLifetime = Optional.ofNullable(ephemeralSessionLifetime); - return this; - } - - /** - *

Number of hours for which an ephemeral (non-persistent) session can be inactive before the user must log in again.

- */ - @JsonSetter(value = "idle_ephemeral_session_lifetime", nulls = Nulls.SKIP) - public Builder idleEphemeralSessionLifetime(Optional idleEphemeralSessionLifetime) { - this.idleEphemeralSessionLifetime = idleEphemeralSessionLifetime; - return this; - } - - public Builder idleEphemeralSessionLifetime(Double idleEphemeralSessionLifetime) { - this.idleEphemeralSessionLifetime = Optional.ofNullable(idleEphemeralSessionLifetime); - return this; - } - - /** - *

Selected sandbox version for the extensibility environment.

- */ - @JsonSetter(value = "sandbox_version", nulls = Nulls.SKIP) - public Builder sandboxVersion(Optional sandboxVersion) { - this.sandboxVersion = sandboxVersion; - return this; - } - - public Builder sandboxVersion(String sandboxVersion) { - this.sandboxVersion = Optional.ofNullable(sandboxVersion); - return this; - } - - /** - *

Selected sandbox version for rules and hooks extensibility.

- */ - @JsonSetter(value = "legacy_sandbox_version", nulls = Nulls.SKIP) - public Builder legacySandboxVersion(Optional legacySandboxVersion) { - this.legacySandboxVersion = legacySandboxVersion; - return this; - } - - public Builder legacySandboxVersion(String legacySandboxVersion) { - this.legacySandboxVersion = Optional.ofNullable(legacySandboxVersion); - return this; - } - - /** - *

Available sandbox versions for the extensibility environment.

- */ - @JsonSetter(value = "sandbox_versions_available", nulls = Nulls.SKIP) - public Builder sandboxVersionsAvailable(Optional> sandboxVersionsAvailable) { - this.sandboxVersionsAvailable = sandboxVersionsAvailable; - return this; - } - - public Builder sandboxVersionsAvailable(List sandboxVersionsAvailable) { - this.sandboxVersionsAvailable = Optional.ofNullable(sandboxVersionsAvailable); - return this; - } - - /** - *

The default absolute redirection uri, must be https

- */ - @JsonSetter(value = "default_redirection_uri", nulls = Nulls.SKIP) - public Builder defaultRedirectionUri(Optional defaultRedirectionUri) { - this.defaultRedirectionUri = defaultRedirectionUri; - return this; - } - - public Builder defaultRedirectionUri(String defaultRedirectionUri) { - this.defaultRedirectionUri = Optional.ofNullable(defaultRedirectionUri); - return this; - } - - /** - *

Supported locales for the user interface.

- */ - @JsonSetter(value = "enabled_locales", nulls = Nulls.SKIP) - public Builder enabledLocales(Optional> enabledLocales) { - this.enabledLocales = enabledLocales; - return this; - } - - public Builder enabledLocales(List enabledLocales) { - this.enabledLocales = Optional.ofNullable(enabledLocales); - return this; - } - - @JsonSetter(value = "session_cookie", nulls = Nulls.SKIP) - public Builder sessionCookie(@Nullable OptionalNullable sessionCookie) { - this.sessionCookie = sessionCookie; - return this; - } - - public Builder sessionCookie(SessionCookieSchema sessionCookie) { - this.sessionCookie = OptionalNullable.of(sessionCookie); - return this; - } - - public Builder sessionCookie(Optional sessionCookie) { - if (sessionCookie.isPresent()) { - this.sessionCookie = OptionalNullable.of(sessionCookie.get()); - } else { - this.sessionCookie = OptionalNullable.absent(); - } - return this; - } - - public Builder sessionCookie(com.auth0.client.mgmt.core.Nullable sessionCookie) { - if (sessionCookie.isNull()) { - this.sessionCookie = OptionalNullable.ofNull(); - } else if (sessionCookie.isEmpty()) { - this.sessionCookie = OptionalNullable.absent(); - } else { - this.sessionCookie = OptionalNullable.of(sessionCookie.get()); - } - return this; - } - - @JsonSetter(value = "sessions", nulls = Nulls.SKIP) - public Builder sessions(@Nullable OptionalNullable sessions) { - this.sessions = sessions; - return this; - } - - public Builder sessions(TenantSettingsSessions sessions) { - this.sessions = OptionalNullable.of(sessions); - return this; - } - - public Builder sessions(Optional sessions) { - if (sessions.isPresent()) { - this.sessions = OptionalNullable.of(sessions.get()); - } else { - this.sessions = OptionalNullable.absent(); - } - return this; - } - - public Builder sessions(com.auth0.client.mgmt.core.Nullable sessions) { - if (sessions.isNull()) { - this.sessions = OptionalNullable.ofNull(); - } else if (sessions.isEmpty()) { - this.sessions = OptionalNullable.absent(); - } else { - this.sessions = OptionalNullable.of(sessions.get()); - } - return this; - } - - @JsonSetter(value = "oidc_logout", nulls = Nulls.SKIP) - public Builder oidcLogout(Optional oidcLogout) { - this.oidcLogout = oidcLogout; - return this; - } - - public Builder oidcLogout(TenantOidcLogoutSettings oidcLogout) { - this.oidcLogout = Optional.ofNullable(oidcLogout); - return this; - } - - /** - *

Whether to accept an organization name instead of an ID on auth endpoints

- */ - @JsonSetter(value = "allow_organization_name_in_authentication_api", nulls = Nulls.SKIP) - public Builder allowOrganizationNameInAuthenticationApi( - Optional allowOrganizationNameInAuthenticationApi) { - this.allowOrganizationNameInAuthenticationApi = allowOrganizationNameInAuthenticationApi; - return this; - } - - public Builder allowOrganizationNameInAuthenticationApi(Boolean allowOrganizationNameInAuthenticationApi) { - this.allowOrganizationNameInAuthenticationApi = - Optional.ofNullable(allowOrganizationNameInAuthenticationApi); - return this; - } - - /** - *

Whether to enable flexible factors for MFA in the PostLogin action

- */ - @JsonSetter(value = "customize_mfa_in_postlogin_action", nulls = Nulls.SKIP) - public Builder customizeMfaInPostloginAction(Optional customizeMfaInPostloginAction) { - this.customizeMfaInPostloginAction = customizeMfaInPostloginAction; - return this; - } - - public Builder customizeMfaInPostloginAction(Boolean customizeMfaInPostloginAction) { - this.customizeMfaInPostloginAction = Optional.ofNullable(customizeMfaInPostloginAction); - return this; - } - - /** - *

Supported ACR values

- */ - @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; - } - - @JsonSetter(value = "mtls", nulls = Nulls.SKIP) - public Builder mtls(@Nullable OptionalNullable mtls) { - this.mtls = mtls; - return this; - } - - public Builder mtls(TenantSettingsMtls mtls) { - this.mtls = OptionalNullable.of(mtls); - return this; - } - - public Builder mtls(Optional mtls) { - if (mtls.isPresent()) { - this.mtls = OptionalNullable.of(mtls.get()); - } else { - this.mtls = OptionalNullable.absent(); - } - return this; - } - - public Builder mtls(com.auth0.client.mgmt.core.Nullable mtls) { - if (mtls.isNull()) { - this.mtls = OptionalNullable.ofNull(); - } else if (mtls.isEmpty()) { - this.mtls = OptionalNullable.absent(); - } else { - this.mtls = OptionalNullable.of(mtls.get()); - } - return this; - } - - /** - *

Enables the use of Pushed Authorization Requests

- */ - @JsonSetter(value = "pushed_authorization_requests_supported", nulls = Nulls.SKIP) - public Builder pushedAuthorizationRequestsSupported(Optional pushedAuthorizationRequestsSupported) { - this.pushedAuthorizationRequestsSupported = pushedAuthorizationRequestsSupported; - return this; - } - - public Builder pushedAuthorizationRequestsSupported(Boolean pushedAuthorizationRequestsSupported) { - this.pushedAuthorizationRequestsSupported = Optional.ofNullable(pushedAuthorizationRequestsSupported); - return this; - } - - /** - *

Supports iss parameter in authorization responses

- */ - @JsonSetter(value = "authorization_response_iss_parameter_supported", nulls = Nulls.SKIP) - public Builder authorizationResponseIssParameterSupported( - @Nullable OptionalNullable authorizationResponseIssParameterSupported) { - this.authorizationResponseIssParameterSupported = authorizationResponseIssParameterSupported; - return this; - } - - public Builder authorizationResponseIssParameterSupported(Boolean authorizationResponseIssParameterSupported) { - this.authorizationResponseIssParameterSupported = - OptionalNullable.of(authorizationResponseIssParameterSupported); - return this; - } - - public Builder authorizationResponseIssParameterSupported( - Optional authorizationResponseIssParameterSupported) { - if (authorizationResponseIssParameterSupported.isPresent()) { - this.authorizationResponseIssParameterSupported = - OptionalNullable.of(authorizationResponseIssParameterSupported.get()); - } else { - this.authorizationResponseIssParameterSupported = OptionalNullable.absent(); - } - return this; - } - - public Builder authorizationResponseIssParameterSupported( - com.auth0.client.mgmt.core.Nullable authorizationResponseIssParameterSupported) { - if (authorizationResponseIssParameterSupported.isNull()) { - this.authorizationResponseIssParameterSupported = OptionalNullable.ofNull(); - } else if (authorizationResponseIssParameterSupported.isEmpty()) { - this.authorizationResponseIssParameterSupported = OptionalNullable.absent(); - } else { - this.authorizationResponseIssParameterSupported = - OptionalNullable.of(authorizationResponseIssParameterSupported.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( - @Nullable OptionalNullable skipNonVerifiableCallbackUriConfirmationPrompt) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = skipNonVerifiableCallbackUriConfirmationPrompt; - return this; - } - - public Builder skipNonVerifiableCallbackUriConfirmationPrompt( - Boolean skipNonVerifiableCallbackUriConfirmationPrompt) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = - OptionalNullable.of(skipNonVerifiableCallbackUriConfirmationPrompt); - return this; - } - - public Builder skipNonVerifiableCallbackUriConfirmationPrompt( - Optional skipNonVerifiableCallbackUriConfirmationPrompt) { - if (skipNonVerifiableCallbackUriConfirmationPrompt.isPresent()) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = - OptionalNullable.of(skipNonVerifiableCallbackUriConfirmationPrompt.get()); - } else { - this.skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.absent(); - } - return this; - } - - public Builder skipNonVerifiableCallbackUriConfirmationPrompt( - com.auth0.client.mgmt.core.Nullable skipNonVerifiableCallbackUriConfirmationPrompt) { - if (skipNonVerifiableCallbackUriConfirmationPrompt.isNull()) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.ofNull(); - } else if (skipNonVerifiableCallbackUriConfirmationPrompt.isEmpty()) { - this.skipNonVerifiableCallbackUriConfirmationPrompt = OptionalNullable.absent(); - } else { - this.skipNonVerifiableCallbackUriConfirmationPrompt = - OptionalNullable.of(skipNonVerifiableCallbackUriConfirmationPrompt.get()); - } - return this; - } - - @JsonSetter(value = "resource_parameter_profile", nulls = Nulls.SKIP) - public Builder resourceParameterProfile( - Optional resourceParameterProfile) { - this.resourceParameterProfile = resourceParameterProfile; - return this; - } - - public Builder resourceParameterProfile(TenantSettingsResourceParameterProfile resourceParameterProfile) { - this.resourceParameterProfile = Optional.ofNullable(resourceParameterProfile); - return this; - } - - /** - *

Whether Phone Consolidated Experience is enabled for this tenant.

- */ - @JsonSetter(value = "phone_consolidated_experience", nulls = Nulls.SKIP) - public Builder phoneConsolidatedExperience(Optional phoneConsolidatedExperience) { - this.phoneConsolidatedExperience = phoneConsolidatedExperience; - return this; - } - - public Builder phoneConsolidatedExperience(Boolean phoneConsolidatedExperience) { - this.phoneConsolidatedExperience = Optional.ofNullable(phoneConsolidatedExperience); - return this; - } - - /** - *

Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant.

- */ - @JsonSetter(value = "enable_ai_guide", nulls = Nulls.SKIP) - public Builder enableAiGuide(Optional enableAiGuide) { - this.enableAiGuide = enableAiGuide; - return this; - } - - public Builder enableAiGuide(Boolean enableAiGuide) { - this.enableAiGuide = Optional.ofNullable(enableAiGuide); - return this; - } - - public UpdateTenantSettingsResponseContent build() { - return new UpdateTenantSettingsResponseContent( - changePassword, - guardianMfaPage, - defaultAudience, - defaultDirectory, - errorPage, - deviceFlow, - defaultTokenQuota, - flags, - friendlyName, - pictureUrl, - supportEmail, - supportUrl, - allowedLogoutUrls, - sessionLifetime, - idleSessionLifetime, - ephemeralSessionLifetime, - idleEphemeralSessionLifetime, - sandboxVersion, - legacySandboxVersion, - sandboxVersionsAvailable, - defaultRedirectionUri, - enabledLocales, - sessionCookie, - sessions, - oidcLogout, - allowOrganizationNameInAuthenticationApi, - customizeMfaInPostloginAction, - acrValuesSupported, - mtls, - pushedAuthorizationRequestsSupported, - authorizationResponseIssParameterSupported, - skipNonVerifiableCallbackUriConfirmationPrompt, - resourceParameterProfile, - phoneConsolidatedExperience, - enableAiGuide, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateTokenExchangeProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateTokenExchangeProfileRequestContent.java deleted file mode 100644 index d4253ec21..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateTokenExchangeProfileRequestContent.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateTokenExchangeProfileRequestContent.Builder.class) -public final class UpdateTokenExchangeProfileRequestContent { - private final Optional name; - - private final Optional subjectTokenType; - - private final Map additionalProperties; - - private UpdateTokenExchangeProfileRequestContent( - Optional name, Optional subjectTokenType, Map additionalProperties) { - this.name = name; - this.subjectTokenType = subjectTokenType; - this.additionalProperties = additionalProperties; - } - - /** - * @return Friendly name of this profile. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return 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. - */ - @JsonProperty("subject_token_type") - public Optional getSubjectTokenType() { - return subjectTokenType; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateTokenExchangeProfileRequestContent - && equalTo((UpdateTokenExchangeProfileRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateTokenExchangeProfileRequestContent other) { - return name.equals(other.name) && subjectTokenType.equals(other.subjectTokenType); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.subjectTokenType); - } - - @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 subjectTokenType = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateTokenExchangeProfileRequestContent other) { - name(other.getName()); - subjectTokenType(other.getSubjectTokenType()); - return this; - } - - /** - *

Friendly name of this profile.

- */ - @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; - } - - /** - *

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.

- */ - @JsonSetter(value = "subject_token_type", nulls = Nulls.SKIP) - public Builder subjectTokenType(Optional subjectTokenType) { - this.subjectTokenType = subjectTokenType; - return this; - } - - public Builder subjectTokenType(String subjectTokenType) { - this.subjectTokenType = Optional.ofNullable(subjectTokenType); - return this; - } - - public UpdateTokenExchangeProfileRequestContent build() { - return new UpdateTokenExchangeProfileRequestContent(name, subjectTokenType, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateTokenQuota.java b/src/main/java/com/auth0/client/mgmt/types/UpdateTokenQuota.java deleted file mode 100644 index 809a005a2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateTokenQuota.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = UpdateTokenQuota.Builder.class) -public final class UpdateTokenQuota { - private final TokenQuotaClientCredentials clientCredentials; - - private final Map additionalProperties; - - private UpdateTokenQuota(TokenQuotaClientCredentials clientCredentials, Map additionalProperties) { - this.clientCredentials = clientCredentials; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("client_credentials") - public TokenQuotaClientCredentials getClientCredentials() { - return clientCredentials; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateTokenQuota && equalTo((UpdateTokenQuota) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateTokenQuota other) { - return clientCredentials.equals(other.clientCredentials); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.clientCredentials); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ClientCredentialsStage builder() { - return new Builder(); - } - - public interface ClientCredentialsStage { - _FinalStage clientCredentials(@NotNull TokenQuotaClientCredentials clientCredentials); - - Builder from(UpdateTokenQuota other); - } - - public interface _FinalStage { - UpdateTokenQuota build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ClientCredentialsStage, _FinalStage { - private TokenQuotaClientCredentials clientCredentials; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateTokenQuota other) { - clientCredentials(other.getClientCredentials()); - return this; - } - - @java.lang.Override - @JsonSetter("client_credentials") - public _FinalStage clientCredentials(@NotNull TokenQuotaClientCredentials clientCredentials) { - this.clientCredentials = Objects.requireNonNull(clientCredentials, "clientCredentials must not be null"); - return this; - } - - @java.lang.Override - public UpdateTokenQuota build() { - return new UpdateTokenQuota(clientCredentials, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateUniversalLoginTemplateRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateUniversalLoginTemplateRequestContent.java deleted file mode 100644 index eca442c22..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateUniversalLoginTemplateRequestContent.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = UpdateUniversalLoginTemplateRequestContent.Deserializer.class) -public final class UpdateUniversalLoginTemplateRequestContent { - private final Object value; - - private final int type; - - private UpdateUniversalLoginTemplateRequestContent(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((UpdateUniversalLoginTemplateRequestContentTemplate) 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 UpdateUniversalLoginTemplateRequestContent - && equalTo((UpdateUniversalLoginTemplateRequestContent) other); - } - - private boolean equalTo(UpdateUniversalLoginTemplateRequestContent 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 UpdateUniversalLoginTemplateRequestContent of(String value) { - return new UpdateUniversalLoginTemplateRequestContent(value, 0); - } - - public static UpdateUniversalLoginTemplateRequestContent of( - UpdateUniversalLoginTemplateRequestContentTemplate value) { - return new UpdateUniversalLoginTemplateRequestContent(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(UpdateUniversalLoginTemplateRequestContentTemplate value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(UpdateUniversalLoginTemplateRequestContent.class); - } - - @java.lang.Override - public UpdateUniversalLoginTemplateRequestContent deserialize(JsonParser p, DeserializationContext context) - throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, UpdateUniversalLoginTemplateRequestContentTemplate.class)); - } catch (RuntimeException e) { - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateUniversalLoginTemplateRequestContentTemplate.java b/src/main/java/com/auth0/client/mgmt/types/UpdateUniversalLoginTemplateRequestContentTemplate.java deleted file mode 100644 index 933f432d6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateUniversalLoginTemplateRequestContentTemplate.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = UpdateUniversalLoginTemplateRequestContentTemplate.Builder.class) -public final class UpdateUniversalLoginTemplateRequestContentTemplate { - private final String template; - - private final Map additionalProperties; - - private UpdateUniversalLoginTemplateRequestContentTemplate( - String template, Map additionalProperties) { - this.template = template; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("template") - public String getTemplate() { - return template; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateUniversalLoginTemplateRequestContentTemplate - && equalTo((UpdateUniversalLoginTemplateRequestContentTemplate) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateUniversalLoginTemplateRequestContentTemplate other) { - return template.equals(other.template); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.template); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TemplateStage builder() { - return new Builder(); - } - - public interface TemplateStage { - _FinalStage template(@NotNull String template); - - Builder from(UpdateUniversalLoginTemplateRequestContentTemplate other); - } - - public interface _FinalStage { - UpdateUniversalLoginTemplateRequestContentTemplate build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TemplateStage, _FinalStage { - private String template; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateUniversalLoginTemplateRequestContentTemplate other) { - template(other.getTemplate()); - return this; - } - - @java.lang.Override - @JsonSetter("template") - public _FinalStage template(@NotNull String template) { - this.template = Objects.requireNonNull(template, "template must not be null"); - return this; - } - - @java.lang.Override - public UpdateUniversalLoginTemplateRequestContentTemplate build() { - return new UpdateUniversalLoginTemplateRequestContentTemplate(template, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateUserAttributeProfileRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateUserAttributeProfileRequestContent.java deleted file mode 100644 index 8e07b36ca..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateUserAttributeProfileRequestContent.java +++ /dev/null @@ -1,171 +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.Nullable; -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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateUserAttributeProfileRequestContent.Builder.class) -public final class UpdateUserAttributeProfileRequestContent { - private final Optional name; - - private final OptionalNullable userId; - - private final Optional> userAttributes; - - private final Map additionalProperties; - - private UpdateUserAttributeProfileRequestContent( - Optional name, - OptionalNullable userId, - Optional> userAttributes, - Map additionalProperties) { - this.name = name; - this.userId = userId; - this.userAttributes = userAttributes; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("user_id") - public OptionalNullable getUserId() { - return userId; - } - - @JsonProperty("user_attributes") - public Optional> getUserAttributes() { - return userAttributes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateUserAttributeProfileRequestContent - && equalTo((UpdateUserAttributeProfileRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateUserAttributeProfileRequestContent other) { - return name.equals(other.name) && userId.equals(other.userId) && userAttributes.equals(other.userAttributes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.userId, this.userAttributes); - } - - @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 userId = OptionalNullable.absent(); - - private Optional> userAttributes = - Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateUserAttributeProfileRequestContent other) { - name(other.getName()); - userId(other.getUserId()); - userAttributes(other.getUserAttributes()); - 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 = "user_id", nulls = Nulls.SKIP) - public Builder userId(OptionalNullable userId) { - this.userId = userId; - return this; - } - - public Builder userId(UserAttributeProfileUserId userId) { - this.userId = OptionalNullable.of(userId); - return this; - } - - public Builder userId(Optional userId) { - if (userId.isPresent()) { - this.userId = OptionalNullable.of(userId.get()); - } else { - this.userId = OptionalNullable.absent(); - } - return this; - } - - public Builder userId(Nullable userId) { - if (userId.isNull()) { - this.userId = OptionalNullable.ofNull(); - } else if (userId.isEmpty()) { - this.userId = OptionalNullable.absent(); - } else { - this.userId = OptionalNullable.of(userId.get()); - } - return this; - } - - @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) - public Builder userAttributes( - Optional> userAttributes) { - this.userAttributes = userAttributes; - return this; - } - - public Builder userAttributes( - Map userAttributes) { - this.userAttributes = Optional.ofNullable(userAttributes); - return this; - } - - public UpdateUserAttributeProfileRequestContent build() { - return new UpdateUserAttributeProfileRequestContent(name, userId, userAttributes, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateUserAttributeProfileResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateUserAttributeProfileResponseContent.java deleted file mode 100644 index 5ec1be962..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateUserAttributeProfileResponseContent.java +++ /dev/null @@ -1,174 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateUserAttributeProfileResponseContent.Builder.class) -public final class UpdateUserAttributeProfileResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional userId; - - private final Optional> userAttributes; - - private final Map additionalProperties; - - private UpdateUserAttributeProfileResponseContent( - Optional id, - Optional name, - Optional userId, - Optional> userAttributes, - Map additionalProperties) { - this.id = id; - this.name = name; - this.userId = userId; - this.userAttributes = userAttributes; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - @JsonProperty("user_attributes") - public Optional> getUserAttributes() { - return userAttributes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateUserAttributeProfileResponseContent - && equalTo((UpdateUserAttributeProfileResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateUserAttributeProfileResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && userId.equals(other.userId) - && userAttributes.equals(other.userAttributes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.userId, this.userAttributes); - } - - @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 userId = Optional.empty(); - - private Optional> userAttributes = - Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateUserAttributeProfileResponseContent other) { - id(other.getId()); - name(other.getName()); - userId(other.getUserId()); - userAttributes(other.getUserAttributes()); - 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 = "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 = "user_id", nulls = Nulls.SKIP) - public Builder userId(Optional userId) { - this.userId = userId; - return this; - } - - public Builder userId(UserAttributeProfileUserId userId) { - this.userId = Optional.ofNullable(userId); - return this; - } - - @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) - public Builder userAttributes( - Optional> userAttributes) { - this.userAttributes = userAttributes; - return this; - } - - public Builder userAttributes( - Map userAttributes) { - this.userAttributes = Optional.ofNullable(userAttributes); - return this; - } - - public UpdateUserAttributeProfileResponseContent build() { - return new UpdateUserAttributeProfileResponseContent( - id, name, userId, userAttributes, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateUserAuthenticationMethodResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateUserAuthenticationMethodResponseContent.java deleted file mode 100644 index ef05c7954..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateUserAuthenticationMethodResponseContent.java +++ /dev/null @@ -1,630 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = UpdateUserAuthenticationMethodResponseContent.Builder.class) -public final class UpdateUserAuthenticationMethodResponseContent { - private final Optional id; - - private final CreatedAuthenticationMethodTypeEnum type; - - private final Optional name; - - private final Optional totpSecret; - - private final Optional phoneNumber; - - private final Optional email; - - private final Optional> authenticationMethods; - - private final Optional preferredAuthenticationMethod; - - private final Optional keyId; - - private final Optional publicKey; - - private final Optional aaguid; - - private final Optional relyingPartyIdentifier; - - private final Optional createdAt; - - private final Map additionalProperties; - - private UpdateUserAuthenticationMethodResponseContent( - Optional id, - CreatedAuthenticationMethodTypeEnum type, - Optional name, - Optional totpSecret, - Optional phoneNumber, - Optional email, - Optional> authenticationMethods, - Optional preferredAuthenticationMethod, - Optional keyId, - Optional publicKey, - Optional aaguid, - Optional relyingPartyIdentifier, - Optional createdAt, - Map additionalProperties) { - this.id = id; - this.type = type; - this.name = name; - this.totpSecret = totpSecret; - this.phoneNumber = phoneNumber; - this.email = email; - this.authenticationMethods = authenticationMethods; - this.preferredAuthenticationMethod = preferredAuthenticationMethod; - this.keyId = keyId; - this.publicKey = publicKey; - this.aaguid = aaguid; - this.relyingPartyIdentifier = relyingPartyIdentifier; - this.createdAt = createdAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The ID of the newly created authentication method (automatically generated by the application) - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("type") - public CreatedAuthenticationMethodTypeEnum getType() { - return type; - } - - /** - * @return A human-readable label to identify the authentication method. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Base32 encoded secret for TOTP generation - */ - @JsonProperty("totp_secret") - public Optional getTotpSecret() { - return totpSecret; - } - - /** - * @return Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice. - */ - @JsonProperty("phone_number") - public Optional getPhoneNumber() { - return phoneNumber; - } - - /** - * @return Applies to email authentication methods only. The email address used to send verification messages. - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - @JsonProperty("authentication_methods") - public Optional> getAuthenticationMethods() { - return authenticationMethods; - } - - @JsonProperty("preferred_authentication_method") - public Optional getPreferredAuthenticationMethod() { - return preferredAuthenticationMethod; - } - - /** - * @return Applies to webauthn authentication methods only. The id of the credential. - */ - @JsonProperty("key_id") - public Optional getKeyId() { - return keyId; - } - - /** - * @return Applies to webauthn authentication methods only. The public key. - */ - @JsonProperty("public_key") - public Optional getPublicKey() { - return publicKey; - } - - /** - * @return Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier. - */ - @JsonProperty("aaguid") - public Optional getAaguid() { - return aaguid; - } - - /** - * @return Applies to webauthn authentication methods only. The relying party identifier. - */ - @JsonProperty("relying_party_identifier") - public Optional getRelyingPartyIdentifier() { - return relyingPartyIdentifier; - } - - /** - * @return Authentication method creation date - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateUserAuthenticationMethodResponseContent - && equalTo((UpdateUserAuthenticationMethodResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateUserAuthenticationMethodResponseContent other) { - return id.equals(other.id) - && type.equals(other.type) - && name.equals(other.name) - && totpSecret.equals(other.totpSecret) - && phoneNumber.equals(other.phoneNumber) - && email.equals(other.email) - && authenticationMethods.equals(other.authenticationMethods) - && preferredAuthenticationMethod.equals(other.preferredAuthenticationMethod) - && keyId.equals(other.keyId) - && publicKey.equals(other.publicKey) - && aaguid.equals(other.aaguid) - && relyingPartyIdentifier.equals(other.relyingPartyIdentifier) - && createdAt.equals(other.createdAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.type, - this.name, - this.totpSecret, - this.phoneNumber, - this.email, - this.authenticationMethods, - this.preferredAuthenticationMethod, - this.keyId, - this.publicKey, - this.aaguid, - this.relyingPartyIdentifier, - this.createdAt); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - _FinalStage type(@NotNull CreatedAuthenticationMethodTypeEnum type); - - Builder from(UpdateUserAuthenticationMethodResponseContent other); - } - - public interface _FinalStage { - UpdateUserAuthenticationMethodResponseContent build(); - - /** - *

The ID of the newly created authentication method (automatically generated by the application)

- */ - _FinalStage id(Optional id); - - _FinalStage id(String id); - - /** - *

A human-readable label to identify the authentication method.

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

Base32 encoded secret for TOTP generation

- */ - _FinalStage totpSecret(Optional totpSecret); - - _FinalStage totpSecret(String totpSecret); - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- */ - _FinalStage phoneNumber(Optional phoneNumber); - - _FinalStage phoneNumber(String phoneNumber); - - /** - *

Applies to email authentication methods only. The email address used to send verification messages.

- */ - _FinalStage email(Optional email); - - _FinalStage email(String email); - - _FinalStage authenticationMethods(Optional> authenticationMethods); - - _FinalStage authenticationMethods(List authenticationMethods); - - _FinalStage preferredAuthenticationMethod( - Optional preferredAuthenticationMethod); - - _FinalStage preferredAuthenticationMethod(PreferredAuthenticationMethodEnum preferredAuthenticationMethod); - - /** - *

Applies to webauthn authentication methods only. The id of the credential.

- */ - _FinalStage keyId(Optional keyId); - - _FinalStage keyId(String keyId); - - /** - *

Applies to webauthn authentication methods only. The public key.

- */ - _FinalStage publicKey(Optional publicKey); - - _FinalStage publicKey(String publicKey); - - /** - *

Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier.

- */ - _FinalStage aaguid(Optional aaguid); - - _FinalStage aaguid(String aaguid); - - /** - *

Applies to webauthn authentication methods only. The relying party identifier.

- */ - _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier); - - _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier); - - /** - *

Authentication method creation date

- */ - _FinalStage createdAt(Optional createdAt); - - _FinalStage createdAt(OffsetDateTime createdAt); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, _FinalStage { - private CreatedAuthenticationMethodTypeEnum type; - - private Optional createdAt = Optional.empty(); - - private Optional relyingPartyIdentifier = Optional.empty(); - - private Optional aaguid = Optional.empty(); - - private Optional publicKey = Optional.empty(); - - private Optional keyId = Optional.empty(); - - private Optional preferredAuthenticationMethod = Optional.empty(); - - private Optional> authenticationMethods = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional phoneNumber = Optional.empty(); - - private Optional totpSecret = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional id = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UpdateUserAuthenticationMethodResponseContent other) { - id(other.getId()); - type(other.getType()); - name(other.getName()); - totpSecret(other.getTotpSecret()); - phoneNumber(other.getPhoneNumber()); - email(other.getEmail()); - authenticationMethods(other.getAuthenticationMethods()); - preferredAuthenticationMethod(other.getPreferredAuthenticationMethod()); - keyId(other.getKeyId()); - publicKey(other.getPublicKey()); - aaguid(other.getAaguid()); - relyingPartyIdentifier(other.getRelyingPartyIdentifier()); - createdAt(other.getCreatedAt()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull CreatedAuthenticationMethodTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

Authentication method creation date

- * @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; - } - - /** - *

Authentication method creation date

- */ - @java.lang.Override - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public _FinalStage createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - *

Applies to webauthn authentication methods only. The relying party identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier) { - this.relyingPartyIdentifier = Optional.ofNullable(relyingPartyIdentifier); - return this; - } - - /** - *

Applies to webauthn authentication methods only. The relying party identifier.

- */ - @java.lang.Override - @JsonSetter(value = "relying_party_identifier", nulls = Nulls.SKIP) - public _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier) { - this.relyingPartyIdentifier = relyingPartyIdentifier; - return this; - } - - /** - *

Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage aaguid(String aaguid) { - this.aaguid = Optional.ofNullable(aaguid); - return this; - } - - /** - *

Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier.

- */ - @java.lang.Override - @JsonSetter(value = "aaguid", nulls = Nulls.SKIP) - public _FinalStage aaguid(Optional aaguid) { - this.aaguid = aaguid; - return this; - } - - /** - *

Applies to webauthn authentication methods only. The public key.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage publicKey(String publicKey) { - this.publicKey = Optional.ofNullable(publicKey); - return this; - } - - /** - *

Applies to webauthn authentication methods only. The public key.

- */ - @java.lang.Override - @JsonSetter(value = "public_key", nulls = Nulls.SKIP) - public _FinalStage publicKey(Optional publicKey) { - this.publicKey = publicKey; - return this; - } - - /** - *

Applies to webauthn authentication methods only. The id of the credential.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage keyId(String keyId) { - this.keyId = Optional.ofNullable(keyId); - return this; - } - - /** - *

Applies to webauthn authentication methods only. The id of the credential.

- */ - @java.lang.Override - @JsonSetter(value = "key_id", nulls = Nulls.SKIP) - public _FinalStage keyId(Optional keyId) { - this.keyId = keyId; - return this; - } - - @java.lang.Override - public _FinalStage preferredAuthenticationMethod( - PreferredAuthenticationMethodEnum preferredAuthenticationMethod) { - this.preferredAuthenticationMethod = Optional.ofNullable(preferredAuthenticationMethod); - return this; - } - - @java.lang.Override - @JsonSetter(value = "preferred_authentication_method", nulls = Nulls.SKIP) - public _FinalStage preferredAuthenticationMethod( - Optional preferredAuthenticationMethod) { - this.preferredAuthenticationMethod = preferredAuthenticationMethod; - return this; - } - - @java.lang.Override - public _FinalStage authenticationMethods(List authenticationMethods) { - this.authenticationMethods = Optional.ofNullable(authenticationMethods); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication_methods", nulls = Nulls.SKIP) - public _FinalStage authenticationMethods( - Optional> authenticationMethods) { - this.authenticationMethods = authenticationMethods; - return this; - } - - /** - *

Applies to email authentication methods only. The email address used to send verification messages.

- * @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; - } - - /** - *

Applies to email authentication methods only. The email address used to send verification messages.

- */ - @java.lang.Override - @JsonSetter(value = "email", nulls = Nulls.SKIP) - public _FinalStage email(Optional email) { - this.email = email; - return this; - } - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- * @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; - } - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- */ - @java.lang.Override - @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) - public _FinalStage phoneNumber(Optional phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - *

Base32 encoded secret for TOTP generation

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage totpSecret(String totpSecret) { - this.totpSecret = Optional.ofNullable(totpSecret); - return this; - } - - /** - *

Base32 encoded secret for TOTP generation

- */ - @java.lang.Override - @JsonSetter(value = "totp_secret", nulls = Nulls.SKIP) - public _FinalStage totpSecret(Optional totpSecret) { - this.totpSecret = totpSecret; - return this; - } - - /** - *

A human-readable label to identify the authentication method.

- * @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; - } - - /** - *

A human-readable label to identify the authentication method.

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - /** - *

The ID of the newly created authentication method (automatically generated by the application)

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage id(String id) { - this.id = Optional.ofNullable(id); - return this; - } - - /** - *

The ID of the newly created authentication method (automatically generated by the application)

- */ - @java.lang.Override - @JsonSetter(value = "id", nulls = Nulls.SKIP) - public _FinalStage id(Optional id) { - this.id = id; - return this; - } - - @java.lang.Override - public UpdateUserAuthenticationMethodResponseContent build() { - return new UpdateUserAuthenticationMethodResponseContent( - id, - type, - name, - totpSecret, - phoneNumber, - email, - authenticationMethods, - preferredAuthenticationMethod, - keyId, - publicKey, - aaguid, - relyingPartyIdentifier, - createdAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateUserRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateUserRequestContent.java deleted file mode 100644 index c6a627803..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateUserRequestContent.java +++ /dev/null @@ -1,911 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.jetbrains.annotations.Nullable; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UpdateUserRequestContent.Builder.class) -public final class UpdateUserRequestContent { - private final Optional blocked; - - private final Optional emailVerified; - - private final OptionalNullable email; - - private final OptionalNullable phoneNumber; - - private final Optional phoneVerified; - - private final Optional> userMetadata; - - private final Optional> appMetadata; - - private final OptionalNullable givenName; - - private final OptionalNullable familyName; - - private final OptionalNullable name; - - private final OptionalNullable nickname; - - private final OptionalNullable picture; - - private final Optional verifyEmail; - - private final Optional verifyPhoneNumber; - - private final OptionalNullable password; - - private final Optional connection; - - private final Optional clientId; - - private final OptionalNullable username; - - private final Map additionalProperties; - - private UpdateUserRequestContent( - Optional blocked, - Optional emailVerified, - OptionalNullable email, - OptionalNullable phoneNumber, - Optional phoneVerified, - Optional> userMetadata, - Optional> appMetadata, - OptionalNullable givenName, - OptionalNullable familyName, - OptionalNullable name, - OptionalNullable nickname, - OptionalNullable picture, - Optional verifyEmail, - Optional verifyPhoneNumber, - OptionalNullable password, - Optional connection, - Optional clientId, - OptionalNullable username, - Map additionalProperties) { - this.blocked = blocked; - this.emailVerified = emailVerified; - this.email = email; - this.phoneNumber = phoneNumber; - this.phoneVerified = phoneVerified; - this.userMetadata = userMetadata; - this.appMetadata = appMetadata; - this.givenName = givenName; - this.familyName = familyName; - this.name = name; - this.nickname = nickname; - this.picture = picture; - this.verifyEmail = verifyEmail; - this.verifyPhoneNumber = verifyPhoneNumber; - this.password = password; - this.connection = connection; - this.clientId = clientId; - this.username = username; - this.additionalProperties = additionalProperties; - } - - /** - * @return Whether this user was blocked by an administrator (true) or not (false). - */ - @JsonProperty("blocked") - public Optional getBlocked() { - return blocked; - } - - /** - * @return Whether this email address is verified (true) or unverified (false). If set to false the user will not receive a verification email unless verify_email is set to true. - */ - @JsonProperty("email_verified") - public Optional getEmailVerified() { - return emailVerified; - } - - /** - * @return Email address of this user. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("email") - public OptionalNullable getEmail() { - if (email == null) { - return OptionalNullable.absent(); - } - return email; - } - - /** - * @return The user's phone number (following the E.164 recommendation). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("phone_number") - public OptionalNullable getPhoneNumber() { - if (phoneNumber == null) { - return OptionalNullable.absent(); - } - return phoneNumber; - } - - /** - * @return Whether this phone number has been verified (true) or not (false). - */ - @JsonProperty("phone_verified") - public Optional getPhoneVerified() { - return phoneVerified; - } - - @JsonProperty("user_metadata") - public Optional> getUserMetadata() { - return userMetadata; - } - - @JsonProperty("app_metadata") - public Optional> getAppMetadata() { - return appMetadata; - } - - /** - * @return Given name/first name/forename of this user. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("given_name") - public OptionalNullable getGivenName() { - if (givenName == null) { - return OptionalNullable.absent(); - } - return givenName; - } - - /** - * @return Family name/last name/surname of this user. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("family_name") - public OptionalNullable getFamilyName() { - if (familyName == null) { - return OptionalNullable.absent(); - } - return familyName; - } - - /** - * @return Name of this user. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("name") - public OptionalNullable getName() { - if (name == null) { - return OptionalNullable.absent(); - } - return name; - } - - /** - * @return Preferred nickname or alias of this user. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("nickname") - public OptionalNullable getNickname() { - if (nickname == null) { - return OptionalNullable.absent(); - } - return nickname; - } - - /** - * @return URL to picture, photo, or avatar of this user. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("picture") - public OptionalNullable getPicture() { - if (picture == null) { - return OptionalNullable.absent(); - } - return picture; - } - - /** - * @return Whether this user will receive a verification email after creation (true) or no email (false). Overrides behavior of email_verified parameter. - */ - @JsonProperty("verify_email") - public Optional getVerifyEmail() { - return verifyEmail; - } - - /** - * @return Whether this user will receive a text after changing the phone number (true) or no text (false). Only valid when changing phone number for SMS connections. - */ - @JsonProperty("verify_phone_number") - public Optional getVerifyPhoneNumber() { - return verifyPhoneNumber; - } - - /** - * @return New password for this user. Only valid for database connections. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password") - public OptionalNullable getPassword() { - if (password == null) { - return OptionalNullable.absent(); - } - return password; - } - - /** - * @return Name of the connection to target for this user update. - */ - @JsonProperty("connection") - public Optional getConnection() { - return connection; - } - - /** - * @return Auth0 client ID. Only valid when updating email address. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @return The user's username. Only valid if the connection requires a username. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("username") - public OptionalNullable getUsername() { - if (username == null) { - return OptionalNullable.absent(); - } - return username; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("email") - private OptionalNullable _getEmail() { - return email; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("phone_number") - private OptionalNullable _getPhoneNumber() { - return phoneNumber; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("given_name") - private OptionalNullable _getGivenName() { - return givenName; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("family_name") - private OptionalNullable _getFamilyName() { - return familyName; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("name") - private OptionalNullable _getName() { - return name; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("nickname") - private OptionalNullable _getNickname() { - return nickname; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("picture") - private OptionalNullable _getPicture() { - return picture; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("password") - private OptionalNullable _getPassword() { - return password; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("username") - private OptionalNullable _getUsername() { - return username; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateUserRequestContent && equalTo((UpdateUserRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateUserRequestContent other) { - return blocked.equals(other.blocked) - && emailVerified.equals(other.emailVerified) - && email.equals(other.email) - && phoneNumber.equals(other.phoneNumber) - && phoneVerified.equals(other.phoneVerified) - && userMetadata.equals(other.userMetadata) - && appMetadata.equals(other.appMetadata) - && givenName.equals(other.givenName) - && familyName.equals(other.familyName) - && name.equals(other.name) - && nickname.equals(other.nickname) - && picture.equals(other.picture) - && verifyEmail.equals(other.verifyEmail) - && verifyPhoneNumber.equals(other.verifyPhoneNumber) - && password.equals(other.password) - && connection.equals(other.connection) - && clientId.equals(other.clientId) - && username.equals(other.username); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.blocked, - this.emailVerified, - this.email, - this.phoneNumber, - this.phoneVerified, - this.userMetadata, - this.appMetadata, - this.givenName, - this.familyName, - this.name, - this.nickname, - this.picture, - this.verifyEmail, - this.verifyPhoneNumber, - this.password, - this.connection, - this.clientId, - this.username); - } - - @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 blocked = Optional.empty(); - - private Optional emailVerified = Optional.empty(); - - private OptionalNullable email = OptionalNullable.absent(); - - private OptionalNullable phoneNumber = OptionalNullable.absent(); - - private Optional phoneVerified = Optional.empty(); - - private Optional> userMetadata = Optional.empty(); - - private Optional> appMetadata = Optional.empty(); - - private OptionalNullable givenName = OptionalNullable.absent(); - - private OptionalNullable familyName = OptionalNullable.absent(); - - private OptionalNullable name = OptionalNullable.absent(); - - private OptionalNullable nickname = OptionalNullable.absent(); - - private OptionalNullable picture = OptionalNullable.absent(); - - private Optional verifyEmail = Optional.empty(); - - private Optional verifyPhoneNumber = Optional.empty(); - - private OptionalNullable password = OptionalNullable.absent(); - - private Optional connection = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private OptionalNullable username = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateUserRequestContent other) { - blocked(other.getBlocked()); - emailVerified(other.getEmailVerified()); - email(other.getEmail()); - phoneNumber(other.getPhoneNumber()); - phoneVerified(other.getPhoneVerified()); - userMetadata(other.getUserMetadata()); - appMetadata(other.getAppMetadata()); - givenName(other.getGivenName()); - familyName(other.getFamilyName()); - name(other.getName()); - nickname(other.getNickname()); - picture(other.getPicture()); - verifyEmail(other.getVerifyEmail()); - verifyPhoneNumber(other.getVerifyPhoneNumber()); - password(other.getPassword()); - connection(other.getConnection()); - clientId(other.getClientId()); - username(other.getUsername()); - return this; - } - - /** - *

Whether this user was blocked by an administrator (true) or not (false).

- */ - @JsonSetter(value = "blocked", nulls = Nulls.SKIP) - public Builder blocked(Optional blocked) { - this.blocked = blocked; - return this; - } - - public Builder blocked(Boolean blocked) { - this.blocked = Optional.ofNullable(blocked); - return this; - } - - /** - *

Whether this email address is verified (true) or unverified (false). If set to false the user will not receive a verification email unless verify_email is set to true.

- */ - @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; - } - - /** - *

Email address of this user.

- */ - @JsonSetter(value = "email", nulls = Nulls.SKIP) - public Builder email(@Nullable OptionalNullable email) { - this.email = email; - return this; - } - - public Builder email(String email) { - this.email = OptionalNullable.of(email); - return this; - } - - public Builder email(Optional email) { - if (email.isPresent()) { - this.email = OptionalNullable.of(email.get()); - } else { - this.email = OptionalNullable.absent(); - } - return this; - } - - public Builder email(com.auth0.client.mgmt.core.Nullable email) { - if (email.isNull()) { - this.email = OptionalNullable.ofNull(); - } else if (email.isEmpty()) { - this.email = OptionalNullable.absent(); - } else { - this.email = OptionalNullable.of(email.get()); - } - return this; - } - - /** - *

The user's phone number (following the E.164 recommendation).

- */ - @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) - public Builder phoneNumber(@Nullable OptionalNullable phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - public Builder phoneNumber(String phoneNumber) { - this.phoneNumber = OptionalNullable.of(phoneNumber); - return this; - } - - public Builder phoneNumber(Optional phoneNumber) { - if (phoneNumber.isPresent()) { - this.phoneNumber = OptionalNullable.of(phoneNumber.get()); - } else { - this.phoneNumber = OptionalNullable.absent(); - } - return this; - } - - public Builder phoneNumber(com.auth0.client.mgmt.core.Nullable phoneNumber) { - if (phoneNumber.isNull()) { - this.phoneNumber = OptionalNullable.ofNull(); - } else if (phoneNumber.isEmpty()) { - this.phoneNumber = OptionalNullable.absent(); - } else { - this.phoneNumber = OptionalNullable.of(phoneNumber.get()); - } - 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; - } - - @JsonSetter(value = "user_metadata", nulls = Nulls.SKIP) - public Builder userMetadata(Optional> userMetadata) { - this.userMetadata = userMetadata; - return this; - } - - public Builder userMetadata(Map userMetadata) { - this.userMetadata = Optional.ofNullable(userMetadata); - return this; - } - - @JsonSetter(value = "app_metadata", nulls = Nulls.SKIP) - public Builder appMetadata(Optional> appMetadata) { - this.appMetadata = appMetadata; - return this; - } - - public Builder appMetadata(Map appMetadata) { - this.appMetadata = Optional.ofNullable(appMetadata); - return this; - } - - /** - *

Given name/first name/forename of this user.

- */ - @JsonSetter(value = "given_name", nulls = Nulls.SKIP) - public Builder givenName(@Nullable OptionalNullable givenName) { - this.givenName = givenName; - return this; - } - - public Builder givenName(String givenName) { - this.givenName = OptionalNullable.of(givenName); - return this; - } - - public Builder givenName(Optional givenName) { - if (givenName.isPresent()) { - this.givenName = OptionalNullable.of(givenName.get()); - } else { - this.givenName = OptionalNullable.absent(); - } - return this; - } - - public Builder givenName(com.auth0.client.mgmt.core.Nullable givenName) { - if (givenName.isNull()) { - this.givenName = OptionalNullable.ofNull(); - } else if (givenName.isEmpty()) { - this.givenName = OptionalNullable.absent(); - } else { - this.givenName = OptionalNullable.of(givenName.get()); - } - return this; - } - - /** - *

Family name/last name/surname of this user.

- */ - @JsonSetter(value = "family_name", nulls = Nulls.SKIP) - public Builder familyName(@Nullable OptionalNullable familyName) { - this.familyName = familyName; - return this; - } - - public Builder familyName(String familyName) { - this.familyName = OptionalNullable.of(familyName); - return this; - } - - public Builder familyName(Optional familyName) { - if (familyName.isPresent()) { - this.familyName = OptionalNullable.of(familyName.get()); - } else { - this.familyName = OptionalNullable.absent(); - } - return this; - } - - public Builder familyName(com.auth0.client.mgmt.core.Nullable familyName) { - if (familyName.isNull()) { - this.familyName = OptionalNullable.ofNull(); - } else if (familyName.isEmpty()) { - this.familyName = OptionalNullable.absent(); - } else { - this.familyName = OptionalNullable.of(familyName.get()); - } - return this; - } - - /** - *

Name of this user.

- */ - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public Builder name(@Nullable OptionalNullable name) { - this.name = name; - return this; - } - - public Builder name(String name) { - this.name = OptionalNullable.of(name); - return this; - } - - public Builder name(Optional name) { - if (name.isPresent()) { - this.name = OptionalNullable.of(name.get()); - } else { - this.name = OptionalNullable.absent(); - } - return this; - } - - public Builder name(com.auth0.client.mgmt.core.Nullable name) { - if (name.isNull()) { - this.name = OptionalNullable.ofNull(); - } else if (name.isEmpty()) { - this.name = OptionalNullable.absent(); - } else { - this.name = OptionalNullable.of(name.get()); - } - return this; - } - - /** - *

Preferred nickname or alias of this user.

- */ - @JsonSetter(value = "nickname", nulls = Nulls.SKIP) - public Builder nickname(@Nullable OptionalNullable nickname) { - this.nickname = nickname; - return this; - } - - public Builder nickname(String nickname) { - this.nickname = OptionalNullable.of(nickname); - return this; - } - - public Builder nickname(Optional nickname) { - if (nickname.isPresent()) { - this.nickname = OptionalNullable.of(nickname.get()); - } else { - this.nickname = OptionalNullable.absent(); - } - return this; - } - - public Builder nickname(com.auth0.client.mgmt.core.Nullable nickname) { - if (nickname.isNull()) { - this.nickname = OptionalNullable.ofNull(); - } else if (nickname.isEmpty()) { - this.nickname = OptionalNullable.absent(); - } else { - this.nickname = OptionalNullable.of(nickname.get()); - } - return this; - } - - /** - *

URL to picture, photo, or avatar of this user.

- */ - @JsonSetter(value = "picture", nulls = Nulls.SKIP) - public Builder picture(@Nullable OptionalNullable picture) { - this.picture = picture; - return this; - } - - public Builder picture(String picture) { - this.picture = OptionalNullable.of(picture); - return this; - } - - public Builder picture(Optional picture) { - if (picture.isPresent()) { - this.picture = OptionalNullable.of(picture.get()); - } else { - this.picture = OptionalNullable.absent(); - } - return this; - } - - public Builder picture(com.auth0.client.mgmt.core.Nullable picture) { - if (picture.isNull()) { - this.picture = OptionalNullable.ofNull(); - } else if (picture.isEmpty()) { - this.picture = OptionalNullable.absent(); - } else { - this.picture = OptionalNullable.of(picture.get()); - } - return this; - } - - /** - *

Whether this user will receive a verification email after creation (true) or no email (false). Overrides behavior of email_verified parameter.

- */ - @JsonSetter(value = "verify_email", nulls = Nulls.SKIP) - public Builder verifyEmail(Optional verifyEmail) { - this.verifyEmail = verifyEmail; - return this; - } - - public Builder verifyEmail(Boolean verifyEmail) { - this.verifyEmail = Optional.ofNullable(verifyEmail); - return this; - } - - /** - *

Whether this user will receive a text after changing the phone number (true) or no text (false). Only valid when changing phone number for SMS connections.

- */ - @JsonSetter(value = "verify_phone_number", nulls = Nulls.SKIP) - public Builder verifyPhoneNumber(Optional verifyPhoneNumber) { - this.verifyPhoneNumber = verifyPhoneNumber; - return this; - } - - public Builder verifyPhoneNumber(Boolean verifyPhoneNumber) { - this.verifyPhoneNumber = Optional.ofNullable(verifyPhoneNumber); - return this; - } - - /** - *

New password for this user. Only valid for database connections.

- */ - @JsonSetter(value = "password", nulls = Nulls.SKIP) - public Builder password(@Nullable OptionalNullable password) { - this.password = password; - return this; - } - - public Builder password(String password) { - this.password = OptionalNullable.of(password); - return this; - } - - public Builder password(Optional password) { - if (password.isPresent()) { - this.password = OptionalNullable.of(password.get()); - } else { - this.password = OptionalNullable.absent(); - } - return this; - } - - public Builder password(com.auth0.client.mgmt.core.Nullable password) { - if (password.isNull()) { - this.password = OptionalNullable.ofNull(); - } else if (password.isEmpty()) { - this.password = OptionalNullable.absent(); - } else { - this.password = OptionalNullable.of(password.get()); - } - return this; - } - - /** - *

Name of the connection to target for this user update.

- */ - @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; - } - - /** - *

Auth0 client ID. Only valid when updating email address.

- */ - @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 user's username. Only valid if the connection requires a username.

- */ - @JsonSetter(value = "username", nulls = Nulls.SKIP) - public Builder username(@Nullable OptionalNullable username) { - this.username = username; - return this; - } - - public Builder username(String username) { - this.username = OptionalNullable.of(username); - return this; - } - - public Builder username(Optional username) { - if (username.isPresent()) { - this.username = OptionalNullable.of(username.get()); - } else { - this.username = OptionalNullable.absent(); - } - return this; - } - - public Builder username(com.auth0.client.mgmt.core.Nullable username) { - if (username.isNull()) { - this.username = OptionalNullable.ofNull(); - } else if (username.isEmpty()) { - this.username = OptionalNullable.absent(); - } else { - this.username = OptionalNullable.of(username.get()); - } - return this; - } - - public UpdateUserRequestContent build() { - return new UpdateUserRequestContent( - blocked, - emailVerified, - email, - phoneNumber, - phoneVerified, - userMetadata, - appMetadata, - givenName, - familyName, - name, - nickname, - picture, - verifyEmail, - verifyPhoneNumber, - password, - connection, - clientId, - username, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateUserResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateUserResponseContent.java deleted file mode 100644 index 8e5b12bc5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateUserResponseContent.java +++ /dev/null @@ -1,717 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateUserResponseContent.Builder.class) -public final class UpdateUserResponseContent { - private final Optional userId; - - private final Optional email; - - private final Optional emailVerified; - - private final Optional username; - - private final Optional phoneNumber; - - private final Optional phoneVerified; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional> 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 UpdateUserResponseContent( - Optional userId, - Optional email, - Optional emailVerified, - Optional username, - Optional phoneNumber, - Optional phoneVerified, - Optional createdAt, - Optional updatedAt, - Optional> 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 Optional 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 for this user. Follows the <a href="https://en.wikipedia.org/wiki/E.164">E.164 recommendation</a>. - */ - @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; - } - - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return Array of user identity objects when accounts are linked. - */ - @JsonProperty("identities") - public Optional> 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; - } - - @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 UpdateUserResponseContent && equalTo((UpdateUserResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateUserResponseContent 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 Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional userId = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional emailVerified = Optional.empty(); - - private Optional username = Optional.empty(); - - private Optional phoneNumber = Optional.empty(); - - private Optional phoneVerified = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional> identities = Optional.empty(); - - private Optional> appMetadata = Optional.empty(); - - private Optional> userMetadata = Optional.empty(); - - private Optional picture = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional nickname = Optional.empty(); - - private Optional> multifactor = Optional.empty(); - - private Optional lastIp = Optional.empty(); - - private Optional lastLogin = Optional.empty(); - - private Optional loginsCount = Optional.empty(); - - private Optional blocked = Optional.empty(); - - private Optional givenName = Optional.empty(); - - private Optional familyName = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateUserResponseContent 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.

- */ - @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; - } - - /** - *

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; - } - - /** - *

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; - } - - /** - *

Phone number for this user. Follows the <a href="https://en.wikipedia.org/wiki/E.164">E.164 recommendation</a>.

- */ - @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; - } - - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(UserDateSchema createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - public Builder updatedAt(UserDateSchema updatedAt) { - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - /** - *

Array of user identity objects when accounts are linked.

- */ - @JsonSetter(value = "identities", nulls = Nulls.SKIP) - public Builder identities(Optional> identities) { - this.identities = identities; - return this; - } - - public Builder identities(List identities) { - this.identities = Optional.ofNullable(identities); - return this; - } - - @JsonSetter(value = "app_metadata", nulls = Nulls.SKIP) - public Builder appMetadata(Optional> appMetadata) { - this.appMetadata = appMetadata; - return this; - } - - public Builder appMetadata(Map appMetadata) { - this.appMetadata = Optional.ofNullable(appMetadata); - return this; - } - - @JsonSetter(value = "user_metadata", nulls = Nulls.SKIP) - public Builder userMetadata(Optional> userMetadata) { - this.userMetadata = userMetadata; - return this; - } - - public Builder userMetadata(Map userMetadata) { - this.userMetadata = Optional.ofNullable(userMetadata); - return this; - } - - /** - *

URL to picture, photo, or avatar of 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; - } - - /** - *

Preferred nickname or alias of this user.

- */ - @JsonSetter(value = "nickname", nulls = Nulls.SKIP) - public Builder nickname(Optional nickname) { - this.nickname = nickname; - return this; - } - - public Builder nickname(String nickname) { - this.nickname = Optional.ofNullable(nickname); - return this; - } - - /** - *

List of multi-factor authentication providers with which this user has enrolled.

- */ - @JsonSetter(value = "multifactor", nulls = Nulls.SKIP) - public Builder multifactor(Optional> multifactor) { - this.multifactor = multifactor; - return this; - } - - public Builder multifactor(List multifactor) { - this.multifactor = Optional.ofNullable(multifactor); - return this; - } - - /** - *

Last IP address from which this user logged in.

- */ - @JsonSetter(value = "last_ip", nulls = Nulls.SKIP) - public Builder lastIp(Optional lastIp) { - this.lastIp = lastIp; - return this; - } - - public Builder lastIp(String lastIp) { - this.lastIp = Optional.ofNullable(lastIp); - return this; - } - - @JsonSetter(value = "last_login", nulls = Nulls.SKIP) - public Builder lastLogin(Optional lastLogin) { - this.lastLogin = lastLogin; - return this; - } - - public Builder lastLogin(UserDateSchema lastLogin) { - this.lastLogin = Optional.ofNullable(lastLogin); - return this; - } - - /** - *

Total number of logins this user has performed.

- */ - @JsonSetter(value = "logins_count", nulls = Nulls.SKIP) - public Builder loginsCount(Optional loginsCount) { - this.loginsCount = loginsCount; - return this; - } - - public Builder loginsCount(Integer loginsCount) { - this.loginsCount = Optional.ofNullable(loginsCount); - return this; - } - - /** - *

Whether this user was blocked by an administrator (true) or is not (false).

- */ - @JsonSetter(value = "blocked", nulls = Nulls.SKIP) - public Builder blocked(Optional blocked) { - this.blocked = blocked; - return this; - } - - public Builder blocked(Boolean blocked) { - this.blocked = Optional.ofNullable(blocked); - 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; - } - - public UpdateUserResponseContent build() { - return new UpdateUserResponseContent( - userId, - email, - emailVerified, - username, - phoneNumber, - phoneVerified, - createdAt, - updatedAt, - identities, - appMetadata, - userMetadata, - picture, - name, - nickname, - multifactor, - lastIp, - lastLogin, - loginsCount, - blocked, - givenName, - familyName, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UpdateVerifiableCredentialTemplateResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UpdateVerifiableCredentialTemplateResponseContent.java deleted file mode 100644 index 30b66c094..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UpdateVerifiableCredentialTemplateResponseContent.java +++ /dev/null @@ -1,422 +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 = UpdateVerifiableCredentialTemplateResponseContent.Builder.class) -public final class UpdateVerifiableCredentialTemplateResponseContent { - private final Optional id; - - private final Optional name; - - private final Optional type; - - private final Optional dialect; - - private final Optional presentation; - - private final OptionalNullable customCertificateAuthority; - - private final OptionalNullable wellKnownTrustedIssuers; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private UpdateVerifiableCredentialTemplateResponseContent( - Optional id, - Optional name, - Optional type, - Optional dialect, - Optional presentation, - OptionalNullable customCertificateAuthority, - OptionalNullable wellKnownTrustedIssuers, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.type = type; - this.dialect = dialect; - this.presentation = presentation; - this.customCertificateAuthority = customCertificateAuthority; - this.wellKnownTrustedIssuers = wellKnownTrustedIssuers; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the template. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the template. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The type of the template. - */ - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return The dialect of the template. - */ - @JsonProperty("dialect") - public Optional getDialect() { - return dialect; - } - - @JsonProperty("presentation") - public Optional getPresentation() { - return presentation; - } - - /** - * @return The custom certificate authority. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_certificate_authority") - public OptionalNullable getCustomCertificateAuthority() { - if (customCertificateAuthority == null) { - return OptionalNullable.absent(); - } - return customCertificateAuthority; - } - - /** - * @return The well-known trusted issuers, comma separated. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("well_known_trusted_issuers") - public OptionalNullable getWellKnownTrustedIssuers() { - if (wellKnownTrustedIssuers == null) { - return OptionalNullable.absent(); - } - return wellKnownTrustedIssuers; - } - - /** - * @return The date and time the template was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The date and time the template was created. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_certificate_authority") - private OptionalNullable _getCustomCertificateAuthority() { - return customCertificateAuthority; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("well_known_trusted_issuers") - private OptionalNullable _getWellKnownTrustedIssuers() { - return wellKnownTrustedIssuers; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateVerifiableCredentialTemplateResponseContent - && equalTo((UpdateVerifiableCredentialTemplateResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateVerifiableCredentialTemplateResponseContent other) { - return id.equals(other.id) - && name.equals(other.name) - && type.equals(other.type) - && dialect.equals(other.dialect) - && presentation.equals(other.presentation) - && customCertificateAuthority.equals(other.customCertificateAuthority) - && wellKnownTrustedIssuers.equals(other.wellKnownTrustedIssuers) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.type, - this.dialect, - this.presentation, - this.customCertificateAuthority, - this.wellKnownTrustedIssuers, - this.createdAt, - this.updatedAt); - } - - @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 type = Optional.empty(); - - private Optional dialect = Optional.empty(); - - private Optional presentation = Optional.empty(); - - private OptionalNullable customCertificateAuthority = OptionalNullable.absent(); - - private OptionalNullable wellKnownTrustedIssuers = OptionalNullable.absent(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateVerifiableCredentialTemplateResponseContent other) { - id(other.getId()); - name(other.getName()); - type(other.getType()); - dialect(other.getDialect()); - presentation(other.getPresentation()); - customCertificateAuthority(other.getCustomCertificateAuthority()); - wellKnownTrustedIssuers(other.getWellKnownTrustedIssuers()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

The id of the template.

- */ - @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 the template.

- */ - @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 template.

- */ - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(String type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

The dialect of the template.

- */ - @JsonSetter(value = "dialect", nulls = Nulls.SKIP) - public Builder dialect(Optional dialect) { - this.dialect = dialect; - return this; - } - - public Builder dialect(String dialect) { - this.dialect = Optional.ofNullable(dialect); - return this; - } - - @JsonSetter(value = "presentation", nulls = Nulls.SKIP) - public Builder presentation(Optional presentation) { - this.presentation = presentation; - return this; - } - - public Builder presentation(MdlPresentationRequest presentation) { - this.presentation = Optional.ofNullable(presentation); - return this; - } - - /** - *

The custom certificate authority.

- */ - @JsonSetter(value = "custom_certificate_authority", nulls = Nulls.SKIP) - public Builder customCertificateAuthority(@Nullable OptionalNullable customCertificateAuthority) { - this.customCertificateAuthority = customCertificateAuthority; - return this; - } - - public Builder customCertificateAuthority(String customCertificateAuthority) { - this.customCertificateAuthority = OptionalNullable.of(customCertificateAuthority); - return this; - } - - public Builder customCertificateAuthority(Optional customCertificateAuthority) { - if (customCertificateAuthority.isPresent()) { - this.customCertificateAuthority = OptionalNullable.of(customCertificateAuthority.get()); - } else { - this.customCertificateAuthority = OptionalNullable.absent(); - } - return this; - } - - public Builder customCertificateAuthority( - com.auth0.client.mgmt.core.Nullable customCertificateAuthority) { - if (customCertificateAuthority.isNull()) { - this.customCertificateAuthority = OptionalNullable.ofNull(); - } else if (customCertificateAuthority.isEmpty()) { - this.customCertificateAuthority = OptionalNullable.absent(); - } else { - this.customCertificateAuthority = OptionalNullable.of(customCertificateAuthority.get()); - } - return this; - } - - /** - *

The well-known trusted issuers, comma separated.

- */ - @JsonSetter(value = "well_known_trusted_issuers", nulls = Nulls.SKIP) - public Builder wellKnownTrustedIssuers(@Nullable OptionalNullable wellKnownTrustedIssuers) { - this.wellKnownTrustedIssuers = wellKnownTrustedIssuers; - return this; - } - - public Builder wellKnownTrustedIssuers(String wellKnownTrustedIssuers) { - this.wellKnownTrustedIssuers = OptionalNullable.of(wellKnownTrustedIssuers); - return this; - } - - public Builder wellKnownTrustedIssuers(Optional wellKnownTrustedIssuers) { - if (wellKnownTrustedIssuers.isPresent()) { - this.wellKnownTrustedIssuers = OptionalNullable.of(wellKnownTrustedIssuers.get()); - } else { - this.wellKnownTrustedIssuers = OptionalNullable.absent(); - } - return this; - } - - public Builder wellKnownTrustedIssuers(com.auth0.client.mgmt.core.Nullable wellKnownTrustedIssuers) { - if (wellKnownTrustedIssuers.isNull()) { - this.wellKnownTrustedIssuers = OptionalNullable.ofNull(); - } else if (wellKnownTrustedIssuers.isEmpty()) { - this.wellKnownTrustedIssuers = OptionalNullable.absent(); - } else { - this.wellKnownTrustedIssuers = OptionalNullable.of(wellKnownTrustedIssuers.get()); - } - return this; - } - - /** - *

The date and time the template 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 date and time the template was created.

- */ - @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; - } - - public UpdateVerifiableCredentialTemplateResponseContent build() { - return new UpdateVerifiableCredentialTemplateResponseContent( - id, - name, - type, - dialect, - presentation, - customCertificateAuthority, - wellKnownTrustedIssuers, - createdAt, - updatedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfile.java b/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfile.java deleted file mode 100644 index 5706a1c67..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfile.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserAttributeProfile.Builder.class) -public final class UserAttributeProfile { - private final Optional id; - - private final Optional name; - - private final Optional userId; - - private final Optional> userAttributes; - - private final Map additionalProperties; - - private UserAttributeProfile( - Optional id, - Optional name, - Optional userId, - Optional> userAttributes, - Map additionalProperties) { - this.id = id; - this.name = name; - this.userId = userId; - this.userAttributes = userAttributes; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - @JsonProperty("user_attributes") - public Optional> getUserAttributes() { - return userAttributes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserAttributeProfile && equalTo((UserAttributeProfile) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserAttributeProfile other) { - return id.equals(other.id) - && name.equals(other.name) - && userId.equals(other.userId) - && userAttributes.equals(other.userAttributes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.name, this.userId, this.userAttributes); - } - - @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 userId = Optional.empty(); - - private Optional> userAttributes = - Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserAttributeProfile other) { - id(other.getId()); - name(other.getName()); - userId(other.getUserId()); - userAttributes(other.getUserAttributes()); - 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 = "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 = "user_id", nulls = Nulls.SKIP) - public Builder userId(Optional userId) { - this.userId = userId; - return this; - } - - public Builder userId(UserAttributeProfileUserId userId) { - this.userId = Optional.ofNullable(userId); - return this; - } - - @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) - public Builder userAttributes( - Optional> userAttributes) { - this.userAttributes = userAttributes; - return this; - } - - public Builder userAttributes( - Map userAttributes) { - this.userAttributes = Optional.ofNullable(userAttributes); - return this; - } - - public UserAttributeProfile build() { - return new UserAttributeProfile(id, name, userId, userAttributes, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileOidcMapping.java b/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileOidcMapping.java deleted file mode 100644 index 2b538a11d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileOidcMapping.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserAttributeProfileOidcMapping.Builder.class) -public final class UserAttributeProfileOidcMapping { - private final String mapping; - - private final Optional displayName; - - private final Map additionalProperties; - - private UserAttributeProfileOidcMapping( - String mapping, Optional displayName, Map additionalProperties) { - this.mapping = mapping; - this.displayName = displayName; - this.additionalProperties = additionalProperties; - } - - /** - * @return OIDC mapping field - */ - @JsonProperty("mapping") - public String getMapping() { - return mapping; - } - - /** - * @return Display name for the OIDC mapping - */ - @JsonProperty("display_name") - public Optional getDisplayName() { - return displayName; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserAttributeProfileOidcMapping && equalTo((UserAttributeProfileOidcMapping) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserAttributeProfileOidcMapping other) { - return mapping.equals(other.mapping) && displayName.equals(other.displayName); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.mapping, this.displayName); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static MappingStage builder() { - return new Builder(); - } - - public interface MappingStage { - /** - *

OIDC mapping field

- */ - _FinalStage mapping(@NotNull String mapping); - - Builder from(UserAttributeProfileOidcMapping other); - } - - public interface _FinalStage { - UserAttributeProfileOidcMapping build(); - - /** - *

Display name for the OIDC mapping

- */ - _FinalStage displayName(Optional displayName); - - _FinalStage displayName(String displayName); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements MappingStage, _FinalStage { - private String mapping; - - private Optional displayName = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UserAttributeProfileOidcMapping other) { - mapping(other.getMapping()); - displayName(other.getDisplayName()); - return this; - } - - /** - *

OIDC mapping field

- *

OIDC mapping field

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("mapping") - public _FinalStage mapping(@NotNull String mapping) { - this.mapping = Objects.requireNonNull(mapping, "mapping must not be null"); - return this; - } - - /** - *

Display name for the OIDC mapping

- * @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; - } - - /** - *

Display name for the OIDC mapping

- */ - @java.lang.Override - @JsonSetter(value = "display_name", nulls = Nulls.SKIP) - public _FinalStage displayName(Optional displayName) { - this.displayName = displayName; - return this; - } - - @java.lang.Override - public UserAttributeProfileOidcMapping build() { - return new UserAttributeProfileOidcMapping(mapping, displayName, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileStrategyOverrides.java b/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileStrategyOverrides.java deleted file mode 100644 index d78a5764b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileStrategyOverrides.java +++ /dev/null @@ -1,268 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserAttributeProfileStrategyOverrides.Builder.class) -public final class UserAttributeProfileStrategyOverrides { - private final Optional pingfederate; - - private final Optional ad; - - private final Optional adfs; - - private final Optional waad; - - private final Optional googleApps; - - private final Optional okta; - - private final Optional oidc; - - private final Optional samlp; - - private final Map additionalProperties; - - private UserAttributeProfileStrategyOverrides( - Optional pingfederate, - Optional ad, - Optional adfs, - Optional waad, - Optional googleApps, - Optional okta, - Optional oidc, - Optional samlp, - Map additionalProperties) { - this.pingfederate = pingfederate; - this.ad = ad; - this.adfs = adfs; - this.waad = waad; - this.googleApps = googleApps; - this.okta = okta; - this.oidc = oidc; - this.samlp = samlp; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("pingfederate") - public Optional getPingfederate() { - return pingfederate; - } - - @JsonProperty("ad") - public Optional getAd() { - return ad; - } - - @JsonProperty("adfs") - public Optional getAdfs() { - return adfs; - } - - @JsonProperty("waad") - public Optional getWaad() { - return waad; - } - - @JsonProperty("google-apps") - public Optional getGoogleApps() { - return googleApps; - } - - @JsonProperty("okta") - public Optional getOkta() { - return okta; - } - - @JsonProperty("oidc") - public Optional getOidc() { - return oidc; - } - - @JsonProperty("samlp") - public Optional getSamlp() { - return samlp; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserAttributeProfileStrategyOverrides - && equalTo((UserAttributeProfileStrategyOverrides) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserAttributeProfileStrategyOverrides other) { - return pingfederate.equals(other.pingfederate) - && ad.equals(other.ad) - && adfs.equals(other.adfs) - && waad.equals(other.waad) - && googleApps.equals(other.googleApps) - && okta.equals(other.okta) - && oidc.equals(other.oidc) - && samlp.equals(other.samlp); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.pingfederate, this.ad, this.adfs, this.waad, this.googleApps, this.okta, this.oidc, this.samlp); - } - - @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 pingfederate = Optional.empty(); - - private Optional ad = Optional.empty(); - - private Optional adfs = Optional.empty(); - - private Optional waad = Optional.empty(); - - private Optional googleApps = Optional.empty(); - - private Optional okta = Optional.empty(); - - private Optional oidc = Optional.empty(); - - private Optional samlp = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserAttributeProfileStrategyOverrides other) { - pingfederate(other.getPingfederate()); - ad(other.getAd()); - adfs(other.getAdfs()); - waad(other.getWaad()); - googleApps(other.getGoogleApps()); - okta(other.getOkta()); - oidc(other.getOidc()); - samlp(other.getSamlp()); - return this; - } - - @JsonSetter(value = "pingfederate", nulls = Nulls.SKIP) - public Builder pingfederate(Optional pingfederate) { - this.pingfederate = pingfederate; - return this; - } - - public Builder pingfederate(UserAttributeProfileStrategyOverridesMapping pingfederate) { - this.pingfederate = Optional.ofNullable(pingfederate); - return this; - } - - @JsonSetter(value = "ad", nulls = Nulls.SKIP) - public Builder ad(Optional ad) { - this.ad = ad; - return this; - } - - public Builder ad(UserAttributeProfileStrategyOverridesMapping ad) { - this.ad = Optional.ofNullable(ad); - return this; - } - - @JsonSetter(value = "adfs", nulls = Nulls.SKIP) - public Builder adfs(Optional adfs) { - this.adfs = adfs; - return this; - } - - public Builder adfs(UserAttributeProfileStrategyOverridesMapping adfs) { - this.adfs = Optional.ofNullable(adfs); - return this; - } - - @JsonSetter(value = "waad", nulls = Nulls.SKIP) - public Builder waad(Optional waad) { - this.waad = waad; - return this; - } - - public Builder waad(UserAttributeProfileStrategyOverridesMapping waad) { - this.waad = Optional.ofNullable(waad); - return this; - } - - @JsonSetter(value = "google-apps", nulls = Nulls.SKIP) - public Builder googleApps(Optional googleApps) { - this.googleApps = googleApps; - return this; - } - - public Builder googleApps(UserAttributeProfileStrategyOverridesMapping googleApps) { - this.googleApps = Optional.ofNullable(googleApps); - return this; - } - - @JsonSetter(value = "okta", nulls = Nulls.SKIP) - public Builder okta(Optional okta) { - this.okta = okta; - return this; - } - - public Builder okta(UserAttributeProfileStrategyOverridesMapping okta) { - this.okta = Optional.ofNullable(okta); - return this; - } - - @JsonSetter(value = "oidc", nulls = Nulls.SKIP) - public Builder oidc(Optional oidc) { - this.oidc = oidc; - return this; - } - - public Builder oidc(UserAttributeProfileStrategyOverridesMapping oidc) { - this.oidc = Optional.ofNullable(oidc); - return this; - } - - @JsonSetter(value = "samlp", nulls = Nulls.SKIP) - public Builder samlp(Optional samlp) { - this.samlp = samlp; - return this; - } - - public Builder samlp(UserAttributeProfileStrategyOverridesMapping samlp) { - this.samlp = Optional.ofNullable(samlp); - return this; - } - - public UserAttributeProfileStrategyOverrides build() { - return new UserAttributeProfileStrategyOverrides( - pingfederate, ad, adfs, waad, googleApps, okta, oidc, samlp, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileStrategyOverridesMapping.java b/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileStrategyOverridesMapping.java deleted file mode 100644 index 02e6b06b8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileStrategyOverridesMapping.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserAttributeProfileStrategyOverridesMapping.Builder.class) -public final class UserAttributeProfileStrategyOverridesMapping { - private final Optional oidcMapping; - - private final Optional> samlMapping; - - private final Optional scimMapping; - - private final Map additionalProperties; - - private UserAttributeProfileStrategyOverridesMapping( - Optional oidcMapping, - Optional> samlMapping, - Optional scimMapping, - Map additionalProperties) { - this.oidcMapping = oidcMapping; - this.samlMapping = samlMapping; - this.scimMapping = scimMapping; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("oidc_mapping") - public Optional getOidcMapping() { - return oidcMapping; - } - - @JsonProperty("saml_mapping") - public Optional> getSamlMapping() { - return samlMapping; - } - - /** - * @return SCIM mapping override for this strategy - */ - @JsonProperty("scim_mapping") - public Optional getScimMapping() { - return scimMapping; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserAttributeProfileStrategyOverridesMapping - && equalTo((UserAttributeProfileStrategyOverridesMapping) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserAttributeProfileStrategyOverridesMapping other) { - return oidcMapping.equals(other.oidcMapping) - && samlMapping.equals(other.samlMapping) - && scimMapping.equals(other.scimMapping); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.oidcMapping, this.samlMapping, this.scimMapping); - } - - @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 oidcMapping = Optional.empty(); - - private Optional> samlMapping = Optional.empty(); - - private Optional scimMapping = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserAttributeProfileStrategyOverridesMapping other) { - oidcMapping(other.getOidcMapping()); - samlMapping(other.getSamlMapping()); - scimMapping(other.getScimMapping()); - return this; - } - - @JsonSetter(value = "oidc_mapping", nulls = Nulls.SKIP) - public Builder oidcMapping(Optional oidcMapping) { - this.oidcMapping = oidcMapping; - return this; - } - - public Builder oidcMapping(UserAttributeProfileOidcMapping oidcMapping) { - this.oidcMapping = Optional.ofNullable(oidcMapping); - return this; - } - - @JsonSetter(value = "saml_mapping", nulls = Nulls.SKIP) - public Builder samlMapping(Optional> samlMapping) { - this.samlMapping = samlMapping; - return this; - } - - public Builder samlMapping(List samlMapping) { - this.samlMapping = Optional.ofNullable(samlMapping); - return this; - } - - /** - *

SCIM mapping override for this strategy

- */ - @JsonSetter(value = "scim_mapping", nulls = Nulls.SKIP) - public Builder scimMapping(Optional scimMapping) { - this.scimMapping = scimMapping; - return this; - } - - public Builder scimMapping(String scimMapping) { - this.scimMapping = Optional.ofNullable(scimMapping); - return this; - } - - public UserAttributeProfileStrategyOverridesMapping build() { - return new UserAttributeProfileStrategyOverridesMapping( - oidcMapping, samlMapping, scimMapping, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileStrategyOverridesUserId.java b/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileStrategyOverridesUserId.java deleted file mode 100644 index fca59bd47..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileStrategyOverridesUserId.java +++ /dev/null @@ -1,268 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserAttributeProfileStrategyOverridesUserId.Builder.class) -public final class UserAttributeProfileStrategyOverridesUserId { - private final Optional pingfederate; - - private final Optional ad; - - private final Optional adfs; - - private final Optional waad; - - private final Optional googleApps; - - private final Optional okta; - - private final Optional oidc; - - private final Optional samlp; - - private final Map additionalProperties; - - private UserAttributeProfileStrategyOverridesUserId( - Optional pingfederate, - Optional ad, - Optional adfs, - Optional waad, - Optional googleApps, - Optional okta, - Optional oidc, - Optional samlp, - Map additionalProperties) { - this.pingfederate = pingfederate; - this.ad = ad; - this.adfs = adfs; - this.waad = waad; - this.googleApps = googleApps; - this.okta = okta; - this.oidc = oidc; - this.samlp = samlp; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("pingfederate") - public Optional getPingfederate() { - return pingfederate; - } - - @JsonProperty("ad") - public Optional getAd() { - return ad; - } - - @JsonProperty("adfs") - public Optional getAdfs() { - return adfs; - } - - @JsonProperty("waad") - public Optional getWaad() { - return waad; - } - - @JsonProperty("google-apps") - public Optional getGoogleApps() { - return googleApps; - } - - @JsonProperty("okta") - public Optional getOkta() { - return okta; - } - - @JsonProperty("oidc") - public Optional getOidc() { - return oidc; - } - - @JsonProperty("samlp") - public Optional getSamlp() { - return samlp; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserAttributeProfileStrategyOverridesUserId - && equalTo((UserAttributeProfileStrategyOverridesUserId) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserAttributeProfileStrategyOverridesUserId other) { - return pingfederate.equals(other.pingfederate) - && ad.equals(other.ad) - && adfs.equals(other.adfs) - && waad.equals(other.waad) - && googleApps.equals(other.googleApps) - && okta.equals(other.okta) - && oidc.equals(other.oidc) - && samlp.equals(other.samlp); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.pingfederate, this.ad, this.adfs, this.waad, this.googleApps, this.okta, this.oidc, this.samlp); - } - - @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 pingfederate = Optional.empty(); - - private Optional ad = Optional.empty(); - - private Optional adfs = Optional.empty(); - - private Optional waad = Optional.empty(); - - private Optional googleApps = Optional.empty(); - - private Optional okta = Optional.empty(); - - private Optional oidc = Optional.empty(); - - private Optional samlp = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserAttributeProfileStrategyOverridesUserId other) { - pingfederate(other.getPingfederate()); - ad(other.getAd()); - adfs(other.getAdfs()); - waad(other.getWaad()); - googleApps(other.getGoogleApps()); - okta(other.getOkta()); - oidc(other.getOidc()); - samlp(other.getSamlp()); - return this; - } - - @JsonSetter(value = "pingfederate", nulls = Nulls.SKIP) - public Builder pingfederate(Optional pingfederate) { - this.pingfederate = pingfederate; - return this; - } - - public Builder pingfederate(UserAttributeProfileStrategyOverridesUserIdMapping pingfederate) { - this.pingfederate = Optional.ofNullable(pingfederate); - return this; - } - - @JsonSetter(value = "ad", nulls = Nulls.SKIP) - public Builder ad(Optional ad) { - this.ad = ad; - return this; - } - - public Builder ad(UserAttributeProfileStrategyOverridesUserIdMapping ad) { - this.ad = Optional.ofNullable(ad); - return this; - } - - @JsonSetter(value = "adfs", nulls = Nulls.SKIP) - public Builder adfs(Optional adfs) { - this.adfs = adfs; - return this; - } - - public Builder adfs(UserAttributeProfileStrategyOverridesUserIdMapping adfs) { - this.adfs = Optional.ofNullable(adfs); - return this; - } - - @JsonSetter(value = "waad", nulls = Nulls.SKIP) - public Builder waad(Optional waad) { - this.waad = waad; - return this; - } - - public Builder waad(UserAttributeProfileStrategyOverridesUserIdMapping waad) { - this.waad = Optional.ofNullable(waad); - return this; - } - - @JsonSetter(value = "google-apps", nulls = Nulls.SKIP) - public Builder googleApps(Optional googleApps) { - this.googleApps = googleApps; - return this; - } - - public Builder googleApps(UserAttributeProfileStrategyOverridesUserIdMapping googleApps) { - this.googleApps = Optional.ofNullable(googleApps); - return this; - } - - @JsonSetter(value = "okta", nulls = Nulls.SKIP) - public Builder okta(Optional okta) { - this.okta = okta; - return this; - } - - public Builder okta(UserAttributeProfileStrategyOverridesUserIdMapping okta) { - this.okta = Optional.ofNullable(okta); - return this; - } - - @JsonSetter(value = "oidc", nulls = Nulls.SKIP) - public Builder oidc(Optional oidc) { - this.oidc = oidc; - return this; - } - - public Builder oidc(UserAttributeProfileStrategyOverridesUserIdMapping oidc) { - this.oidc = Optional.ofNullable(oidc); - return this; - } - - @JsonSetter(value = "samlp", nulls = Nulls.SKIP) - public Builder samlp(Optional samlp) { - this.samlp = samlp; - return this; - } - - public Builder samlp(UserAttributeProfileStrategyOverridesUserIdMapping samlp) { - this.samlp = Optional.ofNullable(samlp); - return this; - } - - public UserAttributeProfileStrategyOverridesUserId build() { - return new UserAttributeProfileStrategyOverridesUserId( - pingfederate, ad, adfs, waad, googleApps, okta, oidc, samlp, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileStrategyOverridesUserIdMapping.java b/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileStrategyOverridesUserIdMapping.java deleted file mode 100644 index df2c13f3e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileStrategyOverridesUserIdMapping.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserAttributeProfileStrategyOverridesUserIdMapping.Builder.class) -public final class UserAttributeProfileStrategyOverridesUserIdMapping { - private final Optional oidcMapping; - - private final Optional> samlMapping; - - private final Optional scimMapping; - - private final Map additionalProperties; - - private UserAttributeProfileStrategyOverridesUserIdMapping( - Optional oidcMapping, - Optional> samlMapping, - Optional scimMapping, - Map additionalProperties) { - this.oidcMapping = oidcMapping; - this.samlMapping = samlMapping; - this.scimMapping = scimMapping; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("oidc_mapping") - public Optional getOidcMapping() { - return oidcMapping; - } - - @JsonProperty("saml_mapping") - public Optional> getSamlMapping() { - return samlMapping; - } - - /** - * @return SCIM mapping override for this strategy - */ - @JsonProperty("scim_mapping") - public Optional getScimMapping() { - return scimMapping; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserAttributeProfileStrategyOverridesUserIdMapping - && equalTo((UserAttributeProfileStrategyOverridesUserIdMapping) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserAttributeProfileStrategyOverridesUserIdMapping other) { - return oidcMapping.equals(other.oidcMapping) - && samlMapping.equals(other.samlMapping) - && scimMapping.equals(other.scimMapping); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.oidcMapping, this.samlMapping, this.scimMapping); - } - - @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 oidcMapping = Optional.empty(); - - private Optional> samlMapping = Optional.empty(); - - private Optional scimMapping = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserAttributeProfileStrategyOverridesUserIdMapping other) { - oidcMapping(other.getOidcMapping()); - samlMapping(other.getSamlMapping()); - scimMapping(other.getScimMapping()); - return this; - } - - @JsonSetter(value = "oidc_mapping", nulls = Nulls.SKIP) - public Builder oidcMapping(Optional oidcMapping) { - this.oidcMapping = oidcMapping; - return this; - } - - public Builder oidcMapping(UserAttributeProfileUserIdOidcStrategyOverrideMapping oidcMapping) { - this.oidcMapping = Optional.ofNullable(oidcMapping); - return this; - } - - @JsonSetter(value = "saml_mapping", nulls = Nulls.SKIP) - public Builder samlMapping(Optional> samlMapping) { - this.samlMapping = samlMapping; - return this; - } - - public Builder samlMapping(List samlMapping) { - this.samlMapping = Optional.ofNullable(samlMapping); - return this; - } - - /** - *

SCIM mapping override for this strategy

- */ - @JsonSetter(value = "scim_mapping", nulls = Nulls.SKIP) - public Builder scimMapping(Optional scimMapping) { - this.scimMapping = scimMapping; - return this; - } - - public Builder scimMapping(String scimMapping) { - this.scimMapping = Optional.ofNullable(scimMapping); - return this; - } - - public UserAttributeProfileStrategyOverridesUserIdMapping build() { - return new UserAttributeProfileStrategyOverridesUserIdMapping( - oidcMapping, samlMapping, scimMapping, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileTemplate.java b/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileTemplate.java deleted file mode 100644 index ae6ceb190..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileTemplate.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserAttributeProfileTemplate.Builder.class) -public final class UserAttributeProfileTemplate { - private final Optional name; - - private final Optional userId; - - private final Optional> userAttributes; - - private final Map additionalProperties; - - private UserAttributeProfileTemplate( - Optional name, - Optional userId, - Optional> userAttributes, - Map additionalProperties) { - this.name = name; - this.userId = userId; - this.userAttributes = userAttributes; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - @JsonProperty("user_attributes") - public Optional> getUserAttributes() { - return userAttributes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserAttributeProfileTemplate && equalTo((UserAttributeProfileTemplate) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserAttributeProfileTemplate other) { - return name.equals(other.name) && userId.equals(other.userId) && userAttributes.equals(other.userAttributes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.userId, this.userAttributes); - } - - @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 userId = Optional.empty(); - - private Optional> userAttributes = - Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserAttributeProfileTemplate other) { - name(other.getName()); - userId(other.getUserId()); - userAttributes(other.getUserAttributes()); - 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 = "user_id", nulls = Nulls.SKIP) - public Builder userId(Optional userId) { - this.userId = userId; - return this; - } - - public Builder userId(UserAttributeProfileUserId userId) { - this.userId = Optional.ofNullable(userId); - return this; - } - - @JsonSetter(value = "user_attributes", nulls = Nulls.SKIP) - public Builder userAttributes( - Optional> userAttributes) { - this.userAttributes = userAttributes; - return this; - } - - public Builder userAttributes( - Map userAttributes) { - this.userAttributes = Optional.ofNullable(userAttributes); - return this; - } - - public UserAttributeProfileTemplate build() { - return new UserAttributeProfileTemplate(name, userId, userAttributes, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileTemplateItem.java b/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileTemplateItem.java deleted file mode 100644 index bd6554dc2..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileTemplateItem.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserAttributeProfileTemplateItem.Builder.class) -public final class UserAttributeProfileTemplateItem { - private final Optional id; - - private final Optional displayName; - - private final Optional template; - - private final Map additionalProperties; - - private UserAttributeProfileTemplateItem( - Optional id, - Optional displayName, - Optional template, - Map additionalProperties) { - this.id = id; - this.displayName = displayName; - this.template = template; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the template. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The user-friendly name of the template displayed in the UI. - */ - @JsonProperty("display_name") - public Optional getDisplayName() { - return displayName; - } - - @JsonProperty("template") - public Optional getTemplate() { - return template; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserAttributeProfileTemplateItem && equalTo((UserAttributeProfileTemplateItem) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserAttributeProfileTemplateItem other) { - return id.equals(other.id) && displayName.equals(other.displayName) && template.equals(other.template); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.displayName, this.template); - } - - @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 displayName = Optional.empty(); - - private Optional template = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserAttributeProfileTemplateItem other) { - id(other.getId()); - displayName(other.getDisplayName()); - template(other.getTemplate()); - return this; - } - - /** - *

The id of the template.

- */ - @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 user-friendly name of the template displayed in the UI.

- */ - @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 = "template", nulls = Nulls.SKIP) - public Builder template(Optional template) { - this.template = template; - return this; - } - - public Builder template(UserAttributeProfileTemplate template) { - this.template = Optional.ofNullable(template); - return this; - } - - public UserAttributeProfileTemplateItem build() { - return new UserAttributeProfileTemplateItem(id, displayName, template, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileUserAttributeAdditionalProperties.java b/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileUserAttributeAdditionalProperties.java deleted file mode 100644 index 4f602575e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileUserAttributeAdditionalProperties.java +++ /dev/null @@ -1,375 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserAttributeProfileUserAttributeAdditionalProperties.Builder.class) -public final class UserAttributeProfileUserAttributeAdditionalProperties { - private final String description; - - private final String label; - - private final boolean profileRequired; - - private final String auth0Mapping; - - private final Optional oidcMapping; - - private final Optional> samlMapping; - - private final Optional scimMapping; - - private final Optional strategyOverrides; - - private final Map additionalProperties; - - private UserAttributeProfileUserAttributeAdditionalProperties( - String description, - String label, - boolean profileRequired, - String auth0Mapping, - Optional oidcMapping, - Optional> samlMapping, - Optional scimMapping, - Optional strategyOverrides, - Map additionalProperties) { - this.description = description; - this.label = label; - this.profileRequired = profileRequired; - this.auth0Mapping = auth0Mapping; - this.oidcMapping = oidcMapping; - this.samlMapping = samlMapping; - this.scimMapping = scimMapping; - this.strategyOverrides = strategyOverrides; - this.additionalProperties = additionalProperties; - } - - /** - * @return Description of this attribute - */ - @JsonProperty("description") - public String getDescription() { - return description; - } - - /** - * @return Display label for this attribute - */ - @JsonProperty("label") - public String getLabel() { - return label; - } - - /** - * @return Whether this attribute is required in the profile - */ - @JsonProperty("profile_required") - public boolean getProfileRequired() { - return profileRequired; - } - - /** - * @return Auth0 mapping for this attribute - */ - @JsonProperty("auth0_mapping") - public String getAuth0Mapping() { - return auth0Mapping; - } - - @JsonProperty("oidc_mapping") - public Optional getOidcMapping() { - return oidcMapping; - } - - @JsonProperty("saml_mapping") - public Optional> getSamlMapping() { - return samlMapping; - } - - /** - * @return SCIM mapping for this attribute - */ - @JsonProperty("scim_mapping") - public Optional getScimMapping() { - return scimMapping; - } - - @JsonProperty("strategy_overrides") - public Optional getStrategyOverrides() { - return strategyOverrides; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserAttributeProfileUserAttributeAdditionalProperties - && equalTo((UserAttributeProfileUserAttributeAdditionalProperties) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserAttributeProfileUserAttributeAdditionalProperties other) { - return description.equals(other.description) - && label.equals(other.label) - && profileRequired == other.profileRequired - && auth0Mapping.equals(other.auth0Mapping) - && oidcMapping.equals(other.oidcMapping) - && samlMapping.equals(other.samlMapping) - && scimMapping.equals(other.scimMapping) - && strategyOverrides.equals(other.strategyOverrides); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.description, - this.label, - this.profileRequired, - this.auth0Mapping, - this.oidcMapping, - this.samlMapping, - this.scimMapping, - this.strategyOverrides); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static DescriptionStage builder() { - return new Builder(); - } - - public interface DescriptionStage { - /** - *

Description of this attribute

- */ - LabelStage description(@NotNull String description); - - Builder from(UserAttributeProfileUserAttributeAdditionalProperties other); - } - - public interface LabelStage { - /** - *

Display label for this attribute

- */ - ProfileRequiredStage label(@NotNull String label); - } - - public interface ProfileRequiredStage { - /** - *

Whether this attribute is required in the profile

- */ - Auth0MappingStage profileRequired(boolean profileRequired); - } - - public interface Auth0MappingStage { - /** - *

Auth0 mapping for this attribute

- */ - _FinalStage auth0Mapping(@NotNull String auth0Mapping); - } - - public interface _FinalStage { - UserAttributeProfileUserAttributeAdditionalProperties build(); - - _FinalStage oidcMapping(Optional oidcMapping); - - _FinalStage oidcMapping(UserAttributeProfileOidcMapping oidcMapping); - - _FinalStage samlMapping(Optional> samlMapping); - - _FinalStage samlMapping(List samlMapping); - - /** - *

SCIM mapping for this attribute

- */ - _FinalStage scimMapping(Optional scimMapping); - - _FinalStage scimMapping(String scimMapping); - - _FinalStage strategyOverrides(Optional strategyOverrides); - - _FinalStage strategyOverrides(UserAttributeProfileStrategyOverrides strategyOverrides); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements DescriptionStage, LabelStage, ProfileRequiredStage, Auth0MappingStage, _FinalStage { - private String description; - - private String label; - - private boolean profileRequired; - - private String auth0Mapping; - - private Optional strategyOverrides = Optional.empty(); - - private Optional scimMapping = Optional.empty(); - - private Optional> samlMapping = Optional.empty(); - - private Optional oidcMapping = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UserAttributeProfileUserAttributeAdditionalProperties other) { - description(other.getDescription()); - label(other.getLabel()); - profileRequired(other.getProfileRequired()); - auth0Mapping(other.getAuth0Mapping()); - oidcMapping(other.getOidcMapping()); - samlMapping(other.getSamlMapping()); - scimMapping(other.getScimMapping()); - strategyOverrides(other.getStrategyOverrides()); - return this; - } - - /** - *

Description of this attribute

- *

Description of this attribute

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("description") - public LabelStage description(@NotNull String description) { - this.description = Objects.requireNonNull(description, "description must not be null"); - return this; - } - - /** - *

Display label for this attribute

- *

Display label for this attribute

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("label") - public ProfileRequiredStage label(@NotNull String label) { - this.label = Objects.requireNonNull(label, "label must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("profile_required") - public Auth0MappingStage profileRequired(boolean profileRequired) { - this.profileRequired = profileRequired; - return this; - } - - /** - *

Auth0 mapping for this attribute

- *

Auth0 mapping for this attribute

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("auth0_mapping") - public _FinalStage auth0Mapping(@NotNull String auth0Mapping) { - this.auth0Mapping = Objects.requireNonNull(auth0Mapping, "auth0Mapping must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage strategyOverrides(UserAttributeProfileStrategyOverrides strategyOverrides) { - this.strategyOverrides = Optional.ofNullable(strategyOverrides); - return this; - } - - @java.lang.Override - @JsonSetter(value = "strategy_overrides", nulls = Nulls.SKIP) - public _FinalStage strategyOverrides(Optional strategyOverrides) { - this.strategyOverrides = strategyOverrides; - return this; - } - - /** - *

SCIM mapping for this attribute

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage scimMapping(String scimMapping) { - this.scimMapping = Optional.ofNullable(scimMapping); - return this; - } - - /** - *

SCIM mapping for this attribute

- */ - @java.lang.Override - @JsonSetter(value = "scim_mapping", nulls = Nulls.SKIP) - public _FinalStage scimMapping(Optional scimMapping) { - this.scimMapping = scimMapping; - return this; - } - - @java.lang.Override - public _FinalStage samlMapping(List samlMapping) { - this.samlMapping = Optional.ofNullable(samlMapping); - return this; - } - - @java.lang.Override - @JsonSetter(value = "saml_mapping", nulls = Nulls.SKIP) - public _FinalStage samlMapping(Optional> samlMapping) { - this.samlMapping = samlMapping; - return this; - } - - @java.lang.Override - public _FinalStage oidcMapping(UserAttributeProfileOidcMapping oidcMapping) { - this.oidcMapping = Optional.ofNullable(oidcMapping); - return this; - } - - @java.lang.Override - @JsonSetter(value = "oidc_mapping", nulls = Nulls.SKIP) - public _FinalStage oidcMapping(Optional oidcMapping) { - this.oidcMapping = oidcMapping; - return this; - } - - @java.lang.Override - public UserAttributeProfileUserAttributeAdditionalProperties build() { - return new UserAttributeProfileUserAttributeAdditionalProperties( - description, - label, - profileRequired, - auth0Mapping, - oidcMapping, - samlMapping, - scimMapping, - strategyOverrides, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileUserId.java b/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileUserId.java deleted file mode 100644 index 68b3ce4ea..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileUserId.java +++ /dev/null @@ -1,177 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserAttributeProfileUserId.Builder.class) -public final class UserAttributeProfileUserId { - private final Optional oidcMapping; - - private final Optional> samlMapping; - - private final Optional scimMapping; - - private final Optional strategyOverrides; - - private final Map additionalProperties; - - private UserAttributeProfileUserId( - Optional oidcMapping, - Optional> samlMapping, - Optional scimMapping, - Optional strategyOverrides, - Map additionalProperties) { - this.oidcMapping = oidcMapping; - this.samlMapping = samlMapping; - this.scimMapping = scimMapping; - this.strategyOverrides = strategyOverrides; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("oidc_mapping") - public Optional getOidcMapping() { - return oidcMapping; - } - - @JsonProperty("saml_mapping") - public Optional> getSamlMapping() { - return samlMapping; - } - - /** - * @return SCIM mapping for user ID - */ - @JsonProperty("scim_mapping") - public Optional getScimMapping() { - return scimMapping; - } - - @JsonProperty("strategy_overrides") - public Optional getStrategyOverrides() { - return strategyOverrides; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserAttributeProfileUserId && equalTo((UserAttributeProfileUserId) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserAttributeProfileUserId other) { - return oidcMapping.equals(other.oidcMapping) - && samlMapping.equals(other.samlMapping) - && scimMapping.equals(other.scimMapping) - && strategyOverrides.equals(other.strategyOverrides); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.oidcMapping, this.samlMapping, this.scimMapping, this.strategyOverrides); - } - - @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 oidcMapping = Optional.empty(); - - private Optional> samlMapping = Optional.empty(); - - private Optional scimMapping = Optional.empty(); - - private Optional strategyOverrides = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserAttributeProfileUserId other) { - oidcMapping(other.getOidcMapping()); - samlMapping(other.getSamlMapping()); - scimMapping(other.getScimMapping()); - strategyOverrides(other.getStrategyOverrides()); - return this; - } - - @JsonSetter(value = "oidc_mapping", nulls = Nulls.SKIP) - public Builder oidcMapping(Optional oidcMapping) { - this.oidcMapping = oidcMapping; - return this; - } - - public Builder oidcMapping(UserAttributeProfileUserIdOidcMappingEnum oidcMapping) { - this.oidcMapping = Optional.ofNullable(oidcMapping); - return this; - } - - @JsonSetter(value = "saml_mapping", nulls = Nulls.SKIP) - public Builder samlMapping(Optional> samlMapping) { - this.samlMapping = samlMapping; - return this; - } - - public Builder samlMapping(List samlMapping) { - this.samlMapping = Optional.ofNullable(samlMapping); - return this; - } - - /** - *

SCIM mapping for user ID

- */ - @JsonSetter(value = "scim_mapping", nulls = Nulls.SKIP) - public Builder scimMapping(Optional scimMapping) { - this.scimMapping = scimMapping; - return this; - } - - public Builder scimMapping(String scimMapping) { - this.scimMapping = Optional.ofNullable(scimMapping); - return this; - } - - @JsonSetter(value = "strategy_overrides", nulls = Nulls.SKIP) - public Builder strategyOverrides(Optional strategyOverrides) { - this.strategyOverrides = strategyOverrides; - return this; - } - - public Builder strategyOverrides(UserAttributeProfileStrategyOverridesUserId strategyOverrides) { - this.strategyOverrides = Optional.ofNullable(strategyOverrides); - return this; - } - - public UserAttributeProfileUserId build() { - return new UserAttributeProfileUserId( - oidcMapping, samlMapping, scimMapping, strategyOverrides, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileUserIdOidcMappingEnum.java b/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileUserIdOidcMappingEnum.java deleted file mode 100644 index d2ce7e1b0..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileUserIdOidcMappingEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class UserAttributeProfileUserIdOidcMappingEnum { - public static final UserAttributeProfileUserIdOidcMappingEnum SUB = - new UserAttributeProfileUserIdOidcMappingEnum(Value.SUB, "sub"); - - private final Value value; - - private final String string; - - UserAttributeProfileUserIdOidcMappingEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof UserAttributeProfileUserIdOidcMappingEnum - && this.string.equals(((UserAttributeProfileUserIdOidcMappingEnum) 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 UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static UserAttributeProfileUserIdOidcMappingEnum valueOf(String value) { - switch (value) { - case "sub": - return SUB; - default: - return new UserAttributeProfileUserIdOidcMappingEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - SUB, - - UNKNOWN - } - - public interface Visitor { - T visitSub(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileUserIdOidcStrategyOverrideMapping.java b/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileUserIdOidcStrategyOverrideMapping.java deleted file mode 100644 index 0285a1e01..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserAttributeProfileUserIdOidcStrategyOverrideMapping.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class UserAttributeProfileUserIdOidcStrategyOverrideMapping { - public static final UserAttributeProfileUserIdOidcStrategyOverrideMapping EMAIL = - new UserAttributeProfileUserIdOidcStrategyOverrideMapping(Value.EMAIL, "email"); - - public static final UserAttributeProfileUserIdOidcStrategyOverrideMapping SUB = - new UserAttributeProfileUserIdOidcStrategyOverrideMapping(Value.SUB, "sub"); - - public static final UserAttributeProfileUserIdOidcStrategyOverrideMapping OID = - new UserAttributeProfileUserIdOidcStrategyOverrideMapping(Value.OID, "oid"); - - private final Value value; - - private final String string; - - UserAttributeProfileUserIdOidcStrategyOverrideMapping(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof UserAttributeProfileUserIdOidcStrategyOverrideMapping - && this.string.equals(((UserAttributeProfileUserIdOidcStrategyOverrideMapping) 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 SUB: - return visitor.visitSub(); - case OID: - return visitor.visitOid(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static UserAttributeProfileUserIdOidcStrategyOverrideMapping valueOf(String value) { - switch (value) { - case "email": - return EMAIL; - case "sub": - return SUB; - case "oid": - return OID; - default: - return new UserAttributeProfileUserIdOidcStrategyOverrideMapping(Value.UNKNOWN, value); - } - } - - public enum Value { - SUB, - - OID, - - EMAIL, - - UNKNOWN - } - - public interface Visitor { - T visitSub(); - - T visitOid(); - - T visitEmail(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAuthenticationMethod.java b/src/main/java/com/auth0/client/mgmt/types/UserAuthenticationMethod.java deleted file mode 100644 index 0029e96da..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserAuthenticationMethod.java +++ /dev/null @@ -1,928 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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 = UserAuthenticationMethod.Builder.class) -public final class UserAuthenticationMethod { - private final String id; - - private final AuthenticationMethodTypeEnum type; - - private final Optional confirmed; - - private final Optional name; - - private final Optional> authenticationMethods; - - private final Optional preferredAuthenticationMethod; - - private final Optional linkId; - - private final Optional phoneNumber; - - private final Optional email; - - private final Optional keyId; - - private final Optional publicKey; - - private final OffsetDateTime createdAt; - - private final Optional enrolledAt; - - private final Optional lastAuthAt; - - private final Optional credentialDeviceType; - - private final Optional credentialBackedUp; - - private final Optional identityUserId; - - private final Optional userAgent; - - private final Optional aaguid; - - private final Optional relyingPartyIdentifier; - - private final Map additionalProperties; - - private UserAuthenticationMethod( - String id, - AuthenticationMethodTypeEnum type, - Optional confirmed, - Optional name, - Optional> authenticationMethods, - Optional preferredAuthenticationMethod, - Optional linkId, - Optional phoneNumber, - Optional email, - Optional keyId, - Optional publicKey, - OffsetDateTime createdAt, - Optional enrolledAt, - Optional lastAuthAt, - Optional credentialDeviceType, - Optional credentialBackedUp, - Optional identityUserId, - Optional userAgent, - Optional aaguid, - Optional relyingPartyIdentifier, - Map additionalProperties) { - this.id = id; - this.type = type; - this.confirmed = confirmed; - this.name = name; - this.authenticationMethods = authenticationMethods; - this.preferredAuthenticationMethod = preferredAuthenticationMethod; - this.linkId = linkId; - this.phoneNumber = phoneNumber; - this.email = email; - this.keyId = keyId; - this.publicKey = publicKey; - this.createdAt = createdAt; - this.enrolledAt = enrolledAt; - this.lastAuthAt = lastAuthAt; - this.credentialDeviceType = credentialDeviceType; - this.credentialBackedUp = credentialBackedUp; - this.identityUserId = identityUserId; - this.userAgent = userAgent; - this.aaguid = aaguid; - this.relyingPartyIdentifier = relyingPartyIdentifier; - this.additionalProperties = additionalProperties; - } - - /** - * @return The ID of the authentication method (auto generated) - */ - @JsonProperty("id") - public String getId() { - return id; - } - - @JsonProperty("type") - public AuthenticationMethodTypeEnum getType() { - return type; - } - - /** - * @return The authentication method status - */ - @JsonProperty("confirmed") - public Optional getConfirmed() { - return confirmed; - } - - /** - * @return A human-readable label to identify the authentication method - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("authentication_methods") - public Optional> getAuthenticationMethods() { - return authenticationMethods; - } - - @JsonProperty("preferred_authentication_method") - public Optional getPreferredAuthenticationMethod() { - return preferredAuthenticationMethod; - } - - /** - * @return The ID of a linked authentication method. Linked authentication methods will be deleted together. - */ - @JsonProperty("link_id") - public Optional getLinkId() { - return linkId; - } - - /** - * @return Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice. - */ - @JsonProperty("phone_number") - public Optional getPhoneNumber() { - return phoneNumber; - } - - /** - * @return Applies to email and email-verification authentication methods only. The email address used to send verification messages. - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - /** - * @return Applies to webauthn authentication methods only. The ID of the generated credential. - */ - @JsonProperty("key_id") - public Optional getKeyId() { - return keyId; - } - - /** - * @return Applies to webauthn authentication methods only. The public key. - */ - @JsonProperty("public_key") - public Optional getPublicKey() { - return publicKey; - } - - /** - * @return Authenticator creation date - */ - @JsonProperty("created_at") - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * @return Enrollment date - */ - @JsonProperty("enrolled_at") - public Optional getEnrolledAt() { - return enrolledAt; - } - - /** - * @return Last authentication - */ - @JsonProperty("last_auth_at") - public Optional getLastAuthAt() { - return lastAuthAt; - } - - /** - * @return Applies to passkeys only. The kind of device the credential is stored on as defined by backup eligibility. "single_device" credentials cannot be backed up and synced to another device, "multi_device" credentials can be backed up if enabled by the end-user. - */ - @JsonProperty("credential_device_type") - public Optional getCredentialDeviceType() { - return credentialDeviceType; - } - - /** - * @return Applies to passkeys only. Whether the credential was backed up. - */ - @JsonProperty("credential_backed_up") - public Optional getCredentialBackedUp() { - return credentialBackedUp; - } - - /** - * @return Applies to passkeys only. The ID of the user identity linked with the authentication method. - */ - @JsonProperty("identity_user_id") - public Optional getIdentityUserId() { - return identityUserId; - } - - /** - * @return Applies to passkeys only. The user-agent of the browser used to create the passkey. - */ - @JsonProperty("user_agent") - public Optional getUserAgent() { - return userAgent; - } - - /** - * @return Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier. - */ - @JsonProperty("aaguid") - public Optional getAaguid() { - return aaguid; - } - - /** - * @return Applies to webauthn/passkey authentication methods only. The credential's relying party identifier. - */ - @JsonProperty("relying_party_identifier") - public Optional getRelyingPartyIdentifier() { - return relyingPartyIdentifier; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserAuthenticationMethod && equalTo((UserAuthenticationMethod) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserAuthenticationMethod other) { - return id.equals(other.id) - && type.equals(other.type) - && confirmed.equals(other.confirmed) - && name.equals(other.name) - && authenticationMethods.equals(other.authenticationMethods) - && preferredAuthenticationMethod.equals(other.preferredAuthenticationMethod) - && linkId.equals(other.linkId) - && phoneNumber.equals(other.phoneNumber) - && email.equals(other.email) - && keyId.equals(other.keyId) - && publicKey.equals(other.publicKey) - && createdAt.equals(other.createdAt) - && enrolledAt.equals(other.enrolledAt) - && lastAuthAt.equals(other.lastAuthAt) - && credentialDeviceType.equals(other.credentialDeviceType) - && credentialBackedUp.equals(other.credentialBackedUp) - && identityUserId.equals(other.identityUserId) - && userAgent.equals(other.userAgent) - && aaguid.equals(other.aaguid) - && relyingPartyIdentifier.equals(other.relyingPartyIdentifier); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.type, - this.confirmed, - this.name, - this.authenticationMethods, - this.preferredAuthenticationMethod, - this.linkId, - this.phoneNumber, - this.email, - this.keyId, - this.publicKey, - this.createdAt, - this.enrolledAt, - this.lastAuthAt, - this.credentialDeviceType, - this.credentialBackedUp, - this.identityUserId, - this.userAgent, - this.aaguid, - this.relyingPartyIdentifier); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static IdStage builder() { - return new Builder(); - } - - public interface IdStage { - /** - *

The ID of the authentication method (auto generated)

- */ - TypeStage id(@NotNull String id); - - Builder from(UserAuthenticationMethod other); - } - - public interface TypeStage { - CreatedAtStage type(@NotNull AuthenticationMethodTypeEnum type); - } - - public interface CreatedAtStage { - /** - *

Authenticator creation date

- */ - _FinalStage createdAt(@NotNull OffsetDateTime createdAt); - } - - public interface _FinalStage { - UserAuthenticationMethod build(); - - /** - *

The authentication method status

- */ - _FinalStage confirmed(Optional confirmed); - - _FinalStage confirmed(Boolean confirmed); - - /** - *

A human-readable label to identify the authentication method

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - _FinalStage authenticationMethods(Optional> authenticationMethods); - - _FinalStage authenticationMethods(List authenticationMethods); - - _FinalStage preferredAuthenticationMethod( - Optional preferredAuthenticationMethod); - - _FinalStage preferredAuthenticationMethod(PreferredAuthenticationMethodEnum preferredAuthenticationMethod); - - /** - *

The ID of a linked authentication method. Linked authentication methods will be deleted together.

- */ - _FinalStage linkId(Optional linkId); - - _FinalStage linkId(String linkId); - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- */ - _FinalStage phoneNumber(Optional phoneNumber); - - _FinalStage phoneNumber(String phoneNumber); - - /** - *

Applies to email and email-verification authentication methods only. The email address used to send verification messages.

- */ - _FinalStage email(Optional email); - - _FinalStage email(String email); - - /** - *

Applies to webauthn authentication methods only. The ID of the generated credential.

- */ - _FinalStage keyId(Optional keyId); - - _FinalStage keyId(String keyId); - - /** - *

Applies to webauthn authentication methods only. The public key.

- */ - _FinalStage publicKey(Optional publicKey); - - _FinalStage publicKey(String publicKey); - - /** - *

Enrollment date

- */ - _FinalStage enrolledAt(Optional enrolledAt); - - _FinalStage enrolledAt(OffsetDateTime enrolledAt); - - /** - *

Last authentication

- */ - _FinalStage lastAuthAt(Optional lastAuthAt); - - _FinalStage lastAuthAt(OffsetDateTime lastAuthAt); - - /** - *

Applies to passkeys only. The kind of device the credential is stored on as defined by backup eligibility. "single_device" credentials cannot be backed up and synced to another device, "multi_device" credentials can be backed up if enabled by the end-user.

- */ - _FinalStage credentialDeviceType(Optional credentialDeviceType); - - _FinalStage credentialDeviceType(String credentialDeviceType); - - /** - *

Applies to passkeys only. Whether the credential was backed up.

- */ - _FinalStage credentialBackedUp(Optional credentialBackedUp); - - _FinalStage credentialBackedUp(Boolean credentialBackedUp); - - /** - *

Applies to passkeys only. The ID of the user identity linked with the authentication method.

- */ - _FinalStage identityUserId(Optional identityUserId); - - _FinalStage identityUserId(String identityUserId); - - /** - *

Applies to passkeys only. The user-agent of the browser used to create the passkey.

- */ - _FinalStage userAgent(Optional userAgent); - - _FinalStage userAgent(String userAgent); - - /** - *

Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier.

- */ - _FinalStage aaguid(Optional aaguid); - - _FinalStage aaguid(String aaguid); - - /** - *

Applies to webauthn/passkey authentication methods only. The credential's relying party identifier.

- */ - _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier); - - _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements IdStage, TypeStage, CreatedAtStage, _FinalStage { - private String id; - - private AuthenticationMethodTypeEnum type; - - private OffsetDateTime createdAt; - - private Optional relyingPartyIdentifier = Optional.empty(); - - private Optional aaguid = Optional.empty(); - - private Optional userAgent = Optional.empty(); - - private Optional identityUserId = Optional.empty(); - - private Optional credentialBackedUp = Optional.empty(); - - private Optional credentialDeviceType = Optional.empty(); - - private Optional lastAuthAt = Optional.empty(); - - private Optional enrolledAt = Optional.empty(); - - private Optional publicKey = Optional.empty(); - - private Optional keyId = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional phoneNumber = Optional.empty(); - - private Optional linkId = Optional.empty(); - - private Optional preferredAuthenticationMethod = Optional.empty(); - - private Optional> authenticationMethods = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional confirmed = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UserAuthenticationMethod other) { - id(other.getId()); - type(other.getType()); - confirmed(other.getConfirmed()); - name(other.getName()); - authenticationMethods(other.getAuthenticationMethods()); - preferredAuthenticationMethod(other.getPreferredAuthenticationMethod()); - linkId(other.getLinkId()); - phoneNumber(other.getPhoneNumber()); - email(other.getEmail()); - keyId(other.getKeyId()); - publicKey(other.getPublicKey()); - createdAt(other.getCreatedAt()); - enrolledAt(other.getEnrolledAt()); - lastAuthAt(other.getLastAuthAt()); - credentialDeviceType(other.getCredentialDeviceType()); - credentialBackedUp(other.getCredentialBackedUp()); - identityUserId(other.getIdentityUserId()); - userAgent(other.getUserAgent()); - aaguid(other.getAaguid()); - relyingPartyIdentifier(other.getRelyingPartyIdentifier()); - return this; - } - - /** - *

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. - */ - @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 CreatedAtStage type(@NotNull AuthenticationMethodTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

Authenticator creation date

- *

Authenticator creation date

- * @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; - } - - /** - *

Applies to webauthn/passkey authentication methods only. The credential's relying party identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier) { - this.relyingPartyIdentifier = Optional.ofNullable(relyingPartyIdentifier); - return this; - } - - /** - *

Applies to webauthn/passkey authentication methods only. The credential's relying party identifier.

- */ - @java.lang.Override - @JsonSetter(value = "relying_party_identifier", nulls = Nulls.SKIP) - public _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier) { - this.relyingPartyIdentifier = relyingPartyIdentifier; - return this; - } - - /** - *

Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage aaguid(String aaguid) { - this.aaguid = Optional.ofNullable(aaguid); - return this; - } - - /** - *

Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier.

- */ - @java.lang.Override - @JsonSetter(value = "aaguid", nulls = Nulls.SKIP) - public _FinalStage aaguid(Optional aaguid) { - this.aaguid = aaguid; - return this; - } - - /** - *

Applies to passkeys only. The user-agent of the browser used to create the passkey.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage userAgent(String userAgent) { - this.userAgent = Optional.ofNullable(userAgent); - return this; - } - - /** - *

Applies to passkeys only. The user-agent of the browser used to create the passkey.

- */ - @java.lang.Override - @JsonSetter(value = "user_agent", nulls = Nulls.SKIP) - public _FinalStage userAgent(Optional userAgent) { - this.userAgent = userAgent; - return this; - } - - /** - *

Applies to passkeys only. The ID of the user identity linked with the authentication method.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage identityUserId(String identityUserId) { - this.identityUserId = Optional.ofNullable(identityUserId); - return this; - } - - /** - *

Applies to passkeys only. The ID of the user identity linked with the authentication method.

- */ - @java.lang.Override - @JsonSetter(value = "identity_user_id", nulls = Nulls.SKIP) - public _FinalStage identityUserId(Optional identityUserId) { - this.identityUserId = identityUserId; - return this; - } - - /** - *

Applies to passkeys only. Whether the credential was backed up.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage credentialBackedUp(Boolean credentialBackedUp) { - this.credentialBackedUp = Optional.ofNullable(credentialBackedUp); - return this; - } - - /** - *

Applies to passkeys only. Whether the credential was backed up.

- */ - @java.lang.Override - @JsonSetter(value = "credential_backed_up", nulls = Nulls.SKIP) - public _FinalStage credentialBackedUp(Optional credentialBackedUp) { - this.credentialBackedUp = credentialBackedUp; - return this; - } - - /** - *

Applies to passkeys only. The kind of device the credential is stored on as defined by backup eligibility. "single_device" credentials cannot be backed up and synced to another device, "multi_device" credentials can be backed up if enabled by the end-user.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage credentialDeviceType(String credentialDeviceType) { - this.credentialDeviceType = Optional.ofNullable(credentialDeviceType); - return this; - } - - /** - *

Applies to passkeys only. The kind of device the credential is stored on as defined by backup eligibility. "single_device" credentials cannot be backed up and synced to another device, "multi_device" credentials can be backed up if enabled by the end-user.

- */ - @java.lang.Override - @JsonSetter(value = "credential_device_type", nulls = Nulls.SKIP) - public _FinalStage credentialDeviceType(Optional credentialDeviceType) { - this.credentialDeviceType = credentialDeviceType; - return this; - } - - /** - *

Last authentication

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage lastAuthAt(OffsetDateTime lastAuthAt) { - this.lastAuthAt = Optional.ofNullable(lastAuthAt); - return this; - } - - /** - *

Last authentication

- */ - @java.lang.Override - @JsonSetter(value = "last_auth_at", nulls = Nulls.SKIP) - public _FinalStage lastAuthAt(Optional lastAuthAt) { - this.lastAuthAt = lastAuthAt; - return this; - } - - /** - *

Enrollment date

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage enrolledAt(OffsetDateTime enrolledAt) { - this.enrolledAt = Optional.ofNullable(enrolledAt); - return this; - } - - /** - *

Enrollment date

- */ - @java.lang.Override - @JsonSetter(value = "enrolled_at", nulls = Nulls.SKIP) - public _FinalStage enrolledAt(Optional enrolledAt) { - this.enrolledAt = enrolledAt; - return this; - } - - /** - *

Applies to webauthn authentication methods only. The public key.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage publicKey(String publicKey) { - this.publicKey = Optional.ofNullable(publicKey); - return this; - } - - /** - *

Applies to webauthn authentication methods only. The public key.

- */ - @java.lang.Override - @JsonSetter(value = "public_key", nulls = Nulls.SKIP) - public _FinalStage publicKey(Optional publicKey) { - this.publicKey = publicKey; - return this; - } - - /** - *

Applies to webauthn authentication methods only. The ID of the generated credential.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage keyId(String keyId) { - this.keyId = Optional.ofNullable(keyId); - return this; - } - - /** - *

Applies to webauthn authentication methods only. The ID of the generated credential.

- */ - @java.lang.Override - @JsonSetter(value = "key_id", nulls = Nulls.SKIP) - public _FinalStage keyId(Optional keyId) { - this.keyId = keyId; - return this; - } - - /** - *

Applies to email and email-verification authentication methods only. The email address used to send verification messages.

- * @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; - } - - /** - *

Applies to email and email-verification authentication methods only. The email address used to send verification messages.

- */ - @java.lang.Override - @JsonSetter(value = "email", nulls = Nulls.SKIP) - public _FinalStage email(Optional email) { - this.email = email; - return this; - } - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- * @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; - } - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- */ - @java.lang.Override - @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) - public _FinalStage phoneNumber(Optional phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - *

The ID of a linked authentication method. Linked authentication methods will be deleted together.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage linkId(String linkId) { - this.linkId = Optional.ofNullable(linkId); - return this; - } - - /** - *

The ID of a linked authentication method. Linked authentication methods will be deleted together.

- */ - @java.lang.Override - @JsonSetter(value = "link_id", nulls = Nulls.SKIP) - public _FinalStage linkId(Optional linkId) { - this.linkId = linkId; - return this; - } - - @java.lang.Override - public _FinalStage preferredAuthenticationMethod( - PreferredAuthenticationMethodEnum preferredAuthenticationMethod) { - this.preferredAuthenticationMethod = Optional.ofNullable(preferredAuthenticationMethod); - return this; - } - - @java.lang.Override - @JsonSetter(value = "preferred_authentication_method", nulls = Nulls.SKIP) - public _FinalStage preferredAuthenticationMethod( - Optional preferredAuthenticationMethod) { - this.preferredAuthenticationMethod = preferredAuthenticationMethod; - return this; - } - - @java.lang.Override - public _FinalStage authenticationMethods(List authenticationMethods) { - this.authenticationMethods = Optional.ofNullable(authenticationMethods); - return this; - } - - @java.lang.Override - @JsonSetter(value = "authentication_methods", nulls = Nulls.SKIP) - public _FinalStage authenticationMethods( - Optional> authenticationMethods) { - this.authenticationMethods = authenticationMethods; - return this; - } - - /** - *

A human-readable label to identify the authentication method

- * @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; - } - - /** - *

A human-readable label to identify the authentication method

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - /** - *

The authentication method status

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage confirmed(Boolean confirmed) { - this.confirmed = Optional.ofNullable(confirmed); - return this; - } - - /** - *

The authentication method status

- */ - @java.lang.Override - @JsonSetter(value = "confirmed", nulls = Nulls.SKIP) - public _FinalStage confirmed(Optional confirmed) { - this.confirmed = confirmed; - return this; - } - - @java.lang.Override - public UserAuthenticationMethod build() { - return new UserAuthenticationMethod( - id, - type, - confirmed, - name, - authenticationMethods, - preferredAuthenticationMethod, - linkId, - phoneNumber, - email, - keyId, - publicKey, - createdAt, - enrolledAt, - lastAuthAt, - credentialDeviceType, - credentialBackedUp, - identityUserId, - userAgent, - aaguid, - relyingPartyIdentifier, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAuthenticationMethodProperties.java b/src/main/java/com/auth0/client/mgmt/types/UserAuthenticationMethodProperties.java deleted file mode 100644 index 9893bebd1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserAuthenticationMethodProperties.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserAuthenticationMethodProperties.Builder.class) -public final class UserAuthenticationMethodProperties { - private final Optional type; - - private final Optional id; - - private final Map additionalProperties; - - private UserAuthenticationMethodProperties( - Optional type, - Optional id, - Map additionalProperties) { - this.type = type; - this.id = id; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public Optional getType() { - return type; - } - - @JsonProperty("id") - public Optional getId() { - return id; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserAuthenticationMethodProperties - && equalTo((UserAuthenticationMethodProperties) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserAuthenticationMethodProperties other) { - return type.equals(other.type) && id.equals(other.id); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.type, this.id); - } - - @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 type = Optional.empty(); - - private Optional id = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserAuthenticationMethodProperties other) { - type(other.getType()); - id(other.getId()); - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(UserAuthenticationMethodPropertiesEnum type) { - this.type = Optional.ofNullable(type); - 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; - } - - public UserAuthenticationMethodProperties build() { - return new UserAuthenticationMethodProperties(type, id, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserAuthenticationMethodPropertiesEnum.java b/src/main/java/com/auth0/client/mgmt/types/UserAuthenticationMethodPropertiesEnum.java deleted file mode 100644 index 1ef03fe1a..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserAuthenticationMethodPropertiesEnum.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class UserAuthenticationMethodPropertiesEnum { - public static final UserAuthenticationMethodPropertiesEnum TOTP = - new UserAuthenticationMethodPropertiesEnum(Value.TOTP, "totp"); - - public static final UserAuthenticationMethodPropertiesEnum PUSH = - new UserAuthenticationMethodPropertiesEnum(Value.PUSH, "push"); - - public static final UserAuthenticationMethodPropertiesEnum VOICE = - new UserAuthenticationMethodPropertiesEnum(Value.VOICE, "voice"); - - public static final UserAuthenticationMethodPropertiesEnum SMS = - new UserAuthenticationMethodPropertiesEnum(Value.SMS, "sms"); - - private final Value value; - - private final String string; - - UserAuthenticationMethodPropertiesEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof UserAuthenticationMethodPropertiesEnum - && this.string.equals(((UserAuthenticationMethodPropertiesEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case TOTP: - return visitor.visitTotp(); - case PUSH: - return visitor.visitPush(); - case VOICE: - return visitor.visitVoice(); - case SMS: - return visitor.visitSms(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static UserAuthenticationMethodPropertiesEnum valueOf(String value) { - switch (value) { - case "totp": - return TOTP; - case "push": - return PUSH; - case "voice": - return VOICE; - case "sms": - return SMS; - default: - return new UserAuthenticationMethodPropertiesEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - TOTP, - - PUSH, - - SMS, - - VOICE, - - UNKNOWN - } - - public interface Visitor { - T visitTotp(); - - T visitPush(); - - T visitSms(); - - T visitVoice(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserBlockIdentifier.java b/src/main/java/com/auth0/client/mgmt/types/UserBlockIdentifier.java deleted file mode 100644 index 1149c8ddd..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserBlockIdentifier.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserBlockIdentifier.Builder.class) -public final class UserBlockIdentifier { - private final Optional identifier; - - private final Optional ip; - - private final Optional connection; - - private final Map additionalProperties; - - private UserBlockIdentifier( - Optional identifier, - Optional ip, - Optional connection, - Map additionalProperties) { - this.identifier = identifier; - this.ip = ip; - this.connection = connection; - this.additionalProperties = additionalProperties; - } - - /** - * @return Identifier (should be any of an email, username, or phone_number) - */ - @JsonProperty("identifier") - public Optional getIdentifier() { - return identifier; - } - - /** - * @return IP Address - */ - @JsonProperty("ip") - public Optional getIp() { - return ip; - } - - /** - * @return Connection identifier - */ - @JsonProperty("connection") - public Optional getConnection() { - return connection; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserBlockIdentifier && equalTo((UserBlockIdentifier) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserBlockIdentifier other) { - return identifier.equals(other.identifier) && ip.equals(other.ip) && connection.equals(other.connection); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.identifier, this.ip, this.connection); - } - - @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 identifier = Optional.empty(); - - private Optional ip = Optional.empty(); - - private Optional connection = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserBlockIdentifier other) { - identifier(other.getIdentifier()); - ip(other.getIp()); - connection(other.getConnection()); - return this; - } - - /** - *

Identifier (should be any of an email, username, or phone_number)

- */ - @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; - } - - /** - *

IP Address

- */ - @JsonSetter(value = "ip", nulls = Nulls.SKIP) - public Builder ip(Optional ip) { - this.ip = ip; - return this; - } - - public Builder ip(String ip) { - this.ip = Optional.ofNullable(ip); - return this; - } - - /** - *

Connection identifier

- */ - @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; - } - - public UserBlockIdentifier build() { - return new UserBlockIdentifier(identifier, ip, connection, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserDateSchema.java b/src/main/java/com/auth0/client/mgmt/types/UserDateSchema.java deleted file mode 100644 index 425e496ae..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserDateSchema.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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.Map; -import java.util.Objects; - -@JsonDeserialize(using = UserDateSchema.Deserializer.class) -public final class UserDateSchema { - private final Object value; - - private final int type; - - private UserDateSchema(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((Map) 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 UserDateSchema && equalTo((UserDateSchema) other); - } - - private boolean equalTo(UserDateSchema 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 UserDateSchema of(String value) { - return new UserDateSchema(value, 0); - } - - public static UserDateSchema of(Map value) { - return new UserDateSchema(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(Map value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(UserDateSchema.class); - } - - @java.lang.Override - public UserDateSchema deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.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/UserEnrollmentAuthMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/UserEnrollmentAuthMethodEnum.java deleted file mode 100644 index 75512a03e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserEnrollmentAuthMethodEnum.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class UserEnrollmentAuthMethodEnum { - public static final UserEnrollmentAuthMethodEnum WEBAUTHN_PLATFORM = - new UserEnrollmentAuthMethodEnum(Value.WEBAUTHN_PLATFORM, "webauthn-platform"); - - public static final UserEnrollmentAuthMethodEnum GUARDIAN = - new UserEnrollmentAuthMethodEnum(Value.GUARDIAN, "guardian"); - - public static final UserEnrollmentAuthMethodEnum AUTHENTICATOR = - new UserEnrollmentAuthMethodEnum(Value.AUTHENTICATOR, "authenticator"); - - public static final UserEnrollmentAuthMethodEnum SMS = new UserEnrollmentAuthMethodEnum(Value.SMS, "sms"); - - public static final UserEnrollmentAuthMethodEnum WEBAUTHN_ROAMING = - new UserEnrollmentAuthMethodEnum(Value.WEBAUTHN_ROAMING, "webauthn-roaming"); - - private final Value value; - - private final String string; - - UserEnrollmentAuthMethodEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof UserEnrollmentAuthMethodEnum - && this.string.equals(((UserEnrollmentAuthMethodEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case WEBAUTHN_PLATFORM: - return visitor.visitWebauthnPlatform(); - case GUARDIAN: - return visitor.visitGuardian(); - case AUTHENTICATOR: - return visitor.visitAuthenticator(); - case SMS: - return visitor.visitSms(); - case WEBAUTHN_ROAMING: - return visitor.visitWebauthnRoaming(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static UserEnrollmentAuthMethodEnum valueOf(String value) { - switch (value) { - case "webauthn-platform": - return WEBAUTHN_PLATFORM; - case "guardian": - return GUARDIAN; - case "authenticator": - return AUTHENTICATOR; - case "sms": - return SMS; - case "webauthn-roaming": - return WEBAUTHN_ROAMING; - default: - return new UserEnrollmentAuthMethodEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AUTHENTICATOR, - - GUARDIAN, - - SMS, - - WEBAUTHN_PLATFORM, - - WEBAUTHN_ROAMING, - - UNKNOWN - } - - public interface Visitor { - T visitAuthenticator(); - - T visitGuardian(); - - T visitSms(); - - T visitWebauthnPlatform(); - - T visitWebauthnRoaming(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserEnrollmentStatusEnum.java b/src/main/java/com/auth0/client/mgmt/types/UserEnrollmentStatusEnum.java deleted file mode 100644 index a79d4f33e..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserEnrollmentStatusEnum.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class UserEnrollmentStatusEnum { - public static final UserEnrollmentStatusEnum PENDING = new UserEnrollmentStatusEnum(Value.PENDING, "pending"); - - public static final UserEnrollmentStatusEnum CONFIRMED = new UserEnrollmentStatusEnum(Value.CONFIRMED, "confirmed"); - - private final Value value; - - private final String string; - - UserEnrollmentStatusEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof UserEnrollmentStatusEnum - && this.string.equals(((UserEnrollmentStatusEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case PENDING: - return visitor.visitPending(); - case CONFIRMED: - return visitor.visitConfirmed(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static UserEnrollmentStatusEnum valueOf(String value) { - switch (value) { - case "pending": - return PENDING; - case "confirmed": - return CONFIRMED; - default: - return new UserEnrollmentStatusEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - PENDING, - - CONFIRMED, - - UNKNOWN - } - - public interface Visitor { - T visitPending(); - - T visitConfirmed(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserGrant.java b/src/main/java/com/auth0/client/mgmt/types/UserGrant.java deleted file mode 100644 index 4da8da77d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserGrant.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserGrant.Builder.class) -public final class UserGrant { - private final Optional id; - - private final Optional clientId; - - private final Optional userId; - - private final Optional audience; - - private final Optional> scope; - - private final Map additionalProperties; - - private UserGrant( - Optional id, - Optional clientId, - Optional userId, - Optional audience, - Optional> scope, - Map additionalProperties) { - this.id = id; - this.clientId = clientId; - this.userId = userId; - this.audience = audience; - this.scope = scope; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the grant. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return ID of the client. - */ - @JsonProperty("clientID") - public Optional getClientId() { - return clientId; - } - - /** - * @return ID of the user. - */ - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - /** - * @return Audience of the grant. - */ - @JsonProperty("audience") - public Optional getAudience() { - return audience; - } - - /** - * @return Scopes included in this grant. - */ - @JsonProperty("scope") - public Optional> getScope() { - return scope; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserGrant && equalTo((UserGrant) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserGrant other) { - return id.equals(other.id) - && clientId.equals(other.clientId) - && userId.equals(other.userId) - && audience.equals(other.audience) - && scope.equals(other.scope); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.id, this.clientId, this.userId, this.audience, this.scope); - } - - @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 clientId = Optional.empty(); - - private Optional userId = Optional.empty(); - - private Optional audience = Optional.empty(); - - private Optional> scope = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserGrant other) { - id(other.getId()); - clientId(other.getClientId()); - userId(other.getUserId()); - audience(other.getAudience()); - scope(other.getScope()); - return this; - } - - /** - *

ID of the grant.

- */ - @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; - } - - /** - *

ID of the client.

- */ - @JsonSetter(value = "clientID", 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; - } - - /** - *

ID of the 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; - } - - /** - *

Audience of the grant.

- */ - @JsonSetter(value = "audience", nulls = Nulls.SKIP) - public Builder audience(Optional audience) { - this.audience = audience; - return this; - } - - public Builder audience(String audience) { - this.audience = Optional.ofNullable(audience); - return this; - } - - /** - *

Scopes included in this grant.

- */ - @JsonSetter(value = "scope", nulls = Nulls.SKIP) - public Builder scope(Optional> scope) { - this.scope = scope; - return this; - } - - public Builder scope(List scope) { - this.scope = Optional.ofNullable(scope); - return this; - } - - public UserGrant build() { - return new UserGrant(id, clientId, userId, audience, scope, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserGroupsResponseSchema.java b/src/main/java/com/auth0/client/mgmt/types/UserGroupsResponseSchema.java deleted file mode 100644 index e9056c211..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserGroupsResponseSchema.java +++ /dev/null @@ -1,461 +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 = UserGroupsResponseSchema.Builder.class) -public final class UserGroupsResponseSchema implements IGroup { - private final Optional id; - - private final Optional 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 Optional membershipCreatedAt; - - private final Map additionalProperties; - - private UserGroupsResponseSchema( - Optional id, - Optional name, - Optional externalId, - Optional connectionId, - OptionalNullable organizationId, - Optional tenantName, - OptionalNullable description, - Optional createdAt, - Optional updatedAt, - Optional membershipCreatedAt, - 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.membershipCreatedAt = membershipCreatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return Unique identifier for the group (service-generated). - */ - @JsonProperty("id") - @java.lang.Override - public Optional getId() { - return id; - } - - /** - * @return Name of the group. Must be unique within its scope (connection, organization, or tenant). Must contain between 1 and 128 printable ASCII characters. - */ - @JsonProperty("name") - @java.lang.Override - public Optional getName() { - return name; - } - - /** - * @return External identifier for the group, often used for SCIM synchronization. Max length of 256 characters. - */ - @JsonProperty("external_id") - @java.lang.Override - public Optional getExternalId() { - return externalId; - } - - /** - * @return Identifier for the connection this group belongs to (if a connection group). - */ - @JsonProperty("connection_id") - @java.lang.Override - public Optional getConnectionId() { - return connectionId; - } - - /** - * @return Identifier for the organization this group belongs to (if an organization group). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("organization_id") - @java.lang.Override - public OptionalNullable getOrganizationId() { - if (organizationId == null) { - return OptionalNullable.absent(); - } - return organizationId; - } - - /** - * @return Identifier for the tenant this group belongs to. - */ - @JsonProperty("tenant_name") - @java.lang.Override - public Optional getTenantName() { - return tenantName; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("description") - @java.lang.Override - public OptionalNullable getDescription() { - if (description == null) { - return OptionalNullable.absent(); - } - return description; - } - - /** - * @return Timestamp of when the group was created. - */ - @JsonProperty("created_at") - @java.lang.Override - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return Timestamp of when the group was last updated. - */ - @JsonProperty("updated_at") - @java.lang.Override - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return Timestamp of when the group membership was added. - */ - @JsonProperty("membership_created_at") - public Optional getMembershipCreatedAt() { - return membershipCreatedAt; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("organization_id") - private OptionalNullable _getOrganizationId() { - return organizationId; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("description") - private OptionalNullable _getDescription() { - return description; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserGroupsResponseSchema && equalTo((UserGroupsResponseSchema) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserGroupsResponseSchema 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) - && membershipCreatedAt.equals(other.membershipCreatedAt); - } - - @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, - this.membershipCreatedAt); - } - - @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 externalId = Optional.empty(); - - private Optional connectionId = Optional.empty(); - - private OptionalNullable organizationId = OptionalNullable.absent(); - - private Optional tenantName = Optional.empty(); - - private OptionalNullable description = OptionalNullable.absent(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional membershipCreatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserGroupsResponseSchema 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()); - membershipCreatedAt(other.getMembershipCreatedAt()); - return this; - } - - /** - *

Unique identifier for the group (service-generated).

- */ - @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; - } - - /** - *

Name of the group. Must be unique within its scope (connection, organization, or tenant). Must contain between 1 and 128 printable ASCII 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; - } - - /** - *

External identifier for the group, often used for SCIM synchronization. Max length of 256 characters.

- */ - @JsonSetter(value = "external_id", nulls = Nulls.SKIP) - public Builder externalId(Optional externalId) { - this.externalId = externalId; - return this; - } - - public Builder externalId(String externalId) { - this.externalId = Optional.ofNullable(externalId); - return this; - } - - /** - *

Identifier for the connection this group belongs to (if a connection group).

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - return this; - } - - /** - *

Identifier for the organization this group belongs to (if an organization group).

- */ - @JsonSetter(value = "organization_id", nulls = Nulls.SKIP) - public Builder organizationId(@Nullable OptionalNullable organizationId) { - this.organizationId = organizationId; - return this; - } - - public Builder organizationId(String organizationId) { - this.organizationId = OptionalNullable.of(organizationId); - return this; - } - - public Builder organizationId(Optional organizationId) { - if (organizationId.isPresent()) { - this.organizationId = OptionalNullable.of(organizationId.get()); - } else { - this.organizationId = OptionalNullable.absent(); - } - return this; - } - - public Builder organizationId(com.auth0.client.mgmt.core.Nullable organizationId) { - if (organizationId.isNull()) { - this.organizationId = OptionalNullable.ofNull(); - } else if (organizationId.isEmpty()) { - this.organizationId = OptionalNullable.absent(); - } else { - this.organizationId = OptionalNullable.of(organizationId.get()); - } - return this; - } - - /** - *

Identifier for the tenant this group belongs to.

- */ - @JsonSetter(value = "tenant_name", nulls = Nulls.SKIP) - public Builder tenantName(Optional tenantName) { - this.tenantName = tenantName; - return this; - } - - public Builder tenantName(String tenantName) { - this.tenantName = Optional.ofNullable(tenantName); - return this; - } - - @JsonSetter(value = "description", nulls = Nulls.SKIP) - public Builder description(@Nullable OptionalNullable description) { - this.description = description; - return this; - } - - public Builder description(String description) { - this.description = OptionalNullable.of(description); - return this; - } - - public Builder description(Optional description) { - if (description.isPresent()) { - this.description = OptionalNullable.of(description.get()); - } else { - this.description = OptionalNullable.absent(); - } - return this; - } - - public Builder description(com.auth0.client.mgmt.core.Nullable description) { - if (description.isNull()) { - this.description = OptionalNullable.ofNull(); - } else if (description.isEmpty()) { - this.description = OptionalNullable.absent(); - } else { - this.description = OptionalNullable.of(description.get()); - } - return this; - } - - /** - *

Timestamp of when the group was created.

- */ - @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; - } - - /** - *

Timestamp of when the group 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; - } - - /** - *

Timestamp of when the group membership was added.

- */ - @JsonSetter(value = "membership_created_at", nulls = Nulls.SKIP) - public Builder membershipCreatedAt(Optional membershipCreatedAt) { - this.membershipCreatedAt = membershipCreatedAt; - return this; - } - - public Builder membershipCreatedAt(OffsetDateTime membershipCreatedAt) { - this.membershipCreatedAt = Optional.ofNullable(membershipCreatedAt); - return this; - } - - public UserGroupsResponseSchema build() { - return new UserGroupsResponseSchema( - id, - name, - externalId, - connectionId, - organizationId, - tenantName, - description, - createdAt, - updatedAt, - membershipCreatedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserId.java b/src/main/java/com/auth0/client/mgmt/types/UserId.java deleted file mode 100644 index 0348be41b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserId.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.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 = UserId.Deserializer.class) -public final class UserId { - private final Object value; - - private final int type; - - private UserId(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 UserId && equalTo((UserId) other); - } - - private boolean equalTo(UserId 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 UserId of(String value) { - return new UserId(value, 0); - } - - public static UserId of(int value) { - return new UserId(value, 1); - } - - public interface Visitor { - T visit(String value); - - T visit(int value); - } - - static final class Deserializer extends StdDeserializer { - Deserializer() { - super(UserId.class); - } - - @java.lang.Override - public UserId deserialize(JsonParser p, DeserializationContext context) throws IOException { - Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } - if (value instanceof Integer) { - return of((Integer) value); - } - throw new JsonParseException(p, "Failed to deserialize"); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserIdentity.java b/src/main/java/com/auth0/client/mgmt/types/UserIdentity.java deleted file mode 100644 index f67dd2aa1..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserIdentity.java +++ /dev/null @@ -1,395 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserIdentity.Builder.class) -public final class UserIdentity { - private final String connection; - - private final UserId userId; - - private final String provider; - - private final Optional profileData; - - private final Optional isSocial; - - private final Optional accessToken; - - private final Optional accessTokenSecret; - - private final Optional refreshToken; - - private final Map additionalProperties; - - private UserIdentity( - String connection, - UserId userId, - String provider, - Optional profileData, - Optional isSocial, - Optional accessToken, - Optional accessTokenSecret, - Optional refreshToken, - Map additionalProperties) { - this.connection = connection; - this.userId = userId; - this.provider = provider; - this.profileData = profileData; - this.isSocial = isSocial; - this.accessToken = accessToken; - this.accessTokenSecret = accessTokenSecret; - this.refreshToken = refreshToken; - this.additionalProperties = additionalProperties; - } - - /** - * @return Connection name of this identity. - */ - @JsonProperty("connection") - public String getConnection() { - return connection; - } - - @JsonProperty("user_id") - public UserId getUserId() { - return userId; - } - - /** - * @return Type of identity provider. - */ - @JsonProperty("provider") - public String getProvider() { - return provider; - } - - @JsonProperty("profileData") - public Optional getProfileData() { - return profileData; - } - - /** - * @return Whether the identity provider is a social provider (true) or not (false). - */ - @JsonProperty("isSocial") - public Optional getIsSocial() { - return isSocial; - } - - /** - * @return IDP access token returned if scope read:user_idp_tokens is defined. - */ - @JsonProperty("access_token") - public Optional getAccessToken() { - return accessToken; - } - - /** - * @return IDP access token secret returned only if scope read:user_idp_tokens is defined. - */ - @JsonProperty("access_token_secret") - public Optional getAccessTokenSecret() { - return accessTokenSecret; - } - - /** - * @return IDP refresh token returned only if scope read:user_idp_tokens is defined. - */ - @JsonProperty("refresh_token") - public Optional getRefreshToken() { - return refreshToken; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserIdentity && equalTo((UserIdentity) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserIdentity other) { - return connection.equals(other.connection) - && userId.equals(other.userId) - && provider.equals(other.provider) - && profileData.equals(other.profileData) - && isSocial.equals(other.isSocial) - && accessToken.equals(other.accessToken) - && accessTokenSecret.equals(other.accessTokenSecret) - && refreshToken.equals(other.refreshToken); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connection, - this.userId, - this.provider, - this.profileData, - this.isSocial, - this.accessToken, - this.accessTokenSecret, - this.refreshToken); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionStage builder() { - return new Builder(); - } - - public interface ConnectionStage { - /** - *

Connection name of this identity.

- */ - UserIdStage connection(@NotNull String connection); - - Builder from(UserIdentity other); - } - - public interface UserIdStage { - ProviderStage userId(@NotNull UserId userId); - } - - public interface ProviderStage { - /** - *

Type of identity provider.

- */ - _FinalStage provider(@NotNull String provider); - } - - public interface _FinalStage { - UserIdentity build(); - - _FinalStage profileData(Optional profileData); - - _FinalStage profileData(UserProfileData profileData); - - /** - *

Whether the identity provider is a social provider (true) or not (false).

- */ - _FinalStage isSocial(Optional isSocial); - - _FinalStage isSocial(Boolean isSocial); - - /** - *

IDP access token returned if scope read:user_idp_tokens is defined.

- */ - _FinalStage accessToken(Optional accessToken); - - _FinalStage accessToken(String accessToken); - - /** - *

IDP access token secret returned only if scope read:user_idp_tokens is defined.

- */ - _FinalStage accessTokenSecret(Optional accessTokenSecret); - - _FinalStage accessTokenSecret(String accessTokenSecret); - - /** - *

IDP refresh token returned only if scope read:user_idp_tokens is defined.

- */ - _FinalStage refreshToken(Optional refreshToken); - - _FinalStage refreshToken(String refreshToken); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionStage, UserIdStage, ProviderStage, _FinalStage { - private String connection; - - private UserId userId; - - private String provider; - - private Optional refreshToken = Optional.empty(); - - private Optional accessTokenSecret = Optional.empty(); - - private Optional accessToken = Optional.empty(); - - private Optional isSocial = Optional.empty(); - - private Optional profileData = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(UserIdentity other) { - connection(other.getConnection()); - userId(other.getUserId()); - provider(other.getProvider()); - profileData(other.getProfileData()); - isSocial(other.getIsSocial()); - accessToken(other.getAccessToken()); - accessTokenSecret(other.getAccessTokenSecret()); - refreshToken(other.getRefreshToken()); - return this; - } - - /** - *

Connection name of this identity.

- *

Connection name of 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 UserId userId) { - this.userId = Objects.requireNonNull(userId, "userId must not be null"); - return this; - } - - /** - *

Type of identity provider.

- *

Type of identity provider.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("provider") - public _FinalStage provider(@NotNull String provider) { - this.provider = Objects.requireNonNull(provider, "provider must not be null"); - return this; - } - - /** - *

IDP refresh token returned only if scope read:user_idp_tokens is defined.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage refreshToken(String refreshToken) { - this.refreshToken = Optional.ofNullable(refreshToken); - return this; - } - - /** - *

IDP refresh token returned only if scope read:user_idp_tokens is defined.

- */ - @java.lang.Override - @JsonSetter(value = "refresh_token", nulls = Nulls.SKIP) - public _FinalStage refreshToken(Optional refreshToken) { - this.refreshToken = refreshToken; - return this; - } - - /** - *

IDP access token secret returned only if scope read:user_idp_tokens is defined.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage accessTokenSecret(String accessTokenSecret) { - this.accessTokenSecret = Optional.ofNullable(accessTokenSecret); - return this; - } - - /** - *

IDP access token secret returned only if scope read:user_idp_tokens is defined.

- */ - @java.lang.Override - @JsonSetter(value = "access_token_secret", nulls = Nulls.SKIP) - public _FinalStage accessTokenSecret(Optional accessTokenSecret) { - this.accessTokenSecret = accessTokenSecret; - return this; - } - - /** - *

IDP access token returned if scope read:user_idp_tokens is defined.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage accessToken(String accessToken) { - this.accessToken = Optional.ofNullable(accessToken); - return this; - } - - /** - *

IDP access token returned if scope read:user_idp_tokens is defined.

- */ - @java.lang.Override - @JsonSetter(value = "access_token", nulls = Nulls.SKIP) - public _FinalStage accessToken(Optional accessToken) { - this.accessToken = accessToken; - return this; - } - - /** - *

Whether the identity provider is a social provider (true) or not (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage isSocial(Boolean isSocial) { - this.isSocial = Optional.ofNullable(isSocial); - return this; - } - - /** - *

Whether the identity provider is a social provider (true) or not (false).

- */ - @java.lang.Override - @JsonSetter(value = "isSocial", nulls = Nulls.SKIP) - public _FinalStage isSocial(Optional isSocial) { - this.isSocial = isSocial; - return this; - } - - @java.lang.Override - public _FinalStage profileData(UserProfileData 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 UserIdentity build() { - return new UserIdentity( - connection, - userId, - provider, - profileData, - isSocial, - accessToken, - accessTokenSecret, - refreshToken, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserIdentityProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/UserIdentityProviderEnum.java deleted file mode 100644 index 79e3e233f..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserIdentityProviderEnum.java +++ /dev/null @@ -1,699 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class UserIdentityProviderEnum { - public static final UserIdentityProviderEnum SHOP = new UserIdentityProviderEnum(Value.SHOP, "shop"); - - public static final UserIdentityProviderEnum AUTH0OIDC = - new UserIdentityProviderEnum(Value.AUTH0OIDC, "auth0-oidc"); - - public static final UserIdentityProviderEnum DWOLLA = new UserIdentityProviderEnum(Value.DWOLLA, "dwolla"); - - public static final UserIdentityProviderEnum FLICKR = new UserIdentityProviderEnum(Value.FLICKR, "flickr"); - - public static final UserIdentityProviderEnum OKTA = new UserIdentityProviderEnum(Value.OKTA, "okta"); - - public static final UserIdentityProviderEnum PLANNINGCENTER = - new UserIdentityProviderEnum(Value.PLANNINGCENTER, "planningcenter"); - - public static final UserIdentityProviderEnum GOOGLE_OAUTH2 = - new UserIdentityProviderEnum(Value.GOOGLE_OAUTH2, "google-oauth2"); - - public static final UserIdentityProviderEnum AUTH0 = new UserIdentityProviderEnum(Value.AUTH0, "auth0"); - - public static final UserIdentityProviderEnum EXACT = new UserIdentityProviderEnum(Value.EXACT, "exact"); - - public static final UserIdentityProviderEnum WORDPRESS = new UserIdentityProviderEnum(Value.WORDPRESS, "wordpress"); - - public static final UserIdentityProviderEnum FITBIT = new UserIdentityProviderEnum(Value.FITBIT, "fitbit"); - - public static final UserIdentityProviderEnum EVERNOTE = new UserIdentityProviderEnum(Value.EVERNOTE, "evernote"); - - public static final UserIdentityProviderEnum SHAREPOINT = - new UserIdentityProviderEnum(Value.SHAREPOINT, "sharepoint"); - - public static final UserIdentityProviderEnum SHOPIFY = new UserIdentityProviderEnum(Value.SHOPIFY, "shopify"); - - public static final UserIdentityProviderEnum SALESFORCE_SANDBOX = - new UserIdentityProviderEnum(Value.SALESFORCE_SANDBOX, "salesforce-sandbox"); - - public static final UserIdentityProviderEnum MIICARD = new UserIdentityProviderEnum(Value.MIICARD, "miicard"); - - public static final UserIdentityProviderEnum FACEBOOK = new UserIdentityProviderEnum(Value.FACEBOOK, "facebook"); - - public static final UserIdentityProviderEnum OAUTH1 = new UserIdentityProviderEnum(Value.OAUTH1, "oauth1"); - - public static final UserIdentityProviderEnum APPLE = new UserIdentityProviderEnum(Value.APPLE, "apple"); - - public static final UserIdentityProviderEnum UNTAPPD = new UserIdentityProviderEnum(Value.UNTAPPD, "untappd"); - - public static final UserIdentityProviderEnum AMAZON = new UserIdentityProviderEnum(Value.AMAZON, "amazon"); - - public static final UserIdentityProviderEnum LINE = new UserIdentityProviderEnum(Value.LINE, "line"); - - public static final UserIdentityProviderEnum BITBUCKET = new UserIdentityProviderEnum(Value.BITBUCKET, "bitbucket"); - - public static final UserIdentityProviderEnum GITHUB = new UserIdentityProviderEnum(Value.GITHUB, "github"); - - public static final UserIdentityProviderEnum SALESFORCE = - new UserIdentityProviderEnum(Value.SALESFORCE, "salesforce"); - - public static final UserIdentityProviderEnum OFFICE365 = new UserIdentityProviderEnum(Value.OFFICE365, "office365"); - - public static final UserIdentityProviderEnum SMS = new UserIdentityProviderEnum(Value.SMS, "sms"); - - public static final UserIdentityProviderEnum AOL = new UserIdentityProviderEnum(Value.AOL, "aol"); - - public static final UserIdentityProviderEnum TWITTER = new UserIdentityProviderEnum(Value.TWITTER, "twitter"); - - public static final UserIdentityProviderEnum WINDOWSLIVE = - new UserIdentityProviderEnum(Value.WINDOWSLIVE, "windowslive"); - - public static final UserIdentityProviderEnum YANDEX = new UserIdentityProviderEnum(Value.YANDEX, "yandex"); - - public static final UserIdentityProviderEnum AD = new UserIdentityProviderEnum(Value.AD, "ad"); - - public static final UserIdentityProviderEnum BAIDU = new UserIdentityProviderEnum(Value.BAIDU, "baidu"); - - public static final UserIdentityProviderEnum BITLY = new UserIdentityProviderEnum(Value.BITLY, "bitly"); - - public static final UserIdentityProviderEnum PAYPAL_SANDBOX = - new UserIdentityProviderEnum(Value.PAYPAL_SANDBOX, "paypal-sandbox"); - - public static final UserIdentityProviderEnum RENREN = new UserIdentityProviderEnum(Value.RENREN, "renren"); - - public static final UserIdentityProviderEnum SAMLP = new UserIdentityProviderEnum(Value.SAMLP, "samlp"); - - public static final UserIdentityProviderEnum DROPBOX = new UserIdentityProviderEnum(Value.DROPBOX, "dropbox"); - - public static final UserIdentityProviderEnum VKONTAKTE = new UserIdentityProviderEnum(Value.VKONTAKTE, "vkontakte"); - - public static final UserIdentityProviderEnum PINGFEDERATE = - new UserIdentityProviderEnum(Value.PINGFEDERATE, "pingfederate"); - - public static final UserIdentityProviderEnum INSTAGRAM = new UserIdentityProviderEnum(Value.INSTAGRAM, "instagram"); - - public static final UserIdentityProviderEnum THIRTYSEVENSIGNALS = - new UserIdentityProviderEnum(Value.THIRTYSEVENSIGNALS, "thirtysevensignals"); - - public static final UserIdentityProviderEnum WAAD = new UserIdentityProviderEnum(Value.WAAD, "waad"); - - public static final UserIdentityProviderEnum THECITY_SANDBOX = - new UserIdentityProviderEnum(Value.THECITY_SANDBOX, "thecity-sandbox"); - - public static final UserIdentityProviderEnum OIDC = new UserIdentityProviderEnum(Value.OIDC, "oidc"); - - public static final UserIdentityProviderEnum YAMMER = new UserIdentityProviderEnum(Value.YAMMER, "yammer"); - - public static final UserIdentityProviderEnum EVERNOTE_SANDBOX = - new UserIdentityProviderEnum(Value.EVERNOTE_SANDBOX, "evernote-sandbox"); - - public static final UserIdentityProviderEnum SALESFORCE_COMMUNITY = - new UserIdentityProviderEnum(Value.SALESFORCE_COMMUNITY, "salesforce-community"); - - public static final UserIdentityProviderEnum DACCOUNT = new UserIdentityProviderEnum(Value.DACCOUNT, "daccount"); - - public static final UserIdentityProviderEnum SOUNDCLOUD = - new UserIdentityProviderEnum(Value.SOUNDCLOUD, "soundcloud"); - - public static final UserIdentityProviderEnum OAUTH2 = new UserIdentityProviderEnum(Value.OAUTH2, "oauth2"); - - public static final UserIdentityProviderEnum BOX = new UserIdentityProviderEnum(Value.BOX, "box"); - - public static final UserIdentityProviderEnum IP = new UserIdentityProviderEnum(Value.IP, "ip"); - - public static final UserIdentityProviderEnum ADFS = new UserIdentityProviderEnum(Value.ADFS, "adfs"); - - public static final UserIdentityProviderEnum EMAIL = new UserIdentityProviderEnum(Value.EMAIL, "email"); - - public static final UserIdentityProviderEnum CUSTOM = new UserIdentityProviderEnum(Value.CUSTOM, "custom"); - - public static final UserIdentityProviderEnum YAHOO = new UserIdentityProviderEnum(Value.YAHOO, "yahoo"); - - public static final UserIdentityProviderEnum WEIBO = new UserIdentityProviderEnum(Value.WEIBO, "weibo"); - - public static final UserIdentityProviderEnum GOOGLE_APPS = - new UserIdentityProviderEnum(Value.GOOGLE_APPS, "google-apps"); - - public static final UserIdentityProviderEnum PAYPAL = new UserIdentityProviderEnum(Value.PAYPAL, "paypal"); - - public static final UserIdentityProviderEnum LINKEDIN = new UserIdentityProviderEnum(Value.LINKEDIN, "linkedin"); - - public static final UserIdentityProviderEnum THECITY = new UserIdentityProviderEnum(Value.THECITY, "thecity"); - - private final Value value; - - private final String string; - - UserIdentityProviderEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof UserIdentityProviderEnum - && this.string.equals(((UserIdentityProviderEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case SHOP: - return visitor.visitShop(); - case AUTH0OIDC: - return visitor.visitAuth0Oidc(); - case DWOLLA: - return visitor.visitDwolla(); - case FLICKR: - return visitor.visitFlickr(); - case OKTA: - return visitor.visitOkta(); - case PLANNINGCENTER: - return visitor.visitPlanningcenter(); - case GOOGLE_OAUTH2: - return visitor.visitGoogleOauth2(); - case AUTH0: - return visitor.visitAuth0(); - case EXACT: - return visitor.visitExact(); - case WORDPRESS: - return visitor.visitWordpress(); - case FITBIT: - return visitor.visitFitbit(); - case EVERNOTE: - return visitor.visitEvernote(); - case SHAREPOINT: - return visitor.visitSharepoint(); - case SHOPIFY: - return visitor.visitShopify(); - case SALESFORCE_SANDBOX: - return visitor.visitSalesforceSandbox(); - case MIICARD: - return visitor.visitMiicard(); - case FACEBOOK: - return visitor.visitFacebook(); - case OAUTH1: - return visitor.visitOauth1(); - case APPLE: - return visitor.visitApple(); - case UNTAPPD: - return visitor.visitUntappd(); - case AMAZON: - return visitor.visitAmazon(); - case LINE: - return visitor.visitLine(); - case BITBUCKET: - return visitor.visitBitbucket(); - case GITHUB: - return visitor.visitGithub(); - case SALESFORCE: - return visitor.visitSalesforce(); - case OFFICE365: - return visitor.visitOffice365(); - case SMS: - return visitor.visitSms(); - case AOL: - return visitor.visitAol(); - case TWITTER: - return visitor.visitTwitter(); - case WINDOWSLIVE: - return visitor.visitWindowslive(); - case YANDEX: - return visitor.visitYandex(); - case AD: - return visitor.visitAd(); - case BAIDU: - return visitor.visitBaidu(); - case BITLY: - return visitor.visitBitly(); - case PAYPAL_SANDBOX: - return visitor.visitPaypalSandbox(); - case RENREN: - return visitor.visitRenren(); - case SAMLP: - return visitor.visitSamlp(); - case DROPBOX: - return visitor.visitDropbox(); - case VKONTAKTE: - return visitor.visitVkontakte(); - case PINGFEDERATE: - return visitor.visitPingfederate(); - case INSTAGRAM: - return visitor.visitInstagram(); - case THIRTYSEVENSIGNALS: - return visitor.visitThirtysevensignals(); - case WAAD: - return visitor.visitWaad(); - case THECITY_SANDBOX: - return visitor.visitThecitySandbox(); - case OIDC: - return visitor.visitOidc(); - case YAMMER: - return visitor.visitYammer(); - case EVERNOTE_SANDBOX: - return visitor.visitEvernoteSandbox(); - case SALESFORCE_COMMUNITY: - return visitor.visitSalesforceCommunity(); - case DACCOUNT: - return visitor.visitDaccount(); - case SOUNDCLOUD: - return visitor.visitSoundcloud(); - case OAUTH2: - return visitor.visitOauth2(); - case BOX: - return visitor.visitBox(); - case IP: - return visitor.visitIp(); - case ADFS: - return visitor.visitAdfs(); - case EMAIL: - return visitor.visitEmail(); - case CUSTOM: - return visitor.visitCustom(); - case YAHOO: - return visitor.visitYahoo(); - case WEIBO: - return visitor.visitWeibo(); - case GOOGLE_APPS: - return visitor.visitGoogleApps(); - case PAYPAL: - return visitor.visitPaypal(); - case LINKEDIN: - return visitor.visitLinkedin(); - case THECITY: - return visitor.visitThecity(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static UserIdentityProviderEnum valueOf(String value) { - switch (value) { - case "shop": - return SHOP; - case "auth0-oidc": - return AUTH0OIDC; - case "dwolla": - return DWOLLA; - case "flickr": - return FLICKR; - case "okta": - return OKTA; - case "planningcenter": - return PLANNINGCENTER; - case "google-oauth2": - return GOOGLE_OAUTH2; - case "auth0": - return AUTH0; - case "exact": - return EXACT; - case "wordpress": - return WORDPRESS; - case "fitbit": - return FITBIT; - case "evernote": - return EVERNOTE; - case "sharepoint": - return SHAREPOINT; - case "shopify": - return SHOPIFY; - case "salesforce-sandbox": - return SALESFORCE_SANDBOX; - case "miicard": - return MIICARD; - case "facebook": - return FACEBOOK; - case "oauth1": - return OAUTH1; - case "apple": - return APPLE; - case "untappd": - return UNTAPPD; - case "amazon": - return AMAZON; - case "line": - return LINE; - case "bitbucket": - return BITBUCKET; - case "github": - return GITHUB; - case "salesforce": - return SALESFORCE; - case "office365": - return OFFICE365; - case "sms": - return SMS; - case "aol": - return AOL; - case "twitter": - return TWITTER; - case "windowslive": - return WINDOWSLIVE; - case "yandex": - return YANDEX; - case "ad": - return AD; - case "baidu": - return BAIDU; - case "bitly": - return BITLY; - case "paypal-sandbox": - return PAYPAL_SANDBOX; - case "renren": - return RENREN; - case "samlp": - return SAMLP; - case "dropbox": - return DROPBOX; - case "vkontakte": - return VKONTAKTE; - case "pingfederate": - return PINGFEDERATE; - case "instagram": - return INSTAGRAM; - case "thirtysevensignals": - return THIRTYSEVENSIGNALS; - case "waad": - return WAAD; - case "thecity-sandbox": - return THECITY_SANDBOX; - case "oidc": - return OIDC; - case "yammer": - return YAMMER; - case "evernote-sandbox": - return EVERNOTE_SANDBOX; - case "salesforce-community": - return SALESFORCE_COMMUNITY; - case "daccount": - return DACCOUNT; - case "soundcloud": - return SOUNDCLOUD; - case "oauth2": - return OAUTH2; - case "box": - return BOX; - case "ip": - return IP; - case "adfs": - return ADFS; - case "email": - return EMAIL; - case "custom": - return CUSTOM; - case "yahoo": - return YAHOO; - case "weibo": - return WEIBO; - case "google-apps": - return GOOGLE_APPS; - case "paypal": - return PAYPAL; - case "linkedin": - return LINKEDIN; - case "thecity": - return THECITY; - default: - return new UserIdentityProviderEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - AD, - - ADFS, - - AMAZON, - - APPLE, - - DROPBOX, - - BITBUCKET, - - AOL, - - AUTH0OIDC, - - AUTH0, - - BAIDU, - - BITLY, - - BOX, - - CUSTOM, - - DACCOUNT, - - DWOLLA, - - EMAIL, - - EVERNOTE_SANDBOX, - - EVERNOTE, - - EXACT, - - FACEBOOK, - - FITBIT, - - FLICKR, - - GITHUB, - - GOOGLE_APPS, - - GOOGLE_OAUTH2, - - INSTAGRAM, - - IP, - - LINE, - - LINKEDIN, - - MIICARD, - - OAUTH1, - - OAUTH2, - - OFFICE365, - - OIDC, - - OKTA, - - PAYPAL, - - PAYPAL_SANDBOX, - - PINGFEDERATE, - - PLANNINGCENTER, - - RENREN, - - SALESFORCE_COMMUNITY, - - SALESFORCE_SANDBOX, - - SALESFORCE, - - SAMLP, - - SHAREPOINT, - - SHOPIFY, - - SHOP, - - SMS, - - SOUNDCLOUD, - - THECITY_SANDBOX, - - THECITY, - - THIRTYSEVENSIGNALS, - - TWITTER, - - UNTAPPD, - - VKONTAKTE, - - WAAD, - - WEIBO, - - WINDOWSLIVE, - - WORDPRESS, - - YAHOO, - - YAMMER, - - YANDEX, - - UNKNOWN - } - - public interface Visitor { - T visitAd(); - - T visitAdfs(); - - T visitAmazon(); - - T visitApple(); - - T visitDropbox(); - - T visitBitbucket(); - - T visitAol(); - - T visitAuth0Oidc(); - - T visitAuth0(); - - T visitBaidu(); - - T visitBitly(); - - T visitBox(); - - T visitCustom(); - - T visitDaccount(); - - T visitDwolla(); - - T visitEmail(); - - T visitEvernoteSandbox(); - - T visitEvernote(); - - T visitExact(); - - T visitFacebook(); - - T visitFitbit(); - - T visitFlickr(); - - T visitGithub(); - - T visitGoogleApps(); - - T visitGoogleOauth2(); - - T visitInstagram(); - - T visitIp(); - - T visitLine(); - - T visitLinkedin(); - - T visitMiicard(); - - T visitOauth1(); - - T visitOauth2(); - - T visitOffice365(); - - T visitOidc(); - - T visitOkta(); - - T visitPaypal(); - - T visitPaypalSandbox(); - - T visitPingfederate(); - - T visitPlanningcenter(); - - T visitRenren(); - - T visitSalesforceCommunity(); - - T visitSalesforceSandbox(); - - T visitSalesforce(); - - T visitSamlp(); - - T visitSharepoint(); - - T visitShopify(); - - T visitShop(); - - T visitSms(); - - T visitSoundcloud(); - - T visitThecitySandbox(); - - T visitThecity(); - - T visitThirtysevensignals(); - - T visitTwitter(); - - T visitUntappd(); - - T visitVkontakte(); - - T visitWaad(); - - T visitWeibo(); - - T visitWindowslive(); - - T visitWordpress(); - - T visitYahoo(); - - T visitYammer(); - - T visitYandex(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserIdentitySchema.java b/src/main/java/com/auth0/client/mgmt/types/UserIdentitySchema.java deleted file mode 100644 index 794f19544..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserIdentitySchema.java +++ /dev/null @@ -1,318 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserIdentitySchema.Builder.class) -public final class UserIdentitySchema { - private final Optional connection; - - private final Optional userId; - - private final Optional provider; - - private final Optional isSocial; - - private final Optional accessToken; - - private final Optional accessTokenSecret; - - private final Optional refreshToken; - - private final Optional profileData; - - private final Map additionalProperties; - - private UserIdentitySchema( - Optional connection, - Optional userId, - Optional provider, - Optional isSocial, - Optional accessToken, - Optional accessTokenSecret, - Optional refreshToken, - Optional profileData, - Map additionalProperties) { - this.connection = connection; - this.userId = userId; - this.provider = provider; - this.isSocial = isSocial; - this.accessToken = accessToken; - this.accessTokenSecret = accessTokenSecret; - this.refreshToken = refreshToken; - this.profileData = profileData; - this.additionalProperties = additionalProperties; - } - - /** - * @return Name of the connection containing this identity. - */ - @JsonProperty("connection") - public Optional getConnection() { - return connection; - } - - /** - * @return Unique identifier of the user user for this identity. - */ - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - @JsonProperty("provider") - public Optional getProvider() { - return provider; - } - - /** - * @return Whether this identity is from a social provider (true) or not (false). - */ - @JsonProperty("isSocial") - public Optional getIsSocial() { - return isSocial; - } - - /** - * @return IDP access token returned only if scope read:user_idp_tokens is defined. - */ - @JsonProperty("access_token") - public Optional getAccessToken() { - return accessToken; - } - - /** - * @return IDP access token secret returned only if scope read:user_idp_tokens is defined. - */ - @JsonProperty("access_token_secret") - public Optional getAccessTokenSecret() { - return accessTokenSecret; - } - - /** - * @return IDP refresh token returned only if scope read:user_idp_tokens is defined. - */ - @JsonProperty("refresh_token") - public Optional getRefreshToken() { - return refreshToken; - } - - @JsonProperty("profileData") - public Optional getProfileData() { - return profileData; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserIdentitySchema && equalTo((UserIdentitySchema) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserIdentitySchema other) { - return connection.equals(other.connection) - && userId.equals(other.userId) - && provider.equals(other.provider) - && isSocial.equals(other.isSocial) - && accessToken.equals(other.accessToken) - && accessTokenSecret.equals(other.accessTokenSecret) - && refreshToken.equals(other.refreshToken) - && profileData.equals(other.profileData); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.connection, - this.userId, - this.provider, - this.isSocial, - this.accessToken, - this.accessTokenSecret, - this.refreshToken, - this.profileData); - } - - @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 connection = Optional.empty(); - - private Optional userId = Optional.empty(); - - private Optional provider = Optional.empty(); - - private Optional isSocial = Optional.empty(); - - private Optional accessToken = Optional.empty(); - - private Optional accessTokenSecret = Optional.empty(); - - private Optional refreshToken = Optional.empty(); - - private Optional profileData = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserIdentitySchema other) { - connection(other.getConnection()); - userId(other.getUserId()); - provider(other.getProvider()); - isSocial(other.getIsSocial()); - accessToken(other.getAccessToken()); - accessTokenSecret(other.getAccessTokenSecret()); - refreshToken(other.getRefreshToken()); - profileData(other.getProfileData()); - return this; - } - - /** - *

Name of the connection containing this identity.

- */ - @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; - } - - /** - *

Unique identifier of the user user for this identity.

- */ - @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; - } - - @JsonSetter(value = "provider", nulls = Nulls.SKIP) - public Builder provider(Optional provider) { - this.provider = provider; - return this; - } - - public Builder provider(UserIdentityProviderEnum provider) { - this.provider = Optional.ofNullable(provider); - return this; - } - - /** - *

Whether this identity is from a social provider (true) or not (false).

- */ - @JsonSetter(value = "isSocial", nulls = Nulls.SKIP) - public Builder isSocial(Optional isSocial) { - this.isSocial = isSocial; - return this; - } - - public Builder isSocial(Boolean isSocial) { - this.isSocial = Optional.ofNullable(isSocial); - return this; - } - - /** - *

IDP access token returned only if scope read:user_idp_tokens is defined.

- */ - @JsonSetter(value = "access_token", nulls = Nulls.SKIP) - public Builder accessToken(Optional accessToken) { - this.accessToken = accessToken; - return this; - } - - public Builder accessToken(String accessToken) { - this.accessToken = Optional.ofNullable(accessToken); - return this; - } - - /** - *

IDP access token secret returned only if scope read:user_idp_tokens is defined.

- */ - @JsonSetter(value = "access_token_secret", nulls = Nulls.SKIP) - public Builder accessTokenSecret(Optional accessTokenSecret) { - this.accessTokenSecret = accessTokenSecret; - return this; - } - - public Builder accessTokenSecret(String accessTokenSecret) { - this.accessTokenSecret = Optional.ofNullable(accessTokenSecret); - return this; - } - - /** - *

IDP refresh token returned only if scope read:user_idp_tokens is defined.

- */ - @JsonSetter(value = "refresh_token", nulls = Nulls.SKIP) - public Builder refreshToken(Optional refreshToken) { - this.refreshToken = refreshToken; - return this; - } - - public Builder refreshToken(String refreshToken) { - this.refreshToken = Optional.ofNullable(refreshToken); - return this; - } - - @JsonSetter(value = "profileData", nulls = Nulls.SKIP) - public Builder profileData(Optional profileData) { - this.profileData = profileData; - return this; - } - - public Builder profileData(UserProfileData profileData) { - this.profileData = Optional.ofNullable(profileData); - return this; - } - - public UserIdentitySchema build() { - return new UserIdentitySchema( - connection, - userId, - provider, - isSocial, - accessToken, - accessTokenSecret, - refreshToken, - profileData, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserListLogOffsetPaginatedResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/UserListLogOffsetPaginatedResponseContent.java deleted file mode 100644 index 6cc6f997c..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserListLogOffsetPaginatedResponseContent.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserListLogOffsetPaginatedResponseContent.Builder.class) -public final class UserListLogOffsetPaginatedResponseContent { - private final Optional start; - - private final Optional limit; - - private final Optional length; - - private final Optional total; - - private final Optional> logs; - - private final Map additionalProperties; - - private UserListLogOffsetPaginatedResponseContent( - Optional start, - Optional limit, - Optional length, - Optional total, - Optional> logs, - Map additionalProperties) { - this.start = start; - this.limit = limit; - this.length = length; - this.total = total; - this.logs = logs; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("start") - public Optional getStart() { - return start; - } - - @JsonProperty("limit") - public Optional getLimit() { - return limit; - } - - @JsonProperty("length") - public Optional getLength() { - return length; - } - - @JsonProperty("total") - public Optional getTotal() { - return total; - } - - @JsonProperty("logs") - public Optional> getLogs() { - return logs; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserListLogOffsetPaginatedResponseContent - && equalTo((UserListLogOffsetPaginatedResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserListLogOffsetPaginatedResponseContent other) { - return start.equals(other.start) - && limit.equals(other.limit) - && length.equals(other.length) - && total.equals(other.total) - && logs.equals(other.logs); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.start, this.limit, this.length, this.total, this.logs); - } - - @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 start = Optional.empty(); - - private Optional limit = Optional.empty(); - - private Optional length = Optional.empty(); - - private Optional total = Optional.empty(); - - private Optional> logs = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserListLogOffsetPaginatedResponseContent other) { - start(other.getStart()); - limit(other.getLimit()); - length(other.getLength()); - total(other.getTotal()); - logs(other.getLogs()); - return this; - } - - @JsonSetter(value = "start", nulls = Nulls.SKIP) - public Builder start(Optional 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) { - this.limit = limit; - return this; - } - - public Builder limit(Double limit) { - this.limit = Optional.ofNullable(limit); - return this; - } - - @JsonSetter(value = "length", nulls = Nulls.SKIP) - public Builder length(Optional length) { - this.length = length; - return this; - } - - public Builder length(Double length) { - this.length = Optional.ofNullable(length); - return this; - } - - @JsonSetter(value = "total", nulls = Nulls.SKIP) - public Builder total(Optional total) { - this.total = total; - return this; - } - - public Builder total(Double total) { - this.total = Optional.ofNullable(total); - return this; - } - - @JsonSetter(value = "logs", nulls = Nulls.SKIP) - public Builder logs(Optional> logs) { - this.logs = logs; - return this; - } - - public Builder logs(List logs) { - this.logs = Optional.ofNullable(logs); - return this; - } - - public UserListLogOffsetPaginatedResponseContent build() { - return new UserListLogOffsetPaginatedResponseContent( - start, limit, length, total, logs, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserMultifactorProviderEnum.java b/src/main/java/com/auth0/client/mgmt/types/UserMultifactorProviderEnum.java deleted file mode 100644 index 678d1a9c6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserMultifactorProviderEnum.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class UserMultifactorProviderEnum { - public static final UserMultifactorProviderEnum DUO = new UserMultifactorProviderEnum(Value.DUO, "duo"); - - public static final UserMultifactorProviderEnum GOOGLE_AUTHENTICATOR = - new UserMultifactorProviderEnum(Value.GOOGLE_AUTHENTICATOR, "google-authenticator"); - - private final Value value; - - private final String string; - - UserMultifactorProviderEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof UserMultifactorProviderEnum - && this.string.equals(((UserMultifactorProviderEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case DUO: - return visitor.visitDuo(); - case GOOGLE_AUTHENTICATOR: - return visitor.visitGoogleAuthenticator(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static UserMultifactorProviderEnum valueOf(String value) { - switch (value) { - case "duo": - return DUO; - case "google-authenticator": - return GOOGLE_AUTHENTICATOR; - default: - return new UserMultifactorProviderEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - DUO, - - GOOGLE_AUTHENTICATOR, - - UNKNOWN - } - - public interface Visitor { - T visitDuo(); - - T visitGoogleAuthenticator(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserPermissionSchema.java b/src/main/java/com/auth0/client/mgmt/types/UserPermissionSchema.java deleted file mode 100644 index 0bd26cc73..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserPermissionSchema.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserPermissionSchema.Builder.class) -public final class UserPermissionSchema { - private final Optional resourceServerIdentifier; - - private final Optional permissionName; - - private final Optional resourceServerName; - - private final Optional description; - - private final Map additionalProperties; - - private UserPermissionSchema( - Optional resourceServerIdentifier, - Optional permissionName, - Optional resourceServerName, - Optional description, - Map additionalProperties) { - this.resourceServerIdentifier = resourceServerIdentifier; - this.permissionName = permissionName; - this.resourceServerName = resourceServerName; - this.description = description; - this.additionalProperties = additionalProperties; - } - - /** - * @return Resource server (API) identifier that this permission is for. - */ - @JsonProperty("resource_server_identifier") - public Optional getResourceServerIdentifier() { - return resourceServerIdentifier; - } - - /** - * @return Name of this permission. - */ - @JsonProperty("permission_name") - public Optional getPermissionName() { - return permissionName; - } - - /** - * @return Resource server (API) name this permission is for. - */ - @JsonProperty("resource_server_name") - public Optional getResourceServerName() { - return resourceServerName; - } - - /** - * @return Description of this permission. - */ - @JsonProperty("description") - public Optional getDescription() { - return description; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UserPermissionSchema && equalTo((UserPermissionSchema) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserPermissionSchema other) { - return resourceServerIdentifier.equals(other.resourceServerIdentifier) - && permissionName.equals(other.permissionName) - && resourceServerName.equals(other.resourceServerName) - && description.equals(other.description); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.resourceServerIdentifier, this.permissionName, this.resourceServerName, this.description); - } - - @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 resourceServerIdentifier = Optional.empty(); - - private Optional permissionName = Optional.empty(); - - private Optional resourceServerName = Optional.empty(); - - private Optional description = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserPermissionSchema other) { - resourceServerIdentifier(other.getResourceServerIdentifier()); - permissionName(other.getPermissionName()); - resourceServerName(other.getResourceServerName()); - description(other.getDescription()); - return this; - } - - /** - *

Resource server (API) identifier that this permission is for.

- */ - @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; - } - - /** - *

Name of this permission.

- */ - @JsonSetter(value = "permission_name", nulls = Nulls.SKIP) - public Builder permissionName(Optional permissionName) { - this.permissionName = permissionName; - return this; - } - - public Builder permissionName(String permissionName) { - this.permissionName = Optional.ofNullable(permissionName); - return this; - } - - /** - *

Resource server (API) name this permission is for.

- */ - @JsonSetter(value = "resource_server_name", nulls = Nulls.SKIP) - public Builder resourceServerName(Optional resourceServerName) { - this.resourceServerName = resourceServerName; - return this; - } - - public Builder resourceServerName(String resourceServerName) { - this.resourceServerName = Optional.ofNullable(resourceServerName); - return this; - } - - /** - *

Description of this permission.

- */ - @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; - } - - public UserPermissionSchema build() { - return new UserPermissionSchema( - resourceServerIdentifier, permissionName, resourceServerName, description, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserProfileData.java b/src/main/java/com/auth0/client/mgmt/types/UserProfileData.java deleted file mode 100644 index e76d8a547..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserProfileData.java +++ /dev/null @@ -1,330 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserProfileData.Builder.class) -public final class UserProfileData { - private final Optional email; - - private final Optional emailVerified; - - private final Optional name; - - private final Optional username; - - private final Optional givenName; - - private final Optional phoneNumber; - - private final Optional phoneVerified; - - private final Optional familyName; - - private final Map additionalProperties; - - private UserProfileData( - Optional email, - Optional emailVerified, - Optional name, - Optional username, - Optional givenName, - Optional phoneNumber, - Optional phoneVerified, - Optional familyName, - Map additionalProperties) { - this.email = email; - this.emailVerified = emailVerified; - this.name = name; - this.username = username; - this.givenName = givenName; - this.phoneNumber = phoneNumber; - this.phoneVerified = phoneVerified; - this.familyName = familyName; - 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 Phone number for this user. - */ - @JsonProperty("phone_number") - public Optional getPhoneNumber() { - return phoneNumber; - } - - /** - * @return Whether this phone number is verified (true) or unverified (false). - */ - @JsonProperty("phone_verified") - public Optional getPhoneVerified() { - return phoneVerified; - } - - /** - * @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 UserProfileData && equalTo((UserProfileData) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserProfileData other) { - return email.equals(other.email) - && emailVerified.equals(other.emailVerified) - && name.equals(other.name) - && username.equals(other.username) - && givenName.equals(other.givenName) - && phoneNumber.equals(other.phoneNumber) - && phoneVerified.equals(other.phoneVerified) - && familyName.equals(other.familyName); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.email, - this.emailVerified, - this.name, - this.username, - this.givenName, - this.phoneNumber, - this.phoneVerified, - this.familyName); - } - - @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 phoneNumber = Optional.empty(); - - private Optional phoneVerified = Optional.empty(); - - private Optional familyName = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserProfileData other) { - email(other.getEmail()); - emailVerified(other.getEmailVerified()); - name(other.getName()); - username(other.getUsername()); - givenName(other.getGivenName()); - phoneNumber(other.getPhoneNumber()); - phoneVerified(other.getPhoneVerified()); - familyName(other.getFamilyName()); - 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; - } - - /** - *

Phone number for 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 is verified (true) or unverified (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; - } - - /** - *

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; - } - - public UserProfileData build() { - return new UserProfileData( - email, - emailVerified, - name, - username, - givenName, - phoneNumber, - phoneVerified, - familyName, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UserResponseSchema.java b/src/main/java/com/auth0/client/mgmt/types/UserResponseSchema.java deleted file mode 100644 index e177e50d5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UserResponseSchema.java +++ /dev/null @@ -1,717 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UserResponseSchema.Builder.class) -public final class UserResponseSchema { - private final Optional userId; - - private final Optional email; - - private final Optional emailVerified; - - private final Optional username; - - private final Optional phoneNumber; - - private final Optional phoneVerified; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Optional> 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 UserResponseSchema( - Optional userId, - Optional email, - Optional emailVerified, - Optional username, - Optional phoneNumber, - Optional phoneVerified, - Optional createdAt, - Optional updatedAt, - Optional> 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 Optional 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 for this user. Follows the <a href="https://en.wikipedia.org/wiki/E.164">E.164 recommendation</a>. - */ - @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; - } - - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - /** - * @return Array of user identity objects when accounts are linked. - */ - @JsonProperty("identities") - public Optional> 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; - } - - @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 UserResponseSchema && equalTo((UserResponseSchema) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UserResponseSchema 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 Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional userId = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional emailVerified = Optional.empty(); - - private Optional username = Optional.empty(); - - private Optional phoneNumber = Optional.empty(); - - private Optional phoneVerified = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - private Optional> identities = Optional.empty(); - - private Optional> appMetadata = Optional.empty(); - - private Optional> userMetadata = Optional.empty(); - - private Optional picture = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional nickname = Optional.empty(); - - private Optional> multifactor = Optional.empty(); - - private Optional lastIp = Optional.empty(); - - private Optional lastLogin = Optional.empty(); - - private Optional loginsCount = Optional.empty(); - - private Optional blocked = Optional.empty(); - - private Optional givenName = Optional.empty(); - - private Optional familyName = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UserResponseSchema 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.

- */ - @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; - } - - /** - *

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; - } - - /** - *

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; - } - - /** - *

Phone number for this user. Follows the <a href="https://en.wikipedia.org/wiki/E.164">E.164 recommendation</a>.

- */ - @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; - } - - @JsonSetter(value = "created_at", nulls = Nulls.SKIP) - public Builder createdAt(Optional createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder createdAt(UserDateSchema createdAt) { - this.createdAt = Optional.ofNullable(createdAt); - return this; - } - - @JsonSetter(value = "updated_at", nulls = Nulls.SKIP) - public Builder updatedAt(Optional updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - public Builder updatedAt(UserDateSchema updatedAt) { - this.updatedAt = Optional.ofNullable(updatedAt); - return this; - } - - /** - *

Array of user identity objects when accounts are linked.

- */ - @JsonSetter(value = "identities", nulls = Nulls.SKIP) - public Builder identities(Optional> identities) { - this.identities = identities; - return this; - } - - public Builder identities(List identities) { - this.identities = Optional.ofNullable(identities); - return this; - } - - @JsonSetter(value = "app_metadata", nulls = Nulls.SKIP) - public Builder appMetadata(Optional> appMetadata) { - this.appMetadata = appMetadata; - return this; - } - - public Builder appMetadata(Map appMetadata) { - this.appMetadata = Optional.ofNullable(appMetadata); - return this; - } - - @JsonSetter(value = "user_metadata", nulls = Nulls.SKIP) - public Builder userMetadata(Optional> userMetadata) { - this.userMetadata = userMetadata; - return this; - } - - public Builder userMetadata(Map userMetadata) { - this.userMetadata = Optional.ofNullable(userMetadata); - return this; - } - - /** - *

URL to picture, photo, or avatar of 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; - } - - /** - *

Preferred nickname or alias of this user.

- */ - @JsonSetter(value = "nickname", nulls = Nulls.SKIP) - public Builder nickname(Optional nickname) { - this.nickname = nickname; - return this; - } - - public Builder nickname(String nickname) { - this.nickname = Optional.ofNullable(nickname); - return this; - } - - /** - *

List of multi-factor authentication providers with which this user has enrolled.

- */ - @JsonSetter(value = "multifactor", nulls = Nulls.SKIP) - public Builder multifactor(Optional> multifactor) { - this.multifactor = multifactor; - return this; - } - - public Builder multifactor(List multifactor) { - this.multifactor = Optional.ofNullable(multifactor); - return this; - } - - /** - *

Last IP address from which this user logged in.

- */ - @JsonSetter(value = "last_ip", nulls = Nulls.SKIP) - public Builder lastIp(Optional lastIp) { - this.lastIp = lastIp; - return this; - } - - public Builder lastIp(String lastIp) { - this.lastIp = Optional.ofNullable(lastIp); - return this; - } - - @JsonSetter(value = "last_login", nulls = Nulls.SKIP) - public Builder lastLogin(Optional lastLogin) { - this.lastLogin = lastLogin; - return this; - } - - public Builder lastLogin(UserDateSchema lastLogin) { - this.lastLogin = Optional.ofNullable(lastLogin); - return this; - } - - /** - *

Total number of logins this user has performed.

- */ - @JsonSetter(value = "logins_count", nulls = Nulls.SKIP) - public Builder loginsCount(Optional loginsCount) { - this.loginsCount = loginsCount; - return this; - } - - public Builder loginsCount(Integer loginsCount) { - this.loginsCount = Optional.ofNullable(loginsCount); - return this; - } - - /** - *

Whether this user was blocked by an administrator (true) or is not (false).

- */ - @JsonSetter(value = "blocked", nulls = Nulls.SKIP) - public Builder blocked(Optional blocked) { - this.blocked = blocked; - return this; - } - - public Builder blocked(Boolean blocked) { - this.blocked = Optional.ofNullable(blocked); - 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; - } - - public UserResponseSchema build() { - return new UserResponseSchema( - userId, - email, - emailVerified, - username, - phoneNumber, - phoneVerified, - createdAt, - updatedAt, - identities, - appMetadata, - userMetadata, - picture, - name, - nickname, - multifactor, - lastIp, - lastLogin, - loginsCount, - blocked, - givenName, - familyName, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UsernameAllowedTypes.java b/src/main/java/com/auth0/client/mgmt/types/UsernameAllowedTypes.java deleted file mode 100644 index fd678fdb8..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UsernameAllowedTypes.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UsernameAllowedTypes.Builder.class) -public final class UsernameAllowedTypes { - private final Optional email; - - private final Optional phoneNumber; - - private final Map additionalProperties; - - private UsernameAllowedTypes( - Optional email, Optional phoneNumber, Map additionalProperties) { - this.email = email; - this.phoneNumber = phoneNumber; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - @JsonProperty("phone_number") - public Optional getPhoneNumber() { - return phoneNumber; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UsernameAllowedTypes && equalTo((UsernameAllowedTypes) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UsernameAllowedTypes other) { - return email.equals(other.email) && phoneNumber.equals(other.phoneNumber); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.email, this.phoneNumber); - } - - @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 phoneNumber = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UsernameAllowedTypes other) { - email(other.getEmail()); - phoneNumber(other.getPhoneNumber()); - return this; - } - - @JsonSetter(value = "email", nulls = Nulls.SKIP) - public Builder email(Optional email) { - this.email = email; - return this; - } - - public Builder email(Boolean email) { - this.email = Optional.ofNullable(email); - return this; - } - - @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) - public Builder phoneNumber(Optional phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - public Builder phoneNumber(Boolean phoneNumber) { - this.phoneNumber = Optional.ofNullable(phoneNumber); - return this; - } - - public UsernameAllowedTypes build() { - return new UsernameAllowedTypes(email, phoneNumber, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UsernameAttribute.java b/src/main/java/com/auth0/client/mgmt/types/UsernameAttribute.java deleted file mode 100644 index 81d7ee07d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UsernameAttribute.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UsernameAttribute.Builder.class) -public final class UsernameAttribute { - private final Optional identifier; - - private final Optional profileRequired; - - private final Optional signup; - - private final Optional validation; - - private final Map additionalProperties; - - private UsernameAttribute( - Optional identifier, - Optional profileRequired, - Optional signup, - Optional validation, - Map additionalProperties) { - this.identifier = identifier; - this.profileRequired = profileRequired; - this.signup = signup; - this.validation = validation; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("identifier") - public Optional getIdentifier() { - return identifier; - } - - /** - * @return Determines if property should be required for users - */ - @JsonProperty("profile_required") - public Optional getProfileRequired() { - return profileRequired; - } - - @JsonProperty("signup") - public Optional getSignup() { - return signup; - } - - @JsonProperty("validation") - public Optional getValidation() { - return validation; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UsernameAttribute && equalTo((UsernameAttribute) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UsernameAttribute other) { - return identifier.equals(other.identifier) - && profileRequired.equals(other.profileRequired) - && signup.equals(other.signup) - && validation.equals(other.validation); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.identifier, this.profileRequired, this.signup, this.validation); - } - - @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 identifier = Optional.empty(); - - private Optional profileRequired = Optional.empty(); - - private Optional signup = Optional.empty(); - - private Optional validation = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UsernameAttribute other) { - identifier(other.getIdentifier()); - profileRequired(other.getProfileRequired()); - signup(other.getSignup()); - validation(other.getValidation()); - return this; - } - - @JsonSetter(value = "identifier", nulls = Nulls.SKIP) - public Builder identifier(Optional identifier) { - this.identifier = identifier; - return this; - } - - public Builder identifier(ConnectionAttributeIdentifier identifier) { - this.identifier = Optional.ofNullable(identifier); - return this; - } - - /** - *

Determines if property should be required for users

- */ - @JsonSetter(value = "profile_required", nulls = Nulls.SKIP) - public Builder profileRequired(Optional profileRequired) { - this.profileRequired = profileRequired; - return this; - } - - public Builder profileRequired(Boolean profileRequired) { - this.profileRequired = Optional.ofNullable(profileRequired); - return this; - } - - @JsonSetter(value = "signup", nulls = Nulls.SKIP) - public Builder signup(Optional signup) { - this.signup = signup; - return this; - } - - public Builder signup(SignupSchema signup) { - this.signup = Optional.ofNullable(signup); - return this; - } - - @JsonSetter(value = "validation", nulls = Nulls.SKIP) - public Builder validation(Optional validation) { - this.validation = validation; - return this; - } - - public Builder validation(UsernameValidation validation) { - this.validation = Optional.ofNullable(validation); - return this; - } - - public UsernameAttribute build() { - return new UsernameAttribute(identifier, profileRequired, signup, validation, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UsernameValidation.java b/src/main/java/com/auth0/client/mgmt/types/UsernameValidation.java deleted file mode 100644 index d8070e03b..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UsernameValidation.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UsernameValidation.Builder.class) -public final class UsernameValidation { - private final Optional minLength; - - private final Optional maxLength; - - private final Optional allowedTypes; - - private final Map additionalProperties; - - private UsernameValidation( - Optional minLength, - Optional maxLength, - Optional allowedTypes, - Map additionalProperties) { - this.minLength = minLength; - this.maxLength = maxLength; - this.allowedTypes = allowedTypes; - this.additionalProperties = additionalProperties; - } - - /** - * @return Minimum allowed length - */ - @JsonProperty("min_length") - public Optional getMinLength() { - return minLength; - } - - /** - * @return Maximum allowed length - */ - @JsonProperty("max_length") - public Optional getMaxLength() { - return maxLength; - } - - @JsonProperty("allowed_types") - public Optional getAllowedTypes() { - return allowedTypes; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UsernameValidation && equalTo((UsernameValidation) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UsernameValidation other) { - return minLength.equals(other.minLength) - && maxLength.equals(other.maxLength) - && allowedTypes.equals(other.allowedTypes); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.minLength, this.maxLength, this.allowedTypes); - } - - @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 minLength = Optional.empty(); - - private Optional maxLength = Optional.empty(); - - private Optional allowedTypes = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UsernameValidation other) { - minLength(other.getMinLength()); - maxLength(other.getMaxLength()); - allowedTypes(other.getAllowedTypes()); - return this; - } - - /** - *

Minimum allowed length

- */ - @JsonSetter(value = "min_length", nulls = Nulls.SKIP) - public Builder minLength(Optional minLength) { - this.minLength = minLength; - return this; - } - - public Builder minLength(Double minLength) { - this.minLength = Optional.ofNullable(minLength); - return this; - } - - /** - *

Maximum allowed length

- */ - @JsonSetter(value = "max_length", nulls = Nulls.SKIP) - public Builder maxLength(Optional maxLength) { - this.maxLength = maxLength; - return this; - } - - public Builder maxLength(Double maxLength) { - this.maxLength = Optional.ofNullable(maxLength); - return this; - } - - @JsonSetter(value = "allowed_types", nulls = Nulls.SKIP) - public Builder allowedTypes(Optional allowedTypes) { - this.allowedTypes = allowedTypes; - return this; - } - - public Builder allowedTypes(UsernameAllowedTypes allowedTypes) { - this.allowedTypes = Optional.ofNullable(allowedTypes); - return this; - } - - public UsernameValidation build() { - return new UsernameValidation(minLength, maxLength, allowedTypes, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/UsersEnrollment.java b/src/main/java/com/auth0/client/mgmt/types/UsersEnrollment.java deleted file mode 100644 index 17c5706ff..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/UsersEnrollment.java +++ /dev/null @@ -1,351 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.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; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = UsersEnrollment.Builder.class) -public final class UsersEnrollment { - private final Optional id; - - private final Optional status; - - private final Optional type; - - private final Optional name; - - private final Optional identifier; - - private final Optional phoneNumber; - - private final Optional authMethod; - - private final Optional enrolledAt; - - private final Optional lastAuth; - - private final Map additionalProperties; - - private UsersEnrollment( - Optional id, - Optional status, - Optional type, - Optional name, - Optional identifier, - Optional phoneNumber, - Optional authMethod, - Optional enrolledAt, - Optional lastAuth, - Map additionalProperties) { - this.id = id; - this.status = status; - this.type = type; - this.name = name; - this.identifier = identifier; - this.phoneNumber = phoneNumber; - this.authMethod = authMethod; - this.enrolledAt = enrolledAt; - this.lastAuth = lastAuth; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of this enrollment. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - @JsonProperty("status") - public Optional getStatus() { - return status; - } - - /** - * @return Type of enrollment. - */ - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return Name of enrollment (usually phone number). - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Device identifier (usually phone identifier) of this enrollment. - */ - @JsonProperty("identifier") - public Optional getIdentifier() { - return identifier; - } - - /** - * @return Phone number for this enrollment. - */ - @JsonProperty("phone_number") - public Optional getPhoneNumber() { - return phoneNumber; - } - - @JsonProperty("auth_method") - public Optional getAuthMethod() { - return authMethod; - } - - /** - * @return Start date and time of this enrollment. - */ - @JsonProperty("enrolled_at") - public Optional getEnrolledAt() { - return enrolledAt; - } - - /** - * @return Last authentication date and time of this enrollment. - */ - @JsonProperty("last_auth") - public Optional getLastAuth() { - return lastAuth; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UsersEnrollment && equalTo((UsersEnrollment) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UsersEnrollment other) { - return id.equals(other.id) - && status.equals(other.status) - && type.equals(other.type) - && name.equals(other.name) - && identifier.equals(other.identifier) - && phoneNumber.equals(other.phoneNumber) - && authMethod.equals(other.authMethod) - && enrolledAt.equals(other.enrolledAt) - && lastAuth.equals(other.lastAuth); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.status, - this.type, - this.name, - this.identifier, - this.phoneNumber, - this.authMethod, - this.enrolledAt, - this.lastAuth); - } - - @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 status = Optional.empty(); - - private Optional type = Optional.empty(); - - private Optional name = Optional.empty(); - - private Optional identifier = Optional.empty(); - - private Optional phoneNumber = Optional.empty(); - - private Optional authMethod = Optional.empty(); - - private Optional enrolledAt = Optional.empty(); - - private Optional lastAuth = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UsersEnrollment other) { - id(other.getId()); - status(other.getStatus()); - type(other.getType()); - name(other.getName()); - identifier(other.getIdentifier()); - phoneNumber(other.getPhoneNumber()); - authMethod(other.getAuthMethod()); - enrolledAt(other.getEnrolledAt()); - lastAuth(other.getLastAuth()); - return this; - } - - /** - *

ID of this enrollment.

- */ - @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 = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { - this.status = status; - return this; - } - - public Builder status(UserEnrollmentStatusEnum status) { - this.status = Optional.ofNullable(status); - return this; - } - - /** - *

Type of enrollment.

- */ - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(String type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

Name of enrollment (usually phone number).

- */ - @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; - } - - /** - *

Device identifier (usually phone identifier) of this enrollment.

- */ - @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; - } - - /** - *

Phone number for this enrollment.

- */ - @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; - } - - @JsonSetter(value = "auth_method", nulls = Nulls.SKIP) - public Builder authMethod(Optional authMethod) { - this.authMethod = authMethod; - return this; - } - - public Builder authMethod(UserEnrollmentAuthMethodEnum authMethod) { - this.authMethod = Optional.ofNullable(authMethod); - return this; - } - - /** - *

Start date and time of this enrollment.

- */ - @JsonSetter(value = "enrolled_at", nulls = Nulls.SKIP) - public Builder enrolledAt(Optional enrolledAt) { - this.enrolledAt = enrolledAt; - return this; - } - - public Builder enrolledAt(OffsetDateTime enrolledAt) { - this.enrolledAt = Optional.ofNullable(enrolledAt); - return this; - } - - /** - *

Last authentication date and time of this enrollment.

- */ - @JsonSetter(value = "last_auth", nulls = Nulls.SKIP) - public Builder lastAuth(Optional lastAuth) { - this.lastAuth = lastAuth; - return this; - } - - public Builder lastAuth(OffsetDateTime lastAuth) { - this.lastAuth = Optional.ofNullable(lastAuth); - return this; - } - - public UsersEnrollment build() { - return new UsersEnrollment( - id, - status, - type, - name, - identifier, - phoneNumber, - authMethod, - enrolledAt, - lastAuth, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/VerifiableCredentialTemplateResponse.java b/src/main/java/com/auth0/client/mgmt/types/VerifiableCredentialTemplateResponse.java deleted file mode 100644 index 1a17eb380..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/VerifiableCredentialTemplateResponse.java +++ /dev/null @@ -1,422 +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 = VerifiableCredentialTemplateResponse.Builder.class) -public final class VerifiableCredentialTemplateResponse { - private final Optional id; - - private final Optional name; - - private final Optional type; - - private final Optional dialect; - - private final Optional presentation; - - private final OptionalNullable customCertificateAuthority; - - private final OptionalNullable wellKnownTrustedIssuers; - - private final Optional createdAt; - - private final Optional updatedAt; - - private final Map additionalProperties; - - private VerifiableCredentialTemplateResponse( - Optional id, - Optional name, - Optional type, - Optional dialect, - Optional presentation, - OptionalNullable customCertificateAuthority, - OptionalNullable wellKnownTrustedIssuers, - Optional createdAt, - Optional updatedAt, - Map additionalProperties) { - this.id = id; - this.name = name; - this.type = type; - this.dialect = dialect; - this.presentation = presentation; - this.customCertificateAuthority = customCertificateAuthority; - this.wellKnownTrustedIssuers = wellKnownTrustedIssuers; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.additionalProperties = additionalProperties; - } - - /** - * @return The id of the template. - */ - @JsonProperty("id") - public Optional getId() { - return id; - } - - /** - * @return The name of the template. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return The type of the template. - */ - @JsonProperty("type") - public Optional getType() { - return type; - } - - /** - * @return The dialect of the template. - */ - @JsonProperty("dialect") - public Optional getDialect() { - return dialect; - } - - @JsonProperty("presentation") - public Optional getPresentation() { - return presentation; - } - - /** - * @return The custom certificate authority. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_certificate_authority") - public OptionalNullable getCustomCertificateAuthority() { - if (customCertificateAuthority == null) { - return OptionalNullable.absent(); - } - return customCertificateAuthority; - } - - /** - * @return The well-known trusted issuers, comma separated. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("well_known_trusted_issuers") - public OptionalNullable getWellKnownTrustedIssuers() { - if (wellKnownTrustedIssuers == null) { - return OptionalNullable.absent(); - } - return wellKnownTrustedIssuers; - } - - /** - * @return The date and time the template was created. - */ - @JsonProperty("created_at") - public Optional getCreatedAt() { - return createdAt; - } - - /** - * @return The date and time the template was created. - */ - @JsonProperty("updated_at") - public Optional getUpdatedAt() { - return updatedAt; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_certificate_authority") - private OptionalNullable _getCustomCertificateAuthority() { - return customCertificateAuthority; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("well_known_trusted_issuers") - private OptionalNullable _getWellKnownTrustedIssuers() { - return wellKnownTrustedIssuers; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof VerifiableCredentialTemplateResponse - && equalTo((VerifiableCredentialTemplateResponse) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(VerifiableCredentialTemplateResponse other) { - return id.equals(other.id) - && name.equals(other.name) - && type.equals(other.type) - && dialect.equals(other.dialect) - && presentation.equals(other.presentation) - && customCertificateAuthority.equals(other.customCertificateAuthority) - && wellKnownTrustedIssuers.equals(other.wellKnownTrustedIssuers) - && createdAt.equals(other.createdAt) - && updatedAt.equals(other.updatedAt); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.id, - this.name, - this.type, - this.dialect, - this.presentation, - this.customCertificateAuthority, - this.wellKnownTrustedIssuers, - this.createdAt, - this.updatedAt); - } - - @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 type = Optional.empty(); - - private Optional dialect = Optional.empty(); - - private Optional presentation = Optional.empty(); - - private OptionalNullable customCertificateAuthority = OptionalNullable.absent(); - - private OptionalNullable wellKnownTrustedIssuers = OptionalNullable.absent(); - - private Optional createdAt = Optional.empty(); - - private Optional updatedAt = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(VerifiableCredentialTemplateResponse other) { - id(other.getId()); - name(other.getName()); - type(other.getType()); - dialect(other.getDialect()); - presentation(other.getPresentation()); - customCertificateAuthority(other.getCustomCertificateAuthority()); - wellKnownTrustedIssuers(other.getWellKnownTrustedIssuers()); - createdAt(other.getCreatedAt()); - updatedAt(other.getUpdatedAt()); - return this; - } - - /** - *

The id of the template.

- */ - @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 the template.

- */ - @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 template.

- */ - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { - this.type = type; - return this; - } - - public Builder type(String type) { - this.type = Optional.ofNullable(type); - return this; - } - - /** - *

The dialect of the template.

- */ - @JsonSetter(value = "dialect", nulls = Nulls.SKIP) - public Builder dialect(Optional dialect) { - this.dialect = dialect; - return this; - } - - public Builder dialect(String dialect) { - this.dialect = Optional.ofNullable(dialect); - return this; - } - - @JsonSetter(value = "presentation", nulls = Nulls.SKIP) - public Builder presentation(Optional presentation) { - this.presentation = presentation; - return this; - } - - public Builder presentation(MdlPresentationRequest presentation) { - this.presentation = Optional.ofNullable(presentation); - return this; - } - - /** - *

The custom certificate authority.

- */ - @JsonSetter(value = "custom_certificate_authority", nulls = Nulls.SKIP) - public Builder customCertificateAuthority(@Nullable OptionalNullable customCertificateAuthority) { - this.customCertificateAuthority = customCertificateAuthority; - return this; - } - - public Builder customCertificateAuthority(String customCertificateAuthority) { - this.customCertificateAuthority = OptionalNullable.of(customCertificateAuthority); - return this; - } - - public Builder customCertificateAuthority(Optional customCertificateAuthority) { - if (customCertificateAuthority.isPresent()) { - this.customCertificateAuthority = OptionalNullable.of(customCertificateAuthority.get()); - } else { - this.customCertificateAuthority = OptionalNullable.absent(); - } - return this; - } - - public Builder customCertificateAuthority( - com.auth0.client.mgmt.core.Nullable customCertificateAuthority) { - if (customCertificateAuthority.isNull()) { - this.customCertificateAuthority = OptionalNullable.ofNull(); - } else if (customCertificateAuthority.isEmpty()) { - this.customCertificateAuthority = OptionalNullable.absent(); - } else { - this.customCertificateAuthority = OptionalNullable.of(customCertificateAuthority.get()); - } - return this; - } - - /** - *

The well-known trusted issuers, comma separated.

- */ - @JsonSetter(value = "well_known_trusted_issuers", nulls = Nulls.SKIP) - public Builder wellKnownTrustedIssuers(@Nullable OptionalNullable wellKnownTrustedIssuers) { - this.wellKnownTrustedIssuers = wellKnownTrustedIssuers; - return this; - } - - public Builder wellKnownTrustedIssuers(String wellKnownTrustedIssuers) { - this.wellKnownTrustedIssuers = OptionalNullable.of(wellKnownTrustedIssuers); - return this; - } - - public Builder wellKnownTrustedIssuers(Optional wellKnownTrustedIssuers) { - if (wellKnownTrustedIssuers.isPresent()) { - this.wellKnownTrustedIssuers = OptionalNullable.of(wellKnownTrustedIssuers.get()); - } else { - this.wellKnownTrustedIssuers = OptionalNullable.absent(); - } - return this; - } - - public Builder wellKnownTrustedIssuers(com.auth0.client.mgmt.core.Nullable wellKnownTrustedIssuers) { - if (wellKnownTrustedIssuers.isNull()) { - this.wellKnownTrustedIssuers = OptionalNullable.ofNull(); - } else if (wellKnownTrustedIssuers.isEmpty()) { - this.wellKnownTrustedIssuers = OptionalNullable.absent(); - } else { - this.wellKnownTrustedIssuers = OptionalNullable.of(wellKnownTrustedIssuers.get()); - } - return this; - } - - /** - *

The date and time the template 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 date and time the template was created.

- */ - @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; - } - - public VerifiableCredentialTemplateResponse build() { - return new VerifiableCredentialTemplateResponse( - id, - name, - type, - dialect, - presentation, - customCertificateAuthority, - wellKnownTrustedIssuers, - createdAt, - updatedAt, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/VerificationMethodEnum.java b/src/main/java/com/auth0/client/mgmt/types/VerificationMethodEnum.java deleted file mode 100644 index ce611f898..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/VerificationMethodEnum.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class VerificationMethodEnum { - public static final VerificationMethodEnum OTP = new VerificationMethodEnum(Value.OTP, "otp"); - - public static final VerificationMethodEnum LINK = new VerificationMethodEnum(Value.LINK, "link"); - - private final Value value; - - private final String string; - - VerificationMethodEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof VerificationMethodEnum - && this.string.equals(((VerificationMethodEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case OTP: - return visitor.visitOtp(); - case LINK: - return visitor.visitLink(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static VerificationMethodEnum valueOf(String value) { - switch (value) { - case "otp": - return OTP; - case "link": - return LINK; - default: - return new VerificationMethodEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - LINK, - - OTP, - - UNKNOWN - } - - public interface Visitor { - T visitLink(); - - T visitOtp(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/VerifyCustomDomainResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/VerifyCustomDomainResponseContent.java deleted file mode 100644 index fc200d0d5..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/VerifyCustomDomainResponseContent.java +++ /dev/null @@ -1,570 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.NullableNonemptyFilter; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.HashMap; -import java.util.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 = VerifyCustomDomainResponseContent.Builder.class) -public final class VerifyCustomDomainResponseContent { - private final String customDomainId; - - private final String domain; - - private final boolean primary; - - private final CustomDomainStatusFilterEnum status; - - private final CustomDomainTypeEnum type; - - private final Optional cnameApiKey; - - private final Optional originDomainName; - - private final Optional verification; - - private final OptionalNullable customClientIpHeader; - - private final Optional tlsPolicy; - - private final Optional>> domainMetadata; - - private final Optional certificate; - - private final Map additionalProperties; - - private VerifyCustomDomainResponseContent( - String customDomainId, - String domain, - boolean primary, - CustomDomainStatusFilterEnum status, - CustomDomainTypeEnum type, - Optional cnameApiKey, - Optional originDomainName, - Optional verification, - OptionalNullable customClientIpHeader, - Optional tlsPolicy, - Optional>> domainMetadata, - Optional certificate, - Map additionalProperties) { - this.customDomainId = customDomainId; - this.domain = domain; - this.primary = primary; - this.status = status; - this.type = type; - this.cnameApiKey = cnameApiKey; - this.originDomainName = originDomainName; - this.verification = verification; - this.customClientIpHeader = customClientIpHeader; - this.tlsPolicy = tlsPolicy; - this.domainMetadata = domainMetadata; - this.certificate = certificate; - this.additionalProperties = additionalProperties; - } - - /** - * @return ID of the custom domain. - */ - @JsonProperty("custom_domain_id") - public String getCustomDomainId() { - return customDomainId; - } - - /** - * @return Domain name. - */ - @JsonProperty("domain") - public String getDomain() { - return domain; - } - - /** - * @return Whether this is a primary domain (true) or not (false). - */ - @JsonProperty("primary") - public boolean getPrimary() { - return primary; - } - - @JsonProperty("status") - public CustomDomainStatusFilterEnum getStatus() { - return status; - } - - @JsonProperty("type") - public CustomDomainTypeEnum getType() { - return type; - } - - /** - * @return CNAME API key header. - */ - @JsonProperty("cname_api_key") - public Optional getCnameApiKey() { - return cnameApiKey; - } - - /** - * @return Intermediate address. - */ - @JsonProperty("origin_domain_name") - public Optional getOriginDomainName() { - return originDomainName; - } - - @JsonProperty("verification") - public Optional getVerification() { - return verification; - } - - /** - * @return The HTTP header to fetch the client's IP address - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_client_ip_header") - public OptionalNullable getCustomClientIpHeader() { - if (customClientIpHeader == null) { - return OptionalNullable.absent(); - } - return customClientIpHeader; - } - - /** - * @return The TLS version policy - */ - @JsonProperty("tls_policy") - public Optional getTlsPolicy() { - return tlsPolicy; - } - - @JsonProperty("domain_metadata") - public Optional>> getDomainMetadata() { - return domainMetadata; - } - - @JsonProperty("certificate") - public Optional getCertificate() { - return certificate; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_client_ip_header") - private OptionalNullable _getCustomClientIpHeader() { - return customClientIpHeader; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof VerifyCustomDomainResponseContent && equalTo((VerifyCustomDomainResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(VerifyCustomDomainResponseContent other) { - return customDomainId.equals(other.customDomainId) - && domain.equals(other.domain) - && primary == other.primary - && status.equals(other.status) - && type.equals(other.type) - && cnameApiKey.equals(other.cnameApiKey) - && originDomainName.equals(other.originDomainName) - && verification.equals(other.verification) - && customClientIpHeader.equals(other.customClientIpHeader) - && tlsPolicy.equals(other.tlsPolicy) - && domainMetadata.equals(other.domainMetadata) - && certificate.equals(other.certificate); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.customDomainId, - this.domain, - this.primary, - this.status, - this.type, - this.cnameApiKey, - this.originDomainName, - this.verification, - this.customClientIpHeader, - this.tlsPolicy, - this.domainMetadata, - this.certificate); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static CustomDomainIdStage builder() { - return new Builder(); - } - - public interface CustomDomainIdStage { - /** - *

ID of the custom domain.

- */ - DomainStage customDomainId(@NotNull String customDomainId); - - Builder from(VerifyCustomDomainResponseContent other); - } - - public interface DomainStage { - /** - *

Domain name.

- */ - PrimaryStage domain(@NotNull String domain); - } - - public interface PrimaryStage { - /** - *

Whether this is a primary domain (true) or not (false).

- */ - StatusStage primary(boolean primary); - } - - public interface StatusStage { - TypeStage status(@NotNull CustomDomainStatusFilterEnum status); - } - - public interface TypeStage { - _FinalStage type(@NotNull CustomDomainTypeEnum type); - } - - public interface _FinalStage { - VerifyCustomDomainResponseContent build(); - - /** - *

CNAME API key header.

- */ - _FinalStage cnameApiKey(Optional cnameApiKey); - - _FinalStage cnameApiKey(String cnameApiKey); - - /** - *

Intermediate address.

- */ - _FinalStage originDomainName(Optional originDomainName); - - _FinalStage originDomainName(String originDomainName); - - _FinalStage verification(Optional verification); - - _FinalStage verification(DomainVerification verification); - - /** - *

The HTTP header to fetch the client's IP address

- */ - _FinalStage customClientIpHeader(@Nullable OptionalNullable customClientIpHeader); - - _FinalStage customClientIpHeader(String customClientIpHeader); - - _FinalStage customClientIpHeader(Optional customClientIpHeader); - - _FinalStage customClientIpHeader(com.auth0.client.mgmt.core.Nullable customClientIpHeader); - - /** - *

The TLS version policy

- */ - _FinalStage tlsPolicy(Optional tlsPolicy); - - _FinalStage tlsPolicy(String tlsPolicy); - - _FinalStage domainMetadata(Optional>> domainMetadata); - - _FinalStage domainMetadata(Map> domainMetadata); - - _FinalStage certificate(Optional certificate); - - _FinalStage certificate(DomainCertificate certificate); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements CustomDomainIdStage, DomainStage, PrimaryStage, StatusStage, TypeStage, _FinalStage { - private String customDomainId; - - private String domain; - - private boolean primary; - - private CustomDomainStatusFilterEnum status; - - private CustomDomainTypeEnum type; - - private Optional certificate = Optional.empty(); - - private Optional>> domainMetadata = Optional.empty(); - - private Optional tlsPolicy = Optional.empty(); - - private OptionalNullable customClientIpHeader = OptionalNullable.absent(); - - private Optional verification = Optional.empty(); - - private Optional originDomainName = Optional.empty(); - - private Optional cnameApiKey = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(VerifyCustomDomainResponseContent other) { - customDomainId(other.getCustomDomainId()); - domain(other.getDomain()); - primary(other.getPrimary()); - status(other.getStatus()); - type(other.getType()); - cnameApiKey(other.getCnameApiKey()); - originDomainName(other.getOriginDomainName()); - verification(other.getVerification()); - customClientIpHeader(other.getCustomClientIpHeader()); - tlsPolicy(other.getTlsPolicy()); - domainMetadata(other.getDomainMetadata()); - certificate(other.getCertificate()); - return this; - } - - /** - *

ID of the custom domain.

- *

ID of the custom domain.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("custom_domain_id") - public DomainStage customDomainId(@NotNull String customDomainId) { - this.customDomainId = Objects.requireNonNull(customDomainId, "customDomainId must not be null"); - return this; - } - - /** - *

Domain name.

- *

Domain name.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("domain") - public PrimaryStage domain(@NotNull String domain) { - this.domain = Objects.requireNonNull(domain, "domain must not be null"); - return this; - } - - /** - *

Whether this is a primary domain (true) or not (false).

- *

Whether this is a primary domain (true) or not (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("primary") - public StatusStage primary(boolean primary) { - this.primary = primary; - return this; - } - - @java.lang.Override - @JsonSetter("status") - public TypeStage status(@NotNull CustomDomainStatusFilterEnum status) { - this.status = Objects.requireNonNull(status, "status must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull CustomDomainTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage certificate(DomainCertificate certificate) { - this.certificate = Optional.ofNullable(certificate); - return this; - } - - @java.lang.Override - @JsonSetter(value = "certificate", nulls = Nulls.SKIP) - public _FinalStage certificate(Optional certificate) { - this.certificate = certificate; - return this; - } - - @java.lang.Override - public _FinalStage domainMetadata(Map> domainMetadata) { - this.domainMetadata = Optional.ofNullable(domainMetadata); - return this; - } - - @java.lang.Override - @JsonSetter(value = "domain_metadata", nulls = Nulls.SKIP) - public _FinalStage domainMetadata(Optional>> domainMetadata) { - this.domainMetadata = domainMetadata; - return this; - } - - /** - *

The TLS version policy

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage tlsPolicy(String tlsPolicy) { - this.tlsPolicy = Optional.ofNullable(tlsPolicy); - return this; - } - - /** - *

The TLS version policy

- */ - @java.lang.Override - @JsonSetter(value = "tls_policy", nulls = Nulls.SKIP) - public _FinalStage tlsPolicy(Optional tlsPolicy) { - this.tlsPolicy = tlsPolicy; - return this; - } - - /** - *

The HTTP header to fetch the client's IP address

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage customClientIpHeader(com.auth0.client.mgmt.core.Nullable customClientIpHeader) { - if (customClientIpHeader.isNull()) { - this.customClientIpHeader = OptionalNullable.ofNull(); - } else if (customClientIpHeader.isEmpty()) { - this.customClientIpHeader = OptionalNullable.absent(); - } else { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader.get()); - } - return this; - } - - /** - *

The HTTP header to fetch the client's IP address

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage customClientIpHeader(Optional customClientIpHeader) { - if (customClientIpHeader.isPresent()) { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader.get()); - } else { - this.customClientIpHeader = OptionalNullable.absent(); - } - return this; - } - - /** - *

The HTTP header to fetch the client's IP address

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage customClientIpHeader(String customClientIpHeader) { - this.customClientIpHeader = OptionalNullable.of(customClientIpHeader); - return this; - } - - /** - *

The HTTP header to fetch the client's IP address

- */ - @java.lang.Override - @JsonSetter(value = "custom_client_ip_header", nulls = Nulls.SKIP) - public _FinalStage customClientIpHeader(@Nullable OptionalNullable customClientIpHeader) { - this.customClientIpHeader = customClientIpHeader; - return this; - } - - @java.lang.Override - public _FinalStage verification(DomainVerification verification) { - this.verification = Optional.ofNullable(verification); - return this; - } - - @java.lang.Override - @JsonSetter(value = "verification", nulls = Nulls.SKIP) - public _FinalStage verification(Optional verification) { - this.verification = verification; - return this; - } - - /** - *

Intermediate address.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage originDomainName(String originDomainName) { - this.originDomainName = Optional.ofNullable(originDomainName); - return this; - } - - /** - *

Intermediate address.

- */ - @java.lang.Override - @JsonSetter(value = "origin_domain_name", nulls = Nulls.SKIP) - public _FinalStage originDomainName(Optional originDomainName) { - this.originDomainName = originDomainName; - return this; - } - - /** - *

CNAME API key header.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage cnameApiKey(String cnameApiKey) { - this.cnameApiKey = Optional.ofNullable(cnameApiKey); - return this; - } - - /** - *

CNAME API key header.

- */ - @java.lang.Override - @JsonSetter(value = "cname_api_key", nulls = Nulls.SKIP) - public _FinalStage cnameApiKey(Optional cnameApiKey) { - this.cnameApiKey = cnameApiKey; - return this; - } - - @java.lang.Override - public VerifyCustomDomainResponseContent build() { - return new VerifyCustomDomainResponseContent( - customDomainId, - domain, - primary, - status, - type, - cnameApiKey, - originDomainName, - verification, - customClientIpHeader, - tlsPolicy, - domainMetadata, - certificate, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/VerifyEmailTicketRequestContent.java b/src/main/java/com/auth0/client/mgmt/types/VerifyEmailTicketRequestContent.java deleted file mode 100644 index 940d7b9a6..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/VerifyEmailTicketRequestContent.java +++ /dev/null @@ -1,377 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = VerifyEmailTicketRequestContent.Builder.class) -public final class VerifyEmailTicketRequestContent { - private final Optional resultUrl; - - private final String userId; - - private final Optional clientId; - - private final Optional organizationId; - - private final Optional ttlSec; - - private final Optional includeEmailInRedirect; - - private final Optional identity; - - private final Map additionalProperties; - - private VerifyEmailTicketRequestContent( - Optional resultUrl, - String userId, - Optional clientId, - Optional organizationId, - Optional ttlSec, - Optional includeEmailInRedirect, - Optional identity, - Map additionalProperties) { - this.resultUrl = resultUrl; - this.userId = userId; - this.clientId = clientId; - this.organizationId = organizationId; - this.ttlSec = ttlSec; - this.includeEmailInRedirect = includeEmailInRedirect; - this.identity = identity; - this.additionalProperties = additionalProperties; - } - - /** - * @return URL the user will be redirected to in the classic Universal Login experience once the ticket is used. Cannot be specified when using client_id or organization_id. - */ - @JsonProperty("result_url") - public Optional getResultUrl() { - return resultUrl; - } - - /** - * @return user_id of for whom the ticket should be created. - */ - @JsonProperty("user_id") - public String getUserId() { - return userId; - } - - /** - * @return ID of the client (application). If provided for tenants using the New Universal Login experience, the email template and UI displays application details, and the user is prompted to redirect to the application's <a target='' href='https://auth0.com/docs/authenticate/login/auth0-universal-login/configure-default-login-routes#completing-the-password-reset-flow'>default login route</a> after the ticket is used. client_id is required to use the <a target='' href='https://auth0.com/docs/customize/actions/flows-and-triggers/post-change-password-flow'>Password Reset Post Challenge</a> trigger. - */ - @JsonProperty("client_id") - public Optional getClientId() { - return clientId; - } - - /** - * @return (Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters. - */ - @JsonProperty("organization_id") - public Optional getOrganizationId() { - return organizationId; - } - - /** - * @return Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days). - */ - @JsonProperty("ttl_sec") - public Optional getTtlSec() { - return ttlSec; - } - - /** - * @return Whether to include the email address as part of the returnUrl in the reset_email (true), or not (false). - */ - @JsonProperty("includeEmailInRedirect") - public Optional getIncludeEmailInRedirect() { - return includeEmailInRedirect; - } - - @JsonProperty("identity") - public Optional getIdentity() { - return identity; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof VerifyEmailTicketRequestContent && equalTo((VerifyEmailTicketRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(VerifyEmailTicketRequestContent other) { - return resultUrl.equals(other.resultUrl) - && userId.equals(other.userId) - && clientId.equals(other.clientId) - && organizationId.equals(other.organizationId) - && ttlSec.equals(other.ttlSec) - && includeEmailInRedirect.equals(other.includeEmailInRedirect) - && identity.equals(other.identity); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.resultUrl, - this.userId, - this.clientId, - this.organizationId, - this.ttlSec, - this.includeEmailInRedirect, - this.identity); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static UserIdStage builder() { - return new Builder(); - } - - public interface UserIdStage { - /** - *

user_id of for whom the ticket should be created.

- */ - _FinalStage userId(@NotNull String userId); - - Builder from(VerifyEmailTicketRequestContent other); - } - - public interface _FinalStage { - VerifyEmailTicketRequestContent build(); - - /** - *

URL the user will be redirected to in the classic Universal Login experience once the ticket is used. Cannot be specified when using client_id or organization_id.

- */ - _FinalStage resultUrl(Optional resultUrl); - - _FinalStage resultUrl(String resultUrl); - - /** - *

ID of the client (application). If provided for tenants using the New Universal Login experience, the email template and UI displays application details, and the user is prompted to redirect to the application's <a target='' href='https://auth0.com/docs/authenticate/login/auth0-universal-login/configure-default-login-routes#completing-the-password-reset-flow'>default login route</a> after the ticket is used. client_id is required to use the <a target='' href='https://auth0.com/docs/customize/actions/flows-and-triggers/post-change-password-flow'>Password Reset Post Challenge</a> trigger.

- */ - _FinalStage clientId(Optional clientId); - - _FinalStage clientId(String clientId); - - /** - *

(Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters.

- */ - _FinalStage organizationId(Optional organizationId); - - _FinalStage organizationId(String organizationId); - - /** - *

Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days).

- */ - _FinalStage ttlSec(Optional ttlSec); - - _FinalStage ttlSec(Integer ttlSec); - - /** - *

Whether to include the email address as part of the returnUrl in the reset_email (true), or not (false).

- */ - _FinalStage includeEmailInRedirect(Optional includeEmailInRedirect); - - _FinalStage includeEmailInRedirect(Boolean includeEmailInRedirect); - - _FinalStage identity(Optional identity); - - _FinalStage identity(Identity identity); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements UserIdStage, _FinalStage { - private String userId; - - private Optional identity = Optional.empty(); - - private Optional includeEmailInRedirect = Optional.empty(); - - private Optional ttlSec = Optional.empty(); - - private Optional organizationId = Optional.empty(); - - private Optional clientId = Optional.empty(); - - private Optional resultUrl = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(VerifyEmailTicketRequestContent other) { - resultUrl(other.getResultUrl()); - userId(other.getUserId()); - clientId(other.getClientId()); - organizationId(other.getOrganizationId()); - ttlSec(other.getTtlSec()); - includeEmailInRedirect(other.getIncludeEmailInRedirect()); - identity(other.getIdentity()); - return this; - } - - /** - *

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. - */ - @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 _FinalStage identity(Identity identity) { - this.identity = Optional.ofNullable(identity); - return this; - } - - @java.lang.Override - @JsonSetter(value = "identity", nulls = Nulls.SKIP) - public _FinalStage identity(Optional identity) { - this.identity = identity; - return this; - } - - /** - *

Whether to include the email address as part of the returnUrl in the reset_email (true), or not (false).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage includeEmailInRedirect(Boolean includeEmailInRedirect) { - this.includeEmailInRedirect = Optional.ofNullable(includeEmailInRedirect); - return this; - } - - /** - *

Whether to include the email address as part of the returnUrl in the reset_email (true), or not (false).

- */ - @java.lang.Override - @JsonSetter(value = "includeEmailInRedirect", nulls = Nulls.SKIP) - public _FinalStage includeEmailInRedirect(Optional includeEmailInRedirect) { - this.includeEmailInRedirect = includeEmailInRedirect; - return this; - } - - /** - *

Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days).

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage ttlSec(Integer ttlSec) { - this.ttlSec = Optional.ofNullable(ttlSec); - return this; - } - - /** - *

Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days).

- */ - @java.lang.Override - @JsonSetter(value = "ttl_sec", nulls = Nulls.SKIP) - public _FinalStage ttlSec(Optional ttlSec) { - this.ttlSec = ttlSec; - return this; - } - - /** - *

(Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage organizationId(String organizationId) { - this.organizationId = Optional.ofNullable(organizationId); - return this; - } - - /** - *

(Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters.

- */ - @java.lang.Override - @JsonSetter(value = "organization_id", nulls = Nulls.SKIP) - public _FinalStage organizationId(Optional organizationId) { - this.organizationId = organizationId; - return this; - } - - /** - *

ID of the client (application). If provided for tenants using the New Universal Login experience, the email template and UI displays application details, and the user is prompted to redirect to the application's <a target='' href='https://auth0.com/docs/authenticate/login/auth0-universal-login/configure-default-login-routes#completing-the-password-reset-flow'>default login route</a> after the ticket is used. client_id is required to use the <a target='' href='https://auth0.com/docs/customize/actions/flows-and-triggers/post-change-password-flow'>Password Reset Post Challenge</a> trigger.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage clientId(String clientId) { - this.clientId = Optional.ofNullable(clientId); - return this; - } - - /** - *

ID of the client (application). If provided for tenants using the New Universal Login experience, the email template and UI displays application details, and the user is prompted to redirect to the application's <a target='' href='https://auth0.com/docs/authenticate/login/auth0-universal-login/configure-default-login-routes#completing-the-password-reset-flow'>default login route</a> after the ticket is used. client_id is required to use the <a target='' href='https://auth0.com/docs/customize/actions/flows-and-triggers/post-change-password-flow'>Password Reset Post Challenge</a> trigger.

- */ - @java.lang.Override - @JsonSetter(value = "client_id", nulls = Nulls.SKIP) - public _FinalStage clientId(Optional clientId) { - this.clientId = clientId; - return this; - } - - /** - *

URL the user will be redirected to in the classic Universal Login experience once the ticket is used. Cannot be specified when using client_id or organization_id.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage resultUrl(String resultUrl) { - this.resultUrl = Optional.ofNullable(resultUrl); - return this; - } - - /** - *

URL the user will be redirected to in the classic Universal Login experience once the ticket is used. Cannot be specified when using client_id or organization_id.

- */ - @java.lang.Override - @JsonSetter(value = "result_url", nulls = Nulls.SKIP) - public _FinalStage resultUrl(Optional resultUrl) { - this.resultUrl = resultUrl; - return this; - } - - @java.lang.Override - public VerifyEmailTicketRequestContent build() { - return new VerifyEmailTicketRequestContent( - resultUrl, - userId, - clientId, - organizationId, - ttlSec, - includeEmailInRedirect, - identity, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/VerifyEmailTicketResponseContent.java b/src/main/java/com/auth0/client/mgmt/types/VerifyEmailTicketResponseContent.java deleted file mode 100644 index d558bbb5d..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/VerifyEmailTicketResponseContent.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.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 = VerifyEmailTicketResponseContent.Builder.class) -public final class VerifyEmailTicketResponseContent { - private final String ticket; - - private final Map additionalProperties; - - private VerifyEmailTicketResponseContent(String ticket, Map additionalProperties) { - this.ticket = ticket; - this.additionalProperties = additionalProperties; - } - - /** - * @return URL representing the ticket. - */ - @JsonProperty("ticket") - public String getTicket() { - return ticket; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof VerifyEmailTicketResponseContent && equalTo((VerifyEmailTicketResponseContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(VerifyEmailTicketResponseContent other) { - return ticket.equals(other.ticket); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.ticket); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TicketStage builder() { - return new Builder(); - } - - public interface TicketStage { - /** - *

URL representing the ticket.

- */ - _FinalStage ticket(@NotNull String ticket); - - Builder from(VerifyEmailTicketResponseContent other); - } - - public interface _FinalStage { - VerifyEmailTicketResponseContent build(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TicketStage, _FinalStage { - private String ticket; - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(VerifyEmailTicketResponseContent other) { - ticket(other.getTicket()); - return this; - } - - /** - *

URL representing the ticket.

- *

URL representing the ticket.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - @JsonSetter("ticket") - public _FinalStage ticket(@NotNull String ticket) { - this.ticket = Objects.requireNonNull(ticket, "ticket must not be null"); - return this; - } - - @java.lang.Override - public VerifyEmailTicketResponseContent build() { - return new VerifyEmailTicketResponseContent(ticket, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/X509CertificateCredential.java b/src/main/java/com/auth0/client/mgmt/types/X509CertificateCredential.java deleted file mode 100644 index e90447fbe..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/X509CertificateCredential.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = X509CertificateCredential.Builder.class) -public final class X509CertificateCredential { - private final X509CertificateCredentialTypeEnum credentialType; - - private final Optional name; - - private final String pem; - - private final Map additionalProperties; - - private X509CertificateCredential( - X509CertificateCredentialTypeEnum credentialType, - Optional name, - String pem, - Map additionalProperties) { - this.credentialType = credentialType; - this.name = name; - this.pem = pem; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("credential_type") - public X509CertificateCredentialTypeEnum getCredentialType() { - return credentialType; - } - - /** - * @return Friendly name for a credential. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return PEM-formatted X509 certificate. Must be JSON escaped. - */ - @JsonProperty("pem") - public String getPem() { - return pem; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof X509CertificateCredential && equalTo((X509CertificateCredential) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(X509CertificateCredential other) { - return credentialType.equals(other.credentialType) && name.equals(other.name) && pem.equals(other.pem); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.credentialType, this.name, this.pem); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static CredentialTypeStage builder() { - return new Builder(); - } - - public interface CredentialTypeStage { - PemStage credentialType(@NotNull X509CertificateCredentialTypeEnum credentialType); - - Builder from(X509CertificateCredential other); - } - - public interface PemStage { - /** - *

PEM-formatted X509 certificate. Must be JSON escaped.

- */ - _FinalStage pem(@NotNull String pem); - } - - public interface _FinalStage { - X509CertificateCredential build(); - - /** - *

Friendly name for a credential.

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements CredentialTypeStage, PemStage, _FinalStage { - private X509CertificateCredentialTypeEnum credentialType; - - private String pem; - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(X509CertificateCredential other) { - credentialType(other.getCredentialType()); - name(other.getName()); - pem(other.getPem()); - return this; - } - - @java.lang.Override - @JsonSetter("credential_type") - public PemStage credentialType(@NotNull X509CertificateCredentialTypeEnum credentialType) { - this.credentialType = Objects.requireNonNull(credentialType, "credentialType must not be null"); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("pem") - public _FinalStage pem(@NotNull String pem) { - this.pem = Objects.requireNonNull(pem, "pem must not be null"); - return this; - } - - /** - *

Friendly name for a credential.

- * @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; - } - - /** - *

Friendly name for a credential.

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public X509CertificateCredential build() { - return new X509CertificateCredential(credentialType, name, pem, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/types/X509CertificateCredentialTypeEnum.java b/src/main/java/com/auth0/client/mgmt/types/X509CertificateCredentialTypeEnum.java deleted file mode 100644 index 5fe271527..000000000 --- a/src/main/java/com/auth0/client/mgmt/types/X509CertificateCredentialTypeEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.types; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public final class X509CertificateCredentialTypeEnum { - public static final X509CertificateCredentialTypeEnum X509CERT = - new X509CertificateCredentialTypeEnum(Value.X509CERT, "x509_cert"); - - private final Value value; - - private final String string; - - X509CertificateCredentialTypeEnum(Value value, String string) { - this.value = value; - this.string = string; - } - - public Value getEnumValue() { - return value; - } - - @java.lang.Override - @JsonValue - public String toString() { - return this.string; - } - - @java.lang.Override - public boolean equals(Object other) { - return (this == other) - || (other instanceof X509CertificateCredentialTypeEnum - && this.string.equals(((X509CertificateCredentialTypeEnum) other).string)); - } - - @java.lang.Override - public int hashCode() { - return this.string.hashCode(); - } - - public T visit(Visitor visitor) { - switch (value) { - case X509CERT: - return visitor.visitX509Cert(); - case UNKNOWN: - default: - return visitor.visitUnknown(string); - } - } - - @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public static X509CertificateCredentialTypeEnum valueOf(String value) { - switch (value) { - case "x509_cert": - return X509CERT; - default: - return new X509CertificateCredentialTypeEnum(Value.UNKNOWN, value); - } - } - - public enum Value { - X509CERT, - - UNKNOWN - } - - public interface Visitor { - T visitX509Cert(); - - T visitUnknown(String unknownType); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncAuthenticationMethodsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncAuthenticationMethodsClient.java deleted file mode 100644 index c9f133367..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncAuthenticationMethodsClient.java +++ /dev/null @@ -1,162 +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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.CreateUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.GetUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.SetUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.SetUserAuthenticationMethods; -import com.auth0.client.mgmt.types.UpdateUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.UserAuthenticationMethod; -import com.auth0.client.mgmt.users.types.CreateUserAuthenticationMethodRequestContent; -import com.auth0.client.mgmt.users.types.ListUserAuthenticationMethodsRequestParameters; -import com.auth0.client.mgmt.users.types.UpdateUserAuthenticationMethodRequestContent; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -public class AsyncAuthenticationMethodsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawAuthenticationMethodsClient rawClient; - - public AsyncAuthenticationMethodsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawAuthenticationMethodsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawAuthenticationMethodsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve detailed list of authentication methods associated with a specified user. - */ - public CompletableFuture> list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - /** - * Retrieve detailed list of authentication methods associated with a specified user. - */ - public CompletableFuture> list( - String id, ListUserAuthenticationMethodsRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve detailed list of authentication methods associated with a specified user. - */ - public CompletableFuture> list( - String id, ListUserAuthenticationMethodsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create an authentication method. Authentication methods created via this endpoint will be auto confirmed and should already have verification completed. - */ - public CompletableFuture create( - String id, CreateUserAuthenticationMethodRequestContent request) { - return this.rawClient.create(id, request).thenApply(response -> response.body()); - } - - /** - * Create an authentication method. Authentication methods created via this endpoint will be auto confirmed and should already have verification completed. - */ - public CompletableFuture create( - String id, CreateUserAuthenticationMethodRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Replace the specified user <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors"> authentication methods</a> with supplied values. - *
<b>Note</b>: Authentication methods supplied through this action do not iterate on existing methods. Instead, any methods passed will overwrite the user&#8217s existing settings.
-     * 
- */ - public CompletableFuture> set( - String id, List request) { - return this.rawClient.set(id, request).thenApply(response -> response.body()); - } - - /** - * Replace the specified user <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors"> authentication methods</a> with supplied values. - *
<b>Note</b>: Authentication methods supplied through this action do not iterate on existing methods. Instead, any methods passed will overwrite the user&#8217s existing settings.
-     * 
- */ - public CompletableFuture> set( - String id, List request, RequestOptions requestOptions) { - return this.rawClient.set(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Remove all authentication methods (i.e., enrolled MFA factors) from the specified user account. This action cannot be undone. - */ - public CompletableFuture deleteAll(String id) { - return this.rawClient.deleteAll(id).thenApply(response -> response.body()); - } - - /** - * Remove all authentication methods (i.e., enrolled MFA factors) from the specified user account. This action cannot be undone. - */ - public CompletableFuture deleteAll(String id, RequestOptions requestOptions) { - return this.rawClient.deleteAll(id, requestOptions).thenApply(response -> response.body()); - } - - public CompletableFuture get(String id, String authenticationMethodId) { - return this.rawClient.get(id, authenticationMethodId).thenApply(response -> response.body()); - } - - public CompletableFuture get( - String id, String authenticationMethodId, RequestOptions requestOptions) { - return this.rawClient.get(id, authenticationMethodId, requestOptions).thenApply(response -> response.body()); - } - - /** - * Remove the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public CompletableFuture delete(String id, String authenticationMethodId) { - return this.rawClient.delete(id, authenticationMethodId).thenApply(response -> response.body()); - } - - /** - * Remove the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public CompletableFuture delete(String id, String authenticationMethodId, RequestOptions requestOptions) { - return this.rawClient.delete(id, authenticationMethodId, requestOptions).thenApply(response -> response.body()); - } - - /** - * Modify the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public CompletableFuture update( - String id, String authenticationMethodId) { - return this.rawClient.update(id, authenticationMethodId).thenApply(response -> response.body()); - } - - /** - * Modify the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public CompletableFuture update( - String id, String authenticationMethodId, UpdateUserAuthenticationMethodRequestContent request) { - return this.rawClient.update(id, authenticationMethodId, request).thenApply(response -> response.body()); - } - - /** - * Modify the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public CompletableFuture update( - String id, - String authenticationMethodId, - UpdateUserAuthenticationMethodRequestContent request, - RequestOptions requestOptions) { - return this.rawClient - .update(id, authenticationMethodId, request, requestOptions) - .thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncAuthenticatorsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncAuthenticatorsClient.java deleted file mode 100644 index 3c59a93dd..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncAuthenticatorsClient.java +++ /dev/null @@ -1,40 +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 java.util.concurrent.CompletableFuture; - -public class AsyncAuthenticatorsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawAuthenticatorsClient rawClient; - - public AsyncAuthenticatorsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawAuthenticatorsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawAuthenticatorsClient withRawResponse() { - return this.rawClient; - } - - /** - * 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 <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public CompletableFuture deleteAll(String id) { - return this.rawClient.deleteAll(id).thenApply(response -> response.body()); - } - - /** - * 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 <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public CompletableFuture deleteAll(String id, RequestOptions requestOptions) { - return this.rawClient.deleteAll(id, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncConnectedAccountsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncConnectedAccountsClient.java deleted file mode 100644 index 74e2b1285..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncConnectedAccountsClient.java +++ /dev/null @@ -1,52 +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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.ConnectedAccount; -import com.auth0.client.mgmt.users.types.GetUserConnectedAccountsRequestParameters; -import java.util.concurrent.CompletableFuture; - -public class AsyncConnectedAccountsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawConnectedAccountsClient rawClient; - - public AsyncConnectedAccountsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawConnectedAccountsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawConnectedAccountsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve all connected accounts associated with the user. - */ - public CompletableFuture> list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - /** - * Retrieve all connected accounts associated with the user. - */ - public CompletableFuture> list( - String id, GetUserConnectedAccountsRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve all connected accounts associated with the user. - */ - public CompletableFuture> list( - String id, GetUserConnectedAccountsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncEnrollmentsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncEnrollmentsClient.java deleted file mode 100644 index 83f2ec120..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncEnrollmentsClient.java +++ /dev/null @@ -1,42 +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.UsersEnrollment; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -public class AsyncEnrollmentsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawEnrollmentsClient rawClient; - - public AsyncEnrollmentsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawEnrollmentsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawEnrollmentsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve the first <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors">multi-factor authentication</a> enrollment that a specific user has confirmed. - */ - public CompletableFuture> get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Retrieve the first <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors">multi-factor authentication</a> enrollment that a specific user has confirmed. - */ - 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/users/AsyncFederatedConnectionsTokensetsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncFederatedConnectionsTokensetsClient.java deleted file mode 100644 index a94c43cb7..000000000 --- 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/AsyncGroupsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncGroupsClient.java deleted file mode 100644 index adc8d8681..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncGroupsClient.java +++ /dev/null @@ -1,52 +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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.UserGroupsResponseSchema; -import com.auth0.client.mgmt.users.types.GetUserGroupsRequestParameters; -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; - } - - /** - * List all groups to which this user belongs. - */ - public CompletableFuture> get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * List all groups to which this user belongs. - */ - public CompletableFuture> get( - String id, GetUserGroupsRequestParameters request) { - return this.rawClient.get(id, request).thenApply(response -> response.body()); - } - - /** - * List all groups to which this user belongs. - */ - public CompletableFuture> get( - String id, GetUserGroupsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncIdentitiesClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncIdentitiesClient.java deleted file mode 100644 index 72f68697d..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncIdentitiesClient.java +++ /dev/null @@ -1,146 +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.DeleteUserIdentityResponseContentItem; -import com.auth0.client.mgmt.types.UserIdentity; -import com.auth0.client.mgmt.types.UserIdentityProviderEnum; -import com.auth0.client.mgmt.users.types.LinkUserIdentityRequestContent; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -public class AsyncIdentitiesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawIdentitiesClient rawClient; - - public AsyncIdentitiesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawIdentitiesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawIdentitiesClient withRawResponse() { - return this.rawClient; - } - - /** - * Link two user accounts together forming a primary and secondary relationship. On successful linking, the endpoint returns the new array of the primary account identities. - *

Note: There are two ways of invoking the endpoint:

- *

<ul> - * <li>With the authenticated primary account's JWT in the Authorization header, which has the <code>update:current_user_identities</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer PRIMARY_ACCOUNT_JWT" - * { - * "link_with": "SECONDARY_ACCOUNT_JWT" - * } - * </pre> - * In this case, only the <code>link_with</code> param is required in the body, which also contains the JWT obtained upon the secondary account's authentication. - * </li> - * <li>With a token generated by the API V2 containing the <code>update:users</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer YOUR_API_V2_TOKEN" - * { - * "provider": "SECONDARY_ACCOUNT_PROVIDER", - * "connection_id": "SECONDARY_ACCOUNT_CONNECTION_ID(OPTIONAL)", - * "user_id": "SECONDARY_ACCOUNT_USER_ID" - * } - * </pre> - * In this case you need to send <code>provider</code> and <code>user_id</code> in the body. Optionally you can also send the <code>connection_id</code> param which is suitable for identifying a particular database connection for the 'auth0' provider. - * </li> - * </ul>

- */ - public CompletableFuture> link(String id) { - return this.rawClient.link(id).thenApply(response -> response.body()); - } - - /** - * Link two user accounts together forming a primary and secondary relationship. On successful linking, the endpoint returns the new array of the primary account identities. - *

Note: There are two ways of invoking the endpoint:

- *

<ul> - * <li>With the authenticated primary account's JWT in the Authorization header, which has the <code>update:current_user_identities</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer PRIMARY_ACCOUNT_JWT" - * { - * "link_with": "SECONDARY_ACCOUNT_JWT" - * } - * </pre> - * In this case, only the <code>link_with</code> param is required in the body, which also contains the JWT obtained upon the secondary account's authentication. - * </li> - * <li>With a token generated by the API V2 containing the <code>update:users</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer YOUR_API_V2_TOKEN" - * { - * "provider": "SECONDARY_ACCOUNT_PROVIDER", - * "connection_id": "SECONDARY_ACCOUNT_CONNECTION_ID(OPTIONAL)", - * "user_id": "SECONDARY_ACCOUNT_USER_ID" - * } - * </pre> - * In this case you need to send <code>provider</code> and <code>user_id</code> in the body. Optionally you can also send the <code>connection_id</code> param which is suitable for identifying a particular database connection for the 'auth0' provider. - * </li> - * </ul>

- */ - public CompletableFuture> link(String id, LinkUserIdentityRequestContent request) { - return this.rawClient.link(id, request).thenApply(response -> response.body()); - } - - /** - * Link two user accounts together forming a primary and secondary relationship. On successful linking, the endpoint returns the new array of the primary account identities. - *

Note: There are two ways of invoking the endpoint:

- *

<ul> - * <li>With the authenticated primary account's JWT in the Authorization header, which has the <code>update:current_user_identities</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer PRIMARY_ACCOUNT_JWT" - * { - * "link_with": "SECONDARY_ACCOUNT_JWT" - * } - * </pre> - * In this case, only the <code>link_with</code> param is required in the body, which also contains the JWT obtained upon the secondary account's authentication. - * </li> - * <li>With a token generated by the API V2 containing the <code>update:users</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer YOUR_API_V2_TOKEN" - * { - * "provider": "SECONDARY_ACCOUNT_PROVIDER", - * "connection_id": "SECONDARY_ACCOUNT_CONNECTION_ID(OPTIONAL)", - * "user_id": "SECONDARY_ACCOUNT_USER_ID" - * } - * </pre> - * In this case you need to send <code>provider</code> and <code>user_id</code> in the body. Optionally you can also send the <code>connection_id</code> param which is suitable for identifying a particular database connection for the 'auth0' provider. - * </li> - * </ul>

- */ - public CompletableFuture> link( - String id, LinkUserIdentityRequestContent request, RequestOptions requestOptions) { - return this.rawClient.link(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Unlink a specific secondary account from a target user. This action requires the ID of both the target user and the secondary account. - *

Unlinking the secondary account removes it from the identities array of the target user and creates a new standalone profile for the secondary account. To learn more, review <a href="https://auth0.com/docs/manage-users/user-accounts/user-account-linking/unlink-user-accounts">Unlink User Accounts</a>.

- */ - public CompletableFuture> delete( - String id, UserIdentityProviderEnum provider, String userId) { - return this.rawClient.delete(id, provider, userId).thenApply(response -> response.body()); - } - - /** - * Unlink a specific secondary account from a target user. This action requires the ID of both the target user and the secondary account. - *

Unlinking the secondary account removes it from the identities array of the target user and creates a new standalone profile for the secondary account. To learn more, review <a href="https://auth0.com/docs/manage-users/user-accounts/user-account-linking/unlink-user-accounts">Unlink User Accounts</a>.

- */ - public CompletableFuture> delete( - String id, UserIdentityProviderEnum provider, String userId, RequestOptions requestOptions) { - return this.rawClient.delete(id, provider, userId, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncLogsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncLogsClient.java deleted file mode 100644 index 42f5d46c0..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncLogsClient.java +++ /dev/null @@ -1,60 +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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.Log; -import com.auth0.client.mgmt.users.types.ListUserLogsRequestParameters; -import java.util.concurrent.CompletableFuture; - -public class AsyncLogsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawLogsClient rawClient; - - public AsyncLogsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawLogsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawLogsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve log events for a specific user. - *

Note: For more information on all possible event types, their respective acronyms and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

For more information on the list of fields that can be used in sort, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may only paginate through up to 1,000 search results. If you exceed this threshold, please redefine your search.

- */ - public CompletableFuture> list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - /** - * Retrieve log events for a specific user. - *

Note: For more information on all possible event types, their respective acronyms and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

For more information on the list of fields that can be used in sort, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may only paginate through up to 1,000 search results. If you exceed this threshold, please redefine your search.

- */ - public CompletableFuture> list(String id, ListUserLogsRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve log events for a specific user. - *

Note: For more information on all possible event types, their respective acronyms and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

For more information on the list of fields that can be used in sort, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may only paginate through up to 1,000 search results. If you exceed this threshold, please redefine your search.

- */ - public CompletableFuture> list( - String id, ListUserLogsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncMultifactorClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncMultifactorClient.java deleted file mode 100644 index 1cda1888e..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncMultifactorClient.java +++ /dev/null @@ -1,56 +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.UserMultifactorProviderEnum; -import java.util.concurrent.CompletableFuture; - -public class AsyncMultifactorClient { - protected final ClientOptions clientOptions; - - private final AsyncRawMultifactorClient rawClient; - - public AsyncMultifactorClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawMultifactorClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawMultifactorClient withRawResponse() { - return this.rawClient; - } - - /** - * Invalidate all remembered browsers across all <a href="https://auth0.com/docs/multifactor-authentication">authentication factors</a> for a user. - */ - public CompletableFuture invalidateRememberBrowser(String id) { - return this.rawClient.invalidateRememberBrowser(id).thenApply(response -> response.body()); - } - - /** - * Invalidate all remembered browsers across all <a href="https://auth0.com/docs/multifactor-authentication">authentication factors</a> for a user. - */ - public CompletableFuture invalidateRememberBrowser(String id, RequestOptions requestOptions) { - return this.rawClient.invalidateRememberBrowser(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Remove a <a href="https://auth0.com/docs/multifactor-authentication">multifactor</a> authentication configuration from a user's account. This forces the user to manually reconfigure the multi-factor provider. - */ - public CompletableFuture deleteProvider(String id, UserMultifactorProviderEnum provider) { - return this.rawClient.deleteProvider(id, provider).thenApply(response -> response.body()); - } - - /** - * Remove a <a href="https://auth0.com/docs/multifactor-authentication">multifactor</a> authentication configuration from a user's account. This forces the user to manually reconfigure the multi-factor provider. - */ - public CompletableFuture deleteProvider( - String id, UserMultifactorProviderEnum provider, RequestOptions requestOptions) { - return this.rawClient.deleteProvider(id, provider, 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 deleted file mode 100644 index b60520d37..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncOrganizationsClient.java +++ /dev/null @@ -1,52 +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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.Organization; -import com.auth0.client.mgmt.users.types.ListUserOrganizationsRequestParameters; -import java.util.concurrent.CompletableFuture; - -public class AsyncOrganizationsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawOrganizationsClient rawClient; - - public AsyncOrganizationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawOrganizationsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawOrganizationsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review <a href="https://auth0.com/docs/manage-users/organizations">Auth0 Organizations</a>. - */ - public CompletableFuture> list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - /** - * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review <a href="https://auth0.com/docs/manage-users/organizations">Auth0 Organizations</a>. - */ - public CompletableFuture> list( - String id, ListUserOrganizationsRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review <a href="https://auth0.com/docs/manage-users/organizations">Auth0 Organizations</a>. - */ - public CompletableFuture> list( - String id, ListUserOrganizationsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncPermissionsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncPermissionsClient.java deleted file mode 100644 index 90fc2792c..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncPermissionsClient.java +++ /dev/null @@ -1,84 +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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.UserPermissionSchema; -import com.auth0.client.mgmt.users.types.CreateUserPermissionsRequestContent; -import com.auth0.client.mgmt.users.types.DeleteUserPermissionsRequestContent; -import com.auth0.client.mgmt.users.types.ListUserPermissionsRequestParameters; -import java.util.concurrent.CompletableFuture; - -public class AsyncPermissionsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawPermissionsClient rawClient; - - public AsyncPermissionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawPermissionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawPermissionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve all permissions associated with the user. - */ - public CompletableFuture> list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - /** - * Retrieve all permissions associated with the user. - */ - public CompletableFuture> list( - String id, ListUserPermissionsRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve all permissions associated with the user. - */ - public CompletableFuture> list( - String id, ListUserPermissionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Assign permissions to a user. - */ - public CompletableFuture create(String id, CreateUserPermissionsRequestContent request) { - return this.rawClient.create(id, request).thenApply(response -> response.body()); - } - - /** - * Assign permissions to a user. - */ - public CompletableFuture create( - String id, CreateUserPermissionsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Remove permissions from a user. - */ - public CompletableFuture delete(String id, DeleteUserPermissionsRequestContent request) { - return this.rawClient.delete(id, request).thenApply(response -> response.body()); - } - - /** - * Remove permissions from a user. - */ - public CompletableFuture delete( - String id, DeleteUserPermissionsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.delete(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawAuthenticationMethodsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawAuthenticationMethodsClient.java deleted file mode 100644 index 1c5e60840..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawAuthenticationMethodsClient.java +++ /dev/null @@ -1,753 +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.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.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.CreateUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.GetUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.ListUserAuthenticationMethodsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.SetUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.SetUserAuthenticationMethods; -import com.auth0.client.mgmt.types.UpdateUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.UserAuthenticationMethod; -import com.auth0.client.mgmt.users.types.CreateUserAuthenticationMethodRequestContent; -import com.auth0.client.mgmt.users.types.ListUserAuthenticationMethodsRequestParameters; -import com.auth0.client.mgmt.users.types.UpdateUserAuthenticationMethodRequestContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawAuthenticationMethodsClient { - protected final ClientOptions clientOptions; - - public AsyncRawAuthenticationMethodsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve detailed list of authentication methods associated with a specified user. - */ - public CompletableFuture>> list(String id) { - return list(id, ListUserAuthenticationMethodsRequestParameters.builder().build()); - } - - /** - * Retrieve detailed list of authentication methods associated with a specified user. - */ - public CompletableFuture>> list( - String id, ListUserAuthenticationMethodsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve detailed list of authentication methods associated with a specified user. - */ - public CompletableFuture>> list( - String id, ListUserAuthenticationMethodsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("authentication-methods"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - 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()) { - ListUserAuthenticationMethodsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, - ListUserAuthenticationMethodsOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListUserAuthenticationMethodsRequestParameters nextRequest = - ListUserAuthenticationMethodsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getAuthenticators().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 (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 authentication method. Authentication methods created via this endpoint will be auto confirmed and should already have verification completed. - */ - public CompletableFuture> create( - String id, CreateUserAuthenticationMethodRequestContent request) { - return create(id, request, null); - } - - /** - * Create an authentication method. Authentication methods created via this endpoint will be auto confirmed and should already have verification completed. - */ - public CompletableFuture> create( - String id, CreateUserAuthenticationMethodRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("authentication-methods") - .build(); - 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) - .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); - } - 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, CreateUserAuthenticationMethodResponseContent.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 (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; - } - - /** - * Replace the specified user <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors"> authentication methods</a> with supplied values. - *
<b>Note</b>: Authentication methods supplied through this action do not iterate on existing methods. Instead, any methods passed will overwrite the user&#8217s existing settings.
-     * 
- */ - public CompletableFuture>> set( - String id, List request) { - return set(id, request, null); - } - - /** - * Replace the specified user <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors"> authentication methods</a> with supplied values. - *
<b>Note</b>: Authentication methods supplied through this action do not iterate on existing methods. Instead, any methods passed will overwrite the user&#8217s existing settings.
-     * 
- */ - public CompletableFuture>> set( - String id, List request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("authentication-methods") - .build(); - 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) - .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<>(); - 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 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 (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 all authentication methods (i.e., enrolled MFA factors) from the specified user account. This action cannot be undone. - */ - public CompletableFuture> deleteAll(String id) { - return deleteAll(id, null); - } - - /** - * Remove all authentication methods (i.e., enrolled MFA factors) from the specified user account. This action cannot be undone. - */ - public CompletableFuture> deleteAll(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("authentication-methods") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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, String authenticationMethodId) { - return get(id, authenticationMethodId, null); - } - - public CompletableFuture> get( - String id, String authenticationMethodId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("authentication-methods") - .addPathSegment(authenticationMethodId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetUserAuthenticationMethodResponseContent.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 (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 the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public CompletableFuture> delete(String id, String authenticationMethodId) { - return delete(id, authenticationMethodId, null); - } - - /** - * Remove the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public CompletableFuture> delete( - String id, String authenticationMethodId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("authentication-methods") - .addPathSegment(authenticationMethodId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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; - } - - /** - * Modify the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public CompletableFuture> update( - String id, String authenticationMethodId) { - return update( - id, - authenticationMethodId, - UpdateUserAuthenticationMethodRequestContent.builder().build()); - } - - /** - * Modify the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public CompletableFuture> update( - String id, String authenticationMethodId, UpdateUserAuthenticationMethodRequestContent request) { - return update(id, authenticationMethodId, request, null); - } - - /** - * Modify the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public CompletableFuture> update( - String id, - String authenticationMethodId, - UpdateUserAuthenticationMethodRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("authentication-methods") - .addPathSegment(authenticationMethodId) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateUserAuthenticationMethodResponseContent.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 (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/users/AsyncRawAuthenticatorsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawAuthenticatorsClient.java deleted file mode 100644 index ee6a94149..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawAuthenticatorsClient.java +++ /dev/null @@ -1,115 +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.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.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.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawAuthenticatorsClient { - protected final ClientOptions clientOptions; - - public AsyncRawAuthenticatorsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * 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 <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public CompletableFuture> deleteAll(String id) { - return deleteAll(id, null); - } - - /** - * 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 <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public CompletableFuture> deleteAll(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("authenticators") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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/users/AsyncRawConnectedAccountsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawConnectedAccountsClient.java deleted file mode 100644 index 890a9b7d9..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawConnectedAccountsClient.java +++ /dev/null @@ -1,157 +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.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.SyncPagingIterable; -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.types.ConnectedAccount; -import com.auth0.client.mgmt.types.ListUserConnectedAccountsResponseContent; -import com.auth0.client.mgmt.users.types.GetUserConnectedAccountsRequestParameters; -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 AsyncRawConnectedAccountsClient { - protected final ClientOptions clientOptions; - - public AsyncRawConnectedAccountsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve all connected accounts associated with the user. - */ - public CompletableFuture>> list(String id) { - return list(id, GetUserConnectedAccountsRequestParameters.builder().build()); - } - - /** - * Retrieve all connected accounts associated with the user. - */ - public CompletableFuture>> list( - String id, GetUserConnectedAccountsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve all connected accounts associated with the user. - */ - public CompletableFuture>> list( - String id, GetUserConnectedAccountsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("connected-accounts"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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()) { - ListUserConnectedAccountsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserConnectedAccountsResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - GetUserConnectedAccountsRequestParameters nextRequest = - GetUserConnectedAccountsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getConnectedAccounts(); - 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 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawEnrollmentsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawEnrollmentsClient.java deleted file mode 100644 index ead3727b4..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawEnrollmentsClient.java +++ /dev/null @@ -1,128 +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.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.UsersEnrollment; -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; -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 AsyncRawEnrollmentsClient { - protected final ClientOptions clientOptions; - - public AsyncRawEnrollmentsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve the first <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors">multi-factor authentication</a> enrollment that a specific user has confirmed. - */ - public CompletableFuture>> get(String id) { - return get(id, null); - } - - /** - * Retrieve the first <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors">multi-factor authentication</a> enrollment that a specific user has confirmed. - */ - public CompletableFuture>> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("enrollments") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture>> future = new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawFederatedConnectionsTokensetsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawFederatedConnectionsTokensetsClient.java deleted file mode 100644 index ddd52d8b2..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawFederatedConnectionsTokensetsClient.java +++ /dev/null @@ -1,200 +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.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.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; -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 AsyncRawFederatedConnectionsTokensetsClient { - protected final ClientOptions clientOptions; - - public AsyncRawFederatedConnectionsTokensetsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * List active federated connections tokensets for a provided user - */ - public CompletableFuture>> list(String id) { - return list(id, null); - } - - /** - * List active federated connections tokensets for a provided user - */ - public CompletableFuture>> list( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("federated-connections-tokensets") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture>> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, new TypeReference>() {}), - 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 (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, String tokensetId) { - return delete(id, tokensetId, null); - } - - public CompletableFuture> delete( - String id, String tokensetId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("federated-connections-tokensets") - .addPathSegment(tokensetId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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/users/AsyncRawGroupsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawGroupsClient.java deleted file mode 100644 index 13f08fae0..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawGroupsClient.java +++ /dev/null @@ -1,164 +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.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.SyncPagingIterable; -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.types.GetUserGroupsPaginatedResponseContent; -import com.auth0.client.mgmt.types.UserGroupsResponseSchema; -import com.auth0.client.mgmt.users.types.GetUserGroupsRequestParameters; -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; - } - - /** - * List all groups to which this user belongs. - */ - public CompletableFuture>> get(String id) { - return get(id, GetUserGroupsRequestParameters.builder().build()); - } - - /** - * List all groups to which this user belongs. - */ - public CompletableFuture>> get( - String id, GetUserGroupsRequestParameters request) { - return get(id, request, null); - } - - /** - * List all groups to which this user belongs. - */ - public CompletableFuture>> get( - String id, GetUserGroupsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("groups"); - 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); - } - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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()) { - GetUserGroupsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetUserGroupsPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - GetUserGroupsRequestParameters nextRequest = GetUserGroupsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getGroups(); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> { - try { - return get(id, nextRequest, requestOptions) - .get() - .body(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - }), - response)); - return; - } - try { - switch (response.code()) { - case 400: - future.completeExceptionally(new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (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/users/AsyncRawIdentitiesClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawIdentitiesClient.java deleted file mode 100644 index b6b3abd3e..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawIdentitiesClient.java +++ /dev/null @@ -1,315 +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.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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ConflictError; -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.types.DeleteUserIdentityResponseContentItem; -import com.auth0.client.mgmt.types.UserIdentity; -import com.auth0.client.mgmt.types.UserIdentityProviderEnum; -import com.auth0.client.mgmt.users.types.LinkUserIdentityRequestContent; -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; -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 AsyncRawIdentitiesClient { - protected final ClientOptions clientOptions; - - public AsyncRawIdentitiesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Link two user accounts together forming a primary and secondary relationship. On successful linking, the endpoint returns the new array of the primary account identities. - *

Note: There are two ways of invoking the endpoint:

- *

<ul> - * <li>With the authenticated primary account's JWT in the Authorization header, which has the <code>update:current_user_identities</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer PRIMARY_ACCOUNT_JWT" - * { - * "link_with": "SECONDARY_ACCOUNT_JWT" - * } - * </pre> - * In this case, only the <code>link_with</code> param is required in the body, which also contains the JWT obtained upon the secondary account's authentication. - * </li> - * <li>With a token generated by the API V2 containing the <code>update:users</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer YOUR_API_V2_TOKEN" - * { - * "provider": "SECONDARY_ACCOUNT_PROVIDER", - * "connection_id": "SECONDARY_ACCOUNT_CONNECTION_ID(OPTIONAL)", - * "user_id": "SECONDARY_ACCOUNT_USER_ID" - * } - * </pre> - * In this case you need to send <code>provider</code> and <code>user_id</code> in the body. Optionally you can also send the <code>connection_id</code> param which is suitable for identifying a particular database connection for the 'auth0' provider. - * </li> - * </ul>

- */ - public CompletableFuture>> link(String id) { - return link(id, LinkUserIdentityRequestContent.builder().build()); - } - - /** - * Link two user accounts together forming a primary and secondary relationship. On successful linking, the endpoint returns the new array of the primary account identities. - *

Note: There are two ways of invoking the endpoint:

- *

<ul> - * <li>With the authenticated primary account's JWT in the Authorization header, which has the <code>update:current_user_identities</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer PRIMARY_ACCOUNT_JWT" - * { - * "link_with": "SECONDARY_ACCOUNT_JWT" - * } - * </pre> - * In this case, only the <code>link_with</code> param is required in the body, which also contains the JWT obtained upon the secondary account's authentication. - * </li> - * <li>With a token generated by the API V2 containing the <code>update:users</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer YOUR_API_V2_TOKEN" - * { - * "provider": "SECONDARY_ACCOUNT_PROVIDER", - * "connection_id": "SECONDARY_ACCOUNT_CONNECTION_ID(OPTIONAL)", - * "user_id": "SECONDARY_ACCOUNT_USER_ID" - * } - * </pre> - * In this case you need to send <code>provider</code> and <code>user_id</code> in the body. Optionally you can also send the <code>connection_id</code> param which is suitable for identifying a particular database connection for the 'auth0' provider. - * </li> - * </ul>

- */ - public CompletableFuture>> link( - String id, LinkUserIdentityRequestContent request) { - return link(id, request, null); - } - - /** - * Link two user accounts together forming a primary and secondary relationship. On successful linking, the endpoint returns the new array of the primary account identities. - *

Note: There are two ways of invoking the endpoint:

- *

<ul> - * <li>With the authenticated primary account's JWT in the Authorization header, which has the <code>update:current_user_identities</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer PRIMARY_ACCOUNT_JWT" - * { - * "link_with": "SECONDARY_ACCOUNT_JWT" - * } - * </pre> - * In this case, only the <code>link_with</code> param is required in the body, which also contains the JWT obtained upon the secondary account's authentication. - * </li> - * <li>With a token generated by the API V2 containing the <code>update:users</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer YOUR_API_V2_TOKEN" - * { - * "provider": "SECONDARY_ACCOUNT_PROVIDER", - * "connection_id": "SECONDARY_ACCOUNT_CONNECTION_ID(OPTIONAL)", - * "user_id": "SECONDARY_ACCOUNT_USER_ID" - * } - * </pre> - * In this case you need to send <code>provider</code> and <code>user_id</code> in the body. Optionally you can also send the <code>connection_id</code> param which is suitable for identifying a particular database connection for the 'auth0' provider. - * </li> - * </ul>

- */ - public CompletableFuture>> link( - String id, LinkUserIdentityRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("identities") - .build(); - 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) - .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); - } - 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 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 (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; - } - - /** - * Unlink a specific secondary account from a target user. This action requires the ID of both the target user and the secondary account. - *

Unlinking the secondary account removes it from the identities array of the target user and creates a new standalone profile for the secondary account. To learn more, review <a href="https://auth0.com/docs/manage-users/user-accounts/user-account-linking/unlink-user-accounts">Unlink User Accounts</a>.

- */ - public CompletableFuture>> delete( - String id, UserIdentityProviderEnum provider, String userId) { - return delete(id, provider, userId, null); - } - - /** - * Unlink a specific secondary account from a target user. This action requires the ID of both the target user and the secondary account. - *

Unlinking the secondary account removes it from the identities array of the target user and creates a new standalone profile for the secondary account. To learn more, review <a href="https://auth0.com/docs/manage-users/user-accounts/user-account-linking/unlink-user-accounts">Unlink User Accounts</a>.

- */ - public CompletableFuture>> delete( - String id, UserIdentityProviderEnum provider, String userId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("identities") - .addPathSegment(provider.toString()) - .addPathSegment(userId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawLogsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawLogsClient.java deleted file mode 100644 index ed65b39a8..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawLogsClient.java +++ /dev/null @@ -1,169 +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.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.SyncPagingIterable; -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.types.Log; -import com.auth0.client.mgmt.types.UserListLogOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.users.types.ListUserLogsRequestParameters; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawLogsClient { - protected final ClientOptions clientOptions; - - public AsyncRawLogsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve log events for a specific user. - *

Note: For more information on all possible event types, their respective acronyms and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

For more information on the list of fields that can be used in sort, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may only paginate through up to 1,000 search results. If you exceed this threshold, please redefine your search.

- */ - public CompletableFuture>> list(String id) { - return list(id, ListUserLogsRequestParameters.builder().build()); - } - - /** - * Retrieve log events for a specific user. - *

Note: For more information on all possible event types, their respective acronyms and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

For more information on the list of fields that can be used in sort, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may only paginate through up to 1,000 search results. If you exceed this threshold, please redefine your search.

- */ - public CompletableFuture>> list( - String id, ListUserLogsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve log events for a specific user. - *

Note: For more information on all possible event types, their respective acronyms and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

For more information on the list of fields that can be used in sort, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may only paginate through up to 1,000 search results. If you exceed this threshold, please redefine your search.

- */ - public CompletableFuture>> list( - String id, ListUserLogsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("logs"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - if (!request.getSort().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sort", request.getSort().orElse(null), false); - } - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - 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()) { - UserListLogOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UserListLogOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListUserLogsRequestParameters nextRequest = ListUserLogsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getLogs().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawMultifactorClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawMultifactorClient.java deleted file mode 100644 index 4348caac4..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawMultifactorClient.java +++ /dev/null @@ -1,203 +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.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.UserMultifactorProviderEnum; -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 AsyncRawMultifactorClient { - protected final ClientOptions clientOptions; - - public AsyncRawMultifactorClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Invalidate all remembered browsers across all <a href="https://auth0.com/docs/multifactor-authentication">authentication factors</a> for a user. - */ - public CompletableFuture> invalidateRememberBrowser(String id) { - return invalidateRememberBrowser(id, null); - } - - /** - * Invalidate all remembered browsers across all <a href="https://auth0.com/docs/multifactor-authentication">authentication factors</a> for a user. - */ - public CompletableFuture> invalidateRememberBrowser( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("multifactor/actions") - .addPathSegments("invalidate-remember-browser") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Remove a <a href="https://auth0.com/docs/multifactor-authentication">multifactor</a> authentication configuration from a user's account. This forces the user to manually reconfigure the multi-factor provider. - */ - public CompletableFuture> deleteProvider( - String id, UserMultifactorProviderEnum provider) { - return deleteProvider(id, provider, null); - } - - /** - * Remove a <a href="https://auth0.com/docs/multifactor-authentication">multifactor</a> authentication configuration from a user's account. This forces the user to manually reconfigure the multi-factor provider. - */ - public CompletableFuture> deleteProvider( - String id, UserMultifactorProviderEnum provider, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("multifactor") - .addPathSegment(provider.toString()) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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/users/AsyncRawOrganizationsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawOrganizationsClient.java deleted file mode 100644 index 580e43a79..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawOrganizationsClient.java +++ /dev/null @@ -1,154 +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.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.SyncPagingIterable; -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.types.ListUserOrganizationsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.Organization; -import com.auth0.client.mgmt.users.types.ListUserOrganizationsRequestParameters; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawOrganizationsClient { - protected final ClientOptions clientOptions; - - public AsyncRawOrganizationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review <a href="https://auth0.com/docs/manage-users/organizations">Auth0 Organizations</a>. - */ - public CompletableFuture>> list(String id) { - return list(id, ListUserOrganizationsRequestParameters.builder().build()); - } - - /** - * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review <a href="https://auth0.com/docs/manage-users/organizations">Auth0 Organizations</a>. - */ - public CompletableFuture>> list( - String id, ListUserOrganizationsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review <a href="https://auth0.com/docs/manage-users/organizations">Auth0 Organizations</a>. - */ - public CompletableFuture>> list( - String id, ListUserOrganizationsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("organizations"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - 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()) { - ListUserOrganizationsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserOrganizationsOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListUserOrganizationsRequestParameters nextRequest = - ListUserOrganizationsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getOrganizations().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawPermissionsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawPermissionsClient.java deleted file mode 100644 index bbe821966..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawPermissionsClient.java +++ /dev/null @@ -1,350 +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.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.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.types.ListUserPermissionsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.UserPermissionSchema; -import com.auth0.client.mgmt.users.types.CreateUserPermissionsRequestContent; -import com.auth0.client.mgmt.users.types.DeleteUserPermissionsRequestContent; -import com.auth0.client.mgmt.users.types.ListUserPermissionsRequestParameters; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawPermissionsClient { - protected final ClientOptions clientOptions; - - public AsyncRawPermissionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve all permissions associated with the user. - */ - public CompletableFuture>> list(String id) { - return list(id, ListUserPermissionsRequestParameters.builder().build()); - } - - /** - * Retrieve all permissions associated with the user. - */ - public CompletableFuture>> list( - String id, ListUserPermissionsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve all permissions associated with the user. - */ - public CompletableFuture>> list( - String id, ListUserPermissionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("permissions"); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - 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()) { - ListUserPermissionsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserPermissionsOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListUserPermissionsRequestParameters nextRequest = - ListUserPermissionsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getPermissions().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Assign permissions to a user. - */ - public CompletableFuture> create( - String id, CreateUserPermissionsRequestContent request) { - return create(id, request, null); - } - - /** - * Assign permissions to a user. - */ - public CompletableFuture> create( - String id, CreateUserPermissionsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("permissions") - .build(); - 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) - .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); - } - 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 (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 permissions from a user. - */ - public CompletableFuture> delete( - String id, DeleteUserPermissionsRequestContent request) { - return delete(id, request, null); - } - - /** - * Remove permissions from a user. - */ - public CompletableFuture> delete( - String id, DeleteUserPermissionsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("permissions") - .build(); - 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) - .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); - } - 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 (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/users/AsyncRawRefreshTokenClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawRefreshTokenClient.java deleted file mode 100644 index 589789eb1..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawRefreshTokenClient.java +++ /dev/null @@ -1,245 +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.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.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.types.ListRefreshTokensPaginatedResponseContent; -import com.auth0.client.mgmt.types.RefreshTokenResponseContent; -import com.auth0.client.mgmt.users.types.ListRefreshTokensRequestParameters; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawRefreshTokenClient { - protected final ClientOptions clientOptions; - - public AsyncRawRefreshTokenClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details for a user's refresh tokens. - */ - public CompletableFuture>> list( - String userId) { - return list(userId, ListRefreshTokensRequestParameters.builder().build()); - } - - /** - * Retrieve details for a user's refresh tokens. - */ - public CompletableFuture>> list( - String userId, ListRefreshTokensRequestParameters request) { - return list(userId, request, null); - } - - /** - * Retrieve details for a user's refresh tokens. - */ - public CompletableFuture>> list( - String userId, ListRefreshTokensRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(userId) - .addPathSegments("refresh-tokens"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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()) { - ListRefreshTokensPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListRefreshTokensPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListRefreshTokensRequestParameters nextRequest = ListRefreshTokensRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getTokens().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> { - try { - return list(userId, nextRequest, requestOptions) - .get() - .body(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - }), - 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 (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 all refresh tokens for a user. - */ - public CompletableFuture> delete(String userId) { - return delete(userId, null); - } - - /** - * Delete all refresh tokens for a user. - */ - public CompletableFuture> delete(String userId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(userId) - .addPathSegments("refresh-tokens") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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/users/AsyncRawRiskAssessmentsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawRiskAssessmentsClient.java deleted file mode 100644 index 031a4da2f..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawRiskAssessmentsClient.java +++ /dev/null @@ -1,128 +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.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.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.users.types.ClearAssessorsRequestContent; -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 AsyncRawRiskAssessmentsClient { - protected final ClientOptions clientOptions; - - public AsyncRawRiskAssessmentsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Clear risk assessment assessors for a specific user - */ - public CompletableFuture> clear(String id, ClearAssessorsRequestContent request) { - return clear(id, request, null); - } - - /** - * Clear risk assessment assessors for a specific user - */ - public CompletableFuture> clear( - String id, ClearAssessorsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("risk-assessments") - .addPathSegments("clear") - .build(); - 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) - .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); - } - 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 (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/users/AsyncRawRolesClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawRolesClient.java deleted file mode 100644 index b4e3c2e09..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawRolesClient.java +++ /dev/null @@ -1,336 +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.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.SyncPagingIterable; -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.types.ListUserRolesOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.Role; -import com.auth0.client.mgmt.users.types.AssignUserRolesRequestContent; -import com.auth0.client.mgmt.users.types.DeleteUserRolesRequestContent; -import com.auth0.client.mgmt.users.types.ListUserRolesRequestParameters; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawRolesClient { - protected final ClientOptions clientOptions; - - public AsyncRawRolesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve detailed list of all user roles currently assigned to a user. - *

<b>Note</b>: 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: <a href="https://auth0.com/docs/api/management/v2/organizations/get-organization-member-roles">Get user roles assigned to an Organization member</a>.

- */ - public CompletableFuture>> list(String id) { - return list(id, ListUserRolesRequestParameters.builder().build()); - } - - /** - * Retrieve detailed list of all user roles currently assigned to a user. - *

<b>Note</b>: 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: <a href="https://auth0.com/docs/api/management/v2/organizations/get-organization-member-roles">Get user roles assigned to an Organization member</a>.

- */ - public CompletableFuture>> list( - String id, ListUserRolesRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve detailed list of all user roles currently assigned to a user. - *

<b>Note</b>: 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: <a href="https://auth0.com/docs/api/management/v2/organizations/get-organization-member-roles">Get user roles assigned to an Organization member</a>.

- */ - public CompletableFuture>> list( - String id, ListUserRolesRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("roles"); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - 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()) { - ListUserRolesOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserRolesOffsetPaginatedResponseContent.class); - int newPageNumber = request.getPage() - .map((Integer page) -> page + 1) - .orElse(1); - ListUserRolesRequestParameters nextRequest = ListUserRolesRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getRoles().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable(true, 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 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } - - /** - * Assign one or more existing user roles to a user. For more information, review <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles cannot be created through this action. Additionally, this action is used to assign roles to a user in the context of your whole tenant. To assign roles in the context of a specific Organization, use the following endpoint: <a href="https://auth0.com/docs/api/management/v2/organizations/post-organization-member-roles">Assign user roles to an Organization member</a>.

- */ - public CompletableFuture> assign(String id, AssignUserRolesRequestContent request) { - return assign(id, request, null); - } - - /** - * Assign one or more existing user roles to a user. For more information, review <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles cannot be created through this action. Additionally, this action is used to assign roles to a user in the context of your whole tenant. To assign roles in the context of a specific Organization, use the following endpoint: <a href="https://auth0.com/docs/api/management/v2/organizations/post-organization-member-roles">Assign user roles to an Organization member</a>.

- */ - public CompletableFuture> assign( - String id, AssignUserRolesRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("roles") - .build(); - 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) - .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); - } - 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 (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 specified user roles assigned to a user. - *

<b>Note</b>: This action removes a role from a user in the context of your whole tenant. If you want to unassign a role from a user in the context of a specific Organization, use the following endpoint: <a href="https://auth0.com/docs/api/management/v2/organizations/delete-organization-member-roles">Delete user roles from an Organization member</a>.

- */ - public CompletableFuture> delete(String id, DeleteUserRolesRequestContent request) { - return delete(id, request, null); - } - - /** - * Remove one or more specified user roles assigned to a user. - *

<b>Note</b>: This action removes a role from a user in the context of your whole tenant. If you want to unassign a role from a user in the context of a specific Organization, use the following endpoint: <a href="https://auth0.com/docs/api/management/v2/organizations/delete-organization-member-roles">Delete user roles from an Organization member</a>.

- */ - public CompletableFuture> delete( - String id, DeleteUserRolesRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("roles") - .build(); - 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) - .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); - } - 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 401: - future.completeExceptionally(new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 403: - future.completeExceptionally(new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - case 429: - future.completeExceptionally(new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), - response)); - return; - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - future.completeExceptionally(new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response)); - return; - } catch (IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - } - - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(new ManagementException("Network error executing HTTP request", e)); - } - }); - return future; - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRawSessionsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRawSessionsClient.java deleted file mode 100644 index b594a1c40..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRawSessionsClient.java +++ /dev/null @@ -1,245 +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.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.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.types.ListUserSessionsPaginatedResponseContent; -import com.auth0.client.mgmt.types.SessionResponseContent; -import com.auth0.client.mgmt.users.types.ListUserSessionsRequestParameters; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; -import org.jetbrains.annotations.NotNull; - -public class AsyncRawSessionsClient { - protected final ClientOptions clientOptions; - - public AsyncRawSessionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details for a user's sessions. - */ - public CompletableFuture>> list( - String userId) { - return list(userId, ListUserSessionsRequestParameters.builder().build()); - } - - /** - * Retrieve details for a user's sessions. - */ - public CompletableFuture>> list( - String userId, ListUserSessionsRequestParameters request) { - return list(userId, request, null); - } - - /** - * Retrieve details for a user's sessions. - */ - public CompletableFuture>> list( - String userId, ListUserSessionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(userId) - .addPathSegments("sessions"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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()) { - ListUserSessionsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserSessionsPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListUserSessionsRequestParameters nextRequest = ListUserSessionsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getSessions().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> { - try { - return list(userId, nextRequest, requestOptions) - .get() - .body(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - }), - 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 (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 all sessions for a user. - */ - public CompletableFuture> delete(String userId) { - return delete(userId, null); - } - - /** - * Delete all sessions for a user. - */ - public CompletableFuture> delete(String userId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(userId) - .addPathSegments("sessions") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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/users/AsyncRefreshTokenClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRefreshTokenClient.java deleted file mode 100644 index e6de3b15d..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRefreshTokenClient.java +++ /dev/null @@ -1,66 +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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.RefreshTokenResponseContent; -import com.auth0.client.mgmt.users.types.ListRefreshTokensRequestParameters; -import java.util.concurrent.CompletableFuture; - -public class AsyncRefreshTokenClient { - protected final ClientOptions clientOptions; - - private final AsyncRawRefreshTokenClient rawClient; - - public AsyncRefreshTokenClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawRefreshTokenClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawRefreshTokenClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details for a user's refresh tokens. - */ - public CompletableFuture> list(String userId) { - return this.rawClient.list(userId).thenApply(response -> response.body()); - } - - /** - * Retrieve details for a user's refresh tokens. - */ - public CompletableFuture> list( - String userId, ListRefreshTokensRequestParameters request) { - return this.rawClient.list(userId, request).thenApply(response -> response.body()); - } - - /** - * Retrieve details for a user's refresh tokens. - */ - public CompletableFuture> list( - String userId, ListRefreshTokensRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(userId, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete all refresh tokens for a user. - */ - public CompletableFuture delete(String userId) { - return this.rawClient.delete(userId).thenApply(response -> response.body()); - } - - /** - * Delete all refresh tokens for a user. - */ - public CompletableFuture delete(String userId, RequestOptions requestOptions) { - return this.rawClient.delete(userId, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRiskAssessmentsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRiskAssessmentsClient.java deleted file mode 100644 index 5c5480ced..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRiskAssessmentsClient.java +++ /dev/null @@ -1,42 +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.users.types.ClearAssessorsRequestContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncRiskAssessmentsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawRiskAssessmentsClient rawClient; - - public AsyncRiskAssessmentsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawRiskAssessmentsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawRiskAssessmentsClient withRawResponse() { - return this.rawClient; - } - - /** - * Clear risk assessment assessors for a specific user - */ - public CompletableFuture clear(String id, ClearAssessorsRequestContent request) { - return this.rawClient.clear(id, request).thenApply(response -> response.body()); - } - - /** - * Clear risk assessment assessors for a specific user - */ - public CompletableFuture clear( - String id, ClearAssessorsRequestContent request, RequestOptions requestOptions) { - return this.rawClient.clear(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncRolesClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncRolesClient.java deleted file mode 100644 index c88b631d1..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncRolesClient.java +++ /dev/null @@ -1,90 +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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.Role; -import com.auth0.client.mgmt.users.types.AssignUserRolesRequestContent; -import com.auth0.client.mgmt.users.types.DeleteUserRolesRequestContent; -import com.auth0.client.mgmt.users.types.ListUserRolesRequestParameters; -import java.util.concurrent.CompletableFuture; - -public class AsyncRolesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawRolesClient rawClient; - - public AsyncRolesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawRolesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawRolesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve detailed list of all user roles currently assigned to a user. - *

<b>Note</b>: 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: <a href="https://auth0.com/docs/api/management/v2/organizations/get-organization-member-roles">Get user roles assigned to an Organization member</a>.

- */ - public CompletableFuture> list(String id) { - return this.rawClient.list(id).thenApply(response -> response.body()); - } - - /** - * Retrieve detailed list of all user roles currently assigned to a user. - *

<b>Note</b>: 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: <a href="https://auth0.com/docs/api/management/v2/organizations/get-organization-member-roles">Get user roles assigned to an Organization member</a>.

- */ - public CompletableFuture> list(String id, ListUserRolesRequestParameters request) { - return this.rawClient.list(id, request).thenApply(response -> response.body()); - } - - /** - * Retrieve detailed list of all user roles currently assigned to a user. - *

<b>Note</b>: 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: <a href="https://auth0.com/docs/api/management/v2/organizations/get-organization-member-roles">Get user roles assigned to an Organization member</a>.

- */ - public CompletableFuture> list( - String id, ListUserRolesRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Assign one or more existing user roles to a user. For more information, review <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles cannot be created through this action. Additionally, this action is used to assign roles to a user in the context of your whole tenant. To assign roles in the context of a specific Organization, use the following endpoint: <a href="https://auth0.com/docs/api/management/v2/organizations/post-organization-member-roles">Assign user roles to an Organization member</a>.

- */ - public CompletableFuture assign(String id, AssignUserRolesRequestContent request) { - return this.rawClient.assign(id, request).thenApply(response -> response.body()); - } - - /** - * Assign one or more existing user roles to a user. For more information, review <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles cannot be created through this action. Additionally, this action is used to assign roles to a user in the context of your whole tenant. To assign roles in the context of a specific Organization, use the following endpoint: <a href="https://auth0.com/docs/api/management/v2/organizations/post-organization-member-roles">Assign user roles to an Organization member</a>.

- */ - public CompletableFuture assign( - String id, AssignUserRolesRequestContent request, RequestOptions requestOptions) { - return this.rawClient.assign(id, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Remove one or more specified user roles assigned to a user. - *

<b>Note</b>: This action removes a role from a user in the context of your whole tenant. If you want to unassign a role from a user in the context of a specific Organization, use the following endpoint: <a href="https://auth0.com/docs/api/management/v2/organizations/delete-organization-member-roles">Delete user roles from an Organization member</a>.

- */ - public CompletableFuture delete(String id, DeleteUserRolesRequestContent request) { - return this.rawClient.delete(id, request).thenApply(response -> response.body()); - } - - /** - * Remove one or more specified user roles assigned to a user. - *

<b>Note</b>: This action removes a role from a user in the context of your whole tenant. If you want to unassign a role from a user in the context of a specific Organization, use the following endpoint: <a href="https://auth0.com/docs/api/management/v2/organizations/delete-organization-member-roles">Delete user roles from an Organization member</a>.

- */ - public CompletableFuture delete( - String id, DeleteUserRolesRequestContent request, RequestOptions requestOptions) { - return this.rawClient.delete(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AsyncSessionsClient.java b/src/main/java/com/auth0/client/mgmt/users/AsyncSessionsClient.java deleted file mode 100644 index 4d6f38ae0..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AsyncSessionsClient.java +++ /dev/null @@ -1,66 +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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.SessionResponseContent; -import com.auth0.client.mgmt.users.types.ListUserSessionsRequestParameters; -import java.util.concurrent.CompletableFuture; - -public class AsyncSessionsClient { - protected final ClientOptions clientOptions; - - private final AsyncRawSessionsClient rawClient; - - public AsyncSessionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawSessionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawSessionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details for a user's sessions. - */ - public CompletableFuture> list(String userId) { - return this.rawClient.list(userId).thenApply(response -> response.body()); - } - - /** - * Retrieve details for a user's sessions. - */ - public CompletableFuture> list( - String userId, ListUserSessionsRequestParameters request) { - return this.rawClient.list(userId, request).thenApply(response -> response.body()); - } - - /** - * Retrieve details for a user's sessions. - */ - public CompletableFuture> list( - String userId, ListUserSessionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(userId, request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete all sessions for a user. - */ - public CompletableFuture delete(String userId) { - return this.rawClient.delete(userId).thenApply(response -> response.body()); - } - - /** - * Delete all sessions for a user. - */ - public CompletableFuture delete(String userId, RequestOptions requestOptions) { - return this.rawClient.delete(userId, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AuthenticationMethodsClient.java b/src/main/java/com/auth0/client/mgmt/users/AuthenticationMethodsClient.java deleted file mode 100644 index 551aae322..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AuthenticationMethodsClient.java +++ /dev/null @@ -1,159 +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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.CreateUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.GetUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.SetUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.SetUserAuthenticationMethods; -import com.auth0.client.mgmt.types.UpdateUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.UserAuthenticationMethod; -import com.auth0.client.mgmt.users.types.CreateUserAuthenticationMethodRequestContent; -import com.auth0.client.mgmt.users.types.ListUserAuthenticationMethodsRequestParameters; -import com.auth0.client.mgmt.users.types.UpdateUserAuthenticationMethodRequestContent; -import java.util.List; - -public class AuthenticationMethodsClient { - protected final ClientOptions clientOptions; - - private final RawAuthenticationMethodsClient rawClient; - - public AuthenticationMethodsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawAuthenticationMethodsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawAuthenticationMethodsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve detailed list of authentication methods associated with a specified user. - */ - public SyncPagingIterable list(String id) { - return this.rawClient.list(id).body(); - } - - /** - * Retrieve detailed list of authentication methods associated with a specified user. - */ - public SyncPagingIterable list( - String id, ListUserAuthenticationMethodsRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - /** - * Retrieve detailed list of authentication methods associated with a specified user. - */ - public SyncPagingIterable list( - String id, ListUserAuthenticationMethodsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } - - /** - * Create an authentication method. Authentication methods created via this endpoint will be auto confirmed and should already have verification completed. - */ - public CreateUserAuthenticationMethodResponseContent create( - String id, CreateUserAuthenticationMethodRequestContent request) { - return this.rawClient.create(id, request).body(); - } - - /** - * Create an authentication method. Authentication methods created via this endpoint will be auto confirmed and should already have verification completed. - */ - public CreateUserAuthenticationMethodResponseContent create( - String id, CreateUserAuthenticationMethodRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(id, request, requestOptions).body(); - } - - /** - * Replace the specified user <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors"> authentication methods</a> with supplied values. - *
<b>Note</b>: Authentication methods supplied through this action do not iterate on existing methods. Instead, any methods passed will overwrite the user&#8217s existing settings.
-     * 
- */ - public List set(String id, List request) { - return this.rawClient.set(id, request).body(); - } - - /** - * Replace the specified user <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors"> authentication methods</a> with supplied values. - *
<b>Note</b>: Authentication methods supplied through this action do not iterate on existing methods. Instead, any methods passed will overwrite the user&#8217s existing settings.
-     * 
- */ - public List set( - String id, List request, RequestOptions requestOptions) { - return this.rawClient.set(id, request, requestOptions).body(); - } - - /** - * Remove all authentication methods (i.e., enrolled MFA factors) from the specified user account. This action cannot be undone. - */ - public void deleteAll(String id) { - this.rawClient.deleteAll(id).body(); - } - - /** - * Remove all authentication methods (i.e., enrolled MFA factors) from the specified user account. This action cannot be undone. - */ - public void deleteAll(String id, RequestOptions requestOptions) { - this.rawClient.deleteAll(id, requestOptions).body(); - } - - public GetUserAuthenticationMethodResponseContent get(String id, String authenticationMethodId) { - return this.rawClient.get(id, authenticationMethodId).body(); - } - - public GetUserAuthenticationMethodResponseContent get( - String id, String authenticationMethodId, RequestOptions requestOptions) { - return this.rawClient.get(id, authenticationMethodId, requestOptions).body(); - } - - /** - * Remove the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public void delete(String id, String authenticationMethodId) { - this.rawClient.delete(id, authenticationMethodId).body(); - } - - /** - * Remove the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public void delete(String id, String authenticationMethodId, RequestOptions requestOptions) { - this.rawClient.delete(id, authenticationMethodId, requestOptions).body(); - } - - /** - * Modify the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public UpdateUserAuthenticationMethodResponseContent update(String id, String authenticationMethodId) { - return this.rawClient.update(id, authenticationMethodId).body(); - } - - /** - * Modify the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public UpdateUserAuthenticationMethodResponseContent update( - String id, String authenticationMethodId, UpdateUserAuthenticationMethodRequestContent request) { - return this.rawClient.update(id, authenticationMethodId, request).body(); - } - - /** - * Modify the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public UpdateUserAuthenticationMethodResponseContent update( - String id, - String authenticationMethodId, - UpdateUserAuthenticationMethodRequestContent request, - RequestOptions requestOptions) { - return this.rawClient - .update(id, authenticationMethodId, request, requestOptions) - .body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/AuthenticatorsClient.java b/src/main/java/com/auth0/client/mgmt/users/AuthenticatorsClient.java deleted file mode 100644 index 5a1096e31..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/AuthenticatorsClient.java +++ /dev/null @@ -1,39 +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; - -public class AuthenticatorsClient { - protected final ClientOptions clientOptions; - - private final RawAuthenticatorsClient rawClient; - - public AuthenticatorsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawAuthenticatorsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawAuthenticatorsClient withRawResponse() { - return this.rawClient; - } - - /** - * 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 <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public void deleteAll(String id) { - this.rawClient.deleteAll(id).body(); - } - - /** - * 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 <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public void deleteAll(String id, RequestOptions requestOptions) { - this.rawClient.deleteAll(id, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/ConnectedAccountsClient.java b/src/main/java/com/auth0/client/mgmt/users/ConnectedAccountsClient.java deleted file mode 100644 index 71463074d..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/ConnectedAccountsClient.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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.ConnectedAccount; -import com.auth0.client.mgmt.users.types.GetUserConnectedAccountsRequestParameters; - -public class ConnectedAccountsClient { - protected final ClientOptions clientOptions; - - private final RawConnectedAccountsClient rawClient; - - public ConnectedAccountsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawConnectedAccountsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawConnectedAccountsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve all connected accounts associated with the user. - */ - public SyncPagingIterable list(String id) { - return this.rawClient.list(id).body(); - } - - /** - * Retrieve all connected accounts associated with the user. - */ - public SyncPagingIterable list(String id, GetUserConnectedAccountsRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - /** - * Retrieve all connected accounts associated with the user. - */ - public SyncPagingIterable list( - String id, GetUserConnectedAccountsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/EnrollmentsClient.java b/src/main/java/com/auth0/client/mgmt/users/EnrollmentsClient.java deleted file mode 100644 index e8c4b5b4c..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/EnrollmentsClient.java +++ /dev/null @@ -1,41 +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.UsersEnrollment; -import java.util.List; - -public class EnrollmentsClient { - protected final ClientOptions clientOptions; - - private final RawEnrollmentsClient rawClient; - - public EnrollmentsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawEnrollmentsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawEnrollmentsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve the first <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors">multi-factor authentication</a> enrollment that a specific user has confirmed. - */ - public List get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Retrieve the first <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors">multi-factor authentication</a> enrollment that a specific user has confirmed. - */ - public List get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } -} 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 6970674f1..000000000 --- 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/GroupsClient.java b/src/main/java/com/auth0/client/mgmt/users/GroupsClient.java deleted file mode 100644 index be7651cd6..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/GroupsClient.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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.UserGroupsResponseSchema; -import com.auth0.client.mgmt.users.types.GetUserGroupsRequestParameters; - -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; - } - - /** - * List all groups to which this user belongs. - */ - public SyncPagingIterable get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * List all groups to which this user belongs. - */ - public SyncPagingIterable get(String id, GetUserGroupsRequestParameters request) { - return this.rawClient.get(id, request).body(); - } - - /** - * List all groups to which this user belongs. - */ - public SyncPagingIterable get( - String id, GetUserGroupsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.get(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/IdentitiesClient.java b/src/main/java/com/auth0/client/mgmt/users/IdentitiesClient.java deleted file mode 100644 index 0ba639a0e..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/IdentitiesClient.java +++ /dev/null @@ -1,144 +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.DeleteUserIdentityResponseContentItem; -import com.auth0.client.mgmt.types.UserIdentity; -import com.auth0.client.mgmt.types.UserIdentityProviderEnum; -import com.auth0.client.mgmt.users.types.LinkUserIdentityRequestContent; -import java.util.List; - -public class IdentitiesClient { - protected final ClientOptions clientOptions; - - private final RawIdentitiesClient rawClient; - - public IdentitiesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawIdentitiesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawIdentitiesClient withRawResponse() { - return this.rawClient; - } - - /** - * Link two user accounts together forming a primary and secondary relationship. On successful linking, the endpoint returns the new array of the primary account identities. - *

Note: There are two ways of invoking the endpoint:

- *

<ul> - * <li>With the authenticated primary account's JWT in the Authorization header, which has the <code>update:current_user_identities</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer PRIMARY_ACCOUNT_JWT" - * { - * "link_with": "SECONDARY_ACCOUNT_JWT" - * } - * </pre> - * In this case, only the <code>link_with</code> param is required in the body, which also contains the JWT obtained upon the secondary account's authentication. - * </li> - * <li>With a token generated by the API V2 containing the <code>update:users</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer YOUR_API_V2_TOKEN" - * { - * "provider": "SECONDARY_ACCOUNT_PROVIDER", - * "connection_id": "SECONDARY_ACCOUNT_CONNECTION_ID(OPTIONAL)", - * "user_id": "SECONDARY_ACCOUNT_USER_ID" - * } - * </pre> - * In this case you need to send <code>provider</code> and <code>user_id</code> in the body. Optionally you can also send the <code>connection_id</code> param which is suitable for identifying a particular database connection for the 'auth0' provider. - * </li> - * </ul>

- */ - public List link(String id) { - return this.rawClient.link(id).body(); - } - - /** - * Link two user accounts together forming a primary and secondary relationship. On successful linking, the endpoint returns the new array of the primary account identities. - *

Note: There are two ways of invoking the endpoint:

- *

<ul> - * <li>With the authenticated primary account's JWT in the Authorization header, which has the <code>update:current_user_identities</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer PRIMARY_ACCOUNT_JWT" - * { - * "link_with": "SECONDARY_ACCOUNT_JWT" - * } - * </pre> - * In this case, only the <code>link_with</code> param is required in the body, which also contains the JWT obtained upon the secondary account's authentication. - * </li> - * <li>With a token generated by the API V2 containing the <code>update:users</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer YOUR_API_V2_TOKEN" - * { - * "provider": "SECONDARY_ACCOUNT_PROVIDER", - * "connection_id": "SECONDARY_ACCOUNT_CONNECTION_ID(OPTIONAL)", - * "user_id": "SECONDARY_ACCOUNT_USER_ID" - * } - * </pre> - * In this case you need to send <code>provider</code> and <code>user_id</code> in the body. Optionally you can also send the <code>connection_id</code> param which is suitable for identifying a particular database connection for the 'auth0' provider. - * </li> - * </ul>

- */ - public List link(String id, LinkUserIdentityRequestContent request) { - return this.rawClient.link(id, request).body(); - } - - /** - * Link two user accounts together forming a primary and secondary relationship. On successful linking, the endpoint returns the new array of the primary account identities. - *

Note: There are two ways of invoking the endpoint:

- *

<ul> - * <li>With the authenticated primary account's JWT in the Authorization header, which has the <code>update:current_user_identities</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer PRIMARY_ACCOUNT_JWT" - * { - * "link_with": "SECONDARY_ACCOUNT_JWT" - * } - * </pre> - * In this case, only the <code>link_with</code> param is required in the body, which also contains the JWT obtained upon the secondary account's authentication. - * </li> - * <li>With a token generated by the API V2 containing the <code>update:users</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer YOUR_API_V2_TOKEN" - * { - * "provider": "SECONDARY_ACCOUNT_PROVIDER", - * "connection_id": "SECONDARY_ACCOUNT_CONNECTION_ID(OPTIONAL)", - * "user_id": "SECONDARY_ACCOUNT_USER_ID" - * } - * </pre> - * In this case you need to send <code>provider</code> and <code>user_id</code> in the body. Optionally you can also send the <code>connection_id</code> param which is suitable for identifying a particular database connection for the 'auth0' provider. - * </li> - * </ul>

- */ - public List link(String id, LinkUserIdentityRequestContent request, RequestOptions requestOptions) { - return this.rawClient.link(id, request, requestOptions).body(); - } - - /** - * Unlink a specific secondary account from a target user. This action requires the ID of both the target user and the secondary account. - *

Unlinking the secondary account removes it from the identities array of the target user and creates a new standalone profile for the secondary account. To learn more, review <a href="https://auth0.com/docs/manage-users/user-accounts/user-account-linking/unlink-user-accounts">Unlink User Accounts</a>.

- */ - public List delete( - String id, UserIdentityProviderEnum provider, String userId) { - return this.rawClient.delete(id, provider, userId).body(); - } - - /** - * Unlink a specific secondary account from a target user. This action requires the ID of both the target user and the secondary account. - *

Unlinking the secondary account removes it from the identities array of the target user and creates a new standalone profile for the secondary account. To learn more, review <a href="https://auth0.com/docs/manage-users/user-accounts/user-account-linking/unlink-user-accounts">Unlink User Accounts</a>.

- */ - public List delete( - String id, UserIdentityProviderEnum provider, String userId, RequestOptions requestOptions) { - return this.rawClient.delete(id, provider, userId, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/LogsClient.java b/src/main/java/com/auth0/client/mgmt/users/LogsClient.java deleted file mode 100644 index 32474027d..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/LogsClient.java +++ /dev/null @@ -1,59 +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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.Log; -import com.auth0.client.mgmt.users.types.ListUserLogsRequestParameters; - -public class LogsClient { - protected final ClientOptions clientOptions; - - private final RawLogsClient rawClient; - - public LogsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawLogsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawLogsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve log events for a specific user. - *

Note: For more information on all possible event types, their respective acronyms and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

For more information on the list of fields that can be used in sort, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may only paginate through up to 1,000 search results. If you exceed this threshold, please redefine your search.

- */ - public SyncPagingIterable list(String id) { - return this.rawClient.list(id).body(); - } - - /** - * Retrieve log events for a specific user. - *

Note: For more information on all possible event types, their respective acronyms and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

For more information on the list of fields that can be used in sort, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may only paginate through up to 1,000 search results. If you exceed this threshold, please redefine your search.

- */ - public SyncPagingIterable list(String id, ListUserLogsRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - /** - * Retrieve log events for a specific user. - *

Note: For more information on all possible event types, their respective acronyms and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

For more information on the list of fields that can be used in sort, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may only paginate through up to 1,000 search results. If you exceed this threshold, please redefine your search.

- */ - public SyncPagingIterable list( - String id, ListUserLogsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/MultifactorClient.java b/src/main/java/com/auth0/client/mgmt/users/MultifactorClient.java deleted file mode 100644 index cbbd4e7c9..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/MultifactorClient.java +++ /dev/null @@ -1,54 +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.UserMultifactorProviderEnum; - -public class MultifactorClient { - protected final ClientOptions clientOptions; - - private final RawMultifactorClient rawClient; - - public MultifactorClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawMultifactorClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawMultifactorClient withRawResponse() { - return this.rawClient; - } - - /** - * Invalidate all remembered browsers across all <a href="https://auth0.com/docs/multifactor-authentication">authentication factors</a> for a user. - */ - public void invalidateRememberBrowser(String id) { - this.rawClient.invalidateRememberBrowser(id).body(); - } - - /** - * Invalidate all remembered browsers across all <a href="https://auth0.com/docs/multifactor-authentication">authentication factors</a> for a user. - */ - public void invalidateRememberBrowser(String id, RequestOptions requestOptions) { - this.rawClient.invalidateRememberBrowser(id, requestOptions).body(); - } - - /** - * Remove a <a href="https://auth0.com/docs/multifactor-authentication">multifactor</a> authentication configuration from a user's account. This forces the user to manually reconfigure the multi-factor provider. - */ - public void deleteProvider(String id, UserMultifactorProviderEnum provider) { - this.rawClient.deleteProvider(id, provider).body(); - } - - /** - * Remove a <a href="https://auth0.com/docs/multifactor-authentication">multifactor</a> authentication configuration from a user's account. This forces the user to manually reconfigure the multi-factor provider. - */ - public void deleteProvider(String id, UserMultifactorProviderEnum provider, RequestOptions requestOptions) { - this.rawClient.deleteProvider(id, provider, 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 deleted file mode 100644 index e428d0e52..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/OrganizationsClient.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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.Organization; -import com.auth0.client.mgmt.users.types.ListUserOrganizationsRequestParameters; - -public class OrganizationsClient { - protected final ClientOptions clientOptions; - - private final RawOrganizationsClient rawClient; - - public OrganizationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawOrganizationsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawOrganizationsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review <a href="https://auth0.com/docs/manage-users/organizations">Auth0 Organizations</a>. - */ - public SyncPagingIterable list(String id) { - return this.rawClient.list(id).body(); - } - - /** - * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review <a href="https://auth0.com/docs/manage-users/organizations">Auth0 Organizations</a>. - */ - public SyncPagingIterable list(String id, ListUserOrganizationsRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - /** - * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review <a href="https://auth0.com/docs/manage-users/organizations">Auth0 Organizations</a>. - */ - public SyncPagingIterable list( - String id, ListUserOrganizationsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/PermissionsClient.java b/src/main/java/com/auth0/client/mgmt/users/PermissionsClient.java deleted file mode 100644 index 387445507..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/PermissionsClient.java +++ /dev/null @@ -1,80 +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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.UserPermissionSchema; -import com.auth0.client.mgmt.users.types.CreateUserPermissionsRequestContent; -import com.auth0.client.mgmt.users.types.DeleteUserPermissionsRequestContent; -import com.auth0.client.mgmt.users.types.ListUserPermissionsRequestParameters; - -public class PermissionsClient { - protected final ClientOptions clientOptions; - - private final RawPermissionsClient rawClient; - - public PermissionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawPermissionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawPermissionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve all permissions associated with the user. - */ - public SyncPagingIterable list(String id) { - return this.rawClient.list(id).body(); - } - - /** - * Retrieve all permissions associated with the user. - */ - public SyncPagingIterable list(String id, ListUserPermissionsRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - /** - * Retrieve all permissions associated with the user. - */ - public SyncPagingIterable list( - String id, ListUserPermissionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } - - /** - * Assign permissions to a user. - */ - public void create(String id, CreateUserPermissionsRequestContent request) { - this.rawClient.create(id, request).body(); - } - - /** - * Assign permissions to a user. - */ - public void create(String id, CreateUserPermissionsRequestContent request, RequestOptions requestOptions) { - this.rawClient.create(id, request, requestOptions).body(); - } - - /** - * Remove permissions from a user. - */ - public void delete(String id, DeleteUserPermissionsRequestContent request) { - this.rawClient.delete(id, request).body(); - } - - /** - * Remove permissions from a user. - */ - public void delete(String id, DeleteUserPermissionsRequestContent request, RequestOptions requestOptions) { - this.rawClient.delete(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/RawAuthenticationMethodsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawAuthenticationMethodsClient.java deleted file mode 100644 index e61c090f7..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RawAuthenticationMethodsClient.java +++ /dev/null @@ -1,574 +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.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.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.CreateUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.GetUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.ListUserAuthenticationMethodsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.SetUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.SetUserAuthenticationMethods; -import com.auth0.client.mgmt.types.UpdateUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.UserAuthenticationMethod; -import com.auth0.client.mgmt.users.types.CreateUserAuthenticationMethodRequestContent; -import com.auth0.client.mgmt.users.types.ListUserAuthenticationMethodsRequestParameters; -import com.auth0.client.mgmt.users.types.UpdateUserAuthenticationMethodRequestContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import java.io.IOException; -import java.util.Collections; -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 RawAuthenticationMethodsClient { - protected final ClientOptions clientOptions; - - public RawAuthenticationMethodsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve detailed list of authentication methods associated with a specified user. - */ - public ManagementApiHttpResponse> list(String id) { - return list(id, ListUserAuthenticationMethodsRequestParameters.builder().build()); - } - - /** - * Retrieve detailed list of authentication methods associated with a specified user. - */ - public ManagementApiHttpResponse> list( - String id, ListUserAuthenticationMethodsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve detailed list of authentication methods associated with a specified user. - */ - public ManagementApiHttpResponse> list( - String id, ListUserAuthenticationMethodsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("authentication-methods"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListUserAuthenticationMethodsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserAuthenticationMethodsOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListUserAuthenticationMethodsRequestParameters nextRequest = - ListUserAuthenticationMethodsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getAuthenticators().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create an authentication method. Authentication methods created via this endpoint will be auto confirmed and should already have verification completed. - */ - public ManagementApiHttpResponse create( - String id, CreateUserAuthenticationMethodRequestContent request) { - return create(id, request, null); - } - - /** - * Create an authentication method. Authentication methods created via this endpoint will be auto confirmed and should already have verification completed. - */ - public ManagementApiHttpResponse create( - String id, CreateUserAuthenticationMethodRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("authentication-methods") - .build(); - 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) - .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); - } - 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, CreateUserAuthenticationMethodResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Replace the specified user <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors"> authentication methods</a> with supplied values. - *
<b>Note</b>: Authentication methods supplied through this action do not iterate on existing methods. Instead, any methods passed will overwrite the user&#8217s existing settings.
-     * 
- */ - public ManagementApiHttpResponse> set( - String id, List request) { - return set(id, request, null); - } - - /** - * Replace the specified user <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors"> authentication methods</a> with supplied values. - *
<b>Note</b>: Authentication methods supplied through this action do not iterate on existing methods. Instead, any methods passed will overwrite the user&#8217s existing settings.
-     * 
- */ - public ManagementApiHttpResponse> set( - String id, List request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("authentication-methods") - .build(); - 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) - .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); - } - 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 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Remove all authentication methods (i.e., enrolled MFA factors) from the specified user account. This action cannot be undone. - */ - public ManagementApiHttpResponse deleteAll(String id) { - return deleteAll(id, null); - } - - /** - * Remove all authentication methods (i.e., enrolled MFA factors) from the specified user account. This action cannot be undone. - */ - public ManagementApiHttpResponse deleteAll(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("authentication-methods") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse get( - String id, String authenticationMethodId) { - return get(id, authenticationMethodId, null); - } - - public ManagementApiHttpResponse get( - String id, String authenticationMethodId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("authentication-methods") - .addPathSegment(authenticationMethodId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetUserAuthenticationMethodResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Remove the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public ManagementApiHttpResponse delete(String id, String authenticationMethodId) { - return delete(id, authenticationMethodId, null); - } - - /** - * Remove the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public ManagementApiHttpResponse delete( - String id, String authenticationMethodId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("authentication-methods") - .addPathSegment(authenticationMethodId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Modify the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public ManagementApiHttpResponse update( - String id, String authenticationMethodId) { - return update( - id, - authenticationMethodId, - UpdateUserAuthenticationMethodRequestContent.builder().build()); - } - - /** - * Modify the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public ManagementApiHttpResponse update( - String id, String authenticationMethodId, UpdateUserAuthenticationMethodRequestContent request) { - return update(id, authenticationMethodId, request, null); - } - - /** - * Modify the authentication method with the given ID from the specified user. For more information, review <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public ManagementApiHttpResponse update( - String id, - String authenticationMethodId, - UpdateUserAuthenticationMethodRequestContent request, - RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("authentication-methods") - .addPathSegment(authenticationMethodId) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateUserAuthenticationMethodResponseContent.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 (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 deleted file mode 100644 index 2d017cc5d..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RawAuthenticatorsClient.java +++ /dev/null @@ -1,90 +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.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawAuthenticatorsClient { - protected final ClientOptions clientOptions; - - public RawAuthenticatorsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * 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 <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public ManagementApiHttpResponse deleteAll(String id) { - return deleteAll(id, null); - } - - /** - * 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 <a href="https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authentication-methods-with-management-api">Manage Authentication Methods with Management API</a>. - */ - public ManagementApiHttpResponse deleteAll(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("authenticators") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 deleted file mode 100644 index b1492cc5f..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RawConnectedAccountsClient.java +++ /dev/null @@ -1,124 +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.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.SyncPagingIterable; -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.types.ConnectedAccount; -import com.auth0.client.mgmt.types.ListUserConnectedAccountsResponseContent; -import com.auth0.client.mgmt.users.types.GetUserConnectedAccountsRequestParameters; -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 RawConnectedAccountsClient { - protected final ClientOptions clientOptions; - - public RawConnectedAccountsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve all connected accounts associated with the user. - */ - public ManagementApiHttpResponse> list(String id) { - return list(id, GetUserConnectedAccountsRequestParameters.builder().build()); - } - - /** - * Retrieve all connected accounts associated with the user. - */ - public ManagementApiHttpResponse> list( - String id, GetUserConnectedAccountsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve all connected accounts associated with the user. - */ - public ManagementApiHttpResponse> list( - String id, GetUserConnectedAccountsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("connected-accounts"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListUserConnectedAccountsResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserConnectedAccountsResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - GetUserConnectedAccountsRequestParameters nextRequest = - GetUserConnectedAccountsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getConnectedAccounts(); - 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 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/RawEnrollmentsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawEnrollmentsClient.java deleted file mode 100644 index 64bed11ca..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RawEnrollmentsClient.java +++ /dev/null @@ -1,100 +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.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.UsersEnrollment; -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.Response; -import okhttp3.ResponseBody; - -public class RawEnrollmentsClient { - protected final ClientOptions clientOptions; - - public RawEnrollmentsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve the first <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors">multi-factor authentication</a> enrollment that a specific user has confirmed. - */ - public ManagementApiHttpResponse> get(String id) { - return get(id, null); - } - - /** - * Retrieve the first <a href="https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors">multi-factor authentication</a> enrollment that a specific user has confirmed. - */ - public ManagementApiHttpResponse> get(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("enrollments") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, 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 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/RawFederatedConnectionsTokensetsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawFederatedConnectionsTokensetsClient.java deleted file mode 100644 index b20d61cff..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RawFederatedConnectionsTokensetsClient.java +++ /dev/null @@ -1,151 +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.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.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.Response; -import okhttp3.ResponseBody; - -public class RawFederatedConnectionsTokensetsClient { - protected final ClientOptions clientOptions; - - public RawFederatedConnectionsTokensetsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * List active federated connections tokensets for a provided user - */ - public ManagementApiHttpResponse> list(String id) { - return list(id, null); - } - - /** - * List active federated connections tokensets for a provided user - */ - public ManagementApiHttpResponse> list(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("federated-connections-tokensets") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, new TypeReference>() {}), - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - public ManagementApiHttpResponse delete(String id, String tokensetId) { - return delete(id, tokensetId, null); - } - - public ManagementApiHttpResponse delete(String id, String tokensetId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("federated-connections-tokensets") - .addPathSegment(tokensetId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 deleted file mode 100644 index 9e795c8ab..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RawGroupsClient.java +++ /dev/null @@ -1,131 +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.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.SyncPagingIterable; -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.types.GetUserGroupsPaginatedResponseContent; -import com.auth0.client.mgmt.types.UserGroupsResponseSchema; -import com.auth0.client.mgmt.users.types.GetUserGroupsRequestParameters; -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; - } - - /** - * List all groups to which this user belongs. - */ - public ManagementApiHttpResponse> get(String id) { - return get(id, GetUserGroupsRequestParameters.builder().build()); - } - - /** - * List all groups to which this user belongs. - */ - public ManagementApiHttpResponse> get( - String id, GetUserGroupsRequestParameters request) { - return get(id, request, null); - } - - /** - * List all groups to which this user belongs. - */ - public ManagementApiHttpResponse> get( - String id, GetUserGroupsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("groups"); - 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); - } - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - GetUserGroupsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetUserGroupsPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - GetUserGroupsRequestParameters nextRequest = GetUserGroupsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = parsedResponse.getGroups(); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> get( - id, nextRequest, requestOptions) - .body()), - response); - } - try { - switch (response.code()) { - case 400: - throw new BadRequestError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (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 deleted file mode 100644 index 5fe5447af..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RawIdentitiesClient.java +++ /dev/null @@ -1,265 +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.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.errors.BadRequestError; -import com.auth0.client.mgmt.errors.ConflictError; -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.types.DeleteUserIdentityResponseContentItem; -import com.auth0.client.mgmt.types.UserIdentity; -import com.auth0.client.mgmt.types.UserIdentityProviderEnum; -import com.auth0.client.mgmt.users.types.LinkUserIdentityRequestContent; -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 RawIdentitiesClient { - protected final ClientOptions clientOptions; - - public RawIdentitiesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Link two user accounts together forming a primary and secondary relationship. On successful linking, the endpoint returns the new array of the primary account identities. - *

Note: There are two ways of invoking the endpoint:

- *

<ul> - * <li>With the authenticated primary account's JWT in the Authorization header, which has the <code>update:current_user_identities</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer PRIMARY_ACCOUNT_JWT" - * { - * "link_with": "SECONDARY_ACCOUNT_JWT" - * } - * </pre> - * In this case, only the <code>link_with</code> param is required in the body, which also contains the JWT obtained upon the secondary account's authentication. - * </li> - * <li>With a token generated by the API V2 containing the <code>update:users</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer YOUR_API_V2_TOKEN" - * { - * "provider": "SECONDARY_ACCOUNT_PROVIDER", - * "connection_id": "SECONDARY_ACCOUNT_CONNECTION_ID(OPTIONAL)", - * "user_id": "SECONDARY_ACCOUNT_USER_ID" - * } - * </pre> - * In this case you need to send <code>provider</code> and <code>user_id</code> in the body. Optionally you can also send the <code>connection_id</code> param which is suitable for identifying a particular database connection for the 'auth0' provider. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse> link(String id) { - return link(id, LinkUserIdentityRequestContent.builder().build()); - } - - /** - * Link two user accounts together forming a primary and secondary relationship. On successful linking, the endpoint returns the new array of the primary account identities. - *

Note: There are two ways of invoking the endpoint:

- *

<ul> - * <li>With the authenticated primary account's JWT in the Authorization header, which has the <code>update:current_user_identities</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer PRIMARY_ACCOUNT_JWT" - * { - * "link_with": "SECONDARY_ACCOUNT_JWT" - * } - * </pre> - * In this case, only the <code>link_with</code> param is required in the body, which also contains the JWT obtained upon the secondary account's authentication. - * </li> - * <li>With a token generated by the API V2 containing the <code>update:users</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer YOUR_API_V2_TOKEN" - * { - * "provider": "SECONDARY_ACCOUNT_PROVIDER", - * "connection_id": "SECONDARY_ACCOUNT_CONNECTION_ID(OPTIONAL)", - * "user_id": "SECONDARY_ACCOUNT_USER_ID" - * } - * </pre> - * In this case you need to send <code>provider</code> and <code>user_id</code> in the body. Optionally you can also send the <code>connection_id</code> param which is suitable for identifying a particular database connection for the 'auth0' provider. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse> link(String id, LinkUserIdentityRequestContent request) { - return link(id, request, null); - } - - /** - * Link two user accounts together forming a primary and secondary relationship. On successful linking, the endpoint returns the new array of the primary account identities. - *

Note: There are two ways of invoking the endpoint:

- *

<ul> - * <li>With the authenticated primary account's JWT in the Authorization header, which has the <code>update:current_user_identities</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer PRIMARY_ACCOUNT_JWT" - * { - * "link_with": "SECONDARY_ACCOUNT_JWT" - * } - * </pre> - * In this case, only the <code>link_with</code> param is required in the body, which also contains the JWT obtained upon the secondary account's authentication. - * </li> - * <li>With a token generated by the API V2 containing the <code>update:users</code> scope: - * <pre> - * POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities - * Authorization: "Bearer YOUR_API_V2_TOKEN" - * { - * "provider": "SECONDARY_ACCOUNT_PROVIDER", - * "connection_id": "SECONDARY_ACCOUNT_CONNECTION_ID(OPTIONAL)", - * "user_id": "SECONDARY_ACCOUNT_USER_ID" - * } - * </pre> - * In this case you need to send <code>provider</code> and <code>user_id</code> in the body. Optionally you can also send the <code>connection_id</code> param which is suitable for identifying a particular database connection for the 'auth0' provider. - * </li> - * </ul>

- */ - public ManagementApiHttpResponse> link( - String id, LinkUserIdentityRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("identities") - .build(); - 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) - .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); - } - 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 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Unlink a specific secondary account from a target user. This action requires the ID of both the target user and the secondary account. - *

Unlinking the secondary account removes it from the identities array of the target user and creates a new standalone profile for the secondary account. To learn more, review <a href="https://auth0.com/docs/manage-users/user-accounts/user-account-linking/unlink-user-accounts">Unlink User Accounts</a>.

- */ - public ManagementApiHttpResponse> delete( - String id, UserIdentityProviderEnum provider, String userId) { - return delete(id, provider, userId, null); - } - - /** - * Unlink a specific secondary account from a target user. This action requires the ID of both the target user and the secondary account. - *

Unlinking the secondary account removes it from the identities array of the target user and creates a new standalone profile for the secondary account. To learn more, review <a href="https://auth0.com/docs/manage-users/user-accounts/user-account-linking/unlink-user-accounts">Unlink User Accounts</a>.

- */ - public ManagementApiHttpResponse> delete( - String id, UserIdentityProviderEnum provider, String userId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("identities") - .addPathSegment(provider.toString()) - .addPathSegment(userId) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/RawLogsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawLogsClient.java deleted file mode 100644 index ff8fb9dd1..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RawLogsClient.java +++ /dev/null @@ -1,135 +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.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.SyncPagingIterable; -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.types.Log; -import com.auth0.client.mgmt.types.UserListLogOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.users.types.ListUserLogsRequestParameters; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawLogsClient { - protected final ClientOptions clientOptions; - - public RawLogsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve log events for a specific user. - *

Note: For more information on all possible event types, their respective acronyms and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

For more information on the list of fields that can be used in sort, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may only paginate through up to 1,000 search results. If you exceed this threshold, please redefine your search.

- */ - public ManagementApiHttpResponse> list(String id) { - return list(id, ListUserLogsRequestParameters.builder().build()); - } - - /** - * Retrieve log events for a specific user. - *

Note: For more information on all possible event types, their respective acronyms and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

For more information on the list of fields that can be used in sort, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may only paginate through up to 1,000 search results. If you exceed this threshold, please redefine your search.

- */ - public ManagementApiHttpResponse> list(String id, ListUserLogsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve log events for a specific user. - *

Note: For more information on all possible event types, their respective acronyms and descriptions, see <a href="https://auth0.com/docs/logs/log-event-type-codes">Log Event Type Codes</a>.

- *

For more information on the list of fields that can be used in sort, see <a href="https://auth0.com/docs/logs/log-search-query-syntax#searchable-fields">Searchable Fields</a>.

- *

Auth0 <a href="https://auth0.com/docs/logs/retrieve-log-events-using-mgmt-api#limitations">limits the number of logs</a> you can return by search criteria to 100 logs per request. Furthermore, you may only paginate through up to 1,000 search results. If you exceed this threshold, please redefine your search.

- */ - public ManagementApiHttpResponse> list( - String id, ListUserLogsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("logs"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - if (!request.getSort().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "sort", request.getSort().orElse(null), false); - } - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - UserListLogOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UserListLogOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListUserLogsRequestParameters nextRequest = ListUserLogsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getLogs().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/RawMultifactorClient.java b/src/main/java/com/auth0/client/mgmt/users/RawMultifactorClient.java deleted file mode 100644 index 893c2dc74..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RawMultifactorClient.java +++ /dev/null @@ -1,155 +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.ManagementApiException; -import com.auth0.client.mgmt.core.ManagementApiHttpResponse; -import com.auth0.client.mgmt.core.ManagementException; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.RequestOptions; -import com.auth0.client.mgmt.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.UserMultifactorProviderEnum; -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 RawMultifactorClient { - protected final ClientOptions clientOptions; - - public RawMultifactorClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Invalidate all remembered browsers across all <a href="https://auth0.com/docs/multifactor-authentication">authentication factors</a> for a user. - */ - public ManagementApiHttpResponse invalidateRememberBrowser(String id) { - return invalidateRememberBrowser(id, null); - } - - /** - * Invalidate all remembered browsers across all <a href="https://auth0.com/docs/multifactor-authentication">authentication factors</a> for a user. - */ - public ManagementApiHttpResponse invalidateRememberBrowser(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("multifactor/actions") - .addPathSegments("invalidate-remember-browser") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Remove a <a href="https://auth0.com/docs/multifactor-authentication">multifactor</a> authentication configuration from a user's account. This forces the user to manually reconfigure the multi-factor provider. - */ - public ManagementApiHttpResponse deleteProvider(String id, UserMultifactorProviderEnum provider) { - return deleteProvider(id, provider, null); - } - - /** - * Remove a <a href="https://auth0.com/docs/multifactor-authentication">multifactor</a> authentication configuration from a user's account. This forces the user to manually reconfigure the multi-factor provider. - */ - public ManagementApiHttpResponse deleteProvider( - String id, UserMultifactorProviderEnum provider, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("multifactor") - .addPathSegment(provider.toString()) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 deleted file mode 100644 index f0c7ce991..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RawOrganizationsClient.java +++ /dev/null @@ -1,120 +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.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.SyncPagingIterable; -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.types.ListUserOrganizationsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.Organization; -import com.auth0.client.mgmt.users.types.ListUserOrganizationsRequestParameters; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawOrganizationsClient { - protected final ClientOptions clientOptions; - - public RawOrganizationsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review <a href="https://auth0.com/docs/manage-users/organizations">Auth0 Organizations</a>. - */ - public ManagementApiHttpResponse> list(String id) { - return list(id, ListUserOrganizationsRequestParameters.builder().build()); - } - - /** - * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review <a href="https://auth0.com/docs/manage-users/organizations">Auth0 Organizations</a>. - */ - public ManagementApiHttpResponse> list( - String id, ListUserOrganizationsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review <a href="https://auth0.com/docs/manage-users/organizations">Auth0 Organizations</a>. - */ - public ManagementApiHttpResponse> list( - String id, ListUserOrganizationsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("organizations"); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListUserOrganizationsOffsetPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserOrganizationsOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListUserOrganizationsRequestParameters nextRequest = ListUserOrganizationsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getOrganizations().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, result, parsedResponse, () -> list(id, nextRequest, requestOptions) - .body()), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/RawPermissionsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawPermissionsClient.java deleted file mode 100644 index bfcfa7390..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RawPermissionsClient.java +++ /dev/null @@ -1,268 +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.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.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.types.ListUserPermissionsOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.UserPermissionSchema; -import com.auth0.client.mgmt.users.types.CreateUserPermissionsRequestContent; -import com.auth0.client.mgmt.users.types.DeleteUserPermissionsRequestContent; -import com.auth0.client.mgmt.users.types.ListUserPermissionsRequestParameters; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawPermissionsClient { - protected final ClientOptions clientOptions; - - public RawPermissionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve all permissions associated with the user. - */ - public ManagementApiHttpResponse> list(String id) { - return list(id, ListUserPermissionsRequestParameters.builder().build()); - } - - /** - * Retrieve all permissions associated with the user. - */ - public ManagementApiHttpResponse> list( - String id, ListUserPermissionsRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve all permissions associated with the user. - */ - public ManagementApiHttpResponse> list( - String id, ListUserPermissionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("permissions"); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListUserPermissionsOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserPermissionsOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListUserPermissionsRequestParameters nextRequest = ListUserPermissionsRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = - parsedResponse.getPermissions().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Assign permissions to a user. - */ - public ManagementApiHttpResponse create(String id, CreateUserPermissionsRequestContent request) { - return create(id, request, null); - } - - /** - * Assign permissions to a user. - */ - public ManagementApiHttpResponse create( - String id, CreateUserPermissionsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("permissions") - .build(); - 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) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Remove permissions from a user. - */ - public ManagementApiHttpResponse delete(String id, DeleteUserPermissionsRequestContent request) { - return delete(id, request, null); - } - - /** - * Remove permissions from a user. - */ - public ManagementApiHttpResponse delete( - String id, DeleteUserPermissionsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("permissions") - .build(); - 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) - .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); - } - 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 (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 deleted file mode 100644 index 8e393c6e6..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RawRefreshTokenClient.java +++ /dev/null @@ -1,188 +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.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.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.types.ListRefreshTokensPaginatedResponseContent; -import com.auth0.client.mgmt.types.RefreshTokenResponseContent; -import com.auth0.client.mgmt.users.types.ListRefreshTokensRequestParameters; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawRefreshTokenClient { - protected final ClientOptions clientOptions; - - public RawRefreshTokenClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details for a user's refresh tokens. - */ - public ManagementApiHttpResponse> list(String userId) { - return list(userId, ListRefreshTokensRequestParameters.builder().build()); - } - - /** - * Retrieve details for a user's refresh tokens. - */ - public ManagementApiHttpResponse> list( - String userId, ListRefreshTokensRequestParameters request) { - return list(userId, request, null); - } - - /** - * Retrieve details for a user's refresh tokens. - */ - public ManagementApiHttpResponse> list( - String userId, ListRefreshTokensRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(userId) - .addPathSegments("refresh-tokens"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListRefreshTokensPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListRefreshTokensPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListRefreshTokensRequestParameters nextRequest = ListRefreshTokensRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getTokens().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> list( - userId, nextRequest, requestOptions) - .body()), - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete all refresh tokens for a user. - */ - public ManagementApiHttpResponse delete(String userId) { - return delete(userId, null); - } - - /** - * Delete all refresh tokens for a user. - */ - public ManagementApiHttpResponse delete(String userId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(userId) - .addPathSegments("refresh-tokens") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 deleted file mode 100644 index a02613d42..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RawRiskAssessmentsClient.java +++ /dev/null @@ -1,103 +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.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.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.users.types.ClearAssessorsRequestContent; -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 RawRiskAssessmentsClient { - protected final ClientOptions clientOptions; - - public RawRiskAssessmentsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Clear risk assessment assessors for a specific user - */ - public ManagementApiHttpResponse clear(String id, ClearAssessorsRequestContent request) { - return clear(id, request, null); - } - - /** - * Clear risk assessment assessors for a specific user - */ - public ManagementApiHttpResponse clear( - String id, ClearAssessorsRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("risk-assessments") - .addPathSegments("clear") - .build(); - 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) - .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); - } - 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 (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 deleted file mode 100644 index 6f9fbd20c..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RawRolesClient.java +++ /dev/null @@ -1,263 +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.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.SyncPagingIterable; -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.types.ListUserRolesOffsetPaginatedResponseContent; -import com.auth0.client.mgmt.types.Role; -import com.auth0.client.mgmt.users.types.AssignUserRolesRequestContent; -import com.auth0.client.mgmt.users.types.DeleteUserRolesRequestContent; -import com.auth0.client.mgmt.users.types.ListUserRolesRequestParameters; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawRolesClient { - protected final ClientOptions clientOptions; - - public RawRolesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve detailed list of all user roles currently assigned to a user. - *

<b>Note</b>: 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: <a href="https://auth0.com/docs/api/management/v2/organizations/get-organization-member-roles">Get user roles assigned to an Organization member</a>.

- */ - public ManagementApiHttpResponse> list(String id) { - return list(id, ListUserRolesRequestParameters.builder().build()); - } - - /** - * Retrieve detailed list of all user roles currently assigned to a user. - *

<b>Note</b>: 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: <a href="https://auth0.com/docs/api/management/v2/organizations/get-organization-member-roles">Get user roles assigned to an Organization member</a>.

- */ - public ManagementApiHttpResponse> list(String id, ListUserRolesRequestParameters request) { - return list(id, request, null); - } - - /** - * Retrieve detailed list of all user roles currently assigned to a user. - *

<b>Note</b>: 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: <a href="https://auth0.com/docs/api/management/v2/organizations/get-organization-member-roles">Get user roles assigned to an Organization member</a>.

- */ - public ManagementApiHttpResponse> list( - String id, ListUserRolesRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("roles"); - QueryStringMapper.addQueryParameter( - httpUrl, "per_page", request.getPerPage().orElse(50), false); - QueryStringMapper.addQueryParameter(httpUrl, "page", request.getPage().orElse(0), false); - QueryStringMapper.addQueryParameter( - httpUrl, "include_totals", request.getIncludeTotals().orElse(true), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListUserRolesOffsetPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserRolesOffsetPaginatedResponseContent.class); - int newPageNumber = - request.getPage().map((Integer page) -> page + 1).orElse(1); - ListUserRolesRequestParameters nextRequest = ListUserRolesRequestParameters.builder() - .from(request) - .page(newPageNumber) - .build(); - List result = parsedResponse.getRoles().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - true, result, parsedResponse, () -> list(id, nextRequest, requestOptions) - .body()), - response); - } - try { - switch (response.code()) { - case 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Assign one or more existing user roles to a user. For more information, review <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles cannot be created through this action. Additionally, this action is used to assign roles to a user in the context of your whole tenant. To assign roles in the context of a specific Organization, use the following endpoint: <a href="https://auth0.com/docs/api/management/v2/organizations/post-organization-member-roles">Assign user roles to an Organization member</a>.

- */ - public ManagementApiHttpResponse assign(String id, AssignUserRolesRequestContent request) { - return assign(id, request, null); - } - - /** - * Assign one or more existing user roles to a user. For more information, review <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles cannot be created through this action. Additionally, this action is used to assign roles to a user in the context of your whole tenant. To assign roles in the context of a specific Organization, use the following endpoint: <a href="https://auth0.com/docs/api/management/v2/organizations/post-organization-member-roles">Assign user roles to an Organization member</a>.

- */ - public ManagementApiHttpResponse assign( - String id, AssignUserRolesRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("roles") - .build(); - 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) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Remove one or more specified user roles assigned to a user. - *

<b>Note</b>: This action removes a role from a user in the context of your whole tenant. If you want to unassign a role from a user in the context of a specific Organization, use the following endpoint: <a href="https://auth0.com/docs/api/management/v2/organizations/delete-organization-member-roles">Delete user roles from an Organization member</a>.

- */ - public ManagementApiHttpResponse delete(String id, DeleteUserRolesRequestContent request) { - return delete(id, request, null); - } - - /** - * Remove one or more specified user roles assigned to a user. - *

<b>Note</b>: This action removes a role from a user in the context of your whole tenant. If you want to unassign a role from a user in the context of a specific Organization, use the following endpoint: <a href="https://auth0.com/docs/api/management/v2/organizations/delete-organization-member-roles">Delete user roles from an Organization member</a>.

- */ - public ManagementApiHttpResponse delete( - String id, DeleteUserRolesRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(id) - .addPathSegments("roles") - .build(); - 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) - .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); - } - 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 401: - throw new UnauthorizedError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 403: - throw new ForbiddenError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - case 429: - throw new TooManyRequestsError( - ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), response); - } - } catch (JsonProcessingException ignored) { - // unable to map error response, throwing generic error - } - Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); - throw new ManagementApiException( - "Error with status code " + response.code(), response.code(), errorBody, response); - } catch (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/RawSessionsClient.java b/src/main/java/com/auth0/client/mgmt/users/RawSessionsClient.java deleted file mode 100644 index 020392ab1..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RawSessionsClient.java +++ /dev/null @@ -1,188 +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.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.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.types.ListUserSessionsPaginatedResponseContent; -import com.auth0.client.mgmt.types.SessionResponseContent; -import com.auth0.client.mgmt.users.types.ListUserSessionsRequestParameters; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import okhttp3.Headers; -import okhttp3.HttpUrl; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -public class RawSessionsClient { - protected final ClientOptions clientOptions; - - public RawSessionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * Retrieve details for a user's sessions. - */ - public ManagementApiHttpResponse> list(String userId) { - return list(userId, ListUserSessionsRequestParameters.builder().build()); - } - - /** - * Retrieve details for a user's sessions. - */ - public ManagementApiHttpResponse> list( - String userId, ListUserSessionsRequestParameters request) { - return list(userId, request, null); - } - - /** - * Retrieve details for a user's sessions. - */ - public ManagementApiHttpResponse> list( - String userId, ListUserSessionsRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(userId) - .addPathSegments("sessions"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListUserSessionsPaginatedResponseContent parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListUserSessionsPaginatedResponseContent.class); - Optional startingAfter = parsedResponse.getNext(); - ListUserSessionsRequestParameters nextRequest = ListUserSessionsRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getSessions().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, parsedResponse, () -> list( - userId, nextRequest, requestOptions) - .body()), - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete all sessions for a user. - */ - public ManagementApiHttpResponse delete(String userId) { - return delete(userId, null); - } - - /** - * Delete all sessions for a user. - */ - public ManagementApiHttpResponse delete(String userId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("users") - .addPathSegment(userId) - .addPathSegments("sessions") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/RefreshTokenClient.java b/src/main/java/com/auth0/client/mgmt/users/RefreshTokenClient.java deleted file mode 100644 index d9032df25..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RefreshTokenClient.java +++ /dev/null @@ -1,65 +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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.RefreshTokenResponseContent; -import com.auth0.client.mgmt.users.types.ListRefreshTokensRequestParameters; - -public class RefreshTokenClient { - protected final ClientOptions clientOptions; - - private final RawRefreshTokenClient rawClient; - - public RefreshTokenClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawRefreshTokenClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawRefreshTokenClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details for a user's refresh tokens. - */ - public SyncPagingIterable list(String userId) { - return this.rawClient.list(userId).body(); - } - - /** - * Retrieve details for a user's refresh tokens. - */ - public SyncPagingIterable list( - String userId, ListRefreshTokensRequestParameters request) { - return this.rawClient.list(userId, request).body(); - } - - /** - * Retrieve details for a user's refresh tokens. - */ - public SyncPagingIterable list( - String userId, ListRefreshTokensRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(userId, request, requestOptions).body(); - } - - /** - * Delete all refresh tokens for a user. - */ - public void delete(String userId) { - this.rawClient.delete(userId).body(); - } - - /** - * Delete all refresh tokens for a user. - */ - public void delete(String userId, RequestOptions requestOptions) { - this.rawClient.delete(userId, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/RiskAssessmentsClient.java b/src/main/java/com/auth0/client/mgmt/users/RiskAssessmentsClient.java deleted file mode 100644 index b23ce0f77..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RiskAssessmentsClient.java +++ /dev/null @@ -1,40 +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.users.types.ClearAssessorsRequestContent; - -public class RiskAssessmentsClient { - protected final ClientOptions clientOptions; - - private final RawRiskAssessmentsClient rawClient; - - public RiskAssessmentsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawRiskAssessmentsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawRiskAssessmentsClient withRawResponse() { - return this.rawClient; - } - - /** - * Clear risk assessment assessors for a specific user - */ - public void clear(String id, ClearAssessorsRequestContent request) { - this.rawClient.clear(id, request).body(); - } - - /** - * Clear risk assessment assessors for a specific user - */ - public void clear(String id, ClearAssessorsRequestContent request, RequestOptions requestOptions) { - this.rawClient.clear(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/RolesClient.java b/src/main/java/com/auth0/client/mgmt/users/RolesClient.java deleted file mode 100644 index 3be2b7c43..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/RolesClient.java +++ /dev/null @@ -1,87 +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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.Role; -import com.auth0.client.mgmt.users.types.AssignUserRolesRequestContent; -import com.auth0.client.mgmt.users.types.DeleteUserRolesRequestContent; -import com.auth0.client.mgmt.users.types.ListUserRolesRequestParameters; - -public class RolesClient { - protected final ClientOptions clientOptions; - - private final RawRolesClient rawClient; - - public RolesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawRolesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawRolesClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve detailed list of all user roles currently assigned to a user. - *

<b>Note</b>: 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: <a href="https://auth0.com/docs/api/management/v2/organizations/get-organization-member-roles">Get user roles assigned to an Organization member</a>.

- */ - public SyncPagingIterable list(String id) { - return this.rawClient.list(id).body(); - } - - /** - * Retrieve detailed list of all user roles currently assigned to a user. - *

<b>Note</b>: 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: <a href="https://auth0.com/docs/api/management/v2/organizations/get-organization-member-roles">Get user roles assigned to an Organization member</a>.

- */ - public SyncPagingIterable list(String id, ListUserRolesRequestParameters request) { - return this.rawClient.list(id, request).body(); - } - - /** - * Retrieve detailed list of all user roles currently assigned to a user. - *

<b>Note</b>: 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: <a href="https://auth0.com/docs/api/management/v2/organizations/get-organization-member-roles">Get user roles assigned to an Organization member</a>.

- */ - public SyncPagingIterable list( - String id, ListUserRolesRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(id, request, requestOptions).body(); - } - - /** - * Assign one or more existing user roles to a user. For more information, review <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles cannot be created through this action. Additionally, this action is used to assign roles to a user in the context of your whole tenant. To assign roles in the context of a specific Organization, use the following endpoint: <a href="https://auth0.com/docs/api/management/v2/organizations/post-organization-member-roles">Assign user roles to an Organization member</a>.

- */ - public void assign(String id, AssignUserRolesRequestContent request) { - this.rawClient.assign(id, request).body(); - } - - /** - * Assign one or more existing user roles to a user. For more information, review <a href="https://auth0.com/docs/manage-users/access-control/rbac">Role-Based Access Control</a>. - *

<b>Note</b>: New roles cannot be created through this action. Additionally, this action is used to assign roles to a user in the context of your whole tenant. To assign roles in the context of a specific Organization, use the following endpoint: <a href="https://auth0.com/docs/api/management/v2/organizations/post-organization-member-roles">Assign user roles to an Organization member</a>.

- */ - public void assign(String id, AssignUserRolesRequestContent request, RequestOptions requestOptions) { - this.rawClient.assign(id, request, requestOptions).body(); - } - - /** - * Remove one or more specified user roles assigned to a user. - *

<b>Note</b>: This action removes a role from a user in the context of your whole tenant. If you want to unassign a role from a user in the context of a specific Organization, use the following endpoint: <a href="https://auth0.com/docs/api/management/v2/organizations/delete-organization-member-roles">Delete user roles from an Organization member</a>.

- */ - public void delete(String id, DeleteUserRolesRequestContent request) { - this.rawClient.delete(id, request).body(); - } - - /** - * Remove one or more specified user roles assigned to a user. - *

<b>Note</b>: This action removes a role from a user in the context of your whole tenant. If you want to unassign a role from a user in the context of a specific Organization, use the following endpoint: <a href="https://auth0.com/docs/api/management/v2/organizations/delete-organization-member-roles">Delete user roles from an Organization member</a>.

- */ - public void delete(String id, DeleteUserRolesRequestContent request, RequestOptions requestOptions) { - this.rawClient.delete(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/SessionsClient.java b/src/main/java/com/auth0/client/mgmt/users/SessionsClient.java deleted file mode 100644 index 56304204a..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/SessionsClient.java +++ /dev/null @@ -1,64 +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.core.SyncPagingIterable; -import com.auth0.client.mgmt.types.SessionResponseContent; -import com.auth0.client.mgmt.users.types.ListUserSessionsRequestParameters; - -public class SessionsClient { - protected final ClientOptions clientOptions; - - private final RawSessionsClient rawClient; - - public SessionsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawSessionsClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawSessionsClient withRawResponse() { - return this.rawClient; - } - - /** - * Retrieve details for a user's sessions. - */ - public SyncPagingIterable list(String userId) { - return this.rawClient.list(userId).body(); - } - - /** - * Retrieve details for a user's sessions. - */ - public SyncPagingIterable list(String userId, ListUserSessionsRequestParameters request) { - return this.rawClient.list(userId, request).body(); - } - - /** - * Retrieve details for a user's sessions. - */ - public SyncPagingIterable list( - String userId, ListUserSessionsRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(userId, request, requestOptions).body(); - } - - /** - * Delete all sessions for a user. - */ - public void delete(String userId) { - this.rawClient.delete(userId).body(); - } - - /** - * Delete all sessions for a user. - */ - public void delete(String userId, RequestOptions requestOptions) { - this.rawClient.delete(userId, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/types/AssignUserRolesRequestContent.java b/src/main/java/com/auth0/client/mgmt/users/types/AssignUserRolesRequestContent.java deleted file mode 100644 index b423d70e4..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/AssignUserRolesRequestContent.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.users.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = AssignUserRolesRequestContent.Builder.class) -public final class AssignUserRolesRequestContent { - private final List roles; - - private final Map additionalProperties; - - private AssignUserRolesRequestContent(List roles, Map additionalProperties) { - this.roles = roles; - this.additionalProperties = additionalProperties; - } - - /** - * @return List of roles IDs to associated with the user. - */ - @JsonProperty("roles") - public List getRoles() { - return roles; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof AssignUserRolesRequestContent && equalTo((AssignUserRolesRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(AssignUserRolesRequestContent other) { - return roles.equals(other.roles); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.roles); - } - - @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 roles = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(AssignUserRolesRequestContent other) { - roles(other.getRoles()); - return this; - } - - /** - *

List of roles IDs to associated with the user.

- */ - @JsonSetter(value = "roles", nulls = Nulls.SKIP) - public Builder roles(List roles) { - this.roles.clear(); - if (roles != null) { - this.roles.addAll(roles); - } - return this; - } - - public Builder addRoles(String roles) { - this.roles.add(roles); - return this; - } - - public Builder addAllRoles(List roles) { - if (roles != null) { - this.roles.addAll(roles); - } - return this; - } - - public AssignUserRolesRequestContent build() { - return new AssignUserRolesRequestContent(roles, additionalProperties); - } - } -} 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 deleted file mode 100644 index a36a0ce02..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/ClearAssessorsRequestContent.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.users.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.AssessorsTypeEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = ClearAssessorsRequestContent.Builder.class) -public final class ClearAssessorsRequestContent { - private final String connection; - - private final List assessors; - - private final Map additionalProperties; - - private ClearAssessorsRequestContent( - String connection, List assessors, Map additionalProperties) { - this.connection = connection; - this.assessors = assessors; - this.additionalProperties = additionalProperties; - } - - /** - * @return The name of the connection containing the user whose assessors should be cleared. - */ - @JsonProperty("connection") - public String getConnection() { - return connection; - } - - /** - * @return List of assessors to clear. - */ - @JsonProperty("assessors") - public List getAssessors() { - return assessors; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ClearAssessorsRequestContent && equalTo((ClearAssessorsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ClearAssessorsRequestContent other) { - return connection.equals(other.connection) && assessors.equals(other.assessors); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.connection, this.assessors); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static ConnectionStage builder() { - return new Builder(); - } - - public interface ConnectionStage { - /** - *

The name of the connection containing the user whose assessors should be cleared.

- */ - _FinalStage connection(@NotNull String connection); - - Builder from(ClearAssessorsRequestContent other); - } - - public interface _FinalStage { - ClearAssessorsRequestContent build(); - - /** - *

List of assessors to clear.

- */ - _FinalStage assessors(List assessors); - - _FinalStage addAssessors(AssessorsTypeEnum assessors); - - _FinalStage addAllAssessors(List assessors); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements ConnectionStage, _FinalStage { - private String connection; - - private List assessors = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(ClearAssessorsRequestContent other) { - connection(other.getConnection()); - assessors(other.getAssessors()); - return this; - } - - /** - *

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. - */ - @java.lang.Override - @JsonSetter("connection") - public _FinalStage connection(@NotNull String connection) { - this.connection = Objects.requireNonNull(connection, "connection must not be null"); - return this; - } - - /** - *

List of assessors to clear.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addAllAssessors(List assessors) { - if (assessors != null) { - this.assessors.addAll(assessors); - } - return this; - } - - /** - *

List of assessors to clear.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage addAssessors(AssessorsTypeEnum assessors) { - this.assessors.add(assessors); - return this; - } - - /** - *

List of assessors to clear.

- */ - @java.lang.Override - @JsonSetter(value = "assessors", nulls = Nulls.SKIP) - public _FinalStage assessors(List assessors) { - this.assessors.clear(); - if (assessors != null) { - this.assessors.addAll(assessors); - } - return this; - } - - @java.lang.Override - public ClearAssessorsRequestContent build() { - return new ClearAssessorsRequestContent(connection, assessors, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/types/CreateUserAuthenticationMethodRequestContent.java b/src/main/java/com/auth0/client/mgmt/users/types/CreateUserAuthenticationMethodRequestContent.java deleted file mode 100644 index 52a0d0ed5..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/CreateUserAuthenticationMethodRequestContent.java +++ /dev/null @@ -1,462 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.users.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.CreatedUserAuthenticationMethodTypeEnum; -import com.auth0.client.mgmt.types.PreferredAuthenticationMethodEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateUserAuthenticationMethodRequestContent.Builder.class) -public final class CreateUserAuthenticationMethodRequestContent { - private final CreatedUserAuthenticationMethodTypeEnum type; - - private final Optional name; - - private final Optional totpSecret; - - private final Optional phoneNumber; - - private final Optional email; - - private final Optional preferredAuthenticationMethod; - - private final Optional keyId; - - private final Optional publicKey; - - private final Optional relyingPartyIdentifier; - - private final Map additionalProperties; - - private CreateUserAuthenticationMethodRequestContent( - CreatedUserAuthenticationMethodTypeEnum type, - Optional name, - Optional totpSecret, - Optional phoneNumber, - Optional email, - Optional preferredAuthenticationMethod, - Optional keyId, - Optional publicKey, - Optional relyingPartyIdentifier, - Map additionalProperties) { - this.type = type; - this.name = name; - this.totpSecret = totpSecret; - this.phoneNumber = phoneNumber; - this.email = email; - this.preferredAuthenticationMethod = preferredAuthenticationMethod; - this.keyId = keyId; - this.publicKey = publicKey; - this.relyingPartyIdentifier = relyingPartyIdentifier; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("type") - public CreatedUserAuthenticationMethodTypeEnum getType() { - return type; - } - - /** - * @return A human-readable label to identify the authentication method. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - /** - * @return Base32 encoded secret for TOTP generation. - */ - @JsonProperty("totp_secret") - public Optional getTotpSecret() { - return totpSecret; - } - - /** - * @return Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice. - */ - @JsonProperty("phone_number") - public Optional getPhoneNumber() { - return phoneNumber; - } - - /** - * @return Applies to email authentication methods only. The email address used to send verification messages. - */ - @JsonProperty("email") - public Optional getEmail() { - return email; - } - - @JsonProperty("preferred_authentication_method") - public Optional getPreferredAuthenticationMethod() { - return preferredAuthenticationMethod; - } - - /** - * @return Applies to webauthn authentication methods only. The id of the credential. - */ - @JsonProperty("key_id") - public Optional getKeyId() { - return keyId; - } - - /** - * @return Applies to webauthn authentication methods only. The public key, which is encoded as base64. - */ - @JsonProperty("public_key") - public Optional getPublicKey() { - return publicKey; - } - - /** - * @return Applies to webauthn authentication methods only. The relying party identifier. - */ - @JsonProperty("relying_party_identifier") - public Optional getRelyingPartyIdentifier() { - return relyingPartyIdentifier; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateUserAuthenticationMethodRequestContent - && equalTo((CreateUserAuthenticationMethodRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateUserAuthenticationMethodRequestContent other) { - return type.equals(other.type) - && name.equals(other.name) - && totpSecret.equals(other.totpSecret) - && phoneNumber.equals(other.phoneNumber) - && email.equals(other.email) - && preferredAuthenticationMethod.equals(other.preferredAuthenticationMethod) - && keyId.equals(other.keyId) - && publicKey.equals(other.publicKey) - && relyingPartyIdentifier.equals(other.relyingPartyIdentifier); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.type, - this.name, - this.totpSecret, - this.phoneNumber, - this.email, - this.preferredAuthenticationMethod, - this.keyId, - this.publicKey, - this.relyingPartyIdentifier); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static TypeStage builder() { - return new Builder(); - } - - public interface TypeStage { - _FinalStage type(@NotNull CreatedUserAuthenticationMethodTypeEnum type); - - Builder from(CreateUserAuthenticationMethodRequestContent other); - } - - public interface _FinalStage { - CreateUserAuthenticationMethodRequestContent build(); - - /** - *

A human-readable label to identify the authentication method.

- */ - _FinalStage name(Optional name); - - _FinalStage name(String name); - - /** - *

Base32 encoded secret for TOTP generation.

- */ - _FinalStage totpSecret(Optional totpSecret); - - _FinalStage totpSecret(String totpSecret); - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- */ - _FinalStage phoneNumber(Optional phoneNumber); - - _FinalStage phoneNumber(String phoneNumber); - - /** - *

Applies to email authentication methods only. The email address used to send verification messages.

- */ - _FinalStage email(Optional email); - - _FinalStage email(String email); - - _FinalStage preferredAuthenticationMethod( - Optional preferredAuthenticationMethod); - - _FinalStage preferredAuthenticationMethod(PreferredAuthenticationMethodEnum preferredAuthenticationMethod); - - /** - *

Applies to webauthn authentication methods only. The id of the credential.

- */ - _FinalStage keyId(Optional keyId); - - _FinalStage keyId(String keyId); - - /** - *

Applies to webauthn authentication methods only. The public key, which is encoded as base64.

- */ - _FinalStage publicKey(Optional publicKey); - - _FinalStage publicKey(String publicKey); - - /** - *

Applies to webauthn authentication methods only. The relying party identifier.

- */ - _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier); - - _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder implements TypeStage, _FinalStage { - private CreatedUserAuthenticationMethodTypeEnum type; - - private Optional relyingPartyIdentifier = Optional.empty(); - - private Optional publicKey = Optional.empty(); - - private Optional keyId = Optional.empty(); - - private Optional preferredAuthenticationMethod = Optional.empty(); - - private Optional email = Optional.empty(); - - private Optional phoneNumber = Optional.empty(); - - private Optional totpSecret = Optional.empty(); - - private Optional name = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateUserAuthenticationMethodRequestContent other) { - type(other.getType()); - name(other.getName()); - totpSecret(other.getTotpSecret()); - phoneNumber(other.getPhoneNumber()); - email(other.getEmail()); - preferredAuthenticationMethod(other.getPreferredAuthenticationMethod()); - keyId(other.getKeyId()); - publicKey(other.getPublicKey()); - relyingPartyIdentifier(other.getRelyingPartyIdentifier()); - return this; - } - - @java.lang.Override - @JsonSetter("type") - public _FinalStage type(@NotNull CreatedUserAuthenticationMethodTypeEnum type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - /** - *

Applies to webauthn authentication methods only. The relying party identifier.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage relyingPartyIdentifier(String relyingPartyIdentifier) { - this.relyingPartyIdentifier = Optional.ofNullable(relyingPartyIdentifier); - return this; - } - - /** - *

Applies to webauthn authentication methods only. The relying party identifier.

- */ - @java.lang.Override - @JsonSetter(value = "relying_party_identifier", nulls = Nulls.SKIP) - public _FinalStage relyingPartyIdentifier(Optional relyingPartyIdentifier) { - this.relyingPartyIdentifier = relyingPartyIdentifier; - return this; - } - - /** - *

Applies to webauthn authentication methods only. The public key, which is encoded as base64.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage publicKey(String publicKey) { - this.publicKey = Optional.ofNullable(publicKey); - return this; - } - - /** - *

Applies to webauthn authentication methods only. The public key, which is encoded as base64.

- */ - @java.lang.Override - @JsonSetter(value = "public_key", nulls = Nulls.SKIP) - public _FinalStage publicKey(Optional publicKey) { - this.publicKey = publicKey; - return this; - } - - /** - *

Applies to webauthn authentication methods only. The id of the credential.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage keyId(String keyId) { - this.keyId = Optional.ofNullable(keyId); - return this; - } - - /** - *

Applies to webauthn authentication methods only. The id of the credential.

- */ - @java.lang.Override - @JsonSetter(value = "key_id", nulls = Nulls.SKIP) - public _FinalStage keyId(Optional keyId) { - this.keyId = keyId; - return this; - } - - @java.lang.Override - public _FinalStage preferredAuthenticationMethod( - PreferredAuthenticationMethodEnum preferredAuthenticationMethod) { - this.preferredAuthenticationMethod = Optional.ofNullable(preferredAuthenticationMethod); - return this; - } - - @java.lang.Override - @JsonSetter(value = "preferred_authentication_method", nulls = Nulls.SKIP) - public _FinalStage preferredAuthenticationMethod( - Optional preferredAuthenticationMethod) { - this.preferredAuthenticationMethod = preferredAuthenticationMethod; - return this; - } - - /** - *

Applies to email authentication methods only. The email address used to send verification messages.

- * @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; - } - - /** - *

Applies to email authentication methods only. The email address used to send verification messages.

- */ - @java.lang.Override - @JsonSetter(value = "email", nulls = Nulls.SKIP) - public _FinalStage email(Optional email) { - this.email = email; - return this; - } - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- * @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; - } - - /** - *

Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.

- */ - @java.lang.Override - @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) - public _FinalStage phoneNumber(Optional phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - *

Base32 encoded secret for TOTP generation.

- * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage totpSecret(String totpSecret) { - this.totpSecret = Optional.ofNullable(totpSecret); - return this; - } - - /** - *

Base32 encoded secret for TOTP generation.

- */ - @java.lang.Override - @JsonSetter(value = "totp_secret", nulls = Nulls.SKIP) - public _FinalStage totpSecret(Optional totpSecret) { - this.totpSecret = totpSecret; - return this; - } - - /** - *

A human-readable label to identify the authentication method.

- * @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; - } - - /** - *

A human-readable label to identify the authentication method.

- */ - @java.lang.Override - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public _FinalStage name(Optional name) { - this.name = name; - return this; - } - - @java.lang.Override - public CreateUserAuthenticationMethodRequestContent build() { - return new CreateUserAuthenticationMethodRequestContent( - type, - name, - totpSecret, - phoneNumber, - email, - preferredAuthenticationMethod, - keyId, - publicKey, - relyingPartyIdentifier, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/types/CreateUserPermissionsRequestContent.java b/src/main/java/com/auth0/client/mgmt/users/types/CreateUserPermissionsRequestContent.java deleted file mode 100644 index a422a33db..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/CreateUserPermissionsRequestContent.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.users.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.PermissionRequestPayload; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = CreateUserPermissionsRequestContent.Builder.class) -public final class CreateUserPermissionsRequestContent { - private final List permissions; - - private final Map additionalProperties; - - private CreateUserPermissionsRequestContent( - List permissions, Map additionalProperties) { - this.permissions = permissions; - this.additionalProperties = additionalProperties; - } - - /** - * @return List of permissions to add to this user. - */ - @JsonProperty("permissions") - public List getPermissions() { - return permissions; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateUserPermissionsRequestContent - && equalTo((CreateUserPermissionsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateUserPermissionsRequestContent other) { - return permissions.equals(other.permissions); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.permissions); - } - - @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 permissions = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(CreateUserPermissionsRequestContent other) { - permissions(other.getPermissions()); - return this; - } - - /** - *

List of permissions to add to this user.

- */ - @JsonSetter(value = "permissions", nulls = Nulls.SKIP) - public Builder permissions(List permissions) { - this.permissions.clear(); - if (permissions != null) { - this.permissions.addAll(permissions); - } - return this; - } - - public Builder addPermissions(PermissionRequestPayload permissions) { - this.permissions.add(permissions); - return this; - } - - public Builder addAllPermissions(List permissions) { - if (permissions != null) { - this.permissions.addAll(permissions); - } - return this; - } - - public CreateUserPermissionsRequestContent build() { - return new CreateUserPermissionsRequestContent(permissions, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/types/DeleteUserPermissionsRequestContent.java b/src/main/java/com/auth0/client/mgmt/users/types/DeleteUserPermissionsRequestContent.java deleted file mode 100644 index 2bffd3434..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/DeleteUserPermissionsRequestContent.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.users.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.PermissionRequestPayload; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = DeleteUserPermissionsRequestContent.Builder.class) -public final class DeleteUserPermissionsRequestContent { - private final List permissions; - - private final Map additionalProperties; - - private DeleteUserPermissionsRequestContent( - List permissions, Map additionalProperties) { - this.permissions = permissions; - this.additionalProperties = additionalProperties; - } - - /** - * @return List of permissions to remove from this user. - */ - @JsonProperty("permissions") - public List getPermissions() { - return permissions; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DeleteUserPermissionsRequestContent - && equalTo((DeleteUserPermissionsRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DeleteUserPermissionsRequestContent other) { - return permissions.equals(other.permissions); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.permissions); - } - - @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 permissions = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(DeleteUserPermissionsRequestContent other) { - permissions(other.getPermissions()); - return this; - } - - /** - *

List of permissions to remove from this user.

- */ - @JsonSetter(value = "permissions", nulls = Nulls.SKIP) - public Builder permissions(List permissions) { - this.permissions.clear(); - if (permissions != null) { - this.permissions.addAll(permissions); - } - return this; - } - - public Builder addPermissions(PermissionRequestPayload permissions) { - this.permissions.add(permissions); - return this; - } - - public Builder addAllPermissions(List permissions) { - if (permissions != null) { - this.permissions.addAll(permissions); - } - return this; - } - - public DeleteUserPermissionsRequestContent build() { - return new DeleteUserPermissionsRequestContent(permissions, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/types/DeleteUserRolesRequestContent.java b/src/main/java/com/auth0/client/mgmt/users/types/DeleteUserRolesRequestContent.java deleted file mode 100644 index 09a108eae..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/DeleteUserRolesRequestContent.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.users.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.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 = DeleteUserRolesRequestContent.Builder.class) -public final class DeleteUserRolesRequestContent { - private final List roles; - - private final Map additionalProperties; - - private DeleteUserRolesRequestContent(List roles, Map additionalProperties) { - this.roles = roles; - this.additionalProperties = additionalProperties; - } - - /** - * @return List of roles IDs to remove from the user. - */ - @JsonProperty("roles") - public List getRoles() { - return roles; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof DeleteUserRolesRequestContent && equalTo((DeleteUserRolesRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(DeleteUserRolesRequestContent other) { - return roles.equals(other.roles); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.roles); - } - - @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 roles = new ArrayList<>(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(DeleteUserRolesRequestContent other) { - roles(other.getRoles()); - return this; - } - - /** - *

List of roles IDs to remove from the user.

- */ - @JsonSetter(value = "roles", nulls = Nulls.SKIP) - public Builder roles(List roles) { - this.roles.clear(); - if (roles != null) { - this.roles.addAll(roles); - } - return this; - } - - public Builder addRoles(String roles) { - this.roles.add(roles); - return this; - } - - public Builder addAllRoles(List roles) { - if (roles != null) { - this.roles.addAll(roles); - } - return this; - } - - public DeleteUserRolesRequestContent build() { - return new DeleteUserRolesRequestContent(roles, additionalProperties); - } - } -} 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 deleted file mode 100644 index e57ece646..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/GetUserConnectedAccountsRequestParameters.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetUserConnectedAccountsRequestParameters.Builder.class) -public final class GetUserConnectedAccountsRequestParameters { - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private GetUserConnectedAccountsRequestParameters( - 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 to return. Defaults to 10 with a maximum of 20 - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("take") - public 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; - return other instanceof GetUserConnectedAccountsRequestParameters - && equalTo((GetUserConnectedAccountsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetUserConnectedAccountsRequestParameters 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(GetUserConnectedAccountsRequestParameters 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 to return. Defaults to 10 with a maximum of 20

- */ - @JsonSetter(value = "take", nulls = Nulls.SKIP) - public Builder take(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 GetUserConnectedAccountsRequestParameters build() { - return new GetUserConnectedAccountsRequestParameters(from, take, additionalProperties); - } - } -} 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 deleted file mode 100644 index 40c527b37..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/GetUserGroupsRequestParameters.java +++ /dev/null @@ -1,307 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = GetUserGroupsRequestParameters.Builder.class) -public final class GetUserGroupsRequestParameters { - private final OptionalNullable fields; - - private final OptionalNullable includeFields; - - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private GetUserGroupsRequestParameters( - OptionalNullable fields, - OptionalNullable includeFields, - OptionalNullable from, - OptionalNullable take, - Map additionalProperties) { - this.fields = fields; - this.includeFields = includeFields; - this.from = from; - this.take = take; - this.additionalProperties = additionalProperties; - } - - /** - * @return A comma separated list of fields to include or exclude (depending on include_fields) from the result, 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). - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("include_fields") - public OptionalNullable getIncludeFields() { - if (includeFields == null) { - return OptionalNullable.absent(); - } - return includeFields; - } - - /** - * @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() { - 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; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof GetUserGroupsRequestParameters && equalTo((GetUserGroupsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(GetUserGroupsRequestParameters other) { - return fields.equals(other.fields) - && includeFields.equals(other.includeFields) - && 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); - } - - @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 fields = OptionalNullable.absent(); - - private OptionalNullable includeFields = OptionalNullable.absent(); - - private OptionalNullable from = OptionalNullable.absent(); - - private OptionalNullable take = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(GetUserGroupsRequestParameters other) { - fields(other.getFields()); - includeFields(other.getIncludeFields()); - from(other.getFrom()); - take(other.getTake()); - return this; - } - - /** - *

A comma separated list of fields to include or exclude (depending on include_fields) from the result, 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).

- */ - @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; - } - - /** - *

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(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 GetUserGroupsRequestParameters build() { - return new GetUserGroupsRequestParameters(fields, includeFields, from, take, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/types/LinkUserIdentityRequestContent.java b/src/main/java/com/auth0/client/mgmt/users/types/LinkUserIdentityRequestContent.java deleted file mode 100644 index 0bbdb78b4..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/LinkUserIdentityRequestContent.java +++ /dev/null @@ -1,183 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.users.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.UserId; -import com.auth0.client.mgmt.types.UserIdentityProviderEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = LinkUserIdentityRequestContent.Builder.class) -public final class LinkUserIdentityRequestContent { - private final Optional provider; - - private final Optional connectionId; - - private final Optional userId; - - private final Optional linkWith; - - private final Map additionalProperties; - - private LinkUserIdentityRequestContent( - Optional provider, - Optional connectionId, - Optional userId, - Optional linkWith, - Map additionalProperties) { - this.provider = provider; - this.connectionId = connectionId; - this.userId = userId; - this.linkWith = linkWith; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("provider") - public Optional getProvider() { - return provider; - } - - /** - * @return connection_id of the secondary user account being linked when more than one auth0 database provider exists. - */ - @JsonProperty("connection_id") - public Optional getConnectionId() { - return connectionId; - } - - @JsonProperty("user_id") - public Optional getUserId() { - return userId; - } - - /** - * @return JWT for the secondary account being linked. If sending this parameter, provider, user_id, and connection_id must not be sent. - */ - @JsonProperty("link_with") - public Optional getLinkWith() { - return linkWith; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof LinkUserIdentityRequestContent && equalTo((LinkUserIdentityRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(LinkUserIdentityRequestContent other) { - return provider.equals(other.provider) - && connectionId.equals(other.connectionId) - && userId.equals(other.userId) - && linkWith.equals(other.linkWith); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.provider, this.connectionId, this.userId, this.linkWith); - } - - @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 provider = Optional.empty(); - - private Optional connectionId = Optional.empty(); - - private Optional userId = Optional.empty(); - - private Optional linkWith = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(LinkUserIdentityRequestContent other) { - provider(other.getProvider()); - connectionId(other.getConnectionId()); - userId(other.getUserId()); - linkWith(other.getLinkWith()); - return this; - } - - @JsonSetter(value = "provider", nulls = Nulls.SKIP) - public Builder provider(Optional provider) { - this.provider = provider; - return this; - } - - public Builder provider(UserIdentityProviderEnum provider) { - this.provider = Optional.ofNullable(provider); - return this; - } - - /** - *

connection_id of the secondary user account being linked when more than one auth0 database provider exists.

- */ - @JsonSetter(value = "connection_id", nulls = Nulls.SKIP) - public Builder connectionId(Optional connectionId) { - this.connectionId = connectionId; - return this; - } - - public Builder connectionId(String connectionId) { - this.connectionId = Optional.ofNullable(connectionId); - return this; - } - - @JsonSetter(value = "user_id", nulls = Nulls.SKIP) - public Builder userId(Optional userId) { - this.userId = userId; - return this; - } - - public Builder userId(UserId userId) { - this.userId = Optional.ofNullable(userId); - return this; - } - - /** - *

JWT for the secondary account being linked. If sending this parameter, provider, user_id, and connection_id must not be sent.

- */ - @JsonSetter(value = "link_with", nulls = Nulls.SKIP) - public Builder linkWith(Optional linkWith) { - this.linkWith = linkWith; - return this; - } - - public Builder linkWith(String linkWith) { - this.linkWith = Optional.ofNullable(linkWith); - return this; - } - - public LinkUserIdentityRequestContent build() { - return new LinkUserIdentityRequestContent(provider, connectionId, userId, linkWith, additionalProperties); - } - } -} 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 deleted file mode 100644 index 1b9177d8b..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListRefreshTokensRequestParameters.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListRefreshTokensRequestParameters.Builder.class) -public final class ListRefreshTokensRequestParameters { - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private ListRefreshTokensRequestParameters( - OptionalNullable from, OptionalNullable take, Map additionalProperties) { - this.from = from; - this.take = take; - this.additionalProperties = additionalProperties; - } - - /** - * @return An optional cursor from which to start the selection (exclusive). - */ - @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() { - 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; - return other instanceof ListRefreshTokensRequestParameters - && equalTo((ListRefreshTokensRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListRefreshTokensRequestParameters 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(ListRefreshTokensRequestParameters other) { - from(other.getFrom()); - take(other.getTake()); - return this; - } - - /** - *

An optional cursor from which to start the selection (exclusive).

- */ - @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(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 ListRefreshTokensRequestParameters build() { - return new ListRefreshTokensRequestParameters(from, take, additionalProperties); - } - } -} 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 deleted file mode 100644 index 00fc7d1da..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserAuthenticationMethodsRequestParameters.java +++ /dev/null @@ -1,229 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.users.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUserAuthenticationMethodsRequestParameters.Builder.class) -public final class ListUserAuthenticationMethodsRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final Map additionalProperties; - - private ListUserAuthenticationMethodsRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. Default is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. Default is 50. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - return includeTotals; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListUserAuthenticationMethodsRequestParameters - && equalTo((ListUserAuthenticationMethodsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserAuthenticationMethodsRequestParameters other) { - return page.equals(other.page) && perPage.equals(other.perPage) && includeTotals.equals(other.includeTotals); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage, this.includeTotals); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserAuthenticationMethodsRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - return this; - } - - /** - *

Page index of the results to return. First page is 0. Default is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page. Default is 50.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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(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; - } - - public ListUserAuthenticationMethodsRequestParameters build() { - return new ListUserAuthenticationMethodsRequestParameters( - page, perPage, includeTotals, additionalProperties); - } - } -} 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 deleted file mode 100644 index fa4a45aef..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserLogsRequestParameters.java +++ /dev/null @@ -1,289 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.users.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUserLogsRequestParameters.Builder.class) -public final class ListUserLogsRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable sort; - - private final OptionalNullable includeTotals; - - private final Map additionalProperties; - - private ListUserLogsRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable sort, - OptionalNullable includeTotals, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.sort = sort; - this.includeTotals = includeTotals; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. Paging is disabled if parameter not sent. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @return Field to sort by. Use fieldname:1 for ascending order and fieldname:-1 for descending. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("sort") - public OptionalNullable getSort() { - if (sort == null) { - return OptionalNullable.absent(); - } - return sort; - } - - /** - * @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() { - return includeTotals; - } - - @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 ListUserLogsRequestParameters && equalTo((ListUserLogsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserLogsRequestParameters other) { - return page.equals(other.page) - && perPage.equals(other.perPage) - && sort.equals(other.sort) - && includeTotals.equals(other.includeTotals); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage, this.sort, this.includeTotals); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable sort = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserLogsRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - sort(other.getSort()); - includeTotals(other.getIncludeTotals()); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page. Paging is disabled if parameter not sent.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - return this; - } - - /** - *

Field to sort by. Use fieldname:1 for ascending order and fieldname:-1 for descending.

- */ - @JsonSetter(value = "sort", nulls = Nulls.SKIP) - public Builder sort(@org.jetbrains.annotations.Nullable OptionalNullable sort) { - this.sort = sort; - return this; - } - - public Builder sort(String 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(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; - } - - /** - *

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(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(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; - } - - public ListUserLogsRequestParameters build() { - return new ListUserLogsRequestParameters(page, perPage, sort, includeTotals, additionalProperties); - } - } -} 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 deleted file mode 100644 index 31ad9a385..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserOrganizationsRequestParameters.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.users.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUserOrganizationsRequestParameters.Builder.class) -public final class ListUserOrganizationsRequestParameters { - private final OptionalNullable page; - - private final OptionalNullable perPage; - - private final OptionalNullable includeTotals; - - private final Map additionalProperties; - - private ListUserOrganizationsRequestParameters( - OptionalNullable page, - OptionalNullable perPage, - OptionalNullable includeTotals, - Map additionalProperties) { - this.page = page; - this.perPage = perPage; - this.includeTotals = includeTotals; - this.additionalProperties = additionalProperties; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @return Number of results per page. Defaults to 50. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @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() { - return includeTotals; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListUserOrganizationsRequestParameters - && equalTo((ListUserOrganizationsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserOrganizationsRequestParameters other) { - return page.equals(other.page) && perPage.equals(other.perPage) && includeTotals.equals(other.includeTotals); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.page, this.perPage, this.includeTotals); - } - - @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 page = OptionalNullable.absent(); - - private OptionalNullable perPage = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserOrganizationsRequestParameters other) { - page(other.getPage()); - perPage(other.getPerPage()); - includeTotals(other.getIncludeTotals()); - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - return this; - } - - /** - *

Number of results per page. Defaults to 50.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - 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(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(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; - } - - public ListUserOrganizationsRequestParameters build() { - return new ListUserOrganizationsRequestParameters(page, perPage, includeTotals, additionalProperties); - } - } -} 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 deleted file mode 100644 index de68b9be7..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserPermissionsRequestParameters.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.users.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUserPermissionsRequestParameters.Builder.class) -public final class ListUserPermissionsRequestParameters { - private final OptionalNullable perPage; - - private final OptionalNullable page; - - private final OptionalNullable includeTotals; - - private final Map additionalProperties; - - private ListUserPermissionsRequestParameters( - OptionalNullable perPage, - OptionalNullable page, - OptionalNullable includeTotals, - Map additionalProperties) { - this.perPage = perPage; - this.page = page; - this.includeTotals = includeTotals; - this.additionalProperties = additionalProperties; - } - - /** - * @return Number of results per page. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @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() { - return includeTotals; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListUserPermissionsRequestParameters - && equalTo((ListUserPermissionsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserPermissionsRequestParameters other) { - return perPage.equals(other.perPage) && page.equals(other.page) && includeTotals.equals(other.includeTotals); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.perPage, this.page, this.includeTotals); - } - - @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 perPage = OptionalNullable.absent(); - - private OptionalNullable page = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserPermissionsRequestParameters other) { - perPage(other.getPerPage()); - page(other.getPage()); - includeTotals(other.getIncludeTotals()); - return this; - } - - /** - *

Number of results per page.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - 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(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(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; - } - - public ListUserPermissionsRequestParameters build() { - return new ListUserPermissionsRequestParameters(perPage, page, includeTotals, additionalProperties); - } - } -} 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 deleted file mode 100644 index 4b2114ea6..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserRolesRequestParameters.java +++ /dev/null @@ -1,227 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.users.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; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUserRolesRequestParameters.Builder.class) -public final class ListUserRolesRequestParameters { - private final OptionalNullable perPage; - - private final OptionalNullable page; - - private final OptionalNullable includeTotals; - - private final Map additionalProperties; - - private ListUserRolesRequestParameters( - OptionalNullable perPage, - OptionalNullable page, - OptionalNullable includeTotals, - Map additionalProperties) { - this.perPage = perPage; - this.page = page; - this.includeTotals = includeTotals; - this.additionalProperties = additionalProperties; - } - - /** - * @return Number of results per page. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("per_page") - public OptionalNullable getPerPage() { - return perPage; - } - - /** - * @return Page index of the results to return. First page is 0. - */ - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("page") - public OptionalNullable getPage() { - return page; - } - - /** - * @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() { - return includeTotals; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ListUserRolesRequestParameters && equalTo((ListUserRolesRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserRolesRequestParameters other) { - return perPage.equals(other.perPage) && page.equals(other.page) && includeTotals.equals(other.includeTotals); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.perPage, this.page, this.includeTotals); - } - - @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 perPage = OptionalNullable.absent(); - - private OptionalNullable page = OptionalNullable.absent(); - - private OptionalNullable includeTotals = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ListUserRolesRequestParameters other) { - perPage(other.getPerPage()); - page(other.getPage()); - includeTotals(other.getIncludeTotals()); - return this; - } - - /** - *

Number of results per page.

- */ - @JsonSetter(value = "per_page", nulls = Nulls.SKIP) - public Builder perPage(OptionalNullable perPage) { - this.perPage = perPage; - return this; - } - - public Builder perPage(Integer perPage) { - this.perPage = OptionalNullable.of(perPage); - return this; - } - - public Builder perPage(Optional perPage) { - if (perPage.isPresent()) { - this.perPage = OptionalNullable.of(perPage.get()); - } else { - this.perPage = OptionalNullable.absent(); - } - return this; - } - - public Builder perPage(Nullable perPage) { - if (perPage.isNull()) { - this.perPage = OptionalNullable.ofNull(); - } else if (perPage.isEmpty()) { - this.perPage = OptionalNullable.absent(); - } else { - this.perPage = OptionalNullable.of(perPage.get()); - } - return this; - } - - /** - *

Page index of the results to return. First page is 0.

- */ - @JsonSetter(value = "page", nulls = Nulls.SKIP) - public Builder page(OptionalNullable page) { - this.page = page; - return this; - } - - public Builder page(Integer page) { - this.page = OptionalNullable.of(page); - return this; - } - - public Builder page(Optional page) { - if (page.isPresent()) { - this.page = OptionalNullable.of(page.get()); - } else { - this.page = OptionalNullable.absent(); - } - return this; - } - - public Builder page(Nullable page) { - if (page.isNull()) { - this.page = OptionalNullable.ofNull(); - } else if (page.isEmpty()) { - this.page = OptionalNullable.absent(); - } else { - this.page = OptionalNullable.of(page.get()); - } - 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(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(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; - } - - public ListUserRolesRequestParameters build() { - return new ListUserRolesRequestParameters(perPage, page, includeTotals, additionalProperties); - } - } -} 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 deleted file mode 100644 index 6238eeb0c..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/ListUserSessionsRequestParameters.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -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.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = ListUserSessionsRequestParameters.Builder.class) -public final class ListUserSessionsRequestParameters { - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private ListUserSessionsRequestParameters( - OptionalNullable from, OptionalNullable take, Map additionalProperties) { - this.from = from; - this.take = take; - this.additionalProperties = additionalProperties; - } - - /** - * @return An optional cursor from which to start the selection (exclusive). - */ - @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() { - 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; - return other instanceof ListUserSessionsRequestParameters && equalTo((ListUserSessionsRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListUserSessionsRequestParameters 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(ListUserSessionsRequestParameters other) { - from(other.getFrom()); - take(other.getTake()); - return this; - } - - /** - *

An optional cursor from which to start the selection (exclusive).

- */ - @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(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 ListUserSessionsRequestParameters build() { - return new ListUserSessionsRequestParameters(from, take, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/users/types/UpdateUserAuthenticationMethodRequestContent.java b/src/main/java/com/auth0/client/mgmt/users/types/UpdateUserAuthenticationMethodRequestContent.java deleted file mode 100644 index 981906ce3..000000000 --- a/src/main/java/com/auth0/client/mgmt/users/types/UpdateUserAuthenticationMethodRequestContent.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.users.types; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.PreferredAuthenticationMethodEnum; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateUserAuthenticationMethodRequestContent.Builder.class) -public final class UpdateUserAuthenticationMethodRequestContent { - private final Optional name; - - private final Optional preferredAuthenticationMethod; - - private final Map additionalProperties; - - private UpdateUserAuthenticationMethodRequestContent( - Optional name, - Optional preferredAuthenticationMethod, - Map additionalProperties) { - this.name = name; - this.preferredAuthenticationMethod = preferredAuthenticationMethod; - this.additionalProperties = additionalProperties; - } - - /** - * @return A human-readable label to identify the authentication method. - */ - @JsonProperty("name") - public Optional getName() { - return name; - } - - @JsonProperty("preferred_authentication_method") - public Optional getPreferredAuthenticationMethod() { - return preferredAuthenticationMethod; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateUserAuthenticationMethodRequestContent - && equalTo((UpdateUserAuthenticationMethodRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateUserAuthenticationMethodRequestContent other) { - return name.equals(other.name) && preferredAuthenticationMethod.equals(other.preferredAuthenticationMethod); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.name, this.preferredAuthenticationMethod); - } - - @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 preferredAuthenticationMethod = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateUserAuthenticationMethodRequestContent other) { - name(other.getName()); - preferredAuthenticationMethod(other.getPreferredAuthenticationMethod()); - return this; - } - - /** - *

A human-readable label to identify the authentication method.

- */ - @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 = "preferred_authentication_method", nulls = Nulls.SKIP) - public Builder preferredAuthenticationMethod( - Optional preferredAuthenticationMethod) { - this.preferredAuthenticationMethod = preferredAuthenticationMethod; - return this; - } - - public Builder preferredAuthenticationMethod(PreferredAuthenticationMethodEnum preferredAuthenticationMethod) { - this.preferredAuthenticationMethod = Optional.ofNullable(preferredAuthenticationMethod); - return this; - } - - public UpdateUserAuthenticationMethodRequestContent build() { - return new UpdateUserAuthenticationMethodRequestContent( - name, preferredAuthenticationMethod, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/AsyncVerifiableCredentialsClient.java b/src/main/java/com/auth0/client/mgmt/verifiablecredentials/AsyncVerifiableCredentialsClient.java deleted file mode 100644 index 649282faa..000000000 --- a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/AsyncVerifiableCredentialsClient.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.verifiablecredentials; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import com.auth0.client.mgmt.verifiablecredentials.verification.AsyncVerificationClient; -import java.util.function.Supplier; - -public class AsyncVerifiableCredentialsClient { - protected final ClientOptions clientOptions; - - protected final Supplier verificationClient; - - public AsyncVerifiableCredentialsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.verificationClient = Suppliers.memoize(() -> new AsyncVerificationClient(clientOptions)); - } - - public AsyncVerificationClient verification() { - return this.verificationClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/VerifiableCredentialsClient.java b/src/main/java/com/auth0/client/mgmt/verifiablecredentials/VerifiableCredentialsClient.java deleted file mode 100644 index 52b33aa48..000000000 --- a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/VerifiableCredentialsClient.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.verifiablecredentials; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import com.auth0.client.mgmt.verifiablecredentials.verification.VerificationClient; -import java.util.function.Supplier; - -public class VerifiableCredentialsClient { - protected final ClientOptions clientOptions; - - protected final Supplier verificationClient; - - public VerifiableCredentialsClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.verificationClient = Suppliers.memoize(() -> new VerificationClient(clientOptions)); - } - - public VerificationClient verification() { - return this.verificationClient.get(); - } -} 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 deleted file mode 100644 index 86ecc370b..000000000 --- a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/AsyncRawTemplatesClient.java +++ /dev/null @@ -1,540 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.verifiablecredentials.verification; - -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.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.CreateVerifiableCredentialTemplateResponseContent; -import com.auth0.client.mgmt.types.GetVerifiableCredentialTemplateResponseContent; -import com.auth0.client.mgmt.types.ListVerifiableCredentialTemplatesPaginatedResponseContent; -import com.auth0.client.mgmt.types.UpdateVerifiableCredentialTemplateResponseContent; -import com.auth0.client.mgmt.types.VerifiableCredentialTemplateResponse; -import com.auth0.client.mgmt.verifiablecredentials.verification.types.CreateVerifiableCredentialTemplateRequestContent; -import com.auth0.client.mgmt.verifiablecredentials.verification.types.ListVerifiableCredentialTemplatesRequestParameters; -import com.auth0.client.mgmt.verifiablecredentials.verification.types.UpdateVerifiableCredentialTemplateRequestContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -import java.util.List; -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 AsyncRawTemplatesClient { - protected final ClientOptions clientOptions; - - public AsyncRawTemplatesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * List a verifiable credential templates. - */ - public CompletableFuture>> - list() { - return list(ListVerifiableCredentialTemplatesRequestParameters.builder().build()); - } - - /** - * List a verifiable credential templates. - */ - public CompletableFuture>> list( - ListVerifiableCredentialTemplatesRequestParameters request) { - return list(request, null); - } - - /** - * List a verifiable credential templates. - */ - public CompletableFuture>> list( - ListVerifiableCredentialTemplatesRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("verifiable-credentials/verification/templates"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - 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()) { - ListVerifiableCredentialTemplatesPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, - ListVerifiableCredentialTemplatesPaginatedResponseContent.class); - String startingAfter = parsedResponse.getNext().orElse(null); - ListVerifiableCredentialTemplatesRequestParameters nextRequest = - ListVerifiableCredentialTemplatesRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getTemplates().orElse(Collections.emptyList()); - future.complete(new ManagementApiHttpResponse<>( - new SyncPagingIterable( - !startingAfter.isEmpty(), 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 (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 verifiable credential template. - */ - public CompletableFuture> create( - CreateVerifiableCredentialTemplateRequestContent request) { - return create(request, null); - } - - /** - * Create a verifiable credential template. - */ - public CompletableFuture> create( - CreateVerifiableCredentialTemplateRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("verifiable-credentials/verification/templates") - .build(); - 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) - .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); - } - 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, CreateVerifiableCredentialTemplateResponseContent.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 (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 verifiable credential template. - */ - public CompletableFuture> get(String id) { - return get(id, null); - } - - /** - * Get a verifiable credential template. - */ - public CompletableFuture> get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("verifiable-credentials/verification/templates") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetVerifiableCredentialTemplateResponseContent.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 (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 verifiable credential template. - */ - public CompletableFuture> delete(String id) { - return delete(id, null); - } - - /** - * Delete a verifiable credential template. - */ - public CompletableFuture> delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("verifiable-credentials/verification/templates") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (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 verifiable credential template. - */ - public CompletableFuture> update( - String id) { - return update( - id, UpdateVerifiableCredentialTemplateRequestContent.builder().build()); - } - - /** - * Update a verifiable credential template. - */ - public CompletableFuture> update( - String id, UpdateVerifiableCredentialTemplateRequestContent request) { - return update(id, request, null); - } - - /** - * Update a verifiable credential template. - */ - public CompletableFuture> update( - String id, UpdateVerifiableCredentialTemplateRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("verifiable-credentials/verification/templates") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - CompletableFuture> future = - new CompletableFuture<>(); - client.newCall(okhttpRequest).enqueue(new Callback() { - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { - try (ResponseBody responseBody = response.body()) { - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - future.complete(new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateVerifiableCredentialTemplateResponseContent.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 (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/verifiablecredentials/verification/AsyncTemplatesClient.java b/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/AsyncTemplatesClient.java deleted file mode 100644 index 0613b3a5c..000000000 --- a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/AsyncTemplatesClient.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.verifiablecredentials.verification; - -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.CreateVerifiableCredentialTemplateResponseContent; -import com.auth0.client.mgmt.types.GetVerifiableCredentialTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateVerifiableCredentialTemplateResponseContent; -import com.auth0.client.mgmt.types.VerifiableCredentialTemplateResponse; -import com.auth0.client.mgmt.verifiablecredentials.verification.types.CreateVerifiableCredentialTemplateRequestContent; -import com.auth0.client.mgmt.verifiablecredentials.verification.types.ListVerifiableCredentialTemplatesRequestParameters; -import com.auth0.client.mgmt.verifiablecredentials.verification.types.UpdateVerifiableCredentialTemplateRequestContent; -import java.util.concurrent.CompletableFuture; - -public class AsyncTemplatesClient { - protected final ClientOptions clientOptions; - - private final AsyncRawTemplatesClient rawClient; - - public AsyncTemplatesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new AsyncRawTemplatesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public AsyncRawTemplatesClient withRawResponse() { - return this.rawClient; - } - - /** - * List a verifiable credential templates. - */ - public CompletableFuture> list() { - return this.rawClient.list().thenApply(response -> response.body()); - } - - /** - * List a verifiable credential templates. - */ - public CompletableFuture> list( - ListVerifiableCredentialTemplatesRequestParameters request) { - return this.rawClient.list(request).thenApply(response -> response.body()); - } - - /** - * List a verifiable credential templates. - */ - public CompletableFuture> list( - ListVerifiableCredentialTemplatesRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Create a verifiable credential template. - */ - public CompletableFuture create( - CreateVerifiableCredentialTemplateRequestContent request) { - return this.rawClient.create(request).thenApply(response -> response.body()); - } - - /** - * Create a verifiable credential template. - */ - public CompletableFuture create( - CreateVerifiableCredentialTemplateRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); - } - - /** - * Get a verifiable credential template. - */ - public CompletableFuture get(String id) { - return this.rawClient.get(id).thenApply(response -> response.body()); - } - - /** - * Get a verifiable credential template. - */ - public CompletableFuture get( - String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Delete a verifiable credential template. - */ - public CompletableFuture delete(String id) { - return this.rawClient.delete(id).thenApply(response -> response.body()); - } - - /** - * Delete a verifiable credential template. - */ - public CompletableFuture delete(String id, RequestOptions requestOptions) { - return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body()); - } - - /** - * Update a verifiable credential template. - */ - public CompletableFuture update(String id) { - return this.rawClient.update(id).thenApply(response -> response.body()); - } - - /** - * Update a verifiable credential template. - */ - public CompletableFuture update( - String id, UpdateVerifiableCredentialTemplateRequestContent request) { - return this.rawClient.update(id, request).thenApply(response -> response.body()); - } - - /** - * Update a verifiable credential template. - */ - public CompletableFuture update( - String id, UpdateVerifiableCredentialTemplateRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).thenApply(response -> response.body()); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/AsyncVerificationClient.java b/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/AsyncVerificationClient.java deleted file mode 100644 index c00317219..000000000 --- a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/AsyncVerificationClient.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.verifiablecredentials.verification; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class AsyncVerificationClient { - protected final ClientOptions clientOptions; - - protected final Supplier templatesClient; - - public AsyncVerificationClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.templatesClient = Suppliers.memoize(() -> new AsyncTemplatesClient(clientOptions)); - } - - public AsyncTemplatesClient templates() { - return this.templatesClient.get(); - } -} 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 deleted file mode 100644 index edfdc64e5..000000000 --- a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/RawTemplatesClient.java +++ /dev/null @@ -1,411 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.verifiablecredentials.verification; - -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.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.CreateVerifiableCredentialTemplateResponseContent; -import com.auth0.client.mgmt.types.GetVerifiableCredentialTemplateResponseContent; -import com.auth0.client.mgmt.types.ListVerifiableCredentialTemplatesPaginatedResponseContent; -import com.auth0.client.mgmt.types.UpdateVerifiableCredentialTemplateResponseContent; -import com.auth0.client.mgmt.types.VerifiableCredentialTemplateResponse; -import com.auth0.client.mgmt.verifiablecredentials.verification.types.CreateVerifiableCredentialTemplateRequestContent; -import com.auth0.client.mgmt.verifiablecredentials.verification.types.ListVerifiableCredentialTemplatesRequestParameters; -import com.auth0.client.mgmt.verifiablecredentials.verification.types.UpdateVerifiableCredentialTemplateRequestContent; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.io.IOException; -import java.util.Collections; -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 RawTemplatesClient { - protected final ClientOptions clientOptions; - - public RawTemplatesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - } - - /** - * List a verifiable credential templates. - */ - public ManagementApiHttpResponse> list() { - return list(ListVerifiableCredentialTemplatesRequestParameters.builder().build()); - } - - /** - * List a verifiable credential templates. - */ - public ManagementApiHttpResponse> list( - ListVerifiableCredentialTemplatesRequestParameters request) { - return list(request, null); - } - - /** - * List a verifiable credential templates. - */ - public ManagementApiHttpResponse> list( - ListVerifiableCredentialTemplatesRequestParameters request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("verifiable-credentials/verification/templates"); - if (!request.getFrom().isAbsent()) { - QueryStringMapper.addQueryParameter( - httpUrl, "from", request.getFrom().orElse(null), false); - } - QueryStringMapper.addQueryParameter(httpUrl, "take", request.getTake().orElse(50), false); - 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); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - ListVerifiableCredentialTemplatesPaginatedResponseContent parsedResponse = - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, ListVerifiableCredentialTemplatesPaginatedResponseContent.class); - String startingAfter = parsedResponse.getNext().orElse(null); - ListVerifiableCredentialTemplatesRequestParameters nextRequest = - ListVerifiableCredentialTemplatesRequestParameters.builder() - .from(request) - .from(startingAfter) - .build(); - List result = - parsedResponse.getTemplates().orElse(Collections.emptyList()); - return new ManagementApiHttpResponse<>( - new SyncPagingIterable( - !startingAfter.isEmpty(), 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Create a verifiable credential template. - */ - public ManagementApiHttpResponse create( - CreateVerifiableCredentialTemplateRequestContent request) { - return create(request, null); - } - - /** - * Create a verifiable credential template. - */ - public ManagementApiHttpResponse create( - CreateVerifiableCredentialTemplateRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("verifiable-credentials/verification/templates") - .build(); - 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) - .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); - } - 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, CreateVerifiableCredentialTemplateResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Get a verifiable credential template. - */ - public ManagementApiHttpResponse get(String id) { - return get(id, null); - } - - /** - * Get a verifiable credential template. - */ - public ManagementApiHttpResponse get( - String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("verifiable-credentials/verification/templates") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .method("GET", null) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, GetVerifiableCredentialTemplateResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Delete a verifiable credential template. - */ - public ManagementApiHttpResponse delete(String id) { - return delete(id, null); - } - - /** - * Delete a verifiable credential template. - */ - public ManagementApiHttpResponse delete(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("verifiable-credentials/verification/templates") - .addPathSegment(id) - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) - .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); - } - 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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } - - /** - * Update a verifiable credential template. - */ - public ManagementApiHttpResponse update(String id) { - return update( - id, UpdateVerifiableCredentialTemplateRequestContent.builder().build()); - } - - /** - * Update a verifiable credential template. - */ - public ManagementApiHttpResponse update( - String id, UpdateVerifiableCredentialTemplateRequestContent request) { - return update(id, request, null); - } - - /** - * Update a verifiable credential template. - */ - public ManagementApiHttpResponse update( - String id, UpdateVerifiableCredentialTemplateRequestContent request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) - .newBuilder() - .addPathSegments("verifiable-credentials/verification/templates") - .addPathSegment(id) - .build(); - 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) - .method("PATCH", body) - .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); - OkHttpClient client = clientOptions.httpClient(); - if (requestOptions != null && requestOptions.getTimeout().isPresent()) { - client = clientOptions.httpClientWithTimeout(requestOptions); - } - try (Response response = client.newCall(okhttpRequest).execute()) { - ResponseBody responseBody = response.body(); - String responseBodyString = responseBody != null ? responseBody.string() : "{}"; - if (response.isSuccessful()) { - return new ManagementApiHttpResponse<>( - ObjectMappers.JSON_MAPPER.readValue( - responseBodyString, UpdateVerifiableCredentialTemplateResponseContent.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 (IOException e) { - throw new ManagementException("Network error executing HTTP request", e); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/TemplatesClient.java b/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/TemplatesClient.java deleted file mode 100644 index f941f2471..000000000 --- a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/TemplatesClient.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.verifiablecredentials.verification; - -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.CreateVerifiableCredentialTemplateResponseContent; -import com.auth0.client.mgmt.types.GetVerifiableCredentialTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateVerifiableCredentialTemplateResponseContent; -import com.auth0.client.mgmt.types.VerifiableCredentialTemplateResponse; -import com.auth0.client.mgmt.verifiablecredentials.verification.types.CreateVerifiableCredentialTemplateRequestContent; -import com.auth0.client.mgmt.verifiablecredentials.verification.types.ListVerifiableCredentialTemplatesRequestParameters; -import com.auth0.client.mgmt.verifiablecredentials.verification.types.UpdateVerifiableCredentialTemplateRequestContent; - -public class TemplatesClient { - protected final ClientOptions clientOptions; - - private final RawTemplatesClient rawClient; - - public TemplatesClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.rawClient = new RawTemplatesClient(clientOptions); - } - - /** - * Get responses with HTTP metadata like headers - */ - public RawTemplatesClient withRawResponse() { - return this.rawClient; - } - - /** - * List a verifiable credential templates. - */ - public SyncPagingIterable list() { - return this.rawClient.list().body(); - } - - /** - * List a verifiable credential templates. - */ - public SyncPagingIterable list( - ListVerifiableCredentialTemplatesRequestParameters request) { - return this.rawClient.list(request).body(); - } - - /** - * List a verifiable credential templates. - */ - public SyncPagingIterable list( - ListVerifiableCredentialTemplatesRequestParameters request, RequestOptions requestOptions) { - return this.rawClient.list(request, requestOptions).body(); - } - - /** - * Create a verifiable credential template. - */ - public CreateVerifiableCredentialTemplateResponseContent create( - CreateVerifiableCredentialTemplateRequestContent request) { - return this.rawClient.create(request).body(); - } - - /** - * Create a verifiable credential template. - */ - public CreateVerifiableCredentialTemplateResponseContent create( - CreateVerifiableCredentialTemplateRequestContent request, RequestOptions requestOptions) { - return this.rawClient.create(request, requestOptions).body(); - } - - /** - * Get a verifiable credential template. - */ - public GetVerifiableCredentialTemplateResponseContent get(String id) { - return this.rawClient.get(id).body(); - } - - /** - * Get a verifiable credential template. - */ - public GetVerifiableCredentialTemplateResponseContent get(String id, RequestOptions requestOptions) { - return this.rawClient.get(id, requestOptions).body(); - } - - /** - * Delete a verifiable credential template. - */ - public void delete(String id) { - this.rawClient.delete(id).body(); - } - - /** - * Delete a verifiable credential template. - */ - public void delete(String id, RequestOptions requestOptions) { - this.rawClient.delete(id, requestOptions).body(); - } - - /** - * Update a verifiable credential template. - */ - public UpdateVerifiableCredentialTemplateResponseContent update(String id) { - return this.rawClient.update(id).body(); - } - - /** - * Update a verifiable credential template. - */ - public UpdateVerifiableCredentialTemplateResponseContent update( - String id, UpdateVerifiableCredentialTemplateRequestContent request) { - return this.rawClient.update(id, request).body(); - } - - /** - * Update a verifiable credential template. - */ - public UpdateVerifiableCredentialTemplateResponseContent update( - String id, UpdateVerifiableCredentialTemplateRequestContent request, RequestOptions requestOptions) { - return this.rawClient.update(id, request, requestOptions).body(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/VerificationClient.java b/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/VerificationClient.java deleted file mode 100644 index d0feff32c..000000000 --- a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/VerificationClient.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.verifiablecredentials.verification; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Suppliers; -import java.util.function.Supplier; - -public class VerificationClient { - protected final ClientOptions clientOptions; - - protected final Supplier templatesClient; - - public VerificationClient(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - this.templatesClient = Suppliers.memoize(() -> new TemplatesClient(clientOptions)); - } - - public TemplatesClient templates() { - return this.templatesClient.get(); - } -} diff --git a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/types/CreateVerifiableCredentialTemplateRequestContent.java b/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/types/CreateVerifiableCredentialTemplateRequestContent.java deleted file mode 100644 index 6c913de6c..000000000 --- a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/types/CreateVerifiableCredentialTemplateRequestContent.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.verifiablecredentials.verification.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.MdlPresentationRequest; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = CreateVerifiableCredentialTemplateRequestContent.Builder.class) -public final class CreateVerifiableCredentialTemplateRequestContent { - private final String name; - - private final String type; - - private final String dialect; - - private final MdlPresentationRequest presentation; - - private final OptionalNullable customCertificateAuthority; - - private final String wellKnownTrustedIssuers; - - private final Map additionalProperties; - - private CreateVerifiableCredentialTemplateRequestContent( - String name, - String type, - String dialect, - MdlPresentationRequest presentation, - OptionalNullable customCertificateAuthority, - String wellKnownTrustedIssuers, - Map additionalProperties) { - this.name = name; - this.type = type; - this.dialect = dialect; - this.presentation = presentation; - this.customCertificateAuthority = customCertificateAuthority; - this.wellKnownTrustedIssuers = wellKnownTrustedIssuers; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("type") - public String getType() { - return type; - } - - @JsonProperty("dialect") - public String getDialect() { - return dialect; - } - - @JsonProperty("presentation") - public MdlPresentationRequest getPresentation() { - return presentation; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_certificate_authority") - public OptionalNullable getCustomCertificateAuthority() { - if (customCertificateAuthority == null) { - return OptionalNullable.absent(); - } - return customCertificateAuthority; - } - - @JsonProperty("well_known_trusted_issuers") - public String getWellKnownTrustedIssuers() { - return wellKnownTrustedIssuers; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("custom_certificate_authority") - private OptionalNullable _getCustomCertificateAuthority() { - return customCertificateAuthority; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof CreateVerifiableCredentialTemplateRequestContent - && equalTo((CreateVerifiableCredentialTemplateRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(CreateVerifiableCredentialTemplateRequestContent other) { - return name.equals(other.name) - && type.equals(other.type) - && dialect.equals(other.dialect) - && presentation.equals(other.presentation) - && customCertificateAuthority.equals(other.customCertificateAuthority) - && wellKnownTrustedIssuers.equals(other.wellKnownTrustedIssuers); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, - this.type, - this.dialect, - this.presentation, - this.customCertificateAuthority, - this.wellKnownTrustedIssuers); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static NameStage builder() { - return new Builder(); - } - - public interface NameStage { - TypeStage name(@NotNull String name); - - Builder from(CreateVerifiableCredentialTemplateRequestContent other); - } - - public interface TypeStage { - DialectStage type(@NotNull String type); - } - - public interface DialectStage { - PresentationStage dialect(@NotNull String dialect); - } - - public interface PresentationStage { - WellKnownTrustedIssuersStage presentation(@NotNull MdlPresentationRequest presentation); - } - - public interface WellKnownTrustedIssuersStage { - _FinalStage wellKnownTrustedIssuers(@NotNull String wellKnownTrustedIssuers); - } - - public interface _FinalStage { - CreateVerifiableCredentialTemplateRequestContent build(); - - _FinalStage customCertificateAuthority(@Nullable OptionalNullable customCertificateAuthority); - - _FinalStage customCertificateAuthority(String customCertificateAuthority); - - _FinalStage customCertificateAuthority(Optional customCertificateAuthority); - - _FinalStage customCertificateAuthority(com.auth0.client.mgmt.core.Nullable customCertificateAuthority); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements NameStage, - TypeStage, - DialectStage, - PresentationStage, - WellKnownTrustedIssuersStage, - _FinalStage { - private String name; - - private String type; - - private String dialect; - - private MdlPresentationRequest presentation; - - private String wellKnownTrustedIssuers; - - private OptionalNullable customCertificateAuthority = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(CreateVerifiableCredentialTemplateRequestContent other) { - name(other.getName()); - type(other.getType()); - dialect(other.getDialect()); - presentation(other.getPresentation()); - customCertificateAuthority(other.getCustomCertificateAuthority()); - wellKnownTrustedIssuers(other.getWellKnownTrustedIssuers()); - 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 DialectStage type(@NotNull String type) { - this.type = Objects.requireNonNull(type, "type must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("dialect") - public PresentationStage dialect(@NotNull String dialect) { - this.dialect = Objects.requireNonNull(dialect, "dialect must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("presentation") - public WellKnownTrustedIssuersStage presentation(@NotNull MdlPresentationRequest presentation) { - this.presentation = Objects.requireNonNull(presentation, "presentation must not be null"); - return this; - } - - @java.lang.Override - @JsonSetter("well_known_trusted_issuers") - public _FinalStage wellKnownTrustedIssuers(@NotNull String wellKnownTrustedIssuers) { - this.wellKnownTrustedIssuers = - Objects.requireNonNull(wellKnownTrustedIssuers, "wellKnownTrustedIssuers must not be null"); - return this; - } - - @java.lang.Override - public _FinalStage customCertificateAuthority( - com.auth0.client.mgmt.core.Nullable customCertificateAuthority) { - if (customCertificateAuthority.isNull()) { - this.customCertificateAuthority = OptionalNullable.ofNull(); - } else if (customCertificateAuthority.isEmpty()) { - this.customCertificateAuthority = OptionalNullable.absent(); - } else { - this.customCertificateAuthority = OptionalNullable.of(customCertificateAuthority.get()); - } - return this; - } - - @java.lang.Override - public _FinalStage customCertificateAuthority(Optional customCertificateAuthority) { - if (customCertificateAuthority.isPresent()) { - this.customCertificateAuthority = OptionalNullable.of(customCertificateAuthority.get()); - } else { - this.customCertificateAuthority = OptionalNullable.absent(); - } - return this; - } - - @java.lang.Override - public _FinalStage customCertificateAuthority(String customCertificateAuthority) { - this.customCertificateAuthority = OptionalNullable.of(customCertificateAuthority); - return this; - } - - @java.lang.Override - @JsonSetter(value = "custom_certificate_authority", nulls = Nulls.SKIP) - public _FinalStage customCertificateAuthority(@Nullable OptionalNullable customCertificateAuthority) { - this.customCertificateAuthority = customCertificateAuthority; - return this; - } - - @java.lang.Override - public CreateVerifiableCredentialTemplateRequestContent build() { - return new CreateVerifiableCredentialTemplateRequestContent( - name, - type, - dialect, - presentation, - customCertificateAuthority, - wellKnownTrustedIssuers, - additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/types/ListVerifiableCredentialTemplatesRequestParameters.java b/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/types/ListVerifiableCredentialTemplatesRequestParameters.java deleted file mode 100644 index ada4bfbdd..000000000 --- a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/types/ListVerifiableCredentialTemplatesRequestParameters.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.verifiablecredentials.verification.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 = ListVerifiableCredentialTemplatesRequestParameters.Builder.class) -public final class ListVerifiableCredentialTemplatesRequestParameters { - private final OptionalNullable from; - - private final OptionalNullable take; - - private final Map additionalProperties; - - private ListVerifiableCredentialTemplatesRequestParameters( - 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() { - 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; - return other instanceof ListVerifiableCredentialTemplatesRequestParameters - && equalTo((ListVerifiableCredentialTemplatesRequestParameters) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ListVerifiableCredentialTemplatesRequestParameters 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(ListVerifiableCredentialTemplatesRequestParameters 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(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 ListVerifiableCredentialTemplatesRequestParameters build() { - return new ListVerifiableCredentialTemplatesRequestParameters(from, take, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/types/UpdateVerifiableCredentialTemplateRequestContent.java b/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/types/UpdateVerifiableCredentialTemplateRequestContent.java deleted file mode 100644 index 880bdc1b9..000000000 --- a/src/main/java/com/auth0/client/mgmt/verifiablecredentials/verification/types/UpdateVerifiableCredentialTemplateRequestContent.java +++ /dev/null @@ -1,374 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.verifiablecredentials.verification.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.MdlPresentationRequest; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.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 = UpdateVerifiableCredentialTemplateRequestContent.Builder.class) -public final class UpdateVerifiableCredentialTemplateRequestContent { - private final OptionalNullable name; - - private final OptionalNullable type; - - private final OptionalNullable dialect; - - private final Optional presentation; - - private final OptionalNullable wellKnownTrustedIssuers; - - private final OptionalNullable version; - - private final Map additionalProperties; - - private UpdateVerifiableCredentialTemplateRequestContent( - OptionalNullable name, - OptionalNullable type, - OptionalNullable dialect, - Optional presentation, - OptionalNullable wellKnownTrustedIssuers, - OptionalNullable version, - Map additionalProperties) { - this.name = name; - this.type = type; - this.dialect = dialect; - this.presentation = presentation; - this.wellKnownTrustedIssuers = wellKnownTrustedIssuers; - this.version = version; - this.additionalProperties = additionalProperties; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("name") - public OptionalNullable getName() { - if (name == null) { - return OptionalNullable.absent(); - } - return name; - } - - @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("dialect") - public OptionalNullable getDialect() { - if (dialect == null) { - return OptionalNullable.absent(); - } - return dialect; - } - - @JsonProperty("presentation") - public Optional getPresentation() { - return presentation; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("well_known_trusted_issuers") - public OptionalNullable getWellKnownTrustedIssuers() { - if (wellKnownTrustedIssuers == null) { - return OptionalNullable.absent(); - } - return wellKnownTrustedIssuers; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("version") - public OptionalNullable getVersion() { - if (version == null) { - return OptionalNullable.absent(); - } - return version; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("name") - private OptionalNullable _getName() { - return name; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("type") - private OptionalNullable _getType() { - return type; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("dialect") - private OptionalNullable _getDialect() { - return dialect; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("well_known_trusted_issuers") - private OptionalNullable _getWellKnownTrustedIssuers() { - return wellKnownTrustedIssuers; - } - - @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class) - @JsonProperty("version") - private OptionalNullable _getVersion() { - return version; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof UpdateVerifiableCredentialTemplateRequestContent - && equalTo((UpdateVerifiableCredentialTemplateRequestContent) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(UpdateVerifiableCredentialTemplateRequestContent other) { - return name.equals(other.name) - && type.equals(other.type) - && dialect.equals(other.dialect) - && presentation.equals(other.presentation) - && wellKnownTrustedIssuers.equals(other.wellKnownTrustedIssuers) - && version.equals(other.version); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash( - this.name, this.type, this.dialect, this.presentation, this.wellKnownTrustedIssuers, this.version); - } - - @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 name = OptionalNullable.absent(); - - private OptionalNullable type = OptionalNullable.absent(); - - private OptionalNullable dialect = OptionalNullable.absent(); - - private Optional presentation = Optional.empty(); - - private OptionalNullable wellKnownTrustedIssuers = OptionalNullable.absent(); - - private OptionalNullable version = OptionalNullable.absent(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(UpdateVerifiableCredentialTemplateRequestContent other) { - name(other.getName()); - type(other.getType()); - dialect(other.getDialect()); - presentation(other.getPresentation()); - wellKnownTrustedIssuers(other.getWellKnownTrustedIssuers()); - version(other.getVersion()); - return this; - } - - @JsonSetter(value = "name", nulls = Nulls.SKIP) - public Builder name(@Nullable OptionalNullable name) { - this.name = name; - return this; - } - - public Builder name(String name) { - this.name = OptionalNullable.of(name); - return this; - } - - public Builder name(Optional name) { - if (name.isPresent()) { - this.name = OptionalNullable.of(name.get()); - } else { - this.name = OptionalNullable.absent(); - } - return this; - } - - public Builder name(com.auth0.client.mgmt.core.Nullable name) { - if (name.isNull()) { - this.name = OptionalNullable.ofNull(); - } else if (name.isEmpty()) { - this.name = OptionalNullable.absent(); - } else { - this.name = OptionalNullable.of(name.get()); - } - return this; - } - - @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(@Nullable OptionalNullable type) { - this.type = type; - return this; - } - - public Builder type(String 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; - } - - @JsonSetter(value = "dialect", nulls = Nulls.SKIP) - public Builder dialect(@Nullable OptionalNullable dialect) { - this.dialect = dialect; - return this; - } - - public Builder dialect(String dialect) { - this.dialect = OptionalNullable.of(dialect); - return this; - } - - public Builder dialect(Optional dialect) { - if (dialect.isPresent()) { - this.dialect = OptionalNullable.of(dialect.get()); - } else { - this.dialect = OptionalNullable.absent(); - } - return this; - } - - public Builder dialect(com.auth0.client.mgmt.core.Nullable dialect) { - if (dialect.isNull()) { - this.dialect = OptionalNullable.ofNull(); - } else if (dialect.isEmpty()) { - this.dialect = OptionalNullable.absent(); - } else { - this.dialect = OptionalNullable.of(dialect.get()); - } - return this; - } - - @JsonSetter(value = "presentation", nulls = Nulls.SKIP) - public Builder presentation(Optional presentation) { - this.presentation = presentation; - return this; - } - - public Builder presentation(MdlPresentationRequest presentation) { - this.presentation = Optional.ofNullable(presentation); - return this; - } - - @JsonSetter(value = "well_known_trusted_issuers", nulls = Nulls.SKIP) - public Builder wellKnownTrustedIssuers(@Nullable OptionalNullable wellKnownTrustedIssuers) { - this.wellKnownTrustedIssuers = wellKnownTrustedIssuers; - return this; - } - - public Builder wellKnownTrustedIssuers(String wellKnownTrustedIssuers) { - this.wellKnownTrustedIssuers = OptionalNullable.of(wellKnownTrustedIssuers); - return this; - } - - public Builder wellKnownTrustedIssuers(Optional wellKnownTrustedIssuers) { - if (wellKnownTrustedIssuers.isPresent()) { - this.wellKnownTrustedIssuers = OptionalNullable.of(wellKnownTrustedIssuers.get()); - } else { - this.wellKnownTrustedIssuers = OptionalNullable.absent(); - } - return this; - } - - public Builder wellKnownTrustedIssuers(com.auth0.client.mgmt.core.Nullable wellKnownTrustedIssuers) { - if (wellKnownTrustedIssuers.isNull()) { - this.wellKnownTrustedIssuers = OptionalNullable.ofNull(); - } else if (wellKnownTrustedIssuers.isEmpty()) { - this.wellKnownTrustedIssuers = OptionalNullable.absent(); - } else { - this.wellKnownTrustedIssuers = OptionalNullable.of(wellKnownTrustedIssuers.get()); - } - return this; - } - - @JsonSetter(value = "version", nulls = Nulls.SKIP) - public Builder version(@Nullable OptionalNullable version) { - this.version = version; - return this; - } - - public Builder version(Double version) { - this.version = OptionalNullable.of(version); - return this; - } - - public Builder version(Optional version) { - if (version.isPresent()) { - this.version = OptionalNullable.of(version.get()); - } else { - this.version = OptionalNullable.absent(); - } - return this; - } - - public Builder version(com.auth0.client.mgmt.core.Nullable version) { - if (version.isNull()) { - this.version = OptionalNullable.ofNull(); - } else if (version.isEmpty()) { - this.version = OptionalNullable.absent(); - } else { - this.version = OptionalNullable.of(version.get()); - } - return this; - } - - public UpdateVerifiableCredentialTemplateRequestContent build() { - return new UpdateVerifiableCredentialTemplateRequestContent( - name, type, dialect, presentation, wellKnownTrustedIssuers, version, additionalProperties); - } - } -} diff --git a/src/main/java/com/auth0/exception/APIException.java b/src/main/java/com/auth0/exception/APIException.java deleted file mode 100644 index 89be475f0..000000000 --- a/src/main/java/com/auth0/exception/APIException.java +++ /dev/null @@ -1,178 +0,0 @@ -package com.auth0.exception; - -import java.util.Collections; -import java.util.Map; - -/** - * Represents an Auth0 Server error captured from an HTTP response. Provides different methods to determine why the request failed. - * i.e.: - *
- * {@code
- * {
- *      statusCode: 400,
- *      description: "Query validation error: 'String 'users' does not match pattern. Must be a comma separated list of the following values: name,strategy,options,enabled_clients,id,provisioning_ticket_url' on property fields (A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields).",
- *      error: "invalid_query_string"
- * }
- * }
- * 
- */ -@SuppressWarnings("WeakerAccess") -public class APIException extends Auth0Exception { - - private static final String ERROR_DESCRIPTION = "error_description"; - private static final String DESCRIPTION = "description"; - private static final String MESSAGE = "message"; - private static final String ERROR = "error"; - private static final String ERROR_CODE = "errorCode"; - private static final String CODE = "code"; - - private String error; - private final String description; - private final int statusCode; - private Map values; - - public APIException(String payload, int statusCode, Throwable cause) { - super(createMessage(payload, statusCode), cause); - this.description = payload; - this.statusCode = statusCode; - } - - public APIException(Map values, int statusCode) { - super(createMessage(obtainExceptionMessage(values), statusCode)); - this.values = Collections.unmodifiableMap(values); - this.error = obtainExceptionError(this.values); - this.description = obtainExceptionMessage(this.values); - this.statusCode = statusCode; - } - - /** - * Getter for the Http Status Code received in the response. - * i.e. a {@code status_code=403} would mean that the token has an insufficient scope. - * - * @return the status code. - */ - public int getStatusCode() { - return statusCode; - } - - /** - * Getter for the exception error code. - * i.e. a {@code error=invalid_query_string} would mean that the query parameters sent in the request were invalid. - * - * @return the error code. - */ - public String getError() { - return error; - } - - /** - * Returns a value from the error map, if any. - * - * @param key key of the value to return - * @return the value if found or null - */ - public Object getValue(String key) { - if (values == null) { - return null; - } - return values.get(key); - } - - /** - * Getter for the exception user friendly description of why the request failed. - * i.e. the description may say which query parameters are valid for that endpoint. - * - * @return the description. - */ - public String getDescription() { - return description; - } - - /** - * @return {@code true} when an MFA code is required to authenticate, {@code false} otherwise. - */ - public boolean isMultifactorRequired() { - return "mfa_required".equals(error); - } - - /** - * @return {@code true} when the username and/or password used for authentication are invalid, {@code false} otherwise. - */ - public boolean isInvalidCredentials() { - return "invalid_user_password".equals(error) - || "invalid_grant".equals(error) && "Wrong email or password.".equals(description); - } - - /** - * @return {@code true} when MFA is required and the user is not enrolled, {@code false} otherwise. - */ - public boolean isMultifactorEnrollRequired() { - return "unsupported_challenge_type".equals(error); - } - - /** - * @return {@code true} when Bot Protection flags the request as suspicious, {@code false} otherwise. - */ - public boolean isVerificationRequired() { - return "requires_verification".equals(error); - } - - /** - * @return {@code true} when the MFA Token used on the login request is malformed or has expired, {@code false} otherwise. - */ - public boolean isMultifactorTokenInvalid() { - return "expired_token".equals(error) && "mfa_token is expired".equals(description) - || "invalid_grant".equals(error) && "Malformed mfa_token".equals(description); - } - - /** - * @return {@code true} when authenticating with web-based authentiction and the resource server denied access per the OAuth 2 spec, {@code false} otherwise. - */ - public boolean isAccessDenied() { - return "access_denied".equals(error); - } - - private static String createMessage(String description, int statusCode) { - return String.format("Request failed with status code %d: %s", statusCode, description); - } - - private static String obtainExceptionMessage(Map values) { - if (values.containsKey(ERROR_DESCRIPTION)) { - return toStringOrNull(values.get(ERROR_DESCRIPTION)); - } - if (values.containsKey(DESCRIPTION)) { - Object description = values.get(DESCRIPTION); - if (description instanceof String) { - return (String) description; - } else if (description instanceof Map) { - @SuppressWarnings("unchecked") - PasswordStrengthErrorParser policy = new PasswordStrengthErrorParser((Map) description); - return policy.getDescription(); - } - } - if (values.containsKey(MESSAGE)) { - return toStringOrNull(values.get(MESSAGE)); - } - if (values.containsKey(ERROR)) { - return toStringOrNull(values.get(ERROR)); - } - return "Unknown exception"; - } - - private static String obtainExceptionError(Map values) { - if (values.containsKey(ERROR_CODE)) { - return toStringOrNull(values.get(ERROR_CODE)); - } - if (values.containsKey(ERROR)) { - return toStringOrNull(values.get(ERROR)); - } - if (values.containsKey(CODE)) { - return toStringOrNull(values.get(CODE)); - } - return "Unknown error"; - } - - private static String toStringOrNull(Object obj) { - return obj != null ? obj.toString() : null; - } -} diff --git a/src/main/java/com/auth0/exception/Auth0Exception.java b/src/main/java/com/auth0/exception/Auth0Exception.java deleted file mode 100644 index d8fb70448..000000000 --- a/src/main/java/com/auth0/exception/Auth0Exception.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.auth0.exception; - -import java.io.IOException; - -/** - * Class that represents an error captured when executing an http request to the Auth0 Server. - */ -@SuppressWarnings("WeakerAccess") -public class Auth0Exception extends IOException { - - public Auth0Exception(String message) { - super(message); - } - - public Auth0Exception(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/src/main/java/com/auth0/exception/ClientAssertionSigningException.java b/src/main/java/com/auth0/exception/ClientAssertionSigningException.java deleted file mode 100644 index 1de218393..000000000 --- a/src/main/java/com/auth0/exception/ClientAssertionSigningException.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.auth0.exception; - -/** - * Reqpresents an exception when creating the signed client assertion. - */ -public class ClientAssertionSigningException extends RuntimeException { - - /** - * Create a new instance. - * - * @param message the message of the exception. - */ - public ClientAssertionSigningException(String message) { - super(message); - } - - /** - * Create a new instance. - * - * @param message the message of the exception. - * @param cause the cause of the exception. - */ - public ClientAssertionSigningException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/src/main/java/com/auth0/exception/IdTokenValidationException.java b/src/main/java/com/auth0/exception/IdTokenValidationException.java deleted file mode 100644 index 006b71b43..000000000 --- a/src/main/java/com/auth0/exception/IdTokenValidationException.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.auth0.exception; - -/** - * Represents an error during the validation of an OIDC-compliant token. - */ -public class IdTokenValidationException extends RuntimeException { - - /** - * Creates a new {@code IdTokenValidationException}. - * - * @param message the exception message. - */ - public IdTokenValidationException(String message) { - super(message); - } - - /** - * Creates a new {@code IdTokenValidationException}. - * - * @param message the exception message. - * @param cause the cause of the exception. - */ - public IdTokenValidationException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/src/main/java/com/auth0/exception/PasswordStrengthErrorParser.java b/src/main/java/com/auth0/exception/PasswordStrengthErrorParser.java deleted file mode 100644 index 7c3d0884b..000000000 --- a/src/main/java/com/auth0/exception/PasswordStrengthErrorParser.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.auth0.exception; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -@SuppressWarnings("unchecked") -class PasswordStrengthErrorParser { - private static final String RULE_TYPE_LENGTH_AT_LEAST = "lengthAtLeast"; - private static final String RULE_TYPE_CONTAINS_AT_LEAST = "containsAtLeast"; - private static final String RULE_TYPE_SHOULD_CONTAIN = "shouldContain"; - private static final String RULE_TYPE_IDENTICAL_CHARS = "identicalChars"; - - private static final String KEY_RULES = "rules"; - private static final String KEY_CODE = "code"; - private static final String KEY_VERIFIED = "verified"; - private static final String KEY_FORMAT = "format"; - private static final String KEY_ITEMS = "items"; - private static final String KEY_MESSAGE = "message"; - - private String description; - - PasswordStrengthErrorParser(Map descriptionMap) { - List> rules = (List>) descriptionMap.get(KEY_RULES); - parseRules(rules); - } - - public String getDescription() { - return description; - } - - private void parseRules(List> rules) { - List items = new ArrayList<>(); - for (Map rule : rules) { - boolean isVerified = (boolean) rule.get(KEY_VERIFIED); - if (isVerified) { - continue; - } - String code = (String) rule.get(KEY_CODE); - switch (code) { - case RULE_TYPE_LENGTH_AT_LEAST: - items.add(asLengthAtLeast(rule)); - break; - case RULE_TYPE_IDENTICAL_CHARS: - items.add(asIdenticalChars(rule)); - break; - case RULE_TYPE_CONTAINS_AT_LEAST: - case RULE_TYPE_SHOULD_CONTAIN: - items.add(asContainsCharset(rule)); - break; - } - } - - this.description = joinStrings("; ", items); - } - - private String asLengthAtLeast(Map rule) { - List length = (List) rule.get(KEY_FORMAT); - String message = (String) rule.get(KEY_MESSAGE); - return String.format(message, length.get(0).intValue()); - } - - private String asContainsCharset(Map rule) { - List> itemsList = (List>) rule.get(KEY_ITEMS); - List items = new ArrayList<>(); - for (Map i : itemsList) { - items.add((String) i.get(KEY_MESSAGE)); - } - String requiredItems = joinStrings(", ", items); - String message = (String) rule.get(KEY_MESSAGE); - - if (rule.containsKey(KEY_FORMAT)) { - List quantity = (List) rule.get(KEY_FORMAT); - message = String.format( - message, quantity.get(0).intValue(), quantity.get(1).intValue()); - } - - return String.format("%s %s", message, requiredItems); - } - - private String asIdenticalChars(Map rule) { - List example = (List) rule.get(KEY_FORMAT); - Number count = (Number) example.get(0); - String message = (String) rule.get(KEY_MESSAGE); - return String.format(message, count.intValue(), example.get(1)); - } - - private String joinStrings(String delimiter, List items) { - StringBuilder sb = new StringBuilder(); - int i; - for (i = 0; i < items.size() - 1; i++) { - sb.append(items.get(i)).append(delimiter); - } - sb.append(items.get(i)); - return sb.toString(); - } -} diff --git a/src/main/java/com/auth0/exception/PublicKeyProviderException.java b/src/main/java/com/auth0/exception/PublicKeyProviderException.java deleted file mode 100644 index 47999231f..000000000 --- a/src/main/java/com/auth0/exception/PublicKeyProviderException.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.auth0.exception; - -/** - * Represents an error when attempting to retrieve a public key. - * @see com.auth0.utils.tokens.PublicKeyProvider - */ -@SuppressWarnings("unused") -public class PublicKeyProviderException extends Exception { - - /** - * Creates a new {@code PublicKeyProviderException} - * - * @param message the exception message - */ - public PublicKeyProviderException(String message) { - super(message); - } - - /** - * Creates a new {@code PublicKeyProviderException} - * - * @param message the exception message - * @param cause the cause of the exception - */ - public PublicKeyProviderException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/src/main/java/com/auth0/exception/RateLimitException.java b/src/main/java/com/auth0/exception/RateLimitException.java deleted file mode 100644 index a9d1ea99b..000000000 --- a/src/main/java/com/auth0/exception/RateLimitException.java +++ /dev/null @@ -1,178 +0,0 @@ -package com.auth0.exception; - -import com.auth0.net.TokenQuotaBucket; -import java.util.Map; - -/** - * Represents a server error when a rate limit has been exceeded. - *

- * Getters for {@code limit, remaining} and {@code reset} corresponds to {@code X-RateLimit-Limit, X-RateLimit-Remaining} and {@code X-RateLimit-Reset} HTTP headers. - * If the value of any headers is missing, then a default value -1 will assigned. - *

- * To learn more about rate limits, visit https://auth0.com/docs/policies/rate-limits - */ -public class RateLimitException extends APIException { - - private final long limit; - private final long remaining; - private final long reset; - - private TokenQuotaBucket clientQuotaLimit; - private TokenQuotaBucket organizationQuotaLimit; - private long retryAfter; - - private static final int STATUS_CODE_TOO_MANY_REQUEST = 429; - - public RateLimitException(long limit, long remaining, long reset, Map values) { - super(values, STATUS_CODE_TOO_MANY_REQUEST); - this.limit = limit; - this.remaining = remaining; - this.reset = reset; - } - - public RateLimitException(long limit, long remaining, long reset) { - super("Rate limit reached", STATUS_CODE_TOO_MANY_REQUEST, null); - this.limit = limit; - this.remaining = remaining; - this.reset = reset; - } - - /** - * Getter for the maximum number of requests available in the current time frame. - * @return The maximum number of requests or -1 if missing. - */ - public long getLimit() { - return limit; - } - - /** - * Getter for the number of remaining requests in the current time frame. - * @return Number of remaining requests or -1 if missing. - */ - public long getRemaining() { - return remaining; - } - - /** - * Getter for the UNIX timestamp of the expected time when the rate limit will reset. - * @return The UNIX timestamp or -1 if missing. - */ - public long getReset() { - return reset; - } - - /** - * Getter for the client quota limit. - * @return The client quota limit or null if missing. - */ - public TokenQuotaBucket getClientQuotaLimit() { - return clientQuotaLimit; - } - - /** - * Getter for the organization quota limit. - * @return The organization quota limit or null if missing. - */ - public TokenQuotaBucket getOrganizationQuotaLimit() { - return organizationQuotaLimit; - } - - /** - * Getter for the retry after time in seconds. - * @return The retry after time in seconds or -1 if missing. - */ - public long getRetryAfter() { - return retryAfter; - } - - /** - * Builder class for creating instances of RateLimitException. - */ - public static class Builder { - private long limit; - private long remaining; - private long reset; - private TokenQuotaBucket clientQuotaLimit; - private TokenQuotaBucket organizationQuotaLimit; - private long retryAfter; - private Map values; - - /** - * Constructor for the Builder. - * @param limit The maximum number of requests available in the current time frame. - * @param remaining The number of remaining requests in the current time frame. - * @param reset The UNIX timestamp of the expected time when the rate limit will reset. - */ - public Builder(long limit, long remaining, long reset) { - this.limit = limit; - this.remaining = remaining; - this.reset = reset; - } - - /** - * Constructor for the Builder. - * @param limit The maximum number of requests available in the current time frame. - * @param remaining The number of remaining requests in the current time frame. - * @param reset The UNIX timestamp of the expected time when the rate limit will reset. - * @param values The values map. - */ - public Builder(long limit, long remaining, long reset, Map values) { - this.limit = limit; - this.remaining = remaining; - this.reset = reset; - this.values = values; - } - - /** - * Sets the client quota limit. - * @param clientQuotaLimit The client quota limit. - * @return The Builder instance. - */ - public Builder clientQuotaLimit(TokenQuotaBucket clientQuotaLimit) { - this.clientQuotaLimit = clientQuotaLimit; - return this; - } - - /** - * Sets the organization quota limit. - * @param organizationQuotaLimit The organization quota limit. - * @return The Builder instance. - */ - public Builder organizationQuotaLimit(TokenQuotaBucket organizationQuotaLimit) { - this.organizationQuotaLimit = organizationQuotaLimit; - return this; - } - - /** - * Sets the retry after time in seconds. - * @param retryAfter The retry after time in seconds. - * @return The Builder instance. - */ - public Builder retryAfter(long retryAfter) { - this.retryAfter = retryAfter; - return this; - } - - /** - * Sets the values map. - * @param values The values map. - * @return The Builder instance. - */ - public Builder values(Map values) { - this.values = values; - return this; - } - - public RateLimitException build() { - RateLimitException exception = (this.values != null) - ? new RateLimitException(this.limit, this.remaining, this.reset, this.values) - : new RateLimitException(this.limit, this.remaining, this.reset); - - exception.clientQuotaLimit = this.clientQuotaLimit; - exception.organizationQuotaLimit = this.organizationQuotaLimit; - exception.retryAfter = this.retryAfter; - - return exception; - } - } -} diff --git a/src/main/java/com/auth0/json/ObjectMapperProvider.java b/src/main/java/com/auth0/json/ObjectMapperProvider.java deleted file mode 100644 index 134a36697..000000000 --- a/src/main/java/com/auth0/json/ObjectMapperProvider.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.auth0.json; - -import com.fasterxml.jackson.databind.ObjectMapper; - -/** - * Provides access to a single {@link ObjectMapper} instance for the serialization and deserialization of JSON data. - * This class is for internal use only and is subject to change without notice. - */ -public class ObjectMapperProvider { - - private static final ObjectMapper objectMapper = new ObjectMapper(); - - // prevent instantiation - private ObjectMapperProvider() {} - - /** - * @return the {@code ObjectMapper} instance to process JSON data - */ - public static ObjectMapper getMapper() { - return objectMapper; - } -} diff --git a/src/main/java/com/auth0/json/auth/BackChannelAuthorizeResponse.java b/src/main/java/com/auth0/json/auth/BackChannelAuthorizeResponse.java deleted file mode 100644 index 01a6807a3..000000000 --- a/src/main/java/com/auth0/json/auth/BackChannelAuthorizeResponse.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.auth0.json.auth; - -import com.fasterxml.jackson.annotation.*; - -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -public class BackChannelAuthorizeResponse { - @JsonProperty("auth_req_id") - private String authReqId; - - @JsonProperty("expires_in") - private Long expiresIn; - - @JsonProperty("interval") - private Integer interval; - - @JsonCreator - public BackChannelAuthorizeResponse( - @JsonProperty("auth_req_id") String authReqId, - @JsonProperty("expires_in") Long expiresIn, - @JsonProperty("interval") Integer interval) { - this.authReqId = authReqId; - this.expiresIn = expiresIn; - this.interval = interval; - } - - /** - * Getter for the Auth Request ID. - * @return the Auth Request ID. - */ - public String getAuthReqId() { - return authReqId; - } - - /** - * Getter for the Expires In value. - * @return the Expires In value. - */ - public Long getExpiresIn() { - return expiresIn; - } - - /** - * Getter for the Interval value. - * @return the Interval value. - */ - public Integer getInterval() { - return interval; - } -} diff --git a/src/main/java/com/auth0/json/auth/BackChannelTokenResponse.java b/src/main/java/com/auth0/json/auth/BackChannelTokenResponse.java deleted file mode 100644 index 2eaae5125..000000000 --- a/src/main/java/com/auth0/json/auth/BackChannelTokenResponse.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.auth0.json.auth; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -public class BackChannelTokenResponse { - @JsonProperty("access_token") - private String accessToken; - - @JsonProperty("id_token") - private String idToken; - - @JsonProperty("expires_in") - private long expiresIn; - - @JsonProperty("scope") - private String scope; - - public String getAccessToken() { - return accessToken; - } - - public String getIdToken() { - return idToken; - } - - public long getExpiresIn() { - return expiresIn; - } - - public String getScope() { - return scope; - } -} diff --git a/src/main/java/com/auth0/json/auth/CreatedOobResponse.java b/src/main/java/com/auth0/json/auth/CreatedOobResponse.java deleted file mode 100644 index 32cc11aa9..000000000 --- a/src/main/java/com/auth0/json/auth/CreatedOobResponse.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.auth0.json.auth; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -public class CreatedOobResponse { - - @JsonProperty("oob_code") - private String oobCode; - - @JsonProperty("barcode_uri") - private String barcodeUri; - - @JsonProperty("authenticator_type") - private String authenticatorType; - - @JsonProperty("oob_channel") - private String oobChannel; - - @JsonProperty("recovery_codes") - private List recoveryCodes; - - public String getOobCode() { - return oobCode; - } - - public String getBarcodeUri() { - return barcodeUri; - } - - public String getAuthenticatorType() { - return authenticatorType; - } - - public List getRecoveryCodes() { - return recoveryCodes; - } - - public String getOobChannel() { - return oobChannel; - } -} diff --git a/src/main/java/com/auth0/json/auth/CreatedOtpResponse.java b/src/main/java/com/auth0/json/auth/CreatedOtpResponse.java deleted file mode 100644 index c24a35bbb..000000000 --- a/src/main/java/com/auth0/json/auth/CreatedOtpResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.auth0.json.auth; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -public class CreatedOtpResponse { - - @JsonProperty("secret") - private String secret; - - @JsonProperty("barcode_uri") - private String barcodeUri; - - @JsonProperty("authenticator_type") - private String authenticatorType; - - @JsonProperty("recovery_codes") - private List recoveryCodes; - - public String getSecret() { - return secret; - } - - public String getBarcodeUri() { - return barcodeUri; - } - - public String getAuthenticatorType() { - return authenticatorType; - } - - public List getRecoveryCodes() { - return recoveryCodes; - } -} diff --git a/src/main/java/com/auth0/json/auth/CreatedUser.java b/src/main/java/com/auth0/json/auth/CreatedUser.java deleted file mode 100644 index 4ef0f598b..000000000 --- a/src/main/java/com/auth0/json/auth/CreatedUser.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.auth0.json.auth; - -import com.fasterxml.jackson.annotation.JsonAlias; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Class that holds the data of a newly created User. Obtained after a call to {@link com.auth0.client.auth.AuthAPI#signUp(String, String, String)} - * or {@link com.auth0.client.auth.AuthAPI#signUp(String, String, String, String)}. - */ -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -public class CreatedUser { - - @JsonProperty("_id") - @JsonAlias({"_id", "id", "user_id"}) - private String userId; - - @JsonProperty("email") - private String email; - - @JsonProperty("username") - private String username; - - @JsonProperty("email_verified") - private Boolean emailVerified; - - @JsonProperty("phone_number") - private String phoneNumber; - - @JsonProperty("_id") - @JsonAlias({"_id", "id", "user_id"}) - public String getUserId() { - return userId; - } - - @JsonProperty("email") - public String getEmail() { - return email; - } - - @JsonProperty("username") - public String getUsername() { - return username; - } - - @JsonProperty("email_verified") - public Boolean isEmailVerified() { - return emailVerified; - } - - @JsonProperty("phone_number") - public String getPhoneNumber() { - return phoneNumber; - } -} diff --git a/src/main/java/com/auth0/json/auth/MfaAuthenticator.java b/src/main/java/com/auth0/json/auth/MfaAuthenticator.java deleted file mode 100644 index 67d7f80a5..000000000 --- a/src/main/java/com/auth0/json/auth/MfaAuthenticator.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.auth0.json.auth; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -public class MfaAuthenticator { - - @JsonProperty("id") - private String id; - - @JsonProperty("authenticator_type") - private String authenticatorType; - - @JsonProperty("active") - private boolean active; - - @JsonProperty("name") - private String name; - - @JsonProperty("oob_channel") - private String oobChannel; - - public String getId() { - return id; - } - - public String getAuthenticatorType() { - return authenticatorType; - } - - public boolean isActive() { - return active; - } - - public String getName() { - return name; - } - - public String getOobChannel() { - return oobChannel; - } -} diff --git a/src/main/java/com/auth0/json/auth/MfaChallengeResponse.java b/src/main/java/com/auth0/json/auth/MfaChallengeResponse.java deleted file mode 100644 index 67a0382a4..000000000 --- a/src/main/java/com/auth0/json/auth/MfaChallengeResponse.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.auth0.json.auth; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -public class MfaChallengeResponse { - - @JsonProperty("challenge_type") - private String challengeType; - - @JsonProperty("binding_method") - private String bindingMethod; - - @JsonProperty("oob_code") - private String oobCode; - - public String getChallengeType() { - return challengeType; - } - - public String getBindingMethod() { - return bindingMethod; - } - - public String getOobCode() { - return oobCode; - } -} diff --git a/src/main/java/com/auth0/json/auth/PasswordlessEmailResponse.java b/src/main/java/com/auth0/json/auth/PasswordlessEmailResponse.java deleted file mode 100644 index 16e6f85fc..000000000 --- a/src/main/java/com/auth0/json/auth/PasswordlessEmailResponse.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.auth0.json.auth; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Represents the successful response when initiating the passwordless flow via email. - */ -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -public class PasswordlessEmailResponse { - - @JsonProperty("_id") - private String id; - - @JsonProperty("email") - private String email; - - @JsonProperty("email_verified") - private Boolean emailVerified; - - /** - * The Identifier of this request. - * - * @return the identifier of this request. - */ - @JsonProperty("_id") - public String getId() { - return id; - } - - /** - * Gets the email to which the code or link was sent to. - * - * @return the email to which the code or link was sent to. - */ - @JsonProperty("email") - public String getEmail() { - return email; - } - - /** - * Whether the email address has been verified (true) or has not been verified (false). - * - * @return whether the email address has been verified (true) or has not been verified (false). - */ - @JsonProperty("email_verified") - public Boolean isEmailVerified() { - return emailVerified; - } -} diff --git a/src/main/java/com/auth0/json/auth/PasswordlessSmsResponse.java b/src/main/java/com/auth0/json/auth/PasswordlessSmsResponse.java deleted file mode 100644 index 0ef6ed985..000000000 --- a/src/main/java/com/auth0/json/auth/PasswordlessSmsResponse.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.auth0.json.auth; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Represents the successful response when initiating the passwordless flow via SMS. - */ -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -public class PasswordlessSmsResponse { - @JsonProperty("_id") - private String id; - - @JsonProperty("phone_number") - private String phoneNumber; - - @JsonProperty("phone_verified") - private Boolean phoneVerified; - - @JsonProperty("request_language") - private String requestLanguage; - - /** - * The Identifier of this request. - * - * @return the identifier of this request. - */ - @JsonProperty("_id") - public String getId() { - return id; - } - - /** - * Gets the phone number the code was sent to. - * - * @return the phone number the code was sent to. - */ - @JsonProperty("phone_number") - public String getPhoneNumber() { - return phoneNumber; - } - - /** - * Whether the phone number has been verified (true) or has not been verified (false). - * - * @return whether the phone number has been verified (true) or has not been verified (false). - */ - @JsonProperty("phone_verified") - public Boolean isPhoneVerified() { - return phoneVerified; - } - - /** - * The language of the message sent, if set. - * - * @return The language of the message sent, or null if not changed from the default. - */ - @JsonProperty("request_language") - public String getRequestLanguage() { - return requestLanguage; - } -} diff --git a/src/main/java/com/auth0/json/auth/PushedAuthorizationResponse.java b/src/main/java/com/auth0/json/auth/PushedAuthorizationResponse.java deleted file mode 100644 index e9e553ed2..000000000 --- a/src/main/java/com/auth0/json/auth/PushedAuthorizationResponse.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.auth0.json.auth; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Represents the response from a Pushed Authorization Request (PAR). - */ -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -public class PushedAuthorizationResponse { - - @JsonProperty("request_uri") - private String requestURI; - - @JsonProperty("expires_in") - private Integer expiresIn; - - @JsonCreator - public PushedAuthorizationResponse( - @JsonProperty("request_uri") String requestURI, @JsonProperty("expires_in") Integer expiresIn) { - this.requestURI = requestURI; - this.expiresIn = expiresIn; - } - - public String getRequestURI() { - return requestURI; - } - - public Integer getExpiresIn() { - return expiresIn; - } -} diff --git a/src/main/java/com/auth0/json/auth/TokenHolder.java b/src/main/java/com/auth0/json/auth/TokenHolder.java deleted file mode 100644 index 3df0638f2..000000000 --- a/src/main/java/com/auth0/json/auth/TokenHolder.java +++ /dev/null @@ -1,106 +0,0 @@ -package com.auth0.json.auth; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Date; - -/** - * Class that contains the Tokens obtained after a call to the {@link com.auth0.client.auth.AuthAPI} methods. - */ -@SuppressWarnings("unused") -@JsonDeserialize(using = TokenHolderDeserializer.class) -public class TokenHolder { - - private String accessToken; - private String idToken; - private String refreshToken; - private String tokenType; - private long expiresIn; - private String scope; - private Date expiresAt; - - // We need to maintain a default constructor for backwards-compatibility - @SuppressWarnings("unused") - public TokenHolder() {} - - public TokenHolder( - String accessToken, - String idToken, - String refreshToken, - String tokenType, - long expiresIn, - String scope, - Date expiresAt) { - this.accessToken = accessToken; - this.idToken = idToken; - this.refreshToken = refreshToken; - this.tokenType = tokenType; - this.expiresIn = expiresIn; - this.scope = scope; - this.expiresAt = expiresAt; - } - - /** - * Getter for the Auth0's access token. - * - * @return the access token or null if missing. - */ - public String getAccessToken() { - return accessToken; - } - - /** - * Getter for the Auth0's id token. - * - * @return the id token or null if missing. - */ - public String getIdToken() { - return idToken; - } - - /** - * Getter for the Auth0's refresh token. - * - * @return the refresh token or null if missing. - */ - public String getRefreshToken() { - return refreshToken; - } - - /** - * Getter for the token type. - * - * @return the token type or null if missing. - */ - public String getTokenType() { - return tokenType; - } - - /** - * Getter for the duration of the Access Token token in seconds from the time it was issued. If no Access Token was - * present the value will be zero. - * - * @return the number of seconds in which the Access Token token will expire, from the time it was issued. - */ - public long getExpiresIn() { - return expiresIn; - } - - /** - * Get the expiration date of the Access Token. This value is not part of the actual token response from the - * API, but rather is calculated and provided for convenience. - * - * @return the date of the Access Token's expiration. If no Access Token was present on the response, returns {@code null} - */ - public Date getExpiresAt() { - return expiresAt; - } - - /** - * Gets the granted scope value for this token. - * - * @return a space-delimited string of the granted scopes of this token. - */ - public String getScope() { - return scope; - } -} diff --git a/src/main/java/com/auth0/json/auth/TokenHolderDeserializer.java b/src/main/java/com/auth0/json/auth/TokenHolderDeserializer.java deleted file mode 100644 index b6d34ed44..000000000 --- a/src/main/java/com/auth0/json/auth/TokenHolderDeserializer.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.auth0.json.auth; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import java.io.IOException; -import java.time.Instant; -import java.util.Date; - -/** - * A custom Jackson Deserializer for the {@linkplain TokenHolder} object. It deserializes the JSON response and calculates - * an {@code expiresAt} date derived from the current time and the {@code expires_at} returned on the response. - */ -public class TokenHolderDeserializer extends StdDeserializer { - - @SuppressWarnings("unused") - public TokenHolderDeserializer() { - this(null); - } - - public TokenHolderDeserializer(Class clazz) { - super(clazz); - } - - @Override - public TokenHolder deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - JsonNode node = p.getCodec().readTree(p); - - JsonNode accessTokenNode = node.get("access_token"); - JsonNode idTokenNode = node.get("id_token"); - JsonNode refreshTokenNode = node.get("refresh_token"); - JsonNode tokenTypeNode = node.get("token_type"); - JsonNode scopeNode = node.get("scope"); - JsonNode expiresInNode = node.get("expires_in"); - - String accessToken = accessTokenNode != null ? accessTokenNode.asText() : null; - String idToken = idTokenNode != null ? idTokenNode.asText() : null; - String refreshToken = refreshTokenNode != null ? refreshTokenNode.asText() : null; - String tokenType = tokenTypeNode != null ? tokenTypeNode.asText() : null; - String scope = scopeNode != null ? scopeNode.asText() : null; - - // As a primitive, if expires_in is not sent on the response, value will be 0 instead of null - long expiresIn = expiresInNode != null ? expiresInNode.asLong() : 0L; - Date expiresAt = expiresInNode != null ? Date.from(Instant.now().plusSeconds(expiresIn)) : null; - - return new TokenHolder(accessToken, idToken, refreshToken, tokenType, expiresIn, scope, expiresAt); - } -} diff --git a/src/main/java/com/auth0/json/auth/UserInfo.java b/src/main/java/com/auth0/json/auth/UserInfo.java deleted file mode 100644 index 118012eeb..000000000 --- a/src/main/java/com/auth0/json/auth/UserInfo.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.auth0.json.auth; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import java.io.Serializable; -import java.util.HashMap; -import java.util.Map; - -/** - * Class that holds the Information related to a User's Access Token. Obtained after a call to {@link com.auth0.client.auth.AuthAPI#userInfo(String)}, - * {@link com.auth0.client.auth.AuthAPI#signUp(String, String, String)} or {@link com.auth0.client.auth.AuthAPI#signUp(String, String, String, String)}. - */ -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -public class UserInfo implements Serializable { - - private final Map values; - - UserInfo() { - values = new HashMap<>(); - } - - @JsonAnySetter - void setValue(String key, Object value) { - values.put(key, value); - } - - /** - * Getter for the values contained in this object - * - * @return the values contained in the object. - */ - @JsonAnyGetter - public Map getValues() { - return values; - } -} diff --git a/src/main/java/com/auth0/net/BaseRequest.java b/src/main/java/com/auth0/net/BaseRequest.java deleted file mode 100644 index 00510f4be..000000000 --- a/src/main/java/com/auth0/net/BaseRequest.java +++ /dev/null @@ -1,281 +0,0 @@ -package com.auth0.net; - -import com.auth0.client.mgmt.TokenProvider; -import com.auth0.exception.APIException; -import com.auth0.exception.Auth0Exception; -import com.auth0.exception.RateLimitException; -import com.auth0.json.ObjectMapperProvider; -import com.auth0.net.client.*; -import com.auth0.utils.HttpResponseHeadersUtils; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.type.MapType; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.concurrent.CompletableFuture; - -/** - * A request class that is able to interact fluently with the Auth0 server. - * The default content type of this request is "application/json". - *

- * This class is not thread-safe: - * It makes use of {@link HashMap} for storing the parameters. Make sure to not modify headers or the parameters - * from a different or un-synchronized thread. - * - * @param The type expected to be received as part of the response. - */ -public class BaseRequest implements Request { - - private static final String CONTENT_TYPE_APPLICATION_JSON = "application/json"; - - private final String url; - private final HttpMethod method; - private final ObjectMapper mapper; - private final Map headers; - private final TypeReference tType; - private final Map parameters; - private Object body; - - private static final int STATUS_CODE_TOO_MANY_REQUEST = 429; - - private final Auth0HttpClient client; - private final TokenProvider tokenProvider; - - BaseRequest( - Auth0HttpClient client, - TokenProvider tokenProvider, - String url, - HttpMethod method, - ObjectMapper mapper, - TypeReference tType) { - this.client = client; - this.tokenProvider = tokenProvider; - this.url = url; - this.method = method; - this.mapper = mapper; - this.headers = new HashMap<>(); - this.tType = tType; - this.parameters = new HashMap<>(); - } - - public BaseRequest( - Auth0HttpClient client, - TokenProvider tokenProvider, - String url, - HttpMethod method, - TypeReference tType) { - this(client, tokenProvider, url, method, ObjectMapperProvider.getMapper(), tType); - } - - protected Auth0HttpRequest createRequest(String apiToken) throws Auth0Exception { - HttpRequestBody body; - try { - body = this.createRequestBody(); - } catch (IOException e) { - throw new Auth0Exception("Couldn't create the request body.", e); - } - headers.put("Content-Type", getContentType()); - // Auth APIs don't take tokens - if (Objects.nonNull(apiToken)) { - headers.put("Authorization", "Bearer " + apiToken); - } - Auth0HttpRequest request = Auth0HttpRequest.newBuilder(url, method) - .withBody(body) - .withHeaders(headers) - .build(); - - return request; - } - - protected T parseResponseBody(Auth0HttpResponse response) throws Auth0Exception { - if (!response.isSuccessful()) { - throw createResponseException(response); - } - - try { - return readResponseBody(response); - } catch (IOException e) { - throw new APIException("Failed to parse the response body.", response.getCode(), e); - } - } - - /** - * Responsible for creating the payload that will be set as body on this request. - * - * @return the body to send as part of the request. - * @throws IOException if an error is raised during the creation of the body. - */ - @SuppressWarnings("deprecation") - protected HttpRequestBody createRequestBody() throws IOException { - if (body == null && parameters.isEmpty()) { - return null; - } - byte[] jsonBody = mapper.writeValueAsBytes(body != null ? body : parameters); - return HttpRequestBody.create(CONTENT_TYPE_APPLICATION_JSON, jsonBody); - } - - /** - * Responsible for parsing the payload that is received as part of the response. - * - * @param response the received response. The body buffer will automatically closed. - * @return the instance of type T, result of interpreting the payload. - * @throws IOException if an error is raised during the parsing of the body. - */ - protected T readResponseBody(Auth0HttpResponse response) throws IOException { - String payload = response.getBody(); - return mapper.readValue(payload, tType); - } - - protected Map getParameters() { - return this.parameters; - } - /** - * Executes this request. - * - * @return the response body JSON decoded as T - * @throws Auth0Exception if the request execution fails. - */ - @Override - public Response execute() throws Auth0Exception { - String apiToken = null; - if (Objects.nonNull(tokenProvider)) { - apiToken = tokenProvider.getToken(); - } - Auth0HttpRequest request = createRequest(apiToken); - try { - Auth0HttpResponse response = client.sendRequest(request); - T body = parseResponseBody(response); - return new ResponseImpl(response.getHeaders(), body, response.getCode()); - } catch (Auth0Exception e) { - throw e; - } catch (IOException ioe) { - throw new Auth0Exception("Failed to execute the request", ioe); - } - } - - @Override - public CompletableFuture> executeAsync() { - final CompletableFuture> future = new CompletableFuture<>(); - - if (Objects.nonNull(tokenProvider)) { - return tokenProvider.getTokenAsync().thenCompose(token -> { - try { - return client.sendRequestAsync(createRequest(token)).thenCompose(this::getResponseFuture); - } catch (Auth0Exception e) { - future.completeExceptionally(e); - return future; - } - }); - } - - try { - return client.sendRequestAsync(createRequest(null)).thenCompose(this::getResponseFuture); - } catch (Auth0Exception e) { - future.completeExceptionally(e); - return future; - } - } - - private CompletableFuture> getResponseFuture(Auth0HttpResponse httpResponse) { - CompletableFuture> future = new CompletableFuture<>(); - try { - T body = parseResponseBody(httpResponse); - future = CompletableFuture.completedFuture( - new ResponseImpl<>(httpResponse.getHeaders(), body, httpResponse.getCode())); - } catch (Auth0Exception e) { - future.completeExceptionally(e); - return future; - } - return future; - } - - /** - * Getter for the content-type header value to use on this request - * - * @return the content-type - */ - protected String getContentType() { - return CONTENT_TYPE_APPLICATION_JSON; - } - - /** - * Responsible for parsing an unsuccessful request (status code other than 200) - * and generating a developer-friendly exception with the error details. - * - * @param response the unsuccessful response, as received. If its body is accessed, the buffer must be closed. - * @return the exception with the error details. - */ - protected Auth0Exception createResponseException(Auth0HttpResponse response) { - if (response.getCode() == STATUS_CODE_TOO_MANY_REQUEST) { - return createRateLimitException(response); - } - - String payload = response.getBody(); - MapType mapType = mapper.getTypeFactory().constructMapType(HashMap.class, String.class, Object.class); - try { - Map values = mapper.readValue(payload, mapType); - return new APIException(values, response.getCode()); - } catch (IOException e) { - return new APIException(payload, response.getCode(), e); - } - } - - private RateLimitException createRateLimitException(Auth0HttpResponse response) { - // -1 as default value if the header could not be found. - long limit = Long.parseLong(response.getHeader("x-ratelimit-limit", "-1")); - long remaining = Long.parseLong(response.getHeader("x-ratelimit-remaining", "-1")); - long reset = Long.parseLong(response.getHeader("x-ratelimit-reset", "-1")); - - TokenQuotaBucket clientQuotaLimit = HttpResponseHeadersUtils.getClientQuotaLimit(response.getHeaders()); - TokenQuotaBucket organizationQuotaLimit = - HttpResponseHeadersUtils.getOrganizationQuotaLimit(response.getHeaders()); - - long retryAfter = Long.parseLong(response.getHeader("retry-after", "-1")); - - String payload = response.getBody(); - MapType mapType = mapper.getTypeFactory().constructMapType(HashMap.class, String.class, Object.class); - try { - Map values = mapper.readValue(payload, mapType); - - RateLimitException.Builder builder = new RateLimitException.Builder(limit, remaining, reset, values); - - builder.clientQuotaLimit(clientQuotaLimit); - builder.organizationQuotaLimit(organizationQuotaLimit); - builder.retryAfter(retryAfter); - - return builder.build(); - } catch (IOException e) { - RateLimitException.Builder builder = new RateLimitException.Builder(limit, remaining, reset); - builder.clientQuotaLimit(clientQuotaLimit); - builder.organizationQuotaLimit(organizationQuotaLimit); - builder.retryAfter(retryAfter); - return builder.build(); - } - } - - /** - * Adds an HTTP header to the request - * - * @param name the name of the header - * @param value the value of the header - * @return this same request instance - */ - public BaseRequest addHeader(String name, String value) { - headers.put(name, value); - return this; - } - - @Override - public BaseRequest addParameter(String name, Object value) { - parameters.put(name, value); - return this; - } - - @Override - public BaseRequest setBody(Object value) { - body = value; - return this; - } -} diff --git a/src/main/java/com/auth0/net/EmptyBodyRequest.java b/src/main/java/com/auth0/net/EmptyBodyRequest.java deleted file mode 100644 index 464c60af9..000000000 --- a/src/main/java/com/auth0/net/EmptyBodyRequest.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.auth0.net; - -import com.auth0.client.mgmt.TokenProvider; -import com.auth0.net.client.Auth0HttpClient; -import com.auth0.net.client.HttpMethod; -import com.auth0.net.client.HttpRequestBody; -import com.fasterxml.jackson.core.type.TypeReference; - -/** - * Request class that does not accept parameters to be sent as part of its body. - * The content type of this request is "application/json". - * - * @param The type expected to be received as part of the response. - * @see BaseRequest - */ -public class EmptyBodyRequest extends BaseRequest { - - public EmptyBodyRequest( - Auth0HttpClient client, - TokenProvider tokenProvider, - String url, - HttpMethod method, - TypeReference tType) { - super(client, tokenProvider, url, method, tType); - } - - @Override - @SuppressWarnings("deprecation") - protected HttpRequestBody createRequestBody() { - return HttpRequestBody.create("application/json", new byte[0]); - } - - @Override - public EmptyBodyRequest addParameter(String name, Object value) { - // do nothing - return this; - } -} diff --git a/src/main/java/com/auth0/net/FormBodyRequest.java b/src/main/java/com/auth0/net/FormBodyRequest.java deleted file mode 100644 index 7939f907b..000000000 --- a/src/main/java/com/auth0/net/FormBodyRequest.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.auth0.net; - -import com.auth0.client.mgmt.TokenProvider; -import com.auth0.json.ObjectMapperProvider; -import com.auth0.net.client.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.IOException; - -/** - * Represents a form request. - * @param The type expected to be received as part of the response. - */ -public class FormBodyRequest extends BaseRequest { - - private static final String CONTENT_TYPE_FORM_DATA = "application/x-www-form-urlencoded"; - - FormBodyRequest( - Auth0HttpClient client, - TokenProvider tokenProvider, - String url, - HttpMethod method, - ObjectMapper mapper, - TypeReference tType) { - super(client, tokenProvider, url, method, mapper, tType); - } - - public FormBodyRequest( - Auth0HttpClient client, - TokenProvider tokenProvider, - String url, - HttpMethod method, - TypeReference tType) { - this(client, tokenProvider, url, method, ObjectMapperProvider.getMapper(), tType); - } - - @Override - protected HttpRequestBody createRequestBody() throws IOException { - return HttpRequestBody.create(CONTENT_TYPE_FORM_DATA, new Auth0FormRequestBody(super.getParameters())); - } - - @Override - protected String getContentType() { - return CONTENT_TYPE_FORM_DATA; - } -} diff --git a/src/main/java/com/auth0/net/MultipartRequest.java b/src/main/java/com/auth0/net/MultipartRequest.java deleted file mode 100644 index 5e0e1085d..000000000 --- a/src/main/java/com/auth0/net/MultipartRequest.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.auth0.net; - -import static com.auth0.utils.Asserts.assertNotNull; - -import com.auth0.client.mgmt.TokenProvider; -import com.auth0.json.ObjectMapperProvider; -import com.auth0.net.client.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.IOException; -import java.util.HashMap; - -/** - * Request class that accepts parts to be sent encoded in a form. - * The content type of this request is "multipart/form-data". - *

- * This class is not thread-safe: - * It makes use of {@link HashMap} for storing the parameters. Make sure to not modify headers or the parameters - * from a different or un-synchronized thread. - * - * @param The type expected to be received as part of the response. - * @see BaseRequest - */ -public class MultipartRequest extends BaseRequest { - - private static final String CONTENT_TYPE_FORM_DATA = "multipart/form-data"; - private final Auth0MultipartRequestBody.Builder bodyBuilder; - - private final TypeReference tType; - private final ObjectMapper mapper; - private int partsCount; - - MultipartRequest( - Auth0HttpClient client, - TokenProvider tokenProvider, - String url, - HttpMethod method, - ObjectMapper mapper, - TypeReference tType) { - super(client, tokenProvider, url, method, mapper, tType); - if (HttpMethod.GET.equals(method)) { - throw new IllegalArgumentException("Multipart/form-data requests do not support the GET method."); - } - this.mapper = mapper; - this.tType = tType; - this.bodyBuilder = Auth0MultipartRequestBody.newBuilder(); - } - - public MultipartRequest( - Auth0HttpClient client, - TokenProvider tokenProvider, - String url, - HttpMethod method, - TypeReference tType) { - this(client, tokenProvider, url, method, ObjectMapperProvider.getMapper(), tType); - } - - @Override - protected String getContentType() { - return CONTENT_TYPE_FORM_DATA; - } - - @Override - protected HttpRequestBody createRequestBody() throws IOException { - if (partsCount == 0) { - throw new IOException("Cannot create multipart/form-data request body with zero parts."); - } - return HttpRequestBody.create("application/json", bodyBuilder.build()); - } - - @Override - protected T readResponseBody(Auth0HttpResponse response) throws IOException { - String payload = response.getBody(); - return mapper.readValue(payload, tType); - } - - @Override - public MultipartRequest addHeader(String name, String value) { - // This is to avoid returning a different type - super.addHeader(name, value); - return this; - } - - /** - * Adds a key-value part to the form of this request - * - * @param name the name of the part - * @param value the value of the part - * @return this same request instance - */ - public MultipartRequest addPart(String name, String value) { - assertNotNull(name, "name"); - assertNotNull(value, "value"); - bodyBuilder.withPart(name, value); - partsCount++; - return this; - } -} diff --git a/src/main/java/com/auth0/net/RateLimitInterceptor.java b/src/main/java/com/auth0/net/RateLimitInterceptor.java deleted file mode 100644 index e73b3ed36..000000000 --- a/src/main/java/com/auth0/net/RateLimitInterceptor.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.auth0.net; - -import com.auth0.exception.Auth0Exception; -import com.auth0.net.client.DefaultHttpClient; -import java.io.IOException; -import java.time.temporal.ChronoUnit; -import net.jodah.failsafe.Failsafe; -import net.jodah.failsafe.FailsafeException; -import net.jodah.failsafe.RetryPolicy; -import net.jodah.failsafe.event.ExecutionAttemptedEvent; -import net.jodah.failsafe.function.CheckedConsumer; -import okhttp3.Interceptor; -import okhttp3.Response; -import org.jetbrains.annotations.NotNull; - -/** - * An OkHttp {@linkplain Interceptor} responsible for retrying rate-limit errors (429) using a configurable maximum - * number of retries, and an exponential backoff on retry attempts. - *

- * Note: This class is not intended for general use or extension, and may change at any time. - *

- * @see DefaultHttpClient - */ -public class RateLimitInterceptor implements Interceptor { - - private final int maxRetries; - private final CheckedConsumer> retryListener; - - static final Long INITIAL_INTERVAL = 100L; - static final Long MAX_INTERVAL = 1000L; - static final Double JITTER = 0.2D; - - /** - * Constructs a new instance with the maximum number of allowed retries. - * @param maxRetries the maximum number of consecutive retries to attempt. - */ - public RateLimitInterceptor(int maxRetries) { - this(maxRetries, null); - } - - /** - * Visible for testing purposes only. - * @param maxRetries the maximum number of consecutive retries to attempt. - * @param retryListener a listener to call prior to a retry attempt. - */ - RateLimitInterceptor(int maxRetries, CheckedConsumer> retryListener) { - this.maxRetries = maxRetries; - this.retryListener = retryListener; - } - - /** - * @return the configured number of maximum retries. - */ - public int getMaxRetries() { - return maxRetries; - } - - @NotNull - @Override - public Response intercept(@NotNull Chain chain) throws IOException { - if (maxRetries == 0) { - return chain.proceed(chain.request()); - } - - RetryPolicy retryPolicy = new RetryPolicy() - .withMaxRetries(maxRetries) - .withBackoff(INITIAL_INTERVAL, MAX_INTERVAL, ChronoUnit.MILLIS) - .withJitter(JITTER) - .handleResultIf(response -> response.code() == 429); - - // For testing purposes only, allow test to hook into retry listener to enable verification of retry backoff - if (retryListener != null) { - retryPolicy.onRetry(retryListener); - } - - try { - return Failsafe.with(retryPolicy).get((context) -> { - // ensure response of last recorded response prior to retry is closed - if (context.getLastResult() != null) { - context.getLastResult().close(); - ; - } - return chain.proceed(chain.request()); - }); - } catch (FailsafeException fe) { - // throw Auth0Exception instead of FailSafe exception on error - // see https://github.com/auth0/auth0-java/issues/483 - throw new Auth0Exception("Failed to execute request", fe.getCause()); - } - } -} diff --git a/src/main/java/com/auth0/net/Request.java b/src/main/java/com/auth0/net/Request.java deleted file mode 100644 index 8f5f8f264..000000000 --- a/src/main/java/com/auth0/net/Request.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.auth0.net; - -import com.auth0.exception.APIException; -import com.auth0.exception.Auth0Exception; -import java.util.concurrent.CompletableFuture; - -/** - * Class that represents an HTTP Request that can be executed. - * - * @param the type of payload expected in the response after the execution. - */ -public interface Request { - - /** - * Executes this request synchronously. - * - * @return a {@link Response} containing information about the response. - * @throws APIException if the request was executed but the response wasn't successful. - * @throws Auth0Exception if the request couldn't be created or executed successfully. - */ - Response execute() throws Auth0Exception; - - /** - * Executes this request asynchronously. - * - * @return a {@linkplain CompletableFuture} representing the specified request. - */ - CompletableFuture> executeAsync(); - - /** - * Adds an HTTP header to the request - * - * @param name the name of the header - * @param value the value of the header - * @return this same request instance - */ - Request addHeader(String name, String value); - - /** - * Adds an body parameter to the request - * - * @param name the name of the parameter - * @param value the value of the parameter - * @return this same request instance - */ - Request addParameter(String name, Object value); - - /** - * Sets the response's body directly - * - * @param body the value to set as body - * @return this same request instance - */ - Request setBody(Object body); -} diff --git a/src/main/java/com/auth0/net/Response.java b/src/main/java/com/auth0/net/Response.java deleted file mode 100644 index 4064f1b9c..000000000 --- a/src/main/java/com/auth0/net/Response.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.auth0.net; - -import java.util.Map; - -/** - * Represents the response of an HTTP request executed by {@link Request}. - * - * @param the type of the parsed response body. - */ -public interface Response { - - /** - * @return the HTTP response headers. - */ - Map getHeaders(); - - /** - * @return the response body. - */ - T getBody(); - - /** - * @return the HTTP status code. - */ - int getStatusCode(); -} diff --git a/src/main/java/com/auth0/net/ResponseImpl.java b/src/main/java/com/auth0/net/ResponseImpl.java deleted file mode 100644 index 7cd35b996..000000000 --- a/src/main/java/com/auth0/net/ResponseImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.auth0.net; - -import java.util.Collections; -import java.util.Map; - -class ResponseImpl implements Response { - - private final Map headers; - private final T body; - private final int statusCode; - - ResponseImpl(Map headers, T body, int statusCode) { - this.headers = Collections.unmodifiableMap(headers); - this.body = body; - this.statusCode = statusCode; - } - - @Override - public Map getHeaders() { - return headers; - } - - @Override - public T getBody() { - return body; - } - - @Override - public int getStatusCode() { - return statusCode; - } -} diff --git a/src/main/java/com/auth0/net/SignUpRequest.java b/src/main/java/com/auth0/net/SignUpRequest.java deleted file mode 100644 index 6fc1e5e43..000000000 --- a/src/main/java/com/auth0/net/SignUpRequest.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.auth0.net; - -import com.auth0.json.auth.CreatedUser; -import com.auth0.net.client.Auth0HttpClient; -import com.auth0.net.client.HttpMethod; -import com.fasterxml.jackson.core.type.TypeReference; -import java.util.Map; - -/** - * Class that represents a Create User call. - */ -public class SignUpRequest extends BaseRequest { - - public SignUpRequest(Auth0HttpClient client, String url) { - super(client, null, url, HttpMethod.POST, new TypeReference() {}); - } - - /** - * Setter for the additional fields to set when creating a user. - * - * @param customFields the list of custom fields. - * @return this request instance. - */ - public SignUpRequest setCustomFields(Map customFields) { - super.addParameter("user_metadata", customFields); - return this; - } -} diff --git a/src/main/java/com/auth0/net/Telemetry.java b/src/main/java/com/auth0/net/Telemetry.java deleted file mode 100644 index 76247b42f..000000000 --- a/src/main/java/com/auth0/net/Telemetry.java +++ /dev/null @@ -1,105 +0,0 @@ -package com.auth0.net; - -import com.auth0.json.ObjectMapperProvider; -import com.fasterxml.jackson.core.JsonProcessingException; -import java.util.Base64; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -/** - * Representation of the client information sent by this SDK on every request. - *

- * This class is thread-safe. - * - * @see TelemetryInterceptor - */ -@SuppressWarnings("WeakerAccess") -public class Telemetry { - static final String HEADER_NAME = "Auth0-Client"; - - private static final String JAVA_SPECIFICATION_VERSION = "java.specification.version"; - private static final String NAME_KEY = "name"; - private static final String VERSION_KEY = "version"; - private static final String LIBRARY_VERSION_KEY = "auth0-java"; - private static final String ENV_KEY = "env"; - private static final String JAVA_KEY = "java"; - - private final String name; - private final String version; - private final String libraryVersion; - private final Map env; - private final String value; - - public Telemetry(String name, String version) { - this(name, version, null); - } - - public Telemetry(String name, String version, String libraryVersion) { - this.name = name; - this.version = version; - this.libraryVersion = libraryVersion; - - if (name == null) { - env = Collections.emptyMap(); - value = null; - return; - } - - Map values = new HashMap<>(); - values.put(NAME_KEY, name); - if (version != null) { - values.put(VERSION_KEY, version); - } - - HashMap tmpEnv = new HashMap<>(); - tmpEnv.put(JAVA_KEY, getJDKVersion()); - if (libraryVersion != null) { - tmpEnv.put(LIBRARY_VERSION_KEY, libraryVersion); - } - this.env = Collections.unmodifiableMap(tmpEnv); - values.put(ENV_KEY, env); - - String tmpValue; - try { - String json = ObjectMapperProvider.getMapper().writeValueAsString(values); - tmpValue = Base64.getUrlEncoder().encodeToString(json.getBytes()); - } catch (JsonProcessingException e) { - tmpValue = null; - e.printStackTrace(); - } - value = tmpValue; - } - - public String getName() { - return name; - } - - public String getVersion() { - return version; - } - - // Visible for testing - String getLibraryVersion() { - return libraryVersion; - } - - // Visible for testing - Map getEnvironment() { - return env; - } - - public String getValue() { - return value; - } - - private String getJDKVersion() { - String version; - try { - version = System.getProperty(JAVA_SPECIFICATION_VERSION); - } catch (Exception ignored) { - version = Runtime.class.getPackage().getSpecificationVersion(); - } - return version; - } -} diff --git a/src/main/java/com/auth0/net/TelemetryInterceptor.java b/src/main/java/com/auth0/net/TelemetryInterceptor.java deleted file mode 100644 index 43cd44f51..000000000 --- a/src/main/java/com/auth0/net/TelemetryInterceptor.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.auth0.net; - -import java.io.IOException; -import okhttp3.Interceptor; -import okhttp3.Response; - -/** - * OkHttp Interceptor implementation that adds the auth0-client header - * to every request made by this SDK. - * - * @see Interceptor - */ -public class TelemetryInterceptor implements Interceptor { - - private Telemetry telemetry; - private boolean enabled; - - public TelemetryInterceptor() { - this(new Telemetry("auth0-java", Telemetry.class.getPackage().getImplementationVersion())); - } - - TelemetryInterceptor(Telemetry telemetry) { - this.telemetry = telemetry; - this.enabled = true; - } - - @Override - public Response intercept(Chain chain) throws IOException { - if (!enabled) { - return chain.proceed(chain.request()); - } - - okhttp3.Request request = chain.request() - .newBuilder() - .addHeader(Telemetry.HEADER_NAME, telemetry.getValue()) - .build(); - return chain.proceed(request); - } - - public void setTelemetry(Telemetry telemetry) { - this.telemetry = telemetry; - } - - public Telemetry getTelemetry() { - return this.telemetry; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - public boolean isEnabled() { - return enabled; - } -} diff --git a/src/main/java/com/auth0/net/TokenQuotaBucket.java b/src/main/java/com/auth0/net/TokenQuotaBucket.java deleted file mode 100644 index 79a4b5a11..000000000 --- a/src/main/java/com/auth0/net/TokenQuotaBucket.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.auth0.net; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -public class TokenQuotaBucket { - private TokenQuotaLimit perHour; - private TokenQuotaLimit perDay; - - /** - * Constructor for TokenQuotaBucket. - */ - public TokenQuotaBucket(TokenQuotaLimit perHour, TokenQuotaLimit perDay) { - this.perHour = perHour; - this.perDay = perDay; - } - - /** - * @return the number of client credentials allowed per hour - */ - public TokenQuotaLimit getPerHour() { - return perHour; - } - - /** - * @return the number of client credentials allowed per hour - */ - public TokenQuotaLimit getPerDay() { - return perDay; - } -} diff --git a/src/main/java/com/auth0/net/TokenQuotaLimit.java b/src/main/java/com/auth0/net/TokenQuotaLimit.java deleted file mode 100644 index 966147ed3..000000000 --- a/src/main/java/com/auth0/net/TokenQuotaLimit.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.auth0.net; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -public class TokenQuotaLimit { - private int quota; - private int remaining; - private int resetAfter; - - public TokenQuotaLimit(int quota, int remaining, int resetAfter) { - this.quota = quota; - this.remaining = remaining; - this.resetAfter = resetAfter; - } - - public int getQuota() { - return quota; - } - - public int getRemaining() { - return remaining; - } - - public int getResetAfter() { - return resetAfter; - } -} diff --git a/src/main/java/com/auth0/net/TokenRequest.java b/src/main/java/com/auth0/net/TokenRequest.java deleted file mode 100644 index 800c5f4a3..000000000 --- a/src/main/java/com/auth0/net/TokenRequest.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.auth0.net; - -import com.auth0.json.auth.TokenHolder; -import com.auth0.net.client.Auth0HttpClient; -import com.auth0.net.client.HttpMethod; -import com.fasterxml.jackson.core.type.TypeReference; - -/** - * Class that represents an OAuth 2.0 Authentication/Authorization request. The execution will return a {@link TokenHolder}. - */ -public class TokenRequest extends BaseRequest { - - public TokenRequest(Auth0HttpClient client, String url) { - super(client, null, url, HttpMethod.POST, new TypeReference() {}); - } - - /** - * Setter for the realm value to request - * - * @param realm the realm to request - * @return this request instance. - */ - public TokenRequest setRealm(String realm) { - super.addParameter("realm", realm); - return this; - } - - /** - * Setter for the audience value to request - * - * @param audience the audience to request - * @return this request instance. - */ - public TokenRequest setAudience(String audience) { - super.addParameter("audience", audience); - return this; - } - - /** - * Setter for the scope value to request - * - * @param scope the scope to request - * @return this request instance. - */ - public TokenRequest setScope(String scope) { - super.addParameter("scope", scope); - return this; - } -} diff --git a/src/main/java/com/auth0/net/VoidRequest.java b/src/main/java/com/auth0/net/VoidRequest.java deleted file mode 100644 index 293556925..000000000 --- a/src/main/java/com/auth0/net/VoidRequest.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.auth0.net; - -import com.auth0.client.mgmt.TokenProvider; -import com.auth0.exception.Auth0Exception; -import com.auth0.net.client.Auth0HttpClient; -import com.auth0.net.client.Auth0HttpResponse; -import com.auth0.net.client.HttpMethod; -import com.fasterxml.jackson.core.type.TypeReference; -import java.util.HashMap; - -/** - * Represents a request that doesn't return any value on its success. - *

- * This class is not thread-safe: - * It makes use of {@link HashMap} for storing the parameters. Make sure to not modify headers or the parameters - * from a different or un-synchronized thread. - * - * @see BaseRequest - */ -public class VoidRequest extends BaseRequest { - - public VoidRequest(Auth0HttpClient client, TokenProvider tokenProvider, String url, HttpMethod method) { - super(client, tokenProvider, url, method, new TypeReference() {}); - } - - @Override - protected Void parseResponseBody(Auth0HttpResponse response) throws Auth0Exception { - if (!response.isSuccessful()) { - throw super.createResponseException(response); - } - return null; - } -} diff --git a/src/main/java/com/auth0/net/client/Auth0FormRequestBody.java b/src/main/java/com/auth0/net/client/Auth0FormRequestBody.java deleted file mode 100644 index dc79469fe..000000000 --- a/src/main/java/com/auth0/net/client/Auth0FormRequestBody.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.auth0.net.client; - -import java.util.Map; - -/** - * Represents the body of a application/x-www-form-urlencoded request - */ -public class Auth0FormRequestBody { - - private final Map params; - - public Auth0FormRequestBody(Map params) { - this.params = params; - } - - public Map getParams() { - return params; - } -} diff --git a/src/main/java/com/auth0/net/client/Auth0HttpClient.java b/src/main/java/com/auth0/net/client/Auth0HttpClient.java deleted file mode 100644 index d415f13ac..000000000 --- a/src/main/java/com/auth0/net/client/Auth0HttpClient.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.auth0.net.client; - -import java.io.IOException; -import java.util.concurrent.CompletableFuture; - -/** - * The HttpClient interface defines how HTTP requests to the Auth0 APIs are made. - */ -public interface Auth0HttpClient { - - /** - * Builds, executes, and returns the result of a synchronous HTTP request to an Auth0 API. - * @param request the request to send. - * @return the response returned by the executed request. - * @throws IOException if the request can not be completed due to a network timeout or interruption. - */ - Auth0HttpResponse sendRequest(Auth0HttpRequest request) throws IOException; - - /** - * Builds and executes an asynchronous HTTP request to an Auth0 API. - * @param request the request to send. - * @return the {@link CompletableFuture} that represents the result of the asynchronous HTTP request. - */ - CompletableFuture sendRequestAsync(Auth0HttpRequest request); -} diff --git a/src/main/java/com/auth0/net/client/Auth0HttpRequest.java b/src/main/java/com/auth0/net/client/Auth0HttpRequest.java deleted file mode 100644 index c63f2a6ab..000000000 --- a/src/main/java/com/auth0/net/client/Auth0HttpRequest.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.auth0.net.client; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -public class Auth0HttpRequest { - - private final String url; - private final Map headers; - private final HttpRequestBody body; - - private final HttpMethod method; - - public static Builder newBuilder(String url, HttpMethod method) { - return new Builder(url, method); - } - - private Auth0HttpRequest(Builder builder) { - this.url = builder.url; - this.method = builder.method; - this.body = builder.body; - this.headers = Objects.nonNull(builder.headers) ? new HashMap<>(builder.headers) : new HashMap<>(); - } - - public String getUrl() { - return url; - } - - public Map getHeaders() { - return headers; - } - - public HttpRequestBody getBody() { - return body; - } - - public HttpMethod getMethod() { - return method; - } - - public static class Builder { - private final String url; - private Map headers; - private HttpRequestBody body; - - private final HttpMethod method; - - private Builder(String url, HttpMethod method) { - this.url = url; - this.method = method; - } - - public Builder withHeaders(Map headers) { - this.headers = headers; - return this; - } - - public Builder withBody(HttpRequestBody body) { - this.body = body; - return this; - } - - public Auth0HttpRequest build() { - return new Auth0HttpRequest(this); - } - } -} diff --git a/src/main/java/com/auth0/net/client/Auth0HttpResponse.java b/src/main/java/com/auth0/net/client/Auth0HttpResponse.java deleted file mode 100644 index e7c7a8f38..000000000 --- a/src/main/java/com/auth0/net/client/Auth0HttpResponse.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.auth0.net.client; - -import com.auth0.utils.Asserts; -import java.util.HashMap; -import java.util.Map; - -public class Auth0HttpResponse { - - private final int code; - private final String body; - - private final Map headers; - - private Auth0HttpResponse(Builder builder) { - Asserts.assertNotNull(builder.code, "response code"); - Asserts.assertNotNull(builder.headers, "response headers"); - this.code = builder.code; - this.body = builder.body; - this.headers = new HashMap<>(builder.headers); - } - - public static Builder newBuilder() { - return new Builder(); - } - - public boolean isSuccessful() { - return code >= 200 && code <= 299; - } - - public String getBody() { - return body; - } - - public int getCode() { - return code; - } - - public Map getHeaders() { - return this.headers; - } - - public String getHeader(String header) { - return headers.get(header); - } - - public String getHeader(String header, String defaultValue) { - return headers.get(header) != null ? headers.get(header) : defaultValue; - } - - public static class Builder { - private int code; - private String body; - - private Map headers = new HashMap<>(); - - private Builder() {} - - public Builder withStatusCode(int code) { - this.code = code; - return this; - } - - public Builder withBody(String body) { - this.body = body; - return this; - } - - public Builder withHeaders(Map headers) { - this.headers = headers; - return this; - } - - public Auth0HttpResponse build() { - return new Auth0HttpResponse(this); - } - } -} diff --git a/src/main/java/com/auth0/net/client/Auth0MultipartRequestBody.java b/src/main/java/com/auth0/net/client/Auth0MultipartRequestBody.java deleted file mode 100644 index 6b79fa9e4..000000000 --- a/src/main/java/com/auth0/net/client/Auth0MultipartRequestBody.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.auth0.net.client; - -import com.auth0.utils.Asserts; -import java.io.File; -import java.util.HashMap; -import java.util.Map; - -public class Auth0MultipartRequestBody { - - private final FilePart filePart; - private final Map parts; - - public static Builder newBuilder() { - return new Builder(); - } - - private Auth0MultipartRequestBody(Builder builder) { - this.filePart = builder.filePart; - this.parts = new HashMap<>(builder.parts); - } - - public FilePart getFilePart() { - return this.filePart; - } - - public Map getParts() { - return this.parts; - } - - public static class FilePart { - private final String partName; - private final File file; - private final String mediaType; - - public FilePart(String partName, File file, String mediaType) { - Asserts.assertNotNull(partName, "part name"); - Asserts.assertNotNull(file, "file"); - Asserts.assertNotNull(mediaType, "mediaType"); - - this.partName = partName; - this.file = file; - this.mediaType = mediaType; - } - - public String getPartName() { - return partName; - } - - public File getFile() { - return file; - } - - public String getMediaType() { - return mediaType; - } - } - - public static class Builder { - FilePart filePart; - Map parts = new HashMap<>(); - - private Builder() {} - - public Builder withFilePart(FilePart filePart) { - this.filePart = filePart; - return this; - } - - public Builder withPart(String name, String value) { - parts.put(name, value); - return this; - } - - public Auth0MultipartRequestBody build() { - return new Auth0MultipartRequestBody(this); - } - } -} diff --git a/src/main/java/com/auth0/net/client/DefaultHttpClient.java b/src/main/java/com/auth0/net/client/DefaultHttpClient.java deleted file mode 100644 index d6bb8d0d1..000000000 --- a/src/main/java/com/auth0/net/client/DefaultHttpClient.java +++ /dev/null @@ -1,385 +0,0 @@ -package com.auth0.net.client; - -import com.auth0.client.LoggingOptions; -import com.auth0.client.ProxyOptions; -import com.auth0.net.RateLimitInterceptor; -import com.auth0.net.TelemetryInterceptor; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.TimeUnit; -import okhttp3.*; -import okhttp3.logging.HttpLoggingInterceptor; -import org.jetbrains.annotations.NotNull; - -/** - * Default implementation of {@link Auth0HttpClient} responsible for performing HTTP requests - * to the Auth0 APIs. Instances can be configured and created using the {@link Builder}. - *

- * To minimize resource usage, instances should be created once and used in both the - * {@link com.auth0.client.mgmt.ManagementAPI} and {@link com.auth0.client.auth.AuthAPI} - * 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}. - *

- */ -public class DefaultHttpClient implements Auth0HttpClient { - - private final okhttp3.OkHttpClient client; - - public static Builder newBuilder() { - return new Builder(); - } - - /** - * For testing purposes only. - * @param client The client to inject for testing purposes. - */ - DefaultHttpClient(OkHttpClient client) { - this.client = client; - } - - /** - * For testing purposes only. - * @return the OkHttpClient - */ - OkHttpClient getOkClient() { - return this.client; - } - - 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); - clientBuilder.addInterceptor(getLoggingInterceptor(builder.loggingOptions)); - clientBuilder.addInterceptor(getTelemetryInterceptor(builder.telemetryEnabled)); - clientBuilder.addInterceptor(getRateLimitInterceptor(builder.maxRetries)); - clientBuilder.dispatcher(getDispatcher(builder.maxRequests, builder.maxRequestsPerHost)); - - configureProxy(clientBuilder, builder.proxyOptions); - this.client = clientBuilder.build(); - } - - /** - * Ensures that a timeout value is a number greater than zero. If not, zero will be returned. - * @param val the timeout value - * @return the timeout value if it is greater than zero; else zero is returned. - */ - private int sanitizeTimeout(int val) { - return Math.max(val, 0); - } - - @Override - public Auth0HttpResponse sendRequest(Auth0HttpRequest request) throws IOException { - Request okRequest = buildRequest(request); - try (Response response = client.newCall(okRequest).execute()) { - return buildResponse(response); - } - } - - @Override - public CompletableFuture sendRequestAsync(Auth0HttpRequest request) { - final CompletableFuture future = new CompletableFuture<>(); - Request okRequest = buildRequest(request); - - client.newCall(okRequest).enqueue(new Callback() { - @Override - public void onFailure(@NotNull Call call, @NotNull IOException e) { - future.completeExceptionally(e); - } - - @Override - public void onResponse(@NotNull Call call, @NotNull Response response) { - try { - future.complete(buildResponse(response)); - } catch (IOException e) { - future.completeExceptionally(e); - } finally { - response.close(); - } - } - }); - - return future; - } - - private Request buildRequest(Auth0HttpRequest a0Request) { - RequestBody okBody = addBody(a0Request); - - okhttp3.Request.Builder builder = new okhttp3.Request.Builder() - .url(a0Request.getUrl()) - .method(a0Request.getMethod().toString(), okBody); - for (Map.Entry e : a0Request.getHeaders().entrySet()) { - builder.addHeader(e.getKey(), e.getValue()); - } - - return builder.build(); - } - - /** - * Creates an {@link Auth0HttpResponse} from an OkHttp {@link Response}. - * - * @param okResponse the OkHttp response. - * @return the created Auth0HttpResponse - * @throws IOException if there is an issue reading the OkHttp response body. - */ - private Auth0HttpResponse buildResponse(Response okResponse) throws IOException { - Headers okHeaders = okResponse.headers(); - Map headers = new HashMap<>(); - - for (int i = 0; i < okHeaders.size(); i++) { - headers.put(okHeaders.name(i), okHeaders.value(i)); - } - - ResponseBody responseBody = okResponse.body(); - String content = null; - - if (Objects.nonNull(responseBody)) { - content = responseBody.string(); - } - return Auth0HttpResponse.newBuilder() - .withStatusCode(okResponse.code()) - .withBody(content) - .withHeaders(headers) - .build(); - } - - @SuppressWarnings("deprecation") - private RequestBody addBody(Auth0HttpRequest request) { - // null body added to request results in request without body - if (Objects.isNull(request.getBody()) || HttpMethod.GET.equals(request.getMethod())) { - return null; - } - - HttpRequestBody body = request.getBody(); - RequestBody okBody; - - if (Objects.nonNull(body.getFormRequestBody())) { - Auth0FormRequestBody formData = body.getFormRequestBody(); - FormBody.Builder builder = new FormBody.Builder(); - for (Map.Entry entry : formData.getParams().entrySet()) { - Object val = entry.getValue(); - builder.add(entry.getKey(), val instanceof String ? (String) val : val.toString()); - } - okBody = builder.build(); - } else if (Objects.nonNull(body.getMultipartRequestBody())) { - Auth0MultipartRequestBody multipartRequestBody = body.getMultipartRequestBody(); - MultipartBody.Builder bodyBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - if (Objects.nonNull(multipartRequestBody.getFilePart())) { - bodyBuilder.addFormDataPart( - multipartRequestBody.getFilePart().getPartName(), - multipartRequestBody.getFilePart().getFile().getName(), - RequestBody.create( - MediaType.parse( - multipartRequestBody.getFilePart().getMediaType()), - multipartRequestBody.getFilePart().getFile())); - } - multipartRequestBody.getParts().forEach(bodyBuilder::addFormDataPart); - okBody = bodyBuilder.build(); - } else { - okBody = RequestBody.create( - MediaType.parse(request.getBody().getContentType()), - request.getBody().getContent()); - } - - return okBody; - } - - private HttpLoggingInterceptor getLoggingInterceptor(LoggingOptions loggingOptions) { - HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(); - if (Objects.isNull(loggingOptions)) { - loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.NONE); - return loggingInterceptor; - } - - switch (loggingOptions.getLogLevel()) { - case BASIC: - loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BASIC); - break; - case HEADERS: - loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.HEADERS); - break; - case BODY: - loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY); - break; - case NONE: - default: - loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.NONE); - } - for (String header : loggingOptions.getHeadersToRedact()) { - loggingInterceptor.redactHeader(header); - } - return loggingInterceptor; - } - - private void configureProxy(okhttp3.OkHttpClient.Builder clientBuilder, ProxyOptions proxyOptions) { - if (Objects.nonNull(proxyOptions)) { - // Set proxy - clientBuilder.proxy(proxyOptions.getProxy()); - // Set authentication, if present - final String proxyAuth = proxyOptions.getBasicAuthentication(); - if (Objects.nonNull(proxyAuth)) { - clientBuilder.proxyAuthenticator(new Authenticator() { - - private static final String PROXY_AUTHORIZATION_HEADER = "Proxy-Authorization"; - - @Override - public okhttp3.Request authenticate(Route route, @NotNull Response response) { - if (Objects.nonNull(response.request().header(PROXY_AUTHORIZATION_HEADER))) { - return null; - } - return response.request() - .newBuilder() - .header(PROXY_AUTHORIZATION_HEADER, proxyAuth) - .build(); - } - }); - } - } - } - - private TelemetryInterceptor getTelemetryInterceptor(boolean telemetryEnabled) { - TelemetryInterceptor interceptor = new TelemetryInterceptor(); - interceptor.setEnabled(telemetryEnabled); - return interceptor; - } - - private RateLimitInterceptor getRateLimitInterceptor(int maxRetries) { - if (maxRetries < 0 || maxRetries > 10) { - throw new IllegalArgumentException("Retries must be between zero and ten."); - } - return new RateLimitInterceptor(maxRetries); - } - - private Dispatcher getDispatcher(int maxRequests, int maxRequestsPerHost) { - if (maxRequests < 1) { - throw new IllegalArgumentException("maxRequests must be one or greater."); - } - if (maxRequestsPerHost < 1) { - throw new IllegalArgumentException("maxRequestsPerHost must be one or greater."); - } - - Dispatcher dispatcher = new Dispatcher(); - dispatcher.setMaxRequests(maxRequests); - dispatcher.setMaxRequestsPerHost(maxRequestsPerHost); - return dispatcher; - } - - /** - * Builder for {@link DefaultHttpClient} instances. - */ - public static class Builder { - private int readTimeout = 10; - private int connectTimeout = 10; - private ProxyOptions proxyOptions; - private LoggingOptions loggingOptions; - private boolean telemetryEnabled = true; - private int maxRetries = 3; - private int maxRequests = 64; - private int maxRequestsPerHost = 5; - - /** - * Sets the value of the read timeout, in seconds. Defaults to ten seconds. A value of zero results in no read timeout. - * Negative numbers will be treated as zero. - * - * @param readTimeout the value of the read timeout to use. - * @return this builder instance. - */ - public Builder withReadTimeout(int readTimeout) { - this.readTimeout = readTimeout; - return this; - } - - /** - * Sets the value of the connect timeout, in seconds. Defaults to ten seconds. A value of zero results in no connect timeout. - * Negative numbers will be treated as zero. - * @param connectTimeout the value of the connect timeout to use. - * @return this builder instance. - */ - public Builder withConnectTimeout(int connectTimeout) { - this.connectTimeout = connectTimeout; - return this; - } - - /** - * Set the HTTP logging configuration options. If not set, no logs will be captured. - * @param loggingOptions the Logging configuration options. - * @return this builder instance. - */ - public Builder withLogging(LoggingOptions loggingOptions) { - this.loggingOptions = loggingOptions; - return this; - } - - /** - * Configure this client for use with a proxy. - * - * @param proxyOptions the Proxy configuration options - * @return this builder instance. - */ - public Builder withProxy(ProxyOptions proxyOptions) { - this.proxyOptions = proxyOptions; - return this; - } - - /** - * Configure this client to enable or disable sending telemetry data to Auth0 servers (on by default). - * @param telemetryEnabled true send telemetry data, false to not send. - * @return this builder instance. - */ - public Builder telemetryEnabled(boolean telemetryEnabled) { - this.telemetryEnabled = telemetryEnabled; - 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 - * errors, set this value to zero. - * - * @param maxRetries the maximum number of consecutive retries to attempt upon a rate-limit error. Defaults to three. - * Must be a number between zero (do not retry) and ten. - * - * @return this builder instance. - */ - public Builder withMaxRetries(int maxRetries) { - this.maxRetries = maxRetries; - return this; - } - - /** - * Sets the maximum number of requests to execute concurrently. - * - * @param maxRequests the number of requests to execute concurrently. Must be equal to or greater than one. - * @return this builder instance. - */ - public Builder withMaxRequests(int maxRequests) { - this.maxRequests = maxRequests; - return this; - } - - /** - * Sets the maximum number of requests for each host to execute concurrently. - * - * @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. - */ - public Builder withMaxRequestsPerHost(int maxRequestsPerHost) { - this.maxRequestsPerHost = maxRequestsPerHost; - return this; - } - - /** - * Create a {@code DefaultHttpClient} from this configured builder. - * @return the created {@code DefaultHttpClient}. - */ - public DefaultHttpClient build() { - return new DefaultHttpClient(this); - } - } -} diff --git a/src/main/java/com/auth0/net/client/HttpMethod.java b/src/main/java/com/auth0/net/client/HttpMethod.java deleted file mode 100644 index 0b316f2c8..000000000 --- a/src/main/java/com/auth0/net/client/HttpMethod.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.auth0.net.client; - -/** - * Represents the HTTP methods when calling the Auth0 APIs. - */ -public enum HttpMethod { - GET, - POST, - PUT, - PATCH, - DELETE; -} diff --git a/src/main/java/com/auth0/net/client/HttpRequestBody.java b/src/main/java/com/auth0/net/client/HttpRequestBody.java deleted file mode 100644 index de3dada8e..000000000 --- a/src/main/java/com/auth0/net/client/HttpRequestBody.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.auth0.net.client; - -public class HttpRequestBody { - - private byte[] content; - private String contentType; - private Auth0MultipartRequestBody multipartRequestBody; - private Auth0FormRequestBody formRequestBody; - - public static HttpRequestBody create(String contentType, byte[] content) { - return new HttpRequestBody(contentType, content); - } - - public static HttpRequestBody create(String contentType, Auth0MultipartRequestBody multipartRequestBody) { - return new HttpRequestBody(contentType, multipartRequestBody); - } - - public static HttpRequestBody create(String contentType, Auth0FormRequestBody formRequestBody) { - return new HttpRequestBody(contentType, formRequestBody); - } - - public byte[] getContent() { - return this.content; - } - - public Auth0MultipartRequestBody getMultipartRequestBody() { - return this.multipartRequestBody; - } - - public Auth0FormRequestBody getFormRequestBody() { - return this.formRequestBody; - } - - public String getContentType() { - return this.contentType; - } - - private HttpRequestBody(String contentType, byte[] content) { - this.contentType = contentType; - this.content = content; - } - - private HttpRequestBody(String contentType, Auth0MultipartRequestBody multipartRequestBody) { - this.contentType = contentType; - this.multipartRequestBody = multipartRequestBody; - } - - private HttpRequestBody(String contentType, Auth0FormRequestBody formRequestBody) { - this.contentType = contentType; - this.formRequestBody = formRequestBody; - } -} diff --git a/src/main/java/com/auth0/net/client/package-info.java b/src/main/java/com/auth0/net/client/package-info.java deleted file mode 100644 index 25884f076..000000000 --- a/src/main/java/com/auth0/net/client/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Defines the HTTP client networking layer to make, execute, and parse HTTP - * responses to the Auth0 APIs. - */ -package com.auth0.net.client; diff --git a/src/main/java/com/auth0/utils/Asserts.java b/src/main/java/com/auth0/utils/Asserts.java deleted file mode 100644 index 199819a38..000000000 --- a/src/main/java/com/auth0/utils/Asserts.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.auth0.utils; - -import java.util.Collection; -import okhttp3.HttpUrl; - -public abstract class Asserts { - - /** - * Asserts that an object is not null. - * - * @param value the value to check. - * @param name the name of the parameter, used when creating the exception message. - * @throws IllegalArgumentException if the value is null - */ - public static void assertNotNull(Object value, String name) { - if (value == null) { - throw new IllegalArgumentException(String.format("'%s' cannot be null!", name)); - } - } - - /** - * Asserts that a value is a valid URL. - * - * @param value the value to check. - * @param name the name of the parameter, used when creating the exception message. - * @throws IllegalArgumentException if the value is null or is not a valid URL. - */ - public static void assertValidUrl(String value, String name) { - if (value == null) { - throw new IllegalArgumentException(String.format("'%s' must be a valid URL!", name)); - } - boolean isValidUrl = HttpUrl.parse(value) != null; - boolean isValidCustomSchemeUrl = value.contains(":") - && HttpUrl.parse(value.replaceFirst(value.substring(0, value.indexOf(":")), "https")) != null; - if (!isValidUrl && !isValidCustomSchemeUrl) { - throw new IllegalArgumentException(String.format("'%s' must be a valid URL!", name)); - } - } - - /** - * Asserts that a collection is not null and has at least one item. - * - * @param value the value to check. - * @param name the name of the parameter, used when creating the exception message. - * @throws IllegalArgumentException if the value is null or has length of zero. - */ - public static void assertNotEmpty(Collection value, String name) { - if (value == null) { - throw new IllegalArgumentException(String.format("'%s' cannot be null!", name)); - } - if (value.size() == 0) { - throw new IllegalArgumentException(String.format("'%s' cannot be empty!", name)); - } - } -} diff --git a/src/main/java/com/auth0/utils/HttpResponseHeadersUtils.java b/src/main/java/com/auth0/utils/HttpResponseHeadersUtils.java deleted file mode 100644 index bf003d36a..000000000 --- a/src/main/java/com/auth0/utils/HttpResponseHeadersUtils.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.auth0.utils; - -import com.auth0.net.TokenQuotaBucket; -import com.auth0.net.TokenQuotaLimit; -import java.util.Map; - -public class HttpResponseHeadersUtils { - - /** - * Gets the client token quota limits from the provided headers. - * - * @param headers the HTTP response headers. - * @return a TokenQuotaBucket containing client rate limits, or null if not present. - */ - public static TokenQuotaBucket getClientQuotaLimit(Map headers) { - String quotaHeader = headers.get("auth0-client-quota-limit"); - if (quotaHeader != null) { - return parseQuota(quotaHeader); - } - return null; - } - - /** - * Gets the organization token quota limits from the provided headers. - * - * @param headers the HTTP response headers. - * @return a TokenQuotaBucket containing organization rate limits, or null if not present. - */ - public static TokenQuotaBucket getOrganizationQuotaLimit(Map headers) { - String quotaHeader = headers.get("auth0-organization-quota-limit"); - if (quotaHeader != null) { - return parseQuota(quotaHeader); - } - return null; - } - - public static TokenQuotaBucket parseQuota(String tokenQuota) { - - TokenQuotaLimit perHour = null; - TokenQuotaLimit perDay = null; - - String[] parts = tokenQuota.split(","); - for (String part : parts) { - String[] attributes = part.split(";"); - int quota = 0, remaining = 0, time = 0; - - for (String attribute : attributes) { - String[] keyValue = attribute.split("="); - if (keyValue.length != 2) continue; - - String key = keyValue[0].trim(); - String value = keyValue[1].trim(); - - switch (key) { - case "q": - quota = Integer.parseInt(value); - break; - case "r": - remaining = Integer.parseInt(value); - break; - case "t": - time = Integer.parseInt(value); - break; - } - } - - if (attributes.length > 0 && attributes[0].contains("per_hour")) { - perHour = new TokenQuotaLimit(quota, remaining, time); - } else if (attributes.length > 0 && attributes[0].contains("per_day")) { - perDay = new TokenQuotaLimit(quota, remaining, time); - } - } - - if (perHour == null && perDay == null) { - return null; - } - - return new TokenQuotaBucket(perHour, perDay); - } -} diff --git a/src/main/java/com/auth0/utils/tokens/HS256SignatureVerifier.java b/src/main/java/com/auth0/utils/tokens/HS256SignatureVerifier.java deleted file mode 100644 index 6831741a2..000000000 --- a/src/main/java/com/auth0/utils/tokens/HS256SignatureVerifier.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.auth0.utils.tokens; - -import com.auth0.jwt.algorithms.Algorithm; - -/** - * An implementation of {@code SignatureVerifier} for tokens signed with the HS256 symmetric signing algorithm. - *

- * This class is thread-safe. - */ -class HS256SignatureVerifier extends SignatureVerifier { - - HS256SignatureVerifier(String secret) { - super(Algorithm.HMAC256(secret)); - } -} diff --git a/src/main/java/com/auth0/utils/tokens/IdTokenVerifier.java b/src/main/java/com/auth0/utils/tokens/IdTokenVerifier.java deleted file mode 100644 index 321a2c699..000000000 --- a/src/main/java/com/auth0/utils/tokens/IdTokenVerifier.java +++ /dev/null @@ -1,323 +0,0 @@ -package com.auth0.utils.tokens; - -import com.auth0.exception.IdTokenValidationException; -import com.auth0.jwt.interfaces.DecodedJWT; -import com.auth0.utils.Asserts; -import java.util.Calendar; -import java.util.Date; -import java.util.List; - -/** - * Provides utility methods for validating an OIDC-compliant ID token. - * See the OIDC Specification for more information. - *

- * This class is not thread-safe: - * It makes use of {@link Date} and {@link Calendar} classes to verify time sensitive claims. - */ -public final class IdTokenVerifier { - - private static final Integer DEFAULT_LEEWAY = 60; // 1 min = 60 sec - - private static final String NONCE_CLAIM = "nonce"; - private static final String AZP_CLAIM = "azp"; - private static final String AUTH_TIME_CLAIM = "auth_time"; - - private final String issuer; - private final String audience; - private final Integer leeway; - private final Date clock; - private final SignatureVerifier signatureVerifier; - private final String organization; - - private IdTokenVerifier(Builder builder) { - this.issuer = builder.issuer; - this.audience = builder.audience; - this.leeway = builder.leeway; - this.signatureVerifier = builder.signatureVerifier; - this.clock = builder.clock; - this.organization = builder.organization; - } - - /** - * Initialize an instance of {@code IdTokenVerifier}. - * - * @param issuer the expected issuer of the token. Must not be null. - * @param audience the expected audience of the token. Must not be null. - * @param signatureVerifier the {@code SignatureVerifier} to use when verifying the token. Must not be null. - * @return a {@linkplain Builder} for further configuration. - */ - public static Builder init(String issuer, String audience, SignatureVerifier signatureVerifier) { - return new Builder(issuer, audience, signatureVerifier); - } - - /** - * Verifies a provided ID Token follows the OIDC specification. - * - * @param token the ID Token to verify. Must not be null or empty. - * @throws IdTokenValidationException if: - *

    - *
  • The ID token is null
  • - *
  • The ID token's signing algorithm is not supported
  • - *
  • The ID token's signature is invalid
  • - *
  • Any of the ID token's claims are invalid
  • - *
- * @see IdTokenVerifier#verify(String, String) - * @see IdTokenVerifier#verify(String, String, Integer) - */ - public void verify(String token) throws IdTokenValidationException { - verify(token, null); - } - - /** - * Verifies a provided ID Token follows the OIDC specification. - * - * @param token the ID Token to verify. - * @param nonce the nonce expected on the ID token, which must match the nonce specified on the authorization request. - * If null, no validation of the nonce will occur. - * @throws IdTokenValidationException if: - *
    - *
  • The ID token is null
  • - *
  • The ID token's signing algorithm is not supported
  • - *
  • The ID token's signature is invalid
  • - *
  • Any of the ID token's claims are invalid
  • - *
- * @see IdTokenVerifier#verify(String) - * @see IdTokenVerifier#verify(String, String, Integer) - */ - public void verify(String token, String nonce) throws IdTokenValidationException { - verify(token, nonce, null); - } - - /** - * Verifies a provided ID Token follows the OIDC specification. - * - * @param token the ID Token to verify. Must not be null or empty. - * @param nonce the nonce expected on the ID token, which must match the nonce specified on the authorization request. - * If null, no validation of the nonce will occur. - * @param maxAuthenticationAge The maximum authentication age allowed, which specifies the allowable elapsed time in seconds - * since the last time the end-user was actively authenticated. This must match the specified - * {@code max_age} parameter specified on the authorization request. If null, no validation - * of the {@code auth_time} claim will occur. - * @throws IdTokenValidationException if: - *
    - *
  • The ID token is null
  • - *
  • The ID token's signing algorithm is not supported
  • - *
  • The ID token's signature is invalid
  • - *
  • Any of the ID token's claims are invalid
  • - *
- * @see IdTokenVerifier#verify(String) - * @see IdTokenVerifier#verify(String, String) - */ - public void verify(String token, String nonce, Integer maxAuthenticationAge) throws IdTokenValidationException { - - if (isEmpty(token)) { - throw new IdTokenValidationException("ID token is required but missing"); - } - - DecodedJWT decoded = this.signatureVerifier.verifySignature(token); - - if (isEmpty(decoded.getIssuer())) { - throw new IdTokenValidationException("Issuer (iss) claim must be a string present in the ID token"); - } - if (!decoded.getIssuer().equals(this.issuer)) { - throw new IdTokenValidationException(String.format( - "Issuer (iss) claim mismatch in the ID token, expected \"%s\", found \"%s\"", - this.issuer, decoded.getIssuer())); - } - - if (isEmpty(decoded.getSubject())) { - throw new IdTokenValidationException("Subject (sub) claim must be a string present in the ID token"); - } - - final List audience = decoded.getAudience(); - if (audience == null) { - throw new IdTokenValidationException( - "Audience (aud) claim must be a string or array of strings present in the ID token"); - } - if (!audience.contains(this.audience)) { - throw new IdTokenValidationException(String.format( - "Audience (aud) claim mismatch in the ID token; expected \"%s\" but found \"%s\"", - this.audience, decoded.getAudience())); - } - - // Org verification - if (this.organization != null) { - String org = this.organization.trim(); - if (org.startsWith("org_")) { - // org ID - String orgClaim = decoded.getClaim("org_id").asString(); - if (isEmpty(orgClaim)) { - throw new IdTokenValidationException( - "Organization Id (org_id) claim must be a string present in the ID token"); - } - if (!this.organization.equals(orgClaim)) { - throw new IdTokenValidationException(String.format( - "Organization (org_id) claim mismatch in the ID token; expected \"%s\" but found \"%s\"", - this.organization, orgClaim)); - } - } else { - // org name - String orgNameClaim = decoded.getClaim("org_name").asString(); - if (isEmpty(orgNameClaim)) { - throw new IdTokenValidationException( - "Organization name (org_name) claim must be a string present in the ID token"); - } - if (!org.toLowerCase().equals(orgNameClaim)) { - throw new IdTokenValidationException(String.format( - "Organization (org_name) claim mismatch in the ID token; expected \"%s\" but found \"%s\"", - this.organization, orgNameClaim)); - } - } - } - - final Calendar cal = Calendar.getInstance(); - final Date now = this.clock != null ? this.clock : cal.getTime(); - final int clockSkew = this.leeway != null ? this.leeway : DEFAULT_LEEWAY; - - if (decoded.getExpiresAt() == null) { - throw new IdTokenValidationException( - "Expiration Time (exp) claim must be a number present in the ID token"); - } - - cal.setTime(decoded.getExpiresAt()); - cal.add(Calendar.SECOND, clockSkew); - Date expDate = cal.getTime(); - - if (now.after(expDate)) { - throw new IdTokenValidationException(String.format( - "Expiration Time (exp) claim error in the ID token; current time (%d) is after expiration time (%d)", - now.getTime() / 1000, expDate.getTime() / 1000)); - } - - if (decoded.getIssuedAt() == null) { - throw new IdTokenValidationException("Issued At (iat) claim must be a number present in the ID token"); - } - - cal.setTime(decoded.getIssuedAt()); - cal.add(Calendar.SECOND, -1 * clockSkew); - - if (nonce != null) { - String nonceClaim = decoded.getClaim(NONCE_CLAIM).asString(); - if (isEmpty(nonceClaim)) { - throw new IdTokenValidationException("Nonce (nonce) claim must be a string present in the ID token"); - } - if (!nonce.equals(nonceClaim)) { - throw new IdTokenValidationException(String.format( - "Nonce (nonce) claim mismatch in the ID token; expected \"%s\", found \"%s\"", - nonce, nonceClaim)); - } - } - - if (audience.size() > 1) { - String azpClaim = decoded.getClaim(AZP_CLAIM).asString(); - if (isEmpty(azpClaim)) { - throw new IdTokenValidationException( - "Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values"); - } - if (!this.audience.equals(azpClaim)) { - throw new IdTokenValidationException(String.format( - "Authorized Party (azp) claim mismatch in the ID token; expected \"%s\", found \"%s\"", - this.audience, azpClaim)); - } - } - - if (maxAuthenticationAge != null) { - Date authTime = decoded.getClaim(AUTH_TIME_CLAIM).asDate(); - if (authTime == null) { - throw new IdTokenValidationException( - "Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified"); - } - - cal.setTime(authTime); - cal.add(Calendar.SECOND, maxAuthenticationAge); - cal.add(Calendar.SECOND, clockSkew); - Date authTimeDate = cal.getTime(); - - if (now.after(authTimeDate)) { - throw new IdTokenValidationException(String.format( - "Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (%d) is after last auth at (%d)", - now.getTime() / 1000, authTimeDate.getTime() / 1000)); - } - } - } - - private boolean isEmpty(String value) { - return value == null || value.isEmpty(); - } - - /** - * Builder class to construct a {@linkplain IdTokenVerifier} - */ - public static class Builder { - - private final String issuer; - private final String audience; - private final SignatureVerifier signatureVerifier; - - private Integer leeway; - private Date clock; - private String organization; - - /** - * Create a new Builder instance. - * - * @param issuer the expected issuer of the token. Must not be null. - * @param audience the expected audience of the token. Must not be null. - * @param signatureVerifier the {@code SignatureVerifier} to use when verifying the token. Must not be null. - */ - private Builder(String issuer, String audience, SignatureVerifier signatureVerifier) { - Asserts.assertNotNull(issuer, "issuer"); - Asserts.assertNotNull(audience, "audience"); - Asserts.assertNotNull(signatureVerifier, "signatureVerifier"); - - this.issuer = issuer; - this.audience = audience; - this.signatureVerifier = signatureVerifier; - } - - /** - * Specify a custom leeway when validating time-based claims such as {@code exp} and {@code auth_time}. - * If not specified, a default leeway of 60 seconds will be used. - * - * @param leeway the custom leeway to use when validating time-based claims, in seconds. - * @return this Builder instance. - */ - public Builder withLeeway(Integer leeway) { - this.leeway = leeway; - return this; - } - - /** - * Specify the expected organization (org_id) the token must be issued for. This should be used if using the - * Organizations feature. - * - * @param organization the ID of the organization. - * @return this Builder instance. - */ - public Builder withOrganization(String organization) { - this.organization = organization; - return this; - } - - /** - * Specify a custom clock to use as the current time when validating time-based claims. Exposed for testing - * purposes only. - * - * @param clock the clock to use as the current time. - * @return this Builder instance. - */ - Builder withClock(Date clock) { - this.clock = clock; - return this; - } - - /** - * Constructs an {@linkplain IdTokenVerifier} instance from this Builder. - * - * @return an initialized instance of {@code IdTokenVerifier}. - */ - public IdTokenVerifier build() { - return new IdTokenVerifier(this); - } - } -} diff --git a/src/main/java/com/auth0/utils/tokens/PublicKeyProvider.java b/src/main/java/com/auth0/utils/tokens/PublicKeyProvider.java deleted file mode 100644 index ae8f4970e..000000000 --- a/src/main/java/com/auth0/utils/tokens/PublicKeyProvider.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.auth0.utils.tokens; - -import com.auth0.exception.PublicKeyProviderException; -import java.security.interfaces.RSAPublicKey; - -/** - * The interface to obtain a public key. This is used to configure signature verification for tokens signed - * with the RS256 asymmetric signing algorithm. - * Developers should provide an implementation of this interface when verifying a RS256 ID token. - * - *

The following example demonstrates using the {@code JwkProviderBuilder} from the - * jwks-rsa-java library to fetch the public key.

- * - *
- * JwkProvider provider = new JwkProviderBuilder("https://your-domain.auth0.com").build();
- * SignatureVerifier sigVerifier = SignatureVerifier.forRS256(new PublicKeyProvider() {
- *     @Override
- *     public RSAPublicKey getPublicKeyById(String keyId) throws PublicKeyProviderException {
- *         try {
- *             return (RSAPublicKey) provider.get(keyId).getPublicKey();
- *         } catch (JwkException jwke) {
- *             throw new PublicKeyProviderException("Error obtaining public key", jwke);
- *         }
- *     }
- * }
- * 
- */ -public interface PublicKeyProvider { - - /** - * Get a {@code RSAPublicKey} given the key ID. - * - * @param keyId the key ID for which to retrieve the key. - * @return the {@code RSAPublicKey} for the given key ID. - * @throws PublicKeyProviderException if the public key cannot be retrieved. - */ - RSAPublicKey getPublicKeyById(String keyId) throws PublicKeyProviderException; -} diff --git a/src/main/java/com/auth0/utils/tokens/RS256SignatureVerifier.java b/src/main/java/com/auth0/utils/tokens/RS256SignatureVerifier.java deleted file mode 100644 index 1ac052a7b..000000000 --- a/src/main/java/com/auth0/utils/tokens/RS256SignatureVerifier.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.auth0.utils.tokens; - -import com.auth0.exception.IdTokenValidationException; -import com.auth0.exception.PublicKeyProviderException; -import com.auth0.jwt.algorithms.Algorithm; -import com.auth0.jwt.interfaces.RSAKeyProvider; -import java.security.interfaces.RSAPrivateKey; -import java.security.interfaces.RSAPublicKey; - -/** - * An implementation of {@code SignatureVerifier} for tokens signed with the RS256 asymmetric signing algorithm. - *

- * This class is thread-safe. - */ -class RS256SignatureVerifier extends SignatureVerifier { - - RS256SignatureVerifier(PublicKeyProvider publicKeyProvider) { - super(getAlgorithm(publicKeyProvider)); - } - - private static Algorithm getAlgorithm(final PublicKeyProvider publicKeyProvider) { - return Algorithm.RSA256(new RSAKeyProvider() { - @Override - public RSAPublicKey getPublicKeyById(String keyId) { - try { - return publicKeyProvider.getPublicKeyById(keyId); - } catch (PublicKeyProviderException pke) { - throw new IdTokenValidationException( - String.format("Could not find a public key for Key ID (kid) \"%s\"", keyId), pke); - } - } - - @Override - public RSAPrivateKey getPrivateKey() { - // no-op - return null; - } - - @Override - public String getPrivateKeyId() { - // no-op - return null; - } - }); - } -} diff --git a/src/main/java/com/auth0/utils/tokens/SignatureVerifier.java b/src/main/java/com/auth0/utils/tokens/SignatureVerifier.java deleted file mode 100644 index 2045fbd92..000000000 --- a/src/main/java/com/auth0/utils/tokens/SignatureVerifier.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.auth0.utils.tokens; - -import com.auth0.exception.IdTokenValidationException; -import com.auth0.jwt.JWT; -import com.auth0.jwt.algorithms.Algorithm; -import com.auth0.jwt.exceptions.AlgorithmMismatchException; -import com.auth0.jwt.exceptions.JWTDecodeException; -import com.auth0.jwt.exceptions.JWTVerificationException; -import com.auth0.jwt.exceptions.SignatureVerificationException; -import com.auth0.jwt.interfaces.DecodedJWT; -import com.auth0.jwt.interfaces.JWTVerifier; -import com.auth0.utils.Asserts; - -/** - * Represents the verification for an ID Token's signature used when validating an ID token. - *

- * This class is thread-safe. - * - * @see JWTVerifier - */ -public abstract class SignatureVerifier { - - private final JWTVerifier verifier; - private final Algorithm algorithm; - - /** - * Get a {@code SignatureVerifier} for use when validating an ID token signed using the HS256 signing algorithm. - * - * @param secret the client's secret to use when validating the token's signature. - * @return a {@code SignatureVerifier} for use with tokens signed using the HS256 signing algorithm. - */ - public static SignatureVerifier forHS256(String secret) { - return new HS256SignatureVerifier(secret); - } - - /** - * Get a {@code SignatureVerifier} for use when validating an ID token signed using the RS256 signing algorithm. - * Callers should provide an implementation of the {@linkplain PublicKeyProvider} to provide the public key used - * to verify the ID token's signature. - * - * @param publicKeyProvider an implementation of {@linkplain PublicKeyProvider} to get the public key. - * @return a {@code SignatureVerifier} for use with tokens signed using the RS256 signing algorithm. - * @see PublicKeyProvider - */ - public static SignatureVerifier forRS256(PublicKeyProvider publicKeyProvider) { - return new RS256SignatureVerifier(publicKeyProvider); - } - - /** - * Creates a new JWT Signature Verifier. Used by internal implementations to create concrete verifiers. - * - * @param algorithm the algorithm used to verify the signature. Must not be {@code null}. - */ - SignatureVerifier(Algorithm algorithm) { - Asserts.assertNotNull(algorithm, "algorithm"); - this.algorithm = algorithm; - this.verifier = JWT.require(algorithm).ignoreIssuedAt().build(); - } - - /** - * Verifies a token's signature. - * - * @param token the token for which to verify its signature. - * @return a {@linkplain DecodedJWT} that represents the token. - * @throws IdTokenValidationException if the signature verification failed. - */ - DecodedJWT verifySignature(String token) throws IdTokenValidationException { - DecodedJWT decoded = decodeToken(token); - - try { - this.verifier.verify(decoded); - } catch (AlgorithmMismatchException algorithmMismatchException) { - String message = String.format( - "Signature algorithm of \"%s\" is not supported. Expected the ID token to be signed with \"%s\"", - decoded.getAlgorithm(), this.algorithm.getName()); - throw new IdTokenValidationException(message, algorithmMismatchException); - } catch (SignatureVerificationException signatureVerificationException) { - throw new IdTokenValidationException("Invalid ID token signature", signatureVerificationException); - } catch (JWTVerificationException ignored) { - // no-op. Would only occur for expired tokens, which will be handle during claims validation - } - - return decoded; - } - - private DecodedJWT decodeToken(String token) throws IdTokenValidationException { - try { - return JWT.decode(token); - } catch (JWTDecodeException e) { - throw new IdTokenValidationException("ID token could not be decoded", e); - } - } -} diff --git a/src/test/java/com/auth0/client/mgmt/ActionsExecutionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsExecutionsWireTest.java deleted file mode 100644 index c26ef9a49..000000000 --- a/src/test/java/com/auth0/client/mgmt/ActionsExecutionsWireTest.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.GetActionExecutionResponseContent; -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 ActionsExecutionsWireTest { - 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( - "{\"id\":\"id\",\"trigger_id\":\"trigger_id\",\"status\":\"unspecified\",\"results\":[{\"action_name\":\"action_name\",\"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\"}")); - GetActionExecutionResponseContent response = - client.actions().executions().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" - + " \"trigger_id\": \"trigger_id\",\n" - + " \"status\": \"unspecified\",\n" - + " \"results\": [\n" - + " {\n" - + " \"action_name\": \"action_name\",\n" - + " \"started_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"ended_at\": \"2024-01-15T09:30:00Z\"\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 || !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/ActionsModulesVersionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsModulesVersionsWireTest.java deleted file mode 100644 index 7e9fc41d7..000000000 --- a/src/test/java/com/auth0/client/mgmt/ActionsModulesVersionsWireTest.java +++ /dev/null @@ -1,229 +0,0 @@ -package com.auth0.client.mgmt; - -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; -import com.auth0.client.mgmt.types.GetActionModuleVersionResponseContent; -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 ActionsModulesVersionsWireTest { - 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( - "{\"versions\":[{\"id\":\"id\",\"module_id\":\"module_id\",\"version_number\":1,\"code\":\"code\",\"secrets\":[{}],\"dependencies\":[{}],\"created_at\":\"2024-01-15T09:30:00Z\"}],\"total\":1,\"page\":1,\"per_page\":1}")); - SyncPagingIterable response = client.actions() - .modules() - .versions() - .list( - "id", - GetActionModuleVersionsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(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\",\"module_id\":\"module_id\",\"version_number\":1,\"code\":\"code\",\"secrets\":[{\"name\":\"name\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"dependencies\":[{\"name\":\"name\",\"version\":\"version\"}],\"created_at\":\"2024-01-15T09:30:00Z\"}")); - CreateActionModuleVersionResponseContent response = - client.actions().modules().versions().create("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" - + " \"id\": \"id\",\n" - + " \"module_id\": \"module_id\",\n" - + " \"version_number\": 1,\n" - + " \"code\": \"code\",\n" - + " \"secrets\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " }\n" - + " ],\n" - + " \"dependencies\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " ],\n" - + " \"created_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\",\"module_id\":\"module_id\",\"version_number\":1,\"code\":\"code\",\"secrets\":[{\"name\":\"name\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"dependencies\":[{\"name\":\"name\",\"version\":\"version\"}],\"created_at\":\"2024-01-15T09:30:00Z\"}")); - GetActionModuleVersionResponseContent response = - client.actions().modules().versions().get("id", "versionId"); - 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" - + " \"module_id\": \"module_id\",\n" - + " \"version_number\": 1,\n" - + " \"code\": \"code\",\n" - + " \"secrets\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " }\n" - + " ],\n" - + " \"dependencies\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " ],\n" - + " \"created_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 || !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/ActionsModulesWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsModulesWireTest.java deleted file mode 100644 index f9cade8ae..000000000 --- a/src/test/java/com/auth0/client/mgmt/ActionsModulesWireTest.java +++ /dev/null @@ -1,557 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.actions.types.CreateActionModuleRequestContent; -import com.auth0.client.mgmt.actions.types.GetActionModuleActionsRequestParameters; -import com.auth0.client.mgmt.actions.types.GetActionModulesRequestParameters; -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; -import com.auth0.client.mgmt.types.CreateActionModuleResponseContent; -import com.auth0.client.mgmt.types.GetActionModuleResponseContent; -import com.auth0.client.mgmt.types.RollbackActionModuleResponseContent; -import com.auth0.client.mgmt.types.UpdateActionModuleResponseContent; -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 ActionsModulesWireTest { - 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( - "{\"modules\":[{\"id\":\"id\",\"name\":\"name\",\"code\":\"code\",\"dependencies\":[{}],\"secrets\":[{}],\"actions_using_module_total\":1,\"all_changes_published\":true,\"latest_version_number\":1,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"total\":1,\"page\":1,\"per_page\":1}")); - SyncPagingIterable response = client.actions() - .modules() - .list(GetActionModulesRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(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\",\"code\":\"code\",\"dependencies\":[{\"name\":\"name\",\"version\":\"version\"}],\"secrets\":[{\"name\":\"name\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"actions_using_module_total\":1,\"all_changes_published\":true,\"latest_version_number\":1,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"latest_version\":{\"id\":\"id\",\"version_number\":1,\"code\":\"code\",\"dependencies\":[{}],\"secrets\":[{}],\"created_at\":\"2024-01-15T09:30:00Z\"}}")); - CreateActionModuleResponseContent response = client.actions() - .modules() - .create(CreateActionModuleRequestContent.builder() - .name("name") - .code("code") - .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" + " \"code\": \"code\"\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" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " ],\n" - + " \"secrets\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " }\n" - + " ],\n" - + " \"actions_using_module_total\": 1,\n" - + " \"all_changes_published\": true,\n" - + " \"latest_version_number\": 1,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"latest_version\": {\n" - + " \"id\": \"id\",\n" - + " \"version_number\": 1,\n" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {}\n" - + " ],\n" - + " \"secrets\": [\n" - + " {}\n" - + " ],\n" - + " \"created_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 testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"code\":\"code\",\"dependencies\":[{\"name\":\"name\",\"version\":\"version\"}],\"secrets\":[{\"name\":\"name\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"actions_using_module_total\":1,\"all_changes_published\":true,\"latest_version_number\":1,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"latest_version\":{\"id\":\"id\",\"version_number\":1,\"code\":\"code\",\"dependencies\":[{}],\"secrets\":[{}],\"created_at\":\"2024-01-15T09:30:00Z\"}}")); - GetActionModuleResponseContent response = client.actions().modules().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" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " ],\n" - + " \"secrets\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " }\n" - + " ],\n" - + " \"actions_using_module_total\": 1,\n" - + " \"all_changes_published\": true,\n" - + " \"latest_version_number\": 1,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"latest_version\": {\n" - + " \"id\": \"id\",\n" - + " \"version_number\": 1,\n" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {}\n" - + " ],\n" - + " \"secrets\": [\n" - + " {}\n" - + " ],\n" - + " \"created_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.actions().modules().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\",\"code\":\"code\",\"dependencies\":[{\"name\":\"name\",\"version\":\"version\"}],\"secrets\":[{\"name\":\"name\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"actions_using_module_total\":1,\"all_changes_published\":true,\"latest_version_number\":1,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"latest_version\":{\"id\":\"id\",\"version_number\":1,\"code\":\"code\",\"dependencies\":[{}],\"secrets\":[{}],\"created_at\":\"2024-01-15T09:30:00Z\"}}")); - UpdateActionModuleResponseContent response = client.actions() - .modules() - .update("id", UpdateActionModuleRequestContent.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" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " ],\n" - + " \"secrets\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " }\n" - + " ],\n" - + " \"actions_using_module_total\": 1,\n" - + " \"all_changes_published\": true,\n" - + " \"latest_version_number\": 1,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"latest_version\": {\n" - + " \"id\": \"id\",\n" - + " \"version_number\": 1,\n" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {}\n" - + " ],\n" - + " \"secrets\": [\n" - + " {}\n" - + " ],\n" - + " \"created_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 testListActions() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"actions\":[{\"action_id\":\"action_id\",\"action_name\":\"action_name\",\"module_version_id\":\"module_version_id\",\"module_version_number\":1,\"supported_triggers\":[{\"id\":\"id\"}]}],\"total\":1,\"page\":1,\"per_page\":1}")); - SyncPagingIterable response = client.actions() - .modules() - .listActions( - "id", - GetActionModuleActionsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(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 testRollback() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"code\":\"code\",\"dependencies\":[{\"name\":\"name\",\"version\":\"version\"}],\"secrets\":[{\"name\":\"name\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"actions_using_module_total\":1,\"all_changes_published\":true,\"latest_version_number\":1,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"latest_version\":{\"id\":\"id\",\"version_number\":1,\"code\":\"code\",\"dependencies\":[{}],\"secrets\":[{}],\"created_at\":\"2024-01-15T09:30:00Z\"}}")); - RollbackActionModuleResponseContent response = client.actions() - .modules() - .rollback( - "id", - RollbackActionModuleRequestParameters.builder() - .moduleVersionId("module_version_id") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"module_version_id\": \"module_version_id\"\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" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " ],\n" - + " \"secrets\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " }\n" - + " ],\n" - + " \"actions_using_module_total\": 1,\n" - + " \"all_changes_published\": true,\n" - + " \"latest_version_number\": 1,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"latest_version\": {\n" - + " \"id\": \"id\",\n" - + " \"version_number\": 1,\n" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {}\n" - + " ],\n" - + " \"secrets\": [\n" - + " {}\n" - + " ],\n" - + " \"created_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"); - } - } - - /** - * 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 || !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/ActionsTriggersBindingsWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsTriggersBindingsWireTest.java deleted file mode 100644 index c669f7abb..000000000 --- a/src/test/java/com/auth0/client/mgmt/ActionsTriggersBindingsWireTest.java +++ /dev/null @@ -1,187 +0,0 @@ -package com.auth0.client.mgmt; - -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.UpdateActionBindingsResponseContent; -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 ActionsTriggersBindingsWireTest { - 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( - "{\"total\":1.1,\"page\":1.1,\"per_page\":1.1,\"bindings\":[{\"id\":\"id\",\"trigger_id\":\"trigger_id\",\"display_name\":\"display_name\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}]}")); - SyncPagingIterable response = client.actions() - .triggers() - .bindings() - .list( - "triggerId", - ListActionTriggerBindingsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(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 testUpdateMany() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"bindings\":[{\"id\":\"id\",\"trigger_id\":\"trigger_id\",\"display_name\":\"display_name\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}]}")); - UpdateActionBindingsResponseContent response = client.actions() - .triggers() - .bindings() - .updateMany( - "triggerId", - UpdateActionBindingsRequestContent.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" - + " \"bindings\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"trigger_id\": \"trigger_id\",\n" - + " \"display_name\": \"display_name\",\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"); - } - } - - /** - * 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 || !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/ActionsTriggersWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsTriggersWireTest.java deleted file mode 100644 index f8761c9a1..000000000 --- a/src/test/java/com/auth0/client/mgmt/ActionsTriggersWireTest.java +++ /dev/null @@ -1,131 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.ListActionTriggersResponseContent; -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 ActionsTriggersWireTest { - 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( - "{\"triggers\":[{\"id\":\"id\",\"version\":\"version\",\"status\":\"status\",\"runtimes\":[\"runtimes\"],\"default_runtime\":\"default_runtime\",\"compatible_triggers\":[{\"id\":\"id\",\"version\":\"version\"}],\"binding_policy\":\"trigger-bound\"}]}")); - ListActionTriggersResponseContent response = client.actions().triggers().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" - + " \"triggers\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"version\": \"version\",\n" - + " \"status\": \"status\",\n" - + " \"runtimes\": [\n" - + " \"runtimes\"\n" - + " ],\n" - + " \"default_runtime\": \"default_runtime\",\n" - + " \"compatible_triggers\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " ],\n" - + " \"binding_policy\": \"trigger-bound\"\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 || !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/ActionsVersionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsVersionsWireTest.java deleted file mode 100644 index d64e631bd..000000000 --- a/src/test/java/com/auth0/client/mgmt/ActionsVersionsWireTest.java +++ /dev/null @@ -1,329 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.actions.types.ListActionVersionsRequestParameters; -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.ActionVersion; -import com.auth0.client.mgmt.types.DeployActionVersionResponseContent; -import com.auth0.client.mgmt.types.GetActionVersionResponseContent; -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 ActionsVersionsWireTest { - 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( - "{\"total\":1.1,\"page\":1.1,\"per_page\":1.1,\"versions\":[{\"id\":\"id\",\"action_id\":\"action_id\",\"code\":\"code\",\"dependencies\":[{}],\"deployed\":true,\"runtime\":\"runtime\",\"secrets\":[{}],\"status\":\"pending\",\"number\":1.1,\"errors\":[{}],\"built_at\":\"2024-01-15T09:30:00Z\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"supported_triggers\":[{\"id\":\"id\"}],\"modules\":[{}]}]}")); - SyncPagingIterable response = client.actions() - .versions() - .list( - "actionId", - ListActionVersionsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(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 testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"action_id\":\"action_id\",\"code\":\"code\",\"dependencies\":[{\"name\":\"name\",\"version\":\"version\",\"registry_url\":\"registry_url\"}],\"deployed\":true,\"runtime\":\"runtime\",\"secrets\":[{\"name\":\"name\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"status\":\"pending\",\"number\":1.1,\"errors\":[{\"id\":\"id\",\"msg\":\"msg\",\"url\":\"url\"}],\"action\":{\"id\":\"id\",\"name\":\"name\",\"supported_triggers\":[{\"id\":\"id\"}],\"all_changes_deployed\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"},\"built_at\":\"2024-01-15T09:30:00Z\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"supported_triggers\":[{\"id\":\"id\",\"version\":\"version\",\"status\":\"status\",\"runtimes\":[\"runtimes\"],\"default_runtime\":\"default_runtime\",\"compatible_triggers\":[{\"id\":\"id\",\"version\":\"version\"}],\"binding_policy\":\"trigger-bound\"}],\"modules\":[{\"module_id\":\"module_id\",\"module_name\":\"module_name\",\"module_version_id\":\"module_version_id\",\"module_version_number\":1}]}")); - GetActionVersionResponseContent response = client.actions().versions().get("actionId", "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" - + " \"action_id\": \"action_id\",\n" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"version\": \"version\",\n" - + " \"registry_url\": \"registry_url\"\n" - + " }\n" - + " ],\n" - + " \"deployed\": true,\n" - + " \"runtime\": \"runtime\",\n" - + " \"secrets\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " }\n" - + " ],\n" - + " \"status\": \"pending\",\n" - + " \"number\": 1.1,\n" - + " \"errors\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"msg\": \"msg\",\n" - + " \"url\": \"url\"\n" - + " }\n" - + " ],\n" - + " \"action\": {\n" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"supported_triggers\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ],\n" - + " \"all_changes_deployed\": true,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " },\n" - + " \"built_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"supported_triggers\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"version\": \"version\",\n" - + " \"status\": \"status\",\n" - + " \"runtimes\": [\n" - + " \"runtimes\"\n" - + " ],\n" - + " \"default_runtime\": \"default_runtime\",\n" - + " \"compatible_triggers\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " ],\n" - + " \"binding_policy\": \"trigger-bound\"\n" - + " }\n" - + " ],\n" - + " \"modules\": [\n" - + " {\n" - + " \"module_id\": \"module_id\",\n" - + " \"module_name\": \"module_name\",\n" - + " \"module_version_id\": \"module_version_id\",\n" - + " \"module_version_number\": 1\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 testDeploy() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"action_id\":\"action_id\",\"code\":\"code\",\"dependencies\":[{\"name\":\"name\",\"version\":\"version\",\"registry_url\":\"registry_url\"}],\"deployed\":true,\"runtime\":\"runtime\",\"secrets\":[{\"name\":\"name\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"status\":\"pending\",\"number\":1.1,\"errors\":[{\"id\":\"id\",\"msg\":\"msg\",\"url\":\"url\"}],\"action\":{\"id\":\"id\",\"name\":\"name\",\"supported_triggers\":[{\"id\":\"id\"}],\"all_changes_deployed\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"},\"built_at\":\"2024-01-15T09:30:00Z\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"supported_triggers\":[{\"id\":\"id\",\"version\":\"version\",\"status\":\"status\",\"runtimes\":[\"runtimes\"],\"default_runtime\":\"default_runtime\",\"compatible_triggers\":[{\"id\":\"id\",\"version\":\"version\"}],\"binding_policy\":\"trigger-bound\"}],\"modules\":[{\"module_id\":\"module_id\",\"module_name\":\"module_name\",\"module_version_id\":\"module_version_id\",\"module_version_number\":1}]}")); - DeployActionVersionResponseContent response = - client.actions().versions().deploy("actionId", "id", OptionalNullable.absent()); - 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" - + " \"id\": \"id\",\n" - + " \"action_id\": \"action_id\",\n" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"version\": \"version\",\n" - + " \"registry_url\": \"registry_url\"\n" - + " }\n" - + " ],\n" - + " \"deployed\": true,\n" - + " \"runtime\": \"runtime\",\n" - + " \"secrets\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " }\n" - + " ],\n" - + " \"status\": \"pending\",\n" - + " \"number\": 1.1,\n" - + " \"errors\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"msg\": \"msg\",\n" - + " \"url\": \"url\"\n" - + " }\n" - + " ],\n" - + " \"action\": {\n" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"supported_triggers\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ],\n" - + " \"all_changes_deployed\": true,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " },\n" - + " \"built_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"supported_triggers\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"version\": \"version\",\n" - + " \"status\": \"status\",\n" - + " \"runtimes\": [\n" - + " \"runtimes\"\n" - + " ],\n" - + " \"default_runtime\": \"default_runtime\",\n" - + " \"compatible_triggers\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " ],\n" - + " \"binding_policy\": \"trigger-bound\"\n" - + " }\n" - + " ],\n" - + " \"modules\": [\n" - + " {\n" - + " \"module_id\": \"module_id\",\n" - + " \"module_name\": \"module_name\",\n" - + " \"module_version_id\": \"module_version_id\",\n" - + " \"module_version_number\": 1\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 || !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/ActionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ActionsWireTest.java deleted file mode 100644 index d954f74b0..000000000 --- a/src/test/java/com/auth0/client/mgmt/ActionsWireTest.java +++ /dev/null @@ -1,893 +0,0 @@ -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; -import com.auth0.client.mgmt.types.CreateActionRequestContent; -import com.auth0.client.mgmt.types.CreateActionResponseContent; -import com.auth0.client.mgmt.types.DeleteActionRequestParameters; -import com.auth0.client.mgmt.types.DeployActionResponseContent; -import com.auth0.client.mgmt.types.GetActionResponseContent; -import com.auth0.client.mgmt.types.ListActionsRequestParameters; -import com.auth0.client.mgmt.types.TestActionRequestContent; -import com.auth0.client.mgmt.types.TestActionResponseContent; -import com.auth0.client.mgmt.types.UpdateActionRequestContent; -import com.auth0.client.mgmt.types.UpdateActionResponseContent; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.Arrays; -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 ActionsWireTest { - 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( - "{\"total\":1.1,\"page\":1.1,\"per_page\":1.1,\"actions\":[{\"id\":\"id\",\"name\":\"name\",\"supported_triggers\":[{\"id\":\"id\"}],\"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("triggerId")) - .actionName(OptionalNullable.of("actionName")) - .deployed(OptionalNullable.of(true)) - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .installed(OptionalNullable.of(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 - } - - @Test - public void testCreate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"supported_triggers\":[{\"id\":\"id\",\"version\":\"version\",\"status\":\"status\",\"runtimes\":[\"runtimes\"],\"default_runtime\":\"default_runtime\",\"compatible_triggers\":[{\"id\":\"id\",\"version\":\"version\"}],\"binding_policy\":\"trigger-bound\"}],\"all_changes_deployed\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"code\":\"code\",\"dependencies\":[{\"name\":\"name\",\"version\":\"version\",\"registry_url\":\"registry_url\"}],\"runtime\":\"runtime\",\"secrets\":[{\"name\":\"name\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"deployed_version\":{\"id\":\"id\",\"action_id\":\"action_id\",\"code\":\"code\",\"dependencies\":[{}],\"deployed\":true,\"runtime\":\"runtime\",\"secrets\":[{}],\"status\":\"pending\",\"number\":1.1,\"errors\":[{}],\"action\":{\"id\":\"id\",\"name\":\"name\",\"supported_triggers\":[{\"id\":\"id\"}],\"all_changes_deployed\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"},\"built_at\":\"2024-01-15T09:30:00Z\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"supported_triggers\":[{\"id\":\"id\"}],\"modules\":[{}]},\"installed_integration_id\":\"installed_integration_id\",\"integration\":{\"id\":\"id\",\"catalog_id\":\"catalog_id\",\"url_slug\":\"url_slug\",\"partner_id\":\"partner_id\",\"name\":\"name\",\"description\":\"description\",\"short_description\":\"short_description\",\"logo\":\"logo\",\"feature_type\":\"unspecified\",\"terms_of_use_url\":\"terms_of_use_url\",\"privacy_policy_url\":\"privacy_policy_url\",\"public_support_link\":\"public_support_link\",\"current_release\":{\"id\":\"id\",\"trigger\":{\"id\":\"id\"},\"required_secrets\":[{}],\"required_configuration\":[{}]},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"},\"status\":\"pending\",\"built_at\":\"2024-01-15T09:30:00Z\",\"deploy\":true,\"modules\":[{\"module_id\":\"module_id\",\"module_name\":\"module_name\",\"module_version_id\":\"module_version_id\",\"module_version_number\":1}]}")); - CreateActionResponseContent response = client.actions() - .create(CreateActionRequestContent.builder() - .name("name") - .supportedTriggers( - Arrays.asList(ActionTrigger.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" - + " \"name\": \"name\",\n" - + " \"supported_triggers\": [\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"); - } - - // 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" - + " \"supported_triggers\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"version\": \"version\",\n" - + " \"status\": \"status\",\n" - + " \"runtimes\": [\n" - + " \"runtimes\"\n" - + " ],\n" - + " \"default_runtime\": \"default_runtime\",\n" - + " \"compatible_triggers\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " ],\n" - + " \"binding_policy\": \"trigger-bound\"\n" - + " }\n" - + " ],\n" - + " \"all_changes_deployed\": true,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"version\": \"version\",\n" - + " \"registry_url\": \"registry_url\"\n" - + " }\n" - + " ],\n" - + " \"runtime\": \"runtime\",\n" - + " \"secrets\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " }\n" - + " ],\n" - + " \"deployed_version\": {\n" - + " \"id\": \"id\",\n" - + " \"action_id\": \"action_id\",\n" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {}\n" - + " ],\n" - + " \"deployed\": true,\n" - + " \"runtime\": \"runtime\",\n" - + " \"secrets\": [\n" - + " {}\n" - + " ],\n" - + " \"status\": \"pending\",\n" - + " \"number\": 1.1,\n" - + " \"errors\": [\n" - + " {}\n" - + " ],\n" - + " \"action\": {\n" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"supported_triggers\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ],\n" - + " \"all_changes_deployed\": true,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " },\n" - + " \"built_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"supported_triggers\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ],\n" - + " \"modules\": [\n" - + " {}\n" - + " ]\n" - + " },\n" - + " \"installed_integration_id\": \"installed_integration_id\",\n" - + " \"integration\": {\n" - + " \"id\": \"id\",\n" - + " \"catalog_id\": \"catalog_id\",\n" - + " \"url_slug\": \"url_slug\",\n" - + " \"partner_id\": \"partner_id\",\n" - + " \"name\": \"name\",\n" - + " \"description\": \"description\",\n" - + " \"short_description\": \"short_description\",\n" - + " \"logo\": \"logo\",\n" - + " \"feature_type\": \"unspecified\",\n" - + " \"terms_of_use_url\": \"terms_of_use_url\",\n" - + " \"privacy_policy_url\": \"privacy_policy_url\",\n" - + " \"public_support_link\": \"public_support_link\",\n" - + " \"current_release\": {\n" - + " \"id\": \"id\",\n" - + " \"trigger\": {\n" - + " \"id\": \"id\"\n" - + " },\n" - + " \"required_secrets\": [\n" - + " {}\n" - + " ],\n" - + " \"required_configuration\": [\n" - + " {}\n" - + " ]\n" - + " },\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " },\n" - + " \"status\": \"pending\",\n" - + " \"built_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"deploy\": true,\n" - + " \"modules\": [\n" - + " {\n" - + " \"module_id\": \"module_id\",\n" - + " \"module_name\": \"module_name\",\n" - + " \"module_version_id\": \"module_version_id\",\n" - + " \"module_version_number\": 1\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 testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"supported_triggers\":[{\"id\":\"id\",\"version\":\"version\",\"status\":\"status\",\"runtimes\":[\"runtimes\"],\"default_runtime\":\"default_runtime\",\"compatible_triggers\":[{\"id\":\"id\",\"version\":\"version\"}],\"binding_policy\":\"trigger-bound\"}],\"all_changes_deployed\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"code\":\"code\",\"dependencies\":[{\"name\":\"name\",\"version\":\"version\",\"registry_url\":\"registry_url\"}],\"runtime\":\"runtime\",\"secrets\":[{\"name\":\"name\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"deployed_version\":{\"id\":\"id\",\"action_id\":\"action_id\",\"code\":\"code\",\"dependencies\":[{}],\"deployed\":true,\"runtime\":\"runtime\",\"secrets\":[{}],\"status\":\"pending\",\"number\":1.1,\"errors\":[{}],\"action\":{\"id\":\"id\",\"name\":\"name\",\"supported_triggers\":[{\"id\":\"id\"}],\"all_changes_deployed\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"},\"built_at\":\"2024-01-15T09:30:00Z\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"supported_triggers\":[{\"id\":\"id\"}],\"modules\":[{}]},\"installed_integration_id\":\"installed_integration_id\",\"integration\":{\"id\":\"id\",\"catalog_id\":\"catalog_id\",\"url_slug\":\"url_slug\",\"partner_id\":\"partner_id\",\"name\":\"name\",\"description\":\"description\",\"short_description\":\"short_description\",\"logo\":\"logo\",\"feature_type\":\"unspecified\",\"terms_of_use_url\":\"terms_of_use_url\",\"privacy_policy_url\":\"privacy_policy_url\",\"public_support_link\":\"public_support_link\",\"current_release\":{\"id\":\"id\",\"trigger\":{\"id\":\"id\"},\"required_secrets\":[{}],\"required_configuration\":[{}]},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"},\"status\":\"pending\",\"built_at\":\"2024-01-15T09:30:00Z\",\"deploy\":true,\"modules\":[{\"module_id\":\"module_id\",\"module_name\":\"module_name\",\"module_version_id\":\"module_version_id\",\"module_version_number\":1}]}")); - GetActionResponseContent response = client.actions().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" - + " \"supported_triggers\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"version\": \"version\",\n" - + " \"status\": \"status\",\n" - + " \"runtimes\": [\n" - + " \"runtimes\"\n" - + " ],\n" - + " \"default_runtime\": \"default_runtime\",\n" - + " \"compatible_triggers\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " ],\n" - + " \"binding_policy\": \"trigger-bound\"\n" - + " }\n" - + " ],\n" - + " \"all_changes_deployed\": true,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"version\": \"version\",\n" - + " \"registry_url\": \"registry_url\"\n" - + " }\n" - + " ],\n" - + " \"runtime\": \"runtime\",\n" - + " \"secrets\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " }\n" - + " ],\n" - + " \"deployed_version\": {\n" - + " \"id\": \"id\",\n" - + " \"action_id\": \"action_id\",\n" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {}\n" - + " ],\n" - + " \"deployed\": true,\n" - + " \"runtime\": \"runtime\",\n" - + " \"secrets\": [\n" - + " {}\n" - + " ],\n" - + " \"status\": \"pending\",\n" - + " \"number\": 1.1,\n" - + " \"errors\": [\n" - + " {}\n" - + " ],\n" - + " \"action\": {\n" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"supported_triggers\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ],\n" - + " \"all_changes_deployed\": true,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " },\n" - + " \"built_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"supported_triggers\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ],\n" - + " \"modules\": [\n" - + " {}\n" - + " ]\n" - + " },\n" - + " \"installed_integration_id\": \"installed_integration_id\",\n" - + " \"integration\": {\n" - + " \"id\": \"id\",\n" - + " \"catalog_id\": \"catalog_id\",\n" - + " \"url_slug\": \"url_slug\",\n" - + " \"partner_id\": \"partner_id\",\n" - + " \"name\": \"name\",\n" - + " \"description\": \"description\",\n" - + " \"short_description\": \"short_description\",\n" - + " \"logo\": \"logo\",\n" - + " \"feature_type\": \"unspecified\",\n" - + " \"terms_of_use_url\": \"terms_of_use_url\",\n" - + " \"privacy_policy_url\": \"privacy_policy_url\",\n" - + " \"public_support_link\": \"public_support_link\",\n" - + " \"current_release\": {\n" - + " \"id\": \"id\",\n" - + " \"trigger\": {\n" - + " \"id\": \"id\"\n" - + " },\n" - + " \"required_secrets\": [\n" - + " {}\n" - + " ],\n" - + " \"required_configuration\": [\n" - + " {}\n" - + " ]\n" - + " },\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " },\n" - + " \"status\": \"pending\",\n" - + " \"built_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"deploy\": true,\n" - + " \"modules\": [\n" - + " {\n" - + " \"module_id\": \"module_id\",\n" - + " \"module_name\": \"module_name\",\n" - + " \"module_version_id\": \"module_version_id\",\n" - + " \"module_version_number\": 1\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.actions() - .delete( - "id", - DeleteActionRequestParameters.builder() - .force(OptionalNullable.of(true)) - .build()); - 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\",\"supported_triggers\":[{\"id\":\"id\",\"version\":\"version\",\"status\":\"status\",\"runtimes\":[\"runtimes\"],\"default_runtime\":\"default_runtime\",\"compatible_triggers\":[{\"id\":\"id\",\"version\":\"version\"}],\"binding_policy\":\"trigger-bound\"}],\"all_changes_deployed\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"code\":\"code\",\"dependencies\":[{\"name\":\"name\",\"version\":\"version\",\"registry_url\":\"registry_url\"}],\"runtime\":\"runtime\",\"secrets\":[{\"name\":\"name\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"deployed_version\":{\"id\":\"id\",\"action_id\":\"action_id\",\"code\":\"code\",\"dependencies\":[{}],\"deployed\":true,\"runtime\":\"runtime\",\"secrets\":[{}],\"status\":\"pending\",\"number\":1.1,\"errors\":[{}],\"action\":{\"id\":\"id\",\"name\":\"name\",\"supported_triggers\":[{\"id\":\"id\"}],\"all_changes_deployed\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"},\"built_at\":\"2024-01-15T09:30:00Z\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"supported_triggers\":[{\"id\":\"id\"}],\"modules\":[{}]},\"installed_integration_id\":\"installed_integration_id\",\"integration\":{\"id\":\"id\",\"catalog_id\":\"catalog_id\",\"url_slug\":\"url_slug\",\"partner_id\":\"partner_id\",\"name\":\"name\",\"description\":\"description\",\"short_description\":\"short_description\",\"logo\":\"logo\",\"feature_type\":\"unspecified\",\"terms_of_use_url\":\"terms_of_use_url\",\"privacy_policy_url\":\"privacy_policy_url\",\"public_support_link\":\"public_support_link\",\"current_release\":{\"id\":\"id\",\"trigger\":{\"id\":\"id\"},\"required_secrets\":[{}],\"required_configuration\":[{}]},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"},\"status\":\"pending\",\"built_at\":\"2024-01-15T09:30:00Z\",\"deploy\":true,\"modules\":[{\"module_id\":\"module_id\",\"module_name\":\"module_name\",\"module_version_id\":\"module_version_id\",\"module_version_number\":1}]}")); - UpdateActionResponseContent response = client.actions() - .update("id", UpdateActionRequestContent.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" - + " \"supported_triggers\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"version\": \"version\",\n" - + " \"status\": \"status\",\n" - + " \"runtimes\": [\n" - + " \"runtimes\"\n" - + " ],\n" - + " \"default_runtime\": \"default_runtime\",\n" - + " \"compatible_triggers\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " ],\n" - + " \"binding_policy\": \"trigger-bound\"\n" - + " }\n" - + " ],\n" - + " \"all_changes_deployed\": true,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"version\": \"version\",\n" - + " \"registry_url\": \"registry_url\"\n" - + " }\n" - + " ],\n" - + " \"runtime\": \"runtime\",\n" - + " \"secrets\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " }\n" - + " ],\n" - + " \"deployed_version\": {\n" - + " \"id\": \"id\",\n" - + " \"action_id\": \"action_id\",\n" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {}\n" - + " ],\n" - + " \"deployed\": true,\n" - + " \"runtime\": \"runtime\",\n" - + " \"secrets\": [\n" - + " {}\n" - + " ],\n" - + " \"status\": \"pending\",\n" - + " \"number\": 1.1,\n" - + " \"errors\": [\n" - + " {}\n" - + " ],\n" - + " \"action\": {\n" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"supported_triggers\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ],\n" - + " \"all_changes_deployed\": true,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " },\n" - + " \"built_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"supported_triggers\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ],\n" - + " \"modules\": [\n" - + " {}\n" - + " ]\n" - + " },\n" - + " \"installed_integration_id\": \"installed_integration_id\",\n" - + " \"integration\": {\n" - + " \"id\": \"id\",\n" - + " \"catalog_id\": \"catalog_id\",\n" - + " \"url_slug\": \"url_slug\",\n" - + " \"partner_id\": \"partner_id\",\n" - + " \"name\": \"name\",\n" - + " \"description\": \"description\",\n" - + " \"short_description\": \"short_description\",\n" - + " \"logo\": \"logo\",\n" - + " \"feature_type\": \"unspecified\",\n" - + " \"terms_of_use_url\": \"terms_of_use_url\",\n" - + " \"privacy_policy_url\": \"privacy_policy_url\",\n" - + " \"public_support_link\": \"public_support_link\",\n" - + " \"current_release\": {\n" - + " \"id\": \"id\",\n" - + " \"trigger\": {\n" - + " \"id\": \"id\"\n" - + " },\n" - + " \"required_secrets\": [\n" - + " {}\n" - + " ],\n" - + " \"required_configuration\": [\n" - + " {}\n" - + " ]\n" - + " },\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " },\n" - + " \"status\": \"pending\",\n" - + " \"built_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"deploy\": true,\n" - + " \"modules\": [\n" - + " {\n" - + " \"module_id\": \"module_id\",\n" - + " \"module_name\": \"module_name\",\n" - + " \"module_version_id\": \"module_version_id\",\n" - + " \"module_version_number\": 1\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 testDeploy() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"action_id\":\"action_id\",\"code\":\"code\",\"dependencies\":[{\"name\":\"name\",\"version\":\"version\",\"registry_url\":\"registry_url\"}],\"deployed\":true,\"runtime\":\"runtime\",\"secrets\":[{\"name\":\"name\",\"updated_at\":\"2024-01-15T09:30:00Z\"}],\"status\":\"pending\",\"number\":1.1,\"errors\":[{\"id\":\"id\",\"msg\":\"msg\",\"url\":\"url\"}],\"action\":{\"id\":\"id\",\"name\":\"name\",\"supported_triggers\":[{\"id\":\"id\"}],\"all_changes_deployed\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"},\"built_at\":\"2024-01-15T09:30:00Z\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"supported_triggers\":[{\"id\":\"id\",\"version\":\"version\",\"status\":\"status\",\"runtimes\":[\"runtimes\"],\"default_runtime\":\"default_runtime\",\"compatible_triggers\":[{\"id\":\"id\",\"version\":\"version\"}],\"binding_policy\":\"trigger-bound\"}],\"modules\":[{\"module_id\":\"module_id\",\"module_name\":\"module_name\",\"module_version_id\":\"module_version_id\",\"module_version_number\":1}]}")); - DeployActionResponseContent response = client.actions().deploy("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" - + " \"id\": \"id\",\n" - + " \"action_id\": \"action_id\",\n" - + " \"code\": \"code\",\n" - + " \"dependencies\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"version\": \"version\",\n" - + " \"registry_url\": \"registry_url\"\n" - + " }\n" - + " ],\n" - + " \"deployed\": true,\n" - + " \"runtime\": \"runtime\",\n" - + " \"secrets\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " }\n" - + " ],\n" - + " \"status\": \"pending\",\n" - + " \"number\": 1.1,\n" - + " \"errors\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"msg\": \"msg\",\n" - + " \"url\": \"url\"\n" - + " }\n" - + " ],\n" - + " \"action\": {\n" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"supported_triggers\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ],\n" - + " \"all_changes_deployed\": true,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + " },\n" - + " \"built_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"supported_triggers\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"version\": \"version\",\n" - + " \"status\": \"status\",\n" - + " \"runtimes\": [\n" - + " \"runtimes\"\n" - + " ],\n" - + " \"default_runtime\": \"default_runtime\",\n" - + " \"compatible_triggers\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " ],\n" - + " \"binding_policy\": \"trigger-bound\"\n" - + " }\n" - + " ],\n" - + " \"modules\": [\n" - + " {\n" - + " \"module_id\": \"module_id\",\n" - + " \"module_name\": \"module_name\",\n" - + " \"module_version_id\": \"module_version_id\",\n" - + " \"module_version_number\": 1\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 testTest() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"payload\":{\"key\":\"value\"}}")); - TestActionResponseContent response = client.actions() - .test( - "id", - TestActionRequestContent.builder() - .payload(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" + " \"payload\": {\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" + " \"payload\": {\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 || !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/AnomalyBlocksWireTest.java b/src/test/java/com/auth0/client/mgmt/AnomalyBlocksWireTest.java deleted file mode 100644 index 091e49ac3..000000000 --- a/src/test/java/com/auth0/client/mgmt/AnomalyBlocksWireTest.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -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 AnomalyBlocksWireTest { - 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 testCheckIp() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.anomaly().blocks().checkIp("id"); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("GET", request.getMethod()); - } - - @Test - public void testUnblockIp() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.anomaly().blocks().unblockIp("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 || !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/AttackProtectionBotDetectionWireTest.java b/src/test/java/com/auth0/client/mgmt/AttackProtectionBotDetectionWireTest.java deleted file mode 100644 index ef08312ec..000000000 --- a/src/test/java/com/auth0/client/mgmt/AttackProtectionBotDetectionWireTest.java +++ /dev/null @@ -1,212 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.attackprotection.types.UpdateBotDetectionSettingsRequestContent; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.GetBotDetectionSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateBotDetectionSettingsResponseContent; -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 AttackProtectionBotDetectionWireTest { - 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( - "{\"bot_detection_level\":\"low\",\"challenge_password_policy\":\"never\",\"challenge_passwordless_policy\":\"never\",\"challenge_password_reset_policy\":\"never\",\"allowlist\":[\"allowlist\"],\"monitoring_mode_enabled\":true}")); - GetBotDetectionSettingsResponseContent response = - client.attackProtection().botDetection().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" - + " \"bot_detection_level\": \"low\",\n" - + " \"challenge_password_policy\": \"never\",\n" - + " \"challenge_passwordless_policy\": \"never\",\n" - + " \"challenge_password_reset_policy\": \"never\",\n" - + " \"allowlist\": [\n" - + " \"allowlist\"\n" - + " ],\n" - + " \"monitoring_mode_enabled\": true\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( - "{\"bot_detection_level\":\"low\",\"challenge_password_policy\":\"never\",\"challenge_passwordless_policy\":\"never\",\"challenge_password_reset_policy\":\"never\",\"allowlist\":[\"allowlist\"],\"monitoring_mode_enabled\":true}")); - UpdateBotDetectionSettingsResponseContent response = client.attackProtection() - .botDetection() - .update(UpdateBotDetectionSettingsRequestContent.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" - + " \"bot_detection_level\": \"low\",\n" - + " \"challenge_password_policy\": \"never\",\n" - + " \"challenge_passwordless_policy\": \"never\",\n" - + " \"challenge_password_reset_policy\": \"never\",\n" - + " \"allowlist\": [\n" - + " \"allowlist\"\n" - + " ],\n" - + " \"monitoring_mode_enabled\": true\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 || !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/AttackProtectionBreachedPasswordDetectionWireTest.java b/src/test/java/com/auth0/client/mgmt/AttackProtectionBreachedPasswordDetectionWireTest.java deleted file mode 100644 index ca93b7b9c..000000000 --- a/src/test/java/com/auth0/client/mgmt/AttackProtectionBreachedPasswordDetectionWireTest.java +++ /dev/null @@ -1,237 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.attackprotection.types.UpdateBreachedPasswordDetectionSettingsRequestContent; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.GetBreachedPasswordDetectionSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateBreachedPasswordDetectionSettingsResponseContent; -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 AttackProtectionBreachedPasswordDetectionWireTest { - 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( - "{\"enabled\":true,\"shields\":[\"block\"],\"admin_notification_frequency\":[\"immediately\"],\"method\":\"standard\",\"stage\":{\"pre-user-registration\":{\"shields\":[\"block\"]},\"pre-change-password\":{\"shields\":[\"block\"]}}}")); - GetBreachedPasswordDetectionSettingsResponseContent response = - client.attackProtection().breachedPasswordDetection().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" - + " \"enabled\": true,\n" - + " \"shields\": [\n" - + " \"block\"\n" - + " ],\n" - + " \"admin_notification_frequency\": [\n" - + " \"immediately\"\n" - + " ],\n" - + " \"method\": \"standard\",\n" - + " \"stage\": {\n" - + " \"pre-user-registration\": {\n" - + " \"shields\": [\n" - + " \"block\"\n" - + " ]\n" - + " },\n" - + " \"pre-change-password\": {\n" - + " \"shields\": [\n" - + " \"block\"\n" - + " ]\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 testUpdate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"enabled\":true,\"shields\":[\"block\"],\"admin_notification_frequency\":[\"immediately\"],\"method\":\"standard\",\"stage\":{\"pre-user-registration\":{\"shields\":[\"block\"]},\"pre-change-password\":{\"shields\":[\"block\"]}}}")); - UpdateBreachedPasswordDetectionSettingsResponseContent response = client.attackProtection() - .breachedPasswordDetection() - .update(UpdateBreachedPasswordDetectionSettingsRequestContent.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" - + " \"enabled\": true,\n" - + " \"shields\": [\n" - + " \"block\"\n" - + " ],\n" - + " \"admin_notification_frequency\": [\n" - + " \"immediately\"\n" - + " ],\n" - + " \"method\": \"standard\",\n" - + " \"stage\": {\n" - + " \"pre-user-registration\": {\n" - + " \"shields\": [\n" - + " \"block\"\n" - + " ]\n" - + " },\n" - + " \"pre-change-password\": {\n" - + " \"shields\": [\n" - + " \"block\"\n" - + " ]\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 || !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 deleted file mode 100644 index ac8b495d8..000000000 --- a/src/test/java/com/auth0/client/mgmt/AttackProtectionBruteForceProtectionWireTest.java +++ /dev/null @@ -1,214 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.attackprotection.types.UpdateBruteForceSettingsRequestContent; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.GetBruteForceSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateBruteForceSettingsResponseContent; -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 AttackProtectionBruteForceProtectionWireTest { - 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( - "{\"enabled\":true,\"shields\":[\"block\"],\"allowlist\":[\"allowlist\"],\"mode\":\"count_per_identifier_and_ip\",\"max_attempts\":1}")); - GetBruteForceSettingsResponseContent response = - client.attackProtection().bruteForceProtection().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" - + " \"enabled\": true,\n" - + " \"shields\": [\n" - + " \"block\"\n" - + " ],\n" - + " \"allowlist\": [\n" - + " \"allowlist\"\n" - + " ],\n" - + " \"mode\": \"count_per_identifier_and_ip\",\n" - + " \"max_attempts\": 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 testUpdate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"enabled\":true,\"shields\":[\"block\"],\"allowlist\":[\"allowlist\"],\"mode\":\"count_per_identifier_and_ip\",\"max_attempts\":1}")); - UpdateBruteForceSettingsResponseContent response = client.attackProtection() - .bruteForceProtection() - .update(UpdateBruteForceSettingsRequestContent.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" - + " \"enabled\": true,\n" - + " \"shields\": [\n" - + " \"block\"\n" - + " ],\n" - + " \"allowlist\": [\n" - + " \"allowlist\"\n" - + " ],\n" - + " \"mode\": \"count_per_identifier_and_ip\",\n" - + " \"max_attempts\": 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 || !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/AttackProtectionCaptchaWireTest.java b/src/test/java/com/auth0/client/mgmt/AttackProtectionCaptchaWireTest.java deleted file mode 100644 index 037385971..000000000 --- a/src/test/java/com/auth0/client/mgmt/AttackProtectionCaptchaWireTest.java +++ /dev/null @@ -1,248 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.attackprotection.types.UpdateAttackProtectionCaptchaRequestContent; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.GetAttackProtectionCaptchaResponseContent; -import com.auth0.client.mgmt.types.UpdateAttackProtectionCaptchaResponseContent; -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 AttackProtectionCaptchaWireTest { - 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( - "{\"active_provider_id\":\"active_provider_id\",\"arkose\":{\"site_key\":\"site_key\",\"fail_open\":true,\"client_subdomain\":\"client_subdomain\",\"verify_subdomain\":\"verify_subdomain\"},\"auth_challenge\":{\"fail_open\":true},\"hcaptcha\":{\"site_key\":\"site_key\"},\"friendly_captcha\":{\"site_key\":\"site_key\"},\"recaptcha_enterprise\":{\"site_key\":\"site_key\",\"project_id\":\"project_id\"},\"recaptcha_v2\":{\"site_key\":\"site_key\"},\"simple_captcha\":{\"key\":\"value\"}}")); - GetAttackProtectionCaptchaResponseContent response = - client.attackProtection().captcha().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" - + " \"active_provider_id\": \"active_provider_id\",\n" - + " \"arkose\": {\n" - + " \"site_key\": \"site_key\",\n" - + " \"fail_open\": true,\n" - + " \"client_subdomain\": \"client_subdomain\",\n" - + " \"verify_subdomain\": \"verify_subdomain\"\n" - + " },\n" - + " \"auth_challenge\": {\n" - + " \"fail_open\": true\n" - + " },\n" - + " \"hcaptcha\": {\n" - + " \"site_key\": \"site_key\"\n" - + " },\n" - + " \"friendly_captcha\": {\n" - + " \"site_key\": \"site_key\"\n" - + " },\n" - + " \"recaptcha_enterprise\": {\n" - + " \"site_key\": \"site_key\",\n" - + " \"project_id\": \"project_id\"\n" - + " },\n" - + " \"recaptcha_v2\": {\n" - + " \"site_key\": \"site_key\"\n" - + " },\n" - + " \"simple_captcha\": {\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 testUpdate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"active_provider_id\":\"active_provider_id\",\"arkose\":{\"site_key\":\"site_key\",\"fail_open\":true,\"client_subdomain\":\"client_subdomain\",\"verify_subdomain\":\"verify_subdomain\"},\"auth_challenge\":{\"fail_open\":true},\"hcaptcha\":{\"site_key\":\"site_key\"},\"friendly_captcha\":{\"site_key\":\"site_key\"},\"recaptcha_enterprise\":{\"site_key\":\"site_key\",\"project_id\":\"project_id\"},\"recaptcha_v2\":{\"site_key\":\"site_key\"},\"simple_captcha\":{\"key\":\"value\"}}")); - UpdateAttackProtectionCaptchaResponseContent response = client.attackProtection() - .captcha() - .update(UpdateAttackProtectionCaptchaRequestContent.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" - + " \"active_provider_id\": \"active_provider_id\",\n" - + " \"arkose\": {\n" - + " \"site_key\": \"site_key\",\n" - + " \"fail_open\": true,\n" - + " \"client_subdomain\": \"client_subdomain\",\n" - + " \"verify_subdomain\": \"verify_subdomain\"\n" - + " },\n" - + " \"auth_challenge\": {\n" - + " \"fail_open\": true\n" - + " },\n" - + " \"hcaptcha\": {\n" - + " \"site_key\": \"site_key\"\n" - + " },\n" - + " \"friendly_captcha\": {\n" - + " \"site_key\": \"site_key\"\n" - + " },\n" - + " \"recaptcha_enterprise\": {\n" - + " \"site_key\": \"site_key\",\n" - + " \"project_id\": \"project_id\"\n" - + " },\n" - + " \"recaptcha_v2\": {\n" - + " \"site_key\": \"site_key\"\n" - + " },\n" - + " \"simple_captcha\": {\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 || !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/AttackProtectionSuspiciousIpThrottlingWireTest.java b/src/test/java/com/auth0/client/mgmt/AttackProtectionSuspiciousIpThrottlingWireTest.java deleted file mode 100644 index 0c3572915..000000000 --- a/src/test/java/com/auth0/client/mgmt/AttackProtectionSuspiciousIpThrottlingWireTest.java +++ /dev/null @@ -1,231 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.attackprotection.types.UpdateSuspiciousIpThrottlingSettingsRequestContent; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.GetSuspiciousIpThrottlingSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateSuspiciousIpThrottlingSettingsResponseContent; -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 AttackProtectionSuspiciousIpThrottlingWireTest { - 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( - "{\"enabled\":true,\"shields\":[\"block\"],\"allowlist\":[\"allowlist\"],\"stage\":{\"pre-login\":{\"max_attempts\":1,\"rate\":1},\"pre-user-registration\":{\"max_attempts\":1,\"rate\":1}}}")); - GetSuspiciousIpThrottlingSettingsResponseContent response = - client.attackProtection().suspiciousIpThrottling().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" - + " \"enabled\": true,\n" - + " \"shields\": [\n" - + " \"block\"\n" - + " ],\n" - + " \"allowlist\": [\n" - + " \"allowlist\"\n" - + " ],\n" - + " \"stage\": {\n" - + " \"pre-login\": {\n" - + " \"max_attempts\": 1,\n" - + " \"rate\": 1\n" - + " },\n" - + " \"pre-user-registration\": {\n" - + " \"max_attempts\": 1,\n" - + " \"rate\": 1\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 testUpdate() throws Exception { - server.enqueue( - 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}}}")); - UpdateSuspiciousIpThrottlingSettingsResponseContent response = client.attackProtection() - .suspiciousIpThrottling() - .update(UpdateSuspiciousIpThrottlingSettingsRequestContent.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" - + " \"enabled\": true,\n" - + " \"shields\": [\n" - + " \"block\"\n" - + " ],\n" - + " \"allowlist\": [\n" - + " \"allowlist\"\n" - + " ],\n" - + " \"stage\": {\n" - + " \"pre-login\": {\n" - + " \"max_attempts\": 1,\n" - + " \"rate\": 1\n" - + " },\n" - + " \"pre-user-registration\": {\n" - + " \"max_attempts\": 1,\n" - + " \"rate\": 1\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 || !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/BrandingPhoneProvidersWireTest.java b/src/test/java/com/auth0/client/mgmt/BrandingPhoneProvidersWireTest.java deleted file mode 100644 index 192ab6c2d..000000000 --- a/src/test/java/com/auth0/client/mgmt/BrandingPhoneProvidersWireTest.java +++ /dev/null @@ -1,505 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.branding.phone.types.CreateBrandingPhoneProviderRequestContent; -import com.auth0.client.mgmt.branding.phone.types.CreatePhoneProviderSendTestRequestContent; -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; -import com.auth0.client.mgmt.types.ListBrandingPhoneProvidersResponseContent; -import com.auth0.client.mgmt.types.PhoneProviderCredentials; -import com.auth0.client.mgmt.types.PhoneProviderNameEnum; -import com.auth0.client.mgmt.types.TwilioProviderCredentials; -import com.auth0.client.mgmt.types.UpdateBrandingPhoneProviderResponseContent; -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 BrandingPhoneProvidersWireTest { - 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( - "{\"providers\":[{\"id\":\"id\",\"tenant\":\"tenant\",\"name\":\"twilio\",\"channel\":\"phone\",\"disabled\":true,\"configuration\":{\"sid\":\"sid\",\"delivery_methods\":[\"text\"]},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}]}")); - ListBrandingPhoneProvidersResponseContent response = client.branding() - .phone() - .providers() - .list(ListBrandingPhoneProvidersRequestParameters.builder() - .disabled(OptionalNullable.of(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"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"providers\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"tenant\": \"tenant\",\n" - + " \"name\": \"twilio\",\n" - + " \"channel\": \"phone\",\n" - + " \"disabled\": true,\n" - + " \"configuration\": {\n" - + " \"sid\": \"sid\",\n" - + " \"delivery_methods\": [\n" - + " \"text\"\n" - + " ]\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\",\"tenant\":\"tenant\",\"name\":\"twilio\",\"channel\":\"phone\",\"disabled\":true,\"configuration\":{\"default_from\":\"default_from\",\"mssid\":\"mssid\",\"sid\":\"sid\",\"delivery_methods\":[\"text\"]},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); - CreateBrandingPhoneProviderResponseContent response = client.branding() - .phone() - .providers() - .create(CreateBrandingPhoneProviderRequestContent.builder() - .name(PhoneProviderNameEnum.TWILIO) - .credentials(PhoneProviderCredentials.of(TwilioProviderCredentials.builder() - .authToken("auth_token") - .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\": \"twilio\",\n" - + " \"credentials\": {\n" - + " \"auth_token\": \"auth_token\"\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" - + " \"tenant\": \"tenant\",\n" - + " \"name\": \"twilio\",\n" - + " \"channel\": \"phone\",\n" - + " \"disabled\": true,\n" - + " \"configuration\": {\n" - + " \"default_from\": \"default_from\",\n" - + " \"mssid\": \"mssid\",\n" - + " \"sid\": \"sid\",\n" - + " \"delivery_methods\": [\n" - + " \"text\"\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\",\"tenant\":\"tenant\",\"name\":\"twilio\",\"channel\":\"phone\",\"disabled\":true,\"configuration\":{\"default_from\":\"default_from\",\"mssid\":\"mssid\",\"sid\":\"sid\",\"delivery_methods\":[\"text\"]},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); - GetBrandingPhoneProviderResponseContent response = - client.branding().phone().providers().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" - + " \"tenant\": \"tenant\",\n" - + " \"name\": \"twilio\",\n" - + " \"channel\": \"phone\",\n" - + " \"disabled\": true,\n" - + " \"configuration\": {\n" - + " \"default_from\": \"default_from\",\n" - + " \"mssid\": \"mssid\",\n" - + " \"sid\": \"sid\",\n" - + " \"delivery_methods\": [\n" - + " \"text\"\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.branding().phone().providers().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\",\"tenant\":\"tenant\",\"name\":\"twilio\",\"channel\":\"phone\",\"disabled\":true,\"configuration\":{\"default_from\":\"default_from\",\"mssid\":\"mssid\",\"sid\":\"sid\",\"delivery_methods\":[\"text\"]},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); - UpdateBrandingPhoneProviderResponseContent response = client.branding() - .phone() - .providers() - .update( - "id", - UpdateBrandingPhoneProviderRequestContent.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" - + " \"tenant\": \"tenant\",\n" - + " \"name\": \"twilio\",\n" - + " \"channel\": \"phone\",\n" - + " \"disabled\": true,\n" - + " \"configuration\": {\n" - + " \"default_from\": \"default_from\",\n" - + " \"mssid\": \"mssid\",\n" - + " \"sid\": \"sid\",\n" - + " \"delivery_methods\": [\n" - + " \"text\"\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 testTest() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"code\":1.1,\"message\":\"message\"}")); - CreatePhoneProviderSendTestResponseContent response = client.branding() - .phone() - .providers() - .test( - "id", - CreatePhoneProviderSendTestRequestContent.builder() - .to("to") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"to\": \"to\"\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" + " \"code\": 1.1,\n" + " \"message\": \"message\"\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 || !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/BrandingPhoneTemplatesWireTest.java b/src/test/java/com/auth0/client/mgmt/BrandingPhoneTemplatesWireTest.java deleted file mode 100644 index d47bb698f..000000000 --- a/src/test/java/com/auth0/client/mgmt/BrandingPhoneTemplatesWireTest.java +++ /dev/null @@ -1,581 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.branding.phone.types.CreatePhoneTemplateRequestContent; -import com.auth0.client.mgmt.branding.phone.types.CreatePhoneTemplateTestNotificationRequestContent; -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; -import com.auth0.client.mgmt.types.ListPhoneTemplatesResponseContent; -import com.auth0.client.mgmt.types.ResetPhoneTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdatePhoneTemplateResponseContent; -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 BrandingPhoneTemplatesWireTest { - 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( - "{\"templates\":[{\"id\":\"id\",\"channel\":\"channel\",\"customizable\":true,\"tenant\":\"tenant\",\"content\":{},\"type\":\"otp_verify\",\"disabled\":true}]}")); - ListPhoneTemplatesResponseContent response = client.branding() - .phone() - .templates() - .list(ListPhoneTemplatesRequestParameters.builder() - .disabled(OptionalNullable.of(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"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"templates\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"channel\": \"channel\",\n" - + " \"customizable\": true,\n" - + " \"tenant\": \"tenant\",\n" - + " \"content\": {},\n" - + " \"type\": \"otp_verify\",\n" - + " \"disabled\": true\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\",\"channel\":\"channel\",\"customizable\":true,\"tenant\":\"tenant\",\"content\":{\"syntax\":\"syntax\",\"from\":\"from\",\"body\":{\"text\":\"text\",\"voice\":\"voice\"}},\"type\":\"otp_verify\",\"disabled\":true}")); - CreatePhoneTemplateResponseContent response = client.branding() - .phone() - .templates() - .create(CreatePhoneTemplateRequestContent.builder().build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", 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" - + " \"channel\": \"channel\",\n" - + " \"customizable\": true,\n" - + " \"tenant\": \"tenant\",\n" - + " \"content\": {\n" - + " \"syntax\": \"syntax\",\n" - + " \"from\": \"from\",\n" - + " \"body\": {\n" - + " \"text\": \"text\",\n" - + " \"voice\": \"voice\"\n" - + " }\n" - + " },\n" - + " \"type\": \"otp_verify\",\n" - + " \"disabled\": true\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\",\"channel\":\"channel\",\"customizable\":true,\"tenant\":\"tenant\",\"content\":{\"syntax\":\"syntax\",\"from\":\"from\",\"body\":{\"text\":\"text\",\"voice\":\"voice\"}},\"type\":\"otp_verify\",\"disabled\":true}")); - GetPhoneTemplateResponseContent response = - client.branding().phone().templates().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" - + " \"channel\": \"channel\",\n" - + " \"customizable\": true,\n" - + " \"tenant\": \"tenant\",\n" - + " \"content\": {\n" - + " \"syntax\": \"syntax\",\n" - + " \"from\": \"from\",\n" - + " \"body\": {\n" - + " \"text\": \"text\",\n" - + " \"voice\": \"voice\"\n" - + " }\n" - + " },\n" - + " \"type\": \"otp_verify\",\n" - + " \"disabled\": true\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.branding().phone().templates().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\",\"channel\":\"channel\",\"customizable\":true,\"tenant\":\"tenant\",\"content\":{\"syntax\":\"syntax\",\"from\":\"from\",\"body\":{\"text\":\"text\",\"voice\":\"voice\"}},\"type\":\"otp_verify\",\"disabled\":true}")); - UpdatePhoneTemplateResponseContent response = client.branding() - .phone() - .templates() - .update("id", UpdatePhoneTemplateRequestContent.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" - + " \"channel\": \"channel\",\n" - + " \"customizable\": true,\n" - + " \"tenant\": \"tenant\",\n" - + " \"content\": {\n" - + " \"syntax\": \"syntax\",\n" - + " \"from\": \"from\",\n" - + " \"body\": {\n" - + " \"text\": \"text\",\n" - + " \"voice\": \"voice\"\n" - + " }\n" - + " },\n" - + " \"type\": \"otp_verify\",\n" - + " \"disabled\": true\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 testReset() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"x\",\"channel\":\"channel\",\"customizable\":true,\"tenant\":\"x\",\"content\":{\"syntax\":\"syntax\",\"from\":\"x\",\"body\":{\"text\":\"x\",\"voice\":\"x\"}},\"type\":\"otp_verify\",\"disabled\":true}")); - ResetPhoneTemplateResponseContent response = client.branding() - .phone() - .templates() - .reset("id", new HashMap() { - { - put("key", "value"); - } - }); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PATCH", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"key\": \"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\": \"x\",\n" - + " \"channel\": \"channel\",\n" - + " \"customizable\": true,\n" - + " \"tenant\": \"x\",\n" - + " \"content\": {\n" - + " \"syntax\": \"syntax\",\n" - + " \"from\": \"x\",\n" - + " \"body\": {\n" - + " \"text\": \"x\",\n" - + " \"voice\": \"x\"\n" - + " }\n" - + " },\n" - + " \"type\": \"otp_verify\",\n" - + " \"disabled\": true\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 testTest() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"message\":\"message\"}")); - CreatePhoneTemplateTestNotificationResponseContent response = client.branding() - .phone() - .templates() - .test( - "id", - CreatePhoneTemplateTestNotificationRequestContent.builder() - .to("to") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"to\": \"to\"\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" + " \"message\": \"message\"\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 || !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/BrandingTemplatesWireTest.java b/src/test/java/com/auth0/client/mgmt/BrandingTemplatesWireTest.java deleted file mode 100644 index 328016220..000000000 --- a/src/test/java/com/auth0/client/mgmt/BrandingTemplatesWireTest.java +++ /dev/null @@ -1,156 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.GetUniversalLoginTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateUniversalLoginTemplateRequestContent; -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 BrandingTemplatesWireTest { - 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 testGetUniversalLogin() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"body\":\"body\"}")); - GetUniversalLoginTemplateResponseContent response = - client.branding().templates().getUniversalLogin(); - 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" + " \"body\": \"body\"\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 testUpdateUniversalLogin() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.branding().templates().updateUniversalLogin(UpdateUniversalLoginTemplateRequestContent.of("string")); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "\"string\""; - 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 testDeleteUniversalLogin() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.branding().templates().deleteUniversalLogin(); - 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 || !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/BrandingThemesWireTest.java b/src/test/java/com/auth0/client/mgmt/BrandingThemesWireTest.java deleted file mode 100644 index e77b08b0a..000000000 --- a/src/test/java/com/auth0/client/mgmt/BrandingThemesWireTest.java +++ /dev/null @@ -1,947 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.branding.types.CreateBrandingThemeRequestContent; -import com.auth0.client.mgmt.branding.types.UpdateBrandingThemeRequestContent; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.BrandingThemeBorders; -import com.auth0.client.mgmt.types.BrandingThemeBordersButtonsStyleEnum; -import com.auth0.client.mgmt.types.BrandingThemeBordersInputsStyleEnum; -import com.auth0.client.mgmt.types.BrandingThemeColors; -import com.auth0.client.mgmt.types.BrandingThemeFontBodyText; -import com.auth0.client.mgmt.types.BrandingThemeFontButtonsText; -import com.auth0.client.mgmt.types.BrandingThemeFontInputLabels; -import com.auth0.client.mgmt.types.BrandingThemeFontLinks; -import com.auth0.client.mgmt.types.BrandingThemeFontLinksStyleEnum; -import com.auth0.client.mgmt.types.BrandingThemeFontSubtitle; -import com.auth0.client.mgmt.types.BrandingThemeFontTitle; -import com.auth0.client.mgmt.types.BrandingThemeFonts; -import com.auth0.client.mgmt.types.BrandingThemePageBackground; -import com.auth0.client.mgmt.types.BrandingThemePageBackgroundPageLayoutEnum; -import com.auth0.client.mgmt.types.BrandingThemeWidget; -import com.auth0.client.mgmt.types.BrandingThemeWidgetHeaderTextAlignmentEnum; -import com.auth0.client.mgmt.types.BrandingThemeWidgetLogoPositionEnum; -import com.auth0.client.mgmt.types.BrandingThemeWidgetSocialButtonsLayoutEnum; -import com.auth0.client.mgmt.types.CreateBrandingThemeResponseContent; -import com.auth0.client.mgmt.types.GetBrandingDefaultThemeResponseContent; -import com.auth0.client.mgmt.types.GetBrandingThemeResponseContent; -import com.auth0.client.mgmt.types.UpdateBrandingThemeResponseContent; -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 BrandingThemesWireTest { - 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 testCreate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"borders\":{\"button_border_radius\":1.1,\"button_border_weight\":1.1,\"buttons_style\":\"pill\",\"input_border_radius\":1.1,\"input_border_weight\":1.1,\"inputs_style\":\"pill\",\"show_widget_shadow\":true,\"widget_border_weight\":1.1,\"widget_corner_radius\":1.1},\"colors\":{\"base_focus_color\":\"base_focus_color\",\"base_hover_color\":\"base_hover_color\",\"body_text\":\"body_text\",\"captcha_widget_theme\":\"auto\",\"error\":\"error\",\"header\":\"header\",\"icons\":\"icons\",\"input_background\":\"input_background\",\"input_border\":\"input_border\",\"input_filled_text\":\"input_filled_text\",\"input_labels_placeholders\":\"input_labels_placeholders\",\"links_focused_components\":\"links_focused_components\",\"primary_button\":\"primary_button\",\"primary_button_label\":\"primary_button_label\",\"read_only_background\":\"read_only_background\",\"secondary_button_border\":\"secondary_button_border\",\"secondary_button_label\":\"secondary_button_label\",\"success\":\"success\",\"widget_background\":\"widget_background\",\"widget_border\":\"widget_border\"},\"displayName\":\"displayName\",\"fonts\":{\"body_text\":{\"bold\":true,\"size\":1.1},\"buttons_text\":{\"bold\":true,\"size\":1.1},\"font_url\":\"font_url\",\"input_labels\":{\"bold\":true,\"size\":1.1},\"links\":{\"bold\":true,\"size\":1.1},\"links_style\":\"normal\",\"reference_text_size\":1.1,\"subtitle\":{\"bold\":true,\"size\":1.1},\"title\":{\"bold\":true,\"size\":1.1}},\"page_background\":{\"background_color\":\"background_color\",\"background_image_url\":\"background_image_url\",\"page_layout\":\"center\"},\"themeId\":\"themeId\",\"widget\":{\"header_text_alignment\":\"center\",\"logo_height\":1.1,\"logo_position\":\"center\",\"logo_url\":\"logo_url\",\"social_buttons_layout\":\"bottom\"}}")); - CreateBrandingThemeResponseContent response = client.branding() - .themes() - .create(CreateBrandingThemeRequestContent.builder() - .borders(BrandingThemeBorders.builder() - .buttonBorderRadius(1.1) - .buttonBorderWeight(1.1) - .buttonsStyle(BrandingThemeBordersButtonsStyleEnum.PILL) - .inputBorderRadius(1.1) - .inputBorderWeight(1.1) - .inputsStyle(BrandingThemeBordersInputsStyleEnum.PILL) - .showWidgetShadow(true) - .widgetBorderWeight(1.1) - .widgetCornerRadius(1.1) - .build()) - .colors(BrandingThemeColors.builder() - .bodyText("body_text") - .error("error") - .header("header") - .icons("icons") - .inputBackground("input_background") - .inputBorder("input_border") - .inputFilledText("input_filled_text") - .inputLabelsPlaceholders("input_labels_placeholders") - .linksFocusedComponents("links_focused_components") - .primaryButton("primary_button") - .primaryButtonLabel("primary_button_label") - .secondaryButtonBorder("secondary_button_border") - .secondaryButtonLabel("secondary_button_label") - .success("success") - .widgetBackground("widget_background") - .widgetBorder("widget_border") - .build()) - .fonts(BrandingThemeFonts.builder() - .bodyText(BrandingThemeFontBodyText.builder() - .bold(true) - .size(1.1) - .build()) - .buttonsText(BrandingThemeFontButtonsText.builder() - .bold(true) - .size(1.1) - .build()) - .fontUrl("font_url") - .inputLabels(BrandingThemeFontInputLabels.builder() - .bold(true) - .size(1.1) - .build()) - .links(BrandingThemeFontLinks.builder() - .bold(true) - .size(1.1) - .build()) - .linksStyle(BrandingThemeFontLinksStyleEnum.NORMAL) - .referenceTextSize(1.1) - .subtitle(BrandingThemeFontSubtitle.builder() - .bold(true) - .size(1.1) - .build()) - .title(BrandingThemeFontTitle.builder() - .bold(true) - .size(1.1) - .build()) - .build()) - .pageBackground(BrandingThemePageBackground.builder() - .backgroundColor("background_color") - .backgroundImageUrl("background_image_url") - .pageLayout(BrandingThemePageBackgroundPageLayoutEnum.CENTER) - .build()) - .widget(BrandingThemeWidget.builder() - .headerTextAlignment(BrandingThemeWidgetHeaderTextAlignmentEnum.CENTER) - .logoHeight(1.1) - .logoPosition(BrandingThemeWidgetLogoPositionEnum.CENTER) - .logoUrl("logo_url") - .socialButtonsLayout(BrandingThemeWidgetSocialButtonsLayoutEnum.BOTTOM) - .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" - + " \"borders\": {\n" - + " \"button_border_radius\": 1.1,\n" - + " \"button_border_weight\": 1.1,\n" - + " \"buttons_style\": \"pill\",\n" - + " \"input_border_radius\": 1.1,\n" - + " \"input_border_weight\": 1.1,\n" - + " \"inputs_style\": \"pill\",\n" - + " \"show_widget_shadow\": true,\n" - + " \"widget_border_weight\": 1.1,\n" - + " \"widget_corner_radius\": 1.1\n" - + " },\n" - + " \"colors\": {\n" - + " \"body_text\": \"body_text\",\n" - + " \"error\": \"error\",\n" - + " \"header\": \"header\",\n" - + " \"icons\": \"icons\",\n" - + " \"input_background\": \"input_background\",\n" - + " \"input_border\": \"input_border\",\n" - + " \"input_filled_text\": \"input_filled_text\",\n" - + " \"input_labels_placeholders\": \"input_labels_placeholders\",\n" - + " \"links_focused_components\": \"links_focused_components\",\n" - + " \"primary_button\": \"primary_button\",\n" - + " \"primary_button_label\": \"primary_button_label\",\n" - + " \"secondary_button_border\": \"secondary_button_border\",\n" - + " \"secondary_button_label\": \"secondary_button_label\",\n" - + " \"success\": \"success\",\n" - + " \"widget_background\": \"widget_background\",\n" - + " \"widget_border\": \"widget_border\"\n" - + " },\n" - + " \"fonts\": {\n" - + " \"body_text\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"buttons_text\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"font_url\": \"font_url\",\n" - + " \"input_labels\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"links\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"links_style\": \"normal\",\n" - + " \"reference_text_size\": 1.1,\n" - + " \"subtitle\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"title\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " }\n" - + " },\n" - + " \"page_background\": {\n" - + " \"background_color\": \"background_color\",\n" - + " \"background_image_url\": \"background_image_url\",\n" - + " \"page_layout\": \"center\"\n" - + " },\n" - + " \"widget\": {\n" - + " \"header_text_alignment\": \"center\",\n" - + " \"logo_height\": 1.1,\n" - + " \"logo_position\": \"center\",\n" - + " \"logo_url\": \"logo_url\",\n" - + " \"social_buttons_layout\": \"bottom\"\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" - + " \"borders\": {\n" - + " \"button_border_radius\": 1.1,\n" - + " \"button_border_weight\": 1.1,\n" - + " \"buttons_style\": \"pill\",\n" - + " \"input_border_radius\": 1.1,\n" - + " \"input_border_weight\": 1.1,\n" - + " \"inputs_style\": \"pill\",\n" - + " \"show_widget_shadow\": true,\n" - + " \"widget_border_weight\": 1.1,\n" - + " \"widget_corner_radius\": 1.1\n" - + " },\n" - + " \"colors\": {\n" - + " \"base_focus_color\": \"base_focus_color\",\n" - + " \"base_hover_color\": \"base_hover_color\",\n" - + " \"body_text\": \"body_text\",\n" - + " \"captcha_widget_theme\": \"auto\",\n" - + " \"error\": \"error\",\n" - + " \"header\": \"header\",\n" - + " \"icons\": \"icons\",\n" - + " \"input_background\": \"input_background\",\n" - + " \"input_border\": \"input_border\",\n" - + " \"input_filled_text\": \"input_filled_text\",\n" - + " \"input_labels_placeholders\": \"input_labels_placeholders\",\n" - + " \"links_focused_components\": \"links_focused_components\",\n" - + " \"primary_button\": \"primary_button\",\n" - + " \"primary_button_label\": \"primary_button_label\",\n" - + " \"read_only_background\": \"read_only_background\",\n" - + " \"secondary_button_border\": \"secondary_button_border\",\n" - + " \"secondary_button_label\": \"secondary_button_label\",\n" - + " \"success\": \"success\",\n" - + " \"widget_background\": \"widget_background\",\n" - + " \"widget_border\": \"widget_border\"\n" - + " },\n" - + " \"displayName\": \"displayName\",\n" - + " \"fonts\": {\n" - + " \"body_text\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"buttons_text\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"font_url\": \"font_url\",\n" - + " \"input_labels\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"links\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"links_style\": \"normal\",\n" - + " \"reference_text_size\": 1.1,\n" - + " \"subtitle\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"title\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " }\n" - + " },\n" - + " \"page_background\": {\n" - + " \"background_color\": \"background_color\",\n" - + " \"background_image_url\": \"background_image_url\",\n" - + " \"page_layout\": \"center\"\n" - + " },\n" - + " \"themeId\": \"themeId\",\n" - + " \"widget\": {\n" - + " \"header_text_alignment\": \"center\",\n" - + " \"logo_height\": 1.1,\n" - + " \"logo_position\": \"center\",\n" - + " \"logo_url\": \"logo_url\",\n" - + " \"social_buttons_layout\": \"bottom\"\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 testGetDefault() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"borders\":{\"button_border_radius\":1.1,\"button_border_weight\":1.1,\"buttons_style\":\"pill\",\"input_border_radius\":1.1,\"input_border_weight\":1.1,\"inputs_style\":\"pill\",\"show_widget_shadow\":true,\"widget_border_weight\":1.1,\"widget_corner_radius\":1.1},\"colors\":{\"base_focus_color\":\"base_focus_color\",\"base_hover_color\":\"base_hover_color\",\"body_text\":\"body_text\",\"captcha_widget_theme\":\"auto\",\"error\":\"error\",\"header\":\"header\",\"icons\":\"icons\",\"input_background\":\"input_background\",\"input_border\":\"input_border\",\"input_filled_text\":\"input_filled_text\",\"input_labels_placeholders\":\"input_labels_placeholders\",\"links_focused_components\":\"links_focused_components\",\"primary_button\":\"primary_button\",\"primary_button_label\":\"primary_button_label\",\"read_only_background\":\"read_only_background\",\"secondary_button_border\":\"secondary_button_border\",\"secondary_button_label\":\"secondary_button_label\",\"success\":\"success\",\"widget_background\":\"widget_background\",\"widget_border\":\"widget_border\"},\"displayName\":\"displayName\",\"fonts\":{\"body_text\":{\"bold\":true,\"size\":1.1},\"buttons_text\":{\"bold\":true,\"size\":1.1},\"font_url\":\"font_url\",\"input_labels\":{\"bold\":true,\"size\":1.1},\"links\":{\"bold\":true,\"size\":1.1},\"links_style\":\"normal\",\"reference_text_size\":1.1,\"subtitle\":{\"bold\":true,\"size\":1.1},\"title\":{\"bold\":true,\"size\":1.1}},\"page_background\":{\"background_color\":\"background_color\",\"background_image_url\":\"background_image_url\",\"page_layout\":\"center\"},\"themeId\":\"themeId\",\"widget\":{\"header_text_alignment\":\"center\",\"logo_height\":1.1,\"logo_position\":\"center\",\"logo_url\":\"logo_url\",\"social_buttons_layout\":\"bottom\"}}")); - GetBrandingDefaultThemeResponseContent response = - client.branding().themes().getDefault(); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("GET", request.getMethod()); - - // Validate response body - Assertions.assertNotNull(response, "Response should not be null"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"borders\": {\n" - + " \"button_border_radius\": 1.1,\n" - + " \"button_border_weight\": 1.1,\n" - + " \"buttons_style\": \"pill\",\n" - + " \"input_border_radius\": 1.1,\n" - + " \"input_border_weight\": 1.1,\n" - + " \"inputs_style\": \"pill\",\n" - + " \"show_widget_shadow\": true,\n" - + " \"widget_border_weight\": 1.1,\n" - + " \"widget_corner_radius\": 1.1\n" - + " },\n" - + " \"colors\": {\n" - + " \"base_focus_color\": \"base_focus_color\",\n" - + " \"base_hover_color\": \"base_hover_color\",\n" - + " \"body_text\": \"body_text\",\n" - + " \"captcha_widget_theme\": \"auto\",\n" - + " \"error\": \"error\",\n" - + " \"header\": \"header\",\n" - + " \"icons\": \"icons\",\n" - + " \"input_background\": \"input_background\",\n" - + " \"input_border\": \"input_border\",\n" - + " \"input_filled_text\": \"input_filled_text\",\n" - + " \"input_labels_placeholders\": \"input_labels_placeholders\",\n" - + " \"links_focused_components\": \"links_focused_components\",\n" - + " \"primary_button\": \"primary_button\",\n" - + " \"primary_button_label\": \"primary_button_label\",\n" - + " \"read_only_background\": \"read_only_background\",\n" - + " \"secondary_button_border\": \"secondary_button_border\",\n" - + " \"secondary_button_label\": \"secondary_button_label\",\n" - + " \"success\": \"success\",\n" - + " \"widget_background\": \"widget_background\",\n" - + " \"widget_border\": \"widget_border\"\n" - + " },\n" - + " \"displayName\": \"displayName\",\n" - + " \"fonts\": {\n" - + " \"body_text\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"buttons_text\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"font_url\": \"font_url\",\n" - + " \"input_labels\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"links\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"links_style\": \"normal\",\n" - + " \"reference_text_size\": 1.1,\n" - + " \"subtitle\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"title\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " }\n" - + " },\n" - + " \"page_background\": {\n" - + " \"background_color\": \"background_color\",\n" - + " \"background_image_url\": \"background_image_url\",\n" - + " \"page_layout\": \"center\"\n" - + " },\n" - + " \"themeId\": \"themeId\",\n" - + " \"widget\": {\n" - + " \"header_text_alignment\": \"center\",\n" - + " \"logo_height\": 1.1,\n" - + " \"logo_position\": \"center\",\n" - + " \"logo_url\": \"logo_url\",\n" - + " \"social_buttons_layout\": \"bottom\"\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 testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"borders\":{\"button_border_radius\":1.1,\"button_border_weight\":1.1,\"buttons_style\":\"pill\",\"input_border_radius\":1.1,\"input_border_weight\":1.1,\"inputs_style\":\"pill\",\"show_widget_shadow\":true,\"widget_border_weight\":1.1,\"widget_corner_radius\":1.1},\"colors\":{\"base_focus_color\":\"base_focus_color\",\"base_hover_color\":\"base_hover_color\",\"body_text\":\"body_text\",\"captcha_widget_theme\":\"auto\",\"error\":\"error\",\"header\":\"header\",\"icons\":\"icons\",\"input_background\":\"input_background\",\"input_border\":\"input_border\",\"input_filled_text\":\"input_filled_text\",\"input_labels_placeholders\":\"input_labels_placeholders\",\"links_focused_components\":\"links_focused_components\",\"primary_button\":\"primary_button\",\"primary_button_label\":\"primary_button_label\",\"read_only_background\":\"read_only_background\",\"secondary_button_border\":\"secondary_button_border\",\"secondary_button_label\":\"secondary_button_label\",\"success\":\"success\",\"widget_background\":\"widget_background\",\"widget_border\":\"widget_border\"},\"displayName\":\"displayName\",\"fonts\":{\"body_text\":{\"bold\":true,\"size\":1.1},\"buttons_text\":{\"bold\":true,\"size\":1.1},\"font_url\":\"font_url\",\"input_labels\":{\"bold\":true,\"size\":1.1},\"links\":{\"bold\":true,\"size\":1.1},\"links_style\":\"normal\",\"reference_text_size\":1.1,\"subtitle\":{\"bold\":true,\"size\":1.1},\"title\":{\"bold\":true,\"size\":1.1}},\"page_background\":{\"background_color\":\"background_color\",\"background_image_url\":\"background_image_url\",\"page_layout\":\"center\"},\"themeId\":\"themeId\",\"widget\":{\"header_text_alignment\":\"center\",\"logo_height\":1.1,\"logo_position\":\"center\",\"logo_url\":\"logo_url\",\"social_buttons_layout\":\"bottom\"}}")); - GetBrandingThemeResponseContent response = client.branding().themes().get("themeId"); - 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" - + " \"borders\": {\n" - + " \"button_border_radius\": 1.1,\n" - + " \"button_border_weight\": 1.1,\n" - + " \"buttons_style\": \"pill\",\n" - + " \"input_border_radius\": 1.1,\n" - + " \"input_border_weight\": 1.1,\n" - + " \"inputs_style\": \"pill\",\n" - + " \"show_widget_shadow\": true,\n" - + " \"widget_border_weight\": 1.1,\n" - + " \"widget_corner_radius\": 1.1\n" - + " },\n" - + " \"colors\": {\n" - + " \"base_focus_color\": \"base_focus_color\",\n" - + " \"base_hover_color\": \"base_hover_color\",\n" - + " \"body_text\": \"body_text\",\n" - + " \"captcha_widget_theme\": \"auto\",\n" - + " \"error\": \"error\",\n" - + " \"header\": \"header\",\n" - + " \"icons\": \"icons\",\n" - + " \"input_background\": \"input_background\",\n" - + " \"input_border\": \"input_border\",\n" - + " \"input_filled_text\": \"input_filled_text\",\n" - + " \"input_labels_placeholders\": \"input_labels_placeholders\",\n" - + " \"links_focused_components\": \"links_focused_components\",\n" - + " \"primary_button\": \"primary_button\",\n" - + " \"primary_button_label\": \"primary_button_label\",\n" - + " \"read_only_background\": \"read_only_background\",\n" - + " \"secondary_button_border\": \"secondary_button_border\",\n" - + " \"secondary_button_label\": \"secondary_button_label\",\n" - + " \"success\": \"success\",\n" - + " \"widget_background\": \"widget_background\",\n" - + " \"widget_border\": \"widget_border\"\n" - + " },\n" - + " \"displayName\": \"displayName\",\n" - + " \"fonts\": {\n" - + " \"body_text\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"buttons_text\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"font_url\": \"font_url\",\n" - + " \"input_labels\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"links\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"links_style\": \"normal\",\n" - + " \"reference_text_size\": 1.1,\n" - + " \"subtitle\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"title\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " }\n" - + " },\n" - + " \"page_background\": {\n" - + " \"background_color\": \"background_color\",\n" - + " \"background_image_url\": \"background_image_url\",\n" - + " \"page_layout\": \"center\"\n" - + " },\n" - + " \"themeId\": \"themeId\",\n" - + " \"widget\": {\n" - + " \"header_text_alignment\": \"center\",\n" - + " \"logo_height\": 1.1,\n" - + " \"logo_position\": \"center\",\n" - + " \"logo_url\": \"logo_url\",\n" - + " \"social_buttons_layout\": \"bottom\"\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.branding().themes().delete("themeId"); - 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( - "{\"borders\":{\"button_border_radius\":1.1,\"button_border_weight\":1.1,\"buttons_style\":\"pill\",\"input_border_radius\":1.1,\"input_border_weight\":1.1,\"inputs_style\":\"pill\",\"show_widget_shadow\":true,\"widget_border_weight\":1.1,\"widget_corner_radius\":1.1},\"colors\":{\"base_focus_color\":\"base_focus_color\",\"base_hover_color\":\"base_hover_color\",\"body_text\":\"body_text\",\"captcha_widget_theme\":\"auto\",\"error\":\"error\",\"header\":\"header\",\"icons\":\"icons\",\"input_background\":\"input_background\",\"input_border\":\"input_border\",\"input_filled_text\":\"input_filled_text\",\"input_labels_placeholders\":\"input_labels_placeholders\",\"links_focused_components\":\"links_focused_components\",\"primary_button\":\"primary_button\",\"primary_button_label\":\"primary_button_label\",\"read_only_background\":\"read_only_background\",\"secondary_button_border\":\"secondary_button_border\",\"secondary_button_label\":\"secondary_button_label\",\"success\":\"success\",\"widget_background\":\"widget_background\",\"widget_border\":\"widget_border\"},\"displayName\":\"displayName\",\"fonts\":{\"body_text\":{\"bold\":true,\"size\":1.1},\"buttons_text\":{\"bold\":true,\"size\":1.1},\"font_url\":\"font_url\",\"input_labels\":{\"bold\":true,\"size\":1.1},\"links\":{\"bold\":true,\"size\":1.1},\"links_style\":\"normal\",\"reference_text_size\":1.1,\"subtitle\":{\"bold\":true,\"size\":1.1},\"title\":{\"bold\":true,\"size\":1.1}},\"page_background\":{\"background_color\":\"background_color\",\"background_image_url\":\"background_image_url\",\"page_layout\":\"center\"},\"themeId\":\"themeId\",\"widget\":{\"header_text_alignment\":\"center\",\"logo_height\":1.1,\"logo_position\":\"center\",\"logo_url\":\"logo_url\",\"social_buttons_layout\":\"bottom\"}}")); - UpdateBrandingThemeResponseContent response = client.branding() - .themes() - .update( - "themeId", - UpdateBrandingThemeRequestContent.builder() - .borders(BrandingThemeBorders.builder() - .buttonBorderRadius(1.1) - .buttonBorderWeight(1.1) - .buttonsStyle(BrandingThemeBordersButtonsStyleEnum.PILL) - .inputBorderRadius(1.1) - .inputBorderWeight(1.1) - .inputsStyle(BrandingThemeBordersInputsStyleEnum.PILL) - .showWidgetShadow(true) - .widgetBorderWeight(1.1) - .widgetCornerRadius(1.1) - .build()) - .colors(BrandingThemeColors.builder() - .bodyText("body_text") - .error("error") - .header("header") - .icons("icons") - .inputBackground("input_background") - .inputBorder("input_border") - .inputFilledText("input_filled_text") - .inputLabelsPlaceholders("input_labels_placeholders") - .linksFocusedComponents("links_focused_components") - .primaryButton("primary_button") - .primaryButtonLabel("primary_button_label") - .secondaryButtonBorder("secondary_button_border") - .secondaryButtonLabel("secondary_button_label") - .success("success") - .widgetBackground("widget_background") - .widgetBorder("widget_border") - .build()) - .fonts(BrandingThemeFonts.builder() - .bodyText(BrandingThemeFontBodyText.builder() - .bold(true) - .size(1.1) - .build()) - .buttonsText(BrandingThemeFontButtonsText.builder() - .bold(true) - .size(1.1) - .build()) - .fontUrl("font_url") - .inputLabels(BrandingThemeFontInputLabels.builder() - .bold(true) - .size(1.1) - .build()) - .links(BrandingThemeFontLinks.builder() - .bold(true) - .size(1.1) - .build()) - .linksStyle(BrandingThemeFontLinksStyleEnum.NORMAL) - .referenceTextSize(1.1) - .subtitle(BrandingThemeFontSubtitle.builder() - .bold(true) - .size(1.1) - .build()) - .title(BrandingThemeFontTitle.builder() - .bold(true) - .size(1.1) - .build()) - .build()) - .pageBackground(BrandingThemePageBackground.builder() - .backgroundColor("background_color") - .backgroundImageUrl("background_image_url") - .pageLayout(BrandingThemePageBackgroundPageLayoutEnum.CENTER) - .build()) - .widget(BrandingThemeWidget.builder() - .headerTextAlignment(BrandingThemeWidgetHeaderTextAlignmentEnum.CENTER) - .logoHeight(1.1) - .logoPosition(BrandingThemeWidgetLogoPositionEnum.CENTER) - .logoUrl("logo_url") - .socialButtonsLayout(BrandingThemeWidgetSocialButtonsLayoutEnum.BOTTOM) - .build()) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PATCH", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" - + "{\n" - + " \"borders\": {\n" - + " \"button_border_radius\": 1.1,\n" - + " \"button_border_weight\": 1.1,\n" - + " \"buttons_style\": \"pill\",\n" - + " \"input_border_radius\": 1.1,\n" - + " \"input_border_weight\": 1.1,\n" - + " \"inputs_style\": \"pill\",\n" - + " \"show_widget_shadow\": true,\n" - + " \"widget_border_weight\": 1.1,\n" - + " \"widget_corner_radius\": 1.1\n" - + " },\n" - + " \"colors\": {\n" - + " \"body_text\": \"body_text\",\n" - + " \"error\": \"error\",\n" - + " \"header\": \"header\",\n" - + " \"icons\": \"icons\",\n" - + " \"input_background\": \"input_background\",\n" - + " \"input_border\": \"input_border\",\n" - + " \"input_filled_text\": \"input_filled_text\",\n" - + " \"input_labels_placeholders\": \"input_labels_placeholders\",\n" - + " \"links_focused_components\": \"links_focused_components\",\n" - + " \"primary_button\": \"primary_button\",\n" - + " \"primary_button_label\": \"primary_button_label\",\n" - + " \"secondary_button_border\": \"secondary_button_border\",\n" - + " \"secondary_button_label\": \"secondary_button_label\",\n" - + " \"success\": \"success\",\n" - + " \"widget_background\": \"widget_background\",\n" - + " \"widget_border\": \"widget_border\"\n" - + " },\n" - + " \"fonts\": {\n" - + " \"body_text\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"buttons_text\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"font_url\": \"font_url\",\n" - + " \"input_labels\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"links\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"links_style\": \"normal\",\n" - + " \"reference_text_size\": 1.1,\n" - + " \"subtitle\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"title\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " }\n" - + " },\n" - + " \"page_background\": {\n" - + " \"background_color\": \"background_color\",\n" - + " \"background_image_url\": \"background_image_url\",\n" - + " \"page_layout\": \"center\"\n" - + " },\n" - + " \"widget\": {\n" - + " \"header_text_alignment\": \"center\",\n" - + " \"logo_height\": 1.1,\n" - + " \"logo_position\": \"center\",\n" - + " \"logo_url\": \"logo_url\",\n" - + " \"social_buttons_layout\": \"bottom\"\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" - + " \"borders\": {\n" - + " \"button_border_radius\": 1.1,\n" - + " \"button_border_weight\": 1.1,\n" - + " \"buttons_style\": \"pill\",\n" - + " \"input_border_radius\": 1.1,\n" - + " \"input_border_weight\": 1.1,\n" - + " \"inputs_style\": \"pill\",\n" - + " \"show_widget_shadow\": true,\n" - + " \"widget_border_weight\": 1.1,\n" - + " \"widget_corner_radius\": 1.1\n" - + " },\n" - + " \"colors\": {\n" - + " \"base_focus_color\": \"base_focus_color\",\n" - + " \"base_hover_color\": \"base_hover_color\",\n" - + " \"body_text\": \"body_text\",\n" - + " \"captcha_widget_theme\": \"auto\",\n" - + " \"error\": \"error\",\n" - + " \"header\": \"header\",\n" - + " \"icons\": \"icons\",\n" - + " \"input_background\": \"input_background\",\n" - + " \"input_border\": \"input_border\",\n" - + " \"input_filled_text\": \"input_filled_text\",\n" - + " \"input_labels_placeholders\": \"input_labels_placeholders\",\n" - + " \"links_focused_components\": \"links_focused_components\",\n" - + " \"primary_button\": \"primary_button\",\n" - + " \"primary_button_label\": \"primary_button_label\",\n" - + " \"read_only_background\": \"read_only_background\",\n" - + " \"secondary_button_border\": \"secondary_button_border\",\n" - + " \"secondary_button_label\": \"secondary_button_label\",\n" - + " \"success\": \"success\",\n" - + " \"widget_background\": \"widget_background\",\n" - + " \"widget_border\": \"widget_border\"\n" - + " },\n" - + " \"displayName\": \"displayName\",\n" - + " \"fonts\": {\n" - + " \"body_text\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"buttons_text\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"font_url\": \"font_url\",\n" - + " \"input_labels\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"links\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"links_style\": \"normal\",\n" - + " \"reference_text_size\": 1.1,\n" - + " \"subtitle\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " },\n" - + " \"title\": {\n" - + " \"bold\": true,\n" - + " \"size\": 1.1\n" - + " }\n" - + " },\n" - + " \"page_background\": {\n" - + " \"background_color\": \"background_color\",\n" - + " \"background_image_url\": \"background_image_url\",\n" - + " \"page_layout\": \"center\"\n" - + " },\n" - + " \"themeId\": \"themeId\",\n" - + " \"widget\": {\n" - + " \"header_text_alignment\": \"center\",\n" - + " \"logo_height\": 1.1,\n" - + " \"logo_position\": \"center\",\n" - + " \"logo_url\": \"logo_url\",\n" - + " \"social_buttons_layout\": \"bottom\"\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 || !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/BrandingWireTest.java b/src/test/java/com/auth0/client/mgmt/BrandingWireTest.java deleted file mode 100644 index 5757c35b8..000000000 --- a/src/test/java/com/auth0/client/mgmt/BrandingWireTest.java +++ /dev/null @@ -1,212 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.GetBrandingResponseContent; -import com.auth0.client.mgmt.types.UpdateBrandingRequestContent; -import com.auth0.client.mgmt.types.UpdateBrandingResponseContent; -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 BrandingWireTest { - 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( - "{\"colors\":{\"primary\":\"primary\",\"page_background\":\"page_background\"},\"favicon_url\":\"favicon_url\",\"logo_url\":\"logo_url\",\"font\":{\"url\":\"url\"}}")); - GetBrandingResponseContent response = client.branding().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" - + " \"colors\": {\n" - + " \"primary\": \"primary\",\n" - + " \"page_background\": \"page_background\"\n" - + " },\n" - + " \"favicon_url\": \"favicon_url\",\n" - + " \"logo_url\": \"logo_url\",\n" - + " \"font\": {\n" - + " \"url\": \"url\"\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( - "{\"colors\":{\"primary\":\"primary\",\"page_background\":\"page_background\"},\"favicon_url\":\"favicon_url\",\"logo_url\":\"logo_url\",\"font\":{\"url\":\"url\"}}")); - UpdateBrandingResponseContent response = - client.branding().update(UpdateBrandingRequestContent.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" - + " \"colors\": {\n" - + " \"primary\": \"primary\",\n" - + " \"page_background\": \"page_background\"\n" - + " },\n" - + " \"favicon_url\": \"favicon_url\",\n" - + " \"logo_url\": \"logo_url\",\n" - + " \"font\": {\n" - + " \"url\": \"url\"\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 || !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/ClientGrantsOrganizationsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientGrantsOrganizationsWireTest.java deleted file mode 100644 index b369e2a8f..000000000 --- a/src/test/java/com/auth0/client/mgmt/ClientGrantsOrganizationsWireTest.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.auth0.client.mgmt; - -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; -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 ClientGrantsOrganizationsWireTest { - 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\",\"organizations\":[{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"token_quota\":{\"client_credentials\":{}}}]}")); - SyncPagingIterable response = client.clientGrants() - .organizations() - .list( - "id", - ListClientGrantOrganizationsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(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 || !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/ClientGrantsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java deleted file mode 100644 index 68e7ab36c..000000000 --- a/src/test/java/com/auth0/client/mgmt/ClientGrantsWireTest.java +++ /dev/null @@ -1,361 +0,0 @@ -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.ClientGrantResponseContent; -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.UpdateClientGrantRequestContent; -import com.auth0.client.mgmt.types.UpdateClientGrantResponseContent; -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 ClientGrantsWireTest { - 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_grants\":[{\"id\":\"id\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true,\"is_system\":true,\"subject_type\":\"client\",\"authorization_details_types\":[\"authorization_details_types\"],\"allow_all_scopes\":true}]}")); - 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)) - .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\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true,\"is_system\":true,\"subject_type\":\"client\",\"authorization_details_types\":[\"authorization_details_types\"],\"allow_all_scopes\":true}")); - CreateClientGrantResponseContent response = client.clientGrants() - .create(CreateClientGrantRequestContent.builder() - .clientId("client_id") - .audience("audience") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = - "" + "{\n" + " \"client_id\": \"client_id\",\n" + " \"audience\": \"audience\"\n" + "}"; - JsonNode actualJson = objectMapper.readTree(actualRequestBody); - JsonNode expectedJson = objectMapper.readTree(expectedRequestBody); - Assertions.assertTrue(jsonEquals(expectedJson, actualJson), "Request body structure does not match expected"); - 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" - + " \"client_id\": \"client_id\",\n" - + " \"audience\": \"audience\",\n" - + " \"scope\": [\n" - + " \"scope\"\n" - + " ],\n" - + " \"organization_usage\": \"deny\",\n" - + " \"allow_any_organization\": true,\n" - + " \"is_system\": true,\n" - + " \"subject_type\": \"client\",\n" - + " \"authorization_details_types\": [\n" - + " \"authorization_details_types\"\n" - + " ],\n" - + " \"allow_all_scopes\": true\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\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true,\"is_system\":true,\"subject_type\":\"client\",\"authorization_details_types\":[\"authorization_details_types\"],\"allow_all_scopes\":true}")); - GetClientGrantResponseContent response = client.clientGrants().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" - + " \"client_id\": \"client_id\",\n" - + " \"audience\": \"audience\",\n" - + " \"scope\": [\n" - + " \"scope\"\n" - + " ],\n" - + " \"organization_usage\": \"deny\",\n" - + " \"allow_any_organization\": true,\n" - + " \"is_system\": true,\n" - + " \"subject_type\": \"client\",\n" - + " \"authorization_details_types\": [\n" - + " \"authorization_details_types\"\n" - + " ],\n" - + " \"allow_all_scopes\": true\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.clientGrants().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\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true,\"is_system\":true,\"subject_type\":\"client\",\"authorization_details_types\":[\"authorization_details_types\"],\"allow_all_scopes\":true}")); - UpdateClientGrantResponseContent response = client.clientGrants() - .update("id", UpdateClientGrantRequestContent.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" - + " \"client_id\": \"client_id\",\n" - + " \"audience\": \"audience\",\n" - + " \"scope\": [\n" - + " \"scope\"\n" - + " ],\n" - + " \"organization_usage\": \"deny\",\n" - + " \"allow_any_organization\": true,\n" - + " \"is_system\": true,\n" - + " \"subject_type\": \"client\",\n" - + " \"authorization_details_types\": [\n" - + " \"authorization_details_types\"\n" - + " ],\n" - + " \"allow_all_scopes\": true\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 || !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 deleted file mode 100644 index 50dc2baa5..000000000 --- a/src/test/java/com/auth0/client/mgmt/ClientsConnectionsWireTest.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.auth0.client.mgmt; - -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.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 ClientsConnectionsWireTest { - 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( - "{\"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}}],\"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)) - .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 || !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/ClientsCredentialsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientsCredentialsWireTest.java deleted file mode 100644 index de0dcec56..000000000 --- a/src/test/java/com/auth0/client/mgmt/ClientsCredentialsWireTest.java +++ /dev/null @@ -1,388 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.clients.types.PatchClientCredentialRequestContent; -import com.auth0.client.mgmt.clients.types.PostClientCredentialRequestContent; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.ClientCredential; -import com.auth0.client.mgmt.types.ClientCredentialTypeEnum; -import com.auth0.client.mgmt.types.GetClientCredentialResponseContent; -import com.auth0.client.mgmt.types.PatchClientCredentialResponseContent; -import com.auth0.client.mgmt.types.PostClientCredentialResponseContent; -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 ClientsCredentialsWireTest { - 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\",\"name\":\"name\",\"kid\":\"kid\",\"alg\":\"RS256\",\"credential_type\":\"public_key\",\"subject_dn\":\"subject_dn\",\"thumbprint_sha256\":\"thumbprint_sha256\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\"}]")); - List response = client.clients().credentials().list("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" - + " {\n" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"kid\": \"kid\",\n" - + " \"alg\": \"RS256\",\n" - + " \"credential_type\": \"public_key\",\n" - + " \"subject_dn\": \"subject_dn\",\n" - + " \"thumbprint_sha256\": \"thumbprint_sha256\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"expires_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 testCreate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"kid\":\"kid\",\"alg\":\"RS256\",\"credential_type\":\"public_key\",\"subject_dn\":\"subject_dn\",\"thumbprint_sha256\":\"thumbprint_sha256\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\"}")); - PostClientCredentialResponseContent response = client.clients() - .credentials() - .create( - "client_id", - PostClientCredentialRequestContent.builder() - .credentialType(ClientCredentialTypeEnum.PUBLIC_KEY) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"credential_type\": \"public_key\"\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" - + " \"kid\": \"kid\",\n" - + " \"alg\": \"RS256\",\n" - + " \"credential_type\": \"public_key\",\n" - + " \"subject_dn\": \"subject_dn\",\n" - + " \"thumbprint_sha256\": \"thumbprint_sha256\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_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 testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"kid\":\"kid\",\"alg\":\"RS256\",\"credential_type\":\"public_key\",\"subject_dn\":\"subject_dn\",\"thumbprint_sha256\":\"thumbprint_sha256\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\"}")); - GetClientCredentialResponseContent response = - client.clients().credentials().get("client_id", "credential_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" - + " \"kid\": \"kid\",\n" - + " \"alg\": \"RS256\",\n" - + " \"credential_type\": \"public_key\",\n" - + " \"subject_dn\": \"subject_dn\",\n" - + " \"thumbprint_sha256\": \"thumbprint_sha256\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_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 testDelete() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.clients().credentials().delete("client_id", "credential_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\",\"kid\":\"kid\",\"alg\":\"RS256\",\"credential_type\":\"public_key\",\"subject_dn\":\"subject_dn\",\"thumbprint_sha256\":\"thumbprint_sha256\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\"}")); - PatchClientCredentialResponseContent response = client.clients() - .credentials() - .update( - "client_id", - "credential_id", - PatchClientCredentialRequestContent.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" - + " \"kid\": \"kid\",\n" - + " \"alg\": \"RS256\",\n" - + " \"credential_type\": \"public_key\",\n" - + " \"subject_dn\": \"subject_dn\",\n" - + " \"thumbprint_sha256\": \"thumbprint_sha256\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_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"); - } - } - - /** - * 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 || !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/ClientsWireTest.java b/src/test/java/com/auth0/client/mgmt/ClientsWireTest.java deleted file mode 100644 index b3b32b587..000000000 --- a/src/test/java/com/auth0/client/mgmt/ClientsWireTest.java +++ /dev/null @@ -1,1762 +0,0 @@ -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.CreateClientRequestContent; -import com.auth0.client.mgmt.types.CreateClientResponseContent; -import com.auth0.client.mgmt.types.GetClientRequestParameters; -import com.auth0.client.mgmt.types.GetClientResponseContent; -import com.auth0.client.mgmt.types.ListClientsRequestParameters; -import com.auth0.client.mgmt.types.RotateClientSecretResponseContent; -import com.auth0.client.mgmt.types.UpdateClientRequestContent; -import com.auth0.client.mgmt.types.UpdateClientResponseContent; -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 ClientsWireTest { - 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( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"clients\":[{\"client_id\":\"client_id\",\"tenant\":\"tenant\",\"name\":\"name\",\"description\":\"description\",\"global\":true,\"client_secret\":\"client_secret\",\"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\"],\"signing_keys\":[{}],\"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,\"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\"},\"resource_server_identifier\":\"resource_server_identifier\",\"async_approval_notification_channels\":[\"guardian-push\"]}]}")); - 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")) - .q(OptionalNullable.of("q")) - .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\",\"tenant\":\"tenant\",\"name\":\"name\",\"description\":\"description\",\"global\":true,\"client_secret\":\"client_secret\",\"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\"],\"session_transfer\":{\"can_create_session_transfer_token\":true,\"enforce_cascade_revocation\":true,\"allowed_authentication_methods\":[\"cookie\"],\"enforce_device_binding\":\"ip\",\"allow_refresh_token\":true,\"enforce_online_refresh_tokens\":true},\"oidc_logout\":{\"backchannel_logout_urls\":[\"backchannel_logout_urls\"],\"backchannel_logout_initiators\":{\"mode\":\"custom\",\"selected_initiators\":[\"rp-logout\"]},\"backchannel_logout_session_metadata\":{\"include\":true}},\"grant_types\":[\"grant_types\"],\"jwt_configuration\":{\"lifetime_in_seconds\":1,\"secret_encoded\":true,\"scopes\":{\"key\":\"value\"},\"alg\":\"HS256\"},\"signing_keys\":[{\"pkcs7\":\"pkcs7\",\"cert\":\"cert\",\"subject\":\"subject\"}],\"encryption_key\":{\"pub\":\"pub\",\"cert\":\"cert\",\"subject\":\"subject\"},\"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\",\"addons\":{\"aws\":{\"principal\":\"principal\",\"role\":\"role\",\"lifetime_in_seconds\":1},\"azure_blob\":{\"accountName\":\"accountName\",\"storageAccessKey\":\"storageAccessKey\",\"containerName\":\"containerName\",\"blobName\":\"blobName\",\"expiration\":1,\"signedIdentifier\":\"signedIdentifier\",\"blob_read\":true,\"blob_write\":true,\"blob_delete\":true,\"container_read\":true,\"container_write\":true,\"container_delete\":true,\"container_list\":true},\"azure_sb\":{\"namespace\":\"namespace\",\"sasKeyName\":\"sasKeyName\",\"sasKey\":\"sasKey\",\"entityPath\":\"entityPath\",\"expiration\":1},\"rms\":{\"url\":\"url\"},\"mscrm\":{\"url\":\"url\"},\"slack\":{\"team\":\"team\"},\"sentry\":{\"org_slug\":\"org_slug\",\"base_url\":\"base_url\"},\"box\":{\"key\":\"value\"},\"cloudbees\":{\"key\":\"value\"},\"concur\":{\"key\":\"value\"},\"dropbox\":{\"key\":\"value\"},\"echosign\":{\"domain\":\"domain\"},\"egnyte\":{\"domain\":\"domain\"},\"firebase\":{\"secret\":\"secret\",\"private_key_id\":\"private_key_id\",\"private_key\":\"private_key\",\"client_email\":\"client_email\",\"lifetime_in_seconds\":1},\"newrelic\":{\"account\":\"account\"},\"office365\":{\"domain\":\"domain\",\"connection\":\"connection\"},\"salesforce\":{\"entity_id\":\"entity_id\"},\"salesforce_api\":{\"clientid\":\"clientid\",\"principal\":\"principal\",\"communityName\":\"communityName\",\"community_url_section\":\"community_url_section\"},\"salesforce_sandbox_api\":{\"clientid\":\"clientid\",\"principal\":\"principal\",\"communityName\":\"communityName\",\"community_url_section\":\"community_url_section\"},\"samlp\":{\"mappings\":{\"key\":\"value\"},\"audience\":\"audience\",\"recipient\":\"recipient\",\"createUpnClaim\":true,\"mapUnknownClaimsAsIs\":true,\"passthroughClaimsWithNoMapping\":true,\"mapIdentities\":true,\"signatureAlgorithm\":\"signatureAlgorithm\",\"digestAlgorithm\":\"digestAlgorithm\",\"issuer\":\"issuer\",\"destination\":\"destination\",\"lifetimeInSeconds\":1,\"signResponse\":true,\"nameIdentifierFormat\":\"nameIdentifierFormat\",\"nameIdentifierProbes\":[\"nameIdentifierProbes\"],\"authnContextClassRef\":\"authnContextClassRef\"},\"layer\":{\"providerId\":\"providerId\",\"keyId\":\"keyId\",\"privateKey\":\"privateKey\",\"principal\":\"principal\",\"expiration\":1},\"sap_api\":{\"clientid\":\"clientid\",\"usernameAttribute\":\"usernameAttribute\",\"tokenEndpointUrl\":\"tokenEndpointUrl\",\"scope\":\"scope\",\"servicePassword\":\"servicePassword\",\"nameIdentifierFormat\":\"nameIdentifierFormat\"},\"sharepoint\":{\"url\":\"url\",\"external_url\":[\"external_url\"]},\"springcm\":{\"acsurl\":\"acsurl\"},\"wams\":{\"masterkey\":\"masterkey\"},\"wsfed\":{\"key\":\"value\"},\"zendesk\":{\"accountName\":\"accountName\"},\"zoom\":{\"account\":\"account\"},\"sso_integration\":{\"name\":\"name\",\"version\":\"version\"}},\"token_endpoint_auth_method\":\"none\",\"is_token_endpoint_ip_header_trusted\":true,\"client_metadata\":{\"key\":\"value\"},\"mobile\":{\"android\":{\"app_package_name\":\"app_package_name\",\"sha256_cert_fingerprints\":[\"sha256_cert_fingerprints\"]},\"ios\":{\"team_id\":\"team_id\",\"app_bundle_identifier\":\"app_bundle_identifier\"}},\"initiate_login_uri\":\"initiate_login_uri\",\"refresh_token\":{\"rotation_type\":\"rotating\",\"expiration_type\":\"expiring\",\"leeway\":1,\"token_lifetime\":1,\"infinite_token_lifetime\":true,\"idle_token_lifetime\":1,\"infinite_idle_token_lifetime\":true,\"policies\":[{\"audience\":\"audience\",\"scope\":[\"scope\"]}]},\"default_organization\":{\"organization_id\":\"organization_id\",\"flows\":[\"client_credentials\"]},\"organization_usage\":\"deny\",\"organization_require_behavior\":\"no_prompt\",\"organization_discovery_methods\":[\"email\"],\"client_authentication_methods\":{\"private_key_jwt\":{\"credentials\":[{\"id\":\"id\"}]},\"tls_client_auth\":{\"credentials\":[{\"id\":\"id\"}]},\"self_signed_tls_client_auth\":{\"credentials\":[{\"id\":\"id\"}]}},\"require_pushed_authorization_requests\":true,\"require_proof_of_possession\":true,\"signed_request_object\":{\"required\":true,\"credentials\":[{\"id\":\"id\"}]},\"compliance_level\":\"none\",\"skip_non_verifiable_callback_uri_confirmation_prompt\":true,\"token_exchange\":{\"allow_any_profile_of_type\":[\"custom_authentication\"]},\"par_request_expiry\":1,\"token_quota\":{\"client_credentials\":{\"enforce\":true,\"per_day\":1,\"per_hour\":1}},\"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,\"linked_clients\":[{\"client_id\":\"client_id\"}],\"okta_oin_client_id\":\"okta_oin_client_id\",\"admin_login_domain\":\"admin_login_domain\",\"oin_submission_id\":\"oin_submission_id\"},\"resource_server_identifier\":\"resource_server_identifier\",\"async_approval_notification_channels\":[\"guardian-push\"]}")); - CreateClientResponseContent response = client.clients() - .create(CreateClientRequestContent.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" - + " \"client_id\": \"client_id\",\n" - + " \"tenant\": \"tenant\",\n" - + " \"name\": \"name\",\n" - + " \"description\": \"description\",\n" - + " \"global\": true,\n" - + " \"client_secret\": \"client_secret\",\n" - + " \"app_type\": \"native\",\n" - + " \"logo_uri\": \"logo_uri\",\n" - + " \"is_first_party\": true,\n" - + " \"oidc_conformant\": true,\n" - + " \"callbacks\": [\n" - + " \"callbacks\"\n" - + " ],\n" - + " \"allowed_origins\": [\n" - + " \"allowed_origins\"\n" - + " ],\n" - + " \"web_origins\": [\n" - + " \"web_origins\"\n" - + " ],\n" - + " \"client_aliases\": [\n" - + " \"client_aliases\"\n" - + " ],\n" - + " \"allowed_clients\": [\n" - + " \"allowed_clients\"\n" - + " ],\n" - + " \"allowed_logout_urls\": [\n" - + " \"allowed_logout_urls\"\n" - + " ],\n" - + " \"session_transfer\": {\n" - + " \"can_create_session_transfer_token\": true,\n" - + " \"enforce_cascade_revocation\": true,\n" - + " \"allowed_authentication_methods\": [\n" - + " \"cookie\"\n" - + " ],\n" - + " \"enforce_device_binding\": \"ip\",\n" - + " \"allow_refresh_token\": true,\n" - + " \"enforce_online_refresh_tokens\": true\n" - + " },\n" - + " \"oidc_logout\": {\n" - + " \"backchannel_logout_urls\": [\n" - + " \"backchannel_logout_urls\"\n" - + " ],\n" - + " \"backchannel_logout_initiators\": {\n" - + " \"mode\": \"custom\",\n" - + " \"selected_initiators\": [\n" - + " \"rp-logout\"\n" - + " ]\n" - + " },\n" - + " \"backchannel_logout_session_metadata\": {\n" - + " \"include\": true\n" - + " }\n" - + " },\n" - + " \"grant_types\": [\n" - + " \"grant_types\"\n" - + " ],\n" - + " \"jwt_configuration\": {\n" - + " \"lifetime_in_seconds\": 1,\n" - + " \"secret_encoded\": true,\n" - + " \"scopes\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"alg\": \"HS256\"\n" - + " },\n" - + " \"signing_keys\": [\n" - + " {\n" - + " \"pkcs7\": \"pkcs7\",\n" - + " \"cert\": \"cert\",\n" - + " \"subject\": \"subject\"\n" - + " }\n" - + " ],\n" - + " \"encryption_key\": {\n" - + " \"pub\": \"pub\",\n" - + " \"cert\": \"cert\",\n" - + " \"subject\": \"subject\"\n" - + " },\n" - + " \"sso\": true,\n" - + " \"sso_disabled\": true,\n" - + " \"cross_origin_authentication\": true,\n" - + " \"cross_origin_loc\": \"cross_origin_loc\",\n" - + " \"custom_login_page_on\": true,\n" - + " \"custom_login_page\": \"custom_login_page\",\n" - + " \"custom_login_page_preview\": \"custom_login_page_preview\",\n" - + " \"form_template\": \"form_template\",\n" - + " \"addons\": {\n" - + " \"aws\": {\n" - + " \"principal\": \"principal\",\n" - + " \"role\": \"role\",\n" - + " \"lifetime_in_seconds\": 1\n" - + " },\n" - + " \"azure_blob\": {\n" - + " \"accountName\": \"accountName\",\n" - + " \"storageAccessKey\": \"storageAccessKey\",\n" - + " \"containerName\": \"containerName\",\n" - + " \"blobName\": \"blobName\",\n" - + " \"expiration\": 1,\n" - + " \"signedIdentifier\": \"signedIdentifier\",\n" - + " \"blob_read\": true,\n" - + " \"blob_write\": true,\n" - + " \"blob_delete\": true,\n" - + " \"container_read\": true,\n" - + " \"container_write\": true,\n" - + " \"container_delete\": true,\n" - + " \"container_list\": true\n" - + " },\n" - + " \"azure_sb\": {\n" - + " \"namespace\": \"namespace\",\n" - + " \"sasKeyName\": \"sasKeyName\",\n" - + " \"sasKey\": \"sasKey\",\n" - + " \"entityPath\": \"entityPath\",\n" - + " \"expiration\": 1\n" - + " },\n" - + " \"rms\": {\n" - + " \"url\": \"url\"\n" - + " },\n" - + " \"mscrm\": {\n" - + " \"url\": \"url\"\n" - + " },\n" - + " \"slack\": {\n" - + " \"team\": \"team\"\n" - + " },\n" - + " \"sentry\": {\n" - + " \"org_slug\": \"org_slug\",\n" - + " \"base_url\": \"base_url\"\n" - + " },\n" - + " \"box\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"cloudbees\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"concur\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"dropbox\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"echosign\": {\n" - + " \"domain\": \"domain\"\n" - + " },\n" - + " \"egnyte\": {\n" - + " \"domain\": \"domain\"\n" - + " },\n" - + " \"firebase\": {\n" - + " \"secret\": \"secret\",\n" - + " \"private_key_id\": \"private_key_id\",\n" - + " \"private_key\": \"private_key\",\n" - + " \"client_email\": \"client_email\",\n" - + " \"lifetime_in_seconds\": 1\n" - + " },\n" - + " \"newrelic\": {\n" - + " \"account\": \"account\"\n" - + " },\n" - + " \"office365\": {\n" - + " \"domain\": \"domain\",\n" - + " \"connection\": \"connection\"\n" - + " },\n" - + " \"salesforce\": {\n" - + " \"entity_id\": \"entity_id\"\n" - + " },\n" - + " \"salesforce_api\": {\n" - + " \"clientid\": \"clientid\",\n" - + " \"principal\": \"principal\",\n" - + " \"communityName\": \"communityName\",\n" - + " \"community_url_section\": \"community_url_section\"\n" - + " },\n" - + " \"salesforce_sandbox_api\": {\n" - + " \"clientid\": \"clientid\",\n" - + " \"principal\": \"principal\",\n" - + " \"communityName\": \"communityName\",\n" - + " \"community_url_section\": \"community_url_section\"\n" - + " },\n" - + " \"samlp\": {\n" - + " \"mappings\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"audience\": \"audience\",\n" - + " \"recipient\": \"recipient\",\n" - + " \"createUpnClaim\": true,\n" - + " \"mapUnknownClaimsAsIs\": true,\n" - + " \"passthroughClaimsWithNoMapping\": true,\n" - + " \"mapIdentities\": true,\n" - + " \"signatureAlgorithm\": \"signatureAlgorithm\",\n" - + " \"digestAlgorithm\": \"digestAlgorithm\",\n" - + " \"issuer\": \"issuer\",\n" - + " \"destination\": \"destination\",\n" - + " \"lifetimeInSeconds\": 1,\n" - + " \"signResponse\": true,\n" - + " \"nameIdentifierFormat\": \"nameIdentifierFormat\",\n" - + " \"nameIdentifierProbes\": [\n" - + " \"nameIdentifierProbes\"\n" - + " ],\n" - + " \"authnContextClassRef\": \"authnContextClassRef\"\n" - + " },\n" - + " \"layer\": {\n" - + " \"providerId\": \"providerId\",\n" - + " \"keyId\": \"keyId\",\n" - + " \"privateKey\": \"privateKey\",\n" - + " \"principal\": \"principal\",\n" - + " \"expiration\": 1\n" - + " },\n" - + " \"sap_api\": {\n" - + " \"clientid\": \"clientid\",\n" - + " \"usernameAttribute\": \"usernameAttribute\",\n" - + " \"tokenEndpointUrl\": \"tokenEndpointUrl\",\n" - + " \"scope\": \"scope\",\n" - + " \"servicePassword\": \"servicePassword\",\n" - + " \"nameIdentifierFormat\": \"nameIdentifierFormat\"\n" - + " },\n" - + " \"sharepoint\": {\n" - + " \"url\": \"url\",\n" - + " \"external_url\": [\n" - + " \"external_url\"\n" - + " ]\n" - + " },\n" - + " \"springcm\": {\n" - + " \"acsurl\": \"acsurl\"\n" - + " },\n" - + " \"wams\": {\n" - + " \"masterkey\": \"masterkey\"\n" - + " },\n" - + " \"wsfed\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"zendesk\": {\n" - + " \"accountName\": \"accountName\"\n" - + " },\n" - + " \"zoom\": {\n" - + " \"account\": \"account\"\n" - + " },\n" - + " \"sso_integration\": {\n" - + " \"name\": \"name\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " },\n" - + " \"token_endpoint_auth_method\": \"none\",\n" - + " \"is_token_endpoint_ip_header_trusted\": true,\n" - + " \"client_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"mobile\": {\n" - + " \"android\": {\n" - + " \"app_package_name\": \"app_package_name\",\n" - + " \"sha256_cert_fingerprints\": [\n" - + " \"sha256_cert_fingerprints\"\n" - + " ]\n" - + " },\n" - + " \"ios\": {\n" - + " \"team_id\": \"team_id\",\n" - + " \"app_bundle_identifier\": \"app_bundle_identifier\"\n" - + " }\n" - + " },\n" - + " \"initiate_login_uri\": \"initiate_login_uri\",\n" - + " \"refresh_token\": {\n" - + " \"rotation_type\": \"rotating\",\n" - + " \"expiration_type\": \"expiring\",\n" - + " \"leeway\": 1,\n" - + " \"token_lifetime\": 1,\n" - + " \"infinite_token_lifetime\": true,\n" - + " \"idle_token_lifetime\": 1,\n" - + " \"infinite_idle_token_lifetime\": true,\n" - + " \"policies\": [\n" - + " {\n" - + " \"audience\": \"audience\",\n" - + " \"scope\": [\n" - + " \"scope\"\n" - + " ]\n" - + " }\n" - + " ]\n" - + " },\n" - + " \"default_organization\": {\n" - + " \"organization_id\": \"organization_id\",\n" - + " \"flows\": [\n" - + " \"client_credentials\"\n" - + " ]\n" - + " },\n" - + " \"organization_usage\": \"deny\",\n" - + " \"organization_require_behavior\": \"no_prompt\",\n" - + " \"organization_discovery_methods\": [\n" - + " \"email\"\n" - + " ],\n" - + " \"client_authentication_methods\": {\n" - + " \"private_key_jwt\": {\n" - + " \"credentials\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ]\n" - + " },\n" - + " \"tls_client_auth\": {\n" - + " \"credentials\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ]\n" - + " },\n" - + " \"self_signed_tls_client_auth\": {\n" - + " \"credentials\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ]\n" - + " }\n" - + " },\n" - + " \"require_pushed_authorization_requests\": true,\n" - + " \"require_proof_of_possession\": true,\n" - + " \"signed_request_object\": {\n" - + " \"required\": true,\n" - + " \"credentials\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ]\n" - + " },\n" - + " \"compliance_level\": \"none\",\n" - + " \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n" - + " \"token_exchange\": {\n" - + " \"allow_any_profile_of_type\": [\n" - + " \"custom_authentication\"\n" - + " ]\n" - + " },\n" - + " \"par_request_expiry\": 1,\n" - + " \"token_quota\": {\n" - + " \"client_credentials\": {\n" - + " \"enforce\": true,\n" - + " \"per_day\": 1,\n" - + " \"per_hour\": 1\n" - + " }\n" - + " },\n" - + " \"express_configuration\": {\n" - + " \"initiate_login_uri_template\": \"initiate_login_uri_template\",\n" - + " \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n" - + " \"connection_profile_id\": \"connection_profile_id\",\n" - + " \"enable_client\": true,\n" - + " \"enable_organization\": true,\n" - + " \"linked_clients\": [\n" - + " {\n" - + " \"client_id\": \"client_id\"\n" - + " }\n" - + " ],\n" - + " \"okta_oin_client_id\": \"okta_oin_client_id\",\n" - + " \"admin_login_domain\": \"admin_login_domain\",\n" - + " \"oin_submission_id\": \"oin_submission_id\"\n" - + " },\n" - + " \"resource_server_identifier\": \"resource_server_identifier\",\n" - + " \"async_approval_notification_channels\": [\n" - + " \"guardian-push\"\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 testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"client_id\":\"client_id\",\"tenant\":\"tenant\",\"name\":\"name\",\"description\":\"description\",\"global\":true,\"client_secret\":\"client_secret\",\"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\"],\"session_transfer\":{\"can_create_session_transfer_token\":true,\"enforce_cascade_revocation\":true,\"allowed_authentication_methods\":[\"cookie\"],\"enforce_device_binding\":\"ip\",\"allow_refresh_token\":true,\"enforce_online_refresh_tokens\":true},\"oidc_logout\":{\"backchannel_logout_urls\":[\"backchannel_logout_urls\"],\"backchannel_logout_initiators\":{\"mode\":\"custom\",\"selected_initiators\":[\"rp-logout\"]},\"backchannel_logout_session_metadata\":{\"include\":true}},\"grant_types\":[\"grant_types\"],\"jwt_configuration\":{\"lifetime_in_seconds\":1,\"secret_encoded\":true,\"scopes\":{\"key\":\"value\"},\"alg\":\"HS256\"},\"signing_keys\":[{\"pkcs7\":\"pkcs7\",\"cert\":\"cert\",\"subject\":\"subject\"}],\"encryption_key\":{\"pub\":\"pub\",\"cert\":\"cert\",\"subject\":\"subject\"},\"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\",\"addons\":{\"aws\":{\"principal\":\"principal\",\"role\":\"role\",\"lifetime_in_seconds\":1},\"azure_blob\":{\"accountName\":\"accountName\",\"storageAccessKey\":\"storageAccessKey\",\"containerName\":\"containerName\",\"blobName\":\"blobName\",\"expiration\":1,\"signedIdentifier\":\"signedIdentifier\",\"blob_read\":true,\"blob_write\":true,\"blob_delete\":true,\"container_read\":true,\"container_write\":true,\"container_delete\":true,\"container_list\":true},\"azure_sb\":{\"namespace\":\"namespace\",\"sasKeyName\":\"sasKeyName\",\"sasKey\":\"sasKey\",\"entityPath\":\"entityPath\",\"expiration\":1},\"rms\":{\"url\":\"url\"},\"mscrm\":{\"url\":\"url\"},\"slack\":{\"team\":\"team\"},\"sentry\":{\"org_slug\":\"org_slug\",\"base_url\":\"base_url\"},\"box\":{\"key\":\"value\"},\"cloudbees\":{\"key\":\"value\"},\"concur\":{\"key\":\"value\"},\"dropbox\":{\"key\":\"value\"},\"echosign\":{\"domain\":\"domain\"},\"egnyte\":{\"domain\":\"domain\"},\"firebase\":{\"secret\":\"secret\",\"private_key_id\":\"private_key_id\",\"private_key\":\"private_key\",\"client_email\":\"client_email\",\"lifetime_in_seconds\":1},\"newrelic\":{\"account\":\"account\"},\"office365\":{\"domain\":\"domain\",\"connection\":\"connection\"},\"salesforce\":{\"entity_id\":\"entity_id\"},\"salesforce_api\":{\"clientid\":\"clientid\",\"principal\":\"principal\",\"communityName\":\"communityName\",\"community_url_section\":\"community_url_section\"},\"salesforce_sandbox_api\":{\"clientid\":\"clientid\",\"principal\":\"principal\",\"communityName\":\"communityName\",\"community_url_section\":\"community_url_section\"},\"samlp\":{\"mappings\":{\"key\":\"value\"},\"audience\":\"audience\",\"recipient\":\"recipient\",\"createUpnClaim\":true,\"mapUnknownClaimsAsIs\":true,\"passthroughClaimsWithNoMapping\":true,\"mapIdentities\":true,\"signatureAlgorithm\":\"signatureAlgorithm\",\"digestAlgorithm\":\"digestAlgorithm\",\"issuer\":\"issuer\",\"destination\":\"destination\",\"lifetimeInSeconds\":1,\"signResponse\":true,\"nameIdentifierFormat\":\"nameIdentifierFormat\",\"nameIdentifierProbes\":[\"nameIdentifierProbes\"],\"authnContextClassRef\":\"authnContextClassRef\"},\"layer\":{\"providerId\":\"providerId\",\"keyId\":\"keyId\",\"privateKey\":\"privateKey\",\"principal\":\"principal\",\"expiration\":1},\"sap_api\":{\"clientid\":\"clientid\",\"usernameAttribute\":\"usernameAttribute\",\"tokenEndpointUrl\":\"tokenEndpointUrl\",\"scope\":\"scope\",\"servicePassword\":\"servicePassword\",\"nameIdentifierFormat\":\"nameIdentifierFormat\"},\"sharepoint\":{\"url\":\"url\",\"external_url\":[\"external_url\"]},\"springcm\":{\"acsurl\":\"acsurl\"},\"wams\":{\"masterkey\":\"masterkey\"},\"wsfed\":{\"key\":\"value\"},\"zendesk\":{\"accountName\":\"accountName\"},\"zoom\":{\"account\":\"account\"},\"sso_integration\":{\"name\":\"name\",\"version\":\"version\"}},\"token_endpoint_auth_method\":\"none\",\"is_token_endpoint_ip_header_trusted\":true,\"client_metadata\":{\"key\":\"value\"},\"mobile\":{\"android\":{\"app_package_name\":\"app_package_name\",\"sha256_cert_fingerprints\":[\"sha256_cert_fingerprints\"]},\"ios\":{\"team_id\":\"team_id\",\"app_bundle_identifier\":\"app_bundle_identifier\"}},\"initiate_login_uri\":\"initiate_login_uri\",\"refresh_token\":{\"rotation_type\":\"rotating\",\"expiration_type\":\"expiring\",\"leeway\":1,\"token_lifetime\":1,\"infinite_token_lifetime\":true,\"idle_token_lifetime\":1,\"infinite_idle_token_lifetime\":true,\"policies\":[{\"audience\":\"audience\",\"scope\":[\"scope\"]}]},\"default_organization\":{\"organization_id\":\"organization_id\",\"flows\":[\"client_credentials\"]},\"organization_usage\":\"deny\",\"organization_require_behavior\":\"no_prompt\",\"organization_discovery_methods\":[\"email\"],\"client_authentication_methods\":{\"private_key_jwt\":{\"credentials\":[{\"id\":\"id\"}]},\"tls_client_auth\":{\"credentials\":[{\"id\":\"id\"}]},\"self_signed_tls_client_auth\":{\"credentials\":[{\"id\":\"id\"}]}},\"require_pushed_authorization_requests\":true,\"require_proof_of_possession\":true,\"signed_request_object\":{\"required\":true,\"credentials\":[{\"id\":\"id\"}]},\"compliance_level\":\"none\",\"skip_non_verifiable_callback_uri_confirmation_prompt\":true,\"token_exchange\":{\"allow_any_profile_of_type\":[\"custom_authentication\"]},\"par_request_expiry\":1,\"token_quota\":{\"client_credentials\":{\"enforce\":true,\"per_day\":1,\"per_hour\":1}},\"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,\"linked_clients\":[{\"client_id\":\"client_id\"}],\"okta_oin_client_id\":\"okta_oin_client_id\",\"admin_login_domain\":\"admin_login_domain\",\"oin_submission_id\":\"oin_submission_id\"},\"resource_server_identifier\":\"resource_server_identifier\",\"async_approval_notification_channels\":[\"guardian-push\"]}")); - GetClientResponseContent response = client.clients() - .get( - "id", - GetClientRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(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"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"client_id\": \"client_id\",\n" - + " \"tenant\": \"tenant\",\n" - + " \"name\": \"name\",\n" - + " \"description\": \"description\",\n" - + " \"global\": true,\n" - + " \"client_secret\": \"client_secret\",\n" - + " \"app_type\": \"native\",\n" - + " \"logo_uri\": \"logo_uri\",\n" - + " \"is_first_party\": true,\n" - + " \"oidc_conformant\": true,\n" - + " \"callbacks\": [\n" - + " \"callbacks\"\n" - + " ],\n" - + " \"allowed_origins\": [\n" - + " \"allowed_origins\"\n" - + " ],\n" - + " \"web_origins\": [\n" - + " \"web_origins\"\n" - + " ],\n" - + " \"client_aliases\": [\n" - + " \"client_aliases\"\n" - + " ],\n" - + " \"allowed_clients\": [\n" - + " \"allowed_clients\"\n" - + " ],\n" - + " \"allowed_logout_urls\": [\n" - + " \"allowed_logout_urls\"\n" - + " ],\n" - + " \"session_transfer\": {\n" - + " \"can_create_session_transfer_token\": true,\n" - + " \"enforce_cascade_revocation\": true,\n" - + " \"allowed_authentication_methods\": [\n" - + " \"cookie\"\n" - + " ],\n" - + " \"enforce_device_binding\": \"ip\",\n" - + " \"allow_refresh_token\": true,\n" - + " \"enforce_online_refresh_tokens\": true\n" - + " },\n" - + " \"oidc_logout\": {\n" - + " \"backchannel_logout_urls\": [\n" - + " \"backchannel_logout_urls\"\n" - + " ],\n" - + " \"backchannel_logout_initiators\": {\n" - + " \"mode\": \"custom\",\n" - + " \"selected_initiators\": [\n" - + " \"rp-logout\"\n" - + " ]\n" - + " },\n" - + " \"backchannel_logout_session_metadata\": {\n" - + " \"include\": true\n" - + " }\n" - + " },\n" - + " \"grant_types\": [\n" - + " \"grant_types\"\n" - + " ],\n" - + " \"jwt_configuration\": {\n" - + " \"lifetime_in_seconds\": 1,\n" - + " \"secret_encoded\": true,\n" - + " \"scopes\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"alg\": \"HS256\"\n" - + " },\n" - + " \"signing_keys\": [\n" - + " {\n" - + " \"pkcs7\": \"pkcs7\",\n" - + " \"cert\": \"cert\",\n" - + " \"subject\": \"subject\"\n" - + " }\n" - + " ],\n" - + " \"encryption_key\": {\n" - + " \"pub\": \"pub\",\n" - + " \"cert\": \"cert\",\n" - + " \"subject\": \"subject\"\n" - + " },\n" - + " \"sso\": true,\n" - + " \"sso_disabled\": true,\n" - + " \"cross_origin_authentication\": true,\n" - + " \"cross_origin_loc\": \"cross_origin_loc\",\n" - + " \"custom_login_page_on\": true,\n" - + " \"custom_login_page\": \"custom_login_page\",\n" - + " \"custom_login_page_preview\": \"custom_login_page_preview\",\n" - + " \"form_template\": \"form_template\",\n" - + " \"addons\": {\n" - + " \"aws\": {\n" - + " \"principal\": \"principal\",\n" - + " \"role\": \"role\",\n" - + " \"lifetime_in_seconds\": 1\n" - + " },\n" - + " \"azure_blob\": {\n" - + " \"accountName\": \"accountName\",\n" - + " \"storageAccessKey\": \"storageAccessKey\",\n" - + " \"containerName\": \"containerName\",\n" - + " \"blobName\": \"blobName\",\n" - + " \"expiration\": 1,\n" - + " \"signedIdentifier\": \"signedIdentifier\",\n" - + " \"blob_read\": true,\n" - + " \"blob_write\": true,\n" - + " \"blob_delete\": true,\n" - + " \"container_read\": true,\n" - + " \"container_write\": true,\n" - + " \"container_delete\": true,\n" - + " \"container_list\": true\n" - + " },\n" - + " \"azure_sb\": {\n" - + " \"namespace\": \"namespace\",\n" - + " \"sasKeyName\": \"sasKeyName\",\n" - + " \"sasKey\": \"sasKey\",\n" - + " \"entityPath\": \"entityPath\",\n" - + " \"expiration\": 1\n" - + " },\n" - + " \"rms\": {\n" - + " \"url\": \"url\"\n" - + " },\n" - + " \"mscrm\": {\n" - + " \"url\": \"url\"\n" - + " },\n" - + " \"slack\": {\n" - + " \"team\": \"team\"\n" - + " },\n" - + " \"sentry\": {\n" - + " \"org_slug\": \"org_slug\",\n" - + " \"base_url\": \"base_url\"\n" - + " },\n" - + " \"box\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"cloudbees\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"concur\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"dropbox\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"echosign\": {\n" - + " \"domain\": \"domain\"\n" - + " },\n" - + " \"egnyte\": {\n" - + " \"domain\": \"domain\"\n" - + " },\n" - + " \"firebase\": {\n" - + " \"secret\": \"secret\",\n" - + " \"private_key_id\": \"private_key_id\",\n" - + " \"private_key\": \"private_key\",\n" - + " \"client_email\": \"client_email\",\n" - + " \"lifetime_in_seconds\": 1\n" - + " },\n" - + " \"newrelic\": {\n" - + " \"account\": \"account\"\n" - + " },\n" - + " \"office365\": {\n" - + " \"domain\": \"domain\",\n" - + " \"connection\": \"connection\"\n" - + " },\n" - + " \"salesforce\": {\n" - + " \"entity_id\": \"entity_id\"\n" - + " },\n" - + " \"salesforce_api\": {\n" - + " \"clientid\": \"clientid\",\n" - + " \"principal\": \"principal\",\n" - + " \"communityName\": \"communityName\",\n" - + " \"community_url_section\": \"community_url_section\"\n" - + " },\n" - + " \"salesforce_sandbox_api\": {\n" - + " \"clientid\": \"clientid\",\n" - + " \"principal\": \"principal\",\n" - + " \"communityName\": \"communityName\",\n" - + " \"community_url_section\": \"community_url_section\"\n" - + " },\n" - + " \"samlp\": {\n" - + " \"mappings\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"audience\": \"audience\",\n" - + " \"recipient\": \"recipient\",\n" - + " \"createUpnClaim\": true,\n" - + " \"mapUnknownClaimsAsIs\": true,\n" - + " \"passthroughClaimsWithNoMapping\": true,\n" - + " \"mapIdentities\": true,\n" - + " \"signatureAlgorithm\": \"signatureAlgorithm\",\n" - + " \"digestAlgorithm\": \"digestAlgorithm\",\n" - + " \"issuer\": \"issuer\",\n" - + " \"destination\": \"destination\",\n" - + " \"lifetimeInSeconds\": 1,\n" - + " \"signResponse\": true,\n" - + " \"nameIdentifierFormat\": \"nameIdentifierFormat\",\n" - + " \"nameIdentifierProbes\": [\n" - + " \"nameIdentifierProbes\"\n" - + " ],\n" - + " \"authnContextClassRef\": \"authnContextClassRef\"\n" - + " },\n" - + " \"layer\": {\n" - + " \"providerId\": \"providerId\",\n" - + " \"keyId\": \"keyId\",\n" - + " \"privateKey\": \"privateKey\",\n" - + " \"principal\": \"principal\",\n" - + " \"expiration\": 1\n" - + " },\n" - + " \"sap_api\": {\n" - + " \"clientid\": \"clientid\",\n" - + " \"usernameAttribute\": \"usernameAttribute\",\n" - + " \"tokenEndpointUrl\": \"tokenEndpointUrl\",\n" - + " \"scope\": \"scope\",\n" - + " \"servicePassword\": \"servicePassword\",\n" - + " \"nameIdentifierFormat\": \"nameIdentifierFormat\"\n" - + " },\n" - + " \"sharepoint\": {\n" - + " \"url\": \"url\",\n" - + " \"external_url\": [\n" - + " \"external_url\"\n" - + " ]\n" - + " },\n" - + " \"springcm\": {\n" - + " \"acsurl\": \"acsurl\"\n" - + " },\n" - + " \"wams\": {\n" - + " \"masterkey\": \"masterkey\"\n" - + " },\n" - + " \"wsfed\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"zendesk\": {\n" - + " \"accountName\": \"accountName\"\n" - + " },\n" - + " \"zoom\": {\n" - + " \"account\": \"account\"\n" - + " },\n" - + " \"sso_integration\": {\n" - + " \"name\": \"name\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " },\n" - + " \"token_endpoint_auth_method\": \"none\",\n" - + " \"is_token_endpoint_ip_header_trusted\": true,\n" - + " \"client_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"mobile\": {\n" - + " \"android\": {\n" - + " \"app_package_name\": \"app_package_name\",\n" - + " \"sha256_cert_fingerprints\": [\n" - + " \"sha256_cert_fingerprints\"\n" - + " ]\n" - + " },\n" - + " \"ios\": {\n" - + " \"team_id\": \"team_id\",\n" - + " \"app_bundle_identifier\": \"app_bundle_identifier\"\n" - + " }\n" - + " },\n" - + " \"initiate_login_uri\": \"initiate_login_uri\",\n" - + " \"refresh_token\": {\n" - + " \"rotation_type\": \"rotating\",\n" - + " \"expiration_type\": \"expiring\",\n" - + " \"leeway\": 1,\n" - + " \"token_lifetime\": 1,\n" - + " \"infinite_token_lifetime\": true,\n" - + " \"idle_token_lifetime\": 1,\n" - + " \"infinite_idle_token_lifetime\": true,\n" - + " \"policies\": [\n" - + " {\n" - + " \"audience\": \"audience\",\n" - + " \"scope\": [\n" - + " \"scope\"\n" - + " ]\n" - + " }\n" - + " ]\n" - + " },\n" - + " \"default_organization\": {\n" - + " \"organization_id\": \"organization_id\",\n" - + " \"flows\": [\n" - + " \"client_credentials\"\n" - + " ]\n" - + " },\n" - + " \"organization_usage\": \"deny\",\n" - + " \"organization_require_behavior\": \"no_prompt\",\n" - + " \"organization_discovery_methods\": [\n" - + " \"email\"\n" - + " ],\n" - + " \"client_authentication_methods\": {\n" - + " \"private_key_jwt\": {\n" - + " \"credentials\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ]\n" - + " },\n" - + " \"tls_client_auth\": {\n" - + " \"credentials\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ]\n" - + " },\n" - + " \"self_signed_tls_client_auth\": {\n" - + " \"credentials\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ]\n" - + " }\n" - + " },\n" - + " \"require_pushed_authorization_requests\": true,\n" - + " \"require_proof_of_possession\": true,\n" - + " \"signed_request_object\": {\n" - + " \"required\": true,\n" - + " \"credentials\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ]\n" - + " },\n" - + " \"compliance_level\": \"none\",\n" - + " \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n" - + " \"token_exchange\": {\n" - + " \"allow_any_profile_of_type\": [\n" - + " \"custom_authentication\"\n" - + " ]\n" - + " },\n" - + " \"par_request_expiry\": 1,\n" - + " \"token_quota\": {\n" - + " \"client_credentials\": {\n" - + " \"enforce\": true,\n" - + " \"per_day\": 1,\n" - + " \"per_hour\": 1\n" - + " }\n" - + " },\n" - + " \"express_configuration\": {\n" - + " \"initiate_login_uri_template\": \"initiate_login_uri_template\",\n" - + " \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n" - + " \"connection_profile_id\": \"connection_profile_id\",\n" - + " \"enable_client\": true,\n" - + " \"enable_organization\": true,\n" - + " \"linked_clients\": [\n" - + " {\n" - + " \"client_id\": \"client_id\"\n" - + " }\n" - + " ],\n" - + " \"okta_oin_client_id\": \"okta_oin_client_id\",\n" - + " \"admin_login_domain\": \"admin_login_domain\",\n" - + " \"oin_submission_id\": \"oin_submission_id\"\n" - + " },\n" - + " \"resource_server_identifier\": \"resource_server_identifier\",\n" - + " \"async_approval_notification_channels\": [\n" - + " \"guardian-push\"\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.clients().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( - "{\"client_id\":\"client_id\",\"tenant\":\"tenant\",\"name\":\"name\",\"description\":\"description\",\"global\":true,\"client_secret\":\"client_secret\",\"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\"],\"session_transfer\":{\"can_create_session_transfer_token\":true,\"enforce_cascade_revocation\":true,\"allowed_authentication_methods\":[\"cookie\"],\"enforce_device_binding\":\"ip\",\"allow_refresh_token\":true,\"enforce_online_refresh_tokens\":true},\"oidc_logout\":{\"backchannel_logout_urls\":[\"backchannel_logout_urls\"],\"backchannel_logout_initiators\":{\"mode\":\"custom\",\"selected_initiators\":[\"rp-logout\"]},\"backchannel_logout_session_metadata\":{\"include\":true}},\"grant_types\":[\"grant_types\"],\"jwt_configuration\":{\"lifetime_in_seconds\":1,\"secret_encoded\":true,\"scopes\":{\"key\":\"value\"},\"alg\":\"HS256\"},\"signing_keys\":[{\"pkcs7\":\"pkcs7\",\"cert\":\"cert\",\"subject\":\"subject\"}],\"encryption_key\":{\"pub\":\"pub\",\"cert\":\"cert\",\"subject\":\"subject\"},\"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\",\"addons\":{\"aws\":{\"principal\":\"principal\",\"role\":\"role\",\"lifetime_in_seconds\":1},\"azure_blob\":{\"accountName\":\"accountName\",\"storageAccessKey\":\"storageAccessKey\",\"containerName\":\"containerName\",\"blobName\":\"blobName\",\"expiration\":1,\"signedIdentifier\":\"signedIdentifier\",\"blob_read\":true,\"blob_write\":true,\"blob_delete\":true,\"container_read\":true,\"container_write\":true,\"container_delete\":true,\"container_list\":true},\"azure_sb\":{\"namespace\":\"namespace\",\"sasKeyName\":\"sasKeyName\",\"sasKey\":\"sasKey\",\"entityPath\":\"entityPath\",\"expiration\":1},\"rms\":{\"url\":\"url\"},\"mscrm\":{\"url\":\"url\"},\"slack\":{\"team\":\"team\"},\"sentry\":{\"org_slug\":\"org_slug\",\"base_url\":\"base_url\"},\"box\":{\"key\":\"value\"},\"cloudbees\":{\"key\":\"value\"},\"concur\":{\"key\":\"value\"},\"dropbox\":{\"key\":\"value\"},\"echosign\":{\"domain\":\"domain\"},\"egnyte\":{\"domain\":\"domain\"},\"firebase\":{\"secret\":\"secret\",\"private_key_id\":\"private_key_id\",\"private_key\":\"private_key\",\"client_email\":\"client_email\",\"lifetime_in_seconds\":1},\"newrelic\":{\"account\":\"account\"},\"office365\":{\"domain\":\"domain\",\"connection\":\"connection\"},\"salesforce\":{\"entity_id\":\"entity_id\"},\"salesforce_api\":{\"clientid\":\"clientid\",\"principal\":\"principal\",\"communityName\":\"communityName\",\"community_url_section\":\"community_url_section\"},\"salesforce_sandbox_api\":{\"clientid\":\"clientid\",\"principal\":\"principal\",\"communityName\":\"communityName\",\"community_url_section\":\"community_url_section\"},\"samlp\":{\"mappings\":{\"key\":\"value\"},\"audience\":\"audience\",\"recipient\":\"recipient\",\"createUpnClaim\":true,\"mapUnknownClaimsAsIs\":true,\"passthroughClaimsWithNoMapping\":true,\"mapIdentities\":true,\"signatureAlgorithm\":\"signatureAlgorithm\",\"digestAlgorithm\":\"digestAlgorithm\",\"issuer\":\"issuer\",\"destination\":\"destination\",\"lifetimeInSeconds\":1,\"signResponse\":true,\"nameIdentifierFormat\":\"nameIdentifierFormat\",\"nameIdentifierProbes\":[\"nameIdentifierProbes\"],\"authnContextClassRef\":\"authnContextClassRef\"},\"layer\":{\"providerId\":\"providerId\",\"keyId\":\"keyId\",\"privateKey\":\"privateKey\",\"principal\":\"principal\",\"expiration\":1},\"sap_api\":{\"clientid\":\"clientid\",\"usernameAttribute\":\"usernameAttribute\",\"tokenEndpointUrl\":\"tokenEndpointUrl\",\"scope\":\"scope\",\"servicePassword\":\"servicePassword\",\"nameIdentifierFormat\":\"nameIdentifierFormat\"},\"sharepoint\":{\"url\":\"url\",\"external_url\":[\"external_url\"]},\"springcm\":{\"acsurl\":\"acsurl\"},\"wams\":{\"masterkey\":\"masterkey\"},\"wsfed\":{\"key\":\"value\"},\"zendesk\":{\"accountName\":\"accountName\"},\"zoom\":{\"account\":\"account\"},\"sso_integration\":{\"name\":\"name\",\"version\":\"version\"}},\"token_endpoint_auth_method\":\"none\",\"is_token_endpoint_ip_header_trusted\":true,\"client_metadata\":{\"key\":\"value\"},\"mobile\":{\"android\":{\"app_package_name\":\"app_package_name\",\"sha256_cert_fingerprints\":[\"sha256_cert_fingerprints\"]},\"ios\":{\"team_id\":\"team_id\",\"app_bundle_identifier\":\"app_bundle_identifier\"}},\"initiate_login_uri\":\"initiate_login_uri\",\"refresh_token\":{\"rotation_type\":\"rotating\",\"expiration_type\":\"expiring\",\"leeway\":1,\"token_lifetime\":1,\"infinite_token_lifetime\":true,\"idle_token_lifetime\":1,\"infinite_idle_token_lifetime\":true,\"policies\":[{\"audience\":\"audience\",\"scope\":[\"scope\"]}]},\"default_organization\":{\"organization_id\":\"organization_id\",\"flows\":[\"client_credentials\"]},\"organization_usage\":\"deny\",\"organization_require_behavior\":\"no_prompt\",\"organization_discovery_methods\":[\"email\"],\"client_authentication_methods\":{\"private_key_jwt\":{\"credentials\":[{\"id\":\"id\"}]},\"tls_client_auth\":{\"credentials\":[{\"id\":\"id\"}]},\"self_signed_tls_client_auth\":{\"credentials\":[{\"id\":\"id\"}]}},\"require_pushed_authorization_requests\":true,\"require_proof_of_possession\":true,\"signed_request_object\":{\"required\":true,\"credentials\":[{\"id\":\"id\"}]},\"compliance_level\":\"none\",\"skip_non_verifiable_callback_uri_confirmation_prompt\":true,\"token_exchange\":{\"allow_any_profile_of_type\":[\"custom_authentication\"]},\"par_request_expiry\":1,\"token_quota\":{\"client_credentials\":{\"enforce\":true,\"per_day\":1,\"per_hour\":1}},\"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,\"linked_clients\":[{\"client_id\":\"client_id\"}],\"okta_oin_client_id\":\"okta_oin_client_id\",\"admin_login_domain\":\"admin_login_domain\",\"oin_submission_id\":\"oin_submission_id\"},\"resource_server_identifier\":\"resource_server_identifier\",\"async_approval_notification_channels\":[\"guardian-push\"]}")); - UpdateClientResponseContent response = client.clients() - .update("id", UpdateClientRequestContent.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" - + " \"tenant\": \"tenant\",\n" - + " \"name\": \"name\",\n" - + " \"description\": \"description\",\n" - + " \"global\": true,\n" - + " \"client_secret\": \"client_secret\",\n" - + " \"app_type\": \"native\",\n" - + " \"logo_uri\": \"logo_uri\",\n" - + " \"is_first_party\": true,\n" - + " \"oidc_conformant\": true,\n" - + " \"callbacks\": [\n" - + " \"callbacks\"\n" - + " ],\n" - + " \"allowed_origins\": [\n" - + " \"allowed_origins\"\n" - + " ],\n" - + " \"web_origins\": [\n" - + " \"web_origins\"\n" - + " ],\n" - + " \"client_aliases\": [\n" - + " \"client_aliases\"\n" - + " ],\n" - + " \"allowed_clients\": [\n" - + " \"allowed_clients\"\n" - + " ],\n" - + " \"allowed_logout_urls\": [\n" - + " \"allowed_logout_urls\"\n" - + " ],\n" - + " \"session_transfer\": {\n" - + " \"can_create_session_transfer_token\": true,\n" - + " \"enforce_cascade_revocation\": true,\n" - + " \"allowed_authentication_methods\": [\n" - + " \"cookie\"\n" - + " ],\n" - + " \"enforce_device_binding\": \"ip\",\n" - + " \"allow_refresh_token\": true,\n" - + " \"enforce_online_refresh_tokens\": true\n" - + " },\n" - + " \"oidc_logout\": {\n" - + " \"backchannel_logout_urls\": [\n" - + " \"backchannel_logout_urls\"\n" - + " ],\n" - + " \"backchannel_logout_initiators\": {\n" - + " \"mode\": \"custom\",\n" - + " \"selected_initiators\": [\n" - + " \"rp-logout\"\n" - + " ]\n" - + " },\n" - + " \"backchannel_logout_session_metadata\": {\n" - + " \"include\": true\n" - + " }\n" - + " },\n" - + " \"grant_types\": [\n" - + " \"grant_types\"\n" - + " ],\n" - + " \"jwt_configuration\": {\n" - + " \"lifetime_in_seconds\": 1,\n" - + " \"secret_encoded\": true,\n" - + " \"scopes\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"alg\": \"HS256\"\n" - + " },\n" - + " \"signing_keys\": [\n" - + " {\n" - + " \"pkcs7\": \"pkcs7\",\n" - + " \"cert\": \"cert\",\n" - + " \"subject\": \"subject\"\n" - + " }\n" - + " ],\n" - + " \"encryption_key\": {\n" - + " \"pub\": \"pub\",\n" - + " \"cert\": \"cert\",\n" - + " \"subject\": \"subject\"\n" - + " },\n" - + " \"sso\": true,\n" - + " \"sso_disabled\": true,\n" - + " \"cross_origin_authentication\": true,\n" - + " \"cross_origin_loc\": \"cross_origin_loc\",\n" - + " \"custom_login_page_on\": true,\n" - + " \"custom_login_page\": \"custom_login_page\",\n" - + " \"custom_login_page_preview\": \"custom_login_page_preview\",\n" - + " \"form_template\": \"form_template\",\n" - + " \"addons\": {\n" - + " \"aws\": {\n" - + " \"principal\": \"principal\",\n" - + " \"role\": \"role\",\n" - + " \"lifetime_in_seconds\": 1\n" - + " },\n" - + " \"azure_blob\": {\n" - + " \"accountName\": \"accountName\",\n" - + " \"storageAccessKey\": \"storageAccessKey\",\n" - + " \"containerName\": \"containerName\",\n" - + " \"blobName\": \"blobName\",\n" - + " \"expiration\": 1,\n" - + " \"signedIdentifier\": \"signedIdentifier\",\n" - + " \"blob_read\": true,\n" - + " \"blob_write\": true,\n" - + " \"blob_delete\": true,\n" - + " \"container_read\": true,\n" - + " \"container_write\": true,\n" - + " \"container_delete\": true,\n" - + " \"container_list\": true\n" - + " },\n" - + " \"azure_sb\": {\n" - + " \"namespace\": \"namespace\",\n" - + " \"sasKeyName\": \"sasKeyName\",\n" - + " \"sasKey\": \"sasKey\",\n" - + " \"entityPath\": \"entityPath\",\n" - + " \"expiration\": 1\n" - + " },\n" - + " \"rms\": {\n" - + " \"url\": \"url\"\n" - + " },\n" - + " \"mscrm\": {\n" - + " \"url\": \"url\"\n" - + " },\n" - + " \"slack\": {\n" - + " \"team\": \"team\"\n" - + " },\n" - + " \"sentry\": {\n" - + " \"org_slug\": \"org_slug\",\n" - + " \"base_url\": \"base_url\"\n" - + " },\n" - + " \"box\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"cloudbees\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"concur\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"dropbox\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"echosign\": {\n" - + " \"domain\": \"domain\"\n" - + " },\n" - + " \"egnyte\": {\n" - + " \"domain\": \"domain\"\n" - + " },\n" - + " \"firebase\": {\n" - + " \"secret\": \"secret\",\n" - + " \"private_key_id\": \"private_key_id\",\n" - + " \"private_key\": \"private_key\",\n" - + " \"client_email\": \"client_email\",\n" - + " \"lifetime_in_seconds\": 1\n" - + " },\n" - + " \"newrelic\": {\n" - + " \"account\": \"account\"\n" - + " },\n" - + " \"office365\": {\n" - + " \"domain\": \"domain\",\n" - + " \"connection\": \"connection\"\n" - + " },\n" - + " \"salesforce\": {\n" - + " \"entity_id\": \"entity_id\"\n" - + " },\n" - + " \"salesforce_api\": {\n" - + " \"clientid\": \"clientid\",\n" - + " \"principal\": \"principal\",\n" - + " \"communityName\": \"communityName\",\n" - + " \"community_url_section\": \"community_url_section\"\n" - + " },\n" - + " \"salesforce_sandbox_api\": {\n" - + " \"clientid\": \"clientid\",\n" - + " \"principal\": \"principal\",\n" - + " \"communityName\": \"communityName\",\n" - + " \"community_url_section\": \"community_url_section\"\n" - + " },\n" - + " \"samlp\": {\n" - + " \"mappings\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"audience\": \"audience\",\n" - + " \"recipient\": \"recipient\",\n" - + " \"createUpnClaim\": true,\n" - + " \"mapUnknownClaimsAsIs\": true,\n" - + " \"passthroughClaimsWithNoMapping\": true,\n" - + " \"mapIdentities\": true,\n" - + " \"signatureAlgorithm\": \"signatureAlgorithm\",\n" - + " \"digestAlgorithm\": \"digestAlgorithm\",\n" - + " \"issuer\": \"issuer\",\n" - + " \"destination\": \"destination\",\n" - + " \"lifetimeInSeconds\": 1,\n" - + " \"signResponse\": true,\n" - + " \"nameIdentifierFormat\": \"nameIdentifierFormat\",\n" - + " \"nameIdentifierProbes\": [\n" - + " \"nameIdentifierProbes\"\n" - + " ],\n" - + " \"authnContextClassRef\": \"authnContextClassRef\"\n" - + " },\n" - + " \"layer\": {\n" - + " \"providerId\": \"providerId\",\n" - + " \"keyId\": \"keyId\",\n" - + " \"privateKey\": \"privateKey\",\n" - + " \"principal\": \"principal\",\n" - + " \"expiration\": 1\n" - + " },\n" - + " \"sap_api\": {\n" - + " \"clientid\": \"clientid\",\n" - + " \"usernameAttribute\": \"usernameAttribute\",\n" - + " \"tokenEndpointUrl\": \"tokenEndpointUrl\",\n" - + " \"scope\": \"scope\",\n" - + " \"servicePassword\": \"servicePassword\",\n" - + " \"nameIdentifierFormat\": \"nameIdentifierFormat\"\n" - + " },\n" - + " \"sharepoint\": {\n" - + " \"url\": \"url\",\n" - + " \"external_url\": [\n" - + " \"external_url\"\n" - + " ]\n" - + " },\n" - + " \"springcm\": {\n" - + " \"acsurl\": \"acsurl\"\n" - + " },\n" - + " \"wams\": {\n" - + " \"masterkey\": \"masterkey\"\n" - + " },\n" - + " \"wsfed\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"zendesk\": {\n" - + " \"accountName\": \"accountName\"\n" - + " },\n" - + " \"zoom\": {\n" - + " \"account\": \"account\"\n" - + " },\n" - + " \"sso_integration\": {\n" - + " \"name\": \"name\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " },\n" - + " \"token_endpoint_auth_method\": \"none\",\n" - + " \"is_token_endpoint_ip_header_trusted\": true,\n" - + " \"client_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"mobile\": {\n" - + " \"android\": {\n" - + " \"app_package_name\": \"app_package_name\",\n" - + " \"sha256_cert_fingerprints\": [\n" - + " \"sha256_cert_fingerprints\"\n" - + " ]\n" - + " },\n" - + " \"ios\": {\n" - + " \"team_id\": \"team_id\",\n" - + " \"app_bundle_identifier\": \"app_bundle_identifier\"\n" - + " }\n" - + " },\n" - + " \"initiate_login_uri\": \"initiate_login_uri\",\n" - + " \"refresh_token\": {\n" - + " \"rotation_type\": \"rotating\",\n" - + " \"expiration_type\": \"expiring\",\n" - + " \"leeway\": 1,\n" - + " \"token_lifetime\": 1,\n" - + " \"infinite_token_lifetime\": true,\n" - + " \"idle_token_lifetime\": 1,\n" - + " \"infinite_idle_token_lifetime\": true,\n" - + " \"policies\": [\n" - + " {\n" - + " \"audience\": \"audience\",\n" - + " \"scope\": [\n" - + " \"scope\"\n" - + " ]\n" - + " }\n" - + " ]\n" - + " },\n" - + " \"default_organization\": {\n" - + " \"organization_id\": \"organization_id\",\n" - + " \"flows\": [\n" - + " \"client_credentials\"\n" - + " ]\n" - + " },\n" - + " \"organization_usage\": \"deny\",\n" - + " \"organization_require_behavior\": \"no_prompt\",\n" - + " \"organization_discovery_methods\": [\n" - + " \"email\"\n" - + " ],\n" - + " \"client_authentication_methods\": {\n" - + " \"private_key_jwt\": {\n" - + " \"credentials\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ]\n" - + " },\n" - + " \"tls_client_auth\": {\n" - + " \"credentials\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ]\n" - + " },\n" - + " \"self_signed_tls_client_auth\": {\n" - + " \"credentials\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ]\n" - + " }\n" - + " },\n" - + " \"require_pushed_authorization_requests\": true,\n" - + " \"require_proof_of_possession\": true,\n" - + " \"signed_request_object\": {\n" - + " \"required\": true,\n" - + " \"credentials\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ]\n" - + " },\n" - + " \"compliance_level\": \"none\",\n" - + " \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n" - + " \"token_exchange\": {\n" - + " \"allow_any_profile_of_type\": [\n" - + " \"custom_authentication\"\n" - + " ]\n" - + " },\n" - + " \"par_request_expiry\": 1,\n" - + " \"token_quota\": {\n" - + " \"client_credentials\": {\n" - + " \"enforce\": true,\n" - + " \"per_day\": 1,\n" - + " \"per_hour\": 1\n" - + " }\n" - + " },\n" - + " \"express_configuration\": {\n" - + " \"initiate_login_uri_template\": \"initiate_login_uri_template\",\n" - + " \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n" - + " \"connection_profile_id\": \"connection_profile_id\",\n" - + " \"enable_client\": true,\n" - + " \"enable_organization\": true,\n" - + " \"linked_clients\": [\n" - + " {\n" - + " \"client_id\": \"client_id\"\n" - + " }\n" - + " ],\n" - + " \"okta_oin_client_id\": \"okta_oin_client_id\",\n" - + " \"admin_login_domain\": \"admin_login_domain\",\n" - + " \"oin_submission_id\": \"oin_submission_id\"\n" - + " },\n" - + " \"resource_server_identifier\": \"resource_server_identifier\",\n" - + " \"async_approval_notification_channels\": [\n" - + " \"guardian-push\"\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 testRotateSecret() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"client_id\":\"client_id\",\"tenant\":\"tenant\",\"name\":\"name\",\"description\":\"description\",\"global\":true,\"client_secret\":\"client_secret\",\"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\"],\"session_transfer\":{\"can_create_session_transfer_token\":true,\"enforce_cascade_revocation\":true,\"allowed_authentication_methods\":[\"cookie\"],\"enforce_device_binding\":\"ip\",\"allow_refresh_token\":true,\"enforce_online_refresh_tokens\":true},\"oidc_logout\":{\"backchannel_logout_urls\":[\"backchannel_logout_urls\"],\"backchannel_logout_initiators\":{\"mode\":\"custom\",\"selected_initiators\":[\"rp-logout\"]},\"backchannel_logout_session_metadata\":{\"include\":true}},\"grant_types\":[\"grant_types\"],\"jwt_configuration\":{\"lifetime_in_seconds\":1,\"secret_encoded\":true,\"scopes\":{\"key\":\"value\"},\"alg\":\"HS256\"},\"signing_keys\":[{\"pkcs7\":\"pkcs7\",\"cert\":\"cert\",\"subject\":\"subject\"}],\"encryption_key\":{\"pub\":\"pub\",\"cert\":\"cert\",\"subject\":\"subject\"},\"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\",\"addons\":{\"aws\":{\"principal\":\"principal\",\"role\":\"role\",\"lifetime_in_seconds\":1},\"azure_blob\":{\"accountName\":\"accountName\",\"storageAccessKey\":\"storageAccessKey\",\"containerName\":\"containerName\",\"blobName\":\"blobName\",\"expiration\":1,\"signedIdentifier\":\"signedIdentifier\",\"blob_read\":true,\"blob_write\":true,\"blob_delete\":true,\"container_read\":true,\"container_write\":true,\"container_delete\":true,\"container_list\":true},\"azure_sb\":{\"namespace\":\"namespace\",\"sasKeyName\":\"sasKeyName\",\"sasKey\":\"sasKey\",\"entityPath\":\"entityPath\",\"expiration\":1},\"rms\":{\"url\":\"url\"},\"mscrm\":{\"url\":\"url\"},\"slack\":{\"team\":\"team\"},\"sentry\":{\"org_slug\":\"org_slug\",\"base_url\":\"base_url\"},\"box\":{\"key\":\"value\"},\"cloudbees\":{\"key\":\"value\"},\"concur\":{\"key\":\"value\"},\"dropbox\":{\"key\":\"value\"},\"echosign\":{\"domain\":\"domain\"},\"egnyte\":{\"domain\":\"domain\"},\"firebase\":{\"secret\":\"secret\",\"private_key_id\":\"private_key_id\",\"private_key\":\"private_key\",\"client_email\":\"client_email\",\"lifetime_in_seconds\":1},\"newrelic\":{\"account\":\"account\"},\"office365\":{\"domain\":\"domain\",\"connection\":\"connection\"},\"salesforce\":{\"entity_id\":\"entity_id\"},\"salesforce_api\":{\"clientid\":\"clientid\",\"principal\":\"principal\",\"communityName\":\"communityName\",\"community_url_section\":\"community_url_section\"},\"salesforce_sandbox_api\":{\"clientid\":\"clientid\",\"principal\":\"principal\",\"communityName\":\"communityName\",\"community_url_section\":\"community_url_section\"},\"samlp\":{\"mappings\":{\"key\":\"value\"},\"audience\":\"audience\",\"recipient\":\"recipient\",\"createUpnClaim\":true,\"mapUnknownClaimsAsIs\":true,\"passthroughClaimsWithNoMapping\":true,\"mapIdentities\":true,\"signatureAlgorithm\":\"signatureAlgorithm\",\"digestAlgorithm\":\"digestAlgorithm\",\"issuer\":\"issuer\",\"destination\":\"destination\",\"lifetimeInSeconds\":1,\"signResponse\":true,\"nameIdentifierFormat\":\"nameIdentifierFormat\",\"nameIdentifierProbes\":[\"nameIdentifierProbes\"],\"authnContextClassRef\":\"authnContextClassRef\"},\"layer\":{\"providerId\":\"providerId\",\"keyId\":\"keyId\",\"privateKey\":\"privateKey\",\"principal\":\"principal\",\"expiration\":1},\"sap_api\":{\"clientid\":\"clientid\",\"usernameAttribute\":\"usernameAttribute\",\"tokenEndpointUrl\":\"tokenEndpointUrl\",\"scope\":\"scope\",\"servicePassword\":\"servicePassword\",\"nameIdentifierFormat\":\"nameIdentifierFormat\"},\"sharepoint\":{\"url\":\"url\",\"external_url\":[\"external_url\"]},\"springcm\":{\"acsurl\":\"acsurl\"},\"wams\":{\"masterkey\":\"masterkey\"},\"wsfed\":{\"key\":\"value\"},\"zendesk\":{\"accountName\":\"accountName\"},\"zoom\":{\"account\":\"account\"},\"sso_integration\":{\"name\":\"name\",\"version\":\"version\"}},\"token_endpoint_auth_method\":\"none\",\"is_token_endpoint_ip_header_trusted\":true,\"client_metadata\":{\"key\":\"value\"},\"mobile\":{\"android\":{\"app_package_name\":\"app_package_name\",\"sha256_cert_fingerprints\":[\"sha256_cert_fingerprints\"]},\"ios\":{\"team_id\":\"team_id\",\"app_bundle_identifier\":\"app_bundle_identifier\"}},\"initiate_login_uri\":\"initiate_login_uri\",\"refresh_token\":{\"rotation_type\":\"rotating\",\"expiration_type\":\"expiring\",\"leeway\":1,\"token_lifetime\":1,\"infinite_token_lifetime\":true,\"idle_token_lifetime\":1,\"infinite_idle_token_lifetime\":true,\"policies\":[{\"audience\":\"audience\",\"scope\":[\"scope\"]}]},\"default_organization\":{\"organization_id\":\"organization_id\",\"flows\":[\"client_credentials\"]},\"organization_usage\":\"deny\",\"organization_require_behavior\":\"no_prompt\",\"organization_discovery_methods\":[\"email\"],\"client_authentication_methods\":{\"private_key_jwt\":{\"credentials\":[{\"id\":\"id\"}]},\"tls_client_auth\":{\"credentials\":[{\"id\":\"id\"}]},\"self_signed_tls_client_auth\":{\"credentials\":[{\"id\":\"id\"}]}},\"require_pushed_authorization_requests\":true,\"require_proof_of_possession\":true,\"signed_request_object\":{\"required\":true,\"credentials\":[{\"id\":\"id\"}]},\"compliance_level\":\"none\",\"skip_non_verifiable_callback_uri_confirmation_prompt\":true,\"token_exchange\":{\"allow_any_profile_of_type\":[\"custom_authentication\"]},\"par_request_expiry\":1,\"token_quota\":{\"client_credentials\":{\"enforce\":true,\"per_day\":1,\"per_hour\":1}},\"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,\"linked_clients\":[{\"client_id\":\"client_id\"}],\"okta_oin_client_id\":\"okta_oin_client_id\",\"admin_login_domain\":\"admin_login_domain\",\"oin_submission_id\":\"oin_submission_id\"},\"resource_server_identifier\":\"resource_server_identifier\",\"async_approval_notification_channels\":[\"guardian-push\"]}")); - RotateClientSecretResponseContent response = client.clients().rotateSecret("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" - + " \"client_id\": \"client_id\",\n" - + " \"tenant\": \"tenant\",\n" - + " \"name\": \"name\",\n" - + " \"description\": \"description\",\n" - + " \"global\": true,\n" - + " \"client_secret\": \"client_secret\",\n" - + " \"app_type\": \"native\",\n" - + " \"logo_uri\": \"logo_uri\",\n" - + " \"is_first_party\": true,\n" - + " \"oidc_conformant\": true,\n" - + " \"callbacks\": [\n" - + " \"callbacks\"\n" - + " ],\n" - + " \"allowed_origins\": [\n" - + " \"allowed_origins\"\n" - + " ],\n" - + " \"web_origins\": [\n" - + " \"web_origins\"\n" - + " ],\n" - + " \"client_aliases\": [\n" - + " \"client_aliases\"\n" - + " ],\n" - + " \"allowed_clients\": [\n" - + " \"allowed_clients\"\n" - + " ],\n" - + " \"allowed_logout_urls\": [\n" - + " \"allowed_logout_urls\"\n" - + " ],\n" - + " \"session_transfer\": {\n" - + " \"can_create_session_transfer_token\": true,\n" - + " \"enforce_cascade_revocation\": true,\n" - + " \"allowed_authentication_methods\": [\n" - + " \"cookie\"\n" - + " ],\n" - + " \"enforce_device_binding\": \"ip\",\n" - + " \"allow_refresh_token\": true,\n" - + " \"enforce_online_refresh_tokens\": true\n" - + " },\n" - + " \"oidc_logout\": {\n" - + " \"backchannel_logout_urls\": [\n" - + " \"backchannel_logout_urls\"\n" - + " ],\n" - + " \"backchannel_logout_initiators\": {\n" - + " \"mode\": \"custom\",\n" - + " \"selected_initiators\": [\n" - + " \"rp-logout\"\n" - + " ]\n" - + " },\n" - + " \"backchannel_logout_session_metadata\": {\n" - + " \"include\": true\n" - + " }\n" - + " },\n" - + " \"grant_types\": [\n" - + " \"grant_types\"\n" - + " ],\n" - + " \"jwt_configuration\": {\n" - + " \"lifetime_in_seconds\": 1,\n" - + " \"secret_encoded\": true,\n" - + " \"scopes\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"alg\": \"HS256\"\n" - + " },\n" - + " \"signing_keys\": [\n" - + " {\n" - + " \"pkcs7\": \"pkcs7\",\n" - + " \"cert\": \"cert\",\n" - + " \"subject\": \"subject\"\n" - + " }\n" - + " ],\n" - + " \"encryption_key\": {\n" - + " \"pub\": \"pub\",\n" - + " \"cert\": \"cert\",\n" - + " \"subject\": \"subject\"\n" - + " },\n" - + " \"sso\": true,\n" - + " \"sso_disabled\": true,\n" - + " \"cross_origin_authentication\": true,\n" - + " \"cross_origin_loc\": \"cross_origin_loc\",\n" - + " \"custom_login_page_on\": true,\n" - + " \"custom_login_page\": \"custom_login_page\",\n" - + " \"custom_login_page_preview\": \"custom_login_page_preview\",\n" - + " \"form_template\": \"form_template\",\n" - + " \"addons\": {\n" - + " \"aws\": {\n" - + " \"principal\": \"principal\",\n" - + " \"role\": \"role\",\n" - + " \"lifetime_in_seconds\": 1\n" - + " },\n" - + " \"azure_blob\": {\n" - + " \"accountName\": \"accountName\",\n" - + " \"storageAccessKey\": \"storageAccessKey\",\n" - + " \"containerName\": \"containerName\",\n" - + " \"blobName\": \"blobName\",\n" - + " \"expiration\": 1,\n" - + " \"signedIdentifier\": \"signedIdentifier\",\n" - + " \"blob_read\": true,\n" - + " \"blob_write\": true,\n" - + " \"blob_delete\": true,\n" - + " \"container_read\": true,\n" - + " \"container_write\": true,\n" - + " \"container_delete\": true,\n" - + " \"container_list\": true\n" - + " },\n" - + " \"azure_sb\": {\n" - + " \"namespace\": \"namespace\",\n" - + " \"sasKeyName\": \"sasKeyName\",\n" - + " \"sasKey\": \"sasKey\",\n" - + " \"entityPath\": \"entityPath\",\n" - + " \"expiration\": 1\n" - + " },\n" - + " \"rms\": {\n" - + " \"url\": \"url\"\n" - + " },\n" - + " \"mscrm\": {\n" - + " \"url\": \"url\"\n" - + " },\n" - + " \"slack\": {\n" - + " \"team\": \"team\"\n" - + " },\n" - + " \"sentry\": {\n" - + " \"org_slug\": \"org_slug\",\n" - + " \"base_url\": \"base_url\"\n" - + " },\n" - + " \"box\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"cloudbees\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"concur\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"dropbox\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"echosign\": {\n" - + " \"domain\": \"domain\"\n" - + " },\n" - + " \"egnyte\": {\n" - + " \"domain\": \"domain\"\n" - + " },\n" - + " \"firebase\": {\n" - + " \"secret\": \"secret\",\n" - + " \"private_key_id\": \"private_key_id\",\n" - + " \"private_key\": \"private_key\",\n" - + " \"client_email\": \"client_email\",\n" - + " \"lifetime_in_seconds\": 1\n" - + " },\n" - + " \"newrelic\": {\n" - + " \"account\": \"account\"\n" - + " },\n" - + " \"office365\": {\n" - + " \"domain\": \"domain\",\n" - + " \"connection\": \"connection\"\n" - + " },\n" - + " \"salesforce\": {\n" - + " \"entity_id\": \"entity_id\"\n" - + " },\n" - + " \"salesforce_api\": {\n" - + " \"clientid\": \"clientid\",\n" - + " \"principal\": \"principal\",\n" - + " \"communityName\": \"communityName\",\n" - + " \"community_url_section\": \"community_url_section\"\n" - + " },\n" - + " \"salesforce_sandbox_api\": {\n" - + " \"clientid\": \"clientid\",\n" - + " \"principal\": \"principal\",\n" - + " \"communityName\": \"communityName\",\n" - + " \"community_url_section\": \"community_url_section\"\n" - + " },\n" - + " \"samlp\": {\n" - + " \"mappings\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"audience\": \"audience\",\n" - + " \"recipient\": \"recipient\",\n" - + " \"createUpnClaim\": true,\n" - + " \"mapUnknownClaimsAsIs\": true,\n" - + " \"passthroughClaimsWithNoMapping\": true,\n" - + " \"mapIdentities\": true,\n" - + " \"signatureAlgorithm\": \"signatureAlgorithm\",\n" - + " \"digestAlgorithm\": \"digestAlgorithm\",\n" - + " \"issuer\": \"issuer\",\n" - + " \"destination\": \"destination\",\n" - + " \"lifetimeInSeconds\": 1,\n" - + " \"signResponse\": true,\n" - + " \"nameIdentifierFormat\": \"nameIdentifierFormat\",\n" - + " \"nameIdentifierProbes\": [\n" - + " \"nameIdentifierProbes\"\n" - + " ],\n" - + " \"authnContextClassRef\": \"authnContextClassRef\"\n" - + " },\n" - + " \"layer\": {\n" - + " \"providerId\": \"providerId\",\n" - + " \"keyId\": \"keyId\",\n" - + " \"privateKey\": \"privateKey\",\n" - + " \"principal\": \"principal\",\n" - + " \"expiration\": 1\n" - + " },\n" - + " \"sap_api\": {\n" - + " \"clientid\": \"clientid\",\n" - + " \"usernameAttribute\": \"usernameAttribute\",\n" - + " \"tokenEndpointUrl\": \"tokenEndpointUrl\",\n" - + " \"scope\": \"scope\",\n" - + " \"servicePassword\": \"servicePassword\",\n" - + " \"nameIdentifierFormat\": \"nameIdentifierFormat\"\n" - + " },\n" - + " \"sharepoint\": {\n" - + " \"url\": \"url\",\n" - + " \"external_url\": [\n" - + " \"external_url\"\n" - + " ]\n" - + " },\n" - + " \"springcm\": {\n" - + " \"acsurl\": \"acsurl\"\n" - + " },\n" - + " \"wams\": {\n" - + " \"masterkey\": \"masterkey\"\n" - + " },\n" - + " \"wsfed\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"zendesk\": {\n" - + " \"accountName\": \"accountName\"\n" - + " },\n" - + " \"zoom\": {\n" - + " \"account\": \"account\"\n" - + " },\n" - + " \"sso_integration\": {\n" - + " \"name\": \"name\",\n" - + " \"version\": \"version\"\n" - + " }\n" - + " },\n" - + " \"token_endpoint_auth_method\": \"none\",\n" - + " \"is_token_endpoint_ip_header_trusted\": true,\n" - + " \"client_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"mobile\": {\n" - + " \"android\": {\n" - + " \"app_package_name\": \"app_package_name\",\n" - + " \"sha256_cert_fingerprints\": [\n" - + " \"sha256_cert_fingerprints\"\n" - + " ]\n" - + " },\n" - + " \"ios\": {\n" - + " \"team_id\": \"team_id\",\n" - + " \"app_bundle_identifier\": \"app_bundle_identifier\"\n" - + " }\n" - + " },\n" - + " \"initiate_login_uri\": \"initiate_login_uri\",\n" - + " \"refresh_token\": {\n" - + " \"rotation_type\": \"rotating\",\n" - + " \"expiration_type\": \"expiring\",\n" - + " \"leeway\": 1,\n" - + " \"token_lifetime\": 1,\n" - + " \"infinite_token_lifetime\": true,\n" - + " \"idle_token_lifetime\": 1,\n" - + " \"infinite_idle_token_lifetime\": true,\n" - + " \"policies\": [\n" - + " {\n" - + " \"audience\": \"audience\",\n" - + " \"scope\": [\n" - + " \"scope\"\n" - + " ]\n" - + " }\n" - + " ]\n" - + " },\n" - + " \"default_organization\": {\n" - + " \"organization_id\": \"organization_id\",\n" - + " \"flows\": [\n" - + " \"client_credentials\"\n" - + " ]\n" - + " },\n" - + " \"organization_usage\": \"deny\",\n" - + " \"organization_require_behavior\": \"no_prompt\",\n" - + " \"organization_discovery_methods\": [\n" - + " \"email\"\n" - + " ],\n" - + " \"client_authentication_methods\": {\n" - + " \"private_key_jwt\": {\n" - + " \"credentials\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ]\n" - + " },\n" - + " \"tls_client_auth\": {\n" - + " \"credentials\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ]\n" - + " },\n" - + " \"self_signed_tls_client_auth\": {\n" - + " \"credentials\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ]\n" - + " }\n" - + " },\n" - + " \"require_pushed_authorization_requests\": true,\n" - + " \"require_proof_of_possession\": true,\n" - + " \"signed_request_object\": {\n" - + " \"required\": true,\n" - + " \"credentials\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ]\n" - + " },\n" - + " \"compliance_level\": \"none\",\n" - + " \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n" - + " \"token_exchange\": {\n" - + " \"allow_any_profile_of_type\": [\n" - + " \"custom_authentication\"\n" - + " ]\n" - + " },\n" - + " \"par_request_expiry\": 1,\n" - + " \"token_quota\": {\n" - + " \"client_credentials\": {\n" - + " \"enforce\": true,\n" - + " \"per_day\": 1,\n" - + " \"per_hour\": 1\n" - + " }\n" - + " },\n" - + " \"express_configuration\": {\n" - + " \"initiate_login_uri_template\": \"initiate_login_uri_template\",\n" - + " \"user_attribute_profile_id\": \"user_attribute_profile_id\",\n" - + " \"connection_profile_id\": \"connection_profile_id\",\n" - + " \"enable_client\": true,\n" - + " \"enable_organization\": true,\n" - + " \"linked_clients\": [\n" - + " {\n" - + " \"client_id\": \"client_id\"\n" - + " }\n" - + " ],\n" - + " \"okta_oin_client_id\": \"okta_oin_client_id\",\n" - + " \"admin_login_domain\": \"admin_login_domain\",\n" - + " \"oin_submission_id\": \"oin_submission_id\"\n" - + " },\n" - + " \"resource_server_identifier\": \"resource_server_identifier\",\n" - + " \"async_approval_notification_channels\": [\n" - + " \"guardian-push\"\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 || !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/ConnectionProfilesWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionProfilesWireTest.java deleted file mode 100644 index 84794e9db..000000000 --- a/src/test/java/com/auth0/client/mgmt/ConnectionProfilesWireTest.java +++ /dev/null @@ -1,588 +0,0 @@ -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; -import com.auth0.client.mgmt.types.CreateConnectionProfileResponseContent; -import com.auth0.client.mgmt.types.GetConnectionProfileResponseContent; -import com.auth0.client.mgmt.types.GetConnectionProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.ListConnectionProfileRequestParameters; -import com.auth0.client.mgmt.types.ListConnectionProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateConnectionProfileRequestContent; -import com.auth0.client.mgmt.types.UpdateConnectionProfileResponseContent; -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 ConnectionProfilesWireTest { - 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\",\"connection_profiles\":[{\"id\":\"id\",\"name\":\"name\",\"connection_name_prefix_template\":\"connection_name_prefix_template\",\"enabled_features\":[\"scim\"]}]}")); - SyncPagingIterable response = client.connectionProfiles() - .list(ListConnectionProfileRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(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\",\"organization\":{\"show_as_button\":\"none\",\"assign_membership_on_login\":\"none\"},\"connection_name_prefix_template\":\"connection_name_prefix_template\",\"enabled_features\":[\"scim\"],\"strategy_overrides\":{\"pingfederate\":{\"enabled_features\":[\"scim\"]},\"ad\":{\"enabled_features\":[\"scim\"]},\"adfs\":{\"enabled_features\":[\"scim\"]},\"waad\":{\"enabled_features\":[\"scim\"]},\"google-apps\":{\"enabled_features\":[\"scim\"]},\"okta\":{\"enabled_features\":[\"scim\"]},\"oidc\":{\"enabled_features\":[\"scim\"]},\"samlp\":{\"enabled_features\":[\"scim\"]}}}")); - CreateConnectionProfileResponseContent response = client.connectionProfiles() - .create(CreateConnectionProfileRequestContent.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" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"organization\": {\n" - + " \"show_as_button\": \"none\",\n" - + " \"assign_membership_on_login\": \"none\"\n" - + " },\n" - + " \"connection_name_prefix_template\": \"connection_name_prefix_template\",\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ],\n" - + " \"strategy_overrides\": {\n" - + " \"pingfederate\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"ad\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"adfs\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"waad\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"google-apps\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"okta\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"oidc\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"samlp\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\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 testListTemplates() throws Exception { - server.enqueue(new MockResponse() - .setResponseCode(200) - .setBody("{\"connection_profile_templates\":[{\"id\":\"id\",\"display_name\":\"display_name\"}]}")); - ListConnectionProfileTemplateResponseContent response = - client.connectionProfiles().listTemplates(); - 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" - + " \"connection_profile_templates\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"display_name\": \"display_name\"\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 testGetTemplate() throws Exception { - server.enqueue( - 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\"]}}")); - GetConnectionProfileTemplateResponseContent response = - client.connectionProfiles().getTemplate("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" - + " \"display_name\": \"display_name\",\n" - + " \"template\": {\n" - + " \"name\": \"name\",\n" - + " \"organization\": {\n" - + " \"show_as_button\": \"none\",\n" - + " \"assign_membership_on_login\": \"none\"\n" - + " },\n" - + " \"connection_name_prefix_template\": \"connection_name_prefix_template\",\n" - + " \"enabled_features\": [\n" - + " \"scim\"\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 testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"organization\":{\"show_as_button\":\"none\",\"assign_membership_on_login\":\"none\"},\"connection_name_prefix_template\":\"connection_name_prefix_template\",\"enabled_features\":[\"scim\"],\"strategy_overrides\":{\"pingfederate\":{\"enabled_features\":[\"scim\"]},\"ad\":{\"enabled_features\":[\"scim\"]},\"adfs\":{\"enabled_features\":[\"scim\"]},\"waad\":{\"enabled_features\":[\"scim\"]},\"google-apps\":{\"enabled_features\":[\"scim\"]},\"okta\":{\"enabled_features\":[\"scim\"]},\"oidc\":{\"enabled_features\":[\"scim\"]},\"samlp\":{\"enabled_features\":[\"scim\"]}}}")); - GetConnectionProfileResponseContent response = - client.connectionProfiles().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" - + " \"organization\": {\n" - + " \"show_as_button\": \"none\",\n" - + " \"assign_membership_on_login\": \"none\"\n" - + " },\n" - + " \"connection_name_prefix_template\": \"connection_name_prefix_template\",\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ],\n" - + " \"strategy_overrides\": {\n" - + " \"pingfederate\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"ad\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"adfs\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"waad\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"google-apps\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"okta\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"oidc\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"samlp\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\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.connectionProfiles().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\",\"organization\":{\"show_as_button\":\"none\",\"assign_membership_on_login\":\"none\"},\"connection_name_prefix_template\":\"connection_name_prefix_template\",\"enabled_features\":[\"scim\"],\"strategy_overrides\":{\"pingfederate\":{\"enabled_features\":[\"scim\"]},\"ad\":{\"enabled_features\":[\"scim\"]},\"adfs\":{\"enabled_features\":[\"scim\"]},\"waad\":{\"enabled_features\":[\"scim\"]},\"google-apps\":{\"enabled_features\":[\"scim\"]},\"okta\":{\"enabled_features\":[\"scim\"]},\"oidc\":{\"enabled_features\":[\"scim\"]},\"samlp\":{\"enabled_features\":[\"scim\"]}}}")); - UpdateConnectionProfileResponseContent response = client.connectionProfiles() - .update("id", UpdateConnectionProfileRequestContent.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" - + " \"organization\": {\n" - + " \"show_as_button\": \"none\",\n" - + " \"assign_membership_on_login\": \"none\"\n" - + " },\n" - + " \"connection_name_prefix_template\": \"connection_name_prefix_template\",\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ],\n" - + " \"strategy_overrides\": {\n" - + " \"pingfederate\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"ad\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"adfs\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"waad\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"google-apps\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"okta\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"oidc\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\n" - + " },\n" - + " \"samlp\": {\n" - + " \"enabled_features\": [\n" - + " \"scim\"\n" - + " ]\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 || !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/ConnectionsClientsWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsClientsWireTest.java deleted file mode 100644 index 249f7d76e..000000000 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsClientsWireTest.java +++ /dev/null @@ -1,138 +0,0 @@ -package com.auth0.client.mgmt; - -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; -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 ConnectionsClientsWireTest { - 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("{\"clients\":[{\"client_id\":\"client_id\"}],\"next\":\"next\"}")); - SyncPagingIterable response = client.connections() - .clients() - .get( - "id", - GetConnectionEnabledClientsRequestParameters.builder() - .take(OptionalNullable.of(1)) - .from(OptionalNullable.of("from")) - .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 testUpdate() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.connections() - .clients() - .update( - "id", - Arrays.asList(UpdateEnabledClientConnectionsRequestContentItem.builder() - .clientId("client_id") - .status(true) - .build())); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PATCH", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = - "" + "[\n" + " {\n" + " \"client_id\": \"client_id\",\n" + " \"status\": true\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. - * 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 || !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/ConnectionsDirectoryProvisioningSynchronizationsWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningSynchronizationsWireTest.java deleted file mode 100644 index 728122b8b..000000000 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningSynchronizationsWireTest.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.CreateDirectorySynchronizationResponseContent; -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 ConnectionsDirectoryProvisioningSynchronizationsWireTest { - 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 testCreate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"connection_id\":\"connection_id\",\"synchronization_id\":\"synchronization_id\",\"status\":\"status\"}")); - CreateDirectorySynchronizationResponseContent response = - client.connections().directoryProvisioning().synchronizations().create("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" - + " \"connection_id\": \"connection_id\",\n" - + " \"synchronization_id\": \"synchronization_id\",\n" - + " \"status\": \"status\"\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 || !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/ConnectionsDirectoryProvisioningWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java deleted file mode 100644 index 0e4130d23..000000000 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsDirectoryProvisioningWireTest.java +++ /dev/null @@ -1,352 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.connections.types.ListDirectoryProvisioningsRequestParameters; -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.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.UpdateDirectoryProvisioningResponseContent; -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 ConnectionsDirectoryProvisioningWireTest { - 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( - "{\"directory_provisionings\":[{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}],\"next\":\"next\"}")); - SyncPagingIterable response = client.connections() - .directoryProvisioning() - .list(ListDirectoryProvisioningsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(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 testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); - GetDirectoryProvisioningResponseContent response = - client.connections().directoryProvisioning().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" - + " \"connection_id\": \"connection_id\",\n" - + " \"connection_name\": \"connection_name\",\n" - + " \"strategy\": \"strategy\",\n" - + " \"mapping\": [\n" - + " {\n" - + " \"auth0\": \"auth0\",\n" - + " \"idp\": \"idp\"\n" - + " }\n" - + " ],\n" - + " \"synchronize_automatically\": true,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"last_synchronization_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"last_synchronization_status\": \"last_synchronization_status\",\n" - + " \"last_synchronization_error\": \"last_synchronization_error\"\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( - "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); - CreateDirectoryProvisioningResponseContent response = - client.connections().directoryProvisioning().create("id", OptionalNullable.absent()); - 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" - + " \"connection_id\": \"connection_id\",\n" - + " \"connection_name\": \"connection_name\",\n" - + " \"strategy\": \"strategy\",\n" - + " \"mapping\": [\n" - + " {\n" - + " \"auth0\": \"auth0\",\n" - + " \"idp\": \"idp\"\n" - + " }\n" - + " ],\n" - + " \"synchronize_automatically\": true,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"last_synchronization_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"last_synchronization_status\": \"last_synchronization_status\",\n" - + " \"last_synchronization_error\": \"last_synchronization_error\"\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.connections().directoryProvisioning().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( - "{\"connection_id\":\"connection_id\",\"connection_name\":\"connection_name\",\"strategy\":\"strategy\",\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}],\"synchronize_automatically\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_at\":\"2024-01-15T09:30:00Z\",\"last_synchronization_status\":\"last_synchronization_status\",\"last_synchronization_error\":\"last_synchronization_error\"}")); - UpdateDirectoryProvisioningResponseContent response = - client.connections().directoryProvisioning().update("id", OptionalNullable.absent()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PATCH", request.getMethod()); - - // Validate response body - Assertions.assertNotNull(response, "Response should not be null"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"connection_id\": \"connection_id\",\n" - + " \"connection_name\": \"connection_name\",\n" - + " \"strategy\": \"strategy\",\n" - + " \"mapping\": [\n" - + " {\n" - + " \"auth0\": \"auth0\",\n" - + " \"idp\": \"idp\"\n" - + " }\n" - + " ],\n" - + " \"synchronize_automatically\": true,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"last_synchronization_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"last_synchronization_status\": \"last_synchronization_status\",\n" - + " \"last_synchronization_error\": \"last_synchronization_error\"\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 testGetDefaultMapping() throws Exception { - server.enqueue(new MockResponse() - .setResponseCode(200) - .setBody("{\"mapping\":[{\"auth0\":\"auth0\",\"idp\":\"idp\"}]}")); - GetDirectoryProvisioningDefaultMappingResponseContent response = - client.connections().directoryProvisioning().getDefaultMapping("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" - + " \"mapping\": [\n" - + " {\n" - + " \"auth0\": \"auth0\",\n" - + " \"idp\": \"idp\"\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 || !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/ConnectionsKeysWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsKeysWireTest.java deleted file mode 100644 index 0bcb21e88..000000000 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsKeysWireTest.java +++ /dev/null @@ -1,189 +0,0 @@ -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.ConnectionKey; -import com.auth0.client.mgmt.types.RotateConnectionsKeysResponseContent; -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 ConnectionsKeysWireTest { - 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( - "[{\"kid\":\"kid\",\"cert\":\"cert\",\"pkcs\":\"pkcs\",\"current\":true,\"next\":true,\"previous\":true,\"current_since\":\"current_since\",\"fingerprint\":\"fingerprint\",\"thumbprint\":\"thumbprint\",\"algorithm\":\"algorithm\",\"key_use\":\"encryption\",\"subject_dn\":\"subject_dn\"}]")); - List response = client.connections().keys().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" - + " {\n" - + " \"kid\": \"kid\",\n" - + " \"cert\": \"cert\",\n" - + " \"pkcs\": \"pkcs\",\n" - + " \"current\": true,\n" - + " \"next\": true,\n" - + " \"previous\": true,\n" - + " \"current_since\": \"current_since\",\n" - + " \"fingerprint\": \"fingerprint\",\n" - + " \"thumbprint\": \"thumbprint\",\n" - + " \"algorithm\": \"algorithm\",\n" - + " \"key_use\": \"encryption\",\n" - + " \"subject_dn\": \"subject_dn\"\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 testRotate() throws Exception { - server.enqueue( - new MockResponse() - .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()); - 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" - + " \"kid\": \"kid\",\n" - + " \"cert\": \"cert\",\n" - + " \"pkcs\": \"pkcs\",\n" - + " \"next\": true,\n" - + " \"fingerprint\": \"fingerprint\",\n" - + " \"thumbprint\": \"thumbprint\",\n" - + " \"algorithm\": \"algorithm\",\n" - + " \"key_use\": \"encryption\",\n" - + " \"subject_dn\": \"subject_dn\"\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 || !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/ConnectionsScimConfigurationTokensWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsScimConfigurationTokensWireTest.java deleted file mode 100644 index 6b00ca842..000000000 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsScimConfigurationTokensWireTest.java +++ /dev/null @@ -1,223 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.connections.scimconfiguration.types.CreateScimTokenRequestContent; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.CreateScimTokenResponseContent; -import com.auth0.client.mgmt.types.ScimTokenItem; -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 ConnectionsScimConfigurationTokensWireTest { - 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( - "[{\"token_id\":\"token_id\",\"scopes\":[\"scopes\"],\"created_at\":\"created_at\",\"valid_until\":\"valid_until\",\"last_used_at\":\"last_used_at\"}]")); - List response = - client.connections().scimConfiguration().tokens().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" - + " {\n" - + " \"token_id\": \"token_id\",\n" - + " \"scopes\": [\n" - + " \"scopes\"\n" - + " ],\n" - + " \"created_at\": \"created_at\",\n" - + " \"valid_until\": \"valid_until\",\n" - + " \"last_used_at\": \"last_used_at\"\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( - "{\"token_id\":\"token_id\",\"token\":\"token\",\"scopes\":[\"scopes\"],\"created_at\":\"created_at\",\"valid_until\":\"valid_until\"}")); - CreateScimTokenResponseContent response = client.connections() - .scimConfiguration() - .tokens() - .create("id", CreateScimTokenRequestContent.builder().build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", 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" - + " \"token_id\": \"token_id\",\n" - + " \"token\": \"token\",\n" - + " \"scopes\": [\n" - + " \"scopes\"\n" - + " ],\n" - + " \"created_at\": \"created_at\",\n" - + " \"valid_until\": \"valid_until\"\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.connections().scimConfiguration().tokens().delete("id", "tokenId"); - 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 || !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/ConnectionsScimConfigurationWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsScimConfigurationWireTest.java deleted file mode 100644 index d71466634..000000000 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsScimConfigurationWireTest.java +++ /dev/null @@ -1,364 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.connections.types.UpdateScimConfigurationRequestContent; -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -import com.auth0.client.mgmt.types.CreateScimConfigurationResponseContent; -import com.auth0.client.mgmt.types.GetScimConfigurationDefaultMappingResponseContent; -import com.auth0.client.mgmt.types.GetScimConfigurationResponseContent; -import com.auth0.client.mgmt.types.ScimMappingItem; -import com.auth0.client.mgmt.types.UpdateScimConfigurationResponseContent; -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 ConnectionsScimConfigurationWireTest { - 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( - "{\"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\":\"created_at\",\"updated_on\":\"updated_on\"}")); - GetScimConfigurationResponseContent response = - client.connections().scimConfiguration().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" - + " \"connection_id\": \"connection_id\",\n" - + " \"connection_name\": \"connection_name\",\n" - + " \"strategy\": \"strategy\",\n" - + " \"tenant_name\": \"tenant_name\",\n" - + " \"user_id_attribute\": \"user_id_attribute\",\n" - + " \"mapping\": [\n" - + " {\n" - + " \"auth0\": \"auth0\",\n" - + " \"scim\": \"scim\"\n" - + " }\n" - + " ],\n" - + " \"created_at\": \"created_at\",\n" - + " \"updated_on\": \"updated_on\"\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( - "{\"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\":\"created_at\",\"updated_on\":\"updated_on\"}")); - CreateScimConfigurationResponseContent response = - client.connections().scimConfiguration().create("id", OptionalNullable.absent()); - 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" - + " \"connection_id\": \"connection_id\",\n" - + " \"connection_name\": \"connection_name\",\n" - + " \"strategy\": \"strategy\",\n" - + " \"tenant_name\": \"tenant_name\",\n" - + " \"user_id_attribute\": \"user_id_attribute\",\n" - + " \"mapping\": [\n" - + " {\n" - + " \"auth0\": \"auth0\",\n" - + " \"scim\": \"scim\"\n" - + " }\n" - + " ],\n" - + " \"created_at\": \"created_at\",\n" - + " \"updated_on\": \"updated_on\"\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.connections().scimConfiguration().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( - "{\"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\":\"created_at\",\"updated_on\":\"updated_on\"}")); - UpdateScimConfigurationResponseContent response = client.connections() - .scimConfiguration() - .update( - "id", - UpdateScimConfigurationRequestContent.builder() - .userIdAttribute("user_id_attribute") - .mapping(Arrays.asList(ScimMappingItem.builder().build())) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PATCH", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" - + "{\n" - + " \"user_id_attribute\": \"user_id_attribute\",\n" - + " \"mapping\": [\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" - + " \"connection_id\": \"connection_id\",\n" - + " \"connection_name\": \"connection_name\",\n" - + " \"strategy\": \"strategy\",\n" - + " \"tenant_name\": \"tenant_name\",\n" - + " \"user_id_attribute\": \"user_id_attribute\",\n" - + " \"mapping\": [\n" - + " {\n" - + " \"auth0\": \"auth0\",\n" - + " \"scim\": \"scim\"\n" - + " }\n" - + " ],\n" - + " \"created_at\": \"created_at\",\n" - + " \"updated_on\": \"updated_on\"\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 testGetDefaultMapping() throws Exception { - server.enqueue(new MockResponse() - .setResponseCode(200) - .setBody("{\"mapping\":[{\"auth0\":\"auth0\",\"scim\":\"scim\"}]}")); - GetScimConfigurationDefaultMappingResponseContent response = - client.connections().scimConfiguration().getDefaultMapping("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" - + " \"mapping\": [\n" - + " {\n" - + " \"auth0\": \"auth0\",\n" - + " \"scim\": \"scim\"\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 || !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/ConnectionsUsersWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsUsersWireTest.java deleted file mode 100644 index 7451bd971..000000000 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsUsersWireTest.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.connections.types.DeleteConnectionUsersByEmailQueryParameters; -import com.auth0.client.mgmt.core.ObjectMappers; -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 ConnectionsUsersWireTest { - 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 testDeleteByEmail() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.connections() - .users() - .deleteByEmail( - "id", - DeleteConnectionUsersByEmailQueryParameters.builder() - .email("email") - .build()); - 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 || !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/ConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java deleted file mode 100644 index e6bb6919e..000000000 --- a/src/test/java/com/auth0/client/mgmt/ConnectionsWireTest.java +++ /dev/null @@ -1,408 +0,0 @@ -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; -import com.auth0.client.mgmt.types.CreateConnectionRequestContent; -import com.auth0.client.mgmt.types.CreateConnectionResponseContent; -import com.auth0.client.mgmt.types.GetConnectionRequestParameters; -import com.auth0.client.mgmt.types.GetConnectionResponseContent; -import com.auth0.client.mgmt.types.ListConnectionsQueryParameters; -import com.auth0.client.mgmt.types.UpdateConnectionRequestContent; -import com.auth0.client.mgmt.types.UpdateConnectionResponseContent; -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 ConnectionsWireTest { - 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\",\"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}}]}")); - 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)) - .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( - "{\"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}}")); - CreateConnectionResponseContent response = client.connections() - .create(CreateConnectionRequestContent.builder() - .name("name") - .strategy(ConnectionIdentityProviderEnum.AD) - .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" + " \"strategy\": \"ad\"\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" - + " \"name\": \"name\",\n" - + " \"display_name\": \"display_name\",\n" - + " \"options\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"id\": \"id\",\n" - + " \"strategy\": \"strategy\",\n" - + " \"realms\": [\n" - + " \"realms\"\n" - + " ],\n" - + " \"enabled_clients\": [\n" - + " \"enabled_clients\"\n" - + " ],\n" - + " \"is_domain_connection\": true,\n" - + " \"show_as_button\": true,\n" - + " \"metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"authentication\": {\n" - + " \"active\": true\n" - + " },\n" - + " \"connected_accounts\": {\n" - + " \"active\": true,\n" - + " \"cross_app_access\": true\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 testGet() throws Exception { - server.enqueue( - 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}}")); - GetConnectionResponseContent response = client.connections() - .get( - "id", - GetConnectionRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(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"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"name\": \"name\",\n" - + " \"display_name\": \"display_name\",\n" - + " \"options\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"id\": \"id\",\n" - + " \"strategy\": \"strategy\",\n" - + " \"realms\": [\n" - + " \"realms\"\n" - + " ],\n" - + " \"enabled_clients\": [\n" - + " \"enabled_clients\"\n" - + " ],\n" - + " \"is_domain_connection\": true,\n" - + " \"show_as_button\": true,\n" - + " \"metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"authentication\": {\n" - + " \"active\": true\n" - + " },\n" - + " \"connected_accounts\": {\n" - + " \"active\": true,\n" - + " \"cross_app_access\": true\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.connections().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( - "{\"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}}")); - UpdateConnectionResponseContent response = client.connections() - .update("id", UpdateConnectionRequestContent.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" - + " \"name\": \"name\",\n" - + " \"display_name\": \"display_name\",\n" - + " \"options\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"id\": \"id\",\n" - + " \"strategy\": \"strategy\",\n" - + " \"realms\": [\n" - + " \"realms\"\n" - + " ],\n" - + " \"enabled_clients\": [\n" - + " \"enabled_clients\"\n" - + " ],\n" - + " \"is_domain_connection\": true,\n" - + " \"show_as_button\": true,\n" - + " \"metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"authentication\": {\n" - + " \"active\": true\n" - + " },\n" - + " \"connected_accounts\": {\n" - + " \"active\": true,\n" - + " \"cross_app_access\": true\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 testCheckStatus() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.connections().checkStatus("id"); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("GET", 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 || !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/CustomDomainsWireTest.java b/src/test/java/com/auth0/client/mgmt/CustomDomainsWireTest.java deleted file mode 100644 index 5262d0767..000000000 --- a/src/test/java/com/auth0/client/mgmt/CustomDomainsWireTest.java +++ /dev/null @@ -1,591 +0,0 @@ -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; -import com.auth0.client.mgmt.types.CustomDomainProvisioningTypeEnum; -import com.auth0.client.mgmt.types.GetCustomDomainResponseContent; -import com.auth0.client.mgmt.types.ListCustomDomainsRequestParameters; -import com.auth0.client.mgmt.types.TestCustomDomainResponseContent; -import com.auth0.client.mgmt.types.UpdateCustomDomainRequestContent; -import com.auth0.client.mgmt.types.UpdateCustomDomainResponseContent; -import com.auth0.client.mgmt.types.VerifyCustomDomainResponseContent; -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 CustomDomainsWireTest { - 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( - "[{\"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")) - .build()); - 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" - + " \"custom_domain_id\": \"custom_domain_id\",\n" - + " \"domain\": \"domain\",\n" - + " \"primary\": true,\n" - + " \"is_default\": true,\n" - + " \"status\": \"pending_verification\",\n" - + " \"type\": \"auth0_managed_certs\",\n" - + " \"origin_domain_name\": \"origin_domain_name\",\n" - + " \"verification\": {\n" - + " \"methods\": [\n" - + " {\n" - + " \"name\": \"cname\",\n" - + " \"record\": \"record\"\n" - + " }\n" - + " ],\n" - + " \"status\": \"verified\",\n" - + " \"error_msg\": \"error_msg\",\n" - + " \"last_verified_at\": \"last_verified_at\"\n" - + " },\n" - + " \"custom_client_ip_header\": \"custom_client_ip_header\",\n" - + " \"tls_policy\": \"tls_policy\",\n" - + " \"domain_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"certificate\": {\n" - + " \"status\": \"provisioning\",\n" - + " \"error_msg\": \"error_msg\",\n" - + " \"certificate_authority\": \"letsencrypt\",\n" - + " \"renews_before\": \"renews_before\"\n" - + " },\n" - + " \"relying_party_identifier\": \"relying_party_identifier\"\n" - + " }\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( - "{\"custom_domain_id\":\"custom_domain_id\",\"domain\":\"domain\",\"primary\":true,\"is_default\":true,\"status\":\"pending_verification\",\"type\":\"auth0_managed_certs\",\"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\"}")); - CreateCustomDomainResponseContent response = client.customDomains() - .create(CreateCustomDomainRequestContent.builder() - .domain("domain") - .type(CustomDomainProvisioningTypeEnum.AUTH0MANAGED_CERTS) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = - "" + "{\n" + " \"domain\": \"domain\",\n" + " \"type\": \"auth0_managed_certs\"\n" + "}"; - JsonNode actualJson = objectMapper.readTree(actualRequestBody); - JsonNode expectedJson = objectMapper.readTree(expectedRequestBody); - Assertions.assertTrue(jsonEquals(expectedJson, actualJson), "Request body structure does not match expected"); - if (actualJson.has("type") || actualJson.has("_type") || actualJson.has("kind")) { - String discriminator = null; - if (actualJson.has("type")) discriminator = actualJson.get("type").asText(); - else if (actualJson.has("_type")) - discriminator = actualJson.get("_type").asText(); - else if (actualJson.has("kind")) - discriminator = actualJson.get("kind").asText(); - Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); - Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); - } - - if (!actualJson.isNull()) { - Assertions.assertTrue( - actualJson.isObject() || actualJson.isArray() || actualJson.isValueNode(), - "request should be a valid JSON value"); - } - - if (actualJson.isArray()) { - Assertions.assertTrue(actualJson.size() >= 0, "Array should have valid size"); - } - if (actualJson.isObject()) { - Assertions.assertTrue(actualJson.size() >= 0, "Object should have valid field count"); - } - - // Validate response body - Assertions.assertNotNull(response, "Response should not be null"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"custom_domain_id\": \"custom_domain_id\",\n" - + " \"domain\": \"domain\",\n" - + " \"primary\": true,\n" - + " \"is_default\": true,\n" - + " \"status\": \"pending_verification\",\n" - + " \"type\": \"auth0_managed_certs\",\n" - + " \"verification\": {\n" - + " \"methods\": [\n" - + " {\n" - + " \"name\": \"cname\",\n" - + " \"record\": \"record\"\n" - + " }\n" - + " ],\n" - + " \"status\": \"verified\",\n" - + " \"error_msg\": \"error_msg\",\n" - + " \"last_verified_at\": \"last_verified_at\"\n" - + " },\n" - + " \"custom_client_ip_header\": \"custom_client_ip_header\",\n" - + " \"tls_policy\": \"tls_policy\",\n" - + " \"domain_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"certificate\": {\n" - + " \"status\": \"provisioning\",\n" - + " \"error_msg\": \"error_msg\",\n" - + " \"certificate_authority\": \"letsencrypt\",\n" - + " \"renews_before\": \"renews_before\"\n" - + " },\n" - + " \"relying_party_identifier\": \"relying_party_identifier\"\n" - + "}"; - JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); - JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); - Assertions.assertTrue( - jsonEquals(expectedResponseNode, actualResponseNode), - "Response body structure does not match expected"); - if (actualResponseNode.has("type") || actualResponseNode.has("_type") || actualResponseNode.has("kind")) { - String discriminator = null; - if (actualResponseNode.has("type")) - discriminator = actualResponseNode.get("type").asText(); - else if (actualResponseNode.has("_type")) - discriminator = actualResponseNode.get("_type").asText(); - else if (actualResponseNode.has("kind")) - discriminator = actualResponseNode.get("kind").asText(); - Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); - Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); - } - - if (!actualResponseNode.isNull()) { - Assertions.assertTrue( - actualResponseNode.isObject() || actualResponseNode.isArray() || actualResponseNode.isValueNode(), - "response should be a valid JSON value"); - } - - if (actualResponseNode.isArray()) { - Assertions.assertTrue(actualResponseNode.size() >= 0, "Array should have valid size"); - } - if (actualResponseNode.isObject()) { - Assertions.assertTrue(actualResponseNode.size() >= 0, "Object should have valid field count"); - } - } - - @Test - public void testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"custom_domain_id\":\"custom_domain_id\",\"domain\":\"domain\",\"primary\":true,\"is_default\":true,\"status\":\"pending_verification\",\"type\":\"auth0_managed_certs\",\"origin_domain_name\":\"origin_domain_name\",\"verification\":{\"methods\":[{\"name\":\"cname\",\"record\":\"record\"}],\"status\":\"verified\",\"error_msg\":\"error_msg\",\"last_verified_at\":\"last_verified_at\"},\"custom_client_ip_header\":\"custom_client_ip_header\",\"tls_policy\":\"tls_policy\",\"domain_metadata\":{\"key\":\"value\"},\"certificate\":{\"status\":\"provisioning\",\"error_msg\":\"error_msg\",\"certificate_authority\":\"letsencrypt\",\"renews_before\":\"renews_before\"},\"relying_party_identifier\":\"relying_party_identifier\"}")); - GetCustomDomainResponseContent response = client.customDomains().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" - + " \"custom_domain_id\": \"custom_domain_id\",\n" - + " \"domain\": \"domain\",\n" - + " \"primary\": true,\n" - + " \"is_default\": true,\n" - + " \"status\": \"pending_verification\",\n" - + " \"type\": \"auth0_managed_certs\",\n" - + " \"origin_domain_name\": \"origin_domain_name\",\n" - + " \"verification\": {\n" - + " \"methods\": [\n" - + " {\n" - + " \"name\": \"cname\",\n" - + " \"record\": \"record\"\n" - + " }\n" - + " ],\n" - + " \"status\": \"verified\",\n" - + " \"error_msg\": \"error_msg\",\n" - + " \"last_verified_at\": \"last_verified_at\"\n" - + " },\n" - + " \"custom_client_ip_header\": \"custom_client_ip_header\",\n" - + " \"tls_policy\": \"tls_policy\",\n" - + " \"domain_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"certificate\": {\n" - + " \"status\": \"provisioning\",\n" - + " \"error_msg\": \"error_msg\",\n" - + " \"certificate_authority\": \"letsencrypt\",\n" - + " \"renews_before\": \"renews_before\"\n" - + " },\n" - + " \"relying_party_identifier\": \"relying_party_identifier\"\n" - + "}"; - JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); - JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); - Assertions.assertTrue( - jsonEquals(expectedResponseNode, actualResponseNode), - "Response body structure does not match expected"); - if (actualResponseNode.has("type") || actualResponseNode.has("_type") || actualResponseNode.has("kind")) { - String discriminator = null; - if (actualResponseNode.has("type")) - discriminator = actualResponseNode.get("type").asText(); - else if (actualResponseNode.has("_type")) - discriminator = actualResponseNode.get("_type").asText(); - else if (actualResponseNode.has("kind")) - discriminator = actualResponseNode.get("kind").asText(); - Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); - Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); - } - - if (!actualResponseNode.isNull()) { - Assertions.assertTrue( - actualResponseNode.isObject() || actualResponseNode.isArray() || actualResponseNode.isValueNode(), - "response should be a valid JSON value"); - } - - if (actualResponseNode.isArray()) { - Assertions.assertTrue(actualResponseNode.size() >= 0, "Array should have valid size"); - } - if (actualResponseNode.isObject()) { - Assertions.assertTrue(actualResponseNode.size() >= 0, "Object should have valid field count"); - } - } - - @Test - public void testDelete() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.customDomains().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( - "{\"custom_domain_id\":\"custom_domain_id\",\"domain\":\"domain\",\"primary\":true,\"is_default\":true,\"status\":\"pending_verification\",\"type\":\"auth0_managed_certs\",\"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\"}")); - UpdateCustomDomainResponseContent response = client.customDomains() - .update("id", UpdateCustomDomainRequestContent.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" - + " \"custom_domain_id\": \"custom_domain_id\",\n" - + " \"domain\": \"domain\",\n" - + " \"primary\": true,\n" - + " \"is_default\": true,\n" - + " \"status\": \"pending_verification\",\n" - + " \"type\": \"auth0_managed_certs\",\n" - + " \"verification\": {\n" - + " \"methods\": [\n" - + " {\n" - + " \"name\": \"cname\",\n" - + " \"record\": \"record\"\n" - + " }\n" - + " ],\n" - + " \"status\": \"verified\",\n" - + " \"error_msg\": \"error_msg\",\n" - + " \"last_verified_at\": \"last_verified_at\"\n" - + " },\n" - + " \"custom_client_ip_header\": \"custom_client_ip_header\",\n" - + " \"tls_policy\": \"tls_policy\",\n" - + " \"domain_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"certificate\": {\n" - + " \"status\": \"provisioning\",\n" - + " \"error_msg\": \"error_msg\",\n" - + " \"certificate_authority\": \"letsencrypt\",\n" - + " \"renews_before\": \"renews_before\"\n" - + " },\n" - + " \"relying_party_identifier\": \"relying_party_identifier\"\n" - + "}"; - JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); - JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); - Assertions.assertTrue( - jsonEquals(expectedResponseNode, actualResponseNode), - "Response body structure does not match expected"); - if (actualResponseNode.has("type") || actualResponseNode.has("_type") || actualResponseNode.has("kind")) { - String discriminator = null; - if (actualResponseNode.has("type")) - discriminator = actualResponseNode.get("type").asText(); - else if (actualResponseNode.has("_type")) - discriminator = actualResponseNode.get("_type").asText(); - else if (actualResponseNode.has("kind")) - discriminator = actualResponseNode.get("kind").asText(); - Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); - Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); - } - - if (!actualResponseNode.isNull()) { - Assertions.assertTrue( - actualResponseNode.isObject() || actualResponseNode.isArray() || actualResponseNode.isValueNode(), - "response should be a valid JSON value"); - } - - if (actualResponseNode.isArray()) { - Assertions.assertTrue(actualResponseNode.size() >= 0, "Array should have valid size"); - } - if (actualResponseNode.isObject()) { - Assertions.assertTrue(actualResponseNode.size() >= 0, "Object should have valid field count"); - } - } - - @Test - public void testTest() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"success\":true,\"message\":\"message\"}")); - TestCustomDomainResponseContent response = client.customDomains().test("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" + " \"success\": true,\n" + " \"message\": \"message\"\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 testVerify() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"custom_domain_id\":\"custom_domain_id\",\"domain\":\"domain\",\"primary\":true,\"status\":\"pending_verification\",\"type\":\"auth0_managed_certs\",\"cname_api_key\":\"cname_api_key\",\"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\"}}")); - VerifyCustomDomainResponseContent response = client.customDomains().verify("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" - + " \"custom_domain_id\": \"custom_domain_id\",\n" - + " \"domain\": \"domain\",\n" - + " \"primary\": true,\n" - + " \"status\": \"pending_verification\",\n" - + " \"type\": \"auth0_managed_certs\",\n" - + " \"cname_api_key\": \"cname_api_key\",\n" - + " \"origin_domain_name\": \"origin_domain_name\",\n" - + " \"verification\": {\n" - + " \"methods\": [\n" - + " {\n" - + " \"name\": \"cname\",\n" - + " \"record\": \"record\"\n" - + " }\n" - + " ],\n" - + " \"status\": \"verified\",\n" - + " \"error_msg\": \"error_msg\",\n" - + " \"last_verified_at\": \"last_verified_at\"\n" - + " },\n" - + " \"custom_client_ip_header\": \"custom_client_ip_header\",\n" - + " \"tls_policy\": \"tls_policy\",\n" - + " \"domain_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"certificate\": {\n" - + " \"status\": \"provisioning\",\n" - + " \"error_msg\": \"error_msg\",\n" - + " \"certificate_authority\": \"letsencrypt\",\n" - + " \"renews_before\": \"renews_before\"\n" - + " }\n" - + "}"; - 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 || !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/DeviceCredentialsWireTest.java b/src/test/java/com/auth0/client/mgmt/DeviceCredentialsWireTest.java deleted file mode 100644 index c2e0481ca..000000000 --- a/src/test/java/com/auth0/client/mgmt/DeviceCredentialsWireTest.java +++ /dev/null @@ -1,192 +0,0 @@ -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; -import com.auth0.client.mgmt.types.DeviceCredential; -import com.auth0.client.mgmt.types.DeviceCredentialPublicKeyTypeEnum; -import com.auth0.client.mgmt.types.DeviceCredentialTypeEnum; -import com.auth0.client.mgmt.types.ListDeviceCredentialsRequestParameters; -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 DeviceCredentialsWireTest { - 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( - "{\"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)) - .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 testCreatePublicKey() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"id\":\"id\"}")); - CreatePublicKeyDeviceCredentialResponseContent response = client.deviceCredentials() - .createPublicKey(CreatePublicKeyDeviceCredentialRequestContent.builder() - .deviceName("device_name") - .type(DeviceCredentialPublicKeyTypeEnum.PUBLIC_KEY) - .value("value") - .deviceId("device_id") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" - + "{\n" - + " \"device_name\": \"device_name\",\n" - + " \"type\": \"public_key\",\n" - + " \"value\": \"value\",\n" - + " \"device_id\": \"device_id\"\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" + "}"; - 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.deviceCredentials().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 || !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/DynamicTokenManagementTest.java b/src/test/java/com/auth0/client/mgmt/DynamicTokenManagementTest.java deleted file mode 100644 index 6e5bfa613..000000000 --- a/src/test/java/com/auth0/client/mgmt/DynamicTokenManagementTest.java +++ /dev/null @@ -1,380 +0,0 @@ -package com.auth0.client.mgmt; - -import static org.junit.jupiter.api.Assertions.*; - -import com.auth0.client.mgmt.core.ClientOptions; -import com.auth0.client.mgmt.core.Environment; -import com.auth0.client.mgmt.core.RequestOptions; -import java.util.Map; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Supplier; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; - -/** - * Comprehensive tests to verify that Fern-generated Auth0 SDK supports - * dynamic token management using Supplier. - */ -public class DynamicTokenManagementTest { - - @Test - @DisplayName("Verify Supplier is evaluated on each request") - public void testSupplierEvaluatedOnEachRequest() { - // Counter to track supplier evaluations - AtomicInteger evaluationCount = new AtomicInteger(0); - - // Create dynamic token supplier - Supplier tokenSupplier = () -> { - int count = evaluationCount.incrementAndGet(); - return "token-" + count; - }; - - // Build ClientOptions with dynamic header - ClientOptions options = ClientOptions.builder() - .environment(Environment.custom("https://test.auth0.com/api/v2")) - .addHeader("Authorization", () -> "Bearer " + tokenSupplier.get()) - .build(); - - // First request - should evaluate supplier - Map headers1 = options.headers(null); - assertEquals("Bearer token-1", headers1.get("Authorization")); - assertEquals(1, evaluationCount.get()); - - // Second request - should evaluate supplier again - Map headers2 = options.headers(null); - assertEquals("Bearer token-2", headers2.get("Authorization")); - assertEquals(2, evaluationCount.get()); - - // Third request - should evaluate supplier again - Map headers3 = options.headers(null); - assertEquals("Bearer token-3", headers3.get("Authorization")); - assertEquals(3, evaluationCount.get()); - } - - @Test - @DisplayName("Test automatic token refresh on expiry") - public void testAutomaticTokenRefreshOnExpiry() { - // Simulated token storage with expiry - class TokenStore { - private String token; - private long expiryTime; - private int refreshCount = 0; - - synchronized String getToken() { - if (token == null || System.currentTimeMillis() >= expiryTime) { - refreshCount++; - token = "refreshed-token-" + refreshCount; - expiryTime = System.currentTimeMillis() + 1000; // 1 second expiry - } - return token; - } - - int getRefreshCount() { - return refreshCount; - } - } - - TokenStore tokenStore = new TokenStore(); - - // Build ClientOptions with token store - ClientOptions options = ClientOptions.builder() - .environment(Environment.custom("https://test.auth0.com/api/v2")) - .addHeader("Authorization", () -> "Bearer " + tokenStore.getToken()) - .build(); - - // First request - initial token - Map headers1 = options.headers(null); - assertEquals("Bearer refreshed-token-1", headers1.get("Authorization")); - assertEquals(1, tokenStore.getRefreshCount()); - - // Second request immediately - should use cached token - Map headers2 = options.headers(null); - assertEquals("Bearer refreshed-token-1", headers2.get("Authorization")); - assertEquals(1, tokenStore.getRefreshCount()); // No refresh - - // Wait for token to expire - try { - Thread.sleep(1100); // 1.1 seconds - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } - - // Third request after expiry - should refresh - Map headers3 = options.headers(null); - assertEquals("Bearer refreshed-token-2", headers3.get("Authorization")); - assertEquals(2, tokenStore.getRefreshCount()); // Token refreshed - } - - @Test - @DisplayName("Verify static and dynamic headers coexist") - public void testStaticAndDynamicHeadersCoexist() { - AtomicInteger dynamicCounter = new AtomicInteger(0); - - ClientOptions options = ClientOptions.builder() - .environment(Environment.custom("https://test.auth0.com/api/v2")) - .addHeader("X-Static-Header", "static-value") // Static - .addHeader("X-Dynamic-Header", () -> "dynamic-" + dynamicCounter.incrementAndGet()) // Dynamic - .addHeader("X-Another-Static", "another-static") // Static - .build(); - - // First request - Map headers1 = options.headers(null); - assertEquals("static-value", headers1.get("X-Static-Header")); - assertEquals("dynamic-1", headers1.get("X-Dynamic-Header")); - assertEquals("another-static", headers1.get("X-Another-Static")); - - // Second request - static should remain same, dynamic should change - Map headers2 = options.headers(null); - assertEquals("static-value", headers2.get("X-Static-Header")); - assertEquals("dynamic-2", headers2.get("X-Dynamic-Header")); - assertEquals("another-static", headers2.get("X-Another-Static")); - } - - @Test - @DisplayName("Test multiple dynamic headers with different suppliers") - public void testMultipleDynamicHeaders() { - AtomicInteger authCounter = new AtomicInteger(0); - AtomicInteger requestIdCounter = new AtomicInteger(100); - AtomicReference sessionId = new AtomicReference<>("session-initial"); - - ClientOptions options = ClientOptions.builder() - .environment(Environment.custom("https://test.auth0.com/api/v2")) - .addHeader("Authorization", () -> "Bearer token-" + authCounter.incrementAndGet()) - .addHeader("X-Request-ID", () -> "req-" + requestIdCounter.addAndGet(10)) - .addHeader("X-Session-ID", sessionId::get) - .addHeader("X-Timestamp", () -> String.valueOf(System.currentTimeMillis())) - .build(); - - // First request - Map headers1 = options.headers(null); - assertEquals("Bearer token-1", headers1.get("Authorization")); - assertEquals("req-110", headers1.get("X-Request-ID")); - assertEquals("session-initial", headers1.get("X-Session-ID")); - String timestamp1 = headers1.get("X-Timestamp"); - assertNotNull(timestamp1); - - // Update session ID - sessionId.set("session-updated"); - - // Small delay for timestamp - try { - Thread.sleep(10); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } - - // Second request - Map headers2 = options.headers(null); - assertEquals("Bearer token-2", headers2.get("Authorization")); - assertEquals("req-120", headers2.get("X-Request-ID")); - assertEquals("session-updated", headers2.get("X-Session-ID")); - String timestamp2 = headers2.get("X-Timestamp"); - assertNotEquals(timestamp1, timestamp2); - } - - @Test - @DisplayName("Test RequestOptions override dynamic headers") - public void testRequestOptionsOverrideDynamicHeaders() { - AtomicInteger dynamicCounter = new AtomicInteger(0); - - ClientOptions options = ClientOptions.builder() - .environment(Environment.custom("https://test.auth0.com/api/v2")) - .addHeader("Authorization", () -> "Bearer dynamic-" + dynamicCounter.incrementAndGet()) - .addHeader("X-Header", "client-level") - .build(); - - // Request without override - Map headers1 = options.headers(null); - assertEquals("Bearer dynamic-1", headers1.get("Authorization")); - assertEquals("client-level", headers1.get("X-Header")); - - // Request with RequestOptions override - RequestOptions requestOptions = RequestOptions.builder() - .addHeader("Authorization", "Bearer request-override") - .addHeader("X-Header", "request-level") - .addHeader("X-New-Header", "new-value") - .build(); - - Map headers2 = options.headers(requestOptions); - assertEquals("Bearer request-override", headers2.get("Authorization")); // Overridden - assertEquals("request-level", headers2.get("X-Header")); // Overridden - assertEquals("new-value", headers2.get("X-New-Header")); // Added - - // Verify dynamic supplier was still called (even though overridden) - assertEquals(2, dynamicCounter.get()); - } - - @Test - @DisplayName("Test ManagementApi uses dynamic headers") - public void testManagementApiUsesDynamicHeaders() throws Exception { - AtomicInteger tokenVersion = new AtomicInteger(0); - - // Build ManagementApi with dynamic token - ClientOptions clientOptions = ClientOptions.builder() - .environment(Environment.custom("https://test.auth0.com/api/v2")) - .addHeader("Authorization", () -> { - int version = tokenVersion.incrementAndGet(); - return "Bearer dynamic-token-v" + version; - }) - .build(); - ManagementApi api = new ManagementApi(clientOptions); - - // No need for reflection anymore, we have direct access to clientOptions - - // Verify dynamic header is evaluated on each call - Map headers1 = clientOptions.headers(null); - assertEquals("Bearer dynamic-token-v1", headers1.get("Authorization")); - - Map headers2 = clientOptions.headers(null); - assertEquals("Bearer dynamic-token-v2", headers2.get("Authorization")); - - Map headers3 = clientOptions.headers(null); - assertEquals("Bearer dynamic-token-v3", headers3.get("Authorization")); - - assertEquals(3, tokenVersion.get()); - } - - @Test - @DisplayName("Test thread safety of dynamic headers") - public void testThreadSafetyOfDynamicHeaders() throws Exception { - AtomicInteger globalCounter = new AtomicInteger(0); - - ClientOptions options = ClientOptions.builder() - .environment(Environment.custom("https://test.auth0.com/api/v2")) - .addHeader("X-Thread-ID", () -> Thread.currentThread().getName()) - .addHeader("X-Counter", () -> String.valueOf(globalCounter.incrementAndGet())) - .build(); - - // Run multiple threads concurrently - int threadCount = 10; - Thread[] threads = new Thread[threadCount]; - String[] results = new String[threadCount]; - - for (int i = 0; i < threadCount; i++) { - final int index = i; - threads[i] = new Thread( - () -> { - Map headers = options.headers(null); - results[index] = headers.get("X-Thread-ID"); - }, - "TestThread-" + i); - } - - // Start all threads - for (Thread thread : threads) { - thread.start(); - } - - // Wait for all threads to complete - for (Thread thread : threads) { - thread.join(); - } - - // Verify each thread got its own thread name - for (int i = 0; i < threadCount; i++) { - assertEquals("TestThread-" + i, results[i]); - } - - // Verify counter was incremented correctly - assertEquals(threadCount, globalCounter.get()); - } - - @Test - @DisplayName("Test supplier exception handling") - public void testSupplierExceptionHandling() { - AtomicInteger callCount = new AtomicInteger(0); - - ClientOptions options = ClientOptions.builder() - .environment(Environment.custom("https://test.auth0.com/api/v2")) - .addHeader("Authorization", () -> { - int count = callCount.incrementAndGet(); - if (count == 2) { - throw new RuntimeException("Simulated token fetch failure"); - } - return "Bearer token-" + count; - }) - .build(); - - // First call - should work - Map headers1 = options.headers(null); - assertEquals("Bearer token-1", headers1.get("Authorization")); - - // Second call - supplier throws exception - assertThrows(RuntimeException.class, () -> { - options.headers(null); - }); - - // Third call - should work again - Map headers3 = options.headers(null); - assertEquals("Bearer token-3", headers3.get("Authorization")); - - assertEquals(3, callCount.get()); - } - - @Test - @DisplayName("Verify Auth0 real-world scenario: M2M token refresh") - public void testAuth0MachineToMachineTokenRefresh() { - // Simulate Auth0 M2M token management - class Auth0TokenManager { - private String accessToken; - private long expiresAt; - private final String clientId = "test-client-id"; - private final String clientSecret = "test-client-secret"; - private int tokenFetchCount = 0; - - synchronized String getAccessToken() { - if (accessToken == null || System.currentTimeMillis() >= expiresAt) { - // Simulate fetching new M2M token - tokenFetchCount++; - accessToken = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.mock-m2m-token-" + tokenFetchCount; - expiresAt = System.currentTimeMillis() + 86400000; // 24 hours - } - return accessToken; - } - - void expireToken() { - expiresAt = 0; // Force expiry - } - - int getTokenFetchCount() { - return tokenFetchCount; - } - } - - Auth0TokenManager tokenManager = new Auth0TokenManager(); - - // Build ManagementApi with Auth0 token manager - ClientOptions clientOptions = ClientOptions.builder() - .environment(Environment.custom("https://myapp.auth0.com/api/v2")) - .addHeader("Authorization", () -> "Bearer " + tokenManager.getAccessToken()) - .build(); - ManagementApi api = new ManagementApi(clientOptions); - - // Simulate API calls - try { - - // First API call - fetches initial token - Map headers1 = clientOptions.headers(null); - assertTrue(headers1.get("Authorization").startsWith("Bearer eyJhbGciOiJSUzI1NiI")); - assertEquals(1, tokenManager.getTokenFetchCount()); - - // Multiple API calls - reuse same token - for (int i = 0; i < 5; i++) { - Map headers = clientOptions.headers(null); - assertTrue(headers.get("Authorization").contains("mock-m2m-token-1")); - } - assertEquals(1, tokenManager.getTokenFetchCount()); // Still only 1 fetch - - // Expire token - tokenManager.expireToken(); - - // Next API call - fetches new token - Map headersAfterExpiry = clientOptions.headers(null); - assertTrue(headersAfterExpiry.get("Authorization").contains("mock-m2m-token-2")); - assertEquals(2, tokenManager.getTokenFetchCount()); - } catch (Exception e) { - fail("Test failed: " + e.getMessage()); - } - } -} diff --git a/src/test/java/com/auth0/client/mgmt/EmailTemplatesWireTest.java b/src/test/java/com/auth0/client/mgmt/EmailTemplatesWireTest.java deleted file mode 100644 index 591d3e903..000000000 --- a/src/test/java/com/auth0/client/mgmt/EmailTemplatesWireTest.java +++ /dev/null @@ -1,401 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.CreateEmailTemplateRequestContent; -import com.auth0.client.mgmt.types.CreateEmailTemplateResponseContent; -import com.auth0.client.mgmt.types.EmailTemplateNameEnum; -import com.auth0.client.mgmt.types.GetEmailTemplateResponseContent; -import com.auth0.client.mgmt.types.SetEmailTemplateRequestContent; -import com.auth0.client.mgmt.types.SetEmailTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateEmailTemplateRequestContent; -import com.auth0.client.mgmt.types.UpdateEmailTemplateResponseContent; -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 EmailTemplatesWireTest { - 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 testCreate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"template\":\"verify_email\",\"body\":\"body\",\"from\":\"from\",\"resultUrl\":\"resultUrl\",\"subject\":\"subject\",\"syntax\":\"syntax\",\"urlLifetimeInSeconds\":1.1,\"includeEmailInRedirect\":true,\"enabled\":true}")); - CreateEmailTemplateResponseContent response = client.emailTemplates() - .create(CreateEmailTemplateRequestContent.builder() - .template(EmailTemplateNameEnum.VERIFY_EMAIL) - .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" + "}"; - 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" - + " \"template\": \"verify_email\",\n" - + " \"body\": \"body\",\n" - + " \"from\": \"from\",\n" - + " \"resultUrl\": \"resultUrl\",\n" - + " \"subject\": \"subject\",\n" - + " \"syntax\": \"syntax\",\n" - + " \"urlLifetimeInSeconds\": 1.1,\n" - + " \"includeEmailInRedirect\": true,\n" - + " \"enabled\": true\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( - "{\"template\":\"verify_email\",\"body\":\"body\",\"from\":\"from\",\"resultUrl\":\"resultUrl\",\"subject\":\"subject\",\"syntax\":\"syntax\",\"urlLifetimeInSeconds\":1.1,\"includeEmailInRedirect\":true,\"enabled\":true}")); - GetEmailTemplateResponseContent response = client.emailTemplates().get(EmailTemplateNameEnum.VERIFY_EMAIL); - 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" - + " \"template\": \"verify_email\",\n" - + " \"body\": \"body\",\n" - + " \"from\": \"from\",\n" - + " \"resultUrl\": \"resultUrl\",\n" - + " \"subject\": \"subject\",\n" - + " \"syntax\": \"syntax\",\n" - + " \"urlLifetimeInSeconds\": 1.1,\n" - + " \"includeEmailInRedirect\": true,\n" - + " \"enabled\": true\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( - "{\"template\":\"verify_email\",\"body\":\"body\",\"from\":\"from\",\"resultUrl\":\"resultUrl\",\"subject\":\"subject\",\"syntax\":\"syntax\",\"urlLifetimeInSeconds\":1.1,\"includeEmailInRedirect\":true,\"enabled\":true}")); - SetEmailTemplateResponseContent response = client.emailTemplates() - .set( - EmailTemplateNameEnum.VERIFY_EMAIL, - SetEmailTemplateRequestContent.builder() - .template(EmailTemplateNameEnum.VERIFY_EMAIL) - .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" + "}"; - 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" - + " \"template\": \"verify_email\",\n" - + " \"body\": \"body\",\n" - + " \"from\": \"from\",\n" - + " \"resultUrl\": \"resultUrl\",\n" - + " \"subject\": \"subject\",\n" - + " \"syntax\": \"syntax\",\n" - + " \"urlLifetimeInSeconds\": 1.1,\n" - + " \"includeEmailInRedirect\": true,\n" - + " \"enabled\": true\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( - "{\"template\":\"verify_email\",\"body\":\"body\",\"from\":\"from\",\"resultUrl\":\"resultUrl\",\"subject\":\"subject\",\"syntax\":\"syntax\",\"urlLifetimeInSeconds\":1.1,\"includeEmailInRedirect\":true,\"enabled\":true}")); - UpdateEmailTemplateResponseContent response = client.emailTemplates() - .update( - EmailTemplateNameEnum.VERIFY_EMAIL, - UpdateEmailTemplateRequestContent.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" - + " \"template\": \"verify_email\",\n" - + " \"body\": \"body\",\n" - + " \"from\": \"from\",\n" - + " \"resultUrl\": \"resultUrl\",\n" - + " \"subject\": \"subject\",\n" - + " \"syntax\": \"syntax\",\n" - + " \"urlLifetimeInSeconds\": 1.1,\n" - + " \"includeEmailInRedirect\": true,\n" - + " \"enabled\": true\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 || !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/EmailsProviderWireTest.java b/src/test/java/com/auth0/client/mgmt/EmailsProviderWireTest.java deleted file mode 100644 index 15d002af2..000000000 --- a/src/test/java/com/auth0/client/mgmt/EmailsProviderWireTest.java +++ /dev/null @@ -1,346 +0,0 @@ -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; -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 EmailsProviderWireTest { - 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( - "{\"name\":\"name\",\"enabled\":true,\"default_from_address\":\"default_from_address\",\"credentials\":{\"api_user\":\"api_user\",\"region\":\"region\",\"smtp_host\":\"smtp_host\",\"smtp_port\":1,\"smtp_user\":\"smtp_user\"},\"settings\":{\"key\":\"value\"}}")); - GetEmailProviderResponseContent response = client.emails() - .provider() - .get(GetEmailProviderRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(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"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"name\": \"name\",\n" - + " \"enabled\": true,\n" - + " \"default_from_address\": \"default_from_address\",\n" - + " \"credentials\": {\n" - + " \"api_user\": \"api_user\",\n" - + " \"region\": \"region\",\n" - + " \"smtp_host\": \"smtp_host\",\n" - + " \"smtp_port\": 1,\n" - + " \"smtp_user\": \"smtp_user\"\n" - + " },\n" - + " \"settings\": {\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 testCreate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"name\":\"name\",\"enabled\":true,\"default_from_address\":\"default_from_address\",\"credentials\":{\"api_user\":\"api_user\",\"region\":\"region\",\"smtp_host\":\"smtp_host\",\"smtp_port\":1,\"smtp_user\":\"smtp_user\"},\"settings\":{\"key\":\"value\"}}")); - CreateEmailProviderResponseContent response = client.emails() - .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" - + "}"; - 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" - + " \"name\": \"name\",\n" - + " \"enabled\": true,\n" - + " \"default_from_address\": \"default_from_address\",\n" - + " \"credentials\": {\n" - + " \"api_user\": \"api_user\",\n" - + " \"region\": \"region\",\n" - + " \"smtp_host\": \"smtp_host\",\n" - + " \"smtp_port\": 1,\n" - + " \"smtp_user\": \"smtp_user\"\n" - + " },\n" - + " \"settings\": {\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.emails().provider().delete(); - 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( - "{\"name\":\"name\",\"enabled\":true,\"default_from_address\":\"default_from_address\",\"credentials\":{\"api_user\":\"api_user\",\"region\":\"region\",\"smtp_host\":\"smtp_host\",\"smtp_port\":1,\"smtp_user\":\"smtp_user\"},\"settings\":{\"key\":\"value\"}}")); - UpdateEmailProviderResponseContent response = client.emails() - .provider() - .update(UpdateEmailProviderRequestContent.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" - + " \"name\": \"name\",\n" - + " \"enabled\": true,\n" - + " \"default_from_address\": \"default_from_address\",\n" - + " \"credentials\": {\n" - + " \"api_user\": \"api_user\",\n" - + " \"region\": \"region\",\n" - + " \"smtp_host\": \"smtp_host\",\n" - + " \"smtp_port\": 1,\n" - + " \"smtp_user\": \"smtp_user\"\n" - + " },\n" - + " \"settings\": {\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 || !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/EventStreamsDeliveriesWireTest.java b/src/test/java/com/auth0/client/mgmt/EventStreamsDeliveriesWireTest.java deleted file mode 100644 index 60c22b59a..000000000 --- a/src/test/java/com/auth0/client/mgmt/EventStreamsDeliveriesWireTest.java +++ /dev/null @@ -1,217 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.OptionalNullable; -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; -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 EventStreamsDeliveriesWireTest { - 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\",\"event_stream_id\":\"event_stream_id\",\"status\":\"failed\",\"event_type\":\"user.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() - .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)) - .build()); - 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" - + " \"event_stream_id\": \"event_stream_id\",\n" - + " \"status\": \"failed\",\n" - + " \"event_type\": \"user.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"); - } - } - - @Test - public void testGetHistory() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"event_stream_id\":\"event_stream_id\",\"status\":\"failed\",\"event_type\":\"user.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\"}}")); - GetEventStreamDeliveryHistoryResponseContent response = - client.eventStreams().deliveries().getHistory("id", "event_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" - + " \"event_stream_id\": \"event_stream_id\",\n" - + " \"status\": \"failed\",\n" - + " \"event_type\": \"user.created\",\n" - + " \"attempts\": [\n" - + " {\n" - + " \"status\": \"failed\",\n" - + " \"timestamp\": \"2024-01-15T09:30:00Z\",\n" - + " \"error_message\": \"error_message\"\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" - + "}"; - 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 || !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/EventStreamsRedeliveriesWireTest.java b/src/test/java/com/auth0/client/mgmt/EventStreamsRedeliveriesWireTest.java deleted file mode 100644 index 0bcaf1813..000000000 --- a/src/test/java/com/auth0/client/mgmt/EventStreamsRedeliveriesWireTest.java +++ /dev/null @@ -1,164 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.eventstreams.types.CreateEventStreamRedeliveryRequestContent; -import com.auth0.client.mgmt.types.CreateEventStreamRedeliveryResponseContent; -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 EventStreamsRedeliveriesWireTest { - 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 testCreate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"date_from\":\"2024-01-15T09:30:00Z\",\"date_to\":\"2024-01-15T09:30:00Z\",\"statuses\":[\"failed\"],\"event_types\":[\"user.created\"]}")); - CreateEventStreamRedeliveryResponseContent response = client.eventStreams() - .redeliveries() - .create( - "id", - CreateEventStreamRedeliveryRequestContent.builder().build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", 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" - + " \"date_from\": \"2024-01-15T09:30:00Z\",\n" - + " \"date_to\": \"2024-01-15T09:30:00Z\",\n" - + " \"statuses\": [\n" - + " \"failed\"\n" - + " ],\n" - + " \"event_types\": [\n" - + " \"user.created\"\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 testCreateById() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.eventStreams().redeliveries().createById("id", "event_id"); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", 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 || !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/EventStreamsWireTest.java b/src/test/java/com/auth0/client/mgmt/EventStreamsWireTest.java deleted file mode 100644 index a710d3c0c..000000000 --- a/src/test/java/com/auth0/client/mgmt/EventStreamsWireTest.java +++ /dev/null @@ -1,506 +0,0 @@ -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; -import com.auth0.client.mgmt.types.CreateEventStreamTestEventResponseContent; -import com.auth0.client.mgmt.types.CreateEventStreamWebHookRequestContent; -import com.auth0.client.mgmt.types.EventStreamResponseContent; -import com.auth0.client.mgmt.types.EventStreamTestEventTypeEnum; -import com.auth0.client.mgmt.types.EventStreamWebhookAuthorizationResponse; -import com.auth0.client.mgmt.types.EventStreamWebhookBasicAuth; -import com.auth0.client.mgmt.types.EventStreamWebhookBasicAuthMethodEnum; -import com.auth0.client.mgmt.types.EventStreamWebhookConfiguration; -import com.auth0.client.mgmt.types.EventStreamWebhookDestination; -import com.auth0.client.mgmt.types.EventStreamWebhookDestinationTypeEnum; -import com.auth0.client.mgmt.types.EventStreamsCreateRequest; -import com.auth0.client.mgmt.types.GetEventStreamResponseContent; -import com.auth0.client.mgmt.types.ListEventStreamsRequestParameters; -import com.auth0.client.mgmt.types.UpdateEventStreamRequestContent; -import com.auth0.client.mgmt.types.UpdateEventStreamResponseContent; -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 EventStreamsWireTest { - 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( - "{\"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)) - .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\",\"subscriptions\":[{\"event_type\":\"event_type\"}],\"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\"}")); - CreateEventStreamResponseContent response = client.eventStreams() - .create(EventStreamsCreateRequest.of(CreateEventStreamWebHookRequestContent.builder() - .destination(EventStreamWebhookDestination.builder() - .type(EventStreamWebhookDestinationTypeEnum.WEBHOOK) - .configuration(EventStreamWebhookConfiguration.builder() - .webhookEndpoint("webhook_endpoint") - .webhookAuthorization(EventStreamWebhookAuthorizationResponse.of( - EventStreamWebhookBasicAuth.builder() - .method(EventStreamWebhookBasicAuthMethodEnum.BASIC) - .username("username") - .build())) - .build()) - .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" - + " \"destination\": {\n" - + " \"type\": \"webhook\",\n" - + " \"configuration\": {\n" - + " \"webhook_endpoint\": \"webhook_endpoint\",\n" - + " \"webhook_authorization\": {\n" - + " \"method\": \"basic\",\n" - + " \"username\": \"username\"\n" - + " }\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" - + " \"subscriptions\": [\n" - + " {\n" - + " \"event_type\": \"event_type\"\n" - + " }\n" - + " ],\n" - + " \"destination\": {\n" - + " \"type\": \"webhook\",\n" - + " \"configuration\": {\n" - + " \"webhook_endpoint\": \"webhook_endpoint\",\n" - + " \"webhook_authorization\": {\n" - + " \"method\": \"basic\",\n" - + " \"username\": \"username\"\n" - + " }\n" - + " }\n" - + " },\n" - + " \"status\": \"enabled\",\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\",\"subscriptions\":[{\"event_type\":\"event_type\"}],\"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\"}")); - GetEventStreamResponseContent response = client.eventStreams().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" - + " \"subscriptions\": [\n" - + " {\n" - + " \"event_type\": \"event_type\"\n" - + " }\n" - + " ],\n" - + " \"destination\": {\n" - + " \"type\": \"webhook\",\n" - + " \"configuration\": {\n" - + " \"webhook_endpoint\": \"webhook_endpoint\",\n" - + " \"webhook_authorization\": {\n" - + " \"method\": \"basic\",\n" - + " \"username\": \"username\"\n" - + " }\n" - + " }\n" - + " },\n" - + " \"status\": \"enabled\",\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.eventStreams().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\",\"subscriptions\":[{\"event_type\":\"event_type\"}],\"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\"}")); - UpdateEventStreamResponseContent response = client.eventStreams() - .update("id", UpdateEventStreamRequestContent.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" - + " \"subscriptions\": [\n" - + " {\n" - + " \"event_type\": \"event_type\"\n" - + " }\n" - + " ],\n" - + " \"destination\": {\n" - + " \"type\": \"webhook\",\n" - + " \"configuration\": {\n" - + " \"webhook_endpoint\": \"webhook_endpoint\",\n" - + " \"webhook_authorization\": {\n" - + " \"method\": \"basic\",\n" - + " \"username\": \"username\"\n" - + " }\n" - + " }\n" - + " },\n" - + " \"status\": \"enabled\",\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 testTest() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"event_stream_id\":\"event_stream_id\",\"status\":\"failed\",\"event_type\":\"user.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\"}}")); - CreateEventStreamTestEventResponseContent response = client.eventStreams() - .test( - "id", - CreateEventStreamTestEventRequestContent.builder() - .eventType(EventStreamTestEventTypeEnum.USER_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\": \"user.created\"\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" - + " \"event_stream_id\": \"event_stream_id\",\n" - + " \"status\": \"failed\",\n" - + " \"event_type\": \"user.created\",\n" - + " \"attempts\": [\n" - + " {\n" - + " \"status\": \"failed\",\n" - + " \"timestamp\": \"2024-01-15T09:30:00Z\",\n" - + " \"error_message\": \"error_message\"\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" - + "}"; - 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 || !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 deleted file mode 100644 index e1379c3e0..000000000 --- a/src/test/java/com/auth0/client/mgmt/FlowsExecutionsWireTest.java +++ /dev/null @@ -1,168 +0,0 @@ -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; -import com.auth0.client.mgmt.types.FlowExecutionSummary; -import com.auth0.client.mgmt.types.GetFlowExecutionResponseContent; -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 FlowsExecutionsWireTest { - 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\",\"executions\":[{\"id\":\"id\",\"trace_id\":\"trace_id\",\"journey_id\":\"journey_id\",\"status\":\"status\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"started_at\":\"2024-01-15T09:30:00Z\",\"ended_at\":\"2024-01-15T09:30:00Z\"}]}")); - SyncPagingIterable response = client.flows() - .executions() - .list( - "flow_id", - ListFlowExecutionsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(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 testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"trace_id\":\"trace_id\",\"journey_id\":\"journey_id\",\"status\":\"status\",\"debug\":{\"key\":\"value\"},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"started_at\":\"2024-01-15T09:30:00Z\",\"ended_at\":\"2024-01-15T09:30:00Z\"}")); - GetFlowExecutionResponseContent response = client.flows() - .executions() - .get( - "flow_id", - "execution_id", - GetFlowExecutionRequestParameters.builder().build()); - 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" - + " \"trace_id\": \"trace_id\",\n" - + " \"journey_id\": \"journey_id\",\n" - + " \"status\": \"status\",\n" - + " \"debug\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"started_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"ended_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.flows().executions().delete("flow_id", "execution_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 || !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/FlowsVaultConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/FlowsVaultConnectionsWireTest.java deleted file mode 100644 index 8a19b8d9a..000000000 --- a/src/test/java/com/auth0/client/mgmt/FlowsVaultConnectionsWireTest.java +++ /dev/null @@ -1,371 +0,0 @@ -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; -import com.auth0.client.mgmt.types.CreateFlowsVaultConnectionActivecampaign; -import com.auth0.client.mgmt.types.CreateFlowsVaultConnectionActivecampaignApiKey; -import com.auth0.client.mgmt.types.CreateFlowsVaultConnectionRequestContent; -import com.auth0.client.mgmt.types.CreateFlowsVaultConnectionResponseContent; -import com.auth0.client.mgmt.types.FlowsVaultConnectioSetupApiKeyWithBaseUrl; -import com.auth0.client.mgmt.types.FlowsVaultConnectioSetupTypeApiKeyEnum; -import com.auth0.client.mgmt.types.FlowsVaultConnectionAppIdActivecampaignEnum; -import com.auth0.client.mgmt.types.FlowsVaultConnectionSummary; -import com.auth0.client.mgmt.types.GetFlowsVaultConnectionResponseContent; -import com.auth0.client.mgmt.types.UpdateFlowsVaultConnectionResponseContent; -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 FlowsVaultConnectionsWireTest { - 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( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"connections\":[{\"id\":\"id\",\"app_id\":\"app_id\",\"name\":\"name\",\"account_name\":\"account_name\",\"ready\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"refreshed_at\":\"2024-01-15T09:30:00Z\",\"fingerprint\":\"fingerprint\"}]}")); - SyncPagingIterable response = client.flows() - .vault() - .connections() - .list(ListFlowsVaultConnectionsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(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 - } - - @Test - public void testCreate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"app_id\":\"app_id\",\"environment\":\"environment\",\"name\":\"name\",\"account_name\":\"account_name\",\"ready\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"refreshed_at\":\"2024-01-15T09:30:00Z\",\"fingerprint\":\"fingerprint\"}")); - CreateFlowsVaultConnectionResponseContent response = client.flows() - .vault() - .connections() - .create(CreateFlowsVaultConnectionRequestContent.of(CreateFlowsVaultConnectionActivecampaign.of( - CreateFlowsVaultConnectionActivecampaignApiKey.builder() - .name("name") - .appId(FlowsVaultConnectionAppIdActivecampaignEnum.ACTIVECAMPAIGN) - .setup(FlowsVaultConnectioSetupApiKeyWithBaseUrl.builder() - .type(FlowsVaultConnectioSetupTypeApiKeyEnum.API_KEY) - .apiKey("api_key") - .baseUrl("base_url") - .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" - + " \"app_id\": \"ACTIVECAMPAIGN\",\n" - + " \"setup\": {\n" - + " \"type\": \"API_KEY\",\n" - + " \"api_key\": \"api_key\",\n" - + " \"base_url\": \"base_url\"\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" - + " \"app_id\": \"app_id\",\n" - + " \"environment\": \"environment\",\n" - + " \"name\": \"name\",\n" - + " \"account_name\": \"account_name\",\n" - + " \"ready\": true,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"refreshed_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"fingerprint\": \"fingerprint\"\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\",\"app_id\":\"app_id\",\"environment\":\"environment\",\"name\":\"name\",\"account_name\":\"account_name\",\"ready\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"refreshed_at\":\"2024-01-15T09:30:00Z\",\"fingerprint\":\"fingerprint\"}")); - GetFlowsVaultConnectionResponseContent response = - client.flows().vault().connections().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" - + " \"app_id\": \"app_id\",\n" - + " \"environment\": \"environment\",\n" - + " \"name\": \"name\",\n" - + " \"account_name\": \"account_name\",\n" - + " \"ready\": true,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"refreshed_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"fingerprint\": \"fingerprint\"\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.flows().vault().connections().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\",\"app_id\":\"app_id\",\"environment\":\"environment\",\"name\":\"name\",\"account_name\":\"account_name\",\"ready\":true,\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"refreshed_at\":\"2024-01-15T09:30:00Z\",\"fingerprint\":\"fingerprint\"}")); - UpdateFlowsVaultConnectionResponseContent response = client.flows() - .vault() - .connections() - .update("id", UpdateFlowsVaultConnectionRequestContent.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" - + " \"app_id\": \"app_id\",\n" - + " \"environment\": \"environment\",\n" - + " \"name\": \"name\",\n" - + " \"account_name\": \"account_name\",\n" - + " \"ready\": true,\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"refreshed_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"fingerprint\": \"fingerprint\"\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 || !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/FlowsWireTest.java b/src/test/java/com/auth0/client/mgmt/FlowsWireTest.java deleted file mode 100644 index d5a2fa35e..000000000 --- a/src/test/java/com/auth0/client/mgmt/FlowsWireTest.java +++ /dev/null @@ -1,371 +0,0 @@ -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; -import com.auth0.client.mgmt.types.FlowSummary; -import com.auth0.client.mgmt.types.GetFlowRequestParameters; -import com.auth0.client.mgmt.types.GetFlowResponseContent; -import com.auth0.client.mgmt.types.ListFlowsRequestParameters; -import com.auth0.client.mgmt.types.UpdateFlowRequestContent; -import com.auth0.client.mgmt.types.UpdateFlowResponseContent; -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 FlowsWireTest { - 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( - "{\"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)) - .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\",\"actions\":[{\"id\":\"id\",\"alias\":\"alias\",\"type\":\"ACTIVECAMPAIGN\",\"action\":\"LIST_CONTACTS\",\"allow_failure\":true,\"mask_output\":true,\"params\":{\"connection_id\":\"connection_id\",\"email\":\"email\"}}],\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"executed_at\":\"executed_at\"}")); - CreateFlowResponseContent response = client.flows() - .create(CreateFlowRequestContent.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" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"actions\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"alias\": \"alias\",\n" - + " \"type\": \"ACTIVECAMPAIGN\",\n" - + " \"action\": \"LIST_CONTACTS\",\n" - + " \"allow_failure\": true,\n" - + " \"mask_output\": true,\n" - + " \"params\": {\n" - + " \"connection_id\": \"connection_id\",\n" - + " \"email\": \"email\"\n" - + " }\n" - + " }\n" - + " ],\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"executed_at\": \"executed_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\",\"actions\":[{\"id\":\"id\",\"alias\":\"alias\",\"type\":\"ACTIVECAMPAIGN\",\"action\":\"LIST_CONTACTS\",\"allow_failure\":true,\"mask_output\":true,\"params\":{\"connection_id\":\"connection_id\",\"email\":\"email\"}}],\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"executed_at\":\"executed_at\"}")); - GetFlowResponseContent response = - client.flows().get("id", GetFlowRequestParameters.builder().build()); - 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" - + " \"actions\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"alias\": \"alias\",\n" - + " \"type\": \"ACTIVECAMPAIGN\",\n" - + " \"action\": \"LIST_CONTACTS\",\n" - + " \"allow_failure\": true,\n" - + " \"mask_output\": true,\n" - + " \"params\": {\n" - + " \"connection_id\": \"connection_id\",\n" - + " \"email\": \"email\"\n" - + " }\n" - + " }\n" - + " ],\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"executed_at\": \"executed_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.flows().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\",\"actions\":[{\"id\":\"id\",\"alias\":\"alias\",\"type\":\"ACTIVECAMPAIGN\",\"action\":\"LIST_CONTACTS\",\"allow_failure\":true,\"mask_output\":true,\"params\":{\"connection_id\":\"connection_id\",\"email\":\"email\"}}],\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"executed_at\":\"executed_at\"}")); - UpdateFlowResponseContent response = - client.flows().update("id", UpdateFlowRequestContent.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" - + " \"actions\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"alias\": \"alias\",\n" - + " \"type\": \"ACTIVECAMPAIGN\",\n" - + " \"action\": \"LIST_CONTACTS\",\n" - + " \"allow_failure\": true,\n" - + " \"mask_output\": true,\n" - + " \"params\": {\n" - + " \"connection_id\": \"connection_id\",\n" - + " \"email\": \"email\"\n" - + " }\n" - + " }\n" - + " ],\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"executed_at\": \"executed_at\"\n" - + "}"; - JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); - JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); - Assertions.assertTrue( - jsonEquals(expectedResponseNode, actualResponseNode), - "Response body structure does not match expected"); - if (actualResponseNode.has("type") || actualResponseNode.has("_type") || actualResponseNode.has("kind")) { - String discriminator = null; - if (actualResponseNode.has("type")) - discriminator = actualResponseNode.get("type").asText(); - else if (actualResponseNode.has("_type")) - discriminator = actualResponseNode.get("_type").asText(); - else if (actualResponseNode.has("kind")) - discriminator = actualResponseNode.get("kind").asText(); - Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); - Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); - } - - if (!actualResponseNode.isNull()) { - Assertions.assertTrue( - actualResponseNode.isObject() || actualResponseNode.isArray() || actualResponseNode.isValueNode(), - "response should be a valid JSON value"); - } - - if (actualResponseNode.isArray()) { - Assertions.assertTrue(actualResponseNode.size() >= 0, "Array should have valid size"); - } - if (actualResponseNode.isObject()) { - Assertions.assertTrue(actualResponseNode.size() >= 0, "Object should have valid field count"); - } - } - - /** - * Compares two JsonNodes with numeric equivalence and null safety. - * For objects, checks that all fields in 'expected' exist in 'actual' with matching values. - * Allows 'actual' to have extra fields (e.g., default values added during serialization). - */ - private boolean jsonEquals(JsonNode expected, JsonNode actual) { - if (expected == null && actual == null) return true; - if (expected == null || actual == null) return false; - if (expected.equals(actual)) return true; - if (expected.isNumber() && actual.isNumber()) - return Math.abs(expected.doubleValue() - actual.doubleValue()) < 1e-10; - if (expected.isObject() && actual.isObject()) { - java.util.Iterator> iter = expected.fields(); - while (iter.hasNext()) { - java.util.Map.Entry entry = iter.next(); - JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !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/FormsWireTest.java b/src/test/java/com/auth0/client/mgmt/FormsWireTest.java deleted file mode 100644 index d7b66d58c..000000000 --- a/src/test/java/com/auth0/client/mgmt/FormsWireTest.java +++ /dev/null @@ -1,511 +0,0 @@ -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; -import com.auth0.client.mgmt.types.FormSummary; -import com.auth0.client.mgmt.types.GetFormRequestParameters; -import com.auth0.client.mgmt.types.GetFormResponseContent; -import com.auth0.client.mgmt.types.ListFormsRequestParameters; -import com.auth0.client.mgmt.types.UpdateFormRequestContent; -import com.auth0.client.mgmt.types.UpdateFormResponseContent; -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 FormsWireTest { - 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( - "{\"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)) - .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\",\"messages\":{\"errors\":{\"key\":\"value\"},\"custom\":{\"key\":\"value\"}},\"languages\":{\"primary\":\"primary\",\"default\":\"default\"},\"translations\":{\"key\":{\"key\":\"value\"}},\"nodes\":[{\"id\":\"id\",\"type\":\"FLOW\",\"coordinates\":{\"x\":1,\"y\":1},\"alias\":\"alias\",\"config\":{\"flow_id\":\"flow_id\"}}],\"start\":{\"hidden_fields\":[{\"key\":\"key\"}],\"next_node\":\"$ending\",\"coordinates\":{\"x\":1,\"y\":1}},\"ending\":{\"redirection\":{\"delay\":1,\"target\":\"target\"},\"after_submit\":{\"flow_id\":\"flow_id\"},\"coordinates\":{\"x\":1,\"y\":1},\"resume_flow\":true},\"style\":{\"css\":\"css\"},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"embedded_at\":\"embedded_at\",\"submitted_at\":\"submitted_at\"}")); - CreateFormResponseContent response = client.forms() - .create(CreateFormRequestContent.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" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"messages\": {\n" - + " \"errors\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"custom\": {\n" - + " \"key\": \"value\"\n" - + " }\n" - + " },\n" - + " \"languages\": {\n" - + " \"primary\": \"primary\",\n" - + " \"default\": \"default\"\n" - + " },\n" - + " \"translations\": {\n" - + " \"key\": {\n" - + " \"key\": \"value\"\n" - + " }\n" - + " },\n" - + " \"nodes\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"type\": \"FLOW\",\n" - + " \"coordinates\": {\n" - + " \"x\": 1,\n" - + " \"y\": 1\n" - + " },\n" - + " \"alias\": \"alias\",\n" - + " \"config\": {\n" - + " \"flow_id\": \"flow_id\"\n" - + " }\n" - + " }\n" - + " ],\n" - + " \"start\": {\n" - + " \"hidden_fields\": [\n" - + " {\n" - + " \"key\": \"key\"\n" - + " }\n" - + " ],\n" - + " \"next_node\": \"$ending\",\n" - + " \"coordinates\": {\n" - + " \"x\": 1,\n" - + " \"y\": 1\n" - + " }\n" - + " },\n" - + " \"ending\": {\n" - + " \"redirection\": {\n" - + " \"delay\": 1,\n" - + " \"target\": \"target\"\n" - + " },\n" - + " \"after_submit\": {\n" - + " \"flow_id\": \"flow_id\"\n" - + " },\n" - + " \"coordinates\": {\n" - + " \"x\": 1,\n" - + " \"y\": 1\n" - + " },\n" - + " \"resume_flow\": true\n" - + " },\n" - + " \"style\": {\n" - + " \"css\": \"css\"\n" - + " },\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"embedded_at\": \"embedded_at\",\n" - + " \"submitted_at\": \"submitted_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\",\"messages\":{\"errors\":{\"key\":\"value\"},\"custom\":{\"key\":\"value\"}},\"languages\":{\"primary\":\"primary\",\"default\":\"default\"},\"translations\":{\"key\":{\"key\":\"value\"}},\"nodes\":[{\"id\":\"id\",\"type\":\"FLOW\",\"coordinates\":{\"x\":1,\"y\":1},\"alias\":\"alias\",\"config\":{\"flow_id\":\"flow_id\"}}],\"start\":{\"hidden_fields\":[{\"key\":\"key\"}],\"next_node\":\"$ending\",\"coordinates\":{\"x\":1,\"y\":1}},\"ending\":{\"redirection\":{\"delay\":1,\"target\":\"target\"},\"after_submit\":{\"flow_id\":\"flow_id\"},\"coordinates\":{\"x\":1,\"y\":1},\"resume_flow\":true},\"style\":{\"css\":\"css\"},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"embedded_at\":\"embedded_at\",\"submitted_at\":\"submitted_at\"}")); - GetFormResponseContent response = - client.forms().get("id", GetFormRequestParameters.builder().build()); - 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" - + " \"messages\": {\n" - + " \"errors\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"custom\": {\n" - + " \"key\": \"value\"\n" - + " }\n" - + " },\n" - + " \"languages\": {\n" - + " \"primary\": \"primary\",\n" - + " \"default\": \"default\"\n" - + " },\n" - + " \"translations\": {\n" - + " \"key\": {\n" - + " \"key\": \"value\"\n" - + " }\n" - + " },\n" - + " \"nodes\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"type\": \"FLOW\",\n" - + " \"coordinates\": {\n" - + " \"x\": 1,\n" - + " \"y\": 1\n" - + " },\n" - + " \"alias\": \"alias\",\n" - + " \"config\": {\n" - + " \"flow_id\": \"flow_id\"\n" - + " }\n" - + " }\n" - + " ],\n" - + " \"start\": {\n" - + " \"hidden_fields\": [\n" - + " {\n" - + " \"key\": \"key\"\n" - + " }\n" - + " ],\n" - + " \"next_node\": \"$ending\",\n" - + " \"coordinates\": {\n" - + " \"x\": 1,\n" - + " \"y\": 1\n" - + " }\n" - + " },\n" - + " \"ending\": {\n" - + " \"redirection\": {\n" - + " \"delay\": 1,\n" - + " \"target\": \"target\"\n" - + " },\n" - + " \"after_submit\": {\n" - + " \"flow_id\": \"flow_id\"\n" - + " },\n" - + " \"coordinates\": {\n" - + " \"x\": 1,\n" - + " \"y\": 1\n" - + " },\n" - + " \"resume_flow\": true\n" - + " },\n" - + " \"style\": {\n" - + " \"css\": \"css\"\n" - + " },\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"embedded_at\": \"embedded_at\",\n" - + " \"submitted_at\": \"submitted_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.forms().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\",\"messages\":{\"errors\":{\"key\":\"value\"},\"custom\":{\"key\":\"value\"}},\"languages\":{\"primary\":\"primary\",\"default\":\"default\"},\"translations\":{\"key\":{\"key\":\"value\"}},\"nodes\":[{\"id\":\"id\",\"type\":\"FLOW\",\"coordinates\":{\"x\":1,\"y\":1},\"alias\":\"alias\",\"config\":{\"flow_id\":\"flow_id\"}}],\"start\":{\"hidden_fields\":[{\"key\":\"key\"}],\"next_node\":\"$ending\",\"coordinates\":{\"x\":1,\"y\":1}},\"ending\":{\"redirection\":{\"delay\":1,\"target\":\"target\"},\"after_submit\":{\"flow_id\":\"flow_id\"},\"coordinates\":{\"x\":1,\"y\":1},\"resume_flow\":true},\"style\":{\"css\":\"css\"},\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"embedded_at\":\"embedded_at\",\"submitted_at\":\"submitted_at\"}")); - UpdateFormResponseContent response = - client.forms().update("id", UpdateFormRequestContent.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" - + " \"messages\": {\n" - + " \"errors\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"custom\": {\n" - + " \"key\": \"value\"\n" - + " }\n" - + " },\n" - + " \"languages\": {\n" - + " \"primary\": \"primary\",\n" - + " \"default\": \"default\"\n" - + " },\n" - + " \"translations\": {\n" - + " \"key\": {\n" - + " \"key\": \"value\"\n" - + " }\n" - + " },\n" - + " \"nodes\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"type\": \"FLOW\",\n" - + " \"coordinates\": {\n" - + " \"x\": 1,\n" - + " \"y\": 1\n" - + " },\n" - + " \"alias\": \"alias\",\n" - + " \"config\": {\n" - + " \"flow_id\": \"flow_id\"\n" - + " }\n" - + " }\n" - + " ],\n" - + " \"start\": {\n" - + " \"hidden_fields\": [\n" - + " {\n" - + " \"key\": \"key\"\n" - + " }\n" - + " ],\n" - + " \"next_node\": \"$ending\",\n" - + " \"coordinates\": {\n" - + " \"x\": 1,\n" - + " \"y\": 1\n" - + " }\n" - + " },\n" - + " \"ending\": {\n" - + " \"redirection\": {\n" - + " \"delay\": 1,\n" - + " \"target\": \"target\"\n" - + " },\n" - + " \"after_submit\": {\n" - + " \"flow_id\": \"flow_id\"\n" - + " },\n" - + " \"coordinates\": {\n" - + " \"x\": 1,\n" - + " \"y\": 1\n" - + " },\n" - + " \"resume_flow\": true\n" - + " },\n" - + " \"style\": {\n" - + " \"css\": \"css\"\n" - + " },\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"embedded_at\": \"embedded_at\",\n" - + " \"submitted_at\": \"submitted_at\"\n" - + "}"; - JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); - JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); - Assertions.assertTrue( - jsonEquals(expectedResponseNode, actualResponseNode), - "Response body structure does not match expected"); - if (actualResponseNode.has("type") || actualResponseNode.has("_type") || actualResponseNode.has("kind")) { - String discriminator = null; - if (actualResponseNode.has("type")) - discriminator = actualResponseNode.get("type").asText(); - else if (actualResponseNode.has("_type")) - discriminator = actualResponseNode.get("_type").asText(); - else if (actualResponseNode.has("kind")) - discriminator = actualResponseNode.get("kind").asText(); - Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); - Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); - } - - if (!actualResponseNode.isNull()) { - Assertions.assertTrue( - actualResponseNode.isObject() || actualResponseNode.isArray() || actualResponseNode.isValueNode(), - "response should be a valid JSON value"); - } - - if (actualResponseNode.isArray()) { - Assertions.assertTrue(actualResponseNode.size() >= 0, "Array should have valid size"); - } - if (actualResponseNode.isObject()) { - Assertions.assertTrue(actualResponseNode.size() >= 0, "Object should have valid field count"); - } - } - - /** - * Compares two JsonNodes with numeric equivalence and null safety. - * For objects, checks that all fields in 'expected' exist in 'actual' with matching values. - * Allows 'actual' to have extra fields (e.g., default values added during serialization). - */ - private boolean jsonEquals(JsonNode expected, JsonNode actual) { - if (expected == null && actual == null) return true; - if (expected == null || actual == null) return false; - if (expected.equals(actual)) return true; - if (expected.isNumber() && actual.isNumber()) - return Math.abs(expected.doubleValue() - actual.doubleValue()) < 1e-10; - if (expected.isObject() && actual.isObject()) { - java.util.Iterator> iter = expected.fields(); - while (iter.hasNext()) { - java.util.Map.Entry entry = iter.next(); - JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !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/GroupsMembersWireTest.java b/src/test/java/com/auth0/client/mgmt/GroupsMembersWireTest.java deleted file mode 100644 index 42817904b..000000000 --- a/src/test/java/com/auth0/client/mgmt/GroupsMembersWireTest.java +++ /dev/null @@ -1,94 +0,0 @@ -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; -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 GroupsMembersWireTest { - 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( - "{\"members\":[{\"id\":\"id\",\"member_type\":\"user\",\"type\":\"connection\",\"connection_id\":\"connection_id\",\"created_at\":\"2024-01-15T09:30:00Z\"}],\"next\":\"next\"}")); - SyncPagingIterable response = client.groups() - .members() - .get( - "id", - GetGroupMembersRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(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 || !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/GroupsWireTest.java b/src/test/java/com/auth0/client/mgmt/GroupsWireTest.java deleted file mode 100644 index 54cf1e868..000000000 --- a/src/test/java/com/auth0/client/mgmt/GroupsWireTest.java +++ /dev/null @@ -1,153 +0,0 @@ -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; -import com.auth0.client.mgmt.types.ListGroupsRequestParameters; -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 GroupsWireTest { - 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\",\"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")) - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(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 testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"external_id\":\"external_id\",\"connection_id\":\"connection_id\",\"organization_id\":\"organization_id\",\"tenant_name\":\"tenant_name\",\"description\":\"description\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); - GetGroupResponseContent response = client.groups().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" - + " \"external_id\": \"external_id\",\n" - + " \"connection_id\": \"connection_id\",\n" - + " \"organization_id\": \"organization_id\",\n" - + " \"tenant_name\": \"tenant_name\",\n" - + " \"description\": \"description\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\"\n" - + "}"; - 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 || !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/GuardianEnrollmentsWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianEnrollmentsWireTest.java deleted file mode 100644 index 7eafe0eba..000000000 --- a/src/test/java/com/auth0/client/mgmt/GuardianEnrollmentsWireTest.java +++ /dev/null @@ -1,211 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.guardian.types.CreateGuardianEnrollmentTicketRequestContent; -import com.auth0.client.mgmt.types.CreateGuardianEnrollmentTicketResponseContent; -import com.auth0.client.mgmt.types.GetGuardianEnrollmentResponseContent; -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 GuardianEnrollmentsWireTest { - 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 testCreateTicket() throws Exception { - server.enqueue(new MockResponse() - .setResponseCode(200) - .setBody("{\"ticket_id\":\"ticket_id\",\"ticket_url\":\"ticket_url\"}")); - CreateGuardianEnrollmentTicketResponseContent response = client.guardian() - .enrollments() - .createTicket(CreateGuardianEnrollmentTicketRequestContent.builder() - .userId("user_id") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"user_id\": \"user_id\"\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" + " \"ticket_id\": \"ticket_id\",\n" + " \"ticket_url\": \"ticket_url\"\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\",\"status\":\"pending\",\"name\":\"name\",\"identifier\":\"identifier\",\"phone_number\":\"phone_number\",\"enrolled_at\":\"enrolled_at\",\"last_auth\":\"last_auth\"}")); - GetGuardianEnrollmentResponseContent response = - client.guardian().enrollments().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" - + " \"status\": \"pending\",\n" - + " \"name\": \"name\",\n" - + " \"identifier\": \"identifier\",\n" - + " \"phone_number\": \"phone_number\",\n" - + " \"enrolled_at\": \"enrolled_at\",\n" - + " \"last_auth\": \"last_auth\"\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.guardian().enrollments().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 || !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/GuardianFactorsDuoSettingsWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianFactorsDuoSettingsWireTest.java deleted file mode 100644 index ab0252d20..000000000 --- a/src/test/java/com/auth0/client/mgmt/GuardianFactorsDuoSettingsWireTest.java +++ /dev/null @@ -1,273 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.guardian.factors.duo.types.SetGuardianFactorDuoSettingsRequestContent; -import com.auth0.client.mgmt.guardian.factors.duo.types.UpdateGuardianFactorDuoSettingsRequestContent; -import com.auth0.client.mgmt.types.GetGuardianFactorDuoSettingsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorDuoSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateGuardianFactorDuoSettingsResponseContent; -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 GuardianFactorsDuoSettingsWireTest { - 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("{\"ikey\":\"ikey\",\"skey\":\"skey\",\"host\":\"host\"}")); - GetGuardianFactorDuoSettingsResponseContent response = - client.guardian().factors().duo().settings().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" + " \"ikey\": \"ikey\",\n" + " \"skey\": \"skey\",\n" + " \"host\": \"host\"\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("{\"ikey\":\"ikey\",\"skey\":\"skey\",\"host\":\"host\"}")); - SetGuardianFactorDuoSettingsResponseContent response = client.guardian() - .factors() - .duo() - .settings() - .set(SetGuardianFactorDuoSettingsRequestContent.builder().build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", 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" + " \"ikey\": \"ikey\",\n" + " \"skey\": \"skey\",\n" + " \"host\": \"host\"\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("{\"ikey\":\"ikey\",\"skey\":\"skey\",\"host\":\"host\"}")); - UpdateGuardianFactorDuoSettingsResponseContent response = client.guardian() - .factors() - .duo() - .settings() - .update(UpdateGuardianFactorDuoSettingsRequestContent.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" + " \"ikey\": \"ikey\",\n" + " \"skey\": \"skey\",\n" + " \"host\": \"host\"\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 || !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 deleted file mode 100644 index 277b15a37..000000000 --- a/src/test/java/com/auth0/client/mgmt/GuardianFactorsPhoneWireTest.java +++ /dev/null @@ -1,602 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -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.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.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.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 GuardianFactorsPhoneWireTest { - 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 testGetMessageTypes() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"message_types\":[\"sms\"]}")); - GetGuardianFactorPhoneMessageTypesResponseContent response = - client.guardian().factors().phone().getMessageTypes(); - 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" + " \"message_types\": [\n" + " \"sms\"\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 testSetMessageTypes() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"message_types\":[\"sms\"]}")); - SetGuardianFactorPhoneMessageTypesResponseContent response = client.guardian() - .factors() - .phone() - .setMessageTypes(SetGuardianFactorPhoneMessageTypesRequestContent.builder() - .messageTypes(Arrays.asList(GuardianFactorPhoneFactorMessageTypeEnum.SMS)) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"message_types\": [\n" + " \"sms\"\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" + " \"message_types\": [\n" + " \"sms\"\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 testGetTwilioProvider() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"from\":\"from\",\"messaging_service_sid\":\"messaging_service_sid\",\"auth_token\":\"auth_token\",\"sid\":\"sid\"}")); - GetGuardianFactorsProviderPhoneTwilioResponseContent response = - client.guardian().factors().phone().getTwilioProvider(); - 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" - + " \"from\": \"from\",\n" - + " \"messaging_service_sid\": \"messaging_service_sid\",\n" - + " \"auth_token\": \"auth_token\",\n" - + " \"sid\": \"sid\"\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 testSetTwilioProvider() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"from\":\"from\",\"messaging_service_sid\":\"messaging_service_sid\",\"auth_token\":\"auth_token\",\"sid\":\"sid\"}")); - SetGuardianFactorsProviderPhoneTwilioResponseContent response = client.guardian() - .factors() - .phone() - .setTwilioProvider(SetGuardianFactorsProviderPhoneTwilioRequestContent.builder() - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", 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" - + " \"from\": \"from\",\n" - + " \"messaging_service_sid\": \"messaging_service_sid\",\n" - + " \"auth_token\": \"auth_token\",\n" - + " \"sid\": \"sid\"\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 testGetSelectedProvider() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"provider\":\"auth0\"}")); - GetGuardianFactorsProviderPhoneResponseContent response = - client.guardian().factors().phone().getSelectedProvider(); - 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" + " \"provider\": \"auth0\"\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 testSetProvider() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"provider\":\"auth0\"}")); - SetGuardianFactorsProviderPhoneResponseContent response = client.guardian() - .factors() - .phone() - .setProvider(SetGuardianFactorsProviderPhoneRequestContent.builder() - .provider(GuardianFactorsProviderSmsProviderEnum.AUTH0) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"provider\": \"auth0\"\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" + " \"provider\": \"auth0\"\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( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"enrollment_message\":\"enrollment_message\",\"verification_message\":\"verification_message\"}")); - GetGuardianFactorPhoneTemplatesResponseContent response = - client.guardian().factors().phone().getTemplates(); - 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" - + " \"enrollment_message\": \"enrollment_message\",\n" - + " \"verification_message\": \"verification_message\"\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 testSetTemplates() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"enrollment_message\":\"enrollment_message\",\"verification_message\":\"verification_message\"}")); - SetGuardianFactorPhoneTemplatesResponseContent response = client.guardian() - .factors() - .phone() - .setTemplates(SetGuardianFactorPhoneTemplatesRequestContent.builder() - .enrollmentMessage("enrollment_message") - .verificationMessage("verification_message") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" - + "{\n" - + " \"enrollment_message\": \"enrollment_message\",\n" - + " \"verification_message\": \"verification_message\"\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" - + " \"enrollment_message\": \"enrollment_message\",\n" - + " \"verification_message\": \"verification_message\"\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 || !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/GuardianFactorsPushNotificationWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianFactorsPushNotificationWireTest.java deleted file mode 100644 index ae863823d..000000000 --- a/src/test/java/com/auth0/client/mgmt/GuardianFactorsPushNotificationWireTest.java +++ /dev/null @@ -1,941 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationApnsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationFcmRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationFcmv1RequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderPushNotificationSnsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationApnsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationFcmRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent; -import com.auth0.client.mgmt.guardian.factors.types.UpdateGuardianFactorsProviderPushNotificationSnsRequestContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderApnsResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderPushNotificationResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderSnsResponseContent; -import com.auth0.client.mgmt.types.GuardianFactorsProviderPushNotificationProviderDataEnum; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPushNotificationApnsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPushNotificationResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderPushNotificationSnsResponseContent; -import com.auth0.client.mgmt.types.UpdateGuardianFactorsProviderPushNotificationApnsResponseContent; -import com.auth0.client.mgmt.types.UpdateGuardianFactorsProviderPushNotificationSnsResponseContent; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.Map; -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 GuardianFactorsPushNotificationWireTest { - 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 testGetApnsProvider() throws Exception { - server.enqueue(new MockResponse() - .setResponseCode(200) - .setBody("{\"bundle_id\":\"bundle_id\",\"sandbox\":true,\"enabled\":true}")); - GetGuardianFactorsProviderApnsResponseContent response = - client.guardian().factors().pushNotification().getApnsProvider(); - 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" - + " \"bundle_id\": \"bundle_id\",\n" - + " \"sandbox\": true,\n" - + " \"enabled\": true\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 testSetApnsProvider() throws Exception { - server.enqueue( - new MockResponse().setResponseCode(200).setBody("{\"sandbox\":true,\"bundle_id\":\"bundle_id\"}")); - SetGuardianFactorsProviderPushNotificationApnsResponseContent response = client.guardian() - .factors() - .pushNotification() - .setApnsProvider(SetGuardianFactorsProviderPushNotificationApnsRequestContent.builder() - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", 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" + " \"sandbox\": true,\n" + " \"bundle_id\": \"bundle_id\"\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 testUpdateApnsProvider() throws Exception { - server.enqueue( - new MockResponse().setResponseCode(200).setBody("{\"sandbox\":true,\"bundle_id\":\"bundle_id\"}")); - UpdateGuardianFactorsProviderPushNotificationApnsResponseContent response = client.guardian() - .factors() - .pushNotification() - .updateApnsProvider(UpdateGuardianFactorsProviderPushNotificationApnsRequestContent.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" + " \"sandbox\": true,\n" + " \"bundle_id\": \"bundle_id\"\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 testSetFcmProvider() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"key\":\"value\"}")); - Map response = client.guardian() - .factors() - .pushNotification() - .setFcmProvider(SetGuardianFactorsProviderPushNotificationFcmRequestContent.builder() - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", 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" + " \"key\": \"value\"\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 testUpdateFcmProvider() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"key\":\"value\"}")); - Map response = client.guardian() - .factors() - .pushNotification() - .updateFcmProvider(UpdateGuardianFactorsProviderPushNotificationFcmRequestContent.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" + " \"key\": \"value\"\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 testSetFcmv1Provider() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"key\":\"value\"}")); - Map response = client.guardian() - .factors() - .pushNotification() - .setFcmv1Provider(SetGuardianFactorsProviderPushNotificationFcmv1RequestContent.builder() - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", 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" + " \"key\": \"value\"\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 testUpdateFcmv1Provider() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"key\":\"value\"}")); - Map response = client.guardian() - .factors() - .pushNotification() - .updateFcmv1Provider(UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent.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" + " \"key\": \"value\"\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 testGetSnsProvider() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"aws_access_key_id\":\"aws_access_key_id\",\"aws_secret_access_key\":\"aws_secret_access_key\",\"aws_region\":\"aws_region\",\"sns_apns_platform_application_arn\":\"sns_apns_platform_application_arn\",\"sns_gcm_platform_application_arn\":\"sns_gcm_platform_application_arn\"}")); - GetGuardianFactorsProviderSnsResponseContent response = - client.guardian().factors().pushNotification().getSnsProvider(); - 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" - + " \"aws_access_key_id\": \"aws_access_key_id\",\n" - + " \"aws_secret_access_key\": \"aws_secret_access_key\",\n" - + " \"aws_region\": \"aws_region\",\n" - + " \"sns_apns_platform_application_arn\": \"sns_apns_platform_application_arn\",\n" - + " \"sns_gcm_platform_application_arn\": \"sns_gcm_platform_application_arn\"\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 testSetSnsProvider() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"aws_access_key_id\":\"aws_access_key_id\",\"aws_secret_access_key\":\"aws_secret_access_key\",\"aws_region\":\"aws_region\",\"sns_apns_platform_application_arn\":\"sns_apns_platform_application_arn\",\"sns_gcm_platform_application_arn\":\"sns_gcm_platform_application_arn\"}")); - SetGuardianFactorsProviderPushNotificationSnsResponseContent response = client.guardian() - .factors() - .pushNotification() - .setSnsProvider(SetGuardianFactorsProviderPushNotificationSnsRequestContent.builder() - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", 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" - + " \"aws_access_key_id\": \"aws_access_key_id\",\n" - + " \"aws_secret_access_key\": \"aws_secret_access_key\",\n" - + " \"aws_region\": \"aws_region\",\n" - + " \"sns_apns_platform_application_arn\": \"sns_apns_platform_application_arn\",\n" - + " \"sns_gcm_platform_application_arn\": \"sns_gcm_platform_application_arn\"\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 testUpdateSnsProvider() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"aws_access_key_id\":\"aws_access_key_id\",\"aws_secret_access_key\":\"aws_secret_access_key\",\"aws_region\":\"aws_region\",\"sns_apns_platform_application_arn\":\"sns_apns_platform_application_arn\",\"sns_gcm_platform_application_arn\":\"sns_gcm_platform_application_arn\"}")); - UpdateGuardianFactorsProviderPushNotificationSnsResponseContent response = client.guardian() - .factors() - .pushNotification() - .updateSnsProvider(UpdateGuardianFactorsProviderPushNotificationSnsRequestContent.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" - + " \"aws_access_key_id\": \"aws_access_key_id\",\n" - + " \"aws_secret_access_key\": \"aws_secret_access_key\",\n" - + " \"aws_region\": \"aws_region\",\n" - + " \"sns_apns_platform_application_arn\": \"sns_apns_platform_application_arn\",\n" - + " \"sns_gcm_platform_application_arn\": \"sns_gcm_platform_application_arn\"\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 testGetSelectedProvider() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"provider\":\"guardian\"}")); - GetGuardianFactorsProviderPushNotificationResponseContent response = - client.guardian().factors().pushNotification().getSelectedProvider(); - 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" + " \"provider\": \"guardian\"\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 testSetProvider() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"provider\":\"guardian\"}")); - SetGuardianFactorsProviderPushNotificationResponseContent response = client.guardian() - .factors() - .pushNotification() - .setProvider(SetGuardianFactorsProviderPushNotificationRequestContent.builder() - .provider(GuardianFactorsProviderPushNotificationProviderDataEnum.GUARDIAN) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"provider\": \"guardian\"\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" + " \"provider\": \"guardian\"\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 || !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/GuardianFactorsSmsWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianFactorsSmsWireTest.java deleted file mode 100644 index 1ccecc2bd..000000000 --- a/src/test/java/com/auth0/client/mgmt/GuardianFactorsSmsWireTest.java +++ /dev/null @@ -1,476 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorSmsTemplatesRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderSmsRequestContent; -import com.auth0.client.mgmt.guardian.factors.types.SetGuardianFactorsProviderSmsTwilioRequestContent; -import com.auth0.client.mgmt.types.GetGuardianFactorSmsTemplatesResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderSmsResponseContent; -import com.auth0.client.mgmt.types.GetGuardianFactorsProviderSmsTwilioResponseContent; -import com.auth0.client.mgmt.types.GuardianFactorsProviderSmsProviderEnum; -import com.auth0.client.mgmt.types.SetGuardianFactorSmsTemplatesResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsResponseContent; -import com.auth0.client.mgmt.types.SetGuardianFactorsProviderSmsTwilioResponseContent; -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 GuardianFactorsSmsWireTest { - 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 testGetTwilioProvider() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"from\":\"from\",\"messaging_service_sid\":\"messaging_service_sid\",\"auth_token\":\"auth_token\",\"sid\":\"sid\"}")); - GetGuardianFactorsProviderSmsTwilioResponseContent response = - client.guardian().factors().sms().getTwilioProvider(); - 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" - + " \"from\": \"from\",\n" - + " \"messaging_service_sid\": \"messaging_service_sid\",\n" - + " \"auth_token\": \"auth_token\",\n" - + " \"sid\": \"sid\"\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 testSetTwilioProvider() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"from\":\"from\",\"messaging_service_sid\":\"messaging_service_sid\",\"auth_token\":\"auth_token\",\"sid\":\"sid\"}")); - SetGuardianFactorsProviderSmsTwilioResponseContent response = client.guardian() - .factors() - .sms() - .setTwilioProvider(SetGuardianFactorsProviderSmsTwilioRequestContent.builder() - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", 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" - + " \"from\": \"from\",\n" - + " \"messaging_service_sid\": \"messaging_service_sid\",\n" - + " \"auth_token\": \"auth_token\",\n" - + " \"sid\": \"sid\"\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 testGetSelectedProvider() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"provider\":\"auth0\"}")); - GetGuardianFactorsProviderSmsResponseContent response = - client.guardian().factors().sms().getSelectedProvider(); - 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" + " \"provider\": \"auth0\"\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 testSetProvider() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"provider\":\"auth0\"}")); - SetGuardianFactorsProviderSmsResponseContent response = client.guardian() - .factors() - .sms() - .setProvider(SetGuardianFactorsProviderSmsRequestContent.builder() - .provider(GuardianFactorsProviderSmsProviderEnum.AUTH0) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"provider\": \"auth0\"\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" + " \"provider\": \"auth0\"\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( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"enrollment_message\":\"enrollment_message\",\"verification_message\":\"verification_message\"}")); - GetGuardianFactorSmsTemplatesResponseContent response = - client.guardian().factors().sms().getTemplates(); - 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" - + " \"enrollment_message\": \"enrollment_message\",\n" - + " \"verification_message\": \"verification_message\"\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 testSetTemplates() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"enrollment_message\":\"enrollment_message\",\"verification_message\":\"verification_message\"}")); - SetGuardianFactorSmsTemplatesResponseContent response = client.guardian() - .factors() - .sms() - .setTemplates(SetGuardianFactorSmsTemplatesRequestContent.builder() - .enrollmentMessage("enrollment_message") - .verificationMessage("verification_message") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" - + "{\n" - + " \"enrollment_message\": \"enrollment_message\",\n" - + " \"verification_message\": \"verification_message\"\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" - + " \"enrollment_message\": \"enrollment_message\",\n" - + " \"verification_message\": \"verification_message\"\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 || !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/GuardianFactorsWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianFactorsWireTest.java deleted file mode 100644 index f4a996267..000000000 --- a/src/test/java/com/auth0/client/mgmt/GuardianFactorsWireTest.java +++ /dev/null @@ -1,196 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.guardian.types.SetGuardianFactorRequestContent; -import com.auth0.client.mgmt.types.GuardianFactor; -import com.auth0.client.mgmt.types.GuardianFactorNameEnum; -import com.auth0.client.mgmt.types.SetGuardianFactorResponseContent; -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 GuardianFactorsWireTest { - 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("[{\"enabled\":true,\"trial_expired\":true,\"name\":\"push-notification\"}]")); - List response = client.guardian().factors().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" - + " {\n" - + " \"enabled\": true,\n" - + " \"trial_expired\": true,\n" - + " \"name\": \"push-notification\"\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 testSet() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"enabled\":true}")); - SetGuardianFactorResponseContent response = client.guardian() - .factors() - .set( - GuardianFactorNameEnum.PUSH_NOTIFICATION, - SetGuardianFactorRequestContent.builder().enabled(true).build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"enabled\": true\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" + " \"enabled\": true\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 || !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/GuardianPoliciesWireTest.java b/src/test/java/com/auth0/client/mgmt/GuardianPoliciesWireTest.java deleted file mode 100644 index 3f248b3b2..000000000 --- a/src/test/java/com/auth0/client/mgmt/GuardianPoliciesWireTest.java +++ /dev/null @@ -1,181 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.MfaPolicyEnum; -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 GuardianPoliciesWireTest { - 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("[\"all-applications\"]")); - List response = client.guardian().policies().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" + " \"all-applications\"\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("[\"all-applications\"]")); - List response = client.guardian().policies().set(Arrays.asList(MfaPolicyEnum.ALL_APPLICATIONS)); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "[\n" + " \"all-applications\"\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" + " \"all-applications\"\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 || !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/HooksSecretsWireTest.java b/src/test/java/com/auth0/client/mgmt/HooksSecretsWireTest.java deleted file mode 100644 index e20e59e05..000000000 --- a/src/test/java/com/auth0/client/mgmt/HooksSecretsWireTest.java +++ /dev/null @@ -1,231 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -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 HooksSecretsWireTest { - 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("{\"key\":\"value\"}")); - Map response = client.hooks().secrets().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" + " \"key\": \"value\"\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("{}")); - client.hooks().secrets().create("id", new HashMap() { - { - put("key", "value"); - } - }); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"key\": \"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"); - } - } - - @Test - public void testDelete() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.hooks().secrets().delete("id", Arrays.asList("string")); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("DELETE", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "[\n" + " \"string\"\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 testUpdate() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.hooks().secrets().update("id", new HashMap() { - { - put("key", "value"); - } - }); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PATCH", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"key\": \"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"); - } - } - - /** - * 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 || !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 deleted file mode 100644 index a8edd3984..000000000 --- a/src/test/java/com/auth0/client/mgmt/HooksWireTest.java +++ /dev/null @@ -1,354 +0,0 @@ -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; -import com.auth0.client.mgmt.types.GetHookRequestParameters; -import com.auth0.client.mgmt.types.GetHookResponseContent; -import com.auth0.client.mgmt.types.Hook; -import com.auth0.client.mgmt.types.HookTriggerIdEnum; -import com.auth0.client.mgmt.types.ListHooksRequestParameters; -import com.auth0.client.mgmt.types.UpdateHookRequestContent; -import com.auth0.client.mgmt.types.UpdateHookResponseContent; -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 HooksWireTest { - 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( - "{\"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)) - .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( - "{\"triggerId\":\"triggerId\",\"id\":\"id\",\"name\":\"name\",\"enabled\":true,\"script\":\"script\",\"dependencies\":{\"key\":\"value\"}}")); - CreateHookResponseContent response = client.hooks() - .create(CreateHookRequestContent.builder() - .name("name") - .script("script") - .triggerId(HookTriggerIdEnum.CREDENTIALS_EXCHANGE) - .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" - + " \"script\": \"script\",\n" - + " \"triggerId\": \"credentials-exchange\"\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" - + " \"triggerId\": \"triggerId\",\n" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"enabled\": true,\n" - + " \"script\": \"script\",\n" - + " \"dependencies\": {\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 testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .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()); - 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" - + " \"triggerId\": \"triggerId\",\n" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"enabled\": true,\n" - + " \"script\": \"script\",\n" - + " \"dependencies\": {\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.hooks().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( - "{\"triggerId\":\"triggerId\",\"id\":\"id\",\"name\":\"name\",\"enabled\":true,\"script\":\"script\",\"dependencies\":{\"key\":\"value\"}}")); - UpdateHookResponseContent response = - client.hooks().update("id", UpdateHookRequestContent.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" - + " \"triggerId\": \"triggerId\",\n" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"enabled\": true,\n" - + " \"script\": \"script\",\n" - + " \"dependencies\": {\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 || !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/JobsErrorsWireTest.java b/src/test/java/com/auth0/client/mgmt/JobsErrorsWireTest.java deleted file mode 100644 index 8686117d2..000000000 --- a/src/test/java/com/auth0/client/mgmt/JobsErrorsWireTest.java +++ /dev/null @@ -1,118 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.jobs.types.ErrorsGetResponse; -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 JobsErrorsWireTest { - 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("[{\"user\":{\"key\":\"value\"},\"errors\":[{}]}]")); - ErrorsGetResponse response = client.jobs().errors().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" - + " {\n" - + " \"user\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"errors\": [\n" - + " {}\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 || !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/JobsUsersExportsWireTest.java b/src/test/java/com/auth0/client/mgmt/JobsUsersExportsWireTest.java deleted file mode 100644 index 63528b822..000000000 --- a/src/test/java/com/auth0/client/mgmt/JobsUsersExportsWireTest.java +++ /dev/null @@ -1,158 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.jobs.types.CreateExportUsersRequestContent; -import com.auth0.client.mgmt.types.CreateExportUsersResponseContent; -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 JobsUsersExportsWireTest { - 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 testCreate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"status\":\"status\",\"type\":\"type\",\"created_at\":\"created_at\",\"id\":\"id\",\"connection_id\":\"connection_id\",\"format\":\"json\",\"limit\":1,\"fields\":[{\"name\":\"name\",\"export_as\":\"export_as\"}]}")); - CreateExportUsersResponseContent response = client.jobs() - .usersExports() - .create(CreateExportUsersRequestContent.builder().build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", 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" - + " \"status\": \"status\",\n" - + " \"type\": \"type\",\n" - + " \"created_at\": \"created_at\",\n" - + " \"id\": \"id\",\n" - + " \"connection_id\": \"connection_id\",\n" - + " \"format\": \"json\",\n" - + " \"limit\": 1,\n" - + " \"fields\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"export_as\": \"export_as\"\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 || !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/JobsVerificationEmailWireTest.java b/src/test/java/com/auth0/client/mgmt/JobsVerificationEmailWireTest.java deleted file mode 100644 index 7d106a661..000000000 --- a/src/test/java/com/auth0/client/mgmt/JobsVerificationEmailWireTest.java +++ /dev/null @@ -1,149 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.jobs.types.CreateVerificationEmailRequestContent; -import com.auth0.client.mgmt.types.CreateVerificationEmailResponseContent; -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 JobsVerificationEmailWireTest { - 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 testCreate() throws Exception { - server.enqueue(new MockResponse() - .setResponseCode(200) - .setBody("{\"status\":\"status\",\"type\":\"type\",\"created_at\":\"created_at\",\"id\":\"id\"}")); - CreateVerificationEmailResponseContent response = client.jobs() - .verificationEmail() - .create(CreateVerificationEmailRequestContent.builder() - .userId("user_id") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"user_id\": \"user_id\"\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" - + " \"status\": \"status\",\n" - + " \"type\": \"type\",\n" - + " \"created_at\": \"created_at\",\n" - + " \"id\": \"id\"\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 || !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/JobsWireTest.java b/src/test/java/com/auth0/client/mgmt/JobsWireTest.java deleted file mode 100644 index da6f92c3f..000000000 --- a/src/test/java/com/auth0/client/mgmt/JobsWireTest.java +++ /dev/null @@ -1,129 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.GetJobResponseContent; -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 JobsWireTest { - 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( - "{\"status\":\"status\",\"type\":\"type\",\"created_at\":\"created_at\",\"id\":\"id\",\"connection_id\":\"connection_id\",\"location\":\"location\",\"percentage_done\":1,\"time_left_seconds\":1,\"format\":\"json\",\"status_details\":\"status_details\",\"summary\":{\"failed\":1,\"updated\":1,\"inserted\":1,\"total\":1}}")); - GetJobResponseContent response = client.jobs().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" - + " \"status\": \"status\",\n" - + " \"type\": \"type\",\n" - + " \"created_at\": \"created_at\",\n" - + " \"id\": \"id\",\n" - + " \"connection_id\": \"connection_id\",\n" - + " \"location\": \"location\",\n" - + " \"percentage_done\": 1,\n" - + " \"time_left_seconds\": 1,\n" - + " \"format\": \"json\",\n" - + " \"status_details\": \"status_details\",\n" - + " \"summary\": {\n" - + " \"failed\": 1,\n" - + " \"updated\": 1,\n" - + " \"inserted\": 1,\n" - + " \"total\": 1\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 || !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/KeysCustomSigningWireTest.java b/src/test/java/com/auth0/client/mgmt/KeysCustomSigningWireTest.java deleted file mode 100644 index 5708bc252..000000000 --- a/src/test/java/com/auth0/client/mgmt/KeysCustomSigningWireTest.java +++ /dev/null @@ -1,257 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.keys.types.SetCustomSigningKeysRequestContent; -import com.auth0.client.mgmt.types.CustomSigningKeyJwk; -import com.auth0.client.mgmt.types.CustomSigningKeyTypeEnum; -import com.auth0.client.mgmt.types.GetCustomSigningKeysResponseContent; -import com.auth0.client.mgmt.types.SetCustomSigningKeysResponseContent; -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 KeysCustomSigningWireTest { - 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( - "{\"keys\":[{\"kty\":\"EC\",\"kid\":\"kid\",\"use\":\"sig\",\"key_ops\":[\"verify\"],\"alg\":\"RS256\",\"n\":\"n\",\"e\":\"e\",\"crv\":\"P-256\",\"x\":\"x\",\"y\":\"y\",\"x5u\":\"x5u\",\"x5c\":[\"x5c\"],\"x5t\":\"x5t\",\"x5t#S256\":\"x5t#S256\"}]}")); - GetCustomSigningKeysResponseContent response = - client.keys().customSigning().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" - + " \"keys\": [\n" - + " {\n" - + " \"kty\": \"EC\",\n" - + " \"kid\": \"kid\",\n" - + " \"use\": \"sig\",\n" - + " \"key_ops\": [\n" - + " \"verify\"\n" - + " ],\n" - + " \"alg\": \"RS256\",\n" - + " \"n\": \"n\",\n" - + " \"e\": \"e\",\n" - + " \"crv\": \"P-256\",\n" - + " \"x\": \"x\",\n" - + " \"y\": \"y\",\n" - + " \"x5u\": \"x5u\",\n" - + " \"x5c\": [\n" - + " \"x5c\"\n" - + " ],\n" - + " \"x5t\": \"x5t\",\n" - + " \"x5t#S256\": \"x5t#S256\"\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 testSet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"keys\":[{\"kty\":\"EC\",\"kid\":\"kid\",\"use\":\"sig\",\"key_ops\":[\"verify\"],\"alg\":\"RS256\",\"n\":\"n\",\"e\":\"e\",\"crv\":\"P-256\",\"x\":\"x\",\"y\":\"y\",\"x5u\":\"x5u\",\"x5c\":[\"x5c\"],\"x5t\":\"x5t\",\"x5t#S256\":\"x5t#S256\"}]}")); - SetCustomSigningKeysResponseContent response = client.keys() - .customSigning() - .set(SetCustomSigningKeysRequestContent.builder() - .keys(Arrays.asList(CustomSigningKeyJwk.builder() - .kty(CustomSigningKeyTypeEnum.EC) - .build())) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = - "" + "{\n" + " \"keys\": [\n" + " {\n" + " \"kty\": \"EC\"\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" - + " \"keys\": [\n" - + " {\n" - + " \"kty\": \"EC\",\n" - + " \"kid\": \"kid\",\n" - + " \"use\": \"sig\",\n" - + " \"key_ops\": [\n" - + " \"verify\"\n" - + " ],\n" - + " \"alg\": \"RS256\",\n" - + " \"n\": \"n\",\n" - + " \"e\": \"e\",\n" - + " \"crv\": \"P-256\",\n" - + " \"x\": \"x\",\n" - + " \"y\": \"y\",\n" - + " \"x5u\": \"x5u\",\n" - + " \"x5c\": [\n" - + " \"x5c\"\n" - + " ],\n" - + " \"x5t\": \"x5t\",\n" - + " \"x5t#S256\": \"x5t#S256\"\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.keys().customSigning().delete(); - 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 || !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/KeysEncryptionWireTest.java b/src/test/java/com/auth0/client/mgmt/KeysEncryptionWireTest.java deleted file mode 100644 index f3c8c7715..000000000 --- a/src/test/java/com/auth0/client/mgmt/KeysEncryptionWireTest.java +++ /dev/null @@ -1,402 +0,0 @@ -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; -import com.auth0.client.mgmt.keys.types.ListEncryptionKeysRequestParameters; -import com.auth0.client.mgmt.types.CreateEncryptionKeyPublicWrappingResponseContent; -import com.auth0.client.mgmt.types.CreateEncryptionKeyResponseContent; -import com.auth0.client.mgmt.types.CreateEncryptionKeyType; -import com.auth0.client.mgmt.types.EncryptionKey; -import com.auth0.client.mgmt.types.GetEncryptionKeyResponseContent; -import com.auth0.client.mgmt.types.ImportEncryptionKeyResponseContent; -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 KeysEncryptionWireTest { - 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( - "{\"start\":1,\"limit\":1,\"total\":1,\"keys\":[{\"kid\":\"kid\",\"type\":\"customer-provided-root-key\",\"state\":\"pre-activation\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"parent_kid\":\"parent_kid\",\"public_key\":\"public_key\"}]}")); - SyncPagingIterable response = client.keys() - .encryption() - .list(ListEncryptionKeysRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(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 - } - - @Test - public void testCreate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"kid\":\"kid\",\"type\":\"customer-provided-root-key\",\"state\":\"pre-activation\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"parent_kid\":\"parent_kid\",\"public_key\":\"public_key\"}")); - CreateEncryptionKeyResponseContent response = client.keys() - .encryption() - .create(CreateEncryptionKeyRequestContent.builder() - .type(CreateEncryptionKeyType.CUSTOMER_PROVIDED_ROOT_KEY) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"type\": \"customer-provided-root-key\"\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" - + " \"kid\": \"kid\",\n" - + " \"type\": \"customer-provided-root-key\",\n" - + " \"state\": \"pre-activation\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"parent_kid\": \"parent_kid\",\n" - + " \"public_key\": \"public_key\"\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 testRekey() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.keys().encryption().rekey(); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - } - - @Test - public void testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"kid\":\"kid\",\"type\":\"customer-provided-root-key\",\"state\":\"pre-activation\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"parent_kid\":\"parent_kid\",\"public_key\":\"public_key\"}")); - GetEncryptionKeyResponseContent response = client.keys().encryption().get("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" - + " \"type\": \"customer-provided-root-key\",\n" - + " \"state\": \"pre-activation\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"parent_kid\": \"parent_kid\",\n" - + " \"public_key\": \"public_key\"\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 testImport() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"kid\":\"kid\",\"type\":\"customer-provided-root-key\",\"state\":\"pre-activation\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"parent_kid\":\"parent_kid\",\"public_key\":\"public_key\"}")); - ImportEncryptionKeyResponseContent response = client.keys() - .encryption() - .import_( - "kid", - ImportEncryptionKeyRequestContent.builder() - .wrappedKey("wrapped_key") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"wrapped_key\": \"wrapped_key\"\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" - + " \"kid\": \"kid\",\n" - + " \"type\": \"customer-provided-root-key\",\n" - + " \"state\": \"pre-activation\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"parent_kid\": \"parent_kid\",\n" - + " \"public_key\": \"public_key\"\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().encryption().delete("kid"); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("DELETE", request.getMethod()); - } - - @Test - public void testCreatePublicWrappingKey() throws Exception { - server.enqueue(new MockResponse() - .setResponseCode(200) - .setBody("{\"public_key\":\"public_key\",\"algorithm\":\"CKM_RSA_AES_KEY_WRAP\"}")); - CreateEncryptionKeyPublicWrappingResponseContent response = - client.keys().encryption().createPublicWrappingKey("kid"); - 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" - + " \"public_key\": \"public_key\",\n" - + " \"algorithm\": \"CKM_RSA_AES_KEY_WRAP\"\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 || !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/KeysSigningWireTest.java b/src/test/java/com/auth0/client/mgmt/KeysSigningWireTest.java deleted file mode 100644 index 0e9ae009f..000000000 --- a/src/test/java/com/auth0/client/mgmt/KeysSigningWireTest.java +++ /dev/null @@ -1,278 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.GetSigningKeysResponseContent; -import com.auth0.client.mgmt.types.RevokedSigningKeysResponseContent; -import com.auth0.client.mgmt.types.RotateSigningKeysResponseContent; -import com.auth0.client.mgmt.types.SigningKeys; -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 KeysSigningWireTest { - 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( - "[{\"kid\":\"kid\",\"cert\":\"cert\",\"pkcs7\":\"pkcs7\",\"current\":true,\"next\":true,\"previous\":true,\"current_since\":\"current_since\",\"current_until\":\"current_until\",\"fingerprint\":\"fingerprint\",\"thumbprint\":\"thumbprint\",\"revoked\":true,\"revoked_at\":\"revoked_at\"}]")); - List response = client.keys().signing().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" - + " {\n" - + " \"kid\": \"kid\",\n" - + " \"cert\": \"cert\",\n" - + " \"pkcs7\": \"pkcs7\",\n" - + " \"current\": true,\n" - + " \"next\": true,\n" - + " \"previous\": true,\n" - + " \"current_since\": \"current_since\",\n" - + " \"current_until\": \"current_until\",\n" - + " \"fingerprint\": \"fingerprint\",\n" - + " \"thumbprint\": \"thumbprint\",\n" - + " \"revoked\": true,\n" - + " \"revoked_at\": \"revoked_at\"\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 testRotate() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"cert\":\"cert\",\"kid\":\"kid\"}")); - RotateSigningKeysResponseContent response = client.keys().signing().rotate(); - 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" + " \"cert\": \"cert\",\n" + " \"kid\": \"kid\"\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( - "{\"kid\":\"kid\",\"cert\":\"cert\",\"pkcs7\":\"pkcs7\",\"current\":true,\"next\":true,\"previous\":true,\"current_since\":\"current_since\",\"current_until\":\"current_until\",\"fingerprint\":\"fingerprint\",\"thumbprint\":\"thumbprint\",\"revoked\":true,\"revoked_at\":\"revoked_at\"}")); - GetSigningKeysResponseContent response = client.keys().signing().get("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" - + " \"cert\": \"cert\",\n" - + " \"pkcs7\": \"pkcs7\",\n" - + " \"current\": true,\n" - + " \"next\": true,\n" - + " \"previous\": true,\n" - + " \"current_since\": \"current_since\",\n" - + " \"current_until\": \"current_until\",\n" - + " \"fingerprint\": \"fingerprint\",\n" - + " \"thumbprint\": \"thumbprint\",\n" - + " \"revoked\": true,\n" - + " \"revoked_at\": \"revoked_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 testRevoke() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"cert\":\"cert\",\"kid\":\"kid\"}")); - RevokedSigningKeysResponseContent response = client.keys().signing().revoke("kid"); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - - // Validate response body - Assertions.assertNotNull(response, "Response should not be null"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" + "{\n" + " \"cert\": \"cert\",\n" + " \"kid\": \"kid\"\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 || !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/LogStreamsWireTest.java b/src/test/java/com/auth0/client/mgmt/LogStreamsWireTest.java deleted file mode 100644 index 2d8f22ef7..000000000 --- a/src/test/java/com/auth0/client/mgmt/LogStreamsWireTest.java +++ /dev/null @@ -1,456 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.CreateLogStreamHttpRequestBody; -import com.auth0.client.mgmt.types.CreateLogStreamRequestContent; -import com.auth0.client.mgmt.types.CreateLogStreamResponseContent; -import com.auth0.client.mgmt.types.GetLogStreamResponseContent; -import com.auth0.client.mgmt.types.LogStreamHttpEnum; -import com.auth0.client.mgmt.types.LogStreamHttpSink; -import com.auth0.client.mgmt.types.LogStreamResponseSchema; -import com.auth0.client.mgmt.types.UpdateLogStreamRequestContent; -import com.auth0.client.mgmt.types.UpdateLogStreamResponseContent; -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 LogStreamsWireTest { - 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\",\"name\":\"name\",\"status\":\"active\",\"type\":\"http\",\"isPriority\":true,\"filters\":[{}],\"pii_config\":{\"log_fields\":[\"first_name\"],\"method\":\"mask\",\"algorithm\":\"xxhash\"},\"sink\":{\"httpAuthorization\":\"httpAuthorization\",\"httpContentFormat\":\"JSONARRAY\",\"httpContentType\":\"httpContentType\",\"httpEndpoint\":\"httpEndpoint\",\"httpCustomHeaders\":[{}]}}]")); - List response = client.logStreams().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" - + " {\n" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"status\": \"active\",\n" - + " \"type\": \"http\",\n" - + " \"isPriority\": true,\n" - + " \"filters\": [\n" - + " {}\n" - + " ],\n" - + " \"pii_config\": {\n" - + " \"log_fields\": [\n" - + " \"first_name\"\n" - + " ],\n" - + " \"method\": \"mask\",\n" - + " \"algorithm\": \"xxhash\"\n" - + " },\n" - + " \"sink\": {\n" - + " \"httpAuthorization\": \"httpAuthorization\",\n" - + " \"httpContentFormat\": \"JSONARRAY\",\n" - + " \"httpContentType\": \"httpContentType\",\n" - + " \"httpEndpoint\": \"httpEndpoint\",\n" - + " \"httpCustomHeaders\": [\n" - + " {}\n" - + " ]\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\",\"status\":\"active\",\"type\":\"http\",\"isPriority\":true,\"filters\":[{\"type\":\"category\",\"name\":\"auth.login.fail\"}],\"pii_config\":{\"log_fields\":[\"first_name\"],\"method\":\"mask\",\"algorithm\":\"xxhash\"},\"sink\":{\"httpAuthorization\":\"httpAuthorization\",\"httpContentFormat\":\"JSONARRAY\",\"httpContentType\":\"httpContentType\",\"httpEndpoint\":\"httpEndpoint\",\"httpCustomHeaders\":[{}]}}")); - CreateLogStreamResponseContent response = client.logStreams() - .create(CreateLogStreamRequestContent.of(CreateLogStreamHttpRequestBody.builder() - .type(LogStreamHttpEnum.HTTP) - .sink(LogStreamHttpSink.builder() - .httpEndpoint("httpEndpoint") - .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" - + " \"type\": \"http\",\n" - + " \"sink\": {\n" - + " \"httpEndpoint\": \"httpEndpoint\"\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" - + " \"status\": \"active\",\n" - + " \"type\": \"http\",\n" - + " \"isPriority\": true,\n" - + " \"filters\": [\n" - + " {\n" - + " \"type\": \"category\",\n" - + " \"name\": \"auth.login.fail\"\n" - + " }\n" - + " ],\n" - + " \"pii_config\": {\n" - + " \"log_fields\": [\n" - + " \"first_name\"\n" - + " ],\n" - + " \"method\": \"mask\",\n" - + " \"algorithm\": \"xxhash\"\n" - + " },\n" - + " \"sink\": {\n" - + " \"httpAuthorization\": \"httpAuthorization\",\n" - + " \"httpContentFormat\": \"JSONARRAY\",\n" - + " \"httpContentType\": \"httpContentType\",\n" - + " \"httpEndpoint\": \"httpEndpoint\",\n" - + " \"httpCustomHeaders\": [\n" - + " {}\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 testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"status\":\"active\",\"type\":\"http\",\"isPriority\":true,\"filters\":[{\"type\":\"category\",\"name\":\"auth.login.fail\"}],\"pii_config\":{\"log_fields\":[\"first_name\"],\"method\":\"mask\",\"algorithm\":\"xxhash\"},\"sink\":{\"httpAuthorization\":\"httpAuthorization\",\"httpContentFormat\":\"JSONARRAY\",\"httpContentType\":\"httpContentType\",\"httpEndpoint\":\"httpEndpoint\",\"httpCustomHeaders\":[{}]}}")); - GetLogStreamResponseContent response = client.logStreams().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" - + " \"status\": \"active\",\n" - + " \"type\": \"http\",\n" - + " \"isPriority\": true,\n" - + " \"filters\": [\n" - + " {\n" - + " \"type\": \"category\",\n" - + " \"name\": \"auth.login.fail\"\n" - + " }\n" - + " ],\n" - + " \"pii_config\": {\n" - + " \"log_fields\": [\n" - + " \"first_name\"\n" - + " ],\n" - + " \"method\": \"mask\",\n" - + " \"algorithm\": \"xxhash\"\n" - + " },\n" - + " \"sink\": {\n" - + " \"httpAuthorization\": \"httpAuthorization\",\n" - + " \"httpContentFormat\": \"JSONARRAY\",\n" - + " \"httpContentType\": \"httpContentType\",\n" - + " \"httpEndpoint\": \"httpEndpoint\",\n" - + " \"httpCustomHeaders\": [\n" - + " {}\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.logStreams().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\",\"status\":\"active\",\"type\":\"http\",\"isPriority\":true,\"filters\":[{\"type\":\"category\",\"name\":\"auth.login.fail\"}],\"pii_config\":{\"log_fields\":[\"first_name\"],\"method\":\"mask\",\"algorithm\":\"xxhash\"},\"sink\":{\"httpAuthorization\":\"httpAuthorization\",\"httpContentFormat\":\"JSONARRAY\",\"httpContentType\":\"httpContentType\",\"httpEndpoint\":\"httpEndpoint\",\"httpCustomHeaders\":[{}]}}")); - UpdateLogStreamResponseContent response = client.logStreams() - .update("id", UpdateLogStreamRequestContent.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" - + " \"status\": \"active\",\n" - + " \"type\": \"http\",\n" - + " \"isPriority\": true,\n" - + " \"filters\": [\n" - + " {\n" - + " \"type\": \"category\",\n" - + " \"name\": \"auth.login.fail\"\n" - + " }\n" - + " ],\n" - + " \"pii_config\": {\n" - + " \"log_fields\": [\n" - + " \"first_name\"\n" - + " ],\n" - + " \"method\": \"mask\",\n" - + " \"algorithm\": \"xxhash\"\n" - + " },\n" - + " \"sink\": {\n" - + " \"httpAuthorization\": \"httpAuthorization\",\n" - + " \"httpContentFormat\": \"JSONARRAY\",\n" - + " \"httpContentType\": \"httpContentType\",\n" - + " \"httpEndpoint\": \"httpEndpoint\",\n" - + " \"httpCustomHeaders\": [\n" - + " {}\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 || !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 deleted file mode 100644 index d5bfe8f73..000000000 --- a/src/test/java/com/auth0/client/mgmt/LogsWireTest.java +++ /dev/null @@ -1,179 +0,0 @@ -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; -import com.auth0.client.mgmt.types.Log; -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 LogsWireTest { - 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( - "{\"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")) - .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( - "{\"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\",\"security_context\":{\"ja3\":\"ja3\",\"ja4\":\"ja4\"},\"location_info\":{\"country_code\":\"country_code\",\"country_code3\":\"country_code3\",\"country_name\":\"country_name\",\"city_name\":\"city_name\",\"latitude\":1.1,\"longitude\":1.1,\"time_zone\":\"time_zone\",\"continent_code\":\"continent_code\"}}")); - GetLogResponseContent response = client.logs().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" - + " \"date\": \"date\",\n" - + " \"type\": \"type\",\n" - + " \"description\": \"description\",\n" - + " \"connection\": \"connection\",\n" - + " \"connection_id\": \"connection_id\",\n" - + " \"client_id\": \"client_id\",\n" - + " \"client_name\": \"client_name\",\n" - + " \"ip\": \"ip\",\n" - + " \"hostname\": \"hostname\",\n" - + " \"user_id\": \"user_id\",\n" - + " \"user_name\": \"user_name\",\n" - + " \"audience\": \"audience\",\n" - + " \"scope\": \"scope\",\n" - + " \"strategy\": \"strategy\",\n" - + " \"strategy_type\": \"strategy_type\",\n" - + " \"log_id\": \"log_id\",\n" - + " \"isMobile\": true,\n" - + " \"details\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"user_agent\": \"user_agent\",\n" - + " \"security_context\": {\n" - + " \"ja3\": \"ja3\",\n" - + " \"ja4\": \"ja4\"\n" - + " },\n" - + " \"location_info\": {\n" - + " \"country_code\": \"country_code\",\n" - + " \"country_code3\": \"country_code3\",\n" - + " \"country_name\": \"country_name\",\n" - + " \"city_name\": \"city_name\",\n" - + " \"latitude\": 1.1,\n" - + " \"longitude\": 1.1,\n" - + " \"time_zone\": \"time_zone\",\n" - + " \"continent_code\": \"continent_code\"\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 || !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/ManagementApiBuilderTest.java b/src/test/java/com/auth0/client/mgmt/ManagementApiBuilderTest.java deleted file mode 100644 index 5f47ad6f9..000000000 --- a/src/test/java/com/auth0/client/mgmt/ManagementApiBuilderTest.java +++ /dev/null @@ -1,141 +0,0 @@ -package com.auth0.client.mgmt; - -import org.junit.Test; - -/** - * Tests for ManagementApiBuilder domain-based initialization. - * - *

These tests verify the new domain(), clientCredentials(), and audience() methods - * that provide Node SDK parity for Auth0 Management API client initialization. - */ -public class ManagementApiBuilderTest { - - /** - * Test that domain() method is available and returns the builder. - */ - @Test - public void testDomainMethodExists() { - ManagementApiBuilder builder = ManagementApi.builder(); - ManagementApiBuilder result = builder.domain("my-tenant.auth0.com"); - assert result == builder : "domain() should return the same builder instance"; - } - - /** - * Test that clientCredentials() method is available and returns the builder. - */ - @Test - public void testClientCredentialsMethodExists() { - ManagementApiBuilder builder = ManagementApi.builder(); - ManagementApiBuilder result = builder.clientCredentials("client-id", "client-secret"); - assert result == builder : "clientCredentials() should return the same builder instance"; - } - - /** - * Test that audience() method is available and returns the builder. - */ - @Test - public void testAudienceMethodExists() { - ManagementApiBuilder builder = ManagementApi.builder(); - ManagementApiBuilder result = builder.audience("https://custom-api.com/api/v2/"); - assert result == builder : "audience() should return the same builder instance"; - } - - /** - * Test that build() fails when no authentication is provided. - */ - @Test(expected = RuntimeException.class) - public void testBuildFailsWithoutAuth() { - ManagementApi.builder().domain("my-tenant.auth0.com").build(); - } - - /** - * Test that build() fails when only clientId is provided without clientSecret. - */ - @Test(expected = RuntimeException.class) - public void testBuildFailsWithPartialCredentials() { - // This tests an edge case where someone might call clientCredentials incorrectly - ManagementApiBuilder builder = ManagementApi.builder(); - builder.domain("my-tenant.auth0.com"); - // Manually set only clientId to simulate partial configuration - // This should fail during build - builder.build(); - } - - /** - * Test that build() succeeds with token authentication. - */ - @Test - public void testBuildWithToken() { - ManagementApi client = ManagementApi.builder() - .domain("my-tenant.auth0.com") - .token("test-token") - .build(); - assert client != null : "build() should return a ManagementApi instance"; - } - - /** - * Test that build() succeeds with clientCredentials authentication. - * Note: This creates the client but won't actually fetch a token until used. - */ - @Test - public void testBuildWithClientCredentials() { - ManagementApi client = ManagementApi.builder() - .domain("my-tenant.auth0.com") - .clientCredentials("client-id", "client-secret") - .build(); - assert client != null : "build() should return a ManagementApi instance"; - } - - /** - * Test that build() succeeds with clientCredentials and custom audience. - */ - @Test - public void testBuildWithClientCredentialsAndAudience() { - ManagementApi client = ManagementApi.builder() - .domain("my-tenant.auth0.com") - .clientCredentials("client-id", "client-secret") - .audience("https://custom-api.com/api/v2/") - .build(); - assert client != null : "build() should return a ManagementApi instance"; - } - - /** - * Test backwards compatibility: url() + token() still works. - */ - @Test - public void testBackwardsCompatibilityWithUrl() { - ManagementApi client = ManagementApi.builder() - .url("https://my-tenant.auth0.com/api/v2") - .token("test-token") - .build(); - assert client != null : "build() should return a ManagementApi instance"; - } - - /** - * Test that clientCredentials works with url() instead of domain(). - */ - @Test - public void testClientCredentialsWithUrl() { - ManagementApi client = ManagementApi.builder() - .url("https://my-tenant.auth0.com/api/v2") - .clientCredentials("client-id", "client-secret") - .build(); - assert client != null : "build() should return a ManagementApi instance"; - } - - /** - * Test fluent chaining with all options. - */ - @Test - public void testFluentChaining() { - ManagementApi client = ManagementApi.builder() - .domain("my-tenant.auth0.com") - .clientCredentials("client-id", "client-secret") - .audience("https://custom-api.com/api/v2/") - .timeout(30) - .maxRetries(3) - .addHeader("X-Custom-Header", "custom-value") - .build(); - assert client != null : "Fluent chaining should work"; - } -} diff --git a/src/test/java/com/auth0/client/mgmt/NetworkAclsWireTest.java b/src/test/java/com/auth0/client/mgmt/NetworkAclsWireTest.java deleted file mode 100644 index a8226a01d..000000000 --- a/src/test/java/com/auth0/client/mgmt/NetworkAclsWireTest.java +++ /dev/null @@ -1,594 +0,0 @@ -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; -import com.auth0.client.mgmt.types.ListNetworkAclsRequestParameters; -import com.auth0.client.mgmt.types.NetworkAclAction; -import com.auth0.client.mgmt.types.NetworkAclRule; -import com.auth0.client.mgmt.types.NetworkAclRuleScopeEnum; -import com.auth0.client.mgmt.types.NetworkAclsResponseContent; -import com.auth0.client.mgmt.types.SetNetworkAclRequestContent; -import com.auth0.client.mgmt.types.SetNetworkAclsResponseContent; -import com.auth0.client.mgmt.types.UpdateNetworkAclRequestContent; -import com.auth0.client.mgmt.types.UpdateNetworkAclResponseContent; -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 NetworkAclsWireTest { - 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( - "{\"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)) - .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.networkAcls() - .create(CreateNetworkAclRequestContent.builder() - .description("description") - .active(true) - .priority(1.1) - .rule(NetworkAclRule.builder() - .action(NetworkAclAction.builder().build()) - .scope(NetworkAclRuleScopeEnum.MANAGEMENT) - .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" - + " \"description\": \"description\",\n" - + " \"active\": true,\n" - + " \"priority\": 1.1,\n" - + " \"rule\": {\n" - + " \"action\": {},\n" - + " \"scope\": \"management\"\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( - "{\"id\":\"id\",\"description\":\"description\",\"active\":true,\"priority\":1.1,\"rule\":{\"action\":{\"block\":true,\"allow\":true,\"log\":true,\"redirect\":true,\"redirect_uri\":\"redirect_uri\"},\"match\":{\"asns\":[1],\"geo_country_codes\":[\"geo_country_codes\"],\"geo_subdivision_codes\":[\"geo_subdivision_codes\"],\"ipv4_cidrs\":[\"ipv4_cidrs\"],\"ipv6_cidrs\":[\"ipv6_cidrs\"],\"ja3_fingerprints\":[\"ja3_fingerprints\"],\"ja4_fingerprints\":[\"ja4_fingerprints\"],\"user_agents\":[\"user_agents\"]},\"not_match\":{\"asns\":[1],\"geo_country_codes\":[\"geo_country_codes\"],\"geo_subdivision_codes\":[\"geo_subdivision_codes\"],\"ipv4_cidrs\":[\"ipv4_cidrs\"],\"ipv6_cidrs\":[\"ipv6_cidrs\"],\"ja3_fingerprints\":[\"ja3_fingerprints\"],\"ja4_fingerprints\":[\"ja4_fingerprints\"],\"user_agents\":[\"user_agents\"]},\"scope\":\"management\"},\"created_at\":\"created_at\",\"updated_at\":\"updated_at\"}")); - GetNetworkAclsResponseContent response = client.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" - + " \"description\": \"description\",\n" - + " \"active\": true,\n" - + " \"priority\": 1.1,\n" - + " \"rule\": {\n" - + " \"action\": {\n" - + " \"block\": true,\n" - + " \"allow\": true,\n" - + " \"log\": true,\n" - + " \"redirect\": true,\n" - + " \"redirect_uri\": \"redirect_uri\"\n" - + " },\n" - + " \"match\": {\n" - + " \"asns\": [\n" - + " 1\n" - + " ],\n" - + " \"geo_country_codes\": [\n" - + " \"geo_country_codes\"\n" - + " ],\n" - + " \"geo_subdivision_codes\": [\n" - + " \"geo_subdivision_codes\"\n" - + " ],\n" - + " \"ipv4_cidrs\": [\n" - + " \"ipv4_cidrs\"\n" - + " ],\n" - + " \"ipv6_cidrs\": [\n" - + " \"ipv6_cidrs\"\n" - + " ],\n" - + " \"ja3_fingerprints\": [\n" - + " \"ja3_fingerprints\"\n" - + " ],\n" - + " \"ja4_fingerprints\": [\n" - + " \"ja4_fingerprints\"\n" - + " ],\n" - + " \"user_agents\": [\n" - + " \"user_agents\"\n" - + " ]\n" - + " },\n" - + " \"not_match\": {\n" - + " \"asns\": [\n" - + " 1\n" - + " ],\n" - + " \"geo_country_codes\": [\n" - + " \"geo_country_codes\"\n" - + " ],\n" - + " \"geo_subdivision_codes\": [\n" - + " \"geo_subdivision_codes\"\n" - + " ],\n" - + " \"ipv4_cidrs\": [\n" - + " \"ipv4_cidrs\"\n" - + " ],\n" - + " \"ipv6_cidrs\": [\n" - + " \"ipv6_cidrs\"\n" - + " ],\n" - + " \"ja3_fingerprints\": [\n" - + " \"ja3_fingerprints\"\n" - + " ],\n" - + " \"ja4_fingerprints\": [\n" - + " \"ja4_fingerprints\"\n" - + " ],\n" - + " \"user_agents\": [\n" - + " \"user_agents\"\n" - + " ]\n" - + " },\n" - + " \"scope\": \"management\"\n" - + " },\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 testSet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"description\":\"description\",\"active\":true,\"priority\":1.1,\"rule\":{\"action\":{\"block\":true,\"allow\":true,\"log\":true,\"redirect\":true,\"redirect_uri\":\"redirect_uri\"},\"match\":{\"asns\":[1],\"geo_country_codes\":[\"geo_country_codes\"],\"geo_subdivision_codes\":[\"geo_subdivision_codes\"],\"ipv4_cidrs\":[\"ipv4_cidrs\"],\"ipv6_cidrs\":[\"ipv6_cidrs\"],\"ja3_fingerprints\":[\"ja3_fingerprints\"],\"ja4_fingerprints\":[\"ja4_fingerprints\"],\"user_agents\":[\"user_agents\"]},\"not_match\":{\"asns\":[1],\"geo_country_codes\":[\"geo_country_codes\"],\"geo_subdivision_codes\":[\"geo_subdivision_codes\"],\"ipv4_cidrs\":[\"ipv4_cidrs\"],\"ipv6_cidrs\":[\"ipv6_cidrs\"],\"ja3_fingerprints\":[\"ja3_fingerprints\"],\"ja4_fingerprints\":[\"ja4_fingerprints\"],\"user_agents\":[\"user_agents\"]},\"scope\":\"management\"},\"created_at\":\"created_at\",\"updated_at\":\"updated_at\"}")); - SetNetworkAclsResponseContent response = client.networkAcls() - .set( - "id", - SetNetworkAclRequestContent.builder() - .description("description") - .active(true) - .priority(1.1) - .rule(NetworkAclRule.builder() - .action(NetworkAclAction.builder().build()) - .scope(NetworkAclRuleScopeEnum.MANAGEMENT) - .build()) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" - + "{\n" - + " \"description\": \"description\",\n" - + " \"active\": true,\n" - + " \"priority\": 1.1,\n" - + " \"rule\": {\n" - + " \"action\": {},\n" - + " \"scope\": \"management\"\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" - + " \"description\": \"description\",\n" - + " \"active\": true,\n" - + " \"priority\": 1.1,\n" - + " \"rule\": {\n" - + " \"action\": {\n" - + " \"block\": true,\n" - + " \"allow\": true,\n" - + " \"log\": true,\n" - + " \"redirect\": true,\n" - + " \"redirect_uri\": \"redirect_uri\"\n" - + " },\n" - + " \"match\": {\n" - + " \"asns\": [\n" - + " 1\n" - + " ],\n" - + " \"geo_country_codes\": [\n" - + " \"geo_country_codes\"\n" - + " ],\n" - + " \"geo_subdivision_codes\": [\n" - + " \"geo_subdivision_codes\"\n" - + " ],\n" - + " \"ipv4_cidrs\": [\n" - + " \"ipv4_cidrs\"\n" - + " ],\n" - + " \"ipv6_cidrs\": [\n" - + " \"ipv6_cidrs\"\n" - + " ],\n" - + " \"ja3_fingerprints\": [\n" - + " \"ja3_fingerprints\"\n" - + " ],\n" - + " \"ja4_fingerprints\": [\n" - + " \"ja4_fingerprints\"\n" - + " ],\n" - + " \"user_agents\": [\n" - + " \"user_agents\"\n" - + " ]\n" - + " },\n" - + " \"not_match\": {\n" - + " \"asns\": [\n" - + " 1\n" - + " ],\n" - + " \"geo_country_codes\": [\n" - + " \"geo_country_codes\"\n" - + " ],\n" - + " \"geo_subdivision_codes\": [\n" - + " \"geo_subdivision_codes\"\n" - + " ],\n" - + " \"ipv4_cidrs\": [\n" - + " \"ipv4_cidrs\"\n" - + " ],\n" - + " \"ipv6_cidrs\": [\n" - + " \"ipv6_cidrs\"\n" - + " ],\n" - + " \"ja3_fingerprints\": [\n" - + " \"ja3_fingerprints\"\n" - + " ],\n" - + " \"ja4_fingerprints\": [\n" - + " \"ja4_fingerprints\"\n" - + " ],\n" - + " \"user_agents\": [\n" - + " \"user_agents\"\n" - + " ]\n" - + " },\n" - + " \"scope\": \"management\"\n" - + " },\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.networkAcls().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\",\"description\":\"description\",\"active\":true,\"priority\":1.1,\"rule\":{\"action\":{\"block\":true,\"allow\":true,\"log\":true,\"redirect\":true,\"redirect_uri\":\"redirect_uri\"},\"match\":{\"asns\":[1],\"geo_country_codes\":[\"geo_country_codes\"],\"geo_subdivision_codes\":[\"geo_subdivision_codes\"],\"ipv4_cidrs\":[\"ipv4_cidrs\"],\"ipv6_cidrs\":[\"ipv6_cidrs\"],\"ja3_fingerprints\":[\"ja3_fingerprints\"],\"ja4_fingerprints\":[\"ja4_fingerprints\"],\"user_agents\":[\"user_agents\"]},\"not_match\":{\"asns\":[1],\"geo_country_codes\":[\"geo_country_codes\"],\"geo_subdivision_codes\":[\"geo_subdivision_codes\"],\"ipv4_cidrs\":[\"ipv4_cidrs\"],\"ipv6_cidrs\":[\"ipv6_cidrs\"],\"ja3_fingerprints\":[\"ja3_fingerprints\"],\"ja4_fingerprints\":[\"ja4_fingerprints\"],\"user_agents\":[\"user_agents\"]},\"scope\":\"management\"},\"created_at\":\"created_at\",\"updated_at\":\"updated_at\"}")); - UpdateNetworkAclResponseContent response = client.networkAcls() - .update("id", UpdateNetworkAclRequestContent.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" - + " \"description\": \"description\",\n" - + " \"active\": true,\n" - + " \"priority\": 1.1,\n" - + " \"rule\": {\n" - + " \"action\": {\n" - + " \"block\": true,\n" - + " \"allow\": true,\n" - + " \"log\": true,\n" - + " \"redirect\": true,\n" - + " \"redirect_uri\": \"redirect_uri\"\n" - + " },\n" - + " \"match\": {\n" - + " \"asns\": [\n" - + " 1\n" - + " ],\n" - + " \"geo_country_codes\": [\n" - + " \"geo_country_codes\"\n" - + " ],\n" - + " \"geo_subdivision_codes\": [\n" - + " \"geo_subdivision_codes\"\n" - + " ],\n" - + " \"ipv4_cidrs\": [\n" - + " \"ipv4_cidrs\"\n" - + " ],\n" - + " \"ipv6_cidrs\": [\n" - + " \"ipv6_cidrs\"\n" - + " ],\n" - + " \"ja3_fingerprints\": [\n" - + " \"ja3_fingerprints\"\n" - + " ],\n" - + " \"ja4_fingerprints\": [\n" - + " \"ja4_fingerprints\"\n" - + " ],\n" - + " \"user_agents\": [\n" - + " \"user_agents\"\n" - + " ]\n" - + " },\n" - + " \"not_match\": {\n" - + " \"asns\": [\n" - + " 1\n" - + " ],\n" - + " \"geo_country_codes\": [\n" - + " \"geo_country_codes\"\n" - + " ],\n" - + " \"geo_subdivision_codes\": [\n" - + " \"geo_subdivision_codes\"\n" - + " ],\n" - + " \"ipv4_cidrs\": [\n" - + " \"ipv4_cidrs\"\n" - + " ],\n" - + " \"ipv6_cidrs\": [\n" - + " \"ipv6_cidrs\"\n" - + " ],\n" - + " \"ja3_fingerprints\": [\n" - + " \"ja3_fingerprints\"\n" - + " ],\n" - + " \"ja4_fingerprints\": [\n" - + " \"ja4_fingerprints\"\n" - + " ],\n" - + " \"user_agents\": [\n" - + " \"user_agents\"\n" - + " ]\n" - + " },\n" - + " \"scope\": \"management\"\n" - + " },\n" - + " \"created_at\": \"created_at\",\n" - + " \"updated_at\": \"updated_at\"\n" - + "}"; - JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); - JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); - Assertions.assertTrue( - jsonEquals(expectedResponseNode, actualResponseNode), - "Response body structure does not match expected"); - if (actualResponseNode.has("type") || actualResponseNode.has("_type") || actualResponseNode.has("kind")) { - String discriminator = null; - if (actualResponseNode.has("type")) - discriminator = actualResponseNode.get("type").asText(); - else if (actualResponseNode.has("_type")) - discriminator = actualResponseNode.get("_type").asText(); - else if (actualResponseNode.has("kind")) - discriminator = actualResponseNode.get("kind").asText(); - Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); - Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); - } - - if (!actualResponseNode.isNull()) { - Assertions.assertTrue( - actualResponseNode.isObject() || actualResponseNode.isArray() || actualResponseNode.isValueNode(), - "response should be a valid JSON value"); - } - - if (actualResponseNode.isArray()) { - Assertions.assertTrue(actualResponseNode.size() >= 0, "Array should have valid size"); - } - if (actualResponseNode.isObject()) { - Assertions.assertTrue(actualResponseNode.size() >= 0, "Object should have valid field count"); - } - } - - /** - * Compares two JsonNodes with numeric equivalence and null safety. - * For objects, checks that all fields in 'expected' exist in 'actual' with matching values. - * Allows 'actual' to have extra fields (e.g., default values added during serialization). - */ - private boolean jsonEquals(JsonNode expected, JsonNode actual) { - if (expected == null && actual == null) return true; - if (expected == null || actual == null) return false; - if (expected.equals(actual)) return true; - if (expected.isNumber() && actual.isNumber()) - return Math.abs(expected.doubleValue() - actual.doubleValue()) < 1e-10; - if (expected.isObject() && actual.isObject()) { - java.util.Iterator> iter = expected.fields(); - while (iter.hasNext()) { - java.util.Map.Entry entry = iter.next(); - JsonNode actualValue = actual.get(entry.getKey()); - if (actualValue == null || !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/OAuthTokenSupplierTest.java b/src/test/java/com/auth0/client/mgmt/OAuthTokenSupplierTest.java deleted file mode 100644 index 626cd06f1..000000000 --- a/src/test/java/com/auth0/client/mgmt/OAuthTokenSupplierTest.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.OAuthTokenSupplier; -import com.auth0.client.mgmt.core.RequestOptions; -import org.junit.Test; - -/** - * Tests for OAuth per-request credentials functionality. - */ -public class OAuthTokenSupplierTest { - - /** - * Verify that special characters in credentials don't cause issues. - * This tests the fix for JSON injection vulnerability. - */ - @Test - public void testSpecialCharactersInCredentials() { - // Create supplier with credentials containing special characters - String clientIdWithQuotes = "client\"with\\quotes"; - String clientSecretWithSpecialChars = "secret'with\"special\\chars\nand\nnewlines"; - String baseUrl = "https://example.auth0.com"; - - // This should not throw an exception during construction - OAuthTokenSupplier supplier = - new OAuthTokenSupplier(clientIdWithQuotes, clientSecretWithSpecialChars, baseUrl, null); - - // Verify object was created successfully - assert supplier != null; - } - - /** - * Verify that multiple suppliers can be created without resource issues. - * This tests the fix for HTTP client resource leak. - */ - @Test - public void testMultipleSupplierCreation() { - // Create multiple suppliers - they should all share the same HTTP client - for (int i = 0; i < 100; i++) { - OAuthTokenSupplier supplier = new OAuthTokenSupplier( - "client-id-" + i, "client-secret-" + i, "https://tenant-" + i + ".auth0.com", null); - assert supplier != null; - } - } - - /** - * Test base URL validation. - */ - @Test(expected = IllegalArgumentException.class) - public void testNullBaseUrl() { - new OAuthTokenSupplier("client-id", "client-secret", null, null); - } - - @Test(expected = IllegalArgumentException.class) - public void testEmptyBaseUrl() { - new OAuthTokenSupplier("client-id", "client-secret", "", null); - } - - @Test - public void testTrailingSlashNormalization() { - OAuthTokenSupplier supplier1 = new OAuthTokenSupplier("id", "secret", "https://example.auth0.com/", null); - OAuthTokenSupplier supplier2 = new OAuthTokenSupplier("id", "secret", "https://example.auth0.com", null); - - // Both should work without issues (trailing slash normalized) - assert supplier1 != null; - assert supplier2 != null; - } - - /** - * Test RequestOptions creation and getters. - */ - @Test - public void testRequestOptionsCreation() { - RequestOptions options = - RequestOptions.withClientCredentials("https://example.auth0.com", "client-id", "client-secret"); - - assert options != null; - assert options.getClientId().equals("client-id"); - assert options.getClientSecret().equals("client-secret"); - assert options.getBaseUrl().equals("https://example.auth0.com"); - assert options.hasClientCredentials(); - } - - @Test - public void testRequestOptionsWithAudience() { - RequestOptions options = RequestOptions.withClientCredentialsAndAudience( - "https://example.auth0.com", "client-id", "client-secret", "https://custom-api.com/api/v2/"); - - assert options != null; - assert options.getAudience().equals("https://custom-api.com/api/v2/"); - } - - @Test - public void testRequestOptionsBuilder() { - RequestOptions options = RequestOptions.builder() - .baseUrl("https://example.auth0.com") - .clientCredentials("client-id", "client-secret") - .timeout(30) - .addHeader("X-Custom", "value") - .build(); - - assert options != null; - assert options.hasClientCredentials(); - assert options.getClientId().equals("client-id"); - assert options.getBaseUrl().equals("https://example.auth0.com"); - } - - @Test - public void testRequestOptionsWithoutCredentials() { - RequestOptions options = RequestOptions.builder().timeout(10).build(); - - assert options != null; - assert !options.hasClientCredentials(); - assert options.getClientId() == null; - } -} diff --git a/src/test/java/com/auth0/client/mgmt/OrganizationsClientGrantsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsClientGrantsWireTest.java deleted file mode 100644 index 19a052b17..000000000 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsClientGrantsWireTest.java +++ /dev/null @@ -1,198 +0,0 @@ -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; -import com.auth0.client.mgmt.types.AssociateOrganizationClientGrantResponseContent; -import com.auth0.client.mgmt.types.OrganizationClientGrant; -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 OrganizationsClientGrantsWireTest { - 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( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"client_grants\":[{\"id\":\"id\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true}]}")); - SyncPagingIterable response = 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)) - .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\",\"client_id\":\"client_id\",\"audience\":\"audience\",\"scope\":[\"scope\"],\"organization_usage\":\"deny\",\"allow_any_organization\":true}")); - AssociateOrganizationClientGrantResponseContent response = client.organizations() - .clientGrants() - .create( - "id", - AssociateOrganizationClientGrantRequestContent.builder() - .grantId("grant_id") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"grant_id\": \"grant_id\"\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" - + " \"client_id\": \"client_id\",\n" - + " \"audience\": \"audience\",\n" - + " \"scope\": [\n" - + " \"scope\"\n" - + " ],\n" - + " \"organization_usage\": \"deny\",\n" - + " \"allow_any_organization\": true\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().clientGrants().delete("id", "grant_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 || !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/OrganizationsDiscoveryDomainsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsDiscoveryDomainsWireTest.java deleted file mode 100644 index 895582f10..000000000 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsDiscoveryDomainsWireTest.java +++ /dev/null @@ -1,399 +0,0 @@ -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; -import com.auth0.client.mgmt.organizations.types.UpdateOrganizationDiscoveryDomainRequestContent; -import com.auth0.client.mgmt.types.CreateOrganizationDiscoveryDomainResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationDiscoveryDomainByNameResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationDiscoveryDomainResponseContent; -import com.auth0.client.mgmt.types.OrganizationDiscoveryDomain; -import com.auth0.client.mgmt.types.UpdateOrganizationDiscoveryDomainResponseContent; -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 OrganizationsDiscoveryDomainsWireTest { - 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\",\"domains\":[{\"id\":\"id\",\"domain\":\"domain\",\"status\":\"pending\",\"use_for_organization_discovery\":true,\"verification_txt\":\"verification_txt\",\"verification_host\":\"verification_host\"}]}")); - SyncPagingIterable response = client.organizations() - .discoveryDomains() - .list( - "id", - ListOrganizationDiscoveryDomainsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(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\",\"domain\":\"domain\",\"status\":\"pending\",\"use_for_organization_discovery\":true,\"verification_txt\":\"verification_txt\",\"verification_host\":\"verification_host\"}")); - CreateOrganizationDiscoveryDomainResponseContent response = client.organizations() - .discoveryDomains() - .create( - "id", - CreateOrganizationDiscoveryDomainRequestContent.builder() - .domain("domain") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"domain\": \"domain\"\n" + "}"; - JsonNode actualJson = objectMapper.readTree(actualRequestBody); - JsonNode expectedJson = objectMapper.readTree(expectedRequestBody); - Assertions.assertTrue(jsonEquals(expectedJson, actualJson), "Request body structure does not match expected"); - if (actualJson.has("type") || actualJson.has("_type") || actualJson.has("kind")) { - String discriminator = null; - if (actualJson.has("type")) discriminator = actualJson.get("type").asText(); - else if (actualJson.has("_type")) - discriminator = actualJson.get("_type").asText(); - else if (actualJson.has("kind")) - discriminator = actualJson.get("kind").asText(); - Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); - Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); - } - - if (!actualJson.isNull()) { - Assertions.assertTrue( - actualJson.isObject() || actualJson.isArray() || actualJson.isValueNode(), - "request should be a valid JSON value"); - } - - if (actualJson.isArray()) { - Assertions.assertTrue(actualJson.size() >= 0, "Array should have valid size"); - } - if (actualJson.isObject()) { - Assertions.assertTrue(actualJson.size() >= 0, "Object should have valid field count"); - } - - // Validate response body - Assertions.assertNotNull(response, "Response should not be null"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"id\": \"id\",\n" - + " \"domain\": \"domain\",\n" - + " \"status\": \"pending\",\n" - + " \"use_for_organization_discovery\": true,\n" - + " \"verification_txt\": \"verification_txt\",\n" - + " \"verification_host\": \"verification_host\"\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 testGetByName() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"domain\":\"domain\",\"status\":\"pending\",\"use_for_organization_discovery\":true,\"verification_txt\":\"verification_txt\",\"verification_host\":\"verification_host\"}")); - GetOrganizationDiscoveryDomainByNameResponseContent response = - client.organizations().discoveryDomains().getByName("id", "discovery_domain"); - 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" - + " \"domain\": \"domain\",\n" - + " \"status\": \"pending\",\n" - + " \"use_for_organization_discovery\": true,\n" - + " \"verification_txt\": \"verification_txt\",\n" - + " \"verification_host\": \"verification_host\"\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\",\"domain\":\"domain\",\"status\":\"pending\",\"use_for_organization_discovery\":true,\"verification_txt\":\"verification_txt\",\"verification_host\":\"verification_host\"}")); - GetOrganizationDiscoveryDomainResponseContent response = - client.organizations().discoveryDomains().get("id", "discovery_domain_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" - + " \"domain\": \"domain\",\n" - + " \"status\": \"pending\",\n" - + " \"use_for_organization_discovery\": true,\n" - + " \"verification_txt\": \"verification_txt\",\n" - + " \"verification_host\": \"verification_host\"\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().discoveryDomains().delete("id", "discovery_domain_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\",\"domain\":\"domain\",\"status\":\"pending\",\"use_for_organization_discovery\":true,\"verification_txt\":\"verification_txt\",\"verification_host\":\"verification_host\"}")); - UpdateOrganizationDiscoveryDomainResponseContent response = client.organizations() - .discoveryDomains() - .update( - "id", - "discovery_domain_id", - UpdateOrganizationDiscoveryDomainRequestContent.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" - + " \"domain\": \"domain\",\n" - + " \"status\": \"pending\",\n" - + " \"use_for_organization_discovery\": true,\n" - + " \"verification_txt\": \"verification_txt\",\n" - + " \"verification_host\": \"verification_host\"\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 || !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/OrganizationsEnabledConnectionsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsEnabledConnectionsWireTest.java deleted file mode 100644 index a3315a84a..000000000 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsEnabledConnectionsWireTest.java +++ /dev/null @@ -1,348 +0,0 @@ -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; -import com.auth0.client.mgmt.organizations.types.UpdateOrganizationConnectionRequestContent; -import com.auth0.client.mgmt.types.AddOrganizationConnectionResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationConnectionResponseContent; -import com.auth0.client.mgmt.types.OrganizationConnection; -import com.auth0.client.mgmt.types.UpdateOrganizationConnectionResponseContent; -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 OrganizationsEnabledConnectionsWireTest { - 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( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"enabled_connections\":[{\"connection_id\":\"connection_id\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true}]}")); - SyncPagingIterable response = client.organizations() - .enabledConnections() - .list( - "id", - ListOrganizationConnectionsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(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 - } - - @Test - public void testAdd() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"connection_id\":\"connection_id\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true,\"connection\":{\"name\":\"name\",\"strategy\":\"strategy\"}}")); - AddOrganizationConnectionResponseContent response = client.organizations() - .enabledConnections() - .add( - "id", - AddOrganizationConnectionRequestContent.builder() - .connectionId("connection_id") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"connection_id\": \"connection_id\"\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" - + " \"connection_id\": \"connection_id\",\n" - + " \"assign_membership_on_login\": true,\n" - + " \"show_as_button\": true,\n" - + " \"is_signup_enabled\": true,\n" - + " \"connection\": {\n" - + " \"name\": \"name\",\n" - + " \"strategy\": \"strategy\"\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 testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"connection_id\":\"connection_id\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true,\"connection\":{\"name\":\"name\",\"strategy\":\"strategy\"}}")); - GetOrganizationConnectionResponseContent response = - client.organizations().enabledConnections().get("id", "connectionId"); - 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" - + " \"connection_id\": \"connection_id\",\n" - + " \"assign_membership_on_login\": true,\n" - + " \"show_as_button\": true,\n" - + " \"is_signup_enabled\": true,\n" - + " \"connection\": {\n" - + " \"name\": \"name\",\n" - + " \"strategy\": \"strategy\"\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().enabledConnections().delete("id", "connectionId"); - 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( - "{\"connection_id\":\"connection_id\",\"assign_membership_on_login\":true,\"show_as_button\":true,\"is_signup_enabled\":true,\"connection\":{\"name\":\"name\",\"strategy\":\"strategy\"}}")); - UpdateOrganizationConnectionResponseContent response = client.organizations() - .enabledConnections() - .update( - "id", - "connectionId", - UpdateOrganizationConnectionRequestContent.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" - + " \"connection_id\": \"connection_id\",\n" - + " \"assign_membership_on_login\": true,\n" - + " \"show_as_button\": true,\n" - + " \"is_signup_enabled\": true,\n" - + " \"connection\": {\n" - + " \"name\": \"name\",\n" - + " \"strategy\": \"strategy\"\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 || !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/OrganizationsInvitationsWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsInvitationsWireTest.java deleted file mode 100644 index 6facd9615..000000000 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsInvitationsWireTest.java +++ /dev/null @@ -1,313 +0,0 @@ -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; -import com.auth0.client.mgmt.organizations.types.ListOrganizationInvitationsRequestParameters; -import com.auth0.client.mgmt.types.CreateOrganizationInvitationResponseContent; -import com.auth0.client.mgmt.types.GetOrganizationInvitationResponseContent; -import com.auth0.client.mgmt.types.OrganizationInvitation; -import com.auth0.client.mgmt.types.OrganizationInvitationInvitee; -import com.auth0.client.mgmt.types.OrganizationInvitationInviter; -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 OrganizationsInvitationsWireTest { - 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( - "{\"start\":1.1,\"limit\":1.1,\"invitations\":[{\"id\":\"id\",\"organization_id\":\"organization_id\",\"inviter\":{\"name\":\"name\"},\"invitee\":{\"email\":\"email\"},\"invitation_url\":\"invitation_url\",\"created_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\",\"client_id\":\"client_id\",\"connection_id\":\"connection_id\",\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"roles\":[\"roles\"],\"ticket_id\":\"ticket_id\"}]}")); - SyncPagingIterable response = 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")) - .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\",\"organization_id\":\"organization_id\",\"inviter\":{\"name\":\"name\"},\"invitee\":{\"email\":\"email\"},\"invitation_url\":\"invitation_url\",\"created_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\",\"client_id\":\"client_id\",\"connection_id\":\"connection_id\",\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"roles\":[\"roles\"],\"ticket_id\":\"ticket_id\"}")); - CreateOrganizationInvitationResponseContent response = client.organizations() - .invitations() - .create( - "id", - CreateOrganizationInvitationRequestContent.builder() - .inviter(OrganizationInvitationInviter.builder() - .name("name") - .build()) - .invitee(OrganizationInvitationInvitee.builder() - .email("email") - .build()) - .clientId("client_id") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" - + "{\n" - + " \"inviter\": {\n" - + " \"name\": \"name\"\n" - + " },\n" - + " \"invitee\": {\n" - + " \"email\": \"email\"\n" - + " },\n" - + " \"client_id\": \"client_id\"\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" - + " \"organization_id\": \"organization_id\",\n" - + " \"inviter\": {\n" - + " \"name\": \"name\"\n" - + " },\n" - + " \"invitee\": {\n" - + " \"email\": \"email\"\n" - + " },\n" - + " \"invitation_url\": \"invitation_url\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"expires_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"client_id\": \"client_id\",\n" - + " \"connection_id\": \"connection_id\",\n" - + " \"app_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"user_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"roles\": [\n" - + " \"roles\"\n" - + " ],\n" - + " \"ticket_id\": \"ticket_id\"\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\",\"organization_id\":\"organization_id\",\"inviter\":{\"name\":\"name\"},\"invitee\":{\"email\":\"email\"},\"invitation_url\":\"invitation_url\",\"created_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\",\"client_id\":\"client_id\",\"connection_id\":\"connection_id\",\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"roles\":[\"roles\"],\"ticket_id\":\"ticket_id\"}")); - GetOrganizationInvitationResponseContent response = client.organizations() - .invitations() - .get( - "id", - "invitation_id", - GetOrganizationInvitationRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(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"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"id\": \"id\",\n" - + " \"organization_id\": \"organization_id\",\n" - + " \"inviter\": {\n" - + " \"name\": \"name\"\n" - + " },\n" - + " \"invitee\": {\n" - + " \"email\": \"email\"\n" - + " },\n" - + " \"invitation_url\": \"invitation_url\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"expires_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"client_id\": \"client_id\",\n" - + " \"connection_id\": \"connection_id\",\n" - + " \"app_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"user_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"roles\": [\n" - + " \"roles\"\n" - + " ],\n" - + " \"ticket_id\": \"ticket_id\"\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().invitations().delete("id", "invitation_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 || !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/OrganizationsMembersRolesWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsMembersRolesWireTest.java deleted file mode 100644 index 2088c6c43..000000000 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsMembersRolesWireTest.java +++ /dev/null @@ -1,190 +0,0 @@ -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; -import com.auth0.client.mgmt.organizations.members.types.ListOrganizationMemberRolesRequestParameters; -import com.auth0.client.mgmt.types.Role; -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 OrganizationsMembersRolesWireTest { - 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( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"roles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\"}]}")); - SyncPagingIterable response = client.organizations() - .members() - .roles() - .list( - "id", - "user_id", - ListOrganizationMemberRolesRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(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 - } - - @Test - public void testAssign() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.organizations() - .members() - .roles() - .assign( - "id", - "user_id", - AssignOrganizationMemberRolesRequestContent.builder() - .roles(Arrays.asList("roles")) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"roles\": [\n" + " \"roles\"\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 testDelete() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.organizations() - .members() - .roles() - .delete( - "id", - "user_id", - DeleteOrganizationMemberRolesRequestContent.builder() - .roles(Arrays.asList("roles")) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("DELETE", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"roles\": [\n" + " \"roles\"\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. - * 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 || !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/OrganizationsMembersWireTest.java b/src/test/java/com/auth0/client/mgmt/OrganizationsMembersWireTest.java deleted file mode 100644 index 6c7f099eb..000000000 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsMembersWireTest.java +++ /dev/null @@ -1,185 +0,0 @@ -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; -import com.auth0.client.mgmt.organizations.types.ListOrganizationMembersRequestParameters; -import com.auth0.client.mgmt.types.OrganizationMember; -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 OrganizationsMembersWireTest { - 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\",\"members\":[{\"user_id\":\"user_id\",\"picture\":\"picture\",\"name\":\"name\",\"email\":\"email\",\"roles\":[{}]}]}")); - SyncPagingIterable response = client.organizations() - .members() - .list( - "id", - ListOrganizationMembersRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(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 - } - - @Test - public void testCreate() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.organizations() - .members() - .create( - "id", - CreateOrganizationMemberRequestContent.builder() - .members(Arrays.asList("members")) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"members\": [\n" + " \"members\"\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 testDelete() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.organizations() - .members() - .delete( - "id", - DeleteOrganizationMembersRequestContent.builder() - .members(Arrays.asList("members")) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("DELETE", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"members\": [\n" + " \"members\"\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. - * 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 || !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 deleted file mode 100644 index dee87ef24..000000000 --- a/src/test/java/com/auth0/client/mgmt/OrganizationsWireTest.java +++ /dev/null @@ -1,449 +0,0 @@ -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; -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.UpdateOrganizationRequestContent; -import com.auth0.client.mgmt.types.UpdateOrganizationResponseContent; -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 OrganizationsWireTest { - 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\",\"organizations\":[{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"token_quota\":{\"client_credentials\":{}}}]}")); - SyncPagingIterable response = client.organizations() - .list(ListOrganizationsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(1)) - .sort(OptionalNullable.of("sort")) - .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\",\"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}]}")); - CreateOrganizationResponseContent response = client.organizations() - .create(CreateOrganizationRequestContent.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" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"display_name\": \"display_name\",\n" - + " \"branding\": {\n" - + " \"logo_url\": \"logo_url\",\n" - + " \"colors\": {\n" - + " \"primary\": \"primary\",\n" - + " \"page_background\": \"page_background\"\n" - + " }\n" - + " },\n" - + " \"metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"token_quota\": {\n" - + " \"client_credentials\": {\n" - + " \"enforce\": true,\n" - + " \"per_day\": 1,\n" - + " \"per_hour\": 1\n" - + " }\n" - + " },\n" - + " \"enabled_connections\": [\n" - + " {\n" - + " \"connection_id\": \"connection_id\",\n" - + " \"assign_membership_on_login\": true,\n" - + " \"show_as_button\": true,\n" - + " \"is_signup_enabled\": true\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 testGetByName() 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}}}")); - GetOrganizationByNameResponseContent response = client.organizations().getByName("name"); - 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" - + " \"display_name\": \"display_name\",\n" - + " \"branding\": {\n" - + " \"logo_url\": \"logo_url\",\n" - + " \"colors\": {\n" - + " \"primary\": \"primary\",\n" - + " \"page_background\": \"page_background\"\n" - + " }\n" - + " },\n" - + " \"metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"token_quota\": {\n" - + " \"client_credentials\": {\n" - + " \"enforce\": true,\n" - + " \"per_day\": 1,\n" - + " \"per_hour\": 1\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 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}}}")); - GetOrganizationResponseContent response = client.organizations().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" - + " \"display_name\": \"display_name\",\n" - + " \"branding\": {\n" - + " \"logo_url\": \"logo_url\",\n" - + " \"colors\": {\n" - + " \"primary\": \"primary\",\n" - + " \"page_background\": \"page_background\"\n" - + " }\n" - + " },\n" - + " \"metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"token_quota\": {\n" - + " \"client_credentials\": {\n" - + " \"enforce\": true,\n" - + " \"per_day\": 1,\n" - + " \"per_hour\": 1\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().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\",\"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}}}")); - UpdateOrganizationResponseContent response = client.organizations() - .update("id", UpdateOrganizationRequestContent.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" - + " \"display_name\": \"display_name\",\n" - + " \"branding\": {\n" - + " \"logo_url\": \"logo_url\",\n" - + " \"colors\": {\n" - + " \"primary\": \"primary\",\n" - + " \"page_background\": \"page_background\"\n" - + " }\n" - + " },\n" - + " \"metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"token_quota\": {\n" - + " \"client_credentials\": {\n" - + " \"enforce\": true,\n" - + " \"per_day\": 1,\n" - + " \"per_hour\": 1\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 || !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/PromptsCustomTextWireTest.java b/src/test/java/com/auth0/client/mgmt/PromptsCustomTextWireTest.java deleted file mode 100644 index fe2c30fef..000000000 --- a/src/test/java/com/auth0/client/mgmt/PromptsCustomTextWireTest.java +++ /dev/null @@ -1,155 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.PromptGroupNameEnum; -import com.auth0.client.mgmt.types.PromptLanguageEnum; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -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 PromptsCustomTextWireTest { - 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("{\"key\":\"value\"}")); - Map response = - client.prompts().customText().get(PromptGroupNameEnum.LOGIN, PromptLanguageEnum.AM); - 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" + " \"key\": \"value\"\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("{}")); - client.prompts() - .customText() - .set(PromptGroupNameEnum.LOGIN, PromptLanguageEnum.AM, new HashMap() { - { - put("key", "value"); - } - }); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"key\": \"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"); - } - } - - /** - * 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 || !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/PromptsPartialsWireTest.java b/src/test/java/com/auth0/client/mgmt/PromptsPartialsWireTest.java deleted file mode 100644 index ebf84dab8..000000000 --- a/src/test/java/com/auth0/client/mgmt/PromptsPartialsWireTest.java +++ /dev/null @@ -1,151 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.PartialGroupsEnum; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -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 PromptsPartialsWireTest { - 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("{\"key\":\"value\"}")); - Map response = client.prompts().partials().get(PartialGroupsEnum.LOGIN); - 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" + " \"key\": \"value\"\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("{}")); - client.prompts().partials().set(PartialGroupsEnum.LOGIN, new HashMap() { - { - put("key", "value"); - } - }); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"key\": \"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"); - } - } - - /** - * 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 || !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 deleted file mode 100644 index 0491b52ac..000000000 --- a/src/test/java/com/auth0/client/mgmt/PromptsRenderingWireTest.java +++ /dev/null @@ -1,416 +0,0 @@ -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; -import com.auth0.client.mgmt.prompts.types.UpdateAculRequestContent; -import com.auth0.client.mgmt.types.AculConfigsItem; -import com.auth0.client.mgmt.types.AculRenderingModeEnum; -import com.auth0.client.mgmt.types.BulkUpdateAculResponseContent; -import com.auth0.client.mgmt.types.GetAculResponseContent; -import com.auth0.client.mgmt.types.ListAculsResponseContentItem; -import com.auth0.client.mgmt.types.PromptGroupNameEnum; -import com.auth0.client.mgmt.types.ScreenGroupNameEnum; -import com.auth0.client.mgmt.types.UpdateAculResponseContent; -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 PromptsRenderingWireTest { - 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( - "{\"configs\":[{\"tenant\":\"tenant\",\"prompt\":\"prompt\",\"screen\":\"screen\",\"rendering_mode\":\"advanced\",\"context_configuration\":[\"branding.settings\"],\"default_head_tags_disabled\":true,\"use_page_template\":true,\"head_tags\":[{}]}],\"start\":1.1,\"limit\":1.1,\"total\":1.1}")); - 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)) - .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 testBulkUpdate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"configs\":[{\"prompt\":\"login\",\"screen\":\"login\",\"rendering_mode\":\"advanced\",\"context_configuration\":[\"branding.settings\"],\"default_head_tags_disabled\":true,\"use_page_template\":true,\"head_tags\":[{}]}]}")); - BulkUpdateAculResponseContent response = client.prompts() - .rendering() - .bulkUpdate(BulkUpdateAculRequestContent.builder() - .configs(Arrays.asList(AculConfigsItem.builder() - .prompt(PromptGroupNameEnum.LOGIN) - .screen(ScreenGroupNameEnum.LOGIN) - .build())) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PATCH", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" - + "{\n" - + " \"configs\": [\n" - + " {\n" - + " \"prompt\": \"login\",\n" - + " \"screen\": \"login\"\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" - + " \"configs\": [\n" - + " {\n" - + " \"prompt\": \"login\",\n" - + " \"screen\": \"login\",\n" - + " \"rendering_mode\": \"advanced\",\n" - + " \"context_configuration\": [\n" - + " \"branding.settings\"\n" - + " ],\n" - + " \"default_head_tags_disabled\": true,\n" - + " \"use_page_template\": true,\n" - + " \"head_tags\": [\n" - + " {}\n" - + " ]\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 testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"tenant\":\"tenant\",\"prompt\":\"prompt\",\"screen\":\"screen\",\"rendering_mode\":\"advanced\",\"context_configuration\":[\"branding.settings\"],\"default_head_tags_disabled\":true,\"use_page_template\":true,\"head_tags\":[{\"tag\":\"tag\",\"attributes\":{\"key\":\"value\"},\"content\":\"content\"}],\"filters\":{\"match_type\":\"includes_any\",\"clients\":[{\"id\":\"id\"}],\"organizations\":[{\"id\":\"id\"}],\"domains\":[{\"id\":\"id\"}]}}")); - GetAculResponseContent response = - client.prompts().rendering().get(PromptGroupNameEnum.LOGIN, ScreenGroupNameEnum.LOGIN); - 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" - + " \"tenant\": \"tenant\",\n" - + " \"prompt\": \"prompt\",\n" - + " \"screen\": \"screen\",\n" - + " \"rendering_mode\": \"advanced\",\n" - + " \"context_configuration\": [\n" - + " \"branding.settings\"\n" - + " ],\n" - + " \"default_head_tags_disabled\": true,\n" - + " \"use_page_template\": true,\n" - + " \"head_tags\": [\n" - + " {\n" - + " \"tag\": \"tag\",\n" - + " \"attributes\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"content\": \"content\"\n" - + " }\n" - + " ],\n" - + " \"filters\": {\n" - + " \"match_type\": \"includes_any\",\n" - + " \"clients\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ],\n" - + " \"organizations\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ],\n" - + " \"domains\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\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 testUpdate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"rendering_mode\":\"advanced\",\"context_configuration\":[\"branding.settings\"],\"default_head_tags_disabled\":true,\"use_page_template\":true,\"head_tags\":[{\"tag\":\"tag\",\"attributes\":{\"key\":\"value\"},\"content\":\"content\"}],\"filters\":{\"match_type\":\"includes_any\",\"clients\":[{\"id\":\"id\"}],\"organizations\":[{\"id\":\"id\"}],\"domains\":[{\"id\":\"id\"}]}}")); - UpdateAculResponseContent response = client.prompts() - .rendering() - .update( - PromptGroupNameEnum.LOGIN, - ScreenGroupNameEnum.LOGIN, - UpdateAculRequestContent.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" - + " \"rendering_mode\": \"advanced\",\n" - + " \"context_configuration\": [\n" - + " \"branding.settings\"\n" - + " ],\n" - + " \"default_head_tags_disabled\": true,\n" - + " \"use_page_template\": true,\n" - + " \"head_tags\": [\n" - + " {\n" - + " \"tag\": \"tag\",\n" - + " \"attributes\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"content\": \"content\"\n" - + " }\n" - + " ],\n" - + " \"filters\": {\n" - + " \"match_type\": \"includes_any\",\n" - + " \"clients\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ],\n" - + " \"organizations\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ],\n" - + " \"domains\": [\n" - + " {\n" - + " \"id\": \"id\"\n" - + " }\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 || !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/PromptsWireTest.java b/src/test/java/com/auth0/client/mgmt/PromptsWireTest.java deleted file mode 100644 index ba93e3529..000000000 --- a/src/test/java/com/auth0/client/mgmt/PromptsWireTest.java +++ /dev/null @@ -1,200 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.GetSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateSettingsRequestContent; -import com.auth0.client.mgmt.types.UpdateSettingsResponseContent; -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 PromptsWireTest { - 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 testGetSettings() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"universal_login_experience\":\"new\",\"identifier_first\":true,\"webauthn_platform_first_factor\":true}")); - GetSettingsResponseContent response = client.prompts().getSettings(); - 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" - + " \"universal_login_experience\": \"new\",\n" - + " \"identifier_first\": true,\n" - + " \"webauthn_platform_first_factor\": true\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 testUpdateSettings() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"universal_login_experience\":\"new\",\"identifier_first\":true,\"webauthn_platform_first_factor\":true}")); - UpdateSettingsResponseContent response = client.prompts() - .updateSettings(UpdateSettingsRequestContent.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" - + " \"universal_login_experience\": \"new\",\n" - + " \"identifier_first\": true,\n" - + " \"webauthn_platform_first_factor\": true\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 || !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/RefreshTokensWireTest.java b/src/test/java/com/auth0/client/mgmt/RefreshTokensWireTest.java deleted file mode 100644 index f77c1163f..000000000 --- a/src/test/java/com/auth0/client/mgmt/RefreshTokensWireTest.java +++ /dev/null @@ -1,255 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.GetRefreshTokenResponseContent; -import com.auth0.client.mgmt.types.UpdateRefreshTokenRequestContent; -import com.auth0.client.mgmt.types.UpdateRefreshTokenResponseContent; -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 RefreshTokensWireTest { - 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( - "{\"id\":\"id\",\"user_id\":\"user_id\",\"created_at\":\"2024-01-15T09:30:00Z\",\"idle_expires_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\",\"device\":{\"initial_ip\":\"initial_ip\",\"initial_asn\":\"initial_asn\",\"initial_user_agent\":\"initial_user_agent\",\"last_ip\":\"last_ip\",\"last_asn\":\"last_asn\",\"last_user_agent\":\"last_user_agent\"},\"client_id\":\"client_id\",\"session_id\":\"session_id\",\"rotating\":true,\"resource_servers\":[{\"audience\":\"audience\",\"scopes\":\"scopes\"}],\"refresh_token_metadata\":{\"key\":\"value\"},\"last_exchanged_at\":\"2024-01-15T09:30:00Z\"}")); - GetRefreshTokenResponseContent response = client.refreshTokens().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" - + " \"user_id\": \"user_id\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"idle_expires_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"expires_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"device\": {\n" - + " \"initial_ip\": \"initial_ip\",\n" - + " \"initial_asn\": \"initial_asn\",\n" - + " \"initial_user_agent\": \"initial_user_agent\",\n" - + " \"last_ip\": \"last_ip\",\n" - + " \"last_asn\": \"last_asn\",\n" - + " \"last_user_agent\": \"last_user_agent\"\n" - + " },\n" - + " \"client_id\": \"client_id\",\n" - + " \"session_id\": \"session_id\",\n" - + " \"rotating\": true,\n" - + " \"resource_servers\": [\n" - + " {\n" - + " \"audience\": \"audience\",\n" - + " \"scopes\": \"scopes\"\n" - + " }\n" - + " ],\n" - + " \"refresh_token_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"last_exchanged_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.refreshTokens().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\",\"user_id\":\"user_id\",\"created_at\":\"2024-01-15T09:30:00Z\",\"idle_expires_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\",\"device\":{\"initial_ip\":\"initial_ip\",\"initial_asn\":\"initial_asn\",\"initial_user_agent\":\"initial_user_agent\",\"last_ip\":\"last_ip\",\"last_asn\":\"last_asn\",\"last_user_agent\":\"last_user_agent\"},\"client_id\":\"client_id\",\"session_id\":\"session_id\",\"rotating\":true,\"resource_servers\":[{\"audience\":\"audience\",\"scopes\":\"scopes\"}],\"refresh_token_metadata\":{\"key\":\"value\"},\"last_exchanged_at\":\"2024-01-15T09:30:00Z\"}")); - UpdateRefreshTokenResponseContent response = client.refreshTokens() - .update("id", UpdateRefreshTokenRequestContent.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" - + " \"user_id\": \"user_id\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"idle_expires_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"expires_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"device\": {\n" - + " \"initial_ip\": \"initial_ip\",\n" - + " \"initial_asn\": \"initial_asn\",\n" - + " \"initial_user_agent\": \"initial_user_agent\",\n" - + " \"last_ip\": \"last_ip\",\n" - + " \"last_asn\": \"last_asn\",\n" - + " \"last_user_agent\": \"last_user_agent\"\n" - + " },\n" - + " \"client_id\": \"client_id\",\n" - + " \"session_id\": \"session_id\",\n" - + " \"rotating\": true,\n" - + " \"resource_servers\": [\n" - + " {\n" - + " \"audience\": \"audience\",\n" - + " \"scopes\": \"scopes\"\n" - + " }\n" - + " ],\n" - + " \"refresh_token_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"last_exchanged_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 || !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/ResourceServersWireTest.java b/src/test/java/com/auth0/client/mgmt/ResourceServersWireTest.java deleted file mode 100644 index cfb8afe3b..000000000 --- a/src/test/java/com/auth0/client/mgmt/ResourceServersWireTest.java +++ /dev/null @@ -1,461 +0,0 @@ -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; -import com.auth0.client.mgmt.types.GetResourceServerRequestParameters; -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.UpdateResourceServerRequestContent; -import com.auth0.client.mgmt.types.UpdateResourceServerResponseContent; -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 ResourceServersWireTest { - 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( - "{\"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,\"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},\"client_id\":\"client_id\"}]}")); - SyncPagingIterable response = client.resourceServers() - .list(ListResourceServerRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) - .includeFields(OptionalNullable.of(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 - } - - @Test - public void testCreate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"is_system\":true,\"identifier\":\"identifier\",\"scopes\":[{\"value\":\"value\",\"description\":\"description\"}],\"signing_alg\":\"HS256\",\"signing_secret\":\"signing_secret\",\"allow_offline_access\":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\":{\"name\":\"name\",\"alg\":\"RSA-OAEP-256\",\"kid\":\"kid\",\"pem\":\"pem\"}},\"consent_policy\":\"transactional-authorization-with-mfa\",\"authorization_details\":[{\"key\":\"value\"}],\"proof_of_possession\":{\"mechanism\":\"mtls\",\"required\":true,\"required_for\":\"public_clients\"},\"subject_type_authorization\":{\"user\":{\"policy\":\"allow_all\"},\"client\":{\"policy\":\"deny_all\"}},\"client_id\":\"client_id\"}")); - CreateResourceServerResponseContent response = client.resourceServers() - .create(CreateResourceServerRequestContent.builder() - .identifier("identifier") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"identifier\": \"identifier\"\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" - + " \"is_system\": true,\n" - + " \"identifier\": \"identifier\",\n" - + " \"scopes\": [\n" - + " {\n" - + " \"value\": \"value\",\n" - + " \"description\": \"description\"\n" - + " }\n" - + " ],\n" - + " \"signing_alg\": \"HS256\",\n" - + " \"signing_secret\": \"signing_secret\",\n" - + " \"allow_offline_access\": true,\n" - + " \"skip_consent_for_verifiable_first_party_clients\": true,\n" - + " \"token_lifetime\": 1,\n" - + " \"token_lifetime_for_web\": 1,\n" - + " \"enforce_policies\": true,\n" - + " \"token_dialect\": \"access_token\",\n" - + " \"token_encryption\": {\n" - + " \"format\": \"compact-nested-jwe\",\n" - + " \"encryption_key\": {\n" - + " \"name\": \"name\",\n" - + " \"alg\": \"RSA-OAEP-256\",\n" - + " \"kid\": \"kid\",\n" - + " \"pem\": \"pem\"\n" - + " }\n" - + " },\n" - + " \"consent_policy\": \"transactional-authorization-with-mfa\",\n" - + " \"authorization_details\": [\n" - + " {\n" - + " \"key\": \"value\"\n" - + " }\n" - + " ],\n" - + " \"proof_of_possession\": {\n" - + " \"mechanism\": \"mtls\",\n" - + " \"required\": true,\n" - + " \"required_for\": \"public_clients\"\n" - + " },\n" - + " \"subject_type_authorization\": {\n" - + " \"user\": {\n" - + " \"policy\": \"allow_all\"\n" - + " },\n" - + " \"client\": {\n" - + " \"policy\": \"deny_all\"\n" - + " }\n" - + " },\n" - + " \"client_id\": \"client_id\"\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\",\"is_system\":true,\"identifier\":\"identifier\",\"scopes\":[{\"value\":\"value\",\"description\":\"description\"}],\"signing_alg\":\"HS256\",\"signing_secret\":\"signing_secret\",\"allow_offline_access\":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\":{\"name\":\"name\",\"alg\":\"RSA-OAEP-256\",\"kid\":\"kid\",\"pem\":\"pem\"}},\"consent_policy\":\"transactional-authorization-with-mfa\",\"authorization_details\":[{\"key\":\"value\"}],\"proof_of_possession\":{\"mechanism\":\"mtls\",\"required\":true,\"required_for\":\"public_clients\"},\"subject_type_authorization\":{\"user\":{\"policy\":\"allow_all\"},\"client\":{\"policy\":\"deny_all\"}},\"client_id\":\"client_id\"}")); - GetResourceServerResponseContent response = client.resourceServers() - .get( - "id", - GetResourceServerRequestParameters.builder() - .includeFields(OptionalNullable.of(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"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"is_system\": true,\n" - + " \"identifier\": \"identifier\",\n" - + " \"scopes\": [\n" - + " {\n" - + " \"value\": \"value\",\n" - + " \"description\": \"description\"\n" - + " }\n" - + " ],\n" - + " \"signing_alg\": \"HS256\",\n" - + " \"signing_secret\": \"signing_secret\",\n" - + " \"allow_offline_access\": true,\n" - + " \"skip_consent_for_verifiable_first_party_clients\": true,\n" - + " \"token_lifetime\": 1,\n" - + " \"token_lifetime_for_web\": 1,\n" - + " \"enforce_policies\": true,\n" - + " \"token_dialect\": \"access_token\",\n" - + " \"token_encryption\": {\n" - + " \"format\": \"compact-nested-jwe\",\n" - + " \"encryption_key\": {\n" - + " \"name\": \"name\",\n" - + " \"alg\": \"RSA-OAEP-256\",\n" - + " \"kid\": \"kid\",\n" - + " \"pem\": \"pem\"\n" - + " }\n" - + " },\n" - + " \"consent_policy\": \"transactional-authorization-with-mfa\",\n" - + " \"authorization_details\": [\n" - + " {\n" - + " \"key\": \"value\"\n" - + " }\n" - + " ],\n" - + " \"proof_of_possession\": {\n" - + " \"mechanism\": \"mtls\",\n" - + " \"required\": true,\n" - + " \"required_for\": \"public_clients\"\n" - + " },\n" - + " \"subject_type_authorization\": {\n" - + " \"user\": {\n" - + " \"policy\": \"allow_all\"\n" - + " },\n" - + " \"client\": {\n" - + " \"policy\": \"deny_all\"\n" - + " }\n" - + " },\n" - + " \"client_id\": \"client_id\"\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.resourceServers().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\",\"is_system\":true,\"identifier\":\"identifier\",\"scopes\":[{\"value\":\"value\",\"description\":\"description\"}],\"signing_alg\":\"HS256\",\"signing_secret\":\"signing_secret\",\"allow_offline_access\":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\":{\"name\":\"name\",\"alg\":\"RSA-OAEP-256\",\"kid\":\"kid\",\"pem\":\"pem\"}},\"consent_policy\":\"transactional-authorization-with-mfa\",\"authorization_details\":[{\"key\":\"value\"}],\"proof_of_possession\":{\"mechanism\":\"mtls\",\"required\":true,\"required_for\":\"public_clients\"},\"subject_type_authorization\":{\"user\":{\"policy\":\"allow_all\"},\"client\":{\"policy\":\"deny_all\"}},\"client_id\":\"client_id\"}")); - UpdateResourceServerResponseContent response = client.resourceServers() - .update("id", UpdateResourceServerRequestContent.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" - + " \"is_system\": true,\n" - + " \"identifier\": \"identifier\",\n" - + " \"scopes\": [\n" - + " {\n" - + " \"value\": \"value\",\n" - + " \"description\": \"description\"\n" - + " }\n" - + " ],\n" - + " \"signing_alg\": \"HS256\",\n" - + " \"signing_secret\": \"signing_secret\",\n" - + " \"allow_offline_access\": true,\n" - + " \"skip_consent_for_verifiable_first_party_clients\": true,\n" - + " \"token_lifetime\": 1,\n" - + " \"token_lifetime_for_web\": 1,\n" - + " \"enforce_policies\": true,\n" - + " \"token_dialect\": \"access_token\",\n" - + " \"token_encryption\": {\n" - + " \"format\": \"compact-nested-jwe\",\n" - + " \"encryption_key\": {\n" - + " \"name\": \"name\",\n" - + " \"alg\": \"RSA-OAEP-256\",\n" - + " \"kid\": \"kid\",\n" - + " \"pem\": \"pem\"\n" - + " }\n" - + " },\n" - + " \"consent_policy\": \"transactional-authorization-with-mfa\",\n" - + " \"authorization_details\": [\n" - + " {\n" - + " \"key\": \"value\"\n" - + " }\n" - + " ],\n" - + " \"proof_of_possession\": {\n" - + " \"mechanism\": \"mtls\",\n" - + " \"required\": true,\n" - + " \"required_for\": \"public_clients\"\n" - + " },\n" - + " \"subject_type_authorization\": {\n" - + " \"user\": {\n" - + " \"policy\": \"allow_all\"\n" - + " },\n" - + " \"client\": {\n" - + " \"policy\": \"deny_all\"\n" - + " }\n" - + " },\n" - + " \"client_id\": \"client_id\"\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 || !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/RiskAssessmentsSettingsNewDeviceWireTest.java b/src/test/java/com/auth0/client/mgmt/RiskAssessmentsSettingsNewDeviceWireTest.java deleted file mode 100644 index d83a6a6ce..000000000 --- a/src/test/java/com/auth0/client/mgmt/RiskAssessmentsSettingsNewDeviceWireTest.java +++ /dev/null @@ -1,187 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.riskassessments.settings.types.UpdateRiskAssessmentsSettingsNewDeviceRequestContent; -import com.auth0.client.mgmt.types.GetRiskAssessmentsSettingsNewDeviceResponseContent; -import com.auth0.client.mgmt.types.UpdateRiskAssessmentsSettingsNewDeviceResponseContent; -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 RiskAssessmentsSettingsNewDeviceWireTest { - 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("{\"remember_for\":1}")); - GetRiskAssessmentsSettingsNewDeviceResponseContent response = - client.riskAssessments().settings().newDevice().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" + " \"remember_for\": 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 testUpdate() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"remember_for\":1}")); - UpdateRiskAssessmentsSettingsNewDeviceResponseContent response = client.riskAssessments() - .settings() - .newDevice() - .update(UpdateRiskAssessmentsSettingsNewDeviceRequestContent.builder() - .rememberFor(1) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PATCH", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"remember_for\": 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" + " \"remember_for\": 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 || !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/RiskAssessmentsSettingsWireTest.java b/src/test/java/com/auth0/client/mgmt/RiskAssessmentsSettingsWireTest.java deleted file mode 100644 index 6893a370f..000000000 --- a/src/test/java/com/auth0/client/mgmt/RiskAssessmentsSettingsWireTest.java +++ /dev/null @@ -1,186 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.riskassessments.types.UpdateRiskAssessmentsSettingsRequestContent; -import com.auth0.client.mgmt.types.GetRiskAssessmentsSettingsResponseContent; -import com.auth0.client.mgmt.types.UpdateRiskAssessmentsSettingsResponseContent; -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 RiskAssessmentsSettingsWireTest { - 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("{\"enabled\":true}")); - GetRiskAssessmentsSettingsResponseContent response = - client.riskAssessments().settings().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" + " \"enabled\": true\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("{\"enabled\":true}")); - UpdateRiskAssessmentsSettingsResponseContent response = client.riskAssessments() - .settings() - .update(UpdateRiskAssessmentsSettingsRequestContent.builder() - .enabled(true) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PATCH", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"enabled\": true\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" + " \"enabled\": true\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 || !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/RolesPermissionsWireTest.java b/src/test/java/com/auth0/client/mgmt/RolesPermissionsWireTest.java deleted file mode 100644 index 8071522ee..000000000 --- a/src/test/java/com/auth0/client/mgmt/RolesPermissionsWireTest.java +++ /dev/null @@ -1,207 +0,0 @@ -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; -import com.auth0.client.mgmt.roles.types.ListRolePermissionsRequestParameters; -import com.auth0.client.mgmt.types.PermissionRequestPayload; -import com.auth0.client.mgmt.types.PermissionsResponsePayload; -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 RolesPermissionsWireTest { - 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( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"permissions\":[{\"resource_server_identifier\":\"resource_server_identifier\",\"permission_name\":\"permission_name\",\"resource_server_name\":\"resource_server_name\",\"description\":\"description\"}]}")); - SyncPagingIterable response = client.roles() - .permissions() - .list( - "id", - ListRolePermissionsRequestParameters.builder() - .perPage(OptionalNullable.of(1)) - .page(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(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 - } - - @Test - public void testAdd() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.roles() - .permissions() - .add( - "id", - AddRolePermissionsRequestContent.builder() - .permissions(Arrays.asList(PermissionRequestPayload.builder() - .resourceServerIdentifier("resource_server_identifier") - .permissionName("permission_name") - .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" - + " \"permissions\": [\n" - + " {\n" - + " \"resource_server_identifier\": \"resource_server_identifier\",\n" - + " \"permission_name\": \"permission_name\"\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 testDelete() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.roles() - .permissions() - .delete( - "id", - DeleteRolePermissionsRequestContent.builder() - .permissions(Arrays.asList(PermissionRequestPayload.builder() - .resourceServerIdentifier("resource_server_identifier") - .permissionName("permission_name") - .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" - + " \"permissions\": [\n" - + " {\n" - + " \"resource_server_identifier\": \"resource_server_identifier\",\n" - + " \"permission_name\": \"permission_name\"\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. - * 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 || !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/RolesUsersWireTest.java b/src/test/java/com/auth0/client/mgmt/RolesUsersWireTest.java deleted file mode 100644 index e1a5c8d3f..000000000 --- a/src/test/java/com/auth0/client/mgmt/RolesUsersWireTest.java +++ /dev/null @@ -1,138 +0,0 @@ -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; -import com.auth0.client.mgmt.types.RoleUser; -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 RolesUsersWireTest { - 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\",\"users\":[{\"user_id\":\"user_id\",\"picture\":\"picture\",\"name\":\"name\",\"email\":\"email\"}]}")); - SyncPagingIterable response = client.roles() - .users() - .list( - "id", - ListRoleUsersRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(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 testAssign() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.roles() - .users() - .assign( - "id", - AssignRoleUsersRequestContent.builder() - .users(Arrays.asList("users")) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"users\": [\n" + " \"users\"\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. - * 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 || !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/RolesWireTest.java b/src/test/java/com/auth0/client/mgmt/RolesWireTest.java deleted file mode 100644 index 1d2f1cf62..000000000 --- a/src/test/java/com/auth0/client/mgmt/RolesWireTest.java +++ /dev/null @@ -1,315 +0,0 @@ -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.UpdateRoleRequestContent; -import com.auth0.client.mgmt.types.UpdateRoleResponseContent; -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 RolesWireTest { - 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( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"roles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\"}]}")); - SyncPagingIterable response = client.roles() - .list(ListRolesRequestParameters.builder() - .perPage(OptionalNullable.of(1)) - .page(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(true)) - .nameFilter(OptionalNullable.of("name_filter")) - .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\"}")); - CreateRoleResponseContent response = client.roles() - .create(CreateRoleRequestContent.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" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"description\": \"description\"\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\"}")); - GetRoleResponseContent response = client.roles().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" - + "}"; - 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.roles().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\"}")); - UpdateRoleResponseContent response = - client.roles().update("id", UpdateRoleRequestContent.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" - + "}"; - 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 || !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/RulesConfigsWireTest.java b/src/test/java/com/auth0/client/mgmt/RulesConfigsWireTest.java deleted file mode 100644 index 8145ca8aa..000000000 --- a/src/test/java/com/auth0/client/mgmt/RulesConfigsWireTest.java +++ /dev/null @@ -1,194 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.RulesConfig; -import com.auth0.client.mgmt.types.SetRulesConfigRequestContent; -import com.auth0.client.mgmt.types.SetRulesConfigResponseContent; -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 RulesConfigsWireTest { - 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("[{\"key\":\"key\"}]")); - List response = client.rulesConfigs().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" + " {\n" + " \"key\": \"key\"\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 testSet() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"key\":\"key\",\"value\":\"value\"}")); - SetRulesConfigResponseContent response = client.rulesConfigs() - .set( - "key", - SetRulesConfigRequestContent.builder().value("value").build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\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" + " \"key\": \"key\",\n" + " \"value\": \"value\"\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.rulesConfigs().delete("key"); - 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 || !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/RulesWireTest.java b/src/test/java/com/auth0/client/mgmt/RulesWireTest.java deleted file mode 100644 index e0f043078..000000000 --- a/src/test/java/com/auth0/client/mgmt/RulesWireTest.java +++ /dev/null @@ -1,342 +0,0 @@ -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; -import com.auth0.client.mgmt.types.GetRuleRequestParameters; -import com.auth0.client.mgmt.types.GetRuleResponseContent; -import com.auth0.client.mgmt.types.ListRulesRequestParameters; -import com.auth0.client.mgmt.types.Rule; -import com.auth0.client.mgmt.types.UpdateRuleRequestContent; -import com.auth0.client.mgmt.types.UpdateRuleResponseContent; -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 RulesWireTest { - 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( - "{\"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)) - .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( - "{\"name\":\"name\",\"id\":\"id\",\"enabled\":true,\"script\":\"script\",\"order\":1.1,\"stage\":\"stage\"}")); - CreateRuleResponseContent response = client.rules() - .create(CreateRuleRequestContent.builder() - .name("name") - .script("script") - .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" + " \"script\": \"script\"\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" - + " \"name\": \"name\",\n" - + " \"id\": \"id\",\n" - + " \"enabled\": true,\n" - + " \"script\": \"script\",\n" - + " \"order\": 1.1,\n" - + " \"stage\": \"stage\"\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( - "{\"name\":\"name\",\"id\":\"id\",\"enabled\":true,\"script\":\"script\",\"order\":1.1,\"stage\":\"stage\"}")); - GetRuleResponseContent response = client.rules() - .get( - "id", - GetRuleRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(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"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"name\": \"name\",\n" - + " \"id\": \"id\",\n" - + " \"enabled\": true,\n" - + " \"script\": \"script\",\n" - + " \"order\": 1.1,\n" - + " \"stage\": \"stage\"\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.rules().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( - "{\"name\":\"name\",\"id\":\"id\",\"enabled\":true,\"script\":\"script\",\"order\":1.1,\"stage\":\"stage\"}")); - UpdateRuleResponseContent response = - client.rules().update("id", UpdateRuleRequestContent.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" - + " \"name\": \"name\",\n" - + " \"id\": \"id\",\n" - + " \"enabled\": true,\n" - + " \"script\": \"script\",\n" - + " \"order\": 1.1,\n" - + " \"stage\": \"stage\"\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 || !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/SelfServiceProfilesCustomTextWireTest.java b/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesCustomTextWireTest.java deleted file mode 100644 index 5a24993f5..000000000 --- a/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesCustomTextWireTest.java +++ /dev/null @@ -1,197 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.SelfServiceProfileCustomTextLanguageEnum; -import com.auth0.client.mgmt.types.SelfServiceProfileCustomTextPageEnum; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -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 SelfServiceProfilesCustomTextWireTest { - 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("{\"key\":\"value\"}")); - Map response = client.selfServiceProfiles() - .customText() - .list( - "id", - SelfServiceProfileCustomTextLanguageEnum.EN, - SelfServiceProfileCustomTextPageEnum.GET_STARTED); - 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" + " \"key\": \"value\"\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("{\"key\":\"value\"}")); - Map response = client.selfServiceProfiles() - .customText() - .set( - "id", - SelfServiceProfileCustomTextLanguageEnum.EN, - SelfServiceProfileCustomTextPageEnum.GET_STARTED, - new HashMap() { - { - put("key", "value"); - } - }); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"key\": \"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" + " \"key\": \"value\"\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 || !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/SelfServiceProfilesSsoTicketWireTest.java b/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesSsoTicketWireTest.java deleted file mode 100644 index 8f4363c3f..000000000 --- a/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesSsoTicketWireTest.java +++ /dev/null @@ -1,151 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.selfserviceprofiles.types.CreateSelfServiceProfileSsoTicketRequestContent; -import com.auth0.client.mgmt.types.CreateSelfServiceProfileSsoTicketResponseContent; -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 SelfServiceProfilesSsoTicketWireTest { - 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 testCreate() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"ticket\":\"ticket\"}")); - CreateSelfServiceProfileSsoTicketResponseContent response = client.selfServiceProfiles() - .ssoTicket() - .create( - "id", - CreateSelfServiceProfileSsoTicketRequestContent.builder() - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", 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" + " \"ticket\": \"ticket\"\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 testRevoke() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.selfServiceProfiles().ssoTicket().revoke("profileId", "id"); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", 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 || !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/SelfServiceProfilesWireTest.java b/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesWireTest.java deleted file mode 100644 index dd6bc4bc1..000000000 --- a/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesWireTest.java +++ /dev/null @@ -1,380 +0,0 @@ -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; -import com.auth0.client.mgmt.types.GetSelfServiceProfileResponseContent; -import com.auth0.client.mgmt.types.ListSelfServiceProfilesRequestParameters; -import com.auth0.client.mgmt.types.SelfServiceProfile; -import com.auth0.client.mgmt.types.UpdateSelfServiceProfileRequestContent; -import com.auth0.client.mgmt.types.UpdateSelfServiceProfileResponseContent; -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 SelfServiceProfilesWireTest { - 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( - "{\"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)) - .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\",\"user_attributes\":[{\"name\":\"name\",\"description\":\"description\",\"is_optional\":true}],\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"branding\":{\"logo_url\":\"logo_url\",\"colors\":{\"primary\":\"primary\"}},\"allowed_strategies\":[\"oidc\"],\"user_attribute_profile_id\":\"user_attribute_profile_id\"}")); - CreateSelfServiceProfileResponseContent response = client.selfServiceProfiles() - .create(CreateSelfServiceProfileRequestContent.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" - + " \"id\": \"id\",\n" - + " \"name\": \"name\",\n" - + " \"description\": \"description\",\n" - + " \"user_attributes\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"description\": \"description\",\n" - + " \"is_optional\": true\n" - + " }\n" - + " ],\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"branding\": {\n" - + " \"logo_url\": \"logo_url\",\n" - + " \"colors\": {\n" - + " \"primary\": \"primary\"\n" - + " }\n" - + " },\n" - + " \"allowed_strategies\": [\n" - + " \"oidc\"\n" - + " ],\n" - + " \"user_attribute_profile_id\": \"user_attribute_profile_id\"\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\",\"user_attributes\":[{\"name\":\"name\",\"description\":\"description\",\"is_optional\":true}],\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"branding\":{\"logo_url\":\"logo_url\",\"colors\":{\"primary\":\"primary\"}},\"allowed_strategies\":[\"oidc\"],\"user_attribute_profile_id\":\"user_attribute_profile_id\"}")); - GetSelfServiceProfileResponseContent response = - client.selfServiceProfiles().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" - + " \"user_attributes\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"description\": \"description\",\n" - + " \"is_optional\": true\n" - + " }\n" - + " ],\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"branding\": {\n" - + " \"logo_url\": \"logo_url\",\n" - + " \"colors\": {\n" - + " \"primary\": \"primary\"\n" - + " }\n" - + " },\n" - + " \"allowed_strategies\": [\n" - + " \"oidc\"\n" - + " ],\n" - + " \"user_attribute_profile_id\": \"user_attribute_profile_id\"\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.selfServiceProfiles().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\",\"user_attributes\":[{\"name\":\"name\",\"description\":\"description\",\"is_optional\":true}],\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"branding\":{\"logo_url\":\"logo_url\",\"colors\":{\"primary\":\"primary\"}},\"allowed_strategies\":[\"oidc\"],\"user_attribute_profile_id\":\"user_attribute_profile_id\"}")); - UpdateSelfServiceProfileResponseContent response = client.selfServiceProfiles() - .update("id", UpdateSelfServiceProfileRequestContent.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" - + " \"user_attributes\": [\n" - + " {\n" - + " \"name\": \"name\",\n" - + " \"description\": \"description\",\n" - + " \"is_optional\": true\n" - + " }\n" - + " ],\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"branding\": {\n" - + " \"logo_url\": \"logo_url\",\n" - + " \"colors\": {\n" - + " \"primary\": \"primary\"\n" - + " }\n" - + " },\n" - + " \"allowed_strategies\": [\n" - + " \"oidc\"\n" - + " ],\n" - + " \"user_attribute_profile_id\": \"user_attribute_profile_id\"\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 || !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/SessionsWireTest.java b/src/test/java/com/auth0/client/mgmt/SessionsWireTest.java deleted file mode 100644 index 4649e2c22..000000000 --- a/src/test/java/com/auth0/client/mgmt/SessionsWireTest.java +++ /dev/null @@ -1,276 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.GetSessionResponseContent; -import com.auth0.client.mgmt.types.UpdateSessionRequestContent; -import com.auth0.client.mgmt.types.UpdateSessionResponseContent; -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 SessionsWireTest { - 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( - "{\"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\"}}")); - GetSessionResponseContent response = client.sessions().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" - + " \"user_id\": \"user_id\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"authenticated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"idle_expires_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"expires_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"last_interacted_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"device\": {\n" - + " \"initial_user_agent\": \"initial_user_agent\",\n" - + " \"initial_ip\": \"initial_ip\",\n" - + " \"initial_asn\": \"initial_asn\",\n" - + " \"last_user_agent\": \"last_user_agent\",\n" - + " \"last_ip\": \"last_ip\",\n" - + " \"last_asn\": \"last_asn\"\n" - + " },\n" - + " \"clients\": [\n" - + " {\n" - + " \"client_id\": \"client_id\"\n" - + " }\n" - + " ],\n" - + " \"authentication\": {\n" - + " \"methods\": [\n" - + " {}\n" - + " ]\n" - + " },\n" - + " \"cookie\": {\n" - + " \"mode\": \"non-persistent\"\n" - + " },\n" - + " \"session_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.sessions().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\",\"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\"}}")); - UpdateSessionResponseContent response = client.sessions() - .update("id", UpdateSessionRequestContent.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" - + " \"user_id\": \"user_id\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"updated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"authenticated_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"idle_expires_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"expires_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"last_interacted_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"device\": {\n" - + " \"initial_user_agent\": \"initial_user_agent\",\n" - + " \"initial_ip\": \"initial_ip\",\n" - + " \"initial_asn\": \"initial_asn\",\n" - + " \"last_user_agent\": \"last_user_agent\",\n" - + " \"last_ip\": \"last_ip\",\n" - + " \"last_asn\": \"last_asn\"\n" - + " },\n" - + " \"clients\": [\n" - + " {\n" - + " \"client_id\": \"client_id\"\n" - + " }\n" - + " ],\n" - + " \"authentication\": {\n" - + " \"methods\": [\n" - + " {}\n" - + " ]\n" - + " },\n" - + " \"cookie\": {\n" - + " \"mode\": \"non-persistent\"\n" - + " },\n" - + " \"session_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 testRevoke() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.sessions().revoke("id"); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", 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 || !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/StatsWireTest.java b/src/test/java/com/auth0/client/mgmt/StatsWireTest.java deleted file mode 100644 index 369a31683..000000000 --- a/src/test/java/com/auth0/client/mgmt/StatsWireTest.java +++ /dev/null @@ -1,171 +0,0 @@ -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; -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 StatsWireTest { - 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 testGetActiveUsersCount() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("1.1")); - Double response = client.stats().getActiveUsersCount(); - 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 = "" + "1.1"; - 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 testGetDaily() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "[{\"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")) - .build()); - 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" - + " \"date\": \"date\",\n" - + " \"logins\": 1,\n" - + " \"signups\": 1,\n" - + " \"leaked_passwords\": 1,\n" - + " \"updated_at\": \"updated_at\",\n" - + " \"created_at\": \"created_at\"\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 || !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/StreamTest.java b/src/test/java/com/auth0/client/mgmt/StreamTest.java deleted file mode 100644 index ac3a1fd41..000000000 --- a/src/test/java/com/auth0/client/mgmt/StreamTest.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt; - -import static org.junit.jupiter.api.Assertions.*; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.core.Stream; -import java.io.IOException; -import java.io.StringReader; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import org.junit.jupiter.api.Test; - -public final class StreamTest { - @Test - public void testJsonStream() { - List> messages = - Arrays.asList(createMap("message", "hello"), createMap("message", "world")); - List jsonStrings = messages.stream().map(StreamTest::mapToJson).collect(Collectors.toList()); - String input = String.join("\n", jsonStrings); - StringReader jsonInput = new StringReader(input); - Stream jsonStream = Stream.fromJson(Map.class, jsonInput); - int expectedMessages = 2; - int actualMessages = 0; - for (Map jsonObject : jsonStream) { - actualMessages++; - assertTrue(jsonObject.containsKey("message")); - } - assertEquals(expectedMessages, actualMessages); - } - - @Test - public void testSseStream() { - List> events = Arrays.asList(createMap("event", "start"), createMap("event", "end")); - List sseStrings = events.stream().map(StreamTest::mapToSse).collect(Collectors.toList()); - String input = String.join("\n" + "\n", sseStrings); - StringReader sseInput = new StringReader(input); - Stream sseStream = Stream.fromSse(Map.class, sseInput); - int expectedEvents = 2; - int actualEvents = 0; - for (Map eventData : sseStream) { - actualEvents++; - assertTrue(eventData.containsKey("event")); - } - assertEquals(expectedEvents, actualEvents); - } - - @Test - public void testSseStreamWithTerminator() { - List> events = Arrays.asList(createMap("message", "first"), createMap("message", "second")); - List sseStrings = - new ArrayList<>(events.stream().map(StreamTest::mapToSse).collect(Collectors.toList())); - sseStrings.add("data: [DONE]"); - String input = String.join("\n" + "\n", sseStrings); - StringReader sseInput = new StringReader(input); - Stream sseStream = Stream.fromSse(Map.class, sseInput, "[DONE]"); - int expectedEvents = 2; - int actualEvents = 0; - for (Map eventData : sseStream) { - actualEvents++; - assertTrue(eventData.containsKey("message")); - } - assertEquals(expectedEvents, actualEvents); - } - - @Test - public void testStreamResourceManagement() throws IOException { - StringReader testInput = new StringReader("{\"test\":\"data\"}"); - Stream testStream = Stream.fromJson(Map.class, testInput); - testStream.close(); - assertFalse(testStream.iterator().hasNext()); - } - - private static String mapToJson(Map map) { - try { - return ObjectMappers.JSON_MAPPER.writeValueAsString(map); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - private static String mapToSse(Map map) { - return "data: " + mapToJson(map); - } - - private static Map createMap(String key, String value) { - Map map = new HashMap<>(); - map.put(key, value); - return map; - } -} diff --git a/src/test/java/com/auth0/client/mgmt/SupplementalSignalsWireTest.java b/src/test/java/com/auth0/client/mgmt/SupplementalSignalsWireTest.java deleted file mode 100644 index 925393f5f..000000000 --- a/src/test/java/com/auth0/client/mgmt/SupplementalSignalsWireTest.java +++ /dev/null @@ -1,185 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.GetSupplementalSignalsResponseContent; -import com.auth0.client.mgmt.types.PatchSupplementalSignalsResponseContent; -import com.auth0.client.mgmt.types.UpdateSupplementalSignalsRequestContent; -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 SupplementalSignalsWireTest { - 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("{\"akamai_enabled\":true}")); - GetSupplementalSignalsResponseContent response = - client.supplementalSignals().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" + " \"akamai_enabled\": true\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 testPatch() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"akamai_enabled\":true}")); - PatchSupplementalSignalsResponseContent response = client.supplementalSignals() - .patch(UpdateSupplementalSignalsRequestContent.builder() - .akamaiEnabled(true) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PATCH", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"akamai_enabled\": true\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" + " \"akamai_enabled\": true\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 || !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/TenantsSettingsWireTest.java b/src/test/java/com/auth0/client/mgmt/TenantsSettingsWireTest.java deleted file mode 100644 index 976b18d7d..000000000 --- a/src/test/java/com/auth0/client/mgmt/TenantsSettingsWireTest.java +++ /dev/null @@ -1,404 +0,0 @@ -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; -import com.auth0.client.mgmt.types.UpdateTenantSettingsResponseContent; -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 TenantsSettingsWireTest { - 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( - "{\"change_password\":{\"enabled\":true,\"html\":\"html\"},\"guardian_mfa_page\":{\"enabled\":true,\"html\":\"html\"},\"default_audience\":\"default_audience\",\"default_directory\":\"default_directory\",\"error_page\":{\"html\":\"html\",\"show_log_link\":true,\"url\":\"url\"},\"device_flow\":{\"charset\":\"base20\",\"mask\":\"mask\"},\"default_token_quota\":{\"clients\":{\"client_credentials\":{}},\"organizations\":{\"client_credentials\":{}}},\"flags\":{\"change_pwd_flow_v1\":true,\"enable_apis_section\":true,\"disable_impersonation\":true,\"enable_client_connections\":true,\"enable_pipeline2\":true,\"allow_legacy_delegation_grant_types\":true,\"allow_legacy_ro_grant_types\":true,\"allow_legacy_tokeninfo_endpoint\":true,\"enable_legacy_profile\":true,\"enable_idtoken_api2\":true,\"enable_public_signup_user_exists_error\":true,\"enable_sso\":true,\"allow_changing_enable_sso\":true,\"disable_clickjack_protection_headers\":true,\"no_disclose_enterprise_connections\":true,\"enforce_client_authentication_on_passwordless_start\":true,\"enable_adfs_waad_email_verification\":true,\"revoke_refresh_token_grant\":true,\"dashboard_log_streams_next\":true,\"dashboard_insights_view\":true,\"disable_fields_map_fix\":true,\"mfa_show_factor_list_on_enrollment\":true,\"remove_alg_from_jwks\":true,\"improved_signup_bot_detection_in_classic\":true,\"genai_trial\":true,\"enable_dynamic_client_registration\":true,\"disable_management_api_sms_obfuscation\":true,\"trust_azure_adfs_email_verified_connection_property\":true,\"custom_domains_provisioning\":true},\"friendly_name\":\"friendly_name\",\"picture_url\":\"picture_url\",\"support_email\":\"support_email\",\"support_url\":\"support_url\",\"allowed_logout_urls\":[\"allowed_logout_urls\"],\"session_lifetime\":1.1,\"idle_session_lifetime\":1.1,\"ephemeral_session_lifetime\":1.1,\"idle_ephemeral_session_lifetime\":1.1,\"sandbox_version\":\"sandbox_version\",\"legacy_sandbox_version\":\"legacy_sandbox_version\",\"sandbox_versions_available\":[\"sandbox_versions_available\"],\"default_redirection_uri\":\"default_redirection_uri\",\"enabled_locales\":[\"am\"],\"session_cookie\":{\"mode\":\"persistent\"},\"sessions\":{\"oidc_logout_prompt_enabled\":true},\"oidc_logout\":{\"rp_logout_end_session_endpoint_discovery\":true},\"allow_organization_name_in_authentication_api\":true,\"customize_mfa_in_postlogin_action\":true,\"acr_values_supported\":[\"acr_values_supported\"],\"mtls\":{\"enable_endpoint_aliases\":true},\"pushed_authorization_requests_supported\":true,\"authorization_response_iss_parameter_supported\":true,\"skip_non_verifiable_callback_uri_confirmation_prompt\":true,\"resource_parameter_profile\":\"audience\",\"phone_consolidated_experience\":true,\"enable_ai_guide\":true}")); - GetTenantSettingsResponseContent response = client.tenants() - .settings() - .get(GetTenantSettingsRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(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"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"change_password\": {\n" - + " \"enabled\": true,\n" - + " \"html\": \"html\"\n" - + " },\n" - + " \"guardian_mfa_page\": {\n" - + " \"enabled\": true,\n" - + " \"html\": \"html\"\n" - + " },\n" - + " \"default_audience\": \"default_audience\",\n" - + " \"default_directory\": \"default_directory\",\n" - + " \"error_page\": {\n" - + " \"html\": \"html\",\n" - + " \"show_log_link\": true,\n" - + " \"url\": \"url\"\n" - + " },\n" - + " \"device_flow\": {\n" - + " \"charset\": \"base20\",\n" - + " \"mask\": \"mask\"\n" - + " },\n" - + " \"default_token_quota\": {\n" - + " \"clients\": {\n" - + " \"client_credentials\": {}\n" - + " },\n" - + " \"organizations\": {\n" - + " \"client_credentials\": {}\n" - + " }\n" - + " },\n" - + " \"flags\": {\n" - + " \"change_pwd_flow_v1\": true,\n" - + " \"enable_apis_section\": true,\n" - + " \"disable_impersonation\": true,\n" - + " \"enable_client_connections\": true,\n" - + " \"enable_pipeline2\": true,\n" - + " \"allow_legacy_delegation_grant_types\": true,\n" - + " \"allow_legacy_ro_grant_types\": true,\n" - + " \"allow_legacy_tokeninfo_endpoint\": true,\n" - + " \"enable_legacy_profile\": true,\n" - + " \"enable_idtoken_api2\": true,\n" - + " \"enable_public_signup_user_exists_error\": true,\n" - + " \"enable_sso\": true,\n" - + " \"allow_changing_enable_sso\": true,\n" - + " \"disable_clickjack_protection_headers\": true,\n" - + " \"no_disclose_enterprise_connections\": true,\n" - + " \"enforce_client_authentication_on_passwordless_start\": true,\n" - + " \"enable_adfs_waad_email_verification\": true,\n" - + " \"revoke_refresh_token_grant\": true,\n" - + " \"dashboard_log_streams_next\": true,\n" - + " \"dashboard_insights_view\": true,\n" - + " \"disable_fields_map_fix\": true,\n" - + " \"mfa_show_factor_list_on_enrollment\": true,\n" - + " \"remove_alg_from_jwks\": true,\n" - + " \"improved_signup_bot_detection_in_classic\": true,\n" - + " \"genai_trial\": true,\n" - + " \"enable_dynamic_client_registration\": true,\n" - + " \"disable_management_api_sms_obfuscation\": true,\n" - + " \"trust_azure_adfs_email_verified_connection_property\": true,\n" - + " \"custom_domains_provisioning\": true\n" - + " },\n" - + " \"friendly_name\": \"friendly_name\",\n" - + " \"picture_url\": \"picture_url\",\n" - + " \"support_email\": \"support_email\",\n" - + " \"support_url\": \"support_url\",\n" - + " \"allowed_logout_urls\": [\n" - + " \"allowed_logout_urls\"\n" - + " ],\n" - + " \"session_lifetime\": 1.1,\n" - + " \"idle_session_lifetime\": 1.1,\n" - + " \"ephemeral_session_lifetime\": 1.1,\n" - + " \"idle_ephemeral_session_lifetime\": 1.1,\n" - + " \"sandbox_version\": \"sandbox_version\",\n" - + " \"legacy_sandbox_version\": \"legacy_sandbox_version\",\n" - + " \"sandbox_versions_available\": [\n" - + " \"sandbox_versions_available\"\n" - + " ],\n" - + " \"default_redirection_uri\": \"default_redirection_uri\",\n" - + " \"enabled_locales\": [\n" - + " \"am\"\n" - + " ],\n" - + " \"session_cookie\": {\n" - + " \"mode\": \"persistent\"\n" - + " },\n" - + " \"sessions\": {\n" - + " \"oidc_logout_prompt_enabled\": true\n" - + " },\n" - + " \"oidc_logout\": {\n" - + " \"rp_logout_end_session_endpoint_discovery\": true\n" - + " },\n" - + " \"allow_organization_name_in_authentication_api\": true,\n" - + " \"customize_mfa_in_postlogin_action\": true,\n" - + " \"acr_values_supported\": [\n" - + " \"acr_values_supported\"\n" - + " ],\n" - + " \"mtls\": {\n" - + " \"enable_endpoint_aliases\": true\n" - + " },\n" - + " \"pushed_authorization_requests_supported\": true,\n" - + " \"authorization_response_iss_parameter_supported\": true,\n" - + " \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n" - + " \"resource_parameter_profile\": \"audience\",\n" - + " \"phone_consolidated_experience\": true,\n" - + " \"enable_ai_guide\": true\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( - "{\"change_password\":{\"enabled\":true,\"html\":\"html\"},\"guardian_mfa_page\":{\"enabled\":true,\"html\":\"html\"},\"default_audience\":\"default_audience\",\"default_directory\":\"default_directory\",\"error_page\":{\"html\":\"html\",\"show_log_link\":true,\"url\":\"url\"},\"device_flow\":{\"charset\":\"base20\",\"mask\":\"mask\"},\"default_token_quota\":{\"clients\":{\"client_credentials\":{}},\"organizations\":{\"client_credentials\":{}}},\"flags\":{\"change_pwd_flow_v1\":true,\"enable_apis_section\":true,\"disable_impersonation\":true,\"enable_client_connections\":true,\"enable_pipeline2\":true,\"allow_legacy_delegation_grant_types\":true,\"allow_legacy_ro_grant_types\":true,\"allow_legacy_tokeninfo_endpoint\":true,\"enable_legacy_profile\":true,\"enable_idtoken_api2\":true,\"enable_public_signup_user_exists_error\":true,\"enable_sso\":true,\"allow_changing_enable_sso\":true,\"disable_clickjack_protection_headers\":true,\"no_disclose_enterprise_connections\":true,\"enforce_client_authentication_on_passwordless_start\":true,\"enable_adfs_waad_email_verification\":true,\"revoke_refresh_token_grant\":true,\"dashboard_log_streams_next\":true,\"dashboard_insights_view\":true,\"disable_fields_map_fix\":true,\"mfa_show_factor_list_on_enrollment\":true,\"remove_alg_from_jwks\":true,\"improved_signup_bot_detection_in_classic\":true,\"genai_trial\":true,\"enable_dynamic_client_registration\":true,\"disable_management_api_sms_obfuscation\":true,\"trust_azure_adfs_email_verified_connection_property\":true,\"custom_domains_provisioning\":true},\"friendly_name\":\"friendly_name\",\"picture_url\":\"picture_url\",\"support_email\":\"support_email\",\"support_url\":\"support_url\",\"allowed_logout_urls\":[\"allowed_logout_urls\"],\"session_lifetime\":1.1,\"idle_session_lifetime\":1.1,\"ephemeral_session_lifetime\":1.1,\"idle_ephemeral_session_lifetime\":1.1,\"sandbox_version\":\"sandbox_version\",\"legacy_sandbox_version\":\"legacy_sandbox_version\",\"sandbox_versions_available\":[\"sandbox_versions_available\"],\"default_redirection_uri\":\"default_redirection_uri\",\"enabled_locales\":[\"am\"],\"session_cookie\":{\"mode\":\"persistent\"},\"sessions\":{\"oidc_logout_prompt_enabled\":true},\"oidc_logout\":{\"rp_logout_end_session_endpoint_discovery\":true},\"allow_organization_name_in_authentication_api\":true,\"customize_mfa_in_postlogin_action\":true,\"acr_values_supported\":[\"acr_values_supported\"],\"mtls\":{\"enable_endpoint_aliases\":true},\"pushed_authorization_requests_supported\":true,\"authorization_response_iss_parameter_supported\":true,\"skip_non_verifiable_callback_uri_confirmation_prompt\":true,\"resource_parameter_profile\":\"audience\",\"phone_consolidated_experience\":true,\"enable_ai_guide\":true}")); - UpdateTenantSettingsResponseContent response = client.tenants() - .settings() - .update(UpdateTenantSettingsRequestContent.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" - + " \"change_password\": {\n" - + " \"enabled\": true,\n" - + " \"html\": \"html\"\n" - + " },\n" - + " \"guardian_mfa_page\": {\n" - + " \"enabled\": true,\n" - + " \"html\": \"html\"\n" - + " },\n" - + " \"default_audience\": \"default_audience\",\n" - + " \"default_directory\": \"default_directory\",\n" - + " \"error_page\": {\n" - + " \"html\": \"html\",\n" - + " \"show_log_link\": true,\n" - + " \"url\": \"url\"\n" - + " },\n" - + " \"device_flow\": {\n" - + " \"charset\": \"base20\",\n" - + " \"mask\": \"mask\"\n" - + " },\n" - + " \"default_token_quota\": {\n" - + " \"clients\": {\n" - + " \"client_credentials\": {}\n" - + " },\n" - + " \"organizations\": {\n" - + " \"client_credentials\": {}\n" - + " }\n" - + " },\n" - + " \"flags\": {\n" - + " \"change_pwd_flow_v1\": true,\n" - + " \"enable_apis_section\": true,\n" - + " \"disable_impersonation\": true,\n" - + " \"enable_client_connections\": true,\n" - + " \"enable_pipeline2\": true,\n" - + " \"allow_legacy_delegation_grant_types\": true,\n" - + " \"allow_legacy_ro_grant_types\": true,\n" - + " \"allow_legacy_tokeninfo_endpoint\": true,\n" - + " \"enable_legacy_profile\": true,\n" - + " \"enable_idtoken_api2\": true,\n" - + " \"enable_public_signup_user_exists_error\": true,\n" - + " \"enable_sso\": true,\n" - + " \"allow_changing_enable_sso\": true,\n" - + " \"disable_clickjack_protection_headers\": true,\n" - + " \"no_disclose_enterprise_connections\": true,\n" - + " \"enforce_client_authentication_on_passwordless_start\": true,\n" - + " \"enable_adfs_waad_email_verification\": true,\n" - + " \"revoke_refresh_token_grant\": true,\n" - + " \"dashboard_log_streams_next\": true,\n" - + " \"dashboard_insights_view\": true,\n" - + " \"disable_fields_map_fix\": true,\n" - + " \"mfa_show_factor_list_on_enrollment\": true,\n" - + " \"remove_alg_from_jwks\": true,\n" - + " \"improved_signup_bot_detection_in_classic\": true,\n" - + " \"genai_trial\": true,\n" - + " \"enable_dynamic_client_registration\": true,\n" - + " \"disable_management_api_sms_obfuscation\": true,\n" - + " \"trust_azure_adfs_email_verified_connection_property\": true,\n" - + " \"custom_domains_provisioning\": true\n" - + " },\n" - + " \"friendly_name\": \"friendly_name\",\n" - + " \"picture_url\": \"picture_url\",\n" - + " \"support_email\": \"support_email\",\n" - + " \"support_url\": \"support_url\",\n" - + " \"allowed_logout_urls\": [\n" - + " \"allowed_logout_urls\"\n" - + " ],\n" - + " \"session_lifetime\": 1.1,\n" - + " \"idle_session_lifetime\": 1.1,\n" - + " \"ephemeral_session_lifetime\": 1.1,\n" - + " \"idle_ephemeral_session_lifetime\": 1.1,\n" - + " \"sandbox_version\": \"sandbox_version\",\n" - + " \"legacy_sandbox_version\": \"legacy_sandbox_version\",\n" - + " \"sandbox_versions_available\": [\n" - + " \"sandbox_versions_available\"\n" - + " ],\n" - + " \"default_redirection_uri\": \"default_redirection_uri\",\n" - + " \"enabled_locales\": [\n" - + " \"am\"\n" - + " ],\n" - + " \"session_cookie\": {\n" - + " \"mode\": \"persistent\"\n" - + " },\n" - + " \"sessions\": {\n" - + " \"oidc_logout_prompt_enabled\": true\n" - + " },\n" - + " \"oidc_logout\": {\n" - + " \"rp_logout_end_session_endpoint_discovery\": true\n" - + " },\n" - + " \"allow_organization_name_in_authentication_api\": true,\n" - + " \"customize_mfa_in_postlogin_action\": true,\n" - + " \"acr_values_supported\": [\n" - + " \"acr_values_supported\"\n" - + " ],\n" - + " \"mtls\": {\n" - + " \"enable_endpoint_aliases\": true\n" - + " },\n" - + " \"pushed_authorization_requests_supported\": true,\n" - + " \"authorization_response_iss_parameter_supported\": true,\n" - + " \"skip_non_verifiable_callback_uri_confirmation_prompt\": true,\n" - + " \"resource_parameter_profile\": \"audience\",\n" - + " \"phone_consolidated_experience\": true,\n" - + " \"enable_ai_guide\": true\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 || !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/TestClient.java b/src/test/java/com/auth0/client/mgmt/TestClient.java deleted file mode 100644 index 784f33e39..000000000 --- a/src/test/java/com/auth0/client/mgmt/TestClient.java +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt; - -public final class TestClient { - public void test() { - // Add tests here and mark this file in .fernignore - assert true; - } -} diff --git a/src/test/java/com/auth0/client/mgmt/TicketsWireTest.java b/src/test/java/com/auth0/client/mgmt/TicketsWireTest.java deleted file mode 100644 index 1d0b1e8e6..000000000 --- a/src/test/java/com/auth0/client/mgmt/TicketsWireTest.java +++ /dev/null @@ -1,215 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.ChangePasswordTicketRequestContent; -import com.auth0.client.mgmt.types.ChangePasswordTicketResponseContent; -import com.auth0.client.mgmt.types.VerifyEmailTicketRequestContent; -import com.auth0.client.mgmt.types.VerifyEmailTicketResponseContent; -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 TicketsWireTest { - 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 testVerifyEmail() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"ticket\":\"ticket\"}")); - VerifyEmailTicketResponseContent response = client.tickets() - .verifyEmail(VerifyEmailTicketRequestContent.builder() - .userId("user_id") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"user_id\": \"user_id\"\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" + " \"ticket\": \"ticket\"\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 testChangePassword() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"ticket\":\"ticket\"}")); - ChangePasswordTicketResponseContent response = client.tickets() - .changePassword(ChangePasswordTicketRequestContent.builder().build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", 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" + " \"ticket\": \"ticket\"\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 || !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/TokenExchangeProfilesWireTest.java b/src/test/java/com/auth0/client/mgmt/TokenExchangeProfilesWireTest.java deleted file mode 100644 index 23739b5f7..000000000 --- a/src/test/java/com/auth0/client/mgmt/TokenExchangeProfilesWireTest.java +++ /dev/null @@ -1,296 +0,0 @@ -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; -import com.auth0.client.mgmt.types.GetTokenExchangeProfileResponseContent; -import com.auth0.client.mgmt.types.TokenExchangeProfileResponseContent; -import com.auth0.client.mgmt.types.TokenExchangeProfileTypeEnum; -import com.auth0.client.mgmt.types.TokenExchangeProfilesListRequest; -import com.auth0.client.mgmt.types.UpdateTokenExchangeProfileRequestContent; -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 TokenExchangeProfilesWireTest { - 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\",\"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)) - .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\",\"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\"}")); - CreateTokenExchangeProfileResponseContent response = client.tokenExchangeProfiles() - .create(CreateTokenExchangeProfileRequestContent.builder() - .name("name") - .subjectTokenType("subject_token_type") - .actionId("action_id") - .type(TokenExchangeProfileTypeEnum.CUSTOM_AUTHENTICATION) - .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" - + " \"subject_token_type\": \"subject_token_type\",\n" - + " \"action_id\": \"action_id\",\n" - + " \"type\": \"custom_authentication\"\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" - + " \"subject_token_type\": \"subject_token_type\",\n" - + " \"action_id\": \"action_id\",\n" - + " \"type\": \"custom_authentication\",\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\",\"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\"}")); - GetTokenExchangeProfileResponseContent response = - client.tokenExchangeProfiles().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" - + " \"subject_token_type\": \"subject_token_type\",\n" - + " \"action_id\": \"action_id\",\n" - + " \"type\": \"custom_authentication\",\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.tokenExchangeProfiles().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("{}")); - client.tokenExchangeProfiles() - .update("id", UpdateTokenExchangeProfileRequestContent.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"); - } - } - - /** - * 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 || !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/UserAttributeProfilesWireTest.java b/src/test/java/com/auth0/client/mgmt/UserAttributeProfilesWireTest.java deleted file mode 100644 index 8e8cac459..000000000 --- a/src/test/java/com/auth0/client/mgmt/UserAttributeProfilesWireTest.java +++ /dev/null @@ -1,536 +0,0 @@ -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; -import com.auth0.client.mgmt.types.GetUserAttributeProfileResponseContent; -import com.auth0.client.mgmt.types.GetUserAttributeProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.ListUserAttributeProfileRequestParameters; -import com.auth0.client.mgmt.types.ListUserAttributeProfileTemplateResponseContent; -import com.auth0.client.mgmt.types.UpdateUserAttributeProfileRequestContent; -import com.auth0.client.mgmt.types.UpdateUserAttributeProfileResponseContent; -import com.auth0.client.mgmt.types.UserAttributeProfile; -import com.auth0.client.mgmt.types.UserAttributeProfileUserAttributeAdditionalProperties; -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 UserAttributeProfilesWireTest { - 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\",\"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)) - .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\",\"user_id\":{\"oidc_mapping\":\"sub\",\"saml_mapping\":[\"saml_mapping\"],\"scim_mapping\":\"scim_mapping\"},\"user_attributes\":{\"key\":{\"description\":\"description\",\"label\":\"label\",\"profile_required\":true,\"auth0_mapping\":\"auth0_mapping\",\"oidc_mapping\":{\"mapping\":\"mapping\"},\"saml_mapping\":[\"saml_mapping\"],\"scim_mapping\":\"scim_mapping\"}}}")); - CreateUserAttributeProfileResponseContent response = client.userAttributeProfiles() - .create(CreateUserAttributeProfileRequestContent.builder() - .name("name") - .userAttributes(new HashMap() { - { - put( - "key", - UserAttributeProfileUserAttributeAdditionalProperties.builder() - .description("description") - .label("label") - .profileRequired(true) - .auth0Mapping("auth0_mapping") - .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" - + " \"user_attributes\": {\n" - + " \"key\": {\n" - + " \"description\": \"description\",\n" - + " \"label\": \"label\",\n" - + " \"profile_required\": true,\n" - + " \"auth0_mapping\": \"auth0_mapping\"\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" - + " \"user_id\": {\n" - + " \"oidc_mapping\": \"sub\",\n" - + " \"saml_mapping\": [\n" - + " \"saml_mapping\"\n" - + " ],\n" - + " \"scim_mapping\": \"scim_mapping\"\n" - + " },\n" - + " \"user_attributes\": {\n" - + " \"key\": {\n" - + " \"description\": \"description\",\n" - + " \"label\": \"label\",\n" - + " \"profile_required\": true,\n" - + " \"auth0_mapping\": \"auth0_mapping\",\n" - + " \"oidc_mapping\": {\n" - + " \"mapping\": \"mapping\"\n" - + " },\n" - + " \"saml_mapping\": [\n" - + " \"saml_mapping\"\n" - + " ],\n" - + " \"scim_mapping\": \"scim_mapping\"\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 testListTemplates() throws Exception { - server.enqueue(new MockResponse() - .setResponseCode(200) - .setBody("{\"user_attribute_profile_templates\":[{\"id\":\"id\",\"display_name\":\"display_name\"}]}")); - ListUserAttributeProfileTemplateResponseContent response = - client.userAttributeProfiles().listTemplates(); - 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" - + " \"user_attribute_profile_templates\": [\n" - + " {\n" - + " \"id\": \"id\",\n" - + " \"display_name\": \"display_name\"\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 testGetTemplate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"display_name\":\"display_name\",\"template\":{\"name\":\"name\",\"user_id\":{\"oidc_mapping\":\"sub\",\"saml_mapping\":[\"saml_mapping\"],\"scim_mapping\":\"scim_mapping\"},\"user_attributes\":{\"key\":{\"description\":\"description\",\"label\":\"label\",\"profile_required\":true,\"auth0_mapping\":\"auth0_mapping\"}}}}")); - GetUserAttributeProfileTemplateResponseContent response = - client.userAttributeProfiles().getTemplate("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" - + " \"display_name\": \"display_name\",\n" - + " \"template\": {\n" - + " \"name\": \"name\",\n" - + " \"user_id\": {\n" - + " \"oidc_mapping\": \"sub\",\n" - + " \"saml_mapping\": [\n" - + " \"saml_mapping\"\n" - + " ],\n" - + " \"scim_mapping\": \"scim_mapping\"\n" - + " },\n" - + " \"user_attributes\": {\n" - + " \"key\": {\n" - + " \"description\": \"description\",\n" - + " \"label\": \"label\",\n" - + " \"profile_required\": true,\n" - + " \"auth0_mapping\": \"auth0_mapping\"\n" - + " }\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 testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"name\":\"name\",\"user_id\":{\"oidc_mapping\":\"sub\",\"saml_mapping\":[\"saml_mapping\"],\"scim_mapping\":\"scim_mapping\"},\"user_attributes\":{\"key\":{\"description\":\"description\",\"label\":\"label\",\"profile_required\":true,\"auth0_mapping\":\"auth0_mapping\",\"oidc_mapping\":{\"mapping\":\"mapping\"},\"saml_mapping\":[\"saml_mapping\"],\"scim_mapping\":\"scim_mapping\"}}}")); - GetUserAttributeProfileResponseContent response = - client.userAttributeProfiles().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" - + " \"user_id\": {\n" - + " \"oidc_mapping\": \"sub\",\n" - + " \"saml_mapping\": [\n" - + " \"saml_mapping\"\n" - + " ],\n" - + " \"scim_mapping\": \"scim_mapping\"\n" - + " },\n" - + " \"user_attributes\": {\n" - + " \"key\": {\n" - + " \"description\": \"description\",\n" - + " \"label\": \"label\",\n" - + " \"profile_required\": true,\n" - + " \"auth0_mapping\": \"auth0_mapping\",\n" - + " \"oidc_mapping\": {\n" - + " \"mapping\": \"mapping\"\n" - + " },\n" - + " \"saml_mapping\": [\n" - + " \"saml_mapping\"\n" - + " ],\n" - + " \"scim_mapping\": \"scim_mapping\"\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.userAttributeProfiles().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\",\"user_id\":{\"oidc_mapping\":\"sub\",\"saml_mapping\":[\"saml_mapping\"],\"scim_mapping\":\"scim_mapping\"},\"user_attributes\":{\"key\":{\"description\":\"description\",\"label\":\"label\",\"profile_required\":true,\"auth0_mapping\":\"auth0_mapping\",\"oidc_mapping\":{\"mapping\":\"mapping\"},\"saml_mapping\":[\"saml_mapping\"],\"scim_mapping\":\"scim_mapping\"}}}")); - UpdateUserAttributeProfileResponseContent response = client.userAttributeProfiles() - .update("id", UpdateUserAttributeProfileRequestContent.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" - + " \"user_id\": {\n" - + " \"oidc_mapping\": \"sub\",\n" - + " \"saml_mapping\": [\n" - + " \"saml_mapping\"\n" - + " ],\n" - + " \"scim_mapping\": \"scim_mapping\"\n" - + " },\n" - + " \"user_attributes\": {\n" - + " \"key\": {\n" - + " \"description\": \"description\",\n" - + " \"label\": \"label\",\n" - + " \"profile_required\": true,\n" - + " \"auth0_mapping\": \"auth0_mapping\",\n" - + " \"oidc_mapping\": {\n" - + " \"mapping\": \"mapping\"\n" - + " },\n" - + " \"saml_mapping\": [\n" - + " \"saml_mapping\"\n" - + " ],\n" - + " \"scim_mapping\": \"scim_mapping\"\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 || !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/UserBlocksWireTest.java b/src/test/java/com/auth0/client/mgmt/UserBlocksWireTest.java deleted file mode 100644 index a3092c1df..000000000 --- a/src/test/java/com/auth0/client/mgmt/UserBlocksWireTest.java +++ /dev/null @@ -1,211 +0,0 @@ -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; -import com.auth0.client.mgmt.types.ListUserBlocksRequestParameters; -import com.auth0.client.mgmt.types.ListUserBlocksResponseContent; -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 UserBlocksWireTest { - 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 testListByIdentifier() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"blocked_for\":[{\"identifier\":\"identifier\",\"ip\":\"ip\",\"connection\":\"connection\"}]}")); - ListUserBlocksByIdentifierResponseContent response = client.userBlocks() - .listByIdentifier(ListUserBlocksByIdentifierRequestParameters.builder() - .identifier("identifier") - .considerBruteForceEnablement(OptionalNullable.of(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"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"blocked_for\": [\n" - + " {\n" - + " \"identifier\": \"identifier\",\n" - + " \"ip\": \"ip\",\n" - + " \"connection\": \"connection\"\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 testDeleteByIdentifier() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.userBlocks() - .deleteByIdentifier(DeleteUserBlocksByIdentifierRequestParameters.builder() - .identifier("identifier") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("DELETE", request.getMethod()); - } - - @Test - public void testList() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"blocked_for\":[{\"identifier\":\"identifier\",\"ip\":\"ip\",\"connection\":\"connection\"}]}")); - ListUserBlocksResponseContent response = client.userBlocks() - .list( - "id", - ListUserBlocksRequestParameters.builder() - .considerBruteForceEnablement(OptionalNullable.of(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"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"blocked_for\": [\n" - + " {\n" - + " \"identifier\": \"identifier\",\n" - + " \"ip\": \"ip\",\n" - + " \"connection\": \"connection\"\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.userBlocks().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 || !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/UserGrantsWireTest.java b/src/test/java/com/auth0/client/mgmt/UserGrantsWireTest.java deleted file mode 100644 index e6c9fd695..000000000 --- a/src/test/java/com/auth0/client/mgmt/UserGrantsWireTest.java +++ /dev/null @@ -1,115 +0,0 @@ -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; -import com.auth0.client.mgmt.types.UserGrant; -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 UserGrantsWireTest { - 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( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"grants\":[{\"id\":\"id\",\"clientID\":\"clientID\",\"user_id\":\"user_id\",\"audience\":\"audience\",\"scope\":[\"scope\"]}]}")); - 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")) - .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 testDeleteByUserId() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.userGrants() - .deleteByUserId(DeleteUserGrantByUserIdRequestParameters.builder() - .userId("user_id") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("DELETE", request.getMethod()); - } - - @Test - public void testDelete() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.userGrants().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 || !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/UsersAuthenticationMethodsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersAuthenticationMethodsWireTest.java deleted file mode 100644 index beebfa05c..000000000 --- a/src/test/java/com/auth0/client/mgmt/UsersAuthenticationMethodsWireTest.java +++ /dev/null @@ -1,501 +0,0 @@ -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; -import com.auth0.client.mgmt.types.CreatedUserAuthenticationMethodTypeEnum; -import com.auth0.client.mgmt.types.GetUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.SetUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.SetUserAuthenticationMethods; -import com.auth0.client.mgmt.types.UpdateUserAuthenticationMethodResponseContent; -import com.auth0.client.mgmt.types.UserAuthenticationMethod; -import com.auth0.client.mgmt.users.types.CreateUserAuthenticationMethodRequestContent; -import com.auth0.client.mgmt.users.types.ListUserAuthenticationMethodsRequestParameters; -import com.auth0.client.mgmt.users.types.UpdateUserAuthenticationMethodRequestContent; -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 UsersAuthenticationMethodsWireTest { - 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( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"authenticators\":[{\"id\":\"id\",\"type\":\"recovery-code\",\"confirmed\":true,\"name\":\"name\",\"authentication_methods\":[{}],\"preferred_authentication_method\":\"voice\",\"link_id\":\"link_id\",\"phone_number\":\"phone_number\",\"email\":\"email\",\"key_id\":\"key_id\",\"public_key\":\"public_key\",\"created_at\":\"2024-01-15T09:30:00Z\",\"enrolled_at\":\"2024-01-15T09:30:00Z\",\"last_auth_at\":\"2024-01-15T09:30:00Z\",\"credential_device_type\":\"credential_device_type\",\"credential_backed_up\":true,\"identity_user_id\":\"identity_user_id\",\"user_agent\":\"user_agent\",\"aaguid\":\"aaguid\",\"relying_party_identifier\":\"relying_party_identifier\"}]}")); - SyncPagingIterable response = client.users() - .authenticationMethods() - .list( - "id", - ListUserAuthenticationMethodsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(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 - } - - @Test - public void testCreate() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"type\":\"phone\",\"name\":\"name\",\"totp_secret\":\"totp_secret\",\"phone_number\":\"phone_number\",\"email\":\"email\",\"authentication_methods\":[{\"type\":\"totp\",\"id\":\"id\"}],\"preferred_authentication_method\":\"voice\",\"key_id\":\"key_id\",\"public_key\":\"public_key\",\"aaguid\":\"aaguid\",\"relying_party_identifier\":\"relying_party_identifier\",\"created_at\":\"2024-01-15T09:30:00Z\"}")); - CreateUserAuthenticationMethodResponseContent response = client.users() - .authenticationMethods() - .create( - "id", - CreateUserAuthenticationMethodRequestContent.builder() - .type(CreatedUserAuthenticationMethodTypeEnum.PHONE) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"type\": \"phone\"\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" - + " \"type\": \"phone\",\n" - + " \"name\": \"name\",\n" - + " \"totp_secret\": \"totp_secret\",\n" - + " \"phone_number\": \"phone_number\",\n" - + " \"email\": \"email\",\n" - + " \"authentication_methods\": [\n" - + " {\n" - + " \"type\": \"totp\",\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ],\n" - + " \"preferred_authentication_method\": \"voice\",\n" - + " \"key_id\": \"key_id\",\n" - + " \"public_key\": \"public_key\",\n" - + " \"aaguid\": \"aaguid\",\n" - + " \"relying_party_identifier\": \"relying_party_identifier\",\n" - + " \"created_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 testSet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "[{\"id\":\"id\",\"type\":\"phone\",\"name\":\"name\",\"totp_secret\":\"totp_secret\",\"phone_number\":\"phone_number\",\"email\":\"email\",\"authentication_methods\":[{}],\"preferred_authentication_method\":\"voice\",\"key_id\":\"key_id\",\"public_key\":\"public_key\",\"aaguid\":\"aaguid\",\"relying_party_identifier\":\"relying_party_identifier\",\"created_at\":\"2024-01-15T09:30:00Z\"}]")); - List response = client.users() - .authenticationMethods() - .set( - "id", - Arrays.asList(SetUserAuthenticationMethods.builder() - .type(AuthenticationTypeEnum.PHONE) - .build())); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("PUT", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "[\n" + " {\n" + " \"type\": \"phone\"\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" - + " \"id\": \"id\",\n" - + " \"type\": \"phone\",\n" - + " \"name\": \"name\",\n" - + " \"totp_secret\": \"totp_secret\",\n" - + " \"phone_number\": \"phone_number\",\n" - + " \"email\": \"email\",\n" - + " \"authentication_methods\": [\n" - + " {}\n" - + " ],\n" - + " \"preferred_authentication_method\": \"voice\",\n" - + " \"key_id\": \"key_id\",\n" - + " \"public_key\": \"public_key\",\n" - + " \"aaguid\": \"aaguid\",\n" - + " \"relying_party_identifier\": \"relying_party_identifier\",\n" - + " \"created_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 testDeleteAll() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.users().authenticationMethods().deleteAll("id"); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("DELETE", request.getMethod()); - } - - @Test - public void testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"id\":\"id\",\"type\":\"recovery-code\",\"confirmed\":true,\"name\":\"name\",\"authentication_methods\":[{\"type\":\"totp\",\"id\":\"id\"}],\"preferred_authentication_method\":\"voice\",\"link_id\":\"link_id\",\"phone_number\":\"phone_number\",\"email\":\"email\",\"key_id\":\"key_id\",\"public_key\":\"public_key\",\"created_at\":\"2024-01-15T09:30:00Z\",\"enrolled_at\":\"2024-01-15T09:30:00Z\",\"last_auth_at\":\"2024-01-15T09:30:00Z\",\"credential_device_type\":\"credential_device_type\",\"credential_backed_up\":true,\"identity_user_id\":\"identity_user_id\",\"user_agent\":\"user_agent\",\"aaguid\":\"aaguid\",\"relying_party_identifier\":\"relying_party_identifier\"}")); - GetUserAuthenticationMethodResponseContent response = - client.users().authenticationMethods().get("id", "authentication_method_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" - + " \"type\": \"recovery-code\",\n" - + " \"confirmed\": true,\n" - + " \"name\": \"name\",\n" - + " \"authentication_methods\": [\n" - + " {\n" - + " \"type\": \"totp\",\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ],\n" - + " \"preferred_authentication_method\": \"voice\",\n" - + " \"link_id\": \"link_id\",\n" - + " \"phone_number\": \"phone_number\",\n" - + " \"email\": \"email\",\n" - + " \"key_id\": \"key_id\",\n" - + " \"public_key\": \"public_key\",\n" - + " \"created_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"enrolled_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"last_auth_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"credential_device_type\": \"credential_device_type\",\n" - + " \"credential_backed_up\": true,\n" - + " \"identity_user_id\": \"identity_user_id\",\n" - + " \"user_agent\": \"user_agent\",\n" - + " \"aaguid\": \"aaguid\",\n" - + " \"relying_party_identifier\": \"relying_party_identifier\"\n" - + "}"; - JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); - JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); - Assertions.assertTrue( - jsonEquals(expectedResponseNode, actualResponseNode), - "Response body structure does not match expected"); - if (actualResponseNode.has("type") || actualResponseNode.has("_type") || actualResponseNode.has("kind")) { - String discriminator = null; - if (actualResponseNode.has("type")) - discriminator = actualResponseNode.get("type").asText(); - else if (actualResponseNode.has("_type")) - discriminator = actualResponseNode.get("_type").asText(); - else if (actualResponseNode.has("kind")) - discriminator = actualResponseNode.get("kind").asText(); - Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); - Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); - } - - if (!actualResponseNode.isNull()) { - Assertions.assertTrue( - actualResponseNode.isObject() || actualResponseNode.isArray() || actualResponseNode.isValueNode(), - "response should be a valid JSON value"); - } - - if (actualResponseNode.isArray()) { - Assertions.assertTrue(actualResponseNode.size() >= 0, "Array should have valid size"); - } - if (actualResponseNode.isObject()) { - Assertions.assertTrue(actualResponseNode.size() >= 0, "Object should have valid field count"); - } - } - - @Test - public void testDelete() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.users().authenticationMethods().delete("id", "authentication_method_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\",\"type\":\"phone\",\"name\":\"name\",\"totp_secret\":\"totp_secret\",\"phone_number\":\"phone_number\",\"email\":\"email\",\"authentication_methods\":[{\"type\":\"totp\",\"id\":\"id\"}],\"preferred_authentication_method\":\"voice\",\"key_id\":\"key_id\",\"public_key\":\"public_key\",\"aaguid\":\"aaguid\",\"relying_party_identifier\":\"relying_party_identifier\",\"created_at\":\"2024-01-15T09:30:00Z\"}")); - UpdateUserAuthenticationMethodResponseContent response = client.users() - .authenticationMethods() - .update( - "id", - "authentication_method_id", - UpdateUserAuthenticationMethodRequestContent.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" - + " \"type\": \"phone\",\n" - + " \"name\": \"name\",\n" - + " \"totp_secret\": \"totp_secret\",\n" - + " \"phone_number\": \"phone_number\",\n" - + " \"email\": \"email\",\n" - + " \"authentication_methods\": [\n" - + " {\n" - + " \"type\": \"totp\",\n" - + " \"id\": \"id\"\n" - + " }\n" - + " ],\n" - + " \"preferred_authentication_method\": \"voice\",\n" - + " \"key_id\": \"key_id\",\n" - + " \"public_key\": \"public_key\",\n" - + " \"aaguid\": \"aaguid\",\n" - + " \"relying_party_identifier\": \"relying_party_identifier\",\n" - + " \"created_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 || !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/UsersAuthenticatorsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersAuthenticatorsWireTest.java deleted file mode 100644 index 21aca011f..000000000 --- a/src/test/java/com/auth0/client/mgmt/UsersAuthenticatorsWireTest.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -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 UsersAuthenticatorsWireTest { - 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 testDeleteAll() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.users().authenticators().deleteAll("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 || !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/UsersConnectedAccountsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersConnectedAccountsWireTest.java deleted file mode 100644 index f0db4daf3..000000000 --- a/src/test/java/com/auth0/client/mgmt/UsersConnectedAccountsWireTest.java +++ /dev/null @@ -1,92 +0,0 @@ -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; -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 UsersConnectedAccountsWireTest { - 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( - "{\"connected_accounts\":[{\"id\":\"id\",\"connection\":\"connection\",\"connection_id\":\"connection_id\",\"strategy\":\"strategy\",\"access_type\":\"offline\",\"scopes\":[\"scopes\"],\"created_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\"}],\"next\":\"next\"}")); - SyncPagingIterable response = client.users() - .connectedAccounts() - .list( - "id", - GetUserConnectedAccountsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(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 || !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/UsersEnrollmentsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersEnrollmentsWireTest.java deleted file mode 100644 index 638ae54ce..000000000 --- a/src/test/java/com/auth0/client/mgmt/UsersEnrollmentsWireTest.java +++ /dev/null @@ -1,125 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.UsersEnrollment; -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 UsersEnrollmentsWireTest { - 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( - "[{\"id\":\"id\",\"status\":\"pending\",\"type\":\"type\",\"name\":\"name\",\"identifier\":\"identifier\",\"phone_number\":\"phone_number\",\"auth_method\":\"authenticator\",\"enrolled_at\":\"2024-01-15T09:30:00Z\",\"last_auth\":\"2024-01-15T09:30:00Z\"}]")); - List response = client.users().enrollments().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" - + " {\n" - + " \"id\": \"id\",\n" - + " \"status\": \"pending\",\n" - + " \"type\": \"type\",\n" - + " \"name\": \"name\",\n" - + " \"identifier\": \"identifier\",\n" - + " \"phone_number\": \"phone_number\",\n" - + " \"auth_method\": \"authenticator\",\n" - + " \"enrolled_at\": \"2024-01-15T09:30:00Z\",\n" - + " \"last_auth\": \"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"); - } - } - - /** - * 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 || !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/UsersFederatedConnectionsTokensetsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersFederatedConnectionsTokensetsWireTest.java deleted file mode 100644 index 26be964bb..000000000 --- a/src/test/java/com/auth0/client/mgmt/UsersFederatedConnectionsTokensetsWireTest.java +++ /dev/null @@ -1,132 +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 || !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 deleted file mode 100644 index 3113a4410..000000000 --- a/src/test/java/com/auth0/client/mgmt/UsersGroupsWireTest.java +++ /dev/null @@ -1,94 +0,0 @@ -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; -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 UsersGroupsWireTest { - 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( - "{\"groups\":[{\"id\":\"id\",\"name\":\"name\",\"external_id\":\"external_id\",\"connection_id\":\"connection_id\",\"organization_id\":\"organization_id\",\"tenant_name\":\"tenant_name\",\"description\":\"description\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\",\"membership_created_at\":\"2024-01-15T09:30:00Z\"}],\"next\":\"next\",\"start\":1.1,\"limit\":1.1,\"total\":1.1}")); - SyncPagingIterable response = client.users() - .groups() - .get( - "id", - GetUserGroupsRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(true)) - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(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 || !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/UsersIdentitiesWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersIdentitiesWireTest.java deleted file mode 100644 index 91b03f63b..000000000 --- a/src/test/java/com/auth0/client/mgmt/UsersIdentitiesWireTest.java +++ /dev/null @@ -1,236 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.DeleteUserIdentityResponseContentItem; -import com.auth0.client.mgmt.types.UserIdentity; -import com.auth0.client.mgmt.types.UserIdentityProviderEnum; -import com.auth0.client.mgmt.users.types.LinkUserIdentityRequestContent; -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 UsersIdentitiesWireTest { - 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 testLink() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "[{\"connection\":\"connection\",\"user_id\":\"user_id\",\"provider\":\"provider\",\"profileData\":{\"email\":\"email\",\"email_verified\":true,\"name\":\"name\",\"username\":\"username\",\"given_name\":\"given_name\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"family_name\":\"family_name\"},\"isSocial\":true,\"access_token\":\"access_token\",\"access_token_secret\":\"access_token_secret\",\"refresh_token\":\"refresh_token\"}]")); - List response = client.users() - .identities() - .link("id", LinkUserIdentityRequestContent.builder().build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", 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" - + " {\n" - + " \"connection\": \"connection\",\n" - + " \"user_id\": \"user_id\",\n" - + " \"provider\": \"provider\",\n" - + " \"profileData\": {\n" - + " \"email\": \"email\",\n" - + " \"email_verified\": true,\n" - + " \"name\": \"name\",\n" - + " \"username\": \"username\",\n" - + " \"given_name\": \"given_name\",\n" - + " \"phone_number\": \"phone_number\",\n" - + " \"phone_verified\": true,\n" - + " \"family_name\": \"family_name\"\n" - + " },\n" - + " \"isSocial\": true,\n" - + " \"access_token\": \"access_token\",\n" - + " \"access_token_secret\": \"access_token_secret\",\n" - + " \"refresh_token\": \"refresh_token\"\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( - "[{\"connection\":\"connection\",\"user_id\":\"user_id\",\"provider\":\"provider\",\"isSocial\":true,\"access_token\":\"access_token\",\"access_token_secret\":\"access_token_secret\",\"refresh_token\":\"refresh_token\",\"profileData\":{\"email\":\"email\",\"email_verified\":true,\"name\":\"name\",\"username\":\"username\",\"given_name\":\"given_name\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"family_name\":\"family_name\"}}]")); - List response = - client.users().identities().delete("id", UserIdentityProviderEnum.AD, "user_id"); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("DELETE", request.getMethod()); - - // Validate response body - Assertions.assertNotNull(response, "Response should not be null"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "[\n" - + " {\n" - + " \"connection\": \"connection\",\n" - + " \"user_id\": \"user_id\",\n" - + " \"provider\": \"provider\",\n" - + " \"isSocial\": true,\n" - + " \"access_token\": \"access_token\",\n" - + " \"access_token_secret\": \"access_token_secret\",\n" - + " \"refresh_token\": \"refresh_token\",\n" - + " \"profileData\": {\n" - + " \"email\": \"email\",\n" - + " \"email_verified\": true,\n" - + " \"name\": \"name\",\n" - + " \"username\": \"username\",\n" - + " \"given_name\": \"given_name\",\n" - + " \"phone_number\": \"phone_number\",\n" - + " \"phone_verified\": true,\n" - + " \"family_name\": \"family_name\"\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 || !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/UsersLogsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersLogsWireTest.java deleted file mode 100644 index 313971d36..000000000 --- a/src/test/java/com/auth0/client/mgmt/UsersLogsWireTest.java +++ /dev/null @@ -1,94 +0,0 @@ -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; -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 UsersLogsWireTest { - 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( - "{\"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.users() - .logs() - .list( - "id", - ListUserLogsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .sort(OptionalNullable.of("sort")) - .includeTotals(OptionalNullable.of(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 || !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/UsersMultifactorWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersMultifactorWireTest.java deleted file mode 100644 index 4abfafddb..000000000 --- a/src/test/java/com/auth0/client/mgmt/UsersMultifactorWireTest.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.UserMultifactorProviderEnum; -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 UsersMultifactorWireTest { - 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 testInvalidateRememberBrowser() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.users().multifactor().invalidateRememberBrowser("id"); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - } - - @Test - public void testDeleteProvider() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.users().multifactor().deleteProvider("id", UserMultifactorProviderEnum.DUO); - 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 || !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/UsersOrganizationsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersOrganizationsWireTest.java deleted file mode 100644 index 825b41ce5..000000000 --- a/src/test/java/com/auth0/client/mgmt/UsersOrganizationsWireTest.java +++ /dev/null @@ -1,93 +0,0 @@ -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; -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 UsersOrganizationsWireTest { - 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( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"organizations\":[{\"id\":\"id\",\"name\":\"name\",\"display_name\":\"display_name\",\"token_quota\":{\"client_credentials\":{}}}]}")); - SyncPagingIterable response = client.users() - .organizations() - .list( - "id", - ListUserOrganizationsRequestParameters.builder() - .page(OptionalNullable.of(1)) - .perPage(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(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 || !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/UsersPermissionsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersPermissionsWireTest.java deleted file mode 100644 index 9e0d464e7..000000000 --- a/src/test/java/com/auth0/client/mgmt/UsersPermissionsWireTest.java +++ /dev/null @@ -1,207 +0,0 @@ -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; -import com.auth0.client.mgmt.users.types.CreateUserPermissionsRequestContent; -import com.auth0.client.mgmt.users.types.DeleteUserPermissionsRequestContent; -import com.auth0.client.mgmt.users.types.ListUserPermissionsRequestParameters; -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 UsersPermissionsWireTest { - 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( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"permissions\":[{\"resource_server_identifier\":\"resource_server_identifier\",\"permission_name\":\"permission_name\",\"resource_server_name\":\"resource_server_name\",\"description\":\"description\"}]}")); - SyncPagingIterable response = client.users() - .permissions() - .list( - "id", - ListUserPermissionsRequestParameters.builder() - .perPage(OptionalNullable.of(1)) - .page(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(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 - } - - @Test - public void testCreate() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.users() - .permissions() - .create( - "id", - CreateUserPermissionsRequestContent.builder() - .permissions(Arrays.asList(PermissionRequestPayload.builder() - .resourceServerIdentifier("resource_server_identifier") - .permissionName("permission_name") - .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" - + " \"permissions\": [\n" - + " {\n" - + " \"resource_server_identifier\": \"resource_server_identifier\",\n" - + " \"permission_name\": \"permission_name\"\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 testDelete() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.users() - .permissions() - .delete( - "id", - DeleteUserPermissionsRequestContent.builder() - .permissions(Arrays.asList(PermissionRequestPayload.builder() - .resourceServerIdentifier("resource_server_identifier") - .permissionName("permission_name") - .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" - + " \"permissions\": [\n" - + " {\n" - + " \"resource_server_identifier\": \"resource_server_identifier\",\n" - + " \"permission_name\": \"permission_name\"\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. - * 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 || !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/UsersRefreshTokenWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersRefreshTokenWireTest.java deleted file mode 100644 index 8c32af79f..000000000 --- a/src/test/java/com/auth0/client/mgmt/UsersRefreshTokenWireTest.java +++ /dev/null @@ -1,101 +0,0 @@ -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; -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 UsersRefreshTokenWireTest { - 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( - "{\"tokens\":[{\"id\":\"id\",\"user_id\":\"user_id\",\"created_at\":\"2024-01-15T09:30:00Z\",\"idle_expires_at\":\"2024-01-15T09:30:00Z\",\"expires_at\":\"2024-01-15T09:30:00Z\",\"client_id\":\"client_id\",\"session_id\":\"session_id\",\"rotating\":true,\"resource_servers\":[{}],\"refresh_token_metadata\":{\"key\":\"value\"},\"last_exchanged_at\":\"2024-01-15T09:30:00Z\"}],\"next\":\"next\"}")); - SyncPagingIterable response = client.users() - .refreshToken() - .list( - "user_id", - ListRefreshTokensRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(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 testDelete() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.users().refreshToken().delete("user_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 || !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/UsersRiskAssessmentsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersRiskAssessmentsWireTest.java deleted file mode 100644 index cf0daca1b..000000000 --- a/src/test/java/com/auth0/client/mgmt/UsersRiskAssessmentsWireTest.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.auth0.client.mgmt; - -import com.auth0.client.mgmt.core.ObjectMappers; -import com.auth0.client.mgmt.types.AssessorsTypeEnum; -import com.auth0.client.mgmt.users.types.ClearAssessorsRequestContent; -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 UsersRiskAssessmentsWireTest { - 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 testClear() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.users() - .riskAssessments() - .clear( - "id", - ClearAssessorsRequestContent.builder() - .connection("connection") - .assessors(Arrays.asList(AssessorsTypeEnum.NEW_DEVICE)) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" - + "{\n" - + " \"connection\": \"connection\",\n" - + " \"assessors\": [\n" - + " \"new-device\"\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. - * 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 || !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/UsersRolesWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersRolesWireTest.java deleted file mode 100644 index 2e34e4cd3..000000000 --- a/src/test/java/com/auth0/client/mgmt/UsersRolesWireTest.java +++ /dev/null @@ -1,184 +0,0 @@ -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; -import com.auth0.client.mgmt.users.types.DeleteUserRolesRequestContent; -import com.auth0.client.mgmt.users.types.ListUserRolesRequestParameters; -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 UsersRolesWireTest { - 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( - "{\"start\":1.1,\"limit\":1.1,\"total\":1.1,\"roles\":[{\"id\":\"id\",\"name\":\"name\",\"description\":\"description\"}]}")); - SyncPagingIterable response = client.users() - .roles() - .list( - "id", - ListUserRolesRequestParameters.builder() - .perPage(OptionalNullable.of(1)) - .page(OptionalNullable.of(1)) - .includeTotals(OptionalNullable.of(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 - } - - @Test - public void testAssign() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.users() - .roles() - .assign( - "id", - AssignUserRolesRequestContent.builder() - .roles(Arrays.asList("roles")) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"roles\": [\n" + " \"roles\"\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 testDelete() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.users() - .roles() - .delete( - "id", - DeleteUserRolesRequestContent.builder() - .roles(Arrays.asList("roles")) - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("DELETE", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"roles\": [\n" + " \"roles\"\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. - * 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 || !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/UsersSessionsWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersSessionsWireTest.java deleted file mode 100644 index 9f8ca2a66..000000000 --- a/src/test/java/com/auth0/client/mgmt/UsersSessionsWireTest.java +++ /dev/null @@ -1,101 +0,0 @@ -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; -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 UsersSessionsWireTest { - 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( - "{\"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\"}")); - SyncPagingIterable response = client.users() - .sessions() - .list( - "user_id", - ListUserSessionsRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(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 testDelete() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.users().sessions().delete("user_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 || !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/UsersWireTest.java b/src/test/java/com/auth0/client/mgmt/UsersWireTest.java deleted file mode 100644 index 7a51dccfe..000000000 --- a/src/test/java/com/auth0/client/mgmt/UsersWireTest.java +++ /dev/null @@ -1,610 +0,0 @@ -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.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.ListUsersByEmailRequestParameters; -import com.auth0.client.mgmt.types.ListUsersRequestParameters; -import com.auth0.client.mgmt.types.RegenerateUsersRecoveryCodeResponseContent; -import com.auth0.client.mgmt.types.RevokeUserAccessRequestContent; -import com.auth0.client.mgmt.types.SearchEngineVersionsEnum; -import com.auth0.client.mgmt.types.UpdateUserRequestContent; -import com.auth0.client.mgmt.types.UpdateUserResponseContent; -import com.auth0.client.mgmt.types.UserResponseSchema; -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 UsersWireTest { - 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( - "{\"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\":\"created_at\",\"updated_at\":\"updated_at\",\"identities\":[{}],\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"picture\":\"picture\",\"name\":\"name\",\"nickname\":\"nickname\",\"multifactor\":[\"multifactor\"],\"last_ip\":\"last_ip\",\"last_login\":\"last_login\",\"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)) - .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( - "{\"user_id\":\"user_id\",\"email\":\"email\",\"email_verified\":true,\"username\":\"username\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"created_at\":\"created_at\",\"updated_at\":\"updated_at\",\"identities\":[{\"connection\":\"connection\",\"user_id\":\"user_id\",\"provider\":\"ad\",\"isSocial\":true,\"access_token\":\"access_token\",\"access_token_secret\":\"access_token_secret\",\"refresh_token\":\"refresh_token\"}],\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"picture\":\"picture\",\"name\":\"name\",\"nickname\":\"nickname\",\"multifactor\":[\"multifactor\"],\"last_ip\":\"last_ip\",\"last_login\":\"last_login\",\"logins_count\":1,\"blocked\":true,\"given_name\":\"given_name\",\"family_name\":\"family_name\"}")); - CreateUserResponseContent response = client.users() - .create(CreateUserRequestContent.builder() - .connection("connection") - .build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", request.getMethod()); - // Validate request body - String actualRequestBody = request.getBody().readUtf8(); - String expectedRequestBody = "" + "{\n" + " \"connection\": \"connection\"\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" - + " \"user_id\": \"user_id\",\n" - + " \"email\": \"email\",\n" - + " \"email_verified\": true,\n" - + " \"username\": \"username\",\n" - + " \"phone_number\": \"phone_number\",\n" - + " \"phone_verified\": true,\n" - + " \"created_at\": \"created_at\",\n" - + " \"updated_at\": \"updated_at\",\n" - + " \"identities\": [\n" - + " {\n" - + " \"connection\": \"connection\",\n" - + " \"user_id\": \"user_id\",\n" - + " \"provider\": \"ad\",\n" - + " \"isSocial\": true,\n" - + " \"access_token\": \"access_token\",\n" - + " \"access_token_secret\": \"access_token_secret\",\n" - + " \"refresh_token\": \"refresh_token\"\n" - + " }\n" - + " ],\n" - + " \"app_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"user_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"picture\": \"picture\",\n" - + " \"name\": \"name\",\n" - + " \"nickname\": \"nickname\",\n" - + " \"multifactor\": [\n" - + " \"multifactor\"\n" - + " ],\n" - + " \"last_ip\": \"last_ip\",\n" - + " \"last_login\": \"last_login\",\n" - + " \"logins_count\": 1,\n" - + " \"blocked\": true,\n" - + " \"given_name\": \"given_name\",\n" - + " \"family_name\": \"family_name\"\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 testListUsersByEmail() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "[{\"user_id\":\"user_id\",\"email\":\"email\",\"email_verified\":true,\"username\":\"username\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"created_at\":\"created_at\",\"updated_at\":\"updated_at\",\"identities\":[{}],\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"picture\":\"picture\",\"name\":\"name\",\"nickname\":\"nickname\",\"multifactor\":[\"multifactor\"],\"last_ip\":\"last_ip\",\"last_login\":\"last_login\",\"logins_count\":1,\"blocked\":true,\"given_name\":\"given_name\",\"family_name\":\"family_name\"}]")); - List response = client.users() - .listUsersByEmail(ListUsersByEmailRequestParameters.builder() - .email("email") - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(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"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "[\n" - + " {\n" - + " \"user_id\": \"user_id\",\n" - + " \"email\": \"email\",\n" - + " \"email_verified\": true,\n" - + " \"username\": \"username\",\n" - + " \"phone_number\": \"phone_number\",\n" - + " \"phone_verified\": true,\n" - + " \"created_at\": \"created_at\",\n" - + " \"updated_at\": \"updated_at\",\n" - + " \"identities\": [\n" - + " {}\n" - + " ],\n" - + " \"app_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"user_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"picture\": \"picture\",\n" - + " \"name\": \"name\",\n" - + " \"nickname\": \"nickname\",\n" - + " \"multifactor\": [\n" - + " \"multifactor\"\n" - + " ],\n" - + " \"last_ip\": \"last_ip\",\n" - + " \"last_login\": \"last_login\",\n" - + " \"logins_count\": 1,\n" - + " \"blocked\": true,\n" - + " \"given_name\": \"given_name\",\n" - + " \"family_name\": \"family_name\"\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 testGet() throws Exception { - server.enqueue( - new MockResponse() - .setResponseCode(200) - .setBody( - "{\"user_id\":\"user_id\",\"email\":\"email\",\"email_verified\":true,\"username\":\"username\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"created_at\":\"created_at\",\"updated_at\":\"updated_at\",\"identities\":[{\"connection\":\"connection\",\"user_id\":\"user_id\",\"provider\":\"ad\",\"isSocial\":true,\"access_token\":\"access_token\",\"access_token_secret\":\"access_token_secret\",\"refresh_token\":\"refresh_token\"}],\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"picture\":\"picture\",\"name\":\"name\",\"nickname\":\"nickname\",\"multifactor\":[\"multifactor\"],\"last_ip\":\"last_ip\",\"last_login\":\"last_login\",\"logins_count\":1,\"blocked\":true,\"given_name\":\"given_name\",\"family_name\":\"family_name\"}")); - GetUserResponseContent response = client.users() - .get( - "id", - GetUserRequestParameters.builder() - .fields(OptionalNullable.of("fields")) - .includeFields(OptionalNullable.of(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"); - String actualResponseJson = objectMapper.writeValueAsString(response); - String expectedResponseBody = "" - + "{\n" - + " \"user_id\": \"user_id\",\n" - + " \"email\": \"email\",\n" - + " \"email_verified\": true,\n" - + " \"username\": \"username\",\n" - + " \"phone_number\": \"phone_number\",\n" - + " \"phone_verified\": true,\n" - + " \"created_at\": \"created_at\",\n" - + " \"updated_at\": \"updated_at\",\n" - + " \"identities\": [\n" - + " {\n" - + " \"connection\": \"connection\",\n" - + " \"user_id\": \"user_id\",\n" - + " \"provider\": \"ad\",\n" - + " \"isSocial\": true,\n" - + " \"access_token\": \"access_token\",\n" - + " \"access_token_secret\": \"access_token_secret\",\n" - + " \"refresh_token\": \"refresh_token\"\n" - + " }\n" - + " ],\n" - + " \"app_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"user_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"picture\": \"picture\",\n" - + " \"name\": \"name\",\n" - + " \"nickname\": \"nickname\",\n" - + " \"multifactor\": [\n" - + " \"multifactor\"\n" - + " ],\n" - + " \"last_ip\": \"last_ip\",\n" - + " \"last_login\": \"last_login\",\n" - + " \"logins_count\": 1,\n" - + " \"blocked\": true,\n" - + " \"given_name\": \"given_name\",\n" - + " \"family_name\": \"family_name\"\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().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( - "{\"user_id\":\"user_id\",\"email\":\"email\",\"email_verified\":true,\"username\":\"username\",\"phone_number\":\"phone_number\",\"phone_verified\":true,\"created_at\":\"created_at\",\"updated_at\":\"updated_at\",\"identities\":[{\"connection\":\"connection\",\"user_id\":\"user_id\",\"provider\":\"ad\",\"isSocial\":true,\"access_token\":\"access_token\",\"access_token_secret\":\"access_token_secret\",\"refresh_token\":\"refresh_token\"}],\"app_metadata\":{\"key\":\"value\"},\"user_metadata\":{\"key\":\"value\"},\"picture\":\"picture\",\"name\":\"name\",\"nickname\":\"nickname\",\"multifactor\":[\"multifactor\"],\"last_ip\":\"last_ip\",\"last_login\":\"last_login\",\"logins_count\":1,\"blocked\":true,\"given_name\":\"given_name\",\"family_name\":\"family_name\"}")); - UpdateUserResponseContent response = - client.users().update("id", UpdateUserRequestContent.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" - + " \"user_id\": \"user_id\",\n" - + " \"email\": \"email\",\n" - + " \"email_verified\": true,\n" - + " \"username\": \"username\",\n" - + " \"phone_number\": \"phone_number\",\n" - + " \"phone_verified\": true,\n" - + " \"created_at\": \"created_at\",\n" - + " \"updated_at\": \"updated_at\",\n" - + " \"identities\": [\n" - + " {\n" - + " \"connection\": \"connection\",\n" - + " \"user_id\": \"user_id\",\n" - + " \"provider\": \"ad\",\n" - + " \"isSocial\": true,\n" - + " \"access_token\": \"access_token\",\n" - + " \"access_token_secret\": \"access_token_secret\",\n" - + " \"refresh_token\": \"refresh_token\"\n" - + " }\n" - + " ],\n" - + " \"app_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"user_metadata\": {\n" - + " \"key\": \"value\"\n" - + " },\n" - + " \"picture\": \"picture\",\n" - + " \"name\": \"name\",\n" - + " \"nickname\": \"nickname\",\n" - + " \"multifactor\": [\n" - + " \"multifactor\"\n" - + " ],\n" - + " \"last_ip\": \"last_ip\",\n" - + " \"last_login\": \"last_login\",\n" - + " \"logins_count\": 1,\n" - + " \"blocked\": true,\n" - + " \"given_name\": \"given_name\",\n" - + " \"family_name\": \"family_name\"\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 testRegenerateRecoveryCode() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"recovery_code\":\"recovery_code\"}")); - RegenerateUsersRecoveryCodeResponseContent response = client.users().regenerateRecoveryCode("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" + " \"recovery_code\": \"recovery_code\"\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 testRevokeAccess() throws Exception { - server.enqueue(new MockResponse().setResponseCode(200).setBody("{}")); - client.users() - .revokeAccess("id", RevokeUserAccessRequestContent.builder().build()); - RecordedRequest request = server.takeRequest(); - Assertions.assertNotNull(request); - Assertions.assertEquals("POST", 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"); - } - } - - /** - * 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 || !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/VerifiableCredentialsVerificationTemplatesWireTest.java b/src/test/java/com/auth0/client/mgmt/VerifiableCredentialsVerificationTemplatesWireTest.java deleted file mode 100644 index a12778ae8..000000000 --- a/src/test/java/com/auth0/client/mgmt/VerifiableCredentialsVerificationTemplatesWireTest.java +++ /dev/null @@ -1,384 +0,0 @@ -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; -import com.auth0.client.mgmt.types.MdlPresentationProperties; -import com.auth0.client.mgmt.types.MdlPresentationRequest; -import com.auth0.client.mgmt.types.MdlPresentationRequestProperties; -import com.auth0.client.mgmt.types.UpdateVerifiableCredentialTemplateResponseContent; -import com.auth0.client.mgmt.types.VerifiableCredentialTemplateResponse; -import com.auth0.client.mgmt.verifiablecredentials.verification.types.CreateVerifiableCredentialTemplateRequestContent; -import com.auth0.client.mgmt.verifiablecredentials.verification.types.ListVerifiableCredentialTemplatesRequestParameters; -import com.auth0.client.mgmt.verifiablecredentials.verification.types.UpdateVerifiableCredentialTemplateRequestContent; -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 VerifiableCredentialsVerificationTemplatesWireTest { - 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\",\"templates\":[{\"id\":\"id\",\"name\":\"name\",\"type\":\"type\",\"dialect\":\"dialect\",\"presentation\":{\"org.iso.18013.5.1.mDL\":{\"org.iso.18013.5.1\":{}}},\"custom_certificate_authority\":\"custom_certificate_authority\",\"well_known_trusted_issuers\":\"well_known_trusted_issuers\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}]}")); - SyncPagingIterable response = client.verifiableCredentials() - .verification() - .templates() - .list(ListVerifiableCredentialTemplatesRequestParameters.builder() - .from(OptionalNullable.of("from")) - .take(OptionalNullable.of(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\",\"type\":\"type\",\"dialect\":\"dialect\",\"presentation\":{\"org.iso.18013.5.1.mDL\":{\"org.iso.18013.5.1\":{}}},\"custom_certificate_authority\":\"custom_certificate_authority\",\"well_known_trusted_issuers\":\"well_known_trusted_issuers\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); - CreateVerifiableCredentialTemplateResponseContent response = client.verifiableCredentials() - .verification() - .templates() - .create(CreateVerifiableCredentialTemplateRequestContent.builder() - .name("name") - .type("type") - .dialect("dialect") - .presentation(MdlPresentationRequest.builder() - .orgIso1801351MDl(MdlPresentationRequestProperties.builder() - .orgIso1801351(MdlPresentationProperties.builder() - .build()) - .build()) - .build()) - .wellKnownTrustedIssuers("well_known_trusted_issuers") - .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" - + " \"type\": \"type\",\n" - + " \"dialect\": \"dialect\",\n" - + " \"presentation\": {\n" - + " \"org.iso.18013.5.1.mDL\": {\n" - + " \"org.iso.18013.5.1\": {}\n" - + " }\n" - + " },\n" - + " \"well_known_trusted_issuers\": \"well_known_trusted_issuers\"\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" - + " \"type\": \"type\",\n" - + " \"dialect\": \"dialect\",\n" - + " \"presentation\": {\n" - + " \"org.iso.18013.5.1.mDL\": {\n" - + " \"org.iso.18013.5.1\": {}\n" - + " }\n" - + " },\n" - + " \"custom_certificate_authority\": \"custom_certificate_authority\",\n" - + " \"well_known_trusted_issuers\": \"well_known_trusted_issuers\",\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\",\"type\":\"type\",\"dialect\":\"dialect\",\"presentation\":{\"org.iso.18013.5.1.mDL\":{\"org.iso.18013.5.1\":{}}},\"custom_certificate_authority\":\"custom_certificate_authority\",\"well_known_trusted_issuers\":\"well_known_trusted_issuers\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); - GetVerifiableCredentialTemplateResponseContent response = - client.verifiableCredentials().verification().templates().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" - + " \"type\": \"type\",\n" - + " \"dialect\": \"dialect\",\n" - + " \"presentation\": {\n" - + " \"org.iso.18013.5.1.mDL\": {\n" - + " \"org.iso.18013.5.1\": {}\n" - + " }\n" - + " },\n" - + " \"custom_certificate_authority\": \"custom_certificate_authority\",\n" - + " \"well_known_trusted_issuers\": \"well_known_trusted_issuers\",\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.verifiableCredentials().verification().templates().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\",\"type\":\"type\",\"dialect\":\"dialect\",\"presentation\":{\"org.iso.18013.5.1.mDL\":{\"org.iso.18013.5.1\":{}}},\"custom_certificate_authority\":\"custom_certificate_authority\",\"well_known_trusted_issuers\":\"well_known_trusted_issuers\",\"created_at\":\"2024-01-15T09:30:00Z\",\"updated_at\":\"2024-01-15T09:30:00Z\"}")); - UpdateVerifiableCredentialTemplateResponseContent response = client.verifiableCredentials() - .verification() - .templates() - .update( - "id", - UpdateVerifiableCredentialTemplateRequestContent.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" - + " \"type\": \"type\",\n" - + " \"dialect\": \"dialect\",\n" - + " \"presentation\": {\n" - + " \"org.iso.18013.5.1.mDL\": {\n" - + " \"org.iso.18013.5.1\": {}\n" - + " }\n" - + " },\n" - + " \"custom_certificate_authority\": \"custom_certificate_authority\",\n" - + " \"well_known_trusted_issuers\": \"well_known_trusted_issuers\",\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 || !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/core/QueryStringMapperTest.java b/src/test/java/com/auth0/client/mgmt/core/QueryStringMapperTest.java deleted file mode 100644 index c0ff15223..000000000 --- a/src/test/java/com/auth0/client/mgmt/core/QueryStringMapperTest.java +++ /dev/null @@ -1,339 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.auth0.client.mgmt.core; - -import java.time.Instant; -import java.time.OffsetDateTime; -import java.time.ZoneId; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import okhttp3.HttpUrl; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class QueryStringMapperTest { - @Test - public void testObjectWithQuotedString_indexedArrays() { - Map map = new HashMap() { - { - put("hello", "\"world\""); - } - }; - - String expectedQueryString = "withquoted%5Bhello%5D=%22world%22"; - - String actualQueryString = queryString( - new HashMap() { - { - put("withquoted", map); - } - }, - false); - - Assertions.assertEquals(expectedQueryString, actualQueryString); - } - - @Test - public void testObjectWithQuotedString_arraysAsRepeats() { - Map map = new HashMap() { - { - put("hello", "\"world\""); - } - }; - - String expectedQueryString = "withquoted%5Bhello%5D=%22world%22"; - - String actualQueryString = queryString( - new HashMap() { - { - put("withquoted", map); - } - }, - true); - - Assertions.assertEquals(expectedQueryString, actualQueryString); - } - - @Test - public void testObject_indexedArrays() { - Map map = new HashMap() { - { - put("foo", "bar"); - put("baz", "qux"); - } - }; - - String expectedQueryString = "metadata%5Bfoo%5D=bar&metadata%5Bbaz%5D=qux"; - - String actualQueryString = queryString( - new HashMap() { - { - put("metadata", map); - } - }, - false); - - Assertions.assertEquals(expectedQueryString, actualQueryString); - } - - @Test - public void testObject_arraysAsRepeats() { - Map map = new HashMap() { - { - put("foo", "bar"); - put("baz", "qux"); - } - }; - - String expectedQueryString = "metadata%5Bfoo%5D=bar&metadata%5Bbaz%5D=qux"; - - String actualQueryString = queryString( - new HashMap() { - { - put("metadata", map); - } - }, - true); - - Assertions.assertEquals(expectedQueryString, actualQueryString); - } - - @Test - public void testNestedObject_indexedArrays() { - Map> nestedMap = new HashMap>() { - { - put("mapkey1", new HashMap() { - { - put("mapkey1mapkey1", "mapkey1mapkey1value"); - put("mapkey1mapkey2", "mapkey1mapkey2value"); - } - }); - put("mapkey2", new HashMap() { - { - put("mapkey2mapkey1", "mapkey2mapkey1value"); - } - }); - } - }; - - String expectedQueryString = - "nested%5Bmapkey2%5D%5Bmapkey2mapkey1%5D=mapkey2mapkey1value&nested%5Bmapkey1%5D%5Bmapkey1mapkey1" - + "%5D=mapkey1mapkey1value&nested%5Bmapkey1%5D%5Bmapkey1mapkey2%5D=mapkey1mapkey2value"; - - String actualQueryString = queryString( - new HashMap() { - { - put("nested", nestedMap); - } - }, - false); - - Assertions.assertEquals(expectedQueryString, actualQueryString); - } - - @Test - public void testNestedObject_arraysAsRepeats() { - Map> nestedMap = new HashMap>() { - { - put("mapkey1", new HashMap() { - { - put("mapkey1mapkey1", "mapkey1mapkey1value"); - put("mapkey1mapkey2", "mapkey1mapkey2value"); - } - }); - put("mapkey2", new HashMap() { - { - put("mapkey2mapkey1", "mapkey2mapkey1value"); - } - }); - } - }; - - String expectedQueryString = - "nested%5Bmapkey2%5D%5Bmapkey2mapkey1%5D=mapkey2mapkey1value&nested%5Bmapkey1%5D%5Bmapkey1mapkey1" - + "%5D=mapkey1mapkey1value&nested%5Bmapkey1%5D%5Bmapkey1mapkey2%5D=mapkey1mapkey2value"; - - String actualQueryString = queryString( - new HashMap() { - { - put("nested", nestedMap); - } - }, - true); - - Assertions.assertEquals(expectedQueryString, actualQueryString); - } - - @Test - public void testDateTime_indexedArrays() { - OffsetDateTime dateTime = - OffsetDateTime.ofInstant(Instant.ofEpochSecond(1740412107L), ZoneId.of("America/New_York")); - - String expectedQueryString = "datetime=2025-02-24T10%3A48%3A27-05%3A00"; - - String actualQueryString = queryString( - new HashMap() { - { - put("datetime", dateTime); - } - }, - false); - - Assertions.assertEquals(expectedQueryString, actualQueryString); - } - - @Test - public void testDateTime_arraysAsRepeats() { - OffsetDateTime dateTime = - OffsetDateTime.ofInstant(Instant.ofEpochSecond(1740412107L), ZoneId.of("America/New_York")); - - String expectedQueryString = "datetime=2025-02-24T10%3A48%3A27-05%3A00"; - - String actualQueryString = queryString( - new HashMap() { - { - put("datetime", dateTime); - } - }, - true); - - Assertions.assertEquals(expectedQueryString, actualQueryString); - } - - @Test - public void testObjectArray_indexedArrays() { - List> mapArray = new ArrayList>() { - { - add(new HashMap() { - { - put("key", "hello"); - put("value", "world"); - } - }); - add(new HashMap() { - { - put("key", "foo"); - put("value", "bar"); - } - }); - add(new HashMap<>()); - } - }; - - String expectedQueryString = "objects%5B0%5D%5Bvalue%5D=world&objects%5B0%5D%5Bkey%5D=hello&objects%5B1%5D" - + "%5Bvalue%5D=bar&objects%5B1%5D%5Bkey%5D=foo"; - - String actualQueryString = queryString( - new HashMap() { - { - put("objects", mapArray); - } - }, - false); - - Assertions.assertEquals(expectedQueryString, actualQueryString); - } - - @Test - public void testObjectArray_arraysAsRepeats() { - List> mapArray = new ArrayList>() { - { - add(new HashMap() { - { - put("key", "hello"); - put("value", "world"); - } - }); - add(new HashMap() { - { - put("key", "foo"); - put("value", "bar"); - } - }); - add(new HashMap<>()); - } - }; - - String expectedQueryString = - "objects%5Bvalue%5D=world&objects%5Bkey%5D=hello&objects%5Bvalue" + "%5D=bar&objects%5Bkey%5D=foo"; - - String actualQueryString = queryString( - new HashMap() { - { - put("objects", mapArray); - } - }, - true); - - Assertions.assertEquals(expectedQueryString, actualQueryString); - } - - @Test - public void testObjectWithArray_indexedArrays() { - Map objectWithArray = new HashMap() { - { - put("id", "abc123"); - put("contactIds", new ArrayList() { - { - add("id1"); - add("id2"); - add("id3"); - } - }); - } - }; - - String expectedQueryString = - "objectwitharray%5Bid%5D=abc123&objectwitharray%5BcontactIds%5D%5B0%5D=id1&objectwitharray" - + "%5BcontactIds%5D%5B1%5D=id2&objectwitharray%5BcontactIds%5D%5B2%5D=id3"; - - String actualQueryString = queryString( - new HashMap() { - { - put("objectwitharray", objectWithArray); - } - }, - false); - - Assertions.assertEquals(expectedQueryString, actualQueryString); - } - - @Test - public void testObjectWithArray_arraysAsRepeats() { - Map objectWithArray = new HashMap() { - { - put("id", "abc123"); - put("contactIds", new ArrayList() { - { - add("id1"); - add("id2"); - add("id3"); - } - }); - } - }; - - String expectedQueryString = "objectwitharray%5Bid%5D=abc123&objectwitharray%5BcontactIds" - + "%5D=id1&objectwitharray%5BcontactIds%5D=id2&objectwitharray%5BcontactIds%5D=id3"; - - String actualQueryString = queryString( - new HashMap() { - { - put("objectwitharray", objectWithArray); - } - }, - true); - - Assertions.assertEquals(expectedQueryString, actualQueryString); - } - - private static String queryString(Map params, boolean arraysAsRepeats) { - HttpUrl.Builder httpUrl = HttpUrl.parse("http://www.fakewebsite.com/").newBuilder(); - params.forEach((paramName, paramValue) -> - QueryStringMapper.addQueryParameter(httpUrl, paramName, paramValue, arraysAsRepeats)); - return httpUrl.build().encodedQuery(); - } -} diff --git a/src/test/resources/action.json b/src/test/resources/action.json deleted file mode 100644 index e2b26f353..000000000 --- a/src/test/resources/action.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "id": "b430c838-7530-483b-9906-09aea2f8973a", - "name": "my action", - "supported_triggers": [ - { - "id": "post-login", - "version": "v2" - } - ], - "created_at": "2021-08-11T15:44:05.330221459Z", - "updated_at": "2021-08-16T20:24:57.108759345Z", - "code": "/**\n* Handler that will be called during the execution of a PostLogin flow.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\nexports.onExecutePostLogin = async (event, api) => {\n // var a = null;\n // a.boom(;)\n // throw new Error(\"oops\");\n console.log(\"testing updated!\");\n};\n\n\n/**\n* Handler that will be invoked when this action is resuming after an external redirect. If your\n* onExecutePostLogin function does not perform a redirect, this function can be safely ignored.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\n// exports.onContinuePostLogin = async (event, api) => {\n// };\n", - "dependencies": [ - { - "name": "slack-notify", - "version": "0.1.7" - } - ], - "runtime": "node16", - "status": "built", - "secrets": [ - { - "name": "secret-key-1", - "updated_at": "2021-08-12T17:09:42.071504554Z" - } - ], - "current_version": { - "id": "c4d1c41e-a14d-441a-bbbe-da50871f0ce90", - "code": "/**\n* Handler that will be called during the execution of a PostLogin flow.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\nexports.onExecutePostLogin = async (event, api) => {\n // var a = null;\n // a.boom(;)\n // throw new Error(\"oops\");\n console.log(\"testing updated!\");\n};\n\n\n/**\n* Handler that will be invoked when this action is resuming after an external redirect. If your\n* onExecutePostLogin function does not perform a redirect, this function can be safely ignored.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\n// exports.onContinuePostLogin = async (event, api) => {\n// };\n", - "runtime": "node16", - "status": "BUILT", - "number": 18, - "build_time": "2021-08-16T20:26:42.425146135Z", - "created_at": "2021-08-16T20:26:42.253086110Z", - "updated_at": "2021-08-16T20:26:42.427338891Z" - }, - "deployed_version": { - "code": "/**\n* Handler that will be called during the execution of a PostLogin flow.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\nexports.onExecutePostLogin = async (event, api) => {\n // var a = null;\n // a.boom(;)\n // throw new Error(\"oops\");\n console.log(\"testing updated!\");\n};\n\n\n/**\n* Handler that will be invoked when this action is resuming after an external redirect. If your\n* onExecutePostLogin function does not perform a redirect, this function can be safely ignored.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\n// exports.onContinuePostLogin = async (event, api) => {\n// };\n", - "dependencies": [ - { - "name": "slack-notify", - "version": "0.1.7" - } - ], - "id": "c4d1c41e-a14d-441a-77be-da51dbf0ce90", - "deployed": true, - "number": 18, - "built_at": "2021-08-16T20:26:42.425146135Z", - "secrets": [ - { - "name": "secret-key-1", - "updated_at": "2021-08-12T17:09:42.071504554Z" - } - ], - "status": "built", - "created_at": "2021-08-16T20:26:42.253086110Z", - "updated_at": "2021-08-16T20:26:42.427338891Z", - "runtime": "node16" - }, - "all_changes_deployed": true -} diff --git a/src/test/resources/action_execution.json b/src/test/resources/action_execution.json deleted file mode 100644 index c55d15446..000000000 --- a/src/test/resources/action_execution.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "id": "SBMzFjrcQ-uZMaaTkQ_EsTIwMjEwODE2", - "trigger_id": "post-login", - "status": "partial", - "results": [ - { - "binding_id": "18490d5b-7d34-42c5-a21d-37cb77c666a5", - "version_id": "fbc0chac-2863-4c47-8445-11c2881fd1e9", - "action_name": "first action - Updated - Updated", - "response": { - "error": { - "message": "oops", - "name": "Error" - }, - "stats": { - "total_request_duration_ms": 383, - "total_runtime_execution_duration_ms": 377, - "runtime_processing_duration_ms": 6, - "action_duration_ms": 40, - "runtime_external_call_duration_ms": 331, - "boot_duration_ms": 337, - "network_duration_ms": 6 - } - }, - "error": { - "id": "invalid_argument", - "msg": "Invalid Argument" - }, - "started_at": "2021-08-16T19:14:04.218396333Z", - "ended_at": "2021-08-16T19:14:04.602232335Z" - } - ], - "created_at": "2021-08-16T19:14:04.218386241Z", - "updated_at": "2021-08-16T19:14:04.218386241Z" -} diff --git a/src/test/resources/action_trigger_bindings.json b/src/test/resources/action_trigger_bindings.json deleted file mode 100644 index 681989abe..000000000 --- a/src/test/resources/action_trigger_bindings.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "bindings": [ - { - "id": "f6a992d9-d5f4-4e99-a869-6f1b43ed1955", - "trigger_id": "post-login", - "action": { - "id": "b430c838-7530-483b-b806-09aea2f8973a", - "name": "first action - Updated - Updated", - "supported_triggers": [ - { - "id": "post-login", - "version": "v2" - } - ], - "created_at": "2021-08-11T15:44:05.330221459Z", - "updated_at": "2021-08-16T20:24:57.101751726Z", - "current_version": { - "id": "1bfc9d7e-49db-4e3f-b026-3c1a77dc9a99", - "code": "/**\n* Handler that will be called during the execution of a PostLogin flow.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\nexports.onExecutePostLogin = async (event, api) => {\n // var a = null;\n // a.boom(;)\n // throw new Error(\"oops\");\n console.log(\"testing updated!\");\n};\n\n\n/**\n* Handler that will be invoked when this action is resuming after an external redirect. If your\n* onExecutePostLogin function does not perform a redirect, this function can be safely ignored.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\n// exports.onContinuePostLogin = async (event, api) => {\n// };\n", - "runtime": "node16", - "status": "BUILT", - "number": 19, - "build_time": "2021-08-17T20:34:25.421459622Z", - "created_at": "2021-08-17T20:34:25.304585709Z", - "updated_at": "2021-08-17T20:34:25.422251817Z" - }, - "deployed_version": { - "code": "/**\n* Handler that will be called during the execution of a PostLogin flow.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\nexports.onExecutePostLogin = async (event, api) => {\n // var a = null;\n // a.boom(;)\n // throw new Error(\"oops\");\n console.log(\"testing updated!\");\n};\n\n\n/**\n* Handler that will be invoked when this action is resuming after an external redirect. If your\n* onExecutePostLogin function does not perform a redirect, this function can be safely ignored.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\n// exports.onContinuePostLogin = async (event, api) => {\n// };\n", - "dependencies": [ - { - "name": "slack-notify", - "version": "0.1.7" - } - ], - "id": "1bfc9d7e-49db-4e3f-b026-3c1a77dc9a99", - "deployed": true, - "number": 19, - "built_at": "2021-08-17T20:34:25.421459622Z", - "secrets": [ - { - "name": "secret-key-1", - "updated_at": "2021-08-12T17:09:42.071504554Z" - } - ], - "status": "built", - "created_at": "2021-08-17T20:34:25.304585709Z", - "updated_at": "2021-08-17T20:34:25.422251817Z", - "runtime": "node16" - }, - "all_changes_deployed": false - }, - "created_at": "2021-08-16T20:21:06.548275270Z", - "updated_at": "2021-08-16T20:21:06.548275270Z", - "display_name": "first action - Updated - Updated" - } - ], - "total": 1, - "per_page": 20 -} diff --git a/src/test/resources/action_triggers.json b/src/test/resources/action_triggers.json deleted file mode 100644 index b5e82a34d..000000000 --- a/src/test/resources/action_triggers.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "triggers": [ - { - "id": "post-login", - "version": "v1", - "status": "DEPRECATED", - "runtimes": [ - "node12" - ], - "default_runtime": "node12" - }, - { - "id": "post-login", - "version": "v2", - "status": "CURRENT", - "runtimes": [ - "node12", - "node16" - ], - "default_runtime": "node16" - }, - { - "id": "credentials-exchange", - "version": "v1", - "status": "DEPRECATED", - "runtimes": [ - "node12" - ], - "default_runtime": "node12" - }, - { - "id": "credentials-exchange", - "version": "v2", - "status": "CURRENT", - "runtimes": [ - "node12", - "node16" - ], - "default_runtime": "node16" - }, - { - "id": "pre-user-registration", - "version": "v1", - "status": "DEPRECATED", - "runtimes": [ - "node12" - ], - "default_runtime": "node12" - }, - { - "id": "pre-user-registration", - "version": "v2", - "status": "CURRENT", - "runtimes": [ - "node12", - "node16" - ], - "default_runtime": "node16" - }, - { - "id": "post-user-registration", - "version": "v1", - "status": "DEPRECATED", - "runtimes": [ - "node12" - ], - "default_runtime": "node12" - }, - { - "id": "post-user-registration", - "version": "v2", - "status": "CURRENT", - "runtimes": [ - "node12", - "node16" - ], - "default_runtime": "node16" - }, - { - "id": "post-change-password", - "version": "v1", - "status": "DEPRECATED", - "runtimes": [ - "node12" - ], - "default_runtime": "node12" - }, - { - "id": "post-change-password", - "version": "v2", - "status": "CURRENT", - "runtimes": [ - "node12", - "node16" - ], - "default_runtime": "node16" - }, - { - "id": "send-phone-message", - "version": "v1", - "status": "DEPRECATED", - "runtimes": [ - "node12" - ] - }, - { - "id": "send-phone-message", - "version": "v2", - "status": "CURRENT", - "runtimes": [ - "node12", - "node16" - ], - "default_runtime": "node16" - } - ] -} diff --git a/src/test/resources/action_version.json b/src/test/resources/action_version.json deleted file mode 100644 index 71e7339a0..000000000 --- a/src/test/resources/action_version.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "code": "/**\n* Handler that will be called during the execution of a PostLogin flow.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\nexports.onExecutePostLogin = async (event, api) => {\n // var a = null;\n // a.boom(;)\n // throw new Error(\"oops\");\n console.log(\"testing updated!\");\n};\n\n\n/**\n* Handler that will be invoked when this action is resuming after an external redirect. If your\n* onExecutePostLogin function does not perform a redirect, this function can be safely ignored.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\n// exports.onContinuePostLogin = async (event, api) => {\n// };\n", - "dependencies": [ - { - "name": "slack-notify", - "version": "0.1.7" - } - ], - "id": "1bfc9d7e-49db-dd3f-b026-3c1a77dc9a99", - "deployed": false, - "number": 19, - "secrets": [ - { - "name": "secret-key-1", - "updated_at": "2021-08-12T17:09:42.071504554Z" - } - ], - "status": "built", - "created_at": "2021-08-17T20:34:25.304585709Z", - "updated_at": "2021-08-17T20:34:25.304585709Z", - "runtime": "node16", - "action": { - "id": "b430c838-7530-aa3b-b806-09aea2f8973a", - "name": "first action - Updated - Updated", - "supported_triggers": [ - { - "id": "post-login", - "version": "v2" - } - ], - "created_at": "2021-08-11T15:44:05.330221459Z", - "updated_at": "2021-08-16T20:24:57.101751726Z", - "current_version": { - "id": "f69a8376-580b-463a-a1fe-3a08bdd5153e", - "code": "/**\n* Handler that will be called during the execution of a PostLogin flow.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\nexports.onExecutePostLogin = async (event, api) => {\n // var a = null;\n // a.boom(;)\n // throw new Error(\"oops\");\n console.log(\"testing!\");\n};\n\n\n/**\n* Handler that will be invoked when this action is resuming after an external redirect. If your\n* onExecutePostLogin function does not perform a redirect, this function can be safely ignored.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\n// exports.onContinuePostLogin = async (event, api) => {\n// };\n", - "runtime": "node16", - "status": "BUILT", - "number": 15, - "build_time": "2021-08-16T20:24:10.450936369Z", - "created_at": "2021-08-16T20:24:10.269996405Z", - "updated_at": "2021-08-16T20:24:10.452885076Z" - }, - "deployed_version": { - "code": "/**\n* Handler that will be called during the execution of a PostLogin flow.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\nexports.onExecutePostLogin = async (event, api) => {\n // var a = null;\n // a.boom(;)\n // throw new Error(\"oops\");\n console.log(\"testing!\");\n};\n\n\n/**\n* Handler that will be invoked when this action is resuming after an external redirect. If your\n* onExecutePostLogin function does not perform a redirect, this function can be safely ignored.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\n// exports.onContinuePostLogin = async (event, api) => {\n// };\n", - "dependencies": [ - { - "name": "slack-notify", - "version": "0.1.7" - } - ], - "id": "f69a8376-580b-463a-a1fe-3a0ae6a5153e", - "deployed": true, - "number": 15, - "built_at": "2021-08-16T20:24:10.450936369Z", - "secrets": [ - { - "name": "secret-key-1", - "updated_at": "2021-08-12T17:09:42.071504554Z" - } - ], - "status": "built", - "created_at": "2021-08-16T20:24:10.269996405Z", - "updated_at": "2021-08-16T20:24:10.452885076Z", - "runtime": "node16" - }, - "all_changes_deployed": false - } -} diff --git a/src/test/resources/action_versions_list.json b/src/test/resources/action_versions_list.json deleted file mode 100644 index 739e33723..000000000 --- a/src/test/resources/action_versions_list.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "versions": [ - { - "code": "/**\n* Handler that will be called during the execution of a PostLogin flow.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\nexports.onExecutePostLogin = async (event, api) => {\n};\n\n\n/**\n* Handler that will be invoked when this action is resuming after an external redirect. If your\n* onExecutePostLogin function does not perform a redirect, this function can be safely ignored.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\n// exports.onContinuePostLogin = async (event, api) => {\n// };\n", - "dependencies": [], - "id": "a1fcaa98-1199-4403-8a45-9f3b6bf32a6e", - "deployed": true, - "number": 1, - "built_at": "2021-08-16T19:39:37.789535383Z", - "secrets": [], - "status": "built", - "created_at": "2021-08-16T19:39:37.655559720Z", - "updated_at": "2021-08-16T19:39:37.791508099Z", - "runtime": "node16", - "action": { - "id": "a80ae4c9-43c0-4301-9eb7-e9da7852022b", - "name": "new-action", - "supported_triggers": [ - { - "id": "post-login", - "version": "v2" - } - ], - "created_at": "2021-08-16T19:38:33.018980733Z", - "updated_at": "2021-08-16T19:38:33.018980733Z", - "all_changes_deployed": false - } - } - ], - "total": 1, - "per_page": 20 -} diff --git a/src/test/resources/actions_list.json b/src/test/resources/actions_list.json deleted file mode 100644 index 90309d9f0..000000000 --- a/src/test/resources/actions_list.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "actions": [ - { - "id": "b430c838-dd30-483b-b806-09aea2f8973a", - "name": "my action", - "supported_triggers": [ - { - "id": "post-login", - "version": "v2" - } - ], - "created_at": "2021-08-11T15:44:05.330221459Z", - "updated_at": "2021-08-16T20:24:57.108759345Z", - "code": "/**\n* Handler that will be called during the execution of a PostLogin flow.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\nexports.onExecutePostLogin = async (event, api) => {\n // var a = null;\n // a.boom(;)\n // throw new Error(\"oops\");\n console.log(\"testing updated!\");\n};\n\n\n/**\n* Handler that will be invoked when this action is resuming after an external redirect. If your\n* onExecutePostLogin function does not perform a redirect, this function can be safely ignored.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\n// exports.onContinuePostLogin = async (event, api) => {\n// };\n", - "dependencies": [ - { - "name": "slack-notify", - "version": "0.1.7" - } - ], - "runtime": "node16", - "status": "built", - "secrets": [ - { - "name": "secret-key-1", - "updated_at": "2021-08-12T17:09:42.071504554Z" - } - ], - "current_version": { - "id": "1bfaad7e-49db-4e3f-b026-3c1a77dc9a99", - "code": "/**\n* Handler that will be called during the execution of a PostLogin flow.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\nexports.onExecutePostLogin = async (event, api) => {\n // var a = null;\n // a.boom(;)\n // throw new Error(\"oops\");\n console.log(\"testing updated!\");\n};\n\n\n/**\n* Handler that will be invoked when this action is resuming after an external redirect. If your\n* onExecutePostLogin function does not perform a redirect, this function can be safely ignored.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\n// exports.onContinuePostLogin = async (event, api) => {\n// };\n", - "runtime": "node16", - "status": "BUILT", - "number": 19, - "build_time": "2021-08-17T20:34:25.421459622Z", - "created_at": "2021-08-17T20:34:25.304585709Z", - "updated_at": "2021-08-17T20:34:25.422251817Z" - }, - "deployed_version": { - "code": "/**\n* Handler that will be called during the execution of a PostLogin flow.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\nexports.onExecutePostLogin = async (event, api) => {\n // var a = null;\n // a.boom(;)\n // throw new Error(\"oops\");\n console.log(\"testing updated!\");\n};\n\n\n/**\n* Handler that will be invoked when this action is resuming after an external redirect. If your\n* onExecutePostLogin function does not perform a redirect, this function can be safely ignored.\n*\n* @param {Event} event - Details about the user and the context in which they are logging in.\n* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.\n*/\n// exports.onContinuePostLogin = async (event, api) => {\n// };\n", - "dependencies": [ - { - "name": "slack-notify", - "version": "0.1.7" - } - ], - "id": "1bfc9d7e-49db-4e3f-b026-3c1a77dc9a99", - "deployed": true, - "number": 19, - "built_at": "2021-08-17T20:34:25.421459622Z", - "secrets": [ - { - "name": "secret-key-1", - "updated_at": "2021-08-12T17:09:42.071504554Z" - } - ], - "status": "built", - "created_at": "2021-08-17T20:34:25.304585709Z", - "updated_at": "2021-08-17T20:34:25.422251817Z", - "runtime": "node16" - }, - "all_changes_deployed": true - }, - { - "id": "723c6134-1aac-4815-8720-5a65fbde2cd5", - "name": "another action", - "supported_triggers": [ - { - "id": "post-login", - "version": "v2" - } - ], - "created_at": "2021-08-12T17:57:21.154835734Z", - "updated_at": "2021-08-12T17:57:21.177990082Z", - "code": "module.exports = () => {}", - "dependencies": [ - { - "name": "lodash", - "version": "1.0.0" - } - ], - "runtime": "node12", - "status": "built", - "secrets": [ - { - "name": "mySecret", - "updated_at": "2021-08-12T17:57:21.177990082Z" - } - ], - "all_changes_deployed": false - } - ], - "total": 2 -} diff --git a/src/test/resources/active_users_count.json b/src/test/resources/active_users_count.json deleted file mode 100644 index d800886d9..000000000 --- a/src/test/resources/active_users_count.json +++ /dev/null @@ -1 +0,0 @@ -123 \ No newline at end of file diff --git a/src/test/resources/authenticator_method_by_id.json b/src/test/resources/authenticator_method_by_id.json deleted file mode 100644 index b76986a1e..000000000 --- a/src/test/resources/authenticator_method_by_id.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "id":"email|dev_7o0sei0Q5FJNLfk1", - "type":"email", - "confirmed":true, - "email":"****@pmes****", - "created_at":"2023-01-19T15:26:28.887Z" -} diff --git a/src/test/resources/authenticator_method_create.json b/src/test/resources/authenticator_method_create.json deleted file mode 100644 index 172cdc4a8..000000000 --- a/src/test/resources/authenticator_method_create.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "type":"email", - "created_at":"2023-01-19T15:21:44.014Z", - "email":"temp12@temp.com", - "id":"email|dev_CgJUhSQ6jqPiQAsJ" -} diff --git a/src/test/resources/authenticator_method_list.json b/src/test/resources/authenticator_method_list.json deleted file mode 100644 index 119011a1d..000000000 --- a/src/test/resources/authenticator_method_list.json +++ /dev/null @@ -1,43 +0,0 @@ -[ - { - "id": "phone|123", - "type": "phone", - "confirmed": true, - "phone_number": "XXXXXXXX0000", - "created_at": "2023-02-01T18:44:46.483Z", - "last_auth_at": "2023-02-07T20:29:33.547Z", - "preferred_authentication_method": "sms", - "credential_device_type": "single_device", - "credential_backed_up": true, - "identity_user_id": "identityId", - "user_agent": "userAgent", - "authentication_methods": [ - { - "id": "sms|id", - "type": "sms" - } - ] - }, - { - "id": "webauthn-platform|id", - "type": "webauthn-platform", - "confirmed": true, - "name": "name", - "created_at": "2023-02-01T18:44:50.304Z", - "last_auth_at": "2023-02-01T18:45:10.817Z", - "key_id": "xxxxxx-xxxx_xxxxxxxxxxxxxxx", - "public_key": "pubkey", - "relying_party_identifier": "tenant.auth0.com" - }, - { - "id": "webauthn-platform|id", - "type": "webauthn-platform", - "confirmed": true, - "name": "name", - "created_at": "2023-03-14T20:13:25.541Z", - "last_auth_at": "2023-03-14T20:13:32.834Z", - "key_id": "keyid", - "public_key": "pubkey", - "relying_party_identifier": "tenant.auth0.com" - } -] diff --git a/src/test/resources/authenticator_method_paged_list.json b/src/test/resources/authenticator_method_paged_list.json deleted file mode 100644 index 70ac22333..000000000 --- a/src/test/resources/authenticator_method_paged_list.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "authenticators": [ - { - "id": "phone|id", - "type": "phone", - "confirmed": true, - "phone_number": "XXXXXXXX0000", - "created_at": "2023-02-01T18:44:46.483Z", - "last_auth_at": "2023-02-07T20:29:33.547Z", - "preferred_authentication_method": "sms", - "authentication_methods": [ - { - "id": "sms|id", - "type": "sms" - } - ] - } - ], - "total": 3, - "start": 0, - "limit": 1 -} diff --git a/src/test/resources/authenticator_method_update.json b/src/test/resources/authenticator_method_update.json deleted file mode 100644 index b0e66c214..000000000 --- a/src/test/resources/authenticator_method_update.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "id":"email|dev_o05Io01uPXyvi87E", - "type":"email", - "email":"semp@pmes.com", - "created_at":"2023-01-19T15:23:29.156Z" - } -] diff --git a/src/test/resources/authenticator_method_update_by_id.json b/src/test/resources/authenticator_method_update_by_id.json deleted file mode 100644 index ed18fb154..000000000 --- a/src/test/resources/authenticator_method_update_by_id.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type":"email", - "name":"123temp@temp123.com", - "created_at":"2023-01-19T15:26:28.887Z", - "email":"semp@pmes.com", - "id":"email|dev_7o0sei0Q5FJNLfk1" -} diff --git a/src/test/resources/blacklisted_tokens_list.json b/src/test/resources/blacklisted_tokens_list.json deleted file mode 100644 index d78e92ad5..000000000 --- a/src/test/resources/blacklisted_tokens_list.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "aud": "1", - "jti": "1" - }, - { - "aud": "2", - "jti": "2" - } -] \ No newline at end of file diff --git a/src/test/resources/branding_login_template.json b/src/test/resources/branding_login_template.json deleted file mode 100644 index 1a682c5a2..000000000 --- a/src/test/resources/branding_login_template.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "body": "{%- auth0:head -%}{%- auth0:widget -%}" -} diff --git a/src/test/resources/branding_settings.json b/src/test/resources/branding_settings.json deleted file mode 100644 index 9c34d23f8..000000000 --- a/src/test/resources/branding_settings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors": { - "page_background": "#000000", - "primary": "#0E84F2" - }, - "logo_url": "https://test/logo.svg", - "favicon_url": "https://test/favicon.svg", - "font": { - "url": "https://test/font.ttf" - } -} diff --git a/src/test/resources/breached_password_settings.json b/src/test/resources/breached_password_settings.json deleted file mode 100644 index b3c1bce9f..000000000 --- a/src/test/resources/breached_password_settings.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "enabled": true, - "shields": [ - "block", - "admin_notification" - ], - "admin_notification_frequency": [ - "immediately", - "weekly" - ], - "method": "standard", - "stage": { - "pre-user-registration": { - "shields": [ - "admin_notification" - ] - } - } -} diff --git a/src/test/resources/brute_force_configuration.json b/src/test/resources/brute_force_configuration.json deleted file mode 100644 index 5295d1907..000000000 --- a/src/test/resources/brute_force_configuration.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "enabled": false, - "shields": [ - "block", - "user_notification" - ], - "allowlist": [ - "143.204.0.105", - "2600:9000:208f:ca00:d:f5f5:b40:93a1" - ], - "mode": "count_per_identifier_and_ip", - "max_attempts": 10 -} diff --git a/src/test/resources/client.json b/src/test/resources/client.json deleted file mode 100644 index 967c9104c..000000000 --- a/src/test/resources/client.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "name": "My 1 application", - "client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - "client_secret": "MG_TNT2ver-SylNat-_VeMmd-4m0Waba0jr1troztBniSChEw0glxEmgEi2Kw40H", - "logo_uri": "https://my.logo.com/uri", - "callbacks": [ - "https://domain.auth0.com/callback" - ], - "allowed_origins": [ - "https://domain.auth0.com" - ], - "client_aliases": [ - "https://domain.auth0.com" - ], - "allowed_clients": [ - "clientId1" - ], - "allowed_logout_urls": [ - "https://domain.auth0.com/logout" - ], - "token_endpoint_auth_method": "code", - "app_type": "native", - "oidc_conformant": false, - "jwt_configuration": { - "lifetime_in_seconds": 100, - "secret_encoded": true, - "scopes": {}, - "alg": "HS256" - }, - "encryption_key": { - "pub": "", - "cert": "" - }, - "sso": false, - "sso_disabled": false, - "custom_login_page_on": false, - "custom_login_page": "", - "custom_login_page_preview": "", - "form_template": "", - "is_heroku_app": false, - "addons": { - "rms": {}, - "slack": { - "team": "Auth0" - }, - "mscrm": {}, - "layer": {}, - "zoom": {} - }, - "client_metadata": {}, - "mobile": { - "android": { - "app_package_name": "com.example", - "sha256_cert_fingerprints": [ - "D8:A0:83:..." - ] - }, - "ios": { - "team_id": "9JA89QQLNQ", - "app_bundle_identifier": "com.my.bundle.id" - } - }, - "client_authentication_methods": { - "private_key_jwt": { - "credentials": [ { - "id": "cred_abc" - }] - }, - "self_signed_tls_client_auth": { - "credentials": [ { - "id": "cred_123" - }] - }, - "tls_client_auth": { - "credentials": [ { - "id": "cred_789" - }] - } - }, - "signed_request_object": { - "credentials": [ - { - "id": "cred_id", - "credential_type": "public_key", - "kid": "cred_kid", - "alg": "RS256", - "name": "My JAR credential", - "created_at": "2024-03-14T11:34:28.893Z", - "updated_at": "2024-03-14T11:34:28.893Z" - } - ] - }, - "compliance_level": "fapi1_adv_pkj_par", - "require_proof_of_possession": true, - "token_quota": { - "client_credentials": { - "per_day": 100, - "per_hour": 20, - "enforce": true - } - } -} diff --git a/src/test/resources/client_credential.json b/src/test/resources/client_credential.json deleted file mode 100644 index fa0f0fc2b..000000000 --- a/src/test/resources/client_credential.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "id": "cred_asqwXXXIIadqq2T3zAXPwv", - "name": "new cred", - "credential_type": "public_key", - "kid": "eKtBStP7BN2NiaoVrNGzb0QaRl4HlzyH1Lp00JB6Xj0", - "alg": "RS256", - "thumbprint": "thumb", - "created_at": "2023-04-13T16:18:01.481Z", - "updated_at": "2023-04-13T16:18:01.481Z", - "expires_at": "2023-04-13T16:19:00.349Z" -} diff --git a/src/test/resources/client_credential_list.json b/src/test/resources/client_credential_list.json deleted file mode 100644 index 59fa510de..000000000 --- a/src/test/resources/client_credential_list.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "id": "cred_asqwdTaebdqq2T3zAXPwv", - "name": "new cred", - "credential_type": "public_key", - "kid": "eKtBStP7BN2NV1MVrNGzb0QaRp0uHlzyH1Lje9JB6Xj0", - "alg": "RS256", - "thumbprint": "thumb", - "created_at": "2023-04-13T16:18:01.481Z", - "updated_at": "2023-04-13T16:18:01.481Z", - "expires_at": "2023-04-13T16:19:00.349Z" - } -] diff --git a/src/test/resources/client_grant.json b/src/test/resources/client_grant.json deleted file mode 100644 index 6219afec3..000000000 --- a/src/test/resources/client_grant.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "1", - "client_id": "clientId1", - "audience": "audience1", - "scope": [ - "openid", - "profile" - ] -} \ No newline at end of file diff --git a/src/test/resources/client_grants_list.json b/src/test/resources/client_grants_list.json deleted file mode 100644 index 9af244585..000000000 --- a/src/test/resources/client_grants_list.json +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "id": "1", - "client_id": "clientId1", - "audience": "audience1", - "scope": [ - "openid", - "profile" - ] - }, - { - "id": "2", - "client_id": "clientId2", - "audience": "audience2", - "scope": [ - "openid", - "profile" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/client_grants_paged_list.json b/src/test/resources/client_grants_paged_list.json deleted file mode 100644 index 03f08625f..000000000 --- a/src/test/resources/client_grants_paged_list.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "start": 0, - "length": 14, - "total": 14, - "limit": 50, - "client_grants": [ - { - "id": "1", - "client_id": "clientId1", - "audience": "audience1", - "scope": [ - "openid", - "profile" - ] - }, - { - "id": "2", - "client_id": "clientId2", - "audience": "audience2", - "scope": [ - "openid", - "profile" - ] - } - ] -} \ No newline at end of file diff --git a/src/test/resources/clients_list.json b/src/test/resources/clients_list.json deleted file mode 100644 index 208b5ff5a..000000000 --- a/src/test/resources/clients_list.json +++ /dev/null @@ -1,153 +0,0 @@ -[ - { - "name": "My 1 application", - "client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - "client_secret": "MG_TNT2ver-SylNat-_VeMmd-4m0Waba0jr1troztBniSChEw0glxEmgEi2Kw40H", - "logo_uri": "https://my.logo.com/uri", - "callbacks": [ - "https://domain.auth0.com/callback" - ], - "allowed_origins": [ - "https://domain.auth0.com" - ], - "client_aliases": [ - "https://domain.auth0.com" - ], - "allowed_clients": [ - "clientId1" - ], - "allowed_logout_urls": [ - "https://domain.auth0.com/logout" - ], - "token_endpoint_auth_method": "code", - "app_type": "native", - "oidc_conformant": false, - "jwt_configuration": { - "lifetime_in_seconds": 100, - "secret_encoded": true, - "scopes": {}, - "alg": "HS256" - }, - "encryption_key": { - "pub": "", - "cert": "" - }, - "sso": false, - "sso_disabled": false, - "custom_login_page_on": false, - "custom_login_page": "", - "custom_login_page_preview": "", - "form_template": "", - "is_heroku_app": false, - "tenant": "auth0", - "global": false, - "cross_origin_authentication": false, - "cross_origin_loc": "https://auth0.com/auth/callback-cross-auth", - "addons": { - "rms": {}, - "slack": { - "team": "Auth0" - }, - "mscrm": {}, - "layer": {}, - "zoom": {} - }, - "resource_servers": [ - { - "identifier": "api.tenant.com", - "scopes": [ - "read:something" - ] - } - ], - "client_metadata": {}, - "mobile": { - "android": { - "app_package_name": "com.example", - "sha256_cert_fingerprints": [ - "D8:A0:83:..." - ] - }, - "ios": { - "team_id": "9JA89QQLNQ", - "app_bundle_identifier": "com.my.bundle.id" - } - }, - "token_quota": { - "client_credentials": { - "per_day": 100, - "per_hour": 20, - "enforce": true - } - } - }, - { - "name": "My 2 application", - "client_id": "BbiyAPdpYdesoKnqjj8HJqRn4T5titww", - "client_secret": "MG_TNT2ver-SylNat-_VeMmd-4m0Waba0jr1troztBniSChEw0glxEmgEi2Kw40H", - "logo_uri": "https://my.logo.com/uri", - "callbacks": [ - "https://domain.auth0.com/callback" - ], - "allowed_origins": [ - "https://domain.auth0.com" - ], - "client_aliases": [ - "https://domain.auth0.com" - ], - "allowed_clients": [ - "clientId1" - ], - "allowed_logout_urls": [ - "https://domain.auth0.com/logout" - ], - "token_endpoint_auth_method": "code", - "app_type": "native", - "oidc_conformant": false, - "jwt_configuration": { - "lifetime_in_seconds": 100, - "secret_encoded": true, - "scopes": {}, - "alg": "HS256" - }, - "encryption_key": { - "pub": "", - "cert": "" - }, - "sso": false, - "sso_disabled": false, - "custom_login_page_on": false, - "custom_login_page": "", - "custom_login_page_preview": "", - "form_template": "", - "is_heroku_app": false, - "addons": { - "rms": {}, - "slack": {}, - "mscrm": {}, - "layer": {}, - "zoom": {} - }, - "resource_servers": [ - { - "identifier": "api.tenant.com", - "scopes": [ - "read:something" - ] - } - ], - "client_metadata": {}, - "mobile": { - "android": { - "app_package_name": "com.example", - "sha256_cert_fingerprints": [ - "D8:A0:83:..." - ] - }, - "ios": { - "team_id": "9JA89QQLNQ", - "app_bundle_identifier": "com.my.bundle.id" - } - } - } -] diff --git a/src/test/resources/clients_paged_list.json b/src/test/resources/clients_paged_list.json deleted file mode 100644 index 6097405f4..000000000 --- a/src/test/resources/clients_paged_list.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "start": 0, - "length": 14, - "total": 14, - "limit": 50, - "clients": [ - { - "name": "My 1 application", - "client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - "client_secret": "MG_TNT2ver-SylNat-_VeMmd-4m0Waba0jr1troztBniSChEw0glxEmgEi2Kw40H", - "logo_uri": "https://my.logo.com/uri", - "callbacks": [ - "https://domain.auth0.com/callback" - ], - "allowed_origins": [ - "https://domain.auth0.com" - ], - "client_aliases": [ - "https://domain.auth0.com" - ], - "allowed_clients": [ - "clientId1" - ], - "allowed_logout_urls": [ - "https://domain.auth0.com/logout" - ], - "token_endpoint_auth_method": "code", - "app_type": "native", - "oidc_conformant": false, - "jwt_configuration": { - "lifetime_in_seconds": 100, - "secret_encoded": true, - "scopes": {}, - "alg": "HS256" - }, - "encryption_key": { - "pub": "", - "cert": "" - }, - "sso": false, - "sso_disabled": false, - "custom_login_page_on": false, - "custom_login_page": "", - "custom_login_page_preview": "", - "form_template": "", - "is_heroku_app": false, - "addons": { - "rms": {}, - "slack": { - "team": "Auth0" - }, - "mscrm": {}, - "layer": {}, - "zoom": {} - }, - "resource_servers": [ - { - "identifier": "api.tenant.com", - "scopes": [ - "read:something" - ] - } - ], - "client_metadata": {}, - "mobile": { - "android": { - "app_package_name": "com.example", - "sha256_cert_fingerprints": [ - "D8:A0:83:..." - ] - }, - "ios": { - "team_id": "9JA89QQLNQ", - "app_bundle_identifier": "com.my.bundle.id" - } - } - }, - { - "name": "My 2 application", - "client_id": "BbiyAPdpYdesoKnqjj8HJqRn4T5titww", - "client_secret": "MG_TNT2ver-SylNat-_VeMmd-4m0Waba0jr1troztBniSChEw0glxEmgEi2Kw40H", - "logo_uri": "https://my.logo.com/uri", - "callbacks": [ - "https://domain.auth0.com/callback" - ], - "allowed_origins": [ - "https://domain.auth0.com" - ], - "client_aliases": [ - "https://domain.auth0.com" - ], - "allowed_clients": [ - "clientId1" - ], - "allowed_logout_urls": [ - "https://domain.auth0.com/logout" - ], - "token_endpoint_auth_method": "code", - "app_type": "native", - "oidc_conformant": false, - "jwt_configuration": { - "lifetime_in_seconds": 100, - "secret_encoded": true, - "scopes": {}, - "alg": "HS256" - }, - "encryption_key": { - "pub": "", - "cert": "" - }, - "sso": false, - "sso_disabled": false, - "custom_login_page_on": false, - "custom_login_page": "", - "custom_login_page_preview": "", - "form_template": "", - "is_heroku_app": false, - "addons": { - "rms": {}, - "slack": {}, - "mscrm": {}, - "layer": {}, - "zoom": {} - }, - "resource_servers": [ - { - "identifier": "api.tenant.com", - "scopes": [ - "read:something" - ] - } - ], - "client_metadata": {}, - "mobile": { - "android": { - "app_package_name": "com.example", - "sha256_cert_fingerprints": [ - "D8:A0:83:..." - ] - }, - "ios": { - "team_id": "9JA89QQLNQ", - "app_bundle_identifier": "com.my.bundle.id" - } - } - } - ] -} \ No newline at end of file diff --git a/src/test/resources/connection.json b/src/test/resources/connection.json deleted file mode 100644 index f2f51e098..000000000 --- a/src/test/resources/connection.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "My connection1", - "options": {}, - "id": "con_0000000000000001", - "strategy": "auth0", - "enabled_clients": [ - "avUAvH1pgnZGgAGlv8guZLPoaOnjVJsM", - "ScKKdrpyUwfkhOQP6KXItH32INgZf7Rb" - ], - "metadata": { - "key": "value" - }, - "is_domain_connection": true, - "show_as_button": true -} diff --git a/src/test/resources/connection_key.json b/src/test/resources/connection_key.json deleted file mode 100644 index 0e4a30720..000000000 --- a/src/test/resources/connection_key.json +++ /dev/null @@ -1,25 +0,0 @@ -[ - { - "kid": "kid-1", - "algorithm": "RS256", - "key_use": "signing", - "subject_dn": "/CN=cajwt", - "cert": "-----BEGIN CERTIFICATE-----\r\ncert-key-1\r\n-----END CERTIFICATE-----\r\n", - "fingerprint": "F1", - "thumbprint": "example-print", - "pkcs": "-----BEGIN PKCS7-----\r\npkcs-1\r\n-----END PKCS7-----\r\n", - "current": true, - "current_since": "2025-05-29T13:17:24.850Z" - }, - { - "kid": "kid-2", - "algorithm": "RS256", - "key_use": "signing", - "subject_dn": "/CN=cajwt", - "cert": "-----BEGIN CERTIFICATE-----\r\ncert-key-2\r\n-----END CERTIFICATE-----\r\n", - "fingerprint": "F2", - "thumbprint": "example-print", - "pkcs": "-----BEGIN PKCS7-----\r\npkcs-2\r\n-----END PKCS7-----\r\n", - "next": true - } -] diff --git a/src/test/resources/connection_scim_configuration.json b/src/test/resources/connection_scim_configuration.json deleted file mode 100644 index e975aba6f..000000000 --- a/src/test/resources/connection_scim_configuration.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "tenant_name": "dev-1", - "connection_id": "con_0000000000000001", - "connection_name": "New Connection", - "strategy": "okta", - "mapping": [ - { - "scim": "userName", - "auth0": "preferred_username" - }, - { - "scim": "emails[primary eq true].value", - "auth0": "email" - } - ], - "updated_on": "2025-01-22T11:56:24.461Z", - "created_at": "2025-01-22T11:56:24.461Z", - "user_id_attribute": "externalId" -} diff --git a/src/test/resources/connection_scim_token.json b/src/test/resources/connection_scim_token.json deleted file mode 100644 index 13de59eed..000000000 --- a/src/test/resources/connection_scim_token.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "token_id": "tok_000000001", - "token": "tok_iwioqiwoqoqiwqoiwqwi", - "scopes": [ - "get:users" - ], - "created_at": "2025-01-23T12:34:46.321Z", - "valid_until": "2025-01-23T12:51:26.321Z" -} diff --git a/src/test/resources/connection_scim_tokens.json b/src/test/resources/connection_scim_tokens.json deleted file mode 100644 index 421689d93..000000000 --- a/src/test/resources/connection_scim_tokens.json +++ /dev/null @@ -1,21 +0,0 @@ -[ - { - "token_id": "tok_000000001", - "created_at": "2025-01-23T12:34:46.321Z", - "scopes": [ - "get:users" - ], - "valid_until": "2025-01-23T12:51:26.321Z" - }, - { - "token_id": "tok_000000002", - "created_at": "2025-01-22T12:09:23.313Z", - "scopes": [ - "get:users", - "post:users", - "patch:users", - "delete:users", - "put:users" - ] - } -] diff --git a/src/test/resources/connections_list.json b/src/test/resources/connections_list.json deleted file mode 100644 index 88c471cc3..000000000 --- a/src/test/resources/connections_list.json +++ /dev/null @@ -1,25 +0,0 @@ -[ - { - "name": "My connection1", - "options": {}, - "id": "con_0000000000000001", - "strategy": "auth0", - "enabled_clients": [ - "avUAvH1pgnZGgAGlv8guZLPoaOnjVJsM", - "ScKKdrpyUwfkhOQP6KXItH32INgZf7Rb" - ], - "metadata": { - "key": "value" - } - }, - { - "name": "My connection2", - "options": {}, - "id": "con_0000000000000002", - "strategy": "auth0", - "enabled_clients": [ - "avUAvH1pgnZGgAGlv8guZLPoaOnjVJsM", - "ScKKdrpyUwfkhOQP6KXItH32INgZf7Rb" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/connections_paged_list.json b/src/test/resources/connections_paged_list.json deleted file mode 100644 index 1c2b8cd38..000000000 --- a/src/test/resources/connections_paged_list.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "start": 0, - "length": 14, - "total": 14, - "limit": 50, - "connections": [ - { - "name": "My connection1", - "options": {}, - "id": "con_0000000000000001", - "strategy": "auth0", - "enabled_clients": [ - "avUAvH1pgnZGgAGlv8guZLPoaOnjVJsM", - "ScKKdrpyUwfkhOQP6KXItH32INgZf7Rb" - ] - }, - { - "name": "My connection2", - "options": {}, - "id": "con_0000000000000002", - "strategy": "auth0", - "enabled_clients": [ - "avUAvH1pgnZGgAGlv8guZLPoaOnjVJsM", - "ScKKdrpyUwfkhOQP6KXItH32INgZf7Rb" - ] - } - ] -} diff --git a/src/test/resources/custom_text_prompt.json b/src/test/resources/custom_text_prompt.json deleted file mode 100644 index dd14ae925..000000000 --- a/src/test/resources/custom_text_prompt.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "signup": { - "description": "Sign up to access amazing features for my login domain" - } -} diff --git a/src/test/resources/daily_stats_list.json b/src/test/resources/daily_stats_list.json deleted file mode 100644 index 71a42d71c..000000000 --- a/src/test/resources/daily_stats_list.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "date": "2014-01-01T05:00:00.000Z", - "logins": 100 - }, - { - "date": "2014-01-01T05:00:00.000Z", - "logins": 100 - } -] \ No newline at end of file diff --git a/src/test/resources/default_connection_scim_configuration.json b/src/test/resources/default_connection_scim_configuration.json deleted file mode 100644 index ceccc8793..000000000 --- a/src/test/resources/default_connection_scim_configuration.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "mapping": [ - { - "auth0": "preferred_username", - "scim": "userName" - }, - { - "auth0": "email", - "scim": "emails[primary eq true].value" - } - ] -} diff --git a/src/test/resources/device_credentials.json b/src/test/resources/device_credentials.json deleted file mode 100644 index 7e0ececfb..000000000 --- a/src/test/resources/device_credentials.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "id": "dcr_0INpgifmKRm5z", - "device_name": "Google Nexus 5X - 6.0.0 - API 23 - 1080x1920", - "user_id": "auth0|121212", - "type": "refresh_token", - "client_id": "client987" -} \ No newline at end of file diff --git a/src/test/resources/device_credentials_list.json b/src/test/resources/device_credentials_list.json deleted file mode 100644 index 0b7a8edae..000000000 --- a/src/test/resources/device_credentials_list.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "id": "dcr_03YxCFDQfS7RT", - "device_name": "Google Nexus 4 - 5.1.0 - API 22 - 768x1280", - "user_id": "twitter|323232", - "type": "refresh_token", - "client_id": "client987" - }, - { - "id": "dcr_0INpgifmKRm5z", - "device_name": "Google Nexus 5X - 6.0.0 - API 23 - 1080x1920", - "user_id": "auth0|121212", - "type": "refresh_token", - "client_id": "client987" - } -] \ No newline at end of file diff --git a/src/test/resources/email_provider.json b/src/test/resources/email_provider.json deleted file mode 100644 index 197c7bd5b..000000000 --- a/src/test/resources/email_provider.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "sendgrid", - "enabled": true, - "default_from_address": "", - "credentials": { - "api_user": "", - "api_key": "your_mandrill_api_key", - "accessKeyId": "", - "secretAccessKey": "", - "region": "", - "smtp_host": "", - "smtp_port": 0, - "smtp_user": "", - "smtp_pass": "" - }, - "settings": {} -} \ No newline at end of file diff --git a/src/test/resources/email_template.json b/src/test/resources/email_template.json deleted file mode 100644 index 8871f9239..000000000 --- a/src/test/resources/email_template.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "template": "welcome_email", - "from": "me@auth0.com", - "subject": "Some subject", - "syntax": "liquid", - "body": " ", - "enabled": false -} \ No newline at end of file diff --git a/src/test/resources/email_verification_ticket.json b/src/test/resources/email_verification_ticket.json deleted file mode 100644 index 92d62ad64..000000000 --- a/src/test/resources/email_verification_ticket.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ticket": "https://login.auth0.com/lo/verify_email?client_id=nsaPS2p3cargoFy82WT7betaOPOt3qSh&tenant=mdocs&bewit=bmNlR01CcDNOUE1GeXVzODJXVDdyY1RUT1BPdDNxU2hcMTQzMDY2MjE4MVxuRTcxM0RSeUNlbEpzUUJmaFVaS3A1NEdJbWFzSUZMYzRTdEFtY2NMMXhZPVx7ImVtYWloojoiZGFtaWtww2NoQGhvdG1haWwuY29tIiwidGVuYW50IjoiZHNjaGVua2tjwWFuIiwiY2xpZW50X2lkIjoibmNlR01CcDNOUE1GeXVzODJXVDdyY1RUT1BPiiqxU2giLCJjb25uZWN0aW9uIjoiRGFtaWmsdiwicmVzdWx0VXJsIjoiIn0" -} \ No newline at end of file diff --git a/src/test/resources/empty_list.json b/src/test/resources/empty_list.json deleted file mode 100644 index 0637a088a..000000000 --- a/src/test/resources/empty_list.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/src/test/resources/enabled_clients_for_connection.json b/src/test/resources/enabled_clients_for_connection.json deleted file mode 100644 index d45d04a29..000000000 --- a/src/test/resources/enabled_clients_for_connection.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "clients": [ - { - "client_id": "client-1" - }, - { - "client_id": "client-2" - } - ], - "next": "next" -} diff --git a/src/test/resources/encryption_key.json b/src/test/resources/encryption_key.json deleted file mode 100644 index 8c11c21e2..000000000 --- a/src/test/resources/encryption_key.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "kid": "kid", - "type": "tenant-master-key", - "state": "active", - "created_at": "2024-10-16T10:50:44.107Z", - "updated_at": "2024-10-24T06:47:24.899Z", - "parent_kid": "pkid", - "public_key": "pkey" -} diff --git a/src/test/resources/encryption_keys_list.json b/src/test/resources/encryption_keys_list.json deleted file mode 100644 index fe5fc2d28..000000000 --- a/src/test/resources/encryption_keys_list.json +++ /dev/null @@ -1,29 +0,0 @@ -[ - { - "kid": "kid-1", - "type": "customer-provided-root-key", - "state": "pre-activation", - "created_at": "2024-10-24T08:02:18.029Z", - "updated_at": "2024-10-24T08:02:18.029Z", - "parent_kid": null, - "public_key": null - }, - { - "kid": "kid-2", - "type": "tenant-master-key", - "state": "active", - "created_at": "2024-10-24T06:47:23.749Z", - "updated_at": "2024-10-24T06:47:23.749Z", - "parent_kid": "pkid-1", - "public_key": null - }, - { - "kid": "kid-3", - "type": "tenant-master-key", - "state": "destroyed", - "created_at": "2024-10-16T10:50:44.107Z", - "updated_at": "2024-10-24T06:47:24.899Z", - "parent_kid": "pkid-2", - "public_key": null - } -] diff --git a/src/test/resources/error_with_message.json b/src/test/resources/error_with_message.json deleted file mode 100644 index 8ee33a091..000000000 --- a/src/test/resources/error_with_message.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "statusCode": 400, - "error": "Bad Request", - "message": "Query validation error: 'String 'invalid_field' does not match pattern. Must be a comma separated list of the following values: allowed_logout_urls,change_password.", - "errorCode": "invalid_query_string" -} \ No newline at end of file diff --git a/src/test/resources/event_log.json b/src/test/resources/event_log.json deleted file mode 100644 index 544b54169..000000000 --- a/src/test/resources/event_log.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "date": "2016-02-23T19:57:29.532Z", - "type": "sapi", - "client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - "client_name": "My Game", - "ip": "190.257.209.19", - "location_info": {}, - "details": {}, - "user_id": "auth0|56c75c4e42b6359e98374bc2" -} \ No newline at end of file diff --git a/src/test/resources/event_logs_list.json b/src/test/resources/event_logs_list.json deleted file mode 100644 index b4a468272..000000000 --- a/src/test/resources/event_logs_list.json +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "date": "2016-02-23T19:57:29.532Z", - "type": "sapi", - "client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - "client_name": "My Game", - "ip": "190.257.209.19", - "location_info": {}, - "details": {}, - "user_id": "auth0|56c75c4e42b6359e98374bc2" - }, - { - "date": "2016-03-23T19:57:31.532Z", - "type": "lapi", - "client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - "client_name": "My Application", - "ip": "190.257.209.29", - "location_info": {}, - "details": {}, - "user_id": "auth0|56c75c4e42b6359e98374bc2" - } -] \ No newline at end of file diff --git a/src/test/resources/event_logs_paged_list.json b/src/test/resources/event_logs_paged_list.json deleted file mode 100644 index 7272b6df2..000000000 --- a/src/test/resources/event_logs_paged_list.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "start": 0, - "length": 14, - "total": 14, - "limit": 50, - "logs": [ - { - "date": "2016-02-23T19:57:29.532Z", - "type": "sapi", - "client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - "client_name": "My Game", - "ip": "190.257.209.19", - "location_info": {}, - "details": {}, - "user_id": "auth0|56c75c4e42b6359e98374bc2" - }, - { - "date": "2016-03-23T19:57:31.532Z", - "type": "lapi", - "client_id": "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - "client_name": "My Application", - "ip": "190.257.209.29", - "location_info": {}, - "details": {}, - "user_id": "auth0|56c75c4e42b6359e98374bc2" - } - ] -} \ No newline at end of file diff --git a/src/test/resources/grants_list.json b/src/test/resources/grants_list.json deleted file mode 100644 index d171bec21..000000000 --- a/src/test/resources/grants_list.json +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "id": "1", - "clientID": "clientId1", - "audience": "audience1", - "user_id": "userId", - "scope": [ - "openid", - "profile" - ] - }, - { - "id": "2", - "clientID": "clientId2", - "user_id": "userId", - "audience": "audience2", - "scope": [ - "openid", - "profile" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/grants_paged_list.json b/src/test/resources/grants_paged_list.json deleted file mode 100644 index 0b43bf2df..000000000 --- a/src/test/resources/grants_paged_list.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "start": 0, - "length": 14, - "total": 14, - "limit": 50, - "grants": [ - { - "id": "1", - "clientID": "clientId1", - "audience": "audience1", - "user_id": "userId", - "scope": [ - "openid", - "profile" - ] - }, - { - "id": "2", - "clientID": "clientId2", - "user_id": "userId", - "audience": "audience2", - "scope": [ - "openid", - "profile" - ] - } - ] -} \ No newline at end of file diff --git a/src/test/resources/guardian_authentication_policies_list.json b/src/test/resources/guardian_authentication_policies_list.json deleted file mode 100644 index 152671499..000000000 --- a/src/test/resources/guardian_authentication_policies_list.json +++ /dev/null @@ -1 +0,0 @@ -["all-applications"] diff --git a/src/test/resources/guardian_enrollment.json b/src/test/resources/guardian_enrollment.json deleted file mode 100644 index fdadfd66b..000000000 --- a/src/test/resources/guardian_enrollment.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "id": "dev_3213TGOhu0ea", - "status": "confirmed", - "type": "pn", - "name": "Nexus 5X", - "phone_number": null, - "identifier": "f491f858432059", - "enrolled_at": "2017-01-18T17:45:08.328Z", - "auth_method": "", - "last_auth": "2017-07-12T17:56:26.804Z" -} \ No newline at end of file diff --git a/src/test/resources/guardian_enrollment_ticket.json b/src/test/resources/guardian_enrollment_ticket.json deleted file mode 100644 index a44d8f329..000000000 --- a/src/test/resources/guardian_enrollment_ticket.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "user_id": "u123", - "email": "me@auth0.com", - "send_mail": false, - "ticket_id": "12345679", - "ticket_url": "https://auth0.com/guardian/tickets/123" -} \ No newline at end of file diff --git a/src/test/resources/guardian_enrollments_list.json b/src/test/resources/guardian_enrollments_list.json deleted file mode 100644 index 44fb1612e..000000000 --- a/src/test/resources/guardian_enrollments_list.json +++ /dev/null @@ -1,24 +0,0 @@ -[ - { - "id": "dev_3213TGOhu0ea", - "status": "confirmed", - "type": "pn", - "name": "Nexus 5X", - "phone_number": null, - "identifier": "f491f858432059", - "enrolled_at": "2017-01-18T17:45:08.328Z", - "auth_method": "", - "last_auth": "" - }, - { - "id": "dev_3213TGOhu0ea", - "status": "confirmed", - "type": "pn", - "name": "Nexus 5X", - "phone_number": null, - "identifier": "f491f858432059", - "enrolled_at": "2017-01-18T17:45:08.328Z", - "auth_method": "", - "last_auth": "" - } -] \ No newline at end of file diff --git a/src/test/resources/guardian_factor.json b/src/test/resources/guardian_factor.json deleted file mode 100644 index 18fc5c475..000000000 --- a/src/test/resources/guardian_factor.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "enabled": false, - "trial_expired": false, - "name": "Second" -} \ No newline at end of file diff --git a/src/test/resources/guardian_factors_list.json b/src/test/resources/guardian_factors_list.json deleted file mode 100644 index d03d983e2..000000000 --- a/src/test/resources/guardian_factors_list.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "enabled": true, - "trial_expired": true, - "name": "First" - }, - { - "enabled": false, - "trial_expired": false, - "name": "Second" - } -] \ No newline at end of file diff --git a/src/test/resources/guardian_sns_factor_provider.json b/src/test/resources/guardian_sns_factor_provider.json deleted file mode 100644 index f40625d8e..000000000 --- a/src/test/resources/guardian_sns_factor_provider.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "aws_access_key_id": "123123132", - "aws_secret_access_key": "aac", - "aws_region": "us", - "sns_apns_platform_application_arn": "132", - "sns_gcm_platform_application_arn": "3123" -} \ No newline at end of file diff --git a/src/test/resources/guardian_sns_factor_provider_empty.json b/src/test/resources/guardian_sns_factor_provider_empty.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/src/test/resources/guardian_sns_factor_provider_empty.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/src/test/resources/guardian_templates.json b/src/test/resources/guardian_templates.json deleted file mode 100644 index f96402114..000000000 --- a/src/test/resources/guardian_templates.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "enrollment_message": "Enroll using..", - "verification_message": "Verify your number.." -} \ No newline at end of file diff --git a/src/test/resources/guardian_twilio_factor_provider_empty.json b/src/test/resources/guardian_twilio_factor_provider_empty.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/src/test/resources/guardian_twilio_factor_provider_empty.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/src/test/resources/guardian_twilio_factor_provider_with_from.json b/src/test/resources/guardian_twilio_factor_provider_with_from.json deleted file mode 100644 index e16dfd70e..000000000 --- a/src/test/resources/guardian_twilio_factor_provider_with_from.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "from": "+156789", - "messaging_service_sid": null, - "auth_token": "aToKen", - "sid": "3123" -} \ No newline at end of file diff --git a/src/test/resources/guardian_twilio_factor_provider_with_messaging_service_sid.json b/src/test/resources/guardian_twilio_factor_provider_with_messaging_service_sid.json deleted file mode 100644 index 1b577d2de..000000000 --- a/src/test/resources/guardian_twilio_factor_provider_with_messaging_service_sid.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "from": null, - "messaging_service_sid": "aac", - "auth_token": "aToKen", - "sid": "3123" -} \ No newline at end of file diff --git a/src/test/resources/identities_list.json b/src/test/resources/identities_list.json deleted file mode 100644 index 329ef0273..000000000 --- a/src/test/resources/identities_list.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "connection": "Someconnetion", - "user_id": "5457edea1b8f22891a000002", - "provider": "facebook", - "isSocial": true - }, - { - "connection": "Initial-Connection", - "user_id": "5457edea1b8f22891a000004", - "provider": "auth0", - "isSocial": false - } -] \ No newline at end of file diff --git a/src/test/resources/invitation.json b/src/test/resources/invitation.json deleted file mode 100644 index 01ccff852..000000000 --- a/src/test/resources/invitation.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "id": "uinv_Q3lgZXkis997Rqs3", - "client_id": "klCnbSD1U1YAIeLRdvEAFMwDoOX5bfsb", - "inviter": { - "name": "timmy" - }, - "invitee": { - "email": "timmy@domain.com" - }, - "invitation_url": "https://some-domain.auth0.com/login?invitation=U0o1uoXAl1VPkKbZlaRWEWJadkeed1E&organization=org_W3OHp07dfbjhHuWK&organization_name=timmy-org", - "ticket_id": "U0o1uoXAl1VPkKbZla0a833soMUMOo1E", - "created_at": "2021-03-31T19:08:40.295Z", - "expires_at": "2021-04-07T19:08:40.295Z", - "organization_id": "org_W30s833MRbjhHuWK" -} diff --git a/src/test/resources/invitations_list.json b/src/test/resources/invitations_list.json deleted file mode 100644 index f36767fce..000000000 --- a/src/test/resources/invitations_list.json +++ /dev/null @@ -1,34 +0,0 @@ -[ - { - "id": "uinv_Q3lgZ0a99aY7Rqs3", - "client_id": "klCnbSD1U1Yd0333dvEAFMwDoOX5bfsb", - "inviter": { - "name": "dave!" - }, - "invitee": { - "email": "dave@domain.com" - }, - "invitation_url": "https://some-domain.auth0.com/login?invitation=U0o1uoXAl1VPkKbZlaRWEWJadkeed1E&organization=org_W3OHp07dfbjhHuWK&organization_name=timmy-org", - "ticket_id": "U0o1uoXAl1VPkKbZla0a833soMUMOo1E", - "created_at": "2021-03-31T19:08:40.295Z", - "expires_at": "2021-04-07T19:08:40.295Z", - "organization_id": "org_W30s833MRbjhHuWK" - }, - { - "id": "uinv_Q3lgZ0a99aY7Rqs3", - "client_id": "klCnbSD1U1Yd0333dvEAFMwDoOX5bfsb", - "inviter": { - "name": "jim.anderson@auth0.com" - }, - "invitee": { - "email": "jim.anderson+android@auth0.com" - }, - "app_metadata": {}, - "user_metadata": {}, - "invitation_url": "https://some-domain.auth0.com/login?invitation=U0o1uoXAl1VPkKbZlaRWEWJadkeed1E&organization=org_W3OHp07dfbjhHuWK&organization_name=timmy-org", - "ticket_id": "U0o1uoXAl1VPkK0a940a833soMUMOo1E", - "created_at": "2021-03-31T17:59:23.132Z", - "expires_at": "2021-04-07T17:59:23.132Z", - "organization_id": "org_W30s833MRbjhHuWK" - } -] diff --git a/src/test/resources/invitations_paged_list.json b/src/test/resources/invitations_paged_list.json deleted file mode 100644 index c17c7fe10..000000000 --- a/src/test/resources/invitations_paged_list.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "invitations": [ - { - "id": "uinv_Q3lgZ0a99aY7Rqs3", - "client_id": "klCnbSD1U1Yd0333dvEAFMwDoOX5bfsb", - "inviter": { - "name": "dave!" - }, - "invitee": { - "email": "dave@domain.com" - }, - "invitation_url": "https://some-domain.auth0.com/login?invitation=U0o1uoXAl1VPkKbZlaRWEWJadkeed1E&organization=org_W3OHp07dfbjhHuWK&organization_name=timmy-org", - "ticket_id": "U0o1uoXAl1VPkKbZla0a833soMUMOo1E", - "created_at": "2021-03-31T19:08:40.295Z", - "expires_at": "2021-04-07T19:08:40.295Z", - "organization_id": "org_W30s833MRbjhHuWK" - }, - { - "id": "uinv_Q3lgZ0a99aY7Rqs3", - "client_id": "klCnbSD1U1Yd0333dvEAFMwDoOX5bfsb", - "inviter": { - "name": "jim.anderson@auth0.com" - }, - "invitee": { - "email": "jim.anderson+android@auth0.com" - }, - "app_metadata": {}, - "user_metadata": {}, - "invitation_url": "https://some-domain.auth0.com/login?invitation=U0o1uoXAl1VPkKbZlaRWEWJadkeed1E&organization=org_W3OHp07dfbjhHuWK&organization_name=timmy-org", - "ticket_id": "U0o1uoXAl1VPkK0a940a833soMUMOo1E", - "created_at": "2021-03-31T17:59:23.132Z", - "expires_at": "2021-04-07T17:59:23.132Z", - "organization_id": "org_W30s833MRbjhHuWK" - } - ], - "start": 0, - "limit": 4 -} diff --git a/src/test/resources/job.json b/src/test/resources/job.json deleted file mode 100644 index 516677197..000000000 --- a/src/test/resources/job.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "status": "completed", - "type": "verification_email", - "created_at": "", - "id": "job_0000000000000001", - "connection_id": "conn_1", - "location": "https://auth0.com/jobs", - "percentage_done": 100, - "time_left_seconds": 0 -} \ No newline at end of file diff --git a/src/test/resources/job_error_details.json b/src/test/resources/job_error_details.json deleted file mode 100644 index 238126c40..000000000 --- a/src/test/resources/job_error_details.json +++ /dev/null @@ -1,59 +0,0 @@ -[ - { - "user": { - "email": "john.doe@gmail.com", - "email_verified": false, - "username": "johndoe", - "phone_number": "+199999999999999", - "phone_verified": false, - "user_id": "usr_5457edea1b8f33391a000004", - "created_at": "", - "updated_at": "", - "last_password_reset": "2019-08-14T19:35:00Z", - "identities": [ - { - "provider": "facebook", - "user_id": "5457edea1b8f2289", - "connection": "facebook", - "isSocial": true - }, - { - "profileData": { - "name": "Auth0️", - "picture": "https://pbs.twimg.com/profile_images/auth0/5457ed_normal.jpg", - "created_at": "Fri May 20 17:13:23 +0000 2011", - "description": "My twitter bio", - "lang": "es", - "location": "Palermo, Buenos Aires.", - "screen_name": "auth0", - "time_zone": "Buenos Aires", - "utc_offset": -10800 - }, - "provider": "twitter", - "user_id": "5457ed", - "connection": "twitter", - "isSocial": true - } - ], - "app_metadata": {}, - "user_metadata": {}, - "picture": "", - "name": "", - "nickname": "", - "multifactor": [], - "last_ip": "", - "last_login": "", - "logins_count": 0, - "blocked": false, - "given_name": "", - "family_name": "" - }, - "errors": [ - { - "code": "code", - "message": "message", - "path": "path" - } - ] - } -] diff --git a/src/test/resources/job_post_users_exports.json b/src/test/resources/job_post_users_exports.json deleted file mode 100644 index 355268d48..000000000 --- a/src/test/resources/job_post_users_exports.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "users_export", - "status": "pending", - "connection_id": "con_123456789", - "format": "csv", - "connection": "Username-Password-Authentication", - "created_at": "2020-04-07T18:07:32.792Z", - "id": "job_123456789" -} \ No newline at end of file diff --git a/src/test/resources/job_post_users_imports.json b/src/test/resources/job_post_users_imports.json deleted file mode 100644 index 01f2912ee..000000000 --- a/src/test/resources/job_post_users_imports.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "type": "users_import", - "status": "pending", - "connection_id": "con_123456789", - "connection": "Username-Password-Authentication", - "created_at": "2020-04-08T21:25:31.675Z", - "id": "job_123456789" -} \ No newline at end of file diff --git a/src/test/resources/job_post_users_imports_input.json b/src/test/resources/job_post_users_imports_input.json deleted file mode 100644 index 9fcf8d1c4..000000000 --- a/src/test/resources/job_post_users_imports_input.json +++ /dev/null @@ -1,29 +0,0 @@ -[ - { - "email": "fake_user_1@fakers.com", - "email_verified": false, - "app_metadata": { - "roles": [ - "admin" - ], - "plan": "premium" - }, - "user_metadata": { - "theme": "light" - }, - "unknown_property": "yes" - }, - { - "email": "fake_user_2@fakers.com", - "email_verified": true, - "app_metadata": { - "roles": [ - "admin" - ], - "plan": "free" - }, - "user_metadata": { - "theme": "light" - } - } -] \ No newline at end of file diff --git a/src/test/resources/job_post_verification_email.json b/src/test/resources/job_post_verification_email.json deleted file mode 100644 index 95cad29dc..000000000 --- a/src/test/resources/job_post_verification_email.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "status": "completed", - "type": "verification_email", - "created_at": "", - "id": "job_0000000000000001" -} \ No newline at end of file diff --git a/src/test/resources/key.json b/src/test/resources/key.json deleted file mode 100644 index 41543e02c..000000000 --- a/src/test/resources/key.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "kid": "21hi274Rp02112mgkUGma", - "cert": "-----BEGIN CERTIFICATE-----\r\nMIIDDTCCA...YiA0TQhAt8=\r\n-----END CERTIFICATE-----", - "pkcs7": "-----BEGIN PKCS7-----\r\nMIIDPA....t8xAA==\r\n-----END PKCS7-----", - "current": true, - "next": false, - "previous": false, - "current_since": "2021-08-16T20:26:42.253086110Z", - "current_until": "2021-08-16T20:26:42.253086110Z", - "fingerprint": "CC:FB:DD:D8:9A:B5:DE:1B:F0:CC:36:D2:99:59:21:12:03:DD:A8:25", - "thumbprint": "CCFBDDD89AB5DE1BF0CC36D29959211203DDA825", - "revoked": false, - "revoked_at": "2021-08-16T20:26:42.253086110Z" -} diff --git a/src/test/resources/key_list.json b/src/test/resources/key_list.json deleted file mode 100644 index 63939ab1e..000000000 --- a/src/test/resources/key_list.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "kid": "21hi274Rp02112mgkUGma", - "cert": "-----BEGIN CERTIFICATE-----\r\nMIIDDTCCA...YiA0TQhAt8=\r\n-----END CERTIFICATE-----", - "pkcs7": "-----BEGIN PKCS7-----\r\nMIIDPA....t8xAA==\r\n-----END PKCS7-----", - "current": true, - "next": false, - "previous": false, - "current_since": "", - "current_until": "", - "fingerprint": "CC:FB:DD:D8:9A:B5:DE:1B:F0:CC:36:D2:99:59:21:12:03:DD:A8:25", - "thumbprint": "CCFBDDD89AB5DE1BF0CC36D29959211203DDA825", - "revoked": false, - "revoked_at": "" - }, - { - "kid": "123456789asdfghj", - "cert": "-----BEGIN CERTIFICATE-----\r\nMIIDDTCCA...YiA0TQhAt8=\r\n-----END CERTIFICATE-----", - "pkcs7": "-----BEGIN PKCS7-----\r\nMIIDPA....t8xAA==\r\n-----END PKCS7-----", - "current": true, - "next": false, - "previous": false, - "current_since": "", - "current_until": "", - "fingerprint": "CC:FB:DD:D8:9A:B5:DE:1B:F0:CC:36:D2:99:59:21:12:03:DD:A8:25", - "thumbprint": "CCFBDDD89AB5DE1BF0CC36D29959211203DDA825", - "revoked": false, - "revoked_at": "" - } -] diff --git a/src/test/resources/key_revoke.json b/src/test/resources/key_revoke.json deleted file mode 100644 index a90bfde8b..000000000 --- a/src/test/resources/key_revoke.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "cert": "-----BEGIN CERTIFICATE-----\r\nMIIDDTCCA...YiA0TQhAt8=\r\n-----END CERTIFICATE-----", - "kid": "21hi274Rp02112mgkUGma" -} diff --git a/src/test/resources/key_rotate.json b/src/test/resources/key_rotate.json deleted file mode 100644 index a90bfde8b..000000000 --- a/src/test/resources/key_rotate.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "cert": "-----BEGIN CERTIFICATE-----\r\nMIIDDTCCA...YiA0TQhAt8=\r\n-----END CERTIFICATE-----", - "kid": "21hi274Rp02112mgkUGma" -} diff --git a/src/test/resources/log_stream.json b/src/test/resources/log_stream.json deleted file mode 100644 index aeab7dd3c..000000000 --- a/src/test/resources/log_stream.json +++ /dev/null @@ -1,23 +0,0 @@ - -{ - "id": "123", - "name": "log stream 1", - "status": "active", - "type": "http", - "sink": { - "httpContentFormat": "JSONLINES", - "httpContentType": "application/json", - "httpAuthorization": "abc123", - "httpEndpoint": "https//me.org" - }, - "filters": [ - { - "type": "category", - "name": "auth.ancillary.success" - }, - { - "type": "category", - "name": "auth.ancillary.fail" - } - ] -} diff --git a/src/test/resources/log_streams_list.json b/src/test/resources/log_streams_list.json deleted file mode 100644 index eaf14c8fb..000000000 --- a/src/test/resources/log_streams_list.json +++ /dev/null @@ -1,46 +0,0 @@ -[ - { - "id": "123", - "name": "log stream 1", - "status": "active", - "type": "http", - "sink": { - "httpContentFormat": "JSONLINES", - "httpContentType": "application/json", - "httpAuthorization": "abc123", - "httpEndpoint": "https//me.org" - }, - "filters": [ - { - "type": "category", - "name": "auth.ancillary.success" - }, - { - "type": "category", - "name": "auth.ancillary.fail" - } - ] - }, - { - "id": "456", - "name": "log stream 2", - "status": "paused", - "type": "datadog", - "sink": { - "datadogRegion": "region", - "datadogApiKey": "abc123", - "httpAuthorization": "abc123", - "httpEndpoint": "https//me.org" - }, - "filters": [ - { - "type": "category", - "name": "auth.ancillary.success" - }, - { - "type": "category", - "name": "auth.ancillary.fail" - } - ] - } -] diff --git a/src/test/resources/multipart_sample.json b/src/test/resources/multipart_sample.json deleted file mode 100644 index 1996fe98a..000000000 --- a/src/test/resources/multipart_sample.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "John Doe", - "age": 99 -} \ No newline at end of file diff --git a/src/test/resources/network_acls.json b/src/test/resources/network_acls.json deleted file mode 100644 index d618014d9..000000000 --- a/src/test/resources/network_acls.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "description": "Log America and Canada all the time.", - "active": true, - "priority": 1, - "rule": { - "match": { - "geo_country_codes": [ - "US", - "CA" - ] - }, - "scope": "authentication", - "action": { - "log": true - } - }, - "created_at": "2025-03-17T12:31:57.782Z", - "updated_at": "2025-03-17T12:31:57.782Z", - "id": "acl_1" -} diff --git a/src/test/resources/network_acls_list.json b/src/test/resources/network_acls_list.json deleted file mode 100644 index d9496a31a..000000000 --- a/src/test/resources/network_acls_list.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "total": 14, - "start": 0, - "length": 14, - "network_acls": [ - { - "description": "Log America and Canada all the time.", - "active": true, - "priority": 1, - "rule": { - "match": { - "geo_country_codes": [ - "US", - "CA" - ] - }, - "scope": "authentication", - "action": { - "log": true - } - }, - "created_at": "2025-03-17T12:31:57.782Z", - "updated_at": "2025-03-17T12:31:57.782Z", - "id": "acl_1" - }, - { - "description": "Test Desc - 1", - "active": true, - "priority": 10, - "rule": { - "match": { - "ipv4_cidrs": [ - "198.51.100.48", - "10.0.0.0/24" - ] - }, - "scope": "management", - "action": { - "block": true - } - }, - "created_at": "2025-06-10T06:18:10.277Z", - "updated_at": "2025-06-10T06:18:10.277Z", - "id": "acl_2" - } - ] -} diff --git a/src/test/resources/organization.json b/src/test/resources/organization.json deleted file mode 100644 index 1453d8f94..000000000 --- a/src/test/resources/organization.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "id": "org_VSZmSnzd0m9ITBZ7", - "name": "org-1", - "display_name": "org 1", - "branding": { - "logo_uri": "https://some-url.com/", - "colors": { - "primary": "#FF0000", - "page_background": "#FF0000" - } - }, - "metadata": { - "key1": "val1" - }, - "enabled_connections": [ - { - "connection_id": "con-1", - "assign_membership_on_login": false - } - ], - "token_quota": { - "client_credentials": { - "per_day": 100, - "per_hour": 20, - "enforce": true - } - } -} diff --git a/src/test/resources/organization_client_grant.json b/src/test/resources/organization_client_grant.json deleted file mode 100644 index 83f6255eb..000000000 --- a/src/test/resources/organization_client_grant.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "1", - "client_id": "clientId1", - "audience": "audience1", - "scope": [ - "openid", - "profile" - ] -} diff --git a/src/test/resources/organization_client_grants.json b/src/test/resources/organization_client_grants.json deleted file mode 100644 index 8f5eaec13..000000000 --- a/src/test/resources/organization_client_grants.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "id": "cgr_4pI9a42haOLLWnwq", - "client_id": "client-id", - "audience": "https://api-identifier", - "scope": [ - "update:items", - "read:messages" - ] - }, - { - "id": "cgr_D018f9kmBmwbZod", - "client_id": "client-id", - "audience": "https://api-identifier", - "scope": [] - } -] diff --git a/src/test/resources/organization_client_grants_paged_list.json b/src/test/resources/organization_client_grants_paged_list.json deleted file mode 100644 index fe52b21b6..000000000 --- a/src/test/resources/organization_client_grants_paged_list.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "total": 13, - "start": 0, - "limit": 1, - "client_grants": [ - { - "id": "cgr_3aidkk3skLVOM3Ay7", - "client_id": "client-id", - "audience": "https://api-identifier/", - "scope": [ - "read:messages" - ] - } - ] -} diff --git a/src/test/resources/organization_connection.json b/src/test/resources/organization_connection.json deleted file mode 100644 index 32d043905..000000000 --- a/src/test/resources/organization_connection.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "connection_id": "con_At4BWXhV3lKv82jd", - "assign_membership_on_login": false, - "show_as_button": true -} diff --git a/src/test/resources/organization_connections_list.json b/src/test/resources/organization_connections_list.json deleted file mode 100644 index e0bff656b..000000000 --- a/src/test/resources/organization_connections_list.json +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "connection_id": "con_At4BWXhV3lKv82jd", - "assign_membership_on_login": false, - "show_as_button": true, - "connection": { - "name": "google-oauth2", - "strategy": "google-oauth2" - } - }, - { - "connection_id": "con_kai93HmEDCs8ai3d", - "assign_membership_on_login": true, - "show_as_button": true, - "connection": { - "name": "Username-Password-Authentication", - "strategy": "auth0" - } - } -] diff --git a/src/test/resources/organization_connections_paged_list.json b/src/test/resources/organization_connections_paged_list.json deleted file mode 100644 index 7ecbe34c9..000000000 --- a/src/test/resources/organization_connections_paged_list.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "enabled_connections": [ - { - "connection_id": "con_At4BWXhV3lKv82jd", - "assign_membership_on_login": false, - "show_as_button": true, - "connection": { - "name": "google-oauth2", - "strategy": "google-oauth2" - } - }, - { - "connection_id": "con_kai93HmEDCs8ai3d", - "assign_membership_on_login": true, - "show_as_button": true, - "connection": { - "name": "Username-Password-Authentication", - "strategy": "auth0" - } - } - ], - "start": 0, - "limit": 20, - "total": 2 -} diff --git a/src/test/resources/organization_member_roles_list.json b/src/test/resources/organization_member_roles_list.json deleted file mode 100644 index 0cd341389..000000000 --- a/src/test/resources/organization_member_roles_list.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "id": "rol_YMmM7zN6kqtus91", - "name": "test role", - "description": "role for testing" - } -] diff --git a/src/test/resources/organization_member_roles_paged_list.json b/src/test/resources/organization_member_roles_paged_list.json deleted file mode 100644 index e86eee8a5..000000000 --- a/src/test/resources/organization_member_roles_paged_list.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "roles": [ - { - "id": "rol_YMmM7zN6kqtus91", - "name": "test role", - "description": "role for testing" - } - ], - "start": 0, - "limit": 50, - "total": 1 -} diff --git a/src/test/resources/organization_members_checkpoint_paged_list.json b/src/test/resources/organization_members_checkpoint_paged_list.json deleted file mode 100644 index 42f1689cd..000000000 --- a/src/test/resources/organization_members_checkpoint_paged_list.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "members": [ - { - "user_id": "auth0|605a1f57cbeb2c0070fdf123", - "email": "dave@domain.com", - "picture": "https://domain.com/img.png", - "name": "dave" - }, - { - "user_id": "auth0|605a0fc1bef67f006851a123", - "email": "eric@domain.com", - "picture": "https://domain.com/img.png", - "name": "eric" - }, - { - "user_id": "auth0|5f5103d20e634f006d25a123", - "email": "john@domain.com", - "picture": "https://domain.com/img.png", - "name": "john" - } - ], - "next": "MjAyMS0wMy0yOSAxNjo1MDo09s44NDYxODcrMDAsb3JnX2Y0VXZUbG1iSWd2005zTGw" -} diff --git a/src/test/resources/organization_members_list.json b/src/test/resources/organization_members_list.json deleted file mode 100644 index 817b2063d..000000000 --- a/src/test/resources/organization_members_list.json +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "user_id": "auth0|605a1f57cbeb2c0070fdf123", - "email": "dave@domain.com", - "picture": "https://domain.com/img.png", - "name": "dave" - }, - { - "user_id": "auth0|605a0fc1bef67f006851a123", - "email": "eric@domain.com", - "picture": "https://domain.com/img.png", - "name": "eric" - }, - { - "user_id": "auth0|5f5103d20e634f006d25a123", - "email": "john@domain.com", - "picture": "https://domain.com/img.png", - "name": "john" - } -] diff --git a/src/test/resources/organization_members_paged_list.json b/src/test/resources/organization_members_paged_list.json deleted file mode 100644 index c3aefa9c1..000000000 --- a/src/test/resources/organization_members_paged_list.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "members": [ - { - "user_id": "auth0|605a1f57cbeb2c0070fdf123", - "email": "dave@domain.com", - "picture": "https://domain.com/img.png", - "name": "dave" - }, - { - "user_id": "auth0|605a0fc1bef67f006851a123", - "email": "eric@domain.com", - "picture": "https://domain.com/img.png", - "name": "eric" - }, - { - "user_id": "auth0|5f5103d20e634f006d25a123", - "email": "john@domain.com", - "picture": "https://domain.com/img.png", - "name": "john" - } - ], - "start": 0, - "limit": 20, - "total": 3 -} diff --git a/src/test/resources/organizations_checkpoint_paged_list.json b/src/test/resources/organizations_checkpoint_paged_list.json deleted file mode 100644 index 991fe936f..000000000 --- a/src/test/resources/organizations_checkpoint_paged_list.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "organizations": [ - { - "id": "org_VSZmSnzd0m9ITBZ7", - "name": "org-1", - "display_name": "org 1", - "branding": { - "logo_uri": "https://some-url.com/", - "colors": { - "primary": "#FF0000", - "page_background": "#FF0000" - } - }, - "metadata": { - "key1": "val1" - } - }, - { - "id": "org_W3OH9wtMRbjhHuWK", - "name": "org-2", - "display_name": "org 2" - } - ], - "next": "MjAyMS0wMy0yOSAxNjo1MDo09s44NDYxODcrMDAsb3JnX2Y0VXZUbG1iSWd2005zTGw" -} diff --git a/src/test/resources/organizations_list.json b/src/test/resources/organizations_list.json deleted file mode 100644 index 2b765439b..000000000 --- a/src/test/resources/organizations_list.json +++ /dev/null @@ -1,29 +0,0 @@ -[ - { - "id": "org_VSZmSnzd0m9ITBZ7", - "name": "org-1", - "display_name": "org 1", - "branding": { - "logo_uri": "https://some-url.com/", - "colors": { - "primary": "#FF0000", - "page_background": "#FF0000" - } - }, - "metadata": { - "key1": "val1" - }, - "token_quota": { - "client_credentials": { - "per_day": 100, - "per_hour": 20, - "enforce": true - } - } - }, - { - "id": "org_W3OH9wtMRbjhHuWK", - "name": "org-2", - "display_name": "org 2" - } -] diff --git a/src/test/resources/organizations_paged_list.json b/src/test/resources/organizations_paged_list.json deleted file mode 100644 index fb7697708..000000000 --- a/src/test/resources/organizations_paged_list.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "organizations": [ - { - "id": "org_VSZmSnzd0m9ITBZ7", - "name": "org-1", - "display_name": "org 1", - "branding": { - "logo_uri": "https://some-url.com/", - "colors": { - "primary": "#FF0000", - "page_background": "#FF0000" - } - }, - "metadata": { - "key1": "val1" - } - }, - { - "id": "org_W3OH9wtMRbjhHuWK", - "name": "org-2", - "display_name": "org 2" - } - ], - "start": 0, - "limit": 20, - "total": 2 -} diff --git a/src/test/resources/partials_prompt.json b/src/test/resources/partials_prompt.json deleted file mode 100644 index 2c63c0851..000000000 --- a/src/test/resources/partials_prompt.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} diff --git a/src/test/resources/password_change_ticket.json b/src/test/resources/password_change_ticket.json deleted file mode 100644 index 92d62ad64..000000000 --- a/src/test/resources/password_change_ticket.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ticket": "https://login.auth0.com/lo/verify_email?client_id=nsaPS2p3cargoFy82WT7betaOPOt3qSh&tenant=mdocs&bewit=bmNlR01CcDNOUE1GeXVzODJXVDdyY1RUT1BPdDNxU2hcMTQzMDY2MjE4MVxuRTcxM0RSeUNlbEpzUUJmaFVaS3A1NEdJbWFzSUZMYzRTdEFtY2NMMXhZPVx7ImVtYWloojoiZGFtaWtww2NoQGhvdG1haWwuY29tIiwidGVuYW50IjoiZHNjaGVua2tjwWFuIiwiY2xpZW50X2lkIjoibmNlR01CcDNOUE1GeXVzODJXVDdyY1RUT1BPiiqxU2giLCJjb25uZWN0aW9uIjoiRGFtaWmsdiwicmVzdWx0VXJsIjoiIn0" -} \ No newline at end of file diff --git a/src/test/resources/prompt.json b/src/test/resources/prompt.json deleted file mode 100644 index 5dd9655c1..000000000 --- a/src/test/resources/prompt.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "universal_login_experience": "new", - "identifier_first": true, - "webauthn_platform_first_factor": true -} diff --git a/src/test/resources/rate_limit_error.json b/src/test/resources/rate_limit_error.json deleted file mode 100644 index 27478a620..000000000 --- a/src/test/resources/rate_limit_error.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "statusCode":429, - "error":"Too Many Requests", - "message":"Global limit has been reached", - "errorCode":"too_many_requests" -} diff --git a/src/test/resources/recovery_code.json b/src/test/resources/recovery_code.json deleted file mode 100644 index 631242bc8..000000000 --- a/src/test/resources/recovery_code.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "recovery_code": "code" -} \ No newline at end of file diff --git a/src/test/resources/refresh_token.json b/src/test/resources/refresh_token.json deleted file mode 100644 index 9a3adca50..000000000 --- a/src/test/resources/refresh_token.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "id": "tokenId1", - "user_id": "userId1", - "created_at": "2024-06-26T09:10:26.643Z", - "idle_expires_at": "2024-06-26T09:10:27.131Z", - "expires_at": "2024-07-03T09:10:26.643Z", - "device": { - "initial_asn": "1234", - "initial_ip": "203.0.113.1", - "initial_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36", - "last_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36", - "last_ip": "203.0.113.1", - "last_asn": "1234" - }, - "client_id": "clientId1", - "session_id": "sessionId1", - "rotating": false, - "resource_servers": [ - { - "audience": "https://api.example.com", - "scopes": "offline_access" - } - ], - "last_exchanged_at": "2024-07-03T09:10:26.643Z" -} diff --git a/src/test/resources/resource_server.json b/src/test/resources/resource_server.json deleted file mode 100644 index 75284b5a4..000000000 --- a/src/test/resources/resource_server.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "id": "23445566abab", - "name": "Some API", - "identifier": "https://api.my-company.com/api/v2/", - "signing_alg": "RS256", - "token_dialect": "access_token", - "token_lifetime": 86400, - "token_lifetime_for_web": 7200, - "allow_offline_access": false, - "skip_consent_for_verifiable_first_party_clients": false, - "signing_secret":"secret", - "verification_location":"verification_location", - "scopes": [ - { - "description": "Read Client Grants", - "value": "read:client_grants" - }, - { - "description": "Create Client Grants", - "value": "create:client_grants" - } - ], - "is_system": true, - "enforce_policies": false, - "consent_policy": "transactional-authorization-with-mfa", - "authorization_details": [{ - "type": "payment" - }, { - "type": "my custom type" - }], - "token_encryption": { - "format": "compact-nested-jwe", - "encryption_key": { - "name": "my JWE public key", - "kid": "my kid", - "alg": "RSA-OAEP-256", - "thumbprint_sha256": "thumbprint" - } - }, - "proof_of_possession": { - "mechanism": "mtls", - "required": true - } -} diff --git a/src/test/resources/resource_servers_list.json b/src/test/resources/resource_servers_list.json deleted file mode 100644 index 9e17a1e5f..000000000 --- a/src/test/resources/resource_servers_list.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "id": "23445566abab", - "name": "Some API", - "identifier": "https://api.my-company.com/api/v2/", - "signing_alg": "RS256", - "token_dialect": "access_token", - "token_lifetime": 86400, - "token_lifetime_for_web": 7200, - "allow_offline_access": false, - "skip_consent_for_verifiable_first_party_clients": false, - "scopes": [ - { - "description": "Read Client Grants", - "value": "read:client_grants" - }, - { - "description": "Create Client Grants", - "value": "create:client_grants" - } - ], - "is_system": true, - "enforce_policies": false - }, - { - "id": "3223232da", - "name": "Another API", - "identifier": "https://another-api.my-company.com/api/v2/", - "signing_alg": "RS256", - "token_lifetime": 86400, - "token_lifetime_for_web": 7200, - "allow_offline_access": false, - "skip_consent_for_verifiable_first_party_clients": false, - "scopes": [ - { - "description": "Read Client Grants", - "value": "read:client_grants" - }, - { - "description": "Create Client Grants", - "value": "create:client_grants" - } - ], - "is_system": true, - "enforce_policies": false - } -] \ No newline at end of file diff --git a/src/test/resources/resource_servers_paged_list.json b/src/test/resources/resource_servers_paged_list.json deleted file mode 100644 index 0e26109ae..000000000 --- a/src/test/resources/resource_servers_paged_list.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "start": 0, - "length": 14, - "total": 14, - "limit": 50, - "resource_servers": [ - { - "id": "23445566abab", - "name": "Some API", - "identifier": "https://api.my-company.com/api/v2/", - "signing_alg": "RS256", - "token_dialect": "access_token", - "token_lifetime": 86400, - "token_lifetime_for_web": 7200, - "allow_offline_access": false, - "skip_consent_for_verifiable_first_party_clients": false, - "scopes": [ - { - "description": "Read Client Grants", - "value": "read:client_grants" - }, - { - "description": "Create Client Grants", - "value": "create:client_grants" - } - ], - "is_system": true, - "enforce_policies": false - }, - { - "id": "3223232da", - "name": "Another API", - "identifier": "https://another-api.my-company.com/api/v2/", - "signing_alg": "RS256", - "token_dialect": "access_token", - "token_lifetime": 86400, - "token_lifetime_for_web": 7200, - "allow_offline_access": false, - "skip_consent_for_verifiable_first_party_clients": false, - "scopes": [ - { - "description": "Read Client Grants", - "value": "read:client_grants" - }, - { - "description": "Create Client Grants", - "value": "create:client_grants" - } - ], - "is_system": true, - "enforce_policies": false - } - ] -} \ No newline at end of file diff --git a/src/test/resources/role.json b/src/test/resources/role.json deleted file mode 100644 index 25dec9365..000000000 --- a/src/test/resources/role.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "id": "1", - "name": "roleId", - "description": "description1" -} diff --git a/src/test/resources/role_permissions_list.json b/src/test/resources/role_permissions_list.json deleted file mode 100644 index eb87325b4..000000000 --- a/src/test/resources/role_permissions_list.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "resource_server_identifier": "resourceServerIdentifier1", - "permission_name": "permission1", - "resource_server_name": "resourceServerName1", - "description": "description1" - }, - { - "resource_server_identifier": "resourceServerIdentifier2", - "permission_name": "permission2", - "resource_server_name": "resourceServerName2", - "description": "description2" - } -] diff --git a/src/test/resources/role_permissions_paged_list.json b/src/test/resources/role_permissions_paged_list.json deleted file mode 100644 index 66daef8c8..000000000 --- a/src/test/resources/role_permissions_paged_list.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "start": 0, - "length": 14, - "total": 14, - "limit": 50, - "permissions": [ - { - "resource_server_identifier": "resourceServerIdentifier1", - "permission_name": "permission1", - "resource_server_name": "resourceServerName1", - "description": "description1" - }, - { - "resource_server_identifier": "resourceServerIdentifier2", - "permission_name": "permission2", - "resource_server_name": "resourceServerName2", - "description": "description2" - } - ] -} diff --git a/src/test/resources/role_users_checkpoint_paged_list.json b/src/test/resources/role_users_checkpoint_paged_list.json deleted file mode 100644 index d75127138..000000000 --- a/src/test/resources/role_users_checkpoint_paged_list.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "users": [ - { - "email": "john.doe@gmail.com", - "user_id": "usr_5457edea1b8f33391a000004", - "picture": "", - "name": "" - }, - { - "email": "john.doe2@gmail.com", - "user_id": "usr_5457edea1b8f33391a000004", - "picture": "", - "name": "" - } - ], - "next": "MjAyMS0wMy0yOSAxNjo1MDo09s44NDYxODcrMDAsb3JnX2Y0VXZUbG1iSWd2005zTGw" -} diff --git a/src/test/resources/role_users_list.json b/src/test/resources/role_users_list.json deleted file mode 100644 index 24e985f2b..000000000 --- a/src/test/resources/role_users_list.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "email": "john.doe@gmail.com", - "user_id": "usr_5457edea1b8f33391a000004", - "picture": "", - "name": "" - }, - { - "email": "john.doe2@gmail.com", - "user_id": "usr_5457edea1b8f33391a000004", - "picture": "", - "name": "" - } -] diff --git a/src/test/resources/role_users_paged_list.json b/src/test/resources/role_users_paged_list.json deleted file mode 100644 index fa9bcbe5e..000000000 --- a/src/test/resources/role_users_paged_list.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "start": 0, - "length": 14, - "total": 14, - "limit": 50, - "users": [ - { - "email": "john.doe@gmail.com", - "user_id": "usr_5457edea1b8f33391a000004", - "picture": "", - "name": "" - }, - { - "email": "john.doe2@gmail.com", - "user_id": "usr_5457edea1b8f33391a000004", - "picture": "", - "name": "" - } - ] -} diff --git a/src/test/resources/roles_list.json b/src/test/resources/roles_list.json deleted file mode 100644 index 5e92c0a26..000000000 --- a/src/test/resources/roles_list.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "id": "1", - "name": "roleId", - "description": "description1" - }, - { - "id": "2", - "name": "roleId", - "description": "description2" - } -] diff --git a/src/test/resources/roles_paged_list.json b/src/test/resources/roles_paged_list.json deleted file mode 100644 index c14a790a6..000000000 --- a/src/test/resources/roles_paged_list.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "start": 0, - "length": 14, - "total": 14, - "limit": 50, - "roles": [ - { - "id": "1", - "name": "roleId1", - "description": "description1" - }, - { - "id": "2", - "name": "roleId2", - "description": "description2" - } - ] -} diff --git a/src/test/resources/rotate_key.json b/src/test/resources/rotate_key.json deleted file mode 100644 index 706ea8235..000000000 --- a/src/test/resources/rotate_key.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "kid": "kid-1", - "cert": "-----BEGIN CERTIFICATE-----cert-key-----END CERTIFICATE-----" -} diff --git a/src/test/resources/rule.json b/src/test/resources/rule.json deleted file mode 100644 index a876e2a2e..000000000 --- a/src/test/resources/rule.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "rule_1", - "id": "con_0000000000000001", - "enabled": true, - "script": "function (user, context, callback) {\n callback(null, user, context);\n}", - "order": 1, - "stage": "login_success" -} \ No newline at end of file diff --git a/src/test/resources/rules_config.json b/src/test/resources/rules_config.json deleted file mode 100644 index c46c60772..000000000 --- a/src/test/resources/rules_config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "key": "rules_config_1" -} \ No newline at end of file diff --git a/src/test/resources/rules_configs_list.json b/src/test/resources/rules_configs_list.json deleted file mode 100644 index 93ecd65b8..000000000 --- a/src/test/resources/rules_configs_list.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "key": "rules_config_1" - }, - { - "key": "rules_config_2" - } -] \ No newline at end of file diff --git a/src/test/resources/rules_list.json b/src/test/resources/rules_list.json deleted file mode 100644 index 7ebefd8f9..000000000 --- a/src/test/resources/rules_list.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "name": "rule_1", - "id": "con_0000000000000001", - "enabled": true, - "script": "function (user, context, callback) {\n callback(null, user, context);\n}", - "order": 1, - "stage": "login_success" - }, - { - "name": "rule_2", - "id": "con_0000000000000002", - "enabled": true, - "script": "function (user, context, callback) {\n callback(null, user, context);\n}", - "order": 1, - "stage": "login_success" - } -] \ No newline at end of file diff --git a/src/test/resources/rules_paged_list.json b/src/test/resources/rules_paged_list.json deleted file mode 100644 index f9c6dcab7..000000000 --- a/src/test/resources/rules_paged_list.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "start": 0, - "length": 14, - "total": 14, - "limit": 50, - "rules": [ - { - "name": "rule_1", - "id": "con_0000000000000001", - "enabled": true, - "script": "function (user, context, callback) {\n callback(null, user, context);\n}", - "order": 1, - "stage": "login_success" - }, - { - "name": "rule_2", - "id": "con_0000000000000002", - "enabled": true, - "script": "function (user, context, callback) {\n callback(null, user, context);\n}", - "order": 1, - "stage": "login_success" - } - ] -} \ No newline at end of file diff --git a/src/test/resources/scope.json b/src/test/resources/scope.json deleted file mode 100644 index c8650899d..000000000 --- a/src/test/resources/scope.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "Read Client Grants", - "value": "read:client_grants" -} \ No newline at end of file diff --git a/src/test/resources/self_service_profile.json b/src/test/resources/self_service_profile.json deleted file mode 100644 index 6c090caa4..000000000 --- a/src/test/resources/self_service_profile.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "id": "id", - "name": "Test", - "description": "This is for Test", - "user_attributes": [ - { - "name": "Phone", - "description": "This is Phone Number", - "is_optional": true - } - ], - "branding": { - "logo_url": "https://www.google.com", - "colors": { - "primary": "#ffffff" - } - }, - "allowed_strategies": [ - "oidc" - ] -} diff --git a/src/test/resources/self_service_profile_custom_text.json b/src/test/resources/self_service_profile_custom_text.json deleted file mode 100644 index ef8aac8d0..000000000 --- a/src/test/resources/self_service_profile_custom_text.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "introduction": "Welcome! With only a few steps" -} diff --git a/src/test/resources/self_service_profile_response.json b/src/test/resources/self_service_profile_response.json deleted file mode 100644 index 46b5bcd8e..000000000 --- a/src/test/resources/self_service_profile_response.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "id": "id", - "name": "Test", - "description": "This is a Test", - "user_attributes": [ - { - "name": "Phone", - "description": "This is Phone Number", - "is_optional": true - } - ], - "allowed_strategies": [ - "oidc" - ], - "created_at": "2024-12-20T09:32:13.885Z", - "updated_at": "2024-12-20T09:32:13.885Z", - "branding": { - "logo_url": "https://www.google.com", - "colors": { - "primary": "#ffffff" - } - } -} diff --git a/src/test/resources/self_service_profile_sso_ticket.json b/src/test/resources/self_service_profile_sso_ticket.json deleted file mode 100644 index 8b8c3e83e..000000000 --- a/src/test/resources/self_service_profile_sso_ticket.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ticket": "https://example.auth0.com/self-service/connections-flow?ticket=ticket-1234" -} diff --git a/src/test/resources/self_service_profile_sso_ticket_request.json b/src/test/resources/self_service_profile_sso_ticket_request.json deleted file mode 100644 index 17f7af82d..000000000 --- a/src/test/resources/self_service_profile_sso_ticket_request.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "connection_config": { - "name": "okta", - "display_name": "okta connection", - "is_domain_connection": true, - "show_as_button": true, - "metadata": { - "key1":"value1" - }, - "options":{ - "icon_url":"url", - "domain_aliases":[ - "acme.corp", - "okta.com" - ], - "idpinitiated": { - "enabled": true, - "client_id": "client-1", - "client_protocol": "oauth2", - "client_authorizequery": "response_type=code&scope=openid%20profile%20email" - } - } - }, - "enabled_clients": [ - "client-1" - ], - "enabled_organizations": [ - { - "organization_id": "org_1", - "assign_membership_on_login": true, - "show_as_button": true - } - ], - "ttl_sec": 0, - "domain_aliases_config": { - "domain_verification": "none" - }, - "provisioning_config": { - "scopes": ["get:users"] - } -} diff --git a/src/test/resources/self_service_profiles_list.json b/src/test/resources/self_service_profiles_list.json deleted file mode 100644 index 53001be84..000000000 --- a/src/test/resources/self_service_profiles_list.json +++ /dev/null @@ -1,64 +0,0 @@ -[ - { - "id": "id1", - "name": "test1", - "description": "This is for testing", - "user_attributes": [ - { - "name": "Phone", - "description": "This is Phone Number", - "is_optional": true - } - ], - "allowed_strategies": [ - "google-apps" - ], - "created_at": "2024-12-16T15:26:39.015Z", - "updated_at": "2024-12-16T15:28:04.933Z" - }, - { - "id": "id2", - "name": "Test2", - "description": "This is for Test2", - "user_attributes": [ - { - "name": "Phone", - "description": "This is Phone Number", - "is_optional": true - }, - { - "name": "UserName", - "description": "This is User Name", - "is_optional": true - } - ], - "allowed_strategies": [ - "oidc" - ], - "created_at": "2024-12-16T15:29:06.119Z", - "updated_at": "2024-12-16T15:29:06.119Z" - }, - { - "id": "id3", - "name": "Test3", - "description": "This is a Test3", - "user_attributes": [ - { - "name": "Name", - "description": "Name Field", - "is_optional": true - } - ], - "allowed_strategies": [ - "oidc" - ], - "created_at": "2024-12-20T09:32:13.885Z", - "updated_at": "2024-12-20T09:32:13.885Z", - "branding": { - "logo_url": "https://www.google.com", - "colors": { - "primary": "#ffffff" - } - } - } -] diff --git a/src/test/resources/session.json b/src/test/resources/session.json deleted file mode 100644 index 07251c3ca..000000000 --- a/src/test/resources/session.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "id": "sessionId1", - "user_id": "userId1", - "created_at": "2024-09-04T06:41:46.145Z", - "updated_at": "2024-09-04T06:41:46.621Z", - "authenticated_at": "2024-09-04T06:41:46.145Z", - "authentication": { - "methods": [ - { - "name": "federated", - "timestamp": "2024-09-04T06:41:46.145Z" - } - ] - }, - "idle_expires_at": "2024-09-07T06:41:46.622Z", - "expires_at": "2024-09-11T06:41:46.145Z", - "device": { - "initial_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36", - "initial_asn": "1234", - "initial_ip": "134.1.15.0", - "last_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36", - "last_ip": "134.1.15.0", - "last_asn": "1234" - }, - "clients": [ - { - "client_id": "clientId1" - } - ] -} diff --git a/src/test/resources/suspicious_ip_throttling_configuration.json b/src/test/resources/suspicious_ip_throttling_configuration.json deleted file mode 100644 index fd715aace..000000000 --- a/src/test/resources/suspicious_ip_throttling_configuration.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "enabled": false, - "shields": [ - "block", - "admin_notification" - ], - "allowlist": [ - "143.204.0.105", - "2600:9000:208f:ca00:d:f5f5:b40:93a1" - ], - "stage": { - "pre-login": { - "max_attempts": 100, - "rate": 864000 - }, - "pre-user-registration": { - "max_attempts": 50, - "rate": 1728000 - } - } -} diff --git a/src/test/resources/tenant.json b/src/test/resources/tenant.json deleted file mode 100644 index 0c7cd8b67..000000000 --- a/src/test/resources/tenant.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "change_password": { - "enabled": false, - "html": "" - }, - "guardian_mfa_page": { - "enabled": false, - "html": "" - }, - "default_audience": "", - "default_directory": "", - "error_page": { - "html": "", - "show_log_link": false, - "url": "https://mycompany.org/error" - }, - "flags": { - "change_pwd_flow_v1": false, - "enable_client_connections": false, - "enable_apis_section": false, - "enable_pipeline2": false, - "enable_dynamic_client_registration": false - }, - "friendly_name": "My Company", - "idle_session_lifetime": 0.5, - "session_lifetime": 0.75, - "picture_url": "https://mycompany.org/logo.png", - "support_email": "support@mycompany.org", - "support_url": "https://mycompany.org/support", - "allowed_logout_urls": [ - "https://mycompany.org/logoutCallback" - ], - "session_cookie": { - "mode": "persistent" - }, - "acr_values_supported": ["string1", "string2"], - "pushed_authorization_requests_supported": true, - "remove_alg_from_jwks": true, - "mtls": { - "enable_endpoint_aliases": true - }, - "default_token_quota": { - "clients": { - "client_credentials": { - "per_day": 100, - "per_hour": 20, - "enforce": true - } - }, - "organizations": { - "client_credentials": { - "per_day": 100, - "per_hour": 20, - "enforce": true - } - } - } -} diff --git a/src/test/resources/user.json b/src/test/resources/user.json deleted file mode 100644 index 2ee652f7f..000000000 --- a/src/test/resources/user.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "email": "john.doe@gmail.com", - "email_verified": false, - "username": "johndoe", - "phone_number": "+199999999999999", - "phone_verified": false, - "user_id": "usr_5457edea1b8f33391a000004", - "created_at": "", - "updated_at": "", - "last_password_reset": "2019-08-14T19:35:00Z", - "identities": [ - { - "provider": "facebook", - "user_id": "5457edea1b8f2289", - "connection": "facebook", - "isSocial": true - }, - { - "profileData": { - "name": "Auth0️", - "picture": "https://pbs.twimg.com/profile_images/auth0/5457ed_normal.jpg", - "created_at": "Fri May 20 17:13:23 +0000 2011", - "description": "My twitter bio", - "lang": "es", - "location": "Palermo, Buenos Aires.", - "screen_name": "auth0", - "time_zone": "Buenos Aires", - "utc_offset": -10800 - }, - "provider": "twitter", - "user_id": "5457ed", - "connection": "twitter", - "isSocial": true - } - ], - "app_metadata": {}, - "user_metadata": {}, - "picture": "", - "name": "", - "nickname": "", - "multifactor": [], - "last_ip": "", - "last_login": "", - "logins_count": 0, - "blocked": false, - "given_name": "", - "family_name": "" -} \ No newline at end of file diff --git a/src/test/resources/user_blocks.json b/src/test/resources/user_blocks.json deleted file mode 100644 index 7d1020a6b..000000000 --- a/src/test/resources/user_blocks.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "blocked_for": [ - { - "identifier": "john.doe@gmail.com", - "ip": "10.0.0.1" - }, - { - "identifier": "john.doe@gmail.com", - "ip": "10.0.0.2" - } - ] -} \ No newline at end of file diff --git a/src/test/resources/user_permissions_paged_list.json b/src/test/resources/user_permissions_paged_list.json deleted file mode 100644 index 66daef8c8..000000000 --- a/src/test/resources/user_permissions_paged_list.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "start": 0, - "length": 14, - "total": 14, - "limit": 50, - "permissions": [ - { - "resource_server_identifier": "resourceServerIdentifier1", - "permission_name": "permission1", - "resource_server_name": "resourceServerName1", - "description": "description1" - }, - { - "resource_server_identifier": "resourceServerIdentifier2", - "permission_name": "permission2", - "resource_server_name": "resourceServerName2", - "description": "description2" - } - ] -} diff --git a/src/test/resources/user_refresh_tokens.json b/src/test/resources/user_refresh_tokens.json deleted file mode 100644 index 1b4dc7d0e..000000000 --- a/src/test/resources/user_refresh_tokens.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "tokens": [ - { - "id": "tokenId1", - "user_id": "userId1", - "created_at": "2024-06-26T09:10:26.643Z", - "idle_expires_at": "2024-06-26T09:10:27.131Z", - "expires_at": "2024-07-03T09:10:26.643Z", - "device": { - "initial_asn": "1234", - "initial_ip": "203.0.113.1", - "initial_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36", - "last_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36", - "last_ip": "203.0.113.1", - "last_asn": "1234" - }, - "client_id": "clientId1", - "session_id": "sessionId1", - "rotating": false, - "resource_servers": [ - { - "audience": "https://api.example.com", - "scopes": "offline_access" - } - ], - "last_exchanged_at": "2024-07-03T09:10:26.643Z" - }, - { - "id": "tokenId2", - "user_id": "userId1", - "created_at": "2024-06-26T09:10:26.643Z", - "updated_at": "2024-06-26T09:10:27.131Z", - "idle_expires_at": "2024-06-26T09:10:27.131Z", - "expires_at": "2024-07-03T09:10:26.643Z", - "device": { - "initial_asn": "1234", - "initial_ip": "203.0.113.1", - "initial_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36", - "last_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36", - "last_ip": "203.0.113.1", - "last_asn": "1234" - }, - "client_id": "clientId2", - "session_id": "sessionId2", - "rotating": true, - "resource_servers": [ - { - "audience": "https://api.example.com", - "scopes": "offline_access" - } - ], - "last_exchanged_at": "2024-07-03T09:10:26.643Z" - } - ], - "next": "token1", - "total": 11 -} diff --git a/src/test/resources/user_roles_paged_list.json b/src/test/resources/user_roles_paged_list.json deleted file mode 100644 index c14a790a6..000000000 --- a/src/test/resources/user_roles_paged_list.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "start": 0, - "length": 14, - "total": 14, - "limit": 50, - "roles": [ - { - "id": "1", - "name": "roleId1", - "description": "description1" - }, - { - "id": "2", - "name": "roleId2", - "description": "description2" - } - ] -} diff --git a/src/test/resources/user_sessions.json b/src/test/resources/user_sessions.json deleted file mode 100644 index 71c9b754f..000000000 --- a/src/test/resources/user_sessions.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "sessions": [ - { - "id": "sessionId1", - "user_id": "userId1", - "created_at": "2024-06-26T09:10:26.643Z", - "updated_at": "2024-06-26T09:10:27.131Z", - "authenticated_at": "2024-06-26T09:10:26.643Z", - "authentication": { - "methods": [ - { - "name": "pwd", - "timestamp": "2024-06-26T09:10:26.643Z" - } - ] - }, - "idle_expires_at": "2024-06-26T09:40:27.131Z", - "expires_at": "2024-07-03T09:10:26.643Z", - "device": { - "initial_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36", - "initial_asn": "1234", - "initial_ip": "203.0.113.1", - "last_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36", - "last_ip": "203.0.113.1", - "last_asn": "1234" - }, - "clients": [ - { - "client_id": "clientId1" - } - ] - } - ], - "next": "sessionId1", - "total": 9 -} diff --git a/src/test/resources/users_list.json b/src/test/resources/users_list.json deleted file mode 100644 index 668462e23..000000000 --- a/src/test/resources/users_list.json +++ /dev/null @@ -1,96 +0,0 @@ -[ - { - "email": "john.doe@gmail.com", - "email_verified": false, - "username": "johndoe", - "phone_number": "+199999999999999", - "phone_verified": false, - "user_id": "usr_5457edea1b8f33391a000004", - "created_at": "", - "updated_at": "", - "identities": [ - { - "provider": "facebook", - "user_id": "5457edea1b8f2289", - "connection": "facebook", - "isSocial": true - }, - { - "profileData": { - "name": "Auth0️", - "picture": "https://pbs.twimg.com/profile_images/auth0/5457ed_normal.jpg", - "created_at": "Fri May 20 17:13:23 +0000 2011", - "description": "My twitter bio", - "lang": "es", - "location": "Palermo, Buenos Aires.", - "screen_name": "auth0", - "time_zone": "Buenos Aires", - "utc_offset": -10800 - }, - "provider": "twitter", - "user_id": "5457ed", - "connection": "twitter", - "isSocial": true - } - ], - "app_metadata": {}, - "user_metadata": {}, - "picture": "", - "name": "", - "nickname": "", - "multifactor": [], - "last_ip": "", - "last_login": "", - "logins_count": 0, - "blocked": false, - "given_name": "", - "family_name": "" - }, - { - "email": "john.doe2@gmail.com", - "email_verified": false, - "username": "johndoe2", - "phone_number": "+199999999999999", - "phone_verified": false, - "user_id": "usr_5457edea1b8f33391a000004", - "created_at": "", - "updated_at": "", - "identities": [ - { - "provider": "facebook", - "user_id": "5457edea1b8f2289", - "connection": "facebook", - "isSocial": true - }, - { - "profileData": { - "name": "Auth0️", - "picture": "https://pbs.twimg.com/profile_images/auth0/5457ed_normal.jpg", - "created_at": "Fri May 20 17:13:23 +0000 2011", - "description": "My twitter bio", - "lang": "es", - "location": "Palermo, Buenos Aires.", - "screen_name": "auth0", - "time_zone": "Buenos Aires", - "utc_offset": -10800 - }, - "provider": "twitter", - "user_id": "5457ed", - "connection": "twitter", - "isSocial": true - } - ], - "app_metadata": {}, - "user_metadata": {}, - "picture": "", - "name": "", - "nickname": "", - "multifactor": [], - "last_ip": "", - "last_login": "", - "logins_count": 0, - "blocked": false, - "given_name": "", - "family_name": "" - } -] \ No newline at end of file diff --git a/src/test/resources/users_paged_list.json b/src/test/resources/users_paged_list.json deleted file mode 100644 index 1199e1437..000000000 --- a/src/test/resources/users_paged_list.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "start": 0, - "length": 14, - "total": 14, - "limit": 50, - "users": [ - { - "email": "john.doe@gmail.com", - "email_verified": false, - "username": "johndoe", - "phone_number": "+199999999999999", - "phone_verified": false, - "user_id": "usr_5457edea1b8f33391a000004", - "created_at": "", - "updated_at": "", - "identities": [ - { - "provider": "facebook", - "user_id": "5457edea1b8f2289", - "connection": "facebook", - "isSocial": true - }, - { - "profileData": { - "name": "Auth0️", - "picture": "https://pbs.twimg.com/profile_images/auth0/5457ed_normal.jpg", - "created_at": "Fri May 20 17:13:23 +0000 2011", - "description": "My twitter bio", - "lang": "es", - "location": "Palermo, Buenos Aires.", - "screen_name": "auth0", - "time_zone": "Buenos Aires", - "utc_offset": -10800 - }, - "provider": "twitter", - "user_id": "5457ed", - "connection": "twitter", - "isSocial": true - } - ], - "app_metadata": {}, - "user_metadata": {}, - "picture": "", - "name": "", - "nickname": "", - "multifactor": [], - "last_ip": "", - "last_login": "", - "logins_count": 0, - "blocked": false, - "given_name": "", - "family_name": "" - }, - { - "email": "john.doe2@gmail.com", - "email_verified": false, - "username": "johndoe2", - "phone_number": "+199999999999999", - "phone_verified": false, - "user_id": "usr_5457edea1b8f33391a000004", - "created_at": "", - "updated_at": "", - "identities": [ - { - "provider": "facebook", - "user_id": "5457edea1b8f2289", - "connection": "facebook", - "isSocial": true - }, - { - "profileData": { - "name": "Auth0️", - "picture": "https://pbs.twimg.com/profile_images/auth0/5457ed_normal.jpg", - "created_at": "Fri May 20 17:13:23 +0000 2011", - "description": "My twitter bio", - "lang": "es", - "location": "Palermo, Buenos Aires.", - "screen_name": "auth0", - "time_zone": "Buenos Aires", - "utc_offset": -10800 - }, - "provider": "twitter", - "user_id": "5457ed", - "connection": "twitter", - "isSocial": true - } - ], - "app_metadata": {}, - "user_metadata": {}, - "picture": "", - "name": "", - "nickname": "", - "multifactor": [], - "last_ip": "", - "last_login": "", - "logins_count": 0, - "blocked": false, - "given_name": "", - "family_name": "" - } - ] -} \ No newline at end of file